@stryke/capnp 0.12.87 → 0.12.88

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-nWE-SpSm.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-nWE-SpSm.cjs');
2
+ const require_compile = require('./compile-GRO1_ka5.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-jlhgVQPM.mjs";
2
+ import { n as compile, t as capnpc } from "./compile-DwHB9xBy.mjs";
3
3
 
4
4
  export { capnpc, compile };
@@ -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, joinPaths(options.workspaceRoot, resolvedSchemas[0].endsWith(".capnp") ? findFilePath(resolvedSchemas[0]) : resolvedSchemas[0])), 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-jlhgVQPM.mjs.map