@storm-software/esbuild 0.45.2 → 0.45.4
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 +10 -10
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +13 -13
- package/dist/build.js +12 -12
- package/dist/{chunk-ZKOU7C3U.js → chunk-2SUTZQJO.js} +2 -2
- package/dist/{chunk-ZKU4LHIG.cjs → chunk-666X5DAD.cjs} +90 -86
- package/dist/{chunk-XQK2G64D.cjs → chunk-AH5IZCVU.cjs} +5 -5
- package/dist/{chunk-CS5OVZIS.js → chunk-BHU3AZEV.js} +5 -5
- package/dist/{chunk-QIE7UPFI.js → chunk-BRYMNX33.js} +15 -15
- package/dist/{chunk-7YZNI6SK.cjs → chunk-C6RNYTS3.cjs} +64 -64
- package/dist/{chunk-WXTPFPYQ.js → chunk-C7MXKCEV.js} +8 -4
- package/dist/chunk-CSKW6ZGK.cjs +6 -0
- package/dist/{chunk-I52SUD5S.js → chunk-D5BUKXUF.js} +2 -2
- package/dist/{chunk-VRHF33Y5.cjs → chunk-E4UJTY7B.cjs} +2 -2
- package/dist/{chunk-UJ4OTVZW.cjs → chunk-E5WQ7RCZ.cjs} +5 -5
- package/dist/{chunk-A3PTDBM4.js → chunk-F2NFCPLY.js} +8 -8
- package/dist/{chunk-UF7MZTGE.cjs → chunk-HBZMQYVF.cjs} +2 -2
- package/dist/{chunk-BRYAEE3A.cjs → chunk-HOU7FIPQ.cjs} +6 -6
- package/dist/{chunk-LMFNDVSP.js → chunk-KMAWKT2J.js} +3 -3
- package/dist/{chunk-Z5Q2GKYR.js → chunk-LXRH5WPF.js} +3 -2
- package/dist/{chunk-AQLVPEJX.js → chunk-MZAOJVAF.js} +1 -1
- package/dist/{chunk-ECTRYKRL.js → chunk-NVMEEE6W.js} +2 -2
- package/dist/{chunk-R2WT7MNW.js → chunk-OGMV3O2R.js} +4 -4
- package/dist/{chunk-F4PL6OZA.js → chunk-PFUD6XZ2.js} +1 -1
- package/dist/{chunk-TXMGS44F.cjs → chunk-RMEQ2MPX.cjs} +13 -13
- package/dist/{chunk-SOPEJUPU.cjs → chunk-RTDSY2NY.cjs} +7 -7
- package/dist/{chunk-2NASLF52.cjs → chunk-TIT5WULO.cjs} +21 -20
- package/dist/{chunk-THGA5VBT.js → chunk-YFVYTJH3.js} +2 -2
- package/dist/{chunk-3EKFW7Z7.cjs → chunk-ZEY37G5M.cjs} +18 -18
- package/dist/{chunk-ESE3Q5J4.cjs → chunk-ZVOXGROU.cjs} +24 -24
- package/dist/clean.cjs +5 -5
- package/dist/clean.js +4 -4
- package/dist/config.cjs +6 -6
- package/dist/config.js +5 -5
- package/dist/context.cjs +7 -7
- package/dist/context.js +6 -6
- package/dist/index.cjs +15 -15
- package/dist/index.js +13 -13
- package/dist/package-json.cjs +6 -6
- package/dist/package-json.js +5 -5
- package/dist/plugins/deps-check.cjs +5 -5
- package/dist/plugins/deps-check.js +4 -4
- package/dist/plugins/resolve-paths.cjs +11 -11
- package/dist/plugins/resolve-paths.js +2 -2
- package/dist/tsup.cjs +5 -5
- package/dist/tsup.js +4 -4
- package/dist/types.cjs +2 -2
- package/dist/types.js +2 -2
- package/dist/watch.cjs +7 -7
- package/dist/watch.js +3 -3
- package/package.json +5 -5
- package/dist/chunk-5OLNQTRT.cjs +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
correctPaths,
|
|
3
3
|
joinPaths
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MZAOJVAF.js";
|
|
5
5
|
import {
|
|
6
6
|
init_esm_shims
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D5BUKXUF.js";
|
|
8
8
|
|
|
9
9
|
// ../config-tools/src/logger/console.ts
|
|
10
10
|
init_esm_shims();
|
|
@@ -225,6 +225,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
225
225
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
226
226
|
homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
227
227
|
docs: z.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
228
|
+
portal: z.string().trim().url().optional().describe("The development portal site for the workspace"),
|
|
228
229
|
licensing: z.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
229
230
|
contact: z.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
230
231
|
support: z.string().trim().url().optional().describe(
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addPackageDependencies,
|
|
3
3
|
addWorkspacePackageJsonFields
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-C7MXKCEV.js";
|
|
5
5
|
import {
|
|
6
6
|
getStopwatch,
|
|
7
7
|
writeDebug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LXRH5WPF.js";
|
|
9
9
|
import {
|
|
10
10
|
joinPaths
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MZAOJVAF.js";
|
|
12
12
|
import {
|
|
13
13
|
init_esm_shims
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D5BUKXUF.js";
|
|
15
15
|
|
|
16
16
|
// src/package-json.ts
|
|
17
17
|
init_esm_shims();
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk666X5DADcjs = require('./chunk-666X5DAD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkTIT5WULOcjs = require('./chunk-TIT5WULO.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkHBZMQYVFcjs = require('./chunk-HBZMQYVF.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkE4UJTY7Bcjs = require('./chunk-E4UJTY7B.cjs');
|
|
15
15
|
|
|
16
16
|
// src/package-json.ts
|
|
17
|
-
|
|
17
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
18
18
|
var _devkit = require('@nx/devkit');
|
|
19
19
|
var _fs = require('fs');
|
|
20
20
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
21
21
|
async function generatePackageJson(context) {
|
|
22
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
23
|
-
|
|
24
|
-
const stopwatch =
|
|
25
|
-
const packageJsonPath =
|
|
22
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkHBZMQYVFcjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
23
|
+
_chunkTIT5WULOcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
24
|
+
const stopwatch = _chunkTIT5WULOcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
25
|
+
const packageJsonPath = _chunkHBZMQYVFcjs.joinPaths.call(void 0,
|
|
26
26
|
context.options.projectRoot,
|
|
27
27
|
"project.json"
|
|
28
28
|
);
|
|
@@ -30,7 +30,7 @@ async function generatePackageJson(context) {
|
|
|
30
30
|
throw new Error("Cannot find package.json configuration");
|
|
31
31
|
}
|
|
32
32
|
const packageJsonFile = await _promises2.default.readFile(
|
|
33
|
-
|
|
33
|
+
_chunkHBZMQYVFcjs.joinPaths.call(void 0,
|
|
34
34
|
context.workspaceConfig.workspaceRoot,
|
|
35
35
|
context.options.projectRoot,
|
|
36
36
|
"package.json"
|
|
@@ -41,13 +41,13 @@ async function generatePackageJson(context) {
|
|
|
41
41
|
if (!packageJson) {
|
|
42
42
|
throw new Error("Cannot find package.json configuration file");
|
|
43
43
|
}
|
|
44
|
-
packageJson = await
|
|
44
|
+
packageJson = await _chunk666X5DADcjs.addPackageDependencies.call(void 0,
|
|
45
45
|
context.workspaceConfig.workspaceRoot,
|
|
46
46
|
context.options.projectRoot,
|
|
47
47
|
context.projectName,
|
|
48
48
|
packageJson
|
|
49
49
|
);
|
|
50
|
-
packageJson = await
|
|
50
|
+
packageJson = await _chunk666X5DADcjs.addWorkspacePackageJsonFields.call(void 0,
|
|
51
51
|
context.workspaceConfig,
|
|
52
52
|
context.options.projectRoot,
|
|
53
53
|
context.sourceRoot,
|
|
@@ -136,7 +136,7 @@ async function generatePackageJson(context) {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
await _devkit.writeJsonFile.call(void 0,
|
|
139
|
-
|
|
139
|
+
_chunkHBZMQYVFcjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
140
140
|
packageJson
|
|
141
141
|
);
|
|
142
142
|
stopwatch();
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk666X5DADcjs = require('./chunk-666X5DAD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkTIT5WULOcjs = require('./chunk-TIT5WULO.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkE4UJTY7Bcjs = require('./chunk-E4UJTY7B.cjs');
|
|
11
11
|
|
|
12
12
|
// src/assets.ts
|
|
13
|
-
|
|
13
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
14
14
|
async function copyBuildAssets(context) {
|
|
15
15
|
if (!_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) && _optionalChain([context, 'access', _4 => _4.options, 'access', _5 => _5.assets, 'optionalAccess', _6 => _6.length])) {
|
|
16
|
-
|
|
16
|
+
_chunkTIT5WULOcjs.writeDebug.call(void 0,
|
|
17
17
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
18
18
|
context.workspaceConfig
|
|
19
19
|
);
|
|
20
|
-
const stopwatch =
|
|
21
|
-
await
|
|
20
|
+
const stopwatch = _chunkTIT5WULOcjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
21
|
+
await _chunk666X5DADcjs.copyAssets.call(void 0,
|
|
22
22
|
context.workspaceConfig,
|
|
23
23
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
24
24
|
context.outputPath,
|
|
@@ -1,16 +1,16 @@
|
|
|
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 _chunkHBZMQYVFcjs = require('./chunk-HBZMQYVF.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkE4UJTY7Bcjs = require('./chunk-E4UJTY7B.cjs');
|
|
8
8
|
|
|
9
9
|
// ../config-tools/src/logger/console.ts
|
|
10
|
-
|
|
10
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
11
11
|
|
|
12
12
|
// ../config-tools/src/types.ts
|
|
13
|
-
|
|
13
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
14
14
|
var LogLevel = {
|
|
15
15
|
SILENT: 0,
|
|
16
16
|
FATAL: 10,
|
|
@@ -35,13 +35,13 @@ var LogLevelLabel = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
38
|
-
|
|
38
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
39
39
|
|
|
40
40
|
// ../config/src/index.ts
|
|
41
|
-
|
|
41
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
42
42
|
|
|
43
43
|
// ../config/src/constants.ts
|
|
44
|
-
|
|
44
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
45
45
|
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
46
46
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
47
47
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
@@ -64,10 +64,10 @@ If this sounds interesting, and you would like to help us in creating the next g
|
|
|
64
64
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
65
65
|
|
|
66
66
|
// ../config/src/define-config.ts
|
|
67
|
-
|
|
67
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
68
68
|
|
|
69
69
|
// ../config/src/schema.ts
|
|
70
|
-
|
|
70
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
71
71
|
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
72
72
|
var DarkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
73
73
|
var LightColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
@@ -225,6 +225,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
225
225
|
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
226
226
|
homepage: _zod2.default.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
227
227
|
docs: _zod2.default.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
228
|
+
portal: _zod2.default.string().trim().url().optional().describe("The development portal site for the workspace"),
|
|
228
229
|
licensing: _zod2.default.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
229
230
|
contact: _zod2.default.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
230
231
|
support: _zod2.default.string().trim().url().optional().describe(
|
|
@@ -278,7 +279,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
278
279
|
);
|
|
279
280
|
|
|
280
281
|
// ../config/src/types.ts
|
|
281
|
-
|
|
282
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
282
283
|
var COLOR_KEYS = [
|
|
283
284
|
"dark",
|
|
284
285
|
"light",
|
|
@@ -303,10 +304,10 @@ var _promises = require('fs/promises');
|
|
|
303
304
|
var _path = require('path');
|
|
304
305
|
|
|
305
306
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
306
|
-
|
|
307
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
307
308
|
|
|
308
309
|
// ../config-tools/src/utilities/find-up.ts
|
|
309
|
-
|
|
310
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
310
311
|
|
|
311
312
|
|
|
312
313
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -375,11 +376,11 @@ var rootDirectories = [
|
|
|
375
376
|
];
|
|
376
377
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
377
378
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
378
|
-
return
|
|
379
|
+
return _chunkHBZMQYVFcjs.correctPaths.call(void 0,
|
|
379
380
|
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
380
381
|
);
|
|
381
382
|
}
|
|
382
|
-
return
|
|
383
|
+
return _chunkHBZMQYVFcjs.correctPaths.call(void 0,
|
|
383
384
|
findFolderUp(
|
|
384
385
|
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
385
386
|
rootFiles,
|
|
@@ -440,7 +441,7 @@ async function getPackageJsonConfig(root) {
|
|
|
440
441
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
441
442
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
442
443
|
const file = await _promises.readFile.call(void 0,
|
|
443
|
-
|
|
444
|
+
_chunkHBZMQYVFcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
444
445
|
"utf8"
|
|
445
446
|
);
|
|
446
447
|
if (file) {
|
|
@@ -514,7 +515,7 @@ function applyDefaultConfig(config) {
|
|
|
514
515
|
}
|
|
515
516
|
|
|
516
517
|
// ../config-tools/src/logger/chalk.ts
|
|
517
|
-
|
|
518
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
518
519
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
519
520
|
var chalkDefault = {
|
|
520
521
|
hex: (_) => (message) => message,
|
|
@@ -544,10 +545,10 @@ var getChalk = () => {
|
|
|
544
545
|
};
|
|
545
546
|
|
|
546
547
|
// ../config-tools/src/logger/console-icons.ts
|
|
547
|
-
|
|
548
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
548
549
|
|
|
549
550
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
550
|
-
|
|
551
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
551
552
|
function isUnicodeSupported() {
|
|
552
553
|
if (process.platform !== "win32") {
|
|
553
554
|
return process.env.TERM !== "linux";
|
|
@@ -572,13 +573,13 @@ var CONSOLE_ICONS = {
|
|
|
572
573
|
};
|
|
573
574
|
|
|
574
575
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
575
|
-
|
|
576
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
576
577
|
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
577
578
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
578
579
|
};
|
|
579
580
|
|
|
580
581
|
// ../config-tools/src/logger/get-log-level.ts
|
|
581
|
-
|
|
582
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
582
583
|
var getLogLevel = (label) => {
|
|
583
584
|
switch (label) {
|
|
584
585
|
case "all":
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeWarning
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LXRH5WPF.js";
|
|
5
5
|
import {
|
|
6
6
|
__require,
|
|
7
7
|
init_esm_shims
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-D5BUKXUF.js";
|
|
9
9
|
|
|
10
10
|
// src/plugins/deps-check.ts
|
|
11
11
|
init_esm_shims();
|
|
@@ -1,24 +1,24 @@
|
|
|
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 _chunkAH5IZCVUcjs = require('./chunk-AH5IZCVU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk666X5DADcjs = require('./chunk-666X5DAD.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkTIT5WULOcjs = require('./chunk-TIT5WULO.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkHBZMQYVFcjs = require('./chunk-HBZMQYVF.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkE4UJTY7Bcjs = require('./chunk-E4UJTY7B.cjs');
|
|
19
19
|
|
|
20
20
|
// src/context.ts
|
|
21
|
-
|
|
21
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -33,15 +33,15 @@ async function resolveContext(userOptions) {
|
|
|
33
33
|
if (!workspaceRoot) {
|
|
34
34
|
throw new Error("Cannot find Nx workspace root");
|
|
35
35
|
}
|
|
36
|
-
const workspaceConfig = await
|
|
36
|
+
const workspaceConfig = await _chunk666X5DADcjs.getWorkspaceConfig.call(void 0, true, {
|
|
37
37
|
workspaceRoot: workspaceRoot.dir
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
const stopwatch =
|
|
39
|
+
_chunkTIT5WULOcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
40
|
+
const stopwatch = _chunkTIT5WULOcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
41
41
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
42
42
|
exitOnError: true
|
|
43
43
|
});
|
|
44
|
-
const projectJsonPath =
|
|
44
|
+
const projectJsonPath = _chunkHBZMQYVFcjs.joinPaths.call(void 0,
|
|
45
45
|
workspaceRoot.dir,
|
|
46
46
|
projectRoot,
|
|
47
47
|
"project.json"
|
|
@@ -58,9 +58,9 @@ async function resolveContext(userOptions) {
|
|
|
58
58
|
"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."
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
61
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkAH5IZCVUcjs.DEFAULT_BUILD_OPTIONS);
|
|
62
62
|
options.name ??= projectName;
|
|
63
|
-
const packageJsonPath =
|
|
63
|
+
const packageJsonPath = _chunkHBZMQYVFcjs.joinPaths.call(void 0,
|
|
64
64
|
workspaceRoot.dir,
|
|
65
65
|
options.projectRoot,
|
|
66
66
|
"package.json"
|
|
@@ -68,11 +68,11 @@ async function resolveContext(userOptions) {
|
|
|
68
68
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
69
69
|
throw new Error("Cannot find package.json configuration");
|
|
70
70
|
}
|
|
71
|
-
const env =
|
|
71
|
+
const env = _chunk666X5DADcjs.getEnv.call(void 0, "esbuild", options);
|
|
72
72
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
73
73
|
const resolvedOptions = {
|
|
74
74
|
...options,
|
|
75
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
75
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkHBZMQYVFcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json"),
|
|
76
76
|
metafile: userOptions.mode === "development",
|
|
77
77
|
clean: false,
|
|
78
78
|
env,
|
|
@@ -97,8 +97,8 @@ async function resolveContext(userOptions) {
|
|
|
97
97
|
projectConfigurations,
|
|
98
98
|
projectName,
|
|
99
99
|
projectGraph,
|
|
100
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
101
|
-
outputPath: resolvedOptions.outputPath ||
|
|
100
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkHBZMQYVFcjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
101
|
+
outputPath: resolvedOptions.outputPath || _chunkHBZMQYVFcjs.joinPaths.call(void 0,
|
|
102
102
|
workspaceConfig.workspaceRoot,
|
|
103
103
|
"dist",
|
|
104
104
|
resolvedOptions.projectRoot
|
|
@@ -107,10 +107,10 @@ async function resolveContext(userOptions) {
|
|
|
107
107
|
};
|
|
108
108
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
109
109
|
if (context.options.verbose) {
|
|
110
|
-
|
|
110
|
+
_chunkTIT5WULOcjs.writeDebug.call(void 0,
|
|
111
111
|
` \u2699\uFE0F Build options resolved:
|
|
112
112
|
|
|
113
|
-
${
|
|
113
|
+
${_chunkTIT5WULOcjs.formatLogMessage.call(void 0, context.options)}`,
|
|
114
114
|
workspaceConfig
|
|
115
115
|
);
|
|
116
116
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
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 _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 _chunkHOU7FIPQcjs = require('./chunk-HOU7FIPQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkRTDSY2NYcjs = require('./chunk-RTDSY2NY.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkE5WQ7RCZcjs = require('./chunk-E5WQ7RCZ.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkZEY37G5Mcjs = require('./chunk-ZEY37G5M.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkRMEQ2MPXcjs = require('./chunk-RMEQ2MPX.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkC6RNYTS3cjs = require('./chunk-C6RNYTS3.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -23,29 +23,29 @@ var _chunk7YZNI6SKcjs = require('./chunk-7YZNI6SK.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkTIT5WULOcjs = require('./chunk-TIT5WULO.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkE4UJTY7Bcjs = require('./chunk-E4UJTY7B.cjs');
|
|
30
30
|
|
|
31
31
|
// src/build.ts
|
|
32
|
-
|
|
32
|
+
_chunkE4UJTY7Bcjs.init_cjs_shims.call(void 0, );
|
|
33
33
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
34
34
|
var _globby = require('globby');
|
|
35
35
|
async function reportResults(context) {
|
|
36
36
|
if (_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) === 0) {
|
|
37
37
|
if (context.result.warnings.length > 0) {
|
|
38
|
-
|
|
38
|
+
_chunkTIT5WULOcjs.writeWarning.call(void 0,
|
|
39
39
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
40
40
|
context.workspaceConfig
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
_chunkTIT5WULOcjs.writeSuccess.call(void 0,
|
|
44
44
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
45
45
|
context.workspaceConfig
|
|
46
46
|
);
|
|
47
47
|
} else if (_optionalChain([context, 'access', _4 => _4.result, 'optionalAccess', _5 => _5.errors]) && _optionalChain([context, 'access', _6 => _6.result, 'optionalAccess', _7 => _7.errors, 'access', _8 => _8.length]) > 0) {
|
|
48
|
-
|
|
48
|
+
_chunkTIT5WULOcjs.writeError.call(void 0,
|
|
49
49
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
50
50
|
context.workspaceConfig
|
|
51
51
|
);
|
|
@@ -74,7 +74,7 @@ async function dependencyCheck(options) {
|
|
|
74
74
|
write: false,
|
|
75
75
|
// no need to write for analysis
|
|
76
76
|
outdir: "out",
|
|
77
|
-
plugins: [
|
|
77
|
+
plugins: [_chunkHOU7FIPQcjs.depsCheckPlugin.call(void 0, options.bundle)]
|
|
78
78
|
});
|
|
79
79
|
await buildPromise.catch(() => {
|
|
80
80
|
});
|
|
@@ -82,36 +82,36 @@ async function dependencyCheck(options) {
|
|
|
82
82
|
}
|
|
83
83
|
async function cleanOutputPath(context) {
|
|
84
84
|
if (context.clean !== false && context.outputPath) {
|
|
85
|
-
|
|
85
|
+
_chunkTIT5WULOcjs.writeDebug.call(void 0,
|
|
86
86
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
87
87
|
context.workspaceConfig
|
|
88
88
|
);
|
|
89
|
-
const stopwatch =
|
|
90
|
-
await
|
|
89
|
+
const stopwatch = _chunkTIT5WULOcjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
90
|
+
await _chunkE5WQ7RCZcjs.cleanDirectories.call(void 0, context.outputPath);
|
|
91
91
|
stopwatch();
|
|
92
92
|
}
|
|
93
93
|
return context;
|
|
94
94
|
}
|
|
95
95
|
async function build2(options) {
|
|
96
|
-
|
|
97
|
-
const stopwatch =
|
|
96
|
+
_chunkTIT5WULOcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
97
|
+
const stopwatch = _chunkTIT5WULOcjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
98
98
|
try {
|
|
99
99
|
const opts = Array.isArray(options) ? options : [options];
|
|
100
100
|
if (opts.length === 0) {
|
|
101
101
|
throw new Error("No build options were provided");
|
|
102
102
|
}
|
|
103
|
-
const context = await
|
|
103
|
+
const context = await _chunkZEY37G5Mcjs.resolveContext.call(void 0, options);
|
|
104
104
|
await cleanOutputPath(context);
|
|
105
105
|
await Promise.all([
|
|
106
106
|
dependencyCheck(context.options),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
_chunkRMEQ2MPXcjs.generatePackageJson.call(void 0, context),
|
|
108
|
+
_chunkRTDSY2NYcjs.copyBuildAssets.call(void 0, context),
|
|
109
|
+
_chunkC6RNYTS3cjs.executeTsup.call(void 0, context)
|
|
110
110
|
]);
|
|
111
111
|
await reportResults(context);
|
|
112
|
-
|
|
112
|
+
_chunkTIT5WULOcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
113
113
|
} catch (error) {
|
|
114
|
-
|
|
114
|
+
_chunkTIT5WULOcjs.writeFatal.call(void 0,
|
|
115
115
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
116
116
|
);
|
|
117
117
|
throw error;
|
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-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
4
|
+
var _chunkE5WQ7RCZcjs = require('./chunk-E5WQ7RCZ.cjs');
|
|
5
|
+
require('./chunk-TIT5WULO.cjs');
|
|
6
|
+
require('./chunk-HBZMQYVF.cjs');
|
|
7
|
+
require('./chunk-E4UJTY7B.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.clean =
|
|
11
|
+
exports.clean = _chunkE5WQ7RCZcjs.clean; exports.cleanDirectories = _chunkE5WQ7RCZcjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clean,
|
|
3
3
|
cleanDirectories
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-NVMEEE6W.js";
|
|
5
|
+
import "./chunk-LXRH5WPF.js";
|
|
6
|
+
import "./chunk-MZAOJVAF.js";
|
|
7
|
+
import "./chunk-D5BUKXUF.js";
|
|
8
8
|
export {
|
|
9
9
|
clean,
|
|
10
10
|
cleanDirectories
|
package/dist/config.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
3
|
+
var _chunkAH5IZCVUcjs = require('./chunk-AH5IZCVU.cjs');
|
|
4
|
+
require('./chunk-666X5DAD.cjs');
|
|
5
|
+
require('./chunk-TIT5WULO.cjs');
|
|
6
|
+
require('./chunk-HBZMQYVF.cjs');
|
|
7
|
+
require('./chunk-E4UJTY7B.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.DEFAULT_BUILD_OPTIONS =
|
|
10
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkAH5IZCVUcjs.DEFAULT_BUILD_OPTIONS;
|
package/dist/config.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_BUILD_OPTIONS
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-2SUTZQJO.js";
|
|
4
|
+
import "./chunk-C7MXKCEV.js";
|
|
5
|
+
import "./chunk-LXRH5WPF.js";
|
|
6
|
+
import "./chunk-MZAOJVAF.js";
|
|
7
|
+
import "./chunk-D5BUKXUF.js";
|
|
8
8
|
export {
|
|
9
9
|
DEFAULT_BUILD_OPTIONS
|
|
10
10
|
};
|
package/dist/context.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
3
|
+
var _chunkZEY37G5Mcjs = require('./chunk-ZEY37G5M.cjs');
|
|
4
|
+
require('./chunk-AH5IZCVU.cjs');
|
|
5
|
+
require('./chunk-666X5DAD.cjs');
|
|
6
|
+
require('./chunk-TIT5WULO.cjs');
|
|
7
|
+
require('./chunk-HBZMQYVF.cjs');
|
|
8
|
+
require('./chunk-E4UJTY7B.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.resolveContext =
|
|
11
|
+
exports.resolveContext = _chunkZEY37G5Mcjs.resolveContext;
|