@storm-software/workspace-tools 1.7.28 → 1.7.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.7.28",
3
+ "version": "1.7.30",
4
4
  "private": false,
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "keywords": [
@@ -408390,9 +408390,9 @@ var require_brace_expansion2 = __commonJS({
408390
408390
  }
408391
408391
  });
408392
408392
 
408393
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js
408393
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js
408394
408394
  var require_chunk_EPAEWGCP = __commonJS({
408395
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
408395
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
408396
408396
  "use strict";
408397
408397
  Object.defineProperty(exports, "__esModule", { value: true });
408398
408398
  var version = "8.0.0";
@@ -410039,9 +410039,9 @@ var require_resolve_from = __commonJS({
410039
410039
  }
410040
410040
  });
410041
410041
 
410042
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js
410042
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js
410043
410043
  var require_chunk_GQ77QZBO = __commonJS({
410044
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
410044
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
410045
410045
  "use strict";
410046
410046
  Object.defineProperty(exports, "__esModule", { value: true });
410047
410047
  function _interopRequireDefault(obj) {
@@ -410320,9 +410320,9 @@ var require_chunk_GQ77QZBO = __commonJS({
410320
410320
  }
410321
410321
  });
410322
410322
 
410323
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js
410323
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js
410324
410324
  var require_chunk_UIX4URMV = __commonJS({
410325
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
410325
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
410326
410326
  "use strict";
410327
410327
  Object.defineProperty(exports, "__esModule", { value: true });
410328
410328
  function _interopRequireWildcard(obj) {
@@ -411256,9 +411256,9 @@ var require_dist2 = __commonJS({
411256
411256
  }
411257
411257
  });
411258
411258
 
411259
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js
411259
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js
411260
411260
  var require_chunk_7G76EW2R = __commonJS({
411261
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
411261
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
411262
411262
  "use strict";
411263
411263
  Object.defineProperty(exports, "__esModule", { value: true });
411264
411264
  function _interopRequireDefault(obj) {
@@ -465064,9 +465064,9 @@ var require_chokidar = __commonJS({
465064
465064
  }
465065
465065
  });
465066
465066
 
465067
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js
465067
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js
465068
465068
  var require_dist5 = __commonJS({
465069
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js"(exports) {
465069
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js"(exports) {
465070
465070
  "use strict";
465071
465071
  Object.defineProperty(exports, "__esModule", { value: true });
465072
465072
  function _interopRequireDefault(obj) {
@@ -466646,15 +466646,9 @@ var require_dist5 = __commonJS({
466646
466646
  }
466647
466647
  return result;
466648
466648
  };
466649
- async function runEsbuild(options, {
466650
- format: format2,
466651
- css,
466652
- logger: logger3,
466653
- buildDependencies,
466654
- pluginContainer
466655
- }) {
466656
- let pkgPath = options.outDir ? options.outDir : process.cwd();
466657
- !options.silent && logger3.info(format2, `\u26A1 Preparing to run ESBuild: ${pkgPath}`);
466649
+ var packageJsonSearch = (outDir, silent, format2, logger3) => {
466650
+ let pkgPath = outDir ? outDir : process.cwd();
466651
+ !silent && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
466658
466652
  if (pkgPath) {
466659
466653
  const splits = pkgPath.split("/");
466660
466654
  if (splits.length > 0) {
@@ -466666,12 +466660,12 @@ var require_dist5 = __commonJS({
466666
466660
  ).join("/"),
466667
466661
  "package.json"
466668
466662
  );
466669
- !options.silent && logger3.info(
466663
+ !silent && logger3.info(
466670
466664
  format2,
466671
466665
  `\u26A1 Searching for package.json file in ${packageJsonPath} (index: ${i})`
466672
466666
  );
466673
466667
  if (_fs2.default.existsSync(packageJsonPath)) {
466674
- !options.silent && logger3.info(
466668
+ !silent && logger3.info(
466675
466669
  format2,
466676
466670
  `\u26A1 Found the package.json file in ${packageJsonPath} (index: ${i})`
466677
466671
  );
@@ -466681,6 +466675,16 @@ var require_dist5 = __commonJS({
466681
466675
  }
466682
466676
  }
466683
466677
  }
466678
+ return pkgPath;
466679
+ };
466680
+ async function runEsbuild(options, {
466681
+ format: format2,
466682
+ css,
466683
+ logger: logger3,
466684
+ buildDependencies,
466685
+ pluginContainer
466686
+ }) {
466687
+ const pkgPath = packageJsonSearch(options.outDir, options.silent, format2, logger3);
466684
466688
  logger3.info(format2, `\u26A1 Running ESBuild: ${pkgPath}`);
466685
466689
  const pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
466686
466690
  const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
@@ -467474,8 +467478,9 @@ var require_dist5 = __commonJS({
467474
467478
  }
467475
467479
  var logger2 = _chunk7G76EW2Rjs.createLogger.call(void 0);
467476
467480
  function rollupDtsFile(inputFilePath, outputFilePath, tsconfigFilePath) {
467477
- let cwd = process.cwd();
467478
- let packageJsonFullPath = _path2.default.join(cwd, "package.json");
467481
+ let pkgPath = packageJsonSearch(outputFilePath, false, "dts", logger2);
467482
+ logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${pkgPath}`);
467483
+ let packageJsonFullPath = _path2.default.join(pkgPath, "package.json");
467479
467484
  let configObject = {
467480
467485
  mainEntryPointFilePath: inputFilePath,
467481
467486
  apiReport: {
@@ -467492,7 +467497,7 @@ var require_dist5 = __commonJS({
467492
467497
  compiler: {
467493
467498
  tsconfigFilePath
467494
467499
  },
467495
- projectFolder: cwd
467500
+ projectFolder: pkgPath
467496
467501
  };
467497
467502
  const prepareOptions = {
467498
467503
  configObject,
@@ -467522,7 +467527,9 @@ var require_dist5 = __commonJS({
467522
467527
  async function rollupDtsFiles(options, exports2, format2) {
467523
467528
  let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0);
467524
467529
  let outDir = options.outDir || "dist";
467525
- let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, process.cwd());
467530
+ let pkgPath = packageJsonSearch(outDir, false, "dts", logger2);
467531
+ logger2.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
467532
+ let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
467526
467533
  let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format2, pkgType: pkg.type }).dts;
467527
467534
  let dtsInputFilePath = _path2.default.join(
467528
467535
  declarationDir,
@@ -474150,6 +474157,7 @@ function modernConfig({
474150
474157
  platform = "neutral",
474151
474158
  verbose = false,
474152
474159
  define: define2,
474160
+ env,
474153
474161
  options
474154
474162
  }) {
474155
474163
  return {
@@ -474175,8 +474183,14 @@ function modernConfig({
474175
474183
  platform,
474176
474184
  banner,
474177
474185
  define: define2,
474186
+ env,
474178
474187
  dts: false,
474179
- experimentalDts: true,
474188
+ experimentalDts: {
474189
+ entry,
474190
+ compilerOptions: {
474191
+ noEmit: false
474192
+ }
474193
+ },
474180
474194
  sourcemap: debug,
474181
474195
  clean: false,
474182
474196
  outExtension
@@ -474192,6 +474206,7 @@ function legacyConfig({
474192
474206
  platform = "neutral",
474193
474207
  verbose = false,
474194
474208
  define: define2,
474209
+ env,
474195
474210
  options
474196
474211
  }) {
474197
474212
  return {
@@ -474209,8 +474224,14 @@ function legacyConfig({
474209
474224
  platform,
474210
474225
  banner,
474211
474226
  define: define2,
474227
+ env,
474212
474228
  dts: false,
474213
- experimentalDts: true,
474229
+ experimentalDts: {
474230
+ entry,
474231
+ compilerOptions: {
474232
+ noEmit: false
474233
+ }
474234
+ },
474214
474235
  sourcemap: debug,
474215
474236
  clean: false,
474216
474237
  outExtension
@@ -474226,6 +474247,7 @@ function getConfig(sourceRoot, {
474226
474247
  options,
474227
474248
  additionalEntryPoints,
474228
474249
  define: define2,
474250
+ env,
474229
474251
  verbose
474230
474252
  }) {
474231
474253
  const entry = globSync(
@@ -474253,6 +474275,7 @@ function getConfig(sourceRoot, {
474253
474275
  external,
474254
474276
  verbose,
474255
474277
  define: define2,
474278
+ env,
474256
474279
  options
474257
474280
  }),
474258
474281
  legacyConfig({
@@ -474265,6 +474288,7 @@ function getConfig(sourceRoot, {
474265
474288
  external,
474266
474289
  verbose,
474267
474290
  define: define2,
474291
+ env,
474268
474292
  options
474269
474293
  })
474270
474294
  ]);
@@ -474296,6 +474320,20 @@ var outExtension = ({ options, format: format2, pkgType }) => {
474296
474320
  async function runExecutor(options, context) {
474297
474321
  try {
474298
474322
  console.log("\u{1F4E6} Running Storm build executor on the workspace");
474323
+ options.outputPath ??= "dist/{projectRoot}";
474324
+ options.tsConfig ??= "{projectRoot}/tsconfig.json";
474325
+ options.banner ??= process.env.STORM_FILE_BANNER;
474326
+ options.platform ??= "neutral";
474327
+ options.verbose ??= false;
474328
+ options.external ??= [];
474329
+ options.additionalEntryPoints ??= [];
474330
+ options.assets ??= [];
474331
+ options.clean ??= true;
474332
+ options.bundle ??= true;
474333
+ options.debug ??= false;
474334
+ options.watch ??= false;
474335
+ options.define ??= {};
474336
+ options.env ??= {};
474299
474337
  options.verbose && console.log(
474300
474338
  `\u2699\uFE0F Executor options:
474301
474339
  ${Object.keys(options).map(
@@ -474458,8 +474496,7 @@ ${externalDependencies.map((dep) => {
474458
474496
  endOfLine: "lf"
474459
474497
  })
474460
474498
  );
474461
- const banner = options.banner ? options.banner : process.env.STORM_TS_FILE_HEADING;
474462
- if (banner) {
474499
+ if (options.banner) {
474463
474500
  const files = globSync([
474464
474501
  (0, import_devkit2.joinPathFragments)(context.root, outputPath, "src/**/*.ts"),
474465
474502
  (0, import_devkit2.joinPathFragments)(context.root, outputPath, "src/**/*.tsx"),
@@ -474470,7 +474507,7 @@ ${externalDependencies.map((dep) => {
474470
474507
  files.map(
474471
474508
  (file) => (0, import_promises2.writeFile)(
474472
474509
  file,
474473
- `// ${banner}
474510
+ `// ${options.banner}
474474
474511
 
474475
474512
  ${(0, import_fs2.readFileSync)(file, "utf-8")}`,
474476
474513
  "utf-8"
@@ -474485,7 +474522,7 @@ ${(0, import_fs2.readFileSync)(file, "utf-8")}`,
474485
474522
  });
474486
474523
  const config = getConfig(sourceRoot, {
474487
474524
  ...options,
474488
- banner: banner ? { js: `// ${banner}`, css: `/* ${banner} */` } : void 0,
474525
+ banner: options.banner ? { js: `// ${options.banner}`, css: `/* ${options.banner} */` } : void 0,
474489
474526
  outputPath
474490
474527
  });
474491
474528
  if (typeof config === "function") {
@@ -18383,9 +18383,9 @@ var require_brace_expansion2 = __commonJS({
18383
18383
  }
18384
18384
  });
18385
18385
 
18386
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js
18386
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js
18387
18387
  var require_chunk_EPAEWGCP = __commonJS({
18388
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
18388
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
18389
18389
  "use strict";
18390
18390
  Object.defineProperty(exports, "__esModule", { value: true });
18391
18391
  var version = "8.0.0";
@@ -24319,9 +24319,9 @@ var require_resolve_from = __commonJS({
24319
24319
  }
24320
24320
  });
24321
24321
 
24322
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js
24322
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js
24323
24323
  var require_chunk_GQ77QZBO = __commonJS({
24324
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
24324
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
24325
24325
  "use strict";
24326
24326
  Object.defineProperty(exports, "__esModule", { value: true });
24327
24327
  function _interopRequireDefault(obj) {
@@ -24600,9 +24600,9 @@ var require_chunk_GQ77QZBO = __commonJS({
24600
24600
  }
24601
24601
  });
24602
24602
 
24603
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js
24603
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js
24604
24604
  var require_chunk_UIX4URMV = __commonJS({
24605
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
24605
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
24606
24606
  "use strict";
24607
24607
  Object.defineProperty(exports, "__esModule", { value: true });
24608
24608
  function _interopRequireWildcard(obj) {
@@ -25536,9 +25536,9 @@ var require_dist2 = __commonJS({
25536
25536
  }
25537
25537
  });
25538
25538
 
25539
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js
25539
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js
25540
25540
  var require_chunk_7G76EW2R = __commonJS({
25541
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
25541
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
25542
25542
  "use strict";
25543
25543
  Object.defineProperty(exports, "__esModule", { value: true });
25544
25544
  function _interopRequireDefault(obj) {
@@ -267221,9 +267221,9 @@ var require_chokidar = __commonJS({
267221
267221
  }
267222
267222
  });
267223
267223
 
267224
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js
267224
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js
267225
267225
  var require_dist5 = __commonJS({
267226
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=dtrntpl64pfmisrugymelylega_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js"(exports) {
267226
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=6bjdeve7zvv2ofroihfhs7xrou_@swc+core@1.3.96_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/dist/index.js"(exports) {
267227
267227
  "use strict";
267228
267228
  Object.defineProperty(exports, "__esModule", { value: true });
267229
267229
  function _interopRequireDefault(obj) {
@@ -268803,15 +268803,9 @@ var require_dist5 = __commonJS({
268803
268803
  }
268804
268804
  return result;
268805
268805
  };
268806
- async function runEsbuild(options, {
268807
- format,
268808
- css,
268809
- logger: logger3,
268810
- buildDependencies,
268811
- pluginContainer
268812
- }) {
268813
- let pkgPath = options.outDir ? options.outDir : process.cwd();
268814
- !options.silent && logger3.info(format, `\u26A1 Preparing to run ESBuild: ${pkgPath}`);
268806
+ var packageJsonSearch = (outDir, silent, format, logger3) => {
268807
+ let pkgPath = outDir ? outDir : process.cwd();
268808
+ !silent && logger3.info(format, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
268815
268809
  if (pkgPath) {
268816
268810
  const splits = pkgPath.split("/");
268817
268811
  if (splits.length > 0) {
@@ -268823,12 +268817,12 @@ var require_dist5 = __commonJS({
268823
268817
  ).join("/"),
268824
268818
  "package.json"
268825
268819
  );
268826
- !options.silent && logger3.info(
268820
+ !silent && logger3.info(
268827
268821
  format,
268828
268822
  `\u26A1 Searching for package.json file in ${packageJsonPath} (index: ${i})`
268829
268823
  );
268830
268824
  if (_fs2.default.existsSync(packageJsonPath)) {
268831
- !options.silent && logger3.info(
268825
+ !silent && logger3.info(
268832
268826
  format,
268833
268827
  `\u26A1 Found the package.json file in ${packageJsonPath} (index: ${i})`
268834
268828
  );
@@ -268838,6 +268832,16 @@ var require_dist5 = __commonJS({
268838
268832
  }
268839
268833
  }
268840
268834
  }
268835
+ return pkgPath;
268836
+ };
268837
+ async function runEsbuild(options, {
268838
+ format,
268839
+ css,
268840
+ logger: logger3,
268841
+ buildDependencies,
268842
+ pluginContainer
268843
+ }) {
268844
+ const pkgPath = packageJsonSearch(options.outDir, options.silent, format, logger3);
268841
268845
  logger3.info(format, `\u26A1 Running ESBuild: ${pkgPath}`);
268842
268846
  const pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
268843
268847
  const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
@@ -269631,8 +269635,9 @@ var require_dist5 = __commonJS({
269631
269635
  }
269632
269636
  var logger2 = _chunk7G76EW2Rjs.createLogger.call(void 0);
269633
269637
  function rollupDtsFile(inputFilePath, outputFilePath, tsconfigFilePath) {
269634
- let cwd = process.cwd();
269635
- let packageJsonFullPath = _path2.default.join(cwd, "package.json");
269638
+ let pkgPath = packageJsonSearch(outputFilePath, false, "dts", logger2);
269639
+ logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${pkgPath}`);
269640
+ let packageJsonFullPath = _path2.default.join(pkgPath, "package.json");
269636
269641
  let configObject = {
269637
269642
  mainEntryPointFilePath: inputFilePath,
269638
269643
  apiReport: {
@@ -269649,7 +269654,7 @@ var require_dist5 = __commonJS({
269649
269654
  compiler: {
269650
269655
  tsconfigFilePath
269651
269656
  },
269652
- projectFolder: cwd
269657
+ projectFolder: pkgPath
269653
269658
  };
269654
269659
  const prepareOptions = {
269655
269660
  configObject,
@@ -269679,7 +269684,9 @@ var require_dist5 = __commonJS({
269679
269684
  async function rollupDtsFiles(options, exports2, format) {
269680
269685
  let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0);
269681
269686
  let outDir = options.outDir || "dist";
269682
- let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, process.cwd());
269687
+ let pkgPath = packageJsonSearch(outDir, false, "dts", logger2);
269688
+ logger2.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
269689
+ let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
269683
269690
  let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format, pkgType: pkg.type }).dts;
269684
269691
  let dtsInputFilePath = _path2.default.join(
269685
269692
  declarationDir,
@@ -276252,6 +276259,7 @@ function modernConfig({
276252
276259
  platform = "neutral",
276253
276260
  verbose = false,
276254
276261
  define: define2,
276262
+ env,
276255
276263
  options
276256
276264
  }) {
276257
276265
  return {
@@ -276277,8 +276285,14 @@ function modernConfig({
276277
276285
  platform,
276278
276286
  banner,
276279
276287
  define: define2,
276288
+ env,
276280
276289
  dts: false,
276281
- experimentalDts: true,
276290
+ experimentalDts: {
276291
+ entry,
276292
+ compilerOptions: {
276293
+ noEmit: false
276294
+ }
276295
+ },
276282
276296
  sourcemap: debug,
276283
276297
  clean: false,
276284
276298
  outExtension
@@ -276294,6 +276308,7 @@ function legacyConfig({
276294
276308
  platform = "neutral",
276295
276309
  verbose = false,
276296
276310
  define: define2,
276311
+ env,
276297
276312
  options
276298
276313
  }) {
276299
276314
  return {
@@ -276311,8 +276326,14 @@ function legacyConfig({
276311
276326
  platform,
276312
276327
  banner,
276313
276328
  define: define2,
276329
+ env,
276314
276330
  dts: false,
276315
- experimentalDts: true,
276331
+ experimentalDts: {
276332
+ entry,
276333
+ compilerOptions: {
276334
+ noEmit: false
276335
+ }
276336
+ },
276316
276337
  sourcemap: debug,
276317
276338
  clean: false,
276318
276339
  outExtension
@@ -276328,6 +276349,7 @@ function getConfig(sourceRoot, {
276328
276349
  options,
276329
276350
  additionalEntryPoints,
276330
276351
  define: define2,
276352
+ env,
276331
276353
  verbose
276332
276354
  }) {
276333
276355
  const entry = globSync(
@@ -276355,6 +276377,7 @@ function getConfig(sourceRoot, {
276355
276377
  external,
276356
276378
  verbose,
276357
276379
  define: define2,
276380
+ env,
276358
276381
  options
276359
276382
  }),
276360
276383
  legacyConfig({
@@ -276367,6 +276390,7 @@ function getConfig(sourceRoot, {
276367
276390
  external,
276368
276391
  verbose,
276369
276392
  define: define2,
276393
+ env,
276370
276394
  options
276371
276395
  })
276372
276396
  ]);
@@ -22,4 +22,5 @@ export type TsupExecutorSchema = Omit<
22
22
  banner?: string;
23
23
  verbose: boolean;
24
24
  define?: Record<string, string>;
25
+ env?: Record<string, string>;
25
26
  };
@@ -19,7 +19,7 @@
19
19
  "x-completion-type": "file",
20
20
  "x-completion-glob": "tsconfig.*.json",
21
21
  "x-priority": "important",
22
- "default": "tsconfig.json"
22
+ "default": "{projectRoot}/tsconfig.json"
23
23
  },
24
24
  "additionalEntryPoints": {
25
25
  "type": "array",
@@ -86,6 +86,11 @@
86
86
  "description": "Define global constants that can be used in the source code. The value will be converted into a stringified JSON.",
87
87
  "additionalProperties": true
88
88
  },
89
+ "env": {
90
+ "type": "object",
91
+ "description": "Define environment variables that can be used in the source code. The value will be converted into a stringified JSON.",
92
+ "additionalProperties": true
93
+ },
89
94
  "options": {
90
95
  "type": "object",
91
96
  "description": "Additional options to pass to tsup. See https://paka.dev/npm/tsup@7.2.0/api#d35d54aca71eb26e.",