From 698f3df65f6949459c7425603a857c6664e89a0e Mon Sep 17 00:00:00 2001 From: afmika Date: Mon, 8 Jan 2024 16:03:13 +0300 Subject: [PATCH 01/23] fix: change configs to node --- .gitignore | 1 - .vscode/settings.json | 6 ++---- whiz.yaml | 6 +++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 8e9a18bbd9..1d0f76acab 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ recipe.json tmp/ coverage* -typegraph/node typegraph/deno/src/gen typegraph/python/typegraph/gen diff --git a/.vscode/settings.json b/.vscode/settings.json index 7152915ef7..f28b055e5e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,8 +9,6 @@ "typegate", "dev", "examples/templates/deno", - "typegraph/core/tests/typegraphs/deno", - "typegraph/deno" ], "deno.unstable": true, "deno.suggest.completeFunctionCalls": true, @@ -30,8 +28,8 @@ "[python]": { "editor.defaultFormatter": "ms-python.black-formatter", "editor.codeActionsOnSave": { - "source.fixAll": true, - "source.organizeImports": true + "source.fixAll": "explicit", + "source.organizeImports": "explicit" } }, "[typescript]": { diff --git a/whiz.yaml b/whiz.yaml index 1e5ede94bd..1ea1f631c9 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -55,9 +55,9 @@ typegraph: cargo build -p typegraph_core --target wasm32-unknown-unknown --target-dir target/wasm wasm-tools component new target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE - rm -rf typegraph/deno/src/gen - jco transpile $WASM_FILE -o typegraph/deno/src/gen - deno run -A typegraph/deno/dev/fix-declarations.ts + rm -rf typegraph/node/src/gen + jco transpile $WASM_FILE -o typegraph/node/src/gen + deno run -A typegraph/node/dev/fix-declarations.ts rm -rf typegraph/python/typegraph/gen poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen From dbb100bf9ed21773f7064e6ab7d93bad01f5d663 Mon Sep 17 00:00:00 2001 From: afmika Date: Mon, 8 Jan 2024 16:11:35 +0300 Subject: [PATCH 02/23] chore(node): fix imports, disable some import rename in fix-declarations.ts --- .gitignore | 2 +- .vscode/settings.json | 1 + dev/lock.yml | 2 +- typegraph/{deno => node}/LICENSE.md | 0 .../{deno => node}/dev/fix-declarations.ts | 13 +--- typegraph/{deno => node}/src/deps.ts | 0 typegraph/{deno => node}/src/effects.ts | 2 +- typegraph/{deno => node}/src/mod.ts | 8 +-- typegraph/{deno => node}/src/params.ts | 60 ++++++++++++++----- typegraph/{deno => node}/src/policy.ts | 6 +- typegraph/{deno => node}/src/providers/aws.ts | 8 +-- .../{deno => node}/src/providers/prisma.ts | 12 ++-- .../{deno => node}/src/providers/temporal.ts | 8 +-- typegraph/{deno => node}/src/runtimes/deno.ts | 12 ++-- .../{deno => node}/src/runtimes/graphql.ts | 10 ++-- typegraph/{deno => node}/src/runtimes/http.ts | 10 ++-- typegraph/{deno => node}/src/runtimes/mod.ts | 0 .../{deno => node}/src/runtimes/python.ts | 10 ++-- .../{deno => node}/src/runtimes/random.ts | 10 ++-- .../{deno => node}/src/runtimes/wasmedge.ts | 10 ++-- typegraph/{deno => node}/src/typegraph.ts | 16 ++--- typegraph/{deno => node}/src/types.ts | 22 +++---- .../{deno => node}/src/utils/func_utils.ts | 6 +- .../src/utils/injection_utils.ts | 8 +-- .../{deno => node}/src/utils/type_utils.ts | 2 +- typegraph/{deno => node}/src/wit.ts | 14 ++--- 26 files changed, 139 insertions(+), 113 deletions(-) rename typegraph/{deno => node}/LICENSE.md (100%) rename typegraph/{deno => node}/dev/fix-declarations.ts (67%) rename typegraph/{deno => node}/src/deps.ts (100%) rename typegraph/{deno => node}/src/effects.ts (93%) rename typegraph/{deno => node}/src/mod.ts (51%) rename typegraph/{deno => node}/src/params.ts (73%) rename typegraph/{deno => node}/src/policy.ts (90%) rename typegraph/{deno => node}/src/providers/aws.ts (93%) rename typegraph/{deno => node}/src/providers/prisma.ts (95%) rename typegraph/{deno => node}/src/providers/temporal.ts (88%) rename typegraph/{deno => node}/src/runtimes/deno.ts (93%) rename typegraph/{deno => node}/src/runtimes/graphql.ts (89%) rename typegraph/{deno => node}/src/runtimes/http.ts (93%) rename typegraph/{deno => node}/src/runtimes/mod.ts (100%) rename typegraph/{deno => node}/src/runtimes/python.ts (93%) rename typegraph/{deno => node}/src/runtimes/random.ts (76%) rename typegraph/{deno => node}/src/runtimes/wasmedge.ts (86%) rename typegraph/{deno => node}/src/typegraph.ts (90%) rename typegraph/{deno => node}/src/types.ts (97%) rename typegraph/{deno => node}/src/utils/func_utils.ts (93%) rename typegraph/{deno => node}/src/utils/injection_utils.ts (92%) rename typegraph/{deno => node}/src/utils/type_utils.ts (94%) rename typegraph/{deno => node}/src/wit.ts (78%) diff --git a/.gitignore b/.gitignore index 1d0f76acab..58068e054c 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,7 @@ recipe.json tmp/ coverage* -typegraph/deno/src/gen +typegraph/node/src/gen typegraph/python/typegraph/gen *.egg-info/ diff --git a/.vscode/settings.json b/.vscode/settings.json index f28b055e5e..c2d9c7ad6b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,6 +9,7 @@ "typegate", "dev", "examples/templates/deno", + "typegraph/node/dev" ], "deno.unstable": true, "deno.suggest.completeFunctionCalls": true, diff --git a/dev/lock.yml b/dev/lock.yml index 00826e692b..9dc6e61918 100644 --- a/dev/lock.yml +++ b/dev/lock.yml @@ -2,7 +2,7 @@ dev: files: dev/LICENSE-MPL-2.0.md: - typegraph/python/LICENSE.md - - typegraph/deno/LICENSE.md + - typegraph/node/LICENSE.md lines: rust-toolchain.toml: (channel = ").+("): RUST_VERSION diff --git a/typegraph/deno/LICENSE.md b/typegraph/node/LICENSE.md similarity index 100% rename from typegraph/deno/LICENSE.md rename to typegraph/node/LICENSE.md diff --git a/typegraph/deno/dev/fix-declarations.ts b/typegraph/node/dev/fix-declarations.ts similarity index 67% rename from typegraph/deno/dev/fix-declarations.ts rename to typegraph/node/dev/fix-declarations.ts index 14ccce3481..c4a7cee388 100644 --- a/typegraph/deno/dev/fix-declarations.ts +++ b/typegraph/node/dev/fix-declarations.ts @@ -6,22 +6,15 @@ import { fromFileUrl, resolve, } from "https://deno.land/std@0.202.0/path/mod.ts"; -import { expandGlobSync } from "https://deno.land/std@0.202.0/fs/mod.ts"; export const thisDir = dirname(fromFileUrl(import.meta.url)); const replacements = [ - ...Array.from(expandGlobSync("../src/gen/**/*.d.ts", { - root: thisDir, - includeDirs: false, - globstar: true, - })).map(({ path }) => ({ - path, - op: (s: string) => s.replace(/^(import .*)(? s.replaceAll(/,\s*\w+ as '[\w:\/]+'/g, ""), + op: (s: string) => { + return s.replaceAll(/,\s*\w+ as '[\w:\/]+'/g, ""); + }, }, ]; diff --git a/typegraph/deno/src/deps.ts b/typegraph/node/src/deps.ts similarity index 100% rename from typegraph/deno/src/deps.ts rename to typegraph/node/src/deps.ts diff --git a/typegraph/deno/src/effects.ts b/typegraph/node/src/effects.ts similarity index 93% rename from typegraph/deno/src/effects.ts rename to typegraph/node/src/effects.ts index 28f0510f95..ec4cc86e41 100644 --- a/typegraph/deno/src/effects.ts +++ b/typegraph/node/src/effects.ts @@ -6,7 +6,7 @@ import { EffectDelete, EffectRead, EffectUpdate, -} from "./gen/interfaces/metatype-typegraph-runtimes.d.ts"; +} from "./gen/interfaces/metatype-typegraph-runtimes"; export function read(): EffectRead { return { tag: "read" }; diff --git a/typegraph/deno/src/mod.ts b/typegraph/node/src/mod.ts similarity index 51% rename from typegraph/deno/src/mod.ts rename to typegraph/node/src/mod.ts index 599ca20615..3998070203 100644 --- a/typegraph/deno/src/mod.ts +++ b/typegraph/node/src/mod.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "./types.ts"; -import { typegraph } from "./typegraph.ts"; -import Policy from "./policy.ts"; -import * as fx from "./effects.ts"; +import * as t from "./types"; +import { typegraph } from "./typegraph"; +import Policy from "./policy"; +import * as fx from "./effects"; export { fx, Policy, t, typegraph }; diff --git a/typegraph/deno/src/params.ts b/typegraph/node/src/params.ts similarity index 73% rename from typegraph/deno/src/params.ts rename to typegraph/node/src/params.ts index 0c9bc045bb..47aa172c44 100644 --- a/typegraph/deno/src/params.ts +++ b/typegraph/node/src/params.ts @@ -1,15 +1,15 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { RawAuth } from "./typegraph.ts"; -import { Auth as Auth_, wit_utils } from "./wit.ts"; -import * as t from "./types.ts"; +import { RawAuth } from "./typegraph"; +import { Auth as Auth_, wit_utils } from "./wit"; +import * as t from "./types"; export type StdOauth2Profiler = | { profiler: "default" } | { profiler: "none" } - | { profiler: "extended", extension: any } - | { profiler: "custom", id: number }; + | { profiler: "extended"; extension: any } + | { profiler: "custom"; id: number }; export function noProfiler(): StdOauth2Profiler { return { profiler: "none" }; @@ -62,21 +62,40 @@ export class Auth { }; } - private static stdOauth2(provider: string, scopes: string, profiler: StdOauth2Profiler): RawAuth { + private static stdOauth2( + provider: string, + scopes: string, + profiler: StdOauth2Profiler, + ): RawAuth { switch (profiler.profiler) { case "none": return new RawAuth(wit_utils.oauth2WithoutProfiler(provider, scopes)); case "extended": - return new RawAuth(wit_utils.oauth2WithExtendedProfiler(provider, scopes, JSON.stringify(profiler.extension))); + return new RawAuth( + wit_utils.oauth2WithExtendedProfiler( + provider, + scopes, + JSON.stringify(profiler.extension), + ), + ); case "custom": - return new RawAuth(wit_utils.oauth2WithCustomProfiler(provider, scopes, profiler.id)); + return new RawAuth( + wit_utils.oauth2WithCustomProfiler(provider, scopes, profiler.id), + ); default: return new RawAuth(wit_utils.oauth2(provider, scopes)); } } - static oauth2Digitalocean(scopes: string, profiler?: StdOauth2Profiler): RawAuth { - return Auth.stdOauth2("digitalocean", scopes, profiler ?? defaultProfiler()); + static oauth2Digitalocean( + scopes: string, + profiler?: StdOauth2Profiler, + ): RawAuth { + return Auth.stdOauth2( + "digitalocean", + scopes, + profiler ?? defaultProfiler(), + ); } static oauth2Discord(scopes: string, profiler?: StdOauth2Profiler): RawAuth { @@ -103,7 +122,10 @@ export class Auth { return Auth.stdOauth2("google", scopes, profiler ?? defaultProfiler()); } - static oauth2Instagram(scopes: string, profiler?: StdOauth2Profiler): RawAuth { + static oauth2Instagram( + scopes: string, + profiler?: StdOauth2Profiler, + ): RawAuth { return Auth.stdOauth2("instagram", scopes, profiler ?? defaultProfiler()); } @@ -111,7 +133,10 @@ export class Auth { return Auth.stdOauth2("linkedin", scopes, profiler ?? defaultProfiler()); } - static oauth2Microsoft(scopes: string, profiler?: StdOauth2Profiler): RawAuth { + static oauth2Microsoft( + scopes: string, + profiler?: StdOauth2Profiler, + ): RawAuth { return Auth.stdOauth2("microsoft", scopes, profiler ?? defaultProfiler()); } @@ -123,8 +148,15 @@ export class Auth { return Auth.stdOauth2("slack", scopes, profiler ?? defaultProfiler()); } - static oauth2Stackexchange(scopes: string, profiler?: StdOauth2Profiler): RawAuth { - return Auth.stdOauth2("stackexchange", scopes, profiler ?? defaultProfiler()); + static oauth2Stackexchange( + scopes: string, + profiler?: StdOauth2Profiler, + ): RawAuth { + return Auth.stdOauth2( + "stackexchange", + scopes, + profiler ?? defaultProfiler(), + ); } static oauth2Twitter(scopes: string, profiler?: StdOauth2Profiler): RawAuth { diff --git a/typegraph/deno/src/policy.ts b/typegraph/node/src/policy.ts similarity index 90% rename from typegraph/deno/src/policy.ts rename to typegraph/node/src/policy.ts index 9cd503964e..82ba7af80d 100644 --- a/typegraph/deno/src/policy.ts +++ b/typegraph/node/src/policy.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { MaterializerId } from "./gen/interfaces/metatype-typegraph-core.d.ts"; -import { core, runtimes } from "./wit.ts"; -import { DenoRuntime } from "./runtimes/deno.ts"; +import { MaterializerId } from "./gen/interfaces/metatype-typegraph-core"; +import { core, runtimes } from "./wit"; +import { DenoRuntime } from "./runtimes/deno"; export default class Policy { constructor(public readonly _id: number, public readonly name: string) {} diff --git a/typegraph/deno/src/providers/aws.ts b/typegraph/node/src/providers/aws.ts similarity index 93% rename from typegraph/deno/src/providers/aws.ts rename to typegraph/node/src/providers/aws.ts index 7335c07d4f..e10fbb96a5 100644 --- a/typegraph/deno/src/providers/aws.ts +++ b/typegraph/node/src/providers/aws.ts @@ -1,14 +1,14 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Materializer, Runtime } from "../runtimes/mod.ts"; -import { aws } from "../wit.ts"; +import { Materializer, Runtime } from "../runtimes/mod"; +import { aws } from "../wit"; import { S3PresignGetParams, S3PresignPutParams, S3RuntimeData, -} from "../gen/interfaces/metatype-typegraph-aws.d.ts"; -import { t } from "../mod.ts"; +} from "../gen/interfaces/metatype-typegraph-aws"; +import { t } from "../mod"; type S3PresignGetMat = Materializer & S3PresignGetParams; type S3PresignPutMat = Materializer & S3PresignPutParams; diff --git a/typegraph/deno/src/providers/prisma.ts b/typegraph/node/src/providers/prisma.ts similarity index 95% rename from typegraph/deno/src/providers/prisma.ts rename to typegraph/node/src/providers/prisma.ts index fba8deef6c..f639f0c081 100644 --- a/typegraph/deno/src/providers/prisma.ts +++ b/typegraph/node/src/providers/prisma.ts @@ -1,12 +1,12 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Runtime } from "../runtimes/mod.ts"; -import { runtimes } from "../wit.ts"; -import { Typedef } from "../types.ts"; -import { t } from "../mod.ts"; -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import { genRef } from "./../typegraph.ts"; +import { Runtime } from "../runtimes/mod"; +import { runtimes } from "../wit"; +import { Typedef } from "../types"; +import { t } from "../mod"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; +import { genRef } from "./../typegraph"; type PrismaLinkArg = { fkey?: boolean; diff --git a/typegraph/deno/src/providers/temporal.ts b/typegraph/node/src/providers/temporal.ts similarity index 88% rename from typegraph/deno/src/providers/temporal.ts rename to typegraph/node/src/providers/temporal.ts index c2fbc16a08..1628fb19ef 100644 --- a/typegraph/deno/src/providers/temporal.ts +++ b/typegraph/node/src/providers/temporal.ts @@ -1,13 +1,13 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Runtime } from "../runtimes/mod.ts"; -import { runtimes } from "../wit.ts"; -import { Func, Typedef } from "../types.ts"; +import { Runtime } from "../runtimes/mod"; +import { runtimes } from "../wit"; +import { Func, Typedef } from "../types"; import { TemporalOperationData, TemporalOperationType, -} from "../gen/interfaces/metatype-typegraph-runtimes.d.ts"; +} from "../gen/interfaces/metatype-typegraph-runtimes"; export class TemporalRuntime extends Runtime { host: string; diff --git a/typegraph/deno/src/runtimes/deno.ts b/typegraph/node/src/runtimes/deno.ts similarity index 93% rename from typegraph/deno/src/runtimes/deno.ts rename to typegraph/node/src/runtimes/deno.ts index 45469e6d74..c9c7b071b8 100644 --- a/typegraph/deno/src/runtimes/deno.ts +++ b/typegraph/node/src/runtimes/deno.ts @@ -1,12 +1,12 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import Policy from "../policy.ts"; -import { Materializer, Runtime } from "./mod.ts"; -import { fx } from "../mod.ts"; +import * as t from "../types"; +import { runtimes } from "../wit"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; +import Policy from "../policy"; +import { Materializer, Runtime } from "./mod"; +import { fx } from "../mod"; interface FunMat extends Materializer { code: string; diff --git a/typegraph/deno/src/runtimes/graphql.ts b/typegraph/node/src/runtimes/graphql.ts similarity index 89% rename from typegraph/deno/src/runtimes/graphql.ts rename to typegraph/node/src/runtimes/graphql.ts index 186a6e7b2d..3aaf2cef35 100644 --- a/typegraph/deno/src/runtimes/graphql.ts +++ b/typegraph/node/src/runtimes/graphql.ts @@ -1,11 +1,11 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import { Materializer, Runtime } from "./mod.ts"; -import { fx } from "../mod.ts"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; +import * as t from "../types"; +import { runtimes } from "../wit"; +import { Materializer, Runtime } from "./mod"; +import { fx } from "../mod"; export class GraphQLRuntime extends Runtime { constructor(private endpoint: string) { diff --git a/typegraph/deno/src/runtimes/http.ts b/typegraph/node/src/runtimes/http.ts similarity index 93% rename from typegraph/deno/src/runtimes/http.ts rename to typegraph/node/src/runtimes/http.ts index 90e541fdc2..0a68c78a33 100644 --- a/typegraph/deno/src/runtimes/http.ts +++ b/typegraph/node/src/runtimes/http.ts @@ -1,15 +1,15 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types.ts"; +import * as t from "../types"; import { Effect, HttpMethod, MaterializerHttpRequest, -} from "../gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import { runtimes } from "../wit.ts"; -import { Materializer, Runtime } from "./mod.ts"; -import { fx } from "../mod.ts"; +} from "../gen/interfaces/metatype-typegraph-runtimes"; +import { runtimes } from "../wit"; +import { Materializer, Runtime } from "./mod"; +import { fx } from "../mod"; type HttpRequestMat = & Materializer diff --git a/typegraph/deno/src/runtimes/mod.ts b/typegraph/node/src/runtimes/mod.ts similarity index 100% rename from typegraph/deno/src/runtimes/mod.ts rename to typegraph/node/src/runtimes/mod.ts diff --git a/typegraph/deno/src/runtimes/python.ts b/typegraph/node/src/runtimes/python.ts similarity index 93% rename from typegraph/deno/src/runtimes/python.ts rename to typegraph/node/src/runtimes/python.ts index 052a325493..d748d5e09b 100644 --- a/typegraph/deno/src/runtimes/python.ts +++ b/typegraph/node/src/runtimes/python.ts @@ -1,11 +1,11 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import { Materializer, Runtime } from "./mod.ts"; -import { fx } from "../mod.ts"; +import * as t from "../types"; +import { runtimes } from "../wit"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; +import { Materializer, Runtime } from "./mod"; +import { fx } from "../mod"; interface LambdaMat extends Materializer { fn: string; diff --git a/typegraph/deno/src/runtimes/random.ts b/typegraph/node/src/runtimes/random.ts similarity index 76% rename from typegraph/deno/src/runtimes/random.ts rename to typegraph/node/src/runtimes/random.ts index fcc1dc92f2..d167350889 100644 --- a/typegraph/deno/src/runtimes/random.ts +++ b/typegraph/node/src/runtimes/random.ts @@ -1,13 +1,13 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; +import * as t from "../types"; +import { runtimes } from "../wit"; import { RandomRuntimeData, -} from "../gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import { Materializer, Runtime } from "./mod.ts"; -import { fx } from "../mod.ts"; +} from "../gen/interfaces/metatype-typegraph-runtimes"; +import { Materializer, Runtime } from "./mod"; +import { fx } from "../mod"; interface RandomMat extends Materializer { runtime: number; diff --git a/typegraph/deno/src/runtimes/wasmedge.ts b/typegraph/node/src/runtimes/wasmedge.ts similarity index 86% rename from typegraph/deno/src/runtimes/wasmedge.ts rename to typegraph/node/src/runtimes/wasmedge.ts index 8c26614fab..753c619e98 100644 --- a/typegraph/deno/src/runtimes/wasmedge.ts +++ b/typegraph/node/src/runtimes/wasmedge.ts @@ -1,11 +1,11 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types.ts"; -import { runtimes } from "../wit.ts"; -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import { Materializer, Runtime } from "./mod.ts"; -import { fx } from "../mod.ts"; +import * as t from "../types"; +import { runtimes } from "../wit"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; +import { Materializer, Runtime } from "./mod"; +import { fx } from "../mod"; interface WasiMat extends Materializer { module: string; diff --git a/typegraph/deno/src/typegraph.ts b/typegraph/node/src/typegraph.ts similarity index 90% rename from typegraph/deno/src/typegraph.ts rename to typegraph/node/src/typegraph.ts index b62698bbde..698c7bfa5f 100644 --- a/typegraph/deno/src/typegraph.ts +++ b/typegraph/node/src/typegraph.ts @@ -1,18 +1,18 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "./types.ts"; -import { core } from "./gen/typegraph_core.js"; -import { caller, dirname, fromFileUrl } from "./deps.ts"; -import { InjectionValue } from "./utils/type_utils.ts"; +import * as t from "./types"; +import { core } from "./gen/typegraph_core"; +import { caller, dirname, fromFileUrl } from "./deps"; +import { InjectionValue } from "./utils/type_utils"; import { serializeFromParentInjection, serializeGenericInjection, serializeStaticInjection, -} from "./utils/injection_utils.ts"; -import { Auth, Cors, Rate, wit_utils } from "./wit.ts"; -import Policy from "./policy.ts"; -import { getPolicyChain } from "./types.ts"; +} from "./utils/injection_utils"; +import { Auth, Cors, Rate, wit_utils } from "./wit"; +import Policy from "./policy"; +import { getPolicyChain } from "./types"; type Exports = Record; diff --git a/typegraph/deno/src/types.ts b/typegraph/node/src/types.ts similarity index 97% rename from typegraph/deno/src/types.ts rename to typegraph/node/src/types.ts index 3712b9208c..f714f1345b 100644 --- a/typegraph/deno/src/types.ts +++ b/typegraph/node/src/types.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { core, wit_utils } from "./wit.ts"; +import { core, wit_utils } from "./wit"; import { PolicyPerEffect, PolicySpec as WitPolicySpec, @@ -14,20 +14,20 @@ import { TypeOptional, TypeString, TypeUnion, -} from "./gen/interfaces/metatype-typegraph-core.d.ts"; -import { Reduce } from "./gen/interfaces/metatype-typegraph-utils.d.ts"; -import { FuncParams } from "./gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import { Materializer } from "./runtimes/mod.ts"; -import { mapValues } from "./deps.ts"; -import Policy from "./policy.ts"; -import { buildReduceData, serializeRecordValues } from "./utils/func_utils.ts"; +} from "./gen/interfaces/metatype-typegraph-core"; +import { Reduce } from "./gen/interfaces/metatype-typegraph-utils"; +import { FuncParams } from "./gen/interfaces/metatype-typegraph-runtimes"; +import { Materializer } from "./runtimes/mod"; +import { mapValues } from "./deps"; +import Policy from "./policy"; +import { buildReduceData, serializeRecordValues } from "./utils/func_utils"; import { serializeFromParentInjection, serializeGenericInjection, serializeStaticInjection, -} from "./utils/injection_utils.ts"; -import { InjectionValue } from "./utils/type_utils.ts"; -import { InheritDef } from "./typegraph.ts"; +} from "./utils/injection_utils"; +import { InjectionValue } from "./utils/type_utils"; +import { InheritDef } from "./typegraph"; export type PolicySpec = Policy | { none: Policy; diff --git a/typegraph/deno/src/utils/func_utils.ts b/typegraph/node/src/utils/func_utils.ts similarity index 93% rename from typegraph/deno/src/utils/func_utils.ts rename to typegraph/node/src/utils/func_utils.ts index b1a1aa2369..93d24fe3ed 100644 --- a/typegraph/deno/src/utils/func_utils.ts +++ b/typegraph/node/src/utils/func_utils.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { InheritDef } from "../typegraph.ts"; -import { ReducePath } from "../gen/interfaces/metatype-typegraph-utils.d.ts"; -import { serializeStaticInjection } from "./injection_utils.ts"; +import { InheritDef } from "../typegraph"; +import { ReducePath } from "../gen/interfaces/metatype-typegraph-utils"; +import { serializeStaticInjection } from "./injection_utils"; export function stringifySymbol(symbol: symbol) { const name = symbol.toString().match(/\((.+)\)/)?.[1]; diff --git a/typegraph/deno/src/utils/injection_utils.ts b/typegraph/node/src/utils/injection_utils.ts similarity index 92% rename from typegraph/deno/src/utils/injection_utils.ts rename to typegraph/node/src/utils/injection_utils.ts index 96ddc1b3bc..cd9360af54 100644 --- a/typegraph/deno/src/utils/injection_utils.ts +++ b/typegraph/node/src/utils/injection_utils.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { CREATE, DELETE, READ, UPDATE } from "../effects.ts"; -import { InjectionSource, InjectionValue } from "./type_utils.ts"; -import { stringifySymbol } from "./func_utils.ts"; -import { genRef } from "./../typegraph.ts"; +import { CREATE, DELETE, READ, UPDATE } from "../effects"; +import { InjectionSource, InjectionValue } from "./type_utils"; +import { stringifySymbol } from "./func_utils"; +import { genRef } from "./../typegraph"; export function serializeInjection( source: InjectionSource, diff --git a/typegraph/deno/src/utils/type_utils.ts b/typegraph/node/src/utils/type_utils.ts similarity index 94% rename from typegraph/deno/src/utils/type_utils.ts rename to typegraph/node/src/utils/type_utils.ts index 29dbeab086..286b10768f 100644 --- a/typegraph/deno/src/utils/type_utils.ts +++ b/typegraph/node/src/utils/type_utils.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { PerEffect } from "../effects.ts"; +import { PerEffect } from "../effects"; type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; diff --git a/typegraph/deno/src/wit.ts b/typegraph/node/src/wit.ts similarity index 78% rename from typegraph/deno/src/wit.ts rename to typegraph/node/src/wit.ts index ce0fb4412b..5dc5c2e836 100644 --- a/typegraph/deno/src/wit.ts +++ b/typegraph/node/src/wit.ts @@ -1,22 +1,22 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { MetatypeTypegraphCore } from "./gen/interfaces/metatype-typegraph-core.d.ts"; -import { MetatypeTypegraphRuntimes } from "./gen/interfaces/metatype-typegraph-runtimes.d.ts"; -import { MetatypeTypegraphAws } from "./gen/interfaces/metatype-typegraph-aws.d.ts"; -import { MetatypeTypegraphUtils } from "./gen/interfaces/metatype-typegraph-utils.d.ts"; -import * as js from "./gen/typegraph_core.js"; +import { MetatypeTypegraphCore } from "./gen/interfaces/metatype-typegraph-core"; +import { MetatypeTypegraphRuntimes } from "./gen/interfaces/metatype-typegraph-runtimes"; +import { MetatypeTypegraphAws } from "./gen/interfaces/metatype-typegraph-aws"; +import { MetatypeTypegraphUtils } from "./gen/interfaces/metatype-typegraph-utils"; +import * as js from "./gen/typegraph_core"; export const core = js.core as typeof MetatypeTypegraphCore; export const runtimes = js.runtimes as typeof MetatypeTypegraphRuntimes; export const aws = js.aws as typeof MetatypeTypegraphAws; export const wit_utils = js.utils as typeof MetatypeTypegraphUtils; -export type { Cors, Rate } from "./gen/interfaces/metatype-typegraph-core.d.ts"; +export type { Cors, Rate } from "./gen/interfaces/metatype-typegraph-core"; export type { Auth, AuthProtocol, AuthProtocolBasic, AuthProtocolJwt, AuthProtocolOauth2, -} from "./gen/interfaces/metatype-typegraph-utils.d.ts"; +} from "./gen/interfaces/metatype-typegraph-utils"; From 9a9d1f8ca9b41d3c2024a07dc7dc0f715673531f Mon Sep 17 00:00:00 2001 From: afmika Date: Mon, 8 Jan 2024 16:13:54 +0300 Subject: [PATCH 03/23] fix: ci --- .github/workflows/release.yml | 6 +++--- .github/workflows/tests.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55c06b057d..79937b30b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,10 +126,10 @@ jobs: cd ../.. npm install --global @bytecodealliance/jco@$JCO_VERSION - jco transpile $WASM_FILE -o typegraph/deno/src/gen - deno run -A typegraph/deno/dev/fix-declarations.ts + jco transpile $WASM_FILE -o typegraph/node/src/gen + deno run -A typegraph/node/dev/fix-declarations.ts - cd typegraph/deno/src + cd typegraph/node/src deno run -A ../../../dev/publish.ts cd ../../.. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b6264f9b51..ad2ebfc0a2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -301,9 +301,9 @@ jobs: mkdir -p $(dirname $WASM_FILE) wasm-opt -Oz target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE.opt wasm-tools component new $WASM_FILE.opt -o $WASM_FILE - rm -rf typegraph/deno/src/gen - jco transpile $WASM_FILE -o typegraph/deno/src/gen - deno run -A typegraph/deno/dev/fix-declarations.ts + rm -rf typegraph/node/src/gen + jco transpile $WASM_FILE -o typegraph/node/src/gen + deno run -A typegraph/node/dev/fix-declarations.ts rm -rf typegraph/python/typegraph/gen poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen From d7326314d6de1937a2f3d6a8959aed3fed906446 Mon Sep 17 00:00:00 2001 From: afmika Date: Mon, 8 Jan 2024 16:25:15 +0300 Subject: [PATCH 04/23] feat(sdk): setup npm project --- typegraph/node/package-lock.json | 45 ++++++++++++++++++++++++++++++++ typegraph/node/package.json | 15 +++++++++++ typegraph/node/tsconfig.json | 14 ++++++++++ 3 files changed, 74 insertions(+) create mode 100644 typegraph/node/package-lock.json create mode 100644 typegraph/node/package.json create mode 100644 typegraph/node/tsconfig.json diff --git a/typegraph/node/package-lock.json b/typegraph/node/package-lock.json new file mode 100644 index 0000000000..26d2f3b486 --- /dev/null +++ b/typegraph/node/package-lock.json @@ -0,0 +1,45 @@ +{ + "name": "node", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "node", + "version": "1.0.0", + "license": "MPL", + "devDependencies": { + "@types/node": "^20.10.7", + "typescript": "^5.3.3" + } + }, + "node_modules/@types/node": { + "version": "20.10.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.7.tgz", + "integrity": "sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + } + } +} diff --git a/typegraph/node/package.json b/typegraph/node/package.json new file mode 100644 index 0000000000..445f98e11d --- /dev/null +++ b/typegraph/node/package.json @@ -0,0 +1,15 @@ +{ + "name": "node", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MPL", + "devDependencies": { + "@types/node": "^20.10.7", + "typescript": "^5.3.3" + } +} diff --git a/typegraph/node/tsconfig.json b/typegraph/node/tsconfig.json new file mode 100644 index 0000000000..c2c04d9241 --- /dev/null +++ b/typegraph/node/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "lib": ["es6"], + "allowJs": true, + "outDir": "build", + "rootDir": "src", + "strict": true, + "noImplicitAny": true, + "esModuleInterop": true, + "resolveJsonModule": true + } +} From 14d1f7d09b2727f6f381d2447b2559ad1324f528 Mon Sep 17 00:00:00 2001 From: afmika Date: Mon, 8 Jan 2024 16:37:53 +0300 Subject: [PATCH 05/23] feat(sdk): replace deno dep to node equivalent --- typegraph/node/package-lock.json | 27 +++++++++++++++++++++++++++ typegraph/node/package.json | 6 ++++++ typegraph/node/src/deps.ts | 12 ++++-------- typegraph/node/tsconfig.json | 3 ++- 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/typegraph/node/package-lock.json b/typegraph/node/package-lock.json index 26d2f3b486..f035ddb560 100644 --- a/typegraph/node/package-lock.json +++ b/typegraph/node/package-lock.json @@ -8,11 +8,28 @@ "name": "node", "version": "1.0.0", "license": "MPL", + "dependencies": { + "@types/lodash": "^4.14.202", + "caller": "^1.1.0", + "lodash": "^4.17.21" + }, "devDependencies": { + "@types/caller": "^1.0.2", "@types/node": "^20.10.7", "typescript": "^5.3.3" } }, + "node_modules/@types/caller": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/caller/-/caller-1.0.2.tgz", + "integrity": "sha512-NRXTeF8nnjSAHFxHKMnqpUWY1gTyAHLMhPTKeeHWTZdPilcFiCvlfvpVB8bOMfHbWYIxiPwZDwrYwMsRFkeh7A==", + "dev": true + }, + "node_modules/@types/lodash": { + "version": "4.14.202", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", + "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==" + }, "node_modules/@types/node": { "version": "20.10.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.7.tgz", @@ -22,6 +39,16 @@ "undici-types": "~5.26.4" } }, + "node_modules/caller": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/caller/-/caller-1.1.0.tgz", + "integrity": "sha512-n+21IZC3j06YpCWaxmUy5AnVqhmCIM2bQtqQyy00HJlmStRt6kwDX5F9Z97pqwAB+G/tgSz6q/kUBbNyQzIubw==" + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", diff --git a/typegraph/node/package.json b/typegraph/node/package.json index 445f98e11d..860e33689d 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -9,7 +9,13 @@ "author": "", "license": "MPL", "devDependencies": { + "@types/caller": "^1.0.2", "@types/node": "^20.10.7", "typescript": "^5.3.3" + }, + "dependencies": { + "@types/lodash": "^4.14.202", + "caller": "^1.1.0", + "lodash": "^4.17.21" } } diff --git a/typegraph/node/src/deps.ts b/typegraph/node/src/deps.ts index e5bdb1a376..0af6501ca8 100644 --- a/typegraph/node/src/deps.ts +++ b/typegraph/node/src/deps.ts @@ -1,10 +1,6 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 - -export { mapValues } from "https://deno.land/std@0.192.0/collections/map_values.ts"; -export { expandGlobSync } from "https://deno.land/std@0.192.0/fs/mod.ts"; -export { default as caller } from "https://deno.land/x/caller@0.1.4/caller.ts"; -export { - dirname, - fromFileUrl, -} from "https://deno.land/std@0.192.0/path/mod.ts"; +export { default as mapValues } from "lodash/mapValues"; +export { default as caller } from "caller"; +export { fileURLToPath as fromFileUrl } from "node:url"; +export { dirname } from "node:path"; diff --git a/typegraph/node/tsconfig.json b/typegraph/node/tsconfig.json index c2c04d9241..1a64fefc6d 100644 --- a/typegraph/node/tsconfig.json +++ b/typegraph/node/tsconfig.json @@ -10,5 +10,6 @@ "noImplicitAny": true, "esModuleInterop": true, "resolveJsonModule": true - } + }, + "exclude": ["dev"] } From d02f1c6b4f21a14df2c3263a99d6ea19ee8ee244 Mon Sep 17 00:00:00 2001 From: afmika Date: Mon, 8 Jan 2024 18:10:37 +0300 Subject: [PATCH 06/23] fix(node): ts compilation --- typegate/import_map.json | 2 +- typegraph/node/src/types.ts | 2 +- typegraph/node/tsconfig.json | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/typegate/import_map.json b/typegate/import_map.json index 9026d3b0c5..d297be37f0 100644 --- a/typegate/import_map.json +++ b/typegate/import_map.json @@ -23,7 +23,7 @@ "outdent": "https://deno.land/x/outdent@v0.8.0/mod.ts", "json-schema-faker": "npm:json-schema-faker@0.5.3", "ajv": "https://esm.sh/ajv@8.12.0?pin=v131", - "@typegraph/sdk/": "../typegraph/deno/src/", + "@typegraph/sdk/": "npm:../typegraph/node/src", "test-utils/": "./tests/utils/" } } diff --git a/typegraph/node/src/types.ts b/typegraph/node/src/types.ts index f714f1345b..83f22ed6d2 100644 --- a/typegraph/node/src/types.ts +++ b/typegraph/node/src/types.ts @@ -60,7 +60,7 @@ export function getPolicyChain( } return { tag: "per-effect", - val: mapValues(p, (v) => v._id) as unknown as PolicyPerEffect, + val: mapValues(p, (v: any) => v._id) as unknown as PolicyPerEffect, } as const; }); } diff --git a/typegraph/node/tsconfig.json b/typegraph/node/tsconfig.json index 1a64fefc6d..bbce877e73 100644 --- a/typegraph/node/tsconfig.json +++ b/typegraph/node/tsconfig.json @@ -1,12 +1,11 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", - "lib": ["es6"], + "target": "ES2017", + "module": "CommonJS", "allowJs": true, "outDir": "build", "rootDir": "src", - "strict": true, + "strict": true, "noImplicitAny": true, "esModuleInterop": true, "resolveJsonModule": true From f13c41367b25ddef5b5c453be06c2ec07f9ac5be Mon Sep 17 00:00:00 2001 From: afmika Date: Tue, 9 Jan 2024 17:43:09 +0300 Subject: [PATCH 07/23] fix(sdk/node): fix tsconfig.json + convert project to esModule + bump jco version --- Cargo.lock | 621 ++++++++++---------- dev/lock.yml | 2 +- ghjk.ts | 2 +- typegraph/node/dev/fix-declarations.ts | 36 -- typegraph/node/package.json | 1 + typegraph/node/pnpm-lock.yaml | 61 ++ typegraph/node/src/deps.ts | 2 +- typegraph/node/src/effects.ts | 2 +- typegraph/node/src/mod.ts | 8 +- typegraph/node/src/params.ts | 6 +- typegraph/node/src/policy.ts | 6 +- typegraph/node/src/providers/aws.ts | 8 +- typegraph/node/src/providers/prisma.ts | 12 +- typegraph/node/src/providers/temporal.ts | 8 +- typegraph/node/src/runtimes/deno.ts | 12 +- typegraph/node/src/runtimes/graphql.ts | 10 +- typegraph/node/src/runtimes/http.ts | 10 +- typegraph/node/src/runtimes/python.ts | 10 +- typegraph/node/src/runtimes/random.ts | 10 +- typegraph/node/src/runtimes/wasmedge.ts | 10 +- typegraph/node/src/typegraph.ts | 16 +- typegraph/node/src/types.ts | 22 +- typegraph/node/src/utils/func_utils.ts | 6 +- typegraph/node/src/utils/injection_utils.ts | 8 +- typegraph/node/src/utils/type_utils.ts | 2 +- typegraph/node/src/wit.ts | 14 +- typegraph/node/tsconfig.json | 14 +- whiz.yaml | 3 +- 28 files changed, 467 insertions(+), 455 deletions(-) delete mode 100644 typegraph/node/dev/fix-declarations.ts create mode 100644 typegraph/node/pnpm-lock.yaml diff --git a/Cargo.lock b/Cargo.lock index 4fcd7f51f7..2d8fff0c00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,7 +19,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed51fb0cfa6f88331d4424a7aca87146b315a3b5bd2bbad298ec855718ef9df" dependencies = [ "erased-serde 0.3.31", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", "serde_json", ] @@ -56,7 +56,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -77,7 +77,7 @@ checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -159,7 +159,7 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", ] @@ -171,7 +171,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -310,7 +310,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -398,7 +398,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -408,7 +408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" dependencies = [ "concurrent-queue", - "event-listener 4.0.2", + "event-listener 4.0.3", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -458,7 +458,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "parking", "polling 3.3.1", "rustix 0.38.28", @@ -482,7 +482,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" dependencies = [ - "event-listener 4.0.2", + "event-listener 4.0.3", "event-listener-strategy", "pin-project-lite", ] @@ -524,7 +524,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -564,14 +564,14 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] name = "async-task" -version = "4.6.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d90cd0b264dfdd8eb5bad0a2c217c1f88fa96a8573f40e7b12de23fb468f46" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" @@ -581,7 +581,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -675,7 +675,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustversion", - "serde 1.0.194", + "serde 1.0.195", "sync_wrapper", "tower", "tower-layer", @@ -705,7 +705,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "instant", "rand 0.8.5", ] @@ -773,9 +773,9 @@ checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" [[package]] name = "base64-simd" @@ -819,7 +819,7 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -858,7 +858,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -888,7 +888,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -947,7 +947,7 @@ dependencies = [ "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "piper", "tracing", ] @@ -972,7 +972,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", "syn_derive", ] @@ -1012,7 +1012,7 @@ dependencies = [ "js-sys", "once_cell", "rand 0.8.5", - "serde 1.0.194", + "serde 1.0.195", "serde_bytes", "serde_json", "time", @@ -1027,7 +1027,7 @@ checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "regex-automata 0.4.3", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -1162,7 +1162,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits 0.2.17", - "serde 1.0.194", + "serde 1.0.195", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -1256,7 +1256,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -1327,12 +1327,12 @@ name = "common" version = "0.3.1" dependencies = [ "anyhow", - "base64 0.21.5", + "base64 0.21.6", "flate2", "ignore", "indexmap 2.1.0", "schemars", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_with 3.4.0", "tar", @@ -1372,7 +1372,7 @@ dependencies = [ "lazy_static 1.4.0", "nom 5.1.3", "rust-ini 0.13.0", - "serde 1.0.194", + "serde 1.0.195", "serde-hjson", "serde_json", "toml 0.5.11", @@ -1429,7 +1429,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "tiny-keccak", ] @@ -1510,9 +1510,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -1543,11 +1543,10 @@ dependencies = [ [[package]] name = "crossbeam" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eb9105919ca8e40d437fc9cbb8f1975d916f1bd28afe795a48aae32a2cc8920" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" dependencies = [ - "cfg-if", "crossbeam-channel", "crossbeam-deque", "crossbeam-epoch", @@ -1557,54 +1556,46 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.17" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc6598521bb5a83d491e8c1fe51db7296019d2ca3cb93cc6c2a20369a4d78a2" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -1711,7 +1702,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -1794,7 +1785,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -1827,7 +1818,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -1872,7 +1863,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "uuid", ] @@ -1883,7 +1874,7 @@ source = "git+https://github.com/metatypedev/deno?branch=v1.39.0-embeddable#8a6d dependencies = [ "async-trait", "base32", - "base64 0.21.5", + "base64 0.21.6", "bincode", "bytes", "cache_control", @@ -1950,7 +1941,7 @@ dependencies = [ "ring 0.17.7", "rustyline", "rustyline-derive", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_repr", "sha2 0.10.8", @@ -1981,7 +1972,7 @@ checksum = "8a8adb6aeb787db71d015d8e9f63f6e004eeb09c86babb4ded00878be18619b1" dependencies = [ "deno_media_type", "dprint-swc-ext 0.12.0", - "serde 1.0.194", + "serde 1.0.195", "swc_atoms 0.5.9", "swc_common 0.32.0", "swc_ecma_ast 0.109.0", @@ -2000,7 +1991,7 @@ dependencies = [ "base64 0.13.1", "deno_media_type", "dprint-swc-ext 0.13.0", - "serde 1.0.194", + "serde 1.0.195", "swc_atoms 0.6.4", "swc_bundler", "swc_common 0.33.9", @@ -2049,7 +2040,7 @@ dependencies = [ "async-trait", "deno_core", "rusqlite", - "serde 1.0.194", + "serde 1.0.195", "sha2 0.10.8", "tokio", ] @@ -2067,7 +2058,7 @@ dependencies = [ "once_cell", "parking_lot 0.12.1", "ring 0.17.7", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", "url", @@ -2084,7 +2075,7 @@ dependencies = [ "jsonc-parser", "log", "percent-encoding", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "url", ] @@ -2107,13 +2098,13 @@ dependencies = [ "bytes", "cooked-waker", "deno_ops", - "deno_unsync 0.3.1", + "deno_unsync 0.3.2", "futures", "libc", "log", "parking_lot 0.12.1", "pin-project", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_v8", "smallvec", @@ -2146,7 +2137,7 @@ dependencies = [ "aes", "aes-gcm", "aes-kw", - "base64 0.21.5", + "base64 0.21.6", "cbc", "const-oid", "ctr", @@ -2161,7 +2152,7 @@ dependencies = [ "rand 0.8.5", "ring 0.17.7", "rsa", - "serde 1.0.194", + "serde 1.0.195", "serde_bytes", "sha1", "sha2 0.10.8", @@ -2189,7 +2180,7 @@ dependencies = [ "indexmap 2.1.0", "lazy_static 1.4.0", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "termcolor", "tinytemplate", @@ -2225,7 +2216,7 @@ dependencies = [ "http", "pin-project", "reqwest", - "serde 1.0.194", + "serde 1.0.195", "tokio", "tokio-util 0.7.10", ] @@ -2240,7 +2231,7 @@ dependencies = [ "dynasmrt", "libffi", "libffi-sys", - "serde 1.0.194", + "serde 1.0.195", "serde-value", "serde_json", "tokio", @@ -2261,7 +2252,7 @@ dependencies = [ "log", "nix 0.26.2", "rand 0.8.5", - "serde 1.0.194", + "serde 1.0.195", "tokio", "winapi", ] @@ -2285,7 +2276,7 @@ dependencies = [ "once_cell", "parking_lot 0.12.1", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", "url", @@ -2298,7 +2289,7 @@ source = "git+https://github.com/metatypedev/deno?branch=v1.39.0-embeddable#8a6d dependencies = [ "async-compression", "async-trait", - "base64 0.21.5", + "base64 0.21.6", "brotli", "bytes", "cache_control", @@ -2319,7 +2310,7 @@ dependencies = [ "pin-project", "ring 0.17.7", "scopeguard", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "thiserror", "tokio", @@ -2347,7 +2338,7 @@ source = "git+https://github.com/metatypedev/deno?branch=v1.39.0-embeddable#8a6d dependencies = [ "anyhow", "async-trait", - "base64 0.21.5", + "base64 0.21.6", "chrono", "deno_core", "deno_fetch", @@ -2365,7 +2356,7 @@ dependencies = [ "rand 0.8.5", "reqwest", "rusqlite", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "termcolor", "tokio", @@ -2386,7 +2377,7 @@ dependencies = [ "log", "once_cell", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -2397,7 +2388,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cd29f62e6dec60e585f579df3e9c2fc562aadf881319152974bc442a9042077" dependencies = [ "ring 0.17.7", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", ] @@ -2409,7 +2400,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a798670c20308e5770cc0775de821424ff9e85665b602928509c8c70430b3ee0" dependencies = [ "data-url", - "serde 1.0.194", + "serde 1.0.195", "url", ] @@ -2446,7 +2437,7 @@ dependencies = [ "log", "pin-project", "rustls-tokio-stream", - "serde 1.0.194", + "serde 1.0.195", "socket2 0.5.5", "tokio", "trust-dns-proto 0.22.0", @@ -2507,7 +2498,7 @@ dependencies = [ "ripemd", "rsa", "scrypt", - "serde 1.0.194", + "serde 1.0.195", "sha-1", "sha2 0.10.8", "signature", @@ -2533,7 +2524,7 @@ dependencies = [ "futures", "log", "monch", - "serde 1.0.194", + "serde 1.0.195", "thiserror", ] @@ -2548,7 +2539,7 @@ dependencies = [ "quote", "strum", "strum_macros", - "syn 2.0.46", + "syn 2.0.48", "thiserror", ] @@ -2600,7 +2591,7 @@ dependencies = [ "regex", "ring 0.17.7", "rustyline", - "serde 1.0.194", + "serde 1.0.195", "signal-hook-registry", "termcolor", "tokio", @@ -2619,7 +2610,7 @@ checksum = "8169e0148da1946836e6e405bb7eefda411816577e3f2e5749bc6ae1ef952d13" dependencies = [ "monch", "once_cell", - "serde 1.0.194", + "serde 1.0.195", "thiserror", "url", ] @@ -2651,7 +2642,7 @@ dependencies = [ "rustls 0.21.10", "rustls-pemfile", "rustls-webpki", - "serde 1.0.194", + "serde 1.0.195", "webpki-roots", ] @@ -2666,9 +2657,9 @@ dependencies = [ [[package]] name = "deno_unsync" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e902f81b6d372427a99b65372379568e6350735562f3237c3daf61086e1d6e6" +checksum = "30dff7e03584dbae188dae96a0f1876740054809b2ad0cf7c9fc5d361f20e739" dependencies = [ "tokio", ] @@ -2679,7 +2670,7 @@ version = "0.128.0" source = "git+https://github.com/metatypedev/deno?branch=v1.39.0-embeddable#8a6dcf82f97fe1567ef5ad451747304b3c13f257" dependencies = [ "deno_core", - "serde 1.0.194", + "serde 1.0.195", "urlpattern", ] @@ -2695,7 +2686,7 @@ dependencies = [ "encoding_rs", "flate2", "futures", - "serde 1.0.194", + "serde 1.0.195", "tokio", "uuid", "windows-sys 0.48.0", @@ -2707,7 +2698,7 @@ version = "0.95.0" source = "git+https://github.com/metatypedev/deno?branch=v1.39.0-embeddable#8a6dcf82f97fe1567ef5ad451747304b3c13f257" dependencies = [ "deno_core", - "serde 1.0.194", + "serde 1.0.195", "tokio", "wgpu-core", "wgpu-hal", @@ -2737,7 +2728,7 @@ dependencies = [ "hyper 0.14.28", "once_cell", "rustls-tokio-stream", - "serde 1.0.194", + "serde 1.0.195", "tokio", ] @@ -2749,7 +2740,7 @@ dependencies = [ "deno_core", "deno_web", "rusqlite", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -2775,7 +2766,7 @@ dependencies = [ "num-bigint", "prost", "prost-build", - "serde 1.0.194", + "serde 1.0.195", "uuid", ] @@ -2796,7 +2787,7 @@ dependencies = [ "prost", "rand 0.8.5", "reqwest", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "tokio", "tokio-util 0.7.10", @@ -2859,7 +2850,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -3022,7 +3013,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3051,7 +3042,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3073,7 +3064,7 @@ dependencies = [ "prisma-models", "psl", "schema", - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -3099,7 +3090,7 @@ dependencies = [ "bumpalo", "indexmap 1.9.3", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "unicode-width", ] @@ -3113,7 +3104,7 @@ dependencies = [ "bumpalo", "indexmap 2.1.0", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "unicode-width", ] @@ -3126,7 +3117,7 @@ dependencies = [ "anyhow", "dprint-core 0.63.3", "jsonc-parser", - "serde 1.0.194", + "serde 1.0.195", "text_lines", ] @@ -3139,7 +3130,7 @@ dependencies = [ "anyhow", "dprint-core 0.63.3", "jsonc-parser", - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -3153,7 +3144,7 @@ dependencies = [ "dprint-core 0.63.3", "pulldown-cmark", "regex", - "serde 1.0.194", + "serde 1.0.195", "unicode-width", ] @@ -3167,7 +3158,7 @@ dependencies = [ "deno_ast 0.29.5", "dprint-core 0.62.1", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -3180,7 +3171,7 @@ dependencies = [ "deno_ast 0.31.6", "dprint-core 0.63.3", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -3446,7 +3437,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3456,7 +3447,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -3467,7 +3458,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3515,7 +3506,7 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -3524,7 +3515,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55d05712b2d8d88102bc9868020c9e5c7a1f5527c452b9b97450a1d006140ba7" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -3580,14 +3571,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f50abfc246ed6d7a5e34c9658cac93f959788058c8455c528d69471ef72d8ebf" dependencies = [ "anyhow", - "base64 0.21.5", + "base64 0.21.6", "deno_ast 0.31.6", "deno_graph", "deno_npm", "deno_semver", "futures", "hashlink", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "sha2 0.10.8", "thiserror", @@ -3613,9 +3604,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "218a870470cce1469024e9fb66b901aa983929d81304a1cdb299f28118e550d5" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", @@ -3628,7 +3619,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 4.0.2", + "event-listener 4.0.3", "pin-project-lite", ] @@ -3697,7 +3688,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17c35f166afb94b7f8e9449d0ad866daca111ba4053f3b1960bb480ca4382c63" dependencies = [ - "base64 0.21.5", + "base64 0.21.6", "hyper 0.14.28", "pin-project", "rand 0.8.5", @@ -3841,7 +3832,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3874,7 +3865,7 @@ dependencies = [ "pmutil", "proc-macro2", "swc_macros_common", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3902,7 +3893,7 @@ checksum = "b0fa992f1656e1707946bbba340ad244f0814009ef8c0118eb7b658395f19a2e" dependencies = [ "frunk_proc_macro_helpers", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3914,7 +3905,7 @@ dependencies = [ "frunk_core", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3926,7 +3917,7 @@ dependencies = [ "frunk_core", "frunk_proc_macro_helpers", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -4030,9 +4021,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ "futures-core", "pin-project-lite", @@ -4046,7 +4037,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -4130,9 +4121,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -4349,7 +4340,7 @@ dependencies = [ "bstr", "grep-matcher", "grep-searcher", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "termcolor", ] @@ -4419,7 +4410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5681137554ddff44396e5f149892c769d45301dd9aa19c51602a89ee214cb0ec" dependencies = [ "hashbrown 0.13.2", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -4553,9 +4544,9 @@ dependencies = [ [[package]] name = "hstr" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de90d3db62411eb62eddabe402d706ac4970f7ac8d088c05f11069cad9be9857" +checksum = "17fafeca18cf0927e23ea44d7a5189c10536279dfe9094e0dfa953053fbb5377" dependencies = [ "new_debug_unreachable", "once_cell", @@ -4804,7 +4795,7 @@ checksum = "0ecd467768fe83c2860e70e5de5297a7366a230ff53e1da2158bdac2384cd39d" dependencies = [ "indexmap 1.9.3", "log", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "url", ] @@ -4836,7 +4827,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -4847,7 +4838,7 @@ checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.3", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -4960,14 +4951,14 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-macro" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75828adcb53122ef5ea649a39f50f82d94b754099bf6331b32e255e1891e8fb" +checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -5045,7 +5036,7 @@ source = "git+https://github.com/prisma/prisma-engines?tag=5.5.2#aebc046ce8b88eb dependencies = [ "backtrace", "heck 0.3.3", - "serde 1.0.194", + "serde 1.0.195", "toml 0.5.11", ] @@ -5068,7 +5059,7 @@ dependencies = [ "futures-executor", "futures-util", "log", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", "serde_json", ] @@ -5085,9 +5076,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", @@ -5160,7 +5151,7 @@ dependencies = [ "once_cell", "regex", "rust-ini 0.19.0", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_yaml", "tempfile", @@ -5189,7 +5180,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -5307,9 +5298,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.151" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libffi" @@ -5392,9 +5383,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "295c17e837573c8c821dbaeb3cceb3d745ad082f7572191409e69cbc1b3fd050" dependencies = [ "cc", "cmake", @@ -5437,7 +5428,7 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -5474,7 +5465,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2368312c59425dd133cb9a327afee65be0a633a8ce471d248e2202a48f8f68ae" dependencies = [ "bitflags 1.3.2", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_repr", "url", @@ -5487,7 +5478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c66bfd44a06ae10647fe3f8214762e9369fd4248df1350924b4ef9e770a85ea1" dependencies = [ "bitflags 1.3.2", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_repr", "url", @@ -5611,7 +5602,7 @@ dependencies = [ "assert_cmd", "async-recursion", "async-trait", - "base64 0.21.5", + "base64 0.21.6", "chrono", "clap", "clap-verbosity-flag", @@ -5650,7 +5641,7 @@ dependencies = [ "reqwest", "self_update", "semver 1.0.21", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_yaml", "shadow-rs", @@ -5849,7 +5840,7 @@ dependencies = [ "rustc_version_runtime", "rustls 0.21.10", "rustls-pemfile", - "serde 1.0.194", + "serde 1.0.195", "serde_bytes", "serde_with 1.14.0", "sha-1", @@ -5903,7 +5894,7 @@ dependencies = [ "query-engine-metrics", "rand 0.7.3", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", "tokio", @@ -5943,7 +5934,7 @@ source = "git+https://github.com/prisma/prisma-engines?tag=5.5.2#aebc046ce8b88eb dependencies = [ "futures", "mongodb", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -5982,7 +5973,7 @@ dependencies = [ "percent-encoding", "pin-project", "priority-queue", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "socket2 0.4.10", "thiserror", @@ -6019,7 +6010,7 @@ dependencies = [ "regex", "rust_decimal", "saturating", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "sha1", "sha2 0.10.8", @@ -6044,7 +6035,7 @@ dependencies = [ "log", "num-traits 0.2.17", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "spirv", "termcolor", "thiserror", @@ -6067,9 +6058,9 @@ source = "git+https://github.com/metatypedev/deno?branch=v1.39.0-embeddable#8a6d dependencies = [ "proc-macro2", "quote", - "serde 1.0.194", + "serde 1.0.195", "serde_json", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -6266,7 +6257,7 @@ dependencies = [ "num-integer", "num-traits 0.2.17", "rand 0.8.5", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -6282,7 +6273,7 @@ dependencies = [ "num-iter", "num-traits 0.2.17", "rand 0.8.5", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "zeroize", ] @@ -6315,7 +6306,7 @@ checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -6467,7 +6458,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -6514,7 +6505,7 @@ dependencies = [ "percent-encoding", "pin-project", "rand 0.8.5", - "serde 1.0.194", + "serde 1.0.195", "thiserror", "tokio", "tokio-stream", @@ -6618,7 +6609,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" dependencies = [ "log", - "serde 1.0.194", + "serde 1.0.195", "winapi", ] @@ -6836,9 +6827,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" dependencies = [ "memchr", "thiserror", @@ -6847,9 +6838,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" +checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" dependencies = [ "pest", "pest_generator", @@ -6857,22 +6848,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" +checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] name = "pest_meta" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" dependencies = [ "once_cell", "pest", @@ -6964,7 +6955,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -7002,7 +6993,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -7069,7 +7060,7 @@ checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -7158,7 +7149,7 @@ dependencies = [ "chrono", "fallible-iterator", "postgres-protocol", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "uuid", ] @@ -7276,7 +7267,7 @@ dependencies = [ "chrono", "once_cell", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "uuid", ] @@ -7328,7 +7319,7 @@ checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" dependencies = [ "proc-macro-rules-macros", "proc-macro2", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -7340,14 +7331,14 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] name = "proc-macro2" -version = "1.0.74" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2de98502f212cfcea8d0bb305bd0f49d7ebdd75b64ba0a68f937d888f4e0d6db" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -7427,7 +7418,7 @@ dependencies = [ "chrono", "inventory", "prost", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", "serde_json", "typetag", @@ -7459,7 +7450,7 @@ dependencies = [ "prost-wkt", "prost-wkt-build", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", "serde_json", ] @@ -7490,7 +7481,7 @@ dependencies = [ "prisma-value", "regex", "schema-ast", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "url", ] @@ -7535,7 +7526,7 @@ dependencies = [ "config", "directories 4.0.1", "petgraph 0.6.4", - "serde 1.0.194", + "serde 1.0.195", "serde-value", "tint", ] @@ -7619,7 +7610,7 @@ dependencies = [ "itertools 0.10.5", "prisma-models", "prisma-value", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", "user-facing-errors", @@ -7650,7 +7641,7 @@ dependencies = [ "query-connector", "query-engine-metrics", "schema", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", "tokio", @@ -7672,7 +7663,7 @@ dependencies = [ "metrics-util 0.12.1", "once_cell", "parking_lot 0.12.1", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "tracing", "tracing-futures", @@ -7814,7 +7805,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", ] [[package]] @@ -7871,7 +7862,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "libredox", "thiserror", ] @@ -7893,7 +7884,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -7973,7 +7964,7 @@ dependencies = [ "psl", "quaint", "query-core", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "sql-query-connector", "thiserror", @@ -7989,7 +7980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "async-compression", - "base64 0.21.5", + "base64 0.21.6", "bytes", "encoding_rs", "futures-core", @@ -8010,7 +8001,7 @@ dependencies = [ "pin-project-lite", "rustls 0.21.10", "rustls-pemfile", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_urlencoded", "tokio", @@ -8070,7 +8061,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -8121,9 +8112,9 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ - "base64 0.21.5", + "base64 0.21.6", "bitflags 2.4.1", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", ] @@ -8190,7 +8181,7 @@ dependencies = [ "num-traits 0.2.17", "rand 0.8.5", "rkyv", - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -8312,7 +8303,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.6", ] [[package]] @@ -8460,7 +8451,7 @@ dependencies = [ "enumflags2", "psl", "quaint", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "sha2 0.9.9", "tracing", @@ -8481,7 +8472,7 @@ dependencies = [ "mongodb-schema-connector", "psl", "schema-connector", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "sql-schema-connector", "tokio", @@ -8502,7 +8493,7 @@ dependencies = [ "indexmap 1.9.3", "indexmap 2.1.0", "schemars_derive", - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -8716,7 +8707,7 @@ dependencies = [ "once_cell", "rand 0.8.5", "sentry-types", - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -8762,7 +8753,7 @@ dependencies = [ "debugid", "hex", "rand 0.8.5", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", "time", @@ -8778,9 +8769,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.194" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b114498256798c94a0689e1a15fec6005dee8ac1f41de56404b67afc2a4b773" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -8804,7 +8795,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" dependencies = [ "ordered-float", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -8813,18 +8804,18 @@ version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] name = "serde_derive" -version = "1.0.194" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -8840,14 +8831,14 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.110" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fbd975230bada99c8bb618e0c365c2eefa219158d5c6c29610fd09ff1833257" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "indexmap 2.1.0", "itoa", "ryu", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -8858,7 +8849,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -8867,7 +8858,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -8879,7 +8870,7 @@ dependencies = [ "form_urlencoded", "itoa", "ryu", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -8891,7 +8882,7 @@ dependencies = [ "bytes", "derive_more", "num-bigint", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "thiserror", "v8", @@ -8903,7 +8894,7 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "serde_with_macros 1.5.2", ] @@ -8913,12 +8904,12 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ - "base64 0.21.5", + "base64 0.21.6", "chrono", "hex", "indexmap 1.9.3", "indexmap 2.1.0", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "serde_with_macros 3.4.0", "time", @@ -8945,7 +8936,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -8957,7 +8948,7 @@ dependencies = [ "indexmap 2.1.0", "itoa", "ryu", - "serde 1.0.194", + "serde 1.0.195", "unsafe-libyaml", ] @@ -9018,9 +9009,9 @@ dependencies = [ [[package]] name = "sha256" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7895c8ae88588ccead14ff438b939b0c569cd619116f14b4d13fdff7b8333386" +checksum = "18278f6a914fa3070aa316493f7d2ddfb9ac86ebc06fa3b83bffda487e9065b0" dependencies = [ "async-trait", "bytes", @@ -9100,15 +9091,15 @@ dependencies = [ [[package]] name = "simd-json" -version = "0.13.4" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a3720326b20bf5b95b72dbbd133caae7e0dcf71eae8f6e6656e71a7e5c9aaa" +checksum = "0c58001aca67fc467da571f35e7e1dc9c094e91b099cc54bd3cead2962db2432" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "halfbrown", "lexical-core 0.8.5", "ref-cast", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "simdutf8", "value-trait", @@ -9219,7 +9210,7 @@ dependencies = [ "debugid", "if_chain", "rustc_version 0.2.3", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "unicode-id", "url", @@ -9235,7 +9226,7 @@ dependencies = [ "debugid", "if_chain", "rustc_version 0.2.3", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "unicode-id", "url", @@ -9243,9 +9234,9 @@ dependencies = [ [[package]] name = "spdx" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b19b32ed6d899ab23174302ff105c1577e45a06b08d4fe0a9dd13ce804bbbf71" +checksum = "62bde1398b09b9f93fc2fc9b9da86e362693e999d3a54a8ac47a99a5a73f638b" dependencies = [ "smallvec", ] @@ -9307,7 +9298,7 @@ dependencies = [ "quaint", "query-connector", "rand 0.7.3", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", "tokio", @@ -9335,7 +9326,7 @@ dependencies = [ "quaint", "regex", "schema-connector", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "sql-ddl", "sql-schema-describer", @@ -9365,7 +9356,7 @@ dependencies = [ "psl", "quaint", "regex", - "serde 1.0.194", + "serde 1.0.195", "tracing", "tracing-error", "tracing-futures", @@ -9427,7 +9418,7 @@ dependencies = [ "parking_lot 0.12.1", "phf_shared 0.10.0", "precomputed-hash", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -9452,7 +9443,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -9500,7 +9491,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -9527,7 +9518,7 @@ checksum = "9f54563d7dcba626d4acfe14ed12def7ecc28e004debe3ecd2c3ee07cc47e449" dependencies = [ "once_cell", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "string_cache", "string_cache_codegen", "triomphe", @@ -9542,7 +9533,7 @@ dependencies = [ "hstr", "once_cell", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -9591,7 +9582,7 @@ dependencies = [ "num-bigint", "once_cell", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "siphasher", "string_cache", "swc_atoms 0.5.9", @@ -9618,7 +9609,7 @@ dependencies = [ "num-bigint", "once_cell", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "siphasher", "sourcemap 6.4.1", "swc_atoms 0.6.4", @@ -9636,7 +9627,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ba1c7a40d38f9dd4e9a046975d3faf95af42937b34b2b963be4d8f01239584b" dependencies = [ "indexmap 1.9.3", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "swc_config_macro", ] @@ -9651,7 +9642,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -9664,7 +9655,7 @@ dependencies = [ "is-macro", "num-bigint", "scoped-tls", - "serde 1.0.194", + "serde 1.0.195", "string_enum", "swc_atoms 0.5.9", "swc_common 0.32.0", @@ -9682,7 +9673,7 @@ dependencies = [ "num-bigint", "phf 0.11.2", "scoped-tls", - "serde 1.0.194", + "serde 1.0.195", "string_enum", "swc_atoms 0.6.4", "swc_common 0.33.9", @@ -9699,7 +9690,7 @@ dependencies = [ "num-bigint", "once_cell", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "sourcemap 6.4.1", "swc_atoms 0.5.9", "swc_common 0.32.0", @@ -9718,7 +9709,7 @@ dependencies = [ "num-bigint", "once_cell", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "sourcemap 6.4.1", "swc_atoms 0.6.4", "swc_common 0.33.9", @@ -9737,7 +9728,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -9760,7 +9751,7 @@ checksum = "31cf7549feec3698d0110a0a71ae547f31ae272dc92db3285ce126d6dcbdadf3" dependencies = [ "anyhow", "pathdiff", - "serde 1.0.194", + "serde 1.0.195", "swc_common 0.33.9", "tracing", ] @@ -9774,7 +9765,7 @@ dependencies = [ "either", "num-bigint", "num-traits 0.2.17", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "smartstring", "stacker", @@ -9796,7 +9787,7 @@ dependencies = [ "num-bigint", "num-traits 0.2.17", "phf 0.11.2", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "smartstring", "stacker", @@ -9819,7 +9810,7 @@ dependencies = [ "once_cell", "phf 0.10.1", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "swc_atoms 0.5.9", "swc_common 0.32.0", @@ -9842,7 +9833,7 @@ dependencies = [ "once_cell", "phf 0.11.2", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "swc_atoms 0.6.4", "swc_common 0.33.9", @@ -9877,7 +9868,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -9912,7 +9903,7 @@ checksum = "c17e1f409e026be953fabb327923ebc5fdc7c664bcac036b76107834798640ed" dependencies = [ "either", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "swc_atoms 0.6.4", "swc_common 0.33.9", @@ -9934,7 +9925,7 @@ dependencies = [ "dashmap", "indexmap 1.9.3", "once_cell", - "serde 1.0.194", + "serde 1.0.195", "sha-1", "string_enum", "swc_atoms 0.5.9", @@ -9958,7 +9949,7 @@ dependencies = [ "dashmap", "indexmap 1.9.3", "once_cell", - "serde 1.0.194", + "serde 1.0.195", "sha-1", "string_enum", "swc_atoms 0.6.4", @@ -9978,7 +9969,7 @@ version = "0.182.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eba97b1ea71739fcf278aedad4677a3cacb52288a3f3566191b70d16a889de6" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "swc_atoms 0.5.9", "swc_common 0.32.0", "swc_ecma_ast 0.109.0", @@ -9995,7 +9986,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daa2950c85abb4d555e092503ad2fa4f6dec0ee36a719273fb7a7bb29ead9ab6" dependencies = [ "ryu-js", - "serde 1.0.194", + "serde 1.0.195", "swc_atoms 0.6.4", "swc_common 0.33.9", "swc_ecma_ast 0.110.10", @@ -10078,7 +10069,7 @@ dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -10115,7 +10106,7 @@ dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -10139,7 +10130,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -10155,9 +10146,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.46" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89456b690ff72fddcecf231caedbe615c59480c93358a93dfae7fc29e3ebbf0e" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -10173,7 +10164,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -10263,13 +10254,13 @@ version = "0.1.0" source = "git+https://github.com/temporalio/sdk-core?rev=7f9755b#7f9755b77def19796a3db0a22d9b56919872678a" dependencies = [ "anyhow", - "base64 0.21.5", + "base64 0.21.6", "derive_more", "prost", "prost-wkt", "prost-wkt-build", "prost-wkt-types", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "thiserror", "tonic", @@ -10303,7 +10294,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fd5828de7deaa782e1dd713006ae96b3bee32d3279b79eb67ecf8072c059bcf" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -10334,7 +10325,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -10390,7 +10381,7 @@ dependencies = [ "libc", "num_threads", "powerfmt", - "serde 1.0.194", + "serde 1.0.195", "time-core", "time-macros", ] @@ -10446,7 +10437,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "serde_json", ] @@ -10502,7 +10493,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -10630,7 +10621,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -10639,7 +10630,7 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "serde_spanned", "toml_datetime", "toml_edit 0.21.0", @@ -10651,7 +10642,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -10672,7 +10663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ "indexmap 2.1.0", - "serde 1.0.194", + "serde 1.0.195", "serde_spanned", "toml_datetime", "winnow", @@ -10766,7 +10757,7 @@ dependencies = [ "httparse", "lsp-types 0.94.1", "memchr", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "tokio", "tokio-util 0.7.10", @@ -10783,7 +10774,7 @@ checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -10812,7 +10803,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -10905,7 +10896,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" dependencies = [ - "serde 1.0.194", + "serde 1.0.195", "stable_deref_trait", ] @@ -10951,7 +10942,7 @@ dependencies = [ "ipnet", "lazy_static 1.4.0", "rand 0.8.5", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "thiserror", "tinyvec", @@ -10993,7 +10984,7 @@ dependencies = [ "lru-cache", "parking_lot 0.12.1", "resolv-conf", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "thiserror", "tokio", @@ -11052,7 +11043,7 @@ name = "typegate_engine" version = "0.3.1" dependencies = [ "anyhow", - "base64 0.21.5", + "base64 0.21.6", "common", "connection-string", "convert_case 0.6.0", @@ -11074,7 +11065,7 @@ dependencies = [ "request-handlers", "schema-connector", "schema-core", - "serde 1.0.194", + "serde 1.0.195", "shadow-rs", "tap", "tempfile", @@ -11104,7 +11095,7 @@ dependencies = [ "pathdiff", "ptree", "regex", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "sha2 0.10.8", "wit-bindgen", @@ -11141,7 +11132,7 @@ dependencies = [ "erased-serde 0.4.2", "inventory", "once_cell", - "serde 1.0.194", + "serde 1.0.195", "typetag-impl", ] @@ -11153,7 +11144,7 @@ checksum = "291db8a81af4840c10d636e047cac67664e343be44e24dfdbd1492df9a5d3390" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -11361,7 +11352,7 @@ version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" dependencies = [ - "base64 0.21.5", + "base64 0.21.6", "log", "native-tls", "once_cell", @@ -11377,7 +11368,7 @@ dependencies = [ "form_urlencoded", "idna 0.4.0", "percent-encoding", - "serde 1.0.194", + "serde 1.0.195", ] [[package]] @@ -11394,7 +11385,7 @@ checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609" dependencies = [ "derive_more", "regex", - "serde 1.0.194", + "serde 1.0.195", "unic-ucd-ident", "url", ] @@ -11418,7 +11409,7 @@ dependencies = [ "indoc", "itertools 0.10.5", "quaint", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "tracing", "user-facing-error-macros", @@ -11448,8 +11439,8 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ - "getrandom 0.2.11", - "serde 1.0.194", + "getrandom 0.2.12", + "serde 1.0.195", ] [[package]] @@ -11601,7 +11592,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", "wasm-bindgen-shared", ] @@ -11635,7 +11626,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -11672,7 +11663,7 @@ checksum = "d835d67708f6374937c550ad8dd1d17c616ae009e3f00d7a0ac9f7825e78c36a" dependencies = [ "anyhow", "indexmap 2.1.0", - "serde 1.0.194", + "serde 1.0.195", "serde_derive", "serde_json", "spdx", @@ -11701,7 +11692,7 @@ checksum = "dbe80d95a88e9ac87b6aaf7bc9acd1fdfcd92045db2bf41a2262f623e2406a92" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -11840,7 +11831,7 @@ dependencies = [ "profiling", "ron", "rustc-hash", - "serde 1.0.194", + "serde 1.0.195", "smallvec", "thiserror", "web-sys", @@ -11897,7 +11888,7 @@ checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd" dependencies = [ "bitflags 2.4.1", "js-sys", - "serde 1.0.194", + "serde 1.0.195", "web-sys", ] @@ -12201,9 +12192,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.31" +version = "0.5.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a4882e6b134d6c28953a387571f1acdd3496830d5e36c5e3a1075580ea641c" +checksum = "b7520bbdec7211caa7c4e682eb1fbe07abe20cee6756b6e00f537c82c11816aa" dependencies = [ "memchr", ] @@ -12280,7 +12271,7 @@ checksum = "a70c97e09751a9a95a592bd8ef84e953e5cdce6ebbfdb35ceefa5cc511da3b71" dependencies = [ "anyhow", "proc-macro2", - "syn 2.0.46", + "syn 2.0.48", "wit-bindgen-core", "wit-bindgen-rust", "wit-bindgen-rust-lib", @@ -12297,7 +12288,7 @@ dependencies = [ "bitflags 2.4.1", "indexmap 2.1.0", "log", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "wasm-encoder 0.33.2", "wasm-metadata", @@ -12317,7 +12308,7 @@ dependencies = [ "log", "pulldown-cmark", "semver 1.0.21", - "serde 1.0.194", + "serde 1.0.195", "serde_json", "unicode-xid", "url", @@ -12340,7 +12331,7 @@ checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ "curve25519-dalek", "rand_core 0.6.4", - "serde 1.0.194", + "serde 1.0.195", "zeroize", ] @@ -12421,7 +12412,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -12441,7 +12432,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] diff --git a/dev/lock.yml b/dev/lock.yml index 9dc6e61918..c5522ce32f 100644 --- a/dev/lock.yml +++ b/dev/lock.yml @@ -72,7 +72,7 @@ dev: PNPM_VERSION: v8.8.0 CARGO_INSTA_VERSION: 1.33.0 WASM_TOOLS_VERSION: 1.0.53 - JCO_VERSION: 0.12.1 + JCO_VERSION: 0.14.2 WASMTIME_VERSION: 13.0.2 WASMEDGE_VERSION: 0.13.5 TYPEGRAPH_VERSION: 0.0.3 diff --git a/ghjk.ts b/ghjk.ts index 9c16ab2ed0..2c9d9c2397 100644 --- a/ghjk.ts +++ b/ghjk.ts @@ -6,7 +6,7 @@ const PROTOC_VERSION = "v24.1"; const POETRY_VERSION = "1.7.0"; const PNPM_VERSION = "v8.8.0"; const WASM_TOOLS_VERSION = "1.0.53"; -const JCO_VERSION = "0.12.1"; +const JCO_VERSION = "0.14.2"; const WASMEDGE_VERSION = "0.13.5"; const WASM_OPT_VERSION = "0.116.0"; const MOLD_VERSION = "v2.4.0"; diff --git a/typegraph/node/dev/fix-declarations.ts b/typegraph/node/dev/fix-declarations.ts deleted file mode 100644 index c4a7cee388..0000000000 --- a/typegraph/node/dev/fix-declarations.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 - -import { - dirname, - fromFileUrl, - resolve, -} from "https://deno.land/std@0.202.0/path/mod.ts"; - -export const thisDir = dirname(fromFileUrl(import.meta.url)); - -const replacements = [ - { - path: resolve(thisDir, "../src/gen/typegraph_core.js"), - op: (s: string) => { - return s.replaceAll(/,\s*\w+ as '[\w:\/]+'/g, ""); - }, - }, -]; - -for ( - const { path, op } of replacements -) { - const text = Deno.readTextFileSync(path); - const rewrite = [...text.split("\n")]; - - for (let i = 0; i < rewrite.length; i += 1) { - rewrite[i] = op(rewrite[i]); - } - - const newText = rewrite.join("\n"); - if (text != newText) { - console.log(`Fixed generated code in ${path.replace(thisDir, "")}`); - Deno.writeTextFileSync(path, newText); - } -} diff --git a/typegraph/node/package.json b/typegraph/node/package.json index 860e33689d..6fb914c1c2 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -3,6 +3,7 @@ "version": "1.0.0", "description": "", "main": "index.js", + "type": "module", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/typegraph/node/pnpm-lock.yaml b/typegraph/node/pnpm-lock.yaml new file mode 100644 index 0000000000..c11efbc7e8 --- /dev/null +++ b/typegraph/node/pnpm-lock.yaml @@ -0,0 +1,61 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + '@types/lodash': + specifier: ^4.14.202 + version: 4.14.202 + caller: + specifier: ^1.1.0 + version: 1.1.0 + lodash: + specifier: ^4.17.21 + version: 4.17.21 + +devDependencies: + '@types/caller': + specifier: ^1.0.2 + version: 1.0.2 + '@types/node': + specifier: ^20.10.7 + version: 20.10.7 + typescript: + specifier: ^5.3.3 + version: 5.3.3 + +packages: + + /@types/caller@1.0.2: + resolution: {integrity: sha512-NRXTeF8nnjSAHFxHKMnqpUWY1gTyAHLMhPTKeeHWTZdPilcFiCvlfvpVB8bOMfHbWYIxiPwZDwrYwMsRFkeh7A==} + dev: true + + /@types/lodash@4.14.202: + resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} + dev: false + + /@types/node@20.10.7: + resolution: {integrity: sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==} + dependencies: + undici-types: 5.26.5 + dev: true + + /caller@1.1.0: + resolution: {integrity: sha512-n+21IZC3j06YpCWaxmUy5AnVqhmCIM2bQtqQyy00HJlmStRt6kwDX5F9Z97pqwAB+G/tgSz6q/kUBbNyQzIubw==} + dev: false + + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: false + + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true diff --git a/typegraph/node/src/deps.ts b/typegraph/node/src/deps.ts index 0af6501ca8..c88b18f1af 100644 --- a/typegraph/node/src/deps.ts +++ b/typegraph/node/src/deps.ts @@ -1,6 +1,6 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -export { default as mapValues } from "lodash/mapValues"; +export { default as mapValues } from "lodash/mapValues.js"; export { default as caller } from "caller"; export { fileURLToPath as fromFileUrl } from "node:url"; export { dirname } from "node:path"; diff --git a/typegraph/node/src/effects.ts b/typegraph/node/src/effects.ts index ec4cc86e41..19bdf09cec 100644 --- a/typegraph/node/src/effects.ts +++ b/typegraph/node/src/effects.ts @@ -6,7 +6,7 @@ import { EffectDelete, EffectRead, EffectUpdate, -} from "./gen/interfaces/metatype-typegraph-runtimes"; +} from "./gen/interfaces/metatype-typegraph-runtimes.js"; export function read(): EffectRead { return { tag: "read" }; diff --git a/typegraph/node/src/mod.ts b/typegraph/node/src/mod.ts index 3998070203..071e0ca490 100644 --- a/typegraph/node/src/mod.ts +++ b/typegraph/node/src/mod.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "./types"; -import { typegraph } from "./typegraph"; -import Policy from "./policy"; -import * as fx from "./effects"; +import * as t from "./types.js"; +import { typegraph } from "./typegraph.js"; +import Policy from "./policy.js"; +import * as fx from "./effects.js"; export { fx, Policy, t, typegraph }; diff --git a/typegraph/node/src/params.ts b/typegraph/node/src/params.ts index 47aa172c44..40aca9b1da 100644 --- a/typegraph/node/src/params.ts +++ b/typegraph/node/src/params.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { RawAuth } from "./typegraph"; -import { Auth as Auth_, wit_utils } from "./wit"; -import * as t from "./types"; +import { RawAuth } from "./typegraph.js"; +import { Auth as Auth_, wit_utils } from "./wit.js"; +import * as t from "./types.js"; export type StdOauth2Profiler = | { profiler: "default" } diff --git a/typegraph/node/src/policy.ts b/typegraph/node/src/policy.ts index 82ba7af80d..406d5b0220 100644 --- a/typegraph/node/src/policy.ts +++ b/typegraph/node/src/policy.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { MaterializerId } from "./gen/interfaces/metatype-typegraph-core"; -import { core, runtimes } from "./wit"; -import { DenoRuntime } from "./runtimes/deno"; +import { MaterializerId } from "./gen/interfaces/metatype-typegraph-core.js"; +import { core, runtimes } from "./wit.js"; +import { DenoRuntime } from "./runtimes/deno.js"; export default class Policy { constructor(public readonly _id: number, public readonly name: string) {} diff --git a/typegraph/node/src/providers/aws.ts b/typegraph/node/src/providers/aws.ts index e10fbb96a5..72edd79c6a 100644 --- a/typegraph/node/src/providers/aws.ts +++ b/typegraph/node/src/providers/aws.ts @@ -1,14 +1,14 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Materializer, Runtime } from "../runtimes/mod"; -import { aws } from "../wit"; +import { Materializer, Runtime } from "../runtimes/mod.js"; +import { aws } from "../wit.js"; import { S3PresignGetParams, S3PresignPutParams, S3RuntimeData, -} from "../gen/interfaces/metatype-typegraph-aws"; -import { t } from "../mod"; +} from "../gen/interfaces/metatype-typegraph-aws.js"; +import { t } from "../mod.js"; type S3PresignGetMat = Materializer & S3PresignGetParams; type S3PresignPutMat = Materializer & S3PresignPutParams; diff --git a/typegraph/node/src/providers/prisma.ts b/typegraph/node/src/providers/prisma.ts index f639f0c081..afd9a8dc01 100644 --- a/typegraph/node/src/providers/prisma.ts +++ b/typegraph/node/src/providers/prisma.ts @@ -1,12 +1,12 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Runtime } from "../runtimes/mod"; -import { runtimes } from "../wit"; -import { Typedef } from "../types"; -import { t } from "../mod"; -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; -import { genRef } from "./../typegraph"; +import { Runtime } from "../runtimes/mod.js"; +import { runtimes } from "../wit.js"; +import { Typedef } from "../types.js"; +import { t } from "../mod.js"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; +import { genRef } from "./../typegraph.js"; type PrismaLinkArg = { fkey?: boolean; diff --git a/typegraph/node/src/providers/temporal.ts b/typegraph/node/src/providers/temporal.ts index 1628fb19ef..a1b24444da 100644 --- a/typegraph/node/src/providers/temporal.ts +++ b/typegraph/node/src/providers/temporal.ts @@ -1,13 +1,13 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Runtime } from "../runtimes/mod"; -import { runtimes } from "../wit"; -import { Func, Typedef } from "../types"; +import { Runtime } from "../runtimes/mod.js"; +import { runtimes } from "../wit.js"; +import { Func, Typedef } from "../types.js"; import { TemporalOperationData, TemporalOperationType, -} from "../gen/interfaces/metatype-typegraph-runtimes"; +} from "../gen/interfaces/metatype-typegraph-runtimes.js"; export class TemporalRuntime extends Runtime { host: string; diff --git a/typegraph/node/src/runtimes/deno.ts b/typegraph/node/src/runtimes/deno.ts index c9c7b071b8..bc42b02305 100644 --- a/typegraph/node/src/runtimes/deno.ts +++ b/typegraph/node/src/runtimes/deno.ts @@ -1,12 +1,12 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types"; -import { runtimes } from "../wit"; -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; -import Policy from "../policy"; -import { Materializer, Runtime } from "./mod"; -import { fx } from "../mod"; +import * as t from "../types.js"; +import { runtimes } from "../wit.js"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; +import Policy from "../policy.js"; +import { Materializer, Runtime } from "./mod.js"; +import { fx } from "../mod.js"; interface FunMat extends Materializer { code: string; diff --git a/typegraph/node/src/runtimes/graphql.ts b/typegraph/node/src/runtimes/graphql.ts index 3aaf2cef35..c8fc976e0b 100644 --- a/typegraph/node/src/runtimes/graphql.ts +++ b/typegraph/node/src/runtimes/graphql.ts @@ -1,11 +1,11 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; -import * as t from "../types"; -import { runtimes } from "../wit"; -import { Materializer, Runtime } from "./mod"; -import { fx } from "../mod"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; +import * as t from "../types.js"; +import { runtimes } from "../wit.js"; +import { Materializer, Runtime } from "./mod.js"; +import { fx } from "../mod.js"; export class GraphQLRuntime extends Runtime { constructor(private endpoint: string) { diff --git a/typegraph/node/src/runtimes/http.ts b/typegraph/node/src/runtimes/http.ts index 0a68c78a33..4ff57c2899 100644 --- a/typegraph/node/src/runtimes/http.ts +++ b/typegraph/node/src/runtimes/http.ts @@ -1,15 +1,15 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types"; +import * as t from "../types.js"; import { Effect, HttpMethod, MaterializerHttpRequest, -} from "../gen/interfaces/metatype-typegraph-runtimes"; -import { runtimes } from "../wit"; -import { Materializer, Runtime } from "./mod"; -import { fx } from "../mod"; +} from "../gen/interfaces/metatype-typegraph-runtimes.js"; +import { runtimes } from "../wit.js"; +import { Materializer, Runtime } from "./mod.js"; +import { fx } from "../mod.js"; type HttpRequestMat = & Materializer diff --git a/typegraph/node/src/runtimes/python.ts b/typegraph/node/src/runtimes/python.ts index d748d5e09b..c042dd4695 100644 --- a/typegraph/node/src/runtimes/python.ts +++ b/typegraph/node/src/runtimes/python.ts @@ -1,11 +1,11 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types"; -import { runtimes } from "../wit"; -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; -import { Materializer, Runtime } from "./mod"; -import { fx } from "../mod"; +import * as t from "../types.js"; +import { runtimes } from "../wit.js"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; +import { Materializer, Runtime } from "./mod.js"; +import { fx } from "../mod.js"; interface LambdaMat extends Materializer { fn: string; diff --git a/typegraph/node/src/runtimes/random.ts b/typegraph/node/src/runtimes/random.ts index d167350889..7b72d9c524 100644 --- a/typegraph/node/src/runtimes/random.ts +++ b/typegraph/node/src/runtimes/random.ts @@ -1,13 +1,13 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types"; -import { runtimes } from "../wit"; +import * as t from "../types.js"; +import { runtimes } from "../wit.js"; import { RandomRuntimeData, -} from "../gen/interfaces/metatype-typegraph-runtimes"; -import { Materializer, Runtime } from "./mod"; -import { fx } from "../mod"; +} from "../gen/interfaces/metatype-typegraph-runtimes.js"; +import { Materializer, Runtime } from "./mod.js"; +import { fx } from "../mod.js"; interface RandomMat extends Materializer { runtime: number; diff --git a/typegraph/node/src/runtimes/wasmedge.ts b/typegraph/node/src/runtimes/wasmedge.ts index 753c619e98..b07e9bd103 100644 --- a/typegraph/node/src/runtimes/wasmedge.ts +++ b/typegraph/node/src/runtimes/wasmedge.ts @@ -1,11 +1,11 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "../types"; -import { runtimes } from "../wit"; -import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes"; -import { Materializer, Runtime } from "./mod"; -import { fx } from "../mod"; +import * as t from "../types.js"; +import { runtimes } from "../wit.js"; +import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; +import { Materializer, Runtime } from "./mod.js"; +import { fx } from "../mod.js"; interface WasiMat extends Materializer { module: string; diff --git a/typegraph/node/src/typegraph.ts b/typegraph/node/src/typegraph.ts index 698c7bfa5f..20349dea04 100644 --- a/typegraph/node/src/typegraph.ts +++ b/typegraph/node/src/typegraph.ts @@ -1,18 +1,18 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import * as t from "./types"; -import { core } from "./gen/typegraph_core"; -import { caller, dirname, fromFileUrl } from "./deps"; -import { InjectionValue } from "./utils/type_utils"; +import * as t from "./types.js"; +import { core } from "./gen/typegraph_core.js"; +import { caller, dirname, fromFileUrl } from "./deps.js"; +import { InjectionValue } from "./utils/type_utils.js"; import { serializeFromParentInjection, serializeGenericInjection, serializeStaticInjection, -} from "./utils/injection_utils"; -import { Auth, Cors, Rate, wit_utils } from "./wit"; -import Policy from "./policy"; -import { getPolicyChain } from "./types"; +} from "./utils/injection_utils.js"; +import { Auth, Cors, Rate, wit_utils } from "./wit.js"; +import Policy from "./policy.js"; +import { getPolicyChain } from "./types.js"; type Exports = Record; diff --git a/typegraph/node/src/types.ts b/typegraph/node/src/types.ts index 83f22ed6d2..ad02516fe7 100644 --- a/typegraph/node/src/types.ts +++ b/typegraph/node/src/types.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { core, wit_utils } from "./wit"; +import { core, wit_utils } from "./wit.js"; import { PolicyPerEffect, PolicySpec as WitPolicySpec, @@ -14,20 +14,20 @@ import { TypeOptional, TypeString, TypeUnion, -} from "./gen/interfaces/metatype-typegraph-core"; -import { Reduce } from "./gen/interfaces/metatype-typegraph-utils"; -import { FuncParams } from "./gen/interfaces/metatype-typegraph-runtimes"; -import { Materializer } from "./runtimes/mod"; -import { mapValues } from "./deps"; -import Policy from "./policy"; -import { buildReduceData, serializeRecordValues } from "./utils/func_utils"; +} from "./gen/interfaces/metatype-typegraph-core.js"; +import { Reduce } from "./gen/interfaces/metatype-typegraph-utils.js"; +import { FuncParams } from "./gen/interfaces/metatype-typegraph-runtimes.js"; +import { Materializer } from "./runtimes/mod.js"; +import { mapValues } from "./deps.js"; +import Policy from "./policy.js"; +import { buildReduceData, serializeRecordValues } from "./utils/func_utils.js"; import { serializeFromParentInjection, serializeGenericInjection, serializeStaticInjection, -} from "./utils/injection_utils"; -import { InjectionValue } from "./utils/type_utils"; -import { InheritDef } from "./typegraph"; +} from "./utils/injection_utils.js"; +import { InjectionValue } from "./utils/type_utils.js"; +import { InheritDef } from "./typegraph.js"; export type PolicySpec = Policy | { none: Policy; diff --git a/typegraph/node/src/utils/func_utils.ts b/typegraph/node/src/utils/func_utils.ts index 93d24fe3ed..5326ceb66d 100644 --- a/typegraph/node/src/utils/func_utils.ts +++ b/typegraph/node/src/utils/func_utils.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { InheritDef } from "../typegraph"; -import { ReducePath } from "../gen/interfaces/metatype-typegraph-utils"; -import { serializeStaticInjection } from "./injection_utils"; +import { InheritDef } from "../typegraph.js"; +import { ReducePath } from "../gen/interfaces/metatype-typegraph-utils.js"; +import { serializeStaticInjection } from "./injection_utils.js"; export function stringifySymbol(symbol: symbol) { const name = symbol.toString().match(/\((.+)\)/)?.[1]; diff --git a/typegraph/node/src/utils/injection_utils.ts b/typegraph/node/src/utils/injection_utils.ts index cd9360af54..5b45ac8241 100644 --- a/typegraph/node/src/utils/injection_utils.ts +++ b/typegraph/node/src/utils/injection_utils.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { CREATE, DELETE, READ, UPDATE } from "../effects"; -import { InjectionSource, InjectionValue } from "./type_utils"; -import { stringifySymbol } from "./func_utils"; -import { genRef } from "./../typegraph"; +import { CREATE, DELETE, READ, UPDATE } from "../effects.js"; +import { InjectionSource, InjectionValue } from "./type_utils.js"; +import { stringifySymbol } from "./func_utils.js"; +import { genRef } from "./../typegraph.js"; export function serializeInjection( source: InjectionSource, diff --git a/typegraph/node/src/utils/type_utils.ts b/typegraph/node/src/utils/type_utils.ts index 286b10768f..9f23750447 100644 --- a/typegraph/node/src/utils/type_utils.ts +++ b/typegraph/node/src/utils/type_utils.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { PerEffect } from "../effects"; +import { PerEffect } from "../effects.js"; type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; diff --git a/typegraph/node/src/wit.ts b/typegraph/node/src/wit.ts index 5dc5c2e836..ea8c311509 100644 --- a/typegraph/node/src/wit.ts +++ b/typegraph/node/src/wit.ts @@ -1,22 +1,22 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { MetatypeTypegraphCore } from "./gen/interfaces/metatype-typegraph-core"; -import { MetatypeTypegraphRuntimes } from "./gen/interfaces/metatype-typegraph-runtimes"; -import { MetatypeTypegraphAws } from "./gen/interfaces/metatype-typegraph-aws"; -import { MetatypeTypegraphUtils } from "./gen/interfaces/metatype-typegraph-utils"; -import * as js from "./gen/typegraph_core"; +import { MetatypeTypegraphCore } from "./gen/interfaces/metatype-typegraph-core.js"; +import { MetatypeTypegraphRuntimes } from "./gen/interfaces/metatype-typegraph-runtimes.js"; +import { MetatypeTypegraphAws } from "./gen/interfaces/metatype-typegraph-aws.js"; +import { MetatypeTypegraphUtils } from "./gen/interfaces/metatype-typegraph-utils.js"; +import * as js from "./gen/typegraph_core.js"; export const core = js.core as typeof MetatypeTypegraphCore; export const runtimes = js.runtimes as typeof MetatypeTypegraphRuntimes; export const aws = js.aws as typeof MetatypeTypegraphAws; export const wit_utils = js.utils as typeof MetatypeTypegraphUtils; -export type { Cors, Rate } from "./gen/interfaces/metatype-typegraph-core"; +export type { Cors, Rate } from "./gen/interfaces/metatype-typegraph-core.js"; export type { Auth, AuthProtocol, AuthProtocolBasic, AuthProtocolJwt, AuthProtocolOauth2, -} from "./gen/interfaces/metatype-typegraph-utils"; +} from "./gen/interfaces/metatype-typegraph-utils.js"; diff --git a/typegraph/node/tsconfig.json b/typegraph/node/tsconfig.json index bbce877e73..4895110897 100644 --- a/typegraph/node/tsconfig.json +++ b/typegraph/node/tsconfig.json @@ -1,14 +1,10 @@ { "compilerOptions": { - "target": "ES2017", - "module": "CommonJS", - "allowJs": true, - "outDir": "build", - "rootDir": "src", - "strict": true, - "noImplicitAny": true, + "target": "ES2015", + "module": "NodeNext", + "moduleResolution": "Node16", "esModuleInterop": true, - "resolveJsonModule": true + "outDir": "dist" }, - "exclude": ["dev"] + "include": ["src"] } diff --git a/whiz.yaml b/whiz.yaml index 1ea1f631c9..3dc58363e0 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -57,7 +57,6 @@ typegraph: rm -rf typegraph/node/src/gen jco transpile $WASM_FILE -o typegraph/node/src/gen - deno run -A typegraph/node/dev/fix-declarations.ts rm -rf typegraph/python/typegraph/gen poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen @@ -106,7 +105,7 @@ setup: - website/package.json env: WASM_TOOLS_VERSION: "1.0.53" - JCO_VERSION: "0.12.1" + JCO_VERSION: "0.14.2" CARGO_INSTA_VERSION: "1.33.0" WASMEDGE_VERSION: "0.13.5" WASM_OPT_VERSION: "0.116.0" From 5ce69a588aa8d3892e06da4ec6faf756dfd1c993 Mon Sep 17 00:00:00 2001 From: afmika Date: Tue, 9 Jan 2024 17:44:03 +0300 Subject: [PATCH 08/23] feat(deno): enable > node@1.0.0 build /home/afmika/dev-env/metatype/typegraph/node > npx tsc && cp -R ./src/gen ./dist/ command --- typegraph/node/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/typegraph/node/package.json b/typegraph/node/package.json index 6fb914c1c2..ede0286a07 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -5,6 +5,7 @@ "main": "index.js", "type": "module", "scripts": { + "build": "npx tsc && cp -R ./src/gen ./dist/", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", From 6e8164e6524f0124842b30939298626b3fd2a899 Mon Sep 17 00:00:00 2001 From: afmika Date: Tue, 9 Jan 2024 18:20:04 +0300 Subject: [PATCH 09/23] fix(workflow): remove fix-declarations --- .github/workflows/release.yml | 1 - .github/workflows/tests.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79937b30b5..c923052795 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -127,7 +127,6 @@ jobs: npm install --global @bytecodealliance/jco@$JCO_VERSION jco transpile $WASM_FILE -o typegraph/node/src/gen - deno run -A typegraph/node/dev/fix-declarations.ts cd typegraph/node/src deno run -A ../../../dev/publish.ts diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ad2ebfc0a2..effcb992ce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -303,7 +303,6 @@ jobs: wasm-tools component new $WASM_FILE.opt -o $WASM_FILE rm -rf typegraph/node/src/gen jco transpile $WASM_FILE -o typegraph/node/src/gen - deno run -A typegraph/node/dev/fix-declarations.ts rm -rf typegraph/python/typegraph/gen poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen From 8ea9880e0d1389f9dde812c658fc2e11b6d868d7 Mon Sep 17 00:00:00 2001 From: afmika Date: Wed, 10 Jan 2024 16:44:50 +0300 Subject: [PATCH 10/23] fix(sdk/node): reimplement/import runtime deps --- .github/workflows/release.yml | 4 +++- .github/workflows/tests.yml | 3 +++ typegraph/node/package.json | 6 +---- typegraph/node/pnpm-lock.yaml | 23 ------------------ typegraph/node/src/deps.ts | 6 ----- typegraph/node/src/deps/caller.ts | 33 ++++++++++++++++++++++++++ typegraph/node/src/deps/fromFileUrl.ts | 31 ++++++++++++++++++++++++ typegraph/node/src/deps/mod.ts | 26 ++++++++++++++++++++ typegraph/node/src/typegraph.ts | 2 +- typegraph/node/src/types.ts | 2 +- whiz.yaml | 3 +++ 11 files changed, 102 insertions(+), 37 deletions(-) delete mode 100644 typegraph/node/src/deps.ts create mode 100644 typegraph/node/src/deps/caller.ts create mode 100644 typegraph/node/src/deps/fromFileUrl.ts create mode 100644 typegraph/node/src/deps/mod.ts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c923052795..10e7119d13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,7 +128,9 @@ jobs: npm install --global @bytecodealliance/jco@$JCO_VERSION jco transpile $WASM_FILE -o typegraph/node/src/gen - cd typegraph/node/src + cd typegraph/node + pnpm run build + cd dist deno run -A ../../../dev/publish.ts cd ../../.. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index effcb992ce..9d1bc252ae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -303,6 +303,9 @@ jobs: wasm-tools component new $WASM_FILE.opt -o $WASM_FILE rm -rf typegraph/node/src/gen jco transpile $WASM_FILE -o typegraph/node/src/gen + cd typegraph/node + pnpm run build + cd ../.. rm -rf typegraph/python/typegraph/gen poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen diff --git a/typegraph/node/package.json b/typegraph/node/package.json index ede0286a07..877978f09b 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -15,9 +15,5 @@ "@types/node": "^20.10.7", "typescript": "^5.3.3" }, - "dependencies": { - "@types/lodash": "^4.14.202", - "caller": "^1.1.0", - "lodash": "^4.17.21" - } + "dependencies": {} } diff --git a/typegraph/node/pnpm-lock.yaml b/typegraph/node/pnpm-lock.yaml index c11efbc7e8..493b47ca79 100644 --- a/typegraph/node/pnpm-lock.yaml +++ b/typegraph/node/pnpm-lock.yaml @@ -4,17 +4,6 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - '@types/lodash': - specifier: ^4.14.202 - version: 4.14.202 - caller: - specifier: ^1.1.0 - version: 1.1.0 - lodash: - specifier: ^4.17.21 - version: 4.17.21 - devDependencies: '@types/caller': specifier: ^1.0.2 @@ -32,24 +21,12 @@ packages: resolution: {integrity: sha512-NRXTeF8nnjSAHFxHKMnqpUWY1gTyAHLMhPTKeeHWTZdPilcFiCvlfvpVB8bOMfHbWYIxiPwZDwrYwMsRFkeh7A==} dev: true - /@types/lodash@4.14.202: - resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} - dev: false - /@types/node@20.10.7: resolution: {integrity: sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==} dependencies: undici-types: 5.26.5 dev: true - /caller@1.1.0: - resolution: {integrity: sha512-n+21IZC3j06YpCWaxmUy5AnVqhmCIM2bQtqQyy00HJlmStRt6kwDX5F9Z97pqwAB+G/tgSz6q/kUBbNyQzIubw==} - dev: false - - /lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: false - /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} diff --git a/typegraph/node/src/deps.ts b/typegraph/node/src/deps.ts deleted file mode 100644 index c88b18f1af..0000000000 --- a/typegraph/node/src/deps.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 -export { default as mapValues } from "lodash/mapValues.js"; -export { default as caller } from "caller"; -export { fileURLToPath as fromFileUrl } from "node:url"; -export { dirname } from "node:path"; diff --git a/typegraph/node/src/deps/caller.ts b/typegraph/node/src/deps/caller.ts new file mode 100644 index 0000000000..9d13856d27 --- /dev/null +++ b/typegraph/node/src/deps/caller.ts @@ -0,0 +1,33 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +// https://deno.land/x/caller@0.1.4/caller.ts?source + +export interface Bind { + cb?: (file: string) => string; +} + +export const up = 3; + +export default function caller(this: Bind | any, levelUp = up) { + const err = new Error(); + const stack = err.stack?.split("\n")[levelUp]; + if (stack) { + return getFile.bind(this)(stack); + } +} + +export function getFile(this: Bind | any, stack: string) { + stack = stack.substr(stack.indexOf("at ") + 3); + if (!stack.startsWith("file://")) { + stack = stack.substr(stack.lastIndexOf("(") + 1); + } + const path = stack.split(":"); + let file = `${path[0]}:${path[1]}`; + + if ((this as Bind)?.cb) { + const cb = (this as Bind).cb as any; + file = cb(file); + } + return file; +} diff --git a/typegraph/node/src/deps/fromFileUrl.ts b/typegraph/node/src/deps/fromFileUrl.ts new file mode 100644 index 0000000000..891316c7b5 --- /dev/null +++ b/typegraph/node/src/deps/fromFileUrl.ts @@ -0,0 +1,31 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +export default function fromFileUrl(path: string) { + // Examples: file://C:, file://D: + const isWin32 = /^file:\/\/\w\:/.test(path); + return isWin32 ? fromFileUrlWin32(path) : fromFileUrlPosix(path); +} + +// https://deno.land/std@0.177.0/path/win32.ts?s=fromFileUrl&source +function fromFileUrlWin32(url: string): string { + const urlObj = new URL(url); + let path = decodeURIComponent( + urlObj.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), + ).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); + if (urlObj.hostname !== "") { + // Note: The `URL` implementation guarantees that the drive letter and + // hostname are mutually exclusive. Otherwise it would not have been valid + // to append the hostname and path like this. + path = `\\\\${urlObj.hostname}${path}`; + } + return path; +} + +// https://deno.land/std@0.177.0/path/posix.ts?s=fromFileUrl&source +function fromFileUrlPosix(url: string): string { + const urlObject = new URL(url); + return decodeURIComponent( + urlObject.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), + ); +} diff --git a/typegraph/node/src/deps/mod.ts b/typegraph/node/src/deps/mod.ts new file mode 100644 index 0000000000..4039bac96e --- /dev/null +++ b/typegraph/node/src/deps/mod.ts @@ -0,0 +1,26 @@ +// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. +// SPDX-License-Identifier: MPL-2.0 + +export function mapValues( + object: Object, + fn: (value: any, key: string, object: Object) => any, +) { + const newEntries = Object + .entries(object) + .map(([k, v]) => [k, fn(v, k, object)]); + return Object.fromEntries(newEntries); +} + +export function dirname(path: string) { + const [unixIdx, winIdx] = ["/", "\\"].map((sep) => path.lastIndexOf(sep)); + if (unixIdx > 0) { + return path.substring(unixIdx + 1); + } + if (winIdx > 0) { + return path.substring(winIdx + 1); + } + return path; +} + +export { default as caller } from "./caller.js"; +export { default as fromFileUrl } from "./fromFileUrl.js"; diff --git a/typegraph/node/src/typegraph.ts b/typegraph/node/src/typegraph.ts index 20349dea04..eb958fe03b 100644 --- a/typegraph/node/src/typegraph.ts +++ b/typegraph/node/src/typegraph.ts @@ -3,7 +3,7 @@ import * as t from "./types.js"; import { core } from "./gen/typegraph_core.js"; -import { caller, dirname, fromFileUrl } from "./deps.js"; +import { caller, dirname, fromFileUrl } from "./deps/mod.js"; import { InjectionValue } from "./utils/type_utils.js"; import { serializeFromParentInjection, diff --git a/typegraph/node/src/types.ts b/typegraph/node/src/types.ts index ad02516fe7..63337ca1c2 100644 --- a/typegraph/node/src/types.ts +++ b/typegraph/node/src/types.ts @@ -18,7 +18,7 @@ import { import { Reduce } from "./gen/interfaces/metatype-typegraph-utils.js"; import { FuncParams } from "./gen/interfaces/metatype-typegraph-runtimes.js"; import { Materializer } from "./runtimes/mod.js"; -import { mapValues } from "./deps.js"; +import { mapValues } from "./deps/mod.js"; import Policy from "./policy.js"; import { buildReduceData, serializeRecordValues } from "./utils/func_utils.js"; import { diff --git a/whiz.yaml b/whiz.yaml index 3dc58363e0..175e0af06d 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -57,6 +57,9 @@ typegraph: rm -rf typegraph/node/src/gen jco transpile $WASM_FILE -o typegraph/node/src/gen + cd typegraph/node + pnpm run build + cd ../.. rm -rf typegraph/python/typegraph/gen poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen From c6c256577fad97e39bd5830b98077f32baaa61f6 Mon Sep 17 00:00:00 2001 From: afmika Date: Wed, 10 Jan 2024 17:19:00 +0300 Subject: [PATCH 11/23] feat(sdk/deno): emit type declaration for compiled js files --- typegate/import_map.json | 2 +- typegraph/node/tsconfig.json | 1 + whiz.yaml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/typegate/import_map.json b/typegate/import_map.json index d297be37f0..a3e7b01f83 100644 --- a/typegate/import_map.json +++ b/typegate/import_map.json @@ -23,7 +23,7 @@ "outdent": "https://deno.land/x/outdent@v0.8.0/mod.ts", "json-schema-faker": "npm:json-schema-faker@0.5.3", "ajv": "https://esm.sh/ajv@8.12.0?pin=v131", - "@typegraph/sdk/": "npm:../typegraph/node/src", + "@typegraph/sdk/": "../typegraph/node/dist/", "test-utils/": "./tests/utils/" } } diff --git a/typegraph/node/tsconfig.json b/typegraph/node/tsconfig.json index 4895110897..ae5a719582 100644 --- a/typegraph/node/tsconfig.json +++ b/typegraph/node/tsconfig.json @@ -4,6 +4,7 @@ "module": "NodeNext", "moduleResolution": "Node16", "esModuleInterop": true, + "declaration": true, "outDir": "dist" }, "include": ["src"] diff --git a/whiz.yaml b/whiz.yaml index 175e0af06d..bb6e3bc664 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -47,7 +47,7 @@ typegraph: watch: - "typegraph/core/src/**/*.rs" - "typegraph/core/wit/*.wit" - - "typegraph/deno/dev/fix-declarations.sh" + - "typegraph/node/src/**/*.ts" env: WASM_FILE: target/debug/typegraph_core.wasm command: | From 7006acb78c7e49aefeafd4083fd08db504c1d79d Mon Sep 17 00:00:00 2001 From: afmika Date: Wed, 10 Jan 2024 18:29:41 +0300 Subject: [PATCH 12/23] fix(deno/test): replace deno imports with js --- typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts | 8 ++++---- .../e2e/typegraph/typegraphs/deno/multiple_runtimes.ts | 8 ++++---- typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts | 6 +++--- typegate/tests/injection/injection.ts | 8 ++++---- typegate/tests/random/random.ts | 6 +++--- typegate/tests/rest/rest_custom_loader.ts | 6 +++--- typegate/tests/rest/rest_schema.ts | 6 +++--- .../tests/runtimes/graphql/typegraphs/deno/graphql.ts | 8 ++++---- typegate/tests/runtimes/prisma/normal_1_1.ts | 6 +++--- typegate/tests/runtimes/prisma/optional_1_n.ts | 6 +++--- typegate/tests/runtimes/python_wasi/python_wasi.ts | 6 +++--- typegate/tests/runtimes/s3/s3.ts | 6 +++--- typegate/tests/runtimes/temporal/temporal.ts | 6 +++--- typegate/tests/typecheck/reduce.ts | 6 +++--- 14 files changed, 46 insertions(+), 46 deletions(-) diff --git a/typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts b/typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts index df9f4d8da9..5abdef6e33 100644 --- a/typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts +++ b/typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; +import { Auth } from "@typegraph/sdk/params.js"; typegraph( { @@ -25,7 +25,7 @@ typegraph( maxAgeSec: 120, }, }, - (g) => { + (g: any) => { const deno = new DenoRuntime(); const pub = Policy.public(); diff --git a/typegate/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts b/typegate/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts index 6b7c84cc93..3381bad0a7 100644 --- a/typegate/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts +++ b/typegate/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts @@ -1,11 +1,11 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python.js"; -typegraph("test-multiple-runtimes", (g) => { +typegraph("test-multiple-runtimes", (g: any) => { const pub = Policy.public(); const deno = new DenoRuntime(); const python = new PythonRuntime(); diff --git a/typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts b/typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts index e1a9f4870a..e637f792f6 100644 --- a/typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts +++ b/typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; const a = t.integer(); @@ -10,7 +10,7 @@ const s1 = t.struct({ a, b: t.integer({ min: 12 }) }); const b = t.integer({ min: 12, max: 43 }); -typegraph("test-types", (g) => { +typegraph("test-types", (g: any) => { const deno = new DenoRuntime(); const pub = Policy.public(); const internal = Policy.internal(); diff --git a/typegate/tests/injection/injection.ts b/typegate/tests/injection/injection.ts index 1a1e39902b..7592ff4cf9 100644 --- a/typegate/tests/injection/injection.ts +++ b/typegate/tests/injection/injection.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { CREATE, DELETE, READ, UPDATE } from "@typegraph/sdk/effects.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { CREATE, DELETE, READ, UPDATE } from "@typegraph/sdk/effects.js"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; const tpe = t.struct({ "a": t.integer({}, { name: "A" }), @@ -26,7 +26,7 @@ const tpe = t.struct({ "date": t.datetime().inject("now"), }); -typegraph("injection", (g) => { +typegraph("injection", (g: any) => { const deno = new DenoRuntime(); const pub = Policy.public(); diff --git a/typegate/tests/random/random.ts b/typegate/tests/random/random.ts index 179dd9e766..219a655139 100644 --- a/typegate/tests/random/random.ts +++ b/typegate/tests/random/random.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random.js"; -typegraph("random", (g) => { +typegraph("random", (g: any) => { const random = new RandomRuntime({ seed: 1, reset: "" }); const pub = Policy.public(); diff --git a/typegate/tests/rest/rest_custom_loader.ts b/typegate/tests/rest/rest_custom_loader.ts index 7a21ffc7bd..6da93b54e6 100644 --- a/typegate/tests/rest/rest_custom_loader.ts +++ b/typegate/tests/rest/rest_custom_loader.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; import { endpoints } from "./custom/custom_loader.ts"; const user = t.struct({ @@ -22,7 +22,7 @@ const complexType = t.struct({ f: t.float({ enumeration: [1.0, 2.5] }), }, { name: "ComplexType" }); -typegraph("rest", (g) => { +typegraph("rest", (g: any) => { const deno = new DenoRuntime(); const pub = Policy.public(); diff --git a/typegate/tests/rest/rest_schema.ts b/typegate/tests/rest/rest_schema.ts index 960cca8b20..28e52a2a09 100644 --- a/typegate/tests/rest/rest_schema.ts +++ b/typegate/tests/rest/rest_schema.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { fx, Policy, t, typegraph } from "../../../typegraph/deno/src/mod.ts"; -import { DenoRuntime } from "../../../typegraph/deno/src/runtimes/deno.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; -typegraph("rest_schema", (g) => { +typegraph("rest_schema", (g: any) => { const deno = new DenoRuntime(); const pub = Policy.public(); diff --git a/typegate/tests/runtimes/graphql/typegraphs/deno/graphql.ts b/typegate/tests/runtimes/graphql/typegraphs/deno/graphql.ts index 8fd14cf258..d582a53e0b 100644 --- a/typegate/tests/runtimes/graphql/typegraphs/deno/graphql.ts +++ b/typegate/tests/runtimes/graphql/typegraphs/deno/graphql.ts @@ -1,16 +1,16 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql.ts"; -import * as effects from "@typegraph/sdk/effects.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql.js"; +import * as effects from "@typegraph/sdk/effects.js"; const user = t.struct({ id: t.integer(), // TODO more fields with more types }, { name: "User" }); -typegraph("graphql", (g) => { +typegraph("graphql", (g: any) => { const graphql = new GraphQLRuntime("https://example.com/api/graphql"); const pub = Policy.public(); diff --git a/typegate/tests/runtimes/prisma/normal_1_1.ts b/typegate/tests/runtimes/prisma/normal_1_1.ts index 03b8c2578e..688ce512d8 100644 --- a/typegate/tests/runtimes/prisma/normal_1_1.ts +++ b/typegate/tests/runtimes/prisma/normal_1_1.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.js"; -typegraph("prisma_normal", (g) => { +typegraph("prisma_normal", (g: any) => { const db = new PrismaRuntime("prisma", "POSTGRES"); const pub = Policy.public(); diff --git a/typegate/tests/runtimes/prisma/optional_1_n.ts b/typegate/tests/runtimes/prisma/optional_1_n.ts index cc3591d5d9..6610da9059 100644 --- a/typegate/tests/runtimes/prisma/optional_1_n.ts +++ b/typegate/tests/runtimes/prisma/optional_1_n.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.js"; -typegraph("prisma_opt_1", (g) => { +typegraph("prisma_opt_1", (g: any) => { const db = new PrismaRuntime("prisma", "POSTGRES"); const pub = Policy.public(); diff --git a/typegate/tests/runtimes/python_wasi/python_wasi.ts b/typegate/tests/runtimes/python_wasi/python_wasi.ts index bb464832e4..46098b8614 100644 --- a/typegate/tests/runtimes/python_wasi/python_wasi.ts +++ b/typegate/tests/runtimes/python_wasi/python_wasi.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python.js"; import outdent from "outdent"; const tpe = t.struct({ @@ -10,7 +10,7 @@ const tpe = t.struct({ "b": t.list(t.either([t.integer(), t.string()])), }); -typegraph("python_wasi", (g) => { +typegraph("python_wasi", (g: any) => { const python = new PythonRuntime(); const pub = Policy.public(); diff --git a/typegate/tests/runtimes/s3/s3.ts b/typegate/tests/runtimes/s3/s3.ts index 189d6e65d5..bc011a4baa 100644 --- a/typegate/tests/runtimes/s3/s3.ts +++ b/typegate/tests/runtimes/s3/s3.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { S3Runtime } from "@typegraph/sdk/providers/aws.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { S3Runtime } from "@typegraph/sdk/providers/aws.js"; -typegraph("s3-test", (g) => { +typegraph("s3-test", (g: any) => { const pub = Policy.public(); const s3 = new S3Runtime({ diff --git a/typegate/tests/runtimes/temporal/temporal.ts b/typegate/tests/runtimes/temporal/temporal.ts index 0b363e4625..5357f010bc 100644 --- a/typegate/tests/runtimes/temporal/temporal.ts +++ b/typegate/tests/runtimes/temporal/temporal.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { TemporalRuntime } from "@typegraph/sdk/providers/temporal.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { TemporalRuntime } from "@typegraph/sdk/providers/temporal.js"; -typegraph("temporal", (g) => { +typegraph("temporal", (g: any) => { const pub = Policy.public(); const temporal = new TemporalRuntime("", ""); const arg = t.struct({ some_field: t.string() }); diff --git a/typegate/tests/typecheck/reduce.ts b/typegate/tests/typecheck/reduce.ts index ef781996e7..e7554e44c3 100644 --- a/typegate/tests/typecheck/reduce.ts +++ b/typegate/tests/typecheck/reduce.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; const student = t.struct({ id: t.integer(), @@ -32,7 +32,7 @@ const grades = t.struct({ const tpe = t.struct({ student, grades: grades.optional() }); -typegraph("test-reduce-deno", (g) => { +typegraph("test-reduce-deno", (g: any) => { const deno = new DenoRuntime(); const pub = Policy.public(); const identityStudent = deno.func( From dcc3ac9fbc1fb0696172fd70b67773613ba58216 Mon Sep 17 00:00:00 2001 From: afmika Date: Wed, 10 Jan 2024 18:31:48 +0300 Subject: [PATCH 13/23] test(e2e): update snapshot --- .../tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typegate/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap b/typegate/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap index 63f70d84bb..feca5f4970 100644 --- a/typegate/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap +++ b/typegate/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap @@ -1569,7 +1569,7 @@ snapshot[`typegraphs creation 6`] = ` "idempotent": true }, "data": { - "code": "file:scripts/three.ts;base64:H4sIAAAAAAAA/+0Y7W7bRsy//RSE/lTqFMWSk2BQ12JdW6wFOjRoM2BAYBhn6eQIlXSadJptGH6Tvc1ebLwPSWc7X8OQFG1NJNaJx+ORPJJHMWJ5mdGlx+vBg8EI4ezkRD4Rdp/j8cnpwB+dnPmjYBSMBd73Ax/pB48ATc1JBTD4v7Cr3FcCx8fwipWrKp1fcfiNcsJXJYUP//ztQpZGtKhpDE0R0wr4FYU3Gal5GsF7NQWBN/KGyOLT+es/jjTy6F1MC54mKa3CdsEREg6HaV6yisMakqUL5wz5r1zg+IdbzitSXsEGkorlYP3coY7r+PNxzmJ0UOtZz+E1LdjHBrfJ6U2LKjVdH6M4bGf5y4bfuFlJKpLXasGwm7KHAGv8ByhITkOwOK35UaSi50iQ1ZYr52saVZTXIVxaauhbLuhh0A/H1kTRV4QjP8UbYJEWMVt8olEIZyN3C/k+zVMegh/82OL/bGi10ugOmbGIZG+WEa1RhtMWG7GC0yU3z8ZqalppoTfqEbGq7mUhWcYWryoq15AMZxL8pa45/ZYSdA6h7WQLj650xWJphV/fXFjbkx/Q3dJCzD3tZ+iyZDW9hl9Oli/nVJrED0aGvPLHnjvw/IWWGbWsOYgDh+dQ0IXpJ7bzzKApmxmSKCf08AWfgsCgqFlOL0QwPAfu1bxqIm63lmEFHhn3srTmNvdSNO2cVrbjomvlQrExyoZj7SoXC2bBxmn14QsmFrOSp6wgmT33KprY1ie9n+U4rY49i24S+WxJqT3wJkHJFBFpMQ/VFI7sTg4yTTJGuJiSA1sL77uQNxlPke+HJITAEJ0UU1o0uVginlP70kJTCKdGpayJSaeN0tG3RlqDwFD0etQejxl3CyZSV71WapakKPIaPtMVKv8XyRqhect9s6tCt0mrx84W3ilu4p1OtlYqS4WGzUBu1PNxDPoCw53GxqHTFBNiZV8adjW0dCaO05/wDpfpAtdO8dDDzslMA+ckzaSFxcC+xhle9Wdu+MPcI5jVbJHavBmp0Z8vZZL6RYwFFs9Hh4BJepWTKDg9syXtW3yRpE7PVcVl51GCLJQh5iVNEdnGqXVSuR2SezPGMkqK3gZgnLRYFQuVbBnEeA7Uco1ZmiRUnFGyxBghscmk8wbHE+ZUkWxjJLcGk7oiFT4HB7gJ2kifttflA1SCd9R//ulor/4bj4PgUP89AnyR+u+L1n7nK6xMivsyKCX1XjWoyr82eI5acrwJjXrk1krjPsWKZiBF0DRb0uuKZSdHkxjvKS23UO49yWcxaRO1cd1ZSVrV3DIuPFWdsiK2rr8Fe0KNWLcJPJObwDKE5eUTyffJBH4QL4rhk0l3gd+QsLUxV9dcLg8ks72WzFxQ6zfy4CQKnmrc7UKLO2bzdd8vdVSlJa+P+VVF6QN1Ae7I/5j5x7v5Pxif+If8/wjwqPkfi+MqIRGFC+Ft74qy4TJRzkLAgn1GK5H0SP+yGQ5FZsO0LbKBKKZB+qn8GAfiwgw2ocFMxOR6E8oIl5+7IXzEMK7in1SN7qIqnwu2KF7IwlB96RJzc0OSjZzFL/WmKrrdhEyDbwnqVFTtD9r+uyv+g5F/ttf/G4nn4BHgEP/fR/03VMUUkV2S7jO9w9f+VvtEhvt220L1RkQ3RH1zq3WzLX4dlSu6ViGcjBXtbuGo+4X7xeI9qsHby0mZY7Hn0NO0GF0sKjLR+tvvF6WxqbIumLCyxDyqm1Tn+GKp2sdoSPwuGoltJ0KLiYT33ED0Ihj6ipBpl7Pcr+W8U+fKJlxfK9bYSZr1baStxoIftH3OrTquNY0WRDbmeoZSHqnIPlcxJznjkQulxIlLm26ca3eSXEs1tvBlJXpmSjbZU+2afvJ+01Ioj2+LYNRvb9TZSS5DnhgtTSYQu3XdN1/IHuAABzjAAf4T/AtWr19zACAAAA==" + "code": "file:scripts/three.ts;base64:H4sIAAAAAAAA/+0Y7W7bNtC//RQH/anUKYolJ8GgrsW6tlgLdGjQZsCAwDBoiXK0SqImUrMNw2+yt9mL7Ujqg1aSNsOQFO18SCzqeDzeHe+Op4tYXmZ07Qk+ujeYIJydnKgnwvA5nZ4GI39ycuZPgkkwlXjfD/xgNBk9ANRckApg9F9hqNxXAsfH8IKVmypdXgn4hQoiNiWFd3//5UKWRrTgNIa6iGkF4orCq4xwkUbwVk9B4E28MbL4cP7yt6MGefQmpoVIk5RWYbvgCAnH4zQvWSVgC8nahXOG/DcuCPzDLZcVKa9gB0nFcrB+7FDHPP54nLPY+51bT3oOL2nB3te4TU5vW1TpaX6M4rDB8ue1uHWzklQk53rBuJuyxwBb/AcoSE5DsATl4ijS0XMkybjlqnlOo4oKHsKlpYe+5UIzDPrh1Jpp+ooI5Kd5A6zSImarDzQK4Wzi7iHfpnkqQvCD71v8HzWtNg26Q2YsItmrdUQ5ynDaYiNWCLoW5tlYNadVI/ROPyJW8V4WkmVs9aKiag3JcCbBX+qa068pQeeQ2s728OhKVyxWVvj51YW1P/kO3S0t5NzjfoauS8bpDfxysn6+pMokfjAx5FU/9jIEUmwcePqsERxV5QLkqcNTKOjKdBbbeWLQlPUCSbQneviCT0lgUHCW0wsZEU9BeFxUdSTs1jyswHMTXpZyYQsvRfsuaWU7LvpXLrWbooA4bvzlYsUs2DmtUmLF5GJWipQVJLOXXkUT2/rQ7Gc5Tqtoz6KbRD57UjZueJugZI6ItFiGegpHdicHmScZI0JOqYHdCO+7kNeZSJHvuySEwBCdFHNa1LlcIp9z+9JCU0jPRqWsmUnXGKWjb420BYmh6PqoPZ417hbMlK7NWqVZkqLIW/hIN6j8nySrpeYt991QhW6TVo/BFt4pbuKdzvZWakuFhs1AbdTzcQz6AmOexsah0xSzYmVfGnY1tHRmjtOf8IDLfIVr53joYedkpoFzkmbKwnJg3+AML/ozN/xh6RFMbbbMb96CcPTnS5WpfpJjicXzaULAJL3KSRScntmK9jW+KFKn56qDs/MoSRaqEPOSuohs49Q6qdwOKbwFYxklRW8DME5aroqlSrYKYjwHarnGLE0SKs8oWWOMkNhk0nmD40lz6ki2MZJbgyldkQqfowPcAG2Qz9vr8h4qwc/Uf/6pf63+m06DyaH+ewD4IvXfF639zjdYmRR3ZVAq6mvVoC7/2uA5asnxEhzWI5+sNO5SrDQMlBwNzZ4KTcUyyNEkxnuqEV5q+Jbki5i0idq47qwkrbiwjAtPl6isiK2bb8GesEFs2wSeqU1gHcL68pHi+2gG38kXzfDRrLvAb0nYjUU3N1wu9ySzvVXMXNDrd+rgFAoeN7hPCy3vmN1Xe7/wqEpLwY/FVUXpPXUBPpP/MfNPh/k/mJ74h/z/APCg+R/r4iohEYUL6W1virIWKkcuQsBafUErme9I/7Ibj2VSw7QtE4Gso0H5qfoYB+LCAnahwUyG43YXquBWn7shvMcIruIfdHnuoiofC7YqnqmaUH/pEnNzQ5KdmsUv9boqut2kTKNvCXgqC/Z7bf99Lv5l0F/r/02Cs0P8PwD8b+q/sa6jiGqQdF/oHZ77e50TFe77HQvdFpGNEP25rdct9vh1VK7sWoVwMtW0w8Kx6RfeUizeoRr8dDmpEi32HHqaFtMUi5pM9v+u94vS2NS7KZiwssRk2jSpzvHF0rWP0ZD4VXYT205EIyYS3nED2Ytg6DBSpiFntV/LeVDnqiZcXyty7CQt+jbSXmPBD9pm514d15qmEUQ15nqGSh6lyHWuck5xxnOXSsljVzbdOTfupLiWemzhy0b2zLRsqrHaNf3UJddIod2+LYJRv2ujzk5qGfLEkKkziRgWd99yIXuAAxzgAAf4V/APx+8iZQAgAAA=" } }, { From 89c245af4cc9deec3986741c6fdb886f548971a8 Mon Sep 17 00:00:00 2001 From: afmika Date: Wed, 10 Jan 2024 18:56:49 +0300 Subject: [PATCH 14/23] fix(node): replace npx with pnpm exec --- .github/workflows/tests.yml | 1 + typegraph/node/package.json | 2 +- whiz.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9d1bc252ae..8664d5503f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -302,6 +302,7 @@ jobs: wasm-opt -Oz target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE.opt wasm-tools component new $WASM_FILE.opt -o $WASM_FILE rm -rf typegraph/node/src/gen + rm -rf typegraph/node/dist jco transpile $WASM_FILE -o typegraph/node/src/gen cd typegraph/node pnpm run build diff --git a/typegraph/node/package.json b/typegraph/node/package.json index 877978f09b..fea150c1bd 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -5,7 +5,7 @@ "main": "index.js", "type": "module", "scripts": { - "build": "npx tsc && cp -R ./src/gen ./dist/", + "build": "pnpm exec tsc && cp -R ./src/gen ./dist/", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", diff --git a/whiz.yaml b/whiz.yaml index bb6e3bc664..26e03d3304 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -56,6 +56,7 @@ typegraph: wasm-tools component new target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE rm -rf typegraph/node/src/gen + rm -rf typegraph/node/dist jco transpile $WASM_FILE -o typegraph/node/src/gen cd typegraph/node pnpm run build From 113a58e8fd431db0da4689ea6d290ebb6c94d280 Mon Sep 17 00:00:00 2001 From: afmika Date: Wed, 10 Jan 2024 19:24:38 +0300 Subject: [PATCH 15/23] fix(ci): remove unused deps + move typescript to non-dev, bump target to ES2019 --- typegraph/node/package.json | 7 ++----- typegraph/node/pnpm-lock.yaml | 24 ++---------------------- typegraph/node/tsconfig.json | 2 +- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/typegraph/node/package.json b/typegraph/node/package.json index fea150c1bd..688e9e2d0d 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -10,10 +10,7 @@ }, "author": "", "license": "MPL", - "devDependencies": { - "@types/caller": "^1.0.2", - "@types/node": "^20.10.7", + "dependencies": { "typescript": "^5.3.3" - }, - "dependencies": {} + } } diff --git a/typegraph/node/pnpm-lock.yaml b/typegraph/node/pnpm-lock.yaml index 493b47ca79..6813016472 100644 --- a/typegraph/node/pnpm-lock.yaml +++ b/typegraph/node/pnpm-lock.yaml @@ -4,35 +4,15 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -devDependencies: - '@types/caller': - specifier: ^1.0.2 - version: 1.0.2 - '@types/node': - specifier: ^20.10.7 - version: 20.10.7 +dependencies: typescript: specifier: ^5.3.3 version: 5.3.3 packages: - /@types/caller@1.0.2: - resolution: {integrity: sha512-NRXTeF8nnjSAHFxHKMnqpUWY1gTyAHLMhPTKeeHWTZdPilcFiCvlfvpVB8bOMfHbWYIxiPwZDwrYwMsRFkeh7A==} - dev: true - - /@types/node@20.10.7: - resolution: {integrity: sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==} - dependencies: - undici-types: 5.26.5 - dev: true - /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true - dev: true - - /undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - dev: true + dev: false diff --git a/typegraph/node/tsconfig.json b/typegraph/node/tsconfig.json index ae5a719582..731b802d22 100644 --- a/typegraph/node/tsconfig.json +++ b/typegraph/node/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2015", + "target": "ES2019", "module": "NodeNext", "moduleResolution": "Node16", "esModuleInterop": true, From 3b007124f7c0cedbffac969253f89a1fe0fa6624 Mon Sep 17 00:00:00 2001 From: afmika Date: Thu, 11 Jan 2024 11:29:46 +0300 Subject: [PATCH 16/23] fix(ci): missing pnpm install --- .github/workflows/release.yml | 1 + .github/workflows/tests.yml | 4 ++-- typegraph/node/package.json | 2 +- whiz.yaml | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10e7119d13..f42ca19918 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,6 +129,7 @@ jobs: jco transpile $WASM_FILE -o typegraph/node/src/gen cd typegraph/node + pnpm install pnpm run build cd dist deno run -A ../../../dev/publish.ts diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8664d5503f..7a30095293 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -301,10 +301,10 @@ jobs: mkdir -p $(dirname $WASM_FILE) wasm-opt -Oz target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE.opt wasm-tools component new $WASM_FILE.opt -o $WASM_FILE - rm -rf typegraph/node/src/gen - rm -rf typegraph/node/dist + rm -rf typegraph/node/src/gen typegraph/node/dist jco transpile $WASM_FILE -o typegraph/node/src/gen cd typegraph/node + pnpm install pnpm run build cd ../.. rm -rf typegraph/python/typegraph/gen diff --git a/typegraph/node/package.json b/typegraph/node/package.json index 688e9e2d0d..30f206d555 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -1,5 +1,5 @@ { - "name": "node", + "name": "@typegraph/sdk", "version": "1.0.0", "description": "", "main": "index.js", diff --git a/whiz.yaml b/whiz.yaml index 26e03d3304..f66c0e2008 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -126,3 +126,6 @@ setup: cd website pnpm install cd .. + cd typegraph/node + pnpm install + cd ../.. From 97782a97a79e21416b868c812567820c0c03de6f Mon Sep 17 00:00:00 2001 From: afmika Date: Thu, 11 Jan 2024 14:54:01 +0300 Subject: [PATCH 17/23] chore(node): add licenses, rename file to _import --- typegraph/node/src/deps/_import.ts | 98 ++++++++++++++++++++++++++ typegraph/node/src/deps/caller.ts | 33 --------- typegraph/node/src/deps/fromFileUrl.ts | 31 -------- typegraph/node/src/deps/mod.ts | 10 ++- whiz.yaml | 3 +- 5 files changed, 107 insertions(+), 68 deletions(-) create mode 100644 typegraph/node/src/deps/_import.ts delete mode 100644 typegraph/node/src/deps/caller.ts delete mode 100644 typegraph/node/src/deps/fromFileUrl.ts diff --git a/typegraph/node/src/deps/_import.ts b/typegraph/node/src/deps/_import.ts new file mode 100644 index 0000000000..5ab1288d36 --- /dev/null +++ b/typegraph/node/src/deps/_import.ts @@ -0,0 +1,98 @@ +// no-auto-license-header + +/* +The MIT License (MIT) + +Copyright (c) 2020 Alexandre Piel + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +export interface Bind { + cb?: (file: string) => string; +} + +export const up = 3; + +export function caller(this: Bind | any, levelUp = up) { + const err = new Error(); + const stack = err.stack?.split("\n")[levelUp]; + if (stack) { + return getFile.bind(this)(stack); + } +} + +export function getFile(this: Bind | any, stack: string) { + stack = stack.substr(stack.indexOf("at ") + 3); + if (!stack.startsWith("file://")) { + stack = stack.substr(stack.lastIndexOf("(") + 1); + } + const path = stack.split(":"); + let file = `${path[0]}:${path[1]}`; + + if ((this as Bind)?.cb) { + const cb = (this as Bind).cb as any; + file = cb(file); + } + return file; +} + +/* +MIT License + +Copyright 2018-2022 the Deno authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ +export function fromFileUrlWin32(url: string): string { + const urlObj = new URL(url); + let path = decodeURIComponent( + urlObj.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), + ).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); + if (urlObj.hostname !== "") { + // Note: The `URL` implementation guarantees that the drive letter and + // hostname are mutually exclusive. Otherwise it would not have been valid + // to append the hostname and path like this. + path = `\\\\${urlObj.hostname}${path}`; + } + return path; +} + +export function fromFileUrlPosix(url: string): string { + const urlObject = new URL(url); + return decodeURIComponent( + urlObject.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), + ); +} diff --git a/typegraph/node/src/deps/caller.ts b/typegraph/node/src/deps/caller.ts deleted file mode 100644 index 9d13856d27..0000000000 --- a/typegraph/node/src/deps/caller.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 - -// https://deno.land/x/caller@0.1.4/caller.ts?source - -export interface Bind { - cb?: (file: string) => string; -} - -export const up = 3; - -export default function caller(this: Bind | any, levelUp = up) { - const err = new Error(); - const stack = err.stack?.split("\n")[levelUp]; - if (stack) { - return getFile.bind(this)(stack); - } -} - -export function getFile(this: Bind | any, stack: string) { - stack = stack.substr(stack.indexOf("at ") + 3); - if (!stack.startsWith("file://")) { - stack = stack.substr(stack.lastIndexOf("(") + 1); - } - const path = stack.split(":"); - let file = `${path[0]}:${path[1]}`; - - if ((this as Bind)?.cb) { - const cb = (this as Bind).cb as any; - file = cb(file); - } - return file; -} diff --git a/typegraph/node/src/deps/fromFileUrl.ts b/typegraph/node/src/deps/fromFileUrl.ts deleted file mode 100644 index 891316c7b5..0000000000 --- a/typegraph/node/src/deps/fromFileUrl.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. -// SPDX-License-Identifier: MPL-2.0 - -export default function fromFileUrl(path: string) { - // Examples: file://C:, file://D: - const isWin32 = /^file:\/\/\w\:/.test(path); - return isWin32 ? fromFileUrlWin32(path) : fromFileUrlPosix(path); -} - -// https://deno.land/std@0.177.0/path/win32.ts?s=fromFileUrl&source -function fromFileUrlWin32(url: string): string { - const urlObj = new URL(url); - let path = decodeURIComponent( - urlObj.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), - ).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); - if (urlObj.hostname !== "") { - // Note: The `URL` implementation guarantees that the drive letter and - // hostname are mutually exclusive. Otherwise it would not have been valid - // to append the hostname and path like this. - path = `\\\\${urlObj.hostname}${path}`; - } - return path; -} - -// https://deno.land/std@0.177.0/path/posix.ts?s=fromFileUrl&source -function fromFileUrlPosix(url: string): string { - const urlObject = new URL(url); - return decodeURIComponent( - urlObject.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), - ); -} diff --git a/typegraph/node/src/deps/mod.ts b/typegraph/node/src/deps/mod.ts index 4039bac96e..3877211d25 100644 --- a/typegraph/node/src/deps/mod.ts +++ b/typegraph/node/src/deps/mod.ts @@ -1,5 +1,6 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 +export { caller } from "./_import.js"; export function mapValues( object: Object, @@ -22,5 +23,10 @@ export function dirname(path: string) { return path; } -export { default as caller } from "./caller.js"; -export { default as fromFileUrl } from "./fromFileUrl.js"; +import { fromFileUrlPosix, fromFileUrlWin32 } from "./_import.js"; + +export function fromFileUrl(path: string) { + // Examples: file://C:, file://D: + const isWin32 = /^file:\/\/\w\:/.test(path); + return isWin32 ? fromFileUrlWin32(path) : fromFileUrlPosix(path); +} diff --git a/whiz.yaml b/whiz.yaml index f66c0e2008..64d34b999b 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -55,8 +55,7 @@ typegraph: cargo build -p typegraph_core --target wasm32-unknown-unknown --target-dir target/wasm wasm-tools component new target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE - rm -rf typegraph/node/src/gen - rm -rf typegraph/node/dist + rm -rf typegraph/node/src/gen typegraph/node/dist jco transpile $WASM_FILE -o typegraph/node/src/gen cd typegraph/node pnpm run build From df66c500f405ee1b7c3b970c0210d1797449edcc Mon Sep 17 00:00:00 2001 From: afmika Date: Thu, 11 Jan 2024 15:33:27 +0300 Subject: [PATCH 18/23] fix(lock.yml): always sync package.json --- Cargo.lock | 51 +++++++++++++--------------------- dev/lock.yml | 3 ++ typegraph/node/package.json | 14 ++++++++-- typegraph/node/src/deps/mod.ts | 8 +----- 4 files changed, 35 insertions(+), 41 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 16d8b6ef6b..d82503907d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -454,7 +454,7 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", @@ -478,9 +478,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.3", "event-listener-strategy", @@ -943,7 +943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel", - "async-lock 3.2.0", + "async-lock 3.3.0", "async-task", "fastrand 2.0.1", "futures-io", @@ -954,9 +954,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" dependencies = [ "borsh-derive", "cfg_aliases", @@ -964,9 +964,9 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" dependencies = [ "once_cell", "proc-macro-crate", @@ -4386,9 +4386,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" dependencies = [ "bytes", "fnv", @@ -7275,11 +7275,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" dependencies = [ - "toml_edit 0.20.7", + "toml_edit", ] [[package]] @@ -9092,9 +9092,9 @@ dependencies = [ [[package]] name = "simd-json" -version = "0.13.6" +version = "0.13.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c58001aca67fc467da571f35e7e1dc9c094e91b099cc54bd3cead2962db2432" +checksum = "0a9511d2aa0b26dce65ea3860321cd680a8daeb6808b04f1e94429e0389ad952" dependencies = [ "getrandom 0.2.12", "halfbrown", @@ -10270,9 +10270,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -10634,7 +10634,7 @@ dependencies = [ "serde 1.0.195", "serde_spanned", "toml_datetime", - "toml_edit 0.21.0", + "toml_edit", ] [[package]] @@ -10646,17 +10646,6 @@ dependencies = [ "serde 1.0.195", ] -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - [[package]] name = "toml_edit" version = "0.21.0" @@ -12128,9 +12117,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.33" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7520bbdec7211caa7c4e682eb1fbe07abe20cee6756b6e00f537c82c11816aa" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] diff --git a/dev/lock.yml b/dev/lock.yml index 7f3904ab96..77f1c1ec87 100644 --- a/dev/lock.yml +++ b/dev/lock.yml @@ -25,6 +25,9 @@ dev: '([\s-]+uses:\s+metatypedev/setup-ghjk@).+()': GHJK_ACTION_VERSION typegraph/python/typegraph/__init__.py: (version = ").+("): METATYPE_VERSION + typegraph/node/package.json: + '(\s*"version"\s*:\s*").+(",?)': METATYPE_VERSION + '(\s*"description"\s*:\s*").*(",?)': TAGLINE typegraph/python/pyproject.toml: (description = ").+("): TAGLINE '**/Cargo.toml': diff --git a/typegraph/node/package.json b/typegraph/node/package.json index 30f206d555..5bd544bb15 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -1,15 +1,23 @@ { "name": "@typegraph/sdk", - "version": "1.0.0", - "description": "", + "version": "0.3.1", + "description": "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are.", "main": "index.js", "type": "module", "scripts": { "build": "pnpm exec tsc && cp -R ./src/gen ./dist/", "test": "echo \"Error: no test specified\" && exit 1" }, + "repository": { + "type": "git", + "url": "git+https://github.com/metatypedev/metatype.git" + }, + "bugs": { + "url": "https://github.com/metatypedev/metatype/issues" + }, + "keywords": [], "author": "", - "license": "MPL", + "license": "MPL-2.0", "dependencies": { "typescript": "^5.3.3" } diff --git a/typegraph/node/src/deps/mod.ts b/typegraph/node/src/deps/mod.ts index 3877211d25..83d5178973 100644 --- a/typegraph/node/src/deps/mod.ts +++ b/typegraph/node/src/deps/mod.ts @@ -14,13 +14,7 @@ export function mapValues( export function dirname(path: string) { const [unixIdx, winIdx] = ["/", "\\"].map((sep) => path.lastIndexOf(sep)); - if (unixIdx > 0) { - return path.substring(unixIdx + 1); - } - if (winIdx > 0) { - return path.substring(winIdx + 1); - } - return path; + return winIdx > 0 ? path.substring(winIdx + 1) : path.substring(unixIdx + 1); } import { fromFileUrlPosix, fromFileUrlWin32 } from "./_import.js"; From c6e30ab738837e144c6ee8165ba9a5285b8f9f32 Mon Sep 17 00:00:00 2001 From: afmika Date: Thu, 11 Jan 2024 16:10:09 +0300 Subject: [PATCH 19/23] fix(ci/node): directly use pnpm publish instead --- .github/workflows/release.yml | 3 +- dev/publish.ts | 75 ---------------------------------- typegraph/node/package.json | 2 +- typegraph/node/src/deps/mod.ts | 4 +- 4 files changed, 6 insertions(+), 78 deletions(-) delete mode 100644 dev/publish.ts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b19152342..33ef2c73b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -127,7 +127,8 @@ jobs: pnpm install pnpm run build cd dist - deno run -A ../../../dev/publish.ts + cp ../package.json ./ + pnpm publish cd ../../.. cd typegraph/node diff --git a/dev/publish.ts b/dev/publish.ts deleted file mode 100644 index 511a6e0ca9..0000000000 --- a/dev/publish.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Metatype OÜ, licensed under the Elastic License 2.0. -// SPDX-License-Identifier: Elastic-2.0 - -import { dnt, expandGlobSync, resolve } from "./deps.ts"; -import { getLockfile, projectDir } from "./utils.ts"; - -// Direct node users need to use module -// module = Node16 or moduleResolution = Node16 inside tsconfig.json seems to be enough -// https://github.com/denoland/dnt/issues/205 - -const lockfile = await getLockfile(); - -const srcDir = resolve(projectDir, "./typegraph/deno/src"); -const outDir = resolve(projectDir, "./typegraph/node"); -await dnt.emptyDir(outDir); - -const entryPoints: dnt.BuildOptions["entryPoints"] = ["./mod.ts"]; -for ( - const { name, path } of expandGlobSync("./**/*.ts", { - root: srcDir, - includeDirs: false, - globstar: true, - }) -) { - const relPath = path.replace(srcDir, "."); - if ( - !relPath.startsWith("./gen") && !name.startsWith("_") && name !== "mod.ts" - ) { - entryPoints.push({ - name: relPath.slice(0, -3), - path: relPath, - }); - } -} - -// runs in cwd: https://github.com/denoland/dnt/issues/337 -await dnt.build({ - entryPoints, - outDir, - shims: { - deno: true, - }, - compilerOptions: { - target: "ES2020", - }, - test: false, - scriptModule: false, // only generate ESM - typeCheck: "single", - packageManager: "pnpm", - package: { - name: "@typegraph/sdk", - version: lockfile.dev.lock.METATYPE_VERSION, - description: lockfile.dev.lock.TAGLINE, - license: "MPL-2.0", - repository: { - type: "git", - url: "git+https://github.com/metatypedev/metatype.git", - }, - bugs: { - url: "https://github.com/metatypedev/metatype/issues", - }, - }, - postBuild() { - const wasm = "./typegraph/deno/src/gen/typegraph_core.core.wasm"; - const files = [ - ["./dev/LICENSE-MPL-2.0.md", "./LICENSE.md"], - [wasm, "./esm/gen/typegraph_core.core.wasm"], - ]; - for (const [src, dest] of files) { - Deno.copyFileSync(resolve(projectDir, src), resolve(outDir, dest)); - } - // remove source (comment when debugging) - Deno.removeSync(resolve(outDir, "src"), { recursive: true }); - }, -}); diff --git a/typegraph/node/package.json b/typegraph/node/package.json index 5bd544bb15..c6c2b07052 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -2,8 +2,8 @@ "name": "@typegraph/sdk", "version": "0.3.1", "description": "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are.", - "main": "index.js", "type": "module", + "main": "mod.js", "scripts": { "build": "pnpm exec tsc && cp -R ./src/gen ./dist/", "test": "echo \"Error: no test specified\" && exit 1" diff --git a/typegraph/node/src/deps/mod.ts b/typegraph/node/src/deps/mod.ts index 83d5178973..abe8cab244 100644 --- a/typegraph/node/src/deps/mod.ts +++ b/typegraph/node/src/deps/mod.ts @@ -13,13 +13,15 @@ export function mapValues( } export function dirname(path: string) { + // Note: Do not refactor with runtime dependent OS check const [unixIdx, winIdx] = ["/", "\\"].map((sep) => path.lastIndexOf(sep)); - return winIdx > 0 ? path.substring(winIdx + 1) : path.substring(unixIdx + 1); + return path.substring((winIdx > 0 ? winIdx : unixIdx) + 1); } import { fromFileUrlPosix, fromFileUrlWin32 } from "./_import.js"; export function fromFileUrl(path: string) { + // Note: Do not refactor with runtime dependent OS check // Examples: file://C:, file://D: const isWin32 = /^file:\/\/\w\:/.test(path); return isWin32 ? fromFileUrlWin32(path) : fromFileUrlPosix(path); From 984926f57e3cc48b3f2faa7e8b26a34aebe31f64 Mon Sep 17 00:00:00 2001 From: afmika Date: Thu, 11 Jan 2024 16:25:15 +0300 Subject: [PATCH 20/23] fix(ci): release script --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33ef2c73b7..548f4555e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -127,7 +127,7 @@ jobs: pnpm install pnpm run build cd dist - cp ../package.json ./ + cp ../{*.json,pnpm-lock.yaml,LICENSE.md} ./ pnpm publish cd ../../.. From dd52afd6bc7b35d4ba249248a39e4cd34d5d174b Mon Sep 17 00:00:00 2001 From: afmika Date: Thu, 11 Jan 2024 17:25:54 +0300 Subject: [PATCH 21/23] fix(example): tsconfig + load-tgraph command --- examples/templates/node/package.json | 4 ++-- examples/templates/node/tsconfig.json | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/templates/node/package.json b/examples/templates/node/package.json index 0f43c5f59d..d9a41c2245 100644 --- a/examples/templates/node/package.json +++ b/examples/templates/node/package.json @@ -3,8 +3,8 @@ "type": "module", "version": "1.0.0", "scripts": { - "load-tgraph": "tsx", - "dev": "MCLI_LOADER_CMD='npm load-tgraph' meta-cli dev" + "load-tgraph": "npx tsx api/example.ts", + "dev": "MCLI_LOADER_CMD='npm run load-tgraph --silent' meta dev" }, "dependencies": { "@typegraph/sdk": "^0.2.4" diff --git a/examples/templates/node/tsconfig.json b/examples/templates/node/tsconfig.json index aa534ac5f6..b53013bc3b 100644 --- a/examples/templates/node/tsconfig.json +++ b/examples/templates/node/tsconfig.json @@ -2,6 +2,8 @@ "compilerOptions": { "strict": true, "moduleResolution": "node16", - "esModuleInterop": true + "target": "ES2019", + "module": "NodeNext", + "esModuleInterop": true } } From 944e5d903d58e018b86c7548c8f9bd1da00c621f Mon Sep 17 00:00:00 2001 From: afmika Date: Thu, 11 Jan 2024 19:14:59 +0300 Subject: [PATCH 22/23] rename mod to index, fix tsconfig, merge licenses --- examples/templates/node/tsconfig.json | 2 -- .../__snapshots__/typegraph_test.ts.snap | 2 +- .../e2e/typegraph/typegraphs/deno/complex.ts | 2 +- .../typegraphs/deno/multiple_runtimes.ts | 2 +- .../e2e/typegraph/typegraphs/deno/simple.ts | 2 +- typegate/tests/injection/injection.ts | 2 +- typegate/tests/random/random.ts | 2 +- typegate/tests/rest/rest_custom_loader.ts | 2 +- typegate/tests/rest/rest_schema.ts | 2 +- .../graphql/typegraphs/deno/graphql.ts | 2 +- typegate/tests/runtimes/prisma/normal_1_1.ts | 2 +- .../tests/runtimes/prisma/optional_1_n.ts | 2 +- .../tests/runtimes/python_wasi/python_wasi.ts | 2 +- typegate/tests/runtimes/s3/s3.ts | 2 +- typegate/tests/runtimes/temporal/temporal.ts | 2 +- typegate/tests/typecheck/reduce.ts | 2 +- typegraph/node/package.json | 1 - typegraph/node/src/deps/_import.ts | 24 +------------------ typegraph/node/src/{mod.ts => index.ts} | 0 typegraph/node/src/providers/aws.ts | 2 +- typegraph/node/src/providers/prisma.ts | 2 +- typegraph/node/src/runtimes/deno.ts | 2 +- typegraph/node/src/runtimes/graphql.ts | 2 +- typegraph/node/src/runtimes/http.ts | 2 +- typegraph/node/src/runtimes/python.ts | 2 +- typegraph/node/src/runtimes/random.ts | 2 +- typegraph/node/src/runtimes/wasmedge.ts | 2 +- 27 files changed, 24 insertions(+), 49 deletions(-) rename typegraph/node/src/{mod.ts => index.ts} (100%) diff --git a/examples/templates/node/tsconfig.json b/examples/templates/node/tsconfig.json index b53013bc3b..8fdbef4da1 100644 --- a/examples/templates/node/tsconfig.json +++ b/examples/templates/node/tsconfig.json @@ -2,8 +2,6 @@ "compilerOptions": { "strict": true, "moduleResolution": "node16", - "target": "ES2019", - "module": "NodeNext", "esModuleInterop": true } } diff --git a/typegate/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap b/typegate/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap index feca5f4970..fd0b992384 100644 --- a/typegate/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap +++ b/typegate/tests/e2e/typegraph/__snapshots__/typegraph_test.ts.snap @@ -1569,7 +1569,7 @@ snapshot[`typegraphs creation 6`] = ` "idempotent": true }, "data": { - "code": "file:scripts/three.ts;base64:H4sIAAAAAAAA/+0Y7W7bNtC//RQH/anUKYolJ8GgrsW6tlgLdGjQZsCAwDBoiXK0SqImUrMNw2+yt9mL7Ujqg1aSNsOQFO18SCzqeDzeHe+Op4tYXmZ07Qk+ujeYIJydnKgnwvA5nZ4GI39ycuZPgkkwlXjfD/xgNBk9ANRckApg9F9hqNxXAsfH8IKVmypdXgn4hQoiNiWFd3//5UKWRrTgNIa6iGkF4orCq4xwkUbwVk9B4E28MbL4cP7yt6MGefQmpoVIk5RWYbvgCAnH4zQvWSVgC8nahXOG/DcuCPzDLZcVKa9gB0nFcrB+7FDHPP54nLPY+51bT3oOL2nB3te4TU5vW1TpaX6M4rDB8ue1uHWzklQk53rBuJuyxwBb/AcoSE5DsATl4ijS0XMkybjlqnlOo4oKHsKlpYe+5UIzDPrh1Jpp+ooI5Kd5A6zSImarDzQK4Wzi7iHfpnkqQvCD71v8HzWtNg26Q2YsItmrdUQ5ynDaYiNWCLoW5tlYNadVI/ROPyJW8V4WkmVs9aKiag3JcCbBX+qa068pQeeQ2s728OhKVyxWVvj51YW1P/kO3S0t5NzjfoauS8bpDfxysn6+pMokfjAx5FU/9jIEUmwcePqsERxV5QLkqcNTKOjKdBbbeWLQlPUCSbQneviCT0lgUHCW0wsZEU9BeFxUdSTs1jyswHMTXpZyYQsvRfsuaWU7LvpXLrWbooA4bvzlYsUs2DmtUmLF5GJWipQVJLOXXkUT2/rQ7Gc5Tqtoz6KbRD57UjZueJugZI6ItFiGegpHdicHmScZI0JOqYHdCO+7kNeZSJHvuySEwBCdFHNa1LlcIp9z+9JCU0jPRqWsmUnXGKWjb420BYmh6PqoPZ417hbMlK7NWqVZkqLIW/hIN6j8nySrpeYt991QhW6TVo/BFt4pbuKdzvZWakuFhs1AbdTzcQz6AmOexsah0xSzYmVfGnY1tHRmjtOf8IDLfIVr53joYedkpoFzkmbKwnJg3+AML/ozN/xh6RFMbbbMb96CcPTnS5WpfpJjicXzaULAJL3KSRScntmK9jW+KFKn56qDs/MoSRaqEPOSuohs49Q6qdwOKbwFYxklRW8DME5aroqlSrYKYjwHarnGLE0SKs8oWWOMkNhk0nmD40lz6ki2MZJbgyldkQqfowPcAG2Qz9vr8h4qwc/Uf/6pf63+m06DyaH+ewD4IvXfF639zjdYmRR3ZVAq6mvVoC7/2uA5asnxEhzWI5+sNO5SrDQMlBwNzZ4KTcUyyNEkxnuqEV5q+Jbki5i0idq47qwkrbiwjAtPl6isiK2bb8GesEFs2wSeqU1gHcL68pHi+2gG38kXzfDRrLvAb0nYjUU3N1wu9ySzvVXMXNDrd+rgFAoeN7hPCy3vmN1Xe7/wqEpLwY/FVUXpPXUBPpP/MfNPh/k/mJ74h/z/APCg+R/r4iohEYUL6W1virIWKkcuQsBafUErme9I/7Ibj2VSw7QtE4Gso0H5qfoYB+LCAnahwUyG43YXquBWn7shvMcIruIfdHnuoiofC7YqnqmaUH/pEnNzQ5KdmsUv9boqut2kTKNvCXgqC/Z7bf99Lv5l0F/r/02Cs0P8PwD8b+q/sa6jiGqQdF/oHZ77e50TFe77HQvdFpGNEP25rdct9vh1VK7sWoVwMtW0w8Kx6RfeUizeoRr8dDmpEi32HHqaFtMUi5pM9v+u94vS2NS7KZiwssRk2jSpzvHF0rWP0ZD4VXYT205EIyYS3nED2Ytg6DBSpiFntV/LeVDnqiZcXyty7CQt+jbSXmPBD9pm514d15qmEUQ15nqGSh6lyHWuck5xxnOXSsljVzbdOTfupLiWemzhy0b2zLRsqrHaNf3UJddIod2+LYJRv2ujzk5qGfLEkKkziRgWd99yIXuAAxzgAAf4V/APx+8iZQAgAAA=" + "code": "file:scripts/three.ts;base64:H4sIAAAAAAAA/+0Y7W7bNtC//RQH/ancKYolx8GgrsW6tlgLdGjQZsCAwDBoiXK0SqImUrMNw2+yt9mL7Ujqg5aTNsOQFO18SCzqeDzeHe+OpwtZVqR07Qo+uDcYI5yfnaknQv85mUzPBt747Nwb+2N/IvGe53tIP3gAqLggJcDgv0Jfua8ETk/hBSs2ZbK8FvALFURsCgrv/v7LgTQJac5pBFUe0RLENYVXKeEiCeGtngLfHbtDZPHh4uVvJzXy5E1Ec5HECS2DZsEJEg6HSVawUsAW4rUDFwz5bxwQ+IdbLktSXMMO4pJlYP3Yok559PE0QQHW7u/cetLxeElz9r7CjTJ627JST/NTFIj1lj+vxK3bFaQkGdcLhu2UPQTY4j9ATjIagCUoFyehjp8TScYtR81zGpZU8ACuLD30LAfqod8NJ9ZM05dEID/NG2CF2rLVBxoGcD529pBvkywRAXj+9w3+j4qWmxrdIlMWkvTVOqQcZZg22JDlgq6FeTpWxWlZC73Tj5CVvJOFpClbvSipWkNSnInxlzrm9GtK0D2ktrM9PDrTNYuUFX5+dWntT75Dh0tyOfe4m6HrgnF6A7+MrJ8vqTKJ548NedWPvQyA5JsRPH1WC46qcgHy1OEp5HRlOos9emLQFNUCSbQvuviCT0lgUHCW0UsZE09BuFyUVSjsxjwsx3MTbppwYQs3QfsuaWmPHPSvTGo3QQFxXPvL5YpZsBs1SokVk4tZIRKWk9ReuiWNbetDvZ81GjWKdizaSeSzJ2XthrcJSuaISPJloKdwZLdykHmcMiLklBrYtfCeA1mVigT5vosD8A3RST6neZXJJfI5t68sNIX0bFTKmpl0tVFa+sZIW5AYiq6P2uNZ427+TOlar1WaxQmKvIWPdIPK/0nSSmrecN/1VWg3afTobeFOcRN3OttbqS0VGDYDtVHHZ2TQ5xjzNDIOnSaYF0v7yrCroeVoNhp1J9zjMl/h2jkeetA6mWngjCSpsrAc2Dc4w4vuzA1/WLoEU5st85u7IBz9+Uplqp/kWGLxfOoQMEmvMxL603Nb0b7GF0U66rjq4Gw9SpIFKsTcuMpD2zi1ViqnRQp3wVhKSd7ZAIyTlqsiqZKtghjPgVqOMUvjmMozitcYIyQymbTeMHKlOXUk2xjJjcGUrkiFz8ERDqAJ8XlzWd5DJfiZ+s+begf132Ti+8f67wHgi9R/X7j2u9hgZZLflUGhqA+qQV3+NeFz0pDjJdivRz5ZadylWKkZKDlqmj0V6oqll6NJhPdULbzU8C3JFhFpErVx3VlxUnJhGReeLlFZHlk334IdYY3YNgk8VZvAOoD11SPF99EMvpMvmuGjWXuB35Kwa4tubrhc7klme6uYOaDX79TBKRQ8rnGfFlreMbuv9H7hYZkUgp+K65LSe+oCfCb/Y+af9PO/Pznzjvn/AeBB8z9WxWVMQgqX0tve5EUlVIZcBICV+oKWMtuR7mU3HMqUhklbpgFZRYPyU/UpDsSBBewCg5kMxu0uUKGtPnYDeI/xW0Y/6OLcQVU+5myVP1MVof7OJebmhiQ7NYvf6VWZt7tJmQbfEvBEluv32v77XPxj0E8P+n9j+Rw8ABzj//9S/w11HUVUg6T9Qm/x3NvrnKiA3+9Y6LaIbIToz229brHHr6VyZNcqgLOJpu0XjnW/8JZi8Q7V4KfLSZVqsefQ0TSYuljUZLL/d9gvSiJT77pgwsoS02ndpLrAF0vXPkZD4lfZTWw6EbWYSHjHDWQvgqHLSJn6nNV+DedenauacF2tyLGTtOjaSHuNBc9vmp17dVxjmloQ1ZjrGCp5lCKHXOWc4oznLpWSx65suhvduJPiWuixhS8b2TPTsqnGatv0U9dcLYV2+6YIRv0ORq2d1DLkmbGoSiWiX959u4XsEY5whCMc4V/BP36axFYAIAAA" } }, { diff --git a/typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts b/typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts index 5abdef6e33..f2dfa4d7ee 100644 --- a/typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts +++ b/typegate/tests/e2e/typegraph/typegraphs/deno/complex.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; import { Auth } from "@typegraph/sdk/params.js"; diff --git a/typegate/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts b/typegate/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts index 3381bad0a7..63c8b853d7 100644 --- a/typegate/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts +++ b/typegate/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; import { PythonRuntime } from "@typegraph/sdk/runtimes/python.js"; diff --git a/typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts b/typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts index e637f792f6..fde474c67b 100644 --- a/typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts +++ b/typegate/tests/e2e/typegraph/typegraphs/deno/simple.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; const a = t.integer(); diff --git a/typegate/tests/injection/injection.ts b/typegate/tests/injection/injection.ts index 7592ff4cf9..181da3dfd7 100644 --- a/typegate/tests/injection/injection.ts +++ b/typegate/tests/injection/injection.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { CREATE, DELETE, READ, UPDATE } from "@typegraph/sdk/effects.js"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; diff --git a/typegate/tests/random/random.ts b/typegate/tests/random/random.ts index 219a655139..d9d9ea4c16 100644 --- a/typegate/tests/random/random.ts +++ b/typegate/tests/random/random.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { RandomRuntime } from "@typegraph/sdk/runtimes/random.js"; typegraph("random", (g: any) => { diff --git a/typegate/tests/rest/rest_custom_loader.ts b/typegate/tests/rest/rest_custom_loader.ts index 6da93b54e6..b054690609 100644 --- a/typegate/tests/rest/rest_custom_loader.ts +++ b/typegate/tests/rest/rest_custom_loader.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; import { endpoints } from "./custom/custom_loader.ts"; diff --git a/typegate/tests/rest/rest_schema.ts b/typegate/tests/rest/rest_schema.ts index 28e52a2a09..e6deca12ed 100644 --- a/typegate/tests/rest/rest_schema.ts +++ b/typegate/tests/rest/rest_schema.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; typegraph("rest_schema", (g: any) => { diff --git a/typegate/tests/runtimes/graphql/typegraphs/deno/graphql.ts b/typegate/tests/runtimes/graphql/typegraphs/deno/graphql.ts index d582a53e0b..daf3782a33 100644 --- a/typegate/tests/runtimes/graphql/typegraphs/deno/graphql.ts +++ b/typegate/tests/runtimes/graphql/typegraphs/deno/graphql.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql.js"; import * as effects from "@typegraph/sdk/effects.js"; diff --git a/typegate/tests/runtimes/prisma/normal_1_1.ts b/typegate/tests/runtimes/prisma/normal_1_1.ts index 688ce512d8..01e6fb510a 100644 --- a/typegate/tests/runtimes/prisma/normal_1_1.ts +++ b/typegate/tests/runtimes/prisma/normal_1_1.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.js"; typegraph("prisma_normal", (g: any) => { diff --git a/typegate/tests/runtimes/prisma/optional_1_n.ts b/typegate/tests/runtimes/prisma/optional_1_n.ts index 6610da9059..8e6e17c431 100644 --- a/typegate/tests/runtimes/prisma/optional_1_n.ts +++ b/typegate/tests/runtimes/prisma/optional_1_n.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.js"; typegraph("prisma_opt_1", (g: any) => { diff --git a/typegate/tests/runtimes/python_wasi/python_wasi.ts b/typegate/tests/runtimes/python_wasi/python_wasi.ts index 46098b8614..e6b1397468 100644 --- a/typegate/tests/runtimes/python_wasi/python_wasi.ts +++ b/typegate/tests/runtimes/python_wasi/python_wasi.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { PythonRuntime } from "@typegraph/sdk/runtimes/python.js"; import outdent from "outdent"; diff --git a/typegate/tests/runtimes/s3/s3.ts b/typegate/tests/runtimes/s3/s3.ts index bc011a4baa..d6a3854670 100644 --- a/typegate/tests/runtimes/s3/s3.ts +++ b/typegate/tests/runtimes/s3/s3.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { S3Runtime } from "@typegraph/sdk/providers/aws.js"; typegraph("s3-test", (g: any) => { diff --git a/typegate/tests/runtimes/temporal/temporal.ts b/typegate/tests/runtimes/temporal/temporal.ts index 5357f010bc..c53717db2b 100644 --- a/typegate/tests/runtimes/temporal/temporal.ts +++ b/typegate/tests/runtimes/temporal/temporal.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { TemporalRuntime } from "@typegraph/sdk/providers/temporal.js"; typegraph("temporal", (g: any) => { diff --git a/typegate/tests/typecheck/reduce.ts b/typegate/tests/typecheck/reduce.ts index e7554e44c3..f55960dc9f 100644 --- a/typegate/tests/typecheck/reduce.ts +++ b/typegate/tests/typecheck/reduce.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/mod.js"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.js"; import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js"; const student = t.struct({ diff --git a/typegraph/node/package.json b/typegraph/node/package.json index c6c2b07052..2e7add5cec 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -3,7 +3,6 @@ "version": "0.3.1", "description": "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are.", "type": "module", - "main": "mod.js", "scripts": { "build": "pnpm exec tsc && cp -R ./src/gen ./dist/", "test": "echo \"Error: no test specified\" && exit 1" diff --git a/typegraph/node/src/deps/_import.ts b/typegraph/node/src/deps/_import.ts index 5ab1288d36..a1af115678 100644 --- a/typegraph/node/src/deps/_import.ts +++ b/typegraph/node/src/deps/_import.ts @@ -4,6 +4,7 @@ The MIT License (MIT) Copyright (c) 2020 Alexandre Piel +Copyright 2018-2022 the Deno authors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -53,29 +54,6 @@ export function getFile(this: Bind | any, stack: string) { return file; } -/* -MIT License - -Copyright 2018-2022 the Deno authors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ export function fromFileUrlWin32(url: string): string { const urlObj = new URL(url); let path = decodeURIComponent( diff --git a/typegraph/node/src/mod.ts b/typegraph/node/src/index.ts similarity index 100% rename from typegraph/node/src/mod.ts rename to typegraph/node/src/index.ts diff --git a/typegraph/node/src/providers/aws.ts b/typegraph/node/src/providers/aws.ts index 72edd79c6a..fbd6a7d9eb 100644 --- a/typegraph/node/src/providers/aws.ts +++ b/typegraph/node/src/providers/aws.ts @@ -8,7 +8,7 @@ import { S3PresignPutParams, S3RuntimeData, } from "../gen/interfaces/metatype-typegraph-aws.js"; -import { t } from "../mod.js"; +import { t } from "../index.js"; type S3PresignGetMat = Materializer & S3PresignGetParams; type S3PresignPutMat = Materializer & S3PresignPutParams; diff --git a/typegraph/node/src/providers/prisma.ts b/typegraph/node/src/providers/prisma.ts index afd9a8dc01..8cd6e0917e 100644 --- a/typegraph/node/src/providers/prisma.ts +++ b/typegraph/node/src/providers/prisma.ts @@ -4,7 +4,7 @@ import { Runtime } from "../runtimes/mod.js"; import { runtimes } from "../wit.js"; import { Typedef } from "../types.js"; -import { t } from "../mod.js"; +import { t } from "../index.js"; import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; import { genRef } from "./../typegraph.js"; diff --git a/typegraph/node/src/runtimes/deno.ts b/typegraph/node/src/runtimes/deno.ts index bc42b02305..1d32b57019 100644 --- a/typegraph/node/src/runtimes/deno.ts +++ b/typegraph/node/src/runtimes/deno.ts @@ -6,7 +6,7 @@ import { runtimes } from "../wit.js"; import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; import Policy from "../policy.js"; import { Materializer, Runtime } from "./mod.js"; -import { fx } from "../mod.js"; +import { fx } from "../index.js"; interface FunMat extends Materializer { code: string; diff --git a/typegraph/node/src/runtimes/graphql.ts b/typegraph/node/src/runtimes/graphql.ts index c8fc976e0b..219e00c42d 100644 --- a/typegraph/node/src/runtimes/graphql.ts +++ b/typegraph/node/src/runtimes/graphql.ts @@ -5,7 +5,7 @@ import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; import * as t from "../types.js"; import { runtimes } from "../wit.js"; import { Materializer, Runtime } from "./mod.js"; -import { fx } from "../mod.js"; +import { fx } from "../index.js"; export class GraphQLRuntime extends Runtime { constructor(private endpoint: string) { diff --git a/typegraph/node/src/runtimes/http.ts b/typegraph/node/src/runtimes/http.ts index 4ff57c2899..6ffe82b108 100644 --- a/typegraph/node/src/runtimes/http.ts +++ b/typegraph/node/src/runtimes/http.ts @@ -9,7 +9,7 @@ import { } from "../gen/interfaces/metatype-typegraph-runtimes.js"; import { runtimes } from "../wit.js"; import { Materializer, Runtime } from "./mod.js"; -import { fx } from "../mod.js"; +import { fx } from "../index.js"; type HttpRequestMat = & Materializer diff --git a/typegraph/node/src/runtimes/python.ts b/typegraph/node/src/runtimes/python.ts index c042dd4695..63cfe00c48 100644 --- a/typegraph/node/src/runtimes/python.ts +++ b/typegraph/node/src/runtimes/python.ts @@ -5,7 +5,7 @@ import * as t from "../types.js"; import { runtimes } from "../wit.js"; import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; import { Materializer, Runtime } from "./mod.js"; -import { fx } from "../mod.js"; +import { fx } from "../index.js"; interface LambdaMat extends Materializer { fn: string; diff --git a/typegraph/node/src/runtimes/random.ts b/typegraph/node/src/runtimes/random.ts index 7b72d9c524..44ea35b106 100644 --- a/typegraph/node/src/runtimes/random.ts +++ b/typegraph/node/src/runtimes/random.ts @@ -7,7 +7,7 @@ import { RandomRuntimeData, } from "../gen/interfaces/metatype-typegraph-runtimes.js"; import { Materializer, Runtime } from "./mod.js"; -import { fx } from "../mod.js"; +import { fx } from "../index.js"; interface RandomMat extends Materializer { runtime: number; diff --git a/typegraph/node/src/runtimes/wasmedge.ts b/typegraph/node/src/runtimes/wasmedge.ts index b07e9bd103..7355b25de7 100644 --- a/typegraph/node/src/runtimes/wasmedge.ts +++ b/typegraph/node/src/runtimes/wasmedge.ts @@ -5,7 +5,7 @@ import * as t from "../types.js"; import { runtimes } from "../wit.js"; import { Effect } from "../gen/interfaces/metatype-typegraph-runtimes.js"; import { Materializer, Runtime } from "./mod.js"; -import { fx } from "../mod.js"; +import { fx } from "../index.js"; interface WasiMat extends Materializer { module: string; From d20f9172d5b1a90709d01fa3e09c97207e23ebab Mon Sep 17 00:00:00 2001 From: afmika Date: Fri, 12 Jan 2024 16:14:09 +0300 Subject: [PATCH 23/23] feat(node/ci): workspace configuration --- .github/workflows/release.yml | 10 +- .github/workflows/tests.yml | 7 +- .gitignore | 2 +- dev/lock.yml | 4 + typegate/import_map.json | 2 +- typegraph/node/package.json | 10 +- typegraph/node/pnpm-lock.yaml | 13 +- typegraph/node/pnpm-workspace.yaml | 2 + typegraph/node/sdk/LICENSE.md | 359 ++++++++++++++++++ typegraph/node/{ => sdk}/package-lock.json | 0 typegraph/node/sdk/package.json | 23 ++ typegraph/node/{ => sdk}/src/deps/_import.ts | 0 typegraph/node/{ => sdk}/src/deps/mod.ts | 0 typegraph/node/{ => sdk}/src/effects.ts | 0 typegraph/node/{ => sdk}/src/index.ts | 0 typegraph/node/{ => sdk}/src/params.ts | 0 typegraph/node/{ => sdk}/src/policy.ts | 0 typegraph/node/{ => sdk}/src/providers/aws.ts | 0 .../node/{ => sdk}/src/providers/prisma.ts | 0 .../node/{ => sdk}/src/providers/temporal.ts | 0 typegraph/node/{ => sdk}/src/runtimes/deno.ts | 0 .../node/{ => sdk}/src/runtimes/graphql.ts | 0 typegraph/node/{ => sdk}/src/runtimes/http.ts | 0 typegraph/node/{ => sdk}/src/runtimes/mod.ts | 0 .../node/{ => sdk}/src/runtimes/python.ts | 0 .../node/{ => sdk}/src/runtimes/random.ts | 0 .../node/{ => sdk}/src/runtimes/wasmedge.ts | 0 typegraph/node/{ => sdk}/src/typegraph.ts | 4 +- typegraph/node/{ => sdk}/src/types.ts | 0 .../node/{ => sdk}/src/utils/func_utils.ts | 0 .../{ => sdk}/src/utils/injection_utils.ts | 0 .../node/{ => sdk}/src/utils/type_utils.ts | 0 typegraph/node/{ => sdk}/src/wit.ts | 0 typegraph/node/{ => sdk}/tsconfig.json | 0 whiz.yaml | 7 +- 35 files changed, 415 insertions(+), 28 deletions(-) create mode 100644 typegraph/node/pnpm-workspace.yaml create mode 100644 typegraph/node/sdk/LICENSE.md rename typegraph/node/{ => sdk}/package-lock.json (100%) create mode 100644 typegraph/node/sdk/package.json rename typegraph/node/{ => sdk}/src/deps/_import.ts (100%) rename typegraph/node/{ => sdk}/src/deps/mod.ts (100%) rename typegraph/node/{ => sdk}/src/effects.ts (100%) rename typegraph/node/{ => sdk}/src/index.ts (100%) rename typegraph/node/{ => sdk}/src/params.ts (100%) rename typegraph/node/{ => sdk}/src/policy.ts (100%) rename typegraph/node/{ => sdk}/src/providers/aws.ts (100%) rename typegraph/node/{ => sdk}/src/providers/prisma.ts (100%) rename typegraph/node/{ => sdk}/src/providers/temporal.ts (100%) rename typegraph/node/{ => sdk}/src/runtimes/deno.ts (100%) rename typegraph/node/{ => sdk}/src/runtimes/graphql.ts (100%) rename typegraph/node/{ => sdk}/src/runtimes/http.ts (100%) rename typegraph/node/{ => sdk}/src/runtimes/mod.ts (100%) rename typegraph/node/{ => sdk}/src/runtimes/python.ts (100%) rename typegraph/node/{ => sdk}/src/runtimes/random.ts (100%) rename typegraph/node/{ => sdk}/src/runtimes/wasmedge.ts (100%) rename typegraph/node/{ => sdk}/src/typegraph.ts (97%) rename typegraph/node/{ => sdk}/src/types.ts (100%) rename typegraph/node/{ => sdk}/src/utils/func_utils.ts (100%) rename typegraph/node/{ => sdk}/src/utils/injection_utils.ts (100%) rename typegraph/node/{ => sdk}/src/utils/type_utils.ts (100%) rename typegraph/node/{ => sdk}/src/wit.ts (100%) rename typegraph/node/{ => sdk}/tsconfig.json (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca2ab4b27d..c1377ed7fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,13 +128,11 @@ jobs: cd typegraph/node pnpm install - pnpm run build - cd dist - cp ../{*.json,pnpm-lock.yaml,LICENSE.md} ./ - pnpm publish - cd ../../.. + pnpm run sdk-build + cp ./sdk/{package.json,package-lock.json,LICENSE.md} ./sdk/dist + cd ../.. - cd typegraph/node + cd typegraph/node/sdk/dist pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" pnpm publish --no-git-checks - uses: svenstaro/upload-release-action@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4641645bfc..6d40aadf0c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -296,11 +296,12 @@ jobs: mkdir -p $(dirname $WASM_FILE) wasm-opt -Oz target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE.opt wasm-tools component new $WASM_FILE.opt -o $WASM_FILE - rm -rf typegraph/node/src/gen typegraph/node/dist - jco transpile $WASM_FILE -o typegraph/node/src/gen + rm -rf typegraph/node/sdk/src/gen typegraph/node/sdk/dist + jco transpile $WASM_FILE -o typegraph/node/sdk/src/gen cd typegraph/node pnpm install - pnpm run build + pnpm run sdk-build + cp ./sdk/{package.json,package-lock.json,LICENSE.md} ./sdk/dist cd ../.. rm -rf typegraph/python/typegraph/gen poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen diff --git a/.gitignore b/.gitignore index c5cfa531e1..2a2f16c925 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,7 @@ recipe.json tmp/ coverage* -typegraph/node/src/gen +typegraph/node/sdk/src/gen typegraph/python/typegraph/gen *.egg-info/ diff --git a/dev/lock.yml b/dev/lock.yml index 77f1c1ec87..2d80919e81 100644 --- a/dev/lock.yml +++ b/dev/lock.yml @@ -3,6 +3,7 @@ dev: dev/LICENSE-MPL-2.0.md: - typegraph/python/LICENSE.md - typegraph/node/LICENSE.md + - typegraph/node/sdk/LICENSE.md lines: rust-toolchain.toml: (channel = ").+("): RUST_VERSION @@ -25,6 +26,9 @@ dev: '([\s-]+uses:\s+metatypedev/setup-ghjk@).+()': GHJK_ACTION_VERSION typegraph/python/typegraph/__init__.py: (version = ").+("): METATYPE_VERSION + typegraph/node/sdk/package.json: + '(\s*"version"\s*:\s*").+(",?)': METATYPE_VERSION + '(\s*"description"\s*:\s*").*(",?)': TAGLINE typegraph/node/package.json: '(\s*"version"\s*:\s*").+(",?)': METATYPE_VERSION '(\s*"description"\s*:\s*").*(",?)': TAGLINE diff --git a/typegate/import_map.json b/typegate/import_map.json index a3e7b01f83..933dd6f634 100644 --- a/typegate/import_map.json +++ b/typegate/import_map.json @@ -23,7 +23,7 @@ "outdent": "https://deno.land/x/outdent@v0.8.0/mod.ts", "json-schema-faker": "npm:json-schema-faker@0.5.3", "ajv": "https://esm.sh/ajv@8.12.0?pin=v131", - "@typegraph/sdk/": "../typegraph/node/dist/", + "@typegraph/sdk/": "../typegraph/node/sdk/dist/", "test-utils/": "./tests/utils/" } } diff --git a/typegraph/node/package.json b/typegraph/node/package.json index 2e7add5cec..e15efb5a91 100644 --- a/typegraph/node/package.json +++ b/typegraph/node/package.json @@ -1,10 +1,9 @@ { - "name": "@typegraph/sdk", + "name": "metatype", "version": "0.3.1", "description": "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are.", - "type": "module", "scripts": { - "build": "pnpm exec tsc && cp -R ./src/gen ./dist/", + "sdk-build": "cd sdk && pnpm run build", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -16,8 +15,5 @@ }, "keywords": [], "author": "", - "license": "MPL-2.0", - "dependencies": { - "typescript": "^5.3.3" - } + "license": "MPL-2.0" } diff --git a/typegraph/node/pnpm-lock.yaml b/typegraph/node/pnpm-lock.yaml index 6813016472..c52efda16c 100644 --- a/typegraph/node/pnpm-lock.yaml +++ b/typegraph/node/pnpm-lock.yaml @@ -4,10 +4,13 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - typescript: - specifier: ^5.3.3 - version: 5.3.3 +importers: + + sdk: + devDependencies: + typescript: + specifier: ^5.3.3 + version: 5.3.3 packages: @@ -15,4 +18,4 @@ packages: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true - dev: false + dev: true diff --git a/typegraph/node/pnpm-workspace.yaml b/typegraph/node/pnpm-workspace.yaml new file mode 100644 index 0000000000..b8d8b6441f --- /dev/null +++ b/typegraph/node/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - sdk diff --git a/typegraph/node/sdk/LICENSE.md b/typegraph/node/sdk/LICENSE.md new file mode 100644 index 0000000000..9c9d472da2 --- /dev/null +++ b/typegraph/node/sdk/LICENSE.md @@ -0,0 +1,359 @@ +# Mozilla Public License Version 2.0 (MPL-2.0) + +1. Definitions + +--- + +1.1. "Contributor" means each individual or legal entity that creates, +contributes to the creation of, or owns Covered Software. + +1.2. "Contributor Version" means the combination of the Contributions of others +(if any) used by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" means Covered Software of a particular Contributor. + +1.4. "Covered Software" means Source Code Form to which the initial Contributor +has attached the notice in Exhibit A, the Executable Form of such Source Code +Form, and Modifications of such Source Code Form, in each case including +portions thereof. + +1.5. "Incompatible With Secondary Licenses" means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" means any form of the work other than Source Code Form. + +1.7. "Larger Work" means a work that combines Covered Software with other +material, in a separate file or files, that is not Covered Software. + +1.8. "License" means this document. + +1.9. "Licensable" means having the right to grant, to the maximum extent +possible, whether at the time of the initial grant or subsequently, any and all +of the rights conveyed by this License. + +1.10. "Modifications" means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor means any patent claim(s), including +without limitation, method, process, and apparatus claims, in any patent +Licensable by such Contributor that would be infringed, but for the grant of the +License, by the making, using, selling, offering for sale, having made, import, +or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" means either the GNU General Public License, Version +2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General +Public License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" means the form of the work preferred for making +modifications. + +1.14. "You" (or "Your") means an individual or a legal entity exercising rights +under this License. For legal entities, "You" includes any entity that controls, +is controlled by, or is under common control with You. For purposes of this +definition, "control" means (a) the power, direct or indirect, to cause the +direction or management of such entity, whether by contract or otherwise, or (b) +ownership of more than fifty percent (50%) of the outstanding shares or +beneficial ownership of such entity. + +2. License Grants and Conditions + +--- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive +license: + +(a) under intellectual property rights (other than patent or trademark) +Licensable by such Contributor to use, reproduce, make available, modify, +display, perform, distribute, and otherwise exploit its Contributions, either on +an unmodified basis, with Modifications, or as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer for sale, +have made, import, and otherwise transfer either its Contributions or its +Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution become +effective for each Contribution on the date the Contributor first distributes +such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under this +License. No additional rights or licenses will be implied from the distribution +or licensing of Covered Software under this License. Notwithstanding Section +2.1(b) above, no patent license is granted by a Contributor: + +(a) for any code that a Contributor has removed from Covered Software; or + +(b) for infringements caused by: (i) Your and any other third party's +modifications of Covered Software, or (ii) the combination of its Contributions +with other software (except as part of its Contributor Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of its +Contributions. + +This License does not grant any rights in the trademarks, service marks, or +logos of any Contributor (except as may be necessary to comply with the notice +requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to distribute +the Covered Software under a subsequent version of this License (see Section +10.2) or under the terms of a Secondary License (if permitted under the terms of +Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its Contributions are +its original creation(s) or it has sufficient rights to grant the rights to its +Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under applicable +copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in +Section 2.1. + +3. Responsibilities + +--- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under the +terms of this License. You must inform recipients that the Source Code Form of +the Covered Software is governed by the terms of this License, and how they can +obtain a copy of this License. You may not attempt to alter or restrict the +recipients' rights in the Source Code Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code Form, as +described in Section 3.1, and You must inform recipients of the Executable Form +how they can obtain a copy of such Source Code Form by reasonable means in a +timely manner, at a charge no more than the cost of distribution to the +recipient; and + +(b) You may distribute such Executable Form under the terms of this License, or +sublicense it under different terms, provided that the license for the +Executable Form does not attempt to limit or alter the recipients' rights in the +Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, provided +that You also comply with the requirements of this License for the Covered +Software. If the Larger Work is a combination of Covered Software with a work +governed by one or more Secondary Licenses, and the Covered Software is not +Incompatible With Secondary Licenses, this License permits You to additionally +distribute such Covered Software under the terms of such Secondary License(s), +so that the recipient of the Larger Work may, at their option, further +distribute the Covered Software under the terms of either this License or such +Secondary License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices (including +copyright notices, patent notices, disclaimers of warranty, or limitations of +liability) contained within the Source Code Form of the Covered Software, except +that You may alter any license notices to the extent required to remedy known +factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, indemnity +or liability obligations to one or more recipients of Covered Software. However, +You may do so only on Your own behalf, and not on behalf of any Contributor. You +must make it absolutely clear that any such warranty, support, indemnity, or +liability obligation is offered by You alone, and You hereby agree to indemnify +every Contributor for any liability incurred by such Contributor as a result of +warranty, support, indemnity or liability terms You offer. You may include +additional disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + +--- + +If it is impossible for You to comply with any of the terms of this License with +respect to some or all of the Covered Software due to statute, judicial order, +or regulation then You must: (a) comply with the terms of this License to the +maximum extent possible; and (b) describe the limitations and the code they +affect. Such description must be placed in a text file included with all +distributions of the Covered Software under this License. Except to the extent +prohibited by statute or regulation, such description must be sufficiently +detailed for a recipient of ordinary skill to be able to understand it. + +5. Termination + +--- + +5.1. The rights granted under this License will terminate automatically if You +fail to comply with any of its terms. However, if You become compliant, then the +rights granted under this License from a particular Contributor are reinstated +(a) provisionally, unless and until such Contributor explicitly and finally +terminates Your grants, and (b) on an ongoing basis, if such Contributor fails +to notify You of the non-compliance by some reasonable means prior to 60 days +after You have come back into compliance. Moreover, Your grants from a +particular Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the first +time You have received notice of non-compliance with this License from such +Contributor, and You become compliant prior to 30 days after Your receipt of the +notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, counter-claims, and +cross-claims) alleging that a Contributor Version directly or indirectly +infringes any patent, then the rights granted to You by any and all Contributors +for the Covered Software under Section 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user +license agreements (excluding distributors and resellers) which have been +validly granted by You or Your distributors under this License prior to +termination shall survive termination. + +--- + +- + - +- + 6. Disclaimer of Warranty * +- ------------------------- * +- + - +- Covered Software is provided under this License on an "as is" * +- basis, without warranty of any kind, either expressed, implied, or * +- statutory, including, without limitation, warranties that the * +- Covered Software is free of defects, merchantable, fit for a * +- particular purpose or non-infringing. The entire risk as to the * +- quality and performance of the Covered Software is with You. * +- Should any Covered Software prove defective in any respect, You * +- (not any Contributor) assume the cost of any necessary servicing, * +- repair, or correction. This disclaimer of warranty constitutes an * +- essential part of this License. No use of any Covered Software is * +- authorized under this License except under this disclaimer. * +- + - + +--- + +--- + +- + - +- + 7. Limitation of Liability * +- -------------------------- * +- + - +- Under no circumstances and under no legal theory, whether tort * +- (including negligence), contract, or otherwise, shall any * +- Contributor, or anyone who distributes Covered Software as * +- permitted above, be liable to You for any direct, indirect, * +- special, incidental, or consequential damages of any character * +- including, without limitation, damages for lost profits, loss of * +- goodwill, work stoppage, computer failure or malfunction, or any * +- and all other commercial damages or losses, even if such party * +- shall have been informed of the possibility of such damages. This * +- limitation of liability shall not apply to liability for death or * +- personal injury resulting from such party's negligence to the * +- extent applicable law prohibits such limitation. Some * +- jurisdictions do not allow the exclusion or limitation of * +- incidental or consequential damages, so this exclusion and * +- limitation may not apply to You. * +- + - + +--- + +8. Litigation + +--- + +Any litigation relating to this License may be brought only in the courts of a +jurisdiction where the defendant maintains its principal place of business and +such litigation shall be governed by laws of that jurisdiction, without +reference to its conflict-of-law provisions. Nothing in this Section shall +prevent a party's ability to bring cross-claims or counter-claims. + +9. Miscellaneous + +--- + +This License represents the complete agreement concerning the subject matter +hereof. If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it enforceable. +Any law or regulation which provides that the language of a contract shall be +construed against the drafter shall not be used to construe this License against +a Contributor. + +10. Versions of the License + +--- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section 10.3, +no one other than the license steward has the right to modify or publish new +versions of this License. Each version will be given a distinguishing version +number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version of the +License under which You originally received the Covered Software, or under the +terms of any subsequent version published by the license steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to create a +new license for such software, you may create and use a modified version of this +License if you rename the license and remove any references to the name of the +license steward (except to note that such modified license differs from this +License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + +If You choose to distribute Source Code Form that is Incompatible With Secondary +Licenses under the terms of this version of the License, the notice described in +Exhibit B of this License must be attached. + +## Exhibit A - Source Code Form License Notice + +This Source Code Form is subject to the terms of the Mozilla Public License, v. +2.0. If a copy of the MPL was not distributed with this file, You can obtain one +at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +## Exhibit B - "Incompatible With Secondary Licenses" Notice + +This Source Code Form is "Incompatible With Secondary Licenses", as defined by +the Mozilla Public License, v. 2.0. diff --git a/typegraph/node/package-lock.json b/typegraph/node/sdk/package-lock.json similarity index 100% rename from typegraph/node/package-lock.json rename to typegraph/node/sdk/package-lock.json diff --git a/typegraph/node/sdk/package.json b/typegraph/node/sdk/package.json new file mode 100644 index 0000000000..69b931ad39 --- /dev/null +++ b/typegraph/node/sdk/package.json @@ -0,0 +1,23 @@ +{ + "name": "@typegraph/sdk", + "version": "0.3.1", + "description": "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are.", + "type": "module", + "scripts": { + "build": "pnpm exec tsc && cp -R ./src/gen ./dist/", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/metatypedev/metatype.git" + }, + "bugs": { + "url": "https://github.com/metatypedev/metatype/issues" + }, + "keywords": [], + "author": "", + "license": "MPL-2.0", + "devDependencies": { + "typescript": "^5.3.3" + } +} diff --git a/typegraph/node/src/deps/_import.ts b/typegraph/node/sdk/src/deps/_import.ts similarity index 100% rename from typegraph/node/src/deps/_import.ts rename to typegraph/node/sdk/src/deps/_import.ts diff --git a/typegraph/node/src/deps/mod.ts b/typegraph/node/sdk/src/deps/mod.ts similarity index 100% rename from typegraph/node/src/deps/mod.ts rename to typegraph/node/sdk/src/deps/mod.ts diff --git a/typegraph/node/src/effects.ts b/typegraph/node/sdk/src/effects.ts similarity index 100% rename from typegraph/node/src/effects.ts rename to typegraph/node/sdk/src/effects.ts diff --git a/typegraph/node/src/index.ts b/typegraph/node/sdk/src/index.ts similarity index 100% rename from typegraph/node/src/index.ts rename to typegraph/node/sdk/src/index.ts diff --git a/typegraph/node/src/params.ts b/typegraph/node/sdk/src/params.ts similarity index 100% rename from typegraph/node/src/params.ts rename to typegraph/node/sdk/src/params.ts diff --git a/typegraph/node/src/policy.ts b/typegraph/node/sdk/src/policy.ts similarity index 100% rename from typegraph/node/src/policy.ts rename to typegraph/node/sdk/src/policy.ts diff --git a/typegraph/node/src/providers/aws.ts b/typegraph/node/sdk/src/providers/aws.ts similarity index 100% rename from typegraph/node/src/providers/aws.ts rename to typegraph/node/sdk/src/providers/aws.ts diff --git a/typegraph/node/src/providers/prisma.ts b/typegraph/node/sdk/src/providers/prisma.ts similarity index 100% rename from typegraph/node/src/providers/prisma.ts rename to typegraph/node/sdk/src/providers/prisma.ts diff --git a/typegraph/node/src/providers/temporal.ts b/typegraph/node/sdk/src/providers/temporal.ts similarity index 100% rename from typegraph/node/src/providers/temporal.ts rename to typegraph/node/sdk/src/providers/temporal.ts diff --git a/typegraph/node/src/runtimes/deno.ts b/typegraph/node/sdk/src/runtimes/deno.ts similarity index 100% rename from typegraph/node/src/runtimes/deno.ts rename to typegraph/node/sdk/src/runtimes/deno.ts diff --git a/typegraph/node/src/runtimes/graphql.ts b/typegraph/node/sdk/src/runtimes/graphql.ts similarity index 100% rename from typegraph/node/src/runtimes/graphql.ts rename to typegraph/node/sdk/src/runtimes/graphql.ts diff --git a/typegraph/node/src/runtimes/http.ts b/typegraph/node/sdk/src/runtimes/http.ts similarity index 100% rename from typegraph/node/src/runtimes/http.ts rename to typegraph/node/sdk/src/runtimes/http.ts diff --git a/typegraph/node/src/runtimes/mod.ts b/typegraph/node/sdk/src/runtimes/mod.ts similarity index 100% rename from typegraph/node/src/runtimes/mod.ts rename to typegraph/node/sdk/src/runtimes/mod.ts diff --git a/typegraph/node/src/runtimes/python.ts b/typegraph/node/sdk/src/runtimes/python.ts similarity index 100% rename from typegraph/node/src/runtimes/python.ts rename to typegraph/node/sdk/src/runtimes/python.ts diff --git a/typegraph/node/src/runtimes/random.ts b/typegraph/node/sdk/src/runtimes/random.ts similarity index 100% rename from typegraph/node/src/runtimes/random.ts rename to typegraph/node/sdk/src/runtimes/random.ts diff --git a/typegraph/node/src/runtimes/wasmedge.ts b/typegraph/node/sdk/src/runtimes/wasmedge.ts similarity index 100% rename from typegraph/node/src/runtimes/wasmedge.ts rename to typegraph/node/sdk/src/runtimes/wasmedge.ts diff --git a/typegraph/node/src/typegraph.ts b/typegraph/node/sdk/src/typegraph.ts similarity index 97% rename from typegraph/node/src/typegraph.ts rename to typegraph/node/sdk/src/typegraph.ts index eb958fe03b..8ae4505f23 100644 --- a/typegraph/node/src/typegraph.ts +++ b/typegraph/node/sdk/src/typegraph.ts @@ -26,7 +26,7 @@ interface TypegraphArgs { rate?: Rate; } -interface TypegraphBuilderArgs { +export interface TypegraphBuilderArgs { expose: (exports: Exports, defaultPolicy?: Policy) => void; inherit: () => InheritDef; rest: (graphql: string) => number; @@ -62,7 +62,7 @@ export class InheritDef { } } -type TypegraphBuilder = (g: TypegraphBuilderArgs) => void; +export type TypegraphBuilder = (g: TypegraphBuilderArgs) => void; export class RawAuth { constructor(readonly jsonStr: string) {} diff --git a/typegraph/node/src/types.ts b/typegraph/node/sdk/src/types.ts similarity index 100% rename from typegraph/node/src/types.ts rename to typegraph/node/sdk/src/types.ts diff --git a/typegraph/node/src/utils/func_utils.ts b/typegraph/node/sdk/src/utils/func_utils.ts similarity index 100% rename from typegraph/node/src/utils/func_utils.ts rename to typegraph/node/sdk/src/utils/func_utils.ts diff --git a/typegraph/node/src/utils/injection_utils.ts b/typegraph/node/sdk/src/utils/injection_utils.ts similarity index 100% rename from typegraph/node/src/utils/injection_utils.ts rename to typegraph/node/sdk/src/utils/injection_utils.ts diff --git a/typegraph/node/src/utils/type_utils.ts b/typegraph/node/sdk/src/utils/type_utils.ts similarity index 100% rename from typegraph/node/src/utils/type_utils.ts rename to typegraph/node/sdk/src/utils/type_utils.ts diff --git a/typegraph/node/src/wit.ts b/typegraph/node/sdk/src/wit.ts similarity index 100% rename from typegraph/node/src/wit.ts rename to typegraph/node/sdk/src/wit.ts diff --git a/typegraph/node/tsconfig.json b/typegraph/node/sdk/tsconfig.json similarity index 100% rename from typegraph/node/tsconfig.json rename to typegraph/node/sdk/tsconfig.json diff --git a/whiz.yaml b/whiz.yaml index 64d34b999b..4510922b62 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -55,10 +55,11 @@ typegraph: cargo build -p typegraph_core --target wasm32-unknown-unknown --target-dir target/wasm wasm-tools component new target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE - rm -rf typegraph/node/src/gen typegraph/node/dist - jco transpile $WASM_FILE -o typegraph/node/src/gen + rm -rf typegraph/node/sdk/src/gen typegraph/node/sdk/dist + jco transpile $WASM_FILE -o typegraph/node/sdk/src/gen cd typegraph/node - pnpm run build + pnpm run sdk-build + cp ./sdk/{package.json,package-lock.json,LICENSE.md} ./sdk/dist cd ../.. rm -rf typegraph/python/typegraph/gen