@stryke/capnp 0.6.0 → 0.6.2

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 _chunk5Y2STPPFcjs = require('./chunk-5Y2STPPF.cjs');
4
- require('./chunk-IVTBYMMN.cjs');
3
+ var _chunk34UFVQ2Xcjs = require('./chunk-34UFVQ2X.cjs');
4
+ require('./chunk-IJMQEVSJ.cjs');
5
5
 
6
6
 
7
- exports.capnpc = _chunk5Y2STPPFcjs.capnpc;
7
+ exports.capnpc = _chunk34UFVQ2Xcjs.capnpc;
@@ -1,3 +1,4 @@
1
+ import 'capnp-es';
1
2
  import { CapnpcOptions, CapnpcResult } from './types.cjs';
2
3
  import 'capnp-es/capnp/schema';
3
4
  import 'typescript';
package/dist/compile.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import 'capnp-es';
1
2
  import { CapnpcOptions, CapnpcResult } from './types.js';
2
3
  import 'capnp-es/capnp/schema';
3
4
  import 'typescript';
package/dist/compile.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  capnpc
3
- } from "./chunk-FNOKUFI5.js";
4
- import "./chunk-UHN7QD4F.js";
3
+ } from "./chunk-FGRQLKDC.js";
4
+ import "./chunk-7QZRCXNX.js";
5
5
  export {
6
6
  capnpc
7
7
  };
package/dist/index.cjs CHANGED
@@ -1,13 +1,13 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-AHJJINE5.cjs');
2
2
 
3
- var _chunkUNTMJSWJcjs = require('./chunk-UNTMJSWJ.cjs');
4
3
 
4
+ var _chunk34UFVQ2Xcjs = require('./chunk-34UFVQ2X.cjs');
5
5
 
6
- var _chunk5Y2STPPFcjs = require('./chunk-5Y2STPPF.cjs');
7
- require('./chunk-YOA3BS5Q.cjs');
8
- require('./chunk-IVTBYMMN.cjs');
6
+
7
+ var _chunkXNXRTQEOcjs = require('./chunk-XNXRTQEO.cjs');
8
+ require('./chunk-IJMQEVSJ.cjs');
9
9
  require('./chunk-ORA4UQMU.cjs');
10
10
 
11
11
 
12
12
 
13
- exports.capnp = _chunkUNTMJSWJcjs.capnp_exports; exports.capnpc = _chunk5Y2STPPFcjs.capnpc;
13
+ exports.capnp = _chunkXNXRTQEOcjs.dist_exports; exports.capnpc = _chunk34UFVQ2Xcjs.capnpc;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- export { c as capnp } from './capnp-DxRiMkXq.cjs';
1
+ import * as capnpEs from 'capnp-es';
2
+ export { capnpEs as capnp };
2
3
  export { capnpc } from './compile.cjs';
3
4
  export { CapnpcCLIOptions, CapnpcOptions, CapnpcResult, CodeGeneratorContext, CodeGeneratorFileContext } from './types.cjs';
4
- import 'capnp-es';
5
5
  import 'capnp-es/capnp/schema';
6
6
  import 'typescript';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { c as capnp } from './capnp-DxRiMkXq.js';
1
+ import * as capnpEs from 'capnp-es';
2
+ export { capnpEs as capnp };
2
3
  export { capnpc } from './compile.js';
3
4
  export { CapnpcCLIOptions, CapnpcOptions, CapnpcResult, CodeGeneratorContext, CodeGeneratorFileContext } from './types.js';
4
- import 'capnp-es';
5
5
  import 'capnp-es/capnp/schema';
6
6
  import 'typescript';
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import {
2
- capnp_exports
3
- } from "./chunk-NZGPVGFZ.js";
1
+ import "./chunk-TZHOQHWF.js";
4
2
  import {
5
3
  capnpc
6
- } from "./chunk-FNOKUFI5.js";
7
- import "./chunk-I2TLOFS6.js";
8
- import "./chunk-UHN7QD4F.js";
4
+ } from "./chunk-FGRQLKDC.js";
5
+ import {
6
+ dist_exports
7
+ } from "./chunk-QVMMUK6E.js";
8
+ import "./chunk-7QZRCXNX.js";
9
9
  import "./chunk-OULCUN6I.js";
10
10
  export {
11
- capnp_exports as capnp,
11
+ dist_exports as capnp,
12
12
  capnpc
13
13
  };
package/dist/rpc.cjs CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkYOA3BS5Qcjs = require('./chunk-YOA3BS5Q.cjs');
5
+ var _chunkXNXRTQEOcjs = require('./chunk-XNXRTQEO.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunkIVTBYMMNcjs = require('./chunk-IVTBYMMN.cjs');
9
+ var _chunkIJMQEVSJcjs = require('./chunk-IJMQEVSJ.cjs');
10
10
 
11
11
  // src/rpc.ts
12
12
  var _worker_threads = require('worker_threads');
13
13
  var CapnpRPC = (_class = class {constructor() { _class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this); }
14
14
  static {
15
- _chunkIVTBYMMNcjs.__name.call(void 0, this, "CapnpRPC");
15
+ _chunkIJMQEVSJcjs.__name.call(void 0, this, "CapnpRPC");
16
16
  }
17
17
  __init() {this.acceptQueue = new Array()}
18
18
  __init2() {this.connections = {}}
@@ -26,13 +26,13 @@ var CapnpRPC = (_class = class {constructor() { _class.prototype.__init.call(thi
26
26
  connect(id = 0) {
27
27
  if (this.connections[id] !== void 0) return this.connections[id];
28
28
  const ch = new (0, _worker_threads.MessageChannel)();
29
- const conn = new (0, _chunkYOA3BS5Qcjs.Conn)(new MessageChannelTransport(ch.port1));
29
+ const conn = new (0, _chunkXNXRTQEOcjs.Conn)(new MessageChannelTransport(ch.port1));
30
30
  const accept = this.acceptQueue.pop();
31
31
  this.connections[id] = conn;
32
32
  if (accept === void 0) {
33
33
  this.connectQueue.push(ch.port2);
34
34
  } else {
35
- accept.resolve(new (0, _chunkYOA3BS5Qcjs.Conn)(new MessageChannelTransport(ch.port2)));
35
+ accept.resolve(new (0, _chunkXNXRTQEOcjs.Conn)(new MessageChannelTransport(ch.port2)));
36
36
  }
37
37
  return conn;
38
38
  }
@@ -45,9 +45,9 @@ var CapnpRPC = (_class = class {constructor() { _class.prototype.__init.call(thi
45
45
  async accept() {
46
46
  const port2 = this.connectQueue.pop();
47
47
  if (port2 !== void 0) {
48
- return Promise.resolve(new (0, _chunkYOA3BS5Qcjs.Conn)(new MessageChannelTransport(port2)));
48
+ return Promise.resolve(new (0, _chunkXNXRTQEOcjs.Conn)(new MessageChannelTransport(port2)));
49
49
  }
50
- const deferred = new (0, _chunkYOA3BS5Qcjs.Deferred)();
50
+ const deferred = new (0, _chunkXNXRTQEOcjs.Deferred)();
51
51
  this.acceptQueue.push(deferred);
52
52
  return deferred.promise;
53
53
  }
@@ -75,9 +75,9 @@ var CapnpRPC = (_class = class {constructor() { _class.prototype.__init.call(thi
75
75
  this.connections = {};
76
76
  }
77
77
  }, _class);
78
- var MessageChannelTransport = class extends _chunkYOA3BS5Qcjs.DeferredTransport {
78
+ var MessageChannelTransport = class extends _chunkXNXRTQEOcjs.DeferredTransport {
79
79
  static {
80
- _chunkIVTBYMMNcjs.__name.call(void 0, this, "MessageChannelTransport");
80
+ _chunkIJMQEVSJcjs.__name.call(void 0, this, "MessageChannelTransport");
81
81
  }
82
82
 
83
83
  constructor(port) {
@@ -94,7 +94,7 @@ var MessageChannelTransport = class extends _chunkYOA3BS5Qcjs.DeferredTransport
94
94
  }
95
95
 
96
96
  sendMessage(msg) {
97
- const m = new (0, _chunkIVTBYMMNcjs.Message)();
97
+ const m = new (0, _chunkIJMQEVSJcjs.Message)();
98
98
  m.setRoot(msg);
99
99
  const buf = m.toArrayBuffer();
100
100
  this.port.postMessage(buf, [
package/dist/rpc.js CHANGED
@@ -2,11 +2,11 @@ import {
2
2
  Conn,
3
3
  Deferred,
4
4
  DeferredTransport
5
- } from "./chunk-I2TLOFS6.js";
5
+ } from "./chunk-QVMMUK6E.js";
6
6
  import {
7
7
  Message,
8
8
  __name
9
- } from "./chunk-UHN7QD4F.js";
9
+ } from "./chunk-7QZRCXNX.js";
10
10
 
11
11
  // src/rpc.ts
12
12
  import { MessageChannel } from "node:worker_threads";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/capnp",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
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": {
@@ -81,6 +81,14 @@
81
81
  "require": { "types": "./dist/rpc.d.cts", "default": "./dist/rpc.cjs" },
82
82
  "default": { "types": "./dist/rpc.d.ts", "default": "./dist/rpc.js" }
83
83
  },
84
+ "./capnp": {
85
+ "import": { "types": "./dist/capnp.d.ts", "default": "./dist/capnp.js" },
86
+ "require": {
87
+ "types": "./dist/capnp.d.cts",
88
+ "default": "./dist/capnp.cjs"
89
+ },
90
+ "default": { "types": "./dist/capnp.d.ts", "default": "./dist/capnp.js" }
91
+ },
84
92
  "./types": {
85
93
  "import": { "types": "./dist/types.d.ts", "default": "./dist/types.js" },
86
94
  "require": {
@@ -1,22 +0,0 @@
1
- import * as capnpEs from 'capnp-es';
2
-
3
- function _mergeNamespaces(n, m) {
4
- m.forEach(function (e) {
5
- e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
6
- if (k !== 'default' && !(k in n)) {
7
- var d = Object.getOwnPropertyDescriptor(e, k);
8
- Object.defineProperty(n, k, d.get ? d : {
9
- enumerable: true,
10
- get: function () { return e[k]; }
11
- });
12
- }
13
- });
14
- });
15
- return Object.freeze(n);
16
- }
17
-
18
- var capnp = /*#__PURE__*/_mergeNamespaces({
19
- __proto__: null
20
- }, [capnpEs]);
21
-
22
- export { capnp as c };
@@ -1,22 +0,0 @@
1
- import * as capnpEs from 'capnp-es';
2
-
3
- function _mergeNamespaces(n, m) {
4
- m.forEach(function (e) {
5
- e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
6
- if (k !== 'default' && !(k in n)) {
7
- var d = Object.getOwnPropertyDescriptor(e, k);
8
- Object.defineProperty(n, k, d.get ? d : {
9
- enumerable: true,
10
- get: function () { return e[k]; }
11
- });
12
- }
13
- });
14
- });
15
- return Object.freeze(n);
16
- }
17
-
18
- var capnp = /*#__PURE__*/_mergeNamespaces({
19
- __proto__: null
20
- }, [capnpEs]);
21
-
22
- export { capnp as c };
@@ -1,130 +0,0 @@
1
- import {
2
- AnyPointerList,
3
- BoolList,
4
- Conn,
5
- DataList,
6
- Deferred,
7
- DeferredTransport,
8
- Float32List,
9
- Float64List,
10
- Int16List,
11
- Int32List,
12
- Int64List,
13
- Int8List,
14
- Interface,
15
- InterfaceList,
16
- Pipeline,
17
- PointerList,
18
- Registry,
19
- Server,
20
- TextList,
21
- Uint16List,
22
- Uint32List,
23
- Uint64List,
24
- Uint8List,
25
- Void,
26
- VoidList,
27
- answerPipelineClient,
28
- clientFromResolution,
29
- copyCall,
30
- isDataCall,
31
- isFuncCall,
32
- isSameClient,
33
- placeParams,
34
- utils
35
- } from "./chunk-I2TLOFS6.js";
36
- import {
37
- CompositeList,
38
- Data,
39
- ErrorClient,
40
- List,
41
- ListElementSize,
42
- Message,
43
- ObjectSize,
44
- Orphan,
45
- Pointer,
46
- PointerType,
47
- Struct,
48
- Text,
49
- __export,
50
- clientOrNull,
51
- getBitMask,
52
- getFloat32Mask,
53
- getFloat64Mask,
54
- getInt16Mask,
55
- getInt32Mask,
56
- getInt64Mask,
57
- getInt8Mask,
58
- getUint16Mask,
59
- getUint32Mask,
60
- getUint64Mask,
61
- getUint8Mask,
62
- readRawPointer
63
- } from "./chunk-UHN7QD4F.js";
64
-
65
- // src/capnp.ts
66
- var capnp_exports = {};
67
- __export(capnp_exports, {
68
- AnyPointerList: () => AnyPointerList,
69
- BoolList: () => BoolList,
70
- CompositeList: () => CompositeList,
71
- Conn: () => Conn,
72
- Data: () => Data,
73
- DataList: () => DataList,
74
- Deferred: () => Deferred,
75
- DeferredTransport: () => DeferredTransport,
76
- ErrorClient: () => ErrorClient,
77
- Float32List: () => Float32List,
78
- Float64List: () => Float64List,
79
- Int16List: () => Int16List,
80
- Int32List: () => Int32List,
81
- Int64List: () => Int64List,
82
- Int8List: () => Int8List,
83
- Interface: () => Interface,
84
- InterfaceList: () => InterfaceList,
85
- List: () => List,
86
- ListElementSize: () => ListElementSize,
87
- Message: () => Message,
88
- ObjectSize: () => ObjectSize,
89
- Orphan: () => Orphan,
90
- Pipeline: () => Pipeline,
91
- Pointer: () => Pointer,
92
- PointerList: () => PointerList,
93
- PointerType: () => PointerType,
94
- Registry: () => Registry,
95
- Server: () => Server,
96
- Struct: () => Struct,
97
- Text: () => Text,
98
- TextList: () => TextList,
99
- Uint16List: () => Uint16List,
100
- Uint32List: () => Uint32List,
101
- Uint64List: () => Uint64List,
102
- Uint8List: () => Uint8List,
103
- Void: () => Void,
104
- VoidList: () => VoidList,
105
- answerPipelineClient: () => answerPipelineClient,
106
- clientFromResolution: () => clientFromResolution,
107
- clientOrNull: () => clientOrNull,
108
- copyCall: () => copyCall,
109
- getBitMask: () => getBitMask,
110
- getFloat32Mask: () => getFloat32Mask,
111
- getFloat64Mask: () => getFloat64Mask,
112
- getInt16Mask: () => getInt16Mask,
113
- getInt32Mask: () => getInt32Mask,
114
- getInt64Mask: () => getInt64Mask,
115
- getInt8Mask: () => getInt8Mask,
116
- getUint16Mask: () => getUint16Mask,
117
- getUint32Mask: () => getUint32Mask,
118
- getUint64Mask: () => getUint64Mask,
119
- getUint8Mask: () => getUint8Mask,
120
- isDataCall: () => isDataCall,
121
- isFuncCall: () => isFuncCall,
122
- isSameClient: () => isSameClient,
123
- placeParams: () => placeParams,
124
- readRawPointer: () => readRawPointer,
125
- utils: () => utils
126
- });
127
-
128
- export {
129
- capnp_exports
130
- };
@@ -1,130 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
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
- var _chunkYOA3BS5Qcjs = require('./chunk-YOA3BS5Q.cjs');
36
-
37
-
38
-
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
- var _chunkIVTBYMMNcjs = require('./chunk-IVTBYMMN.cjs');
64
-
65
- // src/capnp.ts
66
- var capnp_exports = {};
67
- _chunkIVTBYMMNcjs.__export.call(void 0, capnp_exports, {
68
- AnyPointerList: () => _chunkYOA3BS5Qcjs.AnyPointerList,
69
- BoolList: () => _chunkYOA3BS5Qcjs.BoolList,
70
- CompositeList: () => _chunkIVTBYMMNcjs.CompositeList,
71
- Conn: () => _chunkYOA3BS5Qcjs.Conn,
72
- Data: () => _chunkIVTBYMMNcjs.Data,
73
- DataList: () => _chunkYOA3BS5Qcjs.DataList,
74
- Deferred: () => _chunkYOA3BS5Qcjs.Deferred,
75
- DeferredTransport: () => _chunkYOA3BS5Qcjs.DeferredTransport,
76
- ErrorClient: () => _chunkIVTBYMMNcjs.ErrorClient,
77
- Float32List: () => _chunkYOA3BS5Qcjs.Float32List,
78
- Float64List: () => _chunkYOA3BS5Qcjs.Float64List,
79
- Int16List: () => _chunkYOA3BS5Qcjs.Int16List,
80
- Int32List: () => _chunkYOA3BS5Qcjs.Int32List,
81
- Int64List: () => _chunkYOA3BS5Qcjs.Int64List,
82
- Int8List: () => _chunkYOA3BS5Qcjs.Int8List,
83
- Interface: () => _chunkYOA3BS5Qcjs.Interface,
84
- InterfaceList: () => _chunkYOA3BS5Qcjs.InterfaceList,
85
- List: () => _chunkIVTBYMMNcjs.List,
86
- ListElementSize: () => _chunkIVTBYMMNcjs.ListElementSize,
87
- Message: () => _chunkIVTBYMMNcjs.Message,
88
- ObjectSize: () => _chunkIVTBYMMNcjs.ObjectSize,
89
- Orphan: () => _chunkIVTBYMMNcjs.Orphan,
90
- Pipeline: () => _chunkYOA3BS5Qcjs.Pipeline,
91
- Pointer: () => _chunkIVTBYMMNcjs.Pointer,
92
- PointerList: () => _chunkYOA3BS5Qcjs.PointerList,
93
- PointerType: () => _chunkIVTBYMMNcjs.PointerType,
94
- Registry: () => _chunkYOA3BS5Qcjs.Registry,
95
- Server: () => _chunkYOA3BS5Qcjs.Server,
96
- Struct: () => _chunkIVTBYMMNcjs.Struct,
97
- Text: () => _chunkIVTBYMMNcjs.Text,
98
- TextList: () => _chunkYOA3BS5Qcjs.TextList,
99
- Uint16List: () => _chunkYOA3BS5Qcjs.Uint16List,
100
- Uint32List: () => _chunkYOA3BS5Qcjs.Uint32List,
101
- Uint64List: () => _chunkYOA3BS5Qcjs.Uint64List,
102
- Uint8List: () => _chunkYOA3BS5Qcjs.Uint8List,
103
- Void: () => _chunkYOA3BS5Qcjs.Void,
104
- VoidList: () => _chunkYOA3BS5Qcjs.VoidList,
105
- answerPipelineClient: () => _chunkYOA3BS5Qcjs.answerPipelineClient,
106
- clientFromResolution: () => _chunkYOA3BS5Qcjs.clientFromResolution,
107
- clientOrNull: () => _chunkIVTBYMMNcjs.clientOrNull,
108
- copyCall: () => _chunkYOA3BS5Qcjs.copyCall,
109
- getBitMask: () => _chunkIVTBYMMNcjs.getBitMask,
110
- getFloat32Mask: () => _chunkIVTBYMMNcjs.getFloat32Mask,
111
- getFloat64Mask: () => _chunkIVTBYMMNcjs.getFloat64Mask,
112
- getInt16Mask: () => _chunkIVTBYMMNcjs.getInt16Mask,
113
- getInt32Mask: () => _chunkIVTBYMMNcjs.getInt32Mask,
114
- getInt64Mask: () => _chunkIVTBYMMNcjs.getInt64Mask,
115
- getInt8Mask: () => _chunkIVTBYMMNcjs.getInt8Mask,
116
- getUint16Mask: () => _chunkIVTBYMMNcjs.getUint16Mask,
117
- getUint32Mask: () => _chunkIVTBYMMNcjs.getUint32Mask,
118
- getUint64Mask: () => _chunkIVTBYMMNcjs.getUint64Mask,
119
- getUint8Mask: () => _chunkIVTBYMMNcjs.getUint8Mask,
120
- isDataCall: () => _chunkYOA3BS5Qcjs.isDataCall,
121
- isFuncCall: () => _chunkYOA3BS5Qcjs.isFuncCall,
122
- isSameClient: () => _chunkYOA3BS5Qcjs.isSameClient,
123
- placeParams: () => _chunkYOA3BS5Qcjs.placeParams,
124
- readRawPointer: () => _chunkIVTBYMMNcjs.readRawPointer,
125
- utils: () => _chunkYOA3BS5Qcjs.utils
126
- });
127
-
128
-
129
-
130
- exports.capnp_exports = capnp_exports;