@storm-software/unbuild 0.3.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 (49) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +276 -0
  3. package/dist/build.cjs +12 -0
  4. package/dist/build.cjs.map +1 -0
  5. package/dist/build.d.cts +15 -0
  6. package/dist/build.d.ts +15 -0
  7. package/dist/build.js +12 -0
  8. package/dist/build.js.map +1 -0
  9. package/dist/chunk-2D6P3CYT.js +30 -0
  10. package/dist/chunk-2D6P3CYT.js.map +1 -0
  11. package/dist/chunk-2RW67XSV.js +35 -0
  12. package/dist/chunk-2RW67XSV.js.map +1 -0
  13. package/dist/chunk-55SAPUWC.cjs +287 -0
  14. package/dist/chunk-55SAPUWC.cjs.map +1 -0
  15. package/dist/chunk-5O4CMGE3.js +39 -0
  16. package/dist/chunk-5O4CMGE3.js.map +1 -0
  17. package/dist/chunk-5TZKA5S2.cjs +35 -0
  18. package/dist/chunk-5TZKA5S2.cjs.map +1 -0
  19. package/dist/chunk-M363ZMBF.cjs +33 -0
  20. package/dist/chunk-M363ZMBF.cjs.map +1 -0
  21. package/dist/chunk-MUYXFAKB.cjs +1 -0
  22. package/dist/chunk-MUYXFAKB.cjs.map +1 -0
  23. package/dist/chunk-OEV7OJT7.cjs +39 -0
  24. package/dist/chunk-OEV7OJT7.cjs.map +1 -0
  25. package/dist/chunk-QNDLJ2W7.js +1 -0
  26. package/dist/chunk-QNDLJ2W7.js.map +1 -0
  27. package/dist/chunk-RPYRKRTK.js +33 -0
  28. package/dist/chunk-RPYRKRTK.js.map +1 -0
  29. package/dist/chunk-TOVAFM3V.js +287 -0
  30. package/dist/chunk-TOVAFM3V.js.map +1 -0
  31. package/dist/chunk-WCQVDF3K.js +14 -0
  32. package/dist/chunk-WCQVDF3K.js.map +1 -0
  33. package/dist/chunk-WGEGR3DF.cjs +14 -0
  34. package/dist/chunk-WGEGR3DF.cjs.map +1 -0
  35. package/dist/chunk-YII2QWOA.cjs +30 -0
  36. package/dist/chunk-YII2QWOA.cjs.map +1 -0
  37. package/dist/index.cjs +13 -0
  38. package/dist/index.cjs.map +1 -0
  39. package/dist/index.d.cts +6 -0
  40. package/dist/index.d.ts +6 -0
  41. package/dist/index.js +13 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/types.cjs +2 -0
  44. package/dist/types.cjs.map +1 -0
  45. package/dist/types.d.cts +1229 -0
  46. package/dist/types.d.ts +1229 -0
  47. package/dist/types.js +2 -0
  48. package/dist/types.js.map +1 -0
  49. package/package.json +203 -0
@@ -0,0 +1,287 @@
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
+
3
+ var _chunk5TZKA5S2cjs = require('./chunk-5TZKA5S2.cjs');
4
+
5
+
6
+ var _chunkM363ZMBFcjs = require('./chunk-M363ZMBF.cjs');
7
+
8
+
9
+ var _chunkYII2QWOAcjs = require('./chunk-YII2QWOA.cjs');
10
+
11
+
12
+ var _chunkOEV7OJT7cjs = require('./chunk-OEV7OJT7.cjs');
13
+
14
+
15
+ var _chunkWGEGR3DFcjs = require('./chunk-WGEGR3DF.cjs');
16
+
17
+ // src/build.ts
18
+ var _node = require('@humanfs/node');
19
+ var _devkit = require('@nx/devkit');
20
+ var _js = require('@nx/js');
21
+ var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
22
+ var _buildtools = require('@storm-software/build-tools');
23
+ var _configtools = require('@storm-software/config-tools');
24
+ var _deepmerge = require('deepmerge'); var _deepmerge2 = _interopRequireDefault(_deepmerge);
25
+ var _path = require('path');
26
+ var _url = require('url');
27
+ var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
28
+ var _rollupplugintypescript2 = require('rollup-plugin-typescript2'); var _rollupplugintypescript22 = _interopRequireDefault(_rollupplugintypescript2);
29
+ var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
30
+ var _unbuild = require('unbuild');
31
+ async function resolveOptions(options) {
32
+ const projectRoot = options.projectRoot;
33
+ const workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
34
+ if (!workspaceRoot) {
35
+ throw new Error("Cannot find Nx workspace root");
36
+ }
37
+ if (options.configPath) {
38
+ const configFile = await loadConfig(options.configPath);
39
+ if (configFile) {
40
+ options = _deepmerge2.default.call(void 0, options, configFile);
41
+ }
42
+ }
43
+ const config = await _configtools.loadStormConfig.call(void 0, workspaceRoot.dir);
44
+ const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
45
+ exitOnError: true
46
+ });
47
+ const projectJsonPath = _devkit.joinPathFragments.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
48
+ if (!await _node.hfs.isFile(projectJsonPath)) {
49
+ throw new Error("Cannot find project.json configuration");
50
+ }
51
+ const projectJson = await _node.hfs.json(projectJsonPath);
52
+ const projectName = projectJson.name;
53
+ const packageJsonPath = _devkit.joinPathFragments.call(void 0, workspaceRoot.dir, projectRoot, "package.json");
54
+ if (!await _node.hfs.isFile(packageJsonPath)) {
55
+ throw new Error("Cannot find package.json configuration");
56
+ }
57
+ const packageJson = await _node.hfs.json(packageJsonPath);
58
+ let tsConfigPath = options.tsConfigPath;
59
+ if (!tsConfigPath) {
60
+ tsConfigPath = _devkit.joinPathFragments.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json");
61
+ }
62
+ if (!await _node.hfs.isFile(tsConfigPath)) {
63
+ throw new Error("Cannot find tsconfig.json configuration");
64
+ }
65
+ let sourceRoot = projectJson.sourceRoot;
66
+ if (!sourceRoot) {
67
+ sourceRoot = _devkit.joinPathFragments.call(void 0, projectRoot, "src");
68
+ }
69
+ if (!await _node.hfs.isDirectory(sourceRoot)) {
70
+ throw new Error("Cannot find sourceRoot directory");
71
+ }
72
+ const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
73
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _ => _.projects, 'optionalAccess', _2 => _2[projectName]])) {
74
+ 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.");
75
+ }
76
+ const nxJsonPath = _devkit.joinPathFragments.call(void 0, config.workspaceRoot, "nx.json");
77
+ if (!await _node.hfs.isFile(nxJsonPath)) {
78
+ throw new Error("Cannot find Nx workspace configuration");
79
+ }
80
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _3 => _3.projects, 'optionalAccess', _4 => _4[projectName]])) {
81
+ 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.");
82
+ }
83
+ const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
84
+ let dependencies = result.dependencies;
85
+ const tsLibDependency = _js.getHelperDependency.call(void 0, _js.HelperDependency.tsc, tsConfigPath, dependencies, projectGraph, true);
86
+ if (tsLibDependency) {
87
+ dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
88
+ dependencies.push(tsLibDependency);
89
+ }
90
+ const resolvedOptions = {
91
+ name: projectName,
92
+ config,
93
+ workspaceRoot,
94
+ projectRoot,
95
+ sourceRoot,
96
+ projectName,
97
+ tsConfigPath,
98
+ clean: false,
99
+ entries: [
100
+ {
101
+ builder: "mkdist",
102
+ input: `.${sourceRoot.replace(projectRoot, "")}`,
103
+ outDir: _path.join.call(void 0, _path.relative.call(void 0, _path.join.call(void 0, workspaceRoot.dir, projectRoot), workspaceRoot.dir).replaceAll("\\", "/"), options.outDir, "dist").replaceAll("\\", "/"),
104
+ declaration: true,
105
+ format: "esm"
106
+ },
107
+ {
108
+ builder: "mkdist",
109
+ input: `.${sourceRoot.replace(projectRoot, "")}`,
110
+ outDir: _path.join.call(void 0, _path.relative.call(void 0, _path.join.call(void 0, workspaceRoot.dir, projectRoot), workspaceRoot.dir).replaceAll("\\", "/"), options.outDir, "dist").replaceAll("\\", "/"),
111
+ declaration: true,
112
+ format: "cjs",
113
+ ext: "cjs"
114
+ }
115
+ ],
116
+ declaration: "compatible",
117
+ failOnWarn: false,
118
+ hooks: {
119
+ "rollup:options": /* @__PURE__ */ _chunkWGEGR3DFcjs.__name.call(void 0, async (ctx, opts) => {
120
+ opts.plugins = [
121
+ _chunk5TZKA5S2cjs.analyzePlugin.call(void 0, ),
122
+ _chunkYII2QWOAcjs.swcPlugin.call(void 0, ),
123
+ ..._nullishCoalesce(opts.plugins, () => ( [])),
124
+ _rollupplugintypescript22.default.call(void 0, {
125
+ check: true,
126
+ tsconfig: tsConfigPath,
127
+ tsconfigOverride: {
128
+ compilerOptions: await createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies)
129
+ }
130
+ }),
131
+ _chunkOEV7OJT7cjs.typeDefinitions.call(void 0, {
132
+ projectRoot
133
+ }),
134
+ _chunkM363ZMBFcjs.onErrorPlugin.call(void 0, )
135
+ ];
136
+ }, "rollup:options")
137
+ },
138
+ sourcemap: _nullishCoalesce(options.sourcemap, () => ( true)),
139
+ outDir: options.outDir,
140
+ stub: false,
141
+ stubOptions: {
142
+ jiti: {}
143
+ },
144
+ externals: [],
145
+ dependencies: [],
146
+ peerDependencies: [],
147
+ devDependencies: [],
148
+ alias: {},
149
+ replace: {},
150
+ rollup: {
151
+ replace: {},
152
+ alias: {},
153
+ json: {},
154
+ commonjs: {
155
+ sourceMap: _nullishCoalesce(options.sourcemap, () => ( true))
156
+ },
157
+ emitCJS: true,
158
+ cjsBridge: true,
159
+ dts: {
160
+ respectExternal: true,
161
+ tsconfig: tsConfigPath
162
+ },
163
+ output: {
164
+ banner: options.banner,
165
+ footer: options.footer
166
+ },
167
+ resolve: {
168
+ preferBuiltins: true,
169
+ extensions: [
170
+ ".cjs",
171
+ ".mjs",
172
+ ".js",
173
+ ".jsx",
174
+ ".ts",
175
+ ".tsx",
176
+ ".json"
177
+ ]
178
+ },
179
+ esbuild: {
180
+ minify: !!options.minify,
181
+ treeShaking: true,
182
+ color: true,
183
+ logLevel: config.logLevel === _configtools.LogLevelLabel.FATAL ? _configtools.LogLevelLabel.ERROR : config.logLevel === _configtools.LogLevelLabel.ALL || config.logLevel === _configtools.LogLevelLabel.TRACE ? "verbose" : config.logLevel
184
+ }
185
+ }
186
+ };
187
+ dependencies = dependencies.filter((dep) => dep.node.type === "npm" || dep.node.type === "lib" || dep.node.type === "app");
188
+ if (dependencies.length > 0) {
189
+ resolvedOptions.dependencies = dependencies.map((dep) => dep.name);
190
+ }
191
+ if (packageJson.devDependencies) {
192
+ resolvedOptions.devDependencies = Object.keys(packageJson.devDependencies);
193
+ }
194
+ if (packageJson.peerDependencies) {
195
+ resolvedOptions.peerDependencies = Object.keys(packageJson.peerDependencies);
196
+ }
197
+ if (options.rollup) {
198
+ let rollup = {};
199
+ if (typeof options.rollup === "string") {
200
+ const rollupFile = await loadConfig(options.rollup);
201
+ if (rollupFile) {
202
+ rollup = rollupFile;
203
+ }
204
+ } else {
205
+ rollup = options.rollup;
206
+ }
207
+ resolvedOptions.rollup = _deepmerge2.default.call(void 0, _nullishCoalesce(resolvedOptions.rollup, () => ( {})), rollup);
208
+ }
209
+ return resolvedOptions;
210
+ }
211
+ _chunkWGEGR3DFcjs.__name.call(void 0, resolveOptions, "resolveOptions");
212
+ async function loadConfig(configPath) {
213
+ if (!/\.(js|mjs)$/.test(_path.extname.call(void 0, configPath))) {
214
+ throw new Error("Unsupported config file format");
215
+ }
216
+ return Promise.resolve().then(() => _interopRequireWildcard(require(_url.pathToFileURL.call(void 0, configPath).toString()))).then((config) => config.default);
217
+ }
218
+ _chunkWGEGR3DFcjs.__name.call(void 0, loadConfig, "loadConfig");
219
+ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
220
+ const tsConfigFile = _typescript2.default.readConfigFile(_devkit.joinPathFragments.call(void 0, config.workspaceRoot, projectRoot, tsConfigPath), _typescript2.default.sys.readFile);
221
+ const tsConfig = _typescript2.default.parseJsonConfigFileContent(tsConfigFile.config, _typescript2.default.sys, _path.dirname.call(void 0, _devkit.joinPathFragments.call(void 0, config.workspaceRoot, projectRoot, tsConfigPath)));
222
+ const compilerOptions = {
223
+ rootDir: projectRoot,
224
+ declaration: true,
225
+ paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
226
+ };
227
+ _configtools.writeTrace.call(void 0, compilerOptions, config);
228
+ return compilerOptions;
229
+ }
230
+ _chunkWGEGR3DFcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
231
+ var generatePackageJson = /* @__PURE__ */ _chunkWGEGR3DFcjs.__name.call(void 0, async (options) => {
232
+ if (options.generatePackageJson !== false) {
233
+ const packageJsonPath = _devkit.joinPathFragments.call(void 0, options.projectRoot, "project.json");
234
+ if (!await _node.hfs.isFile(packageJsonPath)) {
235
+ throw new Error("Cannot find package.json configuration");
236
+ }
237
+ let packageJson = await _node.hfs.json(_devkit.joinPathFragments.call(void 0, options.workspaceRoot.dir, options.projectRoot, "package.json"));
238
+ if (!packageJson) {
239
+ throw new Error("Cannot find package.json configuration file");
240
+ }
241
+ packageJson = await _buildtools.addPackageDependencies.call(void 0, options.workspaceRoot.dir, options.projectRoot, options.projectName, packageJson);
242
+ packageJson = await _buildtools.addWorkspacePackageJsonFields.call(void 0, options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
243
+ packageJson = await _buildtools.addPackageJsonExports.call(void 0, options.sourceRoot, packageJson);
244
+ await _devkit.writeJsonFile.call(void 0, _devkit.joinPathFragments.call(void 0, options.outDir, "package.json"), packageJson);
245
+ }
246
+ return options;
247
+ }, "generatePackageJson");
248
+ async function executeUnbuild(options) {
249
+ const stopwatch = _configtools.getStopwatch.call(void 0, `${options.projectRoot} build`);
250
+ _configtools.writeInfo.call(void 0, `\u{1F4E6} Building ${options.name} (${options.projectRoot})...`, options.config);
251
+ await _unbuild.build.call(void 0, options.projectRoot, false, {
252
+ ...options,
253
+ rootDir: options.projectRoot
254
+ }).finally(() => {
255
+ stopwatch();
256
+ });
257
+ return options;
258
+ }
259
+ _chunkWGEGR3DFcjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
260
+ async function copyBuildAssets(options) {
261
+ await _buildtools.copyAssets.call(void 0, options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.projectName, options.sourceRoot, options.generatePackageJson, options.includeSrc);
262
+ return options;
263
+ }
264
+ _chunkWGEGR3DFcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
265
+ function reportResults(options) {
266
+ _configtools.writeSuccess.call(void 0, `The ${options.name} build completed successfully`, options.config);
267
+ }
268
+ _chunkWGEGR3DFcjs.__name.call(void 0, reportResults, "reportResults");
269
+ async function build(options) {
270
+ const stopwatch = _configtools.getStopwatch.call(void 0, "full build");
271
+ try {
272
+ const resolvedOptions = await resolveOptions(options);
273
+ await generatePackageJson(resolvedOptions);
274
+ await executeUnbuild(resolvedOptions);
275
+ await copyBuildAssets(resolvedOptions);
276
+ reportResults(resolvedOptions);
277
+ } catch (error) {
278
+ _configtools.writeFatal.call(void 0, "Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
279
+ }
280
+ stopwatch();
281
+ }
282
+ _chunkWGEGR3DFcjs.__name.call(void 0, build, "build");
283
+
284
+
285
+
286
+ exports.build = build;
287
+ //# sourceMappingURL=chunk-55SAPUWC.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-55SAPUWC.cjs","../src/build.ts"],"names":["resolveOptions","options","projectRoot","workspaceRoot","findWorkspaceRoot","Error","configPath","configFile","loadConfig","merge","config","loadStormConfig","dir","projectGraph","createProjectGraphAsync","exitOnError","projectJsonPath","joinPathFragments","hfs","isFile","projectJson","json","projectName","name","packageJsonPath","packageJson","tsConfigPath","sourceRoot","isDirectory","projectConfigurations","readProjectsConfigurationFromProjectGraph","projects","nxJsonPath","result","calculateProjectBuildableDependencies","undefined","process","env","NX_TASK_TARGET_TARGET","NX_TASK_TARGET_CONFIGURATION","dependencies","tsLibDependency","getHelperDependency","HelperDependency","tsc","filter","deps","push","resolvedOptions","clean","entries","builder","input","replace","ctx","analyzePlugin","swcPlugin","createTsCompilerOptions","onErrorPlugin","outDir","banner","footer","minify","FATAL","type","dep","rollup","rollupFile","then","tsConfigFile","compilerOptions","stopwatch","executeUnbuild","copyBuildAssets","reportResults","build"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACCA,qCAAoB;AACpB,oCAKO;AACP,4BAAsD;AACtD,2EAIO;AACP,yDAKO;AAEP,2DAQO;AACP,4FAAiC;AAEjC,4BAAiD;AACjD,0BAA8B;AAC9B,qEAAkC;AAElC,sJAAqB;AACrB,gGAAe;AACf,kCAKO;AAeP,MAAA,SAAeA,cAAAA,CACbC,OAAAA,EAAuB;AAEvB,EAAA,MAAMC,YAAAA,EAAcD,OAAAA,CAAQC,WAAAA;AAE5B,EAAA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EAAA;AAE9BA,IAAAA;AAEJ,EAAA;AAEoB,EAAA;AACJ,IAAA;AAC0B,IAAA;AACMyC,MAAAA;AAC5B,MAAA;AACLC,QAAAA;AACX,MAAA;AACK,IAAA;AACYD,MAAAA;AACnB,IAAA;AAE+CA,IAAAA;AACjD,EAAA;AAEOlB,EAAAA;AACT;AAjQehD;AAuQK;AAE4B,EAAA;AAC5B,IAAA;AAClB,EAAA;AACoDoE,EAAAA;AAGtD;AATe5D;AAabkB;AAKET,EAAAA;AAIAoD,EAAAA;AAKsB,EAAA;AACbnE,IAAAA;AACI,IAAA;AACgCsC,IAAAA;AAC/C,EAAA;AAC4B9B,EAAAA;AAErB4D,EAAAA;AACT;AAxBeb;AA0Ba;AACiB,EAAA;AAE/BvD,IAAAA;AAGgC,IAAA;AACxB,MAAA;AAClB,IAAA;AAIID,IAAAA;AAKc,IAAA;AACA,MAAA;AAClB,IAAA;AAGUE,IAAAA;AAORF,IAAAA;AAQgD0B,IAAAA;AAGtBgC,IAAAA;AAG9B,EAAA;AAEO1D,EAAAA;AA7CmB;AAmDiC;AACN,EAAA;AAElBA,EAAAA;AAIO,EAAA;AACrCA,IAAAA;AACcC,IAAAA;AACO,EAAA;AACxBqE,IAAAA;AACF,EAAA;AAEOtE,EAAAA;AACT;AAfeuE;AAoB+C;AAGxC,EAAA;AASbvE,EAAAA;AACT;AAbewE;AAkBuC;AAE/B,EAAA;AAGvB;AALSC;AAa0C;AAClB,EAAA;AAE3B,EAAA;AAC2CzE,IAAAA;AACnB+C,IAAAA;AACLA,IAAAA;AACCA,IAAAA;AAERA,IAAAA;AACA,EAAA;AAEZ,IAAA;AAEJ,EAAA;AAEAuB,EAAAA;AACF;AAjBsBI;ADjMiC;AACA;AACA;AACA","file":"/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-55SAPUWC.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 { getHelperDependency, HelperDependency } from \"@nx/js\";\nimport {\n calculateProjectBuildableDependencies,\n computeCompilerOptionsPaths,\n DependentBuildableProjectNode\n} from \"@nx/js/src/utils/buildable-libs-utils\";\nimport {\n addPackageDependencies,\n addPackageJsonExports,\n addWorkspacePackageJsonFields,\n copyAssets\n} from \"@storm-software/build-tools\";\nimport { StormConfig } from \"@storm-software/config\";\nimport {\n getStopwatch,\n loadStormConfig,\n LogLevelLabel,\n writeFatal,\n writeInfo,\n writeSuccess,\n writeTrace\n} from \"@storm-software/config-tools\";\nimport { default as merge } from \"deepmerge\";\nimport { LogLevel } from \"esbuild\";\nimport { dirname, extname, join, relative } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { findWorkspaceRoot } from \"nx/src/utils/find-workspace-root\";\nimport type { InputPluginOption } from \"rollup\";\nimport tsPlugin from \"rollup-plugin-typescript2\";\nimport ts from \"typescript\";\nimport {\n BuildConfig,\n BuildContext,\n RollupBuildOptions,\n build as unbuild\n} from \"unbuild\";\nimport { analyzePlugin } from \"./plugins/analyze-plugin\";\nimport { onErrorPlugin } from \"./plugins/on-error\";\nimport { swcPlugin } from \"./plugins/swc-plugin\";\nimport { typeDefinitions } from \"./plugins/type-definitions\";\nimport type { UnbuildOptions, UnbuildResolvedOptions } from \"./types\";\n\n/**\n * Get the build options for the unbuild process\n *\n * @param config - the storm configuration\n * @param options - the unbuild options\n * @param packageJson - the package.json\n * @param projectGraph - the project graph\n */\nasync function resolveOptions(\n options: UnbuildOptions\n): Promise<UnbuildResolvedOptions> {\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 if (options.configPath) {\n const configFile = await loadConfig(options.configPath as string);\n if (configFile) {\n options = merge(options, configFile) as UnbuildOptions;\n }\n }\n\n const config = await loadStormConfig(workspaceRoot.dir);\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 packageJsonPath = joinPathFragments(\n workspaceRoot.dir,\n projectRoot,\n \"package.json\"\n );\n if (!(await hfs.isFile(packageJsonPath))) {\n throw new Error(\"Cannot find package.json configuration\");\n }\n\n const packageJson = await hfs.json(packageJsonPath);\n\n let tsConfigPath = options.tsConfigPath;\n if (!tsConfigPath) {\n tsConfigPath = joinPathFragments(\n workspaceRoot.dir,\n projectRoot,\n \"tsconfig.json\"\n );\n }\n\n if (!(await hfs.isFile(tsConfigPath))) {\n throw new Error(\"Cannot find tsconfig.json configuration\");\n }\n\n let sourceRoot = projectJson.sourceRoot;\n if (!sourceRoot) {\n sourceRoot = joinPathFragments(projectRoot, \"src\");\n }\n\n if (!(await hfs.isDirectory(sourceRoot))) {\n throw new Error(\"Cannot find sourceRoot directory\");\n }\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 nxJsonPath = joinPathFragments(config.workspaceRoot, \"nx.json\");\n if (!(await hfs.isFile(nxJsonPath))) {\n throw new Error(\"Cannot find Nx workspace configuration\");\n }\n\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 result = calculateProjectBuildableDependencies(\n undefined,\n projectGraph,\n workspaceRoot.dir,\n projectName,\n process.env.NX_TASK_TARGET_TARGET || \"build\",\n process.env.NX_TASK_TARGET_CONFIGURATION || \"production\",\n true\n );\n let dependencies = result.dependencies;\n\n const tsLibDependency = getHelperDependency(\n HelperDependency.tsc,\n tsConfigPath,\n dependencies,\n projectGraph,\n true\n );\n if (tsLibDependency) {\n dependencies = dependencies.filter(\n deps => deps.name !== tsLibDependency.name\n );\n dependencies.push(tsLibDependency);\n }\n\n const resolvedOptions = {\n name: projectName,\n config,\n workspaceRoot,\n projectRoot,\n sourceRoot,\n projectName,\n tsConfigPath,\n clean: false,\n entries: [\n {\n builder: \"mkdist\",\n input: `.${sourceRoot.replace(projectRoot, \"\")}`,\n outDir: join(\n relative(\n join(workspaceRoot.dir, projectRoot),\n workspaceRoot.dir\n ).replaceAll(\"\\\\\", \"/\"),\n options.outDir,\n \"dist\"\n ).replaceAll(\"\\\\\", \"/\"),\n declaration: true,\n format: \"esm\"\n },\n {\n builder: \"mkdist\",\n input: `.${sourceRoot.replace(projectRoot, \"\")}`,\n outDir: join(\n relative(\n join(workspaceRoot.dir, projectRoot),\n workspaceRoot.dir\n ).replaceAll(\"\\\\\", \"/\"),\n options.outDir,\n \"dist\"\n ).replaceAll(\"\\\\\", \"/\"),\n declaration: true,\n format: \"cjs\",\n ext: \"cjs\"\n }\n ],\n declaration: \"compatible\",\n failOnWarn: false,\n hooks: {\n \"rollup:options\": async (ctx: BuildContext, opts: any) => {\n opts.plugins = [\n analyzePlugin(),\n swcPlugin(),\n ...((opts.plugins ?? []) as InputPluginOption[]),\n tsPlugin({\n check: true,\n tsconfig: tsConfigPath,\n tsconfigOverride: {\n compilerOptions: await createTsCompilerOptions(\n config,\n tsConfigPath,\n projectRoot,\n dependencies\n )\n }\n }),\n typeDefinitions({ projectRoot }),\n onErrorPlugin()\n ];\n }\n },\n sourcemap: options.sourcemap ?? true,\n outDir: options.outDir,\n stub: false,\n stubOptions: {\n jiti: {}\n },\n externals: [],\n dependencies: [] as string[],\n peerDependencies: [] as string[],\n devDependencies: [] as string[],\n alias: {},\n replace: {},\n rollup: {\n replace: {},\n alias: {},\n json: {},\n commonjs: {\n sourceMap: options.sourcemap ?? true\n },\n emitCJS: true,\n cjsBridge: true,\n dts: {\n respectExternal: true,\n tsconfig: tsConfigPath\n },\n output: {\n banner: options.banner,\n footer: options.footer\n },\n resolve: {\n preferBuiltins: true,\n extensions: [\".cjs\", \".mjs\", \".js\", \".jsx\", \".ts\", \".tsx\", \".json\"]\n },\n esbuild: {\n minify: !!options.minify,\n treeShaking: true,\n color: true,\n logLevel: (config.logLevel === LogLevelLabel.FATAL\n ? LogLevelLabel.ERROR\n : config.logLevel === LogLevelLabel.ALL ||\n config.logLevel === LogLevelLabel.TRACE\n ? \"verbose\"\n : config.logLevel) as LogLevel\n }\n }\n };\n\n dependencies = dependencies.filter(\n dep =>\n dep.node.type === \"npm\" ||\n dep.node.type === \"lib\" ||\n dep.node.type === \"app\"\n );\n if (dependencies.length > 0) {\n resolvedOptions.dependencies = dependencies.map(dep => dep.name);\n }\n if (packageJson.devDependencies) {\n resolvedOptions.devDependencies = Object.keys(packageJson.devDependencies);\n }\n if (packageJson.peerDependencies) {\n resolvedOptions.peerDependencies = Object.keys(\n packageJson.peerDependencies\n );\n }\n\n if (options.rollup) {\n let rollup = {};\n if (typeof options.rollup === \"string\") {\n const rollupFile = await loadConfig(options.rollup as string);\n if (rollupFile) {\n rollup = rollupFile;\n }\n } else {\n rollup = options.rollup;\n }\n\n resolvedOptions.rollup = merge(resolvedOptions.rollup ?? {}, rollup);\n }\n\n return resolvedOptions as any;\n}\n\n/**\n * Load a rolldown configuration file\n */\nasync function loadConfig(\n configPath: string\n): Promise<RollupBuildOptions | undefined> {\n if (!/\\.(js|mjs)$/.test(extname(configPath))) {\n throw new Error(\"Unsupported config file format\");\n }\n return import(pathToFileURL(configPath).toString()).then(\n config => config.default\n );\n}\n\nasync function createTsCompilerOptions(\n config: StormConfig,\n tsConfigPath: string,\n projectRoot: string,\n dependencies?: DependentBuildableProjectNode[]\n) {\n const tsConfigFile = ts.readConfigFile(\n joinPathFragments(config.workspaceRoot, projectRoot, tsConfigPath),\n ts.sys.readFile\n );\n const tsConfig = ts.parseJsonConfigFileContent(\n tsConfigFile.config,\n ts.sys,\n dirname(joinPathFragments(config.workspaceRoot, projectRoot, tsConfigPath))\n );\n\n const compilerOptions = {\n rootDir: projectRoot,\n declaration: true,\n paths: computeCompilerOptionsPaths(tsConfig, dependencies ?? [])\n };\n writeTrace(compilerOptions, config);\n\n return compilerOptions;\n}\n\nconst generatePackageJson = async (options: UnbuildResolvedOptions) => {\n if (options.generatePackageJson !== false) {\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 options.config,\n options.projectRoot,\n options.sourceRoot,\n options.projectName,\n false,\n packageJson\n );\n\n packageJson = await addPackageJsonExports(options.sourceRoot, packageJson);\n\n await writeJsonFile(\n joinPathFragments(options.outDir, \"package.json\"),\n packageJson\n );\n }\n\n return options;\n};\n\n/**\n * Execute esbuild with all the configurations we pass\n */\nasync function executeUnbuild(options: UnbuildResolvedOptions) {\n const stopwatch = getStopwatch(`${options.projectRoot} build`);\n writeInfo(\n `📦 Building ${options.name} (${options.projectRoot})...`,\n options.config\n );\n\n await unbuild(options.projectRoot, false, {\n ...options,\n rootDir: options.projectRoot\n } as BuildConfig).finally(() => {\n stopwatch();\n });\n\n return options;\n}\n\n/**\n * Copy the assets to the build directory\n */\nasync function copyBuildAssets(options: UnbuildResolvedOptions) {\n await copyAssets(\n options.config,\n options.assets ?? [],\n options.outDir,\n options.projectRoot,\n options.projectName,\n options.sourceRoot,\n options.generatePackageJson,\n options.includeSrc\n );\n\n return options;\n}\n\n/**\n * Report the results of the build\n */\nfunction reportResults(options: UnbuildResolvedOptions) {\n writeSuccess(\n `The ${options.name} build completed successfully`,\n options.config\n );\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: UnbuildOptions) {\n const stopwatch = getStopwatch(\"full build\");\n\n try {\n const resolvedOptions = await resolveOptions(options);\n await generatePackageJson(resolvedOptions);\n await executeUnbuild(resolvedOptions);\n await copyBuildAssets(resolvedOptions);\n\n reportResults(resolvedOptions);\n } catch (error) {\n writeFatal(\n \"Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.\"\n );\n }\n\n stopwatch();\n}\n"]}
@@ -0,0 +1,39 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-WCQVDF3K.js";
4
+
5
+ // src/plugins/type-definitions.ts
6
+ import { relative } from "node:path";
7
+ function typeDefinitions(options) {
8
+ return {
9
+ name: "storm:dts-bundle",
10
+ async generateBundle(_opts, bundle) {
11
+ for (const file of Object.values(bundle)) {
12
+ if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
13
+ continue;
14
+ }
15
+ const hasDefaultExport = file.exports.includes("default");
16
+ const entrySourceFileName = relative(options.projectRoot, file.facadeModuleId);
17
+ const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
18
+ const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
19
+ const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
20
+ const dtsFileSource = hasDefaultExport ? `
21
+ export * from ${relativeSourceDtsName};
22
+ export { default } from ${relativeSourceDtsName};
23
+ ` : `export * from ${relativeSourceDtsName};
24
+ `;
25
+ this.emitFile({
26
+ type: "asset",
27
+ fileName: dtsFileName,
28
+ source: dtsFileSource
29
+ });
30
+ }
31
+ }
32
+ };
33
+ }
34
+ __name(typeDefinitions, "typeDefinitions");
35
+
36
+ export {
37
+ typeDefinitions
38
+ };
39
+ //# sourceMappingURL=chunk-5O4CMGE3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/plugins/type-definitions.ts"],"sourcesContent":["// nx-ignore-next-line\nimport { relative } from \"node:path\";\nimport type { OutputBundle } from \"rollup\"; // only used for types\n\n/*\n * This plugin takes all entry-points from the generated bundle and creates a\n * bundled version of corresponding d.ts files.\n *\n * For example, `src/index.ts` generates two corresponding files:\n * - `dist/xyz/index.js`\n * - `dist/xyz/src/index.d.ts`\n *\n * We want a third file: `dist/index.d.ts` that re-exports from `src/index.d.ts`.\n * That way, when TSC or IDEs look for types, it will find them in the right place.\n */\nexport function typeDefinitions(options: { projectRoot: string }) {\n return {\n name: \"storm:dts-bundle\",\n async generateBundle(_opts: unknown, bundle: OutputBundle): Promise<void> {\n for (const file of Object.values(bundle)) {\n if (\n file.type === \"asset\" ||\n !file.isEntry ||\n file.facadeModuleId == null\n ) {\n continue;\n }\n\n const hasDefaultExport = file.exports.includes(\"default\");\n const entrySourceFileName = relative(\n options.projectRoot,\n file.facadeModuleId\n );\n const entrySourceDtsName = entrySourceFileName.replace(\n /\\.[cm]?[jt]sx?$/,\n \"\"\n );\n const dtsFileName = file.fileName.replace(/\\.[cm]?js$/, \".d.ts\");\n const relativeSourceDtsName = JSON.stringify(\"./\" + entrySourceDtsName);\n const dtsFileSource = hasDefaultExport\n ? `\nexport * from ${relativeSourceDtsName};\nexport { default } from ${relativeSourceDtsName};\n `\n : `export * from ${relativeSourceDtsName};\\n`;\n\n this.emitFile({\n type: \"asset\",\n fileName: dtsFileName,\n source: dtsFileSource\n });\n }\n }\n };\n}\n"],"mappings":";;;;;AACA,SAASA,gBAAgB;AAclB,SAASC,gBAAgBC,SAAgC;AAC9D,SAAO;IACLC,MAAM;IACN,MAAMC,eAAeC,OAAgBC,QAAoB;AACvD,iBAAWC,QAAQC,OAAOC,OAAOH,MAAAA,GAAS;AACxC,YACEC,KAAKG,SAAS,WACd,CAACH,KAAKI,WACNJ,KAAKK,kBAAkB,MACvB;AACA;QACF;AAEA,cAAMC,mBAAmBN,KAAKO,QAAQC,SAAS,SAAA;AAC/C,cAAMC,sBAAsBC,SAC1Bf,QAAQgB,aACRX,KAAKK,cAAc;AAErB,cAAMO,qBAAqBH,oBAAoBI,QAC7C,mBACA,EAAA;AAEF,cAAMC,cAAcd,KAAKe,SAASF,QAAQ,cAAc,OAAA;AACxD,cAAMG,wBAAwBC,KAAKC,UAAU,OAAON,kBAAAA;AACpD,cAAMO,gBAAgBb,mBAClB;gBACIU,qBAAAA;0BACUA,qBAAAA;gBAEd,iBAAiBA,qBAAAA;;AAErB,aAAKI,SAAS;UACZjB,MAAM;UACNY,UAAUD;UACVO,QAAQF;QACV,CAAA;MACF;IACF;EACF;AACF;AAvCgBzB;","names":["relative","typeDefinitions","options","name","generateBundle","_opts","bundle","file","Object","values","type","isEntry","facadeModuleId","hasDefaultExport","exports","includes","entrySourceFileName","relative","projectRoot","entrySourceDtsName","replace","dtsFileName","fileName","relativeSourceDtsName","JSON","stringify","dtsFileSource","emitFile","source"]}
@@ -0,0 +1,35 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkWGEGR3DFcjs = require('./chunk-WGEGR3DF.cjs');
4
+
5
+ // src/plugins/analyze-plugin.ts
6
+ var _configtools = require('@storm-software/config-tools');
7
+ var formatBytes = /* @__PURE__ */ _chunkWGEGR3DFcjs.__name.call(void 0, (bytes) => {
8
+ if (bytes === 0) return "0 Byte";
9
+ const k = 1e3;
10
+ const dm = 3;
11
+ const sizes = [
12
+ "Bytes",
13
+ "KB",
14
+ "MB",
15
+ "GB"
16
+ ];
17
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
18
+ return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
19
+ }, "formatBytes");
20
+ function analyzePlugin() {
21
+ return {
22
+ name: "storm:analyzer",
23
+ renderChunk(source, chunk) {
24
+ const sourceBytes = formatBytes(source.length);
25
+ const fileName = chunk.fileName;
26
+ _configtools.writeInfo.call(void 0, ` ${fileName} ${sourceBytes}`);
27
+ }
28
+ };
29
+ }
30
+ _chunkWGEGR3DFcjs.__name.call(void 0, analyzePlugin, "analyzePlugin");
31
+
32
+
33
+
34
+ exports.analyzePlugin = analyzePlugin;
35
+ //# sourceMappingURL=chunk-5TZKA5S2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-5TZKA5S2.cjs","../src/plugins/analyze-plugin.ts"],"names":["formatBytes","bytes","k","dm","sizes","i","Math","floor","log","analyzePlugin","renderChunk","writeInfo"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACJA,2DAA0B;AAE1B,IAAMA,YAAAA,kBAAcC,sCAAAA,CAAAA,KAAAA,EAAAA,GAAAA;AAClB,EAAA,GAAA,CAAIA,MAAAA,IAAU,CAAA,EAAG,OAAO,QAAA;AACxB,EAAA,MAAMC,EAAAA,EAAI,GAAA;AACV,EAAA,MAAMC,GAAAA,EAAK,CAAA;AACX,EAAA,MAAMC,MAAAA,EAAQ;ADKhB,ICLiB,OAAA;ADMjB,ICN0B,IAAA;ADO1B,ICPgC,IAAA;ADQhC,ICRsC;ADStC,EAAE,CAAC;ACRD,EAAA,MAAMC,EAAAA,EAAIC,IAAAA,CAAKC,KAAAA,CAAMD,IAAAA,CAAKE,GAAAA,CAAIP,KAAAA,EAAAA,EAASK,IAAAA,CAAKE,GAAAA,CAAIN,CAAAA,CAAAA,CAAAA;AAChD,EAAA,OAAO,CAAA,EAAA;AANWD;AASJQ;AACP,EAAA;AACC,IAAA;AACNC,IAAAA;AACE,MAAA;AACA,MAAA;AAEAC,MAAAA;AACF,IAAA;AACF,EAAA;AACF;AAVgBF;ADmBN;AACA;AACA;AACA","file":"/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-5TZKA5S2.cjs","sourcesContent":[null,"import { writeInfo } from \"@storm-software/config-tools\";\n\nconst formatBytes = bytes => {\n if (bytes === 0) return \"0 Byte\";\n const k = 1000;\n const dm = 3;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;\n};\n\nexport function analyzePlugin() {\n return {\n name: \"storm:analyzer\",\n renderChunk(source, chunk) {\n const sourceBytes = formatBytes(source.length);\n const fileName = chunk.fileName;\n\n writeInfo(` ${fileName} ${sourceBytes}`);\n }\n };\n}\n"]}
@@ -0,0 +1,33 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkWGEGR3DFcjs = require('./chunk-WGEGR3DF.cjs');
4
+
5
+ // src/plugins/on-error.ts
6
+ var _configtools = require('@storm-software/config-tools');
7
+ function onErrorPlugin() {
8
+ return {
9
+ name: "storm:on-error",
10
+ buildEnd(error) {
11
+ if (error) {
12
+ _configtools.writeError.call(void 0, `The following errors occurred during the build:
13
+ ${error ? error.message : "Unknown error"}
14
+
15
+ `);
16
+ throw new Error("ESBuild process failed with errors.");
17
+ }
18
+ },
19
+ renderError(error) {
20
+ _configtools.writeError.call(void 0, `The following errors occurred during the build:
21
+ ${error ? error.message : "Unknown error"}
22
+
23
+ `);
24
+ throw new Error("ESBuild process failed with errors.");
25
+ }
26
+ };
27
+ }
28
+ _chunkWGEGR3DFcjs.__name.call(void 0, onErrorPlugin, "onErrorPlugin");
29
+
30
+
31
+
32
+ exports.onErrorPlugin = onErrorPlugin;
33
+ //# sourceMappingURL=chunk-M363ZMBF.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-M363ZMBF.cjs","../src/plugins/on-error.ts"],"names":["onErrorPlugin","name","buildEnd","error","writeError","message","Error","renderError"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACaA,2DAA2B;AAMpB,SAASA,aAAAA,CAAAA,EAAAA;AACd,EAAA,OAAO;ADhBT,ICiBIC,IAAAA,EAAM,gBAAA;ADhBV,ICiBIC,QAAAA,CAASC,KAAAA,EAAyB;AAChC,MAAA,GAAA,CAAIA,KAAAA,EAAO;AACTC,QAAAA,qCAAAA,CACE;ADjBV,IAAI,ECkBED,MAAAA,EAAQA,KAAAA,CAAME,QAAAA,EAAU,eAAA,CAAA;ADjB9B;AACA,IAAI,CCkBC,CAAA;AAGG,QAAA,MAAM,IAAIC,KAAAA,CAAM,qCAAA,CAAA;ADnBxB,MCoBM;ADnBN,ICoBI,CAAA;ADnBJ,ICoBIC,WAAAA,CAAYJ,KAAAA,EAAyB;AACnCC,MAAAA,qCAAAA,CACE;ADpBR,EAAE,ECqBED,MAAAA,EAAQA,KAAAA,CAAME,QAAAA,EAAU,eAAA,CAAA;ADpB5B;AACA,EAAE,CCqBC,CAAA;AAGG,MAAA,MAAM,IAAIC,KAAAA,CAAM,qCAAA,CAAA;ADtBtB,ICuBI;ADtBJ,ECuBE,CAAA;AACF;AA1BgBN,sCAAAA,aAAAA,EAAAA,eAAAA,CAAAA;ADKhB;AACA;AACE;AACF,sCAAC","file":"/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-M363ZMBF.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 { writeError } from \"@storm-software/config-tools\";\nimport type { Plugin } from \"rollup\";\n\n/**\n * Causes rollup to exit immediately with an error code.\n */\nexport function onErrorPlugin(): Plugin {\n return {\n name: \"storm:on-error\",\n buildEnd(error?: Error | undefined) {\n if (error) {\n writeError(\n `The following errors occurred during the build:\n ${error ? error.message : \"Unknown error\"}\n\n `\n );\n\n throw new Error(\"ESBuild process failed with errors.\");\n }\n },\n renderError(error?: Error | undefined) {\n writeError(\n `The following errors occurred during the build:\n ${error ? error.message : \"Unknown error\"}\n\n `\n );\n\n throw new Error(\"ESBuild process failed with errors.\");\n }\n }\n};\n"]}
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=chunk-MUYXFAKB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-MUYXFAKB.cjs"],"names":[],"mappings":"AAAA","file":"/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-MUYXFAKB.cjs"}
@@ -0,0 +1,39 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkWGEGR3DFcjs = require('./chunk-WGEGR3DF.cjs');
4
+
5
+ // src/plugins/type-definitions.ts
6
+ var _path = require('path');
7
+ function typeDefinitions(options) {
8
+ return {
9
+ name: "storm:dts-bundle",
10
+ async generateBundle(_opts, bundle) {
11
+ for (const file of Object.values(bundle)) {
12
+ if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
13
+ continue;
14
+ }
15
+ const hasDefaultExport = file.exports.includes("default");
16
+ const entrySourceFileName = _path.relative.call(void 0, options.projectRoot, file.facadeModuleId);
17
+ const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
18
+ const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
19
+ const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
20
+ const dtsFileSource = hasDefaultExport ? `
21
+ export * from ${relativeSourceDtsName};
22
+ export { default } from ${relativeSourceDtsName};
23
+ ` : `export * from ${relativeSourceDtsName};
24
+ `;
25
+ this.emitFile({
26
+ type: "asset",
27
+ fileName: dtsFileName,
28
+ source: dtsFileSource
29
+ });
30
+ }
31
+ }
32
+ };
33
+ }
34
+ _chunkWGEGR3DFcjs.__name.call(void 0, typeDefinitions, "typeDefinitions");
35
+
36
+
37
+
38
+ exports.typeDefinitions = typeDefinitions;
39
+ //# sourceMappingURL=chunk-OEV7OJT7.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-OEV7OJT7.cjs","../src/plugins/type-definitions.ts"],"names":["typeDefinitions","options","name","generateBundle","_opts","bundle","file","Object","values","type","isEntry","facadeModuleId","hasDefaultExport","exports","includes","entrySourceFileName","relative","projectRoot","entrySourceDtsName","replace","dtsFileName","fileName","relativeSourceDtsName","JSON","stringify","dtsFileSource","emitFile","source"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACHA,4BAAyB;AAclB,SAASA,eAAAA,CAAgBC,OAAAA,EAAgC;AAC9D,EAAA,OAAO;ADRT,ICSIC,IAAAA,EAAM,kBAAA;ADRV,ICSI,MAAMC,cAAAA,CAAeC,KAAAA,EAAgBC,MAAAA,EAAoB;AACvD,MAAA,IAAA,CAAA,MAAWC,KAAAA,GAAQC,MAAAA,CAAOC,MAAAA,CAAOH,MAAAA,CAAAA,EAAS;AACxC,QAAA,GAAA,CACEC,IAAAA,CAAKG,KAAAA,IAAS,QAAA,GACd,CAACH,IAAAA,CAAKI,QAAAA,GACNJ,IAAAA,CAAKK,eAAAA,GAAkB,IAAA,EACvB;AACA,UAAA,QAAA;ADZV,QCaQ;AAEA,QAAA,MAAMC,iBAAAA,EAAmBN,IAAAA,CAAKO,OAAAA,CAAQC,QAAAA,CAAS,SAAA,CAAA;AAC/C,QAAA,MAAMC,oBAAAA,EAAsBC,4BAAAA,OAC1Bf,CAAQgB,WAAAA,EACRX,IAAAA,CAAKK,cAAc,CAAA;AAErB,QAAA,MAAMO,mBAAAA,EAAqBH,mBAAAA,CAAoBI,OAAAA,CAC7C,iBAAA,EACA,EAAA,CAAA;AAEF,QAAA,MAAMC,YAAAA,EAAcd,IAAAA,CAAKe,QAAAA,CAASF,OAAAA,CAAQ,YAAA,EAAc,OAAA,CAAA;AACxD,QAAA,MAAMG,sBAAAA,EAAwBC,IAAAA,CAAKC,SAAAA,CAAU,KAAA,EAAON,kBAAAA,CAAAA;AACpD,QAAA,MAAMO,cAAAA,EAAgBb,iBAAAA,EAClB,CAAA;ADpBZ,cAAc,ECqBEU,qBAAAA,CAAAA;ADpBhB,wBAAwB,ECqBEA,qBAAAA,CAAAA;ADpB1B,YAAY,EAAE,ECsBF,CAAA,cAAA,EAAiBA,qBAAAA,CAAAA;ADrB7B,CAAC;ACuBO,QAAA,IAAA,CAAKI,QAAAA,CAAS;ADrBtB,UCsBUjB,IAAAA,EAAM,OAAA;ADrBhB,UCsBUY,QAAAA,EAAUD,WAAAA;ADrBpB,UCsBUO,MAAAA,EAAQF;ADrBlB,QCsBQ,CAAA,CAAA;ADrBR,MCsBM;ADrBN,ICsBI;ADrBJ,ECsBE,CAAA;AACF;AAvCgBzB,sCAAAA,eAAAA,EAAAA,iBAAAA,CAAAA;ADmBhB;AACA;AACE;AACF,0CAAC","file":"/home/runner/work/storm-ops/storm-ops/packages/unbuild/dist/chunk-OEV7OJT7.cjs","sourcesContent":[null,"// nx-ignore-next-line\nimport { relative } from \"node:path\";\nimport type { OutputBundle } from \"rollup\"; // only used for types\n\n/*\n * This plugin takes all entry-points from the generated bundle and creates a\n * bundled version of corresponding d.ts files.\n *\n * For example, `src/index.ts` generates two corresponding files:\n * - `dist/xyz/index.js`\n * - `dist/xyz/src/index.d.ts`\n *\n * We want a third file: `dist/index.d.ts` that re-exports from `src/index.d.ts`.\n * That way, when TSC or IDEs look for types, it will find them in the right place.\n */\nexport function typeDefinitions(options: { projectRoot: string }) {\n return {\n name: \"storm:dts-bundle\",\n async generateBundle(_opts: unknown, bundle: OutputBundle): Promise<void> {\n for (const file of Object.values(bundle)) {\n if (\n file.type === \"asset\" ||\n !file.isEntry ||\n file.facadeModuleId == null\n ) {\n continue;\n }\n\n const hasDefaultExport = file.exports.includes(\"default\");\n const entrySourceFileName = relative(\n options.projectRoot,\n file.facadeModuleId\n );\n const entrySourceDtsName = entrySourceFileName.replace(\n /\\.[cm]?[jt]sx?$/,\n \"\"\n );\n const dtsFileName = file.fileName.replace(/\\.[cm]?js$/, \".d.ts\");\n const relativeSourceDtsName = JSON.stringify(\"./\" + entrySourceDtsName);\n const dtsFileSource = hasDefaultExport\n ? `\nexport * from ${relativeSourceDtsName};\nexport { default } from ${relativeSourceDtsName};\n `\n : `export * from ${relativeSourceDtsName};\\n`;\n\n this.emitFile({\n type: \"asset\",\n fileName: dtsFileName,\n source: dtsFileSource\n });\n }\n }\n };\n}\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-QNDLJ2W7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,33 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-WCQVDF3K.js";
4
+
5
+ // src/plugins/on-error.ts
6
+ import { writeError } from "@storm-software/config-tools";
7
+ function onErrorPlugin() {
8
+ return {
9
+ name: "storm:on-error",
10
+ buildEnd(error) {
11
+ if (error) {
12
+ writeError(`The following errors occurred during the build:
13
+ ${error ? error.message : "Unknown error"}
14
+
15
+ `);
16
+ throw new Error("ESBuild process failed with errors.");
17
+ }
18
+ },
19
+ renderError(error) {
20
+ writeError(`The following errors occurred during the build:
21
+ ${error ? error.message : "Unknown error"}
22
+
23
+ `);
24
+ throw new Error("ESBuild process failed with errors.");
25
+ }
26
+ };
27
+ }
28
+ __name(onErrorPlugin, "onErrorPlugin");
29
+
30
+ export {
31
+ onErrorPlugin
32
+ };
33
+ //# sourceMappingURL=chunk-RPYRKRTK.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 { writeError } from \"@storm-software/config-tools\";\nimport type { Plugin } from \"rollup\";\n\n/**\n * Causes rollup to exit immediately with an error code.\n */\nexport function onErrorPlugin(): Plugin {\n return {\n name: \"storm:on-error\",\n buildEnd(error?: Error | undefined) {\n if (error) {\n writeError(\n `The following errors occurred during the build:\n ${error ? error.message : \"Unknown error\"}\n\n `\n );\n\n throw new Error(\"ESBuild process failed with errors.\");\n }\n },\n renderError(error?: Error | undefined) {\n writeError(\n `The following errors occurred during the build:\n ${error ? error.message : \"Unknown error\"}\n\n `\n );\n\n throw new Error(\"ESBuild process failed with errors.\");\n }\n }\n};\n"],"mappings":";;;;;AAiBA,SAASA,kBAAkB;AAMpB,SAASC,gBAAAA;AACd,SAAO;IACLC,MAAM;IACNC,SAASC,OAAyB;AAChC,UAAIA,OAAO;AACTC,mBACE;MACJD,QAAQA,MAAME,UAAU,eAAA;;KAEzB;AAGG,cAAM,IAAIC,MAAM,qCAAA;MAClB;IACF;IACAC,YAAYJ,OAAyB;AACnCC,iBACE;IACJD,QAAQA,MAAME,UAAU,eAAA;;GAEzB;AAGG,YAAM,IAAIC,MAAM,qCAAA;IAClB;EACF;AACF;AA1BgBN;","names":["writeError","onErrorPlugin","name","buildEnd","error","writeError","message","Error","renderError"]}