From 2ebce459a99d0eef373f6b4c4a450c66f0d0b928 Mon Sep 17 00:00:00 2001 From: Natoandro Date: Wed, 27 Nov 2024 00:25:47 +0300 Subject: [PATCH] unify JS/TS imports --- examples/deno.jsonc | 27 +++++++++- examples/typegraphs/authentication.ts | 6 +-- examples/typegraphs/backend-for-frontend.ts | 4 +- examples/typegraphs/basic.ts | 6 +-- examples/typegraphs/cors.ts | 4 +- examples/typegraphs/database.ts | 4 +- examples/typegraphs/deno.ts | 4 +- examples/typegraphs/example_rest.ts | 4 +- examples/typegraphs/execute.ts | 10 ++-- examples/typegraphs/faas-runner.ts | 6 +-- examples/typegraphs/files-upload.ts | 4 +- examples/typegraphs/first-typegraph.ts | 4 +- examples/typegraphs/func-ctx.ts | 4 +- examples/typegraphs/func-gql.ts | 6 +-- examples/typegraphs/func.ts | 8 +-- examples/typegraphs/graphql-server.ts | 4 +- examples/typegraphs/graphql.ts | 6 +-- examples/typegraphs/grpc.ts | 4 +- examples/typegraphs/http-runtime.ts | 4 +- examples/typegraphs/iam-provider.ts | 6 +-- examples/typegraphs/index.ts | 8 +-- examples/typegraphs/injections.ts | 4 +- examples/typegraphs/jwt.ts | 6 +-- examples/typegraphs/kv.ts | 4 +- examples/typegraphs/math.ts | 4 +- examples/typegraphs/metagen-deno.ts | 4 +- examples/typegraphs/metagen-py.ts | 4 +- examples/typegraphs/metagen-rs.ts | 4 +- examples/typegraphs/metagen-sdk.ts | 6 +-- .../typegraphs/microservice-orchestration.ts | 6 +-- examples/typegraphs/oauth2.ts | 6 +-- examples/typegraphs/policies.ts | 8 +-- examples/typegraphs/prisma-runtime.ts | 5 +- examples/typegraphs/prisma.ts | 4 +- .../typegraphs/programmable-api-gateway.ts | 4 +- examples/typegraphs/quick-start-project.ts | 8 +-- examples/typegraphs/random-field.ts | 4 +- examples/typegraphs/rate.ts | 4 +- examples/typegraphs/reduce.ts | 8 +-- examples/typegraphs/rest.ts | 8 +-- examples/typegraphs/roadmap-policies.ts | 8 +-- examples/typegraphs/roadmap-random.ts | 4 +- examples/typegraphs/temporal.ts | 4 +- examples/typegraphs/triggers.ts | 4 +- examples/typegraphs/union-either.ts | 4 +- src/typegraph/deno/deno.json | 52 +++++++++---------- tests/dedup/tg.ts | 4 +- tests/deno.jsonc | 27 +++++++++- tests/docs/how-tos/prog_deploy/prog_deploy.ts | 6 +-- tests/docs/how-tos/prog_deploy/prog_remove.ts | 4 +- tests/e2e/self_deploy/self_deploy.ts | 4 +- .../e2e/typegraph/typegraphs/deno/complex.ts | 6 +-- .../typegraphs/deno/multiple_runtimes.ts | 6 +-- tests/e2e/typegraph/typegraphs/deno/simple.ts | 4 +- tests/e2e/website/website_test.ts | 1 + tests/injection/injection.ts | 6 +-- tests/injection/random_injection.ts | 4 +- tests/metagen/typegraphs/metagen.ts | 4 +- tests/metagen/typegraphs/sample.ts | 6 +-- tests/multi_typegraph/multi_typegraph.ts | 8 +-- tests/rest/rest_custom_loader.ts | 4 +- tests/rest/rest_schema.ts | 4 +- tests/runtimes/deno/deno_dep.ts | 4 +- tests/runtimes/deno/deno_dir.ts | 4 +- .../runtimes/deno/deno_duplicate_artifact.ts | 4 +- tests/runtimes/deno/deno_globs.ts | 4 +- tests/runtimes/deno/deno_typescript.ts | 4 +- .../graphql/typegraphs/deno/graphql.ts | 8 +-- tests/runtimes/grpc/helloworld.ts | 4 +- tests/runtimes/kv/kv.ts | 4 +- tests/runtimes/prisma/normal_1_1.ts | 4 +- tests/runtimes/prisma/optional_1_n.ts | 4 +- tests/runtimes/python/python.ts | 4 +- tests/runtimes/python/python_dir.ts | 4 +- .../python/python_duplicate_artifact.ts | 4 +- tests/runtimes/python/python_globs.ts | 4 +- tests/runtimes/python/python_no_artifact.ts | 4 +- tests/runtimes/random/random.ts | 4 +- tests/runtimes/s3/s3.ts | 4 +- tests/runtimes/temporal/temporal.ts | 4 +- .../runtimes/wasm_reflected/wasm_reflected.ts | 4 +- tests/runtimes/wasm_wire/wasm_duplicate.ts | 4 +- tests/runtimes/wasm_wire/wasm_wire.ts | 6 +-- tests/typecheck/reduce.ts | 4 +- tests/utils/tg_deploy_script.ts | 2 +- 85 files changed, 277 insertions(+), 227 deletions(-) diff --git a/examples/deno.jsonc b/examples/deno.jsonc index 9d5290c1b3..29f170ec8d 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/typegraphs/authentication.ts b/examples/typegraphs/authentication.ts index 740e5c51e9..e980c42331 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 08bb79b4c8..3fc2b5502c 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 86edbe9f34..e0f412cb51 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 296ba3cc77..092beb5bc3 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 364a34a220..539eeda0ef 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 c69762936e..f9d5a178c7 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 b0a5c3c81a..945dc81d74 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 37b850f604..b78951bbe8 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 5d840c82b7..5bfe107eb4 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 aea8bc1edf..9188168d10 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 3d46e76c5d..656401a418 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 1e388fcb59..590225be36 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 b79fa613d4..afd27cbca9 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 9f44056ff6..7a319e09c3 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 7b39ca8bed..6996e5a11e 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 cd07fb1787..54e11ab9ba 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 18a97b878b..6d20a3debd 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 9bb2374523..0dc5390f47 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 6b25e8a26b..7bb14b975e 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 3a6edc721f..799dc41485 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 b49b2e4ca8..7b4df5ad3e 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 cc396ae5ed..a106f15eac 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 d383da1ab4..2d0c2ec2e3 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 45db028804..3c7879c5e7 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 ac3bf3d9b0..e88e9e9ea1 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 924932199b..65e994c476 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 e4e3f74c3e..b08b658073 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 130a1691ab..3fb8b22a2e 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 5bb4c61095..6ab4d7c303 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 4164497f84..02fff146af 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 46651fc6b0..1517a4d791 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 e446afc640..a7986679a0 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 5bab64ca34..c7b0de768a 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 7f372f885d..08b5fd0038 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 4b968de079..ee3dffbe83 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 53c4b2f71b..d62574ab8b 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 608c04c00b..5392d1ad79 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 00cdb815ee..b485e7ac83 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 60672ac706..75e4bd3e79 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 7902f05033..6cb0ef1858 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 628c666344..d9502d511a 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 851fb8a0fe..fe952069de 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 ac82710602..cea1b3a5a6 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 ec4d93bda8..19d60333b3 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/src/typegraph/deno/deno.json b/src/typegraph/deno/deno.json index ad7121212f..0dff888eb3 100644 --- a/src/typegraph/deno/deno.json +++ b/src/typegraph/deno/deno.json @@ -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/tests/dedup/tg.ts b/tests/dedup/tg.ts index fcc495725c..1a383d35a6 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 3c09785b5b..7f7fd4e68c 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 2f58409edf..ea92de24a9 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 244aa5aa82..d2ef5af199 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/self_deploy/self_deploy.ts b/tests/e2e/self_deploy/self_deploy.ts index c039be3c09..9db85b5ade 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/typegraph/typegraphs/deno/complex.ts b/tests/e2e/typegraph/typegraphs/deno/complex.ts index 12cb5c0ced..2955f2eb35 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 656c075689..d7a2a0a542 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 6f86e40797..7546b95cd1 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 f4785d11e1..c10ff27549 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 fc8bceebc9..4326192690 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 2033b1eb81..e2a71ff71a 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/typegraphs/metagen.ts b/tests/metagen/typegraphs/metagen.ts index 82f82958b2..a746c6fbc4 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 2699b7373f..9657c0927f 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/multi_typegraph/multi_typegraph.ts b/tests/multi_typegraph/multi_typegraph.ts index 214030deaf..05e6b95596 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 cd99d8628c..2a1f2cc6ec 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 81b6029431..e5c5b223af 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 b7e87da08c..e7883a7f3f 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 11b352ebbd..0f394ac3b1 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 077cef9327..277adc3abb 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 a4f2b6d1ee..a4be5b0788 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 f6ef827028..53f494378f 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 a084eea1c3..57b39fe875 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 4766b9f184..c945781f42 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 c238cfd098..5f366457b1 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 74cee34d56..6be4d4949d 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 e0fbdd0021..c82487bc16 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 f1f10930fc..0f099d4b20 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 81bde6d6ee..e819b7cd43 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 0e3c25a3de..045450819d 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 a75d3c09cf..3cbec6d365 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 42498207c3..4fddddc4f2 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 1e8be8c5ff..eb224d0467 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 25100ffc32..eaf5dfc2cf 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/temporal/temporal.ts b/tests/runtimes/temporal/temporal.ts index abc7d7b3b5..3bdf4f3661 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/wasm_reflected.ts b/tests/runtimes/wasm_reflected/wasm_reflected.ts index a27601fbe8..0030763780 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 6bc76fe1ae..6e6de1f736 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 27bd7a34fe..5cba1f45f8 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 5008e61c85..b1b8f1f319 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 229781d3a8..e506914a48 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];