@stryke/capnp 0.9.13 → 0.10.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.
@@ -0,0 +1,76 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
4
+ var _console = require('@storm-software/config-tools/logger/console');
5
+ var _compiler = require('capnp-es/compiler');
6
+ var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
7
+ var _nodebuffer = require('node:buffer');
8
+ var _nodechild_process = require('node:child_process');
9
+ var _helpersjs = require('./helpers.js');
10
+ async function capnpc(options) {
11
+ const { output, tsconfig, schemas = [], tty } = options;
12
+ let dataBuf = _nodebuffer.Buffer.alloc(0);
13
+ if (tty) {
14
+ const chunks = [];
15
+ process.stdin.on("data", (chunk) => {
16
+ chunks.push(chunk);
17
+ });
18
+ await new Promise((resolve) => {
19
+ process.stdin.on("end", resolve);
20
+ });
21
+ const reqBuffer = _nodebuffer.Buffer.alloc(chunks.reduce((l, chunk) => l + chunk.byteLength, 0));
22
+ let i = 0;
23
+ for (const chunk of chunks) {
24
+ chunk.copy(reqBuffer, i);
25
+ i += chunk.byteLength;
26
+ }
27
+ dataBuf = reqBuffer;
28
+ }
29
+ if (dataBuf.byteLength === 0) {
30
+ const opts = [];
31
+ if (output) {
32
+ opts.push(`-o-:${output}`);
33
+ } else {
34
+ opts.push("-o-");
35
+ }
36
+ dataBuf = await new Promise((resolve) => {
37
+ _nodechild_process.exec.call(void 0, `capnpc ${opts.join(" ")} ${schemas.join(" ")}`, {
38
+ encoding: "buffer"
39
+ }, (error, stdout, stderr) => {
40
+ if (stderr.length > 0) {
41
+ process.stderr.write(stderr);
42
+ }
43
+ if (error) {
44
+ throw error;
45
+ }
46
+ resolve(stdout);
47
+ });
48
+ });
49
+ }
50
+ return _compiler.compileAll.call(void 0, dataBuf, {
51
+ ts: _nullishCoalesce(options.ts, () => ( true)),
52
+ js: false,
53
+ dts: false,
54
+ tsconfig
55
+ });
56
+ }
57
+ _chunkUSNT2KNTcjs.__name.call(void 0, capnpc, "capnpc");
58
+ async function compile(dataBuf, options) {
59
+ const resolvedOptions = await _helpersjs.resolveOptions.call(void 0, options);
60
+ if (!resolvedOptions) {
61
+ _console.writeWarning.call(void 0, "\u2716 Unable to resolve Cap'n Proto compiler options - the program will terminate", {
62
+ logLevel: "all"
63
+ });
64
+ return;
65
+ }
66
+ return _compiler.compileAll.call(void 0, dataBuf, _defu2.default.call(void 0, resolvedOptions, {
67
+ ts: true,
68
+ js: false,
69
+ dts: false
70
+ }));
71
+ }
72
+ _chunkUSNT2KNTcjs.__name.call(void 0, compile, "compile");
73
+
74
+
75
+
76
+ exports.capnpc = capnpc; exports.compile = compile;
@@ -0,0 +1,38 @@
1
+ import * as capnp_es_capnp_schema from 'capnp-es/capnp/schema';
2
+ import { Buffer } from 'node:buffer';
3
+ import { CapnpcOptions, CapnpcResult, CapnpcCLIOptions } from './types.cjs';
4
+ import 'typescript';
5
+
6
+ /**
7
+ * Compiles Cap'n Proto schemas into TypeScript files.
8
+ *
9
+ * @param options - The options for the compilation process.
10
+ * @returns A promise that resolves to the compilation result.
11
+ */
12
+ declare function capnpc(options: CapnpcOptions): Promise<CapnpcResult>;
13
+ /**
14
+ * Compiles Cap'n Proto schemas into TypeScript files.
15
+ *
16
+ * @param dataBuf - The buffer containing the Cap'n Proto schema data.
17
+ * @param options - The options for the compilation process.
18
+ * @returns A promise that resolves to the compilation result.
19
+ */
20
+ declare function compile(dataBuf: Buffer, options: CapnpcCLIOptions): Promise<{
21
+ ctx: {
22
+ files: {
23
+ readonly req: capnp_es_capnp_schema.CodeGeneratorRequest;
24
+ readonly file: capnp_es_capnp_schema.CodeGeneratorRequest_RequestedFile;
25
+ readonly nodes: capnp_es_capnp_schema.Node[];
26
+ readonly imports: capnp_es_capnp_schema.CodeGeneratorRequest_RequestedFile_Import[];
27
+ concreteLists: Array<[string, capnp_es_capnp_schema.Field]>;
28
+ generatedNodeIds: Set<string>;
29
+ generatedResultsPromiseIds: Set<bigint>;
30
+ tsPath: string;
31
+ codeParts: string[];
32
+ toString(): string;
33
+ }[];
34
+ };
35
+ files: Map<string, string>;
36
+ } | undefined>;
37
+
38
+ export { capnpc, compile };
@@ -0,0 +1,38 @@
1
+ import * as capnp_es_capnp_schema from 'capnp-es/capnp/schema';
2
+ import { Buffer } from 'node:buffer';
3
+ import { CapnpcOptions, CapnpcResult, CapnpcCLIOptions } from './types.js';
4
+ import 'typescript';
5
+
6
+ /**
7
+ * Compiles Cap'n Proto schemas into TypeScript files.
8
+ *
9
+ * @param options - The options for the compilation process.
10
+ * @returns A promise that resolves to the compilation result.
11
+ */
12
+ declare function capnpc(options: CapnpcOptions): Promise<CapnpcResult>;
13
+ /**
14
+ * Compiles Cap'n Proto schemas into TypeScript files.
15
+ *
16
+ * @param dataBuf - The buffer containing the Cap'n Proto schema data.
17
+ * @param options - The options for the compilation process.
18
+ * @returns A promise that resolves to the compilation result.
19
+ */
20
+ declare function compile(dataBuf: Buffer, options: CapnpcCLIOptions): Promise<{
21
+ ctx: {
22
+ files: {
23
+ readonly req: capnp_es_capnp_schema.CodeGeneratorRequest;
24
+ readonly file: capnp_es_capnp_schema.CodeGeneratorRequest_RequestedFile;
25
+ readonly nodes: capnp_es_capnp_schema.Node[];
26
+ readonly imports: capnp_es_capnp_schema.CodeGeneratorRequest_RequestedFile_Import[];
27
+ concreteLists: Array<[string, capnp_es_capnp_schema.Field]>;
28
+ generatedNodeIds: Set<string>;
29
+ generatedResultsPromiseIds: Set<bigint>;
30
+ tsPath: string;
31
+ codeParts: string[];
32
+ toString(): string;
33
+ }[];
34
+ };
35
+ files: Map<string, string>;
36
+ } | undefined>;
37
+
38
+ export { capnpc, compile };
@@ -0,0 +1,76 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-SHUYVCID.js";
4
+ import { writeWarning } from "@storm-software/config-tools/logger/console";
5
+ import { compileAll } from "capnp-es/compiler";
6
+ import defu from "defu";
7
+ import { Buffer } from "node:buffer";
8
+ import { exec } from "node:child_process";
9
+ import { resolveOptions } from "./helpers.js";
10
+ async function capnpc(options) {
11
+ const { output, tsconfig, schemas = [], tty } = options;
12
+ let dataBuf = Buffer.alloc(0);
13
+ if (tty) {
14
+ const chunks = [];
15
+ process.stdin.on("data", (chunk) => {
16
+ chunks.push(chunk);
17
+ });
18
+ await new Promise((resolve) => {
19
+ process.stdin.on("end", resolve);
20
+ });
21
+ const reqBuffer = Buffer.alloc(chunks.reduce((l, chunk) => l + chunk.byteLength, 0));
22
+ let i = 0;
23
+ for (const chunk of chunks) {
24
+ chunk.copy(reqBuffer, i);
25
+ i += chunk.byteLength;
26
+ }
27
+ dataBuf = reqBuffer;
28
+ }
29
+ if (dataBuf.byteLength === 0) {
30
+ const opts = [];
31
+ if (output) {
32
+ opts.push(`-o-:${output}`);
33
+ } else {
34
+ opts.push("-o-");
35
+ }
36
+ dataBuf = await new Promise((resolve) => {
37
+ exec(`capnpc ${opts.join(" ")} ${schemas.join(" ")}`, {
38
+ encoding: "buffer"
39
+ }, (error, stdout, stderr) => {
40
+ if (stderr.length > 0) {
41
+ process.stderr.write(stderr);
42
+ }
43
+ if (error) {
44
+ throw error;
45
+ }
46
+ resolve(stdout);
47
+ });
48
+ });
49
+ }
50
+ return compileAll(dataBuf, {
51
+ ts: options.ts ?? true,
52
+ js: false,
53
+ dts: false,
54
+ tsconfig
55
+ });
56
+ }
57
+ __name(capnpc, "capnpc");
58
+ async function compile(dataBuf, options) {
59
+ const resolvedOptions = await resolveOptions(options);
60
+ if (!resolvedOptions) {
61
+ writeWarning("\u2716 Unable to resolve Cap'n Proto compiler options - the program will terminate", {
62
+ logLevel: "all"
63
+ });
64
+ return;
65
+ }
66
+ return compileAll(dataBuf, defu(resolvedOptions, {
67
+ ts: true,
68
+ js: false,
69
+ dts: false
70
+ }));
71
+ }
72
+ __name(compile, "compile");
73
+ export {
74
+ capnpc,
75
+ compile
76
+ };
@@ -0,0 +1,52 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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; }
2
+
3
+ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
4
+ var _console = require('@storm-software/config-tools/logger/console');
5
+ var _json = require('@stryke/fs/json');
6
+ var _listfiles = require('@stryke/fs/list-files');
7
+ var _exists = require('@stryke/path/exists');
8
+ var _filepathfns = require('@stryke/path/file-path-fns');
9
+ var _joinpaths = require('@stryke/path/join-paths');
10
+ var _typescript = require('typescript');
11
+ async function resolveOptions(options) {
12
+ const tsconfigPath = _optionalChain([options, 'access', _ => _.tsconfig, 'optionalAccess', _2 => _2.replace, 'call', _3 => _3("{projectRoot}", options.projectRoot), 'optionalAccess', _4 => _4.replace, 'call', _5 => _5("{workspaceRoot}", options.workspaceRoot)]);
13
+ const schema = options.schema ? options.schema.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : options.projectRoot;
14
+ if (!_exists.existsSync.call(void 0, tsconfigPath)) {
15
+ const errorMessage = options.tsconfig ? `\u2716 The specified TypeScript configuration file "${tsconfigPath}" does not exist. Please provide a valid path.` : "\u2716 The specified TypeScript configuration file does not exist. Please provide a valid path.";
16
+ _console.writeFatal.call(void 0, errorMessage, {
17
+ logLevel: "all"
18
+ });
19
+ throw new Error(errorMessage);
20
+ }
21
+ const resolvedTsconfig = await _json.readJsonFile.call(void 0, tsconfigPath);
22
+ const tsconfig = _typescript.parseJsonConfigFileContent.call(void 0, resolvedTsconfig, _typescript.sys, _filepathfns.findFilePath.call(void 0, tsconfigPath));
23
+ tsconfig.options.configFilePath = tsconfigPath;
24
+ tsconfig.options.noImplicitOverride = false;
25
+ tsconfig.options.noUnusedLocals = false;
26
+ tsconfig.options.noUnusedParameters = false;
27
+ tsconfig.options.outDir = _joinpaths.joinPaths.call(void 0, options.projectRoot, _filepathfns.relativePath.call(void 0, _filepathfns.findFilePath.call(void 0, tsconfigPath), _joinpaths.joinPaths.call(void 0, options.workspaceRoot, schema.endsWith(".capnp") ? _filepathfns.findFilePath.call(void 0, schema) : schema)));
28
+ const schemas = [];
29
+ if (!schema || !schema.includes("*") && !_exists.existsSync.call(void 0, schema)) {
30
+ throw new Error(`\u2716 The schema path "${schema}" is invalid. Please provide a valid path.`);
31
+ }
32
+ schemas.push(...await _listfiles.listFiles.call(void 0, schema.includes("*") ? schema.endsWith(".capnp") ? schema : `${schema}.capnp` : _joinpaths.joinPaths.call(void 0, schema, "**/*.capnp")));
33
+ if (schemas.length === 0) {
34
+ _console.writeWarning.call(void 0, `\u2716 No Cap'n Proto schema files found in the specified source paths: ${schemas.join(", ")}. As a result, the Cap'n Proto compiler will not be able to generate any output files. Please ensure that the paths are correct and contain .capnp files.`, {
35
+ logLevel: "all"
36
+ });
37
+ return null;
38
+ }
39
+ return {
40
+ workspaceRoot: options.workspaceRoot,
41
+ projectRoot: options.projectRoot,
42
+ schemas,
43
+ js: _nullishCoalesce(options.js, () => ( false)),
44
+ ts: _nullishCoalesce(options.ts, () => ( (options.noTs !== void 0 ? !options.noTs : true))),
45
+ dts: _nullishCoalesce(options.dts, () => ( (options.noDts !== void 0 ? !options.noDts : true))),
46
+ tsconfig: _optionalChain([tsconfig, 'optionalAccess', _6 => _6.options])
47
+ };
48
+ }
49
+ _chunkUSNT2KNTcjs.__name.call(void 0, resolveOptions, "resolveOptions");
50
+
51
+
52
+ exports.resolveOptions = resolveOptions;
@@ -0,0 +1,13 @@
1
+ import { CapnpcCLIOptions, CapnpcOptions } from './types.cjs';
2
+ import 'capnp-es/capnp/schema';
3
+ import 'typescript';
4
+
5
+ /**
6
+ * Resolves the options for the Cap'n Proto compiler.
7
+ *
8
+ * @param options - The options to resolve
9
+ * @returns The resolved options
10
+ */
11
+ declare function resolveOptions(options: CapnpcCLIOptions): Promise<CapnpcOptions | null>;
12
+
13
+ export { resolveOptions };
@@ -0,0 +1,13 @@
1
+ import { CapnpcCLIOptions, CapnpcOptions } from './types.js';
2
+ import 'capnp-es/capnp/schema';
3
+ import 'typescript';
4
+
5
+ /**
6
+ * Resolves the options for the Cap'n Proto compiler.
7
+ *
8
+ * @param options - The options to resolve
9
+ * @returns The resolved options
10
+ */
11
+ declare function resolveOptions(options: CapnpcCLIOptions): Promise<CapnpcOptions | null>;
12
+
13
+ export { resolveOptions };
@@ -0,0 +1,52 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-SHUYVCID.js";
4
+ import { writeFatal, writeWarning } from "@storm-software/config-tools/logger/console";
5
+ import { readJsonFile } from "@stryke/fs/json";
6
+ import { listFiles } from "@stryke/fs/list-files";
7
+ import { existsSync } from "@stryke/path/exists";
8
+ import { findFilePath, relativePath } from "@stryke/path/file-path-fns";
9
+ import { joinPaths } from "@stryke/path/join-paths";
10
+ import { parseJsonConfigFileContent, sys } from "typescript";
11
+ async function resolveOptions(options) {
12
+ const tsconfigPath = options.tsconfig?.replace("{projectRoot}", options.projectRoot)?.replace("{workspaceRoot}", options.workspaceRoot);
13
+ const schema = options.schema ? options.schema.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : options.projectRoot;
14
+ if (!existsSync(tsconfigPath)) {
15
+ const errorMessage = options.tsconfig ? `\u2716 The specified TypeScript configuration file "${tsconfigPath}" does not exist. Please provide a valid path.` : "\u2716 The specified TypeScript configuration file does not exist. Please provide a valid path.";
16
+ writeFatal(errorMessage, {
17
+ logLevel: "all"
18
+ });
19
+ throw new Error(errorMessage);
20
+ }
21
+ const resolvedTsconfig = await readJsonFile(tsconfigPath);
22
+ const tsconfig = parseJsonConfigFileContent(resolvedTsconfig, sys, findFilePath(tsconfigPath));
23
+ tsconfig.options.configFilePath = tsconfigPath;
24
+ tsconfig.options.noImplicitOverride = false;
25
+ tsconfig.options.noUnusedLocals = false;
26
+ tsconfig.options.noUnusedParameters = false;
27
+ tsconfig.options.outDir = joinPaths(options.projectRoot, relativePath(findFilePath(tsconfigPath), joinPaths(options.workspaceRoot, schema.endsWith(".capnp") ? findFilePath(schema) : schema)));
28
+ const schemas = [];
29
+ if (!schema || !schema.includes("*") && !existsSync(schema)) {
30
+ throw new Error(`\u2716 The schema path "${schema}" is invalid. Please provide a valid path.`);
31
+ }
32
+ schemas.push(...await listFiles(schema.includes("*") ? schema.endsWith(".capnp") ? schema : `${schema}.capnp` : joinPaths(schema, "**/*.capnp")));
33
+ if (schemas.length === 0) {
34
+ writeWarning(`\u2716 No Cap'n Proto schema files found in the specified source paths: ${schemas.join(", ")}. As a result, the Cap'n Proto compiler will not be able to generate any output files. Please ensure that the paths are correct and contain .capnp files.`, {
35
+ logLevel: "all"
36
+ });
37
+ return null;
38
+ }
39
+ return {
40
+ workspaceRoot: options.workspaceRoot,
41
+ projectRoot: options.projectRoot,
42
+ schemas,
43
+ js: options.js ?? false,
44
+ ts: options.ts ?? (options.noTs !== void 0 ? !options.noTs : true),
45
+ dts: options.dts ?? (options.noDts !== void 0 ? !options.noDts : true),
46
+ tsconfig: tsconfig?.options
47
+ };
48
+ }
49
+ __name(resolveOptions, "resolveOptions");
50
+ export {
51
+ resolveOptions
52
+ };
package/dist/index.cjs CHANGED
@@ -1,129 +1,4 @@
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
-
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
- var _chunk4Z2FMN72cjs = require('./chunk-4Z2FMN72.cjs');
63
-
64
-
65
- var _chunkR2JXWA7Qcjs = require('./chunk-R2JXWA7Q.cjs');
66
- require('./chunk-USNT2KNT.cjs');
67
-
68
-
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
-
128
-
129
- exports.AnyPointerList = _chunk4Z2FMN72cjs.AnyPointerList; exports.BoolList = _chunk4Z2FMN72cjs.BoolList; exports.CapnpRPC = _chunk4Z2FMN72cjs.CapnpRPC; exports.CodeGeneratorContext = _chunkR2JXWA7Qcjs.CodeGeneratorContext; exports.CompositeList = _chunk4Z2FMN72cjs.CompositeList; exports.Conn = _chunk4Z2FMN72cjs.Conn; exports.Data = _chunk4Z2FMN72cjs.Data; exports.DataList = _chunk4Z2FMN72cjs.DataList; exports.Deferred = _chunk4Z2FMN72cjs.Deferred; exports.DeferredTransport = _chunk4Z2FMN72cjs.DeferredTransport; exports.ErrorClient = _chunk4Z2FMN72cjs.ErrorClient; exports.Float32List = _chunk4Z2FMN72cjs.Float32List; exports.Float64List = _chunk4Z2FMN72cjs.Float64List; exports.Int16List = _chunk4Z2FMN72cjs.Int16List; exports.Int32List = _chunk4Z2FMN72cjs.Int32List; exports.Int64List = _chunk4Z2FMN72cjs.Int64List; exports.Int8List = _chunk4Z2FMN72cjs.Int8List; exports.Interface = _chunk4Z2FMN72cjs.Interface; exports.InterfaceList = _chunk4Z2FMN72cjs.InterfaceList; exports.List = _chunk4Z2FMN72cjs.List; exports.ListElementSize = _chunk4Z2FMN72cjs.ListElementSize; exports.Message = _chunk4Z2FMN72cjs.Message; exports.MessageChannelTransport = _chunk4Z2FMN72cjs.MessageChannelTransport; exports.ObjectSize = _chunk4Z2FMN72cjs.ObjectSize; exports.Orphan = _chunk4Z2FMN72cjs.Orphan; exports.Pipeline = _chunk4Z2FMN72cjs.Pipeline; exports.Pointer = _chunk4Z2FMN72cjs.Pointer; exports.PointerList = _chunk4Z2FMN72cjs.PointerList; exports.PointerType = _chunk4Z2FMN72cjs.PointerType; exports.Registry = _chunk4Z2FMN72cjs.Registry; exports.Server = _chunk4Z2FMN72cjs.Server; exports.Struct = _chunk4Z2FMN72cjs.Struct; exports.Text = _chunk4Z2FMN72cjs.Text; exports.TextList = _chunk4Z2FMN72cjs.TextList; exports.Uint16List = _chunk4Z2FMN72cjs.Uint16List; exports.Uint32List = _chunk4Z2FMN72cjs.Uint32List; exports.Uint64List = _chunk4Z2FMN72cjs.Uint64List; exports.Uint8List = _chunk4Z2FMN72cjs.Uint8List; exports.Void = _chunk4Z2FMN72cjs.Void; exports.VoidList = _chunk4Z2FMN72cjs.VoidList; exports.answerPipelineClient = _chunk4Z2FMN72cjs.answerPipelineClient; exports.clientFromResolution = _chunk4Z2FMN72cjs.clientFromResolution; exports.clientOrNull = _chunk4Z2FMN72cjs.clientOrNull; exports.copyCall = _chunk4Z2FMN72cjs.copyCall; exports.getBitMask = _chunk4Z2FMN72cjs.getBitMask; exports.getFloat32Mask = _chunk4Z2FMN72cjs.getFloat32Mask; exports.getFloat64Mask = _chunk4Z2FMN72cjs.getFloat64Mask; exports.getInt16Mask = _chunk4Z2FMN72cjs.getInt16Mask; exports.getInt32Mask = _chunk4Z2FMN72cjs.getInt32Mask; exports.getInt64Mask = _chunk4Z2FMN72cjs.getInt64Mask; exports.getInt8Mask = _chunk4Z2FMN72cjs.getInt8Mask; exports.getUint16Mask = _chunk4Z2FMN72cjs.getUint16Mask; exports.getUint32Mask = _chunk4Z2FMN72cjs.getUint32Mask; exports.getUint64Mask = _chunk4Z2FMN72cjs.getUint64Mask; exports.getUint8Mask = _chunk4Z2FMN72cjs.getUint8Mask; exports.isDataCall = _chunk4Z2FMN72cjs.isDataCall; exports.isFuncCall = _chunk4Z2FMN72cjs.isFuncCall; exports.isSameClient = _chunk4Z2FMN72cjs.isSameClient; exports.placeParams = _chunk4Z2FMN72cjs.placeParams; exports.readRawPointer = _chunk4Z2FMN72cjs.readRawPointer; exports.utils = _chunk4Z2FMN72cjs.utils;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }var _compilejs = require('./compile.js'); _createStarExport(_compilejs);
2
+ var _rpcjs = require('./rpc.js'); _createStarExport(_rpcjs);
3
+ var _typesjs = require('./types.js'); _createStarExport(_typesjs);
4
+ var _capnpes = require('capnp-es'); _createStarExport(_capnpes);
package/dist/index.d.cts CHANGED
@@ -1,7 +1,9 @@
1
+ export { capnpc, compile } from './compile.cjs';
1
2
  export { CapnpRPC, MessageChannelTransport } from './rpc.cjs';
2
3
  export { CapnpcCLIOptions, CapnpcOptions, CapnpcResult, CodeGeneratorContext, CodeGeneratorFileContext } from './types.cjs';
3
4
  export * from 'capnp-es';
5
+ import 'capnp-es/capnp/schema';
6
+ import 'node:buffer';
4
7
  import 'capnp-es/capnp/rpc';
5
8
  import 'node:worker_threads';
6
- import 'capnp-es/capnp/schema';
7
9
  import 'typescript';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
+ export { capnpc, compile } from './compile.js';
1
2
  export { CapnpRPC, MessageChannelTransport } from './rpc.js';
2
3
  export { CapnpcCLIOptions, CapnpcOptions, CapnpcResult, CodeGeneratorContext, CodeGeneratorFileContext } from './types.js';
3
4
  export * from 'capnp-es';
5
+ import 'capnp-es/capnp/schema';
6
+ import 'node:buffer';
4
7
  import 'capnp-es/capnp/rpc';
5
8
  import 'node:worker_threads';
6
- import 'capnp-es/capnp/schema';
7
9
  import 'typescript';
package/dist/index.js CHANGED
@@ -1,129 +1,4 @@
1
- import {
2
- AnyPointerList,
3
- BoolList,
4
- CapnpRPC,
5
- CompositeList,
6
- Conn,
7
- Data,
8
- DataList,
9
- Deferred,
10
- DeferredTransport,
11
- ErrorClient,
12
- Float32List,
13
- Float64List,
14
- Int16List,
15
- Int32List,
16
- Int64List,
17
- Int8List,
18
- Interface,
19
- InterfaceList,
20
- List,
21
- ListElementSize,
22
- Message,
23
- MessageChannelTransport,
24
- ObjectSize,
25
- Orphan,
26
- Pipeline,
27
- Pointer,
28
- PointerList,
29
- PointerType,
30
- Registry,
31
- Server,
32
- Struct,
33
- Text,
34
- TextList,
35
- Uint16List,
36
- Uint32List,
37
- Uint64List,
38
- Uint8List,
39
- Void,
40
- VoidList,
41
- answerPipelineClient,
42
- clientFromResolution,
43
- clientOrNull,
44
- copyCall,
45
- getBitMask,
46
- getFloat32Mask,
47
- getFloat64Mask,
48
- getInt16Mask,
49
- getInt32Mask,
50
- getInt64Mask,
51
- getInt8Mask,
52
- getUint16Mask,
53
- getUint32Mask,
54
- getUint64Mask,
55
- getUint8Mask,
56
- isDataCall,
57
- isFuncCall,
58
- isSameClient,
59
- placeParams,
60
- readRawPointer,
61
- utils
62
- } from "./chunk-L563IRIF.js";
63
- import {
64
- CodeGeneratorContext
65
- } from "./chunk-CCU32X36.js";
66
- import "./chunk-SHUYVCID.js";
67
- export {
68
- AnyPointerList,
69
- BoolList,
70
- CapnpRPC,
71
- CodeGeneratorContext,
72
- CompositeList,
73
- Conn,
74
- Data,
75
- DataList,
76
- Deferred,
77
- DeferredTransport,
78
- ErrorClient,
79
- Float32List,
80
- Float64List,
81
- Int16List,
82
- Int32List,
83
- Int64List,
84
- Int8List,
85
- Interface,
86
- InterfaceList,
87
- List,
88
- ListElementSize,
89
- Message,
90
- MessageChannelTransport,
91
- ObjectSize,
92
- Orphan,
93
- Pipeline,
94
- Pointer,
95
- PointerList,
96
- PointerType,
97
- Registry,
98
- Server,
99
- Struct,
100
- Text,
101
- TextList,
102
- Uint16List,
103
- Uint32List,
104
- Uint64List,
105
- Uint8List,
106
- Void,
107
- VoidList,
108
- answerPipelineClient,
109
- clientFromResolution,
110
- clientOrNull,
111
- copyCall,
112
- getBitMask,
113
- getFloat32Mask,
114
- getFloat64Mask,
115
- getInt16Mask,
116
- getInt32Mask,
117
- getInt64Mask,
118
- getInt8Mask,
119
- getUint16Mask,
120
- getUint32Mask,
121
- getUint64Mask,
122
- getUint8Mask,
123
- isDataCall,
124
- isFuncCall,
125
- isSameClient,
126
- placeParams,
127
- readRawPointer,
128
- utils
129
- };
1
+ export * from "./compile.js";
2
+ export * from "./rpc.js";
3
+ export * from "./types.js";
4
+ export * from "capnp-es";