rolldown 1.0.0-beta.8-commit.1fd551c → 1.0.0-beta.8-commit.852c603
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 -5
- package/dist/cli.mjs +6 -5
- package/dist/experimental-index.cjs +3 -2
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +3 -2
- package/dist/filter-expression-index.cjs +11 -0
- package/dist/filter-expression-index.d.cts +4 -0
- package/dist/filter-expression-index.d.mts +4 -0
- package/dist/filter-expression-index.mjs +4 -0
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -2
- package/dist/parallel-plugin-worker.cjs +3 -2
- package/dist/parallel-plugin-worker.mjs +3 -2
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/shared/{binding.d-BVuAIDg-.d.cts → binding.d-BaNmLM9c.d.mts} +84 -0
- package/dist/shared/{binding.d-BeOzR_y0.d.mts → binding.d-y7dWnUxd.d.cts} +84 -0
- package/dist/shared/filter-expression-index-BKmgnKlV.mjs +69 -0
- package/dist/shared/filter-expression-index-CRtoeipP.cjs +119 -0
- package/dist/shared/{input-options.d-CU30Caau.d.cts → input-options.d-BHwth6VM.d.cts} +84 -22
- package/dist/shared/{input-options.d-CHr9lvEw.d.mts → input-options.d-CN-JV5dt.d.mts} +84 -22
- package/dist/shared/{parse-ast-index-DROW_mqO.cjs → parse-ast-index-Bbz37LOL.cjs} +15 -13
- package/dist/shared/{parse-ast-index-CJTgEIMh.mjs → parse-ast-index-D0SmlXT6.mjs} +16 -14
- package/dist/shared/{src-DWaN7-KQ.cjs → src-B4f_CmD8.cjs} +248 -133
- package/dist/shared/{src-BCCnC5nI.mjs → src-CaxK4-gB.mjs} +1781 -1665
- package/package.json +22 -18
- /package/dist/shared/{prompt-_yrURmmm.cjs → prompt-At99RuKY.cjs} +0 -0
- /package/dist/shared/{prompt-V-Wm9PcC.mjs → prompt-UMUDMApt.mjs} +0 -0
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-
|
|
1
|
+
import { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-y7dWnUxd.cjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
|
|
4
4
|
//#region src/log/logging.d.ts
|
|
5
5
|
type LogLevel = "info" | "debug" | "warn";
|
|
6
6
|
type LogLevelOption = LogLevel | "silent";
|
|
7
7
|
type LogLevelWithError = LogLevel | "error";
|
|
8
|
-
type RollupLog$1 = any;
|
|
9
|
-
type RollupLogWithString = RollupLog$1 | string;
|
|
10
|
-
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/types/misc.d.ts
|
|
14
8
|
interface RollupLog {
|
|
15
9
|
binding?: string;
|
|
16
10
|
cause?: unknown;
|
|
@@ -35,19 +29,18 @@ interface RollupLog {
|
|
|
35
29
|
stack?: string;
|
|
36
30
|
url?: string;
|
|
37
31
|
}
|
|
32
|
+
type RollupLogWithString = RollupLog | string;
|
|
38
33
|
interface RollupError extends RollupLog {
|
|
39
34
|
name?: string;
|
|
40
35
|
stack?: string;
|
|
41
36
|
watchFiles?: string[];
|
|
42
37
|
}
|
|
43
|
-
type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}) => void;
|
|
38
|
+
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/types/misc.d.ts
|
|
48
42
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
49
43
|
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
50
|
-
type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
51
44
|
|
|
52
45
|
//#endregion
|
|
53
46
|
//#region src/utils/asset-source.d.ts
|
|
@@ -372,6 +365,15 @@ type RolldownWatcher = WatcherEmitter;
|
|
|
372
365
|
//#region src/api/watch/index.d.ts
|
|
373
366
|
declare const watch: (input: WatchOptions$1 | WatchOptions$1[]) => RolldownWatcher;
|
|
374
367
|
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region src/log/log-handler.d.ts
|
|
370
|
+
type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
|
|
371
|
+
type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
|
|
372
|
+
column: number
|
|
373
|
+
line: number
|
|
374
|
+
}) => void;
|
|
375
|
+
type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
376
|
+
|
|
375
377
|
//#endregion
|
|
376
378
|
//#region src/options/normalized-input-options.d.ts
|
|
377
379
|
interface NormalizedInputOptions {
|
|
@@ -415,11 +417,68 @@ interface NormalizedOutputOptions {
|
|
|
415
417
|
plugins: RolldownPlugin[];
|
|
416
418
|
}
|
|
417
419
|
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/filter-expression-index.d.ts
|
|
422
|
+
type FilterExpressionKind = FilterExpression["kind"];
|
|
423
|
+
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Include | Exclude$1;
|
|
424
|
+
type TopLevelFilterExpression = Include | Exclude$1;
|
|
425
|
+
declare class And {
|
|
426
|
+
kind: "and";
|
|
427
|
+
left: FilterExpression;
|
|
428
|
+
right: FilterExpression;
|
|
429
|
+
constructor(left: FilterExpression, right: FilterExpression);
|
|
430
|
+
}
|
|
431
|
+
declare class Or {
|
|
432
|
+
kind: "or";
|
|
433
|
+
left: FilterExpression;
|
|
434
|
+
right: FilterExpression;
|
|
435
|
+
constructor(left: FilterExpression, right: FilterExpression);
|
|
436
|
+
}
|
|
437
|
+
declare class Not {
|
|
438
|
+
kind: "not";
|
|
439
|
+
expr: FilterExpression;
|
|
440
|
+
constructor(expr: FilterExpression);
|
|
441
|
+
}
|
|
442
|
+
declare class Id {
|
|
443
|
+
kind: "id";
|
|
444
|
+
pattern: StringOrRegExp;
|
|
445
|
+
constructor(pattern: StringOrRegExp);
|
|
446
|
+
}
|
|
447
|
+
declare class ModuleType$1 {
|
|
448
|
+
kind: "moduleType";
|
|
449
|
+
pattern: ModuleType;
|
|
450
|
+
constructor(pattern: ModuleType);
|
|
451
|
+
}
|
|
452
|
+
declare class Code {
|
|
453
|
+
kind: "code";
|
|
454
|
+
pattern: StringOrRegExp;
|
|
455
|
+
constructor(expr: StringOrRegExp);
|
|
456
|
+
}
|
|
457
|
+
declare class Include {
|
|
458
|
+
kind: "include";
|
|
459
|
+
expr: FilterExpression;
|
|
460
|
+
constructor(expr: FilterExpression);
|
|
461
|
+
}
|
|
462
|
+
declare class Exclude$1 {
|
|
463
|
+
kind: "exclude";
|
|
464
|
+
expr: FilterExpression;
|
|
465
|
+
constructor(expr: FilterExpression);
|
|
466
|
+
}
|
|
467
|
+
declare function and(left: FilterExpression, right: FilterExpression): And;
|
|
468
|
+
declare function or(left: FilterExpression, right: FilterExpression): Or;
|
|
469
|
+
declare function not(expr: FilterExpression): Not;
|
|
470
|
+
declare function id(pattern: StringOrRegExp): Id;
|
|
471
|
+
declare function moduleType(pattern: ModuleType): ModuleType$1;
|
|
472
|
+
declare function code(pattern: StringOrRegExp): Code;
|
|
473
|
+
declare function include(expr: FilterExpression): Include;
|
|
474
|
+
declare function exclude(expr: FilterExpression): Exclude$1;
|
|
475
|
+
|
|
418
476
|
//#endregion
|
|
419
477
|
//#region src/plugin/hook-filter.d.ts
|
|
420
|
-
type
|
|
478
|
+
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
421
479
|
include?: MaybeArray<Value>
|
|
422
480
|
exclude?: MaybeArray<Value>
|
|
481
|
+
custom?: TopLevelFilterExpression[]
|
|
423
482
|
};
|
|
424
483
|
interface FormalModuleTypeFilter {
|
|
425
484
|
include?: ModuleType[];
|
|
@@ -458,9 +517,10 @@ interface HookFilter {
|
|
|
458
517
|
* }}
|
|
459
518
|
* ```
|
|
460
519
|
*/
|
|
461
|
-
id?:
|
|
520
|
+
id?: GeneralHookFilter;
|
|
462
521
|
moduleType?: ModuleTypeFilter;
|
|
463
|
-
code?:
|
|
522
|
+
code?: GeneralHookFilter;
|
|
523
|
+
custom?: TopLevelFilterExpression[];
|
|
464
524
|
}
|
|
465
525
|
|
|
466
526
|
//#endregion
|
|
@@ -802,11 +862,13 @@ type ParallelPluginHooks = Exclude<keyof FunctionPluginHooks | AddonHooks, First
|
|
|
802
862
|
type HookFilterExtension<K extends keyof FunctionPluginHooks> = K extends "transform" ? {
|
|
803
863
|
filter?: HookFilter
|
|
804
864
|
} : K extends "load" ? {
|
|
805
|
-
filter?: Pick<HookFilter, "id">
|
|
865
|
+
filter?: Pick<HookFilter, "id" | "custom">
|
|
806
866
|
} : K extends "resolveId" ? {
|
|
807
867
|
filter?: {
|
|
808
|
-
id?:
|
|
809
|
-
}
|
|
868
|
+
id?: GeneralHookFilter<RegExp>
|
|
869
|
+
} & Pick<HookFilter, "custom">
|
|
870
|
+
} : K extends "renderChunk" ? {
|
|
871
|
+
filter?: Pick<HookFilter, "code">
|
|
810
872
|
} : {};
|
|
811
873
|
type PluginHooks = { [K in keyof FunctionPluginHooks] : ObjectHook<K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K], HookFilterExtension<K> & (K extends ParallelPluginHooks ? {
|
|
812
874
|
/**
|
|
@@ -961,8 +1023,8 @@ interface InputOptions {
|
|
|
961
1023
|
shimMissingExports?: boolean;
|
|
962
1024
|
treeshake?: boolean | TreeshakingOptions;
|
|
963
1025
|
logLevel?: LogLevelOption;
|
|
964
|
-
onLog?: (level: LogLevel, log: RollupLog
|
|
965
|
-
onwarn?: (warning: RollupLog
|
|
1026
|
+
onLog?: (level: LogLevel, log: RollupLog, defaultHandler: LogOrStringHandler) => void;
|
|
1027
|
+
onwarn?: (warning: RollupLog, defaultHandler: (warning: RollupLogWithString | (() => RollupLogWithString)) => void) => void;
|
|
966
1028
|
moduleTypes?: ModuleTypes;
|
|
967
1029
|
experimental?: {
|
|
968
1030
|
enableComposingJsPlugins?: boolean
|
|
@@ -1065,4 +1127,4 @@ interface InputOptions {
|
|
|
1065
1127
|
}
|
|
1066
1128
|
|
|
1067
1129
|
//#endregion
|
|
1068
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, 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
|
|
1130
|
+
export { AddonFunction, And, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FilterExpression, FilterExpressionKind, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, 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, TopLevelFilterExpression, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions$1 as WatchOptions, and, build, buildImportAnalysisPlugin, code, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, exclude, id, importGlobPlugin, include, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleType, not, or, reportPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, withFilter };
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-
|
|
1
|
+
import { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-BaNmLM9c.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
|
|
4
4
|
//#region src/log/logging.d.ts
|
|
5
5
|
type LogLevel = "info" | "debug" | "warn";
|
|
6
6
|
type LogLevelOption = LogLevel | "silent";
|
|
7
7
|
type LogLevelWithError = LogLevel | "error";
|
|
8
|
-
type RollupLog$1 = any;
|
|
9
|
-
type RollupLogWithString = RollupLog$1 | string;
|
|
10
|
-
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/types/misc.d.ts
|
|
14
8
|
interface RollupLog {
|
|
15
9
|
binding?: string;
|
|
16
10
|
cause?: unknown;
|
|
@@ -35,19 +29,18 @@ interface RollupLog {
|
|
|
35
29
|
stack?: string;
|
|
36
30
|
url?: string;
|
|
37
31
|
}
|
|
32
|
+
type RollupLogWithString = RollupLog | string;
|
|
38
33
|
interface RollupError extends RollupLog {
|
|
39
34
|
name?: string;
|
|
40
35
|
stack?: string;
|
|
41
36
|
watchFiles?: string[];
|
|
42
37
|
}
|
|
43
|
-
type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}) => void;
|
|
38
|
+
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/types/misc.d.ts
|
|
48
42
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
49
43
|
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
50
|
-
type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
51
44
|
|
|
52
45
|
//#endregion
|
|
53
46
|
//#region src/utils/asset-source.d.ts
|
|
@@ -372,6 +365,15 @@ type RolldownWatcher = WatcherEmitter;
|
|
|
372
365
|
//#region src/api/watch/index.d.ts
|
|
373
366
|
declare const watch: (input: WatchOptions$1 | WatchOptions$1[]) => RolldownWatcher;
|
|
374
367
|
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region src/log/log-handler.d.ts
|
|
370
|
+
type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
|
|
371
|
+
type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
|
|
372
|
+
column: number
|
|
373
|
+
line: number
|
|
374
|
+
}) => void;
|
|
375
|
+
type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
376
|
+
|
|
375
377
|
//#endregion
|
|
376
378
|
//#region src/options/normalized-input-options.d.ts
|
|
377
379
|
interface NormalizedInputOptions {
|
|
@@ -415,11 +417,68 @@ interface NormalizedOutputOptions {
|
|
|
415
417
|
plugins: RolldownPlugin[];
|
|
416
418
|
}
|
|
417
419
|
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/filter-expression-index.d.ts
|
|
422
|
+
type FilterExpressionKind = FilterExpression["kind"];
|
|
423
|
+
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Include | Exclude$1;
|
|
424
|
+
type TopLevelFilterExpression = Include | Exclude$1;
|
|
425
|
+
declare class And {
|
|
426
|
+
kind: "and";
|
|
427
|
+
left: FilterExpression;
|
|
428
|
+
right: FilterExpression;
|
|
429
|
+
constructor(left: FilterExpression, right: FilterExpression);
|
|
430
|
+
}
|
|
431
|
+
declare class Or {
|
|
432
|
+
kind: "or";
|
|
433
|
+
left: FilterExpression;
|
|
434
|
+
right: FilterExpression;
|
|
435
|
+
constructor(left: FilterExpression, right: FilterExpression);
|
|
436
|
+
}
|
|
437
|
+
declare class Not {
|
|
438
|
+
kind: "not";
|
|
439
|
+
expr: FilterExpression;
|
|
440
|
+
constructor(expr: FilterExpression);
|
|
441
|
+
}
|
|
442
|
+
declare class Id {
|
|
443
|
+
kind: "id";
|
|
444
|
+
pattern: StringOrRegExp;
|
|
445
|
+
constructor(pattern: StringOrRegExp);
|
|
446
|
+
}
|
|
447
|
+
declare class ModuleType$1 {
|
|
448
|
+
kind: "moduleType";
|
|
449
|
+
pattern: ModuleType;
|
|
450
|
+
constructor(pattern: ModuleType);
|
|
451
|
+
}
|
|
452
|
+
declare class Code {
|
|
453
|
+
kind: "code";
|
|
454
|
+
pattern: StringOrRegExp;
|
|
455
|
+
constructor(expr: StringOrRegExp);
|
|
456
|
+
}
|
|
457
|
+
declare class Include {
|
|
458
|
+
kind: "include";
|
|
459
|
+
expr: FilterExpression;
|
|
460
|
+
constructor(expr: FilterExpression);
|
|
461
|
+
}
|
|
462
|
+
declare class Exclude$1 {
|
|
463
|
+
kind: "exclude";
|
|
464
|
+
expr: FilterExpression;
|
|
465
|
+
constructor(expr: FilterExpression);
|
|
466
|
+
}
|
|
467
|
+
declare function and(left: FilterExpression, right: FilterExpression): And;
|
|
468
|
+
declare function or(left: FilterExpression, right: FilterExpression): Or;
|
|
469
|
+
declare function not(expr: FilterExpression): Not;
|
|
470
|
+
declare function id(pattern: StringOrRegExp): Id;
|
|
471
|
+
declare function moduleType(pattern: ModuleType): ModuleType$1;
|
|
472
|
+
declare function code(pattern: StringOrRegExp): Code;
|
|
473
|
+
declare function include(expr: FilterExpression): Include;
|
|
474
|
+
declare function exclude(expr: FilterExpression): Exclude$1;
|
|
475
|
+
|
|
418
476
|
//#endregion
|
|
419
477
|
//#region src/plugin/hook-filter.d.ts
|
|
420
|
-
type
|
|
478
|
+
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
421
479
|
include?: MaybeArray<Value>
|
|
422
480
|
exclude?: MaybeArray<Value>
|
|
481
|
+
custom?: TopLevelFilterExpression[]
|
|
423
482
|
};
|
|
424
483
|
interface FormalModuleTypeFilter {
|
|
425
484
|
include?: ModuleType[];
|
|
@@ -458,9 +517,10 @@ interface HookFilter {
|
|
|
458
517
|
* }}
|
|
459
518
|
* ```
|
|
460
519
|
*/
|
|
461
|
-
id?:
|
|
520
|
+
id?: GeneralHookFilter;
|
|
462
521
|
moduleType?: ModuleTypeFilter;
|
|
463
|
-
code?:
|
|
522
|
+
code?: GeneralHookFilter;
|
|
523
|
+
custom?: TopLevelFilterExpression[];
|
|
464
524
|
}
|
|
465
525
|
|
|
466
526
|
//#endregion
|
|
@@ -802,11 +862,13 @@ type ParallelPluginHooks = Exclude<keyof FunctionPluginHooks | AddonHooks, First
|
|
|
802
862
|
type HookFilterExtension<K extends keyof FunctionPluginHooks> = K extends "transform" ? {
|
|
803
863
|
filter?: HookFilter
|
|
804
864
|
} : K extends "load" ? {
|
|
805
|
-
filter?: Pick<HookFilter, "id">
|
|
865
|
+
filter?: Pick<HookFilter, "id" | "custom">
|
|
806
866
|
} : K extends "resolveId" ? {
|
|
807
867
|
filter?: {
|
|
808
|
-
id?:
|
|
809
|
-
}
|
|
868
|
+
id?: GeneralHookFilter<RegExp>
|
|
869
|
+
} & Pick<HookFilter, "custom">
|
|
870
|
+
} : K extends "renderChunk" ? {
|
|
871
|
+
filter?: Pick<HookFilter, "code">
|
|
810
872
|
} : {};
|
|
811
873
|
type PluginHooks = { [K in keyof FunctionPluginHooks] : ObjectHook<K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K], HookFilterExtension<K> & (K extends ParallelPluginHooks ? {
|
|
812
874
|
/**
|
|
@@ -961,8 +1023,8 @@ interface InputOptions {
|
|
|
961
1023
|
shimMissingExports?: boolean;
|
|
962
1024
|
treeshake?: boolean | TreeshakingOptions;
|
|
963
1025
|
logLevel?: LogLevelOption;
|
|
964
|
-
onLog?: (level: LogLevel, log: RollupLog
|
|
965
|
-
onwarn?: (warning: RollupLog
|
|
1026
|
+
onLog?: (level: LogLevel, log: RollupLog, defaultHandler: LogOrStringHandler) => void;
|
|
1027
|
+
onwarn?: (warning: RollupLog, defaultHandler: (warning: RollupLogWithString | (() => RollupLogWithString)) => void) => void;
|
|
966
1028
|
moduleTypes?: ModuleTypes;
|
|
967
1029
|
experimental?: {
|
|
968
1030
|
enableComposingJsPlugins?: boolean
|
|
@@ -1065,4 +1127,4 @@ interface InputOptions {
|
|
|
1065
1127
|
}
|
|
1066
1128
|
|
|
1067
1129
|
//#endregion
|
|
1068
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin as BuiltinPlugin$1, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, 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
|
|
1130
|
+
export { AddonFunction, And as And$1, AsyncPluginHooks, BuildOptions, BuiltinPlugin as BuiltinPlugin$1, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FilterExpression, FilterExpressionKind, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, 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, TopLevelFilterExpression, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION as VERSION$1, WarningHandlerWithDefault, WatchOptions$1 as WatchOptions, and as and$1, build as build$1, buildImportAnalysisPlugin as buildImportAnalysisPlugin$1, code as code$1, defineConfig as defineConfig$1, defineParallelPlugin, dynamicImportVarsPlugin as dynamicImportVarsPlugin$1, exclude as exclude$1, id as id$1, importGlobPlugin as importGlobPlugin$1, include as include$1, isolatedDeclarationPlugin as isolatedDeclarationPlugin$1, jsonPlugin as jsonPlugin$1, loadFallbackPlugin as loadFallbackPlugin$1, manifestPlugin as manifestPlugin$1, moduleFederationPlugin as moduleFederationPlugin$1, modulePreloadPolyfillPlugin as modulePreloadPolyfillPlugin$1, moduleType as moduleType$1, not as not$1, or as or$1, reportPlugin as reportPlugin$1, rolldown as rolldown$1, viteResolvePlugin as viteResolvePlugin$1, wasmFallbackPlugin as wasmFallbackPlugin$1, wasmHelperPlugin as wasmHelperPlugin$1, watch as watch$1, withFilter as withFilter$1 };
|
|
@@ -353,6 +353,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
|
|
|
353
353
|
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
354
354
|
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
355
355
|
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
356
|
+
module.exports.FilterTokenKind = nativeBinding.FilterTokenKind;
|
|
356
357
|
module.exports.getBufferOffset = nativeBinding.getBufferOffset;
|
|
357
358
|
module.exports.HelperMode = nativeBinding.HelperMode;
|
|
358
359
|
module.exports.ImportNameKind = nativeBinding.ImportNameKind;
|
|
@@ -551,7 +552,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
551
552
|
}
|
|
552
553
|
|
|
553
554
|
//#endregion
|
|
554
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
555
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.67.0/node_modules/oxc-parser/wrap.mjs
|
|
555
556
|
function wrap$1(result) {
|
|
556
557
|
let program, module$1, comments, errors;
|
|
557
558
|
return {
|
|
@@ -573,19 +574,20 @@ function wrap$1(result) {
|
|
|
573
574
|
}
|
|
574
575
|
};
|
|
575
576
|
}
|
|
576
|
-
function jsonParseAst(
|
|
577
|
-
return JSON.parse(
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
577
|
+
function jsonParseAst(program) {
|
|
578
|
+
return JSON.parse(program, transform);
|
|
579
|
+
}
|
|
580
|
+
function transform(key, value) {
|
|
581
|
+
if (value === null && key === "value" && Object.hasOwn(this, "type") && this.type === "Literal") {
|
|
582
|
+
if (Object.hasOwn(this, "bigint")) return BigInt(this.bigint);
|
|
583
|
+
if (Object.hasOwn(this, "regex")) {
|
|
584
|
+
const { regex } = this;
|
|
585
|
+
try {
|
|
586
|
+
return RegExp(regex.pattern, regex.flags);
|
|
587
|
+
} catch (_err) {}
|
|
586
588
|
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
+
}
|
|
590
|
+
return value;
|
|
589
591
|
}
|
|
590
592
|
|
|
591
593
|
//#endregion
|
|
@@ -353,6 +353,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
|
|
|
353
353
|
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
354
354
|
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
355
355
|
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
356
|
+
module.exports.FilterTokenKind = nativeBinding.FilterTokenKind;
|
|
356
357
|
module.exports.getBufferOffset = nativeBinding.getBufferOffset;
|
|
357
358
|
module.exports.HelperMode = nativeBinding.HelperMode;
|
|
358
359
|
module.exports.ImportNameKind = nativeBinding.ImportNameKind;
|
|
@@ -560,7 +561,7 @@ var init_logs = __esm({ "src/log/logs.ts"() {
|
|
|
560
561
|
} });
|
|
561
562
|
|
|
562
563
|
//#endregion
|
|
563
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
564
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.67.0/node_modules/oxc-parser/wrap.mjs
|
|
564
565
|
function wrap$1(result) {
|
|
565
566
|
let program, module$1, comments, errors;
|
|
566
567
|
return {
|
|
@@ -582,21 +583,22 @@ function wrap$1(result) {
|
|
|
582
583
|
}
|
|
583
584
|
};
|
|
584
585
|
}
|
|
585
|
-
function jsonParseAst(
|
|
586
|
-
return JSON.parse(
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
586
|
+
function jsonParseAst(program) {
|
|
587
|
+
return JSON.parse(program, transform);
|
|
588
|
+
}
|
|
589
|
+
function transform(key, value) {
|
|
590
|
+
if (value === null && key === "value" && Object.hasOwn(this, "type") && this.type === "Literal") {
|
|
591
|
+
if (Object.hasOwn(this, "bigint")) return BigInt(this.bigint);
|
|
592
|
+
if (Object.hasOwn(this, "regex")) {
|
|
593
|
+
const { regex } = this;
|
|
594
|
+
try {
|
|
595
|
+
return RegExp(regex.pattern, regex.flags);
|
|
596
|
+
} catch (_err) {}
|
|
595
597
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
+
}
|
|
599
|
+
return value;
|
|
598
600
|
}
|
|
599
|
-
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.
|
|
601
|
+
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.67.0/node_modules/oxc-parser/wrap.mjs"() {} });
|
|
600
602
|
|
|
601
603
|
//#endregion
|
|
602
604
|
//#region src/parse-ast-index.ts
|