@stryke/capnp 0.4.4 → 0.5.0

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/compile.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWYA7EDMTcjs = require('./chunk-WYA7EDMT.cjs');
4
- require('./chunk-USNT2KNT.cjs');
3
+ var _chunk4DIFIPQVcjs = require('./chunk-4DIFIPQV.cjs');
4
+ require('./chunk-C6LZ6PNU.cjs');
5
5
 
6
6
 
7
- exports.capnpc = _chunkWYA7EDMTcjs.capnpc;
7
+ exports.capnpc = _chunk4DIFIPQVcjs.capnpc;
@@ -1,4 +1,5 @@
1
1
  import { CapnpcOptions, CapnpcResult } from './types.cjs';
2
+ import 'capnp-es';
2
3
  import 'capnp-es/capnp/schema';
3
4
  import 'typescript';
4
5
 
package/dist/compile.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { CapnpcOptions, CapnpcResult } from './types.js';
2
+ import 'capnp-es';
2
3
  import 'capnp-es/capnp/schema';
3
4
  import 'typescript';
4
5
 
package/dist/compile.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  capnpc
3
- } from "./chunk-BIIH7QKH.js";
4
- import "./chunk-SHUYVCID.js";
3
+ } from "./chunk-MXOTCQAB.js";
4
+ import "./chunk-I2A4KWAA.js";
5
5
  export {
6
6
  capnpc
7
7
  };
package/dist/index.cjs CHANGED
@@ -1,8 +1,127 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWYA7EDMTcjs = require('./chunk-WYA7EDMT.cjs');
4
- require('./chunk-USNT2KNT.cjs');
3
+ var _chunk4DIFIPQVcjs = require('./chunk-4DIFIPQV.cjs');
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+ var _chunkCI4GMXK3cjs = require('./chunk-CI4GMXK3.cjs');
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+ var _chunkC6LZ6PNUcjs = require('./chunk-C6LZ6PNU.cjs');
5
66
  require('./chunk-ORA4UQMU.cjs');
6
67
 
7
68
 
8
- exports.capnpc = _chunkWYA7EDMTcjs.capnpc;
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+ exports.AnyPointerList = _chunkCI4GMXK3cjs.AnyPointerList; exports.BoolList = _chunkCI4GMXK3cjs.BoolList; exports.CompositeList = _chunkC6LZ6PNUcjs.CompositeList; exports.Conn = _chunkCI4GMXK3cjs.Conn; exports.Data = _chunkC6LZ6PNUcjs.Data; exports.DataList = _chunkCI4GMXK3cjs.DataList; exports.Deferred = _chunkCI4GMXK3cjs.Deferred; exports.DeferredTransport = _chunkCI4GMXK3cjs.DeferredTransport; exports.ErrorClient = _chunkC6LZ6PNUcjs.ErrorClient; exports.Float32List = _chunkCI4GMXK3cjs.Float32List; exports.Float64List = _chunkCI4GMXK3cjs.Float64List; exports.Int16List = _chunkCI4GMXK3cjs.Int16List; exports.Int32List = _chunkCI4GMXK3cjs.Int32List; exports.Int64List = _chunkCI4GMXK3cjs.Int64List; exports.Int8List = _chunkCI4GMXK3cjs.Int8List; exports.Interface = _chunkCI4GMXK3cjs.Interface; exports.InterfaceList = _chunkCI4GMXK3cjs.InterfaceList; exports.List = _chunkC6LZ6PNUcjs.List; exports.ListElementSize = _chunkC6LZ6PNUcjs.ListElementSize; exports.Message = _chunkC6LZ6PNUcjs.Message; exports.ObjectSize = _chunkC6LZ6PNUcjs.ObjectSize; exports.Orphan = _chunkC6LZ6PNUcjs.Orphan; exports.Pipeline = _chunkCI4GMXK3cjs.Pipeline; exports.Pointer = _chunkC6LZ6PNUcjs.Pointer; exports.PointerList = _chunkCI4GMXK3cjs.PointerList; exports.PointerType = _chunkC6LZ6PNUcjs.PointerType; exports.Registry = _chunkCI4GMXK3cjs.Registry; exports.Server = _chunkCI4GMXK3cjs.Server; exports.Struct = _chunkC6LZ6PNUcjs.Struct; exports.Text = _chunkC6LZ6PNUcjs.Text; exports.TextList = _chunkCI4GMXK3cjs.TextList; exports.Uint16List = _chunkCI4GMXK3cjs.Uint16List; exports.Uint32List = _chunkCI4GMXK3cjs.Uint32List; exports.Uint64List = _chunkCI4GMXK3cjs.Uint64List; exports.Uint8List = _chunkCI4GMXK3cjs.Uint8List; exports.Void = _chunkCI4GMXK3cjs.Void; exports.VoidList = _chunkCI4GMXK3cjs.VoidList; exports.answerPipelineClient = _chunkCI4GMXK3cjs.answerPipelineClient; exports.capnpc = _chunk4DIFIPQVcjs.capnpc; exports.clientFromResolution = _chunkCI4GMXK3cjs.clientFromResolution; exports.clientOrNull = _chunkC6LZ6PNUcjs.clientOrNull; exports.copyCall = _chunkCI4GMXK3cjs.copyCall; exports.getBitMask = _chunkC6LZ6PNUcjs.getBitMask; exports.getFloat32Mask = _chunkC6LZ6PNUcjs.getFloat32Mask; exports.getFloat64Mask = _chunkC6LZ6PNUcjs.getFloat64Mask; exports.getInt16Mask = _chunkC6LZ6PNUcjs.getInt16Mask; exports.getInt32Mask = _chunkC6LZ6PNUcjs.getInt32Mask; exports.getInt64Mask = _chunkC6LZ6PNUcjs.getInt64Mask; exports.getInt8Mask = _chunkC6LZ6PNUcjs.getInt8Mask; exports.getUint16Mask = _chunkC6LZ6PNUcjs.getUint16Mask; exports.getUint32Mask = _chunkC6LZ6PNUcjs.getUint32Mask; exports.getUint64Mask = _chunkC6LZ6PNUcjs.getUint64Mask; exports.getUint8Mask = _chunkC6LZ6PNUcjs.getUint8Mask; exports.isDataCall = _chunkCI4GMXK3cjs.isDataCall; exports.isFuncCall = _chunkCI4GMXK3cjs.isFuncCall; exports.isSameClient = _chunkCI4GMXK3cjs.isSameClient; exports.placeParams = _chunkCI4GMXK3cjs.placeParams; exports.readRawPointer = _chunkC6LZ6PNUcjs.readRawPointer; exports.utils = _chunkCI4GMXK3cjs.utils;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { capnpc } from './compile.cjs';
2
2
  export { CapnpcCLIOptions, CapnpcOptions, CapnpcResult, CodeGeneratorContext, CodeGeneratorFileContext } from './types.cjs';
3
+ export * from 'capnp-es';
3
4
  import 'capnp-es/capnp/schema';
4
5
  import 'typescript';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { capnpc } from './compile.js';
2
2
  export { CapnpcCLIOptions, CapnpcOptions, CapnpcResult, CodeGeneratorContext, CodeGeneratorFileContext } from './types.js';
3
+ export * from 'capnp-es';
3
4
  import 'capnp-es/capnp/schema';
4
5
  import 'typescript';
package/dist/index.js CHANGED
@@ -1,8 +1,127 @@
1
1
  import {
2
2
  capnpc
3
- } from "./chunk-BIIH7QKH.js";
4
- import "./chunk-SHUYVCID.js";
3
+ } from "./chunk-MXOTCQAB.js";
4
+ import {
5
+ AnyPointerList,
6
+ BoolList,
7
+ Conn,
8
+ DataList,
9
+ Deferred,
10
+ DeferredTransport,
11
+ Float32List,
12
+ Float64List,
13
+ Int16List,
14
+ Int32List,
15
+ Int64List,
16
+ Int8List,
17
+ Interface,
18
+ InterfaceList,
19
+ Pipeline,
20
+ PointerList,
21
+ Registry,
22
+ Server,
23
+ TextList,
24
+ Uint16List,
25
+ Uint32List,
26
+ Uint64List,
27
+ Uint8List,
28
+ Void,
29
+ VoidList,
30
+ answerPipelineClient,
31
+ clientFromResolution,
32
+ copyCall,
33
+ isDataCall,
34
+ isFuncCall,
35
+ isSameClient,
36
+ placeParams,
37
+ utils
38
+ } from "./chunk-SAH52C4V.js";
39
+ import {
40
+ CompositeList,
41
+ Data,
42
+ ErrorClient,
43
+ List,
44
+ ListElementSize,
45
+ Message,
46
+ ObjectSize,
47
+ Orphan,
48
+ Pointer,
49
+ PointerType,
50
+ Struct,
51
+ Text,
52
+ clientOrNull,
53
+ getBitMask,
54
+ getFloat32Mask,
55
+ getFloat64Mask,
56
+ getInt16Mask,
57
+ getInt32Mask,
58
+ getInt64Mask,
59
+ getInt8Mask,
60
+ getUint16Mask,
61
+ getUint32Mask,
62
+ getUint64Mask,
63
+ getUint8Mask,
64
+ readRawPointer
65
+ } from "./chunk-I2A4KWAA.js";
5
66
  import "./chunk-OULCUN6I.js";
6
67
  export {
7
- capnpc
68
+ AnyPointerList,
69
+ BoolList,
70
+ CompositeList,
71
+ Conn,
72
+ Data,
73
+ DataList,
74
+ Deferred,
75
+ DeferredTransport,
76
+ ErrorClient,
77
+ Float32List,
78
+ Float64List,
79
+ Int16List,
80
+ Int32List,
81
+ Int64List,
82
+ Int8List,
83
+ Interface,
84
+ InterfaceList,
85
+ List,
86
+ ListElementSize,
87
+ Message,
88
+ ObjectSize,
89
+ Orphan,
90
+ Pipeline,
91
+ Pointer,
92
+ PointerList,
93
+ PointerType,
94
+ Registry,
95
+ Server,
96
+ Struct,
97
+ Text,
98
+ TextList,
99
+ Uint16List,
100
+ Uint32List,
101
+ Uint64List,
102
+ Uint8List,
103
+ Void,
104
+ VoidList,
105
+ answerPipelineClient,
106
+ capnpc,
107
+ clientFromResolution,
108
+ clientOrNull,
109
+ copyCall,
110
+ getBitMask,
111
+ getFloat32Mask,
112
+ getFloat64Mask,
113
+ getInt16Mask,
114
+ getInt32Mask,
115
+ getInt64Mask,
116
+ getInt8Mask,
117
+ getUint16Mask,
118
+ getUint32Mask,
119
+ getUint64Mask,
120
+ getUint8Mask,
121
+ isDataCall,
122
+ isFuncCall,
123
+ isSameClient,
124
+ placeParams,
125
+ readRawPointer,
126
+ utils
8
127
  };
package/dist/rpc.cjs CHANGED
@@ -1,13 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
2
2
 
3
- var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
3
+
4
+
5
+ var _chunkCI4GMXK3cjs = require('./chunk-CI4GMXK3.cjs');
6
+
7
+
8
+
9
+ var _chunkC6LZ6PNUcjs = require('./chunk-C6LZ6PNU.cjs');
4
10
 
5
11
  // src/rpc.ts
6
- var _capnpes = require('capnp-es');
7
12
  var _worker_threads = require('worker_threads');
8
13
  var CapnpRPC = (_class = class {constructor() { _class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this); }
9
14
  static {
10
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "CapnpRPC");
15
+ _chunkC6LZ6PNUcjs.__name.call(void 0, this, "CapnpRPC");
11
16
  }
12
17
  __init() {this.acceptQueue = new Array()}
13
18
  __init2() {this.connections = {}}
@@ -21,13 +26,13 @@ var CapnpRPC = (_class = class {constructor() { _class.prototype.__init.call(thi
21
26
  connect(id = 0) {
22
27
  if (this.connections[id] !== void 0) return this.connections[id];
23
28
  const ch = new (0, _worker_threads.MessageChannel)();
24
- const conn = new (0, _capnpes.Conn)(new MessageChannelTransport(ch.port1));
29
+ const conn = new (0, _chunkCI4GMXK3cjs.Conn)(new MessageChannelTransport(ch.port1));
25
30
  const accept = this.acceptQueue.pop();
26
31
  this.connections[id] = conn;
27
32
  if (accept === void 0) {
28
33
  this.connectQueue.push(ch.port2);
29
34
  } else {
30
- accept.resolve(new (0, _capnpes.Conn)(new MessageChannelTransport(ch.port2)));
35
+ accept.resolve(new (0, _chunkCI4GMXK3cjs.Conn)(new MessageChannelTransport(ch.port2)));
31
36
  }
32
37
  return conn;
33
38
  }
@@ -40,9 +45,9 @@ var CapnpRPC = (_class = class {constructor() { _class.prototype.__init.call(thi
40
45
  async accept() {
41
46
  const port2 = this.connectQueue.pop();
42
47
  if (port2 !== void 0) {
43
- return Promise.resolve(new (0, _capnpes.Conn)(new MessageChannelTransport(port2)));
48
+ return Promise.resolve(new (0, _chunkCI4GMXK3cjs.Conn)(new MessageChannelTransport(port2)));
44
49
  }
45
- const deferred = new (0, _capnpes.Deferred)();
50
+ const deferred = new (0, _chunkCI4GMXK3cjs.Deferred)();
46
51
  this.acceptQueue.push(deferred);
47
52
  return deferred.promise;
48
53
  }
@@ -70,9 +75,9 @@ var CapnpRPC = (_class = class {constructor() { _class.prototype.__init.call(thi
70
75
  this.connections = {};
71
76
  }
72
77
  }, _class);
73
- var MessageChannelTransport = class extends _capnpes.DeferredTransport {
78
+ var MessageChannelTransport = class extends _chunkCI4GMXK3cjs.DeferredTransport {
74
79
  static {
75
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "MessageChannelTransport");
80
+ _chunkC6LZ6PNUcjs.__name.call(void 0, this, "MessageChannelTransport");
76
81
  }
77
82
 
78
83
  constructor(port) {
@@ -89,7 +94,7 @@ var MessageChannelTransport = class extends _capnpes.DeferredTransport {
89
94
  }
90
95
 
91
96
  sendMessage(msg) {
92
- const m = new (0, _capnpes.Message)();
97
+ const m = new (0, _chunkC6LZ6PNUcjs.Message)();
93
98
  m.setRoot(msg);
94
99
  const buf = m.toArrayBuffer();
95
100
  this.port.postMessage(buf, [
package/dist/rpc.js CHANGED
@@ -1,9 +1,14 @@
1
1
  import {
2
+ Conn,
3
+ Deferred,
4
+ DeferredTransport
5
+ } from "./chunk-SAH52C4V.js";
6
+ import {
7
+ Message,
2
8
  __name
3
- } from "./chunk-SHUYVCID.js";
9
+ } from "./chunk-I2A4KWAA.js";
4
10
 
5
11
  // src/rpc.ts
6
- import { Conn, Deferred, DeferredTransport, Message } from "capnp-es";
7
12
  import { MessageChannel } from "node:worker_threads";
8
13
  var CapnpRPC = class {
9
14
  static {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/capnp",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
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": {
@@ -104,15 +104,12 @@
104
104
  ],
105
105
  "peerDependencies": { "typescript": ">=4.0.0" },
106
106
  "peerDependenciesMeta": { "typescript": { "optional": false } },
107
- "dependencies": {
108
- "@stryke/fs": "^0.20.6",
109
- "@stryke/path": "^0.7.5",
110
- "capnp-es": "^0.0.11"
111
- },
107
+ "dependencies": { "@stryke/fs": "^0.20.6", "@stryke/path": "^0.7.5" },
112
108
  "devDependencies": {
113
109
  "@storm-software/config": "latest",
114
110
  "@storm-software/config-tools": "latest",
115
111
  "@types/node": "^22.14.0",
112
+ "capnp-es": "^0.0.11",
116
113
  "chalk": "^5.4.1",
117
114
  "commander": "^14.0.0"
118
115
  },