Upgrade preserves to 0.992.4
This commit is contained in:
parent
062046c2b7
commit
83c81f894a
|
@ -16,13 +16,13 @@
|
|||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "0.992",
|
||||
"@preserves/core": "0.992.4",
|
||||
"@syndicate-lang/core": "*",
|
||||
"@syndicate-lang/html": "*",
|
||||
"@syndicate-lang/ws-relay": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@preserves/schema-cli": "0.992",
|
||||
"@preserves/schema-cli": "0.992.4",
|
||||
"@syndicate-lang/ts-plugin": "*",
|
||||
"@syndicate-lang/tsc": "*",
|
||||
"rollup": "^2.60",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"packages/*/examples/*/"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@preserves/core": "*",
|
||||
"@preserves/core": "0.992.4",
|
||||
"@rollup/plugin-node-resolve": "^13.0",
|
||||
"@types/jest": "^27.0",
|
||||
"@types/node": "^14",
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
"types": "lib/index.d.ts",
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"devDependencies": {
|
||||
"@preserves/core": "0.992",
|
||||
"@preserves/schema-cli": "0.992"
|
||||
"@preserves/core": "0.992.4",
|
||||
"@preserves/schema-cli": "0.992.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@preserves/core": "0.992"
|
||||
"@preserves/core": "0.992.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"salty-crypto": "0.3.1"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { canonicalString, Dictionary, is, Record, RecordConstructorInfo, Value } from '@preserves/core';
|
||||
import { canonicalString, KeyedDictionary, Dictionary, is, Record, RecordConstructorInfo, Value, CompoundKey, _iterMap } from '@preserves/core';
|
||||
import { AnyValue, Ref } from './actor.js';
|
||||
import * as P from '../gen/dataspacePatterns.js';
|
||||
|
||||
|
@ -168,9 +168,13 @@ export function withoutCaptures(p: P.Pattern): P.Pattern {
|
|||
}));
|
||||
case 'arr':
|
||||
return P.Pattern.DCompound(P.DCompound.arr(p.value.items.map(walk)));
|
||||
case 'dict':
|
||||
return P.Pattern.DCompound(P.DCompound.dict(p.value.entries.mapEntries(
|
||||
e => [e[0], walk(e[1])])));
|
||||
case 'dict': {
|
||||
const newDict = new KeyedDictionary<Value<Ref>, P.Pattern<Ref>, Ref>();
|
||||
for (const [k, v] of p.value.entries) {
|
||||
newDict.set(k, walk(v));
|
||||
}
|
||||
return P.Pattern.DCompound(P.DCompound.dict(newDict));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"version": "0.0.0",
|
||||
"license": "GPL-3.0+",
|
||||
"devDependencies": {
|
||||
"@preserves/schema-cli": "0.992",
|
||||
"@preserves/schema-cli": "0.992.4",
|
||||
"@syndicate-lang/ts-plugin": "*",
|
||||
"@syndicate-lang/tsc": "*",
|
||||
"rollup": "^2.60",
|
||||
|
@ -12,7 +12,7 @@
|
|||
"typescript-language-server": "^3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@preserves/core": "0.992",
|
||||
"@preserves/core": "0.992.4",
|
||||
"@syndicate-lang/core": "*",
|
||||
"@syndicate-lang/html": "*",
|
||||
"@syndicate-lang/ws-relay": "*"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"syndicate-fs": "./bin/syndicate-fs.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@preserves/core": "0.992"
|
||||
"@preserves/core": "0.992.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@syndicate-lang/core": "^0.22.0",
|
||||
|
@ -35,7 +35,7 @@
|
|||
"chokidar": "^3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@preserves/schema-cli": "0.992",
|
||||
"@preserves/schema-cli": "0.992.4",
|
||||
"@syndicate-lang/ts-plugin": "^0.23.0",
|
||||
"@syndicate-lang/tsc": "^0.23.0"
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"types": "lib/index.d.ts",
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"peerDependencies": {
|
||||
"@preserves/core": "0.992"
|
||||
"@preserves/core": "0.992.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@syndicate-lang/core": "^0.22.0",
|
||||
|
|
|
@ -415,16 +415,16 @@ export function unpackStandardRoute<R>(route: E.StandardRoute<R>): G.Route<R> {
|
|||
|
||||
const { transports, key, service, sig, oid } = route;
|
||||
|
||||
const protocol = { _variant: "absent" } satisfies N.NoiseProtocol;
|
||||
const preSharedKeys = { _variant: "absent" } satisfies N.NoisePreSharedKeys;
|
||||
const caveats: S.CaveatsField<R> = route.caveats.length
|
||||
? { _variant: "present", caveats: route.caveats }
|
||||
: { _variant: "absent" };
|
||||
const protocol = N.NoiseProtocol.absent<R>();
|
||||
const preSharedKeys = N.NoisePreSharedKeys.absent<R>();
|
||||
const caveats = route.caveats.length
|
||||
? S.CaveatsField.present<R>(route.caveats)
|
||||
: S.CaveatsField.absent<R>();
|
||||
|
||||
return G.Route({
|
||||
transports: transports.map(t => {
|
||||
switch (t._variant) {
|
||||
case 'wsUrl': return T.fromWebSocket({ url: t.value });
|
||||
case 'wsUrl': return T.fromWebSocket(T.WebSocket(t.value));
|
||||
default: {
|
||||
const x = stringify(E.fromStandardTransport(t));
|
||||
throw new Error(`Unsupported transport: ${x}`);
|
||||
|
@ -432,10 +432,14 @@ export function unpackStandardRoute<R>(route: E.StandardRoute<R>): G.Route<R> {
|
|||
}
|
||||
}),
|
||||
pathSteps: [
|
||||
{ stepType: N.$noise,
|
||||
detail: N.fromNoiseSpec({ service, key, protocol, preSharedKeys }) },
|
||||
{ stepType: S.$ref,
|
||||
detail: S.fromParameters({ oid, sig, caveats }) },
|
||||
G.PathStep({
|
||||
stepType: N.$noise,
|
||||
detail: N.fromNoiseSpec(N.NoiseSpec({ service, key, protocol, preSharedKeys })),
|
||||
}),
|
||||
G.PathStep({
|
||||
stepType: S.$ref,
|
||||
detail: S.fromParameters(S.Parameters({ oid, sig, caveats })),
|
||||
}),
|
||||
],
|
||||
});
|
||||
}
|
||||
|
@ -460,7 +464,7 @@ export function contactRemote(
|
|||
) => void,
|
||||
ds = Dataspace.global,
|
||||
) {
|
||||
const routeValue = Record.isRecord(route) ? route : G.fromRoute(route);
|
||||
const routeValue = Record.isRecord(route) ? route : G.fromRoute(G.Route(route));
|
||||
at ds {
|
||||
during G.ResolvePath({
|
||||
"route": routeValue,
|
||||
|
|
30
yarn.lock
30
yarn.lock
|
@ -1403,30 +1403,30 @@
|
|||
dependencies:
|
||||
"@octokit/openapi-types" "^12.11.0"
|
||||
|
||||
"@preserves/core@*", "@preserves/core@0.992", "@preserves/core@^0.992.3":
|
||||
version "0.992.3"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.992.3.tgz#776a43db71c95cc4d1c276ebe85aef39587a6f4c"
|
||||
integrity sha512-thDNEIAvD1j4OZqAItXEdKSR/wklKp/lCY2Lxdmj8oLRM82jaTzvlvkQwUIK08zcV3QVBaIed/UeG4J1W4Jlrw==
|
||||
"@preserves/core@0.992.4", "@preserves/core@^0.992.4":
|
||||
version "0.992.4"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.992.4.tgz#a3b187596cca3b68bd92f26167285b5732d47d85"
|
||||
integrity sha512-rz9LMiT08JSe7OrWuuejXrp5it9+usI9JadyBzySK5BlKt+tEkijm6GPWqcdzV2mWmd3rgfYS3heM2tJjpUNcA==
|
||||
|
||||
"@preserves/schema-cli@0.992":
|
||||
version "0.992.3"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema-cli/-/schema-cli-0.992.3.tgz#d786f8017220083bf2a6c074a90f5ef084cece64"
|
||||
integrity sha512-GpMQZnr3Ynrhtg0SqHHJiITu9t/g7WVryNlUFjCPmCOfjgtIFjAmworTndwm52vFbpoSOBugo8rY6wq4Oc6VHg==
|
||||
"@preserves/schema-cli@0.992.4":
|
||||
version "0.992.4"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema-cli/-/schema-cli-0.992.4.tgz#54a826cbe6885436dcabfa674b0a18c0b96b328b"
|
||||
integrity sha512-0Zjnw3tE8aKzh+Y4ssDLYuJSynlkC4QgoTbfQ81Fg7RsGur8jmz5rrzvWX3SQmPGLkP81TKT8w5BmKi9uoZdXA==
|
||||
dependencies:
|
||||
"@preserves/core" "^0.992.3"
|
||||
"@preserves/schema" "^0.992.3"
|
||||
"@preserves/core" "^0.992.4"
|
||||
"@preserves/schema" "^0.992.4"
|
||||
chalk "^4.1"
|
||||
chokidar "^3.5"
|
||||
commander "^7.2"
|
||||
glob "^7.1"
|
||||
minimatch "^3.0"
|
||||
|
||||
"@preserves/schema@^0.992.3":
|
||||
version "0.992.3"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.992.3.tgz#1e7fcc882638b1dd11fd4344ed5c27dadb9d0cc2"
|
||||
integrity sha512-TM/Y0GuRDxoViNAwccMFBT19vp3woH4rnfDBuwL9RJ7KCVMAX9eyhJjL81wsX1i7bo4pFpJPQz6bV/NtgPB0Tg==
|
||||
"@preserves/schema@^0.992.4":
|
||||
version "0.992.4"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.992.4.tgz#0f9eb188cca70336b551d32a9bf5d9593c2eb13a"
|
||||
integrity sha512-MTOYhhq20QDF12BL49Bzd1ln9Uup6LulwZkSyy5urNJPOpE+TYnuYZikcIxXVO14KwGq1iXu5rfXCstobuPdDg==
|
||||
dependencies:
|
||||
"@preserves/core" "^0.992.3"
|
||||
"@preserves/core" "^0.992.4"
|
||||
|
||||
"@rollup/plugin-node-resolve@^13.0":
|
||||
version "13.3.0"
|
||||
|
|
Loading…
Reference in New Issue