Skip to content

Commit 7e7eca2

Browse files
committed
update: dependencies, renraku fixes
1 parent c820d50 commit 7e7eca2

File tree

4 files changed

+53
-41
lines changed

4 files changed

+53
-41
lines changed

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
"./*": "./*"
1717
},
1818
"dependencies": {
19-
"@benev/slate": "^0.3.5",
19+
"@benev/slate": "^0.3.9",
2020
"@e280/kv": "^0.0.0-12",
21-
"@e280/renraku": "^0.5.0-18",
21+
"@e280/renraku": "^0.5.0-26",
2222
"@e280/science": "^0.0.5",
23-
"@e280/stz": "^0.0.0-23",
23+
"@e280/stz": "^0.0.0-29",
2424
"@noble/ed25519": "^2.3.0"
2525
},
2626
"devDependencies": {
2727
"@benev/turtle": "^0.6.13",
2828
"http-server": "^14.1.1",
2929
"npm-run-all": "^4.1.5",
30-
"typescript": "^5.8.3"
30+
"typescript": "^5.9.2"
3131
},
3232
"scripts": {
3333
"build": "rm -rf x && mkdir x && run-s _ln _code _ssg",

s/trust/postmessage/setup-in-app.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import {endpoint, Messenger, WindowConduit} from "@e280/renraku"
2+
import {Messenger, WindowConduit} from "@e280/renraku"
33
import {makeAppFns} from "./app-fns.js"
44
import {Session} from "../concepts/session/types.js"
55

@@ -15,19 +15,17 @@ export function setupInApp(
1515
login: (session: Session | null) => Promise<void>,
1616
) {
1717

18-
const conduit = new WindowConduit(
19-
appWindow,
20-
popupWindow,
21-
popupOrigin,
22-
({origin}) => {
23-
return origin === popupOrigin
24-
},
25-
)
18+
const conduit = new WindowConduit({
19+
localWindow: appWindow,
20+
targetWindow: popupWindow,
21+
targetOrigin: popupOrigin,
22+
allow: e => e.origin === popupOrigin,
23+
})
2624

2725
new Messenger({
2826
conduit,
2927
timeout: Infinity,
30-
getLocalEndpoint: () => endpoint({fns: makeAppFns(login)}),
28+
rpc: async() => makeAppFns(login),
3129
})
3230

3331
return {

s/trust/postmessage/setup-in-popup.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ export function setupInPopup(
1313
appWindow: WindowProxy,
1414
) {
1515

16-
const conduit = new WindowConduit(
17-
popupWindow,
18-
appWindow,
19-
"*",
20-
() => true,
21-
)
16+
const conduit = new WindowConduit({
17+
localWindow: popupWindow,
18+
targetWindow: appWindow,
19+
targetOrigin: "*",
20+
allow: () => true,
21+
})
2222

2323
const appOriginDeferred = defer<string>()
2424
conduit.recv.sub((_m, {origin}) => {

0 commit comments

Comments
 (0)