@stryke/capnp 0.10.3 → 0.10.4
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/bin/capnpc.cjs +5 -7
- package/bin/capnpc.js +5 -7
- package/dist/{chunk-XU7T5EQG.js → chunk-4CXBQVXH.js} +5 -7
- package/dist/{chunk-I7MRPN6I.cjs → chunk-IRIBPNFP.cjs} +4 -4
- package/dist/{chunk-SW7GJVYC.js → chunk-MLCARVMF.js} +1 -1
- package/dist/{chunk-L3LVFSZK.cjs → chunk-ZU4BKCAM.cjs} +5 -7
- package/dist/compile.cjs +3 -3
- package/dist/compile.js +2 -2
- package/dist/helpers.cjs +2 -2
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/bin/capnpc.cjs
CHANGED
|
@@ -7928,7 +7928,7 @@ __name(listFiles, "listFiles");
|
|
|
7928
7928
|
var import_typescript3 = require("typescript");
|
|
7929
7929
|
async function resolveOptions(options) {
|
|
7930
7930
|
const tsconfigPath = options.tsconfigPath ? options.tsconfigPath.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : void 0;
|
|
7931
|
-
const schemas = toArray(options.schemas ?
|
|
7931
|
+
const schemas = toArray(options.schemas ? options.schemas : joinPaths(options.projectRoot, "schemas/**/*.capnp")).filter(Boolean).map((schema) => schema.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot));
|
|
7932
7932
|
let resolvedTsconfig;
|
|
7933
7933
|
if (options.tsconfig) {
|
|
7934
7934
|
resolvedTsconfig = options.tsconfig;
|
|
@@ -7956,13 +7956,11 @@ async function resolveOptions(options) {
|
|
|
7956
7956
|
}
|
|
7957
7957
|
const resolvedSchemas = [];
|
|
7958
7958
|
for (const schema of schemas) {
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
}
|
|
7963
|
-
} else {
|
|
7964
|
-
resolvedSchemas.push(...await listFiles(schema.includes("*") ? schema.endsWith(".capnp") ? schema : `${schema}.capnp` : joinPaths(schema, "**/*.capnp")));
|
|
7959
|
+
let formattedSchema = schema;
|
|
7960
|
+
if (!schema.endsWith(".capnp") && !schema.includes("*")) {
|
|
7961
|
+
formattedSchema = `${schema.replace(/\/$/g, "")}/*.capnp`;
|
|
7965
7962
|
}
|
|
7963
|
+
resolvedSchemas.push(...await listFiles(formattedSchema));
|
|
7966
7964
|
}
|
|
7967
7965
|
if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {
|
|
7968
7966
|
(0, import_console.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.`, {
|
package/bin/capnpc.js
CHANGED
|
@@ -7897,7 +7897,7 @@ __name(listFiles, "listFiles");
|
|
|
7897
7897
|
import { parseJsonConfigFileContent, sys } from "typescript";
|
|
7898
7898
|
async function resolveOptions(options) {
|
|
7899
7899
|
const tsconfigPath = options.tsconfigPath ? options.tsconfigPath.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : void 0;
|
|
7900
|
-
const schemas = toArray(options.schemas ?
|
|
7900
|
+
const schemas = toArray(options.schemas ? options.schemas : joinPaths(options.projectRoot, "schemas/**/*.capnp")).filter(Boolean).map((schema) => schema.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot));
|
|
7901
7901
|
let resolvedTsconfig;
|
|
7902
7902
|
if (options.tsconfig) {
|
|
7903
7903
|
resolvedTsconfig = options.tsconfig;
|
|
@@ -7925,13 +7925,11 @@ async function resolveOptions(options) {
|
|
|
7925
7925
|
}
|
|
7926
7926
|
const resolvedSchemas = [];
|
|
7927
7927
|
for (const schema of schemas) {
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
}
|
|
7932
|
-
} else {
|
|
7933
|
-
resolvedSchemas.push(...await listFiles(schema.includes("*") ? schema.endsWith(".capnp") ? schema : `${schema}.capnp` : joinPaths(schema, "**/*.capnp")));
|
|
7928
|
+
let formattedSchema = schema;
|
|
7929
|
+
if (!schema.endsWith(".capnp") && !schema.includes("*")) {
|
|
7930
|
+
formattedSchema = `${schema.replace(/\/$/g, "")}/*.capnp`;
|
|
7934
7931
|
}
|
|
7932
|
+
resolvedSchemas.push(...await listFiles(formattedSchema));
|
|
7935
7933
|
}
|
|
7936
7934
|
if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {
|
|
7937
7935
|
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.`, {
|
|
@@ -847,7 +847,7 @@ __name(listFiles, "listFiles");
|
|
|
847
847
|
import { parseJsonConfigFileContent, sys } from "typescript";
|
|
848
848
|
async function resolveOptions(options) {
|
|
849
849
|
const tsconfigPath = options.tsconfigPath ? options.tsconfigPath.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : void 0;
|
|
850
|
-
const schemas = toArray(options.schemas ?
|
|
850
|
+
const schemas = toArray(options.schemas ? options.schemas : joinPaths(options.projectRoot, "schemas/**/*.capnp")).filter(Boolean).map((schema) => schema.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot));
|
|
851
851
|
let resolvedTsconfig;
|
|
852
852
|
if (options.tsconfig) {
|
|
853
853
|
resolvedTsconfig = options.tsconfig;
|
|
@@ -875,13 +875,11 @@ async function resolveOptions(options) {
|
|
|
875
875
|
}
|
|
876
876
|
const resolvedSchemas = [];
|
|
877
877
|
for (const schema of schemas) {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
}
|
|
882
|
-
} else {
|
|
883
|
-
resolvedSchemas.push(...await listFiles(schema.includes("*") ? schema.endsWith(".capnp") ? schema : `${schema}.capnp` : joinPaths(schema, "**/*.capnp")));
|
|
878
|
+
let formattedSchema = schema;
|
|
879
|
+
if (!schema.endsWith(".capnp") && !schema.includes("*")) {
|
|
880
|
+
formattedSchema = `${schema.replace(/\/$/g, "")}/*.capnp`;
|
|
884
881
|
}
|
|
882
|
+
resolvedSchemas.push(...await listFiles(formattedSchema));
|
|
885
883
|
}
|
|
886
884
|
if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {
|
|
887
885
|
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.`, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkZU4BKCAMcjs = require('./chunk-ZU4BKCAM.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -4055,9 +4055,9 @@ async function capnpc(options) {
|
|
|
4055
4055
|
if (dataBuf.byteLength === 0) {
|
|
4056
4056
|
const opts = [];
|
|
4057
4057
|
if (output) {
|
|
4058
|
-
if (!
|
|
4058
|
+
if (!_chunkZU4BKCAMcjs.existsSync.call(void 0, output)) {
|
|
4059
4059
|
_console.writeWarning.call(void 0, `Output directory "${output}" does not exist, it will be created...`);
|
|
4060
|
-
await
|
|
4060
|
+
await _chunkZU4BKCAMcjs.createDirectory.call(void 0, output);
|
|
4061
4061
|
}
|
|
4062
4062
|
opts.push(`-o-:${output}`);
|
|
4063
4063
|
} else {
|
|
@@ -4086,7 +4086,7 @@ async function capnpc(options) {
|
|
|
4086
4086
|
}
|
|
4087
4087
|
_chunkUSNT2KNTcjs.__name.call(void 0, capnpc, "capnpc");
|
|
4088
4088
|
async function compile(dataBuf, options) {
|
|
4089
|
-
const resolvedOptions = await
|
|
4089
|
+
const resolvedOptions = await _chunkZU4BKCAMcjs.resolveOptions.call(void 0, options);
|
|
4090
4090
|
if (!resolvedOptions) {
|
|
4091
4091
|
_console.writeWarning.call(void 0, "\u2716 Unable to resolve Cap'n Proto compiler options - the program will terminate", {
|
|
4092
4092
|
logLevel: "all"
|
|
@@ -847,7 +847,7 @@ _chunkUSNT2KNTcjs.__name.call(void 0, listFiles, "listFiles");
|
|
|
847
847
|
var _typescript = require('typescript');
|
|
848
848
|
async function resolveOptions(options) {
|
|
849
849
|
const tsconfigPath = options.tsconfigPath ? options.tsconfigPath.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : void 0;
|
|
850
|
-
const schemas = toArray(options.schemas ?
|
|
850
|
+
const schemas = toArray(options.schemas ? options.schemas : joinPaths(options.projectRoot, "schemas/**/*.capnp")).filter(Boolean).map((schema) => schema.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot));
|
|
851
851
|
let resolvedTsconfig;
|
|
852
852
|
if (options.tsconfig) {
|
|
853
853
|
resolvedTsconfig = options.tsconfig;
|
|
@@ -875,13 +875,11 @@ async function resolveOptions(options) {
|
|
|
875
875
|
}
|
|
876
876
|
const resolvedSchemas = [];
|
|
877
877
|
for (const schema of schemas) {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
}
|
|
882
|
-
} else {
|
|
883
|
-
resolvedSchemas.push(...await listFiles(schema.includes("*") ? schema.endsWith(".capnp") ? schema : `${schema}.capnp` : joinPaths(schema, "**/*.capnp")));
|
|
878
|
+
let formattedSchema = schema;
|
|
879
|
+
if (!schema.endsWith(".capnp") && !schema.includes("*")) {
|
|
880
|
+
formattedSchema = `${schema.replace(/\/$/g, "")}/*.capnp`;
|
|
884
881
|
}
|
|
882
|
+
resolvedSchemas.push(...await listFiles(formattedSchema));
|
|
885
883
|
}
|
|
886
884
|
if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {
|
|
887
885
|
_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.`, {
|
package/dist/compile.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkIRIBPNFPcjs = require('./chunk-IRIBPNFP.cjs');
|
|
5
|
+
require('./chunk-ZU4BKCAM.cjs');
|
|
6
6
|
require('./chunk-KXWOF6H4.cjs');
|
|
7
7
|
require('./chunk-USNT2KNT.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.capnpc =
|
|
11
|
+
exports.capnpc = _chunkIRIBPNFPcjs.capnpc; exports.compile = _chunkIRIBPNFPcjs.compile;
|
package/dist/compile.js
CHANGED
package/dist/helpers.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZU4BKCAMcjs = require('./chunk-ZU4BKCAM.cjs');
|
|
4
4
|
require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.resolveOptions =
|
|
7
|
+
exports.resolveOptions = _chunkZU4BKCAMcjs.resolveOptions;
|
package/dist/helpers.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkIRIBPNFPcjs = require('./chunk-IRIBPNFP.cjs');
|
|
5
|
+
require('./chunk-ZU4BKCAM.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -135,4 +135,4 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
exports.AnyPointerList = _chunkIBMXNAOTcjs.AnyPointerList; exports.BoolList = _chunkIBMXNAOTcjs.BoolList; exports.CapnpRPC = _chunkIBMXNAOTcjs.CapnpRPC; exports.CodeGeneratorContext = _chunkR2JXWA7Qcjs.CodeGeneratorContext; exports.CompositeList = _chunkKXWOF6H4cjs.CompositeList; exports.Conn = _chunkIBMXNAOTcjs.Conn; exports.Data = _chunkKXWOF6H4cjs.Data; exports.DataList = _chunkIBMXNAOTcjs.DataList; exports.Deferred = _chunkIBMXNAOTcjs.Deferred; exports.DeferredTransport = _chunkIBMXNAOTcjs.DeferredTransport; exports.ErrorClient = _chunkKXWOF6H4cjs.ErrorClient; exports.Float32List = _chunkIBMXNAOTcjs.Float32List; exports.Float64List = _chunkIBMXNAOTcjs.Float64List; exports.Int16List = _chunkIBMXNAOTcjs.Int16List; exports.Int32List = _chunkIBMXNAOTcjs.Int32List; exports.Int64List = _chunkIBMXNAOTcjs.Int64List; exports.Int8List = _chunkIBMXNAOTcjs.Int8List; exports.Interface = _chunkIBMXNAOTcjs.Interface; exports.InterfaceList = _chunkIBMXNAOTcjs.InterfaceList; exports.List = _chunkKXWOF6H4cjs.List; exports.ListElementSize = _chunkKXWOF6H4cjs.ListElementSize; exports.Message = _chunkKXWOF6H4cjs.Message; exports.MessageChannelTransport = _chunkIBMXNAOTcjs.MessageChannelTransport; exports.ObjectSize = _chunkKXWOF6H4cjs.ObjectSize; exports.Orphan = _chunkKXWOF6H4cjs.Orphan; exports.Pipeline = _chunkIBMXNAOTcjs.Pipeline; exports.Pointer = _chunkKXWOF6H4cjs.Pointer; exports.PointerList = _chunkIBMXNAOTcjs.PointerList; exports.PointerType = _chunkKXWOF6H4cjs.PointerType; exports.Registry = _chunkIBMXNAOTcjs.Registry; exports.Server = _chunkIBMXNAOTcjs.Server; exports.Struct = _chunkKXWOF6H4cjs.Struct; exports.Text = _chunkKXWOF6H4cjs.Text; exports.TextList = _chunkIBMXNAOTcjs.TextList; exports.Uint16List = _chunkIBMXNAOTcjs.Uint16List; exports.Uint32List = _chunkIBMXNAOTcjs.Uint32List; exports.Uint64List = _chunkIBMXNAOTcjs.Uint64List; exports.Uint8List = _chunkIBMXNAOTcjs.Uint8List; exports.Void = _chunkIBMXNAOTcjs.Void; exports.VoidList = _chunkIBMXNAOTcjs.VoidList; exports.answerPipelineClient = _chunkIBMXNAOTcjs.answerPipelineClient; exports.capnpc =
|
|
138
|
+
exports.AnyPointerList = _chunkIBMXNAOTcjs.AnyPointerList; exports.BoolList = _chunkIBMXNAOTcjs.BoolList; exports.CapnpRPC = _chunkIBMXNAOTcjs.CapnpRPC; exports.CodeGeneratorContext = _chunkR2JXWA7Qcjs.CodeGeneratorContext; exports.CompositeList = _chunkKXWOF6H4cjs.CompositeList; exports.Conn = _chunkIBMXNAOTcjs.Conn; exports.Data = _chunkKXWOF6H4cjs.Data; exports.DataList = _chunkIBMXNAOTcjs.DataList; exports.Deferred = _chunkIBMXNAOTcjs.Deferred; exports.DeferredTransport = _chunkIBMXNAOTcjs.DeferredTransport; exports.ErrorClient = _chunkKXWOF6H4cjs.ErrorClient; exports.Float32List = _chunkIBMXNAOTcjs.Float32List; exports.Float64List = _chunkIBMXNAOTcjs.Float64List; exports.Int16List = _chunkIBMXNAOTcjs.Int16List; exports.Int32List = _chunkIBMXNAOTcjs.Int32List; exports.Int64List = _chunkIBMXNAOTcjs.Int64List; exports.Int8List = _chunkIBMXNAOTcjs.Int8List; exports.Interface = _chunkIBMXNAOTcjs.Interface; exports.InterfaceList = _chunkIBMXNAOTcjs.InterfaceList; exports.List = _chunkKXWOF6H4cjs.List; exports.ListElementSize = _chunkKXWOF6H4cjs.ListElementSize; exports.Message = _chunkKXWOF6H4cjs.Message; exports.MessageChannelTransport = _chunkIBMXNAOTcjs.MessageChannelTransport; exports.ObjectSize = _chunkKXWOF6H4cjs.ObjectSize; exports.Orphan = _chunkKXWOF6H4cjs.Orphan; exports.Pipeline = _chunkIBMXNAOTcjs.Pipeline; exports.Pointer = _chunkKXWOF6H4cjs.Pointer; exports.PointerList = _chunkIBMXNAOTcjs.PointerList; exports.PointerType = _chunkKXWOF6H4cjs.PointerType; exports.Registry = _chunkIBMXNAOTcjs.Registry; exports.Server = _chunkIBMXNAOTcjs.Server; exports.Struct = _chunkKXWOF6H4cjs.Struct; exports.Text = _chunkKXWOF6H4cjs.Text; exports.TextList = _chunkIBMXNAOTcjs.TextList; exports.Uint16List = _chunkIBMXNAOTcjs.Uint16List; exports.Uint32List = _chunkIBMXNAOTcjs.Uint32List; exports.Uint64List = _chunkIBMXNAOTcjs.Uint64List; exports.Uint8List = _chunkIBMXNAOTcjs.Uint8List; exports.Void = _chunkIBMXNAOTcjs.Void; exports.VoidList = _chunkIBMXNAOTcjs.VoidList; exports.answerPipelineClient = _chunkIBMXNAOTcjs.answerPipelineClient; exports.capnpc = _chunkIRIBPNFPcjs.capnpc; exports.clientFromResolution = _chunkIBMXNAOTcjs.clientFromResolution; exports.clientOrNull = _chunkKXWOF6H4cjs.clientOrNull; exports.compile = _chunkIRIBPNFPcjs.compile; exports.copyCall = _chunkIBMXNAOTcjs.copyCall; exports.getBitMask = _chunkKXWOF6H4cjs.getBitMask; exports.getFloat32Mask = _chunkKXWOF6H4cjs.getFloat32Mask; exports.getFloat64Mask = _chunkKXWOF6H4cjs.getFloat64Mask; exports.getInt16Mask = _chunkKXWOF6H4cjs.getInt16Mask; exports.getInt32Mask = _chunkKXWOF6H4cjs.getInt32Mask; exports.getInt64Mask = _chunkKXWOF6H4cjs.getInt64Mask; exports.getInt8Mask = _chunkKXWOF6H4cjs.getInt8Mask; exports.getUint16Mask = _chunkKXWOF6H4cjs.getUint16Mask; exports.getUint32Mask = _chunkKXWOF6H4cjs.getUint32Mask; exports.getUint64Mask = _chunkKXWOF6H4cjs.getUint64Mask; exports.getUint8Mask = _chunkKXWOF6H4cjs.getUint8Mask; exports.isDataCall = _chunkIBMXNAOTcjs.isDataCall; exports.isFuncCall = _chunkIBMXNAOTcjs.isFuncCall; exports.isSameClient = _chunkIBMXNAOTcjs.isSameClient; exports.placeParams = _chunkIBMXNAOTcjs.placeParams; exports.readRawPointer = _chunkKXWOF6H4cjs.readRawPointer; exports.utils = _chunkIBMXNAOTcjs.utils;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/capnp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
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": {
|
|
@@ -148,5 +148,5 @@
|
|
|
148
148
|
"tsx": "^4.20.1"
|
|
149
149
|
},
|
|
150
150
|
"publishConfig": { "access": "public" },
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "decf26bd6cd11555f3229e0bcd9a5ca1754c7d5b"
|
|
152
152
|
}
|