@stryke/capnp 0.12.87 → 0.12.89

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.
@@ -1,4 +1,4 @@
1
- const require_helpers = require('./helpers-CQMD8SU-.cjs');
1
+ const require_helpers = require('./helpers-B2lDU1eQ.cjs');
2
2
  const require_capnp_es_GpvEvMIK = require('./capnp-es.GpvEvMIK-BY4gHyC5.cjs');
3
3
  let __stryke_fs_exists = require("@stryke/fs/exists");
4
4
  let typescript = require("typescript");
package/dist/compile.cjs CHANGED
@@ -1,5 +1,5 @@
1
- require('./helpers-CQMD8SU-.cjs');
2
- const require_compile = require('./compile-DeNcAQWn.cjs');
1
+ require('./helpers-B2lDU1eQ.cjs');
2
+ const require_compile = require('./compile-e2xqm0Q3.cjs');
3
3
 
4
4
  exports.capnpc = require_compile.capnpc;
5
5
  exports.compile = require_compile.compile;
package/dist/compile.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import "./helpers-BdCa_OGa.mjs";
2
- import { n as compile, t as capnpc } from "./compile-DBZMJ5P8.mjs";
1
+ import "./helpers-C-a9QDSv.mjs";
2
+ import { n as compile, t as capnpc } from "./compile-DshE0Oj0.mjs";
3
3
 
4
4
  export { capnpc, compile };
@@ -31,10 +31,11 @@ let typescript = require("typescript");
31
31
  let __stryke_fs = require("@stryke/fs");
32
32
  let __stryke_fs_json = require("@stryke/fs/json");
33
33
  let __stryke_fs_list_files = require("@stryke/fs/list-files");
34
+ let __stryke_path_append = require("@stryke/path/append");
34
35
  let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
35
36
  let __stryke_path_join_paths = require("@stryke/path/join-paths");
36
37
 
37
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-DJB7XLHA.js
38
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-DJB7XLHA.js
38
39
  var DEFAULT_COLOR_CONFIG = {
39
40
  light: {
40
41
  background: "#fafafa",
@@ -2211,7 +2212,7 @@ var require_source = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2211
2212
  }));
2212
2213
 
2213
2214
  //#endregion
2214
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js
2215
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js
2215
2216
  var import_source = /* @__PURE__ */ __toESM(require_source(), 1);
2216
2217
  var chalkDefault = {
2217
2218
  hex: (_) => (message) => message,
@@ -2243,14 +2244,14 @@ var getChalk = () => {
2243
2244
  };
2244
2245
 
2245
2246
  //#endregion
2246
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js
2247
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js
2247
2248
  function isUnicodeSupported() {
2248
2249
  if (process.platform !== "win32") return process.env.TERM !== "linux";
2249
2250
  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";
2250
2251
  }
2251
2252
 
2252
2253
  //#endregion
2253
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
2254
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
2254
2255
  var LogLevel = {
2255
2256
  SILENT: 0,
2256
2257
  FATAL: 10,
@@ -2275,7 +2276,7 @@ var LogLevelLabel = {
2275
2276
  };
2276
2277
 
2277
2278
  //#endregion
2278
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-AITAR5W5.js
2279
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-AITAR5W5.js
2279
2280
  var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
2280
2281
  var CONSOLE_ICONS = {
2281
2282
  [LogLevelLabel.ERROR]: useIcon("✘", "×"),
@@ -2289,13 +2290,13 @@ var CONSOLE_ICONS = {
2289
2290
  };
2290
2291
 
2291
2292
  //#endregion
2292
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-CZ4IE2QN.js
2293
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-CZ4IE2QN.js
2293
2294
  var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
2294
2295
  return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
2295
2296
  };
2296
2297
 
2297
2298
  //#endregion
2298
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-K4CDYUQR.js
2299
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-K4CDYUQR.js
2299
2300
  var getLogLevel = (label) => {
2300
2301
  switch (label) {
2301
2302
  case "all": return LogLevel.ALL;
@@ -2311,7 +2312,7 @@ var getLogLevel = (label) => {
2311
2312
  };
2312
2313
 
2313
2314
  //#endregion
2314
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-SPHE3YEH.js
2315
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-SPHE3YEH.js
2315
2316
  var daysInYear = 365.2425;
2316
2317
  -(Math.pow(10, 8) * 24 * 60 * 60 * 1e3);
2317
2318
  var secondsInDay = 3600 * 24;
@@ -2938,10 +2939,12 @@ async function resolveOptions(options) {
2938
2939
  (0, __stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.lib.json"),
2939
2940
  (0, __stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.app.json"),
2940
2941
  (0, __stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.capnp.json"),
2942
+ (0, __stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.schema.json"),
2941
2943
  (0, __stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.json"),
2942
2944
  (0, __stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.lib.json"),
2943
2945
  (0, __stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.app.json"),
2944
- (0, __stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.capnp.json")
2946
+ (0, __stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.capnp.json"),
2947
+ (0, __stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.schema.json")
2945
2948
  ].find((path) => (0, __stryke_fs_exists.existsSync)(path));
2946
2949
  if (found) resolvedTsconfigPath = found;
2947
2950
  }
@@ -2971,7 +2974,7 @@ async function resolveOptions(options) {
2971
2974
  writeWarning(`✖ 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.`, { logLevel: "all" });
2972
2975
  return null;
2973
2976
  }
2974
- const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : (0, __stryke_path_join_paths.joinPaths)(options.projectRoot, (0, __stryke_path_file_path_fns.relativePath)(tsconfigPath ? (0, __stryke_path_file_path_fns.findFilePath)(tsconfigPath) : options.projectRoot, (0, __stryke_path_join_paths.joinPaths)(options.workspaceRoot, resolvedSchemas[0].endsWith(".capnp") ? (0, __stryke_path_file_path_fns.findFilePath)(resolvedSchemas[0]) : resolvedSchemas[0])));
2977
+ const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : (0, __stryke_path_append.appendPath)((0, __stryke_path_file_path_fns.relativePath)(tsconfigPath ? (0, __stryke_path_file_path_fns.findFilePath)(tsconfigPath) : options.projectRoot, (0, __stryke_path_append.appendPath)(resolvedSchemas[0].endsWith(".capnp") ? (0, __stryke_path_file_path_fns.findFilePath)(resolvedSchemas[0]) : resolvedSchemas[0], options.workspaceRoot)), options.projectRoot);
2975
2978
  if (!(0, __stryke_fs_exists.existsSync)(output)) {
2976
2979
  if ((0, __stryke_fs.isFile)(output)) {
2977
2980
  const errorMessage = `✖ The specified output path "${output}" is a file. Please provide a valid directory path.`;
@@ -4,6 +4,7 @@ import { parseJsonConfigFileContent, sys } from "typescript";
4
4
  import { createDirectory, isFile } from "@stryke/fs";
5
5
  import { readJsonFile } from "@stryke/fs/json";
6
6
  import { listFiles, listSync } from "@stryke/fs/list-files";
7
+ import { appendPath } from "@stryke/path/append";
7
8
  import { findFilePath, relativePath } from "@stryke/path/file-path-fns";
8
9
  import { joinPaths } from "@stryke/path/join-paths";
9
10
 
@@ -36,7 +37,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
37
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
37
38
 
38
39
  //#endregion
39
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-DJB7XLHA.js
40
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-DJB7XLHA.js
40
41
  var DEFAULT_COLOR_CONFIG = {
41
42
  light: {
42
43
  background: "#fafafa",
@@ -2213,7 +2214,7 @@ var require_source = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2213
2214
  }));
2214
2215
 
2215
2216
  //#endregion
2216
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js
2217
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js
2217
2218
  var import_source = /* @__PURE__ */ __toESM(require_source(), 1);
2218
2219
  var chalkDefault = {
2219
2220
  hex: (_) => (message) => message,
@@ -2245,14 +2246,14 @@ var getChalk = () => {
2245
2246
  };
2246
2247
 
2247
2248
  //#endregion
2248
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js
2249
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js
2249
2250
  function isUnicodeSupported() {
2250
2251
  if (process.platform !== "win32") return process.env.TERM !== "linux";
2251
2252
  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";
2252
2253
  }
2253
2254
 
2254
2255
  //#endregion
2255
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
2256
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
2256
2257
  var LogLevel = {
2257
2258
  SILENT: 0,
2258
2259
  FATAL: 10,
@@ -2277,7 +2278,7 @@ var LogLevelLabel = {
2277
2278
  };
2278
2279
 
2279
2280
  //#endregion
2280
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-AITAR5W5.js
2281
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-AITAR5W5.js
2281
2282
  var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
2282
2283
  var CONSOLE_ICONS = {
2283
2284
  [LogLevelLabel.ERROR]: useIcon("✘", "×"),
@@ -2291,13 +2292,13 @@ var CONSOLE_ICONS = {
2291
2292
  };
2292
2293
 
2293
2294
  //#endregion
2294
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-CZ4IE2QN.js
2295
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-CZ4IE2QN.js
2295
2296
  var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
2296
2297
  return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
2297
2298
  };
2298
2299
 
2299
2300
  //#endregion
2300
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-K4CDYUQR.js
2301
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-K4CDYUQR.js
2301
2302
  var getLogLevel = (label) => {
2302
2303
  switch (label) {
2303
2304
  case "all": return LogLevel.ALL;
@@ -2313,7 +2314,7 @@ var getLogLevel = (label) => {
2313
2314
  };
2314
2315
 
2315
2316
  //#endregion
2316
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.28/node_modules/@storm-software/config-tools/dist/chunk-SPHE3YEH.js
2317
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.32/node_modules/@storm-software/config-tools/dist/chunk-SPHE3YEH.js
2317
2318
  var daysInYear = 365.2425;
2318
2319
  -(Math.pow(10, 8) * 24 * 60 * 60 * 1e3);
2319
2320
  var secondsInDay = 3600 * 24;
@@ -2940,10 +2941,12 @@ async function resolveOptions(options) {
2940
2941
  joinPaths(options.projectRoot, "tsconfig.lib.json"),
2941
2942
  joinPaths(options.projectRoot, "tsconfig.app.json"),
2942
2943
  joinPaths(options.projectRoot, "tsconfig.capnp.json"),
2944
+ joinPaths(options.projectRoot, "tsconfig.schema.json"),
2943
2945
  joinPaths(options.workspaceRoot, "tsconfig.json"),
2944
2946
  joinPaths(options.workspaceRoot, "tsconfig.lib.json"),
2945
2947
  joinPaths(options.workspaceRoot, "tsconfig.app.json"),
2946
- joinPaths(options.workspaceRoot, "tsconfig.capnp.json")
2948
+ joinPaths(options.workspaceRoot, "tsconfig.capnp.json"),
2949
+ joinPaths(options.workspaceRoot, "tsconfig.schema.json")
2947
2950
  ].find((path) => existsSync(path));
2948
2951
  if (found) resolvedTsconfigPath = found;
2949
2952
  }
@@ -2973,7 +2976,7 @@ async function resolveOptions(options) {
2973
2976
  writeWarning(`✖ 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.`, { logLevel: "all" });
2974
2977
  return null;
2975
2978
  }
2976
- 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])));
2979
+ const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : appendPath(relativePath(tsconfigPath ? findFilePath(tsconfigPath) : options.projectRoot, appendPath(resolvedSchemas[0].endsWith(".capnp") ? findFilePath(resolvedSchemas[0]) : resolvedSchemas[0], options.workspaceRoot)), options.projectRoot);
2977
2980
  if (!existsSync(output)) {
2978
2981
  if (isFile(output)) {
2979
2982
  const errorMessage = `✖ The specified output path "${output}" is a file. Please provide a valid directory path.`;
@@ -3000,4 +3003,4 @@ async function resolveOptions(options) {
3000
3003
 
3001
3004
  //#endregion
3002
3005
  export { writeWarning as n, resolveOptions as t };
3003
- //# sourceMappingURL=helpers-BdCa_OGa.mjs.map
3006
+ //# sourceMappingURL=helpers-C-a9QDSv.mjs.map