@stryke/capnp 0.12.19 → 0.12.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CUP3M7JH.cjs → chunk-LFP6TIPQ.cjs} +2 -119
- package/dist/{chunk-MO4AXOIN.js → chunk-ZIENMW4V.js} +1 -118
- package/dist/compile.d.cts +1 -0
- package/dist/compile.d.ts +1 -0
- package/dist/index.cjs +2 -6
- package/dist/index.d.cts +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.js +1 -5
- package/dist/rpc.cjs +134 -5
- package/dist/rpc.d.cts +13 -2
- package/dist/rpc.d.ts +13 -2
- package/dist/rpc.js +135 -6
- package/dts/index.d.cts +0 -57
- package/dts/index.d.ts +0 -57
- package/package.json +9 -9
- package/schemas/{chunk-RKF2BUL7.cjs → chunk-OP6MHN5D.cjs} +0 -3
- package/schemas/{chunk-H4DSZQJU.js → chunk-SKMHAD7G.js} +0 -3
- package/schemas/persistent.cjs +20 -20
- package/schemas/persistent.js +1 -1
- package/schemas/rpc-twoparty.cjs +32 -32
- package/schemas/rpc-twoparty.js +1 -1
- package/schemas/rpc.cjs +495 -495
- package/schemas/rpc.js +1 -1
- package/schemas/schema.cjs +675 -675
- package/schemas/schema.js +1 -1
package/dist/rpc.js
CHANGED
|
@@ -1,10 +1,139 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
2
|
+
Conn,
|
|
3
|
+
Deferred,
|
|
4
|
+
DeferredTransport
|
|
5
|
+
} from "./chunk-ZIENMW4V.js";
|
|
6
|
+
import {
|
|
7
|
+
Message
|
|
8
|
+
} from "./chunk-GI42NGKQ.js";
|
|
9
|
+
import {
|
|
10
|
+
__name
|
|
11
|
+
} from "./chunk-SHUYVCID.js";
|
|
12
|
+
|
|
13
|
+
// src/rpc.ts
|
|
14
|
+
import { MessageChannel } from "worker_threads";
|
|
15
|
+
var CapnpRPCMessageChannelTransport = class extends DeferredTransport {
|
|
16
|
+
static {
|
|
17
|
+
__name(this, "CapnpRPCMessageChannelTransport");
|
|
18
|
+
}
|
|
19
|
+
port;
|
|
20
|
+
constructor(port) {
|
|
21
|
+
super();
|
|
22
|
+
this.port = port;
|
|
23
|
+
this.port.on("message", this.resolve);
|
|
24
|
+
this.port.on("messageerror", this.reject);
|
|
25
|
+
this.port.on("close", this.close);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Closes the transport and removes all event listeners.
|
|
29
|
+
*/
|
|
30
|
+
close = /* @__PURE__ */ __name(() => {
|
|
31
|
+
this.port.off("message", this.resolve);
|
|
32
|
+
this.port.off("messageerror", this.reject);
|
|
33
|
+
this.port.off("close", this.close);
|
|
34
|
+
this.port.close();
|
|
35
|
+
super.close();
|
|
36
|
+
}, "close");
|
|
37
|
+
/**
|
|
38
|
+
* Sends a Cap'n Proto RPC message over the MessagePort.
|
|
39
|
+
*
|
|
40
|
+
* @param msg - The RPC message to send.
|
|
41
|
+
*/
|
|
42
|
+
sendMessage(msg) {
|
|
43
|
+
const m = new Message();
|
|
44
|
+
m.setRoot(msg);
|
|
45
|
+
const buf = m.toArrayBuffer();
|
|
46
|
+
this.port.postMessage(buf, [
|
|
47
|
+
buf
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var CapnpRPC = class {
|
|
52
|
+
static {
|
|
53
|
+
__name(this, "CapnpRPC");
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A queue for deferred connections that are waiting to be accepted.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This is used to manage incoming connections when the accept method is called.
|
|
60
|
+
*/
|
|
61
|
+
acceptQueue = new Array();
|
|
62
|
+
/**
|
|
63
|
+
* A map of connections by their ID.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* This is used to manage multiple connections and allows for easy retrieval by ID.
|
|
67
|
+
*/
|
|
68
|
+
connections = {};
|
|
69
|
+
/**
|
|
70
|
+
* A queue for connections that are waiting to be accepted.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* This is used to manage incoming connections when the accept method is called.
|
|
74
|
+
*/
|
|
75
|
+
connectQueue = new Array();
|
|
76
|
+
/**
|
|
77
|
+
* Creates a new {@link Conn} instance.
|
|
78
|
+
*
|
|
79
|
+
* @remarks
|
|
80
|
+
* This class is used to manage connections and accept incoming connections using the {@link MessageChannel} API.
|
|
81
|
+
*/
|
|
82
|
+
connect(id = 0) {
|
|
83
|
+
if (this.connections[id] !== void 0) {
|
|
84
|
+
return this.connections[id];
|
|
85
|
+
}
|
|
86
|
+
const ch = new MessageChannel();
|
|
87
|
+
const conn = new Conn(new CapnpRPCMessageChannelTransport(ch.port1));
|
|
88
|
+
const accept = this.acceptQueue.pop();
|
|
89
|
+
this.connections[id] = conn;
|
|
90
|
+
if (accept === void 0) {
|
|
91
|
+
this.connectQueue.push(ch.port2);
|
|
92
|
+
} else {
|
|
93
|
+
accept.resolve(new Conn(new CapnpRPCMessageChannelTransport(ch.port2)));
|
|
94
|
+
}
|
|
95
|
+
return conn;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Accepts a connection from the connect queue.
|
|
99
|
+
*
|
|
100
|
+
* @returns A promise that resolves to a Conn instance when a connection is accepted.
|
|
101
|
+
* @throws If no connections are available in the connect queue.
|
|
102
|
+
*/
|
|
103
|
+
async accept() {
|
|
104
|
+
const port2 = this.connectQueue.pop();
|
|
105
|
+
if (port2 !== void 0) {
|
|
106
|
+
return Promise.resolve(new Conn(new CapnpRPCMessageChannelTransport(port2)));
|
|
107
|
+
}
|
|
108
|
+
const deferred = new Deferred();
|
|
109
|
+
this.acceptQueue.push(deferred);
|
|
110
|
+
return deferred.promise;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Closes all connections and clears the queues.
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* This method will reject all pending accept promises and close all
|
|
117
|
+
* connections in the connect queue.
|
|
118
|
+
*/
|
|
119
|
+
close() {
|
|
120
|
+
let i = this.acceptQueue.length;
|
|
121
|
+
while (--i >= 0) {
|
|
122
|
+
this.acceptQueue[i]?.reject();
|
|
123
|
+
}
|
|
124
|
+
i = this.connectQueue.length;
|
|
125
|
+
while (--i >= 0) {
|
|
126
|
+
this.connectQueue[i].close();
|
|
127
|
+
}
|
|
128
|
+
for (const id in this.connections) {
|
|
129
|
+
this.connections[id]?.shutdown();
|
|
130
|
+
}
|
|
131
|
+
this.acceptQueue.length = 0;
|
|
132
|
+
this.connectQueue.length = 0;
|
|
133
|
+
this.connections = {};
|
|
134
|
+
}
|
|
135
|
+
};
|
|
7
136
|
export {
|
|
8
137
|
CapnpRPC,
|
|
9
|
-
|
|
138
|
+
CapnpRPCMessageChannelTransport
|
|
10
139
|
};
|
package/dts/index.d.cts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
import { MessagePort as MessagePort$1 } from 'node:worker_threads';
|
|
4
1
|
import { ParsedCommandLine } from 'typescript';
|
|
5
2
|
|
|
6
3
|
export declare enum ListElementSize {
|
|
@@ -4419,59 +4416,5 @@ export declare const getUint32Mask: (x: number) => DataView;
|
|
|
4419
4416
|
export declare const getUint64Mask: (x: bigint) => DataView;
|
|
4420
4417
|
export declare const getUint8Mask: (x: number) => DataView;
|
|
4421
4418
|
export declare function getBitMask(value: boolean, bitOffset: number): DataView;
|
|
4422
|
-
export declare class MessageChannelTransport extends DeferredTransport {
|
|
4423
|
-
port: MessagePort$1;
|
|
4424
|
-
constructor(port: MessagePort$1);
|
|
4425
|
-
close: () => void;
|
|
4426
|
-
sendMessage(msg: Message$1): void;
|
|
4427
|
-
}
|
|
4428
|
-
/**
|
|
4429
|
-
* A class that manages Cap'n Proto RPC connections.
|
|
4430
|
-
*/
|
|
4431
|
-
export declare class CapnpRPC {
|
|
4432
|
-
/**
|
|
4433
|
-
* A queue for deferred connections that are waiting to be accepted.
|
|
4434
|
-
*
|
|
4435
|
-
* @remarks
|
|
4436
|
-
* This is used to manage incoming connections when the accept method is called.
|
|
4437
|
-
*/
|
|
4438
|
-
protected acceptQueue: Deferred<Conn>[];
|
|
4439
|
-
/**
|
|
4440
|
-
* A map of connections by their ID.
|
|
4441
|
-
*
|
|
4442
|
-
* @remarks
|
|
4443
|
-
* This is used to manage multiple connections and allows for easy retrieval by ID.
|
|
4444
|
-
*/
|
|
4445
|
-
protected connections: Record<number, Conn>;
|
|
4446
|
-
/**
|
|
4447
|
-
* A queue for connections that are waiting to be accepted.
|
|
4448
|
-
*
|
|
4449
|
-
* @remarks
|
|
4450
|
-
* This is used to manage incoming connections when the accept method is called.
|
|
4451
|
-
*/
|
|
4452
|
-
protected connectQueue: MessagePort$1[];
|
|
4453
|
-
/**
|
|
4454
|
-
* Creates a new {@link Conn} instance.
|
|
4455
|
-
*
|
|
4456
|
-
* @remarks
|
|
4457
|
-
* This class is used to manage connections and accept incoming connections using the {@link MessageChannel} API.
|
|
4458
|
-
*/
|
|
4459
|
-
connect(id?: number): Conn;
|
|
4460
|
-
/**
|
|
4461
|
-
* Accepts a connection from the connect queue.
|
|
4462
|
-
*
|
|
4463
|
-
* @returns A promise that resolves to a Conn instance when a connection is accepted.
|
|
4464
|
-
* @throws If no connections are available in the connect queue.
|
|
4465
|
-
*/
|
|
4466
|
-
accept(): Promise<Conn>;
|
|
4467
|
-
/**
|
|
4468
|
-
* Closes all connections and clears the queues.
|
|
4469
|
-
*
|
|
4470
|
-
* @remarks
|
|
4471
|
-
* This method will reject all pending accept promises and close all
|
|
4472
|
-
* connections in the connect queue.
|
|
4473
|
-
*/
|
|
4474
|
-
close(): void;
|
|
4475
|
-
}
|
|
4476
4419
|
|
|
4477
4420
|
export {};
|
package/dts/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
import { MessagePort as MessagePort$1 } from 'node:worker_threads';
|
|
4
1
|
import { ParsedCommandLine } from 'typescript';
|
|
5
2
|
|
|
6
3
|
export declare enum ListElementSize {
|
|
@@ -4419,59 +4416,5 @@ export declare const getUint32Mask: (x: number) => DataView;
|
|
|
4419
4416
|
export declare const getUint64Mask: (x: bigint) => DataView;
|
|
4420
4417
|
export declare const getUint8Mask: (x: number) => DataView;
|
|
4421
4418
|
export declare function getBitMask(value: boolean, bitOffset: number): DataView;
|
|
4422
|
-
export declare class MessageChannelTransport extends DeferredTransport {
|
|
4423
|
-
port: MessagePort$1;
|
|
4424
|
-
constructor(port: MessagePort$1);
|
|
4425
|
-
close: () => void;
|
|
4426
|
-
sendMessage(msg: Message$1): void;
|
|
4427
|
-
}
|
|
4428
|
-
/**
|
|
4429
|
-
* A class that manages Cap'n Proto RPC connections.
|
|
4430
|
-
*/
|
|
4431
|
-
export declare class CapnpRPC {
|
|
4432
|
-
/**
|
|
4433
|
-
* A queue for deferred connections that are waiting to be accepted.
|
|
4434
|
-
*
|
|
4435
|
-
* @remarks
|
|
4436
|
-
* This is used to manage incoming connections when the accept method is called.
|
|
4437
|
-
*/
|
|
4438
|
-
protected acceptQueue: Deferred<Conn>[];
|
|
4439
|
-
/**
|
|
4440
|
-
* A map of connections by their ID.
|
|
4441
|
-
*
|
|
4442
|
-
* @remarks
|
|
4443
|
-
* This is used to manage multiple connections and allows for easy retrieval by ID.
|
|
4444
|
-
*/
|
|
4445
|
-
protected connections: Record<number, Conn>;
|
|
4446
|
-
/**
|
|
4447
|
-
* A queue for connections that are waiting to be accepted.
|
|
4448
|
-
*
|
|
4449
|
-
* @remarks
|
|
4450
|
-
* This is used to manage incoming connections when the accept method is called.
|
|
4451
|
-
*/
|
|
4452
|
-
protected connectQueue: MessagePort$1[];
|
|
4453
|
-
/**
|
|
4454
|
-
* Creates a new {@link Conn} instance.
|
|
4455
|
-
*
|
|
4456
|
-
* @remarks
|
|
4457
|
-
* This class is used to manage connections and accept incoming connections using the {@link MessageChannel} API.
|
|
4458
|
-
*/
|
|
4459
|
-
connect(id?: number): Conn;
|
|
4460
|
-
/**
|
|
4461
|
-
* Accepts a connection from the connect queue.
|
|
4462
|
-
*
|
|
4463
|
-
* @returns A promise that resolves to a Conn instance when a connection is accepted.
|
|
4464
|
-
* @throws If no connections are available in the connect queue.
|
|
4465
|
-
*/
|
|
4466
|
-
accept(): Promise<Conn>;
|
|
4467
|
-
/**
|
|
4468
|
-
* Closes all connections and clears the queues.
|
|
4469
|
-
*
|
|
4470
|
-
* @remarks
|
|
4471
|
-
* This method will reject all pending accept promises and close all
|
|
4472
|
-
* connections in the connect queue.
|
|
4473
|
-
*/
|
|
4474
|
-
close(): void;
|
|
4475
|
-
}
|
|
4476
4419
|
|
|
4477
4420
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/capnp",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package to assist in running the Cap'n Proto compiler and creating Cap'n Proto serialization protocol schemas.",
|
|
6
6
|
"repository": {
|
|
@@ -129,24 +129,24 @@
|
|
|
129
129
|
"peerDependencies": { "typescript": ">=4.0.0" },
|
|
130
130
|
"peerDependenciesMeta": { "typescript": { "optional": false } },
|
|
131
131
|
"dependencies": {
|
|
132
|
-
"@stryke/fs": "^0.32.
|
|
133
|
-
"@stryke/path": "^0.19.
|
|
132
|
+
"@stryke/fs": "^0.32.13",
|
|
133
|
+
"@stryke/path": "^0.19.2",
|
|
134
134
|
"defu": "^6.1.4",
|
|
135
135
|
"hex2dec": "^1.1.2",
|
|
136
136
|
"nanotar": "^0.2.0"
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
139
|
-
"@storm-software/config": "^1.134.
|
|
140
|
-
"@storm-software/config-tools": "^1.188.
|
|
141
|
-
"@storm-software/testing-tools": "^1.119.
|
|
142
|
-
"@types/node": "^22.19.
|
|
139
|
+
"@storm-software/config": "^1.134.38",
|
|
140
|
+
"@storm-software/config-tools": "^1.188.38",
|
|
141
|
+
"@storm-software/testing-tools": "^1.119.38",
|
|
142
|
+
"@types/node": "^22.19.1",
|
|
143
143
|
"capnp-es": "^0.0.11",
|
|
144
144
|
"chalk": "^5.6.2",
|
|
145
145
|
"commander": "^14.0.2",
|
|
146
146
|
"dts-bundle-generator": "^9.5.1",
|
|
147
|
-
"tsup": "^8.5.
|
|
147
|
+
"tsup": "^8.5.1",
|
|
148
148
|
"tsx": "^4.20.6"
|
|
149
149
|
},
|
|
150
150
|
"publishConfig": { "access": "public" },
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "70bd678a49290690486da02a1721a3ba179a9867"
|
|
152
152
|
}
|
|
@@ -4685,9 +4685,6 @@ import { glob } from "glob";
|
|
|
4685
4685
|
// src/helpers.ts
|
|
4686
4686
|
import { parseJsonConfigFileContent, sys } from "typescript";
|
|
4687
4687
|
|
|
4688
|
-
// src/rpc.ts
|
|
4689
|
-
import { MessageChannel } from "worker_threads";
|
|
4690
|
-
|
|
4691
4688
|
export {
|
|
4692
4689
|
ObjectSize,
|
|
4693
4690
|
Struct,
|
package/schemas/persistent.cjs
CHANGED
|
@@ -6,27 +6,27 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkOP6MHN5Dcjs = require('./chunk-OP6MHN5D.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
13
13
|
|
|
14
14
|
// schemas/persistent.ts
|
|
15
15
|
var _capnpFileId = BigInt("0xb8630836983feed7");
|
|
16
|
-
var Persistent_SaveParams = (_class = class extends
|
|
16
|
+
var Persistent_SaveParams = (_class = class extends _chunkOP6MHN5Dcjs.Struct {
|
|
17
17
|
static {
|
|
18
18
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "Persistent_SaveParams");
|
|
19
19
|
}
|
|
20
20
|
static __initStatic() {this._capnp = {
|
|
21
21
|
displayName: "SaveParams",
|
|
22
22
|
id: "f76fba59183073a5",
|
|
23
|
-
size: new (0,
|
|
23
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(0, 1)
|
|
24
24
|
}}
|
|
25
25
|
_adoptSealFor(value) {
|
|
26
|
-
|
|
26
|
+
_chunkOP6MHN5Dcjs.utils.adopt(value, _chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
27
27
|
}
|
|
28
28
|
_disownSealFor() {
|
|
29
|
-
return
|
|
29
|
+
return _chunkOP6MHN5Dcjs.utils.disown(this.sealFor);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Seal the SturdyRef so that it can only be restored by the specified Owner. This is meant
|
|
@@ -38,41 +38,41 @@ var Persistent_SaveParams = (_class = class extends _chunkRKF2BUL7cjs.Struct {
|
|
|
38
38
|
*
|
|
39
39
|
*/
|
|
40
40
|
get sealFor() {
|
|
41
|
-
return
|
|
41
|
+
return _chunkOP6MHN5Dcjs.utils.getPointer(0, this);
|
|
42
42
|
}
|
|
43
43
|
_hasSealFor() {
|
|
44
|
-
return !
|
|
44
|
+
return !_chunkOP6MHN5Dcjs.utils.isNull(_chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
45
45
|
}
|
|
46
46
|
set sealFor(value) {
|
|
47
|
-
|
|
47
|
+
_chunkOP6MHN5Dcjs.utils.copyFrom(value, _chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
48
48
|
}
|
|
49
49
|
toString() {
|
|
50
50
|
return "Persistent_SaveParams_" + super.toString();
|
|
51
51
|
}
|
|
52
52
|
}, _class.__initStatic(), _class);
|
|
53
|
-
var Persistent_SaveResults = (_class2 = class extends
|
|
53
|
+
var Persistent_SaveResults = (_class2 = class extends _chunkOP6MHN5Dcjs.Struct {
|
|
54
54
|
static {
|
|
55
55
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "Persistent_SaveResults");
|
|
56
56
|
}
|
|
57
57
|
static __initStatic2() {this._capnp = {
|
|
58
58
|
displayName: "SaveResults",
|
|
59
59
|
id: "b76848c18c40efbf",
|
|
60
|
-
size: new (0,
|
|
60
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(0, 1)
|
|
61
61
|
}}
|
|
62
62
|
_adoptSturdyRef(value) {
|
|
63
|
-
|
|
63
|
+
_chunkOP6MHN5Dcjs.utils.adopt(value, _chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
64
64
|
}
|
|
65
65
|
_disownSturdyRef() {
|
|
66
|
-
return
|
|
66
|
+
return _chunkOP6MHN5Dcjs.utils.disown(this.sturdyRef);
|
|
67
67
|
}
|
|
68
68
|
get sturdyRef() {
|
|
69
|
-
return
|
|
69
|
+
return _chunkOP6MHN5Dcjs.utils.getPointer(0, this);
|
|
70
70
|
}
|
|
71
71
|
_hasSturdyRef() {
|
|
72
|
-
return !
|
|
72
|
+
return !_chunkOP6MHN5Dcjs.utils.isNull(_chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
73
73
|
}
|
|
74
74
|
set sturdyRef(value) {
|
|
75
|
-
|
|
75
|
+
_chunkOP6MHN5Dcjs.utils.copyFrom(value, _chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
76
76
|
}
|
|
77
77
|
toString() {
|
|
78
78
|
return "Persistent_SaveResults_" + super.toString();
|
|
@@ -120,12 +120,12 @@ var Persistent$Client = (_class3 = class _Persistent$Client {
|
|
|
120
120
|
method: _Persistent$Client.methods[0],
|
|
121
121
|
paramsFunc
|
|
122
122
|
});
|
|
123
|
-
const pipeline = new (0,
|
|
123
|
+
const pipeline = new (0, _chunkOP6MHN5Dcjs.Pipeline)(Persistent_SaveResults, answer);
|
|
124
124
|
return new Persistent_SaveResults$Promise(pipeline);
|
|
125
125
|
}
|
|
126
126
|
}, _class3.__initStatic3(), _class3.__initStatic4(), _class3);
|
|
127
|
-
|
|
128
|
-
var Persistent$Server = class extends
|
|
127
|
+
_chunkOP6MHN5Dcjs.Registry.register(Persistent$Client.interfaceId, Persistent$Client);
|
|
128
|
+
var Persistent$Server = class extends _chunkOP6MHN5Dcjs.Server {
|
|
129
129
|
static {
|
|
130
130
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "Persistent$Server");
|
|
131
131
|
}
|
|
@@ -143,7 +143,7 @@ var Persistent$Server = class extends _chunkRKF2BUL7cjs.Server {
|
|
|
143
143
|
return new Persistent$Client(this);
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
var Persistent = (_class4 = class extends
|
|
146
|
+
var Persistent = (_class4 = class extends _chunkOP6MHN5Dcjs.Interface {
|
|
147
147
|
static {
|
|
148
148
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "Persistent");
|
|
149
149
|
}
|
|
@@ -154,7 +154,7 @@ var Persistent = (_class4 = class extends _chunkRKF2BUL7cjs.Interface {
|
|
|
154
154
|
static __initStatic9() {this._capnp = {
|
|
155
155
|
displayName: "Persistent",
|
|
156
156
|
id: "c8cb212fcd9f5691",
|
|
157
|
-
size: new (0,
|
|
157
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(0, 0)
|
|
158
158
|
}}
|
|
159
159
|
toString() {
|
|
160
160
|
return "Persistent_" + super.toString();
|
package/schemas/persistent.js
CHANGED
package/schemas/rpc-twoparty.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkOP6MHN5Dcjs = require('./chunk-OP6MHN5D.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
@@ -31,82 +31,82 @@ var Side = {
|
|
|
31
31
|
*/
|
|
32
32
|
CLIENT: 1
|
|
33
33
|
};
|
|
34
|
-
var VatId = (_class = class extends
|
|
34
|
+
var VatId = (_class = class extends _chunkOP6MHN5Dcjs.Struct {
|
|
35
35
|
static {
|
|
36
36
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "VatId");
|
|
37
37
|
}
|
|
38
38
|
static __initStatic() {this._capnp = {
|
|
39
39
|
displayName: "VatId",
|
|
40
40
|
id: "d20b909fee733a8e",
|
|
41
|
-
size: new (0,
|
|
41
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(8, 0)
|
|
42
42
|
}}
|
|
43
43
|
get side() {
|
|
44
|
-
return
|
|
44
|
+
return _chunkOP6MHN5Dcjs.utils.getUint16(0, this);
|
|
45
45
|
}
|
|
46
46
|
set side(value) {
|
|
47
|
-
|
|
47
|
+
_chunkOP6MHN5Dcjs.utils.setUint16(0, value, this);
|
|
48
48
|
}
|
|
49
49
|
toString() {
|
|
50
50
|
return "VatId_" + super.toString();
|
|
51
51
|
}
|
|
52
52
|
}, _class.__initStatic(), _class);
|
|
53
|
-
var ProvisionId = (_class2 = class extends
|
|
53
|
+
var ProvisionId = (_class2 = class extends _chunkOP6MHN5Dcjs.Struct {
|
|
54
54
|
static {
|
|
55
55
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "ProvisionId");
|
|
56
56
|
}
|
|
57
57
|
static __initStatic2() {this._capnp = {
|
|
58
58
|
displayName: "ProvisionId",
|
|
59
59
|
id: "b88d09a9c5f39817",
|
|
60
|
-
size: new (0,
|
|
60
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(8, 0)
|
|
61
61
|
}}
|
|
62
62
|
/**
|
|
63
63
|
* The ID from `JoinKeyPart`.
|
|
64
64
|
*
|
|
65
65
|
*/
|
|
66
66
|
get joinId() {
|
|
67
|
-
return
|
|
67
|
+
return _chunkOP6MHN5Dcjs.utils.getUint32(0, this);
|
|
68
68
|
}
|
|
69
69
|
set joinId(value) {
|
|
70
|
-
|
|
70
|
+
_chunkOP6MHN5Dcjs.utils.setUint32(0, value, this);
|
|
71
71
|
}
|
|
72
72
|
toString() {
|
|
73
73
|
return "ProvisionId_" + super.toString();
|
|
74
74
|
}
|
|
75
75
|
}, _class2.__initStatic2(), _class2);
|
|
76
|
-
var RecipientId = (_class3 = class extends
|
|
76
|
+
var RecipientId = (_class3 = class extends _chunkOP6MHN5Dcjs.Struct {
|
|
77
77
|
static {
|
|
78
78
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "RecipientId");
|
|
79
79
|
}
|
|
80
80
|
static __initStatic3() {this._capnp = {
|
|
81
81
|
displayName: "RecipientId",
|
|
82
82
|
id: "89f389b6fd4082c1",
|
|
83
|
-
size: new (0,
|
|
83
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(0, 0)
|
|
84
84
|
}}
|
|
85
85
|
toString() {
|
|
86
86
|
return "RecipientId_" + super.toString();
|
|
87
87
|
}
|
|
88
88
|
}, _class3.__initStatic3(), _class3);
|
|
89
|
-
var ThirdPartyCapId = (_class4 = class extends
|
|
89
|
+
var ThirdPartyCapId = (_class4 = class extends _chunkOP6MHN5Dcjs.Struct {
|
|
90
90
|
static {
|
|
91
91
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "ThirdPartyCapId");
|
|
92
92
|
}
|
|
93
93
|
static __initStatic4() {this._capnp = {
|
|
94
94
|
displayName: "ThirdPartyCapId",
|
|
95
95
|
id: "b47f4979672cb59d",
|
|
96
|
-
size: new (0,
|
|
96
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(0, 0)
|
|
97
97
|
}}
|
|
98
98
|
toString() {
|
|
99
99
|
return "ThirdPartyCapId_" + super.toString();
|
|
100
100
|
}
|
|
101
101
|
}, _class4.__initStatic4(), _class4);
|
|
102
|
-
var JoinKeyPart = (_class5 = class extends
|
|
102
|
+
var JoinKeyPart = (_class5 = class extends _chunkOP6MHN5Dcjs.Struct {
|
|
103
103
|
static {
|
|
104
104
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "JoinKeyPart");
|
|
105
105
|
}
|
|
106
106
|
static __initStatic5() {this._capnp = {
|
|
107
107
|
displayName: "JoinKeyPart",
|
|
108
108
|
id: "95b29059097fca83",
|
|
109
|
-
size: new (0,
|
|
109
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(8, 0)
|
|
110
110
|
}}
|
|
111
111
|
/**
|
|
112
112
|
* A number identifying this join, chosen by the sender. May be reused once `Finish` messages are
|
|
@@ -114,53 +114,53 @@ var JoinKeyPart = (_class5 = class extends _chunkRKF2BUL7cjs.Struct {
|
|
|
114
114
|
*
|
|
115
115
|
*/
|
|
116
116
|
get joinId() {
|
|
117
|
-
return
|
|
117
|
+
return _chunkOP6MHN5Dcjs.utils.getUint32(0, this);
|
|
118
118
|
}
|
|
119
119
|
set joinId(value) {
|
|
120
|
-
|
|
120
|
+
_chunkOP6MHN5Dcjs.utils.setUint32(0, value, this);
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* The number of capabilities to be joined.
|
|
124
124
|
*
|
|
125
125
|
*/
|
|
126
126
|
get partCount() {
|
|
127
|
-
return
|
|
127
|
+
return _chunkOP6MHN5Dcjs.utils.getUint16(4, this);
|
|
128
128
|
}
|
|
129
129
|
set partCount(value) {
|
|
130
|
-
|
|
130
|
+
_chunkOP6MHN5Dcjs.utils.setUint16(4, value, this);
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* Which part this request targets -- a number in the range [0, partCount).
|
|
134
134
|
*
|
|
135
135
|
*/
|
|
136
136
|
get partNum() {
|
|
137
|
-
return
|
|
137
|
+
return _chunkOP6MHN5Dcjs.utils.getUint16(6, this);
|
|
138
138
|
}
|
|
139
139
|
set partNum(value) {
|
|
140
|
-
|
|
140
|
+
_chunkOP6MHN5Dcjs.utils.setUint16(6, value, this);
|
|
141
141
|
}
|
|
142
142
|
toString() {
|
|
143
143
|
return "JoinKeyPart_" + super.toString();
|
|
144
144
|
}
|
|
145
145
|
}, _class5.__initStatic5(), _class5);
|
|
146
|
-
var JoinResult = (_class6 = class extends
|
|
146
|
+
var JoinResult = (_class6 = class extends _chunkOP6MHN5Dcjs.Struct {
|
|
147
147
|
static {
|
|
148
148
|
_chunkUSNT2KNTcjs.__name.call(void 0, this, "JoinResult");
|
|
149
149
|
}
|
|
150
150
|
static __initStatic6() {this._capnp = {
|
|
151
151
|
displayName: "JoinResult",
|
|
152
152
|
id: "9d263a3630b7ebee",
|
|
153
|
-
size: new (0,
|
|
153
|
+
size: new (0, _chunkOP6MHN5Dcjs.ObjectSize)(8, 1)
|
|
154
154
|
}}
|
|
155
155
|
/**
|
|
156
156
|
* Matches `JoinKeyPart`.
|
|
157
157
|
*
|
|
158
158
|
*/
|
|
159
159
|
get joinId() {
|
|
160
|
-
return
|
|
160
|
+
return _chunkOP6MHN5Dcjs.utils.getUint32(0, this);
|
|
161
161
|
}
|
|
162
162
|
set joinId(value) {
|
|
163
|
-
|
|
163
|
+
_chunkOP6MHN5Dcjs.utils.setUint32(0, value, this);
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* All JoinResults in the set will have the same value for `succeeded`. The receiver actually
|
|
@@ -169,29 +169,29 @@ var JoinResult = (_class6 = class extends _chunkRKF2BUL7cjs.Struct {
|
|
|
169
169
|
*
|
|
170
170
|
*/
|
|
171
171
|
get succeeded() {
|
|
172
|
-
return
|
|
172
|
+
return _chunkOP6MHN5Dcjs.utils.getBit(32, this);
|
|
173
173
|
}
|
|
174
174
|
set succeeded(value) {
|
|
175
|
-
|
|
175
|
+
_chunkOP6MHN5Dcjs.utils.setBit(32, value, this);
|
|
176
176
|
}
|
|
177
177
|
_adoptCap(value) {
|
|
178
|
-
|
|
178
|
+
_chunkOP6MHN5Dcjs.utils.adopt(value, _chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
179
179
|
}
|
|
180
180
|
_disownCap() {
|
|
181
|
-
return
|
|
181
|
+
return _chunkOP6MHN5Dcjs.utils.disown(this.cap);
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
184
|
* One of the JoinResults will have a non-null `cap` which is the joined capability.
|
|
185
185
|
*
|
|
186
186
|
*/
|
|
187
187
|
get cap() {
|
|
188
|
-
return
|
|
188
|
+
return _chunkOP6MHN5Dcjs.utils.getPointer(0, this);
|
|
189
189
|
}
|
|
190
190
|
_hasCap() {
|
|
191
|
-
return !
|
|
191
|
+
return !_chunkOP6MHN5Dcjs.utils.isNull(_chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
192
192
|
}
|
|
193
193
|
set cap(value) {
|
|
194
|
-
|
|
194
|
+
_chunkOP6MHN5Dcjs.utils.copyFrom(value, _chunkOP6MHN5Dcjs.utils.getPointer(0, this));
|
|
195
195
|
}
|
|
196
196
|
toString() {
|
|
197
197
|
return "JoinResult_" + super.toString();
|