rolldown 1.0.0-beta.1-commit.7c52c94 → 1.0.0-beta.10-commit.ac4e5db
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/bin/cli.mjs +2 -0
- package/dist/cli.cjs +1748 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +1745 -0
- package/dist/config.cjs +12 -0
- package/dist/config.d.cts +12 -0
- package/dist/config.d.mts +12 -0
- package/dist/config.mjs +10 -0
- package/dist/experimental-index.cjs +132 -0
- package/dist/experimental-index.d.cts +96 -0
- package/dist/experimental-index.d.mts +96 -0
- package/dist/experimental-index.mjs +91 -0
- package/dist/filter-index.cjs +105 -0
- package/dist/filter-index.d.cts +5 -0
- package/dist/filter-index.d.mts +5 -0
- package/dist/filter-index.mjs +44 -0
- package/dist/index.cjs +9 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +5 -0
- package/dist/{cjs/parallel-plugin-worker.cjs → parallel-plugin-worker.cjs} +7 -14
- package/dist/parallel-plugin-worker.d.cts +1 -0
- package/dist/parallel-plugin-worker.d.mts +1 -0
- package/dist/{esm/parallel-plugin-worker.mjs → parallel-plugin-worker.mjs} +5 -11
- package/dist/{cjs/parallel-plugin.cjs → parallel-plugin.cjs} +1 -2
- package/dist/parallel-plugin.d.cts +15 -0
- package/dist/parallel-plugin.d.mts +15 -0
- package/dist/{esm/parallel-plugin.mjs → parallel-plugin.mjs} +0 -1
- package/dist/parse-ast-index.cjs +4 -0
- package/dist/parse-ast-index.d.cts +9 -0
- package/dist/parse-ast-index.d.mts +9 -0
- package/dist/parse-ast-index.mjs +3 -0
- package/dist/shared/binding.d-Bl5Vi4GH.d.mts +1702 -0
- package/dist/shared/binding.d-DcFBMcjI.d.cts +1702 -0
- package/dist/shared/{chunk-qZFfknuJ.cjs → chunk-DDkG_k5U.cjs} +0 -1
- package/dist/shared/define-config.d-B2xOSmbM.d.cts +1082 -0
- package/dist/shared/define-config.d-USfUuKiR.d.mts +1082 -0
- package/dist/shared/load-config-CFRprP4h.cjs +125 -0
- package/dist/shared/load-config-DrIWz9n9.mjs +119 -0
- package/dist/shared/misc-BKp5iIef.cjs +67 -0
- package/dist/shared/misc-BN0nse6C.mjs +25 -0
- package/dist/shared/{binding-fhgdIkpS.cjs → parse-ast-index-BvK1MT-L.cjs} +347 -309
- package/dist/shared/{binding-Bl7VQy7c.mjs → parse-ast-index-PSQWLeSo.mjs} +334 -277
- package/dist/shared/prompt-8EeOGx1_.cjs +854 -0
- package/dist/shared/prompt-C3zHEaSG.mjs +852 -0
- package/dist/shared/src-DuQI8s0p.cjs +4654 -0
- package/dist/shared/src-r81e2JxS.mjs +4456 -0
- package/package.json +63 -62
- package/bin/cli.js +0 -2
- package/dist/cjs/cli.cjs +0 -769
- package/dist/cjs/experimental-index.cjs +0 -79
- package/dist/cjs/index.cjs +0 -8
- package/dist/cjs/parse-ast-index.cjs +0 -57
- package/dist/esm/cli.mjs +0 -766
- package/dist/esm/experimental-index.mjs +0 -56
- package/dist/esm/index.mjs +0 -4
- package/dist/esm/parse-ast-index.mjs +0 -55
- package/dist/shared/consola_36c0034f-Cx52UqEq.mjs +0 -832
- package/dist/shared/consola_36c0034f-CynBWXXO.cjs +0 -859
- package/dist/shared/prompt-B58MxVuU.cjs +0 -762
- package/dist/shared/prompt-DjjlOckE.mjs +0 -758
- package/dist/shared/src-CPCP99Z9.mjs +0 -2641
- package/dist/shared/src-lBcHSsjm.cjs +0 -2822
- package/dist/tsconfig.dts.tsbuildinfo +0 -1
- package/dist/types/api/build.d.ts +0 -18
- package/dist/types/api/experimental.d.ts +0 -7
- package/dist/types/api/rolldown/index.d.ts +0 -3
- package/dist/types/api/rolldown/rolldown-build.d.ts +0 -12
- package/dist/types/api/watch/index.d.ts +0 -3
- package/dist/types/api/watch/watch-emitter.d.ts +0 -31
- package/dist/types/api/watch/watcher.d.ts +0 -13
- package/dist/types/binding.d.ts +0 -1288
- package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
- package/dist/types/builtin-plugin/constructors.d.ts +0 -20
- package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -28
- package/dist/types/builtin-plugin/transform-plugin.d.ts +0 -9
- package/dist/types/builtin-plugin/utils.d.ts +0 -8
- package/dist/types/cli/arguments/alias.d.ts +0 -16
- package/dist/types/cli/arguments/index.d.ts +0 -15
- package/dist/types/cli/arguments/normalize.d.ts +0 -12
- package/dist/types/cli/arguments/utils.d.ts +0 -8
- package/dist/types/cli/colors.d.ts +0 -11
- package/dist/types/cli/commands/bundle.d.ts +0 -3
- package/dist/types/cli/commands/help.d.ts +0 -1
- package/dist/types/cli/index.d.ts +0 -1
- package/dist/types/cli/load-config.d.ts +0 -3
- package/dist/types/cli/logger.d.ts +0 -5
- package/dist/types/constants/plugin-context.d.ts +0 -7
- package/dist/types/constants/plugin.d.ts +0 -45
- package/dist/types/experimental-index.d.ts +0 -9
- package/dist/types/index.d.ts +0 -28
- package/dist/types/log/logHandler.d.ts +0 -4
- package/dist/types/log/logger.d.ts +0 -6
- package/dist/types/log/logging.d.ts +0 -11
- package/dist/types/log/logs.d.ts +0 -18
- package/dist/types/options/input-options.d.ts +0 -125
- package/dist/types/options/normalized-input-options.d.ts +0 -18
- package/dist/types/options/normalized-output-options.d.ts +0 -67
- package/dist/types/options/output-options.d.ts +0 -80
- package/dist/types/options/watch-options.d.ts +0 -5
- package/dist/types/parallel-plugin-worker.d.ts +0 -1
- package/dist/types/parallel-plugin.d.ts +0 -1
- package/dist/types/parse-ast-index.d.ts +0 -4
- package/dist/types/plugin/bindingify-build-hooks.d.ts +0 -10
- package/dist/types/plugin/bindingify-hook-filter.d.ts +0 -7
- package/dist/types/plugin/bindingify-output-hooks.d.ts +0 -14
- package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +0 -8
- package/dist/types/plugin/bindingify-plugin.d.ts +0 -15
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +0 -5
- package/dist/types/plugin/hook-filter.d.ts +0 -48
- package/dist/types/plugin/index.d.ts +0 -126
- package/dist/types/plugin/minimal-plugin-context.d.ts +0 -15
- package/dist/types/plugin/parallel-plugin-implementation.d.ts +0 -10
- package/dist/types/plugin/parallel-plugin.d.ts +0 -9
- package/dist/types/plugin/plugin-context-data.d.ts +0 -16
- package/dist/types/plugin/plugin-context.d.ts +0 -52
- package/dist/types/plugin/plugin-driver.d.ts +0 -8
- package/dist/types/plugin/transform-plugin-context.d.ts +0 -17
- package/dist/types/types/assert.d.ts +0 -13
- package/dist/types/types/config-export.d.ts +0 -5
- package/dist/types/types/misc.d.ts +0 -40
- package/dist/types/types/module-info.d.ts +0 -15
- package/dist/types/types/module-side-effects.d.ts +0 -10
- package/dist/types/types/output-bundle.d.ts +0 -4
- package/dist/types/types/rolldown-options.d.ts +0 -5
- package/dist/types/types/rolldown-output.d.ts +0 -63
- package/dist/types/types/schema.d.ts +0 -33
- package/dist/types/types/sourcemap.d.ts +0 -13
- package/dist/types/types/utils.d.ts +0 -13
- package/dist/types/utils/asset-source.d.ts +0 -4
- package/dist/types/utils/async-flatten.d.ts +0 -1
- package/dist/types/utils/bindingify-input-options.d.ts +0 -7
- package/dist/types/utils/bindingify-output-options.d.ts +0 -3
- package/dist/types/utils/code-frame.d.ts +0 -1
- package/dist/types/utils/compose-js-plugins.d.ts +0 -2
- package/dist/types/utils/create-bundler-option.d.ts +0 -11
- package/dist/types/utils/create-bundler.d.ts +0 -8
- package/dist/types/utils/define-config.d.ts +0 -5
- package/dist/types/utils/error.d.ts +0 -2
- package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -19
- package/dist/types/utils/misc.d.ts +0 -6
- package/dist/types/utils/normalize-hook.d.ts +0 -7
- package/dist/types/utils/normalize-plugin-option.d.ts +0 -13
- package/dist/types/utils/normalize-string-or-regex.d.ts +0 -2
- package/dist/types/utils/plugin/index.d.ts +0 -2
- package/dist/types/utils/transform-module-info.d.ts +0 -4
- package/dist/types/utils/transform-rendered-chunk.d.ts +0 -4
- package/dist/types/utils/transform-rendered-module.d.ts +0 -3
- package/dist/types/utils/transform-side-effects.d.ts +0 -3
- package/dist/types/utils/transform-sourcemap.d.ts +0 -3
- package/dist/types/utils/transform-to-rollup-output.d.ts +0 -11
- package/dist/types/utils/validator.d.ts +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { StringFilter } from './hook-filter';
|
|
2
|
-
import type { HookFilterExtension } from '.';
|
|
3
|
-
import type { BindingGeneralHookFilter, BindingTransformHookFilter } from '../binding.d';
|
|
4
|
-
export declare function bindingifyStringFilter(matcher: StringFilter): BindingGeneralHookFilter;
|
|
5
|
-
export declare function bindingifyResolveIdFilter(filterOption?: HookFilterExtension<'resolveId'>['filter']): BindingGeneralHookFilter | undefined;
|
|
6
|
-
export declare function bindingifyLoadFilter(filterOption?: HookFilterExtension<'load'>['filter']): BindingGeneralHookFilter | undefined;
|
|
7
|
-
export declare function bindingifyTransformFilter(filterOption?: HookFilterExtension<'transform'>['filter']): BindingTransformHookFilter | undefined;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
2
|
-
import type { BindingifyPluginArgs } from './bindingify-plugin';
|
|
3
|
-
import type { BindingPluginOptions } from '../binding';
|
|
4
|
-
export declare function bindingifyRenderStart(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderStart']>;
|
|
5
|
-
export declare function bindingifyRenderChunk(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderChunk']>;
|
|
6
|
-
export declare function bindingifyAugmentChunkHash(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['augmentChunkHash']>;
|
|
7
|
-
export declare function bindingifyRenderError(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderError']>;
|
|
8
|
-
export declare function bindingifyGenerateBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['generateBundle']>;
|
|
9
|
-
export declare function bindingifyWriteBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['writeBundle']>;
|
|
10
|
-
export declare function bindingifyCloseBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['closeBundle']>;
|
|
11
|
-
export declare function bindingifyBanner(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['banner']>;
|
|
12
|
-
export declare function bindingifyFooter(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['footer']>;
|
|
13
|
-
export declare function bindingifyIntro(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['intro']>;
|
|
14
|
-
export declare function bindingifyOutro(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['outro']>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ObjectHookMeta } from '.';
|
|
2
|
-
import { BindingPluginHookMeta } from '../binding';
|
|
3
|
-
export declare function bindingifyPluginHookMeta(options: ObjectHookMeta): BindingPluginHookMeta;
|
|
4
|
-
export type PluginHookWithBindingExt<T, F = undefined> = {
|
|
5
|
-
plugin?: T;
|
|
6
|
-
meta?: BindingPluginHookMeta;
|
|
7
|
-
filter?: F;
|
|
8
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { BindingPluginOptions } from '../binding';
|
|
2
|
-
import type { Plugin } from './index';
|
|
3
|
-
import type { OutputOptions } from '../options/output-options';
|
|
4
|
-
import { PluginContextData } from './plugin-context-data';
|
|
5
|
-
import type { LogHandler, LogLevelOption } from '../types/misc';
|
|
6
|
-
import type { InputOptions } from '../options/input-options';
|
|
7
|
-
export interface BindingifyPluginArgs {
|
|
8
|
-
plugin: Plugin;
|
|
9
|
-
options: InputOptions;
|
|
10
|
-
outputOptions: OutputOptions;
|
|
11
|
-
pluginContextData: PluginContextData;
|
|
12
|
-
onLog: LogHandler;
|
|
13
|
-
logLevel: LogLevelOption;
|
|
14
|
-
}
|
|
15
|
-
export declare function bindingifyPlugin(plugin: Plugin, options: InputOptions, outputOptions: OutputOptions, pluginContextData: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption): BindingPluginOptions;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { BindingPluginOptions } from '../binding';
|
|
2
|
-
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
3
|
-
import { BindingifyPluginArgs } from './bindingify-plugin';
|
|
4
|
-
export declare function bindingifyWatchChange(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['watchChange']>;
|
|
5
|
-
export declare function bindingifyCloseWatcher(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['closeWatcher']>;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { MaybeArray } from '../types/utils';
|
|
2
|
-
import type { StringOrRegExp } from '../types/utils';
|
|
3
|
-
import type { ModuleType } from '../index';
|
|
4
|
-
export type StringFilter = MaybeArray<StringOrRegExp> | {
|
|
5
|
-
include?: MaybeArray<StringOrRegExp>;
|
|
6
|
-
exclude?: MaybeArray<StringOrRegExp>;
|
|
7
|
-
};
|
|
8
|
-
interface FormalModuleTypeFilter {
|
|
9
|
-
include?: ModuleType[];
|
|
10
|
-
}
|
|
11
|
-
type ModuleTypeFilter = ModuleType[] | FormalModuleTypeFilter;
|
|
12
|
-
export interface HookFilter {
|
|
13
|
-
/**
|
|
14
|
-
* This filter is used to do a pre-test to determine whether the hook should be called.
|
|
15
|
-
* @example
|
|
16
|
-
* // Filter out all `id`s that contain `node_modules` in the path.
|
|
17
|
-
* ```js
|
|
18
|
-
* { id: 'node_modules' }
|
|
19
|
-
* ```
|
|
20
|
-
* @example
|
|
21
|
-
* // Filter out all `id`s that contain `node_modules` or `src` in the path.
|
|
22
|
-
* ```js
|
|
23
|
-
* { id: ['node_modules', 'src'] }
|
|
24
|
-
* ```
|
|
25
|
-
* @example
|
|
26
|
-
* // Filter out all `id`s that start with `http`
|
|
27
|
-
* ```js
|
|
28
|
-
* { id: /^http/ }
|
|
29
|
-
* ```
|
|
30
|
-
* @example
|
|
31
|
-
* // Exclude all `id`s that contain `node_modules` in the path.
|
|
32
|
-
* ```js
|
|
33
|
-
* { id: { exclude: 'node_modules' } }
|
|
34
|
-
* ```
|
|
35
|
-
* @example
|
|
36
|
-
* // Formal pattern
|
|
37
|
-
* ```
|
|
38
|
-
* { id : {
|
|
39
|
-
* include: ["foo", /bar/],
|
|
40
|
-
* exclude: ["baz", /qux/]
|
|
41
|
-
* }}
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
id?: StringFilter;
|
|
45
|
-
moduleType?: ModuleTypeFilter;
|
|
46
|
-
code?: StringFilter;
|
|
47
|
-
}
|
|
48
|
-
export {};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import type { BindingHookResolveIdExtraArgs, BindingTransformHookExtraArgs } from '../binding';
|
|
2
|
-
import type { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
3
|
-
import type { NullValue, MaybePromise, PartialNull, MakeAsync } from '../types/utils';
|
|
4
|
-
import type { SourceMapInput } from '../types/sourcemap';
|
|
5
|
-
import type { ModuleInfo } from '../types/module-info';
|
|
6
|
-
import type { OutputBundle } from '../types/output-bundle';
|
|
7
|
-
import type { PluginContext } from './plugin-context';
|
|
8
|
-
import type { TransformPluginContext } from './transform-plugin-context';
|
|
9
|
-
import type { NormalizedOutputOptions } from '../options/normalized-output-options';
|
|
10
|
-
import type { LogLevel } from '../log/logging';
|
|
11
|
-
import type { RollupLog } from '../types/misc';
|
|
12
|
-
import type { MinimalPluginContext } from './minimal-plugin-context';
|
|
13
|
-
import type { InputOptions, OutputOptions } from '..';
|
|
14
|
-
import type { BuiltinPlugin } from '../builtin-plugin/constructors';
|
|
15
|
-
import type { ParallelPlugin } from './parallel-plugin';
|
|
16
|
-
import type { DefinedHookNames } from '../constants/plugin';
|
|
17
|
-
import type { DEFINED_HOOK_NAMES } from '../constants/plugin';
|
|
18
|
-
import type { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
|
|
19
|
-
import type { HookFilter } from './hook-filter';
|
|
20
|
-
import { RenderedChunk } from '../types/rolldown-output';
|
|
21
|
-
export type ModuleSideEffects = boolean | 'no-treeshake' | null;
|
|
22
|
-
export type ModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
|
|
23
|
-
export type ImportKind = BindingHookResolveIdExtraArgs['kind'];
|
|
24
|
-
export interface CustomPluginOptions {
|
|
25
|
-
[plugin: string]: any;
|
|
26
|
-
}
|
|
27
|
-
export interface ModuleOptions {
|
|
28
|
-
moduleSideEffects: ModuleSideEffects;
|
|
29
|
-
meta: CustomPluginOptions;
|
|
30
|
-
}
|
|
31
|
-
export interface ResolvedId extends ModuleOptions {
|
|
32
|
-
external: boolean;
|
|
33
|
-
id: string;
|
|
34
|
-
}
|
|
35
|
-
export interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
|
|
36
|
-
external?: boolean;
|
|
37
|
-
id: string;
|
|
38
|
-
}
|
|
39
|
-
export interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
|
|
40
|
-
code: string;
|
|
41
|
-
map?: SourceMapInput;
|
|
42
|
-
moduleType?: ModuleType;
|
|
43
|
-
}
|
|
44
|
-
interface ResolveIdExtraOptions {
|
|
45
|
-
custom?: CustomPluginOptions;
|
|
46
|
-
isEntry: boolean;
|
|
47
|
-
kind: 'import' | 'dynamic-import' | 'require-call';
|
|
48
|
-
}
|
|
49
|
-
export interface PrivateResolveIdExtraOptions extends ResolveIdExtraOptions {
|
|
50
|
-
[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF]?: symbol;
|
|
51
|
-
}
|
|
52
|
-
export type ResolveIdResult = string | NullValue | false | PartialResolvedId;
|
|
53
|
-
export type LoadResult = NullValue | string | SourceDescription;
|
|
54
|
-
export type TransformResult = NullValue | string | Partial<SourceDescription>;
|
|
55
|
-
export interface FunctionPluginHooks {
|
|
56
|
-
[DEFINED_HOOK_NAMES.onLog]: (this: MinimalPluginContext, level: LogLevel, log: RollupLog) => NullValue | boolean;
|
|
57
|
-
[DEFINED_HOOK_NAMES.options]: (this: MinimalPluginContext, options: InputOptions) => NullValue | InputOptions;
|
|
58
|
-
[DEFINED_HOOK_NAMES.outputOptions]: (this: null, options: OutputOptions) => NullValue | OutputOptions;
|
|
59
|
-
[DEFINED_HOOK_NAMES.buildStart]: (this: PluginContext, options: NormalizedInputOptions) => void;
|
|
60
|
-
[DEFINED_HOOK_NAMES.resolveId]: (this: PluginContext, source: string, importer: string | undefined, extraOptions: ResolveIdExtraOptions) => ResolveIdResult;
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated
|
|
63
|
-
* This hook is only for rollup plugin compatibility. Please use `resolveId` instead.
|
|
64
|
-
*/
|
|
65
|
-
[DEFINED_HOOK_NAMES.resolveDynamicImport]: (this: PluginContext, source: string, importer: string | undefined) => ResolveIdResult;
|
|
66
|
-
[DEFINED_HOOK_NAMES.load]: (this: PluginContext, id: string) => MaybePromise<LoadResult>;
|
|
67
|
-
[DEFINED_HOOK_NAMES.transform]: (this: TransformPluginContext, code: string, id: string, meta: BindingTransformHookExtraArgs & {
|
|
68
|
-
moduleType: ModuleType;
|
|
69
|
-
}) => TransformResult;
|
|
70
|
-
[DEFINED_HOOK_NAMES.moduleParsed]: (this: PluginContext, moduleInfo: ModuleInfo) => void;
|
|
71
|
-
[DEFINED_HOOK_NAMES.buildEnd]: (this: PluginContext, err?: Error) => void;
|
|
72
|
-
[DEFINED_HOOK_NAMES.renderStart]: (this: PluginContext, outputOptions: NormalizedOutputOptions, inputOptions: NormalizedInputOptions) => void;
|
|
73
|
-
[DEFINED_HOOK_NAMES.renderChunk]: (this: PluginContext, code: string, chunk: RenderedChunk, outputOptions: NormalizedOutputOptions) => NullValue | string | {
|
|
74
|
-
code: string;
|
|
75
|
-
map?: SourceMapInput;
|
|
76
|
-
};
|
|
77
|
-
[DEFINED_HOOK_NAMES.augmentChunkHash]: (this: PluginContext, chunk: RenderedChunk) => string | void;
|
|
78
|
-
[DEFINED_HOOK_NAMES.renderError]: (this: PluginContext, error: Error) => void;
|
|
79
|
-
[DEFINED_HOOK_NAMES.generateBundle]: (this: PluginContext, outputOptions: NormalizedOutputOptions, bundle: OutputBundle, isWrite: boolean) => void;
|
|
80
|
-
[DEFINED_HOOK_NAMES.writeBundle]: (this: PluginContext, outputOptions: NormalizedOutputOptions, bundle: OutputBundle) => void;
|
|
81
|
-
[DEFINED_HOOK_NAMES.closeBundle]: (this: PluginContext) => void;
|
|
82
|
-
[DEFINED_HOOK_NAMES.watchChange]: (this: PluginContext, id: string, event: {
|
|
83
|
-
event: ChangeEvent;
|
|
84
|
-
}) => void;
|
|
85
|
-
[DEFINED_HOOK_NAMES.closeWatcher]: (this: PluginContext) => void;
|
|
86
|
-
}
|
|
87
|
-
export type ChangeEvent = 'create' | 'update' | 'delete';
|
|
88
|
-
export type PluginOrder = 'pre' | 'post' | null;
|
|
89
|
-
export type ObjectHookMeta = {
|
|
90
|
-
order?: PluginOrder;
|
|
91
|
-
};
|
|
92
|
-
export type ObjectHook<T, O = {}> = T | ({
|
|
93
|
-
handler: T;
|
|
94
|
-
} & ObjectHookMeta & O);
|
|
95
|
-
export type SyncPluginHooks = DefinedHookNames['augmentChunkHash' | 'onLog' | 'outputOptions'];
|
|
96
|
-
export type AsyncPluginHooks = Exclude<keyof FunctionPluginHooks, SyncPluginHooks>;
|
|
97
|
-
export type FirstPluginHooks = DefinedHookNames['load' | 'resolveDynamicImport' | 'resolveId'];
|
|
98
|
-
export type SequentialPluginHooks = DefinedHookNames['augmentChunkHash' | 'generateBundle' | 'onLog' | 'options' | 'outputOptions' | 'renderChunk' | 'transform'];
|
|
99
|
-
export type AddonHooks = DefinedHookNames['banner' | 'footer' | 'intro' | 'outro'];
|
|
100
|
-
export type OutputPluginHooks = DefinedHookNames['augmentChunkHash' | 'generateBundle' | 'outputOptions' | 'renderChunk' | 'renderError' | 'renderStart' | 'writeBundle'];
|
|
101
|
-
export type ParallelPluginHooks = Exclude<keyof FunctionPluginHooks | AddonHooks, FirstPluginHooks | SequentialPluginHooks>;
|
|
102
|
-
export type HookFilterExtension<K extends keyof FunctionPluginHooks> = K extends 'transform' ? {
|
|
103
|
-
filter?: HookFilter;
|
|
104
|
-
} : K extends 'load' | 'resolveId' ? {
|
|
105
|
-
filter?: Pick<HookFilter, 'id'>;
|
|
106
|
-
} : {};
|
|
107
|
-
export type PluginHooks = {
|
|
108
|
-
[K in keyof FunctionPluginHooks]: ObjectHook<K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K], HookFilterExtension<K>>;
|
|
109
|
-
};
|
|
110
|
-
export type AddonHookFunction = (this: PluginContext, chunk: RenderedChunk) => string | Promise<string>;
|
|
111
|
-
export type AddonHook = string | AddonHookFunction;
|
|
112
|
-
export interface OutputPlugin extends Partial<{
|
|
113
|
-
[K in OutputPluginHooks]: PluginHooks[K];
|
|
114
|
-
}>, Partial<{
|
|
115
|
-
[K in AddonHooks]: ObjectHook<AddonHook>;
|
|
116
|
-
}> {
|
|
117
|
-
name: string;
|
|
118
|
-
}
|
|
119
|
-
export interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> {
|
|
120
|
-
api?: A;
|
|
121
|
-
}
|
|
122
|
-
export type RolldownPlugin<A = any> = Plugin<A> | BuiltinPlugin | ParallelPlugin;
|
|
123
|
-
export type RolldownPluginOption<A = any> = MaybePromise<NullValue<RolldownPlugin<A>> | false | RolldownPluginOption[]>;
|
|
124
|
-
export type RolldownOutputPlugin = OutputPlugin | BuiltinPlugin;
|
|
125
|
-
export type RolldownOutputPluginOption = MaybePromise<NullValue<RolldownOutputPlugin> | false | RolldownOutputPluginOption[]>;
|
|
126
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { LoggingFunction, LogHandler, LogLevelOption, RollupError } from '../types/misc';
|
|
2
|
-
export interface PluginContextMeta {
|
|
3
|
-
rollupVersion: string;
|
|
4
|
-
rolldownVersion: string;
|
|
5
|
-
watchMode: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare class MinimalPluginContext {
|
|
8
|
-
readonly pluginName: string;
|
|
9
|
-
info: LoggingFunction;
|
|
10
|
-
warn: LoggingFunction;
|
|
11
|
-
debug: LoggingFunction;
|
|
12
|
-
meta: PluginContextMeta;
|
|
13
|
-
constructor(onLog: LogHandler, logLevel: LogLevelOption, pluginName: string);
|
|
14
|
-
error(e: RollupError | string): never;
|
|
15
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { MaybePromise } from '../types/utils';
|
|
2
|
-
import type { Plugin } from './index';
|
|
3
|
-
export type ParallelPluginImplementation = Plugin;
|
|
4
|
-
export type Context = {
|
|
5
|
-
/**
|
|
6
|
-
* Thread number
|
|
7
|
-
*/
|
|
8
|
-
threadNumber: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function defineParallelPluginImplementation<Options>(plugin: (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>): (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type ParallelPlugin = {
|
|
2
|
-
/** @internal */
|
|
3
|
-
_parallel: {
|
|
4
|
-
fileUrl: string;
|
|
5
|
-
options: unknown;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
export type DefineParallelPluginResult<Options> = (options: Options) => ParallelPlugin;
|
|
9
|
-
export declare function defineParallelPlugin<Options>(pluginPath: string): DefineParallelPluginResult<Options>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BindingPluginContext } from '../binding';
|
|
2
|
-
import { ModuleOptions } from '..';
|
|
3
|
-
import { PluginContextResolveOptions } from './plugin-context';
|
|
4
|
-
import type { ModuleInfo } from '../types/module-info';
|
|
5
|
-
export declare class PluginContextData {
|
|
6
|
-
moduleOptionMap: Map<string, ModuleOptions>;
|
|
7
|
-
resolveOptionsMap: Map<number, PluginContextResolveOptions>;
|
|
8
|
-
loadModulePromiseMap: Map<string, Promise<void>>;
|
|
9
|
-
updateModuleOption(id: string, option: ModuleOptions): void;
|
|
10
|
-
getModuleOption(id: string): ModuleOptions;
|
|
11
|
-
getModuleInfo(id: string, context: BindingPluginContext): ModuleInfo | null;
|
|
12
|
-
getModuleIds(context: BindingPluginContext): ArrayIterator<string>;
|
|
13
|
-
saveResolveOptions(options: PluginContextResolveOptions): number;
|
|
14
|
-
getSavedResolveOptions(receipt: number): PluginContextResolveOptions | undefined;
|
|
15
|
-
removeSavedResolveOptions(receipt: number): void;
|
|
16
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { BindingPluginContext } from '../binding';
|
|
2
|
-
import type { CustomPluginOptions, ModuleOptions, Plugin, ResolvedId } from './index';
|
|
3
|
-
import { MinimalPluginContext } from '../plugin/minimal-plugin-context';
|
|
4
|
-
import { AssetSource } from '../utils/asset-source';
|
|
5
|
-
import { ModuleInfo } from '../types/module-info';
|
|
6
|
-
import { PluginContextData } from './plugin-context-data';
|
|
7
|
-
import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
|
|
8
|
-
import { PartialNull } from '../types/utils';
|
|
9
|
-
import type { LogHandler, LogLevelOption } from '../types/misc';
|
|
10
|
-
export interface EmittedAsset {
|
|
11
|
-
type: 'asset';
|
|
12
|
-
name?: string;
|
|
13
|
-
fileName?: string;
|
|
14
|
-
originalFileName?: string | null;
|
|
15
|
-
source: AssetSource;
|
|
16
|
-
}
|
|
17
|
-
export interface EmittedChunk {
|
|
18
|
-
type: 'chunk';
|
|
19
|
-
name?: string;
|
|
20
|
-
fileName?: string;
|
|
21
|
-
id: string;
|
|
22
|
-
importer?: string;
|
|
23
|
-
}
|
|
24
|
-
export type EmittedFile = EmittedAsset;
|
|
25
|
-
export interface PluginContextResolveOptions {
|
|
26
|
-
skipSelf?: boolean;
|
|
27
|
-
custom?: CustomPluginOptions;
|
|
28
|
-
}
|
|
29
|
-
export interface PrivatePluginContextResolveOptions extends PluginContextResolveOptions {
|
|
30
|
-
[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF]?: symbol;
|
|
31
|
-
}
|
|
32
|
-
export declare class PluginContext extends MinimalPluginContext {
|
|
33
|
-
private context;
|
|
34
|
-
private data;
|
|
35
|
-
private onLog;
|
|
36
|
-
private currentLoadingModule?;
|
|
37
|
-
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption, currentLoadingModule?: string | undefined);
|
|
38
|
-
load(options: {
|
|
39
|
-
id: string;
|
|
40
|
-
resolveDependencies?: boolean;
|
|
41
|
-
} & Partial<PartialNull<ModuleOptions>>): Promise<ModuleInfo>;
|
|
42
|
-
resolve(source: string, importer?: string, options?: PluginContextResolveOptions): Promise<ResolvedId | null>;
|
|
43
|
-
emitFile(file: EmittedAsset | EmittedChunk): string;
|
|
44
|
-
getFileName(referenceId: string): string;
|
|
45
|
-
getModuleInfo(id: string): ModuleInfo | null;
|
|
46
|
-
getModuleIds(): IterableIterator<string>;
|
|
47
|
-
addWatchFile(id: string): void;
|
|
48
|
-
/**
|
|
49
|
-
* @deprecated This rollup API won't be supported by rolldown. Using this API will cause runtime error.
|
|
50
|
-
*/
|
|
51
|
-
parse(_input: string, _options?: any): any;
|
|
52
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Plugin } from './';
|
|
2
|
-
import { InputOptions, OutputOptions, RolldownPlugin } from '..';
|
|
3
|
-
export declare class PluginDriver {
|
|
4
|
-
static callOptionsHook(inputOptions: InputOptions): Promise<InputOptions>;
|
|
5
|
-
static callOutputOptionsHook(rawPlugins: RolldownPlugin[], outputOptions: OutputOptions): OutputOptions;
|
|
6
|
-
}
|
|
7
|
-
export declare function getObjectPlugins(plugins: RolldownPlugin[]): Plugin[];
|
|
8
|
-
export declare function getSortedPlugins(hookName: 'options' | 'outputOptions' | 'onLog', plugins: readonly Plugin[]): Plugin[];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { BindingPluginContext, BindingTransformPluginContext } from '../binding';
|
|
2
|
-
import type { LogHandler, LogLevelOption, RollupError } from '../types/misc';
|
|
3
|
-
import { PluginContext } from './plugin-context';
|
|
4
|
-
import { PluginContextData } from './plugin-context-data';
|
|
5
|
-
import type { Plugin } from './index';
|
|
6
|
-
import { SourceMap } from '../types/rolldown-output';
|
|
7
|
-
export declare class TransformPluginContext extends PluginContext {
|
|
8
|
-
private inner;
|
|
9
|
-
private moduleId;
|
|
10
|
-
private moduleSource;
|
|
11
|
-
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, inner: BindingTransformPluginContext, moduleId: string, moduleSource: string, onLog: LogHandler, LogLevelOption: LogLevelOption);
|
|
12
|
-
error(e: RollupError | string, pos?: number | {
|
|
13
|
-
column: number;
|
|
14
|
-
line: number;
|
|
15
|
-
}): never;
|
|
16
|
-
getCombinedSourcemap(): SourceMap;
|
|
17
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IsEqual } from 'type-fest';
|
|
2
|
-
export type TypeAssert<T extends true> = T;
|
|
3
|
-
export type HasProperty<T, K extends string> = K extends keyof T ? true : false;
|
|
4
|
-
export type IsPropertyEqual<A, B, Key extends keyof A & keyof B> = IsEqual<A[Key], B[Key]>;
|
|
5
|
-
type IsValuesOfObjectAllTrue<T> = {
|
|
6
|
-
[K in keyof T]: T[K] extends true ? true : false;
|
|
7
|
-
}[keyof T] extends true ? true : false;
|
|
8
|
-
export type ShowPropertiesEqualStatus<A, B> = {
|
|
9
|
-
[K in keyof A]: K extends keyof B ? IsEqual<A[K], B[K]> : true;
|
|
10
|
-
};
|
|
11
|
-
export type IsPropertiesEqual<A, B> = IsValuesOfObjectAllTrue<ShowPropertiesEqualStatus<A, B>>;
|
|
12
|
-
export type AssertNever<T extends never> = T;
|
|
13
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export interface RollupLog {
|
|
2
|
-
binding?: string;
|
|
3
|
-
cause?: unknown;
|
|
4
|
-
code?: string;
|
|
5
|
-
exporter?: string;
|
|
6
|
-
frame?: string;
|
|
7
|
-
hook?: string;
|
|
8
|
-
id?: string;
|
|
9
|
-
ids?: string[];
|
|
10
|
-
loc?: {
|
|
11
|
-
column: number;
|
|
12
|
-
file?: string;
|
|
13
|
-
line: number;
|
|
14
|
-
};
|
|
15
|
-
message: string;
|
|
16
|
-
meta?: any;
|
|
17
|
-
names?: string[];
|
|
18
|
-
plugin?: string;
|
|
19
|
-
pluginCode?: unknown;
|
|
20
|
-
pos?: number;
|
|
21
|
-
reexporter?: string;
|
|
22
|
-
stack?: string;
|
|
23
|
-
url?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface RollupError extends RollupLog {
|
|
26
|
-
name?: string;
|
|
27
|
-
stack?: string;
|
|
28
|
-
watchFiles?: string[];
|
|
29
|
-
}
|
|
30
|
-
export type LogLevel = 'warn' | 'info' | 'debug';
|
|
31
|
-
export type LogLevelOption = LogLevel | 'silent';
|
|
32
|
-
export type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
|
|
33
|
-
export type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
|
|
34
|
-
column: number;
|
|
35
|
-
line: number;
|
|
36
|
-
}) => void;
|
|
37
|
-
export type LogHandler = (level: LogLevel, log: RollupLog) => void;
|
|
38
|
-
export type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
39
|
-
export type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
40
|
-
export type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ModuleOptions } from '..';
|
|
2
|
-
export interface ModuleInfo extends ModuleOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Unsupported at rolldown
|
|
5
|
-
*/
|
|
6
|
-
ast: any;
|
|
7
|
-
code: string | null;
|
|
8
|
-
id: string;
|
|
9
|
-
importers: string[];
|
|
10
|
-
dynamicImporters: string[];
|
|
11
|
-
importedIds: string[];
|
|
12
|
-
dynamicallyImportedIds: string[];
|
|
13
|
-
exports: string[];
|
|
14
|
-
isEntry: boolean;
|
|
15
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface ModuleSideEffectsRule {
|
|
2
|
-
test?: RegExp;
|
|
3
|
-
external?: boolean;
|
|
4
|
-
sideEffects: boolean;
|
|
5
|
-
}
|
|
6
|
-
export type ModuleSideEffectsOption = boolean | ModuleSideEffectsRule[] | ((id: string, isResolved: boolean) => boolean | undefined) | 'no-external';
|
|
7
|
-
export type TreeshakingOptions = {
|
|
8
|
-
moduleSideEffects?: ModuleSideEffectsOption;
|
|
9
|
-
annotations?: boolean;
|
|
10
|
-
} | boolean;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { AssetSource } from '../utils/asset-source';
|
|
2
|
-
import type { RenderedChunk as BindingRenderedChunk } from '../binding';
|
|
3
|
-
export interface OutputAsset {
|
|
4
|
-
type: 'asset';
|
|
5
|
-
fileName: string;
|
|
6
|
-
/** @deprecated Use "originalFileNames" instead. */
|
|
7
|
-
originalFileName: string | null;
|
|
8
|
-
originalFileNames: string[];
|
|
9
|
-
source: AssetSource;
|
|
10
|
-
/** @deprecated Use "names" instead. */
|
|
11
|
-
name: string | undefined;
|
|
12
|
-
names: string[];
|
|
13
|
-
}
|
|
14
|
-
export interface SourceMap {
|
|
15
|
-
file: string;
|
|
16
|
-
mappings: string;
|
|
17
|
-
names: string[];
|
|
18
|
-
sources: string[];
|
|
19
|
-
sourcesContent: string[];
|
|
20
|
-
version: number;
|
|
21
|
-
toString(): string;
|
|
22
|
-
toUrl(): string;
|
|
23
|
-
}
|
|
24
|
-
export interface RenderedModule {
|
|
25
|
-
readonly code: string | null;
|
|
26
|
-
renderedLength: number;
|
|
27
|
-
}
|
|
28
|
-
export interface RenderedChunk extends Omit<BindingRenderedChunk, 'modules'> {
|
|
29
|
-
modules: {
|
|
30
|
-
[id: string]: RenderedModule;
|
|
31
|
-
};
|
|
32
|
-
name: string;
|
|
33
|
-
isEntry: boolean;
|
|
34
|
-
isDynamicEntry: boolean;
|
|
35
|
-
facadeModuleId: string | null;
|
|
36
|
-
moduleIds: Array<string>;
|
|
37
|
-
exports: Array<string>;
|
|
38
|
-
fileName: string;
|
|
39
|
-
imports: Array<string>;
|
|
40
|
-
dynamicImports: Array<string>;
|
|
41
|
-
}
|
|
42
|
-
export interface OutputChunk {
|
|
43
|
-
type: 'chunk';
|
|
44
|
-
code: string;
|
|
45
|
-
name: string;
|
|
46
|
-
isEntry: boolean;
|
|
47
|
-
exports: string[];
|
|
48
|
-
fileName: string;
|
|
49
|
-
modules: {
|
|
50
|
-
[id: string]: RenderedModule;
|
|
51
|
-
};
|
|
52
|
-
imports: string[];
|
|
53
|
-
dynamicImports: string[];
|
|
54
|
-
facadeModuleId: string | null;
|
|
55
|
-
isDynamicEntry: boolean;
|
|
56
|
-
moduleIds: string[];
|
|
57
|
-
map: SourceMap | null;
|
|
58
|
-
sourcemapFileName: string | null;
|
|
59
|
-
preliminaryFileName: string;
|
|
60
|
-
}
|
|
61
|
-
export interface RolldownOutput {
|
|
62
|
-
output: [OutputChunk, ...(OutputChunk | OutputAsset)[]];
|
|
63
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface JsonSchema {
|
|
2
|
-
type: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface ObjectSchema extends JsonSchema {
|
|
6
|
-
type: 'object';
|
|
7
|
-
properties: Record<string, Schema>;
|
|
8
|
-
required?: string[];
|
|
9
|
-
additionalProperties?: boolean | {
|
|
10
|
-
type: 'string';
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export interface ArraySchema extends JsonSchema {
|
|
14
|
-
type: 'array';
|
|
15
|
-
items: Schema;
|
|
16
|
-
}
|
|
17
|
-
export interface StringConstantSchema extends JsonSchema {
|
|
18
|
-
type: 'string';
|
|
19
|
-
const: string;
|
|
20
|
-
}
|
|
21
|
-
export interface StringEnumSchema extends JsonSchema {
|
|
22
|
-
type: 'string';
|
|
23
|
-
enum: string[];
|
|
24
|
-
}
|
|
25
|
-
export interface BooleanSchema extends JsonSchema {
|
|
26
|
-
type: 'boolean';
|
|
27
|
-
}
|
|
28
|
-
export type StringSchema = StringConstantSchema | StringEnumSchema;
|
|
29
|
-
export interface AnyOfSchema {
|
|
30
|
-
anyOf: (StringSchema | ObjectSchema | BooleanSchema | ArraySchema)[];
|
|
31
|
-
description?: string;
|
|
32
|
-
}
|
|
33
|
-
export type Schema = StringSchema | ObjectSchema | ArraySchema | BooleanSchema | AnyOfSchema | JsonSchema;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BindingSourcemap } from '../binding';
|
|
2
|
-
export interface ExistingRawSourceMap {
|
|
3
|
-
file?: string | null;
|
|
4
|
-
mappings: string;
|
|
5
|
-
names?: string[];
|
|
6
|
-
sources?: (string | null)[];
|
|
7
|
-
sourcesContent?: (string | null)[];
|
|
8
|
-
sourceRoot?: string;
|
|
9
|
-
version?: number;
|
|
10
|
-
x_google_ignoreList?: number[];
|
|
11
|
-
}
|
|
12
|
-
export type SourceMapInput = ExistingRawSourceMap | string | null;
|
|
13
|
-
export declare function bindingifySourcemap(map?: SourceMapInput): undefined | BindingSourcemap;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type MaybePromise<T> = T | Promise<T>;
|
|
2
|
-
export interface AnyFn {
|
|
3
|
-
(...args: any[]): any;
|
|
4
|
-
}
|
|
5
|
-
export interface AnyObj {
|
|
6
|
-
}
|
|
7
|
-
export type NullValue<T = void> = T | undefined | null | void;
|
|
8
|
-
export type PartialNull<T> = {
|
|
9
|
-
[P in keyof T]: T[P] | null;
|
|
10
|
-
};
|
|
11
|
-
export type MakeAsync<Function_> = Function_ extends (this: infer This, ...parameters: infer Arguments) => infer Return ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
|
|
12
|
-
export type MaybeArray<T> = T | T[];
|
|
13
|
-
export type StringOrRegExp = string | RegExp;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { BindingAssetSource } from '../binding';
|
|
2
|
-
export type AssetSource = string | Uint8Array;
|
|
3
|
-
export declare function transformAssetSource(bindingAssetSource: BindingAssetSource): AssetSource;
|
|
4
|
-
export declare function bindingAssetSource(source: AssetSource): BindingAssetSource;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function asyncFlatten<T>(array: T[]): Promise<T[]>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { RolldownPlugin } from '../plugin';
|
|
2
|
-
import type { InputOptions } from '../options/input-options';
|
|
3
|
-
import type { OutputOptions } from '../options/output-options';
|
|
4
|
-
import type { BindingInputOptions } from '../binding';
|
|
5
|
-
import { LogHandler } from '../types/misc';
|
|
6
|
-
import { LogLevelOption } from '../log/logging';
|
|
7
|
-
export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: InputOptions, outputOptions: OutputOptions, onLog: LogHandler, logLevel: LogLevelOption): BindingInputOptions;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getCodeFrame(source: string, line: number, column: number): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BindingBundlerOptions } from '../binding';
|
|
2
|
-
import { LogHandler } from '../types/misc';
|
|
3
|
-
import type { InputOptions } from '../options/input-options';
|
|
4
|
-
import type { OutputOptions } from '../options/output-options';
|
|
5
|
-
export declare function createBundlerOptions(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<BundlerOptionWithStopWorker>;
|
|
6
|
-
export interface BundlerOptionWithStopWorker {
|
|
7
|
-
bundlerOptions: BindingBundlerOptions;
|
|
8
|
-
inputOptions: InputOptions;
|
|
9
|
-
onLog: LogHandler;
|
|
10
|
-
stopWorkers?: () => Promise<void>;
|
|
11
|
-
}
|