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