@storm-software/esbuild 0.4.1 → 0.14.2

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 (89) hide show
  1. package/README.md +1 -1
  2. package/dist/build.cjs +15 -11
  3. package/dist/build.d.cts +3 -3
  4. package/dist/build.d.ts +3 -3
  5. package/dist/build.js +14 -10
  6. package/dist/{chunk-WCQVDF3K.js → chunk-3GQAWCBQ.js} +0 -1
  7. package/dist/chunk-4JLYXTKD.cjs +26 -0
  8. package/dist/chunk-5I2MGPRN.cjs +919 -0
  9. package/dist/{chunk-CMWXE5MF.js → chunk-7KR3YBS6.js} +5 -3
  10. package/dist/chunk-7MDMXJ5V.js +26 -0
  11. package/dist/{chunk-WGEGR3DF.cjs → chunk-BGYQAVKQ.cjs} +0 -1
  12. package/dist/{chunk-J34FQYKV.cjs → chunk-CGFDQ5AJ.cjs} +8 -5
  13. package/dist/{chunk-TTHABTDU.js → chunk-DAGDNKO5.js} +8 -6
  14. package/dist/{chunk-DFGHPRBD.cjs → chunk-EZGTDCYM.cjs} +6 -6
  15. package/dist/chunk-GGNOJ77I.js +0 -0
  16. package/dist/{chunk-YQBU3FSL.js → chunk-GWG4HOQ6.js} +4 -4
  17. package/dist/chunk-HQGUIF4U.js +537 -0
  18. package/dist/{chunk-X5TLV7MF.js → chunk-KE5DL2BG.js} +11 -6
  19. package/dist/{chunk-KJ7ZHAFS.js → chunk-KOK4WCHS.js} +52 -28
  20. package/dist/chunk-LVWQSCJM.cjs +26 -0
  21. package/dist/chunk-LYDEMC26.js +23 -0
  22. package/dist/chunk-MAMLS55E.js +582 -0
  23. package/dist/chunk-NVWDQVN6.js +21 -0
  24. package/dist/chunk-PQ6YIJ72.cjs +136 -0
  25. package/dist/{chunk-BF5W6GVP.cjs → chunk-RMB62XEL.cjs} +10 -8
  26. package/dist/chunk-S6M44SSZ.cjs +60 -0
  27. package/dist/chunk-SFZRYJZ2.cjs +1 -0
  28. package/dist/chunk-T5272PC2.js +60 -0
  29. package/dist/chunk-TP5EOMRD.cjs +21 -0
  30. package/dist/chunk-VBINBV4Z.cjs +537 -0
  31. package/dist/chunk-VLP3P6HF.js +919 -0
  32. package/dist/{chunk-KVBDKVBU.cjs → chunk-VZBOWHCM.cjs} +9 -7
  33. package/dist/chunk-WRBUO7H6.cjs +23 -0
  34. package/dist/chunk-WYMD6YG2.cjs +582 -0
  35. package/dist/{chunk-437F3SFI.js → chunk-YNQ45EAM.js} +7 -4
  36. package/dist/clean.cjs +9 -0
  37. package/dist/clean.d.cts +1194 -0
  38. package/dist/clean.d.ts +1194 -0
  39. package/dist/clean.js +9 -0
  40. package/dist/config.cjs +14 -4
  41. package/dist/config.d.cts +8 -13
  42. package/dist/config.d.ts +8 -13
  43. package/dist/config.js +15 -5
  44. package/dist/esbuild.cjs +1185 -0
  45. package/dist/index.cjs +21 -12
  46. package/dist/index.d.cts +7 -5
  47. package/dist/index.d.ts +7 -5
  48. package/dist/index.js +22 -13
  49. package/dist/types.cjs +1 -2
  50. package/dist/types.d.cts +84 -1177
  51. package/dist/types.d.ts +84 -1177
  52. package/dist/types.js +1 -2
  53. package/package.json +1 -222
  54. package/dist/build.cjs.map +0 -1
  55. package/dist/build.js.map +0 -1
  56. package/dist/chunk-263L44RM.cjs +0 -112
  57. package/dist/chunk-263L44RM.cjs.map +0 -1
  58. package/dist/chunk-437F3SFI.js.map +0 -1
  59. package/dist/chunk-BF5W6GVP.cjs.map +0 -1
  60. package/dist/chunk-CMEDJ4L4.js +0 -352
  61. package/dist/chunk-CMEDJ4L4.js.map +0 -1
  62. package/dist/chunk-CMWXE5MF.js.map +0 -1
  63. package/dist/chunk-D5PRB2E2.cjs +0 -40
  64. package/dist/chunk-D5PRB2E2.cjs.map +0 -1
  65. package/dist/chunk-DFGHPRBD.cjs.map +0 -1
  66. package/dist/chunk-DRRPNILS.js +0 -40
  67. package/dist/chunk-DRRPNILS.js.map +0 -1
  68. package/dist/chunk-J34FQYKV.cjs.map +0 -1
  69. package/dist/chunk-KJ7ZHAFS.js.map +0 -1
  70. package/dist/chunk-KVBDKVBU.cjs.map +0 -1
  71. package/dist/chunk-MUYXFAKB.cjs +0 -1
  72. package/dist/chunk-MUYXFAKB.cjs.map +0 -1
  73. package/dist/chunk-MVLEDP7K.cjs +0 -21
  74. package/dist/chunk-MVLEDP7K.cjs.map +0 -1
  75. package/dist/chunk-PBHOTQGA.cjs +0 -352
  76. package/dist/chunk-PBHOTQGA.cjs.map +0 -1
  77. package/dist/chunk-QNDLJ2W7.js +0 -1
  78. package/dist/chunk-QNDLJ2W7.js.map +0 -1
  79. package/dist/chunk-TTHABTDU.js.map +0 -1
  80. package/dist/chunk-WCQVDF3K.js.map +0 -1
  81. package/dist/chunk-WGEGR3DF.cjs.map +0 -1
  82. package/dist/chunk-X5TLV7MF.js.map +0 -1
  83. package/dist/chunk-YQBU3FSL.js.map +0 -1
  84. package/dist/config.cjs.map +0 -1
  85. package/dist/config.js.map +0 -1
  86. package/dist/index.cjs.map +0 -1
  87. package/dist/index.js.map +0 -1
  88. package/dist/types.cjs.map +0 -1
  89. package/dist/types.js.map +0 -1
@@ -1,10 +1,13 @@
1
+ import {
2
+ writeError,
3
+ writeWarning
4
+ } from "./chunk-HQGUIF4U.js";
1
5
  import {
2
6
  __name,
3
7
  __require
4
- } from "./chunk-WCQVDF3K.js";
8
+ } from "./chunk-3GQAWCBQ.js";
5
9
 
6
10
  // src/plugins/deps-check.ts
7
- import { writeError, writeWarning } from "@storm-software/config-tools";
8
11
  import { builtinModules } from "node:module";
9
12
  import path from "node:path";
10
13
  var unusedIgnore = [
@@ -97,4 +100,3 @@ ${JSON.stringify(filteredMissingDeps)}
97
100
  export {
98
101
  depsCheckPlugin
99
102
  };
100
- //# sourceMappingURL=chunk-CMWXE5MF.js.map
@@ -0,0 +1,26 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-3GQAWCBQ.js";
4
+
5
+ // ../config-tools/src/utilities/correct-paths.ts
6
+ import { joinPathFragments } from "@nx/devkit";
7
+ var correctPaths = /* @__PURE__ */ __name((path) => {
8
+ if (!path) {
9
+ return "";
10
+ }
11
+ if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
12
+ path = `C:${path}`;
13
+ }
14
+ return path.replaceAll("\\", "/");
15
+ }, "correctPaths");
16
+ var joinPaths = /* @__PURE__ */ __name((...paths) => {
17
+ if (!paths || paths.length === 0) {
18
+ return "";
19
+ }
20
+ return correctPaths(joinPathFragments(...paths.map((path) => correctPaths(path))));
21
+ }, "joinPaths");
22
+
23
+ export {
24
+ correctPaths,
25
+ joinPaths
26
+ };
@@ -11,4 +11,3 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
11
11
 
12
12
 
13
13
  exports.__name = __name; exports.__require = __require;
14
- //# sourceMappingURL=chunk-WGEGR3DF.cjs.map
@@ -1,13 +1,17 @@
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 _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; }// src/plugins/esm-split-code-to-cjs.ts
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 _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
+
3
+ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
4
+
5
+ // src/plugins/esm-split-code-to-cjs.ts
2
6
  var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
3
- var esmSplitCodeToCjsPlugin = {
7
+ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options, resolvedOptions) => ({
4
8
  name: "storm:esm-split-code-to-cjs",
5
9
  setup(build2) {
6
10
  build2.onEnd(async (result) => {
7
11
  const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _ => _.metafile, 'optionalAccess', _2 => _2.outputs]), () => ( {})));
8
12
  const jsFiles = outFiles.filter((f) => f.endsWith("js"));
9
13
  await esbuild.build({
10
- outdir: build2.initialOptions.outdir,
14
+ outdir: resolvedOptions.outdir,
11
15
  entryPoints: jsFiles,
12
16
  allowOverwrite: true,
13
17
  format: "cjs",
@@ -16,9 +20,8 @@ var esmSplitCodeToCjsPlugin = {
16
20
  });
17
21
  });
18
22
  }
19
- };
23
+ }), "esmSplitCodeToCjsPlugin");
20
24
 
21
25
 
22
26
 
23
27
  exports.esmSplitCodeToCjsPlugin = esmSplitCodeToCjsPlugin;
24
- //# sourceMappingURL=chunk-J34FQYKV.cjs.map
@@ -1,7 +1,10 @@
1
+ import {
2
+ joinPaths
3
+ } from "./chunk-7MDMXJ5V.js";
1
4
  import {
2
5
  __name,
3
6
  __require
4
- } from "./chunk-WCQVDF3K.js";
7
+ } from "./chunk-3GQAWCBQ.js";
5
8
 
6
9
  // src/plugins/resolve-paths.ts
7
10
  import path from "node:path";
@@ -25,11 +28,11 @@ function resolvePathsConfig(options, cwd) {
25
28
  return [];
26
29
  }
27
30
  __name(resolvePathsConfig, "resolvePathsConfig");
28
- var resolvePathsPlugin = {
31
+ var resolvePathsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
29
32
  name: "storm:resolve-paths",
30
33
  setup(build) {
31
- const parentTsConfig = __require(`${process.cwd()}/${build.initialOptions.tsconfig}`);
32
- const resolvedTsPaths = resolvePathsConfig(parentTsConfig, process.cwd());
34
+ const parentTsConfig = build.initialOptions.tsconfig ? __require(joinPaths(resolvedOptions.config.workspaceRoot, build.initialOptions.tsconfig)) : __require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
35
+ const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
33
36
  const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
34
37
  build.onResolve({
35
38
  filter: packagesRegex
@@ -45,9 +48,8 @@ var resolvePathsPlugin = {
45
48
  };
46
49
  });
47
50
  }
48
- };
51
+ }), "resolvePathsPlugin");
49
52
 
50
53
  export {
51
54
  resolvePathsPlugin
52
55
  };
53
- //# sourceMappingURL=chunk-TTHABTDU.js.map
@@ -1,29 +1,29 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWGEGR3DFcjs = require('./chunk-WGEGR3DF.cjs');
3
+
4
+ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
4
5
 
5
6
  // src/plugins/fix-imports.ts
6
- var fixImportsPlugin = {
7
+ var fixImportsPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options, resolvedOptions) => ({
7
8
  name: "storm:fix-imports",
8
9
  setup(build) {
9
10
  build.onResolve({
10
11
  filter: /^spdx-exceptions/
11
12
  }, () => {
12
13
  return {
13
- path: _chunkWGEGR3DFcjs.__require.resolve("spdx-exceptions")
14
+ path: _chunkBGYQAVKQcjs.__require.resolve("spdx-exceptions")
14
15
  };
15
16
  });
16
17
  build.onResolve({
17
18
  filter: /^spdx-license-ids/
18
19
  }, () => {
19
20
  return {
20
- path: _chunkWGEGR3DFcjs.__require.resolve("spdx-license-ids")
21
+ path: _chunkBGYQAVKQcjs.__require.resolve("spdx-license-ids")
21
22
  };
22
23
  });
23
24
  }
24
- };
25
+ }), "fixImportsPlugin");
25
26
 
26
27
 
27
28
 
28
29
  exports.fixImportsPlugin = fixImportsPlugin;
29
- //# sourceMappingURL=chunk-DFGHPRBD.cjs.map
File without changes
@@ -1,9 +1,10 @@
1
1
  import {
2
+ __name,
2
3
  __require
3
- } from "./chunk-WCQVDF3K.js";
4
+ } from "./chunk-3GQAWCBQ.js";
4
5
 
5
6
  // src/plugins/fix-imports.ts
6
- var fixImportsPlugin = {
7
+ var fixImportsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
7
8
  name: "storm:fix-imports",
8
9
  setup(build) {
9
10
  build.onResolve({
@@ -21,9 +22,8 @@ var fixImportsPlugin = {
21
22
  };
22
23
  });
23
24
  }
24
- };
25
+ }), "fixImportsPlugin");
25
26
 
26
27
  export {
27
28
  fixImportsPlugin
28
29
  };
29
- //# sourceMappingURL=chunk-YQBU3FSL.js.map