@eriche/webpack 4.47.0
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 +20 -0
- package/README.md +784 -0
- package/SECURITY.md +9 -0
- package/bin/webpack.js +171 -0
- package/buildin/amd-define.js +3 -0
- package/buildin/amd-options.js +2 -0
- package/buildin/global.js +20 -0
- package/buildin/harmony-module.js +24 -0
- package/buildin/module.js +22 -0
- package/buildin/system.js +7 -0
- package/declarations/WebpackOptions.d.ts +1466 -0
- package/declarations/plugins/BannerPlugin.d.ts +49 -0
- package/declarations/plugins/DllPlugin.d.ts +32 -0
- package/declarations/plugins/DllReferencePlugin.d.ts +126 -0
- package/declarations/plugins/HashedModuleIdsPlugin.d.ts +24 -0
- package/declarations/plugins/IgnorePlugin.d.ts +27 -0
- package/declarations/plugins/LoaderOptionsPlugin.d.ts +27 -0
- package/declarations/plugins/ProgressPlugin.d.ts +42 -0
- package/declarations/plugins/SourceMapDevToolPlugin.d.ts +94 -0
- package/declarations/plugins/WatchIgnorePlugin.d.ts +10 -0
- package/declarations/plugins/debug/ProfilingPlugin.d.ts +12 -0
- package/declarations/plugins/optimize/AggressiveSplittingPlugin.d.ts +24 -0
- package/declarations/plugins/optimize/LimitChunkCountPlugin.d.ts +16 -0
- package/declarations/plugins/optimize/MinChunkSizePlugin.d.ts +12 -0
- package/declarations/plugins/optimize/OccurrenceOrderChunkIdsPlugin.d.ts +12 -0
- package/declarations/plugins/optimize/OccurrenceOrderModuleIdsPlugin.d.ts +12 -0
- package/hot/dev-server.js +61 -0
- package/hot/emitter.js +2 -0
- package/hot/log-apply-result.js +44 -0
- package/hot/log.js +59 -0
- package/hot/only-dev-server.js +102 -0
- package/hot/poll.js +37 -0
- package/hot/signal.js +62 -0
- package/lib/APIPlugin.js +84 -0
- package/lib/AbstractMethodError.js +43 -0
- package/lib/AmdMainTemplatePlugin.js +106 -0
- package/lib/AsyncDependenciesBlock.js +110 -0
- package/lib/AsyncDependencyToInitialChunkError.js +31 -0
- package/lib/AutomaticPrefetchPlugin.js +57 -0
- package/lib/BannerPlugin.js +122 -0
- package/lib/BasicEvaluatedExpression.js +248 -0
- package/lib/CachePlugin.js +100 -0
- package/lib/CaseSensitiveModulesWarning.js +67 -0
- package/lib/Chunk.js +875 -0
- package/lib/ChunkGroup.js +513 -0
- package/lib/ChunkRenderError.js +32 -0
- package/lib/ChunkTemplate.js +87 -0
- package/lib/CommentCompilationWarning.js +32 -0
- package/lib/CommonJsStuffPlugin.js +116 -0
- package/lib/CompatibilityPlugin.js +70 -0
- package/lib/Compilation.js +2327 -0
- package/lib/Compiler.js +735 -0
- package/lib/ConcurrentCompilationError.js +19 -0
- package/lib/ConstPlugin.js +348 -0
- package/lib/ContextExclusionPlugin.js +28 -0
- package/lib/ContextModule.js +872 -0
- package/lib/ContextModuleFactory.js +262 -0
- package/lib/ContextReplacementPlugin.js +133 -0
- package/lib/DefinePlugin.js +289 -0
- package/lib/DelegatedModule.js +114 -0
- package/lib/DelegatedModuleFactoryPlugin.js +95 -0
- package/lib/DelegatedPlugin.js +39 -0
- package/lib/DependenciesBlock.js +124 -0
- package/lib/DependenciesBlockVariable.js +72 -0
- package/lib/Dependency.js +89 -0
- package/lib/DllEntryPlugin.js +54 -0
- package/lib/DllModule.js +60 -0
- package/lib/DllModuleFactory.js +29 -0
- package/lib/DllPlugin.js +49 -0
- package/lib/DllReferencePlugin.js +156 -0
- package/lib/DynamicEntryPlugin.js +94 -0
- package/lib/EntryModuleNotFoundError.js +21 -0
- package/lib/EntryOptionPlugin.js +46 -0
- package/lib/Entrypoint.js +64 -0
- package/lib/EnvironmentPlugin.js +72 -0
- package/lib/ErrorHelpers.js +60 -0
- package/lib/EvalDevToolModulePlugin.js +27 -0
- package/lib/EvalDevToolModuleTemplatePlugin.js +61 -0
- package/lib/EvalSourceMapDevToolModuleTemplatePlugin.js +120 -0
- package/lib/EvalSourceMapDevToolPlugin.js +41 -0
- package/lib/ExportPropertyMainTemplatePlugin.js +53 -0
- package/lib/ExtendedAPIPlugin.js +88 -0
- package/lib/ExternalModule.js +179 -0
- package/lib/ExternalModuleFactoryPlugin.js +110 -0
- package/lib/ExternalsPlugin.js +23 -0
- package/lib/FlagAllModulesAsUsedPlugin.js +38 -0
- package/lib/FlagDependencyExportsPlugin.js +174 -0
- package/lib/FlagDependencyUsagePlugin.js +116 -0
- package/lib/FlagInitialModulesAsUsedPlugin.js +36 -0
- package/lib/FunctionModulePlugin.js +19 -0
- package/lib/FunctionModuleTemplatePlugin.js +102 -0
- package/lib/Generator.js +60 -0
- package/lib/GraphHelpers.js +65 -0
- package/lib/HarmonyLinkingError.js +17 -0
- package/lib/HashedModuleIdsPlugin.js +63 -0
- package/lib/HotModuleReplacement.runtime.js +721 -0
- package/lib/HotModuleReplacementPlugin.js +425 -0
- package/lib/HotUpdateChunk.js +17 -0
- package/lib/HotUpdateChunkTemplate.js +78 -0
- package/lib/IgnorePlugin.js +91 -0
- package/lib/JavascriptGenerator.js +229 -0
- package/lib/JavascriptModulesPlugin.js +185 -0
- package/lib/JsonGenerator.js +57 -0
- package/lib/JsonModulesPlugin.js +30 -0
- package/lib/JsonParser.js +27 -0
- package/lib/LibManifestPlugin.js +90 -0
- package/lib/LibraryTemplatePlugin.js +186 -0
- package/lib/LoaderOptionsPlugin.js +58 -0
- package/lib/LoaderTargetPlugin.js +24 -0
- package/lib/MainTemplate.js +568 -0
- package/lib/MemoryOutputFileSystem.js +5 -0
- package/lib/Module.js +435 -0
- package/lib/ModuleBuildError.js +52 -0
- package/lib/ModuleDependencyError.js +35 -0
- package/lib/ModuleDependencyWarning.js +25 -0
- package/lib/ModuleError.js +36 -0
- package/lib/ModuleFilenameHelpers.js +179 -0
- package/lib/ModuleNotFoundError.js +23 -0
- package/lib/ModuleParseError.js +67 -0
- package/lib/ModuleReason.js +48 -0
- package/lib/ModuleTemplate.js +93 -0
- package/lib/ModuleWarning.js +36 -0
- package/lib/MultiCompiler.js +290 -0
- package/lib/MultiEntryPlugin.js +80 -0
- package/lib/MultiModule.js +87 -0
- package/lib/MultiModuleFactory.js +23 -0
- package/lib/MultiStats.js +92 -0
- package/lib/MultiWatching.js +50 -0
- package/lib/NamedChunksPlugin.js +29 -0
- package/lib/NamedModulesPlugin.js +58 -0
- package/lib/NoEmitOnErrorsPlugin.js +20 -0
- package/lib/NoModeWarning.js +23 -0
- package/lib/NodeStuffPlugin.js +118 -0
- package/lib/NormalModule.js +582 -0
- package/lib/NormalModuleFactory.js +528 -0
- package/lib/NormalModuleReplacementPlugin.js +51 -0
- package/lib/NullFactory.js +12 -0
- package/lib/OptionsApply.js +10 -0
- package/lib/OptionsDefaulter.js +141 -0
- package/lib/Parser.js +2454 -0
- package/lib/ParserHelpers.js +103 -0
- package/lib/PrefetchPlugin.js +37 -0
- package/lib/ProgressPlugin.js +307 -0
- package/lib/ProvidePlugin.js +86 -0
- package/lib/RawModule.js +56 -0
- package/lib/RecordIdsPlugin.js +236 -0
- package/lib/RemovedPluginError.js +11 -0
- package/lib/RequestShortener.js +83 -0
- package/lib/RequireJsStuffPlugin.js +66 -0
- package/lib/ResolverFactory.js +74 -0
- package/lib/RuleSet.js +567 -0
- package/lib/RuntimeTemplate.js +336 -0
- package/lib/SetVarMainTemplatePlugin.js +69 -0
- package/lib/SingleEntryPlugin.js +63 -0
- package/lib/SizeFormatHelpers.js +24 -0
- package/lib/SourceMapDevToolModuleOptionsPlugin.js +49 -0
- package/lib/SourceMapDevToolPlugin.js +418 -0
- package/lib/Stats.js +1685 -0
- package/lib/SystemMainTemplatePlugin.js +137 -0
- package/lib/Template.js +291 -0
- package/lib/TemplatedPathPlugin.js +188 -0
- package/lib/UmdMainTemplatePlugin.js +305 -0
- package/lib/UnsupportedFeatureWarning.js +30 -0
- package/lib/UseStrictPlugin.js +54 -0
- package/lib/WarnCaseSensitiveModulesPlugin.js +37 -0
- package/lib/WarnNoModeSetPlugin.js +17 -0
- package/lib/WatchIgnorePlugin.js +106 -0
- package/lib/Watching.js +211 -0
- package/lib/WebpackError.js +31 -0
- package/lib/WebpackOptionsApply.js +546 -0
- package/lib/WebpackOptionsDefaulter.js +391 -0
- package/lib/WebpackOptionsValidationError.js +390 -0
- package/lib/buildChunkGraph.js +712 -0
- package/lib/compareLocations.js +52 -0
- package/lib/debug/ProfilingPlugin.js +442 -0
- package/lib/dependencies/AMDDefineDependency.js +137 -0
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +336 -0
- package/lib/dependencies/AMDPlugin.js +249 -0
- package/lib/dependencies/AMDRequireArrayDependency.js +49 -0
- package/lib/dependencies/AMDRequireContextDependency.js +20 -0
- package/lib/dependencies/AMDRequireDependenciesBlock.js +47 -0
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +274 -0
- package/lib/dependencies/AMDRequireDependency.js +135 -0
- package/lib/dependencies/AMDRequireItemDependency.js +22 -0
- package/lib/dependencies/CommonJsPlugin.js +158 -0
- package/lib/dependencies/CommonJsRequireContextDependency.js +23 -0
- package/lib/dependencies/CommonJsRequireDependency.js +22 -0
- package/lib/dependencies/CommonJsRequireDependencyParserPlugin.js +138 -0
- package/lib/dependencies/ConstDependency.js +33 -0
- package/lib/dependencies/ContextDependency.js +68 -0
- package/lib/dependencies/ContextDependencyHelpers.js +232 -0
- package/lib/dependencies/ContextDependencyTemplateAsId.js +43 -0
- package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +39 -0
- package/lib/dependencies/ContextElementDependency.js +21 -0
- package/lib/dependencies/CriticalDependencyWarning.js +20 -0
- package/lib/dependencies/DelegatedExportsDependency.js +33 -0
- package/lib/dependencies/DelegatedSourceDependency.js +18 -0
- package/lib/dependencies/DependencyReference.js +64 -0
- package/lib/dependencies/DllEntryDependency.js +20 -0
- package/lib/dependencies/HarmonyAcceptDependency.js +48 -0
- package/lib/dependencies/HarmonyAcceptImportDependency.js +23 -0
- package/lib/dependencies/HarmonyCompatibilityDependency.js +31 -0
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +96 -0
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +154 -0
- package/lib/dependencies/HarmonyExportExpressionDependency.js +58 -0
- package/lib/dependencies/HarmonyExportHeaderDependency.js +30 -0
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +659 -0
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +54 -0
- package/lib/dependencies/HarmonyImportDependency.js +109 -0
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +222 -0
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +31 -0
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +163 -0
- package/lib/dependencies/HarmonyInitDependency.js +60 -0
- package/lib/dependencies/HarmonyModulesPlugin.js +143 -0
- package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +26 -0
- package/lib/dependencies/ImportContextDependency.js +23 -0
- package/lib/dependencies/ImportDependenciesBlock.js +18 -0
- package/lib/dependencies/ImportDependency.js +34 -0
- package/lib/dependencies/ImportEagerDependency.js +32 -0
- package/lib/dependencies/ImportParserPlugin.js +248 -0
- package/lib/dependencies/ImportPlugin.js +79 -0
- package/lib/dependencies/ImportWeakDependency.js +34 -0
- package/lib/dependencies/JsonExportsDependency.js +26 -0
- package/lib/dependencies/LoaderDependency.js +21 -0
- package/lib/dependencies/LoaderPlugin.js +115 -0
- package/lib/dependencies/LocalModule.js +23 -0
- package/lib/dependencies/LocalModuleDependency.js +28 -0
- package/lib/dependencies/LocalModulesHelpers.js +52 -0
- package/lib/dependencies/ModuleDependency.js +23 -0
- package/lib/dependencies/ModuleDependencyTemplateAsId.js +17 -0
- package/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +17 -0
- package/lib/dependencies/ModuleHotAcceptDependency.js +23 -0
- package/lib/dependencies/ModuleHotDeclineDependency.js +23 -0
- package/lib/dependencies/MultiEntryDependency.js +25 -0
- package/lib/dependencies/NullDependency.js +20 -0
- package/lib/dependencies/PrefetchDependency.js +18 -0
- package/lib/dependencies/RequireContextDependency.js +22 -0
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +56 -0
- package/lib/dependencies/RequireContextPlugin.js +143 -0
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +33 -0
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +116 -0
- package/lib/dependencies/RequireEnsureDependency.js +58 -0
- package/lib/dependencies/RequireEnsureItemDependency.js +21 -0
- package/lib/dependencies/RequireEnsurePlugin.js +74 -0
- package/lib/dependencies/RequireHeaderDependency.js +26 -0
- package/lib/dependencies/RequireIncludeDependency.js +39 -0
- package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +23 -0
- package/lib/dependencies/RequireIncludePlugin.js +61 -0
- package/lib/dependencies/RequireResolveContextDependency.js +23 -0
- package/lib/dependencies/RequireResolveDependency.js +22 -0
- package/lib/dependencies/RequireResolveDependencyParserPlugin.js +86 -0
- package/lib/dependencies/RequireResolveHeaderDependency.js +26 -0
- package/lib/dependencies/SingleEntryDependency.js +21 -0
- package/lib/dependencies/SystemPlugin.js +122 -0
- package/lib/dependencies/UnsupportedDependency.js +27 -0
- package/lib/dependencies/WebAssemblyExportImportedDependency.js +31 -0
- package/lib/dependencies/WebAssemblyImportDependency.js +54 -0
- package/lib/dependencies/WebpackMissingModule.js +20 -0
- package/lib/dependencies/getFunctionExpression.js +52 -0
- package/lib/formatLocation.js +75 -0
- package/lib/logging/Logger.js +128 -0
- package/lib/logging/createConsoleLogger.js +210 -0
- package/lib/logging/runtime.js +36 -0
- package/lib/logging/truncateArgs.js +76 -0
- package/lib/node/NodeChunkTemplatePlugin.js +31 -0
- package/lib/node/NodeEnvironmentPlugin.js +44 -0
- package/lib/node/NodeHotUpdateChunkTemplatePlugin.js +36 -0
- package/lib/node/NodeMainTemplate.runtime.js +32 -0
- package/lib/node/NodeMainTemplateAsync.runtime.js +50 -0
- package/lib/node/NodeMainTemplatePlugin.js +321 -0
- package/lib/node/NodeOutputFileSystem.js +22 -0
- package/lib/node/NodeSourcePlugin.js +141 -0
- package/lib/node/NodeTargetPlugin.js +19 -0
- package/lib/node/NodeTemplatePlugin.js +31 -0
- package/lib/node/NodeWatchFileSystem.js +109 -0
- package/lib/node/ReadFileCompileWasmTemplatePlugin.js +61 -0
- package/lib/node/nodeConsole.js +135 -0
- package/lib/optimize/AggressiveMergingPlugin.js +87 -0
- package/lib/optimize/AggressiveSplittingPlugin.js +294 -0
- package/lib/optimize/ChunkModuleIdRangePlugin.js +66 -0
- package/lib/optimize/ConcatenatedModule.js +1477 -0
- package/lib/optimize/EnsureChunkConditionsPlugin.js +70 -0
- package/lib/optimize/FlagIncludedChunksPlugin.js +99 -0
- package/lib/optimize/LimitChunkCountPlugin.js +231 -0
- package/lib/optimize/MergeDuplicateChunksPlugin.js +78 -0
- package/lib/optimize/MinChunkSizePlugin.js +82 -0
- package/lib/optimize/MinMaxSizeWarning.js +29 -0
- package/lib/optimize/ModuleConcatenationPlugin.js +485 -0
- package/lib/optimize/NaturalChunkOrderPlugin.js +41 -0
- package/lib/optimize/OccurrenceChunkOrderPlugin.js +66 -0
- package/lib/optimize/OccurrenceModuleOrderPlugin.js +112 -0
- package/lib/optimize/OccurrenceOrderPlugin.js +135 -0
- package/lib/optimize/RemoveEmptyChunksPlugin.js +42 -0
- package/lib/optimize/RemoveParentModulesPlugin.js +127 -0
- package/lib/optimize/RuntimeChunkPlugin.js +41 -0
- package/lib/optimize/SideEffectsFlagPlugin.js +352 -0
- package/lib/optimize/SplitChunksPlugin.js +971 -0
- package/lib/performance/AssetsOverSizeLimitWarning.js +30 -0
- package/lib/performance/EntrypointsOverSizeLimitWarning.js +30 -0
- package/lib/performance/NoAsyncChunksWarning.js +21 -0
- package/lib/performance/SizeLimitsPlugin.js +125 -0
- package/lib/util/LazyBucketSortedSet.js +235 -0
- package/lib/util/Queue.js +46 -0
- package/lib/util/Semaphore.js +53 -0
- package/lib/util/SetHelpers.js +48 -0
- package/lib/util/SortableSet.js +140 -0
- package/lib/util/StackedSetMap.js +142 -0
- package/lib/util/TrackingSet.js +35 -0
- package/lib/util/cachedMerge.js +35 -0
- package/lib/util/cleverMerge.js +77 -0
- package/lib/util/createHash.js +174 -0
- package/lib/util/deterministicGrouping.js +274 -0
- package/lib/util/hash/BatchedHash.js +71 -0
- package/lib/util/hash/md4.js +25 -0
- package/lib/util/hash/wasm-hash.js +174 -0
- package/lib/util/identifier.js +127 -0
- package/lib/util/objectToMap.js +16 -0
- package/lib/validateSchema.js +67 -0
- package/lib/wasm/UnsupportedWebAssemblyFeatureError.js +17 -0
- package/lib/wasm/WasmFinalizeExportsPlugin.js +69 -0
- package/lib/wasm/WasmMainTemplatePlugin.js +341 -0
- package/lib/wasm/WebAssemblyGenerator.js +458 -0
- package/lib/wasm/WebAssemblyInInitialChunkError.js +88 -0
- package/lib/wasm/WebAssemblyJavascriptGenerator.js +152 -0
- package/lib/wasm/WebAssemblyModulesPlugin.js +128 -0
- package/lib/wasm/WebAssemblyParser.js +175 -0
- package/lib/wasm/WebAssemblyUtils.js +59 -0
- package/lib/web/FetchCompileWasmTemplatePlugin.js +37 -0
- package/lib/web/JsonpChunkTemplatePlugin.js +71 -0
- package/lib/web/JsonpExportMainTemplatePlugin.js +50 -0
- package/lib/web/JsonpHotUpdateChunkTemplatePlugin.js +39 -0
- package/lib/web/JsonpMainTemplate.runtime.js +71 -0
- package/lib/web/JsonpMainTemplatePlugin.js +615 -0
- package/lib/web/JsonpTemplatePlugin.js +23 -0
- package/lib/web/WebEnvironmentPlugin.js +18 -0
- package/lib/webpack.js +206 -0
- package/lib/webpack.web.js +31 -0
- package/lib/webworker/WebWorkerChunkTemplatePlugin.js +35 -0
- package/lib/webworker/WebWorkerHotUpdateChunkTemplatePlugin.js +40 -0
- package/lib/webworker/WebWorkerMainTemplate.runtime.js +73 -0
- package/lib/webworker/WebWorkerMainTemplatePlugin.js +192 -0
- package/lib/webworker/WebWorkerTemplatePlugin.js +25 -0
- package/package.json +211 -0
- package/schemas/WebpackOptions.json +2285 -0
- package/schemas/ajv.absolutePath.js +57 -0
- package/schemas/plugins/BannerPlugin.json +101 -0
- package/schemas/plugins/DllPlugin.json +36 -0
- package/schemas/plugins/DllReferencePlugin.json +205 -0
- package/schemas/plugins/HashedModuleIdsPlugin.json +26 -0
- package/schemas/plugins/IgnorePlugin.json +37 -0
- package/schemas/plugins/LoaderOptionsPlugin.json +27 -0
- package/schemas/plugins/ProgressPlugin.json +52 -0
- package/schemas/plugins/SourceMapDevToolPlugin.json +185 -0
- package/schemas/plugins/WatchIgnorePlugin.json +18 -0
- package/schemas/plugins/debug/ProfilingPlugin.json +13 -0
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.json +23 -0
- package/schemas/plugins/optimize/LimitChunkCountPlugin.json +16 -0
- package/schemas/plugins/optimize/MinChunkSizePlugin.json +12 -0
- package/schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json +11 -0
- package/schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json +11 -0
- package/web_modules/node-libs-browser.js +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const errorMessage = (schema, data, message) => ({
|
|
4
|
+
keyword: "absolutePath",
|
|
5
|
+
params: { absolutePath: data },
|
|
6
|
+
message: message,
|
|
7
|
+
parentSchema: schema
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const getErrorFor = (shouldBeAbsolute, data, schema) => {
|
|
11
|
+
const message = shouldBeAbsolute
|
|
12
|
+
? `The provided value ${JSON.stringify(data)} is not an absolute path!`
|
|
13
|
+
: `A relative path is expected. However, the provided value ${JSON.stringify(
|
|
14
|
+
data
|
|
15
|
+
)} is an absolute path!`;
|
|
16
|
+
|
|
17
|
+
return errorMessage(schema, data, message);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
module.exports = ajv =>
|
|
21
|
+
ajv.addKeyword("absolutePath", {
|
|
22
|
+
errors: true,
|
|
23
|
+
type: "string",
|
|
24
|
+
compile(expected, schema) {
|
|
25
|
+
function callback(data) {
|
|
26
|
+
let passes = true;
|
|
27
|
+
const isExclamationMarkPresent = data.includes("!");
|
|
28
|
+
|
|
29
|
+
if (isExclamationMarkPresent) {
|
|
30
|
+
callback.errors = [
|
|
31
|
+
errorMessage(
|
|
32
|
+
schema,
|
|
33
|
+
data,
|
|
34
|
+
`The provided value ${JSON.stringify(
|
|
35
|
+
data
|
|
36
|
+
)} contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.`
|
|
37
|
+
)
|
|
38
|
+
];
|
|
39
|
+
passes = false;
|
|
40
|
+
}
|
|
41
|
+
// ?:[A-Za-z]:\\ - Windows absolute path
|
|
42
|
+
// \\\\ - Windows network absolute path
|
|
43
|
+
// \/ - Unix-like OS absolute path
|
|
44
|
+
const isCorrectAbsolutePath =
|
|
45
|
+
expected === /^(?:[A-Za-z]:\\|\\\\|\/)/.test(data);
|
|
46
|
+
if (!isCorrectAbsolutePath) {
|
|
47
|
+
callback.errors = [getErrorFor(expected, data, schema)];
|
|
48
|
+
passes = false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return passes;
|
|
52
|
+
}
|
|
53
|
+
callback.errors = [];
|
|
54
|
+
|
|
55
|
+
return callback;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"definitions": {
|
|
3
|
+
"BannerFunction": {
|
|
4
|
+
"description": "The banner as function, it will be wrapped in a comment",
|
|
5
|
+
"instanceof": "Function",
|
|
6
|
+
"tsType": "(data: { hash: string, chunk: import('../../lib/Chunk'), filename: string, basename: string, query: string}) => string"
|
|
7
|
+
},
|
|
8
|
+
"Rule": {
|
|
9
|
+
"oneOf": [
|
|
10
|
+
{
|
|
11
|
+
"instanceof": "RegExp",
|
|
12
|
+
"tsType": "RegExp"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"Rules": {
|
|
21
|
+
"oneOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"description": "A rule condition",
|
|
26
|
+
"anyOf": [
|
|
27
|
+
{
|
|
28
|
+
"$ref": "#/definitions/Rule"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"$ref": "#/definitions/Rule"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"title": "BannerPluginArgument",
|
|
40
|
+
"oneOf": [
|
|
41
|
+
{
|
|
42
|
+
"title": "BannerPluginOptions",
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"properties": {
|
|
46
|
+
"banner": {
|
|
47
|
+
"description": "Specifies the banner",
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"$ref": "#/definitions/BannerFunction"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"entryOnly": {
|
|
58
|
+
"description": "If true, the banner will only be added to the entry chunks",
|
|
59
|
+
"type": "boolean"
|
|
60
|
+
},
|
|
61
|
+
"exclude": {
|
|
62
|
+
"description": "Exclude all modules matching any of these conditions",
|
|
63
|
+
"anyOf": [
|
|
64
|
+
{
|
|
65
|
+
"$ref": "#/definitions/Rules"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"include": {
|
|
70
|
+
"description": "Include all modules matching any of these conditions",
|
|
71
|
+
"anyOf": [
|
|
72
|
+
{
|
|
73
|
+
"$ref": "#/definitions/Rules"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"raw": {
|
|
78
|
+
"description": "If true, banner will not be wrapped in a comment",
|
|
79
|
+
"type": "boolean"
|
|
80
|
+
},
|
|
81
|
+
"test": {
|
|
82
|
+
"description": "Include all modules that pass test assertion",
|
|
83
|
+
"anyOf": [
|
|
84
|
+
{
|
|
85
|
+
"$ref": "#/definitions/Rules"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": ["banner"]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"$ref": "#/definitions/BannerFunction"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"description": "The banner as string, it will be wrapped in a comment",
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "DllPluginOptions",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"properties": {
|
|
6
|
+
"context": {
|
|
7
|
+
"description": "Context of requests in the manifest file (defaults to the webpack context)",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"minLength": 1
|
|
10
|
+
},
|
|
11
|
+
"entryOnly": {
|
|
12
|
+
"description": "If true, only entry points will be exposed",
|
|
13
|
+
"type": "boolean"
|
|
14
|
+
},
|
|
15
|
+
"format": {
|
|
16
|
+
"description": "If true, manifest json file (output) will be formatted",
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
},
|
|
19
|
+
"name": {
|
|
20
|
+
"description": "Name of the exposed dll function (external name, use value of 'output.library')",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1
|
|
23
|
+
},
|
|
24
|
+
"path": {
|
|
25
|
+
"description": "Absolute path to the manifest json file (output)",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1
|
|
28
|
+
},
|
|
29
|
+
"type": {
|
|
30
|
+
"description": "Type of the dll bundle (external type, use value of 'output.libraryTarget')",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": ["path"]
|
|
36
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
{
|
|
2
|
+
"definitions": {
|
|
3
|
+
"DllReferencePluginOptionsContent": {
|
|
4
|
+
"description": "The mappings from request to module info",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": {
|
|
7
|
+
"description": "Module info",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"buildMeta": {
|
|
12
|
+
"description": "Meta information about the module",
|
|
13
|
+
"type": "object"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
"description": "Information about the provided exports of the module",
|
|
17
|
+
"anyOf": [
|
|
18
|
+
{
|
|
19
|
+
"description": "Exports unknown/dynamic",
|
|
20
|
+
"enum": [true]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"description": "List of provided exports of the module",
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"description": "Name of the export",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"id": {
|
|
34
|
+
"description": "Module ID",
|
|
35
|
+
"anyOf": [
|
|
36
|
+
{
|
|
37
|
+
"type": "number"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": ["id"]
|
|
47
|
+
},
|
|
48
|
+
"minProperties": 1
|
|
49
|
+
},
|
|
50
|
+
"DllReferencePluginOptionsManifest": {
|
|
51
|
+
"description": "An object containing content, name and type",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"properties": {
|
|
55
|
+
"content": {
|
|
56
|
+
"description": "The mappings from request to module info",
|
|
57
|
+
"anyOf": [
|
|
58
|
+
{
|
|
59
|
+
"$ref": "#/definitions/DllReferencePluginOptionsContent"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"name": {
|
|
64
|
+
"description": "The name where the dll is exposed (external name)",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1
|
|
67
|
+
},
|
|
68
|
+
"type": {
|
|
69
|
+
"description": "The type how the dll is exposed (external type)",
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{
|
|
72
|
+
"$ref": "#/definitions/DllReferencePluginOptionsSourceType"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": ["content"]
|
|
78
|
+
},
|
|
79
|
+
"DllReferencePluginOptionsSourceType": {
|
|
80
|
+
"description": "The type how the dll is exposed (external type)",
|
|
81
|
+
"enum": [
|
|
82
|
+
"var",
|
|
83
|
+
"assign",
|
|
84
|
+
"this",
|
|
85
|
+
"window",
|
|
86
|
+
"global",
|
|
87
|
+
"commonjs",
|
|
88
|
+
"commonjs2",
|
|
89
|
+
"commonjs-module",
|
|
90
|
+
"amd",
|
|
91
|
+
"amd-require",
|
|
92
|
+
"umd",
|
|
93
|
+
"umd2",
|
|
94
|
+
"jsonp"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"title": "DllReferencePluginOptions",
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"properties": {
|
|
104
|
+
"context": {
|
|
105
|
+
"description": "(absolute path) context of requests in the manifest (or content property)",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"absolutePath": true
|
|
108
|
+
},
|
|
109
|
+
"extensions": {
|
|
110
|
+
"description": "Extensions used to resolve modules in the dll bundle (only used when using 'scope')",
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"description": "An extension",
|
|
114
|
+
"type": "string"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"manifest": {
|
|
118
|
+
"description": "An object containing content and name or a string to the absolute path of the JSON manifest to be loaded upon compilation",
|
|
119
|
+
"oneOf": [
|
|
120
|
+
{
|
|
121
|
+
"$ref": "#/definitions/DllReferencePluginOptionsManifest"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "string",
|
|
125
|
+
"absolutePath": true
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"name": {
|
|
130
|
+
"description": "The name where the dll is exposed (external name, defaults to manifest.name)",
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1
|
|
133
|
+
},
|
|
134
|
+
"scope": {
|
|
135
|
+
"description": "Prefix which is used for accessing the content of the dll",
|
|
136
|
+
"type": "string",
|
|
137
|
+
"minLength": 1
|
|
138
|
+
},
|
|
139
|
+
"sourceType": {
|
|
140
|
+
"description": "How the dll is exposed (libraryTarget, defaults to manifest.type)",
|
|
141
|
+
"anyOf": [
|
|
142
|
+
{
|
|
143
|
+
"$ref": "#/definitions/DllReferencePluginOptionsSourceType"
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"type": {
|
|
148
|
+
"description": "The way how the export of the dll bundle is used",
|
|
149
|
+
"enum": ["require", "object"]
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": ["manifest"]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "object",
|
|
156
|
+
"additionalProperties": false,
|
|
157
|
+
"properties": {
|
|
158
|
+
"content": {
|
|
159
|
+
"description": "The mappings from request to module info",
|
|
160
|
+
"anyOf": [
|
|
161
|
+
{
|
|
162
|
+
"$ref": "#/definitions/DllReferencePluginOptionsContent"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"context": {
|
|
167
|
+
"description": "(absolute path) context of requests in the manifest (or content property)",
|
|
168
|
+
"type": "string",
|
|
169
|
+
"absolutePath": true
|
|
170
|
+
},
|
|
171
|
+
"extensions": {
|
|
172
|
+
"description": "Extensions used to resolve modules in the dll bundle (only used when using 'scope')",
|
|
173
|
+
"type": "array",
|
|
174
|
+
"items": {
|
|
175
|
+
"description": "An extension",
|
|
176
|
+
"type": "string"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"name": {
|
|
180
|
+
"description": "The name where the dll is exposed (external name)",
|
|
181
|
+
"type": "string",
|
|
182
|
+
"minLength": 1
|
|
183
|
+
},
|
|
184
|
+
"scope": {
|
|
185
|
+
"description": "Prefix which is used for accessing the content of the dll",
|
|
186
|
+
"type": "string",
|
|
187
|
+
"minLength": 1
|
|
188
|
+
},
|
|
189
|
+
"sourceType": {
|
|
190
|
+
"description": "How the dll is exposed (libraryTarget)",
|
|
191
|
+
"anyOf": [
|
|
192
|
+
{
|
|
193
|
+
"$ref": "#/definitions/DllReferencePluginOptionsSourceType"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"type": {
|
|
198
|
+
"description": "The way how the export of the dll bundle is used",
|
|
199
|
+
"enum": ["require", "object"]
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"required": ["content", "name"]
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "HashedModuleIdsPluginOptions",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"properties": {
|
|
6
|
+
"context": {
|
|
7
|
+
"description": "The context directory for creating names.",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"absolutePath": true
|
|
10
|
+
},
|
|
11
|
+
"hashDigest": {
|
|
12
|
+
"description": "The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.",
|
|
13
|
+
"enum": ["hex", "latin1", "base64"]
|
|
14
|
+
},
|
|
15
|
+
"hashDigestLength": {
|
|
16
|
+
"description": "The prefix length of the hash digest to use, defaults to 4.",
|
|
17
|
+
"type": "number",
|
|
18
|
+
"minimum": 1
|
|
19
|
+
},
|
|
20
|
+
"hashFunction": {
|
|
21
|
+
"description": "The hashing algorithm to use, defaults to 'md5'. All functions from Node.JS' crypto.createHash are supported.",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "IgnorePluginOptions",
|
|
3
|
+
"oneOf": [
|
|
4
|
+
{
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"contextRegExp": {
|
|
9
|
+
"description": "A RegExp to test the context (directory) against",
|
|
10
|
+
"instanceof": "RegExp",
|
|
11
|
+
"tsType": "RegExp"
|
|
12
|
+
},
|
|
13
|
+
"resourceRegExp": {
|
|
14
|
+
"description": "A RegExp to test the request against",
|
|
15
|
+
"instanceof": "RegExp",
|
|
16
|
+
"tsType": "RegExp"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"properties": {
|
|
24
|
+
"checkContext": {
|
|
25
|
+
"description": "A filter function for context",
|
|
26
|
+
"instanceof": "Function",
|
|
27
|
+
"tsType": "((context: string) => boolean)"
|
|
28
|
+
},
|
|
29
|
+
"checkResource": {
|
|
30
|
+
"description": "A filter function for resource and context",
|
|
31
|
+
"instanceof": "Function",
|
|
32
|
+
"tsType": "((resource: string, context: string) => boolean)"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "LoaderOptionsPluginOptions",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"additionalProperties": true,
|
|
5
|
+
"properties": {
|
|
6
|
+
"debug": {
|
|
7
|
+
"description": "Whether loaders should be in debug mode or not. debug will be removed as of webpack 3",
|
|
8
|
+
"type": "boolean"
|
|
9
|
+
},
|
|
10
|
+
"minimize": {
|
|
11
|
+
"description": "Where loaders can be switched to minimize mode",
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
},
|
|
14
|
+
"options": {
|
|
15
|
+
"description": "A configuration object that can be used to configure older loaders",
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": true,
|
|
18
|
+
"properties": {
|
|
19
|
+
"context": {
|
|
20
|
+
"description": "The context that can be used to configure older loaders",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"absolutePath": true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"definitions": {
|
|
3
|
+
"HandlerFunction": {
|
|
4
|
+
"description": "Function that executes for every progress step",
|
|
5
|
+
"instanceof": "Function",
|
|
6
|
+
"tsType": "((percentage: number, msg: string, ...args: string[]) => void)"
|
|
7
|
+
},
|
|
8
|
+
"ProgressPluginOptions": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"properties": {
|
|
12
|
+
"activeModules": {
|
|
13
|
+
"description": "Show active modules count and one active module in progress message",
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
},
|
|
16
|
+
"entries": {
|
|
17
|
+
"description": "Show entries count in progress message",
|
|
18
|
+
"type": "boolean"
|
|
19
|
+
},
|
|
20
|
+
"handler": {
|
|
21
|
+
"description": "Function that executes for every progress step",
|
|
22
|
+
"anyOf": [
|
|
23
|
+
{
|
|
24
|
+
"$ref": "#/definitions/HandlerFunction"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"modules": {
|
|
29
|
+
"description": "Show modules count in progress message",
|
|
30
|
+
"type": "boolean"
|
|
31
|
+
},
|
|
32
|
+
"modulesCount": {
|
|
33
|
+
"description": "Minimum modules count to start with. Only for mode=modules. Default: 500",
|
|
34
|
+
"type": "number"
|
|
35
|
+
},
|
|
36
|
+
"profile": {
|
|
37
|
+
"description": "Collect profile data for progress steps. Default: false",
|
|
38
|
+
"enum": [true, false, null]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"title": "ProgressPluginArgument",
|
|
44
|
+
"oneOf": [
|
|
45
|
+
{
|
|
46
|
+
"$ref": "#/definitions/ProgressPluginOptions"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"$ref": "#/definitions/HandlerFunction"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|