@storm-software/esbuild 0.35.11 → 0.35.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 -2
- package/bin/esbuild.cjs +1225 -2788
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +13 -14
- package/dist/build.js +12 -13
- package/dist/{chunk-C5UZWWWR.js → chunk-2LYIFO7K.js} +3 -9
- package/dist/{chunk-KXCV2R7J.cjs → chunk-55UPQQ65.cjs} +288 -179
- package/dist/{chunk-INQXL7FE.js → chunk-72UBXZRO.js} +4 -6
- package/dist/{chunk-RMRB7CWQ.js → chunk-7KIT5JE6.js} +36 -30
- package/dist/{chunk-OHH3RWRK.cjs → chunk-B3MHVZOK.cjs} +10 -12
- package/dist/{chunk-NNO5TTNR.cjs → chunk-BK5GLVSJ.cjs} +47 -21
- package/dist/{chunk-J3XDBU5Z.cjs → chunk-BWMW4ZUS.cjs} +46 -40
- package/dist/{chunk-VITVYHJG.cjs → chunk-C25ALB4J.cjs} +975 -1209
- package/dist/chunk-CEJM5IFH.js +37 -0
- package/dist/{chunk-ICKIIBXC.js → chunk-FHHEEOIV.js} +2 -2
- package/dist/{chunk-PHC57UZZ.cjs → chunk-H7NSISN4.cjs} +33 -24
- package/dist/{chunk-QAYURSX7.cjs → chunk-IULOZ7MO.cjs} +5 -5
- package/dist/{chunk-QTR5272S.cjs → chunk-JCICRU7K.cjs} +3 -5
- package/dist/{chunk-OZEWXLIK.js → chunk-KV6GNLVF.js} +8 -10
- package/dist/{chunk-TULJZS5M.js → chunk-KXZCIMKJ.js} +149 -265
- package/dist/{chunk-T4UMKHLQ.cjs → chunk-LBRDOW2V.cjs} +18 -9
- package/dist/{chunk-5P6GWVMJ.js → chunk-NACKZM5D.js} +189 -116
- package/dist/chunk-NLIYZM5H.cjs +25 -0
- package/dist/{chunk-WHHAD2OY.js → chunk-Q3WZPCLD.js} +232 -123
- package/dist/{chunk-7ESNPD46.js → chunk-QOTJTLX7.js} +1 -1
- package/dist/{chunk-J5J57SEI.cjs → chunk-RBXXACL5.cjs} +204 -131
- package/dist/{chunk-KYRZY7X7.js → chunk-RNXNYWO3.js} +28 -19
- package/dist/{chunk-H35FAHLW.cjs → chunk-T4N45NGL.cjs} +17 -26
- package/dist/{chunk-66VO6PT4.js → chunk-VLK67MTI.js} +43 -17
- package/dist/{chunk-SR4MG2LN.js → chunk-VNLMOUVN.js} +15 -24
- package/dist/chunk-XHTD4QDZ.cjs +6 -0
- 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 -8
- package/dist/context.js +6 -7
- package/dist/index.cjs +15 -16
- package/dist/index.js +13 -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 +82 -5
- package/dist/plugins/resolve-paths.js +81 -4
- 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 +19 -29
- package/dist/watch.js +15 -25
- package/package.json +4 -4
- package/dist/chunk-AF5YHP7E.cjs +0 -57
- package/dist/chunk-BWCGRWHA.cjs +0 -6
- package/dist/chunk-ELF4S3RR.cjs +0 -31
- package/dist/chunk-IL6FCY37.js +0 -57
- package/dist/chunk-LQIX6FZY.js +0 -28
|
@@ -4,7 +4,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
7
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
8
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
9
|
}) : x)(function(x) {
|
|
@@ -34,20 +33,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
33
|
mod
|
|
35
34
|
));
|
|
36
35
|
|
|
37
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=616d4d8468728c5caa25e7b97fe871f667b5342103b43bda8e891020bc6b674a__e7bfd10e92d28211ce978b182e37e925/node_modules/tsup/assets/esm_shims.js
|
|
38
37
|
import { fileURLToPath } from "url";
|
|
39
38
|
import path from "path";
|
|
40
39
|
var getFilename, getDirname, __dirname;
|
|
41
40
|
var init_esm_shims = __esm({
|
|
42
|
-
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
43
|
-
getFilename =
|
|
44
|
-
getDirname =
|
|
41
|
+
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=616d4d8468728c5caa25e7b97fe871f667b5342103b43bda8e891020bc6b674a__e7bfd10e92d28211ce978b182e37e925/node_modules/tsup/assets/esm_shims.js"() {
|
|
42
|
+
getFilename = () => fileURLToPath(import.meta.url);
|
|
43
|
+
getDirname = () => path.dirname(getFilename());
|
|
45
44
|
__dirname = /* @__PURE__ */ getDirname();
|
|
46
45
|
}
|
|
47
46
|
});
|
|
48
47
|
|
|
49
48
|
export {
|
|
50
|
-
__name,
|
|
51
49
|
__require,
|
|
52
50
|
__commonJS,
|
|
53
51
|
__toESM,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
depsCheckPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VNLMOUVN.js";
|
|
4
4
|
import {
|
|
5
5
|
copyBuildAssets
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CEJM5IFH.js";
|
|
7
7
|
import {
|
|
8
8
|
cleanDirectories
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2LYIFO7K.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RNXNYWO3.js";
|
|
13
13
|
import {
|
|
14
14
|
generatePackageJson
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VLK67MTI.js";
|
|
16
16
|
import {
|
|
17
17
|
executeTsup
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KXZCIMKJ.js";
|
|
19
19
|
import {
|
|
20
20
|
getStopwatch,
|
|
21
21
|
writeDebug,
|
|
@@ -23,11 +23,10 @@ import {
|
|
|
23
23
|
writeFatal,
|
|
24
24
|
writeSuccess,
|
|
25
25
|
writeWarning
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NACKZM5D.js";
|
|
27
27
|
import {
|
|
28
|
-
__name,
|
|
29
28
|
init_esm_shims
|
|
30
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-72UBXZRO.js";
|
|
31
30
|
|
|
32
31
|
// src/build.ts
|
|
33
32
|
init_esm_shims();
|
|
@@ -36,15 +35,25 @@ import { globbySync } from "globby";
|
|
|
36
35
|
async function reportResults(context) {
|
|
37
36
|
if (context.result?.errors.length === 0) {
|
|
38
37
|
if (context.result.warnings.length > 0) {
|
|
39
|
-
writeWarning(
|
|
38
|
+
writeWarning(
|
|
39
|
+
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
40
|
+
context.workspaceConfig
|
|
41
|
+
);
|
|
40
42
|
}
|
|
41
|
-
writeSuccess(
|
|
43
|
+
writeSuccess(
|
|
44
|
+
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
45
|
+
context.workspaceConfig
|
|
46
|
+
);
|
|
42
47
|
} else if (context.result?.errors && context.result?.errors.length > 0) {
|
|
43
|
-
writeError(
|
|
44
|
-
|
|
48
|
+
writeError(
|
|
49
|
+
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
50
|
+
context.workspaceConfig
|
|
51
|
+
);
|
|
52
|
+
throw new Error(
|
|
53
|
+
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
54
|
+
);
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
|
-
__name(reportResults, "reportResults");
|
|
48
57
|
async function dependencyCheck(options) {
|
|
49
58
|
if (process.env.DEV === "true") {
|
|
50
59
|
return void 0;
|
|
@@ -55,43 +64,39 @@ async function dependencyCheck(options) {
|
|
|
55
64
|
const buildPromise = esbuild.build({
|
|
56
65
|
entryPoints: globbySync("**/*.{j,t}s", {
|
|
57
66
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
58
|
-
ignore: [
|
|
59
|
-
"./src/__tests__/**/*",
|
|
60
|
-
"./tests/e2e/**/*",
|
|
61
|
-
"./dist/**/*"
|
|
62
|
-
],
|
|
67
|
+
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
63
68
|
gitignore: true
|
|
64
69
|
}),
|
|
65
70
|
logLevel: "silent",
|
|
71
|
+
// there will be errors
|
|
66
72
|
bundle: true,
|
|
73
|
+
// we bundle to get everything
|
|
67
74
|
write: false,
|
|
75
|
+
// no need to write for analysis
|
|
68
76
|
outdir: "out",
|
|
69
|
-
plugins: [
|
|
70
|
-
depsCheckPlugin(options.bundle)
|
|
71
|
-
]
|
|
77
|
+
plugins: [depsCheckPlugin(options.bundle)]
|
|
72
78
|
});
|
|
73
79
|
await buildPromise.catch(() => {
|
|
74
80
|
});
|
|
75
81
|
return void 0;
|
|
76
82
|
}
|
|
77
|
-
__name(dependencyCheck, "dependencyCheck");
|
|
78
83
|
async function cleanOutputPath(context) {
|
|
79
84
|
if (context.clean !== false && context.outputPath) {
|
|
80
|
-
writeDebug(
|
|
85
|
+
writeDebug(
|
|
86
|
+
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
87
|
+
context.workspaceConfig
|
|
88
|
+
);
|
|
81
89
|
const stopwatch = getStopwatch(`${context.options.name} output clean`);
|
|
82
90
|
await cleanDirectories(context.outputPath);
|
|
83
91
|
stopwatch();
|
|
84
92
|
}
|
|
85
93
|
return context;
|
|
86
94
|
}
|
|
87
|
-
__name(cleanOutputPath, "cleanOutputPath");
|
|
88
95
|
async function build2(options) {
|
|
89
96
|
writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
|
|
90
97
|
const stopwatch = getStopwatch("ESBuild pipeline");
|
|
91
98
|
try {
|
|
92
|
-
const opts = Array.isArray(options) ? options : [
|
|
93
|
-
options
|
|
94
|
-
];
|
|
99
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
95
100
|
if (opts.length === 0) {
|
|
96
101
|
throw new Error("No build options were provided");
|
|
97
102
|
}
|
|
@@ -106,13 +111,14 @@ async function build2(options) {
|
|
|
106
111
|
await reportResults(context);
|
|
107
112
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
108
113
|
} catch (error) {
|
|
109
|
-
writeFatal(
|
|
114
|
+
writeFatal(
|
|
115
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
116
|
+
);
|
|
110
117
|
throw error;
|
|
111
118
|
} finally {
|
|
112
119
|
stopwatch();
|
|
113
120
|
}
|
|
114
121
|
}
|
|
115
|
-
__name(build2, "build");
|
|
116
122
|
|
|
117
123
|
export {
|
|
118
124
|
build2 as build
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var _chunkQTR5272Scjs = require('./chunk-QTR5272S.cjs');
|
|
3
|
+
var _chunkJCICRU7Kcjs = require('./chunk-JCICRU7K.cjs');
|
|
5
4
|
|
|
6
5
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
7
|
-
|
|
6
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
8
7
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
9
8
|
function normalizeWindowsPath(input = "") {
|
|
10
9
|
if (!input) {
|
|
@@ -12,11 +11,10 @@ function normalizeWindowsPath(input = "") {
|
|
|
12
11
|
}
|
|
13
12
|
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
14
13
|
}
|
|
15
|
-
_chunkQTR5272Scjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
|
|
16
14
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
17
15
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
18
16
|
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
19
|
-
var correctPaths =
|
|
17
|
+
var correctPaths = function(path) {
|
|
20
18
|
if (!path || path.length === 0) {
|
|
21
19
|
return ".";
|
|
22
20
|
}
|
|
@@ -44,8 +42,8 @@ var correctPaths = /* @__PURE__ */ _chunkQTR5272Scjs.__name.call(void 0, functio
|
|
|
44
42
|
return `//${path}`;
|
|
45
43
|
}
|
|
46
44
|
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
47
|
-
}
|
|
48
|
-
var joinPaths =
|
|
45
|
+
};
|
|
46
|
+
var joinPaths = function(...segments) {
|
|
49
47
|
let path = "";
|
|
50
48
|
for (const seg of segments) {
|
|
51
49
|
if (!seg) {
|
|
@@ -65,7 +63,7 @@ var joinPaths = /* @__PURE__ */ _chunkQTR5272Scjs.__name.call(void 0, function(.
|
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
return correctPaths(path);
|
|
68
|
-
}
|
|
66
|
+
};
|
|
69
67
|
function normalizeString(path, allowAboveRoot) {
|
|
70
68
|
let res = "";
|
|
71
69
|
let lastSegmentLength = 0;
|
|
@@ -126,12 +124,12 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
126
124
|
}
|
|
127
125
|
return res;
|
|
128
126
|
}
|
|
129
|
-
|
|
130
|
-
var isAbsolute = /* @__PURE__ */ _chunkQTR5272Scjs.__name.call(void 0, function(p) {
|
|
127
|
+
var isAbsolute = function(p) {
|
|
131
128
|
return _IS_ABSOLUTE_RE.test(p);
|
|
132
|
-
}
|
|
129
|
+
};
|
|
130
|
+
|
|
133
131
|
|
|
134
132
|
|
|
135
133
|
|
|
136
134
|
|
|
137
|
-
exports.correctPaths = correctPaths; exports.joinPaths = joinPaths;
|
|
135
|
+
exports.normalizeWindowsPath = normalizeWindowsPath; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths;
|
|
@@ -1,39 +1,60 @@
|
|
|
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 _chunk55UPQQ65cjs = require('./chunk-55UPQQ65.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRBXXACL5cjs = require('./chunk-RBXXACL5.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkB3MHVZOKcjs = require('./chunk-B3MHVZOK.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
var _chunkQTR5272Scjs = require('./chunk-QTR5272S.cjs');
|
|
14
|
+
var _chunkJCICRU7Kcjs = require('./chunk-JCICRU7K.cjs');
|
|
16
15
|
|
|
17
16
|
// src/package-json.ts
|
|
18
|
-
|
|
17
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
19
18
|
var _devkit = require('@nx/devkit');
|
|
20
19
|
var _fs = require('fs');
|
|
21
20
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
22
21
|
async function generatePackageJson(context) {
|
|
23
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
24
|
-
|
|
25
|
-
const stopwatch =
|
|
26
|
-
const packageJsonPath =
|
|
22
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkB3MHVZOKcjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
23
|
+
_chunkRBXXACL5cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
24
|
+
const stopwatch = _chunkRBXXACL5cjs.getStopwatch.call(void 0, "Write package.json file");
|
|
25
|
+
const packageJsonPath = _chunkB3MHVZOKcjs.joinPaths.call(void 0,
|
|
26
|
+
context.options.projectRoot,
|
|
27
|
+
"project.json"
|
|
28
|
+
);
|
|
27
29
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
28
30
|
throw new Error("Cannot find package.json configuration");
|
|
29
31
|
}
|
|
30
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
32
|
+
const packageJsonFile = await _promises2.default.readFile(
|
|
33
|
+
_chunkB3MHVZOKcjs.joinPaths.call(void 0,
|
|
34
|
+
context.workspaceConfig.workspaceRoot,
|
|
35
|
+
context.options.projectRoot,
|
|
36
|
+
"package.json"
|
|
37
|
+
),
|
|
38
|
+
"utf8"
|
|
39
|
+
);
|
|
31
40
|
let packageJson = JSON.parse(packageJsonFile);
|
|
32
41
|
if (!packageJson) {
|
|
33
42
|
throw new Error("Cannot find package.json configuration file");
|
|
34
43
|
}
|
|
35
|
-
packageJson = await
|
|
36
|
-
|
|
44
|
+
packageJson = await _chunk55UPQQ65cjs.addPackageDependencies.call(void 0,
|
|
45
|
+
context.workspaceConfig.workspaceRoot,
|
|
46
|
+
context.options.projectRoot,
|
|
47
|
+
context.projectName,
|
|
48
|
+
packageJson
|
|
49
|
+
);
|
|
50
|
+
packageJson = await _chunk55UPQQ65cjs.addWorkspacePackageJsonFields.call(void 0,
|
|
51
|
+
context.workspaceConfig,
|
|
52
|
+
context.options.projectRoot,
|
|
53
|
+
context.sourceRoot,
|
|
54
|
+
context.projectName,
|
|
55
|
+
false,
|
|
56
|
+
packageJson
|
|
57
|
+
);
|
|
37
58
|
if (context.options.entry) {
|
|
38
59
|
packageJson.exports ??= {};
|
|
39
60
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -103,20 +124,25 @@ async function generatePackageJson(context) {
|
|
|
103
124
|
if (isDts) {
|
|
104
125
|
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
105
126
|
}
|
|
106
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
107
|
-
|
|
108
|
-
ret[key.replace("/index", "")]
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
127
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
128
|
+
(ret, key) => {
|
|
129
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
130
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
131
|
+
}
|
|
132
|
+
return ret;
|
|
133
|
+
},
|
|
134
|
+
packageJson.exports
|
|
135
|
+
);
|
|
112
136
|
}
|
|
113
137
|
}
|
|
114
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
138
|
+
await _devkit.writeJsonFile.call(void 0,
|
|
139
|
+
_chunkB3MHVZOKcjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
140
|
+
packageJson
|
|
141
|
+
);
|
|
115
142
|
stopwatch();
|
|
116
143
|
}
|
|
117
144
|
return context;
|
|
118
145
|
}
|
|
119
|
-
_chunkQTR5272Scjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
120
146
|
|
|
121
147
|
|
|
122
148
|
|
|
@@ -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 _chunkT4N45NGLcjs = require('./chunk-T4N45NGL.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkLBRDOW2Vcjs = require('./chunk-LBRDOW2V.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkNLIYZM5Hcjs = require('./chunk-NLIYZM5H.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkH7NSISN4cjs = require('./chunk-H7NSISN4.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkBK5GLVSJcjs = require('./chunk-BK5GLVSJ.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkC25ALB4Jcjs = require('./chunk-C25ALB4J.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -23,28 +23,37 @@ var _chunkVITVYHJGcjs = require('./chunk-VITVYHJG.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkRBXXACL5cjs = require('./chunk-RBXXACL5.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
var _chunkQTR5272Scjs = require('./chunk-QTR5272S.cjs');
|
|
29
|
+
var _chunkJCICRU7Kcjs = require('./chunk-JCICRU7K.cjs');
|
|
31
30
|
|
|
32
31
|
// src/build.ts
|
|
33
|
-
|
|
32
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
34
33
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
35
34
|
var _globby = require('globby');
|
|
36
35
|
async function reportResults(context) {
|
|
37
36
|
if (_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) === 0) {
|
|
38
37
|
if (context.result.warnings.length > 0) {
|
|
39
|
-
|
|
38
|
+
_chunkRBXXACL5cjs.writeWarning.call(void 0,
|
|
39
|
+
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
40
|
+
context.workspaceConfig
|
|
41
|
+
);
|
|
40
42
|
}
|
|
41
|
-
|
|
43
|
+
_chunkRBXXACL5cjs.writeSuccess.call(void 0,
|
|
44
|
+
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
45
|
+
context.workspaceConfig
|
|
46
|
+
);
|
|
42
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) {
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
_chunkRBXXACL5cjs.writeError.call(void 0,
|
|
49
|
+
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
50
|
+
context.workspaceConfig
|
|
51
|
+
);
|
|
52
|
+
throw new Error(
|
|
53
|
+
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
54
|
+
);
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
|
-
_chunkQTR5272Scjs.__name.call(void 0, reportResults, "reportResults");
|
|
48
57
|
async function dependencyCheck(options) {
|
|
49
58
|
if (process.env.DEV === "true") {
|
|
50
59
|
return void 0;
|
|
@@ -55,64 +64,61 @@ async function dependencyCheck(options) {
|
|
|
55
64
|
const buildPromise = esbuild.build({
|
|
56
65
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
57
66
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
58
|
-
ignore: [
|
|
59
|
-
"./src/__tests__/**/*",
|
|
60
|
-
"./tests/e2e/**/*",
|
|
61
|
-
"./dist/**/*"
|
|
62
|
-
],
|
|
67
|
+
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
63
68
|
gitignore: true
|
|
64
69
|
}),
|
|
65
70
|
logLevel: "silent",
|
|
71
|
+
// there will be errors
|
|
66
72
|
bundle: true,
|
|
73
|
+
// we bundle to get everything
|
|
67
74
|
write: false,
|
|
75
|
+
// no need to write for analysis
|
|
68
76
|
outdir: "out",
|
|
69
|
-
plugins: [
|
|
70
|
-
_chunkH35FAHLWcjs.depsCheckPlugin.call(void 0, options.bundle)
|
|
71
|
-
]
|
|
77
|
+
plugins: [_chunkT4N45NGLcjs.depsCheckPlugin.call(void 0, options.bundle)]
|
|
72
78
|
});
|
|
73
79
|
await buildPromise.catch(() => {
|
|
74
80
|
});
|
|
75
81
|
return void 0;
|
|
76
82
|
}
|
|
77
|
-
_chunkQTR5272Scjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
78
83
|
async function cleanOutputPath(context) {
|
|
79
84
|
if (context.clean !== false && context.outputPath) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
_chunkRBXXACL5cjs.writeDebug.call(void 0,
|
|
86
|
+
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
87
|
+
context.workspaceConfig
|
|
88
|
+
);
|
|
89
|
+
const stopwatch = _chunkRBXXACL5cjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
90
|
+
await _chunkNLIYZM5Hcjs.cleanDirectories.call(void 0, context.outputPath);
|
|
83
91
|
stopwatch();
|
|
84
92
|
}
|
|
85
93
|
return context;
|
|
86
94
|
}
|
|
87
|
-
_chunkQTR5272Scjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
88
95
|
async function build2(options) {
|
|
89
|
-
|
|
90
|
-
const stopwatch =
|
|
96
|
+
_chunkRBXXACL5cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
97
|
+
const stopwatch = _chunkRBXXACL5cjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
91
98
|
try {
|
|
92
|
-
const opts = Array.isArray(options) ? options : [
|
|
93
|
-
options
|
|
94
|
-
];
|
|
99
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
95
100
|
if (opts.length === 0) {
|
|
96
101
|
throw new Error("No build options were provided");
|
|
97
102
|
}
|
|
98
|
-
const context = await
|
|
103
|
+
const context = await _chunkH7NSISN4cjs.resolveContext.call(void 0, options);
|
|
99
104
|
await cleanOutputPath(context);
|
|
100
105
|
await Promise.all([
|
|
101
106
|
dependencyCheck(context.options),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
_chunkBK5GLVSJcjs.generatePackageJson.call(void 0, context),
|
|
108
|
+
_chunkLBRDOW2Vcjs.copyBuildAssets.call(void 0, context),
|
|
109
|
+
_chunkC25ALB4Jcjs.executeTsup.call(void 0, context)
|
|
105
110
|
]);
|
|
106
111
|
await reportResults(context);
|
|
107
|
-
|
|
112
|
+
_chunkRBXXACL5cjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
108
113
|
} catch (error) {
|
|
109
|
-
|
|
114
|
+
_chunkRBXXACL5cjs.writeFatal.call(void 0,
|
|
115
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
116
|
+
);
|
|
110
117
|
throw error;
|
|
111
118
|
} finally {
|
|
112
119
|
stopwatch();
|
|
113
120
|
}
|
|
114
121
|
}
|
|
115
|
-
_chunkQTR5272Scjs.__name.call(void 0, build2, "build");
|
|
116
122
|
|
|
117
123
|
|
|
118
124
|
|