Skip to content

Commit

Permalink
unify JS/TS imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Natoandro committed Nov 26, 2024
1 parent 9671d60 commit 2ebce45
Show file tree
Hide file tree
Showing 85 changed files with 277 additions and 227 deletions.
27 changes: 26 additions & 1 deletion examples/deno.jsonc
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/authentication.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/backend-for-frontend.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/basic.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/cors.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/database.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/deno.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/example_rest.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
10 changes: 5 additions & 5 deletions examples/typegraphs/execute.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/faas-runner.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/files-upload.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/first-typegraph.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/func-ctx.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/func-gql.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
8 changes: 4 additions & 4 deletions examples/typegraphs/func.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/graphql-server.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/graphql.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/grpc.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/http-runtime.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/iam-provider.ts
Original file line number Diff line number Diff line change
@@ -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 */

Expand Down
8 changes: 4 additions & 4 deletions examples/typegraphs/index.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/injections.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/jwt.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/kv.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/math.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/metagen-deno.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/metagen-py.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/metagen-rs.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/metagen-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/microservice-orchestration.ts
Original file line number Diff line number Diff line change
@@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions examples/typegraphs/oauth2.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 4 additions & 4 deletions examples/typegraphs/policies.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
5 changes: 2 additions & 3 deletions examples/typegraphs/prisma-runtime.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/prisma.ts
Original file line number Diff line number Diff line change
@@ -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(
{
Expand Down
4 changes: 2 additions & 2 deletions examples/typegraphs/programmable-api-gateway.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Loading

0 comments on commit 2ebce45

Please sign in to comment.