@stryke/capnp 0.12.82 → 0.12.83
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/README.md +3 -3
- package/bin/capnpc.cjs +18 -17
- package/bin/capnpc.d.cts.map +1 -1
- package/bin/capnpc.d.mts.map +1 -1
- package/bin/capnpc.mjs +18 -17
- package/bin/capnpc.mjs.map +1 -1
- package/dist/{compile-DI5-92za.cjs → compile-CskcqkUP.cjs} +1 -1
- package/dist/{compile-OPOvCjdO.mjs → compile-DcQoFtHz.mjs} +2 -2
- package/dist/{compile-OPOvCjdO.mjs.map → compile-DcQoFtHz.mjs.map} +1 -1
- package/dist/compile.cjs +2 -2
- package/dist/compile.mjs +2 -2
- package/dist/{helpers-DN2tMgBs.mjs → helpers-B11eFkbu.mjs} +9 -9
- package/dist/{helpers-DN2tMgBs.mjs.map → helpers-B11eFkbu.mjs.map} +1 -1
- package/dist/{helpers-D3oxyKcQ.cjs → helpers-kQzfhr4P.cjs} +8 -8
- package/dist/helpers.cjs +1 -1
- package/dist/helpers.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/rpc-helpers.cjs +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<br />
|
|
25
|
-
This package is part of Storm Software's
|
|
25
|
+
This package is part of Storm Software's **🌩️ Stryke** monorepo. Stryke packages TypeScript utility packages with shared functionality common to many Storm Software applications.
|
|
26
26
|
|
|
27
27
|
<br />
|
|
28
28
|
|
|
29
29
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
30
30
|
|
|
31
|
-
[](https://github.com/storm-software/stryke) [](http://commitizen.github.io/cz-cli/)  
|
|
32
32
|
|
|
33
33
|
> [!IMPORTANT] Important
|
|
34
|
-
> This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and
|
|
34
|
+
> This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
|
|
35
35
|
|
|
36
36
|
<div align="center">
|
|
37
37
|
<a href="https://github.com/storm-software/stryke" target="_blank"><b>Be sure to ⭐ this repository on GitHub so you can keep up to date on any daily progress!</b></a>
|
package/bin/capnpc.cjs
CHANGED
|
@@ -42,7 +42,7 @@ let __stryke_fs = require("@stryke/fs");
|
|
|
42
42
|
let __stryke_fs_json = require("@stryke/fs/json");
|
|
43
43
|
let __stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
44
44
|
|
|
45
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
45
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-DJB7XLHA.js
|
|
46
46
|
var DEFAULT_COLOR_CONFIG = {
|
|
47
47
|
light: {
|
|
48
48
|
background: "#fafafa",
|
|
@@ -2236,7 +2236,7 @@ var require_source = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2236
2236
|
}));
|
|
2237
2237
|
|
|
2238
2238
|
//#endregion
|
|
2239
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2239
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js
|
|
2240
2240
|
var import_source = /* @__PURE__ */ __toESM(require_source(), 1);
|
|
2241
2241
|
var chalkDefault = {
|
|
2242
2242
|
hex: (_) => (message) => message,
|
|
@@ -2268,14 +2268,14 @@ var getChalk = () => {
|
|
|
2268
2268
|
};
|
|
2269
2269
|
|
|
2270
2270
|
//#endregion
|
|
2271
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2271
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js
|
|
2272
2272
|
function isUnicodeSupported() {
|
|
2273
2273
|
if (process.platform !== "win32") return process.env.TERM !== "linux";
|
|
2274
2274
|
return Boolean(process.env.WT_SESSION) || Boolean(process.env.TERMINUS_SUBLIME) || process.env.ConEmuTask === "{cmd::Cmder}" || process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2275
2275
|
}
|
|
2276
2276
|
|
|
2277
2277
|
//#endregion
|
|
2278
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2278
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
|
|
2279
2279
|
var LogLevel = {
|
|
2280
2280
|
SILENT: 0,
|
|
2281
2281
|
FATAL: 10,
|
|
@@ -2300,7 +2300,7 @@ var LogLevelLabel = {
|
|
|
2300
2300
|
};
|
|
2301
2301
|
|
|
2302
2302
|
//#endregion
|
|
2303
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2303
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-AITAR5W5.js
|
|
2304
2304
|
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
2305
2305
|
var CONSOLE_ICONS = {
|
|
2306
2306
|
[LogLevelLabel.ERROR]: useIcon("✘", "×"),
|
|
@@ -2314,13 +2314,13 @@ var CONSOLE_ICONS = {
|
|
|
2314
2314
|
};
|
|
2315
2315
|
|
|
2316
2316
|
//#endregion
|
|
2317
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2317
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-CZ4IE2QN.js
|
|
2318
2318
|
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
2319
2319
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
2320
2320
|
};
|
|
2321
2321
|
|
|
2322
2322
|
//#endregion
|
|
2323
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2323
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-K4CDYUQR.js
|
|
2324
2324
|
var getLogLevel = (label) => {
|
|
2325
2325
|
switch (label) {
|
|
2326
2326
|
case "all": return LogLevel.ALL;
|
|
@@ -2336,7 +2336,7 @@ var getLogLevel = (label) => {
|
|
|
2336
2336
|
};
|
|
2337
2337
|
|
|
2338
2338
|
//#endregion
|
|
2339
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2339
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-SPHE3YEH.js
|
|
2340
2340
|
var daysInYear = 365.2425;
|
|
2341
2341
|
-(Math.pow(10, 8) * 24 * 60 * 60 * 1e3);
|
|
2342
2342
|
var secondsInDay = 3600 * 24;
|
|
@@ -2932,7 +2932,7 @@ var _isFunction = (value) => {
|
|
|
2932
2932
|
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("🗲");
|
|
2933
2933
|
|
|
2934
2934
|
//#endregion
|
|
2935
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2935
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-T4YVVO6G.js
|
|
2936
2936
|
var exitWithError = (config) => {
|
|
2937
2937
|
writeFatal("Exiting script with an error status...", config);
|
|
2938
2938
|
process.exit(1);
|
|
@@ -2967,7 +2967,7 @@ Stacktrace: ${error.stack}`, config);
|
|
|
2967
2967
|
};
|
|
2968
2968
|
|
|
2969
2969
|
//#endregion
|
|
2970
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2970
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-RUKM6FCF.js
|
|
2971
2971
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
2972
2972
|
var depth = 0;
|
|
2973
2973
|
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
@@ -2978,7 +2978,7 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
2978
2978
|
}
|
|
2979
2979
|
|
|
2980
2980
|
//#endregion
|
|
2981
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2981
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-V3GMJ4TX.js
|
|
2982
2982
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
2983
2983
|
function normalizeWindowsPath(input = "") {
|
|
2984
2984
|
if (!input) return input;
|
|
@@ -3060,7 +3060,7 @@ var isAbsolute = function(p) {
|
|
|
3060
3060
|
};
|
|
3061
3061
|
|
|
3062
3062
|
//#endregion
|
|
3063
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
3063
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-LF3SAK2O.js
|
|
3064
3064
|
var rootFiles = [
|
|
3065
3065
|
"storm-workspace.json",
|
|
3066
3066
|
"storm-workspace.yaml",
|
|
@@ -12007,10 +12007,13 @@ async function capnpc(options) {
|
|
|
12007
12007
|
//#endregion
|
|
12008
12008
|
//#region bin/capnpc.ts
|
|
12009
12009
|
const compileAction = (workspaceRoot) => async (options) => {
|
|
12010
|
-
|
|
12010
|
+
let projectRoot = options.projectRoot;
|
|
12011
|
+
if (!projectRoot && workspaceRoot !== process.cwd() && ((0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)(process.cwd(), "package.json")) || (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)(process.cwd(), "project.json")))) projectRoot = process.cwd();
|
|
12012
|
+
if (!projectRoot) throw new Error(`✖ The project root directory must be specified using the -p or --project-root option. \n\nCurrent directories: \nWorkspace Root: ${workspaceRoot} \nCurrent Working Directory: ${process.cwd()}`);
|
|
12011
12013
|
const resolvedOptions = await resolveOptions({
|
|
12012
12014
|
workspaceRoot,
|
|
12013
12015
|
...options,
|
|
12016
|
+
projectRoot,
|
|
12014
12017
|
tsconfig: void 0,
|
|
12015
12018
|
tsconfigPath: options.tsconfig,
|
|
12016
12019
|
schemas: options.schema
|
|
@@ -12046,15 +12049,13 @@ const compileAction = (workspaceRoot) => async (options) => {
|
|
|
12046
12049
|
* @returns The configured Command instance for the Cap'n Proto compiler CLI.
|
|
12047
12050
|
*/
|
|
12048
12051
|
function createProgram() {
|
|
12049
|
-
writeInfo(`${brandIcon()}
|
|
12052
|
+
writeInfo(`${brandIcon()} Running Storm Cap'n Proto Compiler Tools`, { logLevel: "all" });
|
|
12050
12053
|
const workspaceRoot = findWorkspaceRootSafe(process.cwd());
|
|
12051
12054
|
process.env.STORM_WORKSPACE_ROOT ??= workspaceRoot;
|
|
12052
12055
|
process.env.NX_WORKSPACE_ROOT_PATH ??= workspaceRoot;
|
|
12053
|
-
let projectRoot;
|
|
12054
|
-
if (workspaceRoot !== process.cwd() && ((0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)(process.cwd(), "package.json")) || (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)(process.cwd(), "project.json")))) projectRoot = process.cwd();
|
|
12055
12056
|
const program$1 = new Command();
|
|
12056
12057
|
program$1.name("storm-capnpc").description("Run the Storm Cap'n Proto compiler").version("1.0.0", "-v --version", "display CLI version");
|
|
12057
|
-
program$1.command("compile", { isDefault: true }).option("-p --project-root <path>", "The path to the project root directory"
|
|
12058
|
+
program$1.command("compile", { isDefault: true }).option("-p --project-root <path>", "The path to the project root directory").option("-s --schema <path>", "The directory (or a glob to the directory) containing the Cap'n Proto schema files to compile (default: current working directory)").option("-o --output <path>", "The directory to output the generated files to").option("--tsconfig <path>", "The path to the TypeScript configuration file to use for compilation").option("--skip-generating-id", "Skip generating a new 64-bit unique ID for use in a Cap'n Proto schema").option("--no-standard-imports", "Skip adding default import paths; use only those specified by -I").option("--no-ts", "An indicator to disable generation of TypeScript files").option("--js", "An indicator to generate JavaScript files").option("--dts", "An indicator to generate TypeScript declaration files").option("--no-dts", "An indicator to disable generation of TypeScript declaration files").option("-w --workspace-root <path>", "The path to the workspace root directory", workspaceRoot).option("--tty", "An indicator to enable TTY mode for the compiler").action(compileAction(workspaceRoot));
|
|
12058
12059
|
return program$1;
|
|
12059
12060
|
}
|
|
12060
12061
|
(async () => {
|
package/bin/capnpc.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capnpc.d.cts","names":[],"sources":["../../bin/capnpc.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"capnpc.d.cts","names":[],"sources":["../../bin/capnpc.ts"],"sourcesContent":[],"mappings":";;;;;;;AA0JA;;;iBAAgB,aAAA,CAAA,GAAa"}
|
package/bin/capnpc.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capnpc.d.mts","names":[],"sources":["../../bin/capnpc.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"capnpc.d.mts","names":[],"sources":["../../bin/capnpc.ts"],"sourcesContent":[],"mappings":";;;;;;;AA0JA;;;iBAAgB,aAAA,CAAA,GAAa"}
|
package/bin/capnpc.mjs
CHANGED
|
@@ -43,7 +43,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
43
43
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
44
44
|
|
|
45
45
|
//#endregion
|
|
46
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
46
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-DJB7XLHA.js
|
|
47
47
|
var DEFAULT_COLOR_CONFIG = {
|
|
48
48
|
light: {
|
|
49
49
|
background: "#fafafa",
|
|
@@ -2237,7 +2237,7 @@ var require_source = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2237
2237
|
}));
|
|
2238
2238
|
|
|
2239
2239
|
//#endregion
|
|
2240
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2240
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js
|
|
2241
2241
|
var import_source = /* @__PURE__ */ __toESM(require_source(), 1);
|
|
2242
2242
|
var chalkDefault = {
|
|
2243
2243
|
hex: (_) => (message) => message,
|
|
@@ -2269,14 +2269,14 @@ var getChalk = () => {
|
|
|
2269
2269
|
};
|
|
2270
2270
|
|
|
2271
2271
|
//#endregion
|
|
2272
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2272
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js
|
|
2273
2273
|
function isUnicodeSupported() {
|
|
2274
2274
|
if (process.platform !== "win32") return process.env.TERM !== "linux";
|
|
2275
2275
|
return Boolean(process.env.WT_SESSION) || Boolean(process.env.TERMINUS_SUBLIME) || process.env.ConEmuTask === "{cmd::Cmder}" || process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2276
2276
|
}
|
|
2277
2277
|
|
|
2278
2278
|
//#endregion
|
|
2279
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2279
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
|
|
2280
2280
|
var LogLevel = {
|
|
2281
2281
|
SILENT: 0,
|
|
2282
2282
|
FATAL: 10,
|
|
@@ -2301,7 +2301,7 @@ var LogLevelLabel = {
|
|
|
2301
2301
|
};
|
|
2302
2302
|
|
|
2303
2303
|
//#endregion
|
|
2304
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2304
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-AITAR5W5.js
|
|
2305
2305
|
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
2306
2306
|
var CONSOLE_ICONS = {
|
|
2307
2307
|
[LogLevelLabel.ERROR]: useIcon("✘", "×"),
|
|
@@ -2315,13 +2315,13 @@ var CONSOLE_ICONS = {
|
|
|
2315
2315
|
};
|
|
2316
2316
|
|
|
2317
2317
|
//#endregion
|
|
2318
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2318
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-CZ4IE2QN.js
|
|
2319
2319
|
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
2320
2320
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
2321
2321
|
};
|
|
2322
2322
|
|
|
2323
2323
|
//#endregion
|
|
2324
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2324
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-K4CDYUQR.js
|
|
2325
2325
|
var getLogLevel = (label) => {
|
|
2326
2326
|
switch (label) {
|
|
2327
2327
|
case "all": return LogLevel.ALL;
|
|
@@ -2337,7 +2337,7 @@ var getLogLevel = (label) => {
|
|
|
2337
2337
|
};
|
|
2338
2338
|
|
|
2339
2339
|
//#endregion
|
|
2340
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2340
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-SPHE3YEH.js
|
|
2341
2341
|
var daysInYear = 365.2425;
|
|
2342
2342
|
-(Math.pow(10, 8) * 24 * 60 * 60 * 1e3);
|
|
2343
2343
|
var secondsInDay = 3600 * 24;
|
|
@@ -2933,7 +2933,7 @@ var _isFunction = (value) => {
|
|
|
2933
2933
|
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("🗲");
|
|
2934
2934
|
|
|
2935
2935
|
//#endregion
|
|
2936
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2936
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-T4YVVO6G.js
|
|
2937
2937
|
var exitWithError = (config) => {
|
|
2938
2938
|
writeFatal("Exiting script with an error status...", config);
|
|
2939
2939
|
process.exit(1);
|
|
@@ -2968,7 +2968,7 @@ Stacktrace: ${error.stack}`, config);
|
|
|
2968
2968
|
};
|
|
2969
2969
|
|
|
2970
2970
|
//#endregion
|
|
2971
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2971
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-RUKM6FCF.js
|
|
2972
2972
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
2973
2973
|
var depth = 0;
|
|
2974
2974
|
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
@@ -2979,7 +2979,7 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
2979
2979
|
}
|
|
2980
2980
|
|
|
2981
2981
|
//#endregion
|
|
2982
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
2982
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-V3GMJ4TX.js
|
|
2983
2983
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
2984
2984
|
function normalizeWindowsPath(input = "") {
|
|
2985
2985
|
if (!input) return input;
|
|
@@ -3061,7 +3061,7 @@ var isAbsolute = function(p) {
|
|
|
3061
3061
|
};
|
|
3062
3062
|
|
|
3063
3063
|
//#endregion
|
|
3064
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.
|
|
3064
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.27/node_modules/@storm-software/config-tools/dist/chunk-LF3SAK2O.js
|
|
3065
3065
|
var rootFiles = [
|
|
3066
3066
|
"storm-workspace.json",
|
|
3067
3067
|
"storm-workspace.yaml",
|
|
@@ -12008,10 +12008,13 @@ async function capnpc(options) {
|
|
|
12008
12008
|
//#endregion
|
|
12009
12009
|
//#region bin/capnpc.ts
|
|
12010
12010
|
const compileAction = (workspaceRoot) => async (options) => {
|
|
12011
|
-
|
|
12011
|
+
let projectRoot = options.projectRoot;
|
|
12012
|
+
if (!projectRoot && workspaceRoot !== process.cwd() && (existsSync$1(joinPaths(process.cwd(), "package.json")) || existsSync$1(joinPaths(process.cwd(), "project.json")))) projectRoot = process.cwd();
|
|
12013
|
+
if (!projectRoot) throw new Error(`✖ The project root directory must be specified using the -p or --project-root option. \n\nCurrent directories: \nWorkspace Root: ${workspaceRoot} \nCurrent Working Directory: ${process.cwd()}`);
|
|
12012
12014
|
const resolvedOptions = await resolveOptions({
|
|
12013
12015
|
workspaceRoot,
|
|
12014
12016
|
...options,
|
|
12017
|
+
projectRoot,
|
|
12015
12018
|
tsconfig: void 0,
|
|
12016
12019
|
tsconfigPath: options.tsconfig,
|
|
12017
12020
|
schemas: options.schema
|
|
@@ -12047,15 +12050,13 @@ const compileAction = (workspaceRoot) => async (options) => {
|
|
|
12047
12050
|
* @returns The configured Command instance for the Cap'n Proto compiler CLI.
|
|
12048
12051
|
*/
|
|
12049
12052
|
function createProgram() {
|
|
12050
|
-
writeInfo(`${brandIcon()}
|
|
12053
|
+
writeInfo(`${brandIcon()} Running Storm Cap'n Proto Compiler Tools`, { logLevel: "all" });
|
|
12051
12054
|
const workspaceRoot = findWorkspaceRootSafe(process.cwd());
|
|
12052
12055
|
process.env.STORM_WORKSPACE_ROOT ??= workspaceRoot;
|
|
12053
12056
|
process.env.NX_WORKSPACE_ROOT_PATH ??= workspaceRoot;
|
|
12054
|
-
let projectRoot;
|
|
12055
|
-
if (workspaceRoot !== process.cwd() && (existsSync$1(joinPaths(process.cwd(), "package.json")) || existsSync$1(joinPaths(process.cwd(), "project.json")))) projectRoot = process.cwd();
|
|
12056
12057
|
const program$1 = new Command();
|
|
12057
12058
|
program$1.name("storm-capnpc").description("Run the Storm Cap'n Proto compiler").version("1.0.0", "-v --version", "display CLI version");
|
|
12058
|
-
program$1.command("compile", { isDefault: true }).option("-p --project-root <path>", "The path to the project root directory"
|
|
12059
|
+
program$1.command("compile", { isDefault: true }).option("-p --project-root <path>", "The path to the project root directory").option("-s --schema <path>", "The directory (or a glob to the directory) containing the Cap'n Proto schema files to compile (default: current working directory)").option("-o --output <path>", "The directory to output the generated files to").option("--tsconfig <path>", "The path to the TypeScript configuration file to use for compilation").option("--skip-generating-id", "Skip generating a new 64-bit unique ID for use in a Cap'n Proto schema").option("--no-standard-imports", "Skip adding default import paths; use only those specified by -I").option("--no-ts", "An indicator to disable generation of TypeScript files").option("--js", "An indicator to generate JavaScript files").option("--dts", "An indicator to generate TypeScript declaration files").option("--no-dts", "An indicator to disable generation of TypeScript declaration files").option("-w --workspace-root <path>", "The path to the workspace root directory", workspaceRoot).option("--tty", "An indicator to enable TTY mode for the compiler").action(compileAction(workspaceRoot));
|
|
12059
12060
|
return program$1;
|
|
12060
12061
|
}
|
|
12061
12062
|
(async () => {
|