@storm-software/esbuild 0.23.9 → 0.23.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/esbuild.cjs +1200 -0
- package/dist/build.cjs +10 -10
- package/dist/build.js +9 -9
- package/dist/{chunk-RIVOXICH.js → chunk-2TSSKHLN.js} +2 -2
- package/dist/{chunk-HXF5CHDH.js → chunk-4GN3UE2E.js} +5 -5
- package/dist/{chunk-2STSOOUQ.js → chunk-4GVXQR7U.js} +5 -5
- package/dist/{chunk-V747733R.cjs → chunk-7B5IS3JU.cjs} +3 -3
- package/dist/{chunk-4Q76YH6E.js → chunk-7BNTMCVO.js} +1 -1
- package/dist/{chunk-B2PY326H.js → chunk-GUU57L7S.js} +1 -1
- package/dist/{chunk-5A3PLYYB.js → chunk-HETBF2XF.js} +1 -1
- package/dist/{chunk-U2QMMQDA.cjs → chunk-OHR5DYDT.cjs} +66 -66
- package/dist/{chunk-XOY3T2ZQ.js → chunk-Q3LOGZKI.js} +1 -1
- package/dist/{chunk-JYZKDIZJ.js → chunk-RAOTNBZB.js} +1 -1
- package/dist/{chunk-5UODOOQA.cjs → chunk-SSEYS7LI.cjs} +2 -2
- package/dist/{chunk-ZQYP5TTV.cjs → chunk-TI4646CJ.cjs} +51 -51
- package/dist/{chunk-AP5TC7E5.cjs → chunk-TVEZYOW4.cjs} +2 -2
- package/dist/{chunk-CNHHELK6.cjs → chunk-URNZZJ4H.cjs} +3 -3
- package/dist/{chunk-YHAEJIC5.cjs → chunk-W7IOYOPN.cjs} +11 -11
- package/dist/chunk-XITTOHOG.cjs +135 -0
- package/dist/{chunk-MPZUORUA.cjs → chunk-YMPJ3GHZ.cjs} +4 -4
- package/dist/chunk-YMTDVMD6.js +135 -0
- package/dist/clean.cjs +4 -4
- package/dist/clean.d.cts +10 -10
- package/dist/clean.d.ts +10 -10
- package/dist/clean.js +3 -3
- package/dist/config.cjs +7 -7
- package/dist/config.js +6 -6
- package/dist/index.cjs +10 -10
- package/dist/index.js +9 -9
- package/dist/plugins/deps-check.cjs +4 -4
- package/dist/plugins/deps-check.js +3 -3
- package/dist/plugins/on-error.cjs +4 -4
- package/dist/plugins/on-error.js +3 -3
- package/dist/plugins/resolve-paths.cjs +3 -3
- package/dist/plugins/resolve-paths.js +2 -2
- package/dist/plugins/tsc.cjs +4 -4
- package/dist/plugins/tsc.js +3 -3
- package/package.json +7 -7
- package/dist/chunk-GHWCUMOG.cjs +0 -32
- package/dist/chunk-P4V2LVOO.js +0 -32
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7B5IS3JUcjs = require('./chunk-7B5IS3JU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -14,10 +14,10 @@ var _chunkV747733Rcjs = require('./chunk-V747733R.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkOHR5DYDTcjs = require('./chunk-OHR5DYDT.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkURNZZJ4Hcjs = require('./chunk-URNZZJ4H.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -27,10 +27,10 @@ var _chunkCNHHELK6cjs = require('./chunk-CNHHELK6.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkYMPJ3GHZcjs = require('./chunk-YMPJ3GHZ.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkXITTOHOGcjs = require('./chunk-XITTOHOG.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -278,13 +278,13 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
278
278
|
if (!workspaceRoot) {
|
|
279
279
|
throw new Error("Cannot find Nx workspace root");
|
|
280
280
|
}
|
|
281
|
-
const config = await
|
|
282
|
-
|
|
283
|
-
const stopwatch =
|
|
281
|
+
const config = await _chunkOHR5DYDTcjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
282
|
+
_chunkYMPJ3GHZcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
283
|
+
const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
284
284
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
285
285
|
exitOnError: true
|
|
286
286
|
});
|
|
287
|
-
const projectJsonPath =
|
|
287
|
+
const projectJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
288
288
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
289
289
|
throw new Error("Cannot find project.json configuration");
|
|
290
290
|
}
|
|
@@ -295,17 +295,17 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
295
295
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _14 => _14.projects, 'optionalAccess', _15 => _15[projectName]])) {
|
|
296
296
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
297
297
|
}
|
|
298
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
298
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkOHR5DYDTcjs.DEFAULT_BUILD_OPTIONS);
|
|
299
299
|
options.name ??= `${projectName}-${options.format}`;
|
|
300
|
-
options.target ??=
|
|
301
|
-
const packageJsonPath =
|
|
300
|
+
options.target ??= _chunkOHR5DYDTcjs.DEFAULT_TARGET;
|
|
301
|
+
const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
302
302
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
303
303
|
throw new Error("Cannot find package.json configuration");
|
|
304
304
|
}
|
|
305
305
|
const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
|
|
306
306
|
const packageJson = JSON.parse(packageJsonFile);
|
|
307
|
-
const outExtension =
|
|
308
|
-
const env =
|
|
307
|
+
const outExtension = _chunkOHR5DYDTcjs.getOutputExtensionMap.call(void 0, options, packageJson.type);
|
|
308
|
+
const env = _chunkOHR5DYDTcjs.getEnv.call(void 0, "esbuild", options);
|
|
309
309
|
const result = {
|
|
310
310
|
...options,
|
|
311
311
|
config,
|
|
@@ -323,20 +323,20 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
323
323
|
".node"
|
|
324
324
|
],
|
|
325
325
|
...userOptions,
|
|
326
|
-
tsconfig:
|
|
326
|
+
tsconfig: _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
327
327
|
format: options.format || "cjs",
|
|
328
|
-
entryPoints: await
|
|
328
|
+
entryPoints: await _chunkOHR5DYDTcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
329
329
|
"./src/index.ts"
|
|
330
330
|
], userOptions.emitOnAll),
|
|
331
|
-
outdir: userOptions.outputPath ||
|
|
331
|
+
outdir: userOptions.outputPath || _chunkXITTOHOGcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
332
332
|
plugins: [],
|
|
333
333
|
name: userOptions.name || projectName,
|
|
334
334
|
projectConfigurations,
|
|
335
335
|
projectName,
|
|
336
336
|
projectGraph,
|
|
337
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
337
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
338
338
|
minify: userOptions.minify || !userOptions.debug,
|
|
339
|
-
verbose: userOptions.verbose ||
|
|
339
|
+
verbose: userOptions.verbose || _chunkYMPJ3GHZcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
340
340
|
includeSrc: userOptions.includeSrc === true,
|
|
341
341
|
metafile: userOptions.metafile !== false,
|
|
342
342
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -350,8 +350,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
350
350
|
outExtension,
|
|
351
351
|
footer: userOptions.footer,
|
|
352
352
|
banner: {
|
|
353
|
-
js: options.banner ||
|
|
354
|
-
css: options.banner ||
|
|
353
|
+
js: options.banner || _chunkOHR5DYDTcjs.DEFAULT_COMPILED_BANNER,
|
|
354
|
+
css: options.banner || _chunkOHR5DYDTcjs.DEFAULT_COMPILED_BANNER
|
|
355
355
|
},
|
|
356
356
|
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
357
357
|
treeShaking: options.format === "esm",
|
|
@@ -372,33 +372,33 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
372
372
|
}, {})
|
|
373
373
|
},
|
|
374
374
|
inject: [
|
|
375
|
-
options.format === "cjs" && options.injectShims ?
|
|
376
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
375
|
+
options.format === "cjs" && options.injectShims ? _chunkXITTOHOGcjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
376
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkXITTOHOGcjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
377
377
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
378
378
|
].filter(Boolean)
|
|
379
379
|
};
|
|
380
|
-
result.plugins = _nullishCoalesce(userOptions.plugins, () => (
|
|
380
|
+
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunkOHR5DYDTcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
|
|
381
381
|
stopwatch();
|
|
382
382
|
return result;
|
|
383
383
|
}, "resolveOptions");
|
|
384
384
|
async function generatePackageJson(context2) {
|
|
385
|
-
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
386
|
-
|
|
387
|
-
const stopwatch =
|
|
388
|
-
const packageJsonPath =
|
|
385
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
386
|
+
_chunkYMPJ3GHZcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
387
|
+
const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
388
|
+
const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
389
389
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
390
390
|
throw new Error("Cannot find package.json configuration");
|
|
391
391
|
}
|
|
392
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
392
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
393
393
|
let packageJson = JSON.parse(packageJsonFile);
|
|
394
394
|
if (!packageJson) {
|
|
395
395
|
throw new Error("Cannot find package.json configuration file");
|
|
396
396
|
}
|
|
397
|
-
packageJson = await
|
|
398
|
-
packageJson = await
|
|
397
|
+
packageJson = await _chunkOHR5DYDTcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
398
|
+
packageJson = await _chunkOHR5DYDTcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
399
399
|
packageJson.exports ??= {};
|
|
400
400
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
401
|
-
packageJson.exports["."] ??=
|
|
401
|
+
packageJson.exports["."] ??= _chunkOHR5DYDTcjs.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
|
|
402
402
|
let entryPoints = [
|
|
403
403
|
{
|
|
404
404
|
in: "./src/index.ts",
|
|
@@ -416,7 +416,7 @@ async function generatePackageJson(context2) {
|
|
|
416
416
|
const split = entryPoint.out.split(".");
|
|
417
417
|
split.pop();
|
|
418
418
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
419
|
-
packageJson.exports[`./${entry}`] ??=
|
|
419
|
+
packageJson.exports[`./${entry}`] ??= _chunkOHR5DYDTcjs.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
@@ -428,7 +428,7 @@ async function generatePackageJson(context2) {
|
|
|
428
428
|
}
|
|
429
429
|
return ret;
|
|
430
430
|
}, packageJson.exports);
|
|
431
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
431
|
+
await _devkit.writeJsonFile.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
432
432
|
stopwatch();
|
|
433
433
|
}
|
|
434
434
|
return context2;
|
|
@@ -454,8 +454,8 @@ async function generateContext(getOptions) {
|
|
|
454
454
|
}
|
|
455
455
|
_chunkBGYQAVKQcjs.__name.call(void 0, generateContext, "generateContext");
|
|
456
456
|
async function executeEsBuild(context2) {
|
|
457
|
-
|
|
458
|
-
const stopwatch =
|
|
457
|
+
_chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
458
|
+
const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
459
459
|
if (process.env.WATCH === "true") {
|
|
460
460
|
const ctx = await esbuild.context(context2.options);
|
|
461
461
|
watch(ctx, context2.options);
|
|
@@ -471,9 +471,9 @@ async function executeEsBuild(context2) {
|
|
|
471
471
|
_chunkBGYQAVKQcjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
472
472
|
async function copyBuildAssets(context2) {
|
|
473
473
|
if (_optionalChain([context2, 'access', _16 => _16.result, 'optionalAccess', _17 => _17.errors, 'access', _18 => _18.length]) === 0) {
|
|
474
|
-
|
|
475
|
-
const stopwatch =
|
|
476
|
-
await
|
|
474
|
+
_chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
475
|
+
const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
476
|
+
await _chunkOHR5DYDTcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
477
477
|
stopwatch();
|
|
478
478
|
}
|
|
479
479
|
return context2;
|
|
@@ -482,9 +482,9 @@ _chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
482
482
|
async function reportResults(context2) {
|
|
483
483
|
if (_optionalChain([context2, 'access', _19 => _19.result, 'optionalAccess', _20 => _20.errors, 'access', _21 => _21.length]) === 0) {
|
|
484
484
|
if (context2.result.warnings.length > 0) {
|
|
485
|
-
|
|
485
|
+
_chunkYMPJ3GHZcjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
486
486
|
}
|
|
487
|
-
|
|
487
|
+
_chunkYMPJ3GHZcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
_chunkBGYQAVKQcjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -510,7 +510,7 @@ async function dependencyCheck(options) {
|
|
|
510
510
|
write: false,
|
|
511
511
|
outdir: "out",
|
|
512
512
|
plugins: [
|
|
513
|
-
|
|
513
|
+
_chunkURNZZJ4Hcjs.depsCheckPlugin.call(void 0, options.bundle)
|
|
514
514
|
]
|
|
515
515
|
});
|
|
516
516
|
await buildPromise.catch(() => {
|
|
@@ -520,17 +520,17 @@ async function dependencyCheck(options) {
|
|
|
520
520
|
_chunkBGYQAVKQcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
521
521
|
async function cleanOutputPath(context2) {
|
|
522
522
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
523
|
-
|
|
524
|
-
const stopwatch =
|
|
525
|
-
await
|
|
523
|
+
_chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
524
|
+
const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
525
|
+
await _chunk7B5IS3JUcjs.cleanDirectories.call(void 0, context2.options.name, context2.options.outdir, context2.options.config);
|
|
526
526
|
stopwatch();
|
|
527
527
|
}
|
|
528
528
|
return context2;
|
|
529
529
|
}
|
|
530
530
|
_chunkBGYQAVKQcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
531
531
|
async function build2(options) {
|
|
532
|
-
|
|
533
|
-
const stopwatch =
|
|
532
|
+
_chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
533
|
+
const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
534
534
|
try {
|
|
535
535
|
const opts = Array.isArray(options) ? options : [
|
|
536
536
|
options
|
|
@@ -540,9 +540,9 @@ async function build2(options) {
|
|
|
540
540
|
}
|
|
541
541
|
void transduce.async(opts, dependencyCheck);
|
|
542
542
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
543
|
-
|
|
543
|
+
_chunkYMPJ3GHZcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
544
544
|
} catch (error) {
|
|
545
|
-
|
|
545
|
+
_chunkYMPJ3GHZcjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
546
546
|
throw error;
|
|
547
547
|
} finally {
|
|
548
548
|
stopwatch();
|
|
@@ -570,9 +570,9 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
|
|
|
570
570
|
return context2.rebuild();
|
|
571
571
|
});
|
|
572
572
|
if (rebuildResult instanceof Error) {
|
|
573
|
-
|
|
573
|
+
_chunkYMPJ3GHZcjs.writeError.call(void 0, rebuildResult.message);
|
|
574
574
|
}
|
|
575
|
-
|
|
575
|
+
_chunkYMPJ3GHZcjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
576
576
|
}, 10);
|
|
577
577
|
changeWatcher.on("change", fastRebuild);
|
|
578
578
|
return void 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYMPJ3GHZcjs = require('./chunk-YMPJ3GHZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -11,7 +11,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
|
|
|
11
11
|
setup(build) {
|
|
12
12
|
build.onEnd((result) => {
|
|
13
13
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
14
|
-
|
|
14
|
+
_chunkYMPJ3GHZcjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
15
15
|
${result.errors.map((error) => error.text).join("\n")}
|
|
16
16
|
|
|
17
17
|
`, resolvedOptions.config);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkYMPJ3GHZcjs = require('./chunk-YMPJ3GHZ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -86,8 +86,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (bun
|
|
|
86
86
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
87
87
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
88
88
|
});
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
_chunkYMPJ3GHZcjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
90
|
+
_chunkYMPJ3GHZcjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
91
91
|
if (filteredMissingDeps.length > 0) {
|
|
92
92
|
throw new Error(`Missing dependencies detected - please install them:
|
|
93
93
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYMPJ3GHZcjs = require('./chunk-YMPJ3GHZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkXITTOHOGcjs = require('./chunk-XITTOHOG.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -35,7 +35,7 @@ var run = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config, command
|
|
|
35
35
|
var _fs = require('fs');
|
|
36
36
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
37
37
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
38
|
-
const { dependencies, peerDependencies, devDependencies } = _chunkBGYQAVKQcjs.__require.call(void 0,
|
|
38
|
+
const { dependencies, peerDependencies, devDependencies } = _chunkBGYQAVKQcjs.__require.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
39
39
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
40
40
|
p,
|
|
41
41
|
getTypeDependencyPackageName(p)
|
|
@@ -71,13 +71,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
71
71
|
},
|
|
72
72
|
dtsRollup: {
|
|
73
73
|
enabled: true,
|
|
74
|
-
untrimmedFilePath:
|
|
74
|
+
untrimmedFilePath: _chunkXITTOHOGcjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
75
75
|
},
|
|
76
76
|
tsdocMetadata: {
|
|
77
77
|
enabled: false
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
packageJsonFullPath:
|
|
80
|
+
packageJsonFullPath: _chunkXITTOHOGcjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
81
81
|
configObjectFullPath: void 0
|
|
82
82
|
});
|
|
83
83
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -85,7 +85,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
85
85
|
localBuild: true
|
|
86
86
|
});
|
|
87
87
|
if (extractorResult.succeeded === false) {
|
|
88
|
-
|
|
88
|
+
_chunkYMPJ3GHZcjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
89
89
|
throw new Error("API Extractor completed with errors");
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -104,12 +104,12 @@ var tscPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options,
|
|
|
104
104
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
105
105
|
const typeOutDir = resolvedOptions.outdir;
|
|
106
106
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
107
|
-
const bundlePath =
|
|
107
|
+
const bundlePath = _chunkXITTOHOGcjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
108
108
|
let dtsPath;
|
|
109
|
-
if (_fs.existsSync.call(void 0,
|
|
110
|
-
dtsPath =
|
|
111
|
-
} else if (_fs.existsSync.call(void 0,
|
|
112
|
-
dtsPath =
|
|
109
|
+
if (_fs.existsSync.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
110
|
+
dtsPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
111
|
+
} else if (_fs.existsSync.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
112
|
+
dtsPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
113
113
|
}
|
|
114
114
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
115
115
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
4
|
+
|
|
5
|
+
// ../config-tools/src/utilities/correct-paths.ts
|
|
6
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
7
|
+
function normalizeWindowsPath(input = "") {
|
|
8
|
+
if (!input) {
|
|
9
|
+
return input;
|
|
10
|
+
}
|
|
11
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
12
|
+
}
|
|
13
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
|
|
14
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
15
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
16
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
17
|
+
var correctPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, function(path) {
|
|
18
|
+
if (!path || path.length === 0) {
|
|
19
|
+
return ".";
|
|
20
|
+
}
|
|
21
|
+
path = normalizeWindowsPath(path);
|
|
22
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
23
|
+
const isPathAbsolute = isAbsolute(path);
|
|
24
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
25
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
26
|
+
if (path.length === 0) {
|
|
27
|
+
if (isPathAbsolute) {
|
|
28
|
+
return "/";
|
|
29
|
+
}
|
|
30
|
+
return trailingSeparator ? "./" : ".";
|
|
31
|
+
}
|
|
32
|
+
if (trailingSeparator) {
|
|
33
|
+
path += "/";
|
|
34
|
+
}
|
|
35
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
36
|
+
path += "/";
|
|
37
|
+
}
|
|
38
|
+
if (isUNCPath) {
|
|
39
|
+
if (!isPathAbsolute) {
|
|
40
|
+
return `//./${path}`;
|
|
41
|
+
}
|
|
42
|
+
return `//${path}`;
|
|
43
|
+
}
|
|
44
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
45
|
+
}, "correctPaths");
|
|
46
|
+
var joinPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, function(...segments) {
|
|
47
|
+
let path = "";
|
|
48
|
+
for (const seg of segments) {
|
|
49
|
+
if (!seg) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (path.length > 0) {
|
|
53
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
54
|
+
const segLeading = seg[0] === "/";
|
|
55
|
+
const both = pathTrailing && segLeading;
|
|
56
|
+
if (both) {
|
|
57
|
+
path += seg.slice(1);
|
|
58
|
+
} else {
|
|
59
|
+
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
path += seg;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return correctPaths(path);
|
|
66
|
+
}, "joinPaths");
|
|
67
|
+
function normalizeString(path, allowAboveRoot) {
|
|
68
|
+
let res = "";
|
|
69
|
+
let lastSegmentLength = 0;
|
|
70
|
+
let lastSlash = -1;
|
|
71
|
+
let dots = 0;
|
|
72
|
+
let char = null;
|
|
73
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
74
|
+
if (index < path.length) {
|
|
75
|
+
char = path[index];
|
|
76
|
+
} else if (char === "/") {
|
|
77
|
+
break;
|
|
78
|
+
} else {
|
|
79
|
+
char = "/";
|
|
80
|
+
}
|
|
81
|
+
if (char === "/") {
|
|
82
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
83
|
+
} else if (dots === 2) {
|
|
84
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
85
|
+
if (res.length > 2) {
|
|
86
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
87
|
+
if (lastSlashIndex === -1) {
|
|
88
|
+
res = "";
|
|
89
|
+
lastSegmentLength = 0;
|
|
90
|
+
} else {
|
|
91
|
+
res = res.slice(0, lastSlashIndex);
|
|
92
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
93
|
+
}
|
|
94
|
+
lastSlash = index;
|
|
95
|
+
dots = 0;
|
|
96
|
+
continue;
|
|
97
|
+
} else if (res.length > 0) {
|
|
98
|
+
res = "";
|
|
99
|
+
lastSegmentLength = 0;
|
|
100
|
+
lastSlash = index;
|
|
101
|
+
dots = 0;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (allowAboveRoot) {
|
|
106
|
+
res += res.length > 0 ? "/.." : "..";
|
|
107
|
+
lastSegmentLength = 2;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
if (res.length > 0) {
|
|
111
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
112
|
+
} else {
|
|
113
|
+
res = path.slice(lastSlash + 1, index);
|
|
114
|
+
}
|
|
115
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
116
|
+
}
|
|
117
|
+
lastSlash = index;
|
|
118
|
+
dots = 0;
|
|
119
|
+
} else if (char === "." && dots !== -1) {
|
|
120
|
+
++dots;
|
|
121
|
+
} else {
|
|
122
|
+
dots = -1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return res;
|
|
126
|
+
}
|
|
127
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, normalizeString, "normalizeString");
|
|
128
|
+
var isAbsolute = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, function(p) {
|
|
129
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
130
|
+
}, "isAbsolute");
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
exports.correctPaths = correctPaths; exports.joinPaths = joinPaths;
|
|
@@ -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 _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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkXITTOHOGcjs = require('./chunk-XITTOHOG.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -317,9 +317,9 @@ var rootFiles = [
|
|
|
317
317
|
];
|
|
318
318
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
319
319
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
320
|
-
return
|
|
320
|
+
return _chunkXITTOHOGcjs.correctPaths.call(void 0, _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
|
|
321
321
|
}
|
|
322
|
-
return
|
|
322
|
+
return _chunkXITTOHOGcjs.correctPaths.call(void 0, findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
|
|
323
323
|
}
|
|
324
324
|
_chunkBGYQAVKQcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
325
325
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -370,7 +370,7 @@ var getDefaultConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asy
|
|
|
370
370
|
let repository = void 0;
|
|
371
371
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
372
372
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
373
|
-
const file = await _promises.readFile.call(void 0,
|
|
373
|
+
const file = await _promises.readFile.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
374
374
|
if (file) {
|
|
375
375
|
const packageJson = JSON.parse(file);
|
|
376
376
|
if (packageJson.name) {
|