@rolldown/browser 1.0.0-beta.8-commit.e5c11c6 → 1.0.0-beta.8-commit.2a5c6a6
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.cjs +9 -9
- package/dist/cli.mjs +5 -5
- package/dist/experimental-index.browser.mjs +3 -3
- package/dist/experimental-index.cjs +9 -3
- package/dist/experimental-index.d.cts +3 -3
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +5 -5
- package/dist/filter-index.cjs +11 -11
- package/dist/filter-index.d.cts +1 -1
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/parallel-plugin-worker.cjs +3 -3
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.cts +1 -1
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasi-browser.js +3 -0
- package/dist/rolldown-binding.wasi.cjs +3 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{esm-CW9DP8HJ.mjs → dist-Oaz_A_8i.mjs} +8 -17
- package/dist/shared/{composable-filters-Dbe8wGLg.cjs → dist-n1rVcJ5K.cjs} +6 -4
- package/dist/shared/{input-options.d-b875W0uo.d.cts → input-options.d-CGEZtOCG.d.cts} +32 -28
- package/dist/shared/{input-options.d-BzRVeVzs.d.mts → input-options.d-dGH7EYeL.d.mts} +32 -28
- package/dist/shared/{parse-ast-index-C4XbfZ6x.cjs → parse-ast-index-DfDBeJFi.cjs} +12 -14
- package/dist/shared/{parse-ast-index-D_ZB9M77.mjs → parse-ast-index-DvsltErM.mjs} +13 -15
- package/dist/shared/{src-C8_53OaW.cjs → src-DRYDMwBc.cjs} +28 -26
- package/dist/shared/{src-Cp2-HZHF.mjs → src-eizE6mpJ.mjs} +12 -10
- package/dist/{src-ClX-1vqS.js → src-0gz2hYtr.js} +23 -21
- package/package.json +3 -3
package/dist/cli.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
const
|
|
4
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-DRYDMwBc.cjs');
|
|
3
|
+
const require_dist = require('./shared/dist-n1rVcJ5K.cjs');
|
|
4
|
+
require('./shared/parse-ast-index-DfDBeJFi.cjs');
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
6
6
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
7
7
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -1560,8 +1560,8 @@ async function loadConfig(configPath) {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
|
|
1562
1562
|
//#endregion
|
|
1563
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1564
|
-
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1563
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.69.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1564
|
+
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.69.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1565
1565
|
function _usingCtx() {
|
|
1566
1566
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1567
1567
|
var n$2 = Error();
|
|
@@ -1664,11 +1664,11 @@ async function bundleWithCliOptions(cliOptions) {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
1666
|
async function watchInner(config, cliOptions) {
|
|
1667
|
-
let normalizedConfig =
|
|
1667
|
+
let normalizedConfig = require_dist.arraify(config).map((option) => {
|
|
1668
1668
|
return {
|
|
1669
1669
|
...option,
|
|
1670
1670
|
...cliOptions.input,
|
|
1671
|
-
output:
|
|
1671
|
+
output: require_dist.arraify(option.output || {}).map((output) => {
|
|
1672
1672
|
return {
|
|
1673
1673
|
...output,
|
|
1674
1674
|
...cliOptions.output
|
|
@@ -1709,9 +1709,9 @@ async function watchInner(config, cliOptions) {
|
|
|
1709
1709
|
async function bundleInner(config, cliOptions) {
|
|
1710
1710
|
const startTime = node_perf_hooks.performance.now();
|
|
1711
1711
|
const result = [];
|
|
1712
|
-
const configList =
|
|
1712
|
+
const configList = require_dist.arraify(config);
|
|
1713
1713
|
for (const config$1 of configList) {
|
|
1714
|
-
const outputList =
|
|
1714
|
+
const outputList = require_dist.arraify(config$1.output || {});
|
|
1715
1715
|
const build = await require_src.rolldown({
|
|
1716
1716
|
...config$1,
|
|
1717
1717
|
...cliOptions.input
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __commonJS, __esm, __toESM } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
3
|
-
import { arraify, init_misc } from "./shared/
|
|
4
|
-
import "./shared/parse-ast-index-
|
|
2
|
+
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-eizE6mpJ.mjs";
|
|
3
|
+
import { arraify, init_misc } from "./shared/dist-Oaz_A_8i.mjs";
|
|
4
|
+
import "./shared/parse-ast-index-DvsltErM.mjs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
6
6
|
import colors from "ansis";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
@@ -1565,8 +1565,8 @@ var init_load_config = __esm({ "src/cli/load-config.ts"() {
|
|
|
1565
1565
|
} });
|
|
1566
1566
|
|
|
1567
1567
|
//#endregion
|
|
1568
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1569
|
-
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1568
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.69.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1569
|
+
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.69.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1570
1570
|
function _usingCtx() {
|
|
1571
1571
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1572
1572
|
var n$2 = Error();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./src-
|
|
2
|
-
import { isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
1
|
+
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./src-0gz2hYtr.js";
|
|
2
|
+
import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.ts
|
|
5
5
|
/**
|
|
@@ -73,4 +73,4 @@ function transformPlugin(config) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
|
-
export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
76
|
+
export { ResolverFactory, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('./shared/src-
|
|
4
|
-
require('./shared/
|
|
5
|
-
require('./shared/parse-ast-index-
|
|
3
|
+
const require_src = require('./shared/src-DRYDMwBc.cjs');
|
|
4
|
+
require('./shared/dist-n1rVcJ5K.cjs');
|
|
5
|
+
require('./shared/parse-ast-index-DfDBeJFi.cjs');
|
|
6
6
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
7
7
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
8
8
|
|
|
@@ -83,6 +83,12 @@ function transformPlugin(config) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
//#endregion
|
|
86
|
+
Object.defineProperty(exports, 'ResolverFactory', {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () {
|
|
89
|
+
return src_rolldown_binding_wasi_cjs.ResolverFactory;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
86
92
|
exports.aliasPlugin = aliasPlugin
|
|
87
93
|
exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin
|
|
88
94
|
exports.composePlugins = require_src.composeJsPlugins
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-
|
|
2
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
1
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-CGEZtOCG.cjs";
|
|
2
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
/**
|
|
@@ -93,4 +93,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
|
|
|
93
93
|
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
94
94
|
|
|
95
95
|
//#endregion
|
|
96
|
-
export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
96
|
+
export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-
|
|
2
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
1
|
+
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-dGH7EYeL.mjs";
|
|
2
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
/**
|
|
@@ -93,4 +93,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
|
|
|
93
93
|
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
94
94
|
|
|
95
95
|
//#endregion
|
|
96
|
-
export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
96
|
+
export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
4
|
-
import { isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
1
|
+
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-eizE6mpJ.mjs";
|
|
2
|
+
import "./shared/dist-Oaz_A_8i.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-DvsltErM.mjs";
|
|
4
|
+
import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
7
7
|
//#region src/api/experimental.ts
|
|
@@ -92,4 +92,4 @@ init_compose_js_plugins();
|
|
|
92
92
|
init_constructors();
|
|
93
93
|
|
|
94
94
|
//#endregion
|
|
95
|
-
export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
95
|
+
export { ResolverFactory, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
package/dist/filter-index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
2
|
+
const require_dist = require('./shared/dist-n1rVcJ5K.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/with-filter.ts
|
|
5
5
|
function withFilterImpl(pluginOption, filterObjectList) {
|
|
6
|
-
if (
|
|
6
|
+
if (require_dist.isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
|
|
7
7
|
if (pluginOption == false || pluginOption == null) return pluginOption;
|
|
8
8
|
if (Array.isArray(pluginOption)) return pluginOption.map((p) => withFilter(p, filterObjectList));
|
|
9
9
|
let plugin = pluginOption;
|
|
@@ -28,7 +28,7 @@ function withFilterImpl(pluginOption, filterObjectList) {
|
|
|
28
28
|
return plugin;
|
|
29
29
|
}
|
|
30
30
|
function withFilter(pluginOption, filterObject) {
|
|
31
|
-
return withFilterImpl(pluginOption,
|
|
31
|
+
return withFilterImpl(pluginOption, require_dist.arraify(filterObject));
|
|
32
32
|
}
|
|
33
33
|
function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
|
|
34
34
|
if (overrideFilterObjectList.length === 1 && overrideFilterObjectList[0].pluginNamePattern === void 0) return 0;
|
|
@@ -41,12 +41,12 @@ function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
//#endregion
|
|
44
|
-
exports.and =
|
|
45
|
-
exports.code =
|
|
46
|
-
exports.exclude =
|
|
47
|
-
exports.id =
|
|
48
|
-
exports.include =
|
|
49
|
-
exports.moduleType =
|
|
50
|
-
exports.not =
|
|
51
|
-
exports.or =
|
|
44
|
+
exports.and = require_dist.and
|
|
45
|
+
exports.code = require_dist.code
|
|
46
|
+
exports.exclude = require_dist.exclude
|
|
47
|
+
exports.id = require_dist.id
|
|
48
|
+
exports.include = require_dist.include
|
|
49
|
+
exports.moduleType = require_dist.moduleType
|
|
50
|
+
exports.not = require_dist.not
|
|
51
|
+
exports.or = require_dist.or
|
|
52
52
|
exports.withFilter = withFilter
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { and, code, exclude, id, include, moduleType, not, or, withFilter } from "./shared/input-options.d-
|
|
1
|
+
import { and, code, exclude, id, include, moduleType, not, or, withFilter } from "./shared/input-options.d-CGEZtOCG.cjs";
|
|
2
2
|
|
|
3
3
|
export { and, code, exclude, id, include, moduleType, not, or, withFilter };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { and, code, exclude, id, include, moduleType, not, or, withFilter } from "./shared/input-options.d-
|
|
1
|
+
import { and, code, exclude, id, include, moduleType, not, or, withFilter } from "./shared/input-options.d-dGH7EYeL.mjs";
|
|
2
2
|
|
|
3
3
|
export { and, code, exclude, id, include, moduleType, not, or, withFilter };
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include,
|
|
1
|
+
import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, init_dist, init_misc, isPromiseLike, moduleType$1 as moduleType, not$1 as not, or$1 as or } from "./shared/dist-Oaz_A_8i.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/with-filter.ts
|
|
4
4
|
init_misc();
|
|
@@ -42,7 +42,7 @@ function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
|
|
|
42
42
|
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/filter-index.ts
|
|
45
|
-
|
|
45
|
+
init_dist();
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
export { and, code, exclude, id, include, moduleType, not, or, withFilter };
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-DRYDMwBc.cjs');
|
|
2
|
+
require('./shared/dist-n1rVcJ5K.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-DfDBeJFi.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION
|
|
6
6
|
exports.build = require_src.build
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/input-options.d-
|
|
1
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/input-options.d-CGEZtOCG.cjs";
|
|
2
2
|
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, 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.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch } from "./shared/input-options.d-
|
|
1
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch } from "./shared/input-options.d-dGH7EYeL.mjs";
|
|
2
2
|
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, 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,6 +1,6 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-
|
|
2
|
-
import "./shared/
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-eizE6mpJ.mjs";
|
|
2
|
+
import "./shared/dist-Oaz_A_8i.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-DvsltErM.mjs";
|
|
4
4
|
|
|
5
5
|
init_src();
|
|
6
6
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/
|
|
4
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-DRYDMwBc.cjs');
|
|
3
|
+
require('./shared/dist-n1rVcJ5K.cjs');
|
|
4
|
+
require('./shared/parse-ast-index-DfDBeJFi.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __commonJS } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-
|
|
3
|
-
import "./shared/
|
|
4
|
-
import "./shared/parse-ast-index-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-eizE6mpJ.mjs";
|
|
3
|
+
import "./shared/dist-Oaz_A_8i.mjs";
|
|
4
|
+
import "./shared/parse-ast-index-DvsltErM.mjs";
|
|
5
5
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
import { parentPort, workerData } from "node:worker_threads";
|
|
7
7
|
|
package/dist/parse-ast-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
1
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-DfDBeJFi.cjs');
|
|
2
2
|
|
|
3
3
|
exports.parseAst = require_parse_ast_index.parseAst
|
|
4
4
|
exports.parseAstAsync = require_parse_ast_index.parseAstAsync
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-
|
|
1
|
+
import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-DvsltErM.mjs";
|
|
2
2
|
|
|
3
3
|
init_parse_ast_index();
|
|
4
4
|
export { parseAst, parseAstAsync };
|
|
@@ -80,10 +80,12 @@ export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
|
80
80
|
export const Bundler = __napiModule.exports.Bundler
|
|
81
81
|
export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
82
82
|
export const ParseResult = __napiModule.exports.ParseResult
|
|
83
|
+
export const ResolverFactory = __napiModule.exports.ResolverFactory
|
|
83
84
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
84
85
|
export const BindingHookSideEffects = __napiModule.exports.BindingHookSideEffects
|
|
85
86
|
export const BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
86
87
|
export const BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
88
|
+
export const EnforceExtension = __napiModule.exports.EnforceExtension
|
|
87
89
|
export const ExportExportNameKind = __napiModule.exports.ExportExportNameKind
|
|
88
90
|
export const ExportImportNameKind = __napiModule.exports.ExportImportNameKind
|
|
89
91
|
export const ExportLocalNameKind = __napiModule.exports.ExportLocalNameKind
|
|
@@ -101,4 +103,5 @@ export const registerPlugins = __napiModule.exports.registerPlugins
|
|
|
101
103
|
export const Severity = __napiModule.exports.Severity
|
|
102
104
|
export const shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
103
105
|
export const startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
106
|
+
export const sync = __napiModule.exports.sync
|
|
104
107
|
export const transform = __napiModule.exports.transform
|
|
@@ -105,10 +105,12 @@ module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
|
105
105
|
module.exports.Bundler = __napiModule.exports.Bundler
|
|
106
106
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
107
107
|
module.exports.ParseResult = __napiModule.exports.ParseResult
|
|
108
|
+
module.exports.ResolverFactory = __napiModule.exports.ResolverFactory
|
|
108
109
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
109
110
|
module.exports.BindingHookSideEffects = __napiModule.exports.BindingHookSideEffects
|
|
110
111
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
111
112
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
113
|
+
module.exports.EnforceExtension = __napiModule.exports.EnforceExtension
|
|
112
114
|
module.exports.ExportExportNameKind = __napiModule.exports.ExportExportNameKind
|
|
113
115
|
module.exports.ExportImportNameKind = __napiModule.exports.ExportImportNameKind
|
|
114
116
|
module.exports.ExportLocalNameKind = __napiModule.exports.ExportLocalNameKind
|
|
@@ -126,4 +128,5 @@ module.exports.registerPlugins = __napiModule.exports.registerPlugins
|
|
|
126
128
|
module.exports.Severity = __napiModule.exports.Severity
|
|
127
129
|
module.exports.shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
128
130
|
module.exports.startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
131
|
+
module.exports.sync = __napiModule.exports.sync
|
|
129
132
|
module.exports.transform = __napiModule.exports.transform
|
|
Binary file
|
|
@@ -25,7 +25,7 @@ function noop(..._args) {}
|
|
|
25
25
|
var init_misc = __esm({ "src/utils/misc.ts"() {} });
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
//#region ../pluginutils/dist/
|
|
28
|
+
//#region ../pluginutils/dist/index.js
|
|
29
29
|
function and(...args) {
|
|
30
30
|
return new And(...args);
|
|
31
31
|
}
|
|
@@ -35,8 +35,8 @@ function or(...args) {
|
|
|
35
35
|
function not(expr) {
|
|
36
36
|
return new Not(expr);
|
|
37
37
|
}
|
|
38
|
-
function id(pattern) {
|
|
39
|
-
return new Id(pattern);
|
|
38
|
+
function id(pattern, params) {
|
|
39
|
+
return new Id(pattern, params);
|
|
40
40
|
}
|
|
41
41
|
function moduleType(pattern) {
|
|
42
42
|
return new ModuleType(pattern);
|
|
@@ -51,7 +51,7 @@ function exclude(expr) {
|
|
|
51
51
|
return new Exclude(expr);
|
|
52
52
|
}
|
|
53
53
|
var And, Or, Not, Id, ModuleType, Code, Include, Exclude;
|
|
54
|
-
var
|
|
54
|
+
var init_dist = __esm({ "../pluginutils/dist/index.js"() {
|
|
55
55
|
And = class {
|
|
56
56
|
kind;
|
|
57
57
|
args;
|
|
@@ -81,9 +81,11 @@ var init_composable_filters = __esm({ "../pluginutils/dist/esm/composable-filter
|
|
|
81
81
|
Id = class {
|
|
82
82
|
kind;
|
|
83
83
|
pattern;
|
|
84
|
-
|
|
84
|
+
params;
|
|
85
|
+
constructor(pattern, params) {
|
|
85
86
|
this.pattern = pattern;
|
|
86
87
|
this.kind = "id";
|
|
88
|
+
this.params = params ?? { cleanUrl: false };
|
|
87
89
|
}
|
|
88
90
|
};
|
|
89
91
|
ModuleType = class {
|
|
@@ -121,15 +123,4 @@ var init_composable_filters = __esm({ "../pluginutils/dist/esm/composable-filter
|
|
|
121
123
|
} });
|
|
122
124
|
|
|
123
125
|
//#endregion
|
|
124
|
-
|
|
125
|
-
var init_simple_filters = __esm({ "../pluginutils/dist/esm/simple-filters.js"() {} });
|
|
126
|
-
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region ../pluginutils/dist/esm/index.js
|
|
129
|
-
var init_esm = __esm({ "../pluginutils/dist/esm/index.js"() {
|
|
130
|
-
init_composable_filters();
|
|
131
|
-
init_simple_filters();
|
|
132
|
-
} });
|
|
133
|
-
|
|
134
|
-
//#endregion
|
|
135
|
-
export { and as and$1, arraify, code as code$1, exclude as exclude$1, id as id$1, include as include$1, init_esm, init_misc, isNullish, isPromiseLike, moduleType as moduleType$1, noop, not as not$1, or as or$1, unimplemented, unreachable, unsupported };
|
|
126
|
+
export { and as and$1, arraify, code as code$1, exclude as exclude$1, id as id$1, include as include$1, init_dist, init_misc, isNullish, isPromiseLike, moduleType as moduleType$1, noop, not as not$1, or as or$1, unimplemented, unreachable, unsupported };
|
|
@@ -24,7 +24,7 @@ function unsupported(info) {
|
|
|
24
24
|
function noop(..._args) {}
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
|
-
//#region ../pluginutils/dist/
|
|
27
|
+
//#region ../pluginutils/dist/index.js
|
|
28
28
|
var And = class {
|
|
29
29
|
kind;
|
|
30
30
|
args;
|
|
@@ -54,9 +54,11 @@ var Not = class {
|
|
|
54
54
|
var Id = class {
|
|
55
55
|
kind;
|
|
56
56
|
pattern;
|
|
57
|
-
|
|
57
|
+
params;
|
|
58
|
+
constructor(pattern, params) {
|
|
58
59
|
this.pattern = pattern;
|
|
59
60
|
this.kind = "id";
|
|
61
|
+
this.params = params ?? { cleanUrl: false };
|
|
60
62
|
}
|
|
61
63
|
};
|
|
62
64
|
var ModuleType = class {
|
|
@@ -100,8 +102,8 @@ function or(...args) {
|
|
|
100
102
|
function not(expr) {
|
|
101
103
|
return new Not(expr);
|
|
102
104
|
}
|
|
103
|
-
function id(pattern) {
|
|
104
|
-
return new Id(pattern);
|
|
105
|
+
function id(pattern, params) {
|
|
106
|
+
return new Id(pattern, params);
|
|
105
107
|
}
|
|
106
108
|
function moduleType(pattern) {
|
|
107
109
|
return new ModuleType(pattern);
|
|
@@ -423,55 +423,59 @@ interface NormalizedOutputOptions {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
//#endregion
|
|
426
|
-
//#region ../pluginutils/dist/
|
|
426
|
+
//#region ../pluginutils/dist/index.d.ts
|
|
427
427
|
type StringOrRegExp = string | RegExp;
|
|
428
|
-
type PluginModuleType =
|
|
428
|
+
type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
|
|
429
429
|
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Include | Exclude$1;
|
|
430
430
|
type TopLevelFilterExpression = Include | Exclude$1;
|
|
431
431
|
declare class And {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
432
|
+
kind: "and";
|
|
433
|
+
args: FilterExpression[];
|
|
434
|
+
constructor(...args: FilterExpression[]);
|
|
435
435
|
}
|
|
436
436
|
declare class Or {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
437
|
+
kind: "or";
|
|
438
|
+
args: FilterExpression[];
|
|
439
|
+
constructor(...args: FilterExpression[]);
|
|
440
440
|
}
|
|
441
441
|
declare class Not {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
442
|
+
kind: "not";
|
|
443
|
+
expr: FilterExpression;
|
|
444
|
+
constructor(expr: FilterExpression);
|
|
445
|
+
}
|
|
446
|
+
interface IdParams {
|
|
447
|
+
cleanUrl?: boolean;
|
|
445
448
|
}
|
|
446
449
|
declare class Id {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
+
kind: "id";
|
|
451
|
+
pattern: StringOrRegExp;
|
|
452
|
+
params: IdParams;
|
|
453
|
+
constructor(pattern: StringOrRegExp, params?: IdParams);
|
|
450
454
|
}
|
|
451
455
|
declare class ModuleType$1 {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
456
|
+
kind: "moduleType";
|
|
457
|
+
pattern: PluginModuleType;
|
|
458
|
+
constructor(pattern: PluginModuleType);
|
|
455
459
|
}
|
|
456
460
|
declare class Code {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
461
|
+
kind: "code";
|
|
462
|
+
pattern: StringOrRegExp;
|
|
463
|
+
constructor(expr: StringOrRegExp);
|
|
460
464
|
}
|
|
461
465
|
declare class Include {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
466
|
+
kind: "include";
|
|
467
|
+
expr: FilterExpression;
|
|
468
|
+
constructor(expr: FilterExpression);
|
|
465
469
|
}
|
|
466
470
|
declare class Exclude$1 {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
471
|
+
kind: "exclude";
|
|
472
|
+
expr: FilterExpression;
|
|
473
|
+
constructor(expr: FilterExpression);
|
|
470
474
|
}
|
|
471
475
|
declare function and(...args: FilterExpression[]): And;
|
|
472
476
|
declare function or(...args: FilterExpression[]): Or;
|
|
473
477
|
declare function not(expr: FilterExpression): Not;
|
|
474
|
-
declare function id(pattern: StringOrRegExp): Id;
|
|
478
|
+
declare function id(pattern: StringOrRegExp, params?: IdParams): Id;
|
|
475
479
|
declare function moduleType(pattern: PluginModuleType): ModuleType$1;
|
|
476
480
|
declare function code(pattern: StringOrRegExp): Code;
|
|
477
481
|
declare function include(expr: FilterExpression): Include;
|
|
@@ -959,7 +963,7 @@ interface ChecksOptions {
|
|
|
959
963
|
type InputOption = string | string[] | Record<string, string>;
|
|
960
964
|
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "jsx" | "define" | "inject" | "target">;
|
|
961
965
|
type ExternalOption = StringOrRegExp$1 | StringOrRegExp$1[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
962
|
-
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css">;
|
|
966
|
+
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
963
967
|
interface JsxOptions {
|
|
964
968
|
mode?: "classic" | "automatic" | "preserve";
|
|
965
969
|
factory?: string;
|
|
@@ -423,55 +423,59 @@ interface NormalizedOutputOptions {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
//#endregion
|
|
426
|
-
//#region ../pluginutils/dist/
|
|
426
|
+
//#region ../pluginutils/dist/index.d.ts
|
|
427
427
|
type StringOrRegExp = string | RegExp;
|
|
428
|
-
type PluginModuleType =
|
|
428
|
+
type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
|
|
429
429
|
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Include | Exclude$1;
|
|
430
430
|
type TopLevelFilterExpression = Include | Exclude$1;
|
|
431
431
|
declare class And {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
432
|
+
kind: "and";
|
|
433
|
+
args: FilterExpression[];
|
|
434
|
+
constructor(...args: FilterExpression[]);
|
|
435
435
|
}
|
|
436
436
|
declare class Or {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
437
|
+
kind: "or";
|
|
438
|
+
args: FilterExpression[];
|
|
439
|
+
constructor(...args: FilterExpression[]);
|
|
440
440
|
}
|
|
441
441
|
declare class Not {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
442
|
+
kind: "not";
|
|
443
|
+
expr: FilterExpression;
|
|
444
|
+
constructor(expr: FilterExpression);
|
|
445
|
+
}
|
|
446
|
+
interface IdParams {
|
|
447
|
+
cleanUrl?: boolean;
|
|
445
448
|
}
|
|
446
449
|
declare class Id {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
+
kind: "id";
|
|
451
|
+
pattern: StringOrRegExp;
|
|
452
|
+
params: IdParams;
|
|
453
|
+
constructor(pattern: StringOrRegExp, params?: IdParams);
|
|
450
454
|
}
|
|
451
455
|
declare class ModuleType$1 {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
456
|
+
kind: "moduleType";
|
|
457
|
+
pattern: PluginModuleType;
|
|
458
|
+
constructor(pattern: PluginModuleType);
|
|
455
459
|
}
|
|
456
460
|
declare class Code {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
461
|
+
kind: "code";
|
|
462
|
+
pattern: StringOrRegExp;
|
|
463
|
+
constructor(expr: StringOrRegExp);
|
|
460
464
|
}
|
|
461
465
|
declare class Include {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
466
|
+
kind: "include";
|
|
467
|
+
expr: FilterExpression;
|
|
468
|
+
constructor(expr: FilterExpression);
|
|
465
469
|
}
|
|
466
470
|
declare class Exclude$1 {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
471
|
+
kind: "exclude";
|
|
472
|
+
expr: FilterExpression;
|
|
473
|
+
constructor(expr: FilterExpression);
|
|
470
474
|
}
|
|
471
475
|
declare function and(...args: FilterExpression[]): And;
|
|
472
476
|
declare function or(...args: FilterExpression[]): Or;
|
|
473
477
|
declare function not(expr: FilterExpression): Not;
|
|
474
|
-
declare function id(pattern: StringOrRegExp): Id;
|
|
478
|
+
declare function id(pattern: StringOrRegExp, params?: IdParams): Id;
|
|
475
479
|
declare function moduleType(pattern: PluginModuleType): ModuleType$1;
|
|
476
480
|
declare function code(pattern: StringOrRegExp): Code;
|
|
477
481
|
declare function include(expr: FilterExpression): Include;
|
|
@@ -959,7 +963,7 @@ interface ChecksOptions {
|
|
|
959
963
|
type InputOption = string | string[] | Record<string, string>;
|
|
960
964
|
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "jsx" | "define" | "inject" | "target">;
|
|
961
965
|
type ExternalOption = StringOrRegExp$1 | StringOrRegExp$1[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
962
|
-
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css">;
|
|
966
|
+
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
963
967
|
interface JsxOptions {
|
|
964
968
|
mode?: "classic" | "automatic" | "preserve";
|
|
965
969
|
factory?: string;
|
|
@@ -182,7 +182,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
//#endregion
|
|
185
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
185
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.69.0/node_modules/oxc-parser/wrap.mjs
|
|
186
186
|
function wrap$1(result) {
|
|
187
187
|
let program, module$1, comments, errors;
|
|
188
188
|
return {
|
|
@@ -204,20 +204,18 @@ function wrap$1(result) {
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function jsonParseAst(
|
|
208
|
-
|
|
207
|
+
function jsonParseAst(programJson) {
|
|
208
|
+
const { node: program, fixes } = JSON.parse(programJson);
|
|
209
|
+
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
210
|
+
return program;
|
|
209
211
|
}
|
|
210
|
-
function
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
} catch (_err) {}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return value;
|
|
212
|
+
function applyFix(program, fixPath) {
|
|
213
|
+
let node = program;
|
|
214
|
+
for (const key of fixPath) node = node[key];
|
|
215
|
+
if (node.bigint) node.value = BigInt(node.bigint);
|
|
216
|
+
else try {
|
|
217
|
+
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
218
|
+
} catch (_err) {}
|
|
221
219
|
}
|
|
222
220
|
|
|
223
221
|
//#endregion
|
|
@@ -190,7 +190,7 @@ var init_logs = __esm({ "src/log/logs.ts"() {
|
|
|
190
190
|
} });
|
|
191
191
|
|
|
192
192
|
//#endregion
|
|
193
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
193
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.69.0/node_modules/oxc-parser/wrap.mjs
|
|
194
194
|
function wrap$1(result) {
|
|
195
195
|
let program, module, comments, errors;
|
|
196
196
|
return {
|
|
@@ -212,22 +212,20 @@ function wrap$1(result) {
|
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
function jsonParseAst(
|
|
216
|
-
|
|
215
|
+
function jsonParseAst(programJson) {
|
|
216
|
+
const { node: program, fixes } = JSON.parse(programJson);
|
|
217
|
+
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
218
|
+
return program;
|
|
217
219
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
} catch (_err) {}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return value;
|
|
220
|
+
function applyFix(program, fixPath) {
|
|
221
|
+
let node = program;
|
|
222
|
+
for (const key of fixPath) node = node[key];
|
|
223
|
+
if (node.bigint) node.value = BigInt(node.bigint);
|
|
224
|
+
else try {
|
|
225
|
+
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
226
|
+
} catch (_err) {}
|
|
229
227
|
}
|
|
230
|
-
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.
|
|
228
|
+
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.69.0/node_modules/oxc-parser/wrap.mjs"() {} });
|
|
231
229
|
|
|
232
230
|
//#endregion
|
|
233
231
|
//#region src/parse-ast-index.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./chunk-qZFfknuJ.cjs');
|
|
3
|
-
const
|
|
4
|
-
const require_parse_ast_index = require('./parse-ast-index-
|
|
3
|
+
const require_dist = require('./dist-n1rVcJ5K.cjs');
|
|
4
|
+
const require_parse_ast_index = require('./parse-ast-index-DfDBeJFi.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
7
7
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.8-commit.
|
|
12
|
+
var version = "1.0.0-beta.8-commit.2a5c6a6";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -114,7 +114,7 @@ const logLevelPriority = {
|
|
|
114
114
|
//#region src/log/log-handler.ts
|
|
115
115
|
const normalizeLog = (log) => typeof log === "string" ? { message: log } : typeof log === "function" ? normalizeLog(log()) : log;
|
|
116
116
|
function getLogHandler(level, code$1, logger, pluginName, logLevel) {
|
|
117
|
-
if (logLevelPriority[level] < logLevelPriority[logLevel]) return
|
|
117
|
+
if (logLevelPriority[level] < logLevelPriority[logLevel]) return require_dist.noop;
|
|
118
118
|
return (log, pos) => {
|
|
119
119
|
if (pos != null) logger(LOG_LEVEL_WARN, require_parse_ast_index.logInvalidLogPosition(pluginName));
|
|
120
120
|
log = normalizeLog(log);
|
|
@@ -217,7 +217,7 @@ function normalizeHook(hook) {
|
|
|
217
217
|
meta: { order }
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
require_dist.unreachable("Invalid hook type");
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
//#endregion
|
|
@@ -1722,6 +1722,7 @@ const ExternalSchema = union([
|
|
|
1722
1722
|
])), returns(nullish(boolean())))
|
|
1723
1723
|
]);
|
|
1724
1724
|
const ModuleTypesSchema = record(string(), union([
|
|
1725
|
+
literal("asset"),
|
|
1725
1726
|
literal("base64"),
|
|
1726
1727
|
literal("binary"),
|
|
1727
1728
|
literal("css"),
|
|
@@ -2183,7 +2184,7 @@ function joinNewLine(s1, s2) {
|
|
|
2183
2184
|
function transformModuleInfo(info, option) {
|
|
2184
2185
|
return {
|
|
2185
2186
|
get ast() {
|
|
2186
|
-
return
|
|
2187
|
+
return require_dist.unsupported("ModuleInfo#ast");
|
|
2187
2188
|
},
|
|
2188
2189
|
get code() {
|
|
2189
2190
|
return info.code;
|
|
@@ -2266,15 +2267,15 @@ function t(...n) {
|
|
|
2266
2267
|
//#endregion
|
|
2267
2268
|
//#region src/plugin/bindingify-hook-filter.ts
|
|
2268
2269
|
function generalHookFilterMatcherToFilterExprs(matcher, stringKind) {
|
|
2269
|
-
if (typeof matcher === "string" || matcher instanceof RegExp) return [
|
|
2270
|
-
if (Array.isArray(matcher)) return matcher.map((m) =>
|
|
2270
|
+
if (typeof matcher === "string" || matcher instanceof RegExp) return [require_dist.include(generateAtomMatcher(stringKind, matcher))];
|
|
2271
|
+
if (Array.isArray(matcher)) return matcher.map((m) => require_dist.include(generateAtomMatcher(stringKind, m)));
|
|
2271
2272
|
let ret = [];
|
|
2272
|
-
if (matcher.exclude) ret.push(...
|
|
2273
|
-
if (matcher.include) ret.push(...
|
|
2273
|
+
if (matcher.exclude) ret.push(...require_dist.arraify(matcher.exclude).map((m) => require_dist.exclude(generateAtomMatcher(stringKind, m))));
|
|
2274
|
+
if (matcher.include) ret.push(...require_dist.arraify(matcher.include).map((m) => require_dist.include(generateAtomMatcher(stringKind, m))));
|
|
2274
2275
|
return ret;
|
|
2275
2276
|
}
|
|
2276
2277
|
function generateAtomMatcher(kind, matcher) {
|
|
2277
|
-
return kind === "code" ?
|
|
2278
|
+
return kind === "code" ? require_dist.code(matcher) : require_dist.id(matcher);
|
|
2278
2279
|
}
|
|
2279
2280
|
function transformFilterMatcherToFilterExprs(filterOption) {
|
|
2280
2281
|
if (!filterOption) return void 0;
|
|
@@ -2292,11 +2293,11 @@ function transformFilterMatcherToFilterExprs(filterOption) {
|
|
|
2292
2293
|
let andExprList = [];
|
|
2293
2294
|
if (moduleType$1) {
|
|
2294
2295
|
let moduleTypes = Array.isArray(moduleType$1) ? moduleType$1 : moduleType$1.include ?? [];
|
|
2295
|
-
andExprList.push(
|
|
2296
|
+
andExprList.push(require_dist.or(...moduleTypes.map((m) => require_dist.moduleType(m))));
|
|
2296
2297
|
}
|
|
2297
|
-
if (idIncludes.length) andExprList.push(
|
|
2298
|
-
if (codeIncludes.length) andExprList.push(
|
|
2299
|
-
if (andExprList.length) ret.push(
|
|
2298
|
+
if (idIncludes.length) andExprList.push(require_dist.or(...idIncludes.map((item) => item.expr)));
|
|
2299
|
+
if (codeIncludes.length) andExprList.push(require_dist.or(...codeIncludes.map((item) => item.expr)));
|
|
2300
|
+
if (andExprList.length) ret.push(require_dist.include(require_dist.and(...andExprList)));
|
|
2300
2301
|
return ret;
|
|
2301
2302
|
}
|
|
2302
2303
|
function bindingifyGeneralHookFilter(stringKind, pattern) {
|
|
@@ -2340,6 +2341,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2340
2341
|
kind: "Id",
|
|
2341
2342
|
payload: expr.pattern
|
|
2342
2343
|
});
|
|
2344
|
+
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
2343
2345
|
break;
|
|
2344
2346
|
}
|
|
2345
2347
|
case "moduleType": {
|
|
@@ -2471,12 +2473,12 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2471
2473
|
const info = this.data.getModuleOption(res.id) || {};
|
|
2472
2474
|
return {
|
|
2473
2475
|
...res,
|
|
2474
|
-
external: res.external === "relative" ?
|
|
2476
|
+
external: res.external === "relative" ? require_dist.unreachable(`The PluginContext resolve result external couldn't be 'relative'`) : res.external,
|
|
2475
2477
|
...info
|
|
2476
2478
|
};
|
|
2477
2479
|
}
|
|
2478
2480
|
emitFile = (file) => {
|
|
2479
|
-
if (file.type === "prebuilt-chunk") return
|
|
2481
|
+
if (file.type === "prebuilt-chunk") return require_dist.unimplemented("PluginContext.emitFile with type prebuilt-chunk");
|
|
2480
2482
|
if (file.type === "chunk") return this.context.emitChunk(file);
|
|
2481
2483
|
const fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== "function" ? void 0 : this.outputOptions.sanitizeFileName(file.name || "asset");
|
|
2482
2484
|
const filename = file.fileName ? void 0 : this.getAssetFileNames(file);
|
|
@@ -2821,7 +2823,7 @@ function bindingifyFormat(format) {
|
|
|
2821
2823
|
case "iife": return "iife";
|
|
2822
2824
|
case "umd": return "umd";
|
|
2823
2825
|
case "experimental-app": return "app";
|
|
2824
|
-
default:
|
|
2826
|
+
default: require_dist.unimplemented(`output.format: ${format}`);
|
|
2825
2827
|
}
|
|
2826
2828
|
}
|
|
2827
2829
|
function bindingifySourcemap(sourcemap) {
|
|
@@ -3615,7 +3617,7 @@ function bindingifyExternal(external) {
|
|
|
3615
3617
|
if (id$1.startsWith("\0")) return false;
|
|
3616
3618
|
return external(id$1, importer, isResolved) ?? false;
|
|
3617
3619
|
};
|
|
3618
|
-
const externalArr =
|
|
3620
|
+
const externalArr = require_dist.arraify(external);
|
|
3619
3621
|
return (id$1, _importer, _isResolved) => {
|
|
3620
3622
|
return externalArr.some((pat) => {
|
|
3621
3623
|
if (pat instanceof RegExp) return pat.test(id$1);
|
|
@@ -3630,7 +3632,7 @@ function bindingifyResolve(resolve) {
|
|
|
3630
3632
|
return {
|
|
3631
3633
|
alias: alias ? Object.entries(alias).map(([name, replacement]) => ({
|
|
3632
3634
|
find: name,
|
|
3633
|
-
replacements:
|
|
3635
|
+
replacements: require_dist.arraify(replacement)
|
|
3634
3636
|
})) : void 0,
|
|
3635
3637
|
extensionAlias: extensionAlias ? Object.entries(extensionAlias).map(([name, value]) => ({
|
|
3636
3638
|
target: name,
|
|
@@ -3877,7 +3879,7 @@ function createComposedPlugin(plugins) {
|
|
|
3877
3879
|
if (symbolForCallerThatSkipSelf === handlerSymbol) continue;
|
|
3878
3880
|
const { handler: handlerFn } = normalizeHook(handler);
|
|
3879
3881
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), source, importer, rawHookResolveIdOptions);
|
|
3880
|
-
if (!
|
|
3882
|
+
if (!require_dist.isNullish(result)) return result;
|
|
3881
3883
|
}
|
|
3882
3884
|
};
|
|
3883
3885
|
}
|
|
@@ -3903,7 +3905,7 @@ function createComposedPlugin(plugins) {
|
|
|
3903
3905
|
for (const [handler, plugin] of batchedHandlers) {
|
|
3904
3906
|
const { handler: handlerFn } = normalizeHook(handler);
|
|
3905
3907
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), id$1);
|
|
3906
|
-
if (!
|
|
3908
|
+
if (!require_dist.isNullish(result)) return result;
|
|
3907
3909
|
}
|
|
3908
3910
|
};
|
|
3909
3911
|
}
|
|
@@ -3925,7 +3927,7 @@ function createComposedPlugin(plugins) {
|
|
|
3925
3927
|
throw new Error(`The getCombinedSourcemap is not implement in transform hook at composedJsPlugins`);
|
|
3926
3928
|
};
|
|
3927
3929
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), code$1, id$1, moduleType$1);
|
|
3928
|
-
if (!
|
|
3930
|
+
if (!require_dist.isNullish(result)) {
|
|
3929
3931
|
if (typeof result === "string") updateOutput(result);
|
|
3930
3932
|
else if (result.code) updateOutput(result.code, result.moduleSideEffects);
|
|
3931
3933
|
}
|
|
@@ -3957,7 +3959,7 @@ function createComposedPlugin(plugins) {
|
|
|
3957
3959
|
for (const [handler, plugin] of batchedHandlers) {
|
|
3958
3960
|
const { handler: handlerFn } = normalizeHook(handler);
|
|
3959
3961
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), code$1, chunk, options, meta);
|
|
3960
|
-
if (!
|
|
3962
|
+
if (!require_dist.isNullish(result)) return result;
|
|
3961
3963
|
}
|
|
3962
3964
|
};
|
|
3963
3965
|
}
|
|
@@ -4337,8 +4339,8 @@ var Watcher = class {
|
|
|
4337
4339
|
}
|
|
4338
4340
|
};
|
|
4339
4341
|
async function createWatcher(emitter, input) {
|
|
4340
|
-
const options =
|
|
4341
|
-
const bundlerOptions = await Promise.all(options.map((option) =>
|
|
4342
|
+
const options = require_dist.arraify(input);
|
|
4343
|
+
const bundlerOptions = await Promise.all(options.map((option) => require_dist.arraify(option.output || {}).map(async (output) => {
|
|
4342
4344
|
const inputOptions = await PluginDriver.callOptionsHook(option, true);
|
|
4343
4345
|
return createBundlerOptions(inputOptions, output, true);
|
|
4344
4346
|
})).flat());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esm } from "./chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include,
|
|
3
|
-
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-
|
|
2
|
+
import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, init_dist, init_misc, isNullish, moduleType$1 as moduleType, noop, or$1 as or, unimplemented, unreachable, unsupported } from "./dist-Oaz_A_8i.mjs";
|
|
3
|
+
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-DvsltErM.mjs";
|
|
4
4
|
import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import colors from "ansis";
|
|
@@ -8,7 +8,7 @@ import { availableParallelism } from "node:os";
|
|
|
8
8
|
import { Worker } from "node:worker_threads";
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.8-commit.
|
|
11
|
+
var version = "1.0.0-beta.8-commit.2a5c6a6";
|
|
12
12
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
@@ -1406,7 +1406,7 @@ function safeParse(schema, input, config2) {
|
|
|
1406
1406
|
};
|
|
1407
1407
|
}
|
|
1408
1408
|
var store, store2, store3, store4, ValiError;
|
|
1409
|
-
var init_dist$
|
|
1409
|
+
var init_dist$3 = __esm({ "../../node_modules/.pnpm/valibot@1.0.0_typescript@5.8.3/node_modules/valibot/dist/index.js"() {
|
|
1410
1410
|
ValiError = class extends Error {
|
|
1411
1411
|
/**
|
|
1412
1412
|
* Creates a Valibot error with useful information.
|
|
@@ -1735,8 +1735,8 @@ function toJsonSchema(schema, config) {
|
|
|
1735
1735
|
return jsonSchema;
|
|
1736
1736
|
}
|
|
1737
1737
|
var refCount;
|
|
1738
|
-
var init_dist$
|
|
1739
|
-
init_dist$
|
|
1738
|
+
var init_dist$2 = __esm({ "../../node_modules/.pnpm/@valibot+to-json-schema@1.0.0_valibot@1.0.0_typescript@5.8.3_/node_modules/@valibot/to-json-schema/dist/index.js"() {
|
|
1739
|
+
init_dist$3();
|
|
1740
1740
|
refCount = 0;
|
|
1741
1741
|
} });
|
|
1742
1742
|
|
|
@@ -1782,8 +1782,8 @@ function getJsonSchema() {
|
|
|
1782
1782
|
}
|
|
1783
1783
|
var StringOrRegExpSchema, LogLevelSchema, LogLevelOptionSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, InputOptionSchema, ExternalSchema, ModuleTypesSchema, JsxOptionsSchema, HelperModeSchema, DecoratorOptionSchema, HelpersSchema, RewriteImportExtensionsSchema, TypescriptSchema, AssumptionsSchema, TransformOptionsSchema, WatchOptionsSchema, ChecksOptionsSchema, MinifyOptionsSchema, ResolveOptionsSchema, TreeshakingOptionsSchema, OnLogSchema, OnwarnSchema, HmrSchema, InputOptionsSchema, InputCliOverrideSchema, InputCliOptionsSchema, ESTargetSchema, ModuleFormatSchema, AddonFunctionSchema, ChunkFileNamesSchema, AssetFileNamesSchema, SanitizeFileNameSchema, GlobalsFunctionSchema, AdvancedChunksSchema, OutputOptionsSchema, getAddonDescription, OutputCliOverrideSchema, OutputCliOptionsSchema, CliOptionsSchema, inputHelperMsgRecord, outputHelperMsgRecord;
|
|
1784
1784
|
var init_validator = __esm({ "src/utils/validator.ts"() {
|
|
1785
|
-
init_dist$1();
|
|
1786
1785
|
init_dist$2();
|
|
1786
|
+
init_dist$3();
|
|
1787
1787
|
StringOrRegExpSchema = union([string(), instance(RegExp)]);
|
|
1788
1788
|
LogLevelSchema = union([
|
|
1789
1789
|
literal("debug"),
|
|
@@ -1809,6 +1809,7 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
|
|
|
1809
1809
|
])), returns(nullish(boolean())))
|
|
1810
1810
|
]);
|
|
1811
1811
|
ModuleTypesSchema = record(string(), union([
|
|
1812
|
+
literal("asset"),
|
|
1812
1813
|
literal("base64"),
|
|
1813
1814
|
literal("binary"),
|
|
1814
1815
|
literal("css"),
|
|
@@ -3332,7 +3333,7 @@ var init_chunk_UHDYHGOF = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_m
|
|
|
3332
3333
|
|
|
3333
3334
|
//#endregion
|
|
3334
3335
|
//#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/index.js
|
|
3335
|
-
var init_dist = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/index.js"() {
|
|
3336
|
+
var init_dist$1 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/index.js"() {
|
|
3336
3337
|
init_chunk_7ZI6JRPB();
|
|
3337
3338
|
init_chunk_OXJMERKM();
|
|
3338
3339
|
init_chunk_BSLJB6JE();
|
|
@@ -3571,6 +3572,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
3571
3572
|
kind: "Id",
|
|
3572
3573
|
payload: expr.pattern
|
|
3573
3574
|
});
|
|
3575
|
+
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
3574
3576
|
break;
|
|
3575
3577
|
}
|
|
3576
3578
|
case "moduleType": {
|
|
@@ -3623,8 +3625,8 @@ function bindingifyRenderChunkFilter(filterOption) {
|
|
|
3623
3625
|
return filterOption.code ? bindingifyGeneralHookFilter("code", filterOption.code) : void 0;
|
|
3624
3626
|
}
|
|
3625
3627
|
var init_bindingify_hook_filter = __esm({ "src/plugin/bindingify-hook-filter.ts"() {
|
|
3626
|
-
init_esm();
|
|
3627
3628
|
init_dist();
|
|
3629
|
+
init_dist$1();
|
|
3628
3630
|
init_misc();
|
|
3629
3631
|
} });
|
|
3630
3632
|
|
|
@@ -5377,7 +5379,7 @@ function composeJsPlugins(plugins) {
|
|
|
5377
5379
|
}
|
|
5378
5380
|
var unsupportedHookName, unsupportedHooks;
|
|
5379
5381
|
var init_compose_js_plugins = __esm({ "src/utils/compose-js-plugins.ts"() {
|
|
5380
|
-
init_dist();
|
|
5382
|
+
init_dist$1();
|
|
5381
5383
|
init_constructors();
|
|
5382
5384
|
init_plugin_context$1();
|
|
5383
5385
|
init_misc();
|
|
@@ -3,7 +3,7 @@ import path from "pathe";
|
|
|
3
3
|
import colors from "ansis";
|
|
4
4
|
|
|
5
5
|
//#region package.json
|
|
6
|
-
var version = "1.0.0-beta.8-commit.
|
|
6
|
+
var version = "1.0.0-beta.8-commit.2a5c6a6";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/builtin-plugin/utils.ts
|
|
@@ -1577,6 +1577,7 @@ const ExternalSchema = union([
|
|
|
1577
1577
|
])), returns(nullish(boolean())))
|
|
1578
1578
|
]);
|
|
1579
1579
|
const ModuleTypesSchema = record(string(), union([
|
|
1580
|
+
literal("asset"),
|
|
1580
1581
|
literal("base64"),
|
|
1581
1582
|
literal("binary"),
|
|
1582
1583
|
literal("css"),
|
|
@@ -2067,7 +2068,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
|
|
|
2067
2068
|
}
|
|
2068
2069
|
|
|
2069
2070
|
//#endregion
|
|
2070
|
-
//#region ../pluginutils/dist/
|
|
2071
|
+
//#region ../pluginutils/dist/index.js
|
|
2071
2072
|
var And = class {
|
|
2072
2073
|
kind;
|
|
2073
2074
|
args;
|
|
@@ -2089,9 +2090,11 @@ var Or = class {
|
|
|
2089
2090
|
var Id = class {
|
|
2090
2091
|
kind;
|
|
2091
2092
|
pattern;
|
|
2092
|
-
|
|
2093
|
+
params;
|
|
2094
|
+
constructor(pattern, params) {
|
|
2093
2095
|
this.pattern = pattern;
|
|
2094
2096
|
this.kind = "id";
|
|
2097
|
+
this.params = params ?? { cleanUrl: false };
|
|
2095
2098
|
}
|
|
2096
2099
|
};
|
|
2097
2100
|
var ModuleType = class {
|
|
@@ -2132,8 +2135,8 @@ function and(...args$1) {
|
|
|
2132
2135
|
function or(...args$1) {
|
|
2133
2136
|
return new Or(...args$1);
|
|
2134
2137
|
}
|
|
2135
|
-
function id(pattern) {
|
|
2136
|
-
return new Id(pattern);
|
|
2138
|
+
function id(pattern, params) {
|
|
2139
|
+
return new Id(pattern, params);
|
|
2137
2140
|
}
|
|
2138
2141
|
function moduleType(pattern) {
|
|
2139
2142
|
return new ModuleType(pattern);
|
|
@@ -2261,6 +2264,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2261
2264
|
kind: "Id",
|
|
2262
2265
|
payload: expr.pattern
|
|
2263
2266
|
});
|
|
2267
|
+
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
2264
2268
|
break;
|
|
2265
2269
|
}
|
|
2266
2270
|
case "moduleType": {
|
|
@@ -2329,7 +2333,7 @@ function bindingPluginOrder(order) {
|
|
|
2329
2333
|
}
|
|
2330
2334
|
|
|
2331
2335
|
//#endregion
|
|
2332
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2336
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.69.0/node_modules/oxc-parser/wrap.mjs
|
|
2333
2337
|
function wrap$1(result) {
|
|
2334
2338
|
let program, module, comments, errors;
|
|
2335
2339
|
return {
|
|
@@ -2351,20 +2355,18 @@ function wrap$1(result) {
|
|
|
2351
2355
|
}
|
|
2352
2356
|
};
|
|
2353
2357
|
}
|
|
2354
|
-
function jsonParseAst(
|
|
2355
|
-
|
|
2358
|
+
function jsonParseAst(programJson) {
|
|
2359
|
+
const { node: program, fixes } = JSON.parse(programJson);
|
|
2360
|
+
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
2361
|
+
return program;
|
|
2356
2362
|
}
|
|
2357
|
-
function
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
} catch (_err) {}
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
return value;
|
|
2363
|
+
function applyFix(program, fixPath) {
|
|
2364
|
+
let node = program;
|
|
2365
|
+
for (const key of fixPath) node = node[key];
|
|
2366
|
+
if (node.bigint) node.value = BigInt(node.bigint);
|
|
2367
|
+
else try {
|
|
2368
|
+
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
2369
|
+
} catch (_err) {}
|
|
2368
2370
|
}
|
|
2369
2371
|
|
|
2370
2372
|
//#endregion
|
|
@@ -3339,7 +3341,7 @@ function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, nor
|
|
|
3339
3341
|
const { plugin: resolveId, meta: resolveIdMeta, filter: resolveIdFilter } = bindingifyResolveId(args$1);
|
|
3340
3342
|
const { plugin: resolveDynamicImport, meta: resolveDynamicImportMeta } = bindingifyResolveDynamicImport(args$1);
|
|
3341
3343
|
const { plugin: buildEnd, meta: buildEndMeta } = bindingifyBuildEnd(args$1);
|
|
3342
|
-
const { plugin: transform
|
|
3344
|
+
const { plugin: transform, meta: transformMeta, filter: transformFilter } = bindingifyTransform(args$1);
|
|
3343
3345
|
const { plugin: moduleParsed, meta: moduleParsedMeta } = bindingifyModuleParsed(args$1);
|
|
3344
3346
|
const { plugin: load, meta: loadMeta, filter: loadFilter } = bindingifyLoad(args$1);
|
|
3345
3347
|
const { plugin: renderChunk, meta: renderChunkMeta, filter: renderChunkFilter } = bindingifyRenderChunk(args$1);
|
|
@@ -3367,7 +3369,7 @@ function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, nor
|
|
|
3367
3369
|
resolveDynamicImportMeta,
|
|
3368
3370
|
buildEnd,
|
|
3369
3371
|
buildEndMeta,
|
|
3370
|
-
transform
|
|
3372
|
+
transform,
|
|
3371
3373
|
transformMeta,
|
|
3372
3374
|
transformFilter,
|
|
3373
3375
|
moduleParsed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolldown/browser",
|
|
3
|
-
"version": "1.0.0-beta.8-commit.
|
|
3
|
+
"version": "1.0.0-beta.8-commit.2a5c6a6",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"type": "module",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@napi-rs/wasm-runtime": "^0.2.8",
|
|
59
|
-
"@oxc-project/types": "0.
|
|
59
|
+
"@oxc-project/types": "0.69.0",
|
|
60
60
|
"ansis": "^4.0.0",
|
|
61
61
|
"pathe": "^2.0.3"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@oxc-project/runtime": "0.
|
|
64
|
+
"@oxc-project/runtime": "0.69.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"@oxc-project/runtime": {
|