From 93a31c6e5cc7ee3988c38915ec9673d9eb86f4a1 Mon Sep 17 00:00:00 2001 From: Teo Stocco Date: Thu, 29 Jun 2023 00:17:38 +0200 Subject: [PATCH] chore: release 0.1.10 (#347) --- .github/workflows/tests.yml | 2 +- Cargo.lock | 16 +++---- dev/Dockerfile | 2 +- dev/lock.yml | 9 ++-- dev/mod.ts | 2 +- examples/templates/new/compose.yml | 2 +- examples/templates/new/pyproject.toml | 4 +- libs/common/Cargo.toml | 2 +- libs/macros/Cargo.toml | 2 +- libs/typescript/Cargo.toml | 2 +- libs/xtask/Cargo.toml | 2 +- meta-cli/Cargo.toml | 2 +- poetry.lock | 20 ++++++++- pyproject.toml | 3 +- typegate/deno.json | 2 +- typegate/deno.lock | 24 +++++----- typegate/native/Cargo.toml | 2 +- typegate/src/engine.ts | 4 +- typegate/src/runtimes/typegate.ts | 5 ++- typegate/src/typegraph/versions.ts | 4 +- typegate/src/typegraphs/introspection.json | 3 +- typegate/src/typegraphs/prisma_migration.json | 3 +- typegate/src/typegraphs/typegate.json | 3 +- .../tests/runtimes/prisma/mixed_runtime.py | 4 +- .../runtimes/prisma/mixed_runtime_test.ts | 45 +++++++++++++++++-- .../tests/runtimes/wasmedge/rust/Cargo.toml | 2 +- typegraph/core/Cargo.toml | 2 +- typegraph/core/tests/pyproject.toml | 2 +- typegraph/python/pyproject.toml | 2 +- typegraph/python/typegraph/__init__.py | 2 +- typegraph/python_next/pyproject.toml | 2 +- typegraph/rust/Cargo.toml | 2 +- website/docs/guides/self-hosting.md | 3 +- whiz.yaml | 5 ++- 34 files changed, 129 insertions(+), 62 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 261ce397a7..860ff6a09a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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" diff --git a/Cargo.lock b/Cargo.lock index b4bc73c199..77b58f5a1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -989,7 +989,7 @@ dependencies = [ [[package]] name = "common" -version = "0.1.10-dev.0" +version = "0.1.10" dependencies = [ "anyhow", "base64 0.21.2", @@ -3251,7 +3251,7 @@ dependencies = [ [[package]] name = "macros" -version = "0.1.10-dev.0" +version = "0.1.10" dependencies = [ "proc-macro2", "quote", @@ -3343,7 +3343,7 @@ dependencies = [ [[package]] name = "meta-cli" -version = "0.1.10-dev.0" +version = "0.1.10" dependencies = [ "anyhow", "assert_cmd", @@ -3818,7 +3818,7 @@ dependencies = [ [[package]] name = "native" -version = "0.1.10-dev.0" +version = "0.1.10" dependencies = [ "anyhow", "base64 0.21.2", @@ -7568,14 +7568,14 @@ dependencies = [ [[package]] name = "typegraph" -version = "0.1.10-dev.0" +version = "0.1.10" dependencies = [ "typegraph_core", ] [[package]] name = "typegraph_core" -version = "0.1.10-dev.0" +version = "0.1.10" dependencies = [ "anyhow", "common", @@ -7599,7 +7599,7 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "typescript" -version = "0.1.10-dev.0" +version = "0.1.10" dependencies = [ "anyhow", "dprint-plugin-typescript", @@ -8467,7 +8467,7 @@ dependencies = [ [[package]] name = "xtask" -version = "0.1.10-dev.0" +version = "0.1.10" dependencies = [ "anyhow", "clap", diff --git a/dev/Dockerfile b/dev/Dockerfile index 1c8f68b632..cc43723978 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -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 diff --git a/dev/lock.yml b/dev/lock.yml index c0e58a7f9a..c87a5ecb26 100644 --- a/dev/lock.yml +++ b/dev/lock.yml @@ -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: @@ -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 @@ -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 diff --git a/dev/mod.ts b/dev/mod.ts index 57aad60680..89fcee15f9 100644 --- a/dev/mod.ts +++ b/dev/mod.ts @@ -15,7 +15,7 @@ export { export { groupBy } from "https://deno.land/std@0.192.0/collections/group_by.ts"; export type { WalkEntry } from "https://deno.land/std@0.192.0/fs/mod.ts"; export * as yaml from "https://deno.land/std@0.192.0/yaml/mod.ts"; -export * as semver from "https://deno.land/x/semver@v1.4.1/mod.ts"; +export * as semver from "https://deno.land/std@0.192.0/semver/mod.ts"; export { udd } from "https://deno.land/x/udd@0.8.2/mod.ts"; import { diff --git a/examples/templates/new/compose.yml b/examples/templates/new/compose.yml index 35bb96f6cc..93852adf2d 100644 --- a/examples/templates/new/compose.yml +++ b/examples/templates/new/compose.yml @@ -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: diff --git a/examples/templates/new/pyproject.toml b/examples/templates/new/pyproject.toml index 10aa348823..ae4e54f209 100644 --- a/examples/templates/new/pyproject.toml +++ b/examples/templates/new/pyproject.toml @@ -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"] diff --git a/libs/common/Cargo.toml b/libs/common/Cargo.toml index 57cb04cd2a..338c512199 100644 --- a/libs/common/Cargo.toml +++ b/libs/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "common" -version = "0.1.10-dev.0" +version = "0.1.10" edition = "2021" [dependencies] diff --git a/libs/macros/Cargo.toml b/libs/macros/Cargo.toml index 6ed8fdf6a7..2114da10b8 100644 --- a/libs/macros/Cargo.toml +++ b/libs/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "macros" -version = "0.1.10-dev.0" +version = "0.1.10" edition = "2021" [lib] diff --git a/libs/typescript/Cargo.toml b/libs/typescript/Cargo.toml index bb1284ae4e..e5ed84e148 100644 --- a/libs/typescript/Cargo.toml +++ b/libs/typescript/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typescript" -version = "0.1.10-dev.0" +version = "0.1.10" edition = "2021" [dependencies] diff --git a/libs/xtask/Cargo.toml b/libs/xtask/Cargo.toml index 7873e67d49..6272e53643 100644 --- a/libs/xtask/Cargo.toml +++ b/libs/xtask/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xtask" -version = "0.1.10-dev.0" +version = "0.1.10" edition = "2021" [dependencies] diff --git a/meta-cli/Cargo.toml b/meta-cli/Cargo.toml index 4ca28c8916..bdfad9629b 100644 --- a/meta-cli/Cargo.toml +++ b/meta-cli/Cargo.toml @@ -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." diff --git a/poetry.lock b/poetry.lock index d9eb1649d3..226429fd59 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1065,6 +1065,24 @@ secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17. socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] +[[package]] +name = "wasmtime" +version = "9.0.0" +description = "A WebAssembly runtime powered by Wasmtime" +optional = false +python-versions = ">=3.6" +files = [ + {file = "wasmtime-9.0.0-py3-none-any.whl", hash = "sha256:08f74faa950b6180ec149164b84f463854d6423260cb5b4725b05746aaa92f6e"}, + {file = "wasmtime-9.0.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:6dad1b1ccfb93b8f3f75679104941dfa9cba17214068964d638b66eee8f93a73"}, + {file = "wasmtime-9.0.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:51c3ce94d46febcae8797ac1bc90be3d5c2dce48186284ea2735ad431bea2587"}, + {file = "wasmtime-9.0.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:5e0a64b2ef708c107e418c7741c8be0de0cc152efc1d51264e77fcf4f977cef0"}, + {file = "wasmtime-9.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:e798ff868ea21a250d5382e54c15866720e8d9ff0b0d2b8728fe1f2f5b9469b6"}, + {file = "wasmtime-9.0.0-py3-none-win_amd64.whl", hash = "sha256:2f81805c9bda88792363eaf7104270989c5b1e17ccec398b56dfb5f91d2e84f2"}, +] + +[package.extras] +testing = ["coverage", "flake8 (==4.0.1)", "pycparser", "pytest", "pytest-flake8", "pytest-mypy"] + [[package]] name = "watchdog" version = "3.0.0" @@ -1236,4 +1254,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.8,<4.0" -content-hash = "74dd279f0ad787ea1944e8783e16f342ed8e34d720af93f0488f9bafbb832f39" +content-hash = "f7d3b6126c86f277610d8fa6050a804d9cb6151ba5122f865b7508db713bef21" diff --git a/pyproject.toml b/pyproject.toml index 7fa9e5d14d..bc292de0cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "metatype" -version = "0.1.10-dev.0" +version = "0.1.10" description = "" authors = [] @@ -8,6 +8,7 @@ authors = [] 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" } diff --git a/typegate/deno.json b/typegate/deno.json index 493502c9cc..c29242f3ba 100644 --- a/typegate/deno.json +++ b/typegate/deno.json @@ -27,7 +27,7 @@ "monads": "https://deno.land/x/monads@v0.5.10/mod.ts", "jwt": "https://deno.land/x/djwt@v2.7/mod.ts", "redis": "https://deno.land/x/redis@v0.30.0/mod.ts", - "oauth2_client": "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/mod.ts", + "oauth2_client": "https://deno.land/x/oauth2_client@v1.0.1/mod.ts", "test/mock_fetch": "https://deno.land/x/mock_fetch@0.3.0/mod.ts", "json_schema_typed": "https://deno.land/x/json_schema_typed@v8.0.0/draft_latest.ts", "url_join": "https://deno.land/x/url_join@1.0.0/mod.ts", diff --git a/typegate/deno.lock b/typegate/deno.lock index 2527094cd1..c0101e7b2e 100644 --- a/typegate/deno.lock +++ b/typegate/deno.lock @@ -494,6 +494,17 @@ "https://deno.land/x/monads@v0.5.10/mod.ts": "f1b16a34d47e58fdf9f1f54c49d2fe6df67b3d2e077e21638f25fbe080eee6cf", "https://deno.land/x/monads@v0.5.10/option/option.ts": "76ef03c3370207112759f932f39aab04999cdd1a5c5a954769b3868602faf883", "https://deno.land/x/monads@v0.5.10/result/result.ts": "bb482b7b90949d3a67e78b4b0dd949774eccaa808df39ac83f6a585526edeb37", + "https://deno.land/x/oauth2_client@v1.0.1/mod.ts": "20322e9a40d63b75ecc64a9a9026d664724a1cbd94fd2ef1b7d9d304f286676c", + "https://deno.land/x/oauth2_client@v1.0.1/src/authorization_code_grant.ts": "36953750b75fb0a14fbf4e0e4bcc1d5ae0209d216d7b32f93a134b035ecf3d25", + "https://deno.land/x/oauth2_client@v1.0.1/src/client_credentials_grant.ts": "5bb9869925c5f5d11e8d66a86da37e2353107d57f57ec3a1480e197462e79be5", + "https://deno.land/x/oauth2_client@v1.0.1/src/errors.ts": "7603479b80386b5cc7e384c2af5f5262ed7c2123e4e297d9f21e95515f8a803a", + "https://deno.land/x/oauth2_client@v1.0.1/src/grant_base.ts": "86ae9eb3495f2304a634498fbb83741c5dc0e1357e02c40e12e212de5e9750f7", + "https://deno.land/x/oauth2_client@v1.0.1/src/implicit_grant.ts": "d5359aebbdaaff039c0d078890aa4ffa2869da19c521e535e15caf09c069e6b8", + "https://deno.land/x/oauth2_client@v1.0.1/src/oauth2_client.ts": "4e5ec26676661a3f69544826a4c27b30cc07dfcfc77f86981c324aaa53291a11", + "https://deno.land/x/oauth2_client@v1.0.1/src/pkce.ts": "d286a087cc8ef985b71a2bf391e9e9d86a78ac6d93e30c46e73006171aed0986", + "https://deno.land/x/oauth2_client@v1.0.1/src/refresh_token_grant.ts": "22cb1598e48fb037b4111a446573f7b48a3b361b58de58af17ba097221b12b54", + "https://deno.land/x/oauth2_client@v1.0.1/src/resource_owner_password_credentials.ts": "bd3df99d32eeebffb411c4a2d3c3d057395515fb41690a8d91460dd74b9bf466", + "https://deno.land/x/oauth2_client@v1.0.1/src/types.ts": "3327c2e81bc483e91843fb103595dd304393c3ac2a530d1c89200b6a5cf75e13", "https://deno.land/x/outdent@v0.8.0/mod.ts": "72630e680dcc36d5ae556fbff6900b12706c81a6fd592345fc98bcc0878fb3ca", "https://deno.land/x/outdent@v0.8.0/src/index.ts": "6dc3df4108d5d6fedcdb974844d321037ca81eaaa16be6073235ff3268841a22", "https://deno.land/x/redis@v0.30.0/backoff.ts": "33e4a6e245f8743fbae0ce583993a671a3ac2ecee433a3e7f0bd77b5dd541d84", @@ -921,18 +932,7 @@ "https://esm.sh/v124/ws@7.5.9/denonext/ws.mjs": "bb14a389271bb68778d59f498428caee8048221eea59cc7522898b44aad66d88", "https://esm.sh/v124/ws@8.13.0/denonext/ws.mjs": "8fb6d5e0d385ebc97031384c2db6a2ffa546eb18241226e45c2c7ae782312c4d", "https://esm.sh/v124/xtend@4.0.2/denonext/xtend.mjs": "503056f181793967e90c0566a737612694366fa7191172f4a106099b5c2a80d2", - "https://esm.sh/v124/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/mod.ts": "20322e9a40d63b75ecc64a9a9026d664724a1cbd94fd2ef1b7d9d304f286676c", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/authorization_code_grant.ts": "36953750b75fb0a14fbf4e0e4bcc1d5ae0209d216d7b32f93a134b035ecf3d25", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/client_credentials_grant.ts": "5bb9869925c5f5d11e8d66a86da37e2353107d57f57ec3a1480e197462e79be5", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/errors.ts": "7603479b80386b5cc7e384c2af5f5262ed7c2123e4e297d9f21e95515f8a803a", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/grant_base.ts": "86ae9eb3495f2304a634498fbb83741c5dc0e1357e02c40e12e212de5e9750f7", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/implicit_grant.ts": "d5359aebbdaaff039c0d078890aa4ffa2869da19c521e535e15caf09c069e6b8", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/oauth2_client.ts": "4e5ec26676661a3f69544826a4c27b30cc07dfcfc77f86981c324aaa53291a11", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/pkce.ts": "d286a087cc8ef985b71a2bf391e9e9d86a78ac6d93e30c46e73006171aed0986", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/refresh_token_grant.ts": "22cb1598e48fb037b4111a446573f7b48a3b361b58de58af17ba097221b12b54", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/resource_owner_password_credentials.ts": "bd3df99d32eeebffb411c4a2d3c3d057395515fb41690a8d91460dd74b9bf466", - "https://raw.githubusercontent.com/zifeo/deno-oauth2-client/master/src/types.ts": "3327c2e81bc483e91843fb103595dd304393c3ac2a530d1c89200b6a5cf75e13" + "https://esm.sh/v124/yallist@4.0.0/denonext/yallist.mjs": "61f180d807dda50bac17028eda05d5722a3fecef6e98a9064e2353ea6864fd82" }, "npm": { "specifiers": { diff --git a/typegate/native/Cargo.toml b/typegate/native/Cargo.toml index e7956190a6..224e707abd 100644 --- a/typegate/native/Cargo.toml +++ b/typegate/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "native" -version = "0.1.10-dev.0" +version = "0.1.10" edition = "2021" [lib] diff --git a/typegate/src/engine.ts b/typegate/src/engine.ts index cd026a47b2..aac18d4adb 100644 --- a/typegate/src/engine.ts +++ b/typegate/src/engine.ts @@ -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}`); } } diff --git a/typegate/src/runtimes/typegate.ts b/typegate/src/runtimes/typegate.ts index 23d990316d..4d88494c71 100644 --- a/typegate/src/runtimes/typegate.ts +++ b/typegate/src/runtimes/typegate.ts @@ -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); @@ -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) => { diff --git a/typegate/src/typegraph/versions.ts b/typegate/src/typegraph/versions.ts index 399ee3e64e..e5a8cad3ee 100644 --- a/typegate/src/typegraph/versions.ts +++ b/typegate/src/typegraph/versions.ts @@ -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( diff --git a/typegate/src/typegraphs/introspection.json b/typegate/src/typegraphs/introspection.json index a6423394b7..59e5a60707 100644 --- a/typegate/src/typegraphs/introspection.json +++ b/typegate/src/typegraphs/introspection.json @@ -972,5 +972,6 @@ "auths": [], "rate": null, "version": "0.0.1" - } + }, + "prefix": null } diff --git a/typegate/src/typegraphs/prisma_migration.json b/typegate/src/typegraphs/prisma_migration.json index 08dd35f6cf..54fc44cfdf 100644 --- a/typegate/src/typegraphs/prisma_migration.json +++ b/typegate/src/typegraphs/prisma_migration.json @@ -562,5 +562,6 @@ "local_excess": 5 }, "version": "0.0.1" - } + }, + "prefix": null } diff --git a/typegate/src/typegraphs/typegate.json b/typegate/src/typegraphs/typegate.json index 2760a1051e..37c5f37228 100644 --- a/typegate/src/typegraphs/typegate.json +++ b/typegate/src/typegraphs/typegate.json @@ -498,5 +498,6 @@ "local_excess": 5 }, "version": "0.0.1" - } + }, + "prefix": null } diff --git a/typegate/tests/runtimes/prisma/mixed_runtime.py b/typegate/tests/runtimes/prisma/mixed_runtime.py index c6e00229b8..356d7ccb39 100644 --- a/typegate/tests/runtimes/prisma/mixed_runtime.py +++ b/typegate/tests/runtimes/prisma/mixed_runtime.py @@ -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() @@ -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"), diff --git a/typegate/tests/runtimes/prisma/mixed_runtime_test.ts b/typegate/tests/runtimes/prisma/mixed_runtime_test.ts index 3e7e6774bb..8d011602fd 100644 --- a/typegate/tests/runtimes/prisma/mixed_runtime_test.ts +++ b/typegate/tests/runtimes/prisma/mixed_runtime_test.ts @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Elastic-2.0 import { dropSchemas, gql, recreateMigrations, test } from "../../utils.ts"; +import * as mf from "test/mock_fetch"; + +mf.install(); test("prisma mixed runtime", async (t) => { const e = await t.pythonFile("runtimes/prisma/mixed_runtime.py", { @@ -41,6 +44,24 @@ test("prisma mixed runtime", async (t) => { ); await t.should("work with different runtimes", async () => { + mf.mock("POST@/api", () => { + mf.reset(); + const res = { + data: { + post: { + id: "1", + title: "Test", + }, + }, + }; + return new Response(JSON.stringify(res), { + status: 200, + headers: { + "Content-Type": "application/json", + }, + }); + }); + await gql` query { findUniqueRecord(where: { @@ -60,8 +81,7 @@ test("prisma mixed runtime", async (t) => { description: "Some description", post: { id: "1", - title: - "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", + title: "Test", }, }, }) @@ -71,6 +91,24 @@ test("prisma mixed runtime", async (t) => { await t.should( "work with more than two runtimes", async () => { + mf.mock("POST@/api", () => { + mf.reset(); + const res = { + data: { + post: { + id: "1", + title: "Test", + }, + }, + }; + return new Response(JSON.stringify(res), { + status: 200, + headers: { + "Content-Type": "application/json", + }, + }); + }); + await gql` query { findUniqueRecord(where: { @@ -94,8 +132,7 @@ test("prisma mixed runtime", async (t) => { description: "Some description", post: { id: "1", - title: - "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", + title: "Test", }, user: { name: "Landon Glover", age: 62 }, }, diff --git a/typegate/tests/runtimes/wasmedge/rust/Cargo.toml b/typegate/tests/runtimes/wasmedge/rust/Cargo.toml index 4468a13a3b..0223f5fe6c 100644 --- a/typegate/tests/runtimes/wasmedge/rust/Cargo.toml +++ b/typegate/tests/runtimes/wasmedge/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust" -version = "0.1.10-dev.0" +version = "0.1.10" edition = "2021" [lib] diff --git a/typegraph/core/Cargo.toml b/typegraph/core/Cargo.toml index 39f2cbd188..356c61bd84 100644 --- a/typegraph/core/Cargo.toml +++ b/typegraph/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typegraph_core" -version = "0.1.10-dev.0" +version = "0.1.10" edition = "2021" diff --git a/typegraph/core/tests/pyproject.toml b/typegraph/core/tests/pyproject.toml index 00f806d8ad..0dc9ac8f37 100644 --- a/typegraph/core/tests/pyproject.toml +++ b/typegraph/core/tests/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "typegraph-tests" -version = "0.1.10-dev.0" +version = "0.1.10" description = "" authors = ["Metatype Contributors "] license = "MPL-2.0" diff --git a/typegraph/python/pyproject.toml b/typegraph/python/pyproject.toml index 6f2865ddd4..46a426d3c6 100644 --- a/typegraph/python/pyproject.toml +++ b/typegraph/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "typegraph" -version = "0.1.10-dev.0" +version = "0.1.10" description = "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are." authors = ["Metatype Contributors "] license = "MPL-2.0" diff --git a/typegraph/python/typegraph/__init__.py b/typegraph/python/typegraph/__init__.py index bbc522f54c..d7607cc6ee 100644 --- a/typegraph/python/typegraph/__init__.py +++ b/typegraph/python/typegraph/__init__.py @@ -5,4 +5,4 @@ from typegraph import types as t # noqa from typegraph.graph.typegraph import TypeGraph # noqa -version = "0.1.10-dev.0" +version = "0.1.10" diff --git a/typegraph/python_next/pyproject.toml b/typegraph/python_next/pyproject.toml index c2746e119b..2fbcb6b4df 100644 --- a/typegraph/python_next/pyproject.toml +++ b/typegraph/python_next/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "typegraph" -version = "0.1.10-dev.0" +version = "0.1.10" description = "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are." authors = ["Metatype Contributors "] license = "MPL-2.0" diff --git a/typegraph/rust/Cargo.toml b/typegraph/rust/Cargo.toml index d9d8022799..e40e948f10 100644 --- a/typegraph/rust/Cargo.toml +++ b/typegraph/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typegraph" -version = "0.1.10-dev.0" +version = "0.1.10" edition = "2021" license-file = "../../dev/LICENSE-MPL-2.0.md" diff --git a/website/docs/guides/self-hosting.md b/website/docs/guides/self-hosting.md index 7bab9e3a49..faeed0c613 100644 --- a/website/docs/guides/self-hosting.md +++ b/website/docs/guides/self-hosting.md @@ -3,7 +3,8 @@ ## Helm [Helm](https://helm.sh) must be installed to use the charts. Please refer to -Helm's [documentation](https://helm.sh/docs) to get started. +Helm's documentation to get started. The chart can be accessed on the dedicated +[repository](https://github.com/metatypedev/charts). Once Helm has been set up correctly, add the repo as follows: diff --git a/whiz.yaml b/whiz.yaml index 08e1e5f5ee..4982b6449b 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -101,11 +101,10 @@ typegraph_python: env: VIRTUAL_ENV: "$PWD/.venv" PATH: "$PWD/.venv/bin:$PATH" - command: .venv/bin/python3 -m wasmtime.bindgen ../../target/debug/typegraph_core.wasm --out-dir typegraph/gen + command: ../../.venv/bin/python3 -m wasmtime.bindgen ../../target/debug/typegraph_core.wasm --out-dir typegraph/gen depends_on: - typegraph - website: workdir: website command: "pnpm start --no-open" @@ -144,11 +143,13 @@ install: - typegraph/python/pyproject.toml - website/package.json env: + DENO_BINDGEN_URL: "https://deno.land/x/deno_bindgen@0.8.1/cli.ts" WASM_TOOLS_VERSION: "1.0.33" JCO_VERSION: "0.7.0" command: | set -e cargo install wasm-tools --version $WASM_TOOLS_VERSION --locked + deno install --allow-all --force -n deno_bindgen $DENO_BINDGEN_URL npm install --global @bytecodealliance/jco@$JCO_VERSION [ -d .venv ] || python3 -m venv .venv poetry install