xhs-mp-pack 1.1.0-beta.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/README.md +1 -0
- package/dist/Compilation.d.ts +239 -0
- package/dist/Compilation.js +3513 -0
- package/dist/Compiler.d.ts +76 -0
- package/dist/Compiler.js +845 -0
- package/dist/ConcatenationScope.d.ts +37 -0
- package/dist/ConcatenationScope.js +69 -0
- package/dist/FileSystemInfo.d.ts +183 -0
- package/dist/FileSystemInfo.js +2896 -0
- package/dist/MPPack.d.ts +33 -0
- package/dist/MPPack.js +163 -0
- package/dist/MPPackSetting.d.ts +52 -0
- package/dist/MPPackSetting.js +85 -0
- package/dist/MultiCompiler.d.ts +25 -0
- package/dist/MultiCompiler.js +387 -0
- package/dist/MultiWatching.d.ts +11 -0
- package/dist/MultiWatching.js +54 -0
- package/dist/PluginManager.d.ts +9 -0
- package/dist/PluginManager.js +359 -0
- package/dist/ResolverFactory.d.ts +7 -0
- package/dist/ResolverFactory.js +84 -0
- package/dist/Watching.d.ts +41 -0
- package/dist/Watching.js +359 -0
- package/dist/base/ArrayHelpers.d.ts +6 -0
- package/dist/base/ArrayHelpers.js +21 -0
- package/dist/base/ArrayQueue.d.ts +29 -0
- package/dist/base/ArrayQueue.js +87 -0
- package/dist/base/AsyncQueue.d.ts +37 -0
- package/dist/base/AsyncQueue.js +263 -0
- package/dist/base/ChunkHelpers.d.ts +3 -0
- package/dist/base/ChunkHelpers.js +26 -0
- package/dist/base/ConditionalInitFragment.d.ts +9 -0
- package/dist/base/ConditionalInitFragment.js +64 -0
- package/dist/base/GraphHelpers.d.ts +6 -0
- package/dist/base/GraphHelpers.js +32 -0
- package/dist/base/Hash.d.ts +6 -0
- package/dist/base/Hash.js +13 -0
- package/dist/base/InitFragment.d.ts +22 -0
- package/dist/base/InitFragment.js +113 -0
- package/dist/base/IterableHelpers.d.ts +4 -0
- package/dist/base/IterableHelpers.js +26 -0
- package/dist/base/LazyBucketSortedSet.d.ts +34 -0
- package/dist/base/LazyBucketSortedSet.js +188 -0
- package/dist/base/LazySet.d.ts +35 -0
- package/dist/base/LazySet.js +155 -0
- package/dist/base/MapHelpers.d.ts +14 -0
- package/dist/base/MapHelpers.js +27 -0
- package/dist/base/ModuleFilenameHelpers.d.ts +95 -0
- package/dist/base/ModuleFilenameHelpers.js +314 -0
- package/dist/base/NodeWatchFileSystem.d.ts +23 -0
- package/dist/base/NodeWatchFileSystem.js +135 -0
- package/dist/base/ParallelismFactorCalculator.d.ts +8 -0
- package/dist/base/ParallelismFactorCalculator.js +52 -0
- package/dist/base/Queue.d.ts +12 -0
- package/dist/base/Queue.js +25 -0
- package/dist/base/RequestShortener.d.ts +6 -0
- package/dist/base/RequestShortener.js +15 -0
- package/dist/base/Semaphore.d.ts +12 -0
- package/dist/base/Semaphore.js +37 -0
- package/dist/base/SetHelpers.d.ts +36 -0
- package/dist/base/SetHelpers.js +94 -0
- package/dist/base/SizeFormatHelpers.d.ts +2 -0
- package/dist/base/SizeFormatHelpers.js +15 -0
- package/dist/base/SizeOnlySource.d.ts +14 -0
- package/dist/base/SizeOnlySource.js +34 -0
- package/dist/base/SortableSet.d.ts +18 -0
- package/dist/base/SortableSet.js +90 -0
- package/dist/base/StackedCacheMap.d.ts +20 -0
- package/dist/base/StackedCacheMap.js +73 -0
- package/dist/base/StackedMap.d.ts +17 -0
- package/dist/base/StackedMap.js +103 -0
- package/dist/base/StartupHelpers.d.ts +4 -0
- package/dist/base/StartupHelpers.js +94 -0
- package/dist/base/StringXor.d.ts +53 -0
- package/dist/base/StringXor.js +94 -0
- package/dist/base/TupleQueue.d.ts +10 -0
- package/dist/base/TupleQueue.js +33 -0
- package/dist/base/TupleSet.d.ts +18 -0
- package/dist/base/TupleSet.js +115 -0
- package/dist/base/URLAbsoluteSpecifier.d.ts +3 -0
- package/dist/base/URLAbsoluteSpecifier.js +57 -0
- package/dist/base/WeakTupleMap.d.ts +20 -0
- package/dist/base/WeakTupleMap.js +124 -0
- package/dist/base/binarySearchBounds.d.ts +23 -0
- package/dist/base/binarySearchBounds.js +105 -0
- package/dist/base/cleverMerge.d.ts +27 -0
- package/dist/base/cleverMerge.js +450 -0
- package/dist/base/common.d.ts +7 -0
- package/dist/base/common.js +25 -0
- package/dist/base/commonjs.d.ts +1 -0
- package/dist/base/commonjs.js +48 -0
- package/dist/base/comparators.d.ts +22 -0
- package/dist/base/comparators.js +279 -0
- package/dist/base/compileBooleanMatcher.d.ts +6 -0
- package/dist/base/compileBooleanMatcher.js +162 -0
- package/dist/base/const.d.ts +29 -0
- package/dist/base/const.js +49 -0
- package/dist/base/copyPatterns.d.ts +14 -0
- package/dist/base/copyPatterns.js +501 -0
- package/dist/base/createHash.d.ts +3 -0
- package/dist/base/createHash.js +131 -0
- package/dist/base/defaults.d.ts +3 -0
- package/dist/base/defaults.js +671 -0
- package/dist/base/deprecation.d.ts +21 -0
- package/dist/base/deprecation.js +165 -0
- package/dist/base/deterministicGrouping.d.ts +8 -0
- package/dist/base/deterministicGrouping.js +395 -0
- package/dist/base/errors/AbstractMethodError.d.ts +5 -0
- package/dist/base/errors/AbstractMethodError.js +23 -0
- package/dist/base/errors/AsyncDependencyToInitialChunkError.d.ts +8 -0
- package/dist/base/errors/AsyncDependencyToInitialChunkError.js +18 -0
- package/dist/base/errors/BaseError.d.ts +17 -0
- package/dist/base/errors/BaseError.js +39 -0
- package/dist/base/errors/BuildCycleError.d.ts +8 -0
- package/dist/base/errors/BuildCycleError.js +17 -0
- package/dist/base/errors/CaseSensitiveModulesWarning.d.ts +5 -0
- package/dist/base/errors/CaseSensitiveModulesWarning.js +42 -0
- package/dist/base/errors/ChunkRenderError.d.ts +6 -0
- package/dist/base/errors/ChunkRenderError.js +18 -0
- package/dist/base/errors/CodeGenerationError.d.ts +8 -0
- package/dist/base/errors/CodeGenerationError.js +20 -0
- package/dist/base/errors/CommentCompilationWarning.d.ts +5 -0
- package/dist/base/errors/CommentCompilationWarning.js +16 -0
- package/dist/base/errors/ConcurrentCompilationError.d.ts +4 -0
- package/dist/base/errors/ConcurrentCompilationError.js +15 -0
- package/dist/base/errors/CriticalDependencyWarning.d.ts +5 -0
- package/dist/base/errors/CriticalDependencyWarning.js +16 -0
- package/dist/base/errors/ErrorHelpers.d.ts +8 -0
- package/dist/base/errors/ErrorHelpers.js +51 -0
- package/dist/base/errors/HarmonyLinkingError.d.ts +4 -0
- package/dist/base/errors/HarmonyLinkingError.js +14 -0
- package/dist/base/errors/HookBaseError.d.ts +10 -0
- package/dist/base/errors/HookBaseError.js +51 -0
- package/dist/base/errors/InvalidDependenciesModuleWarning.d.ts +5 -0
- package/dist/base/errors/InvalidDependenciesModuleWarning.js +26 -0
- package/dist/base/errors/MinMaxSizeWarning.d.ts +5 -0
- package/dist/base/errors/MinMaxSizeWarning.js +45 -0
- package/dist/base/errors/ModuleBuildError.d.ts +9 -0
- package/dist/base/errors/ModuleBuildError.js +62 -0
- package/dist/base/errors/ModuleDependencyError.d.ts +8 -0
- package/dist/base/errors/ModuleDependencyError.js +24 -0
- package/dist/base/errors/ModuleDependencyWarning.d.ts +6 -0
- package/dist/base/errors/ModuleDependencyWarning.js +23 -0
- package/dist/base/errors/ModuleError.d.ts +10 -0
- package/dist/base/errors/ModuleError.js +42 -0
- package/dist/base/errors/ModuleHashingError.d.ts +5 -0
- package/dist/base/errors/ModuleHashingError.js +17 -0
- package/dist/base/errors/ModuleNotFoundError.d.ts +5 -0
- package/dist/base/errors/ModuleNotFoundError.js +69 -0
- package/dist/base/errors/ModuleParseError.d.ts +8 -0
- package/dist/base/errors/ModuleParseError.js +77 -0
- package/dist/base/errors/ModuleRestoreError.d.ts +5 -0
- package/dist/base/errors/ModuleRestoreError.js +33 -0
- package/dist/base/errors/ModuleStoreError.d.ts +5 -0
- package/dist/base/errors/ModuleStoreError.js +33 -0
- package/dist/base/errors/ModuleWarning.d.ts +10 -0
- package/dist/base/errors/ModuleWarning.js +44 -0
- package/dist/base/errors/NodeStuffInWebError.d.ts +5 -0
- package/dist/base/errors/NodeStuffInWebError.js +17 -0
- package/dist/base/errors/UnhandledSchemeError.d.ts +5 -0
- package/dist/base/errors/UnhandledSchemeError.js +18 -0
- package/dist/base/errors/UnsupportedFeatureWarning.d.ts +5 -0
- package/dist/base/errors/UnsupportedFeatureWarning.js +17 -0
- package/dist/base/extractUrlAndGlobal.d.ts +1 -0
- package/dist/base/extractUrlAndGlobal.js +10 -0
- package/dist/base/findGraphRoots.d.ts +2 -0
- package/dist/base/findGraphRoots.js +183 -0
- package/dist/base/formatLocation.d.ts +2 -0
- package/dist/base/formatLocation.js +47 -0
- package/dist/base/fs.d.ts +94 -0
- package/dist/base/fs.js +218 -0
- package/dist/base/hash/BatchedHash.d.ts +11 -0
- package/dist/base/hash/BatchedHash.js +47 -0
- package/dist/base/hash/md4.d.ts +2 -0
- package/dist/base/hash/md4.js +10 -0
- package/dist/base/hash/wasm-hash.d.ts +3 -0
- package/dist/base/hash/wasm-hash.js +138 -0
- package/dist/base/hash/xxhash64.d.ts +2 -0
- package/dist/base/hash/xxhash64.js +10 -0
- package/dist/base/identifier.d.ts +30 -0
- package/dist/base/identifier.js +237 -0
- package/dist/base/logging/Logger.d.ts +40 -0
- package/dist/base/logging/Logger.js +128 -0
- package/dist/base/logging/createConsoleLogger.d.ts +6 -0
- package/dist/base/logging/createConsoleLogger.js +161 -0
- package/dist/base/logging/nodeConsole.d.ts +21 -0
- package/dist/base/logging/nodeConsole.js +109 -0
- package/dist/base/logging/runtime.d.ts +8 -0
- package/dist/base/logging/runtime.js +30 -0
- package/dist/base/logging/truncateArgs.d.ts +2 -0
- package/dist/base/logging/truncateArgs.js +66 -0
- package/dist/base/memoize.d.ts +2 -0
- package/dist/base/memoize.js +18 -0
- package/dist/base/missingModule.d.ts +4 -0
- package/dist/base/missingModule.js +16 -0
- package/dist/base/moduleAlias.d.ts +1 -0
- package/dist/base/moduleAlias.js +8 -0
- package/dist/base/nonNumericOnlyHash.d.ts +7 -0
- package/dist/base/nonNumericOnlyHash.js +16 -0
- package/dist/base/normalization.d.ts +32 -0
- package/dist/base/normalization.js +320 -0
- package/dist/base/numberHash.d.ts +17 -0
- package/dist/base/numberHash.js +72 -0
- package/dist/base/objectToMap.d.ts +1 -0
- package/dist/base/objectToMap.js +6 -0
- package/dist/base/processAsyncTree.d.ts +2 -0
- package/dist/base/processAsyncTree.js +45 -0
- package/dist/base/propertyAccess.d.ts +2 -0
- package/dist/base/propertyAccess.js +20 -0
- package/dist/base/propertyName.d.ts +9 -0
- package/dist/base/propertyName.js +71 -0
- package/dist/base/semver.d.ts +25 -0
- package/dist/base/semver.js +425 -0
- package/dist/base/singletontask.d.ts +27 -0
- package/dist/base/singletontask.js +124 -0
- package/dist/base/smartGrouping.d.ts +2 -0
- package/dist/base/smartGrouping.js +138 -0
- package/dist/base/source.d.ts +2 -0
- package/dist/base/source.js +48 -0
- package/dist/base/stats/MultiStats.d.ts +19 -0
- package/dist/base/stats/MultiStats.js +142 -0
- package/dist/base/stats/Stats.d.ts +13 -0
- package/dist/base/stats/Stats.js +49 -0
- package/dist/base/stats/StatsFactory.d.ts +26 -0
- package/dist/base/stats/StatsFactory.js +163 -0
- package/dist/base/stats/StatsPrinter.d.ts +12 -0
- package/dist/base/stats/StatsPrinter.js +104 -0
- package/dist/base/utils.d.ts +5 -0
- package/dist/base/utils.js +35 -0
- package/dist/cache/AddBuildDependenciesPlugin.d.ts +6 -0
- package/dist/cache/AddBuildDependenciesPlugin.js +13 -0
- package/dist/cache/AddManagedPathsPlugin.d.ts +7 -0
- package/dist/cache/AddManagedPathsPlugin.js +17 -0
- package/dist/cache/Cache.d.ts +15 -0
- package/dist/cache/Cache.js +69 -0
- package/dist/cache/CacheFacade.d.ts +37 -0
- package/dist/cache/CacheFacade.js +187 -0
- package/dist/cache/IdleFileCachePlugin.d.ts +9 -0
- package/dist/cache/IdleFileCachePlugin.js +165 -0
- package/dist/cache/MemoryCachePlugin.d.ts +4 -0
- package/dist/cache/MemoryCachePlugin.js +36 -0
- package/dist/cache/MemoryWithGcCachePlugin.d.ts +8 -0
- package/dist/cache/MemoryWithGcCachePlugin.js +104 -0
- package/dist/cache/PackFileCacheStrategy.d.ts +47 -0
- package/dist/cache/PackFileCacheStrategy.js +1085 -0
- package/dist/cache/ResolverCachePlugin.d.ts +4 -0
- package/dist/cache/ResolverCachePlugin.js +248 -0
- package/dist/cache/getLazyHashedEtag.d.ts +2 -0
- package/dist/cache/getLazyHashedEtag.js +53 -0
- package/dist/cache/mergeEtags.d.ts +2 -0
- package/dist/cache/mergeEtags.js +50 -0
- package/dist/chunk/Chunk.d.ts +75 -0
- package/dist/chunk/Chunk.js +445 -0
- package/dist/chunk/ChunkGraph.d.ts +102 -0
- package/dist/chunk/ChunkGraph.js +1037 -0
- package/dist/chunk/ChunkGroup.d.ts +62 -0
- package/dist/chunk/ChunkGroup.js +341 -0
- package/dist/chunk/CodeGenerationResults.d.ts +13 -0
- package/dist/chunk/CodeGenerationResults.js +82 -0
- package/dist/chunk/Entrypoint.d.ts +22 -0
- package/dist/chunk/Entrypoint.js +56 -0
- package/dist/chunk/GraphHelpers.d.ts +3 -0
- package/dist/chunk/GraphHelpers.js +15 -0
- package/dist/chunk/buildChunkGraph.d.ts +2 -0
- package/dist/chunk/buildChunkGraph.js +1067 -0
- package/dist/chunk/chunkFormat/ArrayPushCallbackChunkFormatPlugin.d.ts +4 -0
- package/dist/chunk/chunkFormat/ArrayPushCallbackChunkFormatPlugin.js +101 -0
- package/dist/chunk/chunkLoading/JsonpChunkLoadingPlugin.d.ts +4 -0
- package/dist/chunk/chunkLoading/JsonpChunkLoadingPlugin.js +98 -0
- package/dist/chunk/chunkLoading/JsonpChunkLoadingRuntimeModule.d.ts +15 -0
- package/dist/chunk/chunkLoading/JsonpChunkLoadingRuntimeModule.js +272 -0
- package/dist/dependencies/AsyncDependenciesBlock.d.ts +14 -0
- package/dist/dependencies/AsyncDependenciesBlock.js +64 -0
- package/dist/dependencies/CreateScriptUrlDependency.d.ts +9 -0
- package/dist/dependencies/CreateScriptUrlDependency.js +60 -0
- package/dist/dependencies/DelegatedSourceDependency.d.ts +7 -0
- package/dist/dependencies/DelegatedSourceDependency.js +20 -0
- package/dist/dependencies/DependenciesBlock.d.ts +29 -0
- package/dist/dependencies/DependenciesBlock.js +66 -0
- package/dist/dependencies/Dependency.d.ts +44 -0
- package/dist/dependencies/Dependency.js +171 -0
- package/dist/dependencies/DependencyTemplate.d.ts +4 -0
- package/dist/dependencies/DependencyTemplate.js +9 -0
- package/dist/dependencies/DependencyTemplates.d.ts +12 -0
- package/dist/dependencies/DependencyTemplates.js +34 -0
- package/dist/dependencies/DynamicExports.d.ts +6 -0
- package/dist/dependencies/DynamicExports.js +48 -0
- package/dist/dependencies/ExportsInfoDependency.d.ts +10 -0
- package/dist/dependencies/ExportsInfoDependency.js +80 -0
- package/dist/dependencies/LocalModule.d.ts +11 -0
- package/dist/dependencies/LocalModule.js +33 -0
- package/dist/dependencies/LocalModuleDependency.d.ts +10 -0
- package/dist/dependencies/LocalModuleDependency.js +42 -0
- package/dist/dependencies/LocalModulesHelpers.d.ts +4 -0
- package/dist/dependencies/LocalModulesHelpers.js +48 -0
- package/dist/dependencies/ModuleDecoratorDependency.d.ts +15 -0
- package/dist/dependencies/ModuleDecoratorDependency.js +85 -0
- package/dist/dependencies/ModuleDependency.d.ts +16 -0
- package/dist/dependencies/ModuleDependency.js +53 -0
- package/dist/dependencies/ModuleDependencyTemplateAsId.d.ts +9 -0
- package/dist/dependencies/ModuleDependencyTemplateAsId.js +21 -0
- package/dist/dependencies/ModuleDependencyTemplateAsRequireId.d.ts +10 -0
- package/dist/dependencies/ModuleDependencyTemplateAsRequireId.js +22 -0
- package/dist/dependencies/NullDependency.d.ts +7 -0
- package/dist/dependencies/NullDependency.js +19 -0
- package/dist/dependencies/PureExpressionDependency.d.ts +12 -0
- package/dist/dependencies/PureExpressionDependency.js +73 -0
- package/dist/dependencies/RequireHeaderDependency.d.ts +8 -0
- package/dist/dependencies/RequireHeaderDependency.js +58 -0
- package/dist/dependencies/RequireResolveContextDependency.d.ts +8 -0
- package/dist/dependencies/RequireResolveContextDependency.js +33 -0
- package/dist/dependencies/RequireResolveDependency.d.ts +10 -0
- package/dist/dependencies/RequireResolveDependency.js +29 -0
- package/dist/dependencies/RequireResolveHeaderDependency.d.ts +8 -0
- package/dist/dependencies/RequireResolveHeaderDependency.js +36 -0
- package/dist/dependencies/RuntimeRequirementsDependency.d.ts +10 -0
- package/dist/dependencies/RuntimeRequirementsDependency.js +40 -0
- package/dist/dependencies/StaticExportsDependency.d.ts +15 -0
- package/dist/dependencies/StaticExportsDependency.js +38 -0
- package/dist/dependencies/URLDependency.d.ts +16 -0
- package/dist/dependencies/URLDependency.js +103 -0
- package/dist/dependencies/URLPlugin.d.ts +4 -0
- package/dist/dependencies/URLPlugin.js +107 -0
- package/dist/dependencies/UnsupportedDependency.d.ts +9 -0
- package/dist/dependencies/UnsupportedDependency.js +36 -0
- package/dist/dependencies/commonjs/CommonJsDependencyHelpers.d.ts +2 -0
- package/dist/dependencies/commonjs/CommonJsDependencyHelpers.js +67 -0
- package/dist/dependencies/commonjs/CommonJsExportRequireDependency.d.ts +46 -0
- package/dist/dependencies/commonjs/CommonJsExportRequireDependency.js +260 -0
- package/dist/dependencies/commonjs/CommonJsExportsDependency.d.ts +19 -0
- package/dist/dependencies/commonjs/CommonJsExportsDependency.js +82 -0
- package/dist/dependencies/commonjs/CommonJsExportsParserPlugin.d.ts +6 -0
- package/dist/dependencies/commonjs/CommonJsExportsParserPlugin.js +314 -0
- package/dist/dependencies/commonjs/CommonJsFullRequireDependency.d.ts +13 -0
- package/dist/dependencies/commonjs/CommonJsFullRequireDependency.js +77 -0
- package/dist/dependencies/commonjs/CommonJsImportsParserPlugin.d.ts +6 -0
- package/dist/dependencies/commonjs/CommonJsImportsParserPlugin.js +500 -0
- package/dist/dependencies/commonjs/CommonJsPlugin.d.ts +4 -0
- package/dist/dependencies/commonjs/CommonJsPlugin.js +170 -0
- package/dist/dependencies/commonjs/CommonJsRequireContextDependency.d.ts +8 -0
- package/dist/dependencies/commonjs/CommonJsRequireContextDependency.js +37 -0
- package/dist/dependencies/commonjs/CommonJsRequireDependency.d.ts +7 -0
- package/dist/dependencies/commonjs/CommonJsRequireDependency.js +24 -0
- package/dist/dependencies/commonjs/CommonJsSelfReferenceDependency.d.ts +15 -0
- package/dist/dependencies/commonjs/CommonJsSelfReferenceDependency.js +112 -0
- package/dist/dependencies/const/CachedConstDependency.d.ts +12 -0
- package/dist/dependencies/const/CachedConstDependency.js +50 -0
- package/dist/dependencies/const/ConstDependency.d.ts +13 -0
- package/dist/dependencies/const/ConstDependency.js +63 -0
- package/dist/dependencies/context/ContextDependency.d.ts +26 -0
- package/dist/dependencies/context/ContextDependency.js +91 -0
- package/dist/dependencies/context/ContextDependencyHelpers.d.ts +2 -0
- package/dist/dependencies/context/ContextDependencyHelpers.js +128 -0
- package/dist/dependencies/context/ContextDependencyTemplateAsId.d.ts +10 -0
- package/dist/dependencies/context/ContextDependencyTemplateAsId.js +37 -0
- package/dist/dependencies/context/ContextDependencyTemplateAsRequireCall.d.ts +10 -0
- package/dist/dependencies/context/ContextDependencyTemplateAsRequireCall.js +39 -0
- package/dist/dependencies/context/ContextElementDependency.d.ts +13 -0
- package/dist/dependencies/context/ContextElementDependency.js +53 -0
- package/dist/dependencies/css/CssExportDependency.d.ts +17 -0
- package/dist/dependencies/css/CssExportDependency.js +49 -0
- package/dist/dependencies/css/CssImportDependency.d.ts +14 -0
- package/dist/dependencies/css/CssImportDependency.js +60 -0
- package/dist/dependencies/css/CssLocalIdentifierDependency.d.ts +12 -0
- package/dist/dependencies/css/CssLocalIdentifierDependency.js +69 -0
- package/dist/dependencies/css/CssSelfLocalIdentifierDependency.d.ts +13 -0
- package/dist/dependencies/css/CssSelfLocalIdentifierDependency.js +53 -0
- package/dist/dependencies/css/CssUrlDependency.d.ts +12 -0
- package/dist/dependencies/css/CssUrlDependency.js +89 -0
- package/dist/dependencies/entry/DynamicEntryPlugin.d.ts +22 -0
- package/dist/dependencies/entry/DynamicEntryPlugin.js +62 -0
- package/dist/dependencies/entry/EntryDependency.d.ts +7 -0
- package/dist/dependencies/entry/EntryDependency.js +20 -0
- package/dist/dependencies/getFunctionExpression.d.ts +10 -0
- package/dist/dependencies/getFunctionExpression.js +42 -0
- package/dist/dependencies/harmony/HarmonyAcceptDependency.d.ts +11 -0
- package/dist/dependencies/harmony/HarmonyAcceptDependency.js +81 -0
- package/dist/dependencies/harmony/HarmonyAcceptImportDependency.d.ts +6 -0
- package/dist/dependencies/harmony/HarmonyAcceptImportDependency.js +20 -0
- package/dist/dependencies/harmony/HarmonyCompatibilityDependency.d.ts +5 -0
- package/dist/dependencies/harmony/HarmonyCompatibilityDependency.js +61 -0
- package/dist/dependencies/harmony/HarmonyDetectionParserPlugin.d.ts +5 -0
- package/dist/dependencies/harmony/HarmonyDetectionParserPlugin.js +102 -0
- package/dist/dependencies/harmony/HarmonyEvaluatedImportSpecifierDependency.d.ts +16 -0
- package/dist/dependencies/harmony/HarmonyEvaluatedImportSpecifierDependency.js +84 -0
- package/dist/dependencies/harmony/HarmonyExportDependencyParserPlugin.d.ts +5 -0
- package/dist/dependencies/harmony/HarmonyExportDependencyParserPlugin.js +143 -0
- package/dist/dependencies/harmony/HarmonyExportExpressionDependency.d.ts +23 -0
- package/dist/dependencies/harmony/HarmonyExportExpressionDependency.js +148 -0
- package/dist/dependencies/harmony/HarmonyExportHeaderDependency.d.ts +10 -0
- package/dist/dependencies/harmony/HarmonyExportHeaderDependency.js +39 -0
- package/dist/dependencies/harmony/HarmonyExportImportedSpecifierDependency.d.ts +140 -0
- package/dist/dependencies/harmony/HarmonyExportImportedSpecifierDependency.js +763 -0
- package/dist/dependencies/harmony/HarmonyExportInitFragment.d.ts +14 -0
- package/dist/dependencies/harmony/HarmonyExportInitFragment.js +147 -0
- package/dist/dependencies/harmony/HarmonyExportSpecifierDependency.d.ts +17 -0
- package/dist/dependencies/harmony/HarmonyExportSpecifierDependency.js +62 -0
- package/dist/dependencies/harmony/HarmonyExports.d.ts +3 -0
- package/dist/dependencies/harmony/HarmonyExports.js +51 -0
- package/dist/dependencies/harmony/HarmonyImportDependency.d.ts +30 -0
- package/dist/dependencies/harmony/HarmonyImportDependency.js +217 -0
- package/dist/dependencies/harmony/HarmonyImportDependencyParserPlugin.d.ts +9 -0
- package/dist/dependencies/harmony/HarmonyImportDependencyParserPlugin.js +202 -0
- package/dist/dependencies/harmony/HarmonyImportSideEffectDependency.d.ts +8 -0
- package/dist/dependencies/harmony/HarmonyImportSideEffectDependency.js +43 -0
- package/dist/dependencies/harmony/HarmonyImportSpecifierDependency.d.ts +33 -0
- package/dist/dependencies/harmony/HarmonyImportSpecifierDependency.js +272 -0
- package/dist/dependencies/harmony/HarmonyModulesPlugin.d.ts +6 -0
- package/dist/dependencies/harmony/HarmonyModulesPlugin.js +57 -0
- package/dist/dependencies/harmony/HarmonyTopLevelThisParserPlugin.d.ts +4 -0
- package/dist/dependencies/harmony/HarmonyTopLevelThisParserPlugin.js +45 -0
- package/dist/dependencies/import/ImportContextDependency.d.ts +9 -0
- package/dist/dependencies/import/ImportContextDependency.js +34 -0
- package/dist/dependencies/import/ImportDependency.d.ts +11 -0
- package/dist/dependencies/import/ImportDependency.js +57 -0
- package/dist/dependencies/import/ImportEagerDependency.d.ts +7 -0
- package/dist/dependencies/import/ImportEagerDependency.js +34 -0
- package/dist/dependencies/import/ImportMetaContextDependency.d.ts +7 -0
- package/dist/dependencies/import/ImportMetaContextDependency.js +23 -0
- package/dist/dependencies/import/ImportMetaContextDependencyParserPlugin.d.ts +3 -0
- package/dist/dependencies/import/ImportMetaContextDependencyParserPlugin.js +207 -0
- package/dist/dependencies/import/ImportMetaContextPlugin.d.ts +4 -0
- package/dist/dependencies/import/ImportMetaContextPlugin.js +27 -0
- package/dist/dependencies/import/ImportMetaHotAcceptDependency.d.ts +7 -0
- package/dist/dependencies/import/ImportMetaHotAcceptDependency.js +24 -0
- package/dist/dependencies/import/ImportMetaHotDeclineDependency.d.ts +7 -0
- package/dist/dependencies/import/ImportMetaHotDeclineDependency.js +24 -0
- package/dist/dependencies/import/ImportMetaPlugin.d.ts +4 -0
- package/dist/dependencies/import/ImportMetaPlugin.js +129 -0
- package/dist/dependencies/import/ImportParserPlugin.d.ts +6 -0
- package/dist/dependencies/import/ImportParserPlugin.js +207 -0
- package/dist/dependencies/import/ImportPlugin.d.ts +4 -0
- package/dist/dependencies/import/ImportPlugin.js +37 -0
- package/dist/dependencies/import/ImportWeakDependency.d.ts +6 -0
- package/dist/dependencies/import/ImportWeakDependency.js +33 -0
- package/dist/dependencies/json/JsonExportsDependency.d.ts +14 -0
- package/dist/dependencies/json/JsonExportsDependency.js +61 -0
- package/dist/dependencies/loader/LoaderDependency.d.ts +8 -0
- package/dist/dependencies/loader/LoaderDependency.js +21 -0
- package/dist/dependencies/loader/LoaderImportDependency.d.ts +8 -0
- package/dist/dependencies/loader/LoaderImportDependency.js +22 -0
- package/dist/dependencies/loader/LoaderPlugin.d.ts +5 -0
- package/dist/dependencies/loader/LoaderPlugin.js +164 -0
- package/dist/dependencies/processExportInfo.d.ts +2 -0
- package/dist/dependencies/processExportInfo.js +32 -0
- package/dist/ids/DeterministicChunkIdsPlugin.d.ts +10 -0
- package/dist/ids/DeterministicChunkIdsPlugin.js +30 -0
- package/dist/ids/DeterministicModuleIdsPlugin.d.ts +6 -0
- package/dist/ids/DeterministicModuleIdsPlugin.js +38 -0
- package/dist/ids/IdHelpers.d.ts +16 -0
- package/dist/ids/IdHelpers.js +259 -0
- package/dist/ids/NamedChunkIdsPlugin.d.ts +11 -0
- package/dist/ids/NamedChunkIdsPlugin.js +34 -0
- package/dist/ids/NamedModuleIdsPlugin.d.ts +6 -0
- package/dist/ids/NamedModuleIdsPlugin.js +25 -0
- package/dist/ids/NaturalChunkIdsPlugin.d.ts +4 -0
- package/dist/ids/NaturalChunkIdsPlugin.js +17 -0
- package/dist/ids/NaturalModuleIdsPlugin.d.ts +4 -0
- package/dist/ids/NaturalModuleIdsPlugin.js +16 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +58 -0
- package/dist/library/AbstractLibraryPlugin.d.ts +21 -0
- package/dist/library/AbstractLibraryPlugin.js +177 -0
- package/dist/library/AssignLibraryPlugin.d.ts +53 -0
- package/dist/library/AssignLibraryPlugin.js +201 -0
- package/dist/library/EnableLibraryPlugin.d.ts +8 -0
- package/dist/library/EnableLibraryPlugin.js +174 -0
- package/dist/library/ExportPropertyLibraryPlugin.d.ts +22 -0
- package/dist/library/ExportPropertyLibraryPlugin.js +74 -0
- package/dist/library/JsonpLibraryPlugin.d.ts +19 -0
- package/dist/library/JsonpLibraryPlugin.js +35 -0
- package/dist/library/ModuleLibraryPlugin.d.ts +16 -0
- package/dist/library/ModuleLibraryPlugin.js +73 -0
- package/dist/library/UmdLibraryPlugin.d.ts +22 -0
- package/dist/library/UmdLibraryPlugin.js +161 -0
- package/dist/module/ContextExclusionPlugin.d.ts +6 -0
- package/dist/module/ContextExclusionPlugin.js +13 -0
- package/dist/module/ContextModule.d.ts +75 -0
- package/dist/module/ContextModule.js +844 -0
- package/dist/module/ContextModuleFactory.d.ts +8 -0
- package/dist/module/ContextModuleFactory.js +292 -0
- package/dist/module/ContextReplacementPlugin.d.ts +11 -0
- package/dist/module/ContextReplacementPlugin.js +128 -0
- package/dist/module/CssModule.d.ts +20 -0
- package/dist/module/CssModule.js +105 -0
- package/dist/module/ExportsInfo.d.ts +135 -0
- package/dist/module/ExportsInfo.js +1171 -0
- package/dist/module/ExportsInfoApiPlugin.d.ts +4 -0
- package/dist/module/ExportsInfoApiPlugin.js +38 -0
- package/dist/module/ExternalModule.d.ts +47 -0
- package/dist/module/ExternalModule.js +458 -0
- package/dist/module/ExternalModuleFactoryPlugin.d.ts +7 -0
- package/dist/module/ExternalModuleFactoryPlugin.js +176 -0
- package/dist/module/ExternalsPlugin.d.ts +7 -0
- package/dist/module/ExternalsPlugin.js +18 -0
- package/dist/module/Generator.d.ts +40 -0
- package/dist/module/Generator.js +49 -0
- package/dist/module/IgnoreErrorModuleFactory.d.ts +7 -0
- package/dist/module/IgnoreErrorModuleFactory.js +16 -0
- package/dist/module/JavascriptMetaInfoPlugin.d.ts +4 -0
- package/dist/module/JavascriptMetaInfoPlugin.js +65 -0
- package/dist/module/LazyModuleFactoryPlugin.d.ts +6 -0
- package/dist/module/LazyModuleFactoryPlugin.js +171 -0
- package/dist/module/Module.d.ts +175 -0
- package/dist/module/Module.js +550 -0
- package/dist/module/ModuleFactory.d.ts +25 -0
- package/dist/module/ModuleFactory.js +10 -0
- package/dist/module/ModuleGraph.d.ts +74 -0
- package/dist/module/ModuleGraph.js +470 -0
- package/dist/module/ModuleGraphConnection.d.ts +33 -0
- package/dist/module/ModuleGraphConnection.js +113 -0
- package/dist/module/ModuleProfile.d.ts +40 -0
- package/dist/module/ModuleProfile.js +77 -0
- package/dist/module/ModuleTypeConstants.d.ts +22 -0
- package/dist/module/ModuleTypeConstants.js +45 -0
- package/dist/module/NormalModule.d.ts +104 -0
- package/dist/module/NormalModule.js +904 -0
- package/dist/module/NormalModuleFactory.d.ts +36 -0
- package/dist/module/NormalModuleFactory.js +761 -0
- package/dist/module/Parser.d.ts +4 -0
- package/dist/module/Parser.js +9 -0
- package/dist/module/RawModule.d.ts +29 -0
- package/dist/module/RawModule.js +74 -0
- package/dist/module/RuntimeGlobals.d.ts +310 -0
- package/dist/module/RuntimeGlobals.js +316 -0
- package/dist/module/RuntimeHelpers.d.ts +43 -0
- package/dist/module/RuntimeHelpers.js +548 -0
- package/dist/module/RuntimeModule.d.ts +39 -0
- package/dist/module/RuntimeModule.js +114 -0
- package/dist/module/RuntimePlugin.d.ts +4 -0
- package/dist/module/RuntimePlugin.js +332 -0
- package/dist/module/SelfModuleFactory.d.ts +6 -0
- package/dist/module/SelfModuleFactory.js +14 -0
- package/dist/module/asset/AssetGenerator.d.ts +30 -0
- package/dist/module/asset/AssetGenerator.js +364 -0
- package/dist/module/asset/AssetModulesPlugin.d.ts +4 -0
- package/dist/module/asset/AssetModulesPlugin.js +98 -0
- package/dist/module/asset/AssetParser.d.ts +12 -0
- package/dist/module/asset/AssetParser.js +44 -0
- package/dist/module/asset/AssetSourceGenerator.d.ts +14 -0
- package/dist/module/asset/AssetSourceGenerator.js +74 -0
- package/dist/module/asset/AssetSourceParser.d.ts +5 -0
- package/dist/module/asset/AssetSourceParser.js +19 -0
- package/dist/module/asset/RawDataUrlModule.d.ts +27 -0
- package/dist/module/asset/RawDataUrlModule.js +102 -0
- package/dist/module/async-modules/AwaitDependenciesInitFragment.d.ts +10 -0
- package/dist/module/async-modules/AwaitDependenciesInitFragment.js +68 -0
- package/dist/module/async-modules/InferAsyncModulesPlugin.d.ts +4 -0
- package/dist/module/async-modules/InferAsyncModulesPlugin.js +28 -0
- package/dist/module/javascript/BasicEvaluatedExpression.d.ts +139 -0
- package/dist/module/javascript/BasicEvaluatedExpression.js +481 -0
- package/dist/module/javascript/JavascriptGenerator.d.ts +11 -0
- package/dist/module/javascript/JavascriptGenerator.js +103 -0
- package/dist/module/javascript/JavascriptModulesPlugin.d.ts +17 -0
- package/dist/module/javascript/JavascriptModulesPlugin.js +821 -0
- package/dist/module/javascript/JavascriptParser.d.ts +598 -0
- package/dist/module/javascript/JavascriptParser.js +3579 -0
- package/dist/module/javascript/JavascriptParserHelpers.d.ts +10 -0
- package/dist/module/javascript/JavascriptParserHelpers.js +61 -0
- package/dist/module/json/JsonData.d.ts +9 -0
- package/dist/module/json/JsonData.js +43 -0
- package/dist/module/json/JsonGenerator.d.ts +15 -0
- package/dist/module/json/JsonGenerator.js +137 -0
- package/dist/module/json/JsonModulesPlugin.d.ts +4 -0
- package/dist/module/json/JsonModulesPlugin.js +20 -0
- package/dist/module/json/JsonParser.d.ts +7 -0
- package/dist/module/json/JsonParser.js +41 -0
- package/dist/module/runtime/AsyncModuleRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/AsyncModuleRuntimeModule.js +115 -0
- package/dist/module/runtime/AutoPublicPathRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/AutoPublicPathRuntimeModule.js +81 -0
- package/dist/module/runtime/BaseUriRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/BaseUriRuntimeModule.js +41 -0
- package/dist/module/runtime/ChunkNameRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/ChunkNameRuntimeModule.js +40 -0
- package/dist/module/runtime/CompatGetDefaultExportRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/CompatGetDefaultExportRuntimeModule.js +54 -0
- package/dist/module/runtime/CompatRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/CompatRuntimeModule.js +59 -0
- package/dist/module/runtime/CreateFakeNamespaceObjectRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/CreateFakeNamespaceObjectRuntimeModule.js +77 -0
- package/dist/module/runtime/CreateScriptRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/CreateScriptRuntimeModule.js +44 -0
- package/dist/module/runtime/CreateScriptUrlRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/CreateScriptUrlRuntimeModule.js +44 -0
- package/dist/module/runtime/DefinePropertyGettersRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/DefinePropertyGettersRuntimeModule.js +56 -0
- package/dist/module/runtime/EnsureChunkRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/EnsureChunkRuntimeModule.js +66 -0
- package/dist/module/runtime/GetChunkFilenameRuntimeModule.d.ts +10 -0
- package/dist/module/runtime/GetChunkFilenameRuntimeModule.js +220 -0
- package/dist/module/runtime/GetFullHashRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/GetFullHashRuntimeModule.js +42 -0
- package/dist/module/runtime/GetMainFilenameRuntimeModule.d.ts +8 -0
- package/dist/module/runtime/GetMainFilenameRuntimeModule.js +52 -0
- package/dist/module/runtime/GetTrustedTypesPolicyRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/GetTrustedTypesPolicyRuntimeModule.js +89 -0
- package/dist/module/runtime/GlobalRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/GlobalRuntimeModule.js +61 -0
- package/dist/module/runtime/HasOwnPropertyRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/HasOwnPropertyRuntimeModule.js +44 -0
- package/dist/module/runtime/HelperRuntimeModule.d.ts +5 -0
- package/dist/module/runtime/HelperRuntimeModule.js +12 -0
- package/dist/module/runtime/LoadScriptRuntimeModule.d.ts +9 -0
- package/dist/module/runtime/LoadScriptRuntimeModule.js +129 -0
- package/dist/module/runtime/MakeNamespaceObjectRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/MakeNamespaceObjectRuntimeModule.js +53 -0
- package/dist/module/runtime/NonceRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/NonceRuntimeModule.js +39 -0
- package/dist/module/runtime/OnChunksLoadedRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/OnChunksLoadedRuntimeModule.js +81 -0
- package/dist/module/runtime/PublicPathRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/PublicPathRuntimeModule.js +44 -0
- package/dist/module/runtime/RelativeUrlRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/RelativeUrlRuntimeModule.js +56 -0
- package/dist/module/runtime/RuntimeIdRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/RuntimeIdRuntimeModule.js +45 -0
- package/dist/module/runtime/StartupChunkDependenciesPlugin.d.ts +11 -0
- package/dist/module/runtime/StartupChunkDependenciesPlugin.js +69 -0
- package/dist/module/runtime/StartupChunkDependenciesRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/StartupChunkDependenciesRuntimeModule.js +67 -0
- package/dist/module/runtime/StartupEntrypointRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/StartupEntrypointRuntimeModule.js +58 -0
- package/dist/module/uri/DataUriPlugin.d.ts +4 -0
- package/dist/module/uri/DataUriPlugin.js +46 -0
- package/dist/module/uri/FileUriPlugin.d.ts +4 -0
- package/dist/module/uri/FileUriPlugin.js +31 -0
- package/dist/plugins/APIPlugin.d.ts +9 -0
- package/dist/plugins/APIPlugin.js +230 -0
- package/dist/plugins/CleanPlugin.d.ts +7 -0
- package/dist/plugins/CleanPlugin.js +295 -0
- package/dist/plugins/CompatibilityPlugin.d.ts +4 -0
- package/dist/plugins/CompatibilityPlugin.js +142 -0
- package/dist/plugins/ConstPlugin.d.ts +4 -0
- package/dist/plugins/ConstPlugin.js +409 -0
- package/dist/plugins/DefaultStatsFactoryPlugin.d.ts +4 -0
- package/dist/plugins/DefaultStatsFactoryPlugin.js +1552 -0
- package/dist/plugins/DefaultStatsPresetPlugin.d.ts +4 -0
- package/dist/plugins/DefaultStatsPresetPlugin.js +306 -0
- package/dist/plugins/DefaultStatsPrinterPlugin.d.ts +4 -0
- package/dist/plugins/DefaultStatsPrinterPlugin.js +986 -0
- package/dist/plugins/DefinePlugin.d.ts +15 -0
- package/dist/plugins/DefinePlugin.js +400 -0
- package/dist/plugins/NodeStuffPlugin.d.ts +6 -0
- package/dist/plugins/NodeStuffPlugin.js +134 -0
- package/dist/plugins/ProgressPlugin.d.ts +20 -0
- package/dist/plugins/ProgressPlugin.js +494 -0
- package/dist/plugins/RecordIdsPlugin.d.ts +9 -0
- package/dist/plugins/RecordIdsPlugin.js +175 -0
- package/dist/plugins/UseStrictPlugin.d.ts +4 -0
- package/dist/plugins/UseStrictPlugin.js +35 -0
- package/dist/plugins/WarnCaseSensitiveModulesPlugin.d.ts +4 -0
- package/dist/plugins/WarnCaseSensitiveModulesPlugin.js +37 -0
- package/dist/plugins/WarnDeprecatedOptionPlugin.d.ts +8 -0
- package/dist/plugins/WarnDeprecatedOptionPlugin.js +29 -0
- package/dist/plugins/cssMinimizer/CssMinimizerMinify.js +73 -0
- package/dist/plugins/cssMinimizer/CssMinimizerPlugin.d.ts +11 -0
- package/dist/plugins/cssMinimizer/CssMinimizerPlugin.js +329 -0
- package/dist/plugins/cssMinimizer/CssMinimizerUtils.js +147 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssExtractLoader.d.ts +1 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssExtractLoader.js +177 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssExtractPlugin.d.ts +22 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssExtractPlugin.js +780 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssUtils.d.ts +14 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssUtils.js +132 -0
- package/dist/plugins/optimize/AggressiveMergingPlugin.d.ts +6 -0
- package/dist/plugins/optimize/AggressiveMergingPlugin.js +62 -0
- package/dist/plugins/optimize/AggressiveSplittingPlugin.d.ts +7 -0
- package/dist/plugins/optimize/AggressiveSplittingPlugin.js +247 -0
- package/dist/plugins/optimize/ConcatenatedModule.d.ts +47 -0
- package/dist/plugins/optimize/ConcatenatedModule.js +1221 -0
- package/dist/plugins/optimize/EnsureChunkConditionsPlugin.d.ts +4 -0
- package/dist/plugins/optimize/EnsureChunkConditionsPlugin.js +61 -0
- package/dist/plugins/optimize/FlagAllModulesAsUsedPlugin.d.ts +6 -0
- package/dist/plugins/optimize/FlagAllModulesAsUsedPlugin.js +30 -0
- package/dist/plugins/optimize/FlagDependencyExportsPlugin.d.ts +4 -0
- package/dist/plugins/optimize/FlagDependencyExportsPlugin.js +275 -0
- package/dist/plugins/optimize/FlagDependencyUsagePlugin.d.ts +6 -0
- package/dist/plugins/optimize/FlagDependencyUsagePlugin.js +243 -0
- package/dist/plugins/optimize/FlagEntryExportAsUsedPlugin.d.ts +7 -0
- package/dist/plugins/optimize/FlagEntryExportAsUsedPlugin.js +34 -0
- package/dist/plugins/optimize/FlagIncludedChunksPlugin.d.ts +4 -0
- package/dist/plugins/optimize/FlagIncludedChunksPlugin.js +85 -0
- package/dist/plugins/optimize/InnerGraph.d.ts +20 -0
- package/dist/plugins/optimize/InnerGraph.js +234 -0
- package/dist/plugins/optimize/InnerGraphPlugin.d.ts +4 -0
- package/dist/plugins/optimize/InnerGraphPlugin.js +289 -0
- package/dist/plugins/optimize/LimitChunkCountPlugin.d.ts +6 -0
- package/dist/plugins/optimize/LimitChunkCountPlugin.js +200 -0
- package/dist/plugins/optimize/MangleExportsPlugin.d.ts +6 -0
- package/dist/plugins/optimize/MangleExportsPlugin.js +124 -0
- package/dist/plugins/optimize/MergeDuplicateChunksPlugin.d.ts +4 -0
- package/dist/plugins/optimize/MergeDuplicateChunksPlugin.js +84 -0
- package/dist/plugins/optimize/MinChunkSizePlugin.d.ts +6 -0
- package/dist/plugins/optimize/MinChunkSizePlugin.js +71 -0
- package/dist/plugins/optimize/ModuleConcatenationPlugin.d.ts +8 -0
- package/dist/plugins/optimize/ModuleConcatenationPlugin.js +525 -0
- package/dist/plugins/optimize/ModuleInfoHeaderPlugin.d.ts +6 -0
- package/dist/plugins/optimize/ModuleInfoHeaderPlugin.js +145 -0
- package/dist/plugins/optimize/NoEmitOnErrorsPlugin.d.ts +4 -0
- package/dist/plugins/optimize/NoEmitOnErrorsPlugin.js +17 -0
- package/dist/plugins/optimize/OptimizationStages.d.ts +4 -0
- package/dist/plugins/optimize/OptimizationStages.js +9 -0
- package/dist/plugins/optimize/RealContentHashPlugin.d.ts +11 -0
- package/dist/plugins/optimize/RealContentHashPlugin.js +295 -0
- package/dist/plugins/optimize/RemoveEmptyChunksPlugin.d.ts +4 -0
- package/dist/plugins/optimize/RemoveEmptyChunksPlugin.js +30 -0
- package/dist/plugins/optimize/RemoveParentModulesPlugin.d.ts +4 -0
- package/dist/plugins/optimize/RemoveParentModulesPlugin.js +103 -0
- package/dist/plugins/optimize/RuntimeChunkPlugin.d.ts +6 -0
- package/dist/plugins/optimize/RuntimeChunkPlugin.js +25 -0
- package/dist/plugins/optimize/SideEffectsFlagPlugin.d.ts +7 -0
- package/dist/plugins/optimize/SideEffectsFlagPlugin.js +211 -0
- package/dist/plugins/optimize/SplitChunksPlugin.d.ts +7 -0
- package/dist/plugins/optimize/SplitChunksPlugin.js +1113 -0
- package/dist/rules/BasicEffectRulePlugin.d.ts +7 -0
- package/dist/rules/BasicEffectRulePlugin.js +21 -0
- package/dist/rules/BasicMatcherRulePlugin.d.ts +8 -0
- package/dist/rules/BasicMatcherRulePlugin.js +25 -0
- package/dist/rules/ObjectMatcherRulePlugin.d.ts +7 -0
- package/dist/rules/ObjectMatcherRulePlugin.js +27 -0
- package/dist/rules/RuleSetCompiler.d.ts +20 -0
- package/dist/rules/RuleSetCompiler.js +242 -0
- package/dist/rules/UseEffectRulePlugin.d.ts +5 -0
- package/dist/rules/UseEffectRulePlugin.js +117 -0
- package/dist/serialization/Serialization.d.ts +11 -0
- package/dist/serialization/Serialization.js +95 -0
- package/dist/serialization/Serializer.d.ts +9 -0
- package/dist/serialization/Serializer.js +43 -0
- package/dist/serialization/SerializerMiddleware.d.ts +13 -0
- package/dist/serialization/SerializerMiddleware.js +86 -0
- package/dist/serialization/internalSerializables.d.ts +82 -0
- package/dist/serialization/internalSerializables.js +94 -0
- package/dist/serialization/makeSerializable.d.ts +2 -0
- package/dist/serialization/makeSerializable.js +25 -0
- package/dist/serialization/middlewares/BinaryMiddleware.d.ts +12 -0
- package/dist/serialization/middlewares/BinaryMiddleware.js +955 -0
- package/dist/serialization/middlewares/FileMiddleware.d.ts +9 -0
- package/dist/serialization/middlewares/FileMiddleware.js +546 -0
- package/dist/serialization/middlewares/ObjectMiddleware.d.ts +15 -0
- package/dist/serialization/middlewares/ObjectMiddleware.js +602 -0
- package/dist/serialization/middlewares/SingleItemMiddleware.d.ts +6 -0
- package/dist/serialization/middlewares/SingleItemMiddleware.js +15 -0
- package/dist/serialization/registerExternalSerializer.d.ts +1 -0
- package/dist/serialization/registerExternalSerializer.js +154 -0
- package/dist/serialization/serializers/ArraySerializer.d.ts +5 -0
- package/dist/serialization/serializers/ArraySerializer.js +18 -0
- package/dist/serialization/serializers/DateObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/DateObjectSerializer.js +11 -0
- package/dist/serialization/serializers/ErrorObjectSerializer.d.ts +7 -0
- package/dist/serialization/serializers/ErrorObjectSerializer.js +20 -0
- package/dist/serialization/serializers/MapObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/MapObjectSerializer.js +26 -0
- package/dist/serialization/serializers/NullPrototypeObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/NullPrototypeObjectSerializer.js +28 -0
- package/dist/serialization/serializers/PlainObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/PlainObjectSerializer.js +77 -0
- package/dist/serialization/serializers/RegExpObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/RegExpObjectSerializer.js +12 -0
- package/dist/serialization/serializers/SetObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/SetObjectSerializer.js +19 -0
- package/dist/sourcemap/EvalDevToolModulePlugin.d.ts +8 -0
- package/dist/sourcemap/EvalDevToolModulePlugin.js +97 -0
- package/dist/sourcemap/EvalSourceMapDevToolPlugin.d.ts +9 -0
- package/dist/sourcemap/EvalSourceMapDevToolPlugin.js +167 -0
- package/dist/sourcemap/SourceMapDevToolModuleOptionsPlugin.d.ts +6 -0
- package/dist/sourcemap/SourceMapDevToolModuleOptionsPlugin.js +29 -0
- package/dist/sourcemap/SourceMapDevToolPlugin.d.ts +11 -0
- package/dist/sourcemap/SourceMapDevToolPlugin.js +364 -0
- package/dist/template/ChunkTemplate.d.ts +6 -0
- package/dist/template/ChunkTemplate.js +69 -0
- package/dist/template/LibraryTemplatePlugin.d.ts +6 -0
- package/dist/template/LibraryTemplatePlugin.js +23 -0
- package/dist/template/MainTemplate.d.ts +10 -0
- package/dist/template/MainTemplate.js +177 -0
- package/dist/template/ModuleTemplate.d.ts +7 -0
- package/dist/template/ModuleTemplate.js +46 -0
- package/dist/template/RuntimeTemplate.d.ts +158 -0
- package/dist/template/RuntimeTemplate.js +663 -0
- package/dist/template/Template.d.ts +25 -0
- package/dist/template/Template.js +269 -0
- package/dist/template/TemplatedPathPlugin.d.ts +4 -0
- package/dist/template/TemplatedPathPlugin.js +228 -0
- package/dist/thread/WorkerError.d.ts +4 -0
- package/dist/thread/WorkerError.js +21 -0
- package/dist/thread/WorkerPool.d.ts +52 -0
- package/dist/thread/WorkerPool.js +370 -0
- package/dist/thread/readBuffer.d.ts +1 -0
- package/dist/thread/readBuffer.js +37 -0
- package/dist/thread/serializer.d.ts +2 -0
- package/dist/thread/serializer.js +24 -0
- package/dist/thread/worker.d.ts +1 -0
- package/dist/thread/worker.js +185 -0
- package/dist/thread/workerPools.d.ts +2 -0
- package/dist/thread/workerPools.js +31 -0
- package/dist/types/index.d.ts +58 -0
- package/dist/types/index.js +8 -0
- package/package.json +96 -0
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** @typedef {(string|number|undefined|[])[]} SemVerRange */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.satisfyRuntimeCode = exports.rangeToStringRuntimeCode = exports.versionLtRuntimeCode = exports.parseVersionRuntimeCode = exports.stringifyHoley = exports.satisfy = exports.rangeToString = exports.parseRange = exports.versionLt = exports.parseVersion = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* @param {string} str version string
|
|
7
|
+
* @returns {(string|number|undefined|[])[]} parsed version
|
|
8
|
+
*/
|
|
9
|
+
const parseVersion = str => {
|
|
10
|
+
const splitAndConvert = function (str) {
|
|
11
|
+
return str.split('.').map((item) =>
|
|
12
|
+
// eslint-disable-next-line eqeqeq
|
|
13
|
+
+item == item ? +item : item);
|
|
14
|
+
};
|
|
15
|
+
const match = /^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str);
|
|
16
|
+
const ver = match[1] ? splitAndConvert(match[1]) : [];
|
|
17
|
+
if (match[2]) {
|
|
18
|
+
ver.length++;
|
|
19
|
+
ver.push.apply(ver, splitAndConvert(match[2]));
|
|
20
|
+
}
|
|
21
|
+
if (match[3]) {
|
|
22
|
+
ver.push([]);
|
|
23
|
+
ver.push.apply(ver, splitAndConvert(match[3]));
|
|
24
|
+
}
|
|
25
|
+
return ver;
|
|
26
|
+
};
|
|
27
|
+
exports.parseVersion = parseVersion;
|
|
28
|
+
/* eslint-disable eqeqeq */
|
|
29
|
+
/**
|
|
30
|
+
* @param {string} a version
|
|
31
|
+
* @param {string} b version
|
|
32
|
+
* @returns {boolean} true, iff a < b
|
|
33
|
+
*/
|
|
34
|
+
const versionLt = (a, b) => {
|
|
35
|
+
a = parseVersion(a);
|
|
36
|
+
b = parseVersion(b);
|
|
37
|
+
let i = 0;
|
|
38
|
+
for (;;) {
|
|
39
|
+
// a b EOA object undefined number string
|
|
40
|
+
// EOA a == b a < b b < a a < b a < b
|
|
41
|
+
// object b < a (0) b < a a < b a < b
|
|
42
|
+
// undefined a < b a < b (0) a < b a < b
|
|
43
|
+
// number b < a b < a b < a (1) a < b
|
|
44
|
+
// string b < a b < a b < a b < a (1)
|
|
45
|
+
// EOA end of array
|
|
46
|
+
// (0) continue on
|
|
47
|
+
// (1) compare them via "<"
|
|
48
|
+
// Handles first row in table
|
|
49
|
+
if (i >= a.length)
|
|
50
|
+
return i < b.length && (typeof b[i])[0] != 'u';
|
|
51
|
+
const aValue = a[i];
|
|
52
|
+
const aType = (typeof aValue)[0];
|
|
53
|
+
// Handles first column in table
|
|
54
|
+
if (i >= b.length)
|
|
55
|
+
return aType == 'u';
|
|
56
|
+
const bValue = b[i];
|
|
57
|
+
const bType = (typeof bValue)[0];
|
|
58
|
+
if (aType == bType) {
|
|
59
|
+
if (aType != 'o' && aType != 'u' && aValue != bValue) {
|
|
60
|
+
return aValue < bValue;
|
|
61
|
+
}
|
|
62
|
+
i++;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
// Handles remaining cases
|
|
66
|
+
if (aType == 'o' && bType == 'n')
|
|
67
|
+
return true;
|
|
68
|
+
return bType == 's' || aType == 'u';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.versionLt = versionLt;
|
|
73
|
+
/**
|
|
74
|
+
* @param {string} str range string
|
|
75
|
+
* @returns {SemVerRange} parsed range
|
|
76
|
+
*/
|
|
77
|
+
const parseRange = str => {
|
|
78
|
+
const splitAndConvert = str => str.split('.').map(item => (item !== 'NaN' && `${+item}` === item ? +item : item));
|
|
79
|
+
const parsePartial = str => {
|
|
80
|
+
const match = /^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str);
|
|
81
|
+
const ver = match[1] ? [0, ...splitAndConvert(match[1])] : [0];
|
|
82
|
+
if (match[2]) {
|
|
83
|
+
ver.length++;
|
|
84
|
+
ver.push.apply(ver, splitAndConvert(match[2]));
|
|
85
|
+
}
|
|
86
|
+
// remove trailing any matchers
|
|
87
|
+
let last = ver[ver.length - 1];
|
|
88
|
+
while (ver.length && (last === undefined || /^[*xX]$/.test(last))) {
|
|
89
|
+
ver.pop();
|
|
90
|
+
last = ver[ver.length - 1];
|
|
91
|
+
}
|
|
92
|
+
return ver;
|
|
93
|
+
};
|
|
94
|
+
const toFixed = range => {
|
|
95
|
+
if (range.length === 1) {
|
|
96
|
+
// Special case for "*" is "x.x.x" instead of "="
|
|
97
|
+
return [0];
|
|
98
|
+
}
|
|
99
|
+
if (range.length === 2) {
|
|
100
|
+
// Special case for "1" is "1.x.x" instead of "=1"
|
|
101
|
+
return [1, ...range.slice(1)];
|
|
102
|
+
}
|
|
103
|
+
if (range.length === 3) {
|
|
104
|
+
// Special case for "1.2" is "1.2.x" instead of "=1.2"
|
|
105
|
+
return [2, ...range.slice(1)];
|
|
106
|
+
}
|
|
107
|
+
return [range.length, ...range.slice(1)];
|
|
108
|
+
};
|
|
109
|
+
const negate = range => [-range[0] - 1, ...range.slice(1)];
|
|
110
|
+
const parseSimple = str => {
|
|
111
|
+
// simple ::= primitive | partial | tilde | caret
|
|
112
|
+
// primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | '!' ) ( ' ' ) * partial
|
|
113
|
+
// tilde ::= '~' ( ' ' ) * partial
|
|
114
|
+
// caret ::= '^' ( ' ' ) * partial
|
|
115
|
+
const match = /^(\^|~|<=|<|>=|>|=|v|!)/.exec(str);
|
|
116
|
+
const start = match ? match[0] : '';
|
|
117
|
+
const remainder = parsePartial(start.length ? str.slice(start.length).trim() : str.trim());
|
|
118
|
+
switch (start) {
|
|
119
|
+
case '^':
|
|
120
|
+
if (remainder.length > 1 && remainder[1] === 0) {
|
|
121
|
+
if (remainder.length > 2 && remainder[2] === 0) {
|
|
122
|
+
return [3, ...remainder.slice(1)];
|
|
123
|
+
}
|
|
124
|
+
return [2, ...remainder.slice(1)];
|
|
125
|
+
}
|
|
126
|
+
return [1, ...remainder.slice(1)];
|
|
127
|
+
case '~':
|
|
128
|
+
return [2, ...remainder.slice(1)];
|
|
129
|
+
case '>=':
|
|
130
|
+
return remainder;
|
|
131
|
+
case '=':
|
|
132
|
+
case 'v':
|
|
133
|
+
case '':
|
|
134
|
+
return toFixed(remainder);
|
|
135
|
+
case '<':
|
|
136
|
+
return negate(remainder);
|
|
137
|
+
case '>': {
|
|
138
|
+
// and( >=, not( = ) ) => >=, =, not, and
|
|
139
|
+
const fixed = toFixed(remainder);
|
|
140
|
+
// eslint-disable-next-line no-sparse-arrays
|
|
141
|
+
return [, fixed, 0, remainder, 2];
|
|
142
|
+
}
|
|
143
|
+
case '<=':
|
|
144
|
+
// or( <, = ) => <, =, or
|
|
145
|
+
// eslint-disable-next-line no-sparse-arrays
|
|
146
|
+
return [, toFixed(remainder), negate(remainder), 1];
|
|
147
|
+
case '!': {
|
|
148
|
+
// not =
|
|
149
|
+
const fixed = toFixed(remainder);
|
|
150
|
+
// eslint-disable-next-line no-sparse-arrays
|
|
151
|
+
return [, fixed, 0];
|
|
152
|
+
}
|
|
153
|
+
default:
|
|
154
|
+
throw new Error('Unexpected start value');
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
const combine = (items, fn) => {
|
|
158
|
+
if (items.length === 1)
|
|
159
|
+
return items[0];
|
|
160
|
+
const arr = [];
|
|
161
|
+
for (const item of items.slice().reverse()) {
|
|
162
|
+
if (0 in item) {
|
|
163
|
+
arr.push(item);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
arr.push(...item.slice(1));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// eslint-disable-next-line no-sparse-arrays
|
|
170
|
+
return [, ...arr, ...items.slice(1).map(() => fn)];
|
|
171
|
+
};
|
|
172
|
+
const parseRange = str => {
|
|
173
|
+
// range ::= hyphen | simple ( ' ' ( ' ' ) * simple ) * | ''
|
|
174
|
+
// hyphen ::= partial ( ' ' ) * ' - ' ( ' ' ) * partial
|
|
175
|
+
const items = str.split(/\s+-\s+/);
|
|
176
|
+
if (items.length === 1) {
|
|
177
|
+
const items = str
|
|
178
|
+
.trim()
|
|
179
|
+
.split(/(?<=[-0-9A-Za-z])\s+/g)
|
|
180
|
+
.map(parseSimple);
|
|
181
|
+
return combine(items, 2);
|
|
182
|
+
}
|
|
183
|
+
const a = parsePartial(items[0]);
|
|
184
|
+
const b = parsePartial(items[1]);
|
|
185
|
+
// >=a <=b => and( >=a, or( <b, =b ) ) => >=a, <b, =b, or, and
|
|
186
|
+
// eslint-disable-next-line no-sparse-arrays
|
|
187
|
+
return [, toFixed(b), negate(b), 1, a, 2];
|
|
188
|
+
};
|
|
189
|
+
const parseLogicalOr = str => {
|
|
190
|
+
// range-set ::= range ( logical-or range ) *
|
|
191
|
+
// logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
|
192
|
+
const items = str.split(/\s*\|\|\s*/).map(parseRange);
|
|
193
|
+
return combine(items, 1);
|
|
194
|
+
};
|
|
195
|
+
return parseLogicalOr(str);
|
|
196
|
+
};
|
|
197
|
+
exports.parseRange = parseRange;
|
|
198
|
+
/* eslint-disable eqeqeq */
|
|
199
|
+
const rangeToString = range => {
|
|
200
|
+
const fixCount = range[0];
|
|
201
|
+
let str = '';
|
|
202
|
+
if (range.length === 1) {
|
|
203
|
+
return '*';
|
|
204
|
+
}
|
|
205
|
+
if (fixCount + 0.5) {
|
|
206
|
+
str +=
|
|
207
|
+
fixCount == 0
|
|
208
|
+
? '>='
|
|
209
|
+
: fixCount == -1
|
|
210
|
+
? '<'
|
|
211
|
+
: fixCount == 1
|
|
212
|
+
? '^'
|
|
213
|
+
: fixCount == 2
|
|
214
|
+
? '~'
|
|
215
|
+
: fixCount > 0
|
|
216
|
+
? '='
|
|
217
|
+
: '!=';
|
|
218
|
+
let needDot = 1;
|
|
219
|
+
// eslint-disable-next-line no-redeclare
|
|
220
|
+
for (let i = 1; i < range.length; i++) {
|
|
221
|
+
const item = range[i];
|
|
222
|
+
const t = (typeof item)[0];
|
|
223
|
+
needDot--;
|
|
224
|
+
str +=
|
|
225
|
+
t == 'u'
|
|
226
|
+
? // undefined: prerelease marker, add an "-"
|
|
227
|
+
'-'
|
|
228
|
+
: // number or string: add the item, set flag to add an "." between two of them
|
|
229
|
+
(needDot > 0 ? '.' : '') + ((needDot = 2), item);
|
|
230
|
+
}
|
|
231
|
+
return str;
|
|
232
|
+
}
|
|
233
|
+
const stack = [];
|
|
234
|
+
// eslint-disable-next-line no-redeclare
|
|
235
|
+
for (let i = 1; i < range.length; i++) {
|
|
236
|
+
// eslint-disable-next-line no-redeclare
|
|
237
|
+
const item = range[i];
|
|
238
|
+
stack.push(item === 0
|
|
239
|
+
? `not(${pop()})`
|
|
240
|
+
: item === 1
|
|
241
|
+
? `(${pop()} || ${pop()})`
|
|
242
|
+
: item === 2
|
|
243
|
+
? `${stack.pop()} ${stack.pop()}`
|
|
244
|
+
: rangeToString(item));
|
|
245
|
+
}
|
|
246
|
+
return pop();
|
|
247
|
+
function pop() {
|
|
248
|
+
// @ts-ignore
|
|
249
|
+
return stack.pop().replace(/^\((.+)\)$/, '$1');
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
exports.rangeToString = rangeToString;
|
|
253
|
+
const satisfy = (range, version) => {
|
|
254
|
+
if (0 in range) {
|
|
255
|
+
version = parseVersion(version);
|
|
256
|
+
let fixCount = range[0];
|
|
257
|
+
// when negated is set it swill set for < instead of >=
|
|
258
|
+
const negated = fixCount < 0;
|
|
259
|
+
if (negated)
|
|
260
|
+
fixCount = -fixCount - 1;
|
|
261
|
+
for (let i = 0, j = 1, isEqual = true;; j++, i++) {
|
|
262
|
+
// cspell:word nequal nequ
|
|
263
|
+
// when isEqual = true:
|
|
264
|
+
// range version: EOA/object undefined number string
|
|
265
|
+
// EOA equal block big-ver big-ver
|
|
266
|
+
// undefined bigger next big-ver big-ver
|
|
267
|
+
// number smaller block cmp big-cmp
|
|
268
|
+
// fixed number smaller block cmp-fix differ
|
|
269
|
+
// string smaller block differ cmp
|
|
270
|
+
// fixed string smaller block small-cmp cmp-fix
|
|
271
|
+
// when isEqual = false:
|
|
272
|
+
// range version: EOA/object undefined number string
|
|
273
|
+
// EOA nequal block next-ver next-ver
|
|
274
|
+
// undefined nequal block next-ver next-ver
|
|
275
|
+
// number nequal block next next
|
|
276
|
+
// fixed number nequal block next next (this never happens)
|
|
277
|
+
// string nequal block next next
|
|
278
|
+
// fixed string nequal block next next (this never happens)
|
|
279
|
+
// EOA end of array
|
|
280
|
+
// equal (version is equal range):
|
|
281
|
+
// when !negated: return true,
|
|
282
|
+
// when negated: return false
|
|
283
|
+
// bigger (version is bigger as range):
|
|
284
|
+
// when fixed: return false,
|
|
285
|
+
// when !negated: return true,
|
|
286
|
+
// when negated: return false,
|
|
287
|
+
// smaller (version is smaller as range):
|
|
288
|
+
// when !negated: return false,
|
|
289
|
+
// when negated: return true
|
|
290
|
+
// nequal (version is not equal range (> resp <)): return true
|
|
291
|
+
// block (version is in different prerelease area): return false
|
|
292
|
+
// differ (version is different from fixed range (string vs. number)): return false
|
|
293
|
+
// next: continues to the next items
|
|
294
|
+
// next-ver: when fixed: return false, continues to the next item only for the version, sets isEqual=false
|
|
295
|
+
// big-ver: when fixed || negated: return false, continues to the next item only for the version, sets isEqual=false
|
|
296
|
+
// next-nequ: continues to the next items, sets isEqual=false
|
|
297
|
+
// cmp (negated === false): version < range => return false, version > range => next-nequ, else => next
|
|
298
|
+
// cmp (negated === true): version > range => return false, version < range => next-nequ, else => next
|
|
299
|
+
// cmp-fix: version == range => next, else => return false
|
|
300
|
+
// big-cmp: when negated => return false, else => next-nequ
|
|
301
|
+
// small-cmp: when negated => next-nequ, else => return false
|
|
302
|
+
const rangeType = j < range.length ? (typeof range[j])[0] : '';
|
|
303
|
+
let versionValue;
|
|
304
|
+
let versionType;
|
|
305
|
+
// Handles first column in both tables (end of version or object)
|
|
306
|
+
if (i >= version.length ||
|
|
307
|
+
((versionValue = version[i]), (versionType = (typeof versionValue)[0]) == 'o')) {
|
|
308
|
+
// Handles nequal
|
|
309
|
+
if (!isEqual)
|
|
310
|
+
return true;
|
|
311
|
+
// Handles bigger
|
|
312
|
+
if (rangeType == 'u')
|
|
313
|
+
return j > fixCount && !negated;
|
|
314
|
+
// Handles equal and smaller: (range === EOA) XOR negated
|
|
315
|
+
return (rangeType == '') != negated; // equal + smaller
|
|
316
|
+
}
|
|
317
|
+
// Handles second column in both tables (version = undefined)
|
|
318
|
+
if (versionType == 'u') {
|
|
319
|
+
if (!isEqual || rangeType != 'u') {
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
// switch between first and second table
|
|
324
|
+
else if (isEqual) {
|
|
325
|
+
// Handle diagonal
|
|
326
|
+
if (rangeType == versionType) {
|
|
327
|
+
if (j <= fixCount) {
|
|
328
|
+
// Handles "cmp-fix" cases
|
|
329
|
+
if (versionValue != range[j]) {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
// Handles "cmp" cases
|
|
335
|
+
if (negated ? versionValue > range[j] : versionValue < range[j]) {
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
338
|
+
if (versionValue != range[j])
|
|
339
|
+
isEqual = false;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
// Handle big-ver
|
|
343
|
+
else if (rangeType != 's' && rangeType != 'n') {
|
|
344
|
+
if (negated || j <= fixCount)
|
|
345
|
+
return false;
|
|
346
|
+
isEqual = false;
|
|
347
|
+
j--;
|
|
348
|
+
}
|
|
349
|
+
// Handle differ, big-cmp and small-cmp
|
|
350
|
+
else if (j <= fixCount || versionType < rangeType != negated) {
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
isEqual = false;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
// Handles all "next-ver" cases in the second table
|
|
359
|
+
// eslint-disable-next-line no-lonely-if
|
|
360
|
+
if (rangeType != 's' && rangeType != 'n') {
|
|
361
|
+
isEqual = false;
|
|
362
|
+
j--;
|
|
363
|
+
}
|
|
364
|
+
// next is applied by default
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
const stack = [];
|
|
369
|
+
const p = stack.pop.bind(stack);
|
|
370
|
+
// eslint-disable-next-line no-redeclare, block-scoped-var
|
|
371
|
+
for (let i = 1; i < range.length; i++) {
|
|
372
|
+
const item = range[i];
|
|
373
|
+
stack.push(item == 1 ? p() | p() : item == 2 ? p() & p() : item ? satisfy(item, version) : !p());
|
|
374
|
+
}
|
|
375
|
+
return !!p();
|
|
376
|
+
};
|
|
377
|
+
exports.satisfy = satisfy;
|
|
378
|
+
const stringifyHoley = json => {
|
|
379
|
+
switch (typeof json) {
|
|
380
|
+
case 'undefined':
|
|
381
|
+
return '';
|
|
382
|
+
case 'object':
|
|
383
|
+
if (Array.isArray(json)) {
|
|
384
|
+
let str = '[';
|
|
385
|
+
for (let i = 0; i < json.length; i++) {
|
|
386
|
+
if (i !== 0)
|
|
387
|
+
str += ',';
|
|
388
|
+
str += stringifyHoley(json[i]);
|
|
389
|
+
}
|
|
390
|
+
str += ']';
|
|
391
|
+
return str;
|
|
392
|
+
}
|
|
393
|
+
return JSON.stringify(json);
|
|
394
|
+
default:
|
|
395
|
+
return JSON.stringify(json);
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
exports.stringifyHoley = stringifyHoley;
|
|
399
|
+
// #region runtime code: parseVersion
|
|
400
|
+
const parseVersionRuntimeCode = runtimeTemplate => `var parseVersion = ${runtimeTemplate.basicFunction('str', [
|
|
401
|
+
'@/base/semver.js for original code',
|
|
402
|
+
`var p=${runtimeTemplate.supportsArrowFunction() ? 'p=>' : 'function(p)'}{return p.split(".").map((${runtimeTemplate.supportsArrowFunction() ? 'p=>' : 'function(p)'}{return+p==p?+p:p}))},n=/^([^-+]+)?(?:-([^+]+))?(?:\\+(.+))?$/.exec(str),r=n[1]?p(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,p(n[2]))),n[3]&&(r.push([]),r.push.apply(r,p(n[3]))),r;`,
|
|
403
|
+
])}`;
|
|
404
|
+
exports.parseVersionRuntimeCode = parseVersionRuntimeCode;
|
|
405
|
+
// #endregion
|
|
406
|
+
// #region runtime code: versionLt
|
|
407
|
+
const versionLtRuntimeCode = runtimeTemplate => `var versionLt = ${runtimeTemplate.basicFunction('a, b', [
|
|
408
|
+
'@/base/semver.js for original code',
|
|
409
|
+
'a=parseVersion(a),b=parseVersion(b);for(var r=0;;){if(r>=a.length)return r<b.length&&"u"!=(typeof b[r])[0];var e=a[r],n=(typeof e)[0];if(r>=b.length)return"u"==n;var t=b[r],f=(typeof t)[0];if(n!=f)return"o"==n&&"n"==f||("s"==f||"u"==n);if("o"!=n&&"u"!=n&&e!=t)return e<t;r++}',
|
|
410
|
+
])}`;
|
|
411
|
+
exports.versionLtRuntimeCode = versionLtRuntimeCode;
|
|
412
|
+
// #endregion
|
|
413
|
+
// #region runtime code: rangeToString
|
|
414
|
+
const rangeToStringRuntimeCode = runtimeTemplate => `var rangeToString = ${runtimeTemplate.basicFunction('range', [
|
|
415
|
+
'@/base/semver.js for original code',
|
|
416
|
+
'var r=range[0],n="";if(1===range.length)return"*";if(r+.5){n+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var e=1,a=1;a<range.length;a++){e--,n+="u"==(typeof(t=range[a]))[0]?"-":(e>0?".":"")+(e=2,t)}return n}var g=[];for(a=1;a<range.length;a++){var t=range[a];g.push(0===t?"not("+o()+")":1===t?"("+o()+" || "+o()+")":2===t?g.pop()+" "+g.pop():rangeToString(t))}return o();function o(){return g.pop().replace(/^\\((.+)\\)$/,"$1")}',
|
|
417
|
+
])}`;
|
|
418
|
+
exports.rangeToStringRuntimeCode = rangeToStringRuntimeCode;
|
|
419
|
+
// #endregion
|
|
420
|
+
// #region runtime code: satisfy
|
|
421
|
+
const satisfyRuntimeCode = runtimeTemplate => `var satisfy = ${runtimeTemplate.basicFunction('range, version', [
|
|
422
|
+
'@/base/semver.js for original code',
|
|
423
|
+
'if(0 in range){version=parseVersion(version);var e=range[0],r=e<0;r&&(e=-e-1);for(var n=0,i=1,a=!0;;i++,n++){var f,s,g=i<range.length?(typeof range[i])[0]:"";if(n>=version.length||"o"==(s=(typeof(f=version[n]))[0]))return!a||("u"==g?i>e&&!r:""==g!=r);if("u"==s){if(!a||"u"!=g)return!1}else if(a)if(g==s)if(i<=e){if(f!=range[i])return!1}else{if(r?f>range[i]:f<range[i])return!1;f!=range[i]&&(a=!1)}else if("s"!=g&&"n"!=g){if(r||i<=e)return!1;a=!1,i--}else{if(i<=e||s<g!=r)return!1;a=!1}else"s"!=g&&"n"!=g&&(a=!1,i--)}}var t=[],o=t.pop.bind(t);for(n=1;n<range.length;n++){var u=range[n];t.push(1==u?o()|o():2==u?o()&o():u?satisfy(u,version):!o())}return!!o();',
|
|
424
|
+
])}`;
|
|
425
|
+
exports.satisfyRuntimeCode = satisfyRuntimeCode;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 单例任务
|
|
3
|
+
* 如果有需要缓存、截流的请求,可以使用这个管理任务
|
|
4
|
+
*/
|
|
5
|
+
type FN<T> = (...args: any[]) => {};
|
|
6
|
+
interface ISingletonTask {
|
|
7
|
+
getResult: () => Promise<any>;
|
|
8
|
+
getResultCache: () => any;
|
|
9
|
+
}
|
|
10
|
+
declare class SingletonTask implements ISingletonTask {
|
|
11
|
+
private readonly executor;
|
|
12
|
+
private readonly timeout;
|
|
13
|
+
private status;
|
|
14
|
+
private result;
|
|
15
|
+
private rejectedReason;
|
|
16
|
+
private queue;
|
|
17
|
+
private timer;
|
|
18
|
+
constructor(executor: FN<Promise<any>>, timeout?: number);
|
|
19
|
+
private _run;
|
|
20
|
+
private _emit;
|
|
21
|
+
private _resolve;
|
|
22
|
+
private _reject;
|
|
23
|
+
getResult(retryWhenRejected?: boolean, retryWhenResolved?: boolean): Promise<any>;
|
|
24
|
+
getResultCache(): any;
|
|
25
|
+
}
|
|
26
|
+
declare function createSingletonTask(key: any, fn: any, timeout?: any): Promise<any>;
|
|
27
|
+
export { SingletonTask, createSingletonTask };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createSingletonTask = exports.SingletonTask = void 0;
|
|
13
|
+
var SingletonTaskStatus;
|
|
14
|
+
(function (SingletonTaskStatus) {
|
|
15
|
+
SingletonTaskStatus[SingletonTaskStatus["WAITING"] = 0] = "WAITING";
|
|
16
|
+
SingletonTaskStatus[SingletonTaskStatus["PENDING"] = 1] = "PENDING";
|
|
17
|
+
SingletonTaskStatus[SingletonTaskStatus["RESOLVED"] = 2] = "RESOLVED";
|
|
18
|
+
SingletonTaskStatus[SingletonTaskStatus["REJECTED"] = 3] = "REJECTED";
|
|
19
|
+
})(SingletonTaskStatus || (SingletonTaskStatus = {}));
|
|
20
|
+
class SingletonTask {
|
|
21
|
+
constructor(executor, timeout = 60000) {
|
|
22
|
+
this.executor = executor;
|
|
23
|
+
this.timeout = timeout;
|
|
24
|
+
this.status = SingletonTaskStatus.WAITING;
|
|
25
|
+
this.queue = [];
|
|
26
|
+
}
|
|
27
|
+
_run() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
this.status = SingletonTaskStatus.PENDING;
|
|
30
|
+
this.timer = setTimeout(() => {
|
|
31
|
+
this._reject('timeout');
|
|
32
|
+
}, this.timeout);
|
|
33
|
+
try {
|
|
34
|
+
const result = yield this.executor();
|
|
35
|
+
this._resolve(result);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
this._reject(e);
|
|
40
|
+
throw e;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
_emit() {
|
|
45
|
+
const queue = this.queue;
|
|
46
|
+
this.queue = [];
|
|
47
|
+
for (const item of queue) {
|
|
48
|
+
if (this.status === SingletonTaskStatus.REJECTED) {
|
|
49
|
+
item.reject(this.rejectedReason);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
item.resolve(this.result);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
_resolve(result) {
|
|
57
|
+
this.status = SingletonTaskStatus.RESOLVED;
|
|
58
|
+
this.result = result;
|
|
59
|
+
clearTimeout(this.timer);
|
|
60
|
+
this._emit();
|
|
61
|
+
}
|
|
62
|
+
_reject(reason) {
|
|
63
|
+
this.status = SingletonTaskStatus.REJECTED;
|
|
64
|
+
this.rejectedReason = reason;
|
|
65
|
+
clearTimeout(this.timer);
|
|
66
|
+
this._emit();
|
|
67
|
+
}
|
|
68
|
+
getResult(retryWhenRejected = false, retryWhenResolved = false) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
if (this.status === SingletonTaskStatus.WAITING ||
|
|
71
|
+
(this.status === SingletonTaskStatus.REJECTED && retryWhenRejected) ||
|
|
72
|
+
(this.status === SingletonTaskStatus.RESOLVED && retryWhenResolved)) {
|
|
73
|
+
return this._run();
|
|
74
|
+
}
|
|
75
|
+
if (this.status === SingletonTaskStatus.PENDING) {
|
|
76
|
+
return new Promise((resolve, reject) => {
|
|
77
|
+
this.queue.push({
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
resolve,
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
reject,
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (this.status === SingletonTaskStatus.REJECTED) {
|
|
86
|
+
throw this.rejectedReason;
|
|
87
|
+
}
|
|
88
|
+
return this.result;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
getResultCache() {
|
|
92
|
+
return this.result;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.SingletonTask = SingletonTask;
|
|
96
|
+
const taskMap = {};
|
|
97
|
+
function createSingletonTask(key, fn, timeout) {
|
|
98
|
+
var _a;
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
let taskInfo = taskMap[key];
|
|
101
|
+
if (!taskInfo) {
|
|
102
|
+
const task = new SingletonTask(fn, timeout);
|
|
103
|
+
taskInfo = taskMap[key] = {
|
|
104
|
+
task,
|
|
105
|
+
isDownloading: false,
|
|
106
|
+
manuelCancel: false,
|
|
107
|
+
contentLength: 0,
|
|
108
|
+
chunkTotle: 0,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
const result = yield ((_a = taskInfo.task) === null || _a === void 0 ? void 0 : _a.getResult());
|
|
113
|
+
taskInfo = null;
|
|
114
|
+
delete taskMap[key];
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
taskInfo = null;
|
|
119
|
+
delete taskMap[key];
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
exports.createSingletonTask = createSingletonTask;
|