@ohos-ports/rspack-core 1.1.8-beta.1
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/LICENSE +22 -0
- package/README.md +25 -0
- package/compiled/@swc/types/index.d.ts +1962 -0
- package/compiled/@swc/types/index.js +19 -0
- package/compiled/@swc/types/license +201 -0
- package/compiled/@swc/types/package.json +1 -0
- package/compiled/browserslist/index.d.ts +1 -0
- package/compiled/browserslist/index.js +2053 -0
- package/compiled/browserslist/license +20 -0
- package/compiled/browserslist/package.json +1 -0
- package/compiled/enhanced-resolve/CachedInputFileSystem.js +664 -0
- package/compiled/enhanced-resolve/index.d.ts +1123 -0
- package/compiled/enhanced-resolve/license +20 -0
- package/compiled/enhanced-resolve/package.json +1 -0
- package/compiled/graceful-fs/index.d.ts +13 -0
- package/compiled/graceful-fs/index.js +1063 -0
- package/compiled/graceful-fs/license +15 -0
- package/compiled/graceful-fs/package.json +1 -0
- package/compiled/watchpack/index.d.ts +216 -0
- package/compiled/watchpack/index.js +2075 -0
- package/compiled/watchpack/license +20 -0
- package/compiled/watchpack/package.json +1 -0
- package/compiled/webpack-sources/index.d.ts +130 -0
- package/compiled/webpack-sources/index.js +3520 -0
- package/compiled/webpack-sources/license +21 -0
- package/compiled/webpack-sources/package.json +1 -0
- package/compiled/zod/index.d.ts +1733 -0
- package/compiled/zod/index.js +4405 -0
- package/compiled/zod/license +21 -0
- package/compiled/zod/package.json +1 -0
- package/dist/Chunk.d.ts +40 -0
- package/dist/ChunkGraph.d.ts +12 -0
- package/dist/ChunkGroup.d.ts +26 -0
- package/dist/Compilation.d.ts +421 -0
- package/dist/Compiler.d.ts +154 -0
- package/dist/ContextModuleFactory.d.ts +13 -0
- package/dist/DependenciesBlock.d.ts +10 -0
- package/dist/Dependency.d.ts +11 -0
- package/dist/Entrypoint.d.ts +8 -0
- package/dist/ErrorHelpers.d.ts +16 -0
- package/dist/ExecuteModulePlugin.d.ts +4 -0
- package/dist/FileSystem.d.ts +29 -0
- package/dist/FileSystemInfo.d.ts +5 -0
- package/dist/Module.d.ts +93 -0
- package/dist/ModuleGraph.d.ts +10 -0
- package/dist/ModuleTypeConstants.d.ts +93 -0
- package/dist/MultiCompiler.d.ts +68 -0
- package/dist/MultiStats.d.ts +22 -0
- package/dist/MultiWatching.d.ts +26 -0
- package/dist/NormalModule.d.ts +12 -0
- package/dist/NormalModuleFactory.d.ts +20 -0
- package/dist/Resolver.d.ts +16 -0
- package/dist/ResolverFactory.d.ts +14 -0
- package/dist/RspackError.d.ts +8 -0
- package/dist/RuleSetCompiler.d.ts +9 -0
- package/dist/RuntimeGlobals.d.ts +324 -0
- package/dist/RuntimeModule.d.ts +32 -0
- package/dist/Stats.d.ts +17 -0
- package/dist/Template.d.ts +77 -0
- package/dist/Watching.d.ts +35 -0
- package/dist/builtin-loader/index.d.ts +1 -0
- package/dist/builtin-loader/lightningcss/index.d.ts +95 -0
- package/dist/builtin-loader/swc/index.d.ts +3 -0
- package/dist/builtin-loader/swc/pluginImport.d.ts +33 -0
- package/dist/builtin-loader/swc/types.d.ts +19 -0
- package/dist/builtin-plugin/APIPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +10 -0
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/BannerPlugin.d.ts +40 -0
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +15 -0
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +10 -0
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +10 -0
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +15 -0
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/DataUriPlugin.d.ts +10 -0
- package/dist/builtin-plugin/DefinePlugin.d.ts +17 -0
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +8 -0
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +13 -0
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +11 -0
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +12 -0
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +10 -0
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +10 -0
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +11 -0
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +10 -0
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/EntryPlugin.d.ts +27 -0
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +11 -0
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FileUriPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +10 -0
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +7 -0
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +112 -0
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +10 -0
- package/dist/builtin-plugin/IgnorePlugin.d.ts +19 -0
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +15 -0
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +11 -0
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +18 -0
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +33 -0
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +15 -0
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +8 -0
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +8 -0
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ProgressPlugin.d.ts +11 -0
- package/dist/builtin-plugin/ProvidePlugin.d.ts +11 -0
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +11 -0
- package/dist/builtin-plugin/RuntimePlugin.d.ts +10 -0
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +10 -0
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +20 -0
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +11 -0
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +11 -0
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +213 -0
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +10 -0
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +7 -0
- package/dist/builtin-plugin/WorkerPlugin.d.ts +13 -0
- package/dist/builtin-plugin/base.d.ts +22 -0
- package/dist/builtin-plugin/css-extract/index.d.ts +23 -0
- package/dist/builtin-plugin/css-extract/loader.d.ts +21 -0
- package/dist/builtin-plugin/css-extract/utils.d.ts +6 -0
- package/dist/builtin-plugin/index.d.ts +71 -0
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +46 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +24 -0
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +13 -0
- package/dist/config/adapter.d.ts +10 -0
- package/dist/config/adapterRuleUse.d.ts +157 -0
- package/dist/config/browserslistTargetHandler.d.ts +21 -0
- package/dist/config/defaults.d.ts +12 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/normalization.d.ts +128 -0
- package/dist/config/target.d.ts +89 -0
- package/dist/config/types.d.ts +2136 -0
- package/dist/config/utils.d.ts +16 -0
- package/dist/config/zod.d.ts +4090 -0
- package/dist/container/ContainerPlugin.d.ts +40 -0
- package/dist/container/ContainerReferencePlugin.d.ts +33 -0
- package/dist/container/ModuleFederationPlugin.d.ts +13 -0
- package/dist/container/ModuleFederationPluginV1.d.ts +22 -0
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +10 -0
- package/dist/container/options.d.ts +3 -0
- package/dist/cssExtractHmr.js +224 -0
- package/dist/cssExtractLoader.js +278 -0
- package/dist/error/ConcurrentCompilationError.d.ts +14 -0
- package/dist/exports.d.ts +167 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +20251 -0
- package/dist/lib/AbstractMethodError.d.ts +24 -0
- package/dist/lib/Cache.d.ts +65 -0
- package/dist/lib/CacheFacade.d.ts +167 -0
- package/dist/lib/DllPlugin.d.ts +42 -0
- package/dist/lib/DllReferencePlugin.d.ts +119 -0
- package/dist/lib/EntryOptionPlugin.d.ts +33 -0
- package/dist/lib/EnvironmentPlugin.d.ts +22 -0
- package/dist/lib/HookWebpackError.d.ts +40 -0
- package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
- package/dist/lib/LoaderOptionsPlugin.d.ts +28 -0
- package/dist/lib/LoaderTargetPlugin.d.ts +24 -0
- package/dist/lib/ModuleFilenameHelpers.d.ts +53 -0
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +29 -0
- package/dist/lib/WebpackError.d.ts +23 -0
- package/dist/lib/cache/MemoryCachePlugin.d.ts +5 -0
- package/dist/lib/cache/getLazyHashedEtag.d.ts +35 -0
- package/dist/lib/cache/mergeEtags.d.ts +17 -0
- package/dist/loader-runner/LoaderLoadingError.d.ts +13 -0
- package/dist/loader-runner/index.d.ts +40 -0
- package/dist/loader-runner/loadLoader.d.ts +11 -0
- package/dist/logging/Logger.d.ts +61 -0
- package/dist/logging/createConsoleLogger.d.ts +35 -0
- package/dist/logging/truncateArgs.d.ts +16 -0
- package/dist/moduleFederationDefaultRuntime.js +1 -0
- package/dist/node/NodeEnvironmentPlugin.d.ts +10 -0
- package/dist/node/NodeTemplatePlugin.d.ts +18 -0
- package/dist/node/NodeWatchFileSystem.d.ts +18 -0
- package/dist/node/nodeConsole.d.ts +15 -0
- package/dist/rspack.d.ts +16 -0
- package/dist/rspackOptionsApply.d.ts +4 -0
- package/dist/runtime/cssExtractHmr.d.ts +4 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +41 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +34 -0
- package/dist/sharing/SharePlugin.d.ts +51 -0
- package/dist/sharing/ShareRuntimePlugin.d.ts +9 -0
- package/dist/sharing/utils.d.ts +1 -0
- package/dist/stats/DefaultStatsFactoryPlugin.d.ts +4 -0
- package/dist/stats/DefaultStatsPresetPlugin.d.ts +4 -0
- package/dist/stats/DefaultStatsPrinterPlugin.d.ts +13 -0
- package/dist/stats/StatsFactory.d.ts +57 -0
- package/dist/stats/StatsPrinter.d.ts +57 -0
- package/dist/stats/statsFactoryUtils.d.ts +295 -0
- package/dist/util/ArrayQueue.d.ts +45 -0
- package/dist/util/AssetInfo.d.ts +7 -0
- package/dist/util/MergeCaller.d.ts +9 -0
- package/dist/util/SizeFormatHelpers.d.ts +10 -0
- package/dist/util/SplitChunkSize.d.ts +5 -0
- package/dist/util/assertNotNil.d.ts +1 -0
- package/dist/util/assetCondition.d.ts +2 -0
- package/dist/util/asyncLib.d.ts +54 -0
- package/dist/util/bindingVersionCheck.d.ts +5 -0
- package/dist/util/cleverMerge.d.ts +54 -0
- package/dist/util/comparators.d.ts +20 -0
- package/dist/util/createHash.d.ts +16 -0
- package/dist/util/createReadonlyMap.d.ts +1 -0
- package/dist/util/fake.d.ts +9 -0
- package/dist/util/fs.d.ts +342 -0
- package/dist/util/hash/BatchedHash.d.ts +29 -0
- package/dist/util/hash/index.d.ts +17 -0
- package/dist/util/hash/md4.d.ts +11 -0
- package/dist/util/hash/wasm-hash.d.ts +52 -0
- package/dist/util/hash/xxhash64.d.ts +11 -0
- package/dist/util/identifier.d.ts +79 -0
- package/dist/util/index.d.ts +19 -0
- package/dist/util/memoize.d.ts +3 -0
- package/dist/util/smartGrouping.d.ts +21 -0
- package/dist/util/source.d.ts +7 -0
- package/dist/util/validate.d.ts +6 -0
- package/hot/dev-server.js +75 -0
- package/hot/emitter.js +21 -0
- package/hot/lazy-compilation-node.js +50 -0
- package/hot/lazy-compilation-web.js +83 -0
- package/hot/log-apply-result.js +49 -0
- package/hot/log.js +79 -0
- package/hot/only-dev-server.js +103 -0
- package/hot/poll.js +40 -0
- package/hot/signal.js +66 -0
- package/module.d.ts +244 -0
- package/package.json +55 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HookMap, SyncBailHook, SyncWaterfallHook } from "@rspack/lite-tapable";
|
|
2
|
+
import type { StatsAsset, StatsChunk, StatsChunkGroup, StatsCompilation, StatsModule, StatsModuleReason } from "./statsFactoryUtils";
|
|
3
|
+
type PrintedElement = {
|
|
4
|
+
element: string;
|
|
5
|
+
content: string;
|
|
6
|
+
};
|
|
7
|
+
type KnownStatsPrinterContext = {
|
|
8
|
+
type?: string;
|
|
9
|
+
compilation?: StatsCompilation;
|
|
10
|
+
chunkGroup?: StatsChunkGroup;
|
|
11
|
+
asset?: StatsAsset;
|
|
12
|
+
module?: StatsModule;
|
|
13
|
+
chunk?: StatsChunk;
|
|
14
|
+
moduleReason?: StatsModuleReason;
|
|
15
|
+
bold?: (str: string) => string;
|
|
16
|
+
yellow?: (str: string) => string;
|
|
17
|
+
red?: (str: string) => string;
|
|
18
|
+
green?: (str: string) => string;
|
|
19
|
+
magenta?: (str: string) => string;
|
|
20
|
+
cyan?: (str: string) => string;
|
|
21
|
+
formatFilename?: (file: string, oversize?: boolean) => string;
|
|
22
|
+
formatModuleId?: (id: string) => string;
|
|
23
|
+
formatChunkId?: ((id: string, direction?: "parent" | "child" | "sibling") => string) | undefined;
|
|
24
|
+
formatSize?: (size: number) => string;
|
|
25
|
+
formatDateTime?: (dateTime: number) => string;
|
|
26
|
+
formatFlag?: (flag: string) => string;
|
|
27
|
+
formatTime?: (time: number, boldQuantity?: boolean) => string;
|
|
28
|
+
chunkGroupKind?: string;
|
|
29
|
+
};
|
|
30
|
+
export type StatsPrinterContext = KnownStatsPrinterContext & Record<string, any>;
|
|
31
|
+
export declare class StatsPrinter {
|
|
32
|
+
private _levelHookCache;
|
|
33
|
+
private _inPrint;
|
|
34
|
+
hooks: Readonly<{
|
|
35
|
+
sortElements: HookMap<SyncBailHook<[string[], StatsPrinterContext], true | void>>;
|
|
36
|
+
printElements: HookMap<SyncBailHook<[PrintedElement[], StatsPrinterContext], string>>;
|
|
37
|
+
sortItems: HookMap<SyncBailHook<[any[], StatsPrinterContext], true>>;
|
|
38
|
+
getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string>>;
|
|
39
|
+
printItems: HookMap<SyncBailHook<[string[], StatsPrinterContext], string>>;
|
|
40
|
+
print: HookMap<SyncBailHook<[{}, StatsPrinterContext], string>>;
|
|
41
|
+
result: HookMap<SyncWaterfallHook<[string, StatsPrinterContext]>>;
|
|
42
|
+
}>;
|
|
43
|
+
constructor();
|
|
44
|
+
/**
|
|
45
|
+
* get all level hooks
|
|
46
|
+
*/
|
|
47
|
+
private _getAllLevelHooks;
|
|
48
|
+
private _forEachLevel;
|
|
49
|
+
private _forEachLevelWaterfall;
|
|
50
|
+
print(type: string, object: {
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
}, baseContext?: {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
}): string;
|
|
55
|
+
private _print;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import type * as binding from "@rspack/binding";
|
|
2
|
+
import type { JsOriginRecord } from "@rspack/binding";
|
|
3
|
+
import type { Compilation } from "../Compilation";
|
|
4
|
+
import type { StatsOptions } from "../config";
|
|
5
|
+
import { type Comparator } from "../util/comparators";
|
|
6
|
+
import type { StatsFactory, StatsFactoryContext } from "./StatsFactory";
|
|
7
|
+
export type KnownStatsChunkGroup = {
|
|
8
|
+
name?: string;
|
|
9
|
+
chunks?: (string | number)[];
|
|
10
|
+
assets?: {
|
|
11
|
+
name: string;
|
|
12
|
+
size?: number;
|
|
13
|
+
}[];
|
|
14
|
+
filteredAssets?: number;
|
|
15
|
+
assetsSize?: number;
|
|
16
|
+
auxiliaryAssets?: {
|
|
17
|
+
name: string;
|
|
18
|
+
size?: number;
|
|
19
|
+
}[];
|
|
20
|
+
filteredAuxiliaryAssets?: number;
|
|
21
|
+
auxiliaryAssetsSize?: number;
|
|
22
|
+
children?: {
|
|
23
|
+
preload?: StatsChunkGroup[];
|
|
24
|
+
prefetch?: StatsChunkGroup[];
|
|
25
|
+
};
|
|
26
|
+
childAssets?: {
|
|
27
|
+
preload?: string[];
|
|
28
|
+
prefetch?: string[];
|
|
29
|
+
};
|
|
30
|
+
isOverSizeLimit?: boolean;
|
|
31
|
+
};
|
|
32
|
+
export type KnownStatsChunk = {
|
|
33
|
+
type: string;
|
|
34
|
+
rendered: boolean;
|
|
35
|
+
initial: boolean;
|
|
36
|
+
entry: boolean;
|
|
37
|
+
reason?: string;
|
|
38
|
+
size: number;
|
|
39
|
+
sizes?: Record<string, number>;
|
|
40
|
+
names?: string[];
|
|
41
|
+
idHints?: string[];
|
|
42
|
+
runtime?: string[];
|
|
43
|
+
files?: string[];
|
|
44
|
+
auxiliaryFiles?: string[];
|
|
45
|
+
hash?: string;
|
|
46
|
+
childrenByOrder?: Record<string, (string | number)[]>;
|
|
47
|
+
id?: string | number;
|
|
48
|
+
siblings?: (string | number)[];
|
|
49
|
+
parents?: (string | number)[];
|
|
50
|
+
children?: (string | number)[];
|
|
51
|
+
modules?: StatsModule[];
|
|
52
|
+
filteredModules?: number;
|
|
53
|
+
origins?: StatsChunkOrigin[];
|
|
54
|
+
};
|
|
55
|
+
export type KnownAssetInfo = {
|
|
56
|
+
immutable?: boolean;
|
|
57
|
+
minimized?: boolean;
|
|
58
|
+
fullhash?: string | string[];
|
|
59
|
+
chunkhash?: string | string[];
|
|
60
|
+
contenthash?: string | string[];
|
|
61
|
+
sourceFilename?: string;
|
|
62
|
+
copied?: boolean;
|
|
63
|
+
size?: number;
|
|
64
|
+
development?: boolean;
|
|
65
|
+
hotModuleReplacement?: boolean;
|
|
66
|
+
javascriptModule?: boolean;
|
|
67
|
+
related?: Record<string, string | string[]>;
|
|
68
|
+
};
|
|
69
|
+
export type AssetInfo = KnownAssetInfo & Record<string, any>;
|
|
70
|
+
export type StatsChunkGroup = KnownStatsChunkGroup & Record<string, any>;
|
|
71
|
+
export type KnownStatsAsset = {
|
|
72
|
+
type: string;
|
|
73
|
+
name: string;
|
|
74
|
+
info: AssetInfo;
|
|
75
|
+
size: number;
|
|
76
|
+
emitted: boolean;
|
|
77
|
+
cached: boolean;
|
|
78
|
+
related?: StatsAsset[];
|
|
79
|
+
chunkNames?: (string | number)[];
|
|
80
|
+
chunkIdHints?: (string | number)[];
|
|
81
|
+
chunks?: (string | null | undefined)[];
|
|
82
|
+
auxiliaryChunkNames?: (string | number)[];
|
|
83
|
+
auxiliaryChunks?: (string | null | undefined)[];
|
|
84
|
+
auxiliaryChunkIdHints?: (string | number)[];
|
|
85
|
+
filteredRelated?: number;
|
|
86
|
+
isOverSizeLimit?: boolean;
|
|
87
|
+
};
|
|
88
|
+
export type StatsAsset = KnownStatsAsset & Record<string, any>;
|
|
89
|
+
export type StatsChunk = KnownStatsChunk & Record<string, any>;
|
|
90
|
+
export type KnownStatsModule = {
|
|
91
|
+
type: string;
|
|
92
|
+
moduleType: string;
|
|
93
|
+
layer?: string;
|
|
94
|
+
identifier?: string;
|
|
95
|
+
name?: string;
|
|
96
|
+
nameForCondition?: string;
|
|
97
|
+
index?: number;
|
|
98
|
+
index2?: number;
|
|
99
|
+
preOrderIndex?: number;
|
|
100
|
+
postOrderIndex?: number;
|
|
101
|
+
size: number;
|
|
102
|
+
sizes: Record<string, number>;
|
|
103
|
+
cacheable?: boolean;
|
|
104
|
+
built: boolean;
|
|
105
|
+
codeGenerated: boolean;
|
|
106
|
+
buildTimeExecuted: boolean;
|
|
107
|
+
cached: boolean;
|
|
108
|
+
optional?: boolean;
|
|
109
|
+
orphan?: boolean;
|
|
110
|
+
id?: string;
|
|
111
|
+
issuerId?: string;
|
|
112
|
+
chunks?: string[];
|
|
113
|
+
assets?: string[];
|
|
114
|
+
dependent?: boolean;
|
|
115
|
+
issuer?: string;
|
|
116
|
+
issuerName?: string;
|
|
117
|
+
issuerPath?: StatsModuleIssuer[];
|
|
118
|
+
failed?: boolean;
|
|
119
|
+
errors?: number;
|
|
120
|
+
warnings?: number;
|
|
121
|
+
profile?: StatsProfile;
|
|
122
|
+
reasons?: StatsModuleReason[];
|
|
123
|
+
usedExports?: boolean | string[] | null;
|
|
124
|
+
providedExports?: string[] | null;
|
|
125
|
+
optimizationBailout?: string[] | null;
|
|
126
|
+
depth?: number;
|
|
127
|
+
modules?: StatsModule[];
|
|
128
|
+
filteredModules?: number;
|
|
129
|
+
source?: string | Buffer;
|
|
130
|
+
};
|
|
131
|
+
export type StatsProfile = KnownStatsProfile & Record<string, any>;
|
|
132
|
+
export type KnownStatsProfile = {
|
|
133
|
+
total: number;
|
|
134
|
+
resolving: number;
|
|
135
|
+
building: number;
|
|
136
|
+
};
|
|
137
|
+
export type StatsModule = KnownStatsModule & Record<string, any>;
|
|
138
|
+
export type KnownStatsModuleIssuer = {
|
|
139
|
+
identifier?: string;
|
|
140
|
+
name?: string;
|
|
141
|
+
id?: string | number;
|
|
142
|
+
};
|
|
143
|
+
export type StatsModuleIssuer = KnownStatsModuleIssuer & Record<string, any>;
|
|
144
|
+
export type KnownStatsError = {
|
|
145
|
+
message: string;
|
|
146
|
+
chunkName?: string;
|
|
147
|
+
chunkEntry?: boolean;
|
|
148
|
+
chunkInitial?: boolean;
|
|
149
|
+
file?: string;
|
|
150
|
+
moduleIdentifier?: string;
|
|
151
|
+
moduleName?: string;
|
|
152
|
+
loc?: string;
|
|
153
|
+
chunkId?: string | number;
|
|
154
|
+
moduleId?: string | number;
|
|
155
|
+
moduleTrace?: StatsModuleTraceItem[];
|
|
156
|
+
details?: any;
|
|
157
|
+
stack?: string;
|
|
158
|
+
};
|
|
159
|
+
export type StatsError = KnownStatsError & Record<string, any>;
|
|
160
|
+
export type StatsModuleTraceItem = {
|
|
161
|
+
originIdentifier?: string;
|
|
162
|
+
originName?: string;
|
|
163
|
+
moduleIdentifier?: string;
|
|
164
|
+
moduleName?: string;
|
|
165
|
+
originId?: string;
|
|
166
|
+
moduleId?: string;
|
|
167
|
+
};
|
|
168
|
+
export type KnownStatsModuleReason = {
|
|
169
|
+
moduleIdentifier?: string;
|
|
170
|
+
module?: string;
|
|
171
|
+
moduleName?: string;
|
|
172
|
+
resolvedModuleIdentifier?: string;
|
|
173
|
+
resolvedModule?: string;
|
|
174
|
+
type?: string;
|
|
175
|
+
userRequest?: string;
|
|
176
|
+
moduleId?: string | null;
|
|
177
|
+
resolvedModuleId?: string | number | null;
|
|
178
|
+
};
|
|
179
|
+
export type StatsModuleReason = KnownStatsModuleReason & Record<string, any>;
|
|
180
|
+
export type KnownStatsChunkOrigin = {
|
|
181
|
+
module: string;
|
|
182
|
+
moduleIdentifier: string;
|
|
183
|
+
moduleName: string;
|
|
184
|
+
loc: string;
|
|
185
|
+
request: string;
|
|
186
|
+
moduleId?: string;
|
|
187
|
+
};
|
|
188
|
+
export type StatsChunkOrigin = KnownStatsChunkOrigin & Record<string, any>;
|
|
189
|
+
export type KnownStatsCompilation = {
|
|
190
|
+
/**
|
|
191
|
+
* webpack version.
|
|
192
|
+
* this is a hack to be compatible with plugin which detect webpack's version
|
|
193
|
+
*/
|
|
194
|
+
version?: string;
|
|
195
|
+
/** rspack version */
|
|
196
|
+
rspackVersion?: string;
|
|
197
|
+
name?: string;
|
|
198
|
+
hash?: string;
|
|
199
|
+
time?: number;
|
|
200
|
+
builtAt?: number;
|
|
201
|
+
publicPath?: string;
|
|
202
|
+
outputPath?: string;
|
|
203
|
+
assets?: StatsAsset[];
|
|
204
|
+
assetsByChunkName?: Record<string, string[]>;
|
|
205
|
+
chunks?: StatsChunk[];
|
|
206
|
+
modules?: StatsModule[];
|
|
207
|
+
entrypoints?: Record<string, StatsChunkGroup>;
|
|
208
|
+
namedChunkGroups?: Record<string, StatsChunkGroup>;
|
|
209
|
+
errors?: StatsError[];
|
|
210
|
+
errorsCount?: number;
|
|
211
|
+
warnings?: StatsError[];
|
|
212
|
+
warningsCount?: number;
|
|
213
|
+
filteredModules?: number;
|
|
214
|
+
children?: StatsCompilation[];
|
|
215
|
+
logging?: Record<string, StatsLogging>;
|
|
216
|
+
};
|
|
217
|
+
export type StatsCompilation = KnownStatsCompilation & Record<string, any>;
|
|
218
|
+
export type StatsLogging = KnownStatsLogging & Record<string, any>;
|
|
219
|
+
export type KnownStatsLogging = {
|
|
220
|
+
entries: StatsLoggingEntry[];
|
|
221
|
+
filteredEntries: number;
|
|
222
|
+
debug: boolean;
|
|
223
|
+
};
|
|
224
|
+
export type StatsLoggingEntry = KnownStatsLoggingEntry & Record<string, any>;
|
|
225
|
+
export type KnownStatsLoggingEntry = {
|
|
226
|
+
type: string;
|
|
227
|
+
message: string;
|
|
228
|
+
trace?: string[] | undefined;
|
|
229
|
+
children?: StatsLoggingEntry[] | undefined;
|
|
230
|
+
args?: any[] | undefined;
|
|
231
|
+
time?: number | undefined;
|
|
232
|
+
};
|
|
233
|
+
type ExtractorsByOption<T, O> = {
|
|
234
|
+
[x: string]: (object: O, data: T, context: StatsFactoryContext, options: any, factory: StatsFactory) => void;
|
|
235
|
+
};
|
|
236
|
+
export type PreprocessedAsset = binding.JsStatsAsset & {
|
|
237
|
+
type: string;
|
|
238
|
+
related: PreprocessedAsset[];
|
|
239
|
+
info: binding.JsStatsAssetInfo;
|
|
240
|
+
};
|
|
241
|
+
export type SimpleExtractors = {
|
|
242
|
+
compilation: ExtractorsByOption<Compilation, StatsCompilation>;
|
|
243
|
+
asset$visible: ExtractorsByOption<PreprocessedAsset, StatsAsset>;
|
|
244
|
+
asset: ExtractorsByOption<PreprocessedAsset, StatsAsset>;
|
|
245
|
+
chunkGroup: ExtractorsByOption<{
|
|
246
|
+
name: string;
|
|
247
|
+
chunkGroup: binding.JsStatsChunkGroup;
|
|
248
|
+
}, StatsChunkGroup>;
|
|
249
|
+
module: ExtractorsByOption<binding.JsStatsModule, StatsModule>;
|
|
250
|
+
module$visible: ExtractorsByOption<binding.JsStatsModule, StatsModule>;
|
|
251
|
+
moduleIssuer: ExtractorsByOption<binding.JsStatsModuleIssuer, StatsModuleIssuer>;
|
|
252
|
+
profile: ExtractorsByOption<binding.JsStatsModuleProfile, StatsProfile>;
|
|
253
|
+
moduleReason: ExtractorsByOption<binding.JsStatsModuleReason, StatsModuleReason>;
|
|
254
|
+
chunk: ExtractorsByOption<binding.JsStatsChunk, KnownStatsChunk>;
|
|
255
|
+
chunkOrigin: ExtractorsByOption<JsOriginRecord, StatsChunkOrigin>;
|
|
256
|
+
error: ExtractorsByOption<binding.JsStatsError, StatsError>;
|
|
257
|
+
warning: ExtractorsByOption<binding.JsStatsWarning, StatsError>;
|
|
258
|
+
moduleTraceItem: ExtractorsByOption<binding.JsStatsModuleTrace, StatsModuleTraceItem>;
|
|
259
|
+
};
|
|
260
|
+
export declare const uniqueArray: <T, I>(items: Iterable<T>, selector: (arg: T) => Iterable<I>) => I[];
|
|
261
|
+
export declare const uniqueOrderedArray: <T, I>(items: Iterable<T>, selector: (arg: T) => Iterable<I>, comparator: Comparator) => I[];
|
|
262
|
+
export declare const iterateConfig: (config: Record<string, Record<string, Function>>, options: StatsOptions, fn: (a1: string, a2: Function) => void) => void;
|
|
263
|
+
type Child = {
|
|
264
|
+
children?: ItemChildren;
|
|
265
|
+
filteredChildren?: number;
|
|
266
|
+
};
|
|
267
|
+
type ItemChildren = Child[];
|
|
268
|
+
export declare const getTotalItems: (children: ItemChildren) => number;
|
|
269
|
+
export declare const collapse: (children: ItemChildren) => Child[];
|
|
270
|
+
export declare const spaceLimited: (itemsAndGroups: ItemChildren, max: number, filteredChildrenLineReserved?: boolean) => {
|
|
271
|
+
children: any;
|
|
272
|
+
filteredChildren: any;
|
|
273
|
+
};
|
|
274
|
+
export declare const countWithChildren: (compilation: Compilation, getItems: (compilation: Compilation, key: string) => any[]) => number;
|
|
275
|
+
export declare const sortByField: (field: string) => ((a1: Object, a2: Object) => number);
|
|
276
|
+
export declare const assetGroup: (children: StatsAsset[]) => {
|
|
277
|
+
size: number;
|
|
278
|
+
};
|
|
279
|
+
export declare const moduleGroup: (children: {
|
|
280
|
+
size: number;
|
|
281
|
+
sizes: Record<string, number>;
|
|
282
|
+
}[]) => {
|
|
283
|
+
size: number;
|
|
284
|
+
sizes: Record<string, number>;
|
|
285
|
+
};
|
|
286
|
+
export declare const mergeToObject: (items: {
|
|
287
|
+
[key: string]: any;
|
|
288
|
+
name: string;
|
|
289
|
+
}[]) => Object;
|
|
290
|
+
export declare function resolveStatsMillisecond(s: binding.JsStatsMillisecond): number;
|
|
291
|
+
export declare const errorsSpaceLimit: (errors: StatsError[], max: number) => {
|
|
292
|
+
errors: StatsError[];
|
|
293
|
+
filtered: number;
|
|
294
|
+
};
|
|
295
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/util/ArrayQueue.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @template T
|
|
12
|
+
*/
|
|
13
|
+
declare class ArrayQueue<T> {
|
|
14
|
+
_list: Array<T>;
|
|
15
|
+
_listReversed: Array<T>;
|
|
16
|
+
constructor(items?: T[]);
|
|
17
|
+
/**
|
|
18
|
+
* Returns the number of elements in this queue.
|
|
19
|
+
* @returns {number} The number of elements in this queue.
|
|
20
|
+
*/
|
|
21
|
+
get length(): number;
|
|
22
|
+
/**
|
|
23
|
+
* Empties the queue.
|
|
24
|
+
*/
|
|
25
|
+
clear(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Appends the specified element to this queue.
|
|
28
|
+
* @param {T} item The element to add.
|
|
29
|
+
* @returns {void}
|
|
30
|
+
*/
|
|
31
|
+
enqueue(item: T): void;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves and removes the head of this queue.
|
|
34
|
+
* @returns {T | undefined} The head of the queue of `undefined` if this queue is empty.
|
|
35
|
+
*/
|
|
36
|
+
dequeue(): T | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Finds and removes an item
|
|
39
|
+
* @param {T} item the item
|
|
40
|
+
* @returns {void}
|
|
41
|
+
*/
|
|
42
|
+
delete(item: T): void;
|
|
43
|
+
[Symbol.iterator](): Generator<T, void, unknown>;
|
|
44
|
+
}
|
|
45
|
+
export default ArrayQueue;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsAssetInfo as JsAssetInfoBinding } from "@rspack/binding";
|
|
2
|
+
export type AssetInfo = Partial<Omit<JsAssetInfoBinding, "extras">> & Record<string, any>;
|
|
3
|
+
declare class JsAssetInfo {
|
|
4
|
+
static __from_binding(jsAssetInfo: JsAssetInfoBinding): AssetInfo;
|
|
5
|
+
static __to_binding(assetInfo?: AssetInfo): JsAssetInfoBinding;
|
|
6
|
+
}
|
|
7
|
+
export { JsAssetInfo };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/tree/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/util
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
export declare const formatSize: (size: unknown) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertNotNill(value: unknown): asserts value;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/suguru03/neo-async/blob/master/lib/async.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Suguru Motegi
|
|
7
|
+
* Copyright (c) 2014-2018 Suguru Motegi
|
|
8
|
+
* https://github.com/suguru03/neo-async/blob/master/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
export interface Dictionary<T> {
|
|
11
|
+
[key: string]: T;
|
|
12
|
+
}
|
|
13
|
+
export type IterableCollection<T> = T[] | IterableIterator<T> | Dictionary<T>;
|
|
14
|
+
export type ErrorCallback<E = Error> = (err?: E | null) => void;
|
|
15
|
+
export type AsyncIterator<T, E = Error> = (item: T, callback: ErrorCallback<E>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* // array
|
|
20
|
+
* var order = [];
|
|
21
|
+
* var array = [1, 3, 2];
|
|
22
|
+
* var iterator = function(num, done) {
|
|
23
|
+
* setTimeout(function() {
|
|
24
|
+
* order.push(num);
|
|
25
|
+
* done();
|
|
26
|
+
* }, num * 10);
|
|
27
|
+
* };
|
|
28
|
+
* asyncLib.each(array, iterator, function(err, res) {
|
|
29
|
+
* console.log(res); // undefined
|
|
30
|
+
* console.log(order); // [1, 2, 3]
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
*
|
|
35
|
+
* // break
|
|
36
|
+
* var order = [];
|
|
37
|
+
* var array = [1, 3, 2];
|
|
38
|
+
* var iterator = function(num, done) {
|
|
39
|
+
* setTimeout(function() {
|
|
40
|
+
* order.push(num);
|
|
41
|
+
* done(null, num !== 2);
|
|
42
|
+
* }, num * 10);
|
|
43
|
+
* };
|
|
44
|
+
* asyncLib.each(array, iterator, function(err, res) {
|
|
45
|
+
* console.log(res); // undefined
|
|
46
|
+
* console.log(order); // [1, 2]
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
declare function each<T, E = Error>(collection: IterableCollection<T>, iterator: AsyncIterator<T, E>, originalCallback: ErrorCallback<E>): void;
|
|
51
|
+
declare const _default: {
|
|
52
|
+
each: typeof each;
|
|
53
|
+
};
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/util/cleverMerge.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
type Obj = Record<PropertyKey, any>;
|
|
11
|
+
export declare const DELETE: unique symbol;
|
|
12
|
+
/**
|
|
13
|
+
* Merges two given objects and caches the result to avoid computation if same objects passed as arguments again.
|
|
14
|
+
* @example
|
|
15
|
+
* // performs cleverMerge(first, second), stores the result in WeakMap and returns result
|
|
16
|
+
* cachedCleverMerge({a: 1}, {a: 2})
|
|
17
|
+
* {a: 2}
|
|
18
|
+
* // when same arguments passed, gets the result from WeakMap and returns it.
|
|
19
|
+
* cachedCleverMerge({a: 1}, {a: 2})
|
|
20
|
+
* {a: 2}
|
|
21
|
+
* @param first first object
|
|
22
|
+
* @param second second object
|
|
23
|
+
* @returns merged object of first and second object
|
|
24
|
+
*/
|
|
25
|
+
export declare const cachedCleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
|
|
26
|
+
/**
|
|
27
|
+
* @param obj object
|
|
28
|
+
* @param property property
|
|
29
|
+
* @param value assignment value
|
|
30
|
+
* @returns new object
|
|
31
|
+
*/
|
|
32
|
+
export declare const cachedSetProperty: (obj: Obj, property: string, value: string | number | boolean) => Obj;
|
|
33
|
+
/**
|
|
34
|
+
* Merges two objects. Objects are deeply clever merged.
|
|
35
|
+
* Arrays might reference the old value with "...".
|
|
36
|
+
* Non-object values take preference over object values.
|
|
37
|
+
* @param first first object
|
|
38
|
+
* @param second second object
|
|
39
|
+
* @returns merged object of first and second object
|
|
40
|
+
*/
|
|
41
|
+
export declare const cleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
|
|
42
|
+
/**
|
|
43
|
+
* @param obj the object
|
|
44
|
+
* @returns the object without operations like "..." or DELETE
|
|
45
|
+
*/
|
|
46
|
+
export declare const removeOperations: <O extends Obj>(obj: O) => O;
|
|
47
|
+
/**
|
|
48
|
+
* @param obj the object
|
|
49
|
+
* @param byProperty the by description
|
|
50
|
+
* @param values values
|
|
51
|
+
* @returns object with merged byProperty
|
|
52
|
+
*/
|
|
53
|
+
export declare const resolveByProperty: <O extends Obj | null, P extends PropertyKey>(obj: O, byProperty: P, ...values: any[]) => Omit<O, P> | undefined;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/tree/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/util
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
import type { JsStatsChunk as Chunk } from "@rspack/binding";
|
|
11
|
+
import type { ChunkGroup } from "../ChunkGroup";
|
|
12
|
+
export type Comparator = <T>(arg0: T, arg1: T) => -1 | 0 | 1;
|
|
13
|
+
type Selector<A, B> = (input: A) => B;
|
|
14
|
+
export declare const concatComparators: (...comps: Array<Comparator>) => Comparator;
|
|
15
|
+
export declare const compareIds: <T = string | number>(a: T, b: T) => -1 | 0 | 1;
|
|
16
|
+
export declare const compareChunksById: (a: Chunk, b: Chunk) => -1 | 0 | 1;
|
|
17
|
+
export declare const compareChunkGroupsByIndex: (a: ChunkGroup, b: ChunkGroup) => -1 | 0 | 1;
|
|
18
|
+
export declare const compareSelect: <T, R>(getter: Selector<T, R>, comparator: Comparator) => Comparator;
|
|
19
|
+
export declare const compareNumbers: (a: number, b: number) => 0 | 1 | -1;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/util/createHash.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
import Hash from "./hash";
|
|
11
|
+
/**
|
|
12
|
+
* Creates a hash by name or function
|
|
13
|
+
* @param algorithm the algorithm name or a constructor creating a hash
|
|
14
|
+
* @returns the hash
|
|
15
|
+
*/
|
|
16
|
+
export declare const createHash: (algorithm: "debug" | "xxhash64" | "md4" | "native-md4" | (string & {}) | (new () => Hash)) => Hash;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createReadonlyMap<T>(obj: Pick<ReadonlyMap<string, T>, "get" | "keys">): ReadonlyMap<string, Readonly<T>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type FakeHook<T> = T & {
|
|
2
|
+
_fakeHook: true;
|
|
3
|
+
};
|
|
4
|
+
export declare function createFakeCompilationDependencies(getDeps: () => string[], addDeps: (deps: string[]) => void): {
|
|
5
|
+
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
6
|
+
has(dep: string): boolean;
|
|
7
|
+
add: (dep: string) => void;
|
|
8
|
+
addAll: (deps: Iterable<string>) => void;
|
|
9
|
+
};
|