@storm-software/esbuild 0.1.0 → 0.2.0

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 (61) hide show
  1. package/dist/build.cjs +11 -10
  2. package/dist/build.cjs.map +1 -0
  3. package/dist/build.js +10 -9
  4. package/dist/build.js.map +1 -0
  5. package/dist/{chunk-RJQ3LCGJ.cjs → chunk-4ZPYEZJO.cjs} +3 -2
  6. package/dist/chunk-4ZPYEZJO.cjs.map +1 -0
  7. package/dist/{chunk-5S2XTAF2.cjs → chunk-75SHW3Z4.cjs} +73 -90
  8. package/dist/chunk-75SHW3Z4.cjs.map +1 -0
  9. package/dist/{chunk-PCGRI6Z6.js → chunk-7U3F23ZZ.js} +3 -2
  10. package/dist/chunk-7U3F23ZZ.js.map +1 -0
  11. package/dist/{chunk-WLHWKRZB.cjs → chunk-BF5W6GVP.cjs} +5 -4
  12. package/dist/chunk-BF5W6GVP.cjs.map +1 -0
  13. package/dist/{chunk-RKSGVSXZ.js → chunk-CMF37LBT.js} +2 -1
  14. package/dist/chunk-CMF37LBT.js.map +1 -0
  15. package/dist/{chunk-NVGEXPTG.cjs → chunk-D5PRB2E2.cjs} +1 -0
  16. package/dist/chunk-D5PRB2E2.cjs.map +1 -0
  17. package/dist/{chunk-3C3PXJUM.cjs → chunk-DFGHPRBD.cjs} +4 -3
  18. package/dist/chunk-DFGHPRBD.cjs.map +1 -0
  19. package/dist/{chunk-ELGZJRET.js → chunk-DRRPNILS.js} +1 -0
  20. package/dist/chunk-DRRPNILS.js.map +1 -0
  21. package/dist/{chunk-YGD5JBOH.js → chunk-IDO67KEL.js} +50 -67
  22. package/dist/chunk-IDO67KEL.js.map +1 -0
  23. package/dist/chunk-MUYXFAKB.cjs +1 -0
  24. package/dist/chunk-MUYXFAKB.cjs.map +1 -0
  25. package/dist/{chunk-DCWECOOS.cjs → chunk-PRNPZZSV.cjs} +3 -2
  26. package/dist/chunk-PRNPZZSV.cjs.map +1 -0
  27. package/dist/{chunk-5JHKW6MG.js → chunk-QBYHNHXL.js} +3 -2
  28. package/dist/chunk-QBYHNHXL.js.map +1 -0
  29. package/dist/chunk-QNDLJ2W7.js +1 -0
  30. package/dist/chunk-QNDLJ2W7.js.map +1 -0
  31. package/dist/{chunk-A6CGWMV7.cjs → chunk-T5H2LBQA.cjs} +10 -9
  32. package/dist/chunk-T5H2LBQA.cjs.map +1 -0
  33. package/dist/{chunk-4TW4ZA3I.js → chunk-TTHABTDU.js} +2 -1
  34. package/dist/chunk-TTHABTDU.js.map +1 -0
  35. package/dist/{chunk-3GQAWCBQ.js → chunk-WCQVDF3K.js} +1 -0
  36. package/dist/chunk-WCQVDF3K.js.map +1 -0
  37. package/dist/{chunk-BGYQAVKQ.cjs → chunk-WGEGR3DF.cjs} +1 -0
  38. package/dist/chunk-WGEGR3DF.cjs.map +1 -0
  39. package/dist/{chunk-LVDPGHWK.js → chunk-YQBU3FSL.js} +2 -1
  40. package/dist/chunk-YQBU3FSL.js.map +1 -0
  41. package/dist/{chunk-MTKAAECG.cjs → chunk-Z2M426LD.cjs} +7 -6
  42. package/dist/chunk-Z2M426LD.cjs.map +1 -0
  43. package/dist/{chunk-YIAZ64WG.js → chunk-ZQ5NVDFP.js} +2 -1
  44. package/dist/chunk-ZQ5NVDFP.js.map +1 -0
  45. package/dist/config.cjs +4 -3
  46. package/dist/config.cjs.map +1 -0
  47. package/dist/config.js +3 -2
  48. package/dist/config.js.map +1 -0
  49. package/dist/index.cjs +12 -11
  50. package/dist/index.cjs.map +1 -0
  51. package/dist/index.js +11 -10
  52. package/dist/index.js.map +1 -0
  53. package/dist/types.cjs +2 -1
  54. package/dist/types.cjs.map +1 -0
  55. package/dist/types.d.cts +2 -1
  56. package/dist/types.d.ts +2 -1
  57. package/dist/types.js +2 -1
  58. package/dist/types.js.map +1 -0
  59. package/package.json +11 -1
  60. package/dist/chunk-GGNOJ77I.js +0 -0
  61. package/dist/chunk-SFZRYJZ2.cjs +0 -1
package/dist/build.cjs CHANGED
@@ -1,14 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5S2XTAF2cjs = require('./chunk-5S2XTAF2.cjs');
4
- require('./chunk-DCWECOOS.cjs');
5
- require('./chunk-WLHWKRZB.cjs');
6
- require('./chunk-A6CGWMV7.cjs');
7
- require('./chunk-NVGEXPTG.cjs');
8
- require('./chunk-MTKAAECG.cjs');
9
- require('./chunk-RJQ3LCGJ.cjs');
10
- require('./chunk-3C3PXJUM.cjs');
11
- require('./chunk-BGYQAVKQ.cjs');
3
+ var _chunk75SHW3Z4cjs = require('./chunk-75SHW3Z4.cjs');
4
+ require('./chunk-PRNPZZSV.cjs');
5
+ require('./chunk-BF5W6GVP.cjs');
6
+ require('./chunk-T5H2LBQA.cjs');
7
+ require('./chunk-D5PRB2E2.cjs');
8
+ require('./chunk-Z2M426LD.cjs');
9
+ require('./chunk-4ZPYEZJO.cjs');
10
+ require('./chunk-DFGHPRBD.cjs');
11
+ require('./chunk-WGEGR3DF.cjs');
12
12
 
13
13
 
14
- exports.build = _chunk5S2XTAF2cjs.build;
14
+ exports.build = _chunk75SHW3Z4cjs.build;
15
+ //# sourceMappingURL=build.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/build.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wCAAC","file":"/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/build.cjs"}
package/dist/build.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  build
3
- } from "./chunk-YGD5JBOH.js";
4
- import "./chunk-RKSGVSXZ.js";
5
- import "./chunk-4TW4ZA3I.js";
6
- import "./chunk-5JHKW6MG.js";
7
- import "./chunk-ELGZJRET.js";
8
- import "./chunk-PCGRI6Z6.js";
9
- import "./chunk-YIAZ64WG.js";
10
- import "./chunk-LVDPGHWK.js";
11
- import "./chunk-3GQAWCBQ.js";
3
+ } from "./chunk-IDO67KEL.js";
4
+ import "./chunk-CMF37LBT.js";
5
+ import "./chunk-TTHABTDU.js";
6
+ import "./chunk-QBYHNHXL.js";
7
+ import "./chunk-DRRPNILS.js";
8
+ import "./chunk-7U3F23ZZ.js";
9
+ import "./chunk-ZQ5NVDFP.js";
10
+ import "./chunk-YQBU3FSL.js";
11
+ import "./chunk-WCQVDF3K.js";
12
12
  export {
13
13
  build
14
14
  };
15
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,14 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
3
+ var _chunkWGEGR3DFcjs = require('./chunk-WGEGR3DF.cjs');
4
4
 
5
5
  // src/utilities/log.ts
6
6
  var _consola = require('consola');
7
7
  function writeLog(type, ...args) {
8
8
  _consola.consola[type]("[Storm]", ...args);
9
9
  }
10
- _chunkBGYQAVKQcjs.__name.call(void 0, writeLog, "writeLog");
10
+ _chunkWGEGR3DFcjs.__name.call(void 0, writeLog, "writeLog");
11
11
 
12
12
 
13
13
 
14
14
  exports.writeLog = writeLog;
15
+ //# sourceMappingURL=chunk-4ZPYEZJO.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/chunk-4ZPYEZJO.cjs","../src/utilities/log.ts"],"names":["writeLog","type","args","consola"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACaA,kCAAsC;AAQ/B,SAASA,QAAAA,CAASC,IAAAA,EAAAA,GAAkBC,IAAAA,EAAc;AACvDC,EAAAA,gBAAAA,CAAQF,IAAAA,CAAAA,CAAM,SAAA,EAAA,GAAcC,IAAAA,CAAAA;AAC9B;AAFgBF,sCAAAA,QAAAA,EAAAA,UAAAA,CAAAA;ADfhB;AACA;AACE;AACF,4BAAC","file":"/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/chunk-4ZPYEZJO.cjs","sourcesContent":[null,"/*-------------------------------------------------------------------\n\n ⚡ Storm Software - Storm Stack\n\n This code was released as part of the Storm Stack project. Storm Stack\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/storm-ops\n Documentation: https://stormsoftware.com/projects/storm-ops/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/storm-ops/license\n\n -------------------------------------------------------------------*/\n\nimport { type LogType, consola } from \"consola\";\n\n/**\n * Writes a log message to the console.\n *\n * @param type - The type of log message.\n * @param args - The arguments to log.\n */\nexport function writeLog(type: LogType, ...args: string[]) {\n consola[type](\"[Storm]\", ...args);\n}\n"]}
@@ -1,38 +1,38 @@
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 _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 _chunkDCWECOOScjs = require('./chunk-DCWECOOS.cjs');
3
+ var _chunkPRNPZZSVcjs = require('./chunk-PRNPZZSV.cjs');
4
4
 
5
5
 
6
- var _chunkWLHWKRZBcjs = require('./chunk-WLHWKRZB.cjs');
6
+ var _chunkBF5W6GVPcjs = require('./chunk-BF5W6GVP.cjs');
7
7
 
8
8
 
9
- var _chunkA6CGWMV7cjs = require('./chunk-A6CGWMV7.cjs');
9
+ var _chunkT5H2LBQAcjs = require('./chunk-T5H2LBQA.cjs');
10
10
 
11
11
 
12
- var _chunkNVGEXPTGcjs = require('./chunk-NVGEXPTG.cjs');
12
+ var _chunkD5PRB2E2cjs = require('./chunk-D5PRB2E2.cjs');
13
13
 
14
14
 
15
- var _chunkMTKAAECGcjs = require('./chunk-MTKAAECG.cjs');
15
+ var _chunkZ2M426LDcjs = require('./chunk-Z2M426LD.cjs');
16
16
 
17
17
 
18
- var _chunkRJQ3LCGJcjs = require('./chunk-RJQ3LCGJ.cjs');
18
+ var _chunk4ZPYEZJOcjs = require('./chunk-4ZPYEZJO.cjs');
19
19
 
20
20
 
21
- var _chunk3C3PXJUMcjs = require('./chunk-3C3PXJUM.cjs');
21
+ var _chunkDFGHPRBDcjs = require('./chunk-DFGHPRBD.cjs');
22
22
 
23
23
 
24
- var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
24
+ var _chunkWGEGR3DFcjs = require('./chunk-WGEGR3DF.cjs');
25
25
 
26
26
  // src/build.ts
27
27
  var _node = require('@humanfs/node');
28
28
  var _devkit = require('@nx/devkit');
29
- var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
29
+ var _buildtools = require('@storm-software/build-tools');
30
+ var _configtools = require('@storm-software/config-tools');
30
31
  var _chokidar = require('chokidar');
31
32
  var _estoolkit = require('es-toolkit');
32
33
  var _compat = require('es-toolkit/compat');
33
34
  var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
34
35
  var _globby = require('globby');
35
- var _fs = require('fs');
36
36
  var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
37
37
 
38
38
  // src/utilities/helpers.ts
@@ -43,7 +43,7 @@ function handleSync(fn) {
43
43
  return error_;
44
44
  }
45
45
  }
46
- _chunkBGYQAVKQcjs.__name.call(void 0, handleSync, "handleSync");
46
+ _chunkWGEGR3DFcjs.__name.call(void 0, handleSync, "handleSync");
47
47
  async function handleAsync(fn) {
48
48
  try {
49
49
  return await fn();
@@ -51,7 +51,7 @@ async function handleAsync(fn) {
51
51
  return error_;
52
52
  }
53
53
  }
54
- _chunkBGYQAVKQcjs.__name.call(void 0, handleAsync, "handleAsync");
54
+ _chunkWGEGR3DFcjs.__name.call(void 0, handleAsync, "handleAsync");
55
55
  var handle = handleSync;
56
56
  handle.async = handleAsync;
57
57
  var skip = Symbol("skip");
@@ -65,7 +65,7 @@ function transduceSync(list, transformer) {
65
65
  }
66
66
  return transduced;
67
67
  }
68
- _chunkBGYQAVKQcjs.__name.call(void 0, transduceSync, "transduceSync");
68
+ _chunkWGEGR3DFcjs.__name.call(void 0, transduceSync, "transduceSync");
69
69
  async function transduceAsync(list, transformer) {
70
70
  const transduced = [];
71
71
  await Promise.all(list.entries().map(async ([i, element_]) => {
@@ -76,11 +76,11 @@ async function transduceAsync(list, transformer) {
76
76
  }));
77
77
  return transduced;
78
78
  }
79
- _chunkBGYQAVKQcjs.__name.call(void 0, transduceAsync, "transduceAsync");
80
- var Filter = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (filter) => (item) => {
79
+ _chunkWGEGR3DFcjs.__name.call(void 0, transduceAsync, "transduceAsync");
80
+ var Filter = /* @__PURE__ */ _chunkWGEGR3DFcjs.__name.call(void 0, (filter) => (item) => {
81
81
  return filter(item) ? item : skip;
82
82
  }, "Filter");
83
- var Mapper = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (mapper) => (item) => {
83
+ var Mapper = /* @__PURE__ */ _chunkWGEGR3DFcjs.__name.call(void 0, (mapper) => (item) => {
84
84
  return mapper(item);
85
85
  }, "Mapper");
86
86
  var transduce = transduceSync;
@@ -94,7 +94,7 @@ function pipeSync(fn, ...fns) {
94
94
  return result;
95
95
  };
96
96
  }
97
- _chunkBGYQAVKQcjs.__name.call(void 0, pipeSync, "pipeSync");
97
+ _chunkWGEGR3DFcjs.__name.call(void 0, pipeSync, "pipeSync");
98
98
  function pipeAsync(fn, ...fns) {
99
99
  return async (...args) => {
100
100
  let result = await fn(...args);
@@ -104,12 +104,12 @@ function pipeAsync(fn, ...fns) {
104
104
  return result;
105
105
  };
106
106
  }
107
- _chunkBGYQAVKQcjs.__name.call(void 0, pipeAsync, "pipeAsync");
107
+ _chunkWGEGR3DFcjs.__name.call(void 0, pipeAsync, "pipeAsync");
108
108
  var pipe = pipeSync;
109
109
  pipe.async = pipeAsync;
110
110
 
111
111
  // src/build.ts
112
- var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (options) => {
112
+ var resolveOptions = /* @__PURE__ */ _chunkWGEGR3DFcjs.__name.call(void 0, async (options) => {
113
113
  const projectRoot = options.projectRoot;
114
114
  const workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
115
115
  if (!workspaceRoot) {
@@ -133,7 +133,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
133
133
  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.");
134
134
  }
135
135
  return {
136
- ..._chunkNVGEXPTGcjs.DEFAULT_BUILD_OPTIONS,
136
+ ..._chunkD5PRB2E2cjs.DEFAULT_BUILD_OPTIONS,
137
137
  format: "cjs",
138
138
  outExtension: {
139
139
  ".js": ".js"
@@ -143,23 +143,21 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
143
143
  ".js",
144
144
  ".node"
145
145
  ],
146
- entryPoints: _globby.globbySync.call(void 0, "./src/**/*.{j,t}s", {
147
- ignore: [
148
- "./src/__tests__/**/*"
149
- ]
150
- }),
151
146
  mainFields: [
152
147
  "module",
153
148
  "main"
154
149
  ],
155
150
  ...options,
151
+ entryPoints: options.entryPoints || [
152
+ "./src/index.ts"
153
+ ],
156
154
  outdir: options.outdir || _devkit.joinPathFragments.call(void 0, workspaceRoot.dir, "dist", projectRoot),
157
155
  plugins: [
158
156
  ..._nullishCoalesce(options.plugins, () => ( [])),
159
- _chunkWLHWKRZBcjs.resolvePathsPlugin,
160
- _chunk3C3PXJUMcjs.fixImportsPlugin,
161
- _chunkA6CGWMV7cjs.tscPlugin.call(void 0, options.emitTypes),
162
- _chunkDCWECOOScjs.onErrorPlugin
157
+ _chunkBF5W6GVPcjs.resolvePathsPlugin,
158
+ _chunkDFGHPRBDcjs.fixImportsPlugin,
159
+ _chunkT5H2LBQAcjs.tscPlugin.call(void 0, options.emitTypes),
160
+ _chunkPRNPZZSVcjs.onErrorPlugin
163
161
  ],
164
162
  external: [
165
163
  ..._nullishCoalesce(options.external, () => ( []))
@@ -168,67 +166,51 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
168
166
  projectConfigurations,
169
167
  projectName,
170
168
  projectGraph,
171
- workspaceRoot
169
+ workspaceRoot,
170
+ sourceRoot: options.sourceRoot || _devkit.joinPathFragments.call(void 0, workspaceRoot.dir, projectRoot, "src")
172
171
  };
173
172
  }, "resolveOptions");
174
- var generatePackageJson = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (options) => {
175
- const nxJsonPath = _devkit.joinPathFragments.call(void 0, options.workspaceRoot.dir, "nx.json");
176
- if (!await _node.hfs.isFile(nxJsonPath)) {
177
- throw new Error("Cannot find Nx workspace configuration");
178
- }
179
- const projectJsonPath = _devkit.joinPathFragments.call(void 0, options.workspaceRoot.dir, options.projectRoot, "project.json");
180
- if (!await _node.hfs.isFile(projectJsonPath)) {
181
- throw new Error("Cannot find project.json configuration");
182
- }
183
- if (!_optionalChain([options, 'access', _7 => _7.projectConfigurations, 'optionalAccess', _8 => _8.projects, 'optionalAccess', _9 => _9[options.projectName]])) {
184
- 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.");
185
- }
173
+ var generatePackageJson = /* @__PURE__ */ _chunkWGEGR3DFcjs.__name.call(void 0, async (options) => {
174
+ const config = await _configtools.loadStormConfig.call(void 0, );
186
175
  const packageJsonPath = _devkit.joinPathFragments.call(void 0, options.projectRoot, "project.json");
187
176
  if (!await _node.hfs.isFile(packageJsonPath)) {
188
177
  throw new Error("Cannot find package.json configuration");
189
178
  }
190
- const packageJson = await _node.hfs.json(_devkit.joinPathFragments.call(void 0, options.workspaceRoot.dir, options.projectRoot, "package.json"));
191
- const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, options.projectGraph, options.workspaceRoot.dir, options.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
192
- const localPackages = projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== options.projectRoot && dep.node.data.root !== options.workspaceRoot.dir).reduce((ret, project) => {
193
- const projectNode = project.node;
194
- if (projectNode.data.root) {
195
- const projectPackageJsonPath = _devkit.joinPathFragments.call(void 0, options.workspaceRoot.dir, projectNode.data.root, "package.json");
196
- if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
197
- const projectPackageJson = _devkit.readJsonFile.call(void 0, projectPackageJsonPath);
198
- if (projectPackageJson.private !== false) {
199
- ret.push(projectPackageJson);
200
- }
201
- }
179
+ let packageJson = await _node.hfs.json(_devkit.joinPathFragments.call(void 0, options.workspaceRoot.dir, options.projectRoot, "package.json"));
180
+ if (!packageJson) {
181
+ throw new Error("Cannot find package.json configuration file");
182
+ }
183
+ packageJson = await _buildtools.addPackageDependencies.call(void 0, options.workspaceRoot.dir, options.projectRoot, options.projectName, packageJson);
184
+ packageJson = await _buildtools.addWorkspacePackageJsonFields.call(void 0, config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
185
+ let entryPoints = [
186
+ {
187
+ in: "./src/index.ts",
188
+ out: "./src/index.ts"
202
189
  }
203
- return ret;
204
- }, []);
205
- if (localPackages.length > 0) {
206
- _chunkRJQ3LCGJcjs.writeLog.call(void 0, "trace", `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
207
- packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
208
- if (!ret[localPackage.name]) {
209
- ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
210
- }
211
- return ret;
212
- }, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
213
- packageJson.peerDependenciesMeta = localPackages.reduce((ret, localPackage) => {
214
- if (!ret[localPackage.name]) {
215
- ret[localPackage.name] = {
216
- optional: false
217
- };
218
- }
219
- return ret;
220
- }, _nullishCoalesce(packageJson.peerDependenciesMeta, () => ( {})));
221
- packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
222
- if (!ret[localPackage.name]) {
223
- ret[localPackage.name] = localPackage.version || "0.0.1";
224
- }
225
- return ret;
226
- }, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
227
- } else {
228
- _chunkRJQ3LCGJcjs.writeLog.call(void 0, "trace", "\u{1F4E6} No local packages dependencies to add to package.json");
190
+ ];
191
+ if (options.entryPoints) {
192
+ if (Array.isArray(options.entryPoints)) {
193
+ entryPoints = options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
194
+ in: entryPoint,
195
+ out: entryPoint
196
+ } : entryPoint);
197
+ } else {
198
+ entryPoints = Object.entries(options.entryPoints).map(([key, value]) => ({
199
+ in: key,
200
+ out: value
201
+ }));
202
+ }
203
+ }
204
+ for (const entryPoint of entryPoints) {
205
+ const split = entryPoint.out.split(".");
206
+ split.pop();
207
+ const entry = split.join(".").replaceAll("\\", "/");
208
+ packageJson.entry[`./${entry}`] ??= _buildtools.addPackageJsonExport.call(void 0, entry);
229
209
  }
210
+ packageJson.entry["./package.json"] = "./package.json";
211
+ packageJson.entry["."] ??= _buildtools.addPackageJsonExport.call(void 0, "./src/index.ts");
230
212
  packageJson.main = "./dist/index.cjs";
231
- packageJson.module = "./dist/index.mjs";
213
+ packageJson.module = "./dist/index.js";
232
214
  packageJson.types = "./dist/index.d.ts";
233
215
  await _devkit.writeJsonFile.call(void 0, _devkit.joinPathFragments.call(void 0, options.outdir, "package.json"), packageJson);
234
216
  return options;
@@ -239,11 +221,11 @@ async function createOptions(options) {
239
221
  () => resolveOptions(options2)
240
222
  ])));
241
223
  }
242
- _chunkBGYQAVKQcjs.__name.call(void 0, createOptions, "createOptions");
224
+ _chunkWGEGR3DFcjs.__name.call(void 0, createOptions, "createOptions");
243
225
  async function computeOptions(options) {
244
226
  return options();
245
227
  }
246
- _chunkBGYQAVKQcjs.__name.call(void 0, computeOptions, "computeOptions");
228
+ _chunkWGEGR3DFcjs.__name.call(void 0, computeOptions, "computeOptions");
247
229
  async function executeEsBuild(options) {
248
230
  if (process.env.WATCH === "true") {
249
231
  const context2 = await esbuild.context(_estoolkit.omit.call(void 0, options, [
@@ -267,7 +249,7 @@ async function executeEsBuild(options) {
267
249
  build3
268
250
  ];
269
251
  }
270
- _chunkBGYQAVKQcjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
252
+ _chunkWGEGR3DFcjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
271
253
  async function dependencyCheck(options) {
272
254
  if (process.env.DEV === "true") return void 0;
273
255
  if (process.env.CI && !process.env.BUILDKITE) return void 0;
@@ -286,20 +268,20 @@ async function dependencyCheck(options) {
286
268
  write: false,
287
269
  outdir: "out",
288
270
  plugins: [
289
- _chunkMTKAAECGcjs.depsCheckPlugin.call(void 0, options.bundle)
271
+ _chunkZ2M426LDcjs.depsCheckPlugin.call(void 0, options.bundle)
290
272
  ]
291
273
  });
292
274
  await buildPromise.catch(() => {
293
275
  });
294
276
  return void 0;
295
277
  }
296
- _chunkBGYQAVKQcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
278
+ _chunkWGEGR3DFcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
297
279
  async function build2(options) {
298
280
  void transduce.async(options, dependencyCheck);
299
281
  return transduce.async(await createOptions(options), pipe.async(computeOptions, generatePackageJson, executeEsBuild));
300
282
  }
301
- _chunkBGYQAVKQcjs.__name.call(void 0, build2, "build");
302
- var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, options) => {
283
+ _chunkWGEGR3DFcjs.__name.call(void 0, build2, "build");
284
+ var watch = /* @__PURE__ */ _chunkWGEGR3DFcjs.__name.call(void 0, (context2, options) => {
303
285
  if (process.env.WATCH !== "true") return context2;
304
286
  const config = {
305
287
  ignoreInitial: true,
@@ -318,9 +300,9 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
318
300
  return context2.rebuild();
319
301
  });
320
302
  if (rebuildResult instanceof Error) {
321
- _chunkRJQ3LCGJcjs.writeLog.call(void 0, "error", rebuildResult.message);
303
+ _chunk4ZPYEZJOcjs.writeLog.call(void 0, "error", rebuildResult.message);
322
304
  }
323
- _chunkRJQ3LCGJcjs.writeLog.call(void 0, "log", `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
305
+ _chunk4ZPYEZJOcjs.writeLog.call(void 0, "log", `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
324
306
  }, 10);
325
307
  changeWatcher.on("change", fastRebuild);
326
308
  return void 0;
@@ -335,3 +317,4 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
335
317
 
336
318
 
337
319
  exports.handle = handle; exports.skip = skip; exports.Filter = Filter; exports.Mapper = Mapper; exports.transduce = transduce; exports.pipe = pipe; exports.build = build2;
320
+ //# sourceMappingURL=chunk-75SHW3Z4.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/chunk-75SHW3Z4.cjs","../src/build.ts","../src/utilities/helpers.ts"],"names":["handleSync","fn","error_","handleAsync","handle","async","skip","Symbol","transduceSync","list","transformer","transduced","i","element_","entries","transformed","length","transduceAsync","Promise","all","map","Filter","filter","item","Mapper","mapper","transduce","pipeSync","fns","args","result","pipeAsync","pipe","resolveOptions","options","projectRoot","workspaceRoot","findWorkspaceRoot","Error","nxJsonPath","joinPathFragments","dir","hfs","isFile","projectGraph","createProjectGraphAsync","exitOnError","projectJsonPath","projectJson","json","projectName","name","projectConfigurations","readProjectsConfigurationFromProjectGraph","projects","DEFAULT_BUILD_OPTIONS","format","outExtension","resolveExtensions","mainFields","entryPoints","outdir","plugins","resolvePathsPlugin","fixImportsPlugin","tscPlugin","emitTypes","onErrorPlugin","external","sourceRoot","generatePackageJson","config","packageJsonPath","packageJson","Array","in","out","entryPoint","split","pop","entry","writeJsonFile","flatten","createOptions","computeOptions","process","context","build","metafilePath","executeEsBuild","buildPromise","ignore","gitignore","logLevel","bundle","depsCheckPlugin","undefined","dependencyCheck","watch","ignoreInitial","useFsEvents","ignored","changeWatcher","fastRebuild","timeBefore","rebuildResult","writeLog"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACRA,qCAAoB;AACpB,oCAKO;AACP,yDAIO;AACP,2DAAgC;AAChC,oCAAuC;AACvC,uCAAwC;AACxC,2CAAoB;AACpB,mFAAyB;AAEzB,gCAA2B;AAC3B,qEAAkC;ADAlC;AACA;AEpBA,SAASA,UAAAA,CAAyBC,EAAAA,EAAW;AAC3C,EAAA,IAAI;AACF,IAAA,OAAOA,EAAAA,CAAAA,CAA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ACA;AACA","file":"/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/chunk-75SHW3Z4.cjs","sourcesContent":[null,"/*-------------------------------------------------------------------\n\n ⚡ Storm Software - Storm Stack\n\n This code was released as part of the Storm Stack project. Storm Stack\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/storm-ops\n Documentation: https://stormsoftware.com/projects/storm-ops/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/storm-ops/license\n\n -------------------------------------------------------------------*/\n\nimport { hfs } from \"@humanfs/node\";\nimport {\n createProjectGraphAsync,\n joinPathFragments,\n readProjectsConfigurationFromProjectGraph,\n writeJsonFile\n} from \"@nx/devkit\";\nimport {\n addPackageDependencies,\n addPackageJsonExport,\n addWorkspacePackageJsonFields\n} from \"@storm-software/build-tools\";\nimport { loadStormConfig } from \"@storm-software/config-tools\";\nimport { watch as createWatcher } from \"chokidar\";\nimport { debounce, flatten, omit } from \"es-toolkit\";\nimport { map } from \"es-toolkit/compat\";\nimport * as esbuild from \"esbuild\";\nimport { BuildContext } from \"esbuild\";\nimport { globbySync } from \"globby\";\nimport { findWorkspaceRoot } from \"nx/src/utils/find-workspace-root\";\nimport { DEFAULT_BUILD_OPTIONS } from \"./config\";\nimport { depsCheckPlugin } from \"./plugins/deps-check\";\nimport { fixImportsPlugin } from \"./plugins/fix-imports\";\nimport { onErrorPlugin } from \"./plugins/on-error\";\nimport { resolvePathsPlugin } from \"./plugins/resolve-paths\";\nimport { tscPlugin } from \"./plugins/tsc\";\nimport { ESBuildResolvedOptions, type ESBuildOptions } from \"./types\";\nimport { handle, pipe, transduce } from \"./utilities/helpers\";\nimport { writeLog } from \"./utilities/log\";\n\n/**\n * Apply defaults to the original build options\n *\n * @param options - the original build options\n * @returns the build options with defaults applied\n */\nconst resolveOptions = async (\n options: ESBuildOptions\n): Promise<ESBuildResolvedOptions> => {\n const projectRoot = options.projectRoot;\n\n const workspaceRoot = findWorkspaceRoot(projectRoot);\n if (!workspaceRoot) {\n throw new Error(\"Cannot find Nx workspace root\");\n }\n\n const nxJsonPath = joinPathFragments(workspaceRoot.dir, \"nx.json\");\n if (!(await hfs.isFile(nxJsonPath))) {\n throw new Error(\"Cannot find Nx workspace configuration\");\n }\n\n const projectGraph = await createProjectGraphAsync({\n exitOnError: true\n });\n\n const projectJsonPath = joinPathFragments(\n workspaceRoot.dir,\n projectRoot,\n \"project.json\"\n );\n if (!(await hfs.isFile(projectJsonPath))) {\n throw new Error(\"Cannot find project.json configuration\");\n }\n\n const projectJson = await hfs.json(projectJsonPath);\n const projectName = projectJson.name;\n\n const projectConfigurations =\n readProjectsConfigurationFromProjectGraph(projectGraph);\n if (!projectConfigurations?.projects?.[projectName]) {\n throw new Error(\n \"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.\"\n );\n }\n\n // const packageJsonPath = joinPathFragments(projectRoot, \"project.json\");\n // if (!(await hfs.isFile(packageJsonPath))) {\n // throw new Error(\"Cannot find package.json configuration\");\n // }\n\n // const packageJson = await hfs.json(\n // joinPathFragments(workspaceRoot.dir, projectRoot, \"package.json\")\n // );\n\n return {\n ...DEFAULT_BUILD_OPTIONS,\n format: \"cjs\",\n outExtension: { \".js\": \".js\" },\n resolveExtensions: [\".ts\", \".js\", \".node\"],\n mainFields: [\"module\", \"main\"],\n ...options,\n entryPoints: options.entryPoints || [\"./src/index.ts\"],\n outdir:\n options.outdir ||\n joinPathFragments(workspaceRoot.dir, \"dist\", projectRoot),\n plugins: [\n ...(options.plugins ?? []),\n resolvePathsPlugin,\n fixImportsPlugin,\n tscPlugin(options.emitTypes),\n onErrorPlugin\n ],\n external: [...(options.external ?? [])],\n name: `${options.name || projectName}-${options.format || \"cjs\"}`,\n projectConfigurations,\n projectName,\n projectGraph,\n workspaceRoot,\n sourceRoot:\n options.sourceRoot ||\n joinPathFragments(workspaceRoot.dir, projectRoot, \"src\")\n };\n};\n\nconst generatePackageJson = async (options: ESBuildResolvedOptions) => {\n const config = await loadStormConfig();\n\n const packageJsonPath = joinPathFragments(\n options.projectRoot,\n \"project.json\"\n );\n if (!(await hfs.isFile(packageJsonPath))) {\n throw new Error(\"Cannot find package.json configuration\");\n }\n\n let packageJson = await hfs.json(\n joinPathFragments(\n options.workspaceRoot.dir,\n options.projectRoot,\n \"package.json\"\n )\n );\n if (!packageJson) {\n throw new Error(\"Cannot find package.json configuration file\");\n }\n\n packageJson = await addPackageDependencies(\n options.workspaceRoot.dir,\n options.projectRoot,\n options.projectName,\n packageJson\n );\n\n packageJson = await addWorkspacePackageJsonFields(\n config,\n options.projectRoot,\n options.sourceRoot,\n options.projectName,\n false,\n packageJson\n );\n\n let entryPoints = [{ in: \"./src/index.ts\", out: \"./src/index.ts\" }];\n if (options.entryPoints) {\n if (Array.isArray(options.entryPoints)) {\n entryPoints = (\n options.entryPoints as (string | { in: string; out: string })[]\n ).map(entryPoint =>\n typeof entryPoint === \"string\"\n ? { in: entryPoint, out: entryPoint }\n : entryPoint\n );\n } else {\n entryPoints = Object.entries(options.entryPoints).map(([key, value]) => ({\n in: key,\n out: value\n }));\n }\n }\n\n for (const entryPoint of entryPoints) {\n const split = entryPoint.out.split(\".\");\n split.pop();\n const entry = split.join(\".\").replaceAll(\"\\\\\", \"/\");\n\n packageJson.entry[`./${entry}`] ??= addPackageJsonExport(entry);\n }\n\n packageJson.entry[\"./package.json\"] = \"./package.json\";\n packageJson.entry[\".\"] ??= addPackageJsonExport(\"./src/index.ts\");\n\n packageJson.main = \"./dist/index.cjs\";\n packageJson.module = \"./dist/index.js\";\n packageJson.types = \"./dist/index.d.ts\";\n\n await writeJsonFile(\n joinPathFragments(options.outdir, \"package.json\"),\n packageJson\n );\n\n return options;\n};\n\n/**\n * Create two deferred builds for esm and cjs. The one follows the other:\n * - 1. The code gets compiled to an optimized tree-shaken esm output\n * - 2. We take that output and compile it to an optimized cjs output\n *\n * @param options - the original build options\n * @returns if options = [a, b], we get [a-esm, a-cjs, b-esm, b-cjs]\n */\nasync function createOptions(options: ESBuildOptions[]) {\n return flatten(\n await Promise.all(\n map(options, options => [\n // we defer it so that we don't trigger glob immediately\n () => resolveOptions(options)\n ])\n )\n );\n}\n\n/**\n * We only want to trigger the glob search once we are ready, and that is when\n * the previous build has finished. We get the build options from the deferred.\n */\nasync function computeOptions(\n options: () => Promise<ESBuildResolvedOptions>\n): Promise<ESBuildResolvedOptions> {\n return options();\n}\n\n// /**\n// * Extensions are not automatically by esbuild set for `options.outfile`. We\n// * look at the set `options.outExtension` and we add that to `options.outfile`.\n// */\n// function addExtensionFormat(options: ESBuildOptions) {\n// if (options.outfile && options.outExtension) {\n// const ext = options.outExtension[\".js\"];\n\n// options.outfile = `${options.outfile}${ext}`;\n// }\n\n// return options;\n// }\n\n// /**\n// * If we don't have `options.outfile`, we default `options.outdir`\n// */\n// function addDefaultOutDir(options: ESBuildOptions) {\n// if (options.outfile === undefined) {\n// options.outdir = getOutDir(options);\n// }\n\n// return options;\n// }\n\n/**\n * Execute esbuild with all the configurations we pass\n */\nasync function executeEsBuild(options: ESBuildResolvedOptions) {\n if (process.env.WATCH === \"true\") {\n const context = await esbuild.context(\n omit(options, [\"name\", \"emitTypes\", \"emitMetafile\"]) as any\n );\n\n watch(context, options);\n }\n\n const build = await esbuild.build(\n omit(options, [\"name\", \"emitTypes\", \"emitMetafile\"]) as any\n );\n\n if (build.metafile && options.emitMetafile) {\n const metafilePath = `${options.outdir}/${options.name}.meta.json`;\n await hfs.write(metafilePath, JSON.stringify(build.metafile));\n }\n\n return [options, build] as const;\n}\n\n/**\n * A blank esbuild run to do an analysis of our deps\n */\nasync function dependencyCheck(options: ESBuildResolvedOptions) {\n // we only check our dependencies for a full build\n if (process.env.DEV === \"true\") return undefined;\n // Only run on test and publish pipelines on Buildkite\n // Meaning we skip on GitHub Actions\n // Because it's slow and runs for each job, during setup, making each job slower\n if (process.env.CI && !process.env.BUILDKITE) return undefined;\n\n // we need to bundle everything to do the analysis\n const buildPromise = esbuild.build({\n entryPoints: globbySync(\"**/*.{j,t}s\", {\n // We don't check dependencies in ecosystem tests because tests are isolated from the build.\n ignore: [\"./src/__tests__/**/*\", \"./tests/e2e/**/*\", \"./dist/**/*\"],\n gitignore: true\n }),\n logLevel: \"silent\", // there will be errors\n bundle: true, // we bundle to get everything\n write: false, // no need to write for analysis\n outdir: \"out\",\n plugins: [depsCheckPlugin(options.bundle)]\n });\n\n // we absolutely don't care if it has any errors\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n await buildPromise.catch(() => {});\n\n return undefined;\n}\n\n/**\n * Execution pipeline that applies a set of actions\n *\n * @param options - the build options\n * @returns the build result\n */\nexport async function build(options: ESBuildOptions[]) {\n void transduce.async(options, dependencyCheck);\n\n return transduce.async(\n await createOptions(options),\n pipe.async(computeOptions, generatePackageJson, executeEsBuild)\n );\n}\n\n/**\n * Executes the build and rebuilds what is necessary\n *\n * @param context - the build context\n * @param options - the build options\n * @returns the build result\n */\nconst watch = (context: BuildContext, options: ESBuildResolvedOptions) => {\n if (process.env.WATCH !== \"true\") return context;\n\n // common chokidar options for the watchers\n const config = {\n ignoreInitial: true,\n useFsEvents: true,\n ignored: [\"./src/__tests__/**/*\", \"./package.json\"]\n };\n\n // prepare the incremental builds watcher\n const changeWatcher = createWatcher([\"./src/**/*\"], config);\n\n // triggers quick rebuild on file change\n const fastRebuild = debounce(async () => {\n const timeBefore = Date.now();\n\n // we handle possible rebuild exceptions\n const rebuildResult = await handle.async(() => {\n return context.rebuild();\n });\n\n if (rebuildResult instanceof Error) {\n writeLog(\"error\", rebuildResult.message);\n }\n\n writeLog(\"log\", `${Date.now() - timeBefore}ms [${options.name ?? \"\"}]`);\n }, 10);\n\n changeWatcher.on(\"change\", fastRebuild);\n\n return undefined;\n};\n\n// Utils ::::::::::::::::::::::::::::::::::::::::::::::::::\n\n// get the current project externals this helps to mark dependencies as external\n// by having convention in the package.json (dev = bundled, non-dev = external)\n// function getProjectExternals(options: ESBuildOptions) {\n// const pkg = require(`${process.cwd()}/package.json`);\n// const peerDeps = Object.keys(pkg.peerDependencies ?? {});\n// const regDeps = Object.keys(pkg.dependencies ?? {});\n\n// // when bundling, only the devDeps will be bundled\n// if (!process.env.IGNORE_EXTERNALS && options.bundle === true) {\n// return [...new Set([...peerDeps, ...regDeps])];\n// }\n\n// // otherwise, all the dependencies will be bundled\n// return [];\n// }\n","/*-------------------------------------------------------------------\n\n ⚡ Storm Software - Storm Stack\n\n This code was released as part of the Storm Stack project. Storm Stack\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/storm-ops\n Documentation: https://stormsoftware.com/projects/storm-ops/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/storm-ops/license\n\n -------------------------------------------------------------------*/\n\nfunction handleSync<R, E = Error>(fn: () => R): R | E {\n try {\n return fn();\n } catch (error_: unknown) {\n return error_ as E;\n }\n}\n\nasync function handleAsync<R, E = Error>(\n fn: () => Promise<R> | R\n): Promise<R | E> {\n try {\n return await fn();\n } catch (error_: unknown) {\n return error_ as E;\n }\n}\n\n/**\n * Executes a function, catches exceptions, and returns any outcome.\n * @param fn - to be executed\n */\nconst handle = handleSync as typeof handleSync & {\n async: typeof handleAsync;\n};\n\nhandle.async = handleAsync;\n\nexport { handle };\n\nconst skip = Symbol(\"skip\");\n\ntype SyncTransformer<I, R> = (item: I, key: number) => R | typeof skip;\ntype ASyncTransformer<I, R> = (\n item: I,\n key: number\n) => Promise<R | typeof skip>;\n\nfunction transduceSync<I, R>(\n list: Array<I>,\n transformer: SyncTransformer<I, R>\n) {\n const transduced = [] as R[];\n\n for (const [i, element_] of list.entries()) {\n const transformed = transformer(element_, i);\n\n if (transformed !== skip) {\n transduced[transduced.length] = transformed;\n }\n }\n\n return transduced;\n}\n\nasync function transduceAsync<I, R>(\n list: Array<I>,\n transformer: ASyncTransformer<I, R>\n) {\n const transduced = [] as R[];\n\n await Promise.all(\n list.entries().map(async ([i, element_]) => {\n const transformed = await transformer(element_, i);\n\n if (transformed !== skip) {\n transduced[transduced.length] = transformed;\n }\n })\n );\n\n return transduced;\n}\n\nconst Filter =\n <I>(filter: (item: I) => boolean) =>\n (item: I) => {\n return filter(item) ? item : (skip as never);\n };\n\nconst Mapper =\n <I, R>(mapper: (item: I) => R) =>\n (item: I) => {\n return mapper(item);\n };\n\n/**\n * Transducers enable efficient data processing. They allow the composition of\n * mappers and filters to be applied on a list. And this is applied in a single\n * pass, that's the efficient pipeline processing.\n *\n * (does not reduce at the same time)\n *\n * @see https://medium.com/javascript-scene/7985330fe73d\n *\n * @param list - to transform\n * @param transformer - to apply\n\n * @example\n * ```ts\n * const filterEven = Filter(<U>(unit: U) =>\n * typeof unit === 'number' ? !(unit % 2) : true,\n * )\n * const mapTimes2 = Mapper(<U>(unit: U) =>\n * typeof unit === 'number' ? unit * 2 : unit,\n * )\n * const mapString = Mapper(<U>(unit: U) => `${unit}`)\n *\n * const test0 = transduce(\n * [1, 2, 3, 4, 5, 6, 7, 'a'],\n * pipe(filterEven, mapTimes2, mapTimes2, mapString, filterEven),\n * )\n * ```\n */\nconst transduce = transduceSync as typeof transduceSync & {\n async: typeof transduceAsync;\n};\n\ntransduce.async = transduceAsync;\n\nexport { Filter, Mapper, skip, transduce };\n\ntype FunctionLike<P extends Array<any> = any, R = any> = (...args: P) => R;\ntype Await<P> = P extends Promise<infer A> ? A : P;\n\nfunction pipeSync(fn: FunctionLike, ...fns: FunctionLike[]) {\n return (...args: unknown[]) => {\n let result = fn(...args);\n\n for (let i = 0; result !== skip && i < fns.length; ++i) {\n result = fns[i]?.(result);\n }\n\n return result;\n };\n}\n\nfunction pipeAsync(fn: FunctionLike, ...fns: FunctionLike[]) {\n return async (...args: unknown[]) => {\n let result = await fn(...args);\n\n for (let i = 0; result !== skip && i < fns.length; ++i) {\n // eslint-disable-next-line no-await-in-loop\n result = await fns[i]?.(result);\n }\n\n return result;\n };\n}\n\n/**\n * Pipe the input and output of functions.\n *\n * @param fn - parameter-taking function\n * @param fns - subsequent piped functions\n * @returns\n */\nconst pipe = pipeSync as PipeMultiSync & {\n async: PipeMultiAsync;\n};\n\npipe.async = pipeAsync;\n\n// TODO: use the one from ts-toolbelt (broken atm since ts 4.1)\nexport declare type PipeMultiSync = {\n <R0, P extends any[]>(...fns: [FunctionLike<P, R0>]): FunctionLike<P, R0>;\n <R0, R1, P extends any[]>(\n ...fns: [FunctionLike<P, R0>, FunctionLike<[R0], R1>]\n ): FunctionLike<P, R1>;\n <R0, R1, R2, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[R0], R1>,\n FunctionLike<[R1], R2>\n ]\n ): FunctionLike<P, R2>;\n <R0, R1, R2, R3, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[R0], R1>,\n FunctionLike<[R1], R2>,\n FunctionLike<[R2], R3>\n ]\n ): FunctionLike<P, R3>;\n <R0, R1, R2, R3, R4, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[R0], R1>,\n FunctionLike<[R1], R2>,\n FunctionLike<[R2], R3>,\n FunctionLike<[R3], R4>\n ]\n ): FunctionLike<P, R4>;\n <R0, R1, R2, R3, R4, R5, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[R0], R1>,\n FunctionLike<[R1], R2>,\n FunctionLike<[R2], R3>,\n FunctionLike<[R3], R4>,\n FunctionLike<[R4], R5>\n ]\n ): FunctionLike<P, R5>;\n <R0, R1, R2, R3, R4, R5, R6, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[R0], R1>,\n FunctionLike<[R1], R2>,\n FunctionLike<[R2], R3>,\n FunctionLike<[R3], R4>,\n FunctionLike<[R4], R5>,\n FunctionLike<[R5], R6>\n ]\n ): FunctionLike<P, R6>;\n <R0, R1, R2, R3, R4, R5, R6, R7, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[R0], R1>,\n FunctionLike<[R1], R2>,\n FunctionLike<[R2], R3>,\n FunctionLike<[R3], R4>,\n FunctionLike<[R4], R5>,\n FunctionLike<[R5], R6>,\n FunctionLike<[R6], R7>\n ]\n ): FunctionLike<P, R7>;\n <R0, R1, R2, R3, R4, R5, R6, R7, R8, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[R0], R1>,\n FunctionLike<[R1], R2>,\n FunctionLike<[R2], R3>,\n FunctionLike<[R3], R4>,\n FunctionLike<[R4], R5>,\n FunctionLike<[R5], R6>,\n FunctionLike<[R6], R7>,\n FunctionLike<[R7], R8>\n ]\n ): FunctionLike<P, R8>;\n <R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[R0], R1>,\n FunctionLike<[R1], R2>,\n FunctionLike<[R2], R3>,\n FunctionLike<[R3], R4>,\n FunctionLike<[R4], R5>,\n FunctionLike<[R5], R6>,\n FunctionLike<[R6], R7>,\n FunctionLike<[R7], R8>,\n FunctionLike<[R8], R9>\n ]\n ): FunctionLike<P, R9>;\n};\n\nexport declare type PipeMultiAsync = {\n <R0, P extends any[]>(\n ...fns: [FunctionLike<P, R0>]\n ): FunctionLike<P, Promise<Await<R0>>>;\n <R0, R1, P extends any[]>(\n ...fns: [FunctionLike<P, R0>, FunctionLike<[Await<R0>], R1>]\n ): FunctionLike<P, Promise<Await<R1>>>;\n <R0, R1, R2, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[Await<R0>], R1>,\n FunctionLike<[Await<R1>], R2>\n ]\n ): FunctionLike<P, Promise<Await<R2>>>;\n <R0, R1, R2, R3, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[Await<R0>], R1>,\n FunctionLike<[Await<R1>], R2>,\n FunctionLike<[Await<R2>], R3>\n ]\n ): FunctionLike<P, Promise<Await<R3>>>;\n <R0, R1, R2, R3, R4, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[Await<R0>], R1>,\n FunctionLike<[Await<R1>], R2>,\n FunctionLike<[Await<R2>], R3>,\n FunctionLike<[Await<R3>], R4>\n ]\n ): FunctionLike<P, Promise<Await<R4>>>;\n <R0, R1, R2, R3, R4, R5, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[Await<R0>], R1>,\n FunctionLike<[Await<R1>], R2>,\n FunctionLike<[Await<R2>], R3>,\n FunctionLike<[Await<R3>], R4>,\n FunctionLike<[Await<R4>], R5>\n ]\n ): FunctionLike<P, Promise<Await<R5>>>;\n <R0, R1, R2, R3, R4, R5, R6, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[Await<R0>], R1>,\n FunctionLike<[Await<R1>], R2>,\n FunctionLike<[Await<R2>], R3>,\n FunctionLike<[Await<R3>], R4>,\n FunctionLike<[Await<R4>], R5>,\n FunctionLike<[Await<R5>], R6>\n ]\n ): FunctionLike<P, Promise<Await<R6>>>;\n <R0, R1, R2, R3, R4, R5, R6, R7, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[Await<R0>], R1>,\n FunctionLike<[Await<R1>], R2>,\n FunctionLike<[Await<R2>], R3>,\n FunctionLike<[Await<R3>], R4>,\n FunctionLike<[Await<R4>], R5>,\n FunctionLike<[Await<R5>], R6>,\n FunctionLike<[Await<R6>], R7>\n ]\n ): FunctionLike<P, Promise<Await<R7>>>;\n <R0, R1, R2, R3, R4, R5, R6, R7, R8, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[Await<R0>], R1>,\n FunctionLike<[Await<R1>], R2>,\n FunctionLike<[Await<R2>], R3>,\n FunctionLike<[Await<R3>], R4>,\n FunctionLike<[Await<R4>], R5>,\n FunctionLike<[Await<R5>], R6>,\n FunctionLike<[Await<R6>], R7>,\n FunctionLike<[Await<R7>], R8>\n ]\n ): FunctionLike<P, Promise<Await<R8>>>;\n <R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, P extends any[]>(\n ...fns: [\n FunctionLike<P, R0>,\n FunctionLike<[Await<R0>], R1>,\n FunctionLike<[Await<R1>], R2>,\n FunctionLike<[Await<R2>], R3>,\n FunctionLike<[Await<R3>], R4>,\n FunctionLike<[Await<R4>], R5>,\n FunctionLike<[Await<R5>], R6>,\n FunctionLike<[Await<R6>], R7>,\n FunctionLike<[Await<R7>], R8>,\n FunctionLike<[Await<R8>], R9>\n ]\n ): FunctionLike<P, Promise<Await<R9>>>;\n};\n\nexport { pipe };\n"]}
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  writeLog
3
- } from "./chunk-YIAZ64WG.js";
3
+ } from "./chunk-ZQ5NVDFP.js";
4
4
  import {
5
5
  __name,
6
6
  __require
7
- } from "./chunk-3GQAWCBQ.js";
7
+ } from "./chunk-WCQVDF3K.js";
8
8
 
9
9
  // src/plugins/deps-check.ts
10
10
  import { builtinModules } from "node:module";
@@ -99,3 +99,4 @@ ${JSON.stringify(filteredMissingDeps)}
99
99
  export {
100
100
  depsCheckPlugin
101
101
  };
102
+ //# sourceMappingURL=chunk-7U3F23ZZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/plugins/deps-check.ts"],"sourcesContent":["/*-------------------------------------------------------------------\n\n ⚡ Storm Software - Storm Stack\n\n This code was released as part of the Storm Stack project. Storm Stack\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/storm-ops\n Documentation: https://stormsoftware.com/projects/storm-ops/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/storm-ops/license\n\n -------------------------------------------------------------------*/\n\nimport type * as esbuild from \"esbuild\";\nimport { builtinModules } from \"node:module\";\nimport path from \"node:path\";\nimport { writeLog } from \"../utilities/log\";\n\n// packages that aren't detected but used\n// TODO: these could be scoped at the root\nconst unusedIgnore = [\n // these are our dev dependencies\n /@types\\/.*?/,\n /@typescript-eslint.*?/,\n /eslint.*?/,\n \"esbuild\",\n \"husky\",\n \"is-ci\",\n \"lint-staged\",\n \"prettier\",\n \"typescript\",\n \"ts-node\",\n \"ts-jest\",\n \"@swc/core\",\n \"@swc/jest\",\n \"jest\",\n\n // these are missing 3rd party deps\n \"spdx-exceptions\",\n \"spdx-license-ids\",\n\n // type-only, so it is not detected\n \"ts-toolbelt\",\n\n // these are indirectly used by build\n \"buffer\"\n];\n\n// packages that aren't missing but are detected\nconst missingIgnore = [\".prisma\", \"@prisma/client\", \"ts-toolbelt\"];\n\n/**\n * Checks for unused and missing dependencies.\n */\nexport const depsCheckPlugin = (bundle?: boolean): esbuild.Plugin => ({\n name: \"storm:deps-check\",\n setup(build) {\n // we load the package.json of the project do do our analysis\n const pkgJsonPath = path.join(process.cwd(), \"package.json\");\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const pkgContents = require(pkgJsonPath) as Record<string, object>;\n const regDependencies = Object.keys(pkgContents[\"dependencies\"] ?? {});\n const devDependencies = Object.keys(pkgContents[\"devDependencies\"] ?? {});\n const peerDependencies = Object.keys(pkgContents[\"peerDependencies\"] ?? {});\n const dependencies = [\n ...regDependencies,\n ...(bundle ? devDependencies : [])\n ];\n\n // we prepare to collect dependencies that are only packages\n const collectedDependencies = new Set<string>();\n const onlyPackages = /^[^./](?!:)|^\\.[^./]|^\\.\\.[^/]/;\n build.onResolve({ filter: onlyPackages }, args => {\n // we limit this search to the parent folder, don't go back\n if (args.importer.includes(process.cwd())) {\n // handle cases where there is extra path @org/pkg/folder\n if (args.path[0] === \"@\") {\n // we have a package that lives in org's scope, trim it\n const [org, pkg] = args.path.split(\"/\");\n collectedDependencies.add(`${org}/${pkg}`);\n } else {\n // we have a regular package without scope, we trim it\n const [pkg] = args.path.split(\"/\");\n collectedDependencies.add(pkg!);\n }\n }\n\n return { external: true }; // we don't care for the bundling\n });\n\n build.onEnd(() => {\n // we take all the dependencies that aren't collected and are native\n const unusedDependencies = [...dependencies].filter(dep => {\n return !collectedDependencies.has(dep) || builtinModules.includes(dep);\n });\n\n // we take all the collected deps that aren't deps and aren't native\n const missingDependencies = [...collectedDependencies].filter(dep => {\n return !dependencies.includes(dep) && !builtinModules.includes(dep);\n });\n\n // we exclude the deps that match our unusedIgnore patterns\n const filteredUnusedDeps = unusedDependencies.filter(dep => {\n return !unusedIgnore.some(pattern => dep.match(pattern));\n });\n\n // we exclude the deps that match our unusedIgnore patterns\n const filteredMissingDeps = missingDependencies.filter(dep => {\n return (\n !missingIgnore.some(pattern => dep.match(pattern)) &&\n !peerDependencies.includes(dep)\n );\n });\n\n writeLog(\n \"warn\",\n `unusedDependencies: ${JSON.stringify(filteredUnusedDeps)}`\n );\n writeLog(\n \"warn\",\n `missingDependencies: ${JSON.stringify(filteredMissingDeps)}`\n );\n\n if (filteredMissingDeps.length > 0) {\n throw new Error(`Missing dependencies detected - please install them:\n${JSON.stringify(filteredMissingDeps)}\n`);\n }\n });\n }\n});\n"],"mappings":";;;;;;;;;AAkBA,SAASA,sBAAsB;AAC/B,OAAOC,UAAU;AAKjB,IAAMC,eAAe;;EAEnB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;;EAGA;;EAGA;;AAIF,IAAMC,gBAAgB;EAAC;EAAW;EAAkB;;AAK7C,IAAMC,kBAAkB,wBAACC,YAAsC;EACpEC,MAAM;EACNC,MAAMC,OAAK;AAET,UAAMC,cAAcC,KAAKC,KAAKC,QAAQC,IAAG,GAAI,cAAA;AAE7C,UAAMC,cAAcC,UAAQN,WAAAA;AAC5B,UAAMO,kBAAkBC,OAAOC,KAAKJ,YAAY,cAAA,KAAmB,CAAC,CAAA;AACpE,UAAMK,kBAAkBF,OAAOC,KAAKJ,YAAY,iBAAA,KAAsB,CAAC,CAAA;AACvE,U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AA,KACzC,CAACvB,iBAAiBS,SAASQ,GAAAA;MAE/B,CAAA;AAEAS,eACE,QACA,uBAAuBC,KAAKC,UAAUP,kBAAAA,CAAAA,EAAqB;AAE7DK,eACE,QACA,wBAAwBC,KAAKC,UAAUH,mBAAAA,CAAAA,EAAsB;AAG/D,UAAIA,oBAAoBI,SAAS,GAAG;AAClC,cAAM,IAAIC,MAAM;EACtBH,KAAKC,UAAUH,mBAAAA,CAAAA;CAChB;MACK;IACF,CAAA;EACF;AACF,IA5E+B;","names":["builtinModules","path","unusedIgnore","missingIgnore","depsCheckPlugin","bundle","name","setup","build","pkgJsonPath","path","join","process","cwd","pkgContents","require","regDependencies","Object","keys","devDependencies","peerDependencies","dependencies","collectedDependencies","Set","onlyPackages","onResolve","filter","args","importer","includes","org","pkg","split","add","external","onEnd","unusedDependencies","dep","has","builtinModules","missingDependencies","filteredUnusedDeps","some","pattern","match","filteredMissingDeps","writeLog","JSON","stringify","length","Error"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
3
 
4
- var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
4
+ var _chunkWGEGR3DFcjs = require('./chunk-WGEGR3DF.cjs');
5
5
 
6
6
  // src/plugins/resolve-paths.ts
7
7
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
@@ -19,16 +19,16 @@ function resolvePathsConfig(options, cwd) {
19
19
  if (options.extends) {
20
20
  const extendsPath = _path2.default.resolve(cwd, options.extends);
21
21
  const extendsDir = _path2.default.dirname(extendsPath);
22
- const extendsConfig = _chunkBGYQAVKQcjs.__require.call(void 0, extendsPath);
22
+ const extendsConfig = _chunkWGEGR3DFcjs.__require.call(void 0, extendsPath);
23
23
  return resolvePathsConfig(extendsConfig, extendsDir);
24
24
  }
25
25
  return [];
26
26
  }
27
- _chunkBGYQAVKQcjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
27
+ _chunkWGEGR3DFcjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
28
28
  var resolvePathsPlugin = {
29
29
  name: "storm:resolve-paths",
30
30
  setup(build) {
31
- const parentTsConfig = _chunkBGYQAVKQcjs.__require.call(void 0, `${process.cwd()}/${build.initialOptions.tsconfig}`);
31
+ const parentTsConfig = _chunkWGEGR3DFcjs.__require.call(void 0, `${process.cwd()}/${build.initialOptions.tsconfig}`);
32
32
  const resolvedTsPaths = resolvePathsConfig(parentTsConfig, process.cwd());
33
33
  const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
34
34
  build.onResolve({
@@ -50,3 +50,4 @@ var resolvePathsPlugin = {
50
50
 
51
51
 
52
52
  exports.resolvePathsPlugin = resolvePathsPlugin;
53
+ //# sourceMappingURL=chunk-BF5W6GVP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/chunk-BF5W6GVP.cjs","../src/plugins/resolve-paths.ts"],"names":["resolvePathsConfig","options","cwd","compilerOptions","paths","Object","entries","resolvedPaths","map","key","v","path","resolve","fromEntries","extends","extendsPath","extendsDir","dirname","extendsConfig","require","resolvePathsPlugin","name","setup","build","parentTsConfig","packagesRegex","args","external"],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACaA,wEAAiB;AAgBjB,SAASA,kBAAAA,CAAmBC,OAAAA,EAAmBC,GAAAA,EAAW;AACxD,EAAA,GAA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AAGc,IAAA;AAAUyB,MAAAA;AAAiBC,IAAAA;AAChBC,MAAAA;AAChB,QAAA;AAAahB,UAAAA;AAAgB,UAAA;AAAK,QAAA;AAC3C,MAAA;AAEO,MAAA;AAAgCA,QAAAA;AAAoB,MAAA;AAC7D,IAAA;AACF,EAAA;AACF;ADnCsC;AACA;AACA;AACA","file":"/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/chunk-BF5W6GVP.cjs","sourcesContent":[null,"/*-------------------------------------------------------------------\n\n ⚡ Storm Software - Storm Stack\n\n This code was released as part of the Storm Stack project. Storm Stack\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/storm-ops\n Documentation: https://stormsoftware.com/projects/storm-ops/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/storm-ops/license\n\n -------------------------------------------------------------------*/\n\nimport type * as esbuild from \"esbuild\";\nimport path from \"node:path\";\n\ntype TsConfig = {\n compilerOptions?: {\n paths?: Record<string, string[]>;\n };\n extends?: string;\n};\n\n/**\n * Recursive function to resolve the paths config from a tsconfig.json, whether\n * it is in the config directly or via an inherited config (via \"extends\").\n * @param options\n * @param cwd\n * @returns\n */\nfunction resolvePathsConfig(options: TsConfig, cwd: string) {\n if (options?.compilerOptions?.paths) {\n const paths = Object.entries(options.compilerOptions.paths);\n\n const resolvedPaths = paths.map(([key, paths]) => {\n return [key, paths.map(v => path.resolve(cwd, v))] as const;\n });\n\n return Object.fromEntries(resolvedPaths);\n }\n\n if (options.extends) {\n const extendsPath = path.resolve(cwd, options.extends);\n const extendsDir = path.dirname(extendsPath);\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const extendsConfig = require(extendsPath);\n\n return resolvePathsConfig(extendsConfig, extendsDir);\n }\n\n return [];\n}\n\n/**\n * Forces `esbuild` to always use the TS compiler paths, even when we are\n * bundling a local dependency of a local dependency, ensuring maximum\n * tree-shaking. Note: `esbuild` has some support for this, though it is limited\n * in the amount of dependency nesting it supports.\n */\nexport const resolvePathsPlugin: esbuild.Plugin = {\n name: \"storm:resolve-paths\",\n setup(build) {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const parentTsConfig = require(\n `${process.cwd()}/${build.initialOptions.tsconfig}`\n );\n const resolvedTsPaths = resolvePathsConfig(parentTsConfig, process.cwd());\n const packagesRegex = new RegExp(\n `^(${Object.keys(resolvedTsPaths).join(\"|\")})$`\n );\n\n build.onResolve({ filter: packagesRegex }, args => {\n if (build.initialOptions.external?.includes(args.path)) {\n return { path: args.path, external: true };\n }\n\n return { path: `${resolvedTsPaths[args.path][0]}/index.ts` };\n });\n }\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeLog
3
- } from "./chunk-YIAZ64WG.js";
3
+ } from "./chunk-ZQ5NVDFP.js";
4
4
 
5
5
  // src/plugins/on-error.ts
6
6
  var onErrorPlugin = {
@@ -20,3 +20,4 @@ ${result.errors.map((error) => error.text).join("\n")}
20
20
  export {
21
21
  onErrorPlugin
22
22
  };
23
+ //# sourceMappingURL=chunk-CMF37LBT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/plugins/on-error.ts"],"sourcesContent":["/*-------------------------------------------------------------------\n\n ⚡ Storm Software - Storm Stack\n\n This code was released as part of the Storm Stack project. Storm Stack\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/storm-ops\n Documentation: https://stormsoftware.com/projects/storm-ops/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/storm-ops/license\n\n -------------------------------------------------------------------*/\n\nimport type * as esbuild from \"esbuild\";\nimport { writeLog } from \"../utilities\";\n\n/**\n * Causes esbuild to exit immediately with an error code.\n */\nexport const onErrorPlugin: esbuild.Plugin = {\n name: \"storm:on-error\",\n setup(build) {\n build.onEnd(result => {\n // if there were errors found on the build\n if (result.errors.length > 0 && process.env.WATCH !== \"true\") {\n writeLog(\n \"error\",\n `The following errors occurred during the build:\n${result.errors.map(error => error.text).join(\"\\n\")}\n`\n );\n\n throw new Error(\"ESBuild process failed with errors.\");\n }\n });\n }\n};\n"],"mappings":";;;;;AAuBO,IAAMA,gBAAgC;EAC3CC,MAAM;EACNC,MAAMC,OAAK;AACTA,UAAMC,MAAMC,CAAAA,WAAAA;AAEV,UAAIA,OAAOC,OAAOC,SAAS,KAAKC,QAAQC,IAAIC,UAAU,QAAQ;AAC5DC,iBACE,SACA;EACRN,OAAOC,OAAOM,IAAIC,CAAAA,UAASA,MAAMC,IAAI,EAAEC,KAAK,IAAA,CAAA;CAC7C;AAGO,cAAM,IAAIC,MAAM,qCAAA;MAClB;IACF,CAAA;EACF;AACF;","names":["onErrorPlugin","name","setup","build","onEnd","result","errors","length","process","env","WATCH","writeLog","map","error","text","join","Error"]}
@@ -37,3 +37,4 @@ var adapterConfig = [
37
37
 
38
38
 
39
39
  exports.DEFAULT_BUILD_OPTIONS = DEFAULT_BUILD_OPTIONS; exports.adapterConfig = adapterConfig;
40
+ //# sourceMappingURL=chunk-D5PRB2E2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/chunk-D5PRB2E2.cjs","../src/config.ts"],"names":["DEFAULT_BUILD_OPTIONS","platform","target","logLevel","tsconfig","metafile","adapterConfig","name","format","bundle","entryPoints","outExtension","emitTypes"],"mappings":"AAAA;ACmBO,IAAMA,sBAAAA,EAAwB;ADjBrC,ECkBEC,QAAAA,EAAU,MAAA;ADjBZ,ECkBEC,MAAAA,EAAQ,QAAA;ADjBV,ECkBEC,QAAAA,EAAU,OAAA;ADjBZ,ECkBEC,QAAAA,EAAU,eAAA;ADjBZ,ECkBEC,QAAAA,EAAU;AACZ,CAAA;AAEO,IAAMC,cAAAA,EAAuD;ADlBpE,ECmBE;ADlBF,ICmBIC,IAAAA,EAAM,KAAA;ADlBV,ICmBIC,MAAAA,EAAQ,KAAA;ADlBZ,ICmBIC,MAAAA,EAAQ,IAAA;ADlBZ,ICmBIC,WAAAA,EAAa;ADlBjB,MCkBkB;ADjBlB,IAAI,CAAC;AACL,ICiBIC,YAAAA,EAAc;ADhBlB,MCgBoB,KAAA,EAAO;ADf3B,ICeiC,CAAA;ADdjC,ICeIC,SAAAA,EAAW;ADdf,ECeE,CAAA;ADdF,ECeE;ADdF,ICeIL,IAAAA,EAAM,KAAA;ADdV,ICeIC,MAAAA,EAAQ,KAAA;ADdZ,ICeIC,MAAAA,EAAQ,IAAA;ADdZ,ICeIC,WAAAA,EAAa;ADdjB,MCckB;ADblB,IAAI,CAAC;AACL,ICaIC,YAAAA,EAAc;ADZlB,MCYoB,KAAA,EAAO;ADX3B,ICWkC,CAAA;ADVlC,ICWIC,SAAAA,EAAW;ADVf,ECWE;ADVF,CAAC;AACD;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/storm-ops/storm-ops/packages/esbuild/dist/chunk-D5PRB2E2.cjs","sourcesContent":[null,"/*-------------------------------------------------------------------\n\n ⚡ Storm Software - Storm Stack\n\n This code was released as part of the Storm Stack project. Storm Stack\n is maintained by Storm Software under the Apache-2.0 License, and is\n free for commercial and private use. For more information, please visit\n our licensing page.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/storm-ops\n Documentation: https://stormsoftware.com/projects/storm-ops/docs\n Contact: https://stormsoftware.com/contact\n License: https://stormsoftware.com/projects/storm-ops/license\n\n -------------------------------------------------------------------*/\n\nimport { ESBuildOptions } from \"./types\";\n\nexport const DEFAULT_BUILD_OPTIONS = {\n platform: \"node\",\n target: \"ES2021\",\n logLevel: \"error\",\n tsconfig: \"tsconfig.json\",\n metafile: true\n} as const;\n\nexport const adapterConfig: Omit<ESBuildOptions, \"projectRoot\">[] = [\n {\n name: \"cjs\",\n format: \"cjs\",\n bundle: true,\n entryPoints: [\"src/index.ts\"],\n outExtension: { \".js\": \".js\" },\n emitTypes: true\n },\n {\n name: \"esm\",\n format: \"esm\",\n bundle: true,\n entryPoints: [\"src/index.ts\"],\n outExtension: { \".js\": \".mjs\" },\n emitTypes: true\n }\n];\n"]}