rolldown 1.0.0-beta.8-commit.852c603 → 1.0.0-beta.8-commit.a720367
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 +6 -6
- package/dist/cli.mjs +2 -2
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +2 -2
- package/dist/filter-index.cjs +12 -0
- package/dist/{filter-expression-index.d.cts → filter-index.d.cts} +3 -3
- package/dist/{filter-expression-index.d.mts → filter-index.d.mts} +3 -3
- package/dist/filter-index.mjs +4 -0
- package/dist/index.cjs +3 -4
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/shared/{binding.d-BaNmLM9c.d.mts → binding.d-BqY7GV3f.d.cts} +3 -0
- package/dist/shared/{binding.d-y7dWnUxd.d.cts → binding.d-DE0X2d5U.d.mts} +3 -0
- package/dist/shared/filter-index-DblXSw9s.cjs +255 -0
- package/dist/shared/filter-index-hnEzlqRW.mjs +174 -0
- package/dist/shared/{input-options.d-CN-JV5dt.d.mts → input-options.d-B9XQg_yc.d.mts} +23 -25
- package/dist/shared/{input-options.d-BHwth6VM.d.cts → input-options.d-BP-ZTUFR.d.cts} +23 -25
- package/dist/shared/{src-CaxK4-gB.mjs → src-B7fgzJrI.mjs} +1753 -510
- package/dist/shared/{src-B4f_CmD8.cjs → src-N-rxJtKK.cjs} +1754 -517
- package/package.json +21 -21
- package/dist/filter-expression-index.cjs +0 -11
- package/dist/filter-expression-index.mjs +0 -4
- package/dist/shared/filter-expression-index-BKmgnKlV.mjs +0 -69
- package/dist/shared/filter-expression-index-CRtoeipP.cjs +0 -119
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-
|
|
2
|
+
const require_src = require('./shared/src-N-rxJtKK.cjs');
|
|
3
3
|
require('./shared/parse-ast-index-Bbz37LOL.cjs');
|
|
4
|
-
require('./shared/filter-
|
|
4
|
+
const require_filter_index = require('./shared/filter-index-DblXSw9s.cjs');
|
|
5
5
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
7
7
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
@@ -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_filter_index.arraify(config).map((option) => {
|
|
1668
1668
|
return {
|
|
1669
1669
|
...option,
|
|
1670
1670
|
...cliOptions.input,
|
|
1671
|
-
output:
|
|
1671
|
+
output: require_filter_index.arraify(option.output || {}).map((output) => {
|
|
1672
1672
|
return {
|
|
1673
1673
|
...output,
|
|
1674
1674
|
...cliOptions.output
|
|
@@ -1707,9 +1707,9 @@ async function watchInner(config, cliOptions) {
|
|
|
1707
1707
|
async function bundleInner(config, cliOptions) {
|
|
1708
1708
|
const startTime = node_perf_hooks.performance.now();
|
|
1709
1709
|
const result = [];
|
|
1710
|
-
const configList =
|
|
1710
|
+
const configList = require_filter_index.arraify(config);
|
|
1711
1711
|
for (const config$1 of configList) {
|
|
1712
|
-
const outputList =
|
|
1712
|
+
const outputList = require_filter_index.arraify(config$1.output || {});
|
|
1713
1713
|
const build = await require_src.rolldown({
|
|
1714
1714
|
...config$1,
|
|
1715
1715
|
...cliOptions.input
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __commonJS, __esm, __toESM } from "./shared/chunk-DUYDk_2O.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-B7fgzJrI.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-D0SmlXT6.mjs";
|
|
4
|
-
import "./shared/filter-
|
|
4
|
+
import { arraify, init_misc } from "./shared/filter-index-hnEzlqRW.mjs";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path, { sep } from "node:path";
|
|
7
7
|
import colors from "ansis";
|
|
@@ -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-
|
|
3
|
+
const require_src = require('./shared/src-N-rxJtKK.cjs');
|
|
4
4
|
const require_parse_ast_index = require('./shared/parse-ast-index-Bbz37LOL.cjs');
|
|
5
|
-
require('./shared/filter-
|
|
5
|
+
require('./shared/filter-index-DblXSw9s.cjs');
|
|
6
6
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
7
7
|
|
|
8
8
|
//#region src/api/experimental.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-BqY7GV3f.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-BP-ZTUFR.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-
|
|
2
|
-
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-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-DE0X2d5U.mjs";
|
|
2
|
+
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-B9XQg_yc.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
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-B7fgzJrI.mjs";
|
|
2
2
|
import { import_binding } from "./shared/parse-ast-index-D0SmlXT6.mjs";
|
|
3
|
-
import "./shared/filter-
|
|
3
|
+
import "./shared/filter-index-hnEzlqRW.mjs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
|
|
6
6
|
//#region src/api/experimental.ts
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const require_filter_index = require('./shared/filter-index-DblXSw9s.cjs');
|
|
2
|
+
|
|
3
|
+
exports.And = require_filter_index.And
|
|
4
|
+
exports.and = require_filter_index.and
|
|
5
|
+
exports.code = require_filter_index.code
|
|
6
|
+
exports.exclude = require_filter_index.exclude
|
|
7
|
+
exports.id = require_filter_index.id
|
|
8
|
+
exports.include = require_filter_index.include
|
|
9
|
+
exports.moduleType = require_filter_index.moduleType
|
|
10
|
+
exports.not = require_filter_index.not
|
|
11
|
+
exports.or = require_filter_index.or
|
|
12
|
+
exports.withFilter = require_filter_index.withFilter
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding.d-
|
|
2
|
-
import { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or } from "./shared/input-options.d-
|
|
1
|
+
import "./shared/binding.d-BqY7GV3f.cjs";
|
|
2
|
+
import { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or, withFilter } from "./shared/input-options.d-BP-ZTUFR.cjs";
|
|
3
3
|
|
|
4
|
-
export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or };
|
|
4
|
+
export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or, withFilter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding.d-
|
|
2
|
-
import { And$1 as And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and$1 as and, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, moduleType$1 as moduleType, not$1 as not, or$1 as or } from "./shared/input-options.d-
|
|
1
|
+
import "./shared/binding.d-DE0X2d5U.mjs";
|
|
2
|
+
import { And$1 as And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and$1 as and, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, moduleType$1 as moduleType, not$1 as not, or$1 as or, withFilter$1 as withFilter } from "./shared/input-options.d-B9XQg_yc.mjs";
|
|
3
3
|
|
|
4
|
-
export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or };
|
|
4
|
+
export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or, withFilter };
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-N-rxJtKK.cjs');
|
|
2
2
|
require('./shared/parse-ast-index-Bbz37LOL.cjs');
|
|
3
|
-
require('./shared/filter-
|
|
3
|
+
require('./shared/filter-index-DblXSw9s.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION
|
|
6
6
|
exports.build = require_src.build
|
|
7
7
|
exports.defineConfig = require_src.defineConfig
|
|
8
8
|
exports.rolldown = require_src.rolldown
|
|
9
|
-
exports.watch = require_src.watch
|
|
10
|
-
exports.withFilter = require_src.withFilter
|
|
9
|
+
exports.watch = require_src.watch
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding.d-
|
|
2
|
-
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, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding.d-BqY7GV3f.cjs";
|
|
2
|
+
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, 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-BP-ZTUFR.cjs";
|
|
3
3
|
|
|
4
|
-
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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch
|
|
4
|
+
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,4 +1,4 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding.d-
|
|
2
|
-
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, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding.d-DE0X2d5U.mjs";
|
|
2
|
+
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, 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-B9XQg_yc.mjs";
|
|
3
3
|
|
|
4
|
-
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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch
|
|
4
|
+
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
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-B7fgzJrI.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-D0SmlXT6.mjs";
|
|
3
|
-
import "./shared/filter-
|
|
3
|
+
import "./shared/filter-index-hnEzlqRW.mjs";
|
|
4
4
|
|
|
5
5
|
init_src();
|
|
6
|
-
export { VERSION, build, defineConfig, rolldown, watch
|
|
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-
|
|
2
|
+
const require_src = require('./shared/src-N-rxJtKK.cjs');
|
|
3
3
|
const require_parse_ast_index = require('./shared/parse-ast-index-Bbz37LOL.cjs');
|
|
4
|
-
require('./shared/filter-
|
|
4
|
+
require('./shared/filter-index-DblXSw9s.cjs');
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __commonJS } from "./shared/chunk-DUYDk_2O.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-B7fgzJrI.mjs";
|
|
3
3
|
import { import_binding } from "./shared/parse-ast-index-D0SmlXT6.mjs";
|
|
4
|
-
import "./shared/filter-
|
|
4
|
+
import "./shared/filter-index-hnEzlqRW.mjs";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding.d-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/input-options.d-
|
|
1
|
+
import "./shared/binding.d-BqY7GV3f.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/input-options.d-BP-ZTUFR.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding.d-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/input-options.d-
|
|
1
|
+
import "./shared/binding.d-DE0X2d5U.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/input-options.d-B9XQg_yc.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -85,6 +85,9 @@ interface BindingHmrOutput {
|
|
|
85
85
|
patch: string
|
|
86
86
|
hmrBoundaries: Array<BindingHmrBoundaryOutput>
|
|
87
87
|
fullReload: boolean
|
|
88
|
+
firstInvalidatedBy?: string
|
|
89
|
+
isSelfAccepting: boolean
|
|
90
|
+
fullReloadReason?: string
|
|
88
91
|
}
|
|
89
92
|
interface BindingHookResolveIdExtraArgs {
|
|
90
93
|
custom?: number
|
|
@@ -85,6 +85,9 @@ interface BindingHmrOutput {
|
|
|
85
85
|
patch: string
|
|
86
86
|
hmrBoundaries: Array<BindingHmrBoundaryOutput>
|
|
87
87
|
fullReload: boolean
|
|
88
|
+
firstInvalidatedBy?: string
|
|
89
|
+
isSelfAccepting: boolean
|
|
90
|
+
fullReloadReason?: string
|
|
88
91
|
}
|
|
89
92
|
interface BindingHookResolveIdExtraArgs {
|
|
90
93
|
custom?: number
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/misc.ts
|
|
4
|
+
function arraify(value) {
|
|
5
|
+
return Array.isArray(value) ? value : [value];
|
|
6
|
+
}
|
|
7
|
+
function isNullish(value) {
|
|
8
|
+
return value === null || value === void 0;
|
|
9
|
+
}
|
|
10
|
+
function isPromiseLike(value) {
|
|
11
|
+
return value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
12
|
+
}
|
|
13
|
+
function unimplemented(info) {
|
|
14
|
+
if (info) throw new Error(`unimplemented: ${info}`);
|
|
15
|
+
throw new Error("unimplemented");
|
|
16
|
+
}
|
|
17
|
+
function unreachable(info) {
|
|
18
|
+
if (info) throw new Error(`unreachable: ${info}`);
|
|
19
|
+
throw new Error("unreachable");
|
|
20
|
+
}
|
|
21
|
+
function unsupported(info) {
|
|
22
|
+
throw new Error(`UNSUPPORTED: ${info}`);
|
|
23
|
+
}
|
|
24
|
+
function noop(..._args) {}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/plugin/with-filter.ts
|
|
28
|
+
function withFilterImpl(pluginOption, filterObjectList) {
|
|
29
|
+
if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
|
|
30
|
+
if (pluginOption == false || pluginOption == null) return pluginOption;
|
|
31
|
+
if (Array.isArray(pluginOption)) return pluginOption.map((p) => withFilter(p, filterObjectList));
|
|
32
|
+
let plugin = pluginOption;
|
|
33
|
+
let filterObjectIndex = findMatchedFilterObject(plugin.name, filterObjectList);
|
|
34
|
+
if (filterObjectIndex === -1) return plugin;
|
|
35
|
+
let filterObject = filterObjectList[filterObjectIndex];
|
|
36
|
+
Object.keys(plugin).forEach((key) => {
|
|
37
|
+
switch (key) {
|
|
38
|
+
case "transform":
|
|
39
|
+
case "resolveId":
|
|
40
|
+
case "load":
|
|
41
|
+
if (!plugin[key]) return;
|
|
42
|
+
if (typeof plugin[key] === "object") plugin[key].filter = filterObject[key] ?? plugin[key].filter;
|
|
43
|
+
else plugin[key] = {
|
|
44
|
+
handler: plugin[key],
|
|
45
|
+
filter: filterObject[key]
|
|
46
|
+
};
|
|
47
|
+
break;
|
|
48
|
+
default: break;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return plugin;
|
|
52
|
+
}
|
|
53
|
+
function withFilter(pluginOption, filterObject) {
|
|
54
|
+
return withFilterImpl(pluginOption, arraify(filterObject));
|
|
55
|
+
}
|
|
56
|
+
function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
|
|
57
|
+
if (overrideFilterObjectList.length === 1 && overrideFilterObjectList[0].pluginNamePattern === void 0) return 0;
|
|
58
|
+
for (let i = 0; i < overrideFilterObjectList.length; i++) for (let j = 0; j < (overrideFilterObjectList[i].pluginNamePattern ?? []).length; j++) {
|
|
59
|
+
let pattern = overrideFilterObjectList[i].pluginNamePattern[j];
|
|
60
|
+
if (typeof pattern === "string" && pattern === pluginName) return i;
|
|
61
|
+
else if (pattern instanceof RegExp && pattern.test(pluginName)) return i;
|
|
62
|
+
}
|
|
63
|
+
return -1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/filter-index.ts
|
|
68
|
+
var And = class {
|
|
69
|
+
kind;
|
|
70
|
+
args;
|
|
71
|
+
constructor(...args) {
|
|
72
|
+
if (args.length === 0) throw new Error("`And` expects at least one operand");
|
|
73
|
+
this.args = args;
|
|
74
|
+
this.kind = "and";
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var Or = class {
|
|
78
|
+
kind;
|
|
79
|
+
args;
|
|
80
|
+
constructor(...args) {
|
|
81
|
+
if (args.length === 0) throw new Error("`Or` expects at least one operand");
|
|
82
|
+
this.args = args;
|
|
83
|
+
this.kind = "or";
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var Not = class {
|
|
87
|
+
kind;
|
|
88
|
+
expr;
|
|
89
|
+
constructor(expr) {
|
|
90
|
+
this.expr = expr;
|
|
91
|
+
this.kind = "not";
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
var Id = class {
|
|
95
|
+
kind;
|
|
96
|
+
pattern;
|
|
97
|
+
constructor(pattern) {
|
|
98
|
+
this.pattern = pattern;
|
|
99
|
+
this.kind = "id";
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var ModuleType = class {
|
|
103
|
+
kind;
|
|
104
|
+
pattern;
|
|
105
|
+
constructor(pattern) {
|
|
106
|
+
this.pattern = pattern;
|
|
107
|
+
this.kind = "moduleType";
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
var Code = class {
|
|
111
|
+
kind;
|
|
112
|
+
pattern;
|
|
113
|
+
constructor(expr) {
|
|
114
|
+
this.pattern = expr;
|
|
115
|
+
this.kind = "code";
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
var Include = class {
|
|
119
|
+
kind;
|
|
120
|
+
expr;
|
|
121
|
+
constructor(expr) {
|
|
122
|
+
this.expr = expr;
|
|
123
|
+
this.kind = "include";
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var Exclude = class {
|
|
127
|
+
kind;
|
|
128
|
+
expr;
|
|
129
|
+
constructor(expr) {
|
|
130
|
+
this.expr = expr;
|
|
131
|
+
this.kind = "exclude";
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
function and(...args) {
|
|
135
|
+
return new And(...args);
|
|
136
|
+
}
|
|
137
|
+
function or(...args) {
|
|
138
|
+
return new Or(...args);
|
|
139
|
+
}
|
|
140
|
+
function not(expr) {
|
|
141
|
+
return new Not(expr);
|
|
142
|
+
}
|
|
143
|
+
function id(pattern) {
|
|
144
|
+
return new Id(pattern);
|
|
145
|
+
}
|
|
146
|
+
function moduleType(pattern) {
|
|
147
|
+
return new ModuleType(pattern);
|
|
148
|
+
}
|
|
149
|
+
function code(pattern) {
|
|
150
|
+
return new Code(pattern);
|
|
151
|
+
}
|
|
152
|
+
function include(expr) {
|
|
153
|
+
return new Include(expr);
|
|
154
|
+
}
|
|
155
|
+
function exclude(expr) {
|
|
156
|
+
return new Exclude(expr);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
//#endregion
|
|
160
|
+
Object.defineProperty(exports, 'And', {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: function () {
|
|
163
|
+
return And;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
Object.defineProperty(exports, 'and', {
|
|
167
|
+
enumerable: true,
|
|
168
|
+
get: function () {
|
|
169
|
+
return and;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
Object.defineProperty(exports, 'arraify', {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function () {
|
|
175
|
+
return arraify;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
Object.defineProperty(exports, 'code', {
|
|
179
|
+
enumerable: true,
|
|
180
|
+
get: function () {
|
|
181
|
+
return code;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, 'exclude', {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function () {
|
|
187
|
+
return exclude;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
Object.defineProperty(exports, 'id', {
|
|
191
|
+
enumerable: true,
|
|
192
|
+
get: function () {
|
|
193
|
+
return id;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
Object.defineProperty(exports, 'include', {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
get: function () {
|
|
199
|
+
return include;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
Object.defineProperty(exports, 'isNullish', {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
get: function () {
|
|
205
|
+
return isNullish;
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
Object.defineProperty(exports, 'moduleType', {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
get: function () {
|
|
211
|
+
return moduleType;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
Object.defineProperty(exports, 'noop', {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
get: function () {
|
|
217
|
+
return noop;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(exports, 'not', {
|
|
221
|
+
enumerable: true,
|
|
222
|
+
get: function () {
|
|
223
|
+
return not;
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
Object.defineProperty(exports, 'or', {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
get: function () {
|
|
229
|
+
return or;
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
Object.defineProperty(exports, 'unimplemented', {
|
|
233
|
+
enumerable: true,
|
|
234
|
+
get: function () {
|
|
235
|
+
return unimplemented;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
Object.defineProperty(exports, 'unreachable', {
|
|
239
|
+
enumerable: true,
|
|
240
|
+
get: function () {
|
|
241
|
+
return unreachable;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
Object.defineProperty(exports, 'unsupported', {
|
|
245
|
+
enumerable: true,
|
|
246
|
+
get: function () {
|
|
247
|
+
return unsupported;
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
Object.defineProperty(exports, 'withFilter', {
|
|
251
|
+
enumerable: true,
|
|
252
|
+
get: function () {
|
|
253
|
+
return withFilter;
|
|
254
|
+
}
|
|
255
|
+
});
|