@storm-software/esbuild 0.26.11 → 0.26.13

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.
Files changed (37) hide show
  1. package/README.md +1 -1
  2. package/bin/esbuild.cjs +2 -8
  3. package/dist/build.cjs +8 -8
  4. package/dist/build.js +7 -7
  5. package/dist/{chunk-A7M6QDWG.cjs → chunk-3ENEOIKE.cjs} +4 -3
  6. package/dist/{chunk-2HAHXU54.js → chunk-4ATDIKBQ.js} +1 -1
  7. package/dist/{chunk-57Z7YYTW.cjs → chunk-5F7O7BRG.cjs} +33 -59
  8. package/dist/{chunk-VWP2SU7A.cjs → chunk-DEO4HWIA.cjs} +3 -3
  9. package/dist/{chunk-62KAIAWT.cjs → chunk-DITM26C7.cjs} +3 -3
  10. package/dist/{chunk-XZED6WF3.cjs → chunk-F665CCSS.cjs} +1 -1
  11. package/dist/{chunk-JOPUDEEC.cjs → chunk-H7G4L4A7.cjs} +38 -43
  12. package/dist/{chunk-GQQQCEJN.cjs → chunk-I2FH4C27.cjs} +2 -2
  13. package/dist/{chunk-F5ULKQSO.js → chunk-KFFQSANO.js} +5 -10
  14. package/dist/{chunk-V23YDDCC.js → chunk-LUJTYV5C.js} +3 -2
  15. package/dist/{chunk-7NZ2E6EC.js → chunk-NCMOSDGN.js} +1 -1
  16. package/dist/{chunk-DNJAV4NQ.js → chunk-TUAAYWUJ.js} +1 -1
  17. package/dist/{chunk-D5ZZNDUG.js → chunk-VZIK4SOK.js} +3 -29
  18. package/dist/{chunk-IW7GZHF7.js → chunk-YWKYHSIN.js} +1 -1
  19. package/dist/clean.cjs +3 -3
  20. package/dist/clean.js +2 -2
  21. package/dist/config.cjs +5 -7
  22. package/dist/config.d.cts +2 -3
  23. package/dist/config.d.ts +2 -3
  24. package/dist/config.js +6 -8
  25. package/dist/index.cjs +8 -10
  26. package/dist/index.d.cts +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +8 -10
  29. package/dist/plugins/deps-check.cjs +3 -3
  30. package/dist/plugins/deps-check.js +2 -2
  31. package/dist/plugins/on-error.cjs +3 -3
  32. package/dist/plugins/on-error.js +2 -2
  33. package/dist/plugins/tsc.cjs +3 -3
  34. package/dist/plugins/tsc.js +2 -2
  35. package/dist/types.d.cts +3 -10
  36. package/dist/types.d.ts +3 -10
  37. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunk62KAIAWTcjs = require('./chunk-62KAIAWT.cjs');
3
+ var _chunkDITM26C7cjs = require('./chunk-DITM26C7.cjs');
4
4
 
5
5
 
6
6
 
@@ -13,11 +13,11 @@ var _chunk62KAIAWTcjs = require('./chunk-62KAIAWT.cjs');
13
13
 
14
14
 
15
15
 
16
+ var _chunk5F7O7BRGcjs = require('./chunk-5F7O7BRG.cjs');
16
17
 
17
- var _chunk57Z7YYTWcjs = require('./chunk-57Z7YYTW.cjs');
18
18
 
19
+ var _chunkDEO4HWIAcjs = require('./chunk-DEO4HWIA.cjs');
19
20
 
20
- var _chunkVWP2SU7Acjs = require('./chunk-VWP2SU7A.cjs');
21
21
 
22
22
 
23
23
 
@@ -26,8 +26,7 @@ var _chunkVWP2SU7Acjs = require('./chunk-VWP2SU7A.cjs');
26
26
 
27
27
 
28
28
 
29
-
30
- var _chunkXZED6WF3cjs = require('./chunk-XZED6WF3.cjs');
29
+ var _chunkF665CCSScjs = require('./chunk-F665CCSS.cjs');
31
30
 
32
31
 
33
32
  var _chunkXITTOHOGcjs = require('./chunk-XITTOHOG.cjs');
@@ -278,9 +277,9 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
278
277
  if (!workspaceRoot) {
279
278
  throw new Error("Cannot find Nx workspace root");
280
279
  }
281
- const config = await _chunk57Z7YYTWcjs.getConfig.call(void 0, workspaceRoot.dir);
282
- _chunkXZED6WF3cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
283
- const stopwatch = _chunkXZED6WF3cjs.getStopwatch.call(void 0, "Build options resolution");
280
+ const config = await _chunk5F7O7BRGcjs.getConfig.call(void 0, workspaceRoot.dir);
281
+ _chunkF665CCSScjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
282
+ const stopwatch = _chunkF665CCSScjs.getStopwatch.call(void 0, "Build options resolution");
284
283
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
285
284
  exitOnError: true
286
285
  });
@@ -295,17 +294,14 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
295
294
  if (!_optionalChain([projectConfigurations, 'optionalAccess', _14 => _14.projects, 'optionalAccess', _15 => _15[projectName]])) {
296
295
  throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
297
296
  }
298
- const options = _defu2.default.call(void 0, userOptions, _chunk57Z7YYTWcjs.DEFAULT_BUILD_OPTIONS);
297
+ const options = _defu2.default.call(void 0, userOptions, _chunk5F7O7BRGcjs.DEFAULT_BUILD_OPTIONS);
299
298
  options.name ??= `${projectName}-${options.format}`;
300
- options.target ??= _chunk57Z7YYTWcjs.DEFAULT_TARGET;
299
+ options.target ??= _chunk5F7O7BRGcjs.DEFAULT_TARGET;
301
300
  const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
302
301
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
303
302
  throw new Error("Cannot find package.json configuration");
304
303
  }
305
- const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
306
- const packageJson = JSON.parse(packageJsonFile);
307
- const outExtension = _chunk57Z7YYTWcjs.getOutputExtensionMap.call(void 0, options, packageJson.type);
308
- const env = _chunk57Z7YYTWcjs.getEnv.call(void 0, "esbuild", options);
304
+ const env = _chunk5F7O7BRGcjs.getEnv.call(void 0, "esbuild", options);
309
305
  const result = {
310
306
  ...options,
311
307
  config,
@@ -325,7 +321,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
325
321
  ...userOptions,
326
322
  tsconfig: _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
327
323
  format: options.format || "cjs",
328
- entryPoints: await _chunk57Z7YYTWcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
324
+ entryPoints: await _chunk5F7O7BRGcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
329
325
  "./src/index.ts"
330
326
  ], userOptions.emitOnAll),
331
327
  outdir: userOptions.outputPath || _chunkXITTOHOGcjs.joinPaths.call(void 0, "dist", projectRoot),
@@ -336,7 +332,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
336
332
  projectGraph,
337
333
  sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, "src"),
338
334
  minify: userOptions.minify || !userOptions.debug,
339
- verbose: userOptions.verbose || _chunkXZED6WF3cjs.isVerbose.call(void 0, ) || userOptions.debug === true,
335
+ verbose: userOptions.verbose || _chunkF665CCSScjs.isVerbose.call(void 0, ) || userOptions.debug === true,
340
336
  includeSrc: userOptions.includeSrc === true,
341
337
  metafile: userOptions.metafile !== false,
342
338
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -347,11 +343,10 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
347
343
  bundle: userOptions.bundle !== false,
348
344
  keepNames: true,
349
345
  watch: userOptions.watch === true,
350
- outExtension,
351
346
  footer: userOptions.footer,
352
347
  banner: {
353
- js: options.banner || _chunk57Z7YYTWcjs.DEFAULT_COMPILED_BANNER,
354
- css: options.banner || _chunk57Z7YYTWcjs.DEFAULT_COMPILED_BANNER
348
+ js: options.banner || _chunk5F7O7BRGcjs.DEFAULT_COMPILED_BANNER,
349
+ css: options.banner || _chunk5F7O7BRGcjs.DEFAULT_COMPILED_BANNER
355
350
  },
356
351
  splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
357
352
  treeShaking: options.format === "esm",
@@ -377,7 +372,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
377
372
  ..._nullishCoalesce(options.inject, () => ( []))
378
373
  ].filter(Boolean)
379
374
  };
380
- result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunk57Z7YYTWcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
375
+ result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunk5F7O7BRGcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
381
376
  delete result.entry;
382
377
  delete result.outputPath;
383
378
  stopwatch();
@@ -385,8 +380,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
385
380
  }, "resolveOptions");
386
381
  async function generatePackageJson(context2) {
387
382
  if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
388
- _chunkXZED6WF3cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
389
- const stopwatch = _chunkXZED6WF3cjs.getStopwatch.call(void 0, "Write package.json file");
383
+ _chunkF665CCSScjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
384
+ const stopwatch = _chunkF665CCSScjs.getStopwatch.call(void 0, "Write package.json file");
390
385
  const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
391
386
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
392
387
  throw new Error("Cannot find package.json configuration");
@@ -396,11 +391,11 @@ async function generatePackageJson(context2) {
396
391
  if (!packageJson) {
397
392
  throw new Error("Cannot find package.json configuration file");
398
393
  }
399
- packageJson = await _chunk57Z7YYTWcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
400
- packageJson = await _chunk57Z7YYTWcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
394
+ packageJson = await _chunk5F7O7BRGcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
395
+ packageJson = await _chunk5F7O7BRGcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
401
396
  packageJson.exports ??= {};
402
397
  packageJson.exports["./package.json"] ??= "./package.json";
403
- packageJson.exports["."] ??= _chunk57Z7YYTWcjs.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
398
+ packageJson.exports["."] ??= _chunk5F7O7BRGcjs.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
404
399
  let entryPoints = [
405
400
  {
406
401
  in: "./src/index.ts",
@@ -418,7 +413,7 @@ async function generatePackageJson(context2) {
418
413
  const split = entryPoint.out.split(".");
419
414
  split.pop();
420
415
  const entry = split.join(".").replaceAll("\\", "/");
421
- packageJson.exports[`./${entry}`] ??= _chunk57Z7YYTWcjs.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
416
+ packageJson.exports[`./${entry}`] ??= _chunk5F7O7BRGcjs.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
422
417
  }
423
418
  }
424
419
  packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
@@ -456,8 +451,8 @@ async function generateContext(getOptions) {
456
451
  }
457
452
  _chunkBGYQAVKQcjs.__name.call(void 0, generateContext, "generateContext");
458
453
  async function executeEsBuild(context2) {
459
- _chunkXZED6WF3cjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
460
- const stopwatch = _chunkXZED6WF3cjs.getStopwatch.call(void 0, `${context2.options.name} build`);
454
+ _chunkF665CCSScjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
455
+ const stopwatch = _chunkF665CCSScjs.getStopwatch.call(void 0, `${context2.options.name} build`);
461
456
  if (process.env.STORM_WATCH) {
462
457
  const ctx = await esbuild.context(context2.options);
463
458
  watch(ctx, context2.options);
@@ -495,9 +490,9 @@ async function executeEsBuild(context2) {
495
490
  _chunkBGYQAVKQcjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
496
491
  async function copyBuildAssets(context2) {
497
492
  if (_optionalChain([context2, 'access', _16 => _16.result, 'optionalAccess', _17 => _17.errors, 'access', _18 => _18.length]) === 0) {
498
- _chunkXZED6WF3cjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
499
- const stopwatch = _chunkXZED6WF3cjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
500
- await _chunk57Z7YYTWcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
493
+ _chunkF665CCSScjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
494
+ const stopwatch = _chunkF665CCSScjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
495
+ await _chunk5F7O7BRGcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
501
496
  stopwatch();
502
497
  }
503
498
  return context2;
@@ -506,9 +501,9 @@ _chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
506
501
  async function reportResults(context2) {
507
502
  if (_optionalChain([context2, 'access', _19 => _19.result, 'optionalAccess', _20 => _20.errors, 'access', _21 => _21.length]) === 0) {
508
503
  if (context2.result.warnings.length > 0) {
509
- _chunkXZED6WF3cjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
504
+ _chunkF665CCSScjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
510
505
  }
511
- _chunkXZED6WF3cjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
506
+ _chunkF665CCSScjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
512
507
  }
513
508
  }
514
509
  _chunkBGYQAVKQcjs.__name.call(void 0, reportResults, "reportResults");
@@ -534,7 +529,7 @@ async function dependencyCheck(options) {
534
529
  write: false,
535
530
  outdir: "out",
536
531
  plugins: [
537
- _chunkVWP2SU7Acjs.depsCheckPlugin.call(void 0, options.bundle)
532
+ _chunkDEO4HWIAcjs.depsCheckPlugin.call(void 0, options.bundle)
538
533
  ]
539
534
  });
540
535
  await buildPromise.catch(() => {
@@ -544,17 +539,17 @@ async function dependencyCheck(options) {
544
539
  _chunkBGYQAVKQcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
545
540
  async function cleanOutputPath(context2) {
546
541
  if (context2.options.clean !== false && context2.options.outdir) {
547
- _chunkXZED6WF3cjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
548
- const stopwatch = _chunkXZED6WF3cjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
549
- await _chunk62KAIAWTcjs.cleanDirectories.call(void 0, context2.options.name, context2.options.outdir, context2.options.config);
542
+ _chunkF665CCSScjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
543
+ const stopwatch = _chunkF665CCSScjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
544
+ await _chunkDITM26C7cjs.cleanDirectories.call(void 0, context2.options.name, context2.options.outdir, context2.options.config);
550
545
  stopwatch();
551
546
  }
552
547
  return context2;
553
548
  }
554
549
  _chunkBGYQAVKQcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
555
550
  async function build2(options) {
556
- _chunkXZED6WF3cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
557
- const stopwatch = _chunkXZED6WF3cjs.getStopwatch.call(void 0, "ESBuild pipeline");
551
+ _chunkF665CCSScjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
552
+ const stopwatch = _chunkF665CCSScjs.getStopwatch.call(void 0, "ESBuild pipeline");
558
553
  try {
559
554
  const opts = Array.isArray(options) ? options : [
560
555
  options
@@ -564,9 +559,9 @@ async function build2(options) {
564
559
  }
565
560
  void transduce.async(opts, dependencyCheck);
566
561
  await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
567
- _chunkXZED6WF3cjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
562
+ _chunkF665CCSScjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
568
563
  } catch (error) {
569
- _chunkXZED6WF3cjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
564
+ _chunkF665CCSScjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
570
565
  throw error;
571
566
  } finally {
572
567
  stopwatch();
@@ -594,9 +589,9 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
594
589
  return context2.rebuild();
595
590
  });
596
591
  if (rebuildResult instanceof Error) {
597
- _chunkXZED6WF3cjs.writeError.call(void 0, rebuildResult.message);
592
+ _chunkF665CCSScjs.writeError.call(void 0, rebuildResult.message);
598
593
  }
599
- _chunkXZED6WF3cjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
594
+ _chunkF665CCSScjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
600
595
  }, 10);
601
596
  changeWatcher.on("change", fastRebuild);
602
597
  return void 0;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkXZED6WF3cjs = require('./chunk-XZED6WF3.cjs');
3
+ var _chunkF665CCSScjs = require('./chunk-F665CCSS.cjs');
4
4
 
5
5
 
6
6
  var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
@@ -11,7 +11,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
11
11
  setup(build) {
12
12
  build.onEnd((result) => {
13
13
  if (result.errors.length > 0 && process.env.WATCH !== "true") {
14
- _chunkXZED6WF3cjs.writeError.call(void 0, `The following errors occurred during the build:
14
+ _chunkF665CCSScjs.writeError.call(void 0, `The following errors occurred during the build:
15
15
  ${result.errors.map((error) => error.text).join("\n")}
16
16
 
17
17
  `, resolvedOptions.config);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanDirectories
3
- } from "./chunk-DNJAV4NQ.js";
3
+ } from "./chunk-TUAAYWUJ.js";
4
4
  import {
5
5
  DEFAULT_BUILD_OPTIONS,
6
6
  DEFAULT_COMPILED_BANNER,
@@ -12,12 +12,11 @@ import {
12
12
  getConfig,
13
13
  getDefaultBuildPlugins,
14
14
  getEntryPoints,
15
- getEnv,
16
- getOutputExtensionMap
17
- } from "./chunk-D5ZZNDUG.js";
15
+ getEnv
16
+ } from "./chunk-VZIK4SOK.js";
18
17
  import {
19
18
  depsCheckPlugin
20
- } from "./chunk-7NZ2E6EC.js";
19
+ } from "./chunk-NCMOSDGN.js";
21
20
  import {
22
21
  getStopwatch,
23
22
  isVerbose,
@@ -27,7 +26,7 @@ import {
27
26
  writeSuccess,
28
27
  writeTrace,
29
28
  writeWarning
30
- } from "./chunk-2HAHXU54.js";
29
+ } from "./chunk-4ATDIKBQ.js";
31
30
  import {
32
31
  joinPaths
33
32
  } from "./chunk-YMTDVMD6.js";
@@ -302,9 +301,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
302
301
  if (!existsSync(packageJsonPath)) {
303
302
  throw new Error("Cannot find package.json configuration");
304
303
  }
305
- const packageJsonFile = await hf.readFile(packageJsonPath, "utf8");
306
- const packageJson = JSON.parse(packageJsonFile);
307
- const outExtension = getOutputExtensionMap(options, packageJson.type);
308
304
  const env = getEnv("esbuild", options);
309
305
  const result = {
310
306
  ...options,
@@ -347,7 +343,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
347
343
  bundle: userOptions.bundle !== false,
348
344
  keepNames: true,
349
345
  watch: userOptions.watch === true,
350
- outExtension,
351
346
  footer: userOptions.footer,
352
347
  banner: {
353
348
  js: options.banner || DEFAULT_COMPILED_BANNER,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeError
3
- } from "./chunk-2HAHXU54.js";
3
+ } from "./chunk-4ATDIKBQ.js";
4
4
  import {
5
5
  joinPaths
6
6
  } from "./chunk-YMTDVMD6.js";
@@ -65,6 +65,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
65
65
  overrideTsconfig: {
66
66
  compilerOptions: {
67
67
  paths: {}
68
+ // bug with api extract + paths
68
69
  }
69
70
  }
70
71
  },
@@ -110,7 +111,7 @@ var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
110
111
  } else if (existsSync(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
111
112
  dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
112
113
  }
113
- const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
114
+ const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
114
115
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
115
116
  bundleTypeDefinitions(dtsPath, bundlePath, resolvedOptions.external ?? [], resolvedOptions);
116
117
  const dtsContents = await fs.readFile(`${bundlePath}.d.ts`, "utf8");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  writeError,
3
3
  writeWarning
4
- } from "./chunk-2HAHXU54.js";
4
+ } from "./chunk-4ATDIKBQ.js";
5
5
  import {
6
6
  __name,
7
7
  __require
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getStopwatch,
3
3
  writeDebug
4
- } from "./chunk-2HAHXU54.js";
4
+ } from "./chunk-4ATDIKBQ.js";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-3GQAWCBQ.js";
@@ -6,13 +6,13 @@ import {
6
6
  } from "./chunk-LYDEMC26.js";
7
7
  import {
8
8
  onErrorPlugin
9
- } from "./chunk-IW7GZHF7.js";
9
+ } from "./chunk-YWKYHSIN.js";
10
10
  import {
11
11
  resolvePathsPlugin
12
12
  } from "./chunk-Q3LOGZKI.js";
13
13
  import {
14
14
  tscPlugin
15
- } from "./chunk-V23YDDCC.js";
15
+ } from "./chunk-LUJTYV5C.js";
16
16
  import {
17
17
  COLOR_KEYS,
18
18
  LogLevel,
@@ -28,7 +28,7 @@ import {
28
28
  writeDebug,
29
29
  writeTrace,
30
30
  writeWarning
31
- } from "./chunk-2HAHXU54.js";
31
+ } from "./chunk-4ATDIKBQ.js";
32
32
  import {
33
33
  correctPaths,
34
34
  joinPaths
@@ -836,28 +836,6 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
836
836
  };
837
837
  }, "getEnv");
838
838
 
839
- // ../build-tools/src/utilities/get-out-extension.ts
840
- function getOutExtension(format, pkgType) {
841
- let jsExtension = ".js";
842
- let dtsExtension = ".d.ts";
843
- if (pkgType === "module" && format === "cjs") {
844
- jsExtension = ".cjs";
845
- dtsExtension = ".d.cts";
846
- }
847
- if (pkgType !== "module" && format === "esm") {
848
- jsExtension = ".mjs";
849
- dtsExtension = ".d.mts";
850
- }
851
- if (format === "iife") {
852
- jsExtension = ".global.js";
853
- }
854
- return {
855
- js: jsExtension,
856
- dts: dtsExtension
857
- };
858
- }
859
- __name(getOutExtension, "getOutExtension");
860
-
861
839
  // ../build-tools/src/utilities/read-nx-config.ts
862
840
  import { existsSync as existsSync2 } from "node:fs";
863
841
  import { readFile as readFile3 } from "node:fs/promises";
@@ -866,9 +844,6 @@ import { readFile as readFile3 } from "node:fs/promises";
866
844
  import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
867
845
 
868
846
  // src/config.ts
869
- var getOutputExtensionMap = /* @__PURE__ */ __name((options, pkgType) => {
870
- return options.outExtension ? options.outExtension(options.format, pkgType) : getOutExtension(options.format, pkgType);
871
- }, "getOutputExtensionMap");
872
847
  var getDefaultBuildPlugins = /* @__PURE__ */ __name((options, resolvedOptions) => [
873
848
  nodeProtocolPlugin(options, resolvedOptions),
874
849
  resolvePathsPlugin(options, resolvedOptions),
@@ -928,7 +903,6 @@ export {
928
903
  getConfig,
929
904
  getEntryPoints,
930
905
  getEnv,
931
- getOutputExtensionMap,
932
906
  getDefaultBuildPlugins,
933
907
  DEFAULT_BUILD_OPTIONS
934
908
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeError
3
- } from "./chunk-2HAHXU54.js";
3
+ } from "./chunk-4ATDIKBQ.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-3GQAWCBQ.js";
package/dist/clean.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk62KAIAWTcjs = require('./chunk-62KAIAWT.cjs');
5
- require('./chunk-XZED6WF3.cjs');
4
+ var _chunkDITM26C7cjs = require('./chunk-DITM26C7.cjs');
5
+ require('./chunk-F665CCSS.cjs');
6
6
  require('./chunk-XITTOHOG.cjs');
7
7
  require('./chunk-BGYQAVKQ.cjs');
8
8
 
9
9
 
10
10
 
11
- exports.clean = _chunk62KAIAWTcjs.clean; exports.cleanDirectories = _chunk62KAIAWTcjs.cleanDirectories;
11
+ exports.clean = _chunkDITM26C7cjs.clean; exports.cleanDirectories = _chunkDITM26C7cjs.cleanDirectories;
package/dist/clean.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clean,
3
3
  cleanDirectories
4
- } from "./chunk-DNJAV4NQ.js";
5
- import "./chunk-2HAHXU54.js";
4
+ } from "./chunk-TUAAYWUJ.js";
5
+ import "./chunk-4ATDIKBQ.js";
6
6
  import "./chunk-YMTDVMD6.js";
7
7
  import "./chunk-3GQAWCBQ.js";
8
8
  export {
package/dist/config.cjs CHANGED
@@ -1,14 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
-
5
- var _chunk57Z7YYTWcjs = require('./chunk-57Z7YYTW.cjs');
4
+ var _chunk5F7O7BRGcjs = require('./chunk-5F7O7BRG.cjs');
6
5
  require('./chunk-S6M44SSZ.cjs');
7
6
  require('./chunk-WRBUO7H6.cjs');
8
- require('./chunk-GQQQCEJN.cjs');
7
+ require('./chunk-I2FH4C27.cjs');
9
8
  require('./chunk-SSEYS7LI.cjs');
10
- require('./chunk-A7M6QDWG.cjs');
11
- require('./chunk-XZED6WF3.cjs');
9
+ require('./chunk-3ENEOIKE.cjs');
10
+ require('./chunk-F665CCSS.cjs');
12
11
  require('./chunk-XITTOHOG.cjs');
13
12
  require('./chunk-CGFDQ5AJ.cjs');
14
13
  require('./chunk-EZGTDCYM.cjs');
@@ -16,5 +15,4 @@ require('./chunk-BGYQAVKQ.cjs');
16
15
 
17
16
 
18
17
 
19
-
20
- exports.DEFAULT_BUILD_OPTIONS = _chunk57Z7YYTWcjs.DEFAULT_BUILD_OPTIONS; exports.getDefaultBuildPlugins = _chunk57Z7YYTWcjs.getDefaultBuildPlugins; exports.getOutputExtensionMap = _chunk57Z7YYTWcjs.getOutputExtensionMap;
18
+ exports.DEFAULT_BUILD_OPTIONS = _chunk5F7O7BRGcjs.DEFAULT_BUILD_OPTIONS; exports.getDefaultBuildPlugins = _chunk5F7O7BRGcjs.getDefaultBuildPlugins;
package/dist/config.d.cts CHANGED
@@ -1,12 +1,11 @@
1
1
  import * as esbuild from 'esbuild';
2
- import { ESBuildOptions, OutExtensionObject, ESBuildResolvedOptions } from './types.cjs';
2
+ import { ESBuildOptions, ESBuildResolvedOptions } from './types.cjs';
3
3
  import '@nx/devkit';
4
4
  import '@storm-software/build-tools';
5
5
  import 'rollup';
6
6
  import 'source-map';
7
7
 
8
- declare const getOutputExtensionMap: (options: ESBuildOptions, pkgType: string | undefined) => OutExtensionObject;
9
8
  declare const getDefaultBuildPlugins: (options: ESBuildOptions, resolvedOptions: ESBuildResolvedOptions) => esbuild.Plugin[];
10
9
  declare const DEFAULT_BUILD_OPTIONS: Required<Pick<ESBuildOptions, "format" | "platform" | "target" | "external" | "tsconfig" | "mode" | "keepNames" | "metafile" | "injectShims" | "color" | "watch" | "bundle" | "clean" | "debug" | "loader" | "banner" | "logLevel">>;
11
10
 
12
- export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins, getOutputExtensionMap };
11
+ export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins };
package/dist/config.d.ts CHANGED
@@ -1,12 +1,11 @@
1
1
  import * as esbuild from 'esbuild';
2
- import { ESBuildOptions, OutExtensionObject, ESBuildResolvedOptions } from './types.js';
2
+ import { ESBuildOptions, ESBuildResolvedOptions } from './types.js';
3
3
  import '@nx/devkit';
4
4
  import '@storm-software/build-tools';
5
5
  import 'rollup';
6
6
  import 'source-map';
7
7
 
8
- declare const getOutputExtensionMap: (options: ESBuildOptions, pkgType: string | undefined) => OutExtensionObject;
9
8
  declare const getDefaultBuildPlugins: (options: ESBuildOptions, resolvedOptions: ESBuildResolvedOptions) => esbuild.Plugin[];
10
9
  declare const DEFAULT_BUILD_OPTIONS: Required<Pick<ESBuildOptions, "format" | "platform" | "target" | "external" | "tsconfig" | "mode" | "keepNames" | "metafile" | "injectShims" | "color" | "watch" | "bundle" | "clean" | "debug" | "loader" | "banner" | "logLevel">>;
11
10
 
12
- export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins, getOutputExtensionMap };
11
+ export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins };
package/dist/config.js CHANGED
@@ -1,20 +1,18 @@
1
1
  import {
2
2
  DEFAULT_BUILD_OPTIONS,
3
- getDefaultBuildPlugins,
4
- getOutputExtensionMap
5
- } from "./chunk-D5ZZNDUG.js";
3
+ getDefaultBuildPlugins
4
+ } from "./chunk-VZIK4SOK.js";
6
5
  import "./chunk-T5272PC2.js";
7
6
  import "./chunk-LYDEMC26.js";
8
- import "./chunk-IW7GZHF7.js";
7
+ import "./chunk-YWKYHSIN.js";
9
8
  import "./chunk-Q3LOGZKI.js";
10
- import "./chunk-V23YDDCC.js";
11
- import "./chunk-2HAHXU54.js";
9
+ import "./chunk-LUJTYV5C.js";
10
+ import "./chunk-4ATDIKBQ.js";
12
11
  import "./chunk-YMTDVMD6.js";
13
12
  import "./chunk-YNQ45EAM.js";
14
13
  import "./chunk-GWG4HOQ6.js";
15
14
  import "./chunk-3GQAWCBQ.js";
16
15
  export {
17
16
  DEFAULT_BUILD_OPTIONS,
18
- getDefaultBuildPlugins,
19
- getOutputExtensionMap
17
+ getDefaultBuildPlugins
20
18
  };
package/dist/index.cjs CHANGED
@@ -7,24 +7,23 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkJOPUDEECcjs = require('./chunk-JOPUDEEC.cjs');
10
+ var _chunkH7G4L4A7cjs = require('./chunk-H7G4L4A7.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunk62KAIAWTcjs = require('./chunk-62KAIAWT.cjs');
14
+ var _chunkDITM26C7cjs = require('./chunk-DITM26C7.cjs');
15
15
 
16
16
 
17
17
 
18
-
19
- var _chunk57Z7YYTWcjs = require('./chunk-57Z7YYTW.cjs');
18
+ var _chunk5F7O7BRGcjs = require('./chunk-5F7O7BRG.cjs');
20
19
  require('./chunk-S6M44SSZ.cjs');
21
20
  require('./chunk-WRBUO7H6.cjs');
22
- require('./chunk-GQQQCEJN.cjs');
21
+ require('./chunk-I2FH4C27.cjs');
23
22
  require('./chunk-SSEYS7LI.cjs');
24
- require('./chunk-A7M6QDWG.cjs');
23
+ require('./chunk-3ENEOIKE.cjs');
25
24
  require('./chunk-SFZRYJZ2.cjs');
26
- require('./chunk-VWP2SU7A.cjs');
27
- require('./chunk-XZED6WF3.cjs');
25
+ require('./chunk-DEO4HWIA.cjs');
26
+ require('./chunk-F665CCSS.cjs');
28
27
  require('./chunk-XITTOHOG.cjs');
29
28
  require('./chunk-CGFDQ5AJ.cjs');
30
29
  require('./chunk-EZGTDCYM.cjs');
@@ -42,5 +41,4 @@ require('./chunk-BGYQAVKQ.cjs');
42
41
 
43
42
 
44
43
 
45
-
46
- exports.DEFAULT_BUILD_OPTIONS = _chunk57Z7YYTWcjs.DEFAULT_BUILD_OPTIONS; exports.Filter = _chunkJOPUDEECcjs.Filter; exports.Mapper = _chunkJOPUDEECcjs.Mapper; exports.build = _chunkJOPUDEECcjs.build; exports.clean = _chunk62KAIAWTcjs.clean; exports.cleanDirectories = _chunk62KAIAWTcjs.cleanDirectories; exports.cleanOutputPath = _chunkJOPUDEECcjs.cleanOutputPath; exports.getDefaultBuildPlugins = _chunk57Z7YYTWcjs.getDefaultBuildPlugins; exports.getOutputExtensionMap = _chunk57Z7YYTWcjs.getOutputExtensionMap; exports.handle = _chunkJOPUDEECcjs.handle; exports.pipe = _chunkJOPUDEECcjs.pipe; exports.skip = _chunkJOPUDEECcjs.skip; exports.transduce = _chunkJOPUDEECcjs.transduce;
44
+ exports.DEFAULT_BUILD_OPTIONS = _chunk5F7O7BRGcjs.DEFAULT_BUILD_OPTIONS; exports.Filter = _chunkH7G4L4A7cjs.Filter; exports.Mapper = _chunkH7G4L4A7cjs.Mapper; exports.build = _chunkH7G4L4A7cjs.build; exports.clean = _chunkDITM26C7cjs.clean; exports.cleanDirectories = _chunkDITM26C7cjs.cleanDirectories; exports.cleanOutputPath = _chunkH7G4L4A7cjs.cleanOutputPath; exports.getDefaultBuildPlugins = _chunk5F7O7BRGcjs.getDefaultBuildPlugins; exports.handle = _chunkH7G4L4A7cjs.handle; exports.pipe = _chunkH7G4L4A7cjs.pipe; exports.skip = _chunkH7G4L4A7cjs.skip; exports.transduce = _chunkH7G4L4A7cjs.transduce;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { build, cleanOutputPath } from './build.cjs';
2
2
  export { clean, cleanDirectories } from './clean.cjs';
3
- export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins, getOutputExtensionMap } from './config.cjs';
4
- export { AssetInfo, BuildEnd, BuildStart, ChunkInfo, ESBuildCLIOptions, ESBuildContext, ESBuildOptions, ESBuildResolvedOptions, ESBuildResult, MaybePromise, ModifyEsbuildOptions, OutExtensionFactory, OutExtensionObject, RenderChunk, Renderer, WrittenFile } from './types.cjs';
3
+ export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins } from './config.cjs';
4
+ export { AssetInfo, BuildEnd, BuildStart, ChunkInfo, ESBuildCLIOptions, ESBuildContext, ESBuildOptions, ESBuildResolvedOptions, ESBuildResult, MaybePromise, ModifyEsbuildOptions, RenderChunk, Renderer, WrittenFile } from './types.cjs';
5
5
  import 'zod';
6
6
  import 'esbuild';
7
7
  import '@nx/devkit';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { build, cleanOutputPath } from './build.js';
2
2
  export { clean, cleanDirectories } from './clean.js';
3
- export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins, getOutputExtensionMap } from './config.js';
4
- export { AssetInfo, BuildEnd, BuildStart, ChunkInfo, ESBuildCLIOptions, ESBuildContext, ESBuildOptions, ESBuildResolvedOptions, ESBuildResult, MaybePromise, ModifyEsbuildOptions, OutExtensionFactory, OutExtensionObject, RenderChunk, Renderer, WrittenFile } from './types.js';
3
+ export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins } from './config.js';
4
+ export { AssetInfo, BuildEnd, BuildStart, ChunkInfo, ESBuildCLIOptions, ESBuildContext, ESBuildOptions, ESBuildResolvedOptions, ESBuildResult, MaybePromise, ModifyEsbuildOptions, RenderChunk, Renderer, WrittenFile } from './types.js';
5
5
  import 'zod';
6
6
  import 'esbuild';
7
7
  import '@nx/devkit';
package/dist/index.js CHANGED
@@ -7,24 +7,23 @@ import {
7
7
  pipe,
8
8
  skip,
9
9
  transduce
10
- } from "./chunk-F5ULKQSO.js";
10
+ } from "./chunk-KFFQSANO.js";
11
11
  import {
12
12
  clean,
13
13
  cleanDirectories
14
- } from "./chunk-DNJAV4NQ.js";
14
+ } from "./chunk-TUAAYWUJ.js";
15
15
  import {
16
16
  DEFAULT_BUILD_OPTIONS,
17
- getDefaultBuildPlugins,
18
- getOutputExtensionMap
19
- } from "./chunk-D5ZZNDUG.js";
17
+ getDefaultBuildPlugins
18
+ } from "./chunk-VZIK4SOK.js";
20
19
  import "./chunk-T5272PC2.js";
21
20
  import "./chunk-LYDEMC26.js";
22
- import "./chunk-IW7GZHF7.js";
21
+ import "./chunk-YWKYHSIN.js";
23
22
  import "./chunk-Q3LOGZKI.js";
24
- import "./chunk-V23YDDCC.js";
23
+ import "./chunk-LUJTYV5C.js";
25
24
  import "./chunk-GGNOJ77I.js";
26
- import "./chunk-7NZ2E6EC.js";
27
- import "./chunk-2HAHXU54.js";
25
+ import "./chunk-NCMOSDGN.js";
26
+ import "./chunk-4ATDIKBQ.js";
28
27
  import "./chunk-YMTDVMD6.js";
29
28
  import "./chunk-YNQ45EAM.js";
30
29
  import "./chunk-GWG4HOQ6.js";
@@ -38,7 +37,6 @@ export {
38
37
  cleanDirectories,
39
38
  cleanOutputPath,
40
39
  getDefaultBuildPlugins,
41
- getOutputExtensionMap,
42
40
  handle,
43
41
  pipe,
44
42
  skip,