Skip to content

Commit 0585964

Browse files
committed
Merge branch 'main' into sdk-long-running-discovery
2 parents 3bbc840 + 961fab5 commit 0585964

File tree

135 files changed

+18842
-15359
lines changed

Some content is hidden

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

135 files changed

+18842
-15359
lines changed

.ghjk/lock.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,11 @@
384384
},
385385
"portRef": "[email protected]",
386386
"packageName": "@bytecodealliance/jco"
387+
},
388+
"f4760b34b6c9f9f96207cfb380deb77007a212a60bd10bdb3dc9d20b94c2785c": {
389+
"version": "v8.15.2",
390+
"depConfigs": {},
391+
"portRef": "[email protected]"
387392
}
388393
}
389394
},
@@ -746,7 +751,7 @@
746751
}
747752
},
748753
{
749-
"version": "v8.8.0",
754+
"version": "v8.15.2",
750755
"port": {
751756
"ty": "denoWorker@v1",
752757
"name": "pnpm_ghrel",

.github/workflows/tests.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ jobs:
121121
strategy:
122122
matrix:
123123
include:
124-
- os: macos-latest
125-
activate: "source .venv/bin/activate"
124+
# TODO
125+
# - os: macos-latest
126+
# activate: "source .venv/bin/activate"
126127
- os: macos-14
127128
activate: "source .venv/bin/activate"
128129
#- os: windows-latest
@@ -186,8 +187,10 @@ jobs:
186187
runner: ubuntu-latest
187188
# FIXME: try macos-14 runner once all actions support it
188189
# docker buildx action broken as of 2024-02-09
189-
- platform: linux/arm64
190-
runner: custom-macos
190+
191+
# TODO
192+
# - platform: linux/arm64
193+
# runner: custom-macos
191194
steps:
192195
- uses: actions/checkout@v4
193196
- uses: docker/setup-buildx-action@v3

Cargo.lock

Lines changed: 45 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ dev:
8484
RUST_VERSION: 1.75.0
8585
DENO_VERSION: 1.40.1
8686
NODE_VERSION: 20.8.0
87-
PNPM_VERSION: v8.8.0
87+
PNPM_VERSION: v8.15.2
8888
CARGO_INSTA_VERSION: 1.33.0
8989
WASM_TOOLS_VERSION: 1.0.53
9090
JCO_VERSION: 1.0.0

examples/typegraphs/authentication.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def authentication(g: Graph):
1616
deno = DenoRuntime()
1717
public = Policy.public()
1818

19-
ctx = t.struct({"username": t.string().optional().from_context("username")})
19+
ctx = t.struct({"username": t.string().optional()})
2020

2121
# highlight-start
2222
# expects a secret in metatype.yml
@@ -26,6 +26,10 @@ def authentication(g: Graph):
2626
# highlight-end
2727

2828
g.expose(
29-
get_context=deno.identity(ctx),
29+
get_context=deno.identity(ctx).apply(
30+
{
31+
"username": g.from_context("username"),
32+
}
33+
),
3034
default_policy=[public],
3135
)

examples/typegraphs/authentication.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ typegraph({
1414
const pub = Policy.public();
1515

1616
const ctx = t.struct({
17-
"username": t.string().optional().fromContext("username"),
17+
"username": t.string().optional(),
1818
});
1919

2020
// highlight-start
@@ -25,6 +25,8 @@ typegraph({
2525
// highlight-end
2626

2727
g.expose({
28-
get_context: deno.identity(ctx).withPolicy(pub),
28+
get_context: deno.identity(ctx).apply({
29+
username: g.fromContext("username"),
30+
}).withPolicy(pub),
2931
});
3032
});

examples/typegraphs/basic.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ def basic_authentication(g: Graph):
1414
deno = DenoRuntime()
1515
public = Policy.public()
1616

17-
ctx = t.struct({"username": t.string().optional().from_context("username")})
17+
ctx = t.struct({"username": t.string().optional()})
1818

1919
# highlight-next-line
2020
g.auth(Auth.basic(["admin"]))
2121

2222
g.expose(
2323
public,
24-
get_context=deno.identity(ctx),
24+
get_context=deno.identity(ctx).apply(
25+
{
26+
"username": g.from_context("username"),
27+
}
28+
),
2529
)

examples/typegraphs/basic.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ typegraph({
1414
const pub = Policy.public();
1515

1616
const ctx = t.struct({
17-
"username": t.string().optional().fromContext("username"),
17+
"username": t.string().optional(),
1818
});
1919

2020
// highlight-next-line
2121
g.auth(Auth.basic(["admin"]));
2222

2323
g.expose({
24-
get_context: deno.identity(ctx).withPolicy(pub),
24+
get_context: deno.identity(ctx).apply({
25+
username: g.fromContext("username"),
26+
}).withPolicy(pub),
2527
});
2628
});

examples/typegraphs/execute.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def roadmap(g: Graph):
8484
),
8585
EffectUpdate(True),
8686
),
87-
get_context=deno.identity(
88-
t.struct({"username": t.string().optional().from_context("username")})
87+
get_context=deno.identity(t.struct({"username": t.string().optional()})).apply(
88+
{
89+
"username": g.from_context("username"),
90+
}
8991
),
9092
)

examples/typegraphs/execute.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ typegraph({
8181
effects.update(),
8282
),
8383
get_context: deno.identity(
84-
t.struct({ "username": t.string().optional().fromContext("username") }),
85-
),
84+
t.struct({ "username": t.string().optional() }),
85+
).apply({
86+
"username": g.fromContext("username"),
87+
}),
8688
}, pub);
8789
});

0 commit comments

Comments
 (0)