diff --git a/Cargo.lock b/Cargo.lock index 67ce24b1f..1eeb39262 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1591,7 +1591,7 @@ dependencies = [ [[package]] name = "common" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "anyhow", "async-trait", @@ -6883,7 +6883,7 @@ dependencies = [ [[package]] name = "meta-cli" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "actix", "assert_cmd", @@ -6950,7 +6950,7 @@ dependencies = [ [[package]] name = "metagen" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "color-eyre", "common", @@ -6973,7 +6973,7 @@ dependencies = [ [[package]] name = "metagen-client" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "derive_more 1.0.0", "futures", @@ -7324,7 +7324,7 @@ dependencies = [ [[package]] name = "mt_deno" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "anyhow", "deno", @@ -10148,7 +10148,7 @@ dependencies = [ [[package]] name = "sample_client" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "metagen-client", "serde", @@ -10158,7 +10158,7 @@ dependencies = [ [[package]] name = "sample_client_upload" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "metagen-client", "serde", @@ -11310,7 +11310,7 @@ dependencies = [ [[package]] name = "substantial" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "anyhow", "chrono", @@ -12801,7 +12801,7 @@ dependencies = [ [[package]] name = "typegate" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "colored", "env_logger 0.11.0", @@ -12814,7 +12814,7 @@ dependencies = [ [[package]] name = "typegate_engine" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "anyhow", "base64 0.22.1", @@ -12859,7 +12859,7 @@ dependencies = [ [[package]] name = "typegraph_core" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "anyhow", "color-eyre", @@ -14645,7 +14645,7 @@ checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" [[package]] name = "xtask" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 1486a1d40..8dc21873f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ exclude = [ ] [workspace.package] -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" edition = "2021" [workspace.dependencies] diff --git a/examples/deno.jsonc b/examples/deno.jsonc index 9d5290c1b..3a1d1cf95 100644 --- a/examples/deno.jsonc +++ b/examples/deno.jsonc @@ -1,6 +1,31 @@ { "imports": { - "@typegraph/sdk/": "../src/typegraph/deno/src/" + "@typegraph/sdk/effects": "../src/typegraph/deno/src/effects.ts", + "@typegraph/sdk/envs/cli": "../src/typegraph/deno/src/envs/cli.ts", + "@typegraph/sdk": "../src/typegraph/deno/src/index.ts", + "@typegraph/sdk/io": "../src/typegraph/deno/src/io.ts", + "@typegraph/sdk/metagen": "../src/typegraph/deno/src/metagen.ts", + "@typegraph/sdk/params": "../src/typegraph/deno/src/params.ts", + "@typegraph/sdk/policy": "../src/typegraph/deno/src/policy.ts", + "@typegraph/sdk/providers/aws": "../src/typegraph/deno/src/providers/aws.ts", + "@typegraph/sdk/providers/prisma": "../src/typegraph/deno/src/providers/prisma.ts", + "@typegraph/sdk/providers/temporal": "../src/typegraph/deno/src/providers/temporal.ts", + "@typegraph/sdk/runtimes/deno": "../src/typegraph/deno/src/runtimes/deno.ts", + "@typegraph/sdk/runtimes/graphql": "../src/typegraph/deno/src/runtimes/graphql.ts", + "@typegraph/sdk/runtimes/grpc": "../src/typegraph/deno/src/runtimes/grpc.ts", + "@typegraph/sdk/runtimes/http": "../src/typegraph/deno/src/runtimes/http.ts", + "@typegraph/sdk/runtimes/kv": "../src/typegraph/deno/src/runtimes/kv.ts", + "@typegraph/sdk/runtimes/mod": "../src/typegraph/deno/src/runtimes/mod.ts", + "@typegraph/sdk/runtimes/python": "../src/typegraph/deno/src/runtimes/python.ts", + "@typegraph/sdk/runtimes/random": "../src/typegraph/deno/src/runtimes/random.ts", + "@typegraph/sdk/runtimes/substantial": "../src/typegraph/deno/src/runtimes/substantial.ts", + "@typegraph/sdk/runtimes/wasm": "../src/typegraph/deno/src/runtimes/wasm.ts", + "@typegraph/sdk/tg_artifact_upload": "../src/typegraph/deno/src/tg_artifact_upload.ts", + "@typegraph/sdk/tg_deploy": "../src/typegraph/deno/src/tg_deploy.ts", + "@typegraph/sdk/tg_manage": "../src/typegraph/deno/src/tg_manage.ts", + "@typegraph/sdk/typegraph": "../src/typegraph/deno/src/typegraph.ts", + "@typegraph/sdk/types": "../src/typegraph/deno/src/types.ts", + "@typegraph/sdk/wit": "../src/typegraph/deno/src/wit.ts" }, "lint": { "rules": { diff --git a/examples/templates/deno/api/example.ts b/examples/templates/deno/api/example.ts index 3dfd55f70..619718849 100644 --- a/examples/templates/deno/api/example.ts +++ b/examples/templates/deno/api/example.ts @@ -1,6 +1,6 @@ -import { Policy, t, typegraph } from "jsr:@typegraph/sdk@0.5.0-rc.6/index.ts"; -import { PythonRuntime } from "jsr:@typegraph/sdk@0.5.0-rc.6/runtimes/python.ts"; -import { DenoRuntime } from "jsr:@typegraph/sdk@0.5.0-rc.6/runtimes/deno.ts"; +import { Policy, t, typegraph } from "jsr:@typegraph/sdk@0.5.0-rc.7"; +import { PythonRuntime } from "jsr:@typegraph/sdk@0.5.0-rc.7/runtimes/python"; +import { DenoRuntime } from "jsr:@typegraph/sdk@0.5.0-rc.7/runtimes/deno"; await typegraph("example", (g) => { const pub = Policy.public(); diff --git a/examples/templates/deno/compose.yml b/examples/templates/deno/compose.yml index a911a1a8d..59fea7b88 100644 --- a/examples/templates/deno/compose.yml +++ b/examples/templates/deno/compose.yml @@ -1,6 +1,6 @@ services: typegate: - image: ghcr.io/metatypedev/typegate:v0.5.0-rc.6 + image: ghcr.io/metatypedev/typegate:v0.5.0-rc.7 restart: always ports: - "7890:7890" diff --git a/examples/templates/node/compose.yml b/examples/templates/node/compose.yml index 5a51e0e18..b70ef9ac4 100644 --- a/examples/templates/node/compose.yml +++ b/examples/templates/node/compose.yml @@ -1,6 +1,6 @@ services: typegate: - image: ghcr.io/metatypedev/typegate:v0.5.0-rc.6 + image: ghcr.io/metatypedev/typegate:v0.5.0-rc.7 restart: always ports: - "7890:7890" diff --git a/examples/templates/node/package.json b/examples/templates/node/package.json index 87626906b..e00c998b8 100644 --- a/examples/templates/node/package.json +++ b/examples/templates/node/package.json @@ -6,7 +6,7 @@ "dev": "MCLI_LOADER_CMD='npm x tsx' meta dev" }, "dependencies": { - "@typegraph/sdk": "^0.5.0-rc.6" + "@typegraph/sdk": "^0.5.0-rc.7" }, "devDependencies": { "tsx": "^3.13.0", diff --git a/examples/templates/python/compose.yml b/examples/templates/python/compose.yml index 5a51e0e18..b70ef9ac4 100644 --- a/examples/templates/python/compose.yml +++ b/examples/templates/python/compose.yml @@ -1,6 +1,6 @@ services: typegate: - image: ghcr.io/metatypedev/typegate:v0.5.0-rc.6 + image: ghcr.io/metatypedev/typegate:v0.5.0-rc.7 restart: always ports: - "7890:7890" diff --git a/examples/templates/python/pyproject.toml b/examples/templates/python/pyproject.toml index d96722f35..024d214ef 100644 --- a/examples/templates/python/pyproject.toml +++ b/examples/templates/python/pyproject.toml @@ -1,12 +1,12 @@ [tool.poetry] name = "example" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" description = "" authors = [] [tool.poetry.dependencies] python = ">=3.8,<4.0" -typegraph = "0.5.0-rc.6" +typegraph = "0.5.0-rc.7" [build-system] requires = ["poetry-core"] diff --git a/examples/typegraphs/authentication.ts b/examples/typegraphs/authentication.ts index 740e5c51e..e980c4233 100644 --- a/examples/typegraphs/authentication.ts +++ b/examples/typegraphs/authentication.ts @@ -1,7 +1,7 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; await typegraph( { diff --git a/examples/typegraphs/backend-for-frontend.ts b/examples/typegraphs/backend-for-frontend.ts index 08bb79b4c..3fc2b5502 100644 --- a/examples/typegraphs/backend-for-frontend.ts +++ b/examples/typegraphs/backend-for-frontend.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { HttpRuntime } from "@typegraph/sdk/runtimes/http.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { HttpRuntime } from "@typegraph/sdk/runtimes/http"; // skip:end diff --git a/examples/typegraphs/basic.ts b/examples/typegraphs/basic.ts index 86edbe9f3..e0f412cb5 100644 --- a/examples/typegraphs/basic.ts +++ b/examples/typegraphs/basic.ts @@ -1,7 +1,7 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:end diff --git a/examples/typegraphs/cors.ts b/examples/typegraphs/cors.ts index 296ba3cc7..092beb5bc 100644 --- a/examples/typegraphs/cors.ts +++ b/examples/typegraphs/cors.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; // skip:end diff --git a/examples/typegraphs/database.ts b/examples/typegraphs/database.ts index 364a34a22..539eeda0e 100644 --- a/examples/typegraphs/database.ts +++ b/examples/typegraphs/database.ts @@ -1,10 +1,10 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; // isort: off // skip:end // highlight-next-line -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; await typegraph( { diff --git a/examples/typegraphs/deno.ts b/examples/typegraphs/deno.ts index c69762936..f9d5a178c 100644 --- a/examples/typegraphs/deno.ts +++ b/examples/typegraphs/deno.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:end diff --git a/examples/typegraphs/example_rest.ts b/examples/typegraphs/example_rest.ts index b0a5c3c81..945dc81d7 100644 --- a/examples/typegraphs/example_rest.ts +++ b/examples/typegraphs/example_rest.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; await typegraph( { diff --git a/examples/typegraphs/execute.ts b/examples/typegraphs/execute.ts index 37b850f60..b78951bbe 100644 --- a/examples/typegraphs/execute.ts +++ b/examples/typegraphs/execute.ts @@ -1,8 +1,8 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import * as effects from "@typegraph/sdk/effects.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; +import { Auth } from "@typegraph/sdk/params"; +import * as effects from "@typegraph/sdk/effects"; await typegraph( { diff --git a/examples/typegraphs/faas-runner.ts b/examples/typegraphs/faas-runner.ts index 5d840c82b..5bfe107eb 100644 --- a/examples/typegraphs/faas-runner.ts +++ b/examples/typegraphs/faas-runner.ts @@ -1,7 +1,7 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; // skip:end diff --git a/examples/typegraphs/files-upload.ts b/examples/typegraphs/files-upload.ts index aea8bc1ed..9188168d1 100644 --- a/examples/typegraphs/files-upload.ts +++ b/examples/typegraphs/files-upload.ts @@ -1,5 +1,5 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { S3Runtime } from "@typegraph/sdk/providers/aws.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { S3Runtime } from "@typegraph/sdk/providers/aws"; await typegraph( { diff --git a/examples/typegraphs/first-typegraph.ts b/examples/typegraphs/first-typegraph.ts index 3d46e76c5..656401a41 100644 --- a/examples/typegraphs/first-typegraph.ts +++ b/examples/typegraphs/first-typegraph.ts @@ -1,5 +1,5 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; await typegraph( { diff --git a/examples/typegraphs/func-ctx.ts b/examples/typegraphs/func-ctx.ts index 1e388fcb5..590225be3 100644 --- a/examples/typegraphs/func-ctx.ts +++ b/examples/typegraphs/func-ctx.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; await typegraph( { diff --git a/examples/typegraphs/func-gql.ts b/examples/typegraphs/func-gql.ts index b79fa613d..afd27cbca 100644 --- a/examples/typegraphs/func-gql.ts +++ b/examples/typegraphs/func-gql.ts @@ -1,7 +1,7 @@ // skip:start -import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; await typegraph( { diff --git a/examples/typegraphs/func.ts b/examples/typegraphs/func.ts index 9f44056ff..7a319e09c 100644 --- a/examples/typegraphs/func.ts +++ b/examples/typegraphs/func.ts @@ -1,9 +1,9 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:start -import { Auth } from "@typegraph/sdk/params.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Auth } from "@typegraph/sdk/params"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; // skip:end await typegraph( diff --git a/examples/typegraphs/graphql-server.ts b/examples/typegraphs/graphql-server.ts index 7b39ca8be..6996e5a11 100644 --- a/examples/typegraphs/graphql-server.ts +++ b/examples/typegraphs/graphql-server.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { HttpRuntime } from "@typegraph/sdk/runtimes/http.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { HttpRuntime } from "@typegraph/sdk/runtimes/http"; // skip:end diff --git a/examples/typegraphs/graphql.ts b/examples/typegraphs/graphql.ts index cd07fb178..54e11ab9b 100644 --- a/examples/typegraphs/graphql.ts +++ b/examples/typegraphs/graphql.ts @@ -1,11 +1,11 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; // isort: off // skip:end // highlight-next-line -import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql.ts"; +import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql"; await typegraph( { diff --git a/examples/typegraphs/grpc.ts b/examples/typegraphs/grpc.ts index 18a97b878..6d20a3deb 100644 --- a/examples/typegraphs/grpc.ts +++ b/examples/typegraphs/grpc.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, typegraph } from "@typegraph/sdk/index.ts"; -import { GrpcRuntime } from "@typegraph/sdk/runtimes/grpc.ts"; +import { Policy, typegraph } from "@typegraph/sdk"; +import { GrpcRuntime } from "@typegraph/sdk/runtimes/grpc"; // skip:end diff --git a/examples/typegraphs/http-runtime.ts b/examples/typegraphs/http-runtime.ts index 9bb237452..0dc5390f4 100644 --- a/examples/typegraphs/http-runtime.ts +++ b/examples/typegraphs/http-runtime.ts @@ -1,10 +1,10 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; // isort: off // skip:end // highlight-next-line -import { HttpRuntime } from "@typegraph/sdk/runtimes/http.ts"; +import { HttpRuntime } from "@typegraph/sdk/runtimes/http"; await typegraph( { diff --git a/examples/typegraphs/iam-provider.ts b/examples/typegraphs/iam-provider.ts index 6b25e8a26..7bb14b975 100644 --- a/examples/typegraphs/iam-provider.ts +++ b/examples/typegraphs/iam-provider.ts @@ -1,7 +1,7 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/examples/typegraphs/index.ts b/examples/typegraphs/index.ts index 3a6edc721..799dc4148 100644 --- a/examples/typegraphs/index.ts +++ b/examples/typegraphs/index.ts @@ -1,9 +1,9 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; -import { HttpRuntime } from "@typegraph/sdk/runtimes/http.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; +import { HttpRuntime } from "@typegraph/sdk/runtimes/http"; // skip:end diff --git a/examples/typegraphs/injections.ts b/examples/typegraphs/injections.ts index b49b2e4ca..7b4df5ad3 100644 --- a/examples/typegraphs/injections.ts +++ b/examples/typegraphs/injections.ts @@ -1,5 +1,5 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; typegraph( { diff --git a/examples/typegraphs/jwt.ts b/examples/typegraphs/jwt.ts index cc396ae5e..a106f15ea 100644 --- a/examples/typegraphs/jwt.ts +++ b/examples/typegraphs/jwt.ts @@ -1,7 +1,7 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:end diff --git a/examples/typegraphs/kv.ts b/examples/typegraphs/kv.ts index d383da1ab..2d0c2ec2e 100644 --- a/examples/typegraphs/kv.ts +++ b/examples/typegraphs/kv.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, typegraph } from "@typegraph/sdk/index.ts"; -import { KvRuntime } from "@typegraph/sdk/runtimes/kv.ts"; +import { Policy, typegraph } from "@typegraph/sdk"; +import { KvRuntime } from "@typegraph/sdk/runtimes/kv"; // skip:end diff --git a/examples/typegraphs/math.ts b/examples/typegraphs/math.ts index 45db02880..3c7879c5e 100644 --- a/examples/typegraphs/math.ts +++ b/examples/typegraphs/math.ts @@ -1,7 +1,7 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; // skip:end -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; await typegraph( { diff --git a/examples/typegraphs/metagen-deno.ts b/examples/typegraphs/metagen-deno.ts index ac3bf3d9b..e88e9e9ea 100644 --- a/examples/typegraphs/metagen-deno.ts +++ b/examples/typegraphs/metagen-deno.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:end await typegraph( diff --git a/examples/typegraphs/metagen-py.ts b/examples/typegraphs/metagen-py.ts index 924932199..65e994c47 100644 --- a/examples/typegraphs/metagen-py.ts +++ b/examples/typegraphs/metagen-py.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; // skip:end await typegraph( diff --git a/examples/typegraphs/metagen-rs.ts b/examples/typegraphs/metagen-rs.ts index e4e3f74c3..b08b65807 100644 --- a/examples/typegraphs/metagen-rs.ts +++ b/examples/typegraphs/metagen-rs.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm"; // skip:end await typegraph( diff --git a/examples/typegraphs/metagen-sdk.ts b/examples/typegraphs/metagen-sdk.ts index 130a1691a..3fb8b22a2 100644 --- a/examples/typegraphs/metagen-sdk.ts +++ b/examples/typegraphs/metagen-sdk.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: MPL-2.0 // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:end -import { Metagen } from "@typegraph/sdk/metagen.ts"; +import { Metagen } from "@typegraph/sdk/metagen"; // get typegraph desc here const tg = await typegraph( diff --git a/examples/typegraphs/microservice-orchestration.ts b/examples/typegraphs/microservice-orchestration.ts index 5bb4c6109..6ab4d7c30 100644 --- a/examples/typegraphs/microservice-orchestration.ts +++ b/examples/typegraphs/microservice-orchestration.ts @@ -1,8 +1,8 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql"; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/examples/typegraphs/oauth2.ts b/examples/typegraphs/oauth2.ts index 4164497f8..02fff146a 100644 --- a/examples/typegraphs/oauth2.ts +++ b/examples/typegraphs/oauth2.ts @@ -1,7 +1,7 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:end diff --git a/examples/typegraphs/policies.ts b/examples/typegraphs/policies.ts index 46651fc6b..1517a4d79 100644 --- a/examples/typegraphs/policies.ts +++ b/examples/typegraphs/policies.ts @@ -1,8 +1,8 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; typegraph( { diff --git a/examples/typegraphs/prisma-runtime.ts b/examples/typegraphs/prisma-runtime.ts index e446afc64..a7986679a 100644 --- a/examples/typegraphs/prisma-runtime.ts +++ b/examples/typegraphs/prisma-runtime.ts @@ -1,7 +1,6 @@ // skip:start -import { Policy, t } from "@typegraph/sdk/index.ts"; -import { typegraph } from "@typegraph/sdk/typegraph.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; // skip:end diff --git a/examples/typegraphs/prisma.ts b/examples/typegraphs/prisma.ts index 5bab64ca3..c7b0de768 100644 --- a/examples/typegraphs/prisma.ts +++ b/examples/typegraphs/prisma.ts @@ -1,5 +1,5 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; typegraph( { diff --git a/examples/typegraphs/programmable-api-gateway.ts b/examples/typegraphs/programmable-api-gateway.ts index 7f372f885..08b5fd003 100644 --- a/examples/typegraphs/programmable-api-gateway.ts +++ b/examples/typegraphs/programmable-api-gateway.ts @@ -1,7 +1,7 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:end diff --git a/examples/typegraphs/quick-start-project.ts b/examples/typegraphs/quick-start-project.ts index 4b968de07..ee3dffbe8 100644 --- a/examples/typegraphs/quick-start-project.ts +++ b/examples/typegraphs/quick-start-project.ts @@ -1,7 +1,7 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; typegraph( { diff --git a/examples/typegraphs/random-field.ts b/examples/typegraphs/random-field.ts index 53c4b2f71..d62574ab8 100644 --- a/examples/typegraphs/random-field.ts +++ b/examples/typegraphs/random-field.ts @@ -1,5 +1,5 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; typegraph( { diff --git a/examples/typegraphs/rate.ts b/examples/typegraphs/rate.ts index 608c04c00..5392d1ad7 100644 --- a/examples/typegraphs/rate.ts +++ b/examples/typegraphs/rate.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; // skip:end diff --git a/examples/typegraphs/reduce.ts b/examples/typegraphs/reduce.ts index 00cdb815e..b485e7ac8 100644 --- a/examples/typegraphs/reduce.ts +++ b/examples/typegraphs/reduce.ts @@ -1,7 +1,7 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; typegraph( { diff --git a/examples/typegraphs/rest.ts b/examples/typegraphs/rest.ts index 60672ac70..75e4bd3e7 100644 --- a/examples/typegraphs/rest.ts +++ b/examples/typegraphs/rest.ts @@ -1,7 +1,7 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; typegraph( { diff --git a/examples/typegraphs/roadmap-policies.ts b/examples/typegraphs/roadmap-policies.ts index 7902f0503..6cb0ef185 100644 --- a/examples/typegraphs/roadmap-policies.ts +++ b/examples/typegraphs/roadmap-policies.ts @@ -1,7 +1,7 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { Auth } from "@typegraph/sdk/params"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; typegraph( { diff --git a/examples/typegraphs/roadmap-random.ts b/examples/typegraphs/roadmap-random.ts index 628c66634..d9502d511 100644 --- a/examples/typegraphs/roadmap-random.ts +++ b/examples/typegraphs/roadmap-random.ts @@ -1,5 +1,5 @@ -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; // skip:next-line /* eslint-disable @typescript-eslint/no-unused-vars */ diff --git a/examples/typegraphs/temporal.ts b/examples/typegraphs/temporal.ts index 851fb8a0f..fe952069d 100644 --- a/examples/typegraphs/temporal.ts +++ b/examples/typegraphs/temporal.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { TemporalRuntime } from "@typegraph/sdk/providers/temporal.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { TemporalRuntime } from "@typegraph/sdk/providers/temporal"; import process from "node:process"; typegraph( diff --git a/examples/typegraphs/triggers.ts b/examples/typegraphs/triggers.ts index ac8271060..cea1b3a5a 100644 --- a/examples/typegraphs/triggers.ts +++ b/examples/typegraphs/triggers.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { HttpRuntime } from "@typegraph/sdk/runtimes/http.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { HttpRuntime } from "@typegraph/sdk/runtimes/http"; // skip:end diff --git a/examples/typegraphs/union-either.ts b/examples/typegraphs/union-either.ts index ec4d93bda..19d60333b 100644 --- a/examples/typegraphs/union-either.ts +++ b/examples/typegraphs/union-either.ts @@ -1,6 +1,6 @@ // skip:start -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // skip:end typegraph( diff --git a/pyproject.toml b/pyproject.toml index 3286edbfc..857224f5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ [tool.poetry] name = "metatype" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" description = "" authors = [] diff --git a/src/metagen/fixtures/tg.ts b/src/metagen/fixtures/tg.ts index d69412d34..a4907919b 100644 --- a/src/metagen/fixtures/tg.ts +++ b/src/metagen/fixtures/tg.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm"; typegraph({ name: "gen-test", diff --git a/src/metagen/fixtures/tg2.ts b/src/metagen/fixtures/tg2.ts index caf28480f..680bf9f62 100644 --- a/src/metagen/fixtures/tg2.ts +++ b/src/metagen/fixtures/tg2.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; const genUser = () => ({ id: "69099108-e48b-43c9-ad02-c6514eaad6e3", diff --git a/src/pyrt_wit_wire/pyproject.toml b/src/pyrt_wit_wire/pyproject.toml index 2219100ce..843af3bc7 100644 --- a/src/pyrt_wit_wire/pyproject.toml +++ b/src/pyrt_wit_wire/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyrt_wit_wire" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" description = "Wasm component implementing the PythonRuntime host using wit_wire protocol." license = "MPL-2.0" readme = "README.md" diff --git a/src/typegate/src/runtimes/wit_wire/mod.ts b/src/typegate/src/runtimes/wit_wire/mod.ts index f6299e8ca..bdcecc910 100644 --- a/src/typegate/src/runtimes/wit_wire/mod.ts +++ b/src/typegate/src/runtimes/wit_wire/mod.ts @@ -9,7 +9,7 @@ import { getLogger } from "../../log.ts"; const logger = getLogger(import.meta); -const METATYPE_VERSION = "0.5.0-rc.6"; +const METATYPE_VERSION = "0.5.0-rc.7"; export class WitWireMessenger { static async init( diff --git a/src/typegraph/core/Cargo.toml b/src/typegraph/core/Cargo.toml index 7df464726..0b0d757e9 100644 --- a/src/typegraph/core/Cargo.toml +++ b/src/typegraph/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typegraph_core" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" edition = "2021" [lib] diff --git a/src/typegraph/core/src/global_store.rs b/src/typegraph/core/src/global_store.rs index 5f95ee80a..42545ac44 100644 --- a/src/typegraph/core/src/global_store.rs +++ b/src/typegraph/core/src/global_store.rs @@ -107,7 +107,7 @@ const PREDEFINED_DENO_FUNCTIONS: &[&str] = &["identity", "true"]; thread_local! { pub static STORE: RefCell = RefCell::new(Store::new()); - pub static SDK_VERSION: String = "0.5.0-rc.6".to_owned(); + pub static SDK_VERSION: String = "0.5.0-rc.7".to_owned(); } fn with_store T>(f: F) -> T { diff --git a/src/typegraph/deno/deno.json b/src/typegraph/deno/deno.json index ad7121212..e902c7a0d 100644 --- a/src/typegraph/deno/deno.json +++ b/src/typegraph/deno/deno.json @@ -1,6 +1,6 @@ { "name": "@typegraph/sdk", - "version": "0.5.0-rc.6", + "version": "0.5.0-rc.7", "publish": { "exclude": [ "!src/gen", @@ -18,33 +18,33 @@ "exports": { "./deps/_import.ts": "./src/deps/_import.ts", "./deps/mod.ts": "./src/deps/mod.ts", - "./effects.ts": "./src/effects.ts", - "./envs/cli.ts": "./src/envs/cli.ts", + "./effects": "./src/effects.ts", + "./envs/cli": "./src/envs/cli.ts", "./gen/typegraph_core.d.ts": "./src/gen/typegraph_core.d.ts", "./host/host.d.ts": "./src/host/host.d.ts", - "./index.ts": "./src/index.ts", - "./io.ts": "./src/io.ts", - "./metagen.ts": "./src/metagen.ts", - "./params.ts": "./src/params.ts", - "./policy.ts": "./src/policy.ts", - "./providers/aws.ts": "./src/providers/aws.ts", - "./providers/prisma.ts": "./src/providers/prisma.ts", - "./providers/temporal.ts": "./src/providers/temporal.ts", - "./runtimes/deno.ts": "./src/runtimes/deno.ts", - "./runtimes/graphql.ts": "./src/runtimes/graphql.ts", - "./runtimes/grpc.ts": "./src/runtimes/grpc.ts", - "./runtimes/http.ts": "./src/runtimes/http.ts", - "./runtimes/kv.ts": "./src/runtimes/kv.ts", - "./runtimes/mod.ts": "./src/runtimes/mod.ts", - "./runtimes/python.ts": "./src/runtimes/python.ts", - "./runtimes/random.ts": "./src/runtimes/random.ts", - "./runtimes/substantial.ts": "./src/runtimes/substantial.ts", - "./runtimes/wasm.ts": "./src/runtimes/wasm.ts", - "./tg_artifact_upload.ts": "./src/tg_artifact_upload.ts", - "./tg_deploy.ts": "./src/tg_deploy.ts", - "./tg_manage.ts": "./src/tg_manage.ts", - "./typegraph.ts": "./src/typegraph.ts", - "./types.ts": "./src/types.ts", - "./wit.ts": "./src/wit.ts" + ".": "./src/index.ts", + "./io": "./src/io.ts", + "./metagen": "./src/metagen.ts", + "./params": "./src/params.ts", + "./policy": "./src/policy.ts", + "./providers/aws": "./src/providers/aws.ts", + "./providers/prisma": "./src/providers/prisma.ts", + "./providers/temporal": "./src/providers/temporal.ts", + "./runtimes/deno": "./src/runtimes/deno.ts", + "./runtimes/graphql": "./src/runtimes/graphql.ts", + "./runtimes/grpc": "./src/runtimes/grpc.ts", + "./runtimes/http": "./src/runtimes/http.ts", + "./runtimes/kv": "./src/runtimes/kv.ts", + "./runtimes/mod": "./src/runtimes/mod.ts", + "./runtimes/python": "./src/runtimes/python.ts", + "./runtimes/random": "./src/runtimes/random.ts", + "./runtimes/substantial": "./src/runtimes/substantial.ts", + "./runtimes/wasm": "./src/runtimes/wasm.ts", + "./tg_artifact_upload": "./src/tg_artifact_upload.ts", + "./tg_deploy": "./src/tg_deploy.ts", + "./tg_manage": "./src/tg_manage.ts", + "./typegraph": "./src/typegraph.ts", + "./types": "./src/types.ts", + "./wit": "./src/wit.ts" } } diff --git a/src/typegraph/python/pyproject.toml b/src/typegraph/python/pyproject.toml index 582d73e18..eaa65a7ef 100644 --- a/src/typegraph/python/pyproject.toml +++ b/src/typegraph/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "typegraph" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" description = "Declarative API development platform. Build backend components with WASM, Typescript and Python, no matter where and how your (legacy) systems are." authors = ["Metatype Contributors "] license = "MPL-2.0" diff --git a/src/typegraph/python/typegraph/__init__.py b/src/typegraph/python/typegraph/__init__.py index d6b9ef338..33dc627cc 100644 --- a/src/typegraph/python/typegraph/__init__.py +++ b/src/typegraph/python/typegraph/__init__.py @@ -5,4 +5,4 @@ from typegraph.policy import Policy # noqa from typegraph import effects as fx # noqa -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" diff --git a/src/xtask/Cargo.toml b/src/xtask/Cargo.toml index a792626bb..12e166014 100644 --- a/src/xtask/Cargo.toml +++ b/src/xtask/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xtask" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" edition = "2021" # this allows us to exclude the rust files diff --git a/tests/dedup/tg.ts b/tests/dedup/tg.ts index fcc495725..1a383d35a 100644 --- a/tests/dedup/tg.ts +++ b/tests/dedup/tg.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; export const tg = await typegraph("dedup", (g: any) => { const rand = new RandomRuntime({}); diff --git a/tests/deno.jsonc b/tests/deno.jsonc index 3c09785b5..7f7fd4e68 100644 --- a/tests/deno.jsonc +++ b/tests/deno.jsonc @@ -1,7 +1,32 @@ { "imports": { "@std/streams": "jsr:@std/streams@^1.0.2", - "@typegraph/sdk/": "../src/typegraph/deno/src/", + "@typegraph/sdk/effects": "../src/typegraph/deno/src/effects.ts", + "@typegraph/sdk/envs/cli": "../src/typegraph/deno/src/envs/cli.ts", + "@typegraph/sdk": "../src/typegraph/deno/src/index.ts", + "@typegraph/sdk/io": "../src/typegraph/deno/src/io.ts", + "@typegraph/sdk/metagen": "../src/typegraph/deno/src/metagen.ts", + "@typegraph/sdk/params": "../src/typegraph/deno/src/params.ts", + "@typegraph/sdk/policy": "../src/typegraph/deno/src/policy.ts", + "@typegraph/sdk/providers/aws": "../src/typegraph/deno/src/providers/aws.ts", + "@typegraph/sdk/providers/prisma": "../src/typegraph/deno/src/providers/prisma.ts", + "@typegraph/sdk/providers/temporal": "../src/typegraph/deno/src/providers/temporal.ts", + "@typegraph/sdk/runtimes/deno": "../src/typegraph/deno/src/runtimes/deno.ts", + "@typegraph/sdk/runtimes/graphql": "../src/typegraph/deno/src/runtimes/graphql.ts", + "@typegraph/sdk/runtimes/grpc": "../src/typegraph/deno/src/runtimes/grpc.ts", + "@typegraph/sdk/runtimes/http": "../src/typegraph/deno/src/runtimes/http.ts", + "@typegraph/sdk/runtimes/kv": "../src/typegraph/deno/src/runtimes/kv.ts", + "@typegraph/sdk/runtimes/mod": "../src/typegraph/deno/src/runtimes/mod.ts", + "@typegraph/sdk/runtimes/python": "../src/typegraph/deno/src/runtimes/python.ts", + "@typegraph/sdk/runtimes/random": "../src/typegraph/deno/src/runtimes/random.ts", + "@typegraph/sdk/runtimes/substantial": "../src/typegraph/deno/src/runtimes/substantial.ts", + "@typegraph/sdk/runtimes/wasm": "../src/typegraph/deno/src/runtimes/wasm.ts", + "@typegraph/sdk/tg_artifact_upload": "../src/typegraph/deno/src/tg_artifact_upload.ts", + "@typegraph/sdk/tg_deploy": "../src/typegraph/deno/src/tg_deploy.ts", + "@typegraph/sdk/tg_manage": "../src/typegraph/deno/src/tg_manage.ts", + "@typegraph/sdk/typegraph": "../src/typegraph/deno/src/typegraph.ts", + "@typegraph/sdk/types": "../src/typegraph/deno/src/types.ts", + "@typegraph/sdk/wit": "../src/typegraph/deno/src/wit.ts", "@local/tools/": "../tools/", "@metatype/typegate/": "../src/typegate/src/", "@std/async": "jsr:@std/async@^1.0.3", diff --git a/tests/docs/how-tos/prog_deploy/prog_deploy.ts b/tests/docs/how-tos/prog_deploy/prog_deploy.ts index 2f58409ed..ea92de24a 100644 --- a/tests/docs/how-tos/prog_deploy/prog_deploy.ts +++ b/tests/docs/how-tos/prog_deploy/prog_deploy.ts @@ -3,11 +3,11 @@ // SPDX-License-Identifier: MPL-2.0 // skip:end -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // deno-lint-ignore no-external-import import * as path from "node:path"; -import { BasicAuth, tgDeploy } from "@typegraph/sdk/tg_deploy.ts"; +import { BasicAuth, tgDeploy } from "@typegraph/sdk/tg_deploy"; // Your typegraph export const tg = await typegraph("example", (g) => { diff --git a/tests/docs/how-tos/prog_deploy/prog_remove.ts b/tests/docs/how-tos/prog_deploy/prog_remove.ts index 244aa5aa8..d2ef5af19 100644 --- a/tests/docs/how-tos/prog_deploy/prog_remove.ts +++ b/tests/docs/how-tos/prog_deploy/prog_remove.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: MPL-2.0 // skip:end -import { typegraph } from "@typegraph/sdk/index.ts"; -import { BasicAuth, tgRemove } from "@typegraph/sdk/tg_deploy.ts"; +import { typegraph } from "@typegraph/sdk"; +import { BasicAuth, tgRemove } from "@typegraph/sdk/tg_deploy"; // Your typegraph const tg = await typegraph("example", (_g) => { diff --git a/tests/e2e/cli/typegraphs/deps.ts b/tests/e2e/cli/typegraphs/deps.ts index b5b9472d5..fdf50c7f2 100644 --- a/tests/e2e/cli/typegraphs/deps.ts +++ b/tests/e2e/cli/typegraphs/deps.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; await typegraph("deps", (g) => { const pub = Policy.public(); diff --git a/tests/e2e/published/published_test.ts b/tests/e2e/published/published_test.ts index f92e9ca96..df61a7294 100644 --- a/tests/e2e/published/published_test.ts +++ b/tests/e2e/published/published_test.ts @@ -20,6 +20,8 @@ const previousVersion = PUBLISHED_VERSION; const tempDir = $.path(projectDir).join("tmp"); +type Path = typeof tempDir; + function getAssetName(version: string) { return `meta-cli-v${version}-${Deno.build.target}`; } @@ -110,6 +112,38 @@ export async function downloadAndExtractCli(version: string) { return metaBin.toString(); } +type CopyCodeParams = { + branch: string; + destDir: Path; + files: (string | [string, string])[]; +}; + +async function copyCode({ branch, files, destDir: dest }: CopyCodeParams) { + const destDir = $.path(dest); + console.log("copyCode", { branch, files, destDir }); + const repoDir = $.path(`.metatype/old/${branch}`); + if (!(await repoDir.exists())) { + await $`git clone https://github.com/metatypedev/metatype.git ${repoDir} --depth 1 --branch ${branch}` + .stdout("inherit") + .stderr("inherit") + .printCommand(); + } + + await $.co( + files.map((file) => { + const [source, dest] = Array.isArray(file) ? file : [file, file]; + // if (dest.endsWith("/")) { + // return $.path(repoDir).join(source).copyToDir(destDir.join(dest), { + // overwrite: true, + // }); + // } + return $.path(repoDir).join(source).copy(destDir.join(dest), { + overwrite: true, + }); + }), + ); +} + // This also tests the published NPM version of the SDK Meta.test( { @@ -176,16 +210,12 @@ Meta.test( async () => { const tag = `v${previousVersion}`; - // FIXME: cache across test runs - await $`git clone https://github.com/metatypedev/metatype.git --depth 1 --branch ${tag}` - .cwd(repoDir) - .stdout("piped") - .stderr("piped") - .printCommand(); - - await $.path(repoDir).join("metatype/examples").copy(examplesDir, { - overwrite: true, + await copyCode({ + branch: tag, + files: ["examples"], + destDir: examplesDir, }); + const typegraphsDir = examplesDir.join("typegraphs"); for await (const entry of typegraphsDir.readDir()) { const path = typegraphsDir.relative(entry.path); @@ -370,10 +400,16 @@ typegraphs: .cwd( npmJsrDir, ); + await copyCode({ + branch: `v${previousVersion}`, + destDir: npmJsrDir, + files: [ + ["examples/typegraphs/func.ts", "tg.ts"], + ["examples/typegraphs/scripts", "scripts"], + ["examples/templates/node/tsconfig.json", "tsconfig.json"], + ], + }); await $.co([ - $.path("examples/typegraphs/func.ts").copy(npmJsrDir.join("tg.ts")), - $.path("examples/typegraphs/scripts").copyToDir(npmJsrDir), - $.path("examples/templates/node/tsconfig.json").copyToDir(npmJsrDir), npmJsrDir .join("package.json") .readJson() @@ -399,10 +435,14 @@ typegraphs: await $`bash -c 'deno add @typegraph/sdk@${PUBLISHED_VERSION}'`.cwd( denoJsrDir, ); - await $.co([ - $.path("examples/typegraphs/func.ts").copy(denoJsrDir.join("tg.ts")), - $.path("examples/typegraphs/scripts").copyToDir(denoJsrDir), - ]); + await copyCode({ + branch: `v${previousVersion}`, + files: [ + ["examples/typegraphs/func.ts", "tg.ts"], + ["examples/typegraphs/scripts", "scripts"], + ], + destDir: denoJsrDir, + }); const command = `meta-old deploy --target dev --allow-dirty --gate http://localhost:${port} -vvv -f tg.ts`; diff --git a/tests/e2e/self_deploy/self_deploy.ts b/tests/e2e/self_deploy/self_deploy.ts index c039be3c0..9db85b5ad 100644 --- a/tests/e2e/self_deploy/self_deploy.ts +++ b/tests/e2e/self_deploy/self_deploy.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; // export the typegraph export const tg = await typegraph({ diff --git a/tests/e2e/self_deploy/self_deploy_test.ts b/tests/e2e/self_deploy/self_deploy_test.ts index 2361ad0a3..07f865812 100644 --- a/tests/e2e/self_deploy/self_deploy_test.ts +++ b/tests/e2e/self_deploy/self_deploy_test.ts @@ -1,6 +1,6 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { BasicAuth, tgDeploy, tgRemove } from "@typegraph/sdk/tg_deploy.ts"; +import { BasicAuth, tgDeploy, tgRemove } from "@typegraph/sdk/tg_deploy"; import { Meta } from "test-utils/mod.ts"; import { tg } from "./self_deploy.ts"; diff --git a/tests/e2e/templates/templates_test.ts b/tests/e2e/templates/templates_test.ts index 1de81e336..f58bd14e3 100644 --- a/tests/e2e/templates/templates_test.ts +++ b/tests/e2e/templates/templates_test.ts @@ -45,7 +45,7 @@ const install = { ) { const content = await Deno.readTextFile(path); const rewrite = content.replace( - /"(jsr:@typegraph\/sdk@[0-9]+\.[0-9]+\.[0-9]+)(-[a-z.0-9]+)?(.+)";/g, + /"(jsr:@typegraph\/sdk@[0-9]+\.[0-9]+\.[0-9]+)(-[a-z.0-9]+)?(.*)";/g, (_m, _pref, _, mod) => `"@typegraph/sdk${mod}"`, ); await Deno.writeTextFile(path, rewrite); diff --git a/tests/e2e/typegraph/typegraphs/deno/complex.ts b/tests/e2e/typegraph/typegraphs/deno/complex.ts index 12cb5c0ce..2955f2eb3 100644 --- a/tests/e2e/typegraph/typegraphs/deno/complex.ts +++ b/tests/e2e/typegraph/typegraphs/deno/complex.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { Auth } from "@typegraph/sdk/params.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { Auth } from "@typegraph/sdk/params"; typegraph( { diff --git a/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts b/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts index 656c07568..d7a2a0a54 100644 --- a/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts +++ b/tests/e2e/typegraph/typegraphs/deno/multiple_runtimes.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; typegraph("test-multiple-runtimes", (g: any) => { const pub = Policy.public(); diff --git a/tests/e2e/typegraph/typegraphs/deno/simple.ts b/tests/e2e/typegraph/typegraphs/deno/simple.ts index 6f86e4079..7546b95cd 100644 --- a/tests/e2e/typegraph/typegraphs/deno/simple.ts +++ b/tests/e2e/typegraph/typegraphs/deno/simple.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; const a = t.integer(); diff --git a/tests/e2e/website/website_test.ts b/tests/e2e/website/website_test.ts index f4785d11e..c10ff2754 100644 --- a/tests/e2e/website/website_test.ts +++ b/tests/e2e/website/website_test.ts @@ -112,6 +112,7 @@ for (const name of list) { Meta.test( { name: `serialize typegraphs: ${name}`, + // only: name === "authentication", }, async (t) => { const prepareFn = prepare[name]; diff --git a/tests/injection/injection.ts b/tests/injection/injection.ts index fc8bceebc..432619269 100644 --- a/tests/injection/injection.ts +++ b/tests/injection/injection.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.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"; +import { CREATE, DELETE, READ, UPDATE } from "@typegraph/sdk/effects"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; const tpe = t.struct({ a: t.integer({}, { name: "A" }), diff --git a/tests/injection/random_injection.ts b/tests/injection/random_injection.ts index 2033b1eb8..e2a71ff71 100644 --- a/tests/injection/random_injection.ts +++ b/tests/injection/random_injection.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; const user = t.struct({ id: t.uuid().fromRandom(), diff --git a/tests/metagen/__snapshots__/metagen_test.ts.snap b/tests/metagen/__snapshots__/metagen_test.ts.snap index f9c2c7877..d1f7293c7 100644 --- a/tests/metagen/__snapshots__/metagen_test.ts.snap +++ b/tests/metagen/__snapshots__/metagen_test.ts.snap @@ -454,7 +454,7 @@ impl Router { } pub fn init(&self, args: InitArgs) -> Result { - static MT_VERSION: &str = "0.5.0-rc.6"; + static MT_VERSION: &str = "0.5.0-rc.7"; if args.metatype_version != MT_VERSION { return Err(InitError::VersionMismatch(MT_VERSION.into())); } @@ -1257,7 +1257,7 @@ impl Router { } pub fn init(&self, args: InitArgs) -> Result { - static MT_VERSION: &str = "0.5.0-rc.6"; + static MT_VERSION: &str = "0.5.0-rc.7"; if args.metatype_version != MT_VERSION { return Err(InitError::VersionMismatch(MT_VERSION.into())); } diff --git a/tests/metagen/metagen_test.ts b/tests/metagen/metagen_test.ts index 8b81c7c4d..cc8fb36c6 100644 --- a/tests/metagen/metagen_test.ts +++ b/tests/metagen/metagen_test.ts @@ -166,7 +166,7 @@ Meta.test("Metagen within sdk", async (t) => { await t.should("Run metagen within typescript", async () => { const { tg } = await import("./typegraphs/metagen.ts"); - const { Metagen } = await import("@typegraph/sdk/metagen.ts"); + const { Metagen } = await import("@typegraph/sdk/metagen"); const metagen = new Metagen(workspace, genConfig); const generated = metagen.dryRun(tg, targetName); const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); @@ -234,7 +234,7 @@ Meta.test("Metagen within sdk with custom template", async (t) => { await t.should("Run metagen within typescript", async () => { const { tg } = await import("./typegraphs/metagen.ts"); - const { Metagen } = await import("@typegraph/sdk/metagen.ts"); + const { Metagen } = await import("@typegraph/sdk/metagen"); const metagen = new Metagen(workspace, genConfig); const generated = metagen.dryRun(tg, targetName); const sorted = generated.sort((a, b) => a.path.localeCompare(b.path)); diff --git a/tests/metagen/typegraphs/file_upload_sample.ts b/tests/metagen/typegraphs/file_upload_sample.ts index 5cd0fd02d..359e16730 100644 --- a/tests/metagen/typegraphs/file_upload_sample.ts +++ b/tests/metagen/typegraphs/file_upload_sample.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { S3Runtime } from "@typegraph/sdk/providers/aws.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { S3Runtime } from "@typegraph/sdk/providers/aws"; export const tg = await typegraph({ name: "sample", diff --git a/tests/metagen/typegraphs/identities/rs/fdk.rs b/tests/metagen/typegraphs/identities/rs/fdk.rs index 8e24bbc74..813b593ea 100644 --- a/tests/metagen/typegraphs/identities/rs/fdk.rs +++ b/tests/metagen/typegraphs/identities/rs/fdk.rs @@ -109,7 +109,7 @@ impl Router { } pub fn init(&self, args: InitArgs) -> Result { - static MT_VERSION: &str = "0.5.0-rc.6"; + static MT_VERSION: &str = "0.5.0-rc.7"; if args.metatype_version != MT_VERSION { return Err(InitError::VersionMismatch(MT_VERSION.into())); } diff --git a/tests/metagen/typegraphs/metagen.ts b/tests/metagen/typegraphs/metagen.ts index 82f82958b..a746c6fbc 100644 --- a/tests/metagen/typegraphs/metagen.ts +++ b/tests/metagen/typegraphs/metagen.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; export const tg = await typegraph( { diff --git a/tests/metagen/typegraphs/sample.ts b/tests/metagen/typegraphs/sample.ts index 2699b7373..9657c0927 100644 --- a/tests/metagen/typegraphs/sample.ts +++ b/tests/metagen/typegraphs/sample.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; const genPost = () => ({ id: "69099108-e48b-43c9-ad02-c6514eaad6e3", diff --git a/tests/metagen/typegraphs/sample/rs/Cargo.toml b/tests/metagen/typegraphs/sample/rs/Cargo.toml index 645aa66b5..f46aae47a 100644 --- a/tests/metagen/typegraphs/sample/rs/Cargo.toml +++ b/tests/metagen/typegraphs/sample/rs/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sample_client" edition = "2021" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" [dependencies] metagen-client.workspace = true diff --git a/tests/metagen/typegraphs/sample/rs_upload/Cargo.toml b/tests/metagen/typegraphs/sample/rs_upload/Cargo.toml index e3ee25637..bca02df5c 100644 --- a/tests/metagen/typegraphs/sample/rs_upload/Cargo.toml +++ b/tests/metagen/typegraphs/sample/rs_upload/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sample_client_upload" edition = "2021" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" [dependencies] metagen-client.workspace = true diff --git a/tests/multi_typegraph/multi_typegraph.ts b/tests/multi_typegraph/multi_typegraph.ts index 214030dea..05e6b9559 100644 --- a/tests/multi_typegraph/multi_typegraph.ts +++ b/tests/multi_typegraph/multi_typegraph.ts @@ -1,11 +1,11 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; import outdent from "outdent"; -import { TemporalRuntime } from "@typegraph/sdk/providers/temporal.ts"; +import { TemporalRuntime } from "@typegraph/sdk/providers/temporal"; function randomFunc() { return { data: null }; diff --git a/tests/rest/rest_custom_loader.ts b/tests/rest/rest_custom_loader.ts index cd99d8628..2a1f2cc6e 100644 --- a/tests/rest/rest_custom_loader.ts +++ b/tests/rest/rest_custom_loader.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; import { endpoints } from "./custom/custom_loader.ts"; const user = t.struct( diff --git a/tests/rest/rest_schema.ts b/tests/rest/rest_schema.ts index 81b602943..e5c5b223a 100644 --- a/tests/rest/rest_schema.ts +++ b/tests/rest/rest_schema.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; export const tg = await typegraph("rest_schema", (g: any) => { const deno = new DenoRuntime(); diff --git a/tests/runtimes/deno/deno_dep.ts b/tests/runtimes/deno/deno_dep.ts index b7e87da08..e7883a7f3 100644 --- a/tests/runtimes/deno/deno_dep.ts +++ b/tests/runtimes/deno/deno_dep.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; export const tg = await typegraph( { diff --git a/tests/runtimes/deno/deno_dir.ts b/tests/runtimes/deno/deno_dir.ts index 11b352ebb..0f394ac3b 100644 --- a/tests/runtimes/deno/deno_dir.ts +++ b/tests/runtimes/deno/deno_dir.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; export const tg = await typegraph( { diff --git a/tests/runtimes/deno/deno_duplicate_artifact.ts b/tests/runtimes/deno/deno_duplicate_artifact.ts index 077cef932..277adc3ab 100644 --- a/tests/runtimes/deno/deno_duplicate_artifact.ts +++ b/tests/runtimes/deno/deno_duplicate_artifact.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; export const tg = await typegraph( { diff --git a/tests/runtimes/deno/deno_globs.ts b/tests/runtimes/deno/deno_globs.ts index a4f2b6d1e..a4be5b078 100644 --- a/tests/runtimes/deno/deno_globs.ts +++ b/tests/runtimes/deno/deno_globs.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; export const tg = await typegraph( { diff --git a/tests/runtimes/deno/deno_typescript.ts b/tests/runtimes/deno/deno_typescript.ts index f6ef82702..53f494378 100644 --- a/tests/runtimes/deno/deno_typescript.ts +++ b/tests/runtimes/deno/deno_typescript.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; const hello = ({ name }: any) => `Hello ${name}`; function helloFn({ name }: any) { diff --git a/tests/runtimes/graphql/typegraphs/deno/graphql.ts b/tests/runtimes/graphql/typegraphs/deno/graphql.ts index a084eea1c..57b39fe87 100644 --- a/tests/runtimes/graphql/typegraphs/deno/graphql.ts +++ b/tests/runtimes/graphql/typegraphs/deno/graphql.ts @@ -1,10 +1,10 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql.ts"; -import * as effects from "@typegraph/sdk/effects.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { GraphQLRuntime } from "@typegraph/sdk/runtimes/graphql"; +import * as effects from "@typegraph/sdk/effects"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; const user = t.struct( { diff --git a/tests/runtimes/grpc/helloworld.ts b/tests/runtimes/grpc/helloworld.ts index 4766b9f18..c945781f4 100644 --- a/tests/runtimes/grpc/helloworld.ts +++ b/tests/runtimes/grpc/helloworld.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, typegraph } from "@typegraph/sdk/index.ts"; -import { GrpcRuntime } from "@typegraph/sdk/runtimes/grpc.ts"; +import { Policy, typegraph } from "@typegraph/sdk"; +import { GrpcRuntime } from "@typegraph/sdk/runtimes/grpc"; export const tg = await typegraph("helloworld", (g) => { const endpoint = "tcp://localhost:4770"; diff --git a/tests/runtimes/kv/kv.ts b/tests/runtimes/kv/kv.ts index c238cfd09..5f366457b 100644 --- a/tests/runtimes/kv/kv.ts +++ b/tests/runtimes/kv/kv.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, typegraph } from "@typegraph/sdk/index.ts"; -import { KvRuntime } from "@typegraph/sdk/runtimes/kv.ts"; +import { Policy, typegraph } from "@typegraph/sdk"; +import { KvRuntime } from "@typegraph/sdk/runtimes/kv"; export const tg = await typegraph("kv", (g) => { const kv = new KvRuntime("REDIS"); diff --git a/tests/runtimes/prisma/normal_1_1.ts b/tests/runtimes/prisma/normal_1_1.ts index 74cee34d5..6be4d4949 100644 --- a/tests/runtimes/prisma/normal_1_1.ts +++ b/tests/runtimes/prisma/normal_1_1.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; export const tg = await typegraph("prisma_normal", (g: any) => { const db = new PrismaRuntime("prisma", "POSTGRES"); diff --git a/tests/runtimes/prisma/optional_1_n.ts b/tests/runtimes/prisma/optional_1_n.ts index e0fbdd002..c82487bc1 100644 --- a/tests/runtimes/prisma/optional_1_n.ts +++ b/tests/runtimes/prisma/optional_1_n.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PrismaRuntime } from "@typegraph/sdk/providers/prisma"; export const tg = await typegraph("prisma_opt_1", (g: any) => { const db = new PrismaRuntime("prisma", "POSTGRES"); diff --git a/tests/runtimes/python/python.ts b/tests/runtimes/python/python.ts index f1f10930f..0f099d4b2 100644 --- a/tests/runtimes/python/python.ts +++ b/tests/runtimes/python/python.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; import outdent from "outdent"; const tpe = t.struct({ diff --git a/tests/runtimes/python/python_dir.ts b/tests/runtimes/python/python_dir.ts index 81bde6d6e..e819b7cd4 100644 --- a/tests/runtimes/python/python_dir.ts +++ b/tests/runtimes/python/python_dir.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; +import { Policy, t, typegraph } from "@typegraph/sdk"; const tpe = t.struct({ a: t.string(), diff --git a/tests/runtimes/python/python_duplicate_artifact.ts b/tests/runtimes/python/python_duplicate_artifact.ts index 0e3c25a3d..045450819 100644 --- a/tests/runtimes/python/python_duplicate_artifact.ts +++ b/tests/runtimes/python/python_duplicate_artifact.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; const tpe = t.struct({ a: t.string(), diff --git a/tests/runtimes/python/python_globs.ts b/tests/runtimes/python/python_globs.ts index a75d3c09c..3cbec6d36 100644 --- a/tests/runtimes/python/python_globs.ts +++ b/tests/runtimes/python/python_globs.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; +import { Policy, t, typegraph } from "@typegraph/sdk"; const tpe = t.struct({ a: t.string(), diff --git a/tests/runtimes/python/python_no_artifact.ts b/tests/runtimes/python/python_no_artifact.ts index 42498207c..4fddddc4f 100644 --- a/tests/runtimes/python/python_no_artifact.ts +++ b/tests/runtimes/python/python_no_artifact.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { PythonRuntime } from "@typegraph/sdk/runtimes/python.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { PythonRuntime } from "@typegraph/sdk/runtimes/python"; import outdent from "outdent"; const tpe = t.struct({ diff --git a/tests/runtimes/random/random.ts b/tests/runtimes/random/random.ts index 1e8be8c5f..eb224d046 100644 --- a/tests/runtimes/random/random.ts +++ b/tests/runtimes/random/random.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; export const tg = await typegraph("random", (g: any) => { const random = new RandomRuntime({ seed: 1, reset: "" }); diff --git a/tests/runtimes/s3/s3.ts b/tests/runtimes/s3/s3.ts index 25100ffc3..eaf5dfc2c 100644 --- a/tests/runtimes/s3/s3.ts +++ b/tests/runtimes/s3/s3.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { S3Runtime } from "@typegraph/sdk/providers/aws.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { S3Runtime } from "@typegraph/sdk/providers/aws"; typegraph("s3", (g: any) => { const pub = Policy.public(); diff --git a/tests/runtimes/substantial/common.ts b/tests/runtimes/substantial/common.ts index d546074a0..9dca65020 100644 --- a/tests/runtimes/substantial/common.ts +++ b/tests/runtimes/substantial/common.ts @@ -633,7 +633,7 @@ export function inputMutationTemplate( }: { secrets?: Record; }, - cleanup?: MetaTestCleanupFn + cleanup?: MetaTestCleanupFn, ) { Meta.test( { @@ -674,11 +674,11 @@ export function inputMutationTemplate( currentRunId = body.data?.start_mut! as string; assertExists( currentRunId, - "Run id was not returned when workflow was started" + "Run id was not returned when workflow was started", ); }) .on(e); - } + }, ); await sleep(15 * 1000); @@ -732,9 +732,9 @@ export function inputMutationTemplate( }, }) .on(e); - } + }, ); - } + }, ); } diff --git a/tests/runtimes/temporal/temporal.ts b/tests/runtimes/temporal/temporal.ts index abc7d7b3b..3bdf4f366 100644 --- a/tests/runtimes/temporal/temporal.ts +++ b/tests/runtimes/temporal/temporal.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { TemporalRuntime } from "@typegraph/sdk/providers/temporal.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { TemporalRuntime } from "@typegraph/sdk/providers/temporal"; export const tg = await typegraph("temporal", (g: any) => { const pub = Policy.public(); diff --git a/tests/runtimes/wasm_reflected/rust/Cargo.toml b/tests/runtimes/wasm_reflected/rust/Cargo.toml index 7ffa7b88b..7519bad1c 100644 --- a/tests/runtimes/wasm_reflected/rust/Cargo.toml +++ b/tests/runtimes/wasm_reflected/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust" -version = "0.5.0-rc.6" +version = "0.5.0-rc.7" edition = "2021" [lib] diff --git a/tests/runtimes/wasm_reflected/wasm_reflected.ts b/tests/runtimes/wasm_reflected/wasm_reflected.ts index a27601fbe..003076378 100644 --- a/tests/runtimes/wasm_reflected/wasm_reflected.ts +++ b/tests/runtimes/wasm_reflected/wasm_reflected.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm"; export const tg = await typegraph("wasm-reflected-ts", (g: any) => { const entity = t.struct({ diff --git a/tests/runtimes/wasm_wire/wasm_duplicate.ts b/tests/runtimes/wasm_wire/wasm_duplicate.ts index 6bc76fe1a..6e6de1f73 100644 --- a/tests/runtimes/wasm_wire/wasm_duplicate.ts +++ b/tests/runtimes/wasm_wire/wasm_duplicate.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm"; export const tg = await typegraph("wasm-duplicate-ts", (g: any) => { const wasm1 = WasmRuntime.wire("rust.wasm"); diff --git a/tests/runtimes/wasm_wire/wasm_wire.ts b/tests/runtimes/wasm_wire/wasm_wire.ts index 27bd7a34f..5cba1f45f 100644 --- a/tests/runtimes/wasm_wire/wasm_wire.ts +++ b/tests/runtimes/wasm_wire/wasm_wire.ts @@ -1,9 +1,9 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm.ts"; -import { RandomRuntime } from "@typegraph/sdk/runtimes/random.ts"; +import { Policy, t, typegraph } from "@typegraph/sdk"; +import { WasmRuntime } from "@typegraph/sdk/runtimes/wasm"; +import { RandomRuntime } from "@typegraph/sdk/runtimes/random"; export const tg = await typegraph("wasm-wire-ts", (g: any) => { const entity = t diff --git a/tests/typecheck/reduce.ts b/tests/typecheck/reduce.ts index 5008e61c8..b1b8f1f31 100644 --- a/tests/typecheck/reduce.ts +++ b/tests/typecheck/reduce.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { fx, Policy, t, typegraph } from "@typegraph/sdk/index.ts"; -import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.ts"; +import { fx, Policy, t, typegraph } from "@typegraph/sdk"; +import { DenoRuntime } from "@typegraph/sdk/runtimes/deno"; const student = t.struct( { diff --git a/tests/utils/tg_deploy_script.ts b/tests/utils/tg_deploy_script.ts index 229781d3a..e506914a4 100644 --- a/tests/utils/tg_deploy_script.ts +++ b/tests/utils/tg_deploy_script.ts @@ -1,7 +1,7 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -import { BasicAuth, tgDeploy } from "@typegraph/sdk/tg_deploy.ts"; +import { BasicAuth, tgDeploy } from "@typegraph/sdk/tg_deploy"; import * as path from "@std/path"; const cwd = Deno.args[0]; diff --git a/tools/consts.ts b/tools/consts.ts index 01707f3ba..4b05ef312 100644 --- a/tools/consts.ts +++ b/tools/consts.ts @@ -1,8 +1,8 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. // SPDX-License-Identifier: MPL-2.0 -export const METATYPE_VERSION = "0.5.0-rc.6"; -export const PUBLISHED_VERSION = "0.5.0-rc.5"; +export const METATYPE_VERSION = "0.5.0-rc.7"; +export const PUBLISHED_VERSION = "0.5.0-rc.6"; export const GHJK_VERSION = "v0.2.1"; export const GHJK_ACTION_VERSION = "318209a9d215f70716a4ac89dbeb9653a2deb8bc"; export const RUST_VERSION = "1.80.1";