Skip to content

Commit 0628864

Browse files
authored
Merge branch 'main' into upload/deno-runtime
2 parents de1209e + 66dee04 commit 0628864

File tree

41 files changed

+660
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+660
-292
lines changed

.ghjk/lock.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
"version": "0.13.5",
1010
"depConfigs": {
1111
"tar_aa": {
12-
"version": "1.34",
12+
"version": "1.35",
1313
"depConfigs": {},
1414
"portRef": "[email protected]"
1515
}
1616
},
1717
"portRef": "[email protected]"
1818
},
1919
"9e3fa7742c431c34ae7ba8d1e907e50c937ccfb631fb4dcfb7a1773742abe267": {
20-
"version": "1.34",
20+
"version": "1.35",
2121
"depConfigs": {},
2222
"portRef": "[email protected]"
2323
},
@@ -30,20 +30,20 @@
3030
"version": "3.28.0-rc6",
3131
"depConfigs": {
3232
"curl_aa": {
33-
"version": "8.2.1",
33+
"version": "8.5.0",
3434
"depConfigs": {},
3535
"portRef": "[email protected]"
3636
},
3737
"git_aa": {
38-
"version": "2.40.1",
38+
"version": "2.43.0",
3939
"depConfigs": {},
4040
"portRef": "[email protected]"
4141
},
4242
"asdf_plugin_git": {
4343
"version": "d631481e96",
4444
"depConfigs": {
4545
"git_aa": {
46-
"version": "2.40.1",
46+
"version": "2.43.0",
4747
"depConfigs": {},
4848
"portRef": "[email protected]"
4949
}
@@ -63,20 +63,20 @@
6363
"installType": "version"
6464
},
6565
"c7d12a562ecc8f3f95df5469ec0272561bc6715ebc41bcd82ba94f17a69a6fcb": {
66-
"version": "8.2.1",
66+
"version": "8.5.0",
6767
"depConfigs": {},
6868
"portRef": "[email protected]"
6969
},
7070
"0c719c533251d13d9e84b3113733c9dcd9e48f978c02f3fc4e14816080f7a69e": {
71-
"version": "2.40.1",
71+
"version": "2.43.0",
7272
"depConfigs": {},
7373
"portRef": "[email protected]"
7474
},
7575
"9ffe0540cc740abe4bae8b926d9f53b78deee279a25c863e64e99263ee0ec7d1": {
7676
"version": "d631481e96",
7777
"depConfigs": {
7878
"git_aa": {
79-
"version": "2.40.1",
79+
"version": "2.43.0",
8080
"depConfigs": {},
8181
"portRef": "[email protected]"
8282
}
@@ -109,7 +109,7 @@
109109
"version": "1.27.0",
110110
"depConfigs": {
111111
"git_aa": {
112-
"version": "2.40.1",
112+
"version": "2.43.0",
113113
"depConfigs": {},
114114
"portRef": "[email protected]"
115115
}
@@ -132,7 +132,7 @@
132132
"version": "1.27.0",
133133
"depConfigs": {
134134
"git_aa": {
135-
"version": "2.40.1",
135+
"version": "2.43.0",
136136
"depConfigs": {},
137137
"portRef": "[email protected]"
138138
}
@@ -147,7 +147,7 @@
147147
"version": "1.27.0",
148148
"depConfigs": {
149149
"git_aa": {
150-
"version": "2.40.1",
150+
"version": "2.43.0",
151151
"depConfigs": {},
152152
"portRef": "[email protected]"
153153
}
@@ -169,7 +169,7 @@
169169
"version": "1.27.0",
170170
"depConfigs": {
171171
"git_aa": {
172-
"version": "2.40.1",
172+
"version": "2.43.0",
173173
"depConfigs": {},
174174
"portRef": "[email protected]"
175175
}
@@ -200,7 +200,7 @@
200200
"version": "1.27.0",
201201
"depConfigs": {
202202
"git_aa": {
203-
"version": "2.40.1",
203+
"version": "2.43.0",
204204
"depConfigs": {},
205205
"portRef": "[email protected]"
206206
}
@@ -220,7 +220,7 @@
220220
"version": "v20.8.0",
221221
"depConfigs": {
222222
"tar_aa": {
223-
"version": "1.34",
223+
"version": "1.35",
224224
"depConfigs": {},
225225
"portRef": "[email protected]"
226226
}
@@ -239,7 +239,7 @@
239239
"version": "v20.8.0",
240240
"depConfigs": {
241241
"tar_aa": {
242-
"version": "1.34",
242+
"version": "1.35",
243243
"depConfigs": {},
244244
"portRef": "[email protected]"
245245
}
@@ -257,7 +257,7 @@
257257
"version": "v20.8.0",
258258
"depConfigs": {
259259
"tar_aa": {
260-
"version": "1.34",
260+
"version": "1.35",
261261
"depConfigs": {},
262262
"portRef": "[email protected]"
263263
}
@@ -272,7 +272,7 @@
272272
"version": "v2.4.0",
273273
"depConfigs": {
274274
"tar_aa": {
275-
"version": "1.34",
275+
"version": "1.35",
276276
"depConfigs": {},
277277
"portRef": "[email protected]"
278278
}
@@ -284,7 +284,7 @@
284284
"version": "3.8.18",
285285
"depConfigs": {
286286
"tar_aa": {
287-
"version": "1.34",
287+
"version": "1.35",
288288
"depConfigs": {},
289289
"portRef": "[email protected]"
290290
},
@@ -309,7 +309,7 @@
309309
"version": "3.12.2",
310310
"depConfigs": {
311311
"tar_aa": {
312-
"version": "1.34",
312+
"version": "1.35",
313313
"depConfigs": {},
314314
"portRef": "[email protected]"
315315
},
@@ -330,7 +330,7 @@
330330
"version": "3.12.2",
331331
"depConfigs": {
332332
"tar_aa": {
333-
"version": "1.34",
333+
"version": "1.35",
334334
"depConfigs": {},
335335
"portRef": "[email protected]"
336336
},
@@ -350,7 +350,7 @@
350350
"version": "3.12.2",
351351
"depConfigs": {
352352
"tar_aa": {
353-
"version": "1.34",
353+
"version": "1.35",
354354
"depConfigs": {},
355355
"portRef": "[email protected]"
356356
},
@@ -387,7 +387,7 @@
387387
"version": "1.27.0",
388388
"depConfigs": {
389389
"git_aa": {
390-
"version": "2.40.1",
390+
"version": "2.43.0",
391391
"depConfigs": {},
392392
"portRef": "[email protected]"
393393
}

examples/typegraphs/faas-runner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { PythonRuntime } from "@typegraph/sdk/runtimes/python.js";
55

66
// skip:end
77

8-
await typegraph({
8+
typegraph({
99
name: "faas-runner",
1010
// skip:next-line
1111
cors: { allowOrigin: ["https://metatype.dev", "http://localhost:3000"] },
@@ -20,7 +20,7 @@ await typegraph({
2020

2121
g.expose({
2222
pycumsum: python.fromLambda(inp, out, {
23-
code: `lambda inp: sum(range(inp["n"])`,
23+
code: `lambda inp: sum(range(inp["n"]))`,
2424
}),
2525
tscumsum: deno.func(
2626
inp,

examples/typegraphs/iam-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function getEnvOrDefault(key: string, defaultValue: string) {
1414
}
1515
// skip:end
1616

17-
await typegraph({
17+
typegraph({
1818
name: "iam-provider",
1919
// skip:next-line
2020
cors: { allowOrigin: ["https://metatype.dev", "http://localhost:3000"] },

examples/typegraphs/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { HttpRuntime } from "@typegraph/sdk/runtimes/http.js";
77

88
// skip:end
99

10-
await typegraph({
10+
typegraph({
1111
name: "homepage",
1212
// skip:start
1313
rate: { windowLimit: 2000, windowSec: 60, queryLimit: 200, localExcess: 0 },

examples/typegraphs/injections.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from typegraph import Policy, typegraph, t, Graph
2+
from typegraph.runtimes.deno import DenoRuntime
3+
4+
5+
@typegraph()
6+
def injection_example(g: Graph):
7+
deno = DenoRuntime()
8+
pub = Policy.public()
9+
10+
g.expose(
11+
get_injected=deno.func(
12+
t.struct(
13+
{
14+
"static_value": t.integer().set(12),
15+
"context_value": t.uuid().from_context("profile.userId"),
16+
"secret_value": t.string().from_secret("secret_name"),
17+
"dynamic_value": t.datetime().inject("now"),
18+
}
19+
).rename("Input"),
20+
t.struct(
21+
{
22+
"static_value": t.integer().rename("Static"),
23+
"context_value": t.uuid(),
24+
"secret_value": t.string(),
25+
"nested": deno.identity(
26+
t.struct({"parent_value": t.integer().from_parent("Static")}),
27+
),
28+
"dynamic_value": t.datetime(),
29+
}
30+
).rename("Output"),
31+
code="""
32+
({ static_value, context_value, secret_value, dynamic_value }) => ({ static_value, context_value, secret_value, dynamic_value })
33+
""",
34+
).with_policy(pub)
35+
)

examples/typegraphs/injections.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Policy, t, typegraph } from "@typegraph/sdk";
2+
import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js";
3+
4+
typegraph("injection-example", (g) => {
5+
const deno = new DenoRuntime();
6+
const pub = Policy.public();
7+
8+
g.expose({
9+
get_injected: deno.func(
10+
t.struct({
11+
static_value: t.integer().set(12),
12+
context_value: t.uuid().fromContext("profile.userId"),
13+
secret_value: t.string().fromSecret("secret_name"),
14+
dynamic_value: t.datetime().inject("now"),
15+
}).rename("Input"),
16+
t.struct({
17+
static_value: t.integer().rename("Static"),
18+
context_value: t.uuid(),
19+
secret_value: t.string(),
20+
nested: deno.identity(
21+
t.struct({
22+
parent_value: t.integer().fromParent("Static"),
23+
}),
24+
),
25+
dynamic_value: t.datetime(),
26+
}).rename("Output"),
27+
{
28+
code: (
29+
{ static_value, context_value, secret_value, dynamic_value },
30+
) => ({ static_value, context_value, secret_value, dynamic_value }),
31+
},
32+
).withPolicy(pub),
33+
});
34+
});

examples/typegraphs/jwt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js";
55

66
// skip:end
77

8-
await typegraph({
8+
typegraph({
99
name: "jwt-authentication",
1010
// skip:next-line
1111
cors: { allowOrigin: ["https://metatype.dev", "http://localhost:3000"] },

examples/typegraphs/math.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Policy, t, typegraph } from "@typegraph/sdk/index.js";
33
// skip:end
44
import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js";
55

6-
await typegraph({
6+
typegraph({
77
name: "math",
88
// skip:start
99
rate: { windowLimit: 2000, windowSec: 60, queryLimit: 200, localExcess: 0 },

examples/typegraphs/microservice-orchestration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function getEnvOrDefault(key: string, defaultValue: string) {
1515
}
1616
// skip:end
1717

18-
await typegraph({
18+
typegraph({
1919
name: "team-a",
2020
// skip:next-line
2121
cors: { allowOrigin: ["https://metatype.dev", "http://localhost:3000"] },

examples/typegraphs/oauth2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js";
55

66
// skip:end
77

8-
await typegraph({
8+
typegraph({
99
name: "oauth2-authentication",
1010
// skip:next-line
1111
cors: { allowOrigin: ["https://metatype.dev", "http://localhost:3000"] },

examples/typegraphs/policies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Auth } from "@typegraph/sdk/params.js";
44
import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js";
55
import { RandomRuntime } from "@typegraph/sdk/runtimes/random.js";
66

7-
await typegraph({
7+
typegraph({
88
name: "policies",
99
cors: { allowOrigin: ["https://metatype.dev", "http://localhost:3000"] },
1010
}, (g) => {

examples/typegraphs/prisma-runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.js";
55

66
// skip:end
77

8-
await typegraph({
8+
typegraph({
99
name: "prisma-runtime",
1010
cors: {
1111
// skip:start

examples/typegraphs/prisma.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Policy, t, typegraph } from "@typegraph/sdk/index.js";
22
import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.js";
33

4-
await typegraph({
4+
typegraph({
55
name: "roadmap-prisma",
66
// skip:next-line
77
cors: { allowOrigin: ["https://metatype.dev", "http://localhost:3000"] },

examples/typegraphs/programmable-api-gateway.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js";
55

66
// skip:end
77

8-
await typegraph({
8+
typegraph({
99
name: "programmable-api-gateway",
1010
// skip:next-line
1111
cors: { allowOrigin: ["https://metatype.dev", "http://localhost:3000"] },

examples/typegraphs/quick-start-project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { DenoRuntime } from "@typegraph/sdk/runtimes/deno.js";
33
import { PythonRuntime } from "@typegraph/sdk/runtimes/python.js";
44
import { PrismaRuntime } from "@typegraph/sdk/providers/prisma.js";
55

6-
await typegraph("example", (g) => {
6+
typegraph("example", (g) => {
77
// access control
88
const pub = Policy.public();
99

0 commit comments

Comments
 (0)