New preserves interface
This commit is contained in:
parent
f2431567a7
commit
a3a78bb39b
|
@ -6,8 +6,8 @@
|
||||||
"typescript": "^4.2.3"
|
"typescript": "^4.2.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@preserves/core": "^0.13.0",
|
"@preserves/core": "^0.14.0",
|
||||||
"@preserves/schema": "^0.6.0"
|
"@preserves/schema": "^0.7.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"regenerate": "rm -rf ./src/gen && preserves-schema-ts --module Actor=./src/runtime/actor.ts --module Protocol=./src/transport/protocol.ts --output ./src/gen './schemas/**/*.prs'",
|
"regenerate": "rm -rf ./src/gen && preserves-schema-ts --module Actor=./src/runtime/actor.ts --module Protocol=./src/transport/protocol.ts --output ./src/gen './schemas/**/*.prs'",
|
||||||
|
|
|
@ -137,7 +137,7 @@ export class Relay {
|
||||||
|
|
||||||
readonly decoder = new Decoder(void 0, {
|
readonly decoder = new Decoder(void 0, {
|
||||||
includeAnnotations: false,
|
includeAnnotations: false,
|
||||||
pointerType: wireRefPointerType,
|
pointerDecode: wireRefPointerType,
|
||||||
});
|
});
|
||||||
|
|
||||||
constructor(t: Turn, options: RelayOptions) {
|
constructor(t: Turn, options: RelayOptions) {
|
||||||
|
@ -234,7 +234,7 @@ export class Relay {
|
||||||
if (this.debug) console.log('OUT', IO.fromTurn(this.pendingTurn).asPreservesText());
|
if (this.debug) console.log('OUT', IO.fromTurn(this.pendingTurn).asPreservesText());
|
||||||
this.w(underlying(encode(IO.fromTurn(this.pendingTurn), {
|
this.w(underlying(encode(IO.fromTurn(this.pendingTurn), {
|
||||||
canonical: true,
|
canonical: true,
|
||||||
pointerType: wireRefPointerType,
|
pointerEncode: wireRefPointerType,
|
||||||
})));
|
})));
|
||||||
this.pendingTurn = [];
|
this.pendingTurn = [];
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,14 +23,14 @@ export function sturdyEncode(v: SturdyValue): Bytes {
|
||||||
return encode<S._ptr>(v, {
|
return encode<S._ptr>(v, {
|
||||||
canonical: true,
|
canonical: true,
|
||||||
includeAnnotations: false,
|
includeAnnotations: false,
|
||||||
pointerType: neverPointerType,
|
pointerEncode: neverPointerType,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sturdyDecode(bs: Bytes): SturdyValue {
|
export function sturdyDecode(bs: Bytes): SturdyValue {
|
||||||
return decode<S._ptr>(bs, {
|
return decode<S._ptr>(bs, {
|
||||||
includeAnnotations: false,
|
includeAnnotations: false,
|
||||||
pointerType: neverPointerType,
|
pointerDecode: neverPointerType,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
18
yarn.lock
18
yarn.lock
|
@ -2,17 +2,17 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@preserves/core@^0.13.0":
|
"@preserves/core@^0.14.0":
|
||||||
version "0.13.0"
|
version "0.14.0"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.13.0.tgz#dc92d2b009c805df462dc452043f349faa466cb3"
|
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.14.0.tgz#a7b8fda8b408415e0dbc0682218d6f63f3ec19e5"
|
||||||
integrity sha512-MvLJJtDHfmWc1BsrCwwEZ7P2DmK03PtiYkI939pSIckn4YsbvyeuiOTyFJbcxZ7lUgNGnSkBf/ZBp4R0dgbyZA==
|
integrity sha512-iTwhoW/dVZIXIfU6p98ZL9dZS5vNH12CDBL+OMJP5cF6fon/CXEVvGEjx/cNJ1+Xg0KSz+CLNXNAdZhwPoph1Q==
|
||||||
|
|
||||||
"@preserves/schema@^0.6.0":
|
"@preserves/schema@^0.7.0":
|
||||||
version "0.6.0"
|
version "0.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.6.0.tgz#505031fec9f64a68ada7c940ab320f4beebacdd8"
|
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.7.0.tgz#4e835353a597b5e37284d1a6f9ee3a49b91abe41"
|
||||||
integrity sha512-7EV56oXdAygNdFWjv24bS8y0B8iyhSwqlkpCQQU2xRyD6toPhCLoMG5R1yW5FXlV6UI2xQsRL/SpO/Zc1eShTw==
|
integrity sha512-9XO0Wpi4udUxatlKT3cLpt+u4bQCmLrRidCEM91tcCOOD7i+h6ltohKfWbXrn94St0uZTBkLU+jRBHb8i75PsQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "^0.13.0"
|
"@preserves/core" "^0.14.0"
|
||||||
"@types/glob" "^7.1.3"
|
"@types/glob" "^7.1.3"
|
||||||
"@types/minimatch" "^3.0.3"
|
"@types/minimatch" "^3.0.3"
|
||||||
chalk "^4.1.0"
|
chalk "^4.1.0"
|
||||||
|
|
Loading…
Reference in New Issue