rolldown 1.0.0-beta.54 → 1.0.0-beta.56
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/dist/cli-setup.mjs +2 -2
- package/dist/cli.mjs +19 -19
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +8 -8
- package/dist/experimental-index.d.mts +37 -4
- package/dist/experimental-index.mjs +49 -22
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/get-log-filter.d.mts +7 -0
- package/dist/get-log-filter.mjs +48 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +10 -14
- package/dist/parallel-plugin-worker.mjs +5 -5
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +3 -3
- package/dist/shared/{binding-yIBVkeOE.d.mts → binding-CDyF6W3D.d.mts} +15 -10
- package/dist/shared/{binding-BgawCXFG.mjs → binding-CtWITWm-.mjs} +51 -27
- package/dist/shared/{bindingify-input-options-DvsExmEF.mjs → bindingify-input-options-CO3Vzzk3.mjs} +58 -24
- package/dist/shared/{constructors-BgO0Ou3T.d.mts → constructors-Dw-B6Be3.d.mts} +2 -2
- package/dist/shared/{constructors-DqAPGbqJ.mjs → constructors-Jt3eRoTg.mjs} +1 -1
- package/dist/shared/{define-config-COJu-A7R.d.mts → define-config-izclUEbx.d.mts} +19 -43
- package/dist/shared/{load-config--qXpT-nH.mjs → load-config-BpSXYU8O.mjs} +1 -1
- package/dist/shared/logging-BpAvp7KV.d.mts +37 -0
- package/dist/shared/{logs-CSQ_UMWp.mjs → logs-Up1RAnkl.mjs} +4 -2
- package/dist/shared/{normalize-string-or-regex-CF1OWLn9.mjs → normalize-string-or-regex-DFzBrq1v.mjs} +6 -6
- package/dist/shared/{parse-ast-index-DeJDe-DO.mjs → parse-ast-index-BQgRrweO.mjs} +13 -10
- package/dist/shared/{rolldown-BsTgRBvz.mjs → rolldown-DA3tdfJk.mjs} +1 -1
- package/dist/shared/{rolldown-build-DtYoS8Tq.mjs → rolldown-build-CUD1BA8L.mjs} +25 -18
- package/dist/shared/{watch-CfGzq0YA.mjs → watch-XY1CZgsw.mjs} +11 -11
- package/package.json +20 -19
- /package/dist/shared/{define-config-DfeZGBEt.mjs → define-config-BF4P-Pum.mjs} +0 -0
- /package/dist/shared/{misc-CxyvWjTr.mjs → misc-DpjTMcQQ.mjs} +0 -0
- /package/dist/shared/{prompt-pmGBC3ws.mjs → prompt-CNt8OM9C.mjs} +0 -0
package/dist/cli-setup.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as require_binding } from "./shared/binding-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-CtWITWm-.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/cli/setup-index.ts
|
|
4
|
-
var import_binding = require_binding();
|
|
4
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5
5
|
let isWatchMode = false;
|
|
6
6
|
for (let i = 0; i < process.argv.length; i++) {
|
|
7
7
|
const arg = process.argv[i];
|
package/dist/cli.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
3
|
-
import { t as arraify } from "./shared/misc-
|
|
4
|
-
import { b as description, x as version } from "./shared/normalize-string-or-regex-
|
|
5
|
-
import { a as getOutputCliKeys, c as styleText$1, i as getInputCliKeys, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/rolldown-build-
|
|
6
|
-
import "./shared/bindingify-input-options-
|
|
7
|
-
import "./shared/parse-ast-index-
|
|
8
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
9
|
-
import { t as loadConfig } from "./shared/load-config
|
|
1
|
+
import "./shared/binding-CtWITWm-.mjs";
|
|
2
|
+
import { n as onExit, t as watch } from "./shared/watch-XY1CZgsw.mjs";
|
|
3
|
+
import { t as arraify } from "./shared/misc-DpjTMcQQ.mjs";
|
|
4
|
+
import { b as description, x as version } from "./shared/normalize-string-or-regex-DFzBrq1v.mjs";
|
|
5
|
+
import { a as getOutputCliKeys, c as styleText$1, i as getInputCliKeys, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/rolldown-build-CUD1BA8L.mjs";
|
|
6
|
+
import "./shared/bindingify-input-options-CO3Vzzk3.mjs";
|
|
7
|
+
import "./shared/parse-ast-index-BQgRrweO.mjs";
|
|
8
|
+
import { t as rolldown } from "./shared/rolldown-DA3tdfJk.mjs";
|
|
9
|
+
import { t as loadConfig } from "./shared/load-config-BpSXYU8O.mjs";
|
|
10
10
|
import path, { sep } from "node:path";
|
|
11
11
|
import { formatWithOptions, parseArgs } from "node:util";
|
|
12
12
|
import process$1 from "node:process";
|
|
@@ -531,7 +531,7 @@ function getColor$1(color, fallback = "reset") {
|
|
|
531
531
|
return colors[color] || colors[fallback];
|
|
532
532
|
}
|
|
533
533
|
const ansiRegex$1 = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
|
|
534
|
-
function stripAnsi(text) {
|
|
534
|
+
function stripAnsi$1(text) {
|
|
535
535
|
return text.replace(new RegExp(ansiRegex$1, "g"), "");
|
|
536
536
|
}
|
|
537
537
|
const boxStylePresets = {
|
|
@@ -624,14 +624,14 @@ function box(text, _opts = {}) {
|
|
|
624
624
|
if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
|
|
625
625
|
const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
|
|
626
626
|
const height = textLines.length + paddingOffset;
|
|
627
|
-
const width = Math.max(...textLines.map((line) => stripAnsi(line).length), opts.title ? stripAnsi(opts.title).length : 0) + paddingOffset;
|
|
627
|
+
const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length), opts.title ? stripAnsi$1(opts.title).length : 0) + paddingOffset;
|
|
628
628
|
const widthOffset = width + paddingOffset;
|
|
629
629
|
const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
|
|
630
630
|
if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
|
|
631
631
|
if (opts.title) {
|
|
632
632
|
const title = _color ? _color(opts.title) : opts.title;
|
|
633
|
-
const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
|
|
634
|
-
const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
|
|
633
|
+
const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
|
|
634
|
+
const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
|
|
635
635
|
boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
|
|
636
636
|
} else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
|
|
637
637
|
const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
|
|
@@ -639,7 +639,7 @@ function box(text, _opts = {}) {
|
|
|
639
639
|
else {
|
|
640
640
|
const line = textLines[i$1 - valignOffset];
|
|
641
641
|
const left = " ".repeat(paddingOffset);
|
|
642
|
-
const right = " ".repeat(width - stripAnsi(line).length);
|
|
642
|
+
const right = " ".repeat(width - stripAnsi$1(line).length);
|
|
643
643
|
boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
|
|
644
644
|
}
|
|
645
645
|
boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
|
|
@@ -812,7 +812,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
812
812
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
813
813
|
}
|
|
814
814
|
const regex = ansiRegex();
|
|
815
|
-
function stripAnsi
|
|
815
|
+
function stripAnsi(string) {
|
|
816
816
|
if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
817
817
|
return string.replace(regex, "");
|
|
818
818
|
}
|
|
@@ -841,7 +841,7 @@ const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
|
841
841
|
function stringWidth$1(string, options$1 = {}) {
|
|
842
842
|
if (typeof string !== "string" || string.length === 0) return 0;
|
|
843
843
|
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options$1;
|
|
844
|
-
if (!countAnsiEscapeCodes) string = stripAnsi
|
|
844
|
+
if (!countAnsiEscapeCodes) string = stripAnsi(string);
|
|
845
845
|
if (string.length === 0) return 0;
|
|
846
846
|
let width = 0;
|
|
847
847
|
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
@@ -894,7 +894,7 @@ const TYPE_ICONS = {
|
|
|
894
894
|
log: ""
|
|
895
895
|
};
|
|
896
896
|
function stringWidth(str) {
|
|
897
|
-
if (!(typeof Intl === "object") || !Intl.Segmenter) return stripAnsi(str).length;
|
|
897
|
+
if (!(typeof Intl === "object") || !Intl.Segmenter) return stripAnsi$1(str).length;
|
|
898
898
|
return stringWidth$1(str);
|
|
899
899
|
}
|
|
900
900
|
var FancyReporter = class extends BasicReporter {
|
|
@@ -951,7 +951,7 @@ function createConsola(options$1 = {}) {
|
|
|
951
951
|
defaults: { level },
|
|
952
952
|
stdout: process.stdout,
|
|
953
953
|
stderr: process.stderr,
|
|
954
|
-
prompt: (...args) => import("./shared/prompt-
|
|
954
|
+
prompt: (...args) => import("./shared/prompt-CNt8OM9C.mjs").then((m) => m.prompt(...args)),
|
|
955
955
|
reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
956
956
|
...options$1
|
|
957
957
|
});
|
|
@@ -1238,7 +1238,7 @@ function getClearScreenFunction(options$1) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
|
|
1240
1240
|
//#endregion
|
|
1241
|
-
//#region \0@oxc-project+runtime@0.
|
|
1241
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/usingCtx.js
|
|
1242
1242
|
function _usingCtx() {
|
|
1243
1243
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1244
1244
|
var n$2 = Error();
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./shared/
|
|
1
|
+
import "./shared/binding-CDyF6W3D.mjs";
|
|
2
|
+
import { n as ConfigExport, t as defineConfig } from "./shared/define-config-izclUEbx.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { x as version } from "./shared/normalize-string-or-regex-
|
|
3
|
-
import "./shared/rolldown-build-
|
|
4
|
-
import "./shared/bindingify-input-options-
|
|
5
|
-
import "./shared/parse-ast-index-
|
|
6
|
-
import "./shared/rolldown-
|
|
7
|
-
import { t as defineConfig } from "./shared/define-config-
|
|
8
|
-
import { t as loadConfig } from "./shared/load-config
|
|
1
|
+
import "./shared/binding-CtWITWm-.mjs";
|
|
2
|
+
import { x as version } from "./shared/normalize-string-or-regex-DFzBrq1v.mjs";
|
|
3
|
+
import "./shared/rolldown-build-CUD1BA8L.mjs";
|
|
4
|
+
import "./shared/bindingify-input-options-CO3Vzzk3.mjs";
|
|
5
|
+
import "./shared/parse-ast-index-BQgRrweO.mjs";
|
|
6
|
+
import "./shared/rolldown-DA3tdfJk.mjs";
|
|
7
|
+
import { t as defineConfig } from "./shared/define-config-BF4P-Pum.mjs";
|
|
8
|
+
import { t as loadConfig } from "./shared/load-config-BpSXYU8O.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/config.ts
|
|
11
11
|
const VERSION = version;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./shared/constructors-
|
|
1
|
+
import { $ as transformSync, B as ParserOptions, C as BindingViteManifestPluginConfig, G as TransformResult, H as ResolveResult, I as MinifyOptions, J as isolatedDeclarationSync, K as createTokioRuntime, L as MinifyResult, N as IsolatedDeclarationsOptions, O as BindingViteTransformPluginConfig, P as IsolatedDeclarationsResult, Q as transform, R as NapiResolveOptions, U as ResolverFactory, W as TransformOptions, X as minifySync, Y as minify, Z as moduleRunnerTransform, _ as BindingViteCssPostPluginConfig, b as BindingViteHtmlPluginConfig, c as BindingRebuildStrategy, f as BindingUrlResolver, g as BindingViteCssPluginConfig, m as BindingViteAssetPluginConfig, n as BindingBundleState, q as isolatedDeclaration, r as BindingClientHmrUpdate, z as ParseResult } from "./shared/binding-CDyF6W3D.mjs";
|
|
2
|
+
import { A as BuiltinPlugin, At as RolldownOutput, Dt as OutputChunk, F as OutputBundle, G as MinimalPluginContext, Mt as freeExternalMemory, N as SourceMapInput, W as defineParallelPlugin, o as InputOptions, tt as NormalizedOutputOptions, xt as OutputOptions } from "./shared/define-config-izclUEbx.mjs";
|
|
3
|
+
import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./shared/constructors-Dw-B6Be3.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/api/dev/dev-options.d.ts
|
|
6
6
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -191,4 +191,37 @@ type ViteManifestPluginConfig = Omit<BindingViteManifestPluginConfig, "isLegacy"
|
|
|
191
191
|
};
|
|
192
192
|
declare function viteManifestPlugin(config: ViteManifestPluginConfig): BuiltinPlugin;
|
|
193
193
|
//#endregion
|
|
194
|
-
|
|
194
|
+
//#region src/experimental-index.d.ts
|
|
195
|
+
/**
|
|
196
|
+
* In-memory file system for browser builds.
|
|
197
|
+
*
|
|
198
|
+
* This is a re-export of the {@link https://github.com/streamich/memfs | memfs} package used by the WASI runtime.
|
|
199
|
+
* It allows you to read and write files to a virtual filesystem when using rolldown in browser environments.
|
|
200
|
+
*
|
|
201
|
+
* - `fs`: A Node.js-compatible filesystem API (`IFs` from memfs)
|
|
202
|
+
* - `volume`: The underlying `Volume` instance that stores the filesystem state
|
|
203
|
+
*
|
|
204
|
+
* Returns `undefined` in Node.js builds (only available in browser builds via `@rolldown/browser`).
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```typescript
|
|
208
|
+
* import { memfs } from 'rolldown/experimental';
|
|
209
|
+
*
|
|
210
|
+
* // Write files to virtual filesystem before bundling
|
|
211
|
+
* memfs?.volume.fromJSON({
|
|
212
|
+
* '/src/index.js': 'export const foo = 42;',
|
|
213
|
+
* '/package.json': '{"name": "my-app"}'
|
|
214
|
+
* });
|
|
215
|
+
*
|
|
216
|
+
* // Read files from the virtual filesystem
|
|
217
|
+
* const content = memfs?.fs.readFileSync('/src/index.js', 'utf8');
|
|
218
|
+
* ```
|
|
219
|
+
*
|
|
220
|
+
* @see {@link https://github.com/streamich/memfs} for more information on the memfs API.
|
|
221
|
+
*/
|
|
222
|
+
declare const memfs: {
|
|
223
|
+
fs: any;
|
|
224
|
+
volume: any;
|
|
225
|
+
} | undefined;
|
|
226
|
+
//#endregion
|
|
227
|
+
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type MinifyOptions, type MinifyResult, type ParseResult, type ParserOptions, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, type ViteHtmlPluginOptions, createTokioRuntime, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, scan, transform, transformSync, viteAliasPlugin, viteAssetImportMetaUrlPlugin, viteAssetPlugin, viteBuildImportAnalysisPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlInlineProxyPlugin, viteHtmlPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWasmHelperPlugin, viteWebWorkerPostPlugin };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as require_binding } from "./shared/binding-
|
|
2
|
-
import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./shared/normalize-string-or-regex-
|
|
3
|
-
import { l as PluginDriver, n as createBundlerOptions, s as validateOption, t as RolldownBuild } from "./shared/rolldown-build-
|
|
4
|
-
import { o as normalizeBindingResult, s as unwrapBindingResult } from "./shared/bindingify-input-options-
|
|
5
|
-
import { i as parseSync, r as parse } from "./shared/parse-ast-index-
|
|
6
|
-
import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./shared/constructors-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-CtWITWm-.mjs";
|
|
2
|
+
import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./shared/normalize-string-or-regex-DFzBrq1v.mjs";
|
|
3
|
+
import { l as PluginDriver, n as createBundlerOptions, s as validateOption, t as RolldownBuild } from "./shared/rolldown-build-CUD1BA8L.mjs";
|
|
4
|
+
import { o as normalizeBindingResult, s as unwrapBindingResult } from "./shared/bindingify-input-options-CO3Vzzk3.mjs";
|
|
5
|
+
import { i as parseSync, r as parse } from "./shared/parse-ast-index-BQgRrweO.mjs";
|
|
6
|
+
import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./shared/constructors-Jt3eRoTg.mjs";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
8
|
|
|
9
9
|
//#region src/api/dev/dev-engine.ts
|
|
10
|
-
var import_binding$
|
|
10
|
+
var import_binding$1 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
11
11
|
var DevEngine = class DevEngine {
|
|
12
12
|
#inner;
|
|
13
13
|
#cachedBuildFinishPromise = null;
|
|
@@ -38,7 +38,7 @@ var DevEngine = class DevEngine {
|
|
|
38
38
|
}
|
|
39
39
|
userOnOutput(transformToRollupOutput(result));
|
|
40
40
|
} : void 0,
|
|
41
|
-
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? import_binding$
|
|
41
|
+
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? import_binding$1.BindingRebuildStrategy.Always : devOptions.rebuildStrategy === "auto" ? import_binding$1.BindingRebuildStrategy.Auto : import_binding$1.BindingRebuildStrategy.Never : void 0,
|
|
42
42
|
watch: devOptions.watch && {
|
|
43
43
|
skipWrite: devOptions.watch.skipWrite,
|
|
44
44
|
usePolling: devOptions.watch.usePolling,
|
|
@@ -49,7 +49,7 @@ var DevEngine = class DevEngine {
|
|
|
49
49
|
debounceTickRate: devOptions.watch.debounceTickRate
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
return new DevEngine(new import_binding$
|
|
52
|
+
return new DevEngine(new import_binding$1.BindingDevEngine(options.bundlerOptions, bindingDevOptions));
|
|
53
53
|
}
|
|
54
54
|
constructor(inner) {
|
|
55
55
|
this.#inner = inner;
|
|
@@ -132,7 +132,6 @@ function freeExternalMemory(handle, keepDataAlive = false) {
|
|
|
132
132
|
|
|
133
133
|
//#endregion
|
|
134
134
|
//#region src/api/experimental.ts
|
|
135
|
-
var import_binding$1 = require_binding();
|
|
136
135
|
/**
|
|
137
136
|
* This is an experimental API. Its behavior may change in the future.
|
|
138
137
|
*
|
|
@@ -243,17 +242,45 @@ function viteManifestPlugin(config) {
|
|
|
243
242
|
|
|
244
243
|
//#endregion
|
|
245
244
|
//#region src/experimental-index.ts
|
|
246
|
-
var import_binding = require_binding();
|
|
245
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
246
|
+
/**
|
|
247
|
+
* In-memory file system for browser builds.
|
|
248
|
+
*
|
|
249
|
+
* This is a re-export of the {@link https://github.com/streamich/memfs | memfs} package used by the WASI runtime.
|
|
250
|
+
* It allows you to read and write files to a virtual filesystem when using rolldown in browser environments.
|
|
251
|
+
*
|
|
252
|
+
* - `fs`: A Node.js-compatible filesystem API (`IFs` from memfs)
|
|
253
|
+
* - `volume`: The underlying `Volume` instance that stores the filesystem state
|
|
254
|
+
*
|
|
255
|
+
* Returns `undefined` in Node.js builds (only available in browser builds via `@rolldown/browser`).
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* ```typescript
|
|
259
|
+
* import { memfs } from 'rolldown/experimental';
|
|
260
|
+
*
|
|
261
|
+
* // Write files to virtual filesystem before bundling
|
|
262
|
+
* memfs?.volume.fromJSON({
|
|
263
|
+
* '/src/index.js': 'export const foo = 42;',
|
|
264
|
+
* '/package.json': '{"name": "my-app"}'
|
|
265
|
+
* });
|
|
266
|
+
*
|
|
267
|
+
* // Read files from the virtual filesystem
|
|
268
|
+
* const content = memfs?.fs.readFileSync('/src/index.js', 'utf8');
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* @see {@link https://github.com/streamich/memfs} for more information on the memfs API.
|
|
272
|
+
*/
|
|
273
|
+
const memfs = void 0;
|
|
247
274
|
|
|
248
275
|
//#endregion
|
|
249
|
-
var BindingRebuildStrategy = import_binding.BindingRebuildStrategy;
|
|
250
|
-
var ResolverFactory = import_binding.ResolverFactory;
|
|
251
|
-
var createTokioRuntime = import_binding.createTokioRuntime;
|
|
252
|
-
var isolatedDeclaration = import_binding.isolatedDeclaration;
|
|
253
|
-
var isolatedDeclarationSync = import_binding.isolatedDeclarationSync;
|
|
254
|
-
var minify = import_binding.minify;
|
|
255
|
-
var minifySync = import_binding.minifySync;
|
|
256
|
-
var moduleRunnerTransform = import_binding.moduleRunnerTransform;
|
|
257
|
-
var transform = import_binding.transform;
|
|
258
|
-
var transformSync = import_binding.transformSync;
|
|
259
|
-
export { BindingRebuildStrategy, DevEngine, ResolverFactory, createTokioRuntime, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, minify, minifySync, moduleRunnerTransform, parse, parseSync, scan, transform, transformSync, viteAliasPlugin, viteAssetImportMetaUrlPlugin, viteAssetPlugin, viteBuildImportAnalysisPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlInlineProxyPlugin, viteHtmlPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWasmHelperPlugin, viteWebWorkerPostPlugin };
|
|
276
|
+
var BindingRebuildStrategy = import_binding$1.BindingRebuildStrategy;
|
|
277
|
+
var ResolverFactory = import_binding$1.ResolverFactory;
|
|
278
|
+
var createTokioRuntime = import_binding$1.createTokioRuntime;
|
|
279
|
+
var isolatedDeclaration = import_binding$1.isolatedDeclaration;
|
|
280
|
+
var isolatedDeclarationSync = import_binding$1.isolatedDeclarationSync;
|
|
281
|
+
var minify = import_binding$1.minify;
|
|
282
|
+
var minifySync = import_binding$1.minifySync;
|
|
283
|
+
var moduleRunnerTransform = import_binding$1.moduleRunnerTransform;
|
|
284
|
+
var transform = import_binding$1.transform;
|
|
285
|
+
var transformSync = import_binding$1.transformSync;
|
|
286
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, createTokioRuntime, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, scan, transform, transformSync, viteAliasPlugin, viteAssetImportMetaUrlPlugin, viteAssetPlugin, viteBuildImportAnalysisPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlInlineProxyPlugin, viteHtmlPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWasmHelperPlugin, viteWebWorkerPostPlugin };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./shared/
|
|
1
|
+
import "./shared/binding-CDyF6W3D.mjs";
|
|
2
|
+
import { k as withFilter } from "./shared/define-config-izclUEbx.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as isPromiseLike, t as arraify } from "./shared/misc-
|
|
1
|
+
import { n as isPromiseLike, t as arraify } from "./shared/misc-DpjTMcQQ.mjs";
|
|
2
2
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/with-filter.ts
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a as RollupLog } from "./shared/logging-BpAvp7KV.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/get-log-filter.d.ts
|
|
4
|
+
type GetLogFilter = (filters: string[]) => (log: RollupLog) => boolean;
|
|
5
|
+
declare const getLogFilter: GetLogFilter;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { GetLogFilter, type RollupLog, getLogFilter as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//#region src/get-log-filter.ts
|
|
2
|
+
const getLogFilter = (filters) => {
|
|
3
|
+
if (filters.length === 0) return () => true;
|
|
4
|
+
const normalizedFilters = filters.map((filter) => filter.split("&").map((subFilter) => {
|
|
5
|
+
const inverted = subFilter.startsWith("!");
|
|
6
|
+
if (inverted) subFilter = subFilter.slice(1);
|
|
7
|
+
const [key, ...value] = subFilter.split(":");
|
|
8
|
+
return {
|
|
9
|
+
inverted,
|
|
10
|
+
key: key.split("."),
|
|
11
|
+
parts: value.join(":").split("*")
|
|
12
|
+
};
|
|
13
|
+
}));
|
|
14
|
+
return (log) => {
|
|
15
|
+
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
|
|
16
|
+
for (const { inverted, key, parts } of intersectedFilters) {
|
|
17
|
+
const isFilterSatisfied = testFilter(log, key, parts);
|
|
18
|
+
if (inverted ? isFilterSatisfied : !isFilterSatisfied) continue nextIntersectedFilter;
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const testFilter = (log, key, parts) => {
|
|
26
|
+
let rawValue = log;
|
|
27
|
+
for (let index = 0; index < key.length; index++) {
|
|
28
|
+
if (!rawValue) return false;
|
|
29
|
+
const part = key[index];
|
|
30
|
+
if (!(part in rawValue)) return false;
|
|
31
|
+
rawValue = rawValue[part];
|
|
32
|
+
}
|
|
33
|
+
let value = typeof rawValue === "object" ? JSON.stringify(rawValue) : String(rawValue);
|
|
34
|
+
if (parts.length === 1) return value === parts[0];
|
|
35
|
+
if (!value.startsWith(parts[0])) return false;
|
|
36
|
+
const lastPartIndex = parts.length - 1;
|
|
37
|
+
for (let index = 1; index < lastPartIndex; index++) {
|
|
38
|
+
const part = parts[index];
|
|
39
|
+
const position = value.indexOf(part);
|
|
40
|
+
if (position === -1) return false;
|
|
41
|
+
value = value.slice(position + part.length);
|
|
42
|
+
}
|
|
43
|
+
return value.endsWith(parts[lastPartIndex]);
|
|
44
|
+
};
|
|
45
|
+
var get_log_filter_default = getLogFilter;
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { get_log_filter_default as default };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { V as PreRenderedChunk, s as BindingMagicString } from "./shared/binding-
|
|
1
|
+
import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-BpAvp7KV.mjs";
|
|
2
|
+
import { V as PreRenderedChunk, s as BindingMagicString } from "./shared/binding-CDyF6W3D.mjs";
|
|
3
|
+
import { $ as RolldownFsModule, At as RolldownOutput, B as EmittedPrebuiltChunk, C as ResolveIdResult, D as SourceDescription, Dt as OutputChunk, E as RolldownPluginOption, Et as OutputAsset, F as OutputBundle, G as MinimalPluginContext, H as PluginContext, I as TreeshakingOptions, J as HookFilter, K as PluginContextMeta, L as TransformPluginContext, M as ExistingRawSourceMap, N as SourceMapInput, Nt as ModuleInfo, O as TransformResult, Ot as RenderedChunk, P as RolldownOptionsFunction, Pt as SourcemapIgnoreListOption, Q as RolldownFileStats, R as EmittedAsset, S as ResolveIdExtraOptions, St as PreRenderedAsset, T as RolldownPlugin, U as DefineParallelPluginResult, V as GetModuleInfo, X as BufferEncoding, Y as ModuleTypeFilter, Z as RolldownDirectoryEntry, _ as ModuleType, _t as GeneratedCodePreset, a as InputOption, at as watch, b as PartialResolvedId, bt as ModuleFormat, c as OptimizationOptions, ct as WatchOptions, d as CustomPluginOptions, dt as BuildOptions, et as InternalModuleFormat, f as FunctionPluginHooks, ft as build, g as ModuleOptions, gt as GeneratedCodeOptions, h as LoadResult, ht as ChunkingContext, i as ExternalOption, it as WarningHandlerWithDefault, j as VERSION, jt as SourceMap, kt as RenderedModule, l as WatcherOptions, lt as rolldown, m as ImportKind, mt as ChunkFileNamesFunction, n as ConfigExport, nt as NormalizedInputOptions, o as InputOptions, ot as RolldownWatcher, p as HookFilterExtension, pt as AddonFunction, q as GeneralHookFilter, r as RolldownOptions, rt as LoggingFunction, s as ModuleTypes, st as RolldownWatcherEvent, t as defineConfig, tt as NormalizedOutputOptions, u as AsyncPluginHooks, ut as RolldownBuild, v as ObjectHook, vt as GlobalsFunction, w as ResolvedId, wt as PartialNull, x as Plugin, xt as OutputOptions, y as ParallelPluginHooks, yt as MinifyOptions, z as EmittedFile } from "./shared/define-config-izclUEbx.mjs";
|
|
3
4
|
export { AddonFunction, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, EmittedPrebuiltChunk, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { t as require_binding } from "./shared/binding-
|
|
2
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
3
|
-
import { y as VERSION } from "./shared/normalize-string-or-regex-
|
|
4
|
-
import "./shared/rolldown-build-
|
|
5
|
-
import "./shared/bindingify-input-options-
|
|
6
|
-
import "./shared/parse-ast-index-
|
|
7
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
8
|
-
import { t as defineConfig } from "./shared/define-config-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-CtWITWm-.mjs";
|
|
2
|
+
import { n as onExit, t as watch } from "./shared/watch-XY1CZgsw.mjs";
|
|
3
|
+
import { y as VERSION } from "./shared/normalize-string-or-regex-DFzBrq1v.mjs";
|
|
4
|
+
import "./shared/rolldown-build-CUD1BA8L.mjs";
|
|
5
|
+
import "./shared/bindingify-input-options-CO3Vzzk3.mjs";
|
|
6
|
+
import "./shared/parse-ast-index-BQgRrweO.mjs";
|
|
7
|
+
import { t as rolldown } from "./shared/rolldown-DA3tdfJk.mjs";
|
|
8
|
+
import { t as defineConfig } from "./shared/define-config-BF4P-Pum.mjs";
|
|
9
9
|
import { isMainThread } from "node:worker_threads";
|
|
10
10
|
|
|
11
11
|
//#region src/setup.ts
|
|
12
|
-
var import_binding
|
|
12
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
13
13
|
if (isMainThread) {
|
|
14
|
-
const subscriberGuard = (0, import_binding
|
|
14
|
+
const subscriberGuard = (0, import_binding.initTraceSubscriber)();
|
|
15
15
|
onExit(() => {
|
|
16
16
|
subscriberGuard?.close();
|
|
17
17
|
});
|
|
@@ -33,10 +33,6 @@ async function build(options) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/index.ts
|
|
38
|
-
var import_binding = require_binding();
|
|
39
|
-
|
|
40
36
|
//#endregion
|
|
41
37
|
var BindingMagicString = import_binding.BindingMagicString;
|
|
42
38
|
export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as require_binding } from "./shared/binding-
|
|
2
|
-
import "./shared/normalize-string-or-regex-
|
|
3
|
-
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-
|
|
4
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-CtWITWm-.mjs";
|
|
2
|
+
import "./shared/normalize-string-or-regex-DFzBrq1v.mjs";
|
|
3
|
+
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-CO3Vzzk3.mjs";
|
|
4
|
+
import "./shared/parse-ast-index-BQgRrweO.mjs";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
|
-
var import_binding = require_binding();
|
|
8
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
9
9
|
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
10
10
|
(async () => {
|
|
11
11
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./shared/
|
|
1
|
+
import "./shared/binding-CDyF6W3D.mjs";
|
|
2
|
+
import { Ct as MaybePromise, x as Plugin } from "./shared/define-config-izclUEbx.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { n as parseAstAsync, t as parseAst } from "./shared/parse-ast-index-
|
|
1
|
+
import "./shared/binding-CtWITWm-.mjs";
|
|
2
|
+
import { n as parseAstAsync, t as parseAst } from "./shared/parse-ast-index-BQgRrweO.mjs";
|
|
3
3
|
|
|
4
4
|
export { parseAst, parseAstAsync };
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { u as BindingReplacePluginConfig } from "./shared/binding-CDyF6W3D.mjs";
|
|
2
|
+
import { A as BuiltinPlugin } from "./shared/define-config-izclUEbx.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-Dw-B6Be3.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
6
6
|
|
package/dist/plugins-index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./shared/normalize-string-or-regex-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import "./shared/binding-CtWITWm-.mjs";
|
|
2
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./shared/normalize-string-or-regex-DFzBrq1v.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-Jt3eRoTg.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
6
6
|
/**
|
|
@@ -409,7 +409,11 @@ declare class ResolverFactory {
|
|
|
409
409
|
static default(): ResolverFactory;
|
|
410
410
|
/** Clone the resolver using the same underlying cache. */
|
|
411
411
|
cloneWithOptions(options: NapiResolveOptions): ResolverFactory;
|
|
412
|
-
/**
|
|
412
|
+
/**
|
|
413
|
+
* Clear the underlying cache.
|
|
414
|
+
*
|
|
415
|
+
* Warning: The caller must ensure that there're no ongoing resolution operations when calling this method. Otherwise, it may cause those operations to return an incorrect result.
|
|
416
|
+
*/
|
|
413
417
|
clearCache(): void;
|
|
414
418
|
/** Synchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
415
419
|
sync(directory: string, request: string): ResolveResult;
|
|
@@ -1303,6 +1307,8 @@ declare class BindingNormalizedOptions {
|
|
|
1303
1307
|
get footer(): string | undefined | null | undefined;
|
|
1304
1308
|
get intro(): string | undefined | null | undefined;
|
|
1305
1309
|
get outro(): string | undefined | null | undefined;
|
|
1310
|
+
get postBanner(): string | undefined | null | undefined;
|
|
1311
|
+
get postFooter(): string | undefined | null | undefined;
|
|
1306
1312
|
get externalLiveBindings(): boolean;
|
|
1307
1313
|
get extend(): boolean;
|
|
1308
1314
|
get globals(): Record<string, string> | undefined;
|
|
@@ -1448,6 +1454,13 @@ interface BindingJsonSourcemap {
|
|
|
1448
1454
|
debugId?: string;
|
|
1449
1455
|
x_google_ignoreList?: Array<number>;
|
|
1450
1456
|
}
|
|
1457
|
+
interface BindingLogLocation {
|
|
1458
|
+
/** 1-based */
|
|
1459
|
+
line: number;
|
|
1460
|
+
/** 0-based position in the line in UTF-16 code units */
|
|
1461
|
+
column: number;
|
|
1462
|
+
file?: string;
|
|
1463
|
+
}
|
|
1451
1464
|
interface BindingModulePreloadOptions {
|
|
1452
1465
|
polyfill: boolean;
|
|
1453
1466
|
resolveDependencies?: (filename: string, deps: string[], context: {
|
|
@@ -1694,18 +1707,10 @@ interface NativeError {
|
|
|
1694
1707
|
/** The exporter associated with the error (for import/export errors) */
|
|
1695
1708
|
exporter?: string;
|
|
1696
1709
|
/** Location information (line, column, file) */
|
|
1697
|
-
loc?:
|
|
1710
|
+
loc?: BindingLogLocation;
|
|
1698
1711
|
/** Position in the source file in UTF-16 code units */
|
|
1699
1712
|
pos?: number;
|
|
1700
1713
|
}
|
|
1701
|
-
/** Location information for errors */
|
|
1702
|
-
interface NativeErrorLocation {
|
|
1703
|
-
/** 1-based */
|
|
1704
|
-
line: number;
|
|
1705
|
-
/** 0-based position in the line in UTF-16 code units */
|
|
1706
|
-
column: number;
|
|
1707
|
-
file?: string;
|
|
1708
|
-
}
|
|
1709
1714
|
interface PreRenderedChunk {
|
|
1710
1715
|
name: string;
|
|
1711
1716
|
isEntry: boolean;
|