Skip to content

Commit

Permalink
chore: release 0.1.10 (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeo authored Jun 28, 2023
1 parent 43829b7 commit 93a31c6
Show file tree
Hide file tree
Showing 34 changed files with 129 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
PYTHON_VERSION: "3.8"
PROTOC_VERSION: "3.x"
POETRY_VERSION: "1.4.1"
DENO_BINDGEN_URL: https://github.com/metatypedev/deno_bindgen/raw/main/cli.ts
DENO_BINDGEN_URL: https://deno.land/x/deno_bindgen@0.8.1/cli.ts
DENO_VERSION: "1.34.3"
PNPM_VERSION: "8.6.0"
NODE_VERSION: "19.8.1"
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ FROM denoland/deno:bin-${DENO_VERSION} AS deno-bin

FROM base AS builder

ARG DENO_BINDGEN_URL=https://github.com/metatypedev/deno_bindgen/raw/main/cli.ts
ARG DENO_BINDGEN_URL=https://deno.land/x/deno_bindgen@0.8.1/cli.ts

ENV DENO_DIR /deno-dir/
ENV DENO_INSTALL /root/.deno
Expand Down
9 changes: 5 additions & 4 deletions dev/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dev:
(description = ").+("): TAGLINE
typegraph/python_next/pyproject.toml:
(description = ").+("): TAGLINE
'**/*/Cargo.toml':
'**/Cargo.toml':
(version = ").+("): METATYPE_VERSION
(description = ").+("): TAGLINE
dev/Dockerfile:
Expand All @@ -36,13 +36,14 @@ dev:
(typegraph_version = ").*("): TYPEGRAPH_VERSION
whiz.yaml:
'( TYPEGRAPH_VERSION: ").+(")': TYPEGRAPH_VERSION
'( DENO_BINDGEN_URL: ").+(")': DENO_BINDGEN_URL
'( WASM_TOOLS_VERSION: ").+(")': WASM_TOOLS_VERSION
'( JCO_VERSION: ").+(")': JCO_VERSION
website/docusaurus.config.js:
'( tagline: ").+(",)': TAGLINE
examples/**/compose.yml:
'( image: ghcr.io/metatypedev/typegate:v).+()': METATYPE_VERSION
'**/*/pyproject.toml':
'**/pyproject.toml':
(version = ").+("): METATYPE_VERSION
examples/**/pyproject.toml:
(typegraph = ").+("): METATYPE_VERSION
Expand All @@ -51,14 +52,14 @@ dev:
POETRY_VERSION: 1.4.1
PROTOC_VERSION: 3.x
RUST_VERSION: 1.70.0
DENO_BINDGEN_URL: 'https://github.com/metatypedev/deno_bindgen/raw/main/cli.ts'
DENO_BINDGEN_URL: 'https://deno.land/x/deno_bindgen@0.8.1/cli.ts'
DENO_VERSION: 1.34.3
NODE_VERSION: 19.8.1
PNPM_VERSION: 8.6.0
WASM_TOOLS_VERSION: 1.0.33
JCO_VERSION: 0.7.0
TYPEGRAPH_VERSION: 0.0.1
METATYPE_VERSION: 0.1.10-dev.0
METATYPE_VERSION: 0.1.10
TAGLINE: >-
Declarative API development platform. Build serverless backends with
zero-trust and less code, no matter where and how your (legacy) systems
Expand Down
2 changes: 1 addition & 1 deletion dev/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export {
export { groupBy } from "https://deno.land/[email protected]/collections/group_by.ts";
export type { WalkEntry } from "https://deno.land/[email protected]/fs/mod.ts";
export * as yaml from "https://deno.land/[email protected]/yaml/mod.ts";
export * as semver from "https://deno.land/x/[email protected]/mod.ts";
export * as semver from "https://deno.land/[email protected]/semver/mod.ts";
export { udd } from "https://deno.land/x/[email protected]/mod.ts";

import {
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/new/compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
typegate:
image: ghcr.io/metatypedev/typegate:v0.1.10-dev.0
image: ghcr.io/metatypedev/typegate:v0.1.10
platform: linux/amd64
restart: always
ports:
Expand Down
4 changes: 2 additions & 2 deletions examples/templates/new/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tool.poetry]
name = "example"
version = "0.1.10-dev.0"
version = "0.1.10"
description = ""
authors = []
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
typegraph = "0.1.10-dev.0"
typegraph = "0.1.10"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion libs/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "common"
version = "0.1.10-dev.0"
version = "0.1.10"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "macros"
version = "0.1.10-dev.0"
version = "0.1.10"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion libs/typescript/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "typescript"
version = "0.1.10-dev.0"
version = "0.1.10"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/xtask/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xtask"
version = "0.1.10-dev.0"
version = "0.1.10"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion meta-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "meta-cli"
version = "0.1.10-dev.0"
version = "0.1.10"
edition = "2021"

description = "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are."
Expand Down
20 changes: 19 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[tool.poetry]
name = "metatype"
version = "0.1.10-dev.0"
version = "0.1.10"
description = ""
authors = []

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
typegraph = { path = "typegraph/python", develop = true }
typegraph-std = "^0.0.1"
wasmtime = "^9.0.0"

[tool.poetry.group.dev.dependencies]
pydoc-markdown = { git = "https://github.com/metatypedev/pydoc-markdown", branch = "develop" }
Expand Down
2 changes: 1 addition & 1 deletion typegate/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"monads": "https://deno.land/x/[email protected]/mod.ts",
"jwt": "https://deno.land/x/[email protected]/mod.ts",
"redis": "https://deno.land/x/[email protected]/mod.ts",
"oauth2_client": "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/mod.ts",
"oauth2_client": "https://deno.land/x/[email protected]/mod.ts",
"test/mock_fetch": "https://deno.land/x/[email protected]/mod.ts",
"json_schema_typed": "https://deno.land/x/[email protected]/draft_latest.ts",
"url_join": "https://deno.land/x/[email protected]/mod.ts",
Expand Down
24 changes: 12 additions & 12 deletions typegate/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion typegate/native/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "native"
version = "0.1.10-dev.0"
version = "0.1.10"
edition = "2021"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions typegate/src/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ export class Engine {
} else {
auth = this.tg.auths.get(provider as string);
}
} catch {
logger.warning("no malformed jwt");
} catch (e) {
logger.warning(`malformed jwt: ${e}`);
}
}

Expand Down
5 changes: 3 additions & 2 deletions typegate/src/runtimes/typegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { typegraph_validate } from "native";
import { ensure } from "../utils.ts";
import { getLogger } from "../log.ts";
import config from "../config.ts";
import * as semver from "std/semver/mod.ts";

const logger = getLogger(import.meta);

Expand Down Expand Up @@ -102,9 +103,9 @@ export class TypeGateRuntime extends Runtime {
};

addTypegraph: Resolver = async ({ fromString, secrets, cliVersion }) => {
if (cliVersion !== config.version) {
if (!semver.gte(semver.parse(cliVersion), semver.parse(config.version))) {
throw new Error(
`Meta CLI version ${cliVersion} must match typegate version ${config.version} (until the releases are stable)`,
`Meta CLI version ${cliVersion} must be greater than typegate version ${config.version} (until the releases are stable)`,
);
}
const json = await typegraph_validate({ json: fromString }).then((res) => {
Expand Down
4 changes: 3 additions & 1 deletion typegate/src/typegraph/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export function upgradeTypegraph(typegraph: TypeGraphDS): TypeGraphDS {
const { meta } = typegraph;

let currentVersion = meta.version;
while (semver.neq(typegraphVersion, currentVersion)) {
while (
semver.neq(semver.parse(typegraphVersion), semver.parse(currentVersion))
) {
const migration = typegraphChangelog[currentVersion];
if (!migration) {
throw Error(
Expand Down
3 changes: 2 additions & 1 deletion typegate/src/typegraphs/introspection.json
Original file line number Diff line number Diff line change
Expand Up @@ -972,5 +972,6 @@
"auths": [],
"rate": null,
"version": "0.0.1"
}
},
"prefix": null
}
3 changes: 2 additions & 1 deletion typegate/src/typegraphs/prisma_migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -562,5 +562,6 @@
"local_excess": 5
},
"version": "0.0.1"
}
},
"prefix": null
}
3 changes: 2 additions & 1 deletion typegate/src/typegraphs/typegate.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,5 +498,6 @@
"local_excess": 5
},
"version": "0.0.1"
}
},
"prefix": null
}
4 changes: 3 additions & 1 deletion typegate/tests/runtimes/prisma/mixed_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

with TypeGraph("prisma") as g:
db = PrismaRuntime("prisma", "POSTGRES")
gql_1 = GraphQLRuntime("https://graphqlzero.almansi.me/api")
gql_1 = GraphQLRuntime("http://mocked/api")
rand = RandomRuntime(seed=1)

public = policies.public()
Expand All @@ -15,12 +15,14 @@
"title": t.string(),
},
).named("Post")

user = t.struct(
{
"name": t.string().config(gen="name"),
"age": t.integer().config(gen="age", type="adult"),
}
).named("Album")

record = t.struct(
{
"id": t.integer().as_id.config("auto"),
Expand Down
Loading

0 comments on commit 93a31c6

Please sign in to comment.