@trebired/bundler 1.4.0 → 1.6.0
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/CHANGELOG.md +13 -0
- package/README.md +60 -35
- package/dist/core/asset-manifest.d.ts +5 -0
- package/dist/core/asset-manifest.d.ts.map +1 -0
- package/dist/core/asset-manifest.js +257 -0
- package/dist/core/asset-manifest.js.map +1 -0
- package/dist/core/esbuild-options.d.ts +0 -10
- package/dist/core/esbuild-options.d.ts.map +1 -1
- package/dist/core/esbuild-options.js +2 -59
- package/dist/core/esbuild-options.js.map +1 -1
- package/dist/core/import-graph.d.ts +4 -0
- package/dist/core/import-graph.d.ts.map +1 -0
- package/dist/core/import-graph.js +410 -0
- package/dist/core/import-graph.js.map +1 -0
- package/dist/core/manifest.d.ts.map +1 -1
- package/dist/core/manifest.js +7 -0
- package/dist/core/manifest.js.map +1 -1
- package/dist/core/shared.d.ts.map +1 -1
- package/dist/core/shared.js +10 -0
- package/dist/core/shared.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/plugins/scss.d.ts +0 -2
- package/dist/plugins/scss.d.ts.map +1 -1
- package/dist/plugins/scss.js +2 -6
- package/dist/plugins/scss.js.map +1 -1
- package/dist/plugins/source-annotations.d.ts +0 -3
- package/dist/plugins/source-annotations.d.ts.map +1 -1
- package/dist/plugins/source-annotations.js +6 -19
- package/dist/plugins/source-annotations.js.map +1 -1
- package/dist/plugins/virtual-entries.d.ts +0 -2
- package/dist/plugins/virtual-entries.d.ts.map +1 -1
- package/dist/plugins/virtual-entries.js +1 -8
- package/dist/plugins/virtual-entries.js.map +1 -1
- package/dist/types.d.ts +78 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -10
- package/dist/plugins/obfuscation.d.ts +0 -13
- package/dist/plugins/obfuscation.d.ts.map +0 -1
- package/dist/plugins/obfuscation.js +0 -606
- package/dist/plugins/obfuscation.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ All notable changes to `@trebired/bundler` will be documented here.
|
|
|
4
4
|
|
|
5
5
|
This project follows semantic versioning once published.
|
|
6
6
|
|
|
7
|
+
## 1.6.0
|
|
8
|
+
|
|
9
|
+
- Added `buildAssetManifest()` for a runtime-friendly asset manifest keyed by logical entries and source paths.
|
|
10
|
+
- Added `collectAssetLinks()` for collecting emitted scripts, styles, and other assets without app-specific HTML generation.
|
|
11
|
+
- Added `walkImportGraph()` for generic source dependency walking with relative import and tsconfig `paths` resolution.
|
|
12
|
+
- Exposed `assetManifest` on `bundle()` and `watch()` build results and included the same structure in the written bundler manifest.
|
|
13
|
+
|
|
14
|
+
## 1.5.0
|
|
15
|
+
|
|
16
|
+
- Removed the `obfuscate` option and all package-owned obfuscation behavior, including hashed artifact naming, property mangling, and static class-token rewriting.
|
|
17
|
+
- Kept `extreme` mode as the strongest compacting profile while making its output naming and class strings stay stable and readable.
|
|
18
|
+
- Removed the leftover indirect esbuild `platform` key shim and now pass the normalized `environment` value directly.
|
|
19
|
+
|
|
7
20
|
## 1.4.0
|
|
8
21
|
|
|
9
22
|
- Fixed `extreme` mode class obfuscation so emitted JS, TS, JSX, and TSX class usage stays aligned with obfuscated CSS output across bound identifiers, class-bearing object props, helper aliases, template literals, and HTML fragments.
|
package/README.md
CHANGED
|
@@ -26,10 +26,13 @@ Use this when:
|
|
|
26
26
|
- you want newly created matching files to join the build without external entry regeneration code
|
|
27
27
|
- you want a manifest describing resolved entries and generated outputs
|
|
28
28
|
- you want a stable helper for turning esbuild metafiles into runtime asset graphs
|
|
29
|
+
- you want a runtime-friendly asset manifest keyed by entry names and source paths
|
|
30
|
+
- you want a package-owned helper for collecting script and stylesheet links for selected entries
|
|
31
|
+
- you want a generic import graph walker with tsconfig path resolution for higher-level presets
|
|
29
32
|
- you want rebuild hooks instead of scraping logger text
|
|
30
33
|
- you want generated bundles to optionally include inline comments that point back to the original source file path
|
|
31
34
|
- you want production-lean defaults with minified output and stripped comments
|
|
32
|
-
- you want a stronger `extreme` mode for
|
|
35
|
+
- you want a stronger `extreme` mode for the most aggressive package-owned compacting defaults
|
|
33
36
|
- you want package-owned logs routed through `@trebired/logger-adapter`
|
|
34
37
|
|
|
35
38
|
## What It Does Not Do
|
|
@@ -126,6 +129,7 @@ The manifest contains:
|
|
|
126
129
|
- resolved entries
|
|
127
130
|
- whether each entry came from `manual` config or `discover`
|
|
128
131
|
- generated output files
|
|
132
|
+
- a runtime-friendly `assetManifest` keyed by entry source path, with lookup maps for entry names and emitted outputs
|
|
129
133
|
|
|
130
134
|
If you want a runtime-friendly asset graph directly in app code, call `deriveManifest()` on the returned `metafile`:
|
|
131
135
|
|
|
@@ -151,6 +155,37 @@ The helper returns:
|
|
|
151
155
|
- `chunks`: shared output -> import/CSS graph
|
|
152
156
|
- `allOutputs`: flat normalized output index
|
|
153
157
|
|
|
158
|
+
If you want a manifest ready for runtime asset selection, use `buildAssetManifest()`:
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
import { buildAssetManifest, bundle, collectAssetLinks } from "@trebired/bundler";
|
|
162
|
+
|
|
163
|
+
const result = await bundle({
|
|
164
|
+
entries: {
|
|
165
|
+
app: "./src/app.tsx",
|
|
166
|
+
},
|
|
167
|
+
outDir: "./dist",
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
const assetManifest = result.assetManifest || buildAssetManifest({
|
|
171
|
+
metafile: result.metafile!,
|
|
172
|
+
outDir: "./dist",
|
|
173
|
+
rootDir: process.cwd(),
|
|
174
|
+
resolvedEntries: result.entries,
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
const assets = collectAssetLinks(assetManifest, ["app"], {
|
|
178
|
+
publicPath: "/",
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The runtime asset manifest exposes:
|
|
183
|
+
|
|
184
|
+
- `entries`: entry source path -> primary file, reachable JS, reachable CSS, and other emitted assets
|
|
185
|
+
- `entryNames`: logical entry name -> entry source path
|
|
186
|
+
- `entryOutputs`: emitted entry file -> entry source path
|
|
187
|
+
- `outputs`: emitted output index relative to `outDir`
|
|
188
|
+
|
|
154
189
|
## Virtual Entries
|
|
155
190
|
|
|
156
191
|
Use `virtualEntries` when you want generated entry modules without writing temporary files:
|
|
@@ -198,6 +233,25 @@ await watch({
|
|
|
198
233
|
|
|
199
234
|
`onEntrySetChanged()` runs only when the resolved entry set changes. `onRebuilt()` runs after a successful rebuild result is assembled.
|
|
200
235
|
|
|
236
|
+
## Import Graph Walking
|
|
237
|
+
|
|
238
|
+
Use `walkImportGraph()` when a higher-level preset needs to inspect internal source dependencies without reimplementing relative import or tsconfig-path resolution:
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
import { walkImportGraph } from "@trebired/bundler";
|
|
242
|
+
|
|
243
|
+
const graph = await walkImportGraph({
|
|
244
|
+
entries: "./src/app.tsx",
|
|
245
|
+
rootDir: process.cwd(),
|
|
246
|
+
});
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
The helper:
|
|
250
|
+
|
|
251
|
+
- walks static imports, re-exports, and string-literal dynamic imports
|
|
252
|
+
- resolves relative imports and tsconfig `paths`
|
|
253
|
+
- returns a root-relative file graph with resolved internal imports marked explicitly
|
|
254
|
+
|
|
201
255
|
## Optimization Defaults
|
|
202
256
|
|
|
203
257
|
`@trebired/bundler` now defaults to production-lean output through `mode: "compact"`:
|
|
@@ -209,9 +263,9 @@ await watch({
|
|
|
209
263
|
|
|
210
264
|
Available modes:
|
|
211
265
|
|
|
212
|
-
- `debug`: readable output, no minification, no
|
|
266
|
+
- `debug`: readable output, no minification, no comment stripping by default
|
|
213
267
|
- `compact`: minified output with stripped preserved comments by default
|
|
214
|
-
- `extreme`: compact mode
|
|
268
|
+
- `extreme`: compact mode with the strongest package-owned compacting profile, without renaming classes or artifacts
|
|
215
269
|
|
|
216
270
|
If you want a more readable debug build:
|
|
217
271
|
|
|
@@ -229,7 +283,7 @@ await bundle({
|
|
|
229
283
|
|
|
230
284
|
## Extreme Mode
|
|
231
285
|
|
|
232
|
-
Use `mode: "extreme"` when you want the package to
|
|
286
|
+
Use `mode: "extreme"` when you want the package to apply its strongest built-in compacting profile:
|
|
233
287
|
|
|
234
288
|
```ts
|
|
235
289
|
await bundle({
|
|
@@ -245,30 +299,9 @@ This mode enables:
|
|
|
245
299
|
|
|
246
300
|
- minification
|
|
247
301
|
- stripped preserved comments
|
|
248
|
-
-
|
|
249
|
-
- static class-name rewriting across CSS plus JS/TS/JSX/TSX class usage
|
|
250
|
-
- no kept function/class names unless you override that behavior
|
|
251
|
-
|
|
252
|
-
## Obfuscation
|
|
302
|
+
- stable entry, chunk, and asset naming
|
|
253
303
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
```ts
|
|
257
|
-
await bundle({
|
|
258
|
-
entries: {
|
|
259
|
-
app: "./src/app.tsx",
|
|
260
|
-
},
|
|
261
|
-
obfuscate: {
|
|
262
|
-
entryNames: "x/[hash]",
|
|
263
|
-
chunkNames: "x/[hash]",
|
|
264
|
-
assetNames: "x/[hash]",
|
|
265
|
-
mangleProps: "^_",
|
|
266
|
-
},
|
|
267
|
-
outDir: "./dist",
|
|
268
|
-
});
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
This obfuscation layer covers emitted artifact names, esbuild-supported JS property mangling, and coordinated rewriting of static CSS class usage across CSS plus JS/TS/JSX/TSX code. Dynamic class construction still stays outside the package-owned rewrite layer.
|
|
304
|
+
Today `extreme` intentionally keeps the same readable artifact and class names as other modes. The difference is its production-lean compacting profile, not obfuscation.
|
|
272
305
|
|
|
273
306
|
## Source Annotation Comments
|
|
274
307
|
|
|
@@ -341,14 +374,6 @@ type BundlerOptions = {
|
|
|
341
374
|
target?: string | string[];
|
|
342
375
|
minify?: boolean;
|
|
343
376
|
stripComments?: boolean;
|
|
344
|
-
obfuscate?: boolean | {
|
|
345
|
-
assetNames?: string;
|
|
346
|
-
chunkNames?: string;
|
|
347
|
-
entryNames?: string;
|
|
348
|
-
keepNames?: boolean;
|
|
349
|
-
mangleProps?: RegExp | string;
|
|
350
|
-
mangleQuoted?: boolean;
|
|
351
|
-
};
|
|
352
377
|
sourcemap?: boolean | "inline" | "external";
|
|
353
378
|
splitting?: boolean;
|
|
354
379
|
publicPath?: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BundlerAssetManifest, BundlerBuildAssetManifestOptions, BundlerCollectedAssetLinks, BundlerCollectAssetLinksOptions } from "../types.js";
|
|
2
|
+
declare function buildAssetManifest(options: BundlerBuildAssetManifestOptions): BundlerAssetManifest;
|
|
3
|
+
declare function collectAssetLinks(manifest: BundlerAssetManifest, entryIds: string[], options?: BundlerCollectAssetLinksOptions): BundlerCollectedAssetLinks;
|
|
4
|
+
export { buildAssetManifest, collectAssetLinks };
|
|
5
|
+
//# sourceMappingURL=asset-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-manifest.d.ts","sourceRoot":"","sources":["../../src/core/asset-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EAEpB,gCAAgC,EAChC,0BAA0B,EAE1B,+BAA+B,EAGhC,MAAM,aAAa,CAAC;AA8HrB,iBAAS,kBAAkB,CAAC,OAAO,EAAE,gCAAgC,GAAG,oBAAoB,CAkF3F;AA0CD,iBAAS,iBAAiB,CACxB,QAAQ,EAAE,oBAAoB,EAC9B,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,GAAE,+BAAoC,GAC5C,0BAA0B,CAqD5B;AAED,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { deriveManifest } from "./derive-manifest.js";
|
|
3
|
+
import { toPosixPath } from "./discovery.js";
|
|
4
|
+
function normalizeKey(value) {
|
|
5
|
+
return toPosixPath(String(value || "").trim()).replace(/^\.\/+/, "").replace(/^\/+|\/+$/g, "");
|
|
6
|
+
}
|
|
7
|
+
function normalizeSourcePath(value, rootDir) {
|
|
8
|
+
const raw = String(value || "").trim();
|
|
9
|
+
if (!raw)
|
|
10
|
+
return "";
|
|
11
|
+
if (raw.startsWith("virtual:"))
|
|
12
|
+
return normalizeKey(raw);
|
|
13
|
+
const absolute = path.isAbsolute(raw) ? raw : path.resolve(rootDir, raw);
|
|
14
|
+
return normalizeKey(path.relative(rootDir, absolute));
|
|
15
|
+
}
|
|
16
|
+
function normalizeOutputPath(value, rootDir, outDir) {
|
|
17
|
+
const raw = String(value || "").trim();
|
|
18
|
+
if (!raw)
|
|
19
|
+
return "";
|
|
20
|
+
if (path.isAbsolute(raw)) {
|
|
21
|
+
return normalizeKey(path.relative(outDir, raw));
|
|
22
|
+
}
|
|
23
|
+
const normalized = normalizeKey(raw);
|
|
24
|
+
if (!normalized)
|
|
25
|
+
return "";
|
|
26
|
+
const outDirRel = normalizeKey(path.relative(rootDir, outDir));
|
|
27
|
+
if (outDirRel && normalized.startsWith(`${outDirRel}/`)) {
|
|
28
|
+
return normalized.slice(outDirRel.length + 1);
|
|
29
|
+
}
|
|
30
|
+
return normalized;
|
|
31
|
+
}
|
|
32
|
+
function toStableList(values) {
|
|
33
|
+
return Array.from(new Set(Array.from(values).filter(Boolean)));
|
|
34
|
+
}
|
|
35
|
+
function normalizeResolvedEntries(resolvedEntries, rootDir) {
|
|
36
|
+
const out = new Map();
|
|
37
|
+
if (!resolvedEntries)
|
|
38
|
+
return out;
|
|
39
|
+
if (Array.isArray(resolvedEntries)) {
|
|
40
|
+
for (const entry of resolvedEntries) {
|
|
41
|
+
const entryKey = entry.source === "virtual"
|
|
42
|
+
? `virtual:${normalizeKey(entry.name)}`
|
|
43
|
+
: normalizeSourcePath(entry.path, rootDir);
|
|
44
|
+
if (!entryKey || !entry.name)
|
|
45
|
+
continue;
|
|
46
|
+
out.set(entryKey, entry.name);
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
for (const [entryName, entryPath] of Object.entries(resolvedEntries)) {
|
|
51
|
+
const entryKey = normalizeSourcePath(entryPath, rootDir);
|
|
52
|
+
if (!entryKey || !entryName)
|
|
53
|
+
continue;
|
|
54
|
+
out.set(entryKey, normalizeKey(entryName));
|
|
55
|
+
}
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
function collectReachableOutputs(args) {
|
|
59
|
+
const seen = new Set();
|
|
60
|
+
const stack = [args.entryOutput];
|
|
61
|
+
while (stack.length) {
|
|
62
|
+
const current = stack.pop();
|
|
63
|
+
if (!current || seen.has(current))
|
|
64
|
+
continue;
|
|
65
|
+
seen.add(current);
|
|
66
|
+
const output = args.outputs[current];
|
|
67
|
+
if (!output)
|
|
68
|
+
continue;
|
|
69
|
+
for (const imported of output.imports) {
|
|
70
|
+
if (args.outputs[imported]) {
|
|
71
|
+
stack.push(imported);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
for (const css of output.css) {
|
|
75
|
+
if (args.outputs[css]) {
|
|
76
|
+
stack.push(css);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return Array.from(seen).sort();
|
|
81
|
+
}
|
|
82
|
+
function createEntryRecord(args) {
|
|
83
|
+
const js = toStableList(args.js);
|
|
84
|
+
const css = toStableList(args.css);
|
|
85
|
+
const outputs = toStableList(args.outputs);
|
|
86
|
+
const jsSet = new Set(js);
|
|
87
|
+
const cssSet = new Set(css);
|
|
88
|
+
return {
|
|
89
|
+
entryName: args.entryName,
|
|
90
|
+
entrySource: args.entrySource,
|
|
91
|
+
file: args.entryOutput,
|
|
92
|
+
entryOutput: args.entryOutput,
|
|
93
|
+
outputs,
|
|
94
|
+
js,
|
|
95
|
+
css,
|
|
96
|
+
assets: outputs.filter((value) => !jsSet.has(value) && !cssSet.has(value)),
|
|
97
|
+
imports: toStableList(args.imports),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function buildAssetManifest(options) {
|
|
101
|
+
const rootDir = path.resolve(options.rootDir);
|
|
102
|
+
const outDir = path.resolve(rootDir, options.outDir);
|
|
103
|
+
const derived = deriveManifest(options.metafile, {
|
|
104
|
+
outDir,
|
|
105
|
+
rootDir,
|
|
106
|
+
});
|
|
107
|
+
const resolvedEntryNames = normalizeResolvedEntries(options.resolvedEntries, rootDir);
|
|
108
|
+
const entries = {};
|
|
109
|
+
const entryNames = {};
|
|
110
|
+
const entrySources = {};
|
|
111
|
+
const entryOutputs = {};
|
|
112
|
+
const outputs = {};
|
|
113
|
+
for (const output of Object.values(derived.allOutputs)) {
|
|
114
|
+
const entrySource = output.entryPoint
|
|
115
|
+
? normalizeSourcePath(output.entryPoint, rootDir)
|
|
116
|
+
: undefined;
|
|
117
|
+
const entryName = entrySource
|
|
118
|
+
? resolvedEntryNames.get(entrySource) || output.entryName
|
|
119
|
+
: output.entryName;
|
|
120
|
+
const outputKey = normalizeOutputPath(output.output, rootDir, outDir);
|
|
121
|
+
if (!outputKey)
|
|
122
|
+
continue;
|
|
123
|
+
outputs[outputKey] = {
|
|
124
|
+
output: outputKey,
|
|
125
|
+
kind: output.kind,
|
|
126
|
+
entryName,
|
|
127
|
+
entrySource,
|
|
128
|
+
entryPoint: entrySource,
|
|
129
|
+
inputs: output.inputs.map((value) => normalizeSourcePath(value, rootDir)).filter(Boolean),
|
|
130
|
+
css: output.css.map((value) => normalizeOutputPath(value, rootDir, outDir)).filter(Boolean),
|
|
131
|
+
imports: output.imports.map((value) => normalizeOutputPath(value, rootDir, outDir)).filter(Boolean),
|
|
132
|
+
bytes: output.bytes,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
for (const entry of Object.values(derived.entries)) {
|
|
136
|
+
const outputInfo = derived.allOutputs[entry.entryOutput];
|
|
137
|
+
const entrySource = outputInfo?.entryPoint
|
|
138
|
+
? normalizeSourcePath(outputInfo.entryPoint, rootDir)
|
|
139
|
+
: undefined;
|
|
140
|
+
const entryName = entrySource
|
|
141
|
+
? resolvedEntryNames.get(entrySource) || outputInfo?.entryName || entry.entryName
|
|
142
|
+
: outputInfo?.entryName || entry.entryName;
|
|
143
|
+
const entryKey = entrySource || normalizeOutputPath(entry.entryOutput, rootDir, outDir);
|
|
144
|
+
const entryOutput = normalizeOutputPath(entry.entryOutput, rootDir, outDir);
|
|
145
|
+
const reachableOutputs = collectReachableOutputs({
|
|
146
|
+
entryOutput: entry.entryOutput,
|
|
147
|
+
outputs: derived.allOutputs,
|
|
148
|
+
}).map((value) => normalizeOutputPath(value, rootDir, outDir)).filter(Boolean);
|
|
149
|
+
if (!entryKey || !entryOutput)
|
|
150
|
+
continue;
|
|
151
|
+
entries[entryKey] = createEntryRecord({
|
|
152
|
+
entryName,
|
|
153
|
+
entryOutput,
|
|
154
|
+
entrySource,
|
|
155
|
+
outputs: reachableOutputs,
|
|
156
|
+
js: entry.js.map((value) => normalizeOutputPath(value, rootDir, outDir)).filter(Boolean),
|
|
157
|
+
css: entry.css.map((value) => normalizeOutputPath(value, rootDir, outDir)).filter(Boolean),
|
|
158
|
+
imports: entry.imports.map((value) => normalizeOutputPath(value, rootDir, outDir)).filter(Boolean),
|
|
159
|
+
});
|
|
160
|
+
if (entryName) {
|
|
161
|
+
entryNames[entryName] = entryKey;
|
|
162
|
+
}
|
|
163
|
+
if (entrySource) {
|
|
164
|
+
entrySources[entrySource] = entryKey;
|
|
165
|
+
}
|
|
166
|
+
entryOutputs[entryOutput] = entryKey;
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
entries: Object.fromEntries(Object.entries(entries).sort(([a], [b]) => a.localeCompare(b))),
|
|
170
|
+
entryNames: Object.fromEntries(Object.entries(entryNames).sort(([a], [b]) => a.localeCompare(b))),
|
|
171
|
+
entrySources: Object.fromEntries(Object.entries(entrySources).sort(([a], [b]) => a.localeCompare(b))),
|
|
172
|
+
entryOutputs: Object.fromEntries(Object.entries(entryOutputs).sort(([a], [b]) => a.localeCompare(b))),
|
|
173
|
+
outputs: Object.fromEntries(Object.entries(outputs).sort(([a], [b]) => a.localeCompare(b))),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function toPublicPath(publicPath, value) {
|
|
177
|
+
const normalizedValue = normalizeKey(value);
|
|
178
|
+
const base = String(publicPath || "").trim();
|
|
179
|
+
if (!base)
|
|
180
|
+
return normalizedValue;
|
|
181
|
+
if (base === "/")
|
|
182
|
+
return normalizedValue ? `/${normalizedValue}` : "/";
|
|
183
|
+
return `${base.replace(/\/+$/g, "")}/${normalizedValue.replace(/^\/+/g, "")}`;
|
|
184
|
+
}
|
|
185
|
+
function resolveEntryKey(manifest, entryId, from) {
|
|
186
|
+
const normalizedId = normalizeKey(entryId);
|
|
187
|
+
if (!normalizedId)
|
|
188
|
+
return "";
|
|
189
|
+
if (from === "entryKey") {
|
|
190
|
+
return manifest.entries[normalizedId] ? normalizedId : "";
|
|
191
|
+
}
|
|
192
|
+
if (from === "entryName") {
|
|
193
|
+
return manifest.entryNames[normalizedId] || "";
|
|
194
|
+
}
|
|
195
|
+
if (from === "entrySource") {
|
|
196
|
+
return manifest.entrySources[normalizedId] || "";
|
|
197
|
+
}
|
|
198
|
+
if (from === "entryOutput") {
|
|
199
|
+
return manifest.entryOutputs[normalizedId] || "";
|
|
200
|
+
}
|
|
201
|
+
return manifest.entries[normalizedId]
|
|
202
|
+
? normalizedId
|
|
203
|
+
: manifest.entryNames[normalizedId]
|
|
204
|
+
|| manifest.entrySources[normalizedId]
|
|
205
|
+
|| manifest.entryOutputs[normalizedId]
|
|
206
|
+
|| "";
|
|
207
|
+
}
|
|
208
|
+
function collectAssetLinks(manifest, entryIds, options = {}) {
|
|
209
|
+
const from = options.from || "auto";
|
|
210
|
+
const publicPath = options.publicPath;
|
|
211
|
+
const entryKeys = [];
|
|
212
|
+
const missing = [];
|
|
213
|
+
const scripts = new Set();
|
|
214
|
+
const styles = new Set();
|
|
215
|
+
const assets = new Set();
|
|
216
|
+
const outputs = new Set();
|
|
217
|
+
const seenKeys = new Set();
|
|
218
|
+
for (const entryId of entryIds || []) {
|
|
219
|
+
const entryKey = resolveEntryKey(manifest, entryId, from);
|
|
220
|
+
if (!entryKey) {
|
|
221
|
+
const normalizedId = normalizeKey(entryId);
|
|
222
|
+
if (normalizedId && !missing.includes(normalizedId)) {
|
|
223
|
+
missing.push(normalizedId);
|
|
224
|
+
}
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
if (seenKeys.has(entryKey))
|
|
228
|
+
continue;
|
|
229
|
+
seenKeys.add(entryKey);
|
|
230
|
+
entryKeys.push(entryKey);
|
|
231
|
+
const entry = manifest.entries[entryKey];
|
|
232
|
+
if (!entry)
|
|
233
|
+
continue;
|
|
234
|
+
for (const output of entry.outputs) {
|
|
235
|
+
outputs.add(toPublicPath(publicPath, output));
|
|
236
|
+
}
|
|
237
|
+
for (const asset of entry.assets) {
|
|
238
|
+
assets.add(toPublicPath(publicPath, asset));
|
|
239
|
+
}
|
|
240
|
+
for (const style of entry.css) {
|
|
241
|
+
styles.add(toPublicPath(publicPath, style));
|
|
242
|
+
}
|
|
243
|
+
if (/\.(?:[mc]?js)$/i.test(entry.file)) {
|
|
244
|
+
scripts.add(toPublicPath(publicPath, entry.file));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
entryKeys,
|
|
249
|
+
scripts: Array.from(scripts),
|
|
250
|
+
styles: Array.from(styles),
|
|
251
|
+
assets: Array.from(assets),
|
|
252
|
+
outputs: Array.from(outputs),
|
|
253
|
+
missing,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
export { buildAssetManifest, collectAssetLinks };
|
|
257
|
+
//# sourceMappingURL=asset-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-manifest.js","sourceRoot":"","sources":["../../src/core/asset-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,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AY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;QAC9C,CAAC;QAED,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,OAAO;QACL,SAAS;QACT,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5B,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;QAC1B,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;QAC1B,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5B,OAAO;KACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import type { BuildOptions } from "esbuild";
|
|
2
2
|
import type { BundlerEntryRecord, BundlerMode, BundlerOptions, NormalizedBundlerLogger } from "../types.js";
|
|
3
3
|
import { normalizeManifestOptions } from "./discovery.js";
|
|
4
|
-
type NormalizedBundlerObfuscationOptions = {
|
|
5
|
-
assetNames?: string;
|
|
6
|
-
chunkNames?: string;
|
|
7
|
-
enabled: boolean;
|
|
8
|
-
entryNames?: string;
|
|
9
|
-
keepNames?: boolean;
|
|
10
|
-
mangleProps?: RegExp;
|
|
11
|
-
mangleQuoted?: boolean;
|
|
12
|
-
};
|
|
13
4
|
type NormalizedBundlerOptions = {
|
|
14
5
|
annotateSources: boolean;
|
|
15
6
|
clean: boolean;
|
|
@@ -24,7 +15,6 @@ type NormalizedBundlerOptions = {
|
|
|
24
15
|
manifest: ReturnType<typeof normalizeManifestOptions>;
|
|
25
16
|
minify: boolean;
|
|
26
17
|
mode: BundlerMode;
|
|
27
|
-
obfuscate: NormalizedBundlerObfuscationOptions;
|
|
28
18
|
onEntrySetChanged?: BundlerOptions["onEntrySetChanged"];
|
|
29
19
|
onRebuilt?: BundlerOptions["onRebuilt"];
|
|
30
20
|
outDir: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild-options.d.ts","sourceRoot":"","sources":["../../src/core/esbuild-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"esbuild-options.d.ts","sourceRoot":"","sources":["../../src/core/esbuild-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAK5C,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,uBAAuB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,wBAAwB,EAAmB,MAAM,gBAAgB,CAAC;AAE3E,KAAK,wBAAwB,GAAG;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,aAAa,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IAChD,QAAQ,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;IACtD,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,iBAAiB,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACxD,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC5B,CAAC;AAqBF,iBAAS,uBAAuB,CAAC,OAAO,EAAE,cAAc,GAAG,wBAAwB,CAkClF;AAED,iBAAS,oBAAoB,CAC3B,OAAO,EAAE,wBAAwB,EACjC,MAAM,EAAE,uBAAuB,GAC9B,YAAY,CAgEd;AAED,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAC;AACzD,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { createScssPlugin } from "../plugins/scss.js";
|
|
3
|
-
import { createClassNameMap } from "../plugins/obfuscation.js";
|
|
4
3
|
import { createSourceAnnotationsPlugin } from "../plugins/source-annotations.js";
|
|
5
4
|
import { createVirtualEntriesPlugin } from "../plugins/virtual-entries.js";
|
|
6
5
|
import { normalizeManifestOptions, toEntryPointMap } from "./discovery.js";
|
|
@@ -8,51 +7,14 @@ function resolveModeDefaults(mode) {
|
|
|
8
7
|
if (mode === "debug") {
|
|
9
8
|
return {
|
|
10
9
|
minify: false,
|
|
11
|
-
obfuscate: undefined,
|
|
12
10
|
stripComments: false,
|
|
13
11
|
};
|
|
14
12
|
}
|
|
15
|
-
if (mode === "extreme") {
|
|
16
|
-
return {
|
|
17
|
-
minify: true,
|
|
18
|
-
obfuscate: true,
|
|
19
|
-
stripComments: true,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
13
|
return {
|
|
23
14
|
minify: true,
|
|
24
|
-
obfuscate: undefined,
|
|
25
15
|
stripComments: true,
|
|
26
16
|
};
|
|
27
17
|
}
|
|
28
|
-
function toRegExp(value) {
|
|
29
|
-
if (!value)
|
|
30
|
-
return undefined;
|
|
31
|
-
return value instanceof RegExp ? value : new RegExp(value);
|
|
32
|
-
}
|
|
33
|
-
function normalizeObfuscation(options) {
|
|
34
|
-
if (!options) {
|
|
35
|
-
return { enabled: false };
|
|
36
|
-
}
|
|
37
|
-
if (options === true) {
|
|
38
|
-
return {
|
|
39
|
-
assetNames: "[hash]",
|
|
40
|
-
chunkNames: "[hash]",
|
|
41
|
-
enabled: true,
|
|
42
|
-
entryNames: "[hash]",
|
|
43
|
-
keepNames: false,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
assetNames: String(options.assetNames || "").trim() || "[hash]",
|
|
48
|
-
chunkNames: String(options.chunkNames || "").trim() || "[hash]",
|
|
49
|
-
enabled: true,
|
|
50
|
-
entryNames: String(options.entryNames || "").trim() || "[hash]",
|
|
51
|
-
keepNames: options.keepNames,
|
|
52
|
-
mangleProps: toRegExp(options.mangleProps),
|
|
53
|
-
mangleQuoted: options.mangleQuoted,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
18
|
function normalizeBundlerOptions(options) {
|
|
57
19
|
const rootDir = path.resolve(String(options.rootDir || "").trim() || process.cwd());
|
|
58
20
|
const outDir = String(options.outDir || "").trim();
|
|
@@ -75,7 +37,6 @@ function normalizeBundlerOptions(options) {
|
|
|
75
37
|
manifest: normalizeManifestOptions(options.manifest),
|
|
76
38
|
minify: options.minify ?? defaults.minify,
|
|
77
39
|
mode,
|
|
78
|
-
obfuscate: normalizeObfuscation(options.obfuscate ?? defaults.obfuscate),
|
|
79
40
|
onEntrySetChanged: options.onEntrySetChanged,
|
|
80
41
|
onRebuilt: options.onRebuilt,
|
|
81
42
|
outDir: resolvedOutDir,
|
|
@@ -88,7 +49,6 @@ function normalizeBundlerOptions(options) {
|
|
|
88
49
|
};
|
|
89
50
|
}
|
|
90
51
|
function createEsbuildOptions(options, logger) {
|
|
91
|
-
const esbuildEnvironmentKey = ["plat", "form"].join("");
|
|
92
52
|
const entryPoints = options.entryRecords
|
|
93
53
|
? toEntryPointMap(options.entryRecords, options.rootDir)
|
|
94
54
|
: options.entries;
|
|
@@ -105,51 +65,34 @@ function createEsbuildOptions(options, logger) {
|
|
|
105
65
|
if (options.stripComments && !options.annotateSources) {
|
|
106
66
|
logger.info("build", "comment stripping enabled");
|
|
107
67
|
}
|
|
108
|
-
if (options.obfuscate.enabled) {
|
|
109
|
-
logger.info("build", "obfuscation enabled");
|
|
110
|
-
}
|
|
111
68
|
logger.info("scss", "scss compiler enabled");
|
|
112
|
-
const classNameMap = options.obfuscate.enabled ? createClassNameMap(options.rootDir) : undefined;
|
|
113
|
-
if (classNameMap && classNameMap.size > 0) {
|
|
114
|
-
logger.info("build", `class-obfuscation :: count=${classNameMap.size}`);
|
|
115
|
-
}
|
|
116
69
|
return {
|
|
117
70
|
absWorkingDir: options.rootDir,
|
|
118
|
-
assetNames: options.obfuscate.enabled ? options.obfuscate.assetNames : undefined,
|
|
119
71
|
bundle: true,
|
|
120
|
-
chunkNames: options.obfuscate.enabled ? options.obfuscate.chunkNames : undefined,
|
|
121
72
|
define: options.define,
|
|
122
73
|
entryPoints,
|
|
123
|
-
entryNames: options.obfuscate.enabled ? options.obfuscate.entryNames : undefined,
|
|
124
74
|
external: options.external,
|
|
125
75
|
format: options.format,
|
|
126
|
-
keepNames: options.obfuscate.enabled ? options.obfuscate.keepNames : undefined,
|
|
127
76
|
legalComments: options.annotateSources ? "inline" : options.stripComments ? "none" : undefined,
|
|
128
77
|
logLevel: "silent",
|
|
129
|
-
mangleProps: options.obfuscate.enabled ? options.obfuscate.mangleProps : undefined,
|
|
130
|
-
mangleQuoted: options.obfuscate.enabled ? options.obfuscate.mangleQuoted : undefined,
|
|
131
78
|
metafile: true,
|
|
132
79
|
minify: options.minify,
|
|
133
80
|
outbase: options.rootDir,
|
|
134
81
|
outdir: options.outDir,
|
|
135
82
|
plugins: [
|
|
136
83
|
createVirtualEntriesPlugin({
|
|
137
|
-
classNameMap,
|
|
138
84
|
entries: options.entryRecords || [],
|
|
139
85
|
logger,
|
|
140
86
|
rootDir: options.rootDir,
|
|
141
87
|
}),
|
|
142
88
|
createScssPlugin({
|
|
143
89
|
annotateSources: options.annotateSources,
|
|
144
|
-
classNameMap,
|
|
145
90
|
logger,
|
|
146
91
|
rootDir: options.rootDir,
|
|
147
92
|
sourcemapEnabled: Boolean(options.sourcemap),
|
|
148
93
|
}),
|
|
149
|
-
...(
|
|
94
|
+
...(options.annotateSources ? [
|
|
150
95
|
createSourceAnnotationsPlugin({
|
|
151
|
-
annotateSources: options.annotateSources,
|
|
152
|
-
classNameMap,
|
|
153
96
|
logger,
|
|
154
97
|
rootDir: options.rootDir,
|
|
155
98
|
}),
|
|
@@ -160,7 +103,7 @@ function createEsbuildOptions(options, logger) {
|
|
|
160
103
|
splitting: options.splitting,
|
|
161
104
|
target: options.target,
|
|
162
105
|
write: true,
|
|
163
|
-
|
|
106
|
+
platform: options.environment,
|
|
164
107
|
};
|
|
165
108
|
}
|
|
166
109
|
export { createEsbuildOptions, normalizeBundlerOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild-options.js","sourceRoot":"","sources":["../../src/core/esbuild-options.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"esbuild-options.js","sourceRoot":"","sources":["../../src/core/esbuild-options.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,E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