@storm-software/esbuild 0.35.7 → 0.35.9
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 +4 -4
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +14 -14
- package/dist/build.js +13 -13
- package/dist/{chunk-LKXMEOMY.cjs → chunk-2NQYRZKO.cjs} +51 -51
- package/dist/{chunk-L2IEBOYL.js → chunk-3VHLCZ6F.js} +2 -2
- package/dist/chunk-5R3LX6E4.cjs +6 -0
- package/dist/{chunk-4RTT7CNA.js → chunk-5ZPCV2IJ.js} +17 -17
- package/dist/{chunk-ATYG4K55.cjs → chunk-B4NWTB7S.cjs} +106 -106
- package/dist/{chunk-CJU3AWWU.js → chunk-CA7VVNV2.js} +3 -3
- package/dist/{chunk-S6TVQK6G.js → chunk-CHAHHSIR.js} +2 -2
- package/dist/{chunk-BDAEVRE2.cjs → chunk-CY4KF2US.cjs} +14 -14
- package/dist/{chunk-EDL2KB25.js → chunk-DU5R4RJA.js} +8 -8
- package/dist/{chunk-QFPOX3D5.js → chunk-EBZ4R3MW.js} +4 -4
- package/dist/{chunk-EB5Y3WAG.js → chunk-GKAHDFNO.js} +2 -2
- package/dist/{chunk-6IWYW2O3.js → chunk-GWGBQKRY.js} +2 -2
- package/dist/{chunk-AB6MCXGW.cjs → chunk-IV2WE7RO.cjs} +7 -7
- package/dist/{chunk-ENZZJ5B6.js → chunk-JHQYSHQ5.js} +6 -6
- package/dist/{chunk-3S3PZ7EY.js → chunk-JNDYTIRD.js} +2 -2
- package/dist/{chunk-LGNAN6MS.cjs → chunk-JS5GZ7ZE.cjs} +28 -28
- package/dist/{chunk-JSWTO2OC.cjs → chunk-JZBM4QKF.cjs} +19 -19
- package/dist/{chunk-MFXVX4RL.cjs → chunk-KK2BGIRB.cjs} +8 -8
- package/dist/{chunk-N2NUZ6C6.cjs → chunk-N6KCNJOR.cjs} +7 -7
- package/dist/{chunk-SMZKC6PE.cjs → chunk-Q77NJNNL.cjs} +7 -7
- package/dist/{chunk-IAXKJC2K.js → chunk-QBMHS72C.js} +1 -1
- package/dist/{chunk-A6IWHLKB.js → chunk-SAK5QFCE.js} +3 -3
- package/dist/{chunk-QOP64GGO.cjs → chunk-TKNLZW4V.cjs} +2 -2
- package/dist/{chunk-VCCAKBC6.js → chunk-UA2A6OC6.js} +1 -1
- package/dist/{chunk-WXQTUY4R.cjs → chunk-YXJYZG6O.cjs} +10 -10
- package/dist/{chunk-NSXYKOKK.cjs → chunk-ZDMKNQUW.cjs} +5 -5
- package/dist/{chunk-HWMRRY5X.js → chunk-ZILTNBKJ.js} +6 -6
- package/dist/{chunk-KU3PHLUZ.cjs → chunk-ZS2HZUYH.cjs} +194 -194
- 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 +8 -8
- package/dist/context.js +7 -7
- package/dist/index.cjs +16 -16
- package/dist/index.js +14 -14
- 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 +4 -4
- package/dist/plugins/resolve-paths.js +3 -3
- 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 +14 -14
- package/dist/watch.js +3 -3
- package/package.json +4 -4
- package/dist/chunk-K6SD2RXI.cjs +0 -6
|
@@ -1,39 +1,39 @@
|
|
|
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 _chunkB4NWTB7Scjs = require('./chunk-B4NWTB7S.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk2NQYRZKOcjs = require('./chunk-2NQYRZKO.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkQ77NJNNLcjs = require('./chunk-Q77NJNNL.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
|
|
16
16
|
|
|
17
17
|
// src/package-json.ts
|
|
18
|
-
|
|
18
|
+
_chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
|
|
19
19
|
var _devkit = require('@nx/devkit');
|
|
20
20
|
var _fs = require('fs');
|
|
21
21
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
22
22
|
async function generatePackageJson(context) {
|
|
23
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
24
|
-
|
|
25
|
-
const stopwatch =
|
|
26
|
-
const packageJsonPath =
|
|
23
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkQ77NJNNLcjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
24
|
+
_chunk2NQYRZKOcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
25
|
+
const stopwatch = _chunk2NQYRZKOcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
26
|
+
const packageJsonPath = _chunkQ77NJNNLcjs.joinPaths.call(void 0, context.options.projectRoot, "project.json");
|
|
27
27
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
28
28
|
throw new Error("Cannot find package.json configuration");
|
|
29
29
|
}
|
|
30
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
30
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkQ77NJNNLcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
|
|
31
31
|
let packageJson = JSON.parse(packageJsonFile);
|
|
32
32
|
if (!packageJson) {
|
|
33
33
|
throw new Error("Cannot find package.json configuration file");
|
|
34
34
|
}
|
|
35
|
-
packageJson = await
|
|
36
|
-
packageJson = await
|
|
35
|
+
packageJson = await _chunkB4NWTB7Scjs.addPackageDependencies.call(void 0, context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
|
|
36
|
+
packageJson = await _chunkB4NWTB7Scjs.addWorkspacePackageJsonFields.call(void 0, context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
|
|
37
37
|
if (context.options.entry) {
|
|
38
38
|
packageJson.exports ??= {};
|
|
39
39
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -111,12 +111,12 @@ async function generatePackageJson(context) {
|
|
|
111
111
|
}, packageJson.exports);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
114
|
+
await _devkit.writeJsonFile.call(void 0, _chunkQ77NJNNLcjs.joinPaths.call(void 0, context.outputPath, "package.json"), packageJson);
|
|
115
115
|
stopwatch();
|
|
116
116
|
}
|
|
117
117
|
return context;
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
depsCheckPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GWGBQKRY.js";
|
|
4
4
|
import {
|
|
5
5
|
copyBuildAssets
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CA7VVNV2.js";
|
|
7
7
|
import {
|
|
8
8
|
cleanDirectories
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GKAHDFNO.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JHQYSHQ5.js";
|
|
13
13
|
import {
|
|
14
14
|
generatePackageJson
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EBZ4R3MW.js";
|
|
16
16
|
import {
|
|
17
17
|
executeTsup
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5ZPCV2IJ.js";
|
|
19
19
|
import {
|
|
20
20
|
getStopwatch,
|
|
21
21
|
writeDebug,
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
writeFatal,
|
|
24
24
|
writeSuccess,
|
|
25
25
|
writeWarning
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3VHLCZ6F.js";
|
|
27
27
|
import {
|
|
28
28
|
__name,
|
|
29
29
|
init_esm_shims
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CHAHHSIR.js";
|
|
31
31
|
|
|
32
32
|
// src/build.ts
|
|
33
33
|
init_esm_shims();
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addPackageDependencies,
|
|
3
3
|
addWorkspacePackageJsonFields
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SAK5QFCE.js";
|
|
5
5
|
import {
|
|
6
6
|
getStopwatch,
|
|
7
7
|
writeDebug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3VHLCZ6F.js";
|
|
9
9
|
import {
|
|
10
10
|
joinPaths
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QBMHS72C.js";
|
|
12
12
|
import {
|
|
13
13
|
__name,
|
|
14
14
|
init_esm_shims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CHAHHSIR.js";
|
|
16
16
|
|
|
17
17
|
// src/package-json.ts
|
|
18
18
|
init_esm_shims();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeWarning
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3VHLCZ6F.js";
|
|
5
5
|
import {
|
|
6
6
|
__name,
|
|
7
7
|
__require,
|
|
8
8
|
init_esm_shims
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CHAHHSIR.js";
|
|
10
10
|
|
|
11
11
|
// src/plugins/deps-check.ts
|
|
12
12
|
init_esm_shims();
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2NQYRZKOcjs = require('./chunk-2NQYRZKO.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
|
|
9
9
|
|
|
10
10
|
// src/clean.ts
|
|
11
|
-
|
|
11
|
+
_chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
|
|
12
12
|
var _promises = require('fs/promises');
|
|
13
13
|
async function clean(name = "ESBuild", directory, config) {
|
|
14
|
-
|
|
15
|
-
const stopwatch =
|
|
14
|
+
_chunk2NQYRZKOcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
15
|
+
const stopwatch = _chunk2NQYRZKOcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
16
16
|
await cleanDirectories(directory);
|
|
17
17
|
stopwatch();
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, clean, "clean");
|
|
20
20
|
async function cleanDirectories(directory) {
|
|
21
21
|
await _promises.rm.call(void 0, directory, {
|
|
22
22
|
recursive: true,
|
|
23
23
|
force: true
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolvePathsPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZILTNBKJ.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_BUILD_OPTIONS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JNDYTIRD.js";
|
|
7
7
|
import {
|
|
8
8
|
getEnv,
|
|
9
9
|
getWorkspaceConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SAK5QFCE.js";
|
|
11
11
|
import {
|
|
12
12
|
getStopwatch,
|
|
13
13
|
writeDebug
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3VHLCZ6F.js";
|
|
15
15
|
import {
|
|
16
16
|
joinPaths
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QBMHS72C.js";
|
|
18
18
|
import {
|
|
19
19
|
__name,
|
|
20
20
|
init_esm_shims
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CHAHHSIR.js";
|
|
22
22
|
|
|
23
23
|
// src/context.ts
|
|
24
24
|
init_esm_shims();
|
|
@@ -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 _chunkN6KCNJORcjs = require('./chunk-N6KCNJOR.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkKK2BGIRBcjs = require('./chunk-KK2BGIRB.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkIV2WE7ROcjs = require('./chunk-IV2WE7RO.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkJZBM4QKFcjs = require('./chunk-JZBM4QKF.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkCY4KF2UScjs = require('./chunk-CY4KF2US.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkZS2HZUYHcjs = require('./chunk-ZS2HZUYH.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -23,28 +23,28 @@ var _chunkKU3PHLUZcjs = require('./chunk-KU3PHLUZ.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunk2NQYRZKOcjs = require('./chunk-2NQYRZKO.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
|
|
31
31
|
|
|
32
32
|
// src/build.ts
|
|
33
|
-
|
|
33
|
+
_chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
|
|
34
34
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
35
35
|
var _globby = require('globby');
|
|
36
36
|
async function reportResults(context) {
|
|
37
37
|
if (_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) === 0) {
|
|
38
38
|
if (context.result.warnings.length > 0) {
|
|
39
|
-
|
|
39
|
+
_chunk2NQYRZKOcjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
_chunk2NQYRZKOcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
|
|
42
42
|
} 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) {
|
|
43
|
-
|
|
43
|
+
_chunk2NQYRZKOcjs.writeError.call(void 0, ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
|
|
44
44
|
throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, reportResults, "reportResults");
|
|
48
48
|
async function dependencyCheck(options) {
|
|
49
49
|
if (process.env.DEV === "true") {
|
|
50
50
|
return void 0;
|
|
@@ -67,27 +67,27 @@ async function dependencyCheck(options) {
|
|
|
67
67
|
write: false,
|
|
68
68
|
outdir: "out",
|
|
69
69
|
plugins: [
|
|
70
|
-
|
|
70
|
+
_chunkN6KCNJORcjs.depsCheckPlugin.call(void 0, options.bundle)
|
|
71
71
|
]
|
|
72
72
|
});
|
|
73
73
|
await buildPromise.catch(() => {
|
|
74
74
|
});
|
|
75
75
|
return void 0;
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
78
78
|
async function cleanOutputPath(context) {
|
|
79
79
|
if (context.clean !== false && context.outputPath) {
|
|
80
|
-
|
|
81
|
-
const stopwatch =
|
|
82
|
-
await
|
|
80
|
+
_chunk2NQYRZKOcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
|
|
81
|
+
const stopwatch = _chunk2NQYRZKOcjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
82
|
+
await _chunkIV2WE7ROcjs.cleanDirectories.call(void 0, context.outputPath);
|
|
83
83
|
stopwatch();
|
|
84
84
|
}
|
|
85
85
|
return context;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
88
88
|
async function build2(options) {
|
|
89
|
-
|
|
90
|
-
const stopwatch =
|
|
89
|
+
_chunk2NQYRZKOcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
90
|
+
const stopwatch = _chunk2NQYRZKOcjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
91
91
|
try {
|
|
92
92
|
const opts = Array.isArray(options) ? options : [
|
|
93
93
|
options
|
|
@@ -95,24 +95,24 @@ async function build2(options) {
|
|
|
95
95
|
if (opts.length === 0) {
|
|
96
96
|
throw new Error("No build options were provided");
|
|
97
97
|
}
|
|
98
|
-
const context = await
|
|
98
|
+
const context = await _chunkJZBM4QKFcjs.resolveContext.call(void 0, options);
|
|
99
99
|
await cleanOutputPath(context);
|
|
100
100
|
await Promise.all([
|
|
101
101
|
dependencyCheck(context.options),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
_chunkCY4KF2UScjs.generatePackageJson.call(void 0, context),
|
|
103
|
+
_chunkKK2BGIRBcjs.copyBuildAssets.call(void 0, context),
|
|
104
|
+
_chunkZS2HZUYHcjs.executeTsup.call(void 0, context)
|
|
105
105
|
]);
|
|
106
106
|
await reportResults(context);
|
|
107
|
-
|
|
107
|
+
_chunk2NQYRZKOcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
108
108
|
} catch (error) {
|
|
109
|
-
|
|
109
|
+
_chunk2NQYRZKOcjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
110
110
|
throw error;
|
|
111
111
|
} finally {
|
|
112
112
|
stopwatch();
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, build2, "build");
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
@@ -1,27 +1,27 @@
|
|
|
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 _chunkYXJYZG6Ocjs = require('./chunk-YXJYZG6O.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZDMKNQUWcjs = require('./chunk-ZDMKNQUW.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkB4NWTB7Scjs = require('./chunk-B4NWTB7S.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk2NQYRZKOcjs = require('./chunk-2NQYRZKO.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkQ77NJNNLcjs = require('./chunk-Q77NJNNL.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
|
|
22
22
|
|
|
23
23
|
// src/context.ts
|
|
24
|
-
|
|
24
|
+
_chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
|
|
25
25
|
var _devkit = require('@nx/devkit');
|
|
26
26
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
27
27
|
var _fs = require('fs');
|
|
@@ -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 _chunkB4NWTB7Scjs.getWorkspaceConfig.call(void 0, true, {
|
|
37
37
|
workspaceRoot: workspaceRoot.dir
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
const stopwatch =
|
|
39
|
+
_chunk2NQYRZKOcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
40
|
+
const stopwatch = _chunk2NQYRZKOcjs.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 = _chunkQ77NJNNLcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
45
45
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
46
46
|
throw new Error("Cannot find project.json configuration");
|
|
47
47
|
}
|
|
@@ -52,16 +52,16 @@ async function resolveContext(userOptions) {
|
|
|
52
52
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _ => _.projects, 'optionalAccess', _2 => _2[projectName]])) {
|
|
53
53
|
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.");
|
|
54
54
|
}
|
|
55
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
55
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkZDMKNQUWcjs.DEFAULT_BUILD_OPTIONS);
|
|
56
56
|
options.name ??= projectName;
|
|
57
|
-
const packageJsonPath =
|
|
57
|
+
const packageJsonPath = _chunkQ77NJNNLcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
58
58
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
59
59
|
throw new Error("Cannot find package.json configuration");
|
|
60
60
|
}
|
|
61
|
-
const env =
|
|
61
|
+
const env = _chunkB4NWTB7Scjs.getEnv.call(void 0, "esbuild", options);
|
|
62
62
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
63
63
|
const resolvedOptions = {
|
|
64
|
-
tsconfig:
|
|
64
|
+
tsconfig: _chunkQ77NJNNLcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json"),
|
|
65
65
|
...options,
|
|
66
66
|
metafile: userOptions.mode === "development",
|
|
67
67
|
clean: false,
|
|
@@ -87,17 +87,17 @@ async function resolveContext(userOptions) {
|
|
|
87
87
|
projectConfigurations,
|
|
88
88
|
projectName,
|
|
89
89
|
projectGraph,
|
|
90
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
91
|
-
outputPath: resolvedOptions.outputPath ||
|
|
90
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkQ77NJNNLcjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
91
|
+
outputPath: resolvedOptions.outputPath || _chunkQ77NJNNLcjs.joinPaths.call(void 0, workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
|
|
92
92
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
93
93
|
};
|
|
94
94
|
context.options.esbuildPlugins = [
|
|
95
|
-
|
|
95
|
+
_chunkYXJYZG6Ocjs.resolvePathsPlugin.call(void 0, context),
|
|
96
96
|
..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))
|
|
97
97
|
];
|
|
98
98
|
return context;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
|
|
@@ -1,27 +1,27 @@
|
|
|
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 _chunkB4NWTB7Scjs = require('./chunk-B4NWTB7S.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk2NQYRZKOcjs = require('./chunk-2NQYRZKO.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
|
|
12
12
|
|
|
13
13
|
// src/assets.ts
|
|
14
|
-
|
|
14
|
+
_chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
|
|
15
15
|
async function copyBuildAssets(context) {
|
|
16
16
|
if (_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) === 0) {
|
|
17
|
-
|
|
18
|
-
const stopwatch =
|
|
19
|
-
await
|
|
17
|
+
_chunk2NQYRZKOcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
18
|
+
const stopwatch = _chunk2NQYRZKOcjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
19
|
+
await _chunkB4NWTB7Scjs.copyAssets.call(void 0, context.workspaceConfig, _nullishCoalesce(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
20
20
|
stopwatch();
|
|
21
21
|
}
|
|
22
22
|
return context;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -1,15 +1,15 @@
|
|
|
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 _chunk2NQYRZKOcjs = require('./chunk-2NQYRZKO.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
|
|
10
10
|
|
|
11
11
|
// src/plugins/deps-check.ts
|
|
12
|
-
|
|
12
|
+
_chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
|
|
13
13
|
var _module = require('module');
|
|
14
14
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
15
15
|
var unusedIgnore = [
|
|
@@ -41,11 +41,11 @@ var missingIgnore = [
|
|
|
41
41
|
"@prisma/client",
|
|
42
42
|
"ts-toolbelt"
|
|
43
43
|
];
|
|
44
|
-
var depsCheckPlugin = /* @__PURE__ */
|
|
44
|
+
var depsCheckPlugin = /* @__PURE__ */ _chunkTKNLZW4Vcjs.__name.call(void 0, (bundle) => ({
|
|
45
45
|
name: "storm:deps-check",
|
|
46
46
|
setup(build) {
|
|
47
47
|
const pkgJsonPath = _path2.default.join(process.cwd(), "package.json");
|
|
48
|
-
const pkgContents =
|
|
48
|
+
const pkgContents = _chunkTKNLZW4Vcjs.__require.call(void 0, pkgJsonPath);
|
|
49
49
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
50
50
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
51
51
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -88,8 +88,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkQOP64GGOcjs.__name.call(void 0, (bun
|
|
|
88
88
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
89
89
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
90
90
|
});
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
_chunk2NQYRZKOcjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
92
|
+
_chunk2NQYRZKOcjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
93
93
|
if (filteredMissingDeps.length > 0) {
|
|
94
94
|
throw new Error(`Missing dependencies detected - please install them:
|
|
95
95
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
|
|
5
5
|
|
|
6
6
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
7
|
-
|
|
7
|
+
_chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
|
|
8
8
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
9
9
|
function normalizeWindowsPath(input = "") {
|
|
10
10
|
if (!input) {
|
|
@@ -12,11 +12,11 @@ function normalizeWindowsPath(input = "") {
|
|
|
12
12
|
}
|
|
13
13
|
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
|
|
16
16
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
17
17
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
18
18
|
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
19
|
-
var correctPaths = /* @__PURE__ */
|
|
19
|
+
var correctPaths = /* @__PURE__ */ _chunkTKNLZW4Vcjs.__name.call(void 0, function(path) {
|
|
20
20
|
if (!path || path.length === 0) {
|
|
21
21
|
return ".";
|
|
22
22
|
}
|
|
@@ -45,7 +45,7 @@ var correctPaths = /* @__PURE__ */ _chunkQOP64GGOcjs.__name.call(void 0, functio
|
|
|
45
45
|
}
|
|
46
46
|
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
47
47
|
}, "correctPaths");
|
|
48
|
-
var joinPaths = /* @__PURE__ */
|
|
48
|
+
var joinPaths = /* @__PURE__ */ _chunkTKNLZW4Vcjs.__name.call(void 0, function(...segments) {
|
|
49
49
|
let path = "";
|
|
50
50
|
for (const seg of segments) {
|
|
51
51
|
if (!seg) {
|
|
@@ -126,8 +126,8 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
126
126
|
}
|
|
127
127
|
return res;
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
var isAbsolute = /* @__PURE__ */
|
|
129
|
+
_chunkTKNLZW4Vcjs.__name.call(void 0, normalizeString, "normalizeString");
|
|
130
|
+
var isAbsolute = /* @__PURE__ */ _chunkTKNLZW4Vcjs.__name.call(void 0, function(p) {
|
|
131
131
|
return _IS_ABSOLUTE_RE.test(p);
|
|
132
132
|
}, "isAbsolute");
|
|
133
133
|
|
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
writeDebug,
|
|
14
14
|
writeTrace,
|
|
15
15
|
writeWarning
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3VHLCZ6F.js";
|
|
17
17
|
import {
|
|
18
18
|
correctPaths,
|
|
19
19
|
joinPaths
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QBMHS72C.js";
|
|
21
21
|
import {
|
|
22
22
|
__name,
|
|
23
23
|
init_esm_shims
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-CHAHHSIR.js";
|
|
25
25
|
|
|
26
26
|
// ../build-tools/src/config.ts
|
|
27
27
|
init_esm_shims();
|