@rspack/core 1.0.9 → 1.0.11
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/Dependency.d.ts +7 -6
- package/dist/Module.d.ts +19 -17
- package/dist/builtin-plugin/css-extract/utils.d.ts +1 -0
- package/dist/config/types.d.ts +545 -0
- package/dist/config/zod.d.ts +202 -1347
- package/dist/cssExtractHmr.js +224 -0
- package/dist/cssExtractLoader.js +277 -0
- package/dist/index.js +23347 -31
- package/dist/{builtin-plugin/css-extract/hmr/hotModuleReplacement.d.ts → runtime/cssExtractHmr.d.ts} +1 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
- package/dist/stats/statsFactoryUtils.d.ts +1 -0
- package/package.json +8 -5
- package/compiled/json-parse-even-better-errors/index.d.ts +0 -1
- package/compiled/json-parse-even-better-errors/index.js +0 -193
- package/compiled/json-parse-even-better-errors/package.json +0 -1
- package/compiled/neo-async/index.d.ts +0 -685
- package/compiled/neo-async/index.js +0 -9207
- package/compiled/neo-async/license +0 -22
- package/compiled/neo-async/package.json +0 -1
- package/compiled/zod-validation-error/index.d.ts +0 -41
- package/compiled/zod-validation-error/index.js +0 -335
- package/compiled/zod-validation-error/license +0 -9
- package/compiled/zod-validation-error/package.json +0 -1
- package/dist/Chunk.js +0 -118
- package/dist/ChunkGraph.js +0 -27
- package/dist/ChunkGroup.js +0 -76
- package/dist/Compilation.js +0 -854
- package/dist/Compiler.js +0 -920
- package/dist/ContextModuleFactory.js +0 -36
- package/dist/DependenciesBlock.js +0 -30
- package/dist/Dependency.js +0 -32
- package/dist/Entrypoint.js +0 -21
- package/dist/ErrorHelpers.js +0 -62
- package/dist/ExecuteModulePlugin.js +0 -46
- package/dist/FileSystem.js +0 -34
- package/dist/FileSystemInfo.js +0 -2
- package/dist/Module.js +0 -143
- package/dist/ModuleTypeConstants.js +0 -92
- package/dist/MultiCompiler.js +0 -440
- package/dist/MultiStats.js +0 -161
- package/dist/MultiWatching.js +0 -62
- package/dist/NormalModule.js +0 -97
- package/dist/NormalModuleFactory.js +0 -43
- package/dist/Resolver.js +0 -39
- package/dist/ResolverFactory.js +0 -61
- package/dist/RspackError.js +0 -21
- package/dist/RuleSetCompiler.js +0 -10
- package/dist/RuntimeGlobals.js +0 -357
- package/dist/RuntimeModule.js +0 -58
- package/dist/Stats.js +0 -161
- package/dist/Template.js +0 -206
- package/dist/Watching.js +0 -290
- package/dist/builtin-loader/index.js +0 -17
- package/dist/builtin-loader/lightningcss/index.js +0 -175
- package/dist/builtin-loader/swc/index.js +0 -5
- package/dist/builtin-loader/swc/pluginImport.js +0 -35
- package/dist/builtin-loader/swc/react.js +0 -7
- package/dist/builtin-loader/swc/types.js +0 -2
- package/dist/builtin-plugin/APIPlugin.js +0 -6
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/AssetModulesPlugin.js +0 -6
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.js +0 -6
- package/dist/builtin-plugin/BannerPlugin.js +0 -22
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.js +0 -12
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.js +0 -6
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/ContextReplacementPlugin.js +0 -43
- package/dist/builtin-plugin/CopyRspackPlugin.js +0 -21
- package/dist/builtin-plugin/CssModulesPlugin.js +0 -6
- package/dist/builtin-plugin/DataUriPlugin.js +0 -6
- package/dist/builtin-plugin/DefinePlugin.js +0 -44
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/DynamicEntryPlugin.js +0 -36
- package/dist/builtin-plugin/ElectronTargetPlugin.js +0 -6
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.js +0 -6
- package/dist/builtin-plugin/EnableLibraryPlugin.js +0 -39
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.js +0 -6
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.js +0 -6
- package/dist/builtin-plugin/EntryPlugin.js +0 -34
- package/dist/builtin-plugin/EvalDevToolModulePlugin.js +0 -6
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.js +0 -16
- package/dist/builtin-plugin/ExternalsPlugin.js +0 -51
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.js +0 -6
- package/dist/builtin-plugin/FileUriPlugin.js +0 -6
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.js +0 -6
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.js +0 -6
- package/dist/builtin-plugin/HotModuleReplacementPlugin.js +0 -18
- package/dist/builtin-plugin/HtmlRspackPlugin.js +0 -285
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.js +0 -11
- package/dist/builtin-plugin/IgnorePlugin.js +0 -20
- package/dist/builtin-plugin/InferAsyncModulesPlugin.js +0 -6
- package/dist/builtin-plugin/JavascriptModulesPlugin.js +0 -55
- package/dist/builtin-plugin/JsLoaderRspackPlugin.js +0 -9
- package/dist/builtin-plugin/JsonModulesPlugin.js +0 -6
- package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.js +0 -30
- package/dist/builtin-plugin/LimitChunkCountPlugin.js +0 -8
- package/dist/builtin-plugin/MangleExportsPlugin.js +0 -6
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.js +0 -6
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/ModuleConcatenationPlugin.js +0 -6
- package/dist/builtin-plugin/NamedChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NamedModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.js +0 -6
- package/dist/builtin-plugin/NodeTargetPlugin.js +0 -6
- package/dist/builtin-plugin/ProgressPlugin.js +0 -15
- package/dist/builtin-plugin/ProvidePlugin.js +0 -14
- package/dist/builtin-plugin/RealContentHashPlugin.js +0 -6
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.js +0 -6
- package/dist/builtin-plugin/RuntimeChunkPlugin.js +0 -6
- package/dist/builtin-plugin/RuntimePlugin.js +0 -6
- package/dist/builtin-plugin/SideEffectsFlagPlugin.js +0 -6
- package/dist/builtin-plugin/SizeLimitsPlugin.js +0 -9
- package/dist/builtin-plugin/SourceMapDevToolPlugin.js +0 -14
- package/dist/builtin-plugin/SplitChunksPlugin.js +0 -92
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.js +0 -80
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.js +0 -6
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.js +0 -6
- package/dist/builtin-plugin/WorkerPlugin.js +0 -31
- package/dist/builtin-plugin/base.js +0 -58
- package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +0 -182
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.d.ts +0 -2
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.js +0 -31
- package/dist/builtin-plugin/css-extract/index.js +0 -105
- package/dist/builtin-plugin/css-extract/loader.js +0 -204
- package/dist/builtin-plugin/css-extract/utils.js +0 -51
- package/dist/builtin-plugin/index.js +0 -84
- package/dist/builtin-plugin/lazy-compilation/backend.js +0 -139
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.js +0 -6
- package/dist/builtin-plugin/lazy-compilation/plugin.js +0 -60
- package/dist/config/adapter.js +0 -691
- package/dist/config/adapterRuleUse.js +0 -107
- package/dist/config/browserslistTargetHandler.js +0 -345
- package/dist/config/defaults.js +0 -876
- package/dist/config/index.js +0 -20
- package/dist/config/normalization.js +0 -299
- package/dist/config/target.js +0 -318
- package/dist/config/types.js +0 -3
- package/dist/config/zod.js +0 -1028
- package/dist/container/ContainerPlugin.js +0 -50
- package/dist/container/ContainerReferencePlugin.js +0 -49
- package/dist/container/ModuleFederationPlugin.js +0 -137
- package/dist/container/ModuleFederationPluginV1.js +0 -63
- package/dist/container/ModuleFederationRuntimePlugin.js +0 -6
- package/dist/container/options.js +0 -48
- package/dist/error/ConcurrentCompilationError.js +0 -20
- package/dist/exports.js +0 -183
- package/dist/lib/AbstractMethodError.js +0 -51
- package/dist/lib/Cache.js +0 -111
- package/dist/lib/CacheFacade.js +0 -321
- package/dist/lib/Dependency.js +0 -11
- package/dist/lib/EntryOptionPlugin.js +0 -89
- package/dist/lib/EnvironmentPlugin.js +0 -57
- package/dist/lib/HookWebpackError.js +0 -83
- package/dist/lib/IgnoreWarningsPlugin.js +0 -35
- package/dist/lib/LoaderOptionsPlugin.js +0 -74
- package/dist/lib/LoaderTargetPlugin.js +0 -37
- package/dist/lib/ModuleFilenameHelpers.js +0 -83
- package/dist/lib/NormalModuleReplacementPlugin.js +0 -85
- package/dist/lib/WebpackError.js +0 -20
- package/dist/lib/cache/MemoryCachePlugin.js +0 -40
- package/dist/lib/cache/getLazyHashedEtag.js +0 -73
- package/dist/lib/cache/mergeEtags.js +0 -74
- package/dist/lib/formatLocation.js +0 -64
- package/dist/loader-runner/LoaderLoadingError.js +0 -19
- package/dist/loader-runner/index.js +0 -735
- package/dist/loader-runner/loadLoader.js +0 -64
- package/dist/logging/Logger.js +0 -143
- package/dist/logging/createConsoleLogger.js +0 -176
- package/dist/logging/runtime.js +0 -37
- package/dist/logging/truncateArgs.js +0 -81
- package/dist/node/NodeEnvironmentPlugin.js +0 -50
- package/dist/node/NodeTemplatePlugin.js +0 -26
- package/dist/node/NodeWatchFileSystem.js +0 -144
- package/dist/node/nodeConsole.js +0 -146
- package/dist/rspack.js +0 -123
- package/dist/rspackOptionsApply.js +0 -274
- package/dist/sharing/ConsumeSharedPlugin.js +0 -69
- package/dist/sharing/ProvideSharedPlugin.js +0 -50
- package/dist/sharing/SharePlugin.js +0 -66
- package/dist/sharing/ShareRuntimePlugin.js +0 -26
- package/dist/sharing/utils.js +0 -8
- package/dist/stats/DefaultStatsFactoryPlugin.js +0 -1173
- package/dist/stats/DefaultStatsPresetPlugin.js +0 -305
- package/dist/stats/DefaultStatsPrinterPlugin.js +0 -1069
- package/dist/stats/StatsFactory.js +0 -167
- package/dist/stats/StatsPrinter.js +0 -142
- package/dist/stats/statsFactoryUtils.js +0 -341
- package/dist/util/ArrayQueue.js +0 -108
- package/dist/util/AssetInfo.js +0 -39
- package/dist/util/IterableHelpers.js +0 -35
- package/dist/util/MergeCaller.js +0 -24
- package/dist/util/SizeFormatHelpers.js +0 -24
- package/dist/util/SplitChunkSize.js +0 -18
- package/dist/util/assertNotNil.js +0 -9
- package/dist/util/assetCondition.js +0 -2
- package/dist/util/bindingVersionCheck.js +0 -124
- package/dist/util/cleverMerge.js +0 -504
- package/dist/util/comparators.js +0 -108
- package/dist/util/createHash.js +0 -161
- package/dist/util/createReadonlyMap.js +0 -29
- package/dist/util/fake.js +0 -28
- package/dist/util/fs.js +0 -120
- package/dist/util/hash/BatchedHash.js +0 -69
- package/dist/util/hash/index.js +0 -39
- package/dist/util/hash/md4.js +0 -27
- package/dist/util/hash/wasm-hash.js +0 -167
- package/dist/util/hash/xxhash64.js +0 -27
- package/dist/util/identifier.js +0 -330
- package/dist/util/index.js +0 -123
- package/dist/util/memoize.js +0 -61
- package/dist/util/scheme.js +0 -57
- package/dist/util/smartGrouping.js +0 -148
- package/dist/util/source.js +0 -42
- package/dist/util/validate.js +0 -77
- package/dist/util/webpack.js +0 -27
- /package/dist/{container/default.runtime.js → moduleFederationDefaultRuntime.js} +0 -0
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014-2018 Suguru Motegi
|
|
4
|
-
Based on Async.js, Copyright Caolan McMahon
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"neo-async","version":"2.6.2","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as zod from 'zod';
|
|
2
|
-
|
|
3
|
-
interface ErrorOptions {
|
|
4
|
-
cause?: unknown;
|
|
5
|
-
}
|
|
6
|
-
declare class ValidationError extends Error {
|
|
7
|
-
name: 'ZodValidationError';
|
|
8
|
-
details: Array<zod.ZodIssue>;
|
|
9
|
-
constructor(message?: string, options?: ErrorOptions);
|
|
10
|
-
toString(): string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare function isValidationError(err: unknown): err is ValidationError;
|
|
14
|
-
|
|
15
|
-
declare function isValidationErrorLike(err: unknown): err is ValidationError;
|
|
16
|
-
|
|
17
|
-
declare function isZodErrorLike(err: unknown): err is zod.ZodError;
|
|
18
|
-
|
|
19
|
-
declare const errorMap: zod.ZodErrorMap;
|
|
20
|
-
|
|
21
|
-
type ZodIssue = zod.ZodIssue;
|
|
22
|
-
type FromZodIssueOptions = {
|
|
23
|
-
issueSeparator?: string;
|
|
24
|
-
unionSeparator?: string;
|
|
25
|
-
prefix?: string | null;
|
|
26
|
-
prefixSeparator?: string;
|
|
27
|
-
includePath?: boolean;
|
|
28
|
-
};
|
|
29
|
-
declare function fromZodIssue(issue: ZodIssue, options?: FromZodIssueOptions): ValidationError;
|
|
30
|
-
|
|
31
|
-
type ZodError = zod.ZodError;
|
|
32
|
-
type FromZodErrorOptions = FromZodIssueOptions & {
|
|
33
|
-
maxIssuesInMessage?: number;
|
|
34
|
-
};
|
|
35
|
-
declare function fromZodError(zodError: ZodError, options?: FromZodErrorOptions): ValidationError;
|
|
36
|
-
|
|
37
|
-
declare function fromError(err: unknown, options?: FromZodErrorOptions): ValidationError;
|
|
38
|
-
|
|
39
|
-
declare const toValidationError: (options?: Parameters<typeof fromZodError>[1]) => (err: unknown) => ValidationError;
|
|
40
|
-
|
|
41
|
-
export { type ErrorOptions, type FromZodErrorOptions, type FromZodIssueOptions, ValidationError, type ZodError, type ZodIssue, errorMap, fromError, fromZodError, fromZodIssue, isValidationError, isValidationErrorLike, isZodErrorLike, toValidationError };
|
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
/******/ (() => { // webpackBootstrap
|
|
2
|
-
/******/ "use strict";
|
|
3
|
-
/******/ var __webpack_modules__ = ({
|
|
4
|
-
|
|
5
|
-
/***/ 172:
|
|
6
|
-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var __create = Object.create;
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __export = (target, all) => {
|
|
16
|
-
for (var name in all)
|
|
17
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
-
};
|
|
19
|
-
var __copyProps = (to, from, except, desc) => {
|
|
20
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
|
-
for (let key of __getOwnPropNames(from))
|
|
22
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
23
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
24
|
-
}
|
|
25
|
-
return to;
|
|
26
|
-
};
|
|
27
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
28
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
30
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
32
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
33
|
-
mod
|
|
34
|
-
));
|
|
35
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
-
|
|
37
|
-
// lib/index.ts
|
|
38
|
-
var lib_exports = {};
|
|
39
|
-
__export(lib_exports, {
|
|
40
|
-
ValidationError: () => ValidationError,
|
|
41
|
-
errorMap: () => errorMap,
|
|
42
|
-
fromError: () => fromError,
|
|
43
|
-
fromZodError: () => fromZodError,
|
|
44
|
-
fromZodIssue: () => fromZodIssue,
|
|
45
|
-
isValidationError: () => isValidationError,
|
|
46
|
-
isValidationErrorLike: () => isValidationErrorLike,
|
|
47
|
-
isZodErrorLike: () => isZodErrorLike,
|
|
48
|
-
toValidationError: () => toValidationError
|
|
49
|
-
});
|
|
50
|
-
module.exports = __toCommonJS(lib_exports);
|
|
51
|
-
|
|
52
|
-
// lib/isZodErrorLike.ts
|
|
53
|
-
function isZodErrorLike(err) {
|
|
54
|
-
return err instanceof Error && err.name === "ZodError" && "issues" in err && Array.isArray(err.issues);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// lib/ValidationError.ts
|
|
58
|
-
var ValidationError = class extends Error {
|
|
59
|
-
name;
|
|
60
|
-
details;
|
|
61
|
-
constructor(message, options) {
|
|
62
|
-
super(message, options);
|
|
63
|
-
this.name = "ZodValidationError";
|
|
64
|
-
this.details = getIssuesFromErrorOptions(options);
|
|
65
|
-
}
|
|
66
|
-
toString() {
|
|
67
|
-
return this.message;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
function getIssuesFromErrorOptions(options) {
|
|
71
|
-
if (options) {
|
|
72
|
-
const cause = options.cause;
|
|
73
|
-
if (isZodErrorLike(cause)) {
|
|
74
|
-
return cause.issues;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return [];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// lib/isValidationError.ts
|
|
81
|
-
function isValidationError(err) {
|
|
82
|
-
return err instanceof ValidationError;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// lib/isValidationErrorLike.ts
|
|
86
|
-
function isValidationErrorLike(err) {
|
|
87
|
-
return err instanceof Error && err.name === "ZodValidationError";
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// lib/fromZodIssue.ts
|
|
91
|
-
var zod = __toESM(__nccwpck_require__(934));
|
|
92
|
-
|
|
93
|
-
// lib/config.ts
|
|
94
|
-
var ISSUE_SEPARATOR = "; ";
|
|
95
|
-
var MAX_ISSUES_IN_MESSAGE = 99;
|
|
96
|
-
var PREFIX = "Validation error";
|
|
97
|
-
var PREFIX_SEPARATOR = ": ";
|
|
98
|
-
var UNION_SEPARATOR = ", or ";
|
|
99
|
-
|
|
100
|
-
// lib/prefixMessage.ts
|
|
101
|
-
function prefixMessage(message, prefix, prefixSeparator) {
|
|
102
|
-
if (prefix !== null) {
|
|
103
|
-
if (message.length > 0) {
|
|
104
|
-
return [prefix, message].join(prefixSeparator);
|
|
105
|
-
}
|
|
106
|
-
return prefix;
|
|
107
|
-
}
|
|
108
|
-
if (message.length > 0) {
|
|
109
|
-
return message;
|
|
110
|
-
}
|
|
111
|
-
return PREFIX;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// lib/utils/joinPath.ts
|
|
115
|
-
var identifierRegex = /[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;
|
|
116
|
-
function joinPath(path) {
|
|
117
|
-
if (path.length === 1) {
|
|
118
|
-
return path[0].toString();
|
|
119
|
-
}
|
|
120
|
-
return path.reduce((acc, item) => {
|
|
121
|
-
if (typeof item === "number") {
|
|
122
|
-
return acc + "[" + item.toString() + "]";
|
|
123
|
-
}
|
|
124
|
-
if (item.includes('"')) {
|
|
125
|
-
return acc + '["' + escapeQuotes(item) + '"]';
|
|
126
|
-
}
|
|
127
|
-
if (!identifierRegex.test(item)) {
|
|
128
|
-
return acc + '["' + item + '"]';
|
|
129
|
-
}
|
|
130
|
-
const separator = acc.length === 0 ? "" : ".";
|
|
131
|
-
return acc + separator + item;
|
|
132
|
-
}, "");
|
|
133
|
-
}
|
|
134
|
-
function escapeQuotes(str) {
|
|
135
|
-
return str.replace(/"/g, '\\"');
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// lib/utils/NonEmptyArray.ts
|
|
139
|
-
function isNonEmptyArray(value) {
|
|
140
|
-
return value.length !== 0;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// lib/fromZodIssue.ts
|
|
144
|
-
function getMessageFromZodIssue(props) {
|
|
145
|
-
const { issue, issueSeparator, unionSeparator, includePath } = props;
|
|
146
|
-
if (issue.code === "invalid_union") {
|
|
147
|
-
return issue.unionErrors.reduce((acc, zodError) => {
|
|
148
|
-
const newIssues = zodError.issues.map(
|
|
149
|
-
(issue2) => getMessageFromZodIssue({
|
|
150
|
-
issue: issue2,
|
|
151
|
-
issueSeparator,
|
|
152
|
-
unionSeparator,
|
|
153
|
-
includePath
|
|
154
|
-
})
|
|
155
|
-
).join(issueSeparator);
|
|
156
|
-
if (!acc.includes(newIssues)) {
|
|
157
|
-
acc.push(newIssues);
|
|
158
|
-
}
|
|
159
|
-
return acc;
|
|
160
|
-
}, []).join(unionSeparator);
|
|
161
|
-
}
|
|
162
|
-
if (issue.code === "invalid_arguments") {
|
|
163
|
-
return [
|
|
164
|
-
issue.message,
|
|
165
|
-
...issue.argumentsError.issues.map(
|
|
166
|
-
(issue2) => getMessageFromZodIssue({
|
|
167
|
-
issue: issue2,
|
|
168
|
-
issueSeparator,
|
|
169
|
-
unionSeparator,
|
|
170
|
-
includePath
|
|
171
|
-
})
|
|
172
|
-
)
|
|
173
|
-
].join(issueSeparator);
|
|
174
|
-
}
|
|
175
|
-
if (issue.code === "invalid_return_type") {
|
|
176
|
-
return [
|
|
177
|
-
issue.message,
|
|
178
|
-
...issue.returnTypeError.issues.map(
|
|
179
|
-
(issue2) => getMessageFromZodIssue({
|
|
180
|
-
issue: issue2,
|
|
181
|
-
issueSeparator,
|
|
182
|
-
unionSeparator,
|
|
183
|
-
includePath
|
|
184
|
-
})
|
|
185
|
-
)
|
|
186
|
-
].join(issueSeparator);
|
|
187
|
-
}
|
|
188
|
-
if (includePath && isNonEmptyArray(issue.path)) {
|
|
189
|
-
if (issue.path.length === 1) {
|
|
190
|
-
const identifier = issue.path[0];
|
|
191
|
-
if (typeof identifier === "number") {
|
|
192
|
-
return `${issue.message} at index ${identifier}`;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
return `${issue.message} at "${joinPath(issue.path)}"`;
|
|
196
|
-
}
|
|
197
|
-
return issue.message;
|
|
198
|
-
}
|
|
199
|
-
function fromZodIssue(issue, options = {}) {
|
|
200
|
-
const {
|
|
201
|
-
issueSeparator = ISSUE_SEPARATOR,
|
|
202
|
-
unionSeparator = UNION_SEPARATOR,
|
|
203
|
-
prefixSeparator = PREFIX_SEPARATOR,
|
|
204
|
-
prefix = PREFIX,
|
|
205
|
-
includePath = true
|
|
206
|
-
} = options;
|
|
207
|
-
const reason = getMessageFromZodIssue({
|
|
208
|
-
issue,
|
|
209
|
-
issueSeparator,
|
|
210
|
-
unionSeparator,
|
|
211
|
-
includePath
|
|
212
|
-
});
|
|
213
|
-
const message = prefixMessage(reason, prefix, prefixSeparator);
|
|
214
|
-
return new ValidationError(message, { cause: new zod.ZodError([issue]) });
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// lib/errorMap.ts
|
|
218
|
-
var errorMap = (issue, ctx) => {
|
|
219
|
-
const error = fromZodIssue({
|
|
220
|
-
...issue,
|
|
221
|
-
// fallback to the default error message
|
|
222
|
-
// when issue does not have a message
|
|
223
|
-
message: issue.message ?? ctx.defaultError
|
|
224
|
-
});
|
|
225
|
-
return {
|
|
226
|
-
message: error.message
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
// lib/fromZodError.ts
|
|
231
|
-
function fromZodError(zodError, options = {}) {
|
|
232
|
-
if (!isZodErrorLike(zodError)) {
|
|
233
|
-
throw new TypeError(
|
|
234
|
-
`Invalid zodError param; expected instance of ZodError. Did you mean to use the "${fromError.name}" method instead?`
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
return fromZodErrorWithoutRuntimeCheck(zodError, options);
|
|
238
|
-
}
|
|
239
|
-
function fromZodErrorWithoutRuntimeCheck(zodError, options = {}) {
|
|
240
|
-
const {
|
|
241
|
-
maxIssuesInMessage = MAX_ISSUES_IN_MESSAGE,
|
|
242
|
-
issueSeparator = ISSUE_SEPARATOR,
|
|
243
|
-
unionSeparator = UNION_SEPARATOR,
|
|
244
|
-
prefixSeparator = PREFIX_SEPARATOR,
|
|
245
|
-
prefix = PREFIX,
|
|
246
|
-
includePath = true
|
|
247
|
-
} = options;
|
|
248
|
-
const zodIssues = zodError.errors;
|
|
249
|
-
const reason = zodIssues.length === 0 ? zodError.message : zodIssues.slice(0, maxIssuesInMessage).map(
|
|
250
|
-
(issue) => getMessageFromZodIssue({
|
|
251
|
-
issue,
|
|
252
|
-
issueSeparator,
|
|
253
|
-
unionSeparator,
|
|
254
|
-
includePath
|
|
255
|
-
})
|
|
256
|
-
).join(issueSeparator);
|
|
257
|
-
const message = prefixMessage(reason, prefix, prefixSeparator);
|
|
258
|
-
return new ValidationError(message, { cause: zodError });
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// lib/toValidationError.ts
|
|
262
|
-
var toValidationError = (options = {}) => (err) => {
|
|
263
|
-
if (isZodErrorLike(err)) {
|
|
264
|
-
return fromZodErrorWithoutRuntimeCheck(err, options);
|
|
265
|
-
}
|
|
266
|
-
if (err instanceof Error) {
|
|
267
|
-
return new ValidationError(err.message, { cause: err });
|
|
268
|
-
}
|
|
269
|
-
return new ValidationError("Unknown error");
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
// lib/fromError.ts
|
|
273
|
-
function fromError(err, options = {}) {
|
|
274
|
-
return toValidationError(options)(err);
|
|
275
|
-
}
|
|
276
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
277
|
-
0 && (0);
|
|
278
|
-
//# sourceMappingURL=index.js.map
|
|
279
|
-
|
|
280
|
-
/***/ }),
|
|
281
|
-
|
|
282
|
-
/***/ 934:
|
|
283
|
-
/***/ ((module) => {
|
|
284
|
-
|
|
285
|
-
module.exports = require("../zod");
|
|
286
|
-
|
|
287
|
-
/***/ })
|
|
288
|
-
|
|
289
|
-
/******/ });
|
|
290
|
-
/************************************************************************/
|
|
291
|
-
/******/ // The module cache
|
|
292
|
-
/******/ var __webpack_module_cache__ = {};
|
|
293
|
-
/******/
|
|
294
|
-
/******/ // The require function
|
|
295
|
-
/******/ function __nccwpck_require__(moduleId) {
|
|
296
|
-
/******/ // Check if module is in cache
|
|
297
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
298
|
-
/******/ if (cachedModule !== undefined) {
|
|
299
|
-
/******/ return cachedModule.exports;
|
|
300
|
-
/******/ }
|
|
301
|
-
/******/ // Create a new module (and put it into the cache)
|
|
302
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
303
|
-
/******/ // no module.id needed
|
|
304
|
-
/******/ // no module.loaded needed
|
|
305
|
-
/******/ exports: {}
|
|
306
|
-
/******/ };
|
|
307
|
-
/******/
|
|
308
|
-
/******/ // Execute the module function
|
|
309
|
-
/******/ var threw = true;
|
|
310
|
-
/******/ try {
|
|
311
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
|
|
312
|
-
/******/ threw = false;
|
|
313
|
-
/******/ } finally {
|
|
314
|
-
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
|
315
|
-
/******/ }
|
|
316
|
-
/******/
|
|
317
|
-
/******/ // Return the exports of the module
|
|
318
|
-
/******/ return module.exports;
|
|
319
|
-
/******/ }
|
|
320
|
-
/******/
|
|
321
|
-
/************************************************************************/
|
|
322
|
-
/******/ /* webpack/runtime/compat */
|
|
323
|
-
/******/
|
|
324
|
-
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
|
325
|
-
/******/
|
|
326
|
-
/************************************************************************/
|
|
327
|
-
/******/
|
|
328
|
-
/******/ // startup
|
|
329
|
-
/******/ // Load entry module and return exports
|
|
330
|
-
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
331
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(172);
|
|
332
|
-
/******/ module.exports = __webpack_exports__;
|
|
333
|
-
/******/
|
|
334
|
-
/******/ })()
|
|
335
|
-
;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright 2022 Causaly, Inc <front-end@causaly.com>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"zod-validation-error","author":{"name":"Dimitrios C. Michalakos","email":"dimitris@jmike.gr","url":"https://github.com/jmike"},"version":"3.3.1","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
package/dist/Chunk.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _Chunk_inner, _Chunk_innerCompilation;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.Chunk = void 0;
|
|
16
|
-
const binding_1 = require("@rspack/binding");
|
|
17
|
-
const _1 = require(".");
|
|
18
|
-
const ChunkGroup_1 = require("./ChunkGroup");
|
|
19
|
-
const comparators_1 = require("./util/comparators");
|
|
20
|
-
class Chunk {
|
|
21
|
-
static __from_binding(chunk, compilation) {
|
|
22
|
-
if (compilation instanceof _1.Compilation) {
|
|
23
|
-
return new Chunk(chunk, compilation.__internal_getInner());
|
|
24
|
-
}
|
|
25
|
-
return new Chunk(chunk, compilation);
|
|
26
|
-
}
|
|
27
|
-
constructor(chunk, compilation) {
|
|
28
|
-
_Chunk_inner.set(this, void 0);
|
|
29
|
-
_Chunk_innerCompilation.set(this, void 0);
|
|
30
|
-
__classPrivateFieldSet(this, _Chunk_inner, chunk, "f");
|
|
31
|
-
__classPrivateFieldSet(this, _Chunk_innerCompilation, compilation, "f");
|
|
32
|
-
this.name = chunk.name;
|
|
33
|
-
this.id = chunk.id;
|
|
34
|
-
this.ids = chunk.ids;
|
|
35
|
-
this.idNameHints = chunk.idNameHints;
|
|
36
|
-
this.filenameTemplate = chunk.filenameTemplate;
|
|
37
|
-
this.cssFilenameTemplate = chunk.cssFilenameTemplate;
|
|
38
|
-
this.files = new Set(chunk.files);
|
|
39
|
-
this.runtime = new Set(chunk.runtime);
|
|
40
|
-
this.hash = chunk.hash;
|
|
41
|
-
this.contentHash = chunk.contentHash;
|
|
42
|
-
this.renderedHash = chunk.renderedHash;
|
|
43
|
-
this.chunkReason = chunk.chunkReason;
|
|
44
|
-
this.auxiliaryFiles = new Set(chunk.auxiliaryFiles);
|
|
45
|
-
}
|
|
46
|
-
isOnlyInitial() {
|
|
47
|
-
return (0, binding_1.__chunk_inner_is_only_initial)(__classPrivateFieldGet(this, _Chunk_inner, "f").__inner_ukey, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f"));
|
|
48
|
-
}
|
|
49
|
-
canBeInitial() {
|
|
50
|
-
return (0, binding_1.__chunk_inner_can_be_initial)(__classPrivateFieldGet(this, _Chunk_inner, "f").__inner_ukey, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f"));
|
|
51
|
-
}
|
|
52
|
-
hasRuntime() {
|
|
53
|
-
return (0, binding_1.__chunk_inner_has_runtime)(__classPrivateFieldGet(this, _Chunk_inner, "f").__inner_ukey, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f"));
|
|
54
|
-
}
|
|
55
|
-
get groupsIterable() {
|
|
56
|
-
const chunk_groups = __classPrivateFieldGet(this, _Chunk_inner, "f").__inner_groups.map(ukey => {
|
|
57
|
-
const cg = (0, binding_1.__chunk_group_inner_get_chunk_group)(ukey, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f"));
|
|
58
|
-
return ChunkGroup_1.ChunkGroup.__from_binding(cg, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f"));
|
|
59
|
-
});
|
|
60
|
-
chunk_groups.sort(comparators_1.compareChunkGroupsByIndex);
|
|
61
|
-
return new Set(chunk_groups);
|
|
62
|
-
}
|
|
63
|
-
getChunkMaps(realHash) {
|
|
64
|
-
const chunkHashMap = {};
|
|
65
|
-
const chunkContentHashMap = {};
|
|
66
|
-
const chunkNameMap = {};
|
|
67
|
-
for (const chunk of this.getAllAsyncChunks()) {
|
|
68
|
-
const id = chunk.id;
|
|
69
|
-
if (!id)
|
|
70
|
-
continue;
|
|
71
|
-
const chunkHash = realHash ? chunk.hash : chunk.renderedHash;
|
|
72
|
-
if (chunkHash) {
|
|
73
|
-
chunkHashMap[id] = chunkHash;
|
|
74
|
-
}
|
|
75
|
-
for (const key of Object.keys(chunk.contentHash)) {
|
|
76
|
-
if (!chunkContentHashMap[key]) {
|
|
77
|
-
chunkContentHashMap[key] = {};
|
|
78
|
-
}
|
|
79
|
-
chunkContentHashMap[key][id] = chunk.contentHash[key];
|
|
80
|
-
}
|
|
81
|
-
if (chunk.name) {
|
|
82
|
-
chunkNameMap[id] = chunk.name;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
hash: chunkHashMap,
|
|
87
|
-
contentHash: chunkContentHashMap,
|
|
88
|
-
name: chunkNameMap
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
getAllAsyncChunks() {
|
|
92
|
-
return new Set((0, binding_1.__chunk_inner_get_all_async_chunks)(__classPrivateFieldGet(this, _Chunk_inner, "f").__inner_ukey, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f")).map(c => Chunk.__from_binding(c, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f"))));
|
|
93
|
-
}
|
|
94
|
-
getAllInitialChunks() {
|
|
95
|
-
return new Set((0, binding_1.__chunk_inner_get_all_initial_chunks)(__classPrivateFieldGet(this, _Chunk_inner, "f").__inner_ukey, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f")).map(c => Chunk.__from_binding(c, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f"))));
|
|
96
|
-
}
|
|
97
|
-
getAllReferencedChunks() {
|
|
98
|
-
return new Set((0, binding_1.__chunk_inner_get_all_referenced_chunks)(__classPrivateFieldGet(this, _Chunk_inner, "f").__inner_ukey, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f")).map(c => Chunk.__from_binding(c, __classPrivateFieldGet(this, _Chunk_innerCompilation, "f"))));
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Note: This is not a webpack public API, maybe removed in future.
|
|
102
|
-
*
|
|
103
|
-
* @internal
|
|
104
|
-
*/
|
|
105
|
-
__internal__innerUkey() {
|
|
106
|
-
return __classPrivateFieldGet(this, _Chunk_inner, "f").__inner_ukey;
|
|
107
|
-
}
|
|
108
|
-
__internal_to_path_data_chunk() {
|
|
109
|
-
return {
|
|
110
|
-
id: this.id,
|
|
111
|
-
name: this.name,
|
|
112
|
-
hash: this.hash,
|
|
113
|
-
contentHash: this.contentHash
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
exports.Chunk = Chunk;
|
|
118
|
-
_Chunk_inner = new WeakMap(), _Chunk_innerCompilation = new WeakMap();
|
package/dist/ChunkGraph.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChunkGraph = void 0;
|
|
4
|
-
const binding_1 = require("@rspack/binding");
|
|
5
|
-
const Chunk_1 = require("./Chunk");
|
|
6
|
-
const Module_1 = require("./Module");
|
|
7
|
-
class ChunkGraph {
|
|
8
|
-
constructor(compilation) {
|
|
9
|
-
this.compilation = compilation;
|
|
10
|
-
}
|
|
11
|
-
getChunkModules(chunk) {
|
|
12
|
-
return (0, binding_1.__chunk_graph_inner_get_chunk_modules)(chunk.__internal__innerUkey(), this.compilation.__internal_getInner()).map(m => Module_1.Module.__from_binding(m, this.compilation));
|
|
13
|
-
}
|
|
14
|
-
getChunkModulesIterable(chunk) {
|
|
15
|
-
return new Set((0, binding_1.__chunk_graph_inner_get_chunk_modules)(chunk.__internal__innerUkey(), this.compilation.__internal_getInner()).map(m => Module_1.Module.__from_binding(m, this.compilation)));
|
|
16
|
-
}
|
|
17
|
-
getChunkEntryModulesIterable(chunk) {
|
|
18
|
-
return new Set((0, binding_1.__chunk_graph_inner_get_chunk_entry_modules)(chunk.__internal__innerUkey(), this.compilation.__internal_getInner()).map(m => Module_1.Module.__from_binding(m, this.compilation)));
|
|
19
|
-
}
|
|
20
|
-
getChunkEntryDependentChunksIterable(chunk) {
|
|
21
|
-
return new Set((0, binding_1.__chunk_graph_inner_get_chunk_entry_dependent_chunks_iterable)(chunk.__internal__innerUkey(), this.compilation.__internal_getInner()).map(c => Chunk_1.Chunk.__from_binding(c, this.compilation.__internal_getInner())));
|
|
22
|
-
}
|
|
23
|
-
getChunkModulesIterableBySourceType(chunk, sourceType) {
|
|
24
|
-
return new Set((0, binding_1.__chunk_graph_inner_get_chunk_modules_iterable_by_source_type)(chunk.__internal__innerUkey(), sourceType, this.compilation.__internal_getInner()).map(m => Module_1.Module.__from_binding(m, this.compilation)));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.ChunkGraph = ChunkGraph;
|
package/dist/ChunkGroup.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _ChunkGroup_inner, _ChunkGroup_innerCompilation;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.ChunkGroup = void 0;
|
|
16
|
-
const binding_1 = require("@rspack/binding");
|
|
17
|
-
const Chunk_1 = require("./Chunk");
|
|
18
|
-
class ChunkGroup {
|
|
19
|
-
static __from_binding(chunk, compilation) {
|
|
20
|
-
return new ChunkGroup(chunk, compilation);
|
|
21
|
-
}
|
|
22
|
-
constructor(inner, compilation) {
|
|
23
|
-
_ChunkGroup_inner.set(this, void 0);
|
|
24
|
-
_ChunkGroup_innerCompilation.set(this, void 0);
|
|
25
|
-
__classPrivateFieldSet(this, _ChunkGroup_inner, inner, "f");
|
|
26
|
-
__classPrivateFieldSet(this, _ChunkGroup_innerCompilation, compilation, "f");
|
|
27
|
-
}
|
|
28
|
-
getFiles() {
|
|
29
|
-
const files = new Set();
|
|
30
|
-
for (const chunk of __classPrivateFieldGet(this, _ChunkGroup_inner, "f").chunks) {
|
|
31
|
-
for (const file of chunk.files) {
|
|
32
|
-
files.add(file);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return Array.from(files);
|
|
36
|
-
}
|
|
37
|
-
getParents() {
|
|
38
|
-
return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").__inner_parents.map(parent => {
|
|
39
|
-
const cg = (0, binding_1.__chunk_group_inner_get_chunk_group)(parent, __classPrivateFieldGet(this, _ChunkGroup_innerCompilation, "f"));
|
|
40
|
-
return ChunkGroup.__from_binding(cg, __classPrivateFieldGet(this, _ChunkGroup_innerCompilation, "f"));
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
isInitial() {
|
|
44
|
-
return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").isInitial;
|
|
45
|
-
}
|
|
46
|
-
get chunks() {
|
|
47
|
-
return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").chunks.map(c => Chunk_1.Chunk.__from_binding(c, __classPrivateFieldGet(this, _ChunkGroup_innerCompilation, "f")));
|
|
48
|
-
}
|
|
49
|
-
get index() {
|
|
50
|
-
return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").index;
|
|
51
|
-
}
|
|
52
|
-
get name() {
|
|
53
|
-
return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").name;
|
|
54
|
-
}
|
|
55
|
-
get origins() {
|
|
56
|
-
return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").origins;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Note: This is not a webpack public API, maybe removed in future.
|
|
60
|
-
*
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
__internal__innerUkey() {
|
|
64
|
-
return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").__inner_ukey;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Note: This is not a webpack public API, maybe removed in future.
|
|
68
|
-
*
|
|
69
|
-
* @internal
|
|
70
|
-
*/
|
|
71
|
-
__internal__innerCompilation() {
|
|
72
|
-
return __classPrivateFieldGet(this, _ChunkGroup_innerCompilation, "f");
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.ChunkGroup = ChunkGroup;
|
|
76
|
-
_ChunkGroup_inner = new WeakMap(), _ChunkGroup_innerCompilation = new WeakMap();
|