@storm-software/workspace-tools 1.43.4 → 1.43.6

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/index.js CHANGED
@@ -44822,9 +44822,9 @@ var require_brace_expansion2 = __commonJS({
44822
44822
  }
44823
44823
  });
44824
44824
 
44825
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/chunk-EPAEWGCP.js
44825
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/chunk-EPAEWGCP.js
44826
44826
  var require_chunk_EPAEWGCP = __commonJS({
44827
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
44827
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
44828
44828
  "use strict";
44829
44829
  Object.defineProperty(exports, "__esModule", { value: true });
44830
44830
  var version = "8.0.0";
@@ -46471,9 +46471,9 @@ var require_resolve_from2 = __commonJS({
46471
46471
  }
46472
46472
  });
46473
46473
 
46474
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/chunk-GQ77QZBO.js
46474
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/chunk-GQ77QZBO.js
46475
46475
  var require_chunk_GQ77QZBO = __commonJS({
46476
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
46476
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
46477
46477
  "use strict";
46478
46478
  Object.defineProperty(exports, "__esModule", { value: true });
46479
46479
  function _interopRequireDefault(obj) {
@@ -46751,9 +46751,9 @@ var require_chunk_GQ77QZBO = __commonJS({
46751
46751
  }
46752
46752
  });
46753
46753
 
46754
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/chunk-UIX4URMV.js
46754
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/chunk-UIX4URMV.js
46755
46755
  var require_chunk_UIX4URMV = __commonJS({
46756
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
46756
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
46757
46757
  "use strict";
46758
46758
  Object.defineProperty(exports, "__esModule", { value: true });
46759
46759
  function _interopRequireWildcard(obj) {
@@ -47246,8 +47246,8 @@ var require_dist2 = __commonJS({
47246
47246
  loadTsConfig: () => loadTsConfig2
47247
47247
  });
47248
47248
  module2.exports = __toCommonJS2(src_exports);
47249
- var import_path5 = __toESM2(require("path"), 1);
47250
- var import_fs5 = __toESM2(require("fs"), 1);
47249
+ var import_path3 = __toESM2(require("path"), 1);
47250
+ var import_fs3 = __toESM2(require("fs"), 1);
47251
47251
  var singleComment = Symbol("singleComment");
47252
47252
  var multiComment = Symbol("multiComment");
47253
47253
  var stripWithoutWhitespace = () => "";
@@ -47342,29 +47342,29 @@ var require_dist2 = __commonJS({
47342
47342
  }
47343
47343
  }
47344
47344
  var req = false ? createRequire(import_meta.url) : require;
47345
- var findUp = (name, startDir, stopDir = import_path5.default.parse(startDir).root) => {
47345
+ var findUp = (name, startDir, stopDir = import_path3.default.parse(startDir).root) => {
47346
47346
  let dir = startDir;
47347
47347
  while (dir !== stopDir) {
47348
- const file = import_path5.default.join(dir, name);
47349
- if (import_fs5.default.existsSync(file))
47348
+ const file = import_path3.default.join(dir, name);
47349
+ if (import_fs3.default.existsSync(file))
47350
47350
  return file;
47351
47351
  if (!file.endsWith(".json")) {
47352
47352
  const fileWithExt = file + ".json";
47353
- if (import_fs5.default.existsSync(fileWithExt))
47353
+ if (import_fs3.default.existsSync(fileWithExt))
47354
47354
  return fileWithExt;
47355
47355
  }
47356
- dir = import_path5.default.dirname(dir);
47356
+ dir = import_path3.default.dirname(dir);
47357
47357
  }
47358
47358
  return null;
47359
47359
  };
47360
47360
  var resolveTsConfigFromFile = (cwd, filename) => {
47361
- if (import_path5.default.isAbsolute(filename))
47362
- return import_fs5.default.existsSync(filename) ? filename : null;
47361
+ if (import_path3.default.isAbsolute(filename))
47362
+ return import_fs3.default.existsSync(filename) ? filename : null;
47363
47363
  return findUp(filename, cwd);
47364
47364
  };
47365
47365
  var resolveTsConfigFromExtends = (cwd, name) => {
47366
- if (import_path5.default.isAbsolute(name))
47367
- return import_fs5.default.existsSync(name) ? name : null;
47366
+ if (import_path3.default.isAbsolute(name))
47367
+ return import_fs3.default.existsSync(name) ? name : null;
47368
47368
  if (name.startsWith("."))
47369
47369
  return findUp(name, cwd);
47370
47370
  const id = req.resolve(name, { paths: [cwd] });
@@ -47372,14 +47372,14 @@ var require_dist2 = __commonJS({
47372
47372
  };
47373
47373
  var loadTsConfigInternal = (dir = process.cwd(), name = "tsconfig.json", isExtends = false) => {
47374
47374
  var _a, _b;
47375
- dir = import_path5.default.resolve(dir);
47375
+ dir = import_path3.default.resolve(dir);
47376
47376
  const id = isExtends ? resolveTsConfigFromExtends(dir, name) : resolveTsConfigFromFile(dir, name);
47377
47377
  if (!id)
47378
47378
  return null;
47379
- const data = jsoncParse(import_fs5.default.readFileSync(id, "utf-8"));
47380
- const configDir = import_path5.default.dirname(id);
47379
+ const data = jsoncParse(import_fs3.default.readFileSync(id, "utf-8"));
47380
+ const configDir = import_path3.default.dirname(id);
47381
47381
  if ((_a = data.compilerOptions) == null ? void 0 : _a.baseUrl) {
47382
- data.compilerOptions.baseUrl = import_path5.default.join(
47382
+ data.compilerOptions.baseUrl = import_path3.default.join(
47383
47383
  configDir,
47384
47384
  data.compilerOptions.baseUrl
47385
47385
  );
@@ -47461,12 +47461,12 @@ var require_dist3 = __commonJS({
47461
47461
  var import_url3 = require("url");
47462
47462
  var import_esbuild = require("esbuild");
47463
47463
  var import_load_tsconfig = require_dist2();
47464
- var import_fs5 = __toESM2(require("fs"), 1);
47465
- var import_path5 = __toESM2(require("path"), 1);
47464
+ var import_fs3 = __toESM2(require("fs"), 1);
47465
+ var import_path3 = __toESM2(require("path"), 1);
47466
47466
  var getPkgType = () => {
47467
47467
  try {
47468
47468
  const pkg = JSON.parse(
47469
- import_fs5.default.readFileSync(import_path5.default.resolve("package.json"), "utf-8")
47469
+ import_fs3.default.readFileSync(import_path3.default.resolve("package.json"), "utf-8")
47470
47470
  );
47471
47471
  return pkg.type;
47472
47472
  } catch (error) {
@@ -47475,7 +47475,7 @@ var require_dist3 = __commonJS({
47475
47475
  function guessFormat(inputFile) {
47476
47476
  if (!usingDynamicImport)
47477
47477
  return "cjs";
47478
- const ext2 = import_path5.default.extname(inputFile);
47478
+ const ext2 = import_path3.default.extname(inputFile);
47479
47479
  const type = getPkgType();
47480
47480
  if (ext2 === ".js") {
47481
47481
  return type === "module" ? "esm" : "cjs";
@@ -47687,9 +47687,9 @@ var require_dist3 = __commonJS({
47687
47687
  }
47688
47688
  });
47689
47689
 
47690
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/chunk-7G76EW2R.js
47690
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/chunk-7G76EW2R.js
47691
47691
  var require_chunk_7G76EW2R = __commonJS({
47692
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
47692
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
47693
47693
  "use strict";
47694
47694
  Object.defineProperty(exports, "__esModule", { value: true });
47695
47695
  function _interopRequireDefault(obj) {
@@ -101426,9 +101426,9 @@ var require_chokidar = __commonJS({
101426
101426
  }
101427
101427
  });
101428
101428
 
101429
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/index.js
101429
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/index.js
101430
101430
  var require_dist6 = __commonJS({
101431
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=nuoomzsk544j3zoy4w6xlebf4m_@microsoft+api-extractor@7.38.3_@swc+core@1._jyfln4hbxbrplmay2o7yiqfmdy/node_modules/tsup/dist/index.js"(exports) {
101431
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=xmhwxzi2nqhltf2r7syhjyoc7i_@microsoft+api-extractor@7.38.3_@swc+core@1._6zprvhhd4zzf6xxclnutwtxcvy/node_modules/tsup/dist/index.js"(exports) {
101432
101432
  "use strict";
101433
101433
  Object.defineProperty(exports, "__esModule", { value: true });
101434
101434
  function _interopRequireDefault(obj) {
@@ -103762,10 +103762,7 @@ var require_dist6 = __commonJS({
103762
103762
  const program = _typescript2.default.createProgram({
103763
103763
  rootNames: compilerOptions.fileNames,
103764
103764
  options: compilerOptions.options,
103765
- host: {
103766
- ...host,
103767
- jsDocParsingMode: _typescript2.default.JSDocParsingMode?.ParseAll !== void 0 ? _typescript2.default.JSDocParsingMode.ParseAll : 0
103768
- }
103765
+ host
103769
103766
  });
103770
103767
  const fileMapping = emitDtsFiles(program, host, options);
103771
103768
  if (!fileMapping || fileMapping.size === 0) {
@@ -126444,17 +126441,17 @@ var LogLevelLabel = {
126444
126441
  };
126445
126442
 
126446
126443
  // packages/config-tools/src/utilities/find-up.ts
126447
- var import_fs = require("fs");
126448
- var import_path = require("path");
126444
+ var import_node_fs = require("node:fs");
126445
+ var import_node_path = require("node:path");
126449
126446
  var MAX_PATH_SEARCH_DEPTH = 30;
126450
126447
  var depth = 0;
126451
126448
  function findFolderUp(startPath, endFileNames) {
126452
126449
  const _startPath = startPath ?? process.cwd();
126453
- if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(_startPath, endFileName)))) {
126450
+ if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
126454
126451
  return _startPath;
126455
126452
  }
126456
126453
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
126457
- const parent = (0, import_path.join)(_startPath, "..");
126454
+ const parent = (0, import_node_path.join)(_startPath, "..");
126458
126455
  return findFolderUp(parent, endFileNames);
126459
126456
  }
126460
126457
  return void 0;
@@ -126513,8 +126510,8 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
126513
126510
  }
126514
126511
 
126515
126512
  // packages/config-tools/src/utilities/get-default-config.ts
126516
- var import_fs2 = require("fs");
126517
- var import_path2 = require("path");
126513
+ var import_node_fs2 = require("node:fs");
126514
+ var import_node_path2 = require("node:path");
126518
126515
 
126519
126516
  // node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
126520
126517
  var util;
@@ -130183,8 +130180,8 @@ var getDefaultConfig = (config = {}, root) => {
130183
130180
  let license = DefaultStormConfig.license;
130184
130181
  let homepage = DefaultStormConfig.homepage;
130185
130182
  const workspaceRoot = findWorkspaceRoot(root);
130186
- if ((0, import_fs2.existsSync)((0, import_path2.join)(workspaceRoot, "package.json"))) {
130187
- const file = (0, import_fs2.readFileSync)((0, import_path2.join)(workspaceRoot, "package.json"), {
130183
+ if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
130184
+ const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
130188
130185
  encoding: "utf-8"
130189
130186
  });
130190
130187
  if (file) {
@@ -130285,12 +130282,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130285
130282
  console.error(
130286
130283
  `
130287
130284
 
130285
+
130288
130286
  ${chalk.bold.hex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6")(
130289
130287
  ">"
130290
130288
  )} ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").white(" \u{1F480} Fatal ")} ${chalk.reset.hex(
130291
130289
  config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
130292
130290
  )(message)}
130293
130291
 
130292
+
130294
130293
  `
130295
130294
  );
130296
130295
  };
@@ -130300,12 +130299,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130300
130299
  console.error(
130301
130300
  `
130302
130301
 
130302
+
130303
130303
  ${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(
130304
130304
  ">"
130305
130305
  )} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u{1F6D1} Error ")} ${chalk.reset.hex(
130306
130306
  config?.colors?.error ? config.colors.error : "#7d1a1a"
130307
130307
  )(message)}
130308
130308
 
130309
+
130309
130310
  `
130310
130311
  );
130311
130312
  };
@@ -130315,12 +130316,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130315
130316
  console.warn(
130316
130317
  `
130317
130318
 
130319
+
130318
130320
  ${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(
130319
130321
  ">"
130320
130322
  )} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
130321
130323
  config?.colors?.warning ? config.colors.warning : "#fcc419"
130322
130324
  )(message)}
130323
130325
 
130326
+
130324
130327
  `
130325
130328
  );
130326
130329
  };
@@ -130330,12 +130333,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130330
130333
  console.info(
130331
130334
  `
130332
130335
 
130336
+
130333
130337
  ${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(
130334
130338
  ">"
130335
130339
  )} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u{1F4EC} Info ")} ${chalk.reset.hex(
130336
130340
  config?.colors?.info ? config.colors.info : "#0ea5e9"
130337
130341
  )(message)}
130338
130342
 
130343
+
130339
130344
  `
130340
130345
  );
130341
130346
  };
@@ -130345,12 +130350,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130345
130350
  console.info(
130346
130351
  `
130347
130352
 
130353
+
130348
130354
  ${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(
130349
130355
  ">"
130350
130356
  )} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u{1F389} Success ")} ${chalk.reset.hex(
130351
130357
  config?.colors?.success ? config.colors.success : "#087f5b"
130352
130358
  )(message)}
130353
130359
 
130360
+
130354
130361
  `
130355
130362
  );
130356
130363
  };
@@ -130360,12 +130367,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130360
130367
  console.debug(
130361
130368
  `
130362
130369
 
130370
+
130363
130371
  ${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(
130364
130372
  ">"
130365
130373
  )} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F9EA} Debug ")} ${chalk.reset.hex(
130366
130374
  config?.colors?.primary ? config.colors.primary : "#1fb2a6"
130367
130375
  )(message)}
130368
130376
 
130377
+
130369
130378
  `
130370
130379
  );
130371
130380
  };
@@ -130374,12 +130383,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130374
130383
  console.log(
130375
130384
  `
130376
130385
 
130386
+
130377
130387
  ${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(
130378
130388
  ">"
130379
130389
  )} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F4E2} System ")} ${chalk.bold.hex(
130380
130390
  config?.colors?.primary ? config.colors.primary : "#1fb2a6"
130381
130391
  )(message)}
130382
130392
 
130393
+
130383
130394
  `
130384
130395
  );
130385
130396
  };
@@ -130539,16 +130550,6 @@ var setConfigEnv = (config) => {
130539
130550
  }
130540
130551
  };
130541
130552
 
130542
- // packages/config-tools/src/utilities/prepare-workspace.ts
130543
- var prepareWorkspace = async () => {
130544
- const _STORM_CONFIG = getDefaultConfig({
130545
- ...await getConfigFile(),
130546
- ...getConfigEnv()
130547
- });
130548
- setConfigEnv(_STORM_CONFIG);
130549
- return _STORM_CONFIG;
130550
- };
130551
-
130552
130553
  // packages/config-tools/src/env/get-env.ts
130553
130554
  var getExtensionEnv = (extensionName) => {
130554
130555
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
@@ -130616,6 +130617,32 @@ var getConfigEnv = () => {
130616
130617
  }, config);
130617
130618
  };
130618
130619
 
130620
+ // packages/config-tools/src/create-storm-config.ts
130621
+ var loadStormConfig = async (workspaceRoot) => {
130622
+ let config = {};
130623
+ let _workspaceRoot = workspaceRoot;
130624
+ if (!_workspaceRoot) {
130625
+ _workspaceRoot = findWorkspaceRoot();
130626
+ }
130627
+ const configFile = await getDefaultConfig(
130628
+ {
130629
+ ...await getConfigFile(_workspaceRoot),
130630
+ ...getConfigEnv()
130631
+ },
130632
+ _workspaceRoot
130633
+ );
130634
+ if (configFile) {
130635
+ config = StormConfigSchema.parse(configFile);
130636
+ } else {
130637
+ writeWarning(
130638
+ config,
130639
+ "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
130640
+ );
130641
+ }
130642
+ setConfigEnv(config);
130643
+ return config;
130644
+ };
130645
+
130619
130646
  // packages/workspace-tools/src/utils/get-workspace-root.ts
130620
130647
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
130621
130648
  var getWorkspaceRoot = () => {
@@ -130754,7 +130781,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
130754
130781
  - projectName: ${projectName}
130755
130782
  `
130756
130783
  );
130757
- config = await prepareWorkspace();
130784
+ config = await loadStormConfig(workspaceRoot);
130758
130785
  writeTrace(
130759
130786
  config,
130760
130787
  `Loaded Storm config into env:
@@ -130842,7 +130869,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
130842
130869
  `Loading the Storm Config from environment variables and storm.config.js file...
130843
130870
  - workspaceRoot: ${workspaceRoot}`
130844
130871
  );
130845
- config = await prepareWorkspace();
130872
+ config = await loadStormConfig(workspaceRoot);
130846
130873
  writeTrace(
130847
130874
  config,
130848
130875
  `Loaded Storm config into env:
@@ -131402,9 +131429,9 @@ ${commentStart} ----------------------------------------------------------------
131402
131429
  };
131403
131430
 
131404
131431
  // packages/workspace-tools/src/executors/tsup/executor.ts
131405
- var import_node_fs = require("node:fs");
131432
+ var import_node_fs3 = require("node:fs");
131406
131433
  var import_promises2 = require("node:fs/promises");
131407
- var import_node_path2 = require("node:path");
131434
+ var import_node_path4 = require("node:path");
131408
131435
  var import_esbuild_decorators = __toESM(require_src2());
131409
131436
  var import_devkit3 = __toESM(require_devkit());
131410
131437
  var import_js2 = __toESM(require_src());
@@ -134015,10 +134042,10 @@ var LRUCache = class _LRUCache {
134015
134042
  };
134016
134043
 
134017
134044
  // node_modules/.pnpm/path-scurry@1.10.1/node_modules/path-scurry/dist/mjs/index.js
134018
- var import_path3 = require("path");
134045
+ var import_path = require("path");
134019
134046
  var import_url = require("url");
134020
134047
  var actualFS = __toESM(require("fs"), 1);
134021
- var import_fs3 = require("fs");
134048
+ var import_fs = require("fs");
134022
134049
  var import_promises = require("fs/promises");
134023
134050
 
134024
134051
  // node_modules/.pnpm/minipass@7.0.4/node_modules/minipass/dist/esm/index.js
@@ -134900,12 +134927,12 @@ var Minipass = class extends import_events.EventEmitter {
134900
134927
  };
134901
134928
 
134902
134929
  // node_modules/.pnpm/path-scurry@1.10.1/node_modules/path-scurry/dist/mjs/index.js
134903
- var realpathSync = import_fs3.realpathSync.native;
134930
+ var realpathSync = import_fs.realpathSync.native;
134904
134931
  var defaultFS = {
134905
- lstatSync: import_fs3.lstatSync,
134906
- readdir: import_fs3.readdir,
134907
- readdirSync: import_fs3.readdirSync,
134908
- readlinkSync: import_fs3.readlinkSync,
134932
+ lstatSync: import_fs.lstatSync,
134933
+ readdir: import_fs.readdir,
134934
+ readdirSync: import_fs.readdirSync,
134935
+ readlinkSync: import_fs.readlinkSync,
134909
134936
  realpathSync,
134910
134937
  promises: {
134911
134938
  lstat: import_promises.lstat,
@@ -135901,7 +135928,7 @@ var PathWin32 = class _PathWin32 extends PathBase {
135901
135928
  * @internal
135902
135929
  */
135903
135930
  getRootString(path3) {
135904
- return import_path3.win32.parse(path3).root;
135931
+ return import_path.win32.parse(path3).root;
135905
135932
  }
135906
135933
  /**
135907
135934
  * @internal
@@ -136541,7 +136568,7 @@ var PathScurryWin32 = class extends PathScurryBase {
136541
136568
  sep = "\\";
136542
136569
  constructor(cwd = process.cwd(), opts = {}) {
136543
136570
  const { nocase = true } = opts;
136544
- super(cwd, import_path3.win32, "\\", { ...opts, nocase });
136571
+ super(cwd, import_path.win32, "\\", { ...opts, nocase });
136545
136572
  this.nocase = nocase;
136546
136573
  for (let p = this.cwd; p; p = p.parent) {
136547
136574
  p.nocase = this.nocase;
@@ -136551,7 +136578,7 @@ var PathScurryWin32 = class extends PathScurryBase {
136551
136578
  * @internal
136552
136579
  */
136553
136580
  parseRootPath(dir) {
136554
- return import_path3.win32.parse(dir).root.toUpperCase();
136581
+ return import_path.win32.parse(dir).root.toUpperCase();
136555
136582
  }
136556
136583
  /**
136557
136584
  * @internal
@@ -136573,7 +136600,7 @@ var PathScurryPosix = class extends PathScurryBase {
136573
136600
  sep = "/";
136574
136601
  constructor(cwd = process.cwd(), opts = {}) {
136575
136602
  const { nocase = false } = opts;
136576
- super(cwd, import_path3.posix, "/", { ...opts, nocase });
136603
+ super(cwd, import_path.posix, "/", { ...opts, nocase });
136577
136604
  this.nocase = nocase;
136578
136605
  }
136579
136606
  /**
@@ -137636,13 +137663,13 @@ var import_tsup = __toESM(require_dist6());
137636
137663
  var ts = __toESM(require("typescript"));
137637
137664
 
137638
137665
  // packages/workspace-tools/src/utils/file-path-utils.ts
137639
- var import_node_path = require("node:path");
137666
+ var import_node_path3 = require("node:path");
137640
137667
  var removeExtension = (filePath) => {
137641
137668
  return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
137642
137669
  };
137643
137670
  function findFileName(filePath) {
137644
137671
  return filePath?.split(
137645
- filePath?.includes(import_node_path.sep) ? import_node_path.sep : filePath?.includes("/") ? "/" : "\\"
137672
+ filePath?.includes(import_node_path3.sep) ? import_node_path3.sep : filePath?.includes("/") ? "/" : "\\"
137646
137673
  )?.pop() ?? "";
137647
137674
  }
137648
137675
 
@@ -137713,416 +137740,405 @@ var getTypiaTransform = (program, diagnostics) => (0, import_transform.default)(
137713
137740
 
137714
137741
  // packages/workspace-tools/src/executors/tsup/executor.ts
137715
137742
  async function tsupExecutorFn(options, context, config) {
137716
- try {
137717
- writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
137718
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && writeDebug(
137719
- config,
137720
- `\u2699\uFE0F Executor options:
137743
+ writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
137744
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && writeDebug(
137745
+ config,
137746
+ `\u2699\uFE0F Executor options:
137721
137747
  ${Object.keys(options).map(
137722
- (key) => `${key}: ${!options[key] || _isPrimitive(options[key]) ? options[key] : JSON.stringify(options[key])}`
137723
- ).join("\n")}
137748
+ (key) => `${key}: ${!options[key] || _isPrimitive(options[key]) ? options[key] : JSON.stringify(options[key])}`
137749
+ ).join("\n")}
137724
137750
  `
137751
+ );
137752
+ if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
137753
+ throw new Error(
137754
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
137725
137755
  );
137726
- if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
137727
- throw new Error(
137728
- "The Build process failed because the context is not valid. Please run this command from a workspace."
137729
- );
137730
- }
137731
- const workspaceRoot = getWorkspaceRoot();
137732
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
137733
- const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
137734
- if (options.clean !== false) {
137735
- if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
137736
- writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
137737
- }
137738
- (0, import_fs_extra.removeSync)(options.outputPath);
137739
- }
137740
- const assets = Array.from(options.assets);
137756
+ }
137757
+ const workspaceRoot = getWorkspaceRoot();
137758
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
137759
+ const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
137760
+ if (options.clean !== false) {
137761
+ if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
137762
+ writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
137763
+ }
137764
+ (0, import_fs_extra.removeSync)(options.outputPath);
137765
+ }
137766
+ const assets = Array.from(options.assets);
137767
+ assets.push({
137768
+ input: projectRoot,
137769
+ glob: "*.md",
137770
+ output: "/"
137771
+ });
137772
+ assets.push({
137773
+ input: "",
137774
+ glob: "LICENSE",
137775
+ output: "."
137776
+ });
137777
+ if (options.generatePackageJson === false) {
137741
137778
  assets.push({
137742
137779
  input: projectRoot,
137743
- glob: "*.md",
137744
- output: "/"
137780
+ glob: "**/package.json",
137781
+ output: "."
137745
137782
  });
137783
+ }
137784
+ if (options.includeSrc === true) {
137746
137785
  assets.push({
137747
- input: "",
137748
- glob: "LICENSE",
137749
- output: "."
137786
+ input: sourceRoot,
137787
+ glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
137788
+ output: "src/"
137750
137789
  });
137751
- if (options.generatePackageJson === false) {
137752
- assets.push({
137753
- input: projectRoot,
137754
- glob: "**/package.json",
137755
- output: "."
137756
- });
137757
- }
137758
- if (options.includeSrc === true) {
137759
- assets.push({
137760
- input: sourceRoot,
137761
- glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
137762
- output: "src/"
137763
- });
137764
- }
137765
- const result = await (0, import_js2.copyAssets)(
137766
- { assets, watch: options.watch, outputPath: options.outputPath },
137767
- context
137768
- );
137769
- if (!result.success) {
137770
- throw new Error("The Build process failed trying to copy assets");
137771
- }
137772
- const pathToPackageJson = (0, import_node_path2.join)(context.root, projectRoot, "package.json");
137773
- const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit3.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
137774
- const workspacePackageJson = (0, import_devkit3.readJsonFile)((0, import_node_path2.join)(workspaceRoot, "package.json"));
137775
- options.external = options.external || [];
137776
- if (workspacePackageJson?.dependencies) {
137777
- options.external = Object.keys(workspacePackageJson?.dependencies).reduce(
137778
- (ret, key) => {
137779
- if (!ret.includes(key)) {
137780
- ret.push(key);
137781
- }
137782
- return ret;
137783
- },
137784
- options.external
137785
- );
137786
- }
137787
- const externalDependencies = options.external.reduce(
137788
- (ret, name) => {
137789
- if (!packageJson?.devDependencies?.[name]) {
137790
- const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
137791
- if (externalNode) {
137792
- ret.push({
137793
- name,
137794
- outputs: [],
137795
- node: externalNode
137796
- });
137797
- }
137790
+ }
137791
+ const result = await (0, import_js2.copyAssets)(
137792
+ { assets, watch: options.watch, outputPath: options.outputPath },
137793
+ context
137794
+ );
137795
+ if (!result.success) {
137796
+ throw new Error("The Build process failed trying to copy assets");
137797
+ }
137798
+ const pathToPackageJson = (0, import_node_path4.join)(context.root, projectRoot, "package.json");
137799
+ const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit3.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
137800
+ const workspacePackageJson = (0, import_devkit3.readJsonFile)((0, import_node_path4.join)(workspaceRoot, "package.json"));
137801
+ options.external = options.external || [];
137802
+ if (workspacePackageJson?.dependencies) {
137803
+ options.external = Object.keys(workspacePackageJson?.dependencies).reduce(
137804
+ (ret, key) => {
137805
+ if (!ret.includes(key)) {
137806
+ ret.push(key);
137798
137807
  }
137799
137808
  return ret;
137800
137809
  },
137801
- []
137810
+ options.external
137802
137811
  );
137803
- const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
137804
- const internalDependencies = [];
137805
- const projectConfigs = await Promise.resolve(getProjectConfigurations());
137806
- if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
137807
- writeDebug(config, "Project Configs:");
137808
- console.log(projectConfigs);
137809
- }
137810
- if (implicitDependencies && implicitDependencies.length > 0) {
137811
- options.external = implicitDependencies.reduce((ret, key) => {
137812
- if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
137813
- writeDebug(config, `\u26A1 Adding implicit dependency: ${key}`);
137814
- }
137815
- const projectConfig = projectConfigs[key];
137816
- if (projectConfig?.targets?.build) {
137817
- const projectPackageJson = (0, import_devkit3.readJsonFile)(projectConfig.targets?.build.options.project);
137818
- if (projectPackageJson?.name && !options.external.includes(projectPackageJson.name)) {
137819
- ret.push(projectPackageJson.name);
137820
- internalDependencies.push(projectPackageJson.name);
137821
- }
137822
- }
137823
- return ret;
137824
- }, options.external);
137825
- }
137826
- if (options.bundle === false) {
137827
- for (const thirdPartyDependency of getExternalDependencies(
137828
- context.projectName,
137829
- context.projectGraph
137830
- )) {
137831
- const packageConfig = thirdPartyDependency.node.data;
137832
- if (packageConfig?.packageName) {
137833
- options.external.push(packageConfig.packageName);
137834
- if (!packageJson?.devDependencies?.[packageConfig.packageName]) {
137835
- externalDependencies.push(thirdPartyDependency);
137836
- }
137812
+ }
137813
+ const externalDependencies = options.external.reduce(
137814
+ (ret, name) => {
137815
+ if (!packageJson?.devDependencies?.[name]) {
137816
+ const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
137817
+ if (externalNode) {
137818
+ ret.push({
137819
+ name,
137820
+ outputs: [],
137821
+ node: externalNode
137822
+ });
137837
137823
  }
137838
137824
  }
137839
- }
137840
- if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
137841
- console.log(`Building with the following dependencies marked as external:
137842
- ${externalDependencies.map((dep) => {
137843
- return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
137844
- }).join("\n")}`);
137845
- }
137846
- const prettierOptions = {
137847
- plugins: ["prettier-plugin-packagejson"],
137848
- trailingComma: "none",
137849
- tabWidth: 2,
137850
- semi: true,
137851
- singleQuote: false,
137852
- quoteProps: "preserve",
137853
- insertPragma: false,
137854
- bracketSameLine: true,
137855
- printWidth: 80,
137856
- bracketSpacing: true,
137857
- arrowParens: "avoid",
137858
- endOfLine: "lf"
137859
- };
137860
- const entryPoints = [];
137861
- if (options.entry) {
137862
- entryPoints.push(options.entry);
137863
- }
137864
- if (options.emitOnAll === true) {
137865
- entryPoints.push((0, import_devkit3.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"));
137866
- }
137867
- if (options.additionalEntryPoints) {
137868
- entryPoints.push(...options.additionalEntryPoints);
137869
- }
137870
- const entry = globSync(entryPoints, {
137871
- withFileTypes: true
137872
- }).reduce((ret, filePath) => {
137873
- let formattedPath = workspaceRoot.replaceAll("\\", "/");
137874
- if (formattedPath.toUpperCase().startsWith("C:")) {
137875
- formattedPath = formattedPath.substring(2);
137876
- }
137877
- let propertyKey = (0, import_devkit3.joinPathFragments)(filePath.path, removeExtension(filePath.name)).replaceAll("\\", "/").replaceAll(formattedPath, "").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
137878
- if (propertyKey) {
137879
- while (propertyKey.startsWith("/")) {
137880
- propertyKey = propertyKey.substring(1);
137881
- }
137882
- if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
137883
- console.debug(
137884
- `Trying to add entry point ${propertyKey} at "${(0, import_devkit3.joinPathFragments)(
137885
- filePath.path,
137886
- filePath.name
137887
- )}"`
137888
- );
137889
- }
137890
- if (!(propertyKey in ret)) {
137891
- ret[propertyKey] = (0, import_devkit3.joinPathFragments)(filePath.path, filePath.name);
137825
+ return ret;
137826
+ },
137827
+ []
137828
+ );
137829
+ const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
137830
+ const internalDependencies = [];
137831
+ const projectConfigs = await Promise.resolve(getProjectConfigurations());
137832
+ if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
137833
+ writeDebug(config, "Project Configs:");
137834
+ console.log(projectConfigs);
137835
+ }
137836
+ if (implicitDependencies && implicitDependencies.length > 0) {
137837
+ options.external = implicitDependencies.reduce((ret, key) => {
137838
+ if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
137839
+ writeDebug(config, `\u26A1 Adding implicit dependency: ${key}`);
137840
+ }
137841
+ const projectConfig = projectConfigs[key];
137842
+ if (projectConfig?.targets?.build) {
137843
+ const projectPackageJson = (0, import_devkit3.readJsonFile)(projectConfig.targets?.build.options.project);
137844
+ if (projectPackageJson?.name && !options.external.includes(projectPackageJson.name)) {
137845
+ ret.push(projectPackageJson.name);
137846
+ internalDependencies.push(projectPackageJson.name);
137892
137847
  }
137893
137848
  }
137894
137849
  return ret;
137895
- }, {});
137896
- if (options.generatePackageJson !== false) {
137897
- const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
137898
- packageJson.dependencies = void 0;
137899
- for (const externalDependency of externalDependencies) {
137900
- const packageConfig = externalDependency.node.data;
137901
- if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
137902
- const { packageName, version } = packageConfig;
137903
- if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName] || packageJson?.devDependencies?.[packageName]) {
137904
- return null;
137905
- }
137906
- packageJson.dependencies ??= {};
137907
- packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
137850
+ }, options.external);
137851
+ }
137852
+ if (options.bundle === false) {
137853
+ for (const thirdPartyDependency of getExternalDependencies(
137854
+ context.projectName,
137855
+ context.projectGraph
137856
+ )) {
137857
+ const packageConfig = thirdPartyDependency.node.data;
137858
+ if (packageConfig?.packageName) {
137859
+ options.external.push(packageConfig.packageName);
137860
+ if (!packageJson?.devDependencies?.[packageConfig.packageName]) {
137861
+ externalDependencies.push(thirdPartyDependency);
137908
137862
  }
137909
137863
  }
137910
- for (const packageName of internalDependencies) {
137911
- if (!packageJson?.devDependencies?.[packageName]) {
137912
- packageJson.dependencies ??= {};
137913
- packageJson.dependencies[packageName] = "latest";
137864
+ }
137865
+ }
137866
+ writeTrace(
137867
+ config,
137868
+ `Building with the following dependencies marked as external:
137869
+ ${externalDependencies.map((dep) => {
137870
+ return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
137871
+ }).join("\n")}`
137872
+ );
137873
+ const prettierOptions = {
137874
+ plugins: ["prettier-plugin-packagejson"],
137875
+ trailingComma: "none",
137876
+ tabWidth: 2,
137877
+ semi: true,
137878
+ singleQuote: false,
137879
+ quoteProps: "preserve",
137880
+ insertPragma: false,
137881
+ bracketSameLine: true,
137882
+ printWidth: 80,
137883
+ bracketSpacing: true,
137884
+ arrowParens: "avoid",
137885
+ endOfLine: "lf"
137886
+ };
137887
+ const entryPoints = [];
137888
+ if (options.entry) {
137889
+ entryPoints.push(options.entry);
137890
+ }
137891
+ if (options.emitOnAll === true) {
137892
+ entryPoints.push((0, import_devkit3.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"));
137893
+ }
137894
+ if (options.additionalEntryPoints) {
137895
+ entryPoints.push(...options.additionalEntryPoints);
137896
+ }
137897
+ const entry = globSync(entryPoints, {
137898
+ withFileTypes: true
137899
+ }).reduce((ret, filePath) => {
137900
+ let formattedPath = workspaceRoot.replaceAll("\\", "/");
137901
+ if (formattedPath.toUpperCase().startsWith("C:")) {
137902
+ formattedPath = formattedPath.substring(2);
137903
+ }
137904
+ let propertyKey = (0, import_devkit3.joinPathFragments)(filePath.path, removeExtension(filePath.name)).replaceAll("\\", "/").replaceAll(formattedPath, "").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
137905
+ if (propertyKey) {
137906
+ while (propertyKey.startsWith("/")) {
137907
+ propertyKey = propertyKey.substring(1);
137908
+ }
137909
+ writeDebug(
137910
+ config,
137911
+ `Trying to add entry point ${propertyKey} at "${(0, import_devkit3.joinPathFragments)(
137912
+ filePath.path,
137913
+ filePath.name
137914
+ )}"`
137915
+ );
137916
+ if (!(propertyKey in ret)) {
137917
+ ret[propertyKey] = (0, import_devkit3.joinPathFragments)(filePath.path, filePath.name);
137918
+ }
137919
+ }
137920
+ return ret;
137921
+ }, {});
137922
+ if (options.generatePackageJson !== false) {
137923
+ const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
137924
+ packageJson.dependencies = void 0;
137925
+ for (const externalDependency of externalDependencies) {
137926
+ const packageConfig = externalDependency.node.data;
137927
+ if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
137928
+ const { packageName, version } = packageConfig;
137929
+ if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName] || packageJson?.devDependencies?.[packageName]) {
137930
+ return null;
137914
137931
  }
137932
+ packageJson.dependencies ??= {};
137933
+ packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
137915
137934
  }
137916
- const distPaths = !options?.getConfig || _isFunction(options.getConfig) ? ["dist/"] : Object.keys(options.getConfig).map((key) => `${key}/`);
137917
- packageJson.type = "module";
137918
- if (distPaths.length > 0) {
137919
- packageJson.exports ??= {
137920
- ".": {
137935
+ }
137936
+ for (const packageName of internalDependencies) {
137937
+ if (!packageJson?.devDependencies?.[packageName]) {
137938
+ packageJson.dependencies ??= {};
137939
+ packageJson.dependencies[packageName] = "latest";
137940
+ }
137941
+ }
137942
+ const distPaths = !options?.getConfig || _isFunction(options.getConfig) ? ["dist/"] : Object.keys(options.getConfig).map((key) => `${key}/`);
137943
+ packageJson.type = "module";
137944
+ if (distPaths.length > 0) {
137945
+ packageJson.exports ??= {
137946
+ ".": {
137947
+ import: {
137948
+ types: `./${distPaths[0]}index.d.ts`,
137949
+ default: `./${distPaths[0]}index.js`
137950
+ },
137951
+ require: {
137952
+ types: `./${distPaths[0]}index.d.cts`,
137953
+ default: `./${distPaths[0]}index.cjs`
137954
+ },
137955
+ default: {
137956
+ types: `./${distPaths[0]}index.d.ts`,
137957
+ default: `./${distPaths[0]}index.js`
137958
+ },
137959
+ ...(options.additionalEntryPoints ?? []).map((entryPoint) => ({
137960
+ [removeExtension(entryPoint).replace(sourceRoot, "")]: {
137961
+ types: (0, import_node_path4.join)(
137962
+ `./${distPaths[0]}`,
137963
+ `${removeExtension(entryPoint.replace(sourceRoot, ""))}.d.ts`
137964
+ ),
137965
+ default: (0, import_node_path4.join)(
137966
+ `./${distPaths[0]}`,
137967
+ `${removeExtension(entryPoint.replace(sourceRoot, ""))}.js`
137968
+ )
137969
+ }
137970
+ }))
137971
+ },
137972
+ "./package.json": "./package.json"
137973
+ };
137974
+ packageJson.exports = Object.keys(entry).reduce((ret, key) => {
137975
+ let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
137976
+ packageJsonKey = packageJsonKey.replaceAll("/index", "");
137977
+ if (!ret[packageJsonKey]) {
137978
+ ret[packageJsonKey] = {
137921
137979
  import: {
137922
137980
  types: `./${distPaths[0]}index.d.ts`,
137923
- default: `./${distPaths[0]}index.js`
137981
+ default: `./${distPaths[0]}${key}.js`
137924
137982
  },
137925
137983
  require: {
137926
137984
  types: `./${distPaths[0]}index.d.cts`,
137927
- default: `./${distPaths[0]}index.cjs`
137985
+ default: `./${distPaths[0]}${key}.cjs`
137928
137986
  },
137929
137987
  default: {
137930
137988
  types: `./${distPaths[0]}index.d.ts`,
137931
- default: `./${distPaths[0]}index.js`
137932
- },
137933
- ...(options.additionalEntryPoints ?? []).map((entryPoint) => ({
137934
- [removeExtension(entryPoint).replace(sourceRoot, "")]: {
137935
- types: (0, import_node_path2.join)(
137936
- `./${distPaths[0]}`,
137937
- `${removeExtension(entryPoint.replace(sourceRoot, ""))}.d.ts`
137938
- ),
137939
- default: (0, import_node_path2.join)(
137940
- `./${distPaths[0]}`,
137941
- `${removeExtension(entryPoint.replace(sourceRoot, ""))}.js`
137942
- )
137943
- }
137944
- }))
137945
- },
137946
- "./package.json": "./package.json"
137947
- };
137948
- packageJson.exports = Object.keys(entry).reduce((ret, key) => {
137949
- let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
137950
- packageJsonKey = packageJsonKey.replaceAll("/index", "");
137951
- if (!ret[packageJsonKey]) {
137952
- ret[packageJsonKey] = {
137953
- import: {
137954
- types: `./${distPaths[0]}index.d.ts`,
137955
- default: `./${distPaths[0]}${key}.js`
137956
- },
137957
- require: {
137958
- types: `./${distPaths[0]}index.d.cts`,
137959
- default: `./${distPaths[0]}${key}.cjs`
137960
- },
137961
- default: {
137962
- types: `./${distPaths[0]}index.d.ts`,
137963
- default: `./${distPaths[0]}${key}.js`
137964
- }
137965
- };
137966
- }
137967
- return ret;
137968
- }, packageJson.exports);
137969
- packageJson.funding ??= workspacePackageJson.funding;
137970
- packageJson.types ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`;
137971
- packageJson.typings ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`;
137972
- packageJson.typescript ??= {
137973
- definition: `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`
137974
- };
137975
- packageJson.main ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.cjs`;
137976
- packageJson.module ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.js`;
137977
- if (options.platform && options.platform !== "node") {
137978
- packageJson.browser ??= `${distPaths[0]}index.global.js`;
137979
- }
137980
- if (options.includeSrc === true) {
137981
- let distSrc = sourceRoot.replace(projectRoot, "");
137982
- if (distSrc.startsWith("/")) {
137983
- distSrc = distSrc.substring(1);
137984
- }
137985
- packageJson.source ??= `${(0, import_node_path2.join)(distSrc, "index.ts").replaceAll("\\", "/")}`;
137986
- }
137987
- packageJson.sideEffects ??= false;
137988
- packageJson.files ??= ["dist/**/*"];
137989
- if (options.includeSrc === true && !packageJson.files.includes("src")) {
137990
- packageJson.files.push("src/**/*");
137989
+ default: `./${distPaths[0]}${key}.js`
137990
+ }
137991
+ };
137991
137992
  }
137992
- }
137993
- packageJson.publishConfig ??= {
137994
- access: "public"
137995
- };
137996
- packageJson.description ??= workspacePackageJson.description;
137997
- packageJson.homepage ??= workspacePackageJson.homepage;
137998
- packageJson.bugs ??= workspacePackageJson.bugs;
137999
- packageJson.author ??= workspacePackageJson.author;
138000
- packageJson.license ??= workspacePackageJson.license;
138001
- packageJson.keywords ??= workspacePackageJson.keywords;
138002
- packageJson.repository ??= workspacePackageJson.repository;
138003
- packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_node_path2.join)("packages", context.projectName);
138004
- const packageJsonPath = (0, import_node_path2.join)(context.root, options.outputPath, "package.json");
138005
- if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
138006
- writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
138007
- }
138008
- (0, import_node_fs.writeFileSync)(
138009
- packageJsonPath,
138010
- await (0, import_prettier.format)(JSON.stringify(packageJson), {
138011
- ...prettierOptions,
138012
- parser: "json"
138013
- })
138014
- );
138015
- }
138016
- if (options.includeSrc === true) {
138017
- const files = globSync([
138018
- (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
138019
- (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
138020
- (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.js"),
138021
- (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.jsx")
138022
- ]);
138023
- await Promise.allSettled(
138024
- files.map(
138025
- async (file) => (0, import_promises2.writeFile)(
138026
- file,
138027
- await (0, import_prettier.format)(
138028
- `${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
138029
-
138030
- ${(0, import_node_fs.readFileSync)(file, "utf-8")}`,
138031
- {
138032
- ...prettierOptions,
138033
- parser: "typescript"
138034
- }
138035
- ),
138036
- "utf-8"
138037
- )
138038
- )
138039
- );
138040
- }
138041
- const stormEnv = Object.keys(options.env).filter((key) => key.startsWith("STORM_")).reduce((ret, key) => {
138042
- ret[key] = options.env[key];
138043
- return ret;
138044
- }, {});
138045
- options.plugins.push(
138046
- (0, import_esbuild_decorators.esbuildDecorators)({
138047
- tsconfig: options.tsConfig,
138048
- cwd: workspaceRoot
137993
+ return ret;
137994
+ }, packageJson.exports);
137995
+ packageJson.funding ??= workspacePackageJson.funding;
137996
+ packageJson.types ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`;
137997
+ packageJson.typings ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`;
137998
+ packageJson.typescript ??= {
137999
+ definition: `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`
138000
+ };
138001
+ packageJson.main ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.cjs`;
138002
+ packageJson.module ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.js`;
138003
+ if (options.platform && options.platform !== "node") {
138004
+ packageJson.browser ??= `${distPaths[0]}index.global.js`;
138005
+ }
138006
+ if (options.includeSrc === true) {
138007
+ let distSrc = sourceRoot.replace(projectRoot, "");
138008
+ if (distSrc.startsWith("/")) {
138009
+ distSrc = distSrc.substring(1);
138010
+ }
138011
+ packageJson.source ??= `${(0, import_node_path4.join)(distSrc, "index.ts").replaceAll("\\", "/")}`;
138012
+ }
138013
+ packageJson.sideEffects ??= false;
138014
+ packageJson.files ??= ["dist/**/*"];
138015
+ if (options.includeSrc === true && !packageJson.files.includes("src")) {
138016
+ packageJson.files.push("src/**/*");
138017
+ }
138018
+ }
138019
+ packageJson.publishConfig ??= {
138020
+ access: "public"
138021
+ };
138022
+ packageJson.description ??= workspacePackageJson.description;
138023
+ packageJson.homepage ??= workspacePackageJson.homepage;
138024
+ packageJson.bugs ??= workspacePackageJson.bugs;
138025
+ packageJson.author ??= workspacePackageJson.author;
138026
+ packageJson.license ??= workspacePackageJson.license;
138027
+ packageJson.keywords ??= workspacePackageJson.keywords;
138028
+ packageJson.repository ??= workspacePackageJson.repository;
138029
+ packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_node_path4.join)("packages", context.projectName);
138030
+ const packageJsonPath = (0, import_node_path4.join)(context.root, options.outputPath, "package.json");
138031
+ writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
138032
+ (0, import_node_fs3.writeFileSync)(
138033
+ packageJsonPath,
138034
+ await (0, import_prettier.format)(JSON.stringify(packageJson), {
138035
+ ...prettierOptions,
138036
+ parser: "json"
138049
138037
  })
138050
138038
  );
138051
- options.plugins.push(environmentPlugin(stormEnv));
138052
- const getConfigOptions = {
138053
- ...options,
138054
- define: {
138055
- __STORM_CONFIG: JSON.stringify(stormEnv)
138056
- },
138057
- env: {
138058
- __STORM_CONFIG: JSON.stringify(stormEnv),
138059
- ...stormEnv
138060
- },
138061
- dtsTsConfig: getNormalizedTsConfig(
138062
- context.root,
138063
- options.outputPath,
138064
- (0, import_tsc.createTypeScriptCompilationOptions)(
138065
- (0, import_normalize_options.normalizeOptions)(
138039
+ } else {
138040
+ writeWarning(config, "Skipping writing to package.json file");
138041
+ }
138042
+ if (options.includeSrc === true) {
138043
+ const files = globSync([
138044
+ (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
138045
+ (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
138046
+ (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.js"),
138047
+ (0, import_devkit3.joinPathFragments)(context.root, options.outputPath, "src/**/*.jsx")
138048
+ ]);
138049
+ await Promise.allSettled(
138050
+ files.map(
138051
+ async (file) => (0, import_promises2.writeFile)(
138052
+ file,
138053
+ await (0, import_prettier.format)(
138054
+ `${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
138055
+
138056
+ ${(0, import_node_fs3.readFileSync)(file, "utf-8")}`,
138066
138057
  {
138067
- ...options,
138068
- watch: false,
138069
- main: options.entry,
138070
- transformers: options.skipTypia ? [] : ["typia/lib/transform"]
138071
- },
138072
- context.root,
138073
- sourceRoot,
138074
- workspaceRoot
138058
+ ...prettierOptions,
138059
+ parser: "typescript"
138060
+ }
138075
138061
  ),
138076
- context
138062
+ "utf-8"
138077
138063
  )
138078
- ),
138079
- banner: options.banner ? {
138080
- js: `${options.banner}
138064
+ )
138065
+ );
138066
+ }
138067
+ const stormEnv = Object.keys(options.env).filter((key) => key.startsWith("STORM_")).reduce((ret, key) => {
138068
+ ret[key] = options.env[key];
138069
+ return ret;
138070
+ }, {});
138071
+ options.plugins.push(
138072
+ (0, import_esbuild_decorators.esbuildDecorators)({
138073
+ tsconfig: options.tsConfig,
138074
+ cwd: workspaceRoot
138075
+ })
138076
+ );
138077
+ options.plugins.push(environmentPlugin(stormEnv));
138078
+ const getConfigOptions = {
138079
+ ...options,
138080
+ define: {
138081
+ __STORM_CONFIG: JSON.stringify(stormEnv)
138082
+ },
138083
+ env: {
138084
+ __STORM_CONFIG: JSON.stringify(stormEnv),
138085
+ ...stormEnv
138086
+ },
138087
+ dtsTsConfig: getNormalizedTsConfig(
138088
+ context.root,
138089
+ options.outputPath,
138090
+ (0, import_tsc.createTypeScriptCompilationOptions)(
138091
+ (0, import_normalize_options.normalizeOptions)(
138092
+ {
138093
+ ...options,
138094
+ watch: false,
138095
+ main: options.entry,
138096
+ transformers: options.skipTypia ? [] : ["typia/lib/transform"]
138097
+ },
138098
+ context.root,
138099
+ sourceRoot,
138100
+ workspaceRoot
138101
+ ),
138102
+ context
138103
+ )
138104
+ ),
138105
+ banner: options.banner ? {
138106
+ js: `${options.banner}
138081
138107
 
138082
138108
  `,
138083
- css: `/*
138109
+ css: `/*
138084
138110
  ${options.banner}
138085
138111
  */
138086
138112
 
138087
138113
  `
138088
- } : void 0,
138089
- outputPath: options.outputPath,
138090
- entry,
138091
- getTransform: options.skipTypia ? void 0 : getTypiaTransform
138092
- };
138093
- if (options.getConfig) {
138094
- if (getLogLevel(config?.logLevel) >= LogLevel.INFO) {
138095
- writeInfo(config, "\u26A1 Running the Build process");
138096
- }
138097
- const getConfigFns = _isFunction(options.getConfig) ? [options.getConfig] : Object.keys(options.getConfig).map((key) => options.getConfig[key]);
138098
- const tsupConfig = (0, import_tsup.defineConfig)(
138099
- getConfigFns.map(
138100
- (getConfigFn) => getConfig(context.root, projectRoot, getConfigFn, getConfigOptions)
138101
- )
138102
- );
138103
- if (_isFunction(tsupConfig)) {
138104
- await build(await Promise.resolve(tsupConfig({})), config);
138105
- } else {
138106
- await build(tsupConfig, config);
138107
- }
138108
- } else if (getLogLevel(config?.logLevel) >= LogLevel.WARN) {
138109
- writeWarning(
138110
- config,
138111
- "The Build process did not run because no `getConfig` parameter was provided"
138112
- );
138113
- }
138114
- if (getLogLevel(config?.logLevel) >= LogLevel.INFO) {
138115
- writeSuccess(config, "\u26A1 The Build process has completed successfully");
138114
+ } : void 0,
138115
+ outputPath: options.outputPath,
138116
+ entry,
138117
+ getTransform: options.skipTypia ? void 0 : getTypiaTransform
138118
+ };
138119
+ if (options.getConfig) {
138120
+ writeInfo(config, "\u26A1 Running the Build process");
138121
+ const getConfigFns = _isFunction(options.getConfig) ? [options.getConfig] : Object.keys(options.getConfig).map((key) => options.getConfig[key]);
138122
+ const tsupConfig = (0, import_tsup.defineConfig)(
138123
+ getConfigFns.map(
138124
+ (getConfigFn) => getConfig(context.root, projectRoot, getConfigFn, getConfigOptions)
138125
+ )
138126
+ );
138127
+ if (_isFunction(tsupConfig)) {
138128
+ await build(await Promise.resolve(tsupConfig({})), config);
138129
+ } else {
138130
+ await build(tsupConfig, config);
138116
138131
  }
138117
- return {
138118
- success: true
138119
- };
138120
- } catch (e) {
138121
- console.error(e);
138122
- return {
138123
- success: false
138124
- };
138132
+ } else if (getLogLevel(config?.logLevel) >= LogLevel.WARN) {
138133
+ writeWarning(
138134
+ config,
138135
+ "The Build process did not run because no `getConfig` parameter was provided"
138136
+ );
138125
138137
  }
138138
+ writeSuccess(config, "\u26A1 The Build process has completed successfully");
138139
+ return {
138140
+ success: true
138141
+ };
138126
138142
  }
138127
138143
  function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
138128
138144
  const config = ts.readConfigFile(options.tsConfig, ts.sys.readFile).config;
@@ -138142,11 +138158,11 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
138142
138158
  emitDeclarationOnly: true,
138143
138159
  declaration: true,
138144
138160
  declarationMap: true,
138145
- declarationDir: (0, import_node_path2.join)(workspaceRoot, "tmp", ".tsup", "declaration")
138161
+ declarationDir: (0, import_node_path4.join)(workspaceRoot, "tmp", ".tsup", "declaration")
138146
138162
  }
138147
138163
  },
138148
138164
  ts.sys,
138149
- (0, import_node_path2.dirname)(options.tsConfig)
138165
+ (0, import_node_path4.dirname)(options.tsConfig)
138150
138166
  );
138151
138167
  tsConfig.options.pathsBasePath = workspaceRoot;
138152
138168
  if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
@@ -138472,8 +138488,8 @@ var executor_default3 = withRunExecutor(
138472
138488
 
138473
138489
  // packages/workspace-tools/src/generators/config-schema/generator.ts
138474
138490
  var import_devkit6 = __toESM(require_devkit());
138475
- var import_fs4 = require("fs");
138476
- var import_path4 = require("path");
138491
+ var import_fs2 = require("fs");
138492
+ var import_path2 = require("path");
138477
138493
 
138478
138494
  // node_modules/.pnpm/zod-to-json-schema@3.22.1_zod@3.22.4/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
138479
138495
  function addErrorMessage(res, key, errorMessage, refs) {
@@ -139493,11 +139509,11 @@ async function configSchemaGeneratorFn(tree, options) {
139493
139509
  const modules = await Promise.all(
139494
139510
  Object.keys(projectConfigurations).map(async (key) => {
139495
139511
  if (projectConfigurations[key]?.config) {
139496
- const configPath = (0, import_path4.join)(
139512
+ const configPath = (0, import_path2.join)(
139497
139513
  workspaceRoot,
139498
139514
  projectConfigurations[key].config
139499
139515
  );
139500
- if ((0, import_fs4.existsSync)(configPath)) {
139516
+ if ((0, import_fs2.existsSync)(configPath)) {
139501
139517
  const mod = await import(configPath);
139502
139518
  if (mod.default) {
139503
139519
  return { name: key, schema: mod.default };
@@ -139525,7 +139541,7 @@ async function configSchemaGeneratorFn(tree, options) {
139525
139541
  );
139526
139542
  (0, import_devkit6.writeJson)(
139527
139543
  tree,
139528
- options.outputFile ? (0, import_path4.join)(workspaceRoot, options.outputFile) : (0, import_path4.join)(workspaceRoot, "storm.schema.json"),
139544
+ options.outputFile ? (0, import_path2.join)(workspaceRoot, options.outputFile) : (0, import_path2.join)(workspaceRoot, "storm.schema.json"),
139529
139545
  zodToJsonSchema(ModulesSchema, "StormConfig")
139530
139546
  );
139531
139547
  await (0, import_devkit6.formatFiles)(tree);
@@ -139824,12 +139840,12 @@ var generator_default3 = withRunGenerator(
139824
139840
  );
139825
139841
 
139826
139842
  // packages/workspace-tools/src/utils/find-cache-dir.ts
139827
- var import_node_fs2 = require("node:fs");
139828
- var import_node_path3 = require("node:path");
139843
+ var import_node_fs4 = require("node:fs");
139844
+ var import_node_path5 = require("node:path");
139829
139845
  var import_node_process = require("node:process");
139830
139846
  var isWritable2 = (path3) => {
139831
139847
  try {
139832
- (0, import_node_fs2.accessSync)(path3, import_node_fs2.constants.W_OK);
139848
+ (0, import_node_fs4.accessSync)(path3, import_node_fs4.constants.W_OK);
139833
139849
  return true;
139834
139850
  } catch {
139835
139851
  return false;
@@ -139837,13 +139853,13 @@ var isWritable2 = (path3) => {
139837
139853
  };
139838
139854
  function useDirectory(directory, { create = true }) {
139839
139855
  if (create) {
139840
- (0, import_node_fs2.mkdirSync)(directory, { recursive: true });
139856
+ (0, import_node_fs4.mkdirSync)(directory, { recursive: true });
139841
139857
  }
139842
139858
  return directory;
139843
139859
  }
139844
139860
  function getNodeModuleDirectory(workspaceRoot) {
139845
- const nodeModules = (0, import_node_path3.join)(workspaceRoot, "node_modules");
139846
- if ((0, import_node_fs2.existsSync)(nodeModules) && !isWritable2(nodeModules)) {
139861
+ const nodeModules = (0, import_node_path5.join)(workspaceRoot, "node_modules");
139862
+ if ((0, import_node_fs4.existsSync)(nodeModules) && !isWritable2(nodeModules)) {
139847
139863
  throw new Error("Cannot write to node_modules directory");
139848
139864
  }
139849
139865
  return nodeModules;
@@ -139859,10 +139875,10 @@ function findCacheDirectory({
139859
139875
  create: true
139860
139876
  }) {
139861
139877
  if (import_node_process.env.CACHE_DIR && !["true", "false", "1", "0"].includes(import_node_process.env.CACHE_DIR)) {
139862
- return useDirectory((0, import_node_path3.join)(import_node_process.env.CACHE_DIR, name, cacheName), { create });
139878
+ return useDirectory((0, import_node_path5.join)(import_node_process.env.CACHE_DIR, name, cacheName), { create });
139863
139879
  }
139864
139880
  if (import_node_process.env.STORM_CACHE_DIR && !["true", "false", "1", "0"].includes(import_node_process.env.STORM_CACHE_DIR)) {
139865
- return useDirectory((0, import_node_path3.join)(import_node_process.env.STORM_CACHE_DIR, name, cacheName), {
139881
+ return useDirectory((0, import_node_path5.join)(import_node_process.env.STORM_CACHE_DIR, name, cacheName), {
139866
139882
  create
139867
139883
  });
139868
139884
  }
@@ -139871,14 +139887,14 @@ function findCacheDirectory({
139871
139887
  throw new Error("Cannot find node_modules directory");
139872
139888
  }
139873
139889
  return useDirectory(
139874
- (0, import_node_path3.join)(workspaceRoot, "node_modules", ".cache", name, cacheName),
139890
+ (0, import_node_path5.join)(workspaceRoot, "node_modules", ".cache", name, cacheName),
139875
139891
  { create }
139876
139892
  );
139877
139893
  }
139878
139894
 
139879
139895
  // packages/workspace-tools/src/utils/workspace-storage.ts
139880
- var import_node_fs3 = require("node:fs");
139881
- var import_node_path4 = require("node:path");
139896
+ var import_node_fs5 = require("node:fs");
139897
+ var import_node_path6 = require("node:path");
139882
139898
  var WorkspaceStorage = class {
139883
139899
  constructor({
139884
139900
  cacheName,
@@ -139898,9 +139914,9 @@ var WorkspaceStorage = class {
139898
139914
  * @returns The value of the key
139899
139915
  */
139900
139916
  getItem(key) {
139901
- const cacheFile = (0, import_node_path4.join)(this.cacheDir, key);
139902
- if ((0, import_node_fs3.existsSync)(cacheFile)) {
139903
- return (0, import_node_fs3.readFileSync)(cacheFile, "utf-8");
139917
+ const cacheFile = (0, import_node_path6.join)(this.cacheDir, key);
139918
+ if ((0, import_node_fs5.existsSync)(cacheFile)) {
139919
+ return (0, import_node_fs5.readFileSync)(cacheFile, "utf-8");
139904
139920
  }
139905
139921
  return void 0;
139906
139922
  }
@@ -139911,7 +139927,7 @@ var WorkspaceStorage = class {
139911
139927
  * @param value - The value to set
139912
139928
  */
139913
139929
  setItem(key, value) {
139914
- (0, import_node_fs3.writeFileSync)((0, import_node_path4.join)(this.cacheDir, key), value, { encoding: "utf-8" });
139930
+ (0, import_node_fs5.writeFileSync)((0, import_node_path6.join)(this.cacheDir, key), value, { encoding: "utf-8" });
139915
139931
  }
139916
139932
  /**
139917
139933
  * Remove item from cache
@@ -139919,14 +139935,14 @@ var WorkspaceStorage = class {
139919
139935
  * @param key - The key to remove
139920
139936
  */
139921
139937
  removeItem(key) {
139922
- (0, import_node_fs3.rmSync)((0, import_node_path4.join)(this.cacheDir, key), { force: true, recursive: true });
139938
+ (0, import_node_fs5.rmSync)((0, import_node_path6.join)(this.cacheDir, key), { force: true, recursive: true });
139923
139939
  }
139924
139940
  /**
139925
139941
  * Clear the cache
139926
139942
  */
139927
139943
  clear() {
139928
- (0, import_node_fs3.readdirSync)(this.cacheDir).forEach((cacheFile) => {
139929
- (0, import_node_fs3.rmSync)(cacheFile, { force: true, recursive: true });
139944
+ (0, import_node_fs5.readdirSync)(this.cacheDir).forEach((cacheFile) => {
139945
+ (0, import_node_fs5.rmSync)(cacheFile, { force: true, recursive: true });
139930
139946
  });
139931
139947
  }
139932
139948
  /**
@@ -139936,7 +139952,7 @@ var WorkspaceStorage = class {
139936
139952
  * @returns The key at the index
139937
139953
  */
139938
139954
  key(index) {
139939
- const files = (0, import_node_fs3.readdirSync)(this.cacheDir);
139955
+ const files = (0, import_node_fs5.readdirSync)(this.cacheDir);
139940
139956
  if (index < files.length && index >= 0) {
139941
139957
  return files[index];
139942
139958
  }