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.
Files changed (798) hide show
  1. package/README.md +1 -0
  2. package/dist/Compilation.d.ts +239 -0
  3. package/dist/Compilation.js +3513 -0
  4. package/dist/Compiler.d.ts +76 -0
  5. package/dist/Compiler.js +845 -0
  6. package/dist/ConcatenationScope.d.ts +37 -0
  7. package/dist/ConcatenationScope.js +69 -0
  8. package/dist/FileSystemInfo.d.ts +183 -0
  9. package/dist/FileSystemInfo.js +2896 -0
  10. package/dist/MPPack.d.ts +33 -0
  11. package/dist/MPPack.js +163 -0
  12. package/dist/MPPackSetting.d.ts +52 -0
  13. package/dist/MPPackSetting.js +85 -0
  14. package/dist/MultiCompiler.d.ts +25 -0
  15. package/dist/MultiCompiler.js +387 -0
  16. package/dist/MultiWatching.d.ts +11 -0
  17. package/dist/MultiWatching.js +54 -0
  18. package/dist/PluginManager.d.ts +9 -0
  19. package/dist/PluginManager.js +359 -0
  20. package/dist/ResolverFactory.d.ts +7 -0
  21. package/dist/ResolverFactory.js +84 -0
  22. package/dist/Watching.d.ts +41 -0
  23. package/dist/Watching.js +359 -0
  24. package/dist/base/ArrayHelpers.d.ts +6 -0
  25. package/dist/base/ArrayHelpers.js +21 -0
  26. package/dist/base/ArrayQueue.d.ts +29 -0
  27. package/dist/base/ArrayQueue.js +87 -0
  28. package/dist/base/AsyncQueue.d.ts +37 -0
  29. package/dist/base/AsyncQueue.js +263 -0
  30. package/dist/base/ChunkHelpers.d.ts +3 -0
  31. package/dist/base/ChunkHelpers.js +26 -0
  32. package/dist/base/ConditionalInitFragment.d.ts +9 -0
  33. package/dist/base/ConditionalInitFragment.js +64 -0
  34. package/dist/base/GraphHelpers.d.ts +6 -0
  35. package/dist/base/GraphHelpers.js +32 -0
  36. package/dist/base/Hash.d.ts +6 -0
  37. package/dist/base/Hash.js +13 -0
  38. package/dist/base/InitFragment.d.ts +22 -0
  39. package/dist/base/InitFragment.js +113 -0
  40. package/dist/base/IterableHelpers.d.ts +4 -0
  41. package/dist/base/IterableHelpers.js +26 -0
  42. package/dist/base/LazyBucketSortedSet.d.ts +34 -0
  43. package/dist/base/LazyBucketSortedSet.js +188 -0
  44. package/dist/base/LazySet.d.ts +35 -0
  45. package/dist/base/LazySet.js +155 -0
  46. package/dist/base/MapHelpers.d.ts +14 -0
  47. package/dist/base/MapHelpers.js +27 -0
  48. package/dist/base/ModuleFilenameHelpers.d.ts +95 -0
  49. package/dist/base/ModuleFilenameHelpers.js +314 -0
  50. package/dist/base/NodeWatchFileSystem.d.ts +23 -0
  51. package/dist/base/NodeWatchFileSystem.js +135 -0
  52. package/dist/base/ParallelismFactorCalculator.d.ts +8 -0
  53. package/dist/base/ParallelismFactorCalculator.js +52 -0
  54. package/dist/base/Queue.d.ts +12 -0
  55. package/dist/base/Queue.js +25 -0
  56. package/dist/base/RequestShortener.d.ts +6 -0
  57. package/dist/base/RequestShortener.js +15 -0
  58. package/dist/base/Semaphore.d.ts +12 -0
  59. package/dist/base/Semaphore.js +37 -0
  60. package/dist/base/SetHelpers.d.ts +36 -0
  61. package/dist/base/SetHelpers.js +94 -0
  62. package/dist/base/SizeFormatHelpers.d.ts +2 -0
  63. package/dist/base/SizeFormatHelpers.js +15 -0
  64. package/dist/base/SizeOnlySource.d.ts +14 -0
  65. package/dist/base/SizeOnlySource.js +34 -0
  66. package/dist/base/SortableSet.d.ts +18 -0
  67. package/dist/base/SortableSet.js +90 -0
  68. package/dist/base/StackedCacheMap.d.ts +20 -0
  69. package/dist/base/StackedCacheMap.js +73 -0
  70. package/dist/base/StackedMap.d.ts +17 -0
  71. package/dist/base/StackedMap.js +103 -0
  72. package/dist/base/StartupHelpers.d.ts +4 -0
  73. package/dist/base/StartupHelpers.js +94 -0
  74. package/dist/base/StringXor.d.ts +53 -0
  75. package/dist/base/StringXor.js +94 -0
  76. package/dist/base/TupleQueue.d.ts +10 -0
  77. package/dist/base/TupleQueue.js +33 -0
  78. package/dist/base/TupleSet.d.ts +18 -0
  79. package/dist/base/TupleSet.js +115 -0
  80. package/dist/base/URLAbsoluteSpecifier.d.ts +3 -0
  81. package/dist/base/URLAbsoluteSpecifier.js +57 -0
  82. package/dist/base/WeakTupleMap.d.ts +20 -0
  83. package/dist/base/WeakTupleMap.js +124 -0
  84. package/dist/base/binarySearchBounds.d.ts +23 -0
  85. package/dist/base/binarySearchBounds.js +105 -0
  86. package/dist/base/cleverMerge.d.ts +27 -0
  87. package/dist/base/cleverMerge.js +450 -0
  88. package/dist/base/common.d.ts +7 -0
  89. package/dist/base/common.js +25 -0
  90. package/dist/base/commonjs.d.ts +1 -0
  91. package/dist/base/commonjs.js +48 -0
  92. package/dist/base/comparators.d.ts +22 -0
  93. package/dist/base/comparators.js +279 -0
  94. package/dist/base/compileBooleanMatcher.d.ts +6 -0
  95. package/dist/base/compileBooleanMatcher.js +162 -0
  96. package/dist/base/const.d.ts +29 -0
  97. package/dist/base/const.js +49 -0
  98. package/dist/base/copyPatterns.d.ts +14 -0
  99. package/dist/base/copyPatterns.js +501 -0
  100. package/dist/base/createHash.d.ts +3 -0
  101. package/dist/base/createHash.js +131 -0
  102. package/dist/base/defaults.d.ts +3 -0
  103. package/dist/base/defaults.js +671 -0
  104. package/dist/base/deprecation.d.ts +21 -0
  105. package/dist/base/deprecation.js +165 -0
  106. package/dist/base/deterministicGrouping.d.ts +8 -0
  107. package/dist/base/deterministicGrouping.js +395 -0
  108. package/dist/base/errors/AbstractMethodError.d.ts +5 -0
  109. package/dist/base/errors/AbstractMethodError.js +23 -0
  110. package/dist/base/errors/AsyncDependencyToInitialChunkError.d.ts +8 -0
  111. package/dist/base/errors/AsyncDependencyToInitialChunkError.js +18 -0
  112. package/dist/base/errors/BaseError.d.ts +17 -0
  113. package/dist/base/errors/BaseError.js +39 -0
  114. package/dist/base/errors/BuildCycleError.d.ts +8 -0
  115. package/dist/base/errors/BuildCycleError.js +17 -0
  116. package/dist/base/errors/CaseSensitiveModulesWarning.d.ts +5 -0
  117. package/dist/base/errors/CaseSensitiveModulesWarning.js +42 -0
  118. package/dist/base/errors/ChunkRenderError.d.ts +6 -0
  119. package/dist/base/errors/ChunkRenderError.js +18 -0
  120. package/dist/base/errors/CodeGenerationError.d.ts +8 -0
  121. package/dist/base/errors/CodeGenerationError.js +20 -0
  122. package/dist/base/errors/CommentCompilationWarning.d.ts +5 -0
  123. package/dist/base/errors/CommentCompilationWarning.js +16 -0
  124. package/dist/base/errors/ConcurrentCompilationError.d.ts +4 -0
  125. package/dist/base/errors/ConcurrentCompilationError.js +15 -0
  126. package/dist/base/errors/CriticalDependencyWarning.d.ts +5 -0
  127. package/dist/base/errors/CriticalDependencyWarning.js +16 -0
  128. package/dist/base/errors/ErrorHelpers.d.ts +8 -0
  129. package/dist/base/errors/ErrorHelpers.js +51 -0
  130. package/dist/base/errors/HarmonyLinkingError.d.ts +4 -0
  131. package/dist/base/errors/HarmonyLinkingError.js +14 -0
  132. package/dist/base/errors/HookBaseError.d.ts +10 -0
  133. package/dist/base/errors/HookBaseError.js +51 -0
  134. package/dist/base/errors/InvalidDependenciesModuleWarning.d.ts +5 -0
  135. package/dist/base/errors/InvalidDependenciesModuleWarning.js +26 -0
  136. package/dist/base/errors/MinMaxSizeWarning.d.ts +5 -0
  137. package/dist/base/errors/MinMaxSizeWarning.js +45 -0
  138. package/dist/base/errors/ModuleBuildError.d.ts +9 -0
  139. package/dist/base/errors/ModuleBuildError.js +62 -0
  140. package/dist/base/errors/ModuleDependencyError.d.ts +8 -0
  141. package/dist/base/errors/ModuleDependencyError.js +24 -0
  142. package/dist/base/errors/ModuleDependencyWarning.d.ts +6 -0
  143. package/dist/base/errors/ModuleDependencyWarning.js +23 -0
  144. package/dist/base/errors/ModuleError.d.ts +10 -0
  145. package/dist/base/errors/ModuleError.js +42 -0
  146. package/dist/base/errors/ModuleHashingError.d.ts +5 -0
  147. package/dist/base/errors/ModuleHashingError.js +17 -0
  148. package/dist/base/errors/ModuleNotFoundError.d.ts +5 -0
  149. package/dist/base/errors/ModuleNotFoundError.js +69 -0
  150. package/dist/base/errors/ModuleParseError.d.ts +8 -0
  151. package/dist/base/errors/ModuleParseError.js +77 -0
  152. package/dist/base/errors/ModuleRestoreError.d.ts +5 -0
  153. package/dist/base/errors/ModuleRestoreError.js +33 -0
  154. package/dist/base/errors/ModuleStoreError.d.ts +5 -0
  155. package/dist/base/errors/ModuleStoreError.js +33 -0
  156. package/dist/base/errors/ModuleWarning.d.ts +10 -0
  157. package/dist/base/errors/ModuleWarning.js +44 -0
  158. package/dist/base/errors/NodeStuffInWebError.d.ts +5 -0
  159. package/dist/base/errors/NodeStuffInWebError.js +17 -0
  160. package/dist/base/errors/UnhandledSchemeError.d.ts +5 -0
  161. package/dist/base/errors/UnhandledSchemeError.js +18 -0
  162. package/dist/base/errors/UnsupportedFeatureWarning.d.ts +5 -0
  163. package/dist/base/errors/UnsupportedFeatureWarning.js +17 -0
  164. package/dist/base/extractUrlAndGlobal.d.ts +1 -0
  165. package/dist/base/extractUrlAndGlobal.js +10 -0
  166. package/dist/base/findGraphRoots.d.ts +2 -0
  167. package/dist/base/findGraphRoots.js +183 -0
  168. package/dist/base/formatLocation.d.ts +2 -0
  169. package/dist/base/formatLocation.js +47 -0
  170. package/dist/base/fs.d.ts +94 -0
  171. package/dist/base/fs.js +218 -0
  172. package/dist/base/hash/BatchedHash.d.ts +11 -0
  173. package/dist/base/hash/BatchedHash.js +47 -0
  174. package/dist/base/hash/md4.d.ts +2 -0
  175. package/dist/base/hash/md4.js +10 -0
  176. package/dist/base/hash/wasm-hash.d.ts +3 -0
  177. package/dist/base/hash/wasm-hash.js +138 -0
  178. package/dist/base/hash/xxhash64.d.ts +2 -0
  179. package/dist/base/hash/xxhash64.js +10 -0
  180. package/dist/base/identifier.d.ts +30 -0
  181. package/dist/base/identifier.js +237 -0
  182. package/dist/base/logging/Logger.d.ts +40 -0
  183. package/dist/base/logging/Logger.js +128 -0
  184. package/dist/base/logging/createConsoleLogger.d.ts +6 -0
  185. package/dist/base/logging/createConsoleLogger.js +161 -0
  186. package/dist/base/logging/nodeConsole.d.ts +21 -0
  187. package/dist/base/logging/nodeConsole.js +109 -0
  188. package/dist/base/logging/runtime.d.ts +8 -0
  189. package/dist/base/logging/runtime.js +30 -0
  190. package/dist/base/logging/truncateArgs.d.ts +2 -0
  191. package/dist/base/logging/truncateArgs.js +66 -0
  192. package/dist/base/memoize.d.ts +2 -0
  193. package/dist/base/memoize.js +18 -0
  194. package/dist/base/missingModule.d.ts +4 -0
  195. package/dist/base/missingModule.js +16 -0
  196. package/dist/base/moduleAlias.d.ts +1 -0
  197. package/dist/base/moduleAlias.js +8 -0
  198. package/dist/base/nonNumericOnlyHash.d.ts +7 -0
  199. package/dist/base/nonNumericOnlyHash.js +16 -0
  200. package/dist/base/normalization.d.ts +32 -0
  201. package/dist/base/normalization.js +320 -0
  202. package/dist/base/numberHash.d.ts +17 -0
  203. package/dist/base/numberHash.js +72 -0
  204. package/dist/base/objectToMap.d.ts +1 -0
  205. package/dist/base/objectToMap.js +6 -0
  206. package/dist/base/processAsyncTree.d.ts +2 -0
  207. package/dist/base/processAsyncTree.js +45 -0
  208. package/dist/base/propertyAccess.d.ts +2 -0
  209. package/dist/base/propertyAccess.js +20 -0
  210. package/dist/base/propertyName.d.ts +9 -0
  211. package/dist/base/propertyName.js +71 -0
  212. package/dist/base/semver.d.ts +25 -0
  213. package/dist/base/semver.js +425 -0
  214. package/dist/base/singletontask.d.ts +27 -0
  215. package/dist/base/singletontask.js +124 -0
  216. package/dist/base/smartGrouping.d.ts +2 -0
  217. package/dist/base/smartGrouping.js +138 -0
  218. package/dist/base/source.d.ts +2 -0
  219. package/dist/base/source.js +48 -0
  220. package/dist/base/stats/MultiStats.d.ts +19 -0
  221. package/dist/base/stats/MultiStats.js +142 -0
  222. package/dist/base/stats/Stats.d.ts +13 -0
  223. package/dist/base/stats/Stats.js +49 -0
  224. package/dist/base/stats/StatsFactory.d.ts +26 -0
  225. package/dist/base/stats/StatsFactory.js +163 -0
  226. package/dist/base/stats/StatsPrinter.d.ts +12 -0
  227. package/dist/base/stats/StatsPrinter.js +104 -0
  228. package/dist/base/utils.d.ts +5 -0
  229. package/dist/base/utils.js +35 -0
  230. package/dist/cache/AddBuildDependenciesPlugin.d.ts +6 -0
  231. package/dist/cache/AddBuildDependenciesPlugin.js +13 -0
  232. package/dist/cache/AddManagedPathsPlugin.d.ts +7 -0
  233. package/dist/cache/AddManagedPathsPlugin.js +17 -0
  234. package/dist/cache/Cache.d.ts +15 -0
  235. package/dist/cache/Cache.js +69 -0
  236. package/dist/cache/CacheFacade.d.ts +37 -0
  237. package/dist/cache/CacheFacade.js +187 -0
  238. package/dist/cache/IdleFileCachePlugin.d.ts +9 -0
  239. package/dist/cache/IdleFileCachePlugin.js +165 -0
  240. package/dist/cache/MemoryCachePlugin.d.ts +4 -0
  241. package/dist/cache/MemoryCachePlugin.js +36 -0
  242. package/dist/cache/MemoryWithGcCachePlugin.d.ts +8 -0
  243. package/dist/cache/MemoryWithGcCachePlugin.js +104 -0
  244. package/dist/cache/PackFileCacheStrategy.d.ts +47 -0
  245. package/dist/cache/PackFileCacheStrategy.js +1085 -0
  246. package/dist/cache/ResolverCachePlugin.d.ts +4 -0
  247. package/dist/cache/ResolverCachePlugin.js +248 -0
  248. package/dist/cache/getLazyHashedEtag.d.ts +2 -0
  249. package/dist/cache/getLazyHashedEtag.js +53 -0
  250. package/dist/cache/mergeEtags.d.ts +2 -0
  251. package/dist/cache/mergeEtags.js +50 -0
  252. package/dist/chunk/Chunk.d.ts +75 -0
  253. package/dist/chunk/Chunk.js +445 -0
  254. package/dist/chunk/ChunkGraph.d.ts +102 -0
  255. package/dist/chunk/ChunkGraph.js +1037 -0
  256. package/dist/chunk/ChunkGroup.d.ts +62 -0
  257. package/dist/chunk/ChunkGroup.js +341 -0
  258. package/dist/chunk/CodeGenerationResults.d.ts +13 -0
  259. package/dist/chunk/CodeGenerationResults.js +82 -0
  260. package/dist/chunk/Entrypoint.d.ts +22 -0
  261. package/dist/chunk/Entrypoint.js +56 -0
  262. package/dist/chunk/GraphHelpers.d.ts +3 -0
  263. package/dist/chunk/GraphHelpers.js +15 -0
  264. package/dist/chunk/buildChunkGraph.d.ts +2 -0
  265. package/dist/chunk/buildChunkGraph.js +1067 -0
  266. package/dist/chunk/chunkFormat/ArrayPushCallbackChunkFormatPlugin.d.ts +4 -0
  267. package/dist/chunk/chunkFormat/ArrayPushCallbackChunkFormatPlugin.js +101 -0
  268. package/dist/chunk/chunkLoading/JsonpChunkLoadingPlugin.d.ts +4 -0
  269. package/dist/chunk/chunkLoading/JsonpChunkLoadingPlugin.js +98 -0
  270. package/dist/chunk/chunkLoading/JsonpChunkLoadingRuntimeModule.d.ts +15 -0
  271. package/dist/chunk/chunkLoading/JsonpChunkLoadingRuntimeModule.js +272 -0
  272. package/dist/dependencies/AsyncDependenciesBlock.d.ts +14 -0
  273. package/dist/dependencies/AsyncDependenciesBlock.js +64 -0
  274. package/dist/dependencies/CreateScriptUrlDependency.d.ts +9 -0
  275. package/dist/dependencies/CreateScriptUrlDependency.js +60 -0
  276. package/dist/dependencies/DelegatedSourceDependency.d.ts +7 -0
  277. package/dist/dependencies/DelegatedSourceDependency.js +20 -0
  278. package/dist/dependencies/DependenciesBlock.d.ts +29 -0
  279. package/dist/dependencies/DependenciesBlock.js +66 -0
  280. package/dist/dependencies/Dependency.d.ts +44 -0
  281. package/dist/dependencies/Dependency.js +171 -0
  282. package/dist/dependencies/DependencyTemplate.d.ts +4 -0
  283. package/dist/dependencies/DependencyTemplate.js +9 -0
  284. package/dist/dependencies/DependencyTemplates.d.ts +12 -0
  285. package/dist/dependencies/DependencyTemplates.js +34 -0
  286. package/dist/dependencies/DynamicExports.d.ts +6 -0
  287. package/dist/dependencies/DynamicExports.js +48 -0
  288. package/dist/dependencies/ExportsInfoDependency.d.ts +10 -0
  289. package/dist/dependencies/ExportsInfoDependency.js +80 -0
  290. package/dist/dependencies/LocalModule.d.ts +11 -0
  291. package/dist/dependencies/LocalModule.js +33 -0
  292. package/dist/dependencies/LocalModuleDependency.d.ts +10 -0
  293. package/dist/dependencies/LocalModuleDependency.js +42 -0
  294. package/dist/dependencies/LocalModulesHelpers.d.ts +4 -0
  295. package/dist/dependencies/LocalModulesHelpers.js +48 -0
  296. package/dist/dependencies/ModuleDecoratorDependency.d.ts +15 -0
  297. package/dist/dependencies/ModuleDecoratorDependency.js +85 -0
  298. package/dist/dependencies/ModuleDependency.d.ts +16 -0
  299. package/dist/dependencies/ModuleDependency.js +53 -0
  300. package/dist/dependencies/ModuleDependencyTemplateAsId.d.ts +9 -0
  301. package/dist/dependencies/ModuleDependencyTemplateAsId.js +21 -0
  302. package/dist/dependencies/ModuleDependencyTemplateAsRequireId.d.ts +10 -0
  303. package/dist/dependencies/ModuleDependencyTemplateAsRequireId.js +22 -0
  304. package/dist/dependencies/NullDependency.d.ts +7 -0
  305. package/dist/dependencies/NullDependency.js +19 -0
  306. package/dist/dependencies/PureExpressionDependency.d.ts +12 -0
  307. package/dist/dependencies/PureExpressionDependency.js +73 -0
  308. package/dist/dependencies/RequireHeaderDependency.d.ts +8 -0
  309. package/dist/dependencies/RequireHeaderDependency.js +58 -0
  310. package/dist/dependencies/RequireResolveContextDependency.d.ts +8 -0
  311. package/dist/dependencies/RequireResolveContextDependency.js +33 -0
  312. package/dist/dependencies/RequireResolveDependency.d.ts +10 -0
  313. package/dist/dependencies/RequireResolveDependency.js +29 -0
  314. package/dist/dependencies/RequireResolveHeaderDependency.d.ts +8 -0
  315. package/dist/dependencies/RequireResolveHeaderDependency.js +36 -0
  316. package/dist/dependencies/RuntimeRequirementsDependency.d.ts +10 -0
  317. package/dist/dependencies/RuntimeRequirementsDependency.js +40 -0
  318. package/dist/dependencies/StaticExportsDependency.d.ts +15 -0
  319. package/dist/dependencies/StaticExportsDependency.js +38 -0
  320. package/dist/dependencies/URLDependency.d.ts +16 -0
  321. package/dist/dependencies/URLDependency.js +103 -0
  322. package/dist/dependencies/URLPlugin.d.ts +4 -0
  323. package/dist/dependencies/URLPlugin.js +107 -0
  324. package/dist/dependencies/UnsupportedDependency.d.ts +9 -0
  325. package/dist/dependencies/UnsupportedDependency.js +36 -0
  326. package/dist/dependencies/commonjs/CommonJsDependencyHelpers.d.ts +2 -0
  327. package/dist/dependencies/commonjs/CommonJsDependencyHelpers.js +67 -0
  328. package/dist/dependencies/commonjs/CommonJsExportRequireDependency.d.ts +46 -0
  329. package/dist/dependencies/commonjs/CommonJsExportRequireDependency.js +260 -0
  330. package/dist/dependencies/commonjs/CommonJsExportsDependency.d.ts +19 -0
  331. package/dist/dependencies/commonjs/CommonJsExportsDependency.js +82 -0
  332. package/dist/dependencies/commonjs/CommonJsExportsParserPlugin.d.ts +6 -0
  333. package/dist/dependencies/commonjs/CommonJsExportsParserPlugin.js +314 -0
  334. package/dist/dependencies/commonjs/CommonJsFullRequireDependency.d.ts +13 -0
  335. package/dist/dependencies/commonjs/CommonJsFullRequireDependency.js +77 -0
  336. package/dist/dependencies/commonjs/CommonJsImportsParserPlugin.d.ts +6 -0
  337. package/dist/dependencies/commonjs/CommonJsImportsParserPlugin.js +500 -0
  338. package/dist/dependencies/commonjs/CommonJsPlugin.d.ts +4 -0
  339. package/dist/dependencies/commonjs/CommonJsPlugin.js +170 -0
  340. package/dist/dependencies/commonjs/CommonJsRequireContextDependency.d.ts +8 -0
  341. package/dist/dependencies/commonjs/CommonJsRequireContextDependency.js +37 -0
  342. package/dist/dependencies/commonjs/CommonJsRequireDependency.d.ts +7 -0
  343. package/dist/dependencies/commonjs/CommonJsRequireDependency.js +24 -0
  344. package/dist/dependencies/commonjs/CommonJsSelfReferenceDependency.d.ts +15 -0
  345. package/dist/dependencies/commonjs/CommonJsSelfReferenceDependency.js +112 -0
  346. package/dist/dependencies/const/CachedConstDependency.d.ts +12 -0
  347. package/dist/dependencies/const/CachedConstDependency.js +50 -0
  348. package/dist/dependencies/const/ConstDependency.d.ts +13 -0
  349. package/dist/dependencies/const/ConstDependency.js +63 -0
  350. package/dist/dependencies/context/ContextDependency.d.ts +26 -0
  351. package/dist/dependencies/context/ContextDependency.js +91 -0
  352. package/dist/dependencies/context/ContextDependencyHelpers.d.ts +2 -0
  353. package/dist/dependencies/context/ContextDependencyHelpers.js +128 -0
  354. package/dist/dependencies/context/ContextDependencyTemplateAsId.d.ts +10 -0
  355. package/dist/dependencies/context/ContextDependencyTemplateAsId.js +37 -0
  356. package/dist/dependencies/context/ContextDependencyTemplateAsRequireCall.d.ts +10 -0
  357. package/dist/dependencies/context/ContextDependencyTemplateAsRequireCall.js +39 -0
  358. package/dist/dependencies/context/ContextElementDependency.d.ts +13 -0
  359. package/dist/dependencies/context/ContextElementDependency.js +53 -0
  360. package/dist/dependencies/css/CssExportDependency.d.ts +17 -0
  361. package/dist/dependencies/css/CssExportDependency.js +49 -0
  362. package/dist/dependencies/css/CssImportDependency.d.ts +14 -0
  363. package/dist/dependencies/css/CssImportDependency.js +60 -0
  364. package/dist/dependencies/css/CssLocalIdentifierDependency.d.ts +12 -0
  365. package/dist/dependencies/css/CssLocalIdentifierDependency.js +69 -0
  366. package/dist/dependencies/css/CssSelfLocalIdentifierDependency.d.ts +13 -0
  367. package/dist/dependencies/css/CssSelfLocalIdentifierDependency.js +53 -0
  368. package/dist/dependencies/css/CssUrlDependency.d.ts +12 -0
  369. package/dist/dependencies/css/CssUrlDependency.js +89 -0
  370. package/dist/dependencies/entry/DynamicEntryPlugin.d.ts +22 -0
  371. package/dist/dependencies/entry/DynamicEntryPlugin.js +62 -0
  372. package/dist/dependencies/entry/EntryDependency.d.ts +7 -0
  373. package/dist/dependencies/entry/EntryDependency.js +20 -0
  374. package/dist/dependencies/getFunctionExpression.d.ts +10 -0
  375. package/dist/dependencies/getFunctionExpression.js +42 -0
  376. package/dist/dependencies/harmony/HarmonyAcceptDependency.d.ts +11 -0
  377. package/dist/dependencies/harmony/HarmonyAcceptDependency.js +81 -0
  378. package/dist/dependencies/harmony/HarmonyAcceptImportDependency.d.ts +6 -0
  379. package/dist/dependencies/harmony/HarmonyAcceptImportDependency.js +20 -0
  380. package/dist/dependencies/harmony/HarmonyCompatibilityDependency.d.ts +5 -0
  381. package/dist/dependencies/harmony/HarmonyCompatibilityDependency.js +61 -0
  382. package/dist/dependencies/harmony/HarmonyDetectionParserPlugin.d.ts +5 -0
  383. package/dist/dependencies/harmony/HarmonyDetectionParserPlugin.js +102 -0
  384. package/dist/dependencies/harmony/HarmonyEvaluatedImportSpecifierDependency.d.ts +16 -0
  385. package/dist/dependencies/harmony/HarmonyEvaluatedImportSpecifierDependency.js +84 -0
  386. package/dist/dependencies/harmony/HarmonyExportDependencyParserPlugin.d.ts +5 -0
  387. package/dist/dependencies/harmony/HarmonyExportDependencyParserPlugin.js +143 -0
  388. package/dist/dependencies/harmony/HarmonyExportExpressionDependency.d.ts +23 -0
  389. package/dist/dependencies/harmony/HarmonyExportExpressionDependency.js +148 -0
  390. package/dist/dependencies/harmony/HarmonyExportHeaderDependency.d.ts +10 -0
  391. package/dist/dependencies/harmony/HarmonyExportHeaderDependency.js +39 -0
  392. package/dist/dependencies/harmony/HarmonyExportImportedSpecifierDependency.d.ts +140 -0
  393. package/dist/dependencies/harmony/HarmonyExportImportedSpecifierDependency.js +763 -0
  394. package/dist/dependencies/harmony/HarmonyExportInitFragment.d.ts +14 -0
  395. package/dist/dependencies/harmony/HarmonyExportInitFragment.js +147 -0
  396. package/dist/dependencies/harmony/HarmonyExportSpecifierDependency.d.ts +17 -0
  397. package/dist/dependencies/harmony/HarmonyExportSpecifierDependency.js +62 -0
  398. package/dist/dependencies/harmony/HarmonyExports.d.ts +3 -0
  399. package/dist/dependencies/harmony/HarmonyExports.js +51 -0
  400. package/dist/dependencies/harmony/HarmonyImportDependency.d.ts +30 -0
  401. package/dist/dependencies/harmony/HarmonyImportDependency.js +217 -0
  402. package/dist/dependencies/harmony/HarmonyImportDependencyParserPlugin.d.ts +9 -0
  403. package/dist/dependencies/harmony/HarmonyImportDependencyParserPlugin.js +202 -0
  404. package/dist/dependencies/harmony/HarmonyImportSideEffectDependency.d.ts +8 -0
  405. package/dist/dependencies/harmony/HarmonyImportSideEffectDependency.js +43 -0
  406. package/dist/dependencies/harmony/HarmonyImportSpecifierDependency.d.ts +33 -0
  407. package/dist/dependencies/harmony/HarmonyImportSpecifierDependency.js +272 -0
  408. package/dist/dependencies/harmony/HarmonyModulesPlugin.d.ts +6 -0
  409. package/dist/dependencies/harmony/HarmonyModulesPlugin.js +57 -0
  410. package/dist/dependencies/harmony/HarmonyTopLevelThisParserPlugin.d.ts +4 -0
  411. package/dist/dependencies/harmony/HarmonyTopLevelThisParserPlugin.js +45 -0
  412. package/dist/dependencies/import/ImportContextDependency.d.ts +9 -0
  413. package/dist/dependencies/import/ImportContextDependency.js +34 -0
  414. package/dist/dependencies/import/ImportDependency.d.ts +11 -0
  415. package/dist/dependencies/import/ImportDependency.js +57 -0
  416. package/dist/dependencies/import/ImportEagerDependency.d.ts +7 -0
  417. package/dist/dependencies/import/ImportEagerDependency.js +34 -0
  418. package/dist/dependencies/import/ImportMetaContextDependency.d.ts +7 -0
  419. package/dist/dependencies/import/ImportMetaContextDependency.js +23 -0
  420. package/dist/dependencies/import/ImportMetaContextDependencyParserPlugin.d.ts +3 -0
  421. package/dist/dependencies/import/ImportMetaContextDependencyParserPlugin.js +207 -0
  422. package/dist/dependencies/import/ImportMetaContextPlugin.d.ts +4 -0
  423. package/dist/dependencies/import/ImportMetaContextPlugin.js +27 -0
  424. package/dist/dependencies/import/ImportMetaHotAcceptDependency.d.ts +7 -0
  425. package/dist/dependencies/import/ImportMetaHotAcceptDependency.js +24 -0
  426. package/dist/dependencies/import/ImportMetaHotDeclineDependency.d.ts +7 -0
  427. package/dist/dependencies/import/ImportMetaHotDeclineDependency.js +24 -0
  428. package/dist/dependencies/import/ImportMetaPlugin.d.ts +4 -0
  429. package/dist/dependencies/import/ImportMetaPlugin.js +129 -0
  430. package/dist/dependencies/import/ImportParserPlugin.d.ts +6 -0
  431. package/dist/dependencies/import/ImportParserPlugin.js +207 -0
  432. package/dist/dependencies/import/ImportPlugin.d.ts +4 -0
  433. package/dist/dependencies/import/ImportPlugin.js +37 -0
  434. package/dist/dependencies/import/ImportWeakDependency.d.ts +6 -0
  435. package/dist/dependencies/import/ImportWeakDependency.js +33 -0
  436. package/dist/dependencies/json/JsonExportsDependency.d.ts +14 -0
  437. package/dist/dependencies/json/JsonExportsDependency.js +61 -0
  438. package/dist/dependencies/loader/LoaderDependency.d.ts +8 -0
  439. package/dist/dependencies/loader/LoaderDependency.js +21 -0
  440. package/dist/dependencies/loader/LoaderImportDependency.d.ts +8 -0
  441. package/dist/dependencies/loader/LoaderImportDependency.js +22 -0
  442. package/dist/dependencies/loader/LoaderPlugin.d.ts +5 -0
  443. package/dist/dependencies/loader/LoaderPlugin.js +164 -0
  444. package/dist/dependencies/processExportInfo.d.ts +2 -0
  445. package/dist/dependencies/processExportInfo.js +32 -0
  446. package/dist/ids/DeterministicChunkIdsPlugin.d.ts +10 -0
  447. package/dist/ids/DeterministicChunkIdsPlugin.js +30 -0
  448. package/dist/ids/DeterministicModuleIdsPlugin.d.ts +6 -0
  449. package/dist/ids/DeterministicModuleIdsPlugin.js +38 -0
  450. package/dist/ids/IdHelpers.d.ts +16 -0
  451. package/dist/ids/IdHelpers.js +259 -0
  452. package/dist/ids/NamedChunkIdsPlugin.d.ts +11 -0
  453. package/dist/ids/NamedChunkIdsPlugin.js +34 -0
  454. package/dist/ids/NamedModuleIdsPlugin.d.ts +6 -0
  455. package/dist/ids/NamedModuleIdsPlugin.js +25 -0
  456. package/dist/ids/NaturalChunkIdsPlugin.d.ts +4 -0
  457. package/dist/ids/NaturalChunkIdsPlugin.js +17 -0
  458. package/dist/ids/NaturalModuleIdsPlugin.d.ts +4 -0
  459. package/dist/ids/NaturalModuleIdsPlugin.js +16 -0
  460. package/dist/index.d.ts +23 -0
  461. package/dist/index.js +58 -0
  462. package/dist/library/AbstractLibraryPlugin.d.ts +21 -0
  463. package/dist/library/AbstractLibraryPlugin.js +177 -0
  464. package/dist/library/AssignLibraryPlugin.d.ts +53 -0
  465. package/dist/library/AssignLibraryPlugin.js +201 -0
  466. package/dist/library/EnableLibraryPlugin.d.ts +8 -0
  467. package/dist/library/EnableLibraryPlugin.js +174 -0
  468. package/dist/library/ExportPropertyLibraryPlugin.d.ts +22 -0
  469. package/dist/library/ExportPropertyLibraryPlugin.js +74 -0
  470. package/dist/library/JsonpLibraryPlugin.d.ts +19 -0
  471. package/dist/library/JsonpLibraryPlugin.js +35 -0
  472. package/dist/library/ModuleLibraryPlugin.d.ts +16 -0
  473. package/dist/library/ModuleLibraryPlugin.js +73 -0
  474. package/dist/library/UmdLibraryPlugin.d.ts +22 -0
  475. package/dist/library/UmdLibraryPlugin.js +161 -0
  476. package/dist/module/ContextExclusionPlugin.d.ts +6 -0
  477. package/dist/module/ContextExclusionPlugin.js +13 -0
  478. package/dist/module/ContextModule.d.ts +75 -0
  479. package/dist/module/ContextModule.js +844 -0
  480. package/dist/module/ContextModuleFactory.d.ts +8 -0
  481. package/dist/module/ContextModuleFactory.js +292 -0
  482. package/dist/module/ContextReplacementPlugin.d.ts +11 -0
  483. package/dist/module/ContextReplacementPlugin.js +128 -0
  484. package/dist/module/CssModule.d.ts +20 -0
  485. package/dist/module/CssModule.js +105 -0
  486. package/dist/module/ExportsInfo.d.ts +135 -0
  487. package/dist/module/ExportsInfo.js +1171 -0
  488. package/dist/module/ExportsInfoApiPlugin.d.ts +4 -0
  489. package/dist/module/ExportsInfoApiPlugin.js +38 -0
  490. package/dist/module/ExternalModule.d.ts +47 -0
  491. package/dist/module/ExternalModule.js +458 -0
  492. package/dist/module/ExternalModuleFactoryPlugin.d.ts +7 -0
  493. package/dist/module/ExternalModuleFactoryPlugin.js +176 -0
  494. package/dist/module/ExternalsPlugin.d.ts +7 -0
  495. package/dist/module/ExternalsPlugin.js +18 -0
  496. package/dist/module/Generator.d.ts +40 -0
  497. package/dist/module/Generator.js +49 -0
  498. package/dist/module/IgnoreErrorModuleFactory.d.ts +7 -0
  499. package/dist/module/IgnoreErrorModuleFactory.js +16 -0
  500. package/dist/module/JavascriptMetaInfoPlugin.d.ts +4 -0
  501. package/dist/module/JavascriptMetaInfoPlugin.js +65 -0
  502. package/dist/module/LazyModuleFactoryPlugin.d.ts +6 -0
  503. package/dist/module/LazyModuleFactoryPlugin.js +171 -0
  504. package/dist/module/Module.d.ts +175 -0
  505. package/dist/module/Module.js +550 -0
  506. package/dist/module/ModuleFactory.d.ts +25 -0
  507. package/dist/module/ModuleFactory.js +10 -0
  508. package/dist/module/ModuleGraph.d.ts +74 -0
  509. package/dist/module/ModuleGraph.js +470 -0
  510. package/dist/module/ModuleGraphConnection.d.ts +33 -0
  511. package/dist/module/ModuleGraphConnection.js +113 -0
  512. package/dist/module/ModuleProfile.d.ts +40 -0
  513. package/dist/module/ModuleProfile.js +77 -0
  514. package/dist/module/ModuleTypeConstants.d.ts +22 -0
  515. package/dist/module/ModuleTypeConstants.js +45 -0
  516. package/dist/module/NormalModule.d.ts +104 -0
  517. package/dist/module/NormalModule.js +904 -0
  518. package/dist/module/NormalModuleFactory.d.ts +36 -0
  519. package/dist/module/NormalModuleFactory.js +761 -0
  520. package/dist/module/Parser.d.ts +4 -0
  521. package/dist/module/Parser.js +9 -0
  522. package/dist/module/RawModule.d.ts +29 -0
  523. package/dist/module/RawModule.js +74 -0
  524. package/dist/module/RuntimeGlobals.d.ts +310 -0
  525. package/dist/module/RuntimeGlobals.js +316 -0
  526. package/dist/module/RuntimeHelpers.d.ts +43 -0
  527. package/dist/module/RuntimeHelpers.js +548 -0
  528. package/dist/module/RuntimeModule.d.ts +39 -0
  529. package/dist/module/RuntimeModule.js +114 -0
  530. package/dist/module/RuntimePlugin.d.ts +4 -0
  531. package/dist/module/RuntimePlugin.js +332 -0
  532. package/dist/module/SelfModuleFactory.d.ts +6 -0
  533. package/dist/module/SelfModuleFactory.js +14 -0
  534. package/dist/module/asset/AssetGenerator.d.ts +30 -0
  535. package/dist/module/asset/AssetGenerator.js +364 -0
  536. package/dist/module/asset/AssetModulesPlugin.d.ts +4 -0
  537. package/dist/module/asset/AssetModulesPlugin.js +98 -0
  538. package/dist/module/asset/AssetParser.d.ts +12 -0
  539. package/dist/module/asset/AssetParser.js +44 -0
  540. package/dist/module/asset/AssetSourceGenerator.d.ts +14 -0
  541. package/dist/module/asset/AssetSourceGenerator.js +74 -0
  542. package/dist/module/asset/AssetSourceParser.d.ts +5 -0
  543. package/dist/module/asset/AssetSourceParser.js +19 -0
  544. package/dist/module/asset/RawDataUrlModule.d.ts +27 -0
  545. package/dist/module/asset/RawDataUrlModule.js +102 -0
  546. package/dist/module/async-modules/AwaitDependenciesInitFragment.d.ts +10 -0
  547. package/dist/module/async-modules/AwaitDependenciesInitFragment.js +68 -0
  548. package/dist/module/async-modules/InferAsyncModulesPlugin.d.ts +4 -0
  549. package/dist/module/async-modules/InferAsyncModulesPlugin.js +28 -0
  550. package/dist/module/javascript/BasicEvaluatedExpression.d.ts +139 -0
  551. package/dist/module/javascript/BasicEvaluatedExpression.js +481 -0
  552. package/dist/module/javascript/JavascriptGenerator.d.ts +11 -0
  553. package/dist/module/javascript/JavascriptGenerator.js +103 -0
  554. package/dist/module/javascript/JavascriptModulesPlugin.d.ts +17 -0
  555. package/dist/module/javascript/JavascriptModulesPlugin.js +821 -0
  556. package/dist/module/javascript/JavascriptParser.d.ts +598 -0
  557. package/dist/module/javascript/JavascriptParser.js +3579 -0
  558. package/dist/module/javascript/JavascriptParserHelpers.d.ts +10 -0
  559. package/dist/module/javascript/JavascriptParserHelpers.js +61 -0
  560. package/dist/module/json/JsonData.d.ts +9 -0
  561. package/dist/module/json/JsonData.js +43 -0
  562. package/dist/module/json/JsonGenerator.d.ts +15 -0
  563. package/dist/module/json/JsonGenerator.js +137 -0
  564. package/dist/module/json/JsonModulesPlugin.d.ts +4 -0
  565. package/dist/module/json/JsonModulesPlugin.js +20 -0
  566. package/dist/module/json/JsonParser.d.ts +7 -0
  567. package/dist/module/json/JsonParser.js +41 -0
  568. package/dist/module/runtime/AsyncModuleRuntimeModule.d.ts +6 -0
  569. package/dist/module/runtime/AsyncModuleRuntimeModule.js +115 -0
  570. package/dist/module/runtime/AutoPublicPathRuntimeModule.d.ts +6 -0
  571. package/dist/module/runtime/AutoPublicPathRuntimeModule.js +81 -0
  572. package/dist/module/runtime/BaseUriRuntimeModule.d.ts +6 -0
  573. package/dist/module/runtime/BaseUriRuntimeModule.js +41 -0
  574. package/dist/module/runtime/ChunkNameRuntimeModule.d.ts +7 -0
  575. package/dist/module/runtime/ChunkNameRuntimeModule.js +40 -0
  576. package/dist/module/runtime/CompatGetDefaultExportRuntimeModule.d.ts +6 -0
  577. package/dist/module/runtime/CompatGetDefaultExportRuntimeModule.js +54 -0
  578. package/dist/module/runtime/CompatRuntimeModule.d.ts +7 -0
  579. package/dist/module/runtime/CompatRuntimeModule.js +59 -0
  580. package/dist/module/runtime/CreateFakeNamespaceObjectRuntimeModule.d.ts +6 -0
  581. package/dist/module/runtime/CreateFakeNamespaceObjectRuntimeModule.js +77 -0
  582. package/dist/module/runtime/CreateScriptRuntimeModule.d.ts +6 -0
  583. package/dist/module/runtime/CreateScriptRuntimeModule.js +44 -0
  584. package/dist/module/runtime/CreateScriptUrlRuntimeModule.d.ts +6 -0
  585. package/dist/module/runtime/CreateScriptUrlRuntimeModule.js +44 -0
  586. package/dist/module/runtime/DefinePropertyGettersRuntimeModule.d.ts +6 -0
  587. package/dist/module/runtime/DefinePropertyGettersRuntimeModule.js +56 -0
  588. package/dist/module/runtime/EnsureChunkRuntimeModule.d.ts +7 -0
  589. package/dist/module/runtime/EnsureChunkRuntimeModule.js +66 -0
  590. package/dist/module/runtime/GetChunkFilenameRuntimeModule.d.ts +10 -0
  591. package/dist/module/runtime/GetChunkFilenameRuntimeModule.js +220 -0
  592. package/dist/module/runtime/GetFullHashRuntimeModule.d.ts +6 -0
  593. package/dist/module/runtime/GetFullHashRuntimeModule.js +42 -0
  594. package/dist/module/runtime/GetMainFilenameRuntimeModule.d.ts +8 -0
  595. package/dist/module/runtime/GetMainFilenameRuntimeModule.js +52 -0
  596. package/dist/module/runtime/GetTrustedTypesPolicyRuntimeModule.d.ts +7 -0
  597. package/dist/module/runtime/GetTrustedTypesPolicyRuntimeModule.js +89 -0
  598. package/dist/module/runtime/GlobalRuntimeModule.d.ts +6 -0
  599. package/dist/module/runtime/GlobalRuntimeModule.js +61 -0
  600. package/dist/module/runtime/HasOwnPropertyRuntimeModule.d.ts +6 -0
  601. package/dist/module/runtime/HasOwnPropertyRuntimeModule.js +44 -0
  602. package/dist/module/runtime/HelperRuntimeModule.d.ts +5 -0
  603. package/dist/module/runtime/HelperRuntimeModule.js +12 -0
  604. package/dist/module/runtime/LoadScriptRuntimeModule.d.ts +9 -0
  605. package/dist/module/runtime/LoadScriptRuntimeModule.js +129 -0
  606. package/dist/module/runtime/MakeNamespaceObjectRuntimeModule.d.ts +6 -0
  607. package/dist/module/runtime/MakeNamespaceObjectRuntimeModule.js +53 -0
  608. package/dist/module/runtime/NonceRuntimeModule.d.ts +6 -0
  609. package/dist/module/runtime/NonceRuntimeModule.js +39 -0
  610. package/dist/module/runtime/OnChunksLoadedRuntimeModule.d.ts +6 -0
  611. package/dist/module/runtime/OnChunksLoadedRuntimeModule.js +81 -0
  612. package/dist/module/runtime/PublicPathRuntimeModule.d.ts +7 -0
  613. package/dist/module/runtime/PublicPathRuntimeModule.js +44 -0
  614. package/dist/module/runtime/RelativeUrlRuntimeModule.d.ts +6 -0
  615. package/dist/module/runtime/RelativeUrlRuntimeModule.js +56 -0
  616. package/dist/module/runtime/RuntimeIdRuntimeModule.d.ts +6 -0
  617. package/dist/module/runtime/RuntimeIdRuntimeModule.js +45 -0
  618. package/dist/module/runtime/StartupChunkDependenciesPlugin.d.ts +11 -0
  619. package/dist/module/runtime/StartupChunkDependenciesPlugin.js +69 -0
  620. package/dist/module/runtime/StartupChunkDependenciesRuntimeModule.d.ts +7 -0
  621. package/dist/module/runtime/StartupChunkDependenciesRuntimeModule.js +67 -0
  622. package/dist/module/runtime/StartupEntrypointRuntimeModule.d.ts +7 -0
  623. package/dist/module/runtime/StartupEntrypointRuntimeModule.js +58 -0
  624. package/dist/module/uri/DataUriPlugin.d.ts +4 -0
  625. package/dist/module/uri/DataUriPlugin.js +46 -0
  626. package/dist/module/uri/FileUriPlugin.d.ts +4 -0
  627. package/dist/module/uri/FileUriPlugin.js +31 -0
  628. package/dist/plugins/APIPlugin.d.ts +9 -0
  629. package/dist/plugins/APIPlugin.js +230 -0
  630. package/dist/plugins/CleanPlugin.d.ts +7 -0
  631. package/dist/plugins/CleanPlugin.js +295 -0
  632. package/dist/plugins/CompatibilityPlugin.d.ts +4 -0
  633. package/dist/plugins/CompatibilityPlugin.js +142 -0
  634. package/dist/plugins/ConstPlugin.d.ts +4 -0
  635. package/dist/plugins/ConstPlugin.js +409 -0
  636. package/dist/plugins/DefaultStatsFactoryPlugin.d.ts +4 -0
  637. package/dist/plugins/DefaultStatsFactoryPlugin.js +1552 -0
  638. package/dist/plugins/DefaultStatsPresetPlugin.d.ts +4 -0
  639. package/dist/plugins/DefaultStatsPresetPlugin.js +306 -0
  640. package/dist/plugins/DefaultStatsPrinterPlugin.d.ts +4 -0
  641. package/dist/plugins/DefaultStatsPrinterPlugin.js +986 -0
  642. package/dist/plugins/DefinePlugin.d.ts +15 -0
  643. package/dist/plugins/DefinePlugin.js +400 -0
  644. package/dist/plugins/NodeStuffPlugin.d.ts +6 -0
  645. package/dist/plugins/NodeStuffPlugin.js +134 -0
  646. package/dist/plugins/ProgressPlugin.d.ts +20 -0
  647. package/dist/plugins/ProgressPlugin.js +494 -0
  648. package/dist/plugins/RecordIdsPlugin.d.ts +9 -0
  649. package/dist/plugins/RecordIdsPlugin.js +175 -0
  650. package/dist/plugins/UseStrictPlugin.d.ts +4 -0
  651. package/dist/plugins/UseStrictPlugin.js +35 -0
  652. package/dist/plugins/WarnCaseSensitiveModulesPlugin.d.ts +4 -0
  653. package/dist/plugins/WarnCaseSensitiveModulesPlugin.js +37 -0
  654. package/dist/plugins/WarnDeprecatedOptionPlugin.d.ts +8 -0
  655. package/dist/plugins/WarnDeprecatedOptionPlugin.js +29 -0
  656. package/dist/plugins/cssMinimizer/CssMinimizerMinify.js +73 -0
  657. package/dist/plugins/cssMinimizer/CssMinimizerPlugin.d.ts +11 -0
  658. package/dist/plugins/cssMinimizer/CssMinimizerPlugin.js +329 -0
  659. package/dist/plugins/cssMinimizer/CssMinimizerUtils.js +147 -0
  660. package/dist/plugins/miniCssExtractPlugin/MiniCssExtractLoader.d.ts +1 -0
  661. package/dist/plugins/miniCssExtractPlugin/MiniCssExtractLoader.js +177 -0
  662. package/dist/plugins/miniCssExtractPlugin/MiniCssExtractPlugin.d.ts +22 -0
  663. package/dist/plugins/miniCssExtractPlugin/MiniCssExtractPlugin.js +780 -0
  664. package/dist/plugins/miniCssExtractPlugin/MiniCssUtils.d.ts +14 -0
  665. package/dist/plugins/miniCssExtractPlugin/MiniCssUtils.js +132 -0
  666. package/dist/plugins/optimize/AggressiveMergingPlugin.d.ts +6 -0
  667. package/dist/plugins/optimize/AggressiveMergingPlugin.js +62 -0
  668. package/dist/plugins/optimize/AggressiveSplittingPlugin.d.ts +7 -0
  669. package/dist/plugins/optimize/AggressiveSplittingPlugin.js +247 -0
  670. package/dist/plugins/optimize/ConcatenatedModule.d.ts +47 -0
  671. package/dist/plugins/optimize/ConcatenatedModule.js +1221 -0
  672. package/dist/plugins/optimize/EnsureChunkConditionsPlugin.d.ts +4 -0
  673. package/dist/plugins/optimize/EnsureChunkConditionsPlugin.js +61 -0
  674. package/dist/plugins/optimize/FlagAllModulesAsUsedPlugin.d.ts +6 -0
  675. package/dist/plugins/optimize/FlagAllModulesAsUsedPlugin.js +30 -0
  676. package/dist/plugins/optimize/FlagDependencyExportsPlugin.d.ts +4 -0
  677. package/dist/plugins/optimize/FlagDependencyExportsPlugin.js +275 -0
  678. package/dist/plugins/optimize/FlagDependencyUsagePlugin.d.ts +6 -0
  679. package/dist/plugins/optimize/FlagDependencyUsagePlugin.js +243 -0
  680. package/dist/plugins/optimize/FlagEntryExportAsUsedPlugin.d.ts +7 -0
  681. package/dist/plugins/optimize/FlagEntryExportAsUsedPlugin.js +34 -0
  682. package/dist/plugins/optimize/FlagIncludedChunksPlugin.d.ts +4 -0
  683. package/dist/plugins/optimize/FlagIncludedChunksPlugin.js +85 -0
  684. package/dist/plugins/optimize/InnerGraph.d.ts +20 -0
  685. package/dist/plugins/optimize/InnerGraph.js +234 -0
  686. package/dist/plugins/optimize/InnerGraphPlugin.d.ts +4 -0
  687. package/dist/plugins/optimize/InnerGraphPlugin.js +289 -0
  688. package/dist/plugins/optimize/LimitChunkCountPlugin.d.ts +6 -0
  689. package/dist/plugins/optimize/LimitChunkCountPlugin.js +200 -0
  690. package/dist/plugins/optimize/MangleExportsPlugin.d.ts +6 -0
  691. package/dist/plugins/optimize/MangleExportsPlugin.js +124 -0
  692. package/dist/plugins/optimize/MergeDuplicateChunksPlugin.d.ts +4 -0
  693. package/dist/plugins/optimize/MergeDuplicateChunksPlugin.js +84 -0
  694. package/dist/plugins/optimize/MinChunkSizePlugin.d.ts +6 -0
  695. package/dist/plugins/optimize/MinChunkSizePlugin.js +71 -0
  696. package/dist/plugins/optimize/ModuleConcatenationPlugin.d.ts +8 -0
  697. package/dist/plugins/optimize/ModuleConcatenationPlugin.js +525 -0
  698. package/dist/plugins/optimize/ModuleInfoHeaderPlugin.d.ts +6 -0
  699. package/dist/plugins/optimize/ModuleInfoHeaderPlugin.js +145 -0
  700. package/dist/plugins/optimize/NoEmitOnErrorsPlugin.d.ts +4 -0
  701. package/dist/plugins/optimize/NoEmitOnErrorsPlugin.js +17 -0
  702. package/dist/plugins/optimize/OptimizationStages.d.ts +4 -0
  703. package/dist/plugins/optimize/OptimizationStages.js +9 -0
  704. package/dist/plugins/optimize/RealContentHashPlugin.d.ts +11 -0
  705. package/dist/plugins/optimize/RealContentHashPlugin.js +295 -0
  706. package/dist/plugins/optimize/RemoveEmptyChunksPlugin.d.ts +4 -0
  707. package/dist/plugins/optimize/RemoveEmptyChunksPlugin.js +30 -0
  708. package/dist/plugins/optimize/RemoveParentModulesPlugin.d.ts +4 -0
  709. package/dist/plugins/optimize/RemoveParentModulesPlugin.js +103 -0
  710. package/dist/plugins/optimize/RuntimeChunkPlugin.d.ts +6 -0
  711. package/dist/plugins/optimize/RuntimeChunkPlugin.js +25 -0
  712. package/dist/plugins/optimize/SideEffectsFlagPlugin.d.ts +7 -0
  713. package/dist/plugins/optimize/SideEffectsFlagPlugin.js +211 -0
  714. package/dist/plugins/optimize/SplitChunksPlugin.d.ts +7 -0
  715. package/dist/plugins/optimize/SplitChunksPlugin.js +1113 -0
  716. package/dist/rules/BasicEffectRulePlugin.d.ts +7 -0
  717. package/dist/rules/BasicEffectRulePlugin.js +21 -0
  718. package/dist/rules/BasicMatcherRulePlugin.d.ts +8 -0
  719. package/dist/rules/BasicMatcherRulePlugin.js +25 -0
  720. package/dist/rules/ObjectMatcherRulePlugin.d.ts +7 -0
  721. package/dist/rules/ObjectMatcherRulePlugin.js +27 -0
  722. package/dist/rules/RuleSetCompiler.d.ts +20 -0
  723. package/dist/rules/RuleSetCompiler.js +242 -0
  724. package/dist/rules/UseEffectRulePlugin.d.ts +5 -0
  725. package/dist/rules/UseEffectRulePlugin.js +117 -0
  726. package/dist/serialization/Serialization.d.ts +11 -0
  727. package/dist/serialization/Serialization.js +95 -0
  728. package/dist/serialization/Serializer.d.ts +9 -0
  729. package/dist/serialization/Serializer.js +43 -0
  730. package/dist/serialization/SerializerMiddleware.d.ts +13 -0
  731. package/dist/serialization/SerializerMiddleware.js +86 -0
  732. package/dist/serialization/internalSerializables.d.ts +82 -0
  733. package/dist/serialization/internalSerializables.js +94 -0
  734. package/dist/serialization/makeSerializable.d.ts +2 -0
  735. package/dist/serialization/makeSerializable.js +25 -0
  736. package/dist/serialization/middlewares/BinaryMiddleware.d.ts +12 -0
  737. package/dist/serialization/middlewares/BinaryMiddleware.js +955 -0
  738. package/dist/serialization/middlewares/FileMiddleware.d.ts +9 -0
  739. package/dist/serialization/middlewares/FileMiddleware.js +546 -0
  740. package/dist/serialization/middlewares/ObjectMiddleware.d.ts +15 -0
  741. package/dist/serialization/middlewares/ObjectMiddleware.js +602 -0
  742. package/dist/serialization/middlewares/SingleItemMiddleware.d.ts +6 -0
  743. package/dist/serialization/middlewares/SingleItemMiddleware.js +15 -0
  744. package/dist/serialization/registerExternalSerializer.d.ts +1 -0
  745. package/dist/serialization/registerExternalSerializer.js +154 -0
  746. package/dist/serialization/serializers/ArraySerializer.d.ts +5 -0
  747. package/dist/serialization/serializers/ArraySerializer.js +18 -0
  748. package/dist/serialization/serializers/DateObjectSerializer.d.ts +5 -0
  749. package/dist/serialization/serializers/DateObjectSerializer.js +11 -0
  750. package/dist/serialization/serializers/ErrorObjectSerializer.d.ts +7 -0
  751. package/dist/serialization/serializers/ErrorObjectSerializer.js +20 -0
  752. package/dist/serialization/serializers/MapObjectSerializer.d.ts +5 -0
  753. package/dist/serialization/serializers/MapObjectSerializer.js +26 -0
  754. package/dist/serialization/serializers/NullPrototypeObjectSerializer.d.ts +5 -0
  755. package/dist/serialization/serializers/NullPrototypeObjectSerializer.js +28 -0
  756. package/dist/serialization/serializers/PlainObjectSerializer.d.ts +5 -0
  757. package/dist/serialization/serializers/PlainObjectSerializer.js +77 -0
  758. package/dist/serialization/serializers/RegExpObjectSerializer.d.ts +5 -0
  759. package/dist/serialization/serializers/RegExpObjectSerializer.js +12 -0
  760. package/dist/serialization/serializers/SetObjectSerializer.d.ts +5 -0
  761. package/dist/serialization/serializers/SetObjectSerializer.js +19 -0
  762. package/dist/sourcemap/EvalDevToolModulePlugin.d.ts +8 -0
  763. package/dist/sourcemap/EvalDevToolModulePlugin.js +97 -0
  764. package/dist/sourcemap/EvalSourceMapDevToolPlugin.d.ts +9 -0
  765. package/dist/sourcemap/EvalSourceMapDevToolPlugin.js +167 -0
  766. package/dist/sourcemap/SourceMapDevToolModuleOptionsPlugin.d.ts +6 -0
  767. package/dist/sourcemap/SourceMapDevToolModuleOptionsPlugin.js +29 -0
  768. package/dist/sourcemap/SourceMapDevToolPlugin.d.ts +11 -0
  769. package/dist/sourcemap/SourceMapDevToolPlugin.js +364 -0
  770. package/dist/template/ChunkTemplate.d.ts +6 -0
  771. package/dist/template/ChunkTemplate.js +69 -0
  772. package/dist/template/LibraryTemplatePlugin.d.ts +6 -0
  773. package/dist/template/LibraryTemplatePlugin.js +23 -0
  774. package/dist/template/MainTemplate.d.ts +10 -0
  775. package/dist/template/MainTemplate.js +177 -0
  776. package/dist/template/ModuleTemplate.d.ts +7 -0
  777. package/dist/template/ModuleTemplate.js +46 -0
  778. package/dist/template/RuntimeTemplate.d.ts +158 -0
  779. package/dist/template/RuntimeTemplate.js +663 -0
  780. package/dist/template/Template.d.ts +25 -0
  781. package/dist/template/Template.js +269 -0
  782. package/dist/template/TemplatedPathPlugin.d.ts +4 -0
  783. package/dist/template/TemplatedPathPlugin.js +228 -0
  784. package/dist/thread/WorkerError.d.ts +4 -0
  785. package/dist/thread/WorkerError.js +21 -0
  786. package/dist/thread/WorkerPool.d.ts +52 -0
  787. package/dist/thread/WorkerPool.js +370 -0
  788. package/dist/thread/readBuffer.d.ts +1 -0
  789. package/dist/thread/readBuffer.js +37 -0
  790. package/dist/thread/serializer.d.ts +2 -0
  791. package/dist/thread/serializer.js +24 -0
  792. package/dist/thread/worker.d.ts +1 -0
  793. package/dist/thread/worker.js +185 -0
  794. package/dist/thread/workerPools.d.ts +2 -0
  795. package/dist/thread/workerPools.js +31 -0
  796. package/dist/types/index.d.ts +58 -0
  797. package/dist/types/index.js +8 -0
  798. package/package.json +96 -0
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const smartGrouping = (items, groupConfigs) => {
4
+ const itemsWithGroups = new Set();
5
+ const allGroups = new Map();
6
+ for (const item of items) {
7
+ const groups = new Set();
8
+ for (let i = 0; i < groupConfigs.length; i++) {
9
+ const groupConfig = groupConfigs[i];
10
+ const keys = groupConfig.getKeys(item);
11
+ if (keys) {
12
+ for (const name of keys) {
13
+ const key = `${i}:${name}`;
14
+ let group = allGroups.get(key);
15
+ if (group === undefined) {
16
+ allGroups.set(key, (group = {
17
+ config: groupConfig,
18
+ name,
19
+ alreadyGrouped: false,
20
+ items: undefined,
21
+ }));
22
+ }
23
+ groups.add(group);
24
+ }
25
+ }
26
+ }
27
+ itemsWithGroups.add({
28
+ item,
29
+ groups,
30
+ });
31
+ }
32
+ const runGrouping = itemsWithGroups => {
33
+ var _a;
34
+ const totalSize = itemsWithGroups.size;
35
+ for (const entry of itemsWithGroups) {
36
+ for (const group of entry.groups) {
37
+ if (group.alreadyGrouped)
38
+ continue;
39
+ const items = group.items;
40
+ if (items === undefined) {
41
+ group.items = new Set([entry]);
42
+ }
43
+ else {
44
+ items.add(entry);
45
+ }
46
+ }
47
+ }
48
+ const groupMap = new Map();
49
+ for (const group of allGroups.values()) {
50
+ if (group.items) {
51
+ const items = group.items;
52
+ group.items = undefined;
53
+ groupMap.set(group, {
54
+ items,
55
+ options: undefined,
56
+ used: false,
57
+ });
58
+ }
59
+ }
60
+ const results = [];
61
+ for (;;) {
62
+ let bestGroup;
63
+ let bestGroupSize = -1;
64
+ let bestGroupItems;
65
+ let bestGroupOptions;
66
+ for (const [group, state] of groupMap) {
67
+ const { items, used } = state;
68
+ let options = state.options;
69
+ if (options === undefined) {
70
+ const groupConfig = group.config;
71
+ state.options = options =
72
+ ((_a = groupConfig.getOptions) === null || _a === void 0 ? void 0 : _a.call(groupConfig, group.name, Array.from(items, ({ item }) => item))) ||
73
+ false;
74
+ }
75
+ const force = options === null || options === void 0 ? void 0 : options.force;
76
+ if (!force) {
77
+ if (bestGroupOptions === null || bestGroupOptions === void 0 ? void 0 : bestGroupOptions.force)
78
+ continue;
79
+ if (used)
80
+ continue;
81
+ if (items.size <= 1 || totalSize - items.size <= 1) {
82
+ continue;
83
+ }
84
+ }
85
+ const targetGroupCount = (options === null || options === void 0 ? void 0 : options.targetGroupCount) || 4;
86
+ const sizeValue = force
87
+ ? items.size
88
+ : Math.min(items.size, (totalSize * 2) / targetGroupCount + itemsWithGroups.size - items.size);
89
+ if (sizeValue > bestGroupSize ||
90
+ (force && (!bestGroupOptions || !bestGroupOptions.force))) {
91
+ bestGroup = group;
92
+ bestGroupSize = sizeValue;
93
+ bestGroupItems = items;
94
+ bestGroupOptions = options;
95
+ }
96
+ }
97
+ if (bestGroup === undefined) {
98
+ break;
99
+ }
100
+ const items = new Set(bestGroupItems);
101
+ const options = bestGroupOptions;
102
+ const groupChildren = !options || options.groupChildren !== false;
103
+ for (const item of items) {
104
+ itemsWithGroups.delete(item);
105
+ // Remove all groups that items have from the map to not select them again
106
+ for (const group of item.groups) {
107
+ const state = groupMap.get(group);
108
+ if (state !== undefined) {
109
+ state.items.delete(item);
110
+ if (state.items.size === 0) {
111
+ groupMap.delete(group);
112
+ }
113
+ else {
114
+ state.options = undefined;
115
+ if (groupChildren) {
116
+ state.used = true;
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ groupMap.delete(bestGroup);
123
+ const key = bestGroup.name;
124
+ const groupConfig = bestGroup.config;
125
+ const allItems = Array.from(items, ({ item }) => item);
126
+ bestGroup.alreadyGrouped = true;
127
+ const children = groupChildren ? runGrouping(items) : allItems;
128
+ bestGroup.alreadyGrouped = false;
129
+ results.push(groupConfig.createGroup(key, children, allItems));
130
+ }
131
+ for (const { item } of itemsWithGroups) {
132
+ results.push(item);
133
+ }
134
+ return results;
135
+ };
136
+ return runGrouping(itemsWithGroups);
137
+ };
138
+ exports.default = smartGrouping;
@@ -0,0 +1,2 @@
1
+ declare const isSourceEqual: (a: any, b: any) => any;
2
+ export { isSourceEqual };
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSourceEqual = void 0;
4
+ const equalityCache = new WeakMap();
5
+ const _isSourceEqual = (a, b) => {
6
+ // prefer .buffer(), it's called anyway during emit
7
+ let aSource = typeof a.buffer === 'function' ? a.buffer() : a.source();
8
+ let bSource = typeof b.buffer === 'function' ? b.buffer() : b.source();
9
+ if (aSource === bSource)
10
+ return true;
11
+ if (typeof aSource === 'string' && typeof bSource === 'string')
12
+ return false;
13
+ if (!Buffer.isBuffer(aSource))
14
+ aSource = Buffer.from(aSource, 'utf-8');
15
+ if (!Buffer.isBuffer(bSource))
16
+ bSource = Buffer.from(bSource, 'utf-8');
17
+ return aSource.equals(bSource);
18
+ };
19
+ const isSourceEqual = (a, b) => {
20
+ if (a === b)
21
+ return true;
22
+ const cache1 = equalityCache.get(a);
23
+ if (cache1 !== undefined) {
24
+ const result = cache1.get(b);
25
+ if (result !== undefined)
26
+ return result;
27
+ }
28
+ const result = _isSourceEqual(a, b);
29
+ if (cache1 !== undefined) {
30
+ cache1.set(b, result);
31
+ }
32
+ else {
33
+ const map = new WeakMap();
34
+ map.set(b, result);
35
+ equalityCache.set(a, map);
36
+ }
37
+ const cache2 = equalityCache.get(b);
38
+ if (cache2 !== undefined) {
39
+ cache2.set(a, result);
40
+ }
41
+ else {
42
+ const map = new WeakMap();
43
+ map.set(a, result);
44
+ equalityCache.set(b, map);
45
+ }
46
+ return result;
47
+ };
48
+ exports.isSourceEqual = isSourceEqual;
@@ -0,0 +1,19 @@
1
+ declare class MultiStats {
2
+ stats: any;
3
+ constructor(stats: any);
4
+ get hash(): any;
5
+ hasErrors(): any;
6
+ hasWarnings(): any;
7
+ _createChildOptions(options: any, context: any): {
8
+ version: any;
9
+ hash: any;
10
+ errorsCount: any;
11
+ warningsCount: any;
12
+ errors: any;
13
+ warnings: any;
14
+ children: any;
15
+ };
16
+ toJson(options: any): any;
17
+ toString(options: any): any;
18
+ }
19
+ export default MultiStats;
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ const identifierUtils = __importStar(require("@/base/identifier"));
38
+ const indent = (str, prefix) => {
39
+ const rem = str.replace(/\n([^\n])/g, `\n${prefix}$1`);
40
+ return prefix + rem;
41
+ };
42
+ class MultiStats {
43
+ constructor(stats) {
44
+ this.stats = stats;
45
+ }
46
+ get hash() {
47
+ return this.stats.map(stat => stat.hash).join('');
48
+ }
49
+ hasErrors() {
50
+ return this.stats.some(stat => stat.hasErrors());
51
+ }
52
+ hasWarnings() {
53
+ return this.stats.some(stat => stat.hasWarnings());
54
+ }
55
+ _createChildOptions(options, context) {
56
+ if (!options) {
57
+ options = {};
58
+ }
59
+ const _a = typeof options === 'string' ? { preset: options } : options, { children: childrenOptions = undefined } = _a, baseOptions = __rest(_a, ["children"]);
60
+ const children = this.stats.map((stat, idx) => {
61
+ const childOptions = Array.isArray(childrenOptions) ? childrenOptions[idx] : childrenOptions;
62
+ return stat.compilation.createStatsOptions(Object.assign(Object.assign({}, baseOptions), (typeof childOptions === 'string'
63
+ ? { preset: childOptions }
64
+ : childOptions && typeof childOptions === 'object'
65
+ ? childOptions
66
+ : undefined)), context);
67
+ });
68
+ return {
69
+ version: children.every(o => o.version),
70
+ hash: children.every(o => o.hash),
71
+ errorsCount: children.every(o => o.errorsCount),
72
+ warningsCount: children.every(o => o.warningsCount),
73
+ errors: children.every(o => o.errors),
74
+ warnings: children.every(o => o.warnings),
75
+ children,
76
+ };
77
+ }
78
+ toJson(options) {
79
+ options = this._createChildOptions(options, { forToString: false });
80
+ const obj = {};
81
+ obj.children = this.stats.map((stat, idx) => {
82
+ const obj = stat.toJson(options.children[idx]);
83
+ const compilationName = stat.compilation.name;
84
+ const name = compilationName &&
85
+ identifierUtils.makePathsRelative(options.context, compilationName, stat.compilation.compiler.root);
86
+ obj.name = name;
87
+ return obj;
88
+ });
89
+ if (options.version) {
90
+ obj.version = obj.children[0].version;
91
+ }
92
+ if (options.hash) {
93
+ obj.hash = obj.children.map(j => j.hash).join('');
94
+ }
95
+ const mapError = (j, obj) => (Object.assign(Object.assign({}, obj), { compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name }));
96
+ if (options.errors) {
97
+ obj.errors = [];
98
+ for (const j of obj.children) {
99
+ for (const i of j.errors) {
100
+ obj.errors.push(mapError(j, i));
101
+ }
102
+ }
103
+ }
104
+ if (options.warnings) {
105
+ obj.warnings = [];
106
+ for (const j of obj.children) {
107
+ for (const i of j.warnings) {
108
+ obj.warnings.push(mapError(j, i));
109
+ }
110
+ }
111
+ }
112
+ if (options.errorsCount) {
113
+ obj.errorsCount = 0;
114
+ for (const j of obj.children) {
115
+ obj.errorsCount += j.errorsCount;
116
+ }
117
+ }
118
+ if (options.warningsCount) {
119
+ obj.warningsCount = 0;
120
+ for (const j of obj.children) {
121
+ obj.warningsCount += j.warningsCount;
122
+ }
123
+ }
124
+ return obj;
125
+ }
126
+ toString(options) {
127
+ options = this._createChildOptions(options, { forToString: true });
128
+ const results = this.stats.map((stat, idx) => {
129
+ const str = stat.toString(options.children[idx]);
130
+ const compilationName = stat.compilation.name;
131
+ const name = compilationName &&
132
+ identifierUtils
133
+ .makePathsRelative(options.context, compilationName, stat.compilation.compiler.root)
134
+ .replace(/\|/g, ' ');
135
+ if (!str)
136
+ return str;
137
+ return name ? `${name}:\n${indent(str, ' ')}` : str;
138
+ });
139
+ return results.filter(Boolean).join('\n\n');
140
+ }
141
+ }
142
+ exports.default = MultiStats;
@@ -0,0 +1,13 @@
1
+ declare class Stats {
2
+ compilation: any;
3
+ constructor(compilation: any);
4
+ get hash(): any;
5
+ get startTime(): any;
6
+ get endTime(): any;
7
+ get buildReason(): any;
8
+ hasWarnings(): any;
9
+ hasErrors(): any;
10
+ toJson(options?: any): any;
11
+ toString(options: any): any;
12
+ }
13
+ export default Stats;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class Stats {
4
+ constructor(compilation) {
5
+ this.compilation = compilation;
6
+ }
7
+ get hash() {
8
+ return this.compilation.hash;
9
+ }
10
+ get startTime() {
11
+ return this.compilation.startTime;
12
+ }
13
+ get endTime() {
14
+ return this.compilation.endTime;
15
+ }
16
+ get buildReason() {
17
+ return this.compilation.compiler.watching.buildReason;
18
+ }
19
+ hasWarnings() {
20
+ return (this.compilation.warnings.length > 0 ||
21
+ this.compilation.children.some(child => child.getStats().hasWarnings()));
22
+ }
23
+ hasErrors() {
24
+ return (this.compilation.errors.length > 0 ||
25
+ this.compilation.children.some(child => child.getStats().hasErrors()));
26
+ }
27
+ toJson(options) {
28
+ options = this.compilation.createStatsOptions(options, {
29
+ forToString: false,
30
+ });
31
+ const statsFactory = this.compilation.createStatsFactory(options);
32
+ return statsFactory.create('compilation', this.compilation, {
33
+ compilation: this.compilation,
34
+ });
35
+ }
36
+ toString(options) {
37
+ options = this.compilation.createStatsOptions(options, {
38
+ forToString: true,
39
+ });
40
+ const statsFactory = this.compilation.createStatsFactory(options);
41
+ const statsPrinter = this.compilation.createStatsPrinter(options);
42
+ const data = statsFactory.create('compilation', this.compilation, {
43
+ compilation: this.compilation,
44
+ });
45
+ const result = statsPrinter.print('compilation', data);
46
+ return result === undefined ? '' : result;
47
+ }
48
+ }
49
+ exports.default = Stats;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @typedef {Object} KnownStatsFactoryContext
3
+ * @property {string} type
4
+ * @property {function(string): string=} makePathsRelative
5
+ * @property {Compilation=} compilation
6
+ * @property {Set<Module>=} rootModules
7
+ * @property {Map<string,Chunk[]>=} compilationFileToChunks
8
+ * @property {Map<string,Chunk[]>=} compilationAuxiliaryFileToChunks
9
+ * @property {RuntimeSpec=} runtime
10
+ * @property {function(Compilation): BaseError[]=} cachedGetErrors
11
+ * @property {function(Compilation): BaseError[]=} cachedGetWarnings
12
+ */
13
+ /** @typedef {KnownStatsFactoryContext & Record<string, any>} StatsFactoryContext */
14
+ declare class StatsFactory {
15
+ hooks: any;
16
+ _caches: any;
17
+ _inCreate: boolean;
18
+ constructor();
19
+ _getAllLevelHooks(hookMap: any, cache: any, type: any): any;
20
+ _forEachLevel(hookMap: any, cache: any, type: any, fn: any): any;
21
+ _forEachLevelWaterfall(hookMap: any, cache: any, type: any, data: any, fn: any): any;
22
+ _forEachLevelFilter(hookMap: any, cache: any, type: any, items: any, fn: any, forceClone: any): any;
23
+ create(type: any, data: any, baseContext: any): any;
24
+ _create(type: any, data: any, baseContext: any): any;
25
+ }
26
+ export default StatsFactory;
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const tapable_1 = require("tapable");
7
+ const comparators_1 = require("@/base/comparators");
8
+ const smartGrouping_1 = __importDefault(require("@/base/smartGrouping"));
9
+ /**
10
+ * @typedef {Object} KnownStatsFactoryContext
11
+ * @property {string} type
12
+ * @property {function(string): string=} makePathsRelative
13
+ * @property {Compilation=} compilation
14
+ * @property {Set<Module>=} rootModules
15
+ * @property {Map<string,Chunk[]>=} compilationFileToChunks
16
+ * @property {Map<string,Chunk[]>=} compilationAuxiliaryFileToChunks
17
+ * @property {RuntimeSpec=} runtime
18
+ * @property {function(Compilation): BaseError[]=} cachedGetErrors
19
+ * @property {function(Compilation): BaseError[]=} cachedGetWarnings
20
+ */
21
+ /** @typedef {KnownStatsFactoryContext & Record<string, any>} StatsFactoryContext */
22
+ class StatsFactory {
23
+ constructor() {
24
+ this.hooks = Object.freeze({
25
+ extract: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['object', 'data', 'context'])),
26
+ filter: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['item', 'context', 'index', 'unfilteredIndex'])),
27
+ sort: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['comparators', 'context'])),
28
+ filterSorted: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['item', 'context', 'index', 'unfilteredIndex'])),
29
+ groupResults: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['groupConfigs', 'context'])),
30
+ sortResults: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['comparators', 'context'])),
31
+ filterResults: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['item', 'context', 'index', 'unfilteredIndex'])),
32
+ merge: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['items', 'context'])),
33
+ result: new tapable_1.HookMap(() => new tapable_1.SyncWaterfallHook(['result', 'context'])),
34
+ getItemName: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['item', 'context'])),
35
+ getItemFactory: new tapable_1.HookMap(() => new tapable_1.SyncBailHook(['item', 'context'])),
36
+ });
37
+ const hooks = this.hooks;
38
+ this._caches = {};
39
+ for (const key of Object.keys(hooks)) {
40
+ this._caches[key] = new Map();
41
+ }
42
+ this._inCreate = false;
43
+ }
44
+ _getAllLevelHooks(hookMap, cache, type) {
45
+ const cacheEntry = cache.get(type);
46
+ if (cacheEntry !== undefined) {
47
+ return cacheEntry;
48
+ }
49
+ const hooks = [];
50
+ const typeParts = type.split('.');
51
+ for (let i = 0; i < typeParts.length; i++) {
52
+ const hook = hookMap.get(typeParts.slice(i).join('.'));
53
+ if (hook) {
54
+ hooks.push(hook);
55
+ }
56
+ }
57
+ cache.set(type, hooks);
58
+ return hooks;
59
+ }
60
+ _forEachLevel(hookMap, cache, type, fn) {
61
+ for (const hook of this._getAllLevelHooks(hookMap, cache, type)) {
62
+ const result = fn(hook);
63
+ if (result !== undefined)
64
+ return result;
65
+ }
66
+ }
67
+ _forEachLevelWaterfall(hookMap, cache, type, data, fn) {
68
+ for (const hook of this._getAllLevelHooks(hookMap, cache, type)) {
69
+ data = fn(hook, data);
70
+ }
71
+ return data;
72
+ }
73
+ _forEachLevelFilter(hookMap, cache, type, items, fn, forceClone) {
74
+ const hooks = this._getAllLevelHooks(hookMap, cache, type);
75
+ if (hooks.length === 0)
76
+ return forceClone ? items.slice() : items;
77
+ let i = 0;
78
+ return items.filter((item, idx) => {
79
+ for (const hook of hooks) {
80
+ const r = fn(hook, item, idx, i);
81
+ if (r !== undefined) {
82
+ if (r)
83
+ i++;
84
+ return r;
85
+ }
86
+ }
87
+ i++;
88
+ return true;
89
+ });
90
+ }
91
+ create(type, data, baseContext) {
92
+ if (this._inCreate) {
93
+ return this._create(type, data, baseContext);
94
+ }
95
+ try {
96
+ this._inCreate = true;
97
+ return this._create(type, data, baseContext);
98
+ }
99
+ finally {
100
+ for (const key of Object.keys(this._caches))
101
+ this._caches[key].clear();
102
+ this._inCreate = false;
103
+ }
104
+ }
105
+ _create(type, data, baseContext) {
106
+ const context = Object.assign(Object.assign({}, baseContext), { type, [type]: data });
107
+ if (Array.isArray(data)) {
108
+ // run filter on unsorted items
109
+ const items = this._forEachLevelFilter(this.hooks.filter, this._caches.filter, type, data, (h, r, idx, i) => h.call(r, context, idx, i), true);
110
+ // sort items
111
+ const comparators = [];
112
+ this._forEachLevel(this.hooks.sort, this._caches.sort, type, h => h.call(comparators, context));
113
+ if (comparators.length > 0) {
114
+ items.sort(
115
+ // @ts-expect-error number of arguments is correct
116
+ (0, comparators_1.concatComparators)(...comparators, (0, comparators_1.keepOriginalOrder)(items)));
117
+ }
118
+ // run filter on sorted items
119
+ const items2 = this._forEachLevelFilter(this.hooks.filterSorted, this._caches.filterSorted, type, items, (h, r, idx, i) => h.call(r, context, idx, i), false);
120
+ // for each item
121
+ let resultItems = items2.map((item, i) => {
122
+ const itemContext = Object.assign(Object.assign({}, context), { _index: i });
123
+ // run getItemName
124
+ const itemName = this._forEachLevel(this.hooks.getItemName, this._caches.getItemName, `${type}[]`, h => h.call(item, itemContext));
125
+ if (itemName)
126
+ itemContext[itemName] = item;
127
+ const innerType = itemName ? `${type}[].${itemName}` : `${type}[]`;
128
+ // run getItemFactory
129
+ const itemFactory = this._forEachLevel(this.hooks.getItemFactory, this._caches.getItemFactory, innerType, h => h.call(item, itemContext)) || this;
130
+ // run item factory
131
+ return itemFactory.create(innerType, item, itemContext);
132
+ });
133
+ // sort result items
134
+ const comparators2 = [];
135
+ this._forEachLevel(this.hooks.sortResults, this._caches.sortResults, type, h => h.call(comparators2, context));
136
+ if (comparators2.length > 0) {
137
+ resultItems.sort(
138
+ // @ts-expect-error number of arguments is correct
139
+ (0, comparators_1.concatComparators)(...comparators2, (0, comparators_1.keepOriginalOrder)(resultItems)));
140
+ }
141
+ // group result items
142
+ const groupConfigs = [];
143
+ this._forEachLevel(this.hooks.groupResults, this._caches.groupResults, type, h => h.call(groupConfigs, context));
144
+ if (groupConfigs.length > 0) {
145
+ resultItems = (0, smartGrouping_1.default)(resultItems, groupConfigs);
146
+ }
147
+ // run filter on sorted result items
148
+ const finalResultItems = this._forEachLevelFilter(this.hooks.filterResults, this._caches.filterResults, type, resultItems, (h, r, idx, i) => h.call(r, context, idx, i), false);
149
+ // run merge on mapped items
150
+ let result = this._forEachLevel(this.hooks.merge, this._caches.merge, type, h => h.call(finalResultItems, context));
151
+ if (result === undefined)
152
+ result = finalResultItems;
153
+ // run result on merged items
154
+ return this._forEachLevelWaterfall(this.hooks.result, this._caches.result, type, result, (h, r) => h.call(r, context));
155
+ }
156
+ const object = {};
157
+ // run extract on value
158
+ this._forEachLevel(this.hooks.extract, this._caches.extract, type, h => h.call(object, data, context));
159
+ // run result on extracted object
160
+ return this._forEachLevelWaterfall(this.hooks.result, this._caches.result, type, object, (h, r) => h.call(r, context));
161
+ }
162
+ }
163
+ exports.default = StatsFactory;
@@ -0,0 +1,12 @@
1
+ declare class StatsPrinter {
2
+ hooks: any;
3
+ _levelHookCache: Map<any, any>;
4
+ _inPrint: boolean;
5
+ constructor();
6
+ _getAllLevelHooks(hookMap: any, type: any): any;
7
+ _forEachLevel(hookMap: any, type: any, fn: any): any;
8
+ _forEachLevelWaterfall(hookMap: any, type: any, data: any, fn: any): any;
9
+ print(type: any, object: any, baseContext: any): any;
10
+ _print(type: string, object: Object, baseContext?: Object): any;
11
+ }
12
+ export default StatsPrinter;