@stryke/capnp 0.10.2 → 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 +12 -8
- package/bin/capnpc.js +12 -8
- package/dist/{chunk-3IOIINHW.js → chunk-4CXBQVXH.js} +22 -8
- package/dist/{chunk-55455L4M.cjs → chunk-IRIBPNFP.cjs} +8 -2
- package/dist/{chunk-GWW6WBAL.js → chunk-MLCARVMF.js} +7 -1
- package/dist/{chunk-3ZOLKZQQ.cjs → chunk-ZU4BKCAM.cjs} +23 -9
- 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/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dts/index.d.cts +1 -1
- package/dts/index.d.ts +1 -1
- package/package.json +2 -2
- package/schemas/{chunk-BM2HWFSD.cjs → chunk-ERVRKJ2S.cjs} +12 -10
- package/schemas/{chunk-TAKPBFYZ.js → chunk-OKQBZPI3.js} +12 -10
- 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/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.`, {
|
|
@@ -7970,11 +7968,13 @@ async function resolveOptions(options) {
|
|
|
7970
7968
|
});
|
|
7971
7969
|
return null;
|
|
7972
7970
|
}
|
|
7973
|
-
|
|
7971
|
+
const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : joinPaths(options.projectRoot, relativePath(tsconfigPath ? findFilePath(tsconfigPath) : options.projectRoot, joinPaths(options.workspaceRoot, resolvedSchemas[0].endsWith(".capnp") ? findFilePath(resolvedSchemas[0]) : resolvedSchemas[0])));
|
|
7972
|
+
resolvedTsconfig.options.outDir = output;
|
|
7974
7973
|
return {
|
|
7975
7974
|
workspaceRoot: options.workspaceRoot,
|
|
7976
7975
|
projectRoot: options.projectRoot,
|
|
7977
7976
|
schemas: resolvedSchemas,
|
|
7977
|
+
output,
|
|
7978
7978
|
js: options.js ?? false,
|
|
7979
7979
|
ts: options.ts ?? (options.noTs !== void 0 ? !options.noTs : true),
|
|
7980
7980
|
dts: options.dts ?? (options.noDts !== void 0 ? !options.noDts : true),
|
|
@@ -8006,6 +8006,10 @@ async function capnpc(options) {
|
|
|
8006
8006
|
if (dataBuf.byteLength === 0) {
|
|
8007
8007
|
const opts = [];
|
|
8008
8008
|
if (output) {
|
|
8009
|
+
if (!existsSync(output)) {
|
|
8010
|
+
(0, import_console2.writeWarning)(`Output directory "${output}" does not exist, it will be created...`);
|
|
8011
|
+
await createDirectory(output);
|
|
8012
|
+
}
|
|
8009
8013
|
opts.push(`-o-:${output}`);
|
|
8010
8014
|
} else {
|
|
8011
8015
|
opts.push("-o-");
|
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.`, {
|
|
@@ -7939,11 +7937,13 @@ async function resolveOptions(options) {
|
|
|
7939
7937
|
});
|
|
7940
7938
|
return null;
|
|
7941
7939
|
}
|
|
7942
|
-
|
|
7940
|
+
const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : joinPaths(options.projectRoot, relativePath(tsconfigPath ? findFilePath(tsconfigPath) : options.projectRoot, joinPaths(options.workspaceRoot, resolvedSchemas[0].endsWith(".capnp") ? findFilePath(resolvedSchemas[0]) : resolvedSchemas[0])));
|
|
7941
|
+
resolvedTsconfig.options.outDir = output;
|
|
7943
7942
|
return {
|
|
7944
7943
|
workspaceRoot: options.workspaceRoot,
|
|
7945
7944
|
projectRoot: options.projectRoot,
|
|
7946
7945
|
schemas: resolvedSchemas,
|
|
7946
|
+
output,
|
|
7947
7947
|
js: options.js ?? false,
|
|
7948
7948
|
ts: options.ts ?? (options.noTs !== void 0 ? !options.noTs : true),
|
|
7949
7949
|
dts: options.dts ?? (options.noDts !== void 0 ? !options.noDts : true),
|
|
@@ -7975,6 +7975,10 @@ async function capnpc(options) {
|
|
|
7975
7975
|
if (dataBuf.byteLength === 0) {
|
|
7976
7976
|
const opts = [];
|
|
7977
7977
|
if (output) {
|
|
7978
|
+
if (!existsSync(output)) {
|
|
7979
|
+
writeWarning2(`Output directory "${output}" does not exist, it will be created...`);
|
|
7980
|
+
await createDirectory(output);
|
|
7981
|
+
}
|
|
7978
7982
|
opts.push(`-o-:${output}`);
|
|
7979
7983
|
} else {
|
|
7980
7984
|
opts.push("-o-");
|
|
@@ -750,6 +750,9 @@ import { access, constants } from "node:fs/promises";
|
|
|
750
750
|
var existsSync2 = /* @__PURE__ */ __name((filePath) => {
|
|
751
751
|
return existsSyncFs(filePath);
|
|
752
752
|
}, "existsSync");
|
|
753
|
+
var exists = /* @__PURE__ */ __name(async (filePath) => {
|
|
754
|
+
return access(filePath, constants.F_OK).then(() => true).catch(() => false);
|
|
755
|
+
}, "exists");
|
|
753
756
|
|
|
754
757
|
// ../path/src/file-path-fns.ts
|
|
755
758
|
import { relative } from "node:path";
|
|
@@ -791,6 +794,15 @@ import { writeFile as writeFileFs } from "node:fs/promises";
|
|
|
791
794
|
import { parseTar, parseTarGzip } from "nanotar";
|
|
792
795
|
import { createWriteStream, mkdirSync, rmSync } from "node:fs";
|
|
793
796
|
import { mkdir, readFile as readFile2, rm } from "node:fs/promises";
|
|
797
|
+
async function createDirectory(path) {
|
|
798
|
+
if (await exists(path)) {
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
return mkdir(path, {
|
|
802
|
+
recursive: true
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
__name(createDirectory, "createDirectory");
|
|
794
806
|
|
|
795
807
|
// ../fs/src/json.ts
|
|
796
808
|
async function readJsonFile(path, options) {
|
|
@@ -835,7 +847,7 @@ __name(listFiles, "listFiles");
|
|
|
835
847
|
import { parseJsonConfigFileContent, sys } from "typescript";
|
|
836
848
|
async function resolveOptions(options) {
|
|
837
849
|
const tsconfigPath = options.tsconfigPath ? options.tsconfigPath.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : void 0;
|
|
838
|
-
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));
|
|
839
851
|
let resolvedTsconfig;
|
|
840
852
|
if (options.tsconfig) {
|
|
841
853
|
resolvedTsconfig = options.tsconfig;
|
|
@@ -863,13 +875,11 @@ async function resolveOptions(options) {
|
|
|
863
875
|
}
|
|
864
876
|
const resolvedSchemas = [];
|
|
865
877
|
for (const schema of schemas) {
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
}
|
|
870
|
-
} else {
|
|
871
|
-
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`;
|
|
872
881
|
}
|
|
882
|
+
resolvedSchemas.push(...await listFiles(formattedSchema));
|
|
873
883
|
}
|
|
874
884
|
if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {
|
|
875
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.`, {
|
|
@@ -877,11 +887,13 @@ async function resolveOptions(options) {
|
|
|
877
887
|
});
|
|
878
888
|
return null;
|
|
879
889
|
}
|
|
880
|
-
|
|
890
|
+
const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : joinPaths(options.projectRoot, relativePath(tsconfigPath ? findFilePath(tsconfigPath) : options.projectRoot, joinPaths(options.workspaceRoot, resolvedSchemas[0].endsWith(".capnp") ? findFilePath(resolvedSchemas[0]) : resolvedSchemas[0])));
|
|
891
|
+
resolvedTsconfig.options.outDir = output;
|
|
881
892
|
return {
|
|
882
893
|
workspaceRoot: options.workspaceRoot,
|
|
883
894
|
projectRoot: options.projectRoot,
|
|
884
895
|
schemas: resolvedSchemas,
|
|
896
|
+
output,
|
|
885
897
|
js: options.js ?? false,
|
|
886
898
|
ts: options.ts ?? (options.noTs !== void 0 ? !options.noTs : true),
|
|
887
899
|
dts: options.dts ?? (options.noDts !== void 0 ? !options.noDts : true),
|
|
@@ -891,5 +903,7 @@ async function resolveOptions(options) {
|
|
|
891
903
|
__name(resolveOptions, "resolveOptions");
|
|
892
904
|
|
|
893
905
|
export {
|
|
906
|
+
existsSync2 as existsSync,
|
|
907
|
+
createDirectory,
|
|
894
908
|
resolveOptions
|
|
895
909
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
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(); } } 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; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16; var _class17; var _class18; var _class19; var _class20; var _class21; var _class22; var _class23; var _class24; var _class25; var _class26; var _class27; var _class28; var _class29; var _class30; var _class31; var _class32; var _class33; var _class34; var _class35; var _class36; var _class37;
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkZU4BKCAMcjs = require('./chunk-ZU4BKCAM.cjs');
|
|
4
6
|
|
|
5
7
|
|
|
6
8
|
|
|
@@ -4053,6 +4055,10 @@ async function capnpc(options) {
|
|
|
4053
4055
|
if (dataBuf.byteLength === 0) {
|
|
4054
4056
|
const opts = [];
|
|
4055
4057
|
if (output) {
|
|
4058
|
+
if (!_chunkZU4BKCAMcjs.existsSync.call(void 0, output)) {
|
|
4059
|
+
_console.writeWarning.call(void 0, `Output directory "${output}" does not exist, it will be created...`);
|
|
4060
|
+
await _chunkZU4BKCAMcjs.createDirectory.call(void 0, output);
|
|
4061
|
+
}
|
|
4056
4062
|
opts.push(`-o-:${output}`);
|
|
4057
4063
|
} else {
|
|
4058
4064
|
opts.push("-o-");
|
|
@@ -4080,7 +4086,7 @@ async function capnpc(options) {
|
|
|
4080
4086
|
}
|
|
4081
4087
|
_chunkUSNT2KNTcjs.__name.call(void 0, capnpc, "capnpc");
|
|
4082
4088
|
async function compile(dataBuf, options) {
|
|
4083
|
-
const resolvedOptions = await
|
|
4089
|
+
const resolvedOptions = await _chunkZU4BKCAMcjs.resolveOptions.call(void 0, options);
|
|
4084
4090
|
if (!resolvedOptions) {
|
|
4085
4091
|
_console.writeWarning.call(void 0, "\u2716 Unable to resolve Cap'n Proto compiler options - the program will terminate", {
|
|
4086
4092
|
logLevel: "all"
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
createDirectory,
|
|
3
|
+
existsSync,
|
|
2
4
|
resolveOptions
|
|
3
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4CXBQVXH.js";
|
|
4
6
|
import {
|
|
5
7
|
CompositeList,
|
|
6
8
|
Message,
|
|
@@ -4053,6 +4055,10 @@ async function capnpc(options) {
|
|
|
4053
4055
|
if (dataBuf.byteLength === 0) {
|
|
4054
4056
|
const opts = [];
|
|
4055
4057
|
if (output) {
|
|
4058
|
+
if (!existsSync(output)) {
|
|
4059
|
+
writeWarning(`Output directory "${output}" does not exist, it will be created...`);
|
|
4060
|
+
await createDirectory(output);
|
|
4061
|
+
}
|
|
4056
4062
|
opts.push(`-o-:${output}`);
|
|
4057
4063
|
} else {
|
|
4058
4064
|
opts.push("-o-");
|
|
@@ -750,6 +750,9 @@ _chunkUSNT2KNTcjs.__name.call(void 0, normalizeWindowsPath2, "normalizeWindowsPa
|
|
|
750
750
|
var existsSync2 = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (filePath) => {
|
|
751
751
|
return _fs.existsSync.call(void 0, filePath);
|
|
752
752
|
}, "existsSync");
|
|
753
|
+
var exists = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath) => {
|
|
754
|
+
return _promises.access.call(void 0, filePath, _promises.constants.F_OK).then(() => true).catch(() => false);
|
|
755
|
+
}, "exists");
|
|
753
756
|
|
|
754
757
|
// ../path/src/file-path-fns.ts
|
|
755
758
|
var _path = require('path');
|
|
@@ -791,6 +794,15 @@ _chunkUSNT2KNTcjs.__name.call(void 0, relativePath, "relativePath");
|
|
|
791
794
|
var _nanotar = require('nanotar');
|
|
792
795
|
|
|
793
796
|
|
|
797
|
+
async function createDirectory(path) {
|
|
798
|
+
if (await exists(path)) {
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
return _promises.mkdir.call(void 0, path, {
|
|
802
|
+
recursive: true
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
_chunkUSNT2KNTcjs.__name.call(void 0, createDirectory, "createDirectory");
|
|
794
806
|
|
|
795
807
|
// ../fs/src/json.ts
|
|
796
808
|
async function readJsonFile(path, options) {
|
|
@@ -835,7 +847,7 @@ _chunkUSNT2KNTcjs.__name.call(void 0, listFiles, "listFiles");
|
|
|
835
847
|
var _typescript = require('typescript');
|
|
836
848
|
async function resolveOptions(options) {
|
|
837
849
|
const tsconfigPath = options.tsconfigPath ? options.tsconfigPath.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : void 0;
|
|
838
|
-
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));
|
|
839
851
|
let resolvedTsconfig;
|
|
840
852
|
if (options.tsconfig) {
|
|
841
853
|
resolvedTsconfig = options.tsconfig;
|
|
@@ -863,13 +875,11 @@ async function resolveOptions(options) {
|
|
|
863
875
|
}
|
|
864
876
|
const resolvedSchemas = [];
|
|
865
877
|
for (const schema of schemas) {
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
}
|
|
870
|
-
} else {
|
|
871
|
-
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`;
|
|
872
881
|
}
|
|
882
|
+
resolvedSchemas.push(...await listFiles(formattedSchema));
|
|
873
883
|
}
|
|
874
884
|
if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {
|
|
875
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.`, {
|
|
@@ -877,11 +887,13 @@ async function resolveOptions(options) {
|
|
|
877
887
|
});
|
|
878
888
|
return null;
|
|
879
889
|
}
|
|
880
|
-
|
|
890
|
+
const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : joinPaths(options.projectRoot, relativePath(tsconfigPath ? findFilePath(tsconfigPath) : options.projectRoot, joinPaths(options.workspaceRoot, resolvedSchemas[0].endsWith(".capnp") ? findFilePath(resolvedSchemas[0]) : resolvedSchemas[0])));
|
|
891
|
+
resolvedTsconfig.options.outDir = output;
|
|
881
892
|
return {
|
|
882
893
|
workspaceRoot: options.workspaceRoot,
|
|
883
894
|
projectRoot: options.projectRoot,
|
|
884
895
|
schemas: resolvedSchemas,
|
|
896
|
+
output,
|
|
885
897
|
js: _nullishCoalesce(options.js, () => ( false)),
|
|
886
898
|
ts: _nullishCoalesce(options.ts, () => ( (options.noTs !== void 0 ? !options.noTs : true))),
|
|
887
899
|
dts: _nullishCoalesce(options.dts, () => ( (options.noDts !== void 0 ? !options.noDts : true))),
|
|
@@ -892,4 +904,6 @@ _chunkUSNT2KNTcjs.__name.call(void 0, resolveOptions, "resolveOptions");
|
|
|
892
904
|
|
|
893
905
|
|
|
894
906
|
|
|
895
|
-
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
exports.existsSync = existsSync2; exports.createDirectory = createDirectory; exports.resolveOptions = resolveOptions;
|
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/dist/types.d.cts
CHANGED
|
@@ -40,7 +40,7 @@ type CapnpcOptions = Omit<CapnpcCLIOptions, "tsconfig" | "schema"> & {
|
|
|
40
40
|
tsconfig?: ParsedCommandLine;
|
|
41
41
|
tsconfigPath: string;
|
|
42
42
|
});
|
|
43
|
-
type CapnpcResolvedOptions = Omit<CapnpcOptions, "noTs" | "noDts"> & {
|
|
43
|
+
type CapnpcResolvedOptions = Omit<CapnpcOptions, "noTs" | "noDts" | "schemas" | "tsconfigPath" | "output"> & Required<Pick<CapnpcOptions, "output">> & {
|
|
44
44
|
schemas: string[];
|
|
45
45
|
tsconfig: ParsedCommandLine;
|
|
46
46
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ type CapnpcOptions = Omit<CapnpcCLIOptions, "tsconfig" | "schema"> & {
|
|
|
40
40
|
tsconfig?: ParsedCommandLine;
|
|
41
41
|
tsconfigPath: string;
|
|
42
42
|
});
|
|
43
|
-
type CapnpcResolvedOptions = Omit<CapnpcOptions, "noTs" | "noDts"> & {
|
|
43
|
+
type CapnpcResolvedOptions = Omit<CapnpcOptions, "noTs" | "noDts" | "schemas" | "tsconfigPath" | "output"> & Required<Pick<CapnpcOptions, "output">> & {
|
|
44
44
|
schemas: string[];
|
|
45
45
|
tsconfig: ParsedCommandLine;
|
|
46
46
|
};
|
package/dts/index.d.cts
CHANGED
|
@@ -4118,7 +4118,7 @@ export type CapnpcOptions = Omit<CapnpcCLIOptions, "tsconfig" | "schema"> & {
|
|
|
4118
4118
|
tsconfig?: ParsedCommandLine;
|
|
4119
4119
|
tsconfigPath: string;
|
|
4120
4120
|
});
|
|
4121
|
-
export type CapnpcResolvedOptions = Omit<CapnpcOptions, "noTs" | "noDts"> & {
|
|
4121
|
+
export type CapnpcResolvedOptions = Omit<CapnpcOptions, "noTs" | "noDts" | "schemas" | "tsconfigPath" | "output"> & Required<Pick<CapnpcOptions, "output">> & {
|
|
4122
4122
|
schemas: string[];
|
|
4123
4123
|
tsconfig: ParsedCommandLine;
|
|
4124
4124
|
};
|
package/dts/index.d.ts
CHANGED
|
@@ -4118,7 +4118,7 @@ export type CapnpcOptions = Omit<CapnpcCLIOptions, "tsconfig" | "schema"> & {
|
|
|
4118
4118
|
tsconfig?: ParsedCommandLine;
|
|
4119
4119
|
tsconfigPath: string;
|
|
4120
4120
|
});
|
|
4121
|
-
export type CapnpcResolvedOptions = Omit<CapnpcOptions, "noTs" | "noDts"> & {
|
|
4121
|
+
export type CapnpcResolvedOptions = Omit<CapnpcOptions, "noTs" | "noDts" | "schemas" | "tsconfigPath" | "output"> & Required<Pick<CapnpcOptions, "output">> & {
|
|
4122
4122
|
schemas: string[];
|
|
4123
4123
|
tsconfig: ParsedCommandLine;
|
|
4124
4124
|
};
|
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
|
}
|
|
@@ -4070,6 +4070,17 @@ var ConnWeakRefRegistry = globalThis.FinalizationRegistry ? new FinalizationRegi
|
|
|
4070
4070
|
|
|
4071
4071
|
// src/compile.ts
|
|
4072
4072
|
var _console = require('@storm-software/config-tools/logger/console');
|
|
4073
|
+
|
|
4074
|
+
// ../path/src/exists.ts
|
|
4075
|
+
var _fs = require('fs');
|
|
4076
|
+
var _promises = require('fs/promises');
|
|
4077
|
+
|
|
4078
|
+
// ../fs/src/helpers.ts
|
|
4079
|
+
var _nanotar = require('nanotar');
|
|
4080
|
+
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
// src/compile.ts
|
|
4073
4084
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
4074
4085
|
var _buffer = require('buffer');
|
|
4075
4086
|
var _child_process = require('child_process');
|
|
@@ -4632,14 +4643,10 @@ StormJSON.instance.registerCustom({
|
|
|
4632
4643
|
}, "Bytes");
|
|
4633
4644
|
|
|
4634
4645
|
// ../fs/src/read-file.ts
|
|
4635
|
-
var _fs = require('fs');
|
|
4636
|
-
var _promises = require('fs/promises');
|
|
4637
|
-
|
|
4638
|
-
// ../path/src/is-file.ts
|
|
4639
4646
|
|
|
4640
4647
|
|
|
4641
|
-
// ../path/src/exists.ts
|
|
4642
4648
|
|
|
4649
|
+
// ../path/src/is-file.ts
|
|
4643
4650
|
|
|
4644
4651
|
|
|
4645
4652
|
// ../path/src/file-path-fns.ts
|
|
@@ -4652,11 +4659,6 @@ var _configtools = require('@storm-software/config-tools');
|
|
|
4652
4659
|
|
|
4653
4660
|
|
|
4654
4661
|
|
|
4655
|
-
// ../fs/src/helpers.ts
|
|
4656
|
-
var _nanotar = require('nanotar');
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
4662
|
// ../fs/src/list-files.ts
|
|
4661
4663
|
|
|
4662
4664
|
var _glob = require('glob');
|
|
@@ -4070,6 +4070,17 @@ var ConnWeakRefRegistry = globalThis.FinalizationRegistry ? new FinalizationRegi
|
|
|
4070
4070
|
|
|
4071
4071
|
// src/compile.ts
|
|
4072
4072
|
import { writeWarning as writeWarning2 } from "@storm-software/config-tools/logger/console";
|
|
4073
|
+
|
|
4074
|
+
// ../path/src/exists.ts
|
|
4075
|
+
import { existsSync as existsSyncFs } from "node:fs";
|
|
4076
|
+
import { access, constants } from "node:fs/promises";
|
|
4077
|
+
|
|
4078
|
+
// ../fs/src/helpers.ts
|
|
4079
|
+
import { parseTar, parseTarGzip } from "nanotar";
|
|
4080
|
+
import { createWriteStream, mkdirSync, rmSync } from "node:fs";
|
|
4081
|
+
import { mkdir, readFile, rm } from "node:fs/promises";
|
|
4082
|
+
|
|
4083
|
+
// src/compile.ts
|
|
4073
4084
|
import defu2 from "defu";
|
|
4074
4085
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
4075
4086
|
import { exec } from "node:child_process";
|
|
@@ -4632,16 +4643,12 @@ StormJSON.instance.registerCustom({
|
|
|
4632
4643
|
}, "Bytes");
|
|
4633
4644
|
|
|
4634
4645
|
// ../fs/src/read-file.ts
|
|
4635
|
-
import { existsSync, readFileSync as readFileSyncFs } from "node:fs";
|
|
4646
|
+
import { existsSync as existsSync2, readFileSync as readFileSyncFs } from "node:fs";
|
|
4636
4647
|
import { readFile as readFileFs } from "node:fs/promises";
|
|
4637
4648
|
|
|
4638
4649
|
// ../path/src/is-file.ts
|
|
4639
4650
|
import { lstatSync, statSync } from "node:fs";
|
|
4640
4651
|
|
|
4641
|
-
// ../path/src/exists.ts
|
|
4642
|
-
import { existsSync as existsSyncFs } from "node:fs";
|
|
4643
|
-
import { access, constants } from "node:fs/promises";
|
|
4644
|
-
|
|
4645
4652
|
// ../path/src/file-path-fns.ts
|
|
4646
4653
|
import { relative } from "node:path";
|
|
4647
4654
|
|
|
@@ -4652,11 +4659,6 @@ import { findWorkspaceRootSafe } from "@storm-software/config-tools";
|
|
|
4652
4659
|
import { writeFileSync as writeFileSyncFs } from "node:fs";
|
|
4653
4660
|
import { writeFile as writeFileFs } from "node:fs/promises";
|
|
4654
4661
|
|
|
4655
|
-
// ../fs/src/helpers.ts
|
|
4656
|
-
import { parseTar, parseTarGzip } from "nanotar";
|
|
4657
|
-
import { createWriteStream, mkdirSync, rmSync } from "node:fs";
|
|
4658
|
-
import { mkdir, readFile, rm } from "node:fs/promises";
|
|
4659
|
-
|
|
4660
4662
|
// ../fs/src/list-files.ts
|
|
4661
4663
|
import defu from "defu";
|
|
4662
4664
|
import { glob } from "glob";
|