@storm-software/workspace-tools 1.11.1 → 1.12.1

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.11.1",
3
+ "version": "1.12.1",
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=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-EPAEWGCP.js
408393
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-EPAEWGCP.js
408394
408394
  var require_chunk_EPAEWGCP = __commonJS({
408395
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
408395
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/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=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-GQ77QZBO.js
410042
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-GQ77QZBO.js
410043
410043
  var require_chunk_GQ77QZBO = __commonJS({
410044
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
410044
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/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) {
@@ -410319,9 +410319,9 @@ var require_chunk_GQ77QZBO = __commonJS({
410319
410319
  }
410320
410320
  });
410321
410321
 
410322
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-UIX4URMV.js
410322
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-UIX4URMV.js
410323
410323
  var require_chunk_UIX4URMV = __commonJS({
410324
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
410324
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
410325
410325
  "use strict";
410326
410326
  Object.defineProperty(exports, "__esModule", { value: true });
410327
410327
  function _interopRequireWildcard(obj) {
@@ -411255,9 +411255,9 @@ var require_dist2 = __commonJS({
411255
411255
  }
411256
411256
  });
411257
411257
 
411258
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-7G76EW2R.js
411258
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-7G76EW2R.js
411259
411259
  var require_chunk_7G76EW2R = __commonJS({
411260
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
411260
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
411261
411261
  "use strict";
411262
411262
  Object.defineProperty(exports, "__esModule", { value: true });
411263
411263
  function _interopRequireDefault(obj) {
@@ -465063,9 +465063,9 @@ var require_chokidar = __commonJS({
465063
465063
  }
465064
465064
  });
465065
465065
 
465066
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/index.js
465066
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/index.js
465067
465067
  var require_dist5 = __commonJS({
465068
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/index.js"(exports) {
465068
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/index.js"(exports) {
465069
465069
  "use strict";
465070
465070
  Object.defineProperty(exports, "__esModule", { value: true });
465071
465071
  function _interopRequireDefault(obj) {
@@ -467294,13 +467294,13 @@ var require_dist5 = __commonJS({
467294
467294
  }
467295
467295
  return program.getRootFileNames().flatMap(extractExports);
467296
467296
  }
467297
- function emitDtsFiles(program, host) {
467297
+ function emitDtsFiles(program, host, options) {
467298
467298
  let fileMapping = /* @__PURE__ */ new Map();
467299
467299
  let writeFile2 = (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
467300
467300
  const sourceFile = _optionalChain([sourceFiles, "optionalAccess", (_14) => _14[0]]);
467301
467301
  let sourceFileName = _optionalChain([sourceFile, "optionalAccess", (_15) => _15.fileName]);
467302
467302
  if (sourceFileName && !fileName.endsWith(".map")) {
467303
- const cwd = program.getCurrentDirectory();
467303
+ const cwd = options.workspaceRoot ? options.workspaceRoot : program.getCurrentDirectory();
467304
467304
  fileMapping.set(
467305
467305
  _chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName, cwd),
467306
467306
  _chunkGQ77QZBOjs.toAbsolutePath.call(void 0, fileName, cwd)
@@ -467315,6 +467315,7 @@ var require_dist5 = __commonJS({
467315
467315
  data
467316
467316
  );
467317
467317
  };
467318
+ logger.info("tsc", "Emitting DTS files");
467318
467319
  let emitResult = program.emit(void 0, writeFile2, void 0, true);
467319
467320
  let diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
467320
467321
  let diagnosticMessages = [];
@@ -467367,14 +467368,15 @@ var require_dist5 = __commonJS({
467367
467368
  }
467368
467369
  logger.info("tsc", "Getting temporary declaration directory");
467369
467370
  let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
467370
- logger.info("tsc", declarationDir);
467371
+ logger.info("tsc", `Temporary declaration directory: ${declarationDir}`);
467372
+ logger.info("tsc", "Raw tsconfig.json: ");
467373
+ logger.info("tsc", rawTsconfig);
467371
467374
  logger.info("tsc", "Parsing tsconfig.json");
467372
467375
  let parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(
467373
467376
  {
467374
467377
  ...rawTsconfig.data,
467375
467378
  compilerOptions: {
467376
467379
  ...rawTsconfig.data.compilerOptions,
467377
- ...compilerOptions,
467378
467380
  // Enable declaration emit and disable javascript emit
467379
467381
  outDir: options.outDir,
467380
467382
  noEmit: false,
@@ -467383,25 +467385,49 @@ var require_dist5 = __commonJS({
467383
467385
  declarationDir,
467384
467386
  emitDeclarationOnly: true
467385
467387
  },
467388
+ files: [
467389
+ ...rawTsconfig.data.files ?? [],
467390
+ ...rawTsconfig.files ?? []
467391
+ ],
467386
467392
  include: [
467387
- ...rawTsconfig.data.include?.map?.((include) => _path.join(options.projectRoot, include)) ?? {}
467393
+ ...rawTsconfig.data.include?.map?.((include) => _path.join(
467394
+ options.projectRoot,
467395
+ include
467396
+ )) ?? []
467388
467397
  ],
467389
467398
  exclude: [
467390
- ...rawTsconfig.data.exclude?.map?.((exclude) => _path.join(options.projectRoot, exclude)) ?? {}
467399
+ ...rawTsconfig.data.exclude?.map?.((exclude) => _path.join(
467400
+ options.projectRoot,
467401
+ exclude
467402
+ )) ?? []
467391
467403
  ]
467392
467404
  },
467393
467405
  _typescript2.default.sys,
467394
467406
  options.workspaceRoot ? options.workspaceRoot : tsconfig ? _path.dirname.call(void 0, tsconfig) : options.projectRoot
467395
467407
  );
467396
467408
  logger.info("tsc", parsedTsconfig);
467397
- let host = _typescript2.default.createCompilerHost(parsedTsconfig.options);
467409
+ let tsOptions = parsedTsconfig.options;
467410
+ if (parsedTsconfig.raw.include) {
467411
+ tsOptions.include = [
467412
+ ...tsOptions.include ?? [],
467413
+ ...parsedTsconfig.raw.include
467414
+ ];
467415
+ }
467416
+ if (parsedTsconfig.raw.exclude) {
467417
+ tsOptions.exclude = [
467418
+ ...tsOptions.exclude ?? [],
467419
+ ...parsedTsconfig.raw.exclude
467420
+ ];
467421
+ }
467422
+ let host = _typescript2.default.createCompilerHost(tsOptions);
467398
467423
  let program = _typescript2.default.createProgram(
467399
467424
  parsedTsconfig.fileNames,
467400
- parsedTsconfig.options,
467425
+ tsOptions,
467401
467426
  host
467402
467427
  );
467403
- logger.info("tsc", "Emitting DTS files");
467404
- let fileMapping = emitDtsFiles(program, host);
467428
+ logger.info("tsc", "Emitting DTS files with the following options: ");
467429
+ logger.info("tsc", tsOptions);
467430
+ let fileMapping = emitDtsFiles(program, host, options);
467405
467431
  logger.info("tsc", fileMapping);
467406
467432
  return getExports(options, program, fileMapping);
467407
467433
  }
@@ -474501,6 +474527,7 @@ async function runExecutor(options, context) {
474501
474527
  options.external ??= [];
474502
474528
  options.additionalEntryPoints ??= [];
474503
474529
  options.assets ??= [];
474530
+ options.includeSrc ??= true;
474504
474531
  options.clean ??= true;
474505
474532
  options.bundle ??= true;
474506
474533
  options.debug ??= false;
@@ -474544,11 +474571,13 @@ ${Object.keys(options).map(
474544
474571
  glob: "LICENSE",
474545
474572
  output: "."
474546
474573
  });
474547
- assets.push({
474548
- input: sourceRoot,
474549
- glob: "**/{*.d.ts,*.ts,*.tsx}",
474550
- output: "src/"
474551
- });
474574
+ if (options.includeSrc) {
474575
+ assets.push({
474576
+ input: sourceRoot,
474577
+ glob: "**/{*.d.ts,*.ts,*.tsx}",
474578
+ output: "src/"
474579
+ });
474580
+ }
474552
474581
  const result = await (0, import_js.copyAssets)(
474553
474582
  { assets, watch: options.watch, outputPath },
474554
474583
  context
@@ -474636,7 +474665,10 @@ ${externalDependencies.map((dep) => {
474636
474665
  packageJson.module ??= "dist/legacy/index.js";
474637
474666
  options.platform && options.platform !== "node" && (packageJson.browser ??= "dist/modern/index.global.js");
474638
474667
  packageJson.sideEffects ??= false;
474639
- packageJson.files ??= ["dist", "src"];
474668
+ packageJson.files ??= ["dist"];
474669
+ if (options.includeSrc && !packageJson.files.includes("src")) {
474670
+ packageJson.files.push("src");
474671
+ }
474640
474672
  packageJson.publishConfig ??= {
474641
474673
  access: "public"
474642
474674
  };
@@ -474668,7 +474700,7 @@ ${externalDependencies.map((dep) => {
474668
474700
  endOfLine: "lf"
474669
474701
  })
474670
474702
  );
474671
- if (options.banner) {
474703
+ if (options.banner && options.includeSrc) {
474672
474704
  const files = globSync([
474673
474705
  (0, import_path3.join)(context.root, outputPath, "src/**/*.ts"),
474674
474706
  (0, import_path3.join)(context.root, outputPath, "src/**/*.tsx"),
@@ -240,9 +240,9 @@ var require_brace_expansion = __commonJS({
240
240
  }
241
241
  });
242
242
 
243
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-EPAEWGCP.js
243
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-EPAEWGCP.js
244
244
  var require_chunk_EPAEWGCP = __commonJS({
245
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
245
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
246
246
  "use strict";
247
247
  Object.defineProperty(exports, "__esModule", { value: true });
248
248
  var version = "8.0.0";
@@ -6549,9 +6549,9 @@ var require_resolve_from = __commonJS({
6549
6549
  }
6550
6550
  });
6551
6551
 
6552
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-GQ77QZBO.js
6552
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-GQ77QZBO.js
6553
6553
  var require_chunk_GQ77QZBO = __commonJS({
6554
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
6554
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
6555
6555
  "use strict";
6556
6556
  Object.defineProperty(exports, "__esModule", { value: true });
6557
6557
  function _interopRequireDefault(obj) {
@@ -6829,9 +6829,9 @@ var require_chunk_GQ77QZBO = __commonJS({
6829
6829
  }
6830
6830
  });
6831
6831
 
6832
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-UIX4URMV.js
6832
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-UIX4URMV.js
6833
6833
  var require_chunk_UIX4URMV = __commonJS({
6834
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
6834
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
6835
6835
  "use strict";
6836
6836
  Object.defineProperty(exports, "__esModule", { value: true });
6837
6837
  function _interopRequireWildcard(obj) {
@@ -7765,9 +7765,9 @@ var require_dist2 = __commonJS({
7765
7765
  }
7766
7766
  });
7767
7767
 
7768
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-7G76EW2R.js
7768
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-7G76EW2R.js
7769
7769
  var require_chunk_7G76EW2R = __commonJS({
7770
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
7770
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
7771
7771
  "use strict";
7772
7772
  Object.defineProperty(exports, "__esModule", { value: true });
7773
7773
  function _interopRequireDefault(obj) {
@@ -249450,9 +249450,9 @@ var require_chokidar = __commonJS({
249450
249450
  }
249451
249451
  });
249452
249452
 
249453
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/index.js
249453
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/index.js
249454
249454
  var require_dist5 = __commonJS({
249455
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/index.js"(exports) {
249455
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=7jigj2h7ragpry4m2qhgbx4ykm_@microsoft+api-extractor@7.38.3_@swc+core@1._ycurayfw6gnzdv2rl6moedvaca/node_modules/tsup/dist/index.js"(exports) {
249456
249456
  "use strict";
249457
249457
  Object.defineProperty(exports, "__esModule", { value: true });
249458
249458
  function _interopRequireDefault(obj) {
@@ -251681,13 +251681,13 @@ var require_dist5 = __commonJS({
251681
251681
  }
251682
251682
  return program.getRootFileNames().flatMap(extractExports);
251683
251683
  }
251684
- function emitDtsFiles(program, host) {
251684
+ function emitDtsFiles(program, host, options) {
251685
251685
  let fileMapping = /* @__PURE__ */ new Map();
251686
251686
  let writeFile = (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
251687
251687
  const sourceFile = _optionalChain([sourceFiles, "optionalAccess", (_14) => _14[0]]);
251688
251688
  let sourceFileName = _optionalChain([sourceFile, "optionalAccess", (_15) => _15.fileName]);
251689
251689
  if (sourceFileName && !fileName.endsWith(".map")) {
251690
- const cwd = program.getCurrentDirectory();
251690
+ const cwd = options.workspaceRoot ? options.workspaceRoot : program.getCurrentDirectory();
251691
251691
  fileMapping.set(
251692
251692
  _chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName, cwd),
251693
251693
  _chunkGQ77QZBOjs.toAbsolutePath.call(void 0, fileName, cwd)
@@ -251702,6 +251702,7 @@ var require_dist5 = __commonJS({
251702
251702
  data
251703
251703
  );
251704
251704
  };
251705
+ logger.info("tsc", "Emitting DTS files");
251705
251706
  let emitResult = program.emit(void 0, writeFile, void 0, true);
251706
251707
  let diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
251707
251708
  let diagnosticMessages = [];
@@ -251754,14 +251755,15 @@ var require_dist5 = __commonJS({
251754
251755
  }
251755
251756
  logger.info("tsc", "Getting temporary declaration directory");
251756
251757
  let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
251757
- logger.info("tsc", declarationDir);
251758
+ logger.info("tsc", `Temporary declaration directory: ${declarationDir}`);
251759
+ logger.info("tsc", "Raw tsconfig.json: ");
251760
+ logger.info("tsc", rawTsconfig);
251758
251761
  logger.info("tsc", "Parsing tsconfig.json");
251759
251762
  let parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(
251760
251763
  {
251761
251764
  ...rawTsconfig.data,
251762
251765
  compilerOptions: {
251763
251766
  ...rawTsconfig.data.compilerOptions,
251764
- ...compilerOptions,
251765
251767
  // Enable declaration emit and disable javascript emit
251766
251768
  outDir: options.outDir,
251767
251769
  noEmit: false,
@@ -251770,25 +251772,49 @@ var require_dist5 = __commonJS({
251770
251772
  declarationDir,
251771
251773
  emitDeclarationOnly: true
251772
251774
  },
251775
+ files: [
251776
+ ...rawTsconfig.data.files ?? [],
251777
+ ...rawTsconfig.files ?? []
251778
+ ],
251773
251779
  include: [
251774
- ...rawTsconfig.data.include?.map?.((include) => _path.join(options.projectRoot, include)) ?? {}
251780
+ ...rawTsconfig.data.include?.map?.((include) => _path.join(
251781
+ options.projectRoot,
251782
+ include
251783
+ )) ?? []
251775
251784
  ],
251776
251785
  exclude: [
251777
- ...rawTsconfig.data.exclude?.map?.((exclude) => _path.join(options.projectRoot, exclude)) ?? {}
251786
+ ...rawTsconfig.data.exclude?.map?.((exclude) => _path.join(
251787
+ options.projectRoot,
251788
+ exclude
251789
+ )) ?? []
251778
251790
  ]
251779
251791
  },
251780
251792
  _typescript2.default.sys,
251781
251793
  options.workspaceRoot ? options.workspaceRoot : tsconfig ? _path.dirname.call(void 0, tsconfig) : options.projectRoot
251782
251794
  );
251783
251795
  logger.info("tsc", parsedTsconfig);
251784
- let host = _typescript2.default.createCompilerHost(parsedTsconfig.options);
251796
+ let tsOptions = parsedTsconfig.options;
251797
+ if (parsedTsconfig.raw.include) {
251798
+ tsOptions.include = [
251799
+ ...tsOptions.include ?? [],
251800
+ ...parsedTsconfig.raw.include
251801
+ ];
251802
+ }
251803
+ if (parsedTsconfig.raw.exclude) {
251804
+ tsOptions.exclude = [
251805
+ ...tsOptions.exclude ?? [],
251806
+ ...parsedTsconfig.raw.exclude
251807
+ ];
251808
+ }
251809
+ let host = _typescript2.default.createCompilerHost(tsOptions);
251785
251810
  let program = _typescript2.default.createProgram(
251786
251811
  parsedTsconfig.fileNames,
251787
- parsedTsconfig.options,
251812
+ tsOptions,
251788
251813
  host
251789
251814
  );
251790
- logger.info("tsc", "Emitting DTS files");
251791
- let fileMapping = emitDtsFiles(program, host);
251815
+ logger.info("tsc", "Emitting DTS files with the following options: ");
251816
+ logger.info("tsc", tsOptions);
251817
+ let fileMapping = emitDtsFiles(program, host, options);
251792
251818
  logger.info("tsc", fileMapping);
251793
251819
  return getExports(options, program, fileMapping);
251794
251820
  }
@@ -27,4 +27,5 @@ export type TsupExecutorSchema = Omit<
27
27
  apiReport?: boolean;
28
28
  docModel?: boolean;
29
29
  tsdocMetadata?: boolean;
30
+ includeSrc?: boolean;
30
31
  };
@@ -8,7 +8,8 @@
8
8
  "properties": {
9
9
  "entry": {
10
10
  "type": "string",
11
- "description": "The path to the entry file, relative to project."
11
+ "description": "The path to the entry file, relative to project.",
12
+ "alias": "main"
12
13
  },
13
14
  "outputPath": {
14
15
  "type": "string",
@@ -64,6 +65,11 @@
64
65
  "alias": "deleteOutputPath",
65
66
  "default": true
66
67
  },
68
+ "includeSrc": {
69
+ "type": "boolean",
70
+ "description": "Should the source files be added to the distribution folder in an `src` directory.",
71
+ "default": true
72
+ },
67
73
  "debug": {
68
74
  "type": "boolean",
69
75
  "description": "Should output be unminified with source mappings.",