@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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
copyAssets
|
|
3
|
+
} from "./chunk-Q3WZPCLD.js";
|
|
4
|
+
import {
|
|
5
|
+
getStopwatch,
|
|
6
|
+
writeDebug
|
|
7
|
+
} from "./chunk-NACKZM5D.js";
|
|
8
|
+
import {
|
|
9
|
+
init_esm_shims
|
|
10
|
+
} from "./chunk-72UBXZRO.js";
|
|
11
|
+
|
|
12
|
+
// src/assets.ts
|
|
13
|
+
init_esm_shims();
|
|
14
|
+
async function copyBuildAssets(context) {
|
|
15
|
+
if (context.result?.errors.length === 0) {
|
|
16
|
+
writeDebug(
|
|
17
|
+
` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
|
|
18
|
+
context.workspaceConfig
|
|
19
|
+
);
|
|
20
|
+
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
21
|
+
await copyAssets(
|
|
22
|
+
context.workspaceConfig,
|
|
23
|
+
context.options.assets ?? [],
|
|
24
|
+
context.outputPath,
|
|
25
|
+
context.options.projectRoot,
|
|
26
|
+
context.sourceRoot,
|
|
27
|
+
true,
|
|
28
|
+
false
|
|
29
|
+
);
|
|
30
|
+
stopwatch();
|
|
31
|
+
}
|
|
32
|
+
return context;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
copyBuildAssets
|
|
37
|
+
};
|
|
@@ -1,27 +1,26 @@
|
|
|
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 _chunkIULOZ7MOcjs = require('./chunk-IULOZ7MO.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var _chunkQAYURSX7cjs = require('./chunk-QAYURSX7.cjs');
|
|
7
6
|
|
|
7
|
+
var _chunk55UPQQ65cjs = require('./chunk-55UPQQ65.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var _chunkKXCV2R7Jcjs = require('./chunk-KXCV2R7J.cjs');
|
|
11
10
|
|
|
11
|
+
var _chunkRBXXACL5cjs = require('./chunk-RBXXACL5.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkB3MHVZOKcjs = require('./chunk-B3MHVZOK.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkJCICRU7Kcjs = require('./chunk-JCICRU7K.cjs');
|
|
18
18
|
|
|
19
|
+
// src/context.ts
|
|
20
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
19
21
|
|
|
20
22
|
|
|
21
|
-
var _chunkQTR5272Scjs = require('./chunk-QTR5272S.cjs');
|
|
22
23
|
|
|
23
|
-
// src/context.ts
|
|
24
|
-
_chunkQTR5272Scjs.init_cjs_shims.call(void 0, );
|
|
25
24
|
var _devkit = require('@nx/devkit');
|
|
26
25
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
27
26
|
var _fs = require('fs');
|
|
@@ -33,15 +32,19 @@ async function resolveContext(userOptions) {
|
|
|
33
32
|
if (!workspaceRoot) {
|
|
34
33
|
throw new Error("Cannot find Nx workspace root");
|
|
35
34
|
}
|
|
36
|
-
const workspaceConfig = await
|
|
35
|
+
const workspaceConfig = await _chunk55UPQQ65cjs.getWorkspaceConfig.call(void 0, true, {
|
|
37
36
|
workspaceRoot: workspaceRoot.dir
|
|
38
37
|
});
|
|
39
|
-
|
|
40
|
-
const stopwatch =
|
|
38
|
+
_chunkRBXXACL5cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
39
|
+
const stopwatch = _chunkRBXXACL5cjs.getStopwatch.call(void 0, "Build options resolution");
|
|
41
40
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
42
41
|
exitOnError: true
|
|
43
42
|
});
|
|
44
|
-
const projectJsonPath =
|
|
43
|
+
const projectJsonPath = _chunkB3MHVZOKcjs.joinPaths.call(void 0,
|
|
44
|
+
workspaceRoot.dir,
|
|
45
|
+
projectRoot,
|
|
46
|
+
"project.json"
|
|
47
|
+
);
|
|
45
48
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
46
49
|
throw new Error("Cannot find project.json configuration");
|
|
47
50
|
}
|
|
@@ -50,18 +53,24 @@ async function resolveContext(userOptions) {
|
|
|
50
53
|
const projectName = projectJson.name || userOptions.name;
|
|
51
54
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
52
55
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _ => _.projects, 'optionalAccess', _2 => _2[projectName]])) {
|
|
53
|
-
throw new Error(
|
|
56
|
+
throw new Error(
|
|
57
|
+
"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."
|
|
58
|
+
);
|
|
54
59
|
}
|
|
55
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
60
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkIULOZ7MOcjs.DEFAULT_BUILD_OPTIONS);
|
|
56
61
|
options.name ??= projectName;
|
|
57
|
-
const packageJsonPath =
|
|
62
|
+
const packageJsonPath = _chunkB3MHVZOKcjs.joinPaths.call(void 0,
|
|
63
|
+
workspaceRoot.dir,
|
|
64
|
+
options.projectRoot,
|
|
65
|
+
"package.json"
|
|
66
|
+
);
|
|
58
67
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
59
68
|
throw new Error("Cannot find package.json configuration");
|
|
60
69
|
}
|
|
61
|
-
const env =
|
|
70
|
+
const env = _chunk55UPQQ65cjs.getEnv.call(void 0, "esbuild", options);
|
|
62
71
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
63
72
|
const resolvedOptions = {
|
|
64
|
-
tsconfig:
|
|
73
|
+
tsconfig: _chunkB3MHVZOKcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json"),
|
|
65
74
|
...options,
|
|
66
75
|
metafile: userOptions.mode === "development",
|
|
67
76
|
clean: false,
|
|
@@ -87,17 +96,17 @@ async function resolveContext(userOptions) {
|
|
|
87
96
|
projectConfigurations,
|
|
88
97
|
projectName,
|
|
89
98
|
projectGraph,
|
|
90
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
91
|
-
outputPath: resolvedOptions.outputPath ||
|
|
99
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkB3MHVZOKcjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
100
|
+
outputPath: resolvedOptions.outputPath || _chunkB3MHVZOKcjs.joinPaths.call(void 0,
|
|
101
|
+
workspaceConfig.workspaceRoot,
|
|
102
|
+
"dist",
|
|
103
|
+
resolvedOptions.projectRoot
|
|
104
|
+
),
|
|
92
105
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
93
106
|
};
|
|
94
|
-
context.options.esbuildPlugins = [
|
|
95
|
-
_chunkAF5YHP7Ecjs.resolvePathsPlugin.call(void 0, context),
|
|
96
|
-
..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))
|
|
97
|
-
];
|
|
107
|
+
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
98
108
|
return context;
|
|
99
109
|
}
|
|
100
|
-
_chunkQTR5272Scjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
101
110
|
|
|
102
111
|
|
|
103
112
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk55UPQQ65cjs = require('./chunk-55UPQQ65.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkJCICRU7Kcjs = require('./chunk-JCICRU7K.cjs');
|
|
7
7
|
|
|
8
8
|
// src/config.ts
|
|
9
|
-
|
|
9
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
10
10
|
var DEFAULT_BUILD_OPTIONS = {
|
|
11
11
|
assets: [],
|
|
12
12
|
platform: "node",
|
|
@@ -46,8 +46,8 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
46
46
|
".woff2": "file"
|
|
47
47
|
},
|
|
48
48
|
banner: {
|
|
49
|
-
js:
|
|
50
|
-
css:
|
|
49
|
+
js: _chunk55UPQQ65cjs.DEFAULT_COMPILED_BANNER,
|
|
50
|
+
css: _chunk55UPQQ65cjs.DEFAULT_COMPILED_BANNER
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
|
|
@@ -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,9 +33,9 @@ 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/cjs_shims.js
|
|
38
37
|
var init_cjs_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=616d4d8468728c5caa25e7b97fe871f667b5342103b43bda8e891020bc6b674a__e7bfd10e92d28211ce978b182e37e925/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
41
|
|
|
@@ -45,5 +44,4 @@ var init_cjs_shims = __esm({
|
|
|
45
44
|
|
|
46
45
|
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
exports.__name = __name; exports.__require = __require; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.init_cjs_shims = init_cjs_shims;
|
|
47
|
+
exports.__require = __require; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.init_cjs_shims = init_cjs_shims;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__name,
|
|
3
2
|
init_esm_shims
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-72UBXZRO.js";
|
|
5
4
|
|
|
6
5
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
7
6
|
init_esm_shims();
|
|
@@ -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
|
-
__name(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__ */ __name(function(path) {
|
|
|
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__ */ __name(function(...segments) {
|
|
|
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__ */ __name(function(p) {
|
|
127
|
+
var isAbsolute = function(p) {
|
|
131
128
|
return _IS_ABSOLUTE_RE.test(p);
|
|
132
|
-
}
|
|
129
|
+
};
|
|
133
130
|
|
|
134
131
|
export {
|
|
132
|
+
normalizeWindowsPath,
|
|
135
133
|
correctPaths,
|
|
136
134
|
joinPaths
|
|
137
135
|
};
|