@ohos-ports/rspack-core 1.7.11-beta.1 → 2.2.9-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 (317) hide show
  1. package/README.md +11 -1
  2. package/compiled/@rspack/lite-tapable/dist/index.d.ts +190 -0
  3. package/compiled/@rspack/lite-tapable/license +22 -0
  4. package/compiled/@rspack/lite-tapable/package.json +1 -0
  5. package/compiled/@swc/types/index.d.ts +161 -11
  6. package/compiled/@swc/types/package.json +1 -1
  7. package/compiled/connect-next/index.d.ts +57 -0
  8. package/compiled/connect-next/license +26 -0
  9. package/compiled/connect-next/package.json +1 -0
  10. package/compiled/http-proxy-middleware/index.d.ts +455 -0
  11. package/compiled/{browserslist-load-config → http-proxy-middleware}/license +3 -2
  12. package/compiled/http-proxy-middleware/package.json +1 -0
  13. package/compiled/open/index.d.ts +161 -0
  14. package/compiled/open/package.json +1 -0
  15. package/compiled/tinypool/README.md +196 -2
  16. package/compiled/tinypool/dist/{common-Qw-RoVFD.js → common-Bo3KCGim.js} +4 -1
  17. package/compiled/tinypool/dist/entry/worker.js +1 -1
  18. package/compiled/tinypool/dist/index.d.ts +9 -4
  19. package/compiled/tinypool/dist/index.js +17 -53
  20. package/compiled/tinypool/package.json +22 -6
  21. package/compiled/watchpack/index.d.ts +3 -217
  22. package/compiled/watchpack/index.js +1778 -1091
  23. package/compiled/watchpack/package.json +8 -1
  24. package/compiled/watchpack/types/DirectoryWatcher.d.ts +335 -0
  25. package/compiled/watchpack/types/LinkResolver.d.ts +10 -0
  26. package/compiled/watchpack/types/getWatcherManager.d.ts +62 -0
  27. package/compiled/watchpack/types/index.d.ts +269 -0
  28. package/compiled/watchpack/types/reducePlan.d.ts +34 -0
  29. package/compiled/watchpack/types/util/globToRegExp.d.ts +2 -0
  30. package/compiled/watchpack/types/watchEventSource.d.ts +53 -0
  31. package/compiled/watchpack/types/watchpack.d.ts +2 -0
  32. package/compiled/webpack-sources/index.d.ts +61 -0
  33. package/compiled/webpack-sources/index.js +2370 -576
  34. package/compiled/webpack-sources/package.json +8 -1
  35. package/compiled/webpack-sources/types/CachedSource.d.ts +192 -0
  36. package/compiled/webpack-sources/types/CompatSource.d.ts +87 -0
  37. package/compiled/webpack-sources/types/ConcatSource.d.ts +75 -0
  38. package/compiled/webpack-sources/types/OriginalSource.d.ts +87 -0
  39. package/compiled/webpack-sources/types/PrefixSource.d.ts +59 -0
  40. package/compiled/webpack-sources/types/RawSource.d.ts +75 -0
  41. package/compiled/webpack-sources/types/ReplaceSource.d.ts +107 -0
  42. package/compiled/webpack-sources/types/SizeOnlySource.d.ts +24 -0
  43. package/compiled/webpack-sources/types/Source.d.ts +189 -0
  44. package/compiled/webpack-sources/types/SourceMapSource.d.ts +136 -0
  45. package/compiled/webpack-sources/types/helpers/createMappingsSerializer.d.ts +60 -0
  46. package/compiled/webpack-sources/types/helpers/getFromStreamChunks.d.ts +16 -0
  47. package/compiled/webpack-sources/types/helpers/getGeneratedSourceInfo.d.ts +31 -0
  48. package/compiled/webpack-sources/types/helpers/getName.d.ts +15 -0
  49. package/compiled/webpack-sources/types/helpers/getSource.d.ts +15 -0
  50. package/compiled/webpack-sources/types/helpers/readMappings.d.ts +19 -0
  51. package/compiled/webpack-sources/types/helpers/scopes.d.ts +119 -0
  52. package/compiled/webpack-sources/types/helpers/splitIntoLines.d.ts +6 -0
  53. package/compiled/webpack-sources/types/helpers/splitIntoPotentialTokens.d.ts +37 -0
  54. package/compiled/webpack-sources/types/helpers/streamAndGetSourceAndMap.d.ts +39 -0
  55. package/compiled/webpack-sources/types/helpers/streamChunks.d.ts +56 -0
  56. package/compiled/webpack-sources/types/helpers/streamChunksOfCombinedSourceMap.d.ts +42 -0
  57. package/compiled/webpack-sources/types/helpers/streamChunksOfRawSource.d.ts +16 -0
  58. package/compiled/webpack-sources/types/helpers/streamChunksOfSourceMap.d.ts +19 -0
  59. package/compiled/webpack-sources/types/helpers/stringBufferUtils.d.ts +55 -0
  60. package/compiled/webpack-sources/types/index.d.ts +50 -0
  61. package/dist/BuildInfo.d.ts +3 -1
  62. package/dist/ChunkGraph.d.ts +1 -1
  63. package/dist/CodeGenerationResults.d.ts +6 -1
  64. package/dist/Compilation.d.ts +60 -89
  65. package/dist/Compiler.d.ts +25 -22
  66. package/dist/ContextModuleFactory.d.ts +2 -2
  67. package/dist/Diagnostics.d.ts +2 -6
  68. package/dist/ExecuteModulePlugin.d.ts +1 -1
  69. package/dist/ExportsInfo.d.ts +1 -1
  70. package/dist/ExternalModule.d.ts +15 -1
  71. package/dist/FileSystem.d.ts +4 -2
  72. package/dist/FileSystemDependencies.d.ts +15 -0
  73. package/dist/Module.d.ts +9 -6
  74. package/dist/ModuleGraph.d.ts +11 -8
  75. package/dist/ModuleGraphConnection.d.ts +10 -0
  76. package/dist/Modules.d.ts +3 -0
  77. package/dist/MultiCompiler.d.ts +9 -9
  78. package/dist/MultiStats.d.ts +3 -3
  79. package/dist/MultiWatching.d.ts +3 -3
  80. package/dist/NativeWatchFileSystem.d.ts +31 -2
  81. package/dist/NormalModule.d.ts +4 -5
  82. package/dist/NormalModuleFactory.d.ts +5 -4
  83. package/dist/Resolver.d.ts +10 -2
  84. package/dist/ResolverFactory.d.ts +2 -2
  85. package/dist/RuntimeGlobals.d.ts +61 -56
  86. package/dist/RuntimeModule.d.ts +3 -3
  87. package/dist/RuntimeTemplate.d.ts +151 -0
  88. package/dist/Stats.d.ts +4 -4
  89. package/dist/VirtualModulesPlugin.d.ts +1 -1
  90. package/dist/Watching.d.ts +5 -5
  91. package/dist/builtin-loader/lightningcss/index.d.ts +11 -14
  92. package/dist/builtin-loader/lightningcss/target.d.ts +4 -0
  93. package/dist/builtin-loader/swc/index.d.ts +3 -5
  94. package/dist/builtin-loader/swc/pluginImport.d.ts +1 -1
  95. package/dist/builtin-loader/swc/types.d.ts +36 -65
  96. package/dist/builtin-plugin/APIPlugin.d.ts +3 -3
  97. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +3 -3
  98. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +3 -3
  99. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +3 -3
  100. package/dist/builtin-plugin/BannerPlugin.d.ts +3 -3
  101. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +3 -3
  102. package/dist/builtin-plugin/CaseSensitivePlugin.d.ts +3 -3
  103. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +3 -3
  104. package/dist/builtin-plugin/CircularCheckRspackPlugin.d.ts +33 -0
  105. package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +10 -4
  106. package/dist/builtin-plugin/CircularModulesInfoPlugin.d.ts +7 -0
  107. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +3 -3
  108. package/dist/builtin-plugin/CompactHashedChunkIdsPlugin.d.ts +12 -0
  109. package/dist/builtin-plugin/CompactHashedModuleIdsPlugin.d.ts +12 -0
  110. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +3 -3
  111. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +3 -3
  112. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +3 -3
  113. package/dist/builtin-plugin/CssHttpExternalsRspackPlugin.d.ts +9 -0
  114. package/dist/builtin-plugin/CssModulesPlugin.d.ts +3 -3
  115. package/dist/builtin-plugin/DataUriPlugin.d.ts +3 -3
  116. package/dist/builtin-plugin/DefinePlugin.d.ts +3 -3
  117. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +2 -2
  118. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +13 -2
  119. package/dist/builtin-plugin/DllEntryPlugin.d.ts +3 -3
  120. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +3 -3
  121. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +4 -4
  122. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +3 -3
  123. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +2 -2
  124. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +2 -2
  125. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +3 -3
  126. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +3 -3
  127. package/dist/builtin-plugin/EntryPlugin.d.ts +4 -4
  128. package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +7 -2
  129. package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +9 -0
  130. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +3 -3
  131. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +3 -3
  132. package/dist/builtin-plugin/ExternalsPlugin.d.ts +4 -3
  133. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +3 -3
  134. package/dist/builtin-plugin/FileUriPlugin.d.ts +3 -3
  135. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +3 -3
  136. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +3 -3
  137. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +2 -2
  138. package/dist/builtin-plugin/HashedModuleIdsPlugin.d.ts +10 -0
  139. package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +2 -2
  140. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +5 -5
  141. package/dist/builtin-plugin/HttpUriPlugin.d.ts +7 -3
  142. package/dist/builtin-plugin/IgnorePlugin.d.ts +3 -3
  143. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +3 -3
  144. package/dist/builtin-plugin/InlineExportsPlugin.d.ts +3 -3
  145. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +21 -6
  146. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +2 -2
  147. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +3 -3
  148. package/dist/builtin-plugin/LibManifestPlugin.d.ts +3 -3
  149. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +7 -11
  150. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +3 -3
  151. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +2 -2
  152. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +3 -3
  153. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +3 -3
  154. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +2 -2
  155. package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +3 -3
  156. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +3 -3
  157. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +3 -3
  158. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +2 -2
  159. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +2 -2
  160. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +3 -3
  161. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +3 -3
  162. package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +4 -4
  163. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +3 -3
  164. package/dist/builtin-plugin/ProgressPlugin.d.ts +8 -7
  165. package/dist/builtin-plugin/ProvidePlugin.d.ts +3 -3
  166. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +15 -4
  167. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +3 -3
  168. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +3 -3
  169. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +8 -11
  170. package/dist/builtin-plugin/RslibPlugin.d.ts +5 -6
  171. package/dist/builtin-plugin/RstestPlugin.d.ts +3 -4
  172. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +3 -3
  173. package/dist/builtin-plugin/RuntimePlugin.d.ts +7 -11
  174. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +9 -9
  175. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +5 -5
  176. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +3 -3
  177. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +6 -5
  178. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
  179. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +7 -6
  180. package/dist/builtin-plugin/SyncModuleIdsPlugin.d.ts +16 -0
  181. package/dist/builtin-plugin/URLPlugin.d.ts +3 -3
  182. package/dist/builtin-plugin/WorkerPlugin.d.ts +4 -4
  183. package/dist/builtin-plugin/base.d.ts +3 -3
  184. package/dist/builtin-plugin/css-extract/index.d.ts +3 -3
  185. package/dist/builtin-plugin/css-extract/loader.d.ts +1 -1
  186. package/dist/builtin-plugin/css-extract/utils.d.ts +8 -1
  187. package/dist/builtin-plugin/html-plugin/hooks.d.ts +3 -3
  188. package/dist/builtin-plugin/html-plugin/index.d.ts +2 -2
  189. package/dist/builtin-plugin/html-plugin/options.d.ts +2 -7
  190. package/dist/builtin-plugin/html-plugin/plugin.d.ts +5 -9
  191. package/dist/builtin-plugin/html-plugin/taps.d.ts +1 -1
  192. package/dist/builtin-plugin/index.d.ts +92 -84
  193. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +6 -6
  194. package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +4 -4
  195. package/dist/builtin-plugin/rsc/Coordinator.d.ts +8 -0
  196. package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +13 -0
  197. package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +47 -0
  198. package/dist/builtin-plugin/rsc/index.d.ts +24 -0
  199. package/dist/checkNodeVersion.d.ts +1 -0
  200. package/dist/config/adapter.d.ts +4 -4
  201. package/dist/config/adapterRuleUse.d.ts +89 -55
  202. package/dist/config/browserslistTargetHandler.d.ts +1 -1
  203. package/dist/config/defaults.d.ts +5 -3
  204. package/dist/config/devServer.d.ts +103 -238
  205. package/dist/config/index.d.ts +5 -5
  206. package/dist/config/normalization.d.ts +26 -47
  207. package/dist/config/target.d.ts +19 -12
  208. package/dist/config/types.d.ts +615 -256
  209. package/dist/container/ContainerPlugin.d.ts +4 -4
  210. package/dist/container/ContainerReferencePlugin.d.ts +4 -4
  211. package/dist/container/ModuleFederationManifestPlugin.d.ts +12 -5
  212. package/dist/container/ModuleFederationPlugin.d.ts +22 -5
  213. package/dist/container/ModuleFederationPluginV1.d.ts +10 -6
  214. package/dist/container/ModuleFederationRuntimePlugin.d.ts +3 -3
  215. package/dist/cssExtractHmr.js +2 -27
  216. package/dist/cssExtractLoader.js +24 -65
  217. package/dist/exports.d.ts +98 -84
  218. package/dist/index.d.ts +4 -3
  219. package/dist/index.js +14201 -11810
  220. package/dist/lib/AbstractMethodError.d.ts +1 -1
  221. package/dist/lib/Cache.d.ts +5 -2
  222. package/dist/lib/CacheFacade.d.ts +4 -4
  223. package/dist/lib/DllPlugin.d.ts +2 -2
  224. package/dist/lib/DllReferencePlugin.d.ts +3 -3
  225. package/dist/lib/EntryOptionPlugin.d.ts +2 -2
  226. package/dist/lib/EnvironmentPlugin.d.ts +3 -3
  227. package/dist/lib/HookWebpackError.d.ts +2 -3
  228. package/dist/lib/IgnoreWarningsPlugin.d.ts +1 -1
  229. package/dist/lib/LoaderOptionsPlugin.d.ts +2 -2
  230. package/dist/lib/LoaderTargetPlugin.d.ts +2 -2
  231. package/dist/lib/WebpackError.d.ts +2 -2
  232. package/dist/lib/cache/MemoryCachePlugin.d.ts +1 -1
  233. package/dist/lib/cache/getLazyHashedEtag.d.ts +2 -2
  234. package/dist/lib/cache/mergeEtags.d.ts +1 -2
  235. package/dist/loader-runner/ModuleError.d.ts +1 -1
  236. package/dist/loader-runner/cache.d.ts +27 -0
  237. package/dist/loader-runner/dependencies.d.ts +23 -0
  238. package/dist/loader-runner/index.d.ts +10 -11
  239. package/dist/loader-runner/loadLoader.d.ts +2 -2
  240. package/dist/loader-runner/service.d.ts +10 -1
  241. package/dist/loader-runner/utils.d.ts +3 -3
  242. package/dist/loader-runner/worker.d.ts +1 -1
  243. package/dist/logging/createConsoleLogger.d.ts +2 -2
  244. package/dist/l~0.js +34 -0
  245. package/dist/l~3.js +34 -0
  246. package/dist/moduleFederationDefaultRuntime.js +1 -1
  247. package/dist/node/NodeEnvironmentPlugin.d.ts +2 -2
  248. package/dist/node/NodeTemplatePlugin.d.ts +1 -1
  249. package/dist/node/NodeWatchFileSystem.d.ts +15 -3
  250. package/dist/node/nodeConsole.d.ts +1 -1
  251. package/dist/rspack.d.ts +7 -8
  252. package/dist/rspackOptionsApply.d.ts +1 -1
  253. package/dist/runtime/cssExtractHmr.d.ts +2 -2
  254. package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -2
  255. package/dist/sharing/CollectSharedEntryPlugin.d.ts +22 -0
  256. package/dist/sharing/ConsumeSharedPlugin.d.ts +18 -6
  257. package/dist/sharing/IndependentSharedPlugin.d.ts +37 -0
  258. package/dist/sharing/ProvideSharedPlugin.d.ts +22 -3
  259. package/dist/sharing/SharePlugin.d.ts +51 -3
  260. package/dist/sharing/ShareRuntimePlugin.d.ts +2 -2
  261. package/dist/sharing/SharedContainerPlugin.d.ts +23 -0
  262. package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +14 -0
  263. package/dist/sharing/TreeShakingSharedPlugin.d.ts +19 -0
  264. package/dist/sharing/utils.d.ts +1 -0
  265. package/dist/stats/DefaultStatsFactoryPlugin.d.ts +1 -1
  266. package/dist/stats/DefaultStatsPresetPlugin.d.ts +1 -1
  267. package/dist/stats/DefaultStatsPrinterPlugin.d.ts +1 -1
  268. package/dist/stats/StatsFactory.d.ts +7 -5
  269. package/dist/stats/StatsPrinter.d.ts +7 -7
  270. package/dist/stats/statsFactoryUtils.d.ts +15 -19
  271. package/dist/swc.d.ts +2 -2
  272. package/dist/taps/compilation.d.ts +1 -1
  273. package/dist/taps/compiler.d.ts +1 -1
  274. package/dist/taps/contextModuleFactory.d.ts +1 -1
  275. package/dist/taps/externalModule.d.ts +2 -0
  276. package/dist/taps/index.d.ts +7 -6
  277. package/dist/taps/javascriptModules.d.ts +1 -1
  278. package/dist/taps/normalModuleFactory.d.ts +1 -1
  279. package/dist/taps/types.d.ts +2 -2
  280. package/dist/trace/index.d.ts +1 -0
  281. package/dist/trace/traceHookPlugin.d.ts +1 -1
  282. package/dist/util/bindingHelpers.d.ts +7 -0
  283. package/dist/util/comparators.d.ts +1 -1
  284. package/dist/util/createHash.d.ts +2 -2
  285. package/dist/util/fs.d.ts +19 -18
  286. package/dist/util/hash/md4.d.ts +1 -1
  287. package/dist/util/hash/xxhash64.d.ts +1 -1
  288. package/dist/util/identifier.d.ts +35 -9
  289. package/dist/util/index.d.ts +2 -2
  290. package/dist/util/source.d.ts +3 -3
  291. package/dist/util/supportsColor.d.ts +6 -0
  292. package/dist/util/targetsVersion.d.ts +2 -0
  293. package/dist/util/validateConfig.d.ts +1 -1
  294. package/dist/util/watchTimeInfo.d.ts +7 -0
  295. package/dist/web/JsonpTemplatePlugin.d.ts +13 -0
  296. package/dist/webworker/WebWorkerTemplatePlugin.d.ts +13 -0
  297. package/dist/worker.js +935 -907
  298. package/hot/dev-server.js +12 -11
  299. package/hot/emitter.js +3 -1
  300. package/hot/lazy-compilation-node.js +4 -1
  301. package/hot/lazy-compilation-web.js +2 -3
  302. package/hot/log-apply-result.js +8 -5
  303. package/hot/log.js +18 -10
  304. package/hot/only-dev-server.js +13 -12
  305. package/hot/poll.js +10 -9
  306. package/hot/signal.js +12 -10
  307. package/module.d.ts +39 -2
  308. package/package.json +15 -39
  309. package/compiled/browserslist-load-config/index.d.ts +0 -21
  310. package/compiled/browserslist-load-config/index.js +0 -252
  311. package/compiled/browserslist-load-config/package.json +0 -1
  312. package/compiled/webpack-sources/types.d.ts +0 -458
  313. package/dist/builtin-loader/index.d.ts +0 -1
  314. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +0 -7
  315. package/dist/container/index.d.ts +0 -4
  316. package/dist/util/MergeCaller.d.ts +0 -10
  317. package/dist/util/fake.d.ts +0 -14
@@ -1 +1,8 @@
1
- {"name":"watchpack","author":"Tobias Koppers @sokra","version":"2.4.4","license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {
2
+ "name": "watchpack",
3
+ "author": "Tobias Koppers @sokra",
4
+ "version": "2.5.2",
5
+ "license": "MIT",
6
+ "types": "index.d.ts",
7
+ "type": "commonjs"
8
+ }
@@ -0,0 +1,335 @@
1
+ export = DirectoryWatcher;
2
+ /** @typedef {Set<string>} InitialScanRemoved */
3
+ /**
4
+ * @typedef {object} WatchpackEvents
5
+ * @property {(target: string, mtime: string, type: EventType, initial: boolean) => void} change change event
6
+ * @property {() => void} closed closed event
7
+ */
8
+ /**
9
+ * @typedef {object} DirectoryWatcherOptions
10
+ * @property {boolean=} followSymlinks true when need to resolve symlinks and watch symlink and real file, otherwise false
11
+ * @property {IgnoredFunction=} ignored ignore some files from watching (glob pattern or regexp)
12
+ * @property {number | boolean=} poll true when need to enable polling mode for watching, otherwise false
13
+ */
14
+ /**
15
+ * @extends {EventEmitter<{ [K in keyof WatchpackEvents]: Parameters<WatchpackEvents[K]> }>}
16
+ */
17
+ declare class DirectoryWatcher extends EventEmitter<{
18
+ /**
19
+ * change event
20
+ */
21
+ change: [
22
+ target: string,
23
+ mtime: string,
24
+ type: import("./index").EventType,
25
+ initial: boolean,
26
+ ];
27
+ /**
28
+ * closed event
29
+ */
30
+ closed: [];
31
+ }> {
32
+ /**
33
+ * @param {WatcherManager} watcherManager a watcher manager
34
+ * @param {string} directoryPath directory path
35
+ * @param {DirectoryWatcherOptions=} options options
36
+ */
37
+ constructor(
38
+ watcherManager: WatcherManager,
39
+ directoryPath: string,
40
+ options?: DirectoryWatcherOptions | undefined,
41
+ );
42
+ watcherManager: import("./getWatcherManager").WatcherManager;
43
+ options: DirectoryWatcherOptions;
44
+ path: string;
45
+ /** @type {Map<string, Entry>} */
46
+ files: Map<string, Entry>;
47
+ /** @type {Map<string, number>} */
48
+ filesWithoutCase: Map<string, number>;
49
+ /** @type {Map<string, Watcher<DirectoryWatcherEvents> | boolean>} */
50
+ directories: Map<string, Watcher<DirectoryWatcherEvents> | boolean>;
51
+ /** @type {Map<string, Watcher<FileWatcherEvents>>} */
52
+ _symlinkTargetWatchers: Map<string, Watcher<FileWatcherEvents>>;
53
+ lastWatchEvent: number;
54
+ initialScan: boolean;
55
+ ignored: import("./index").IgnoredFunction;
56
+ nestedWatching: boolean;
57
+ /** @type {number | false} */
58
+ polledWatching: number | false;
59
+ /** @type {undefined | NodeJS.Timeout} */
60
+ timeout: undefined | NodeJS.Timeout;
61
+ /** @type {null | InitialScanRemoved} */
62
+ initialScanRemoved: null | InitialScanRemoved;
63
+ /** @type {undefined | number} */
64
+ initialScanFinished: undefined | number;
65
+ /** @type {Map<string, Set<Watcher<DirectoryWatcherEvents> | Watcher<FileWatcherEvents>>>} */
66
+ watchers: Map<
67
+ string,
68
+ Set<Watcher<DirectoryWatcherEvents> | Watcher<FileWatcherEvents>>
69
+ >;
70
+ /** @type {Watcher<FileWatcherEvents> | null} */
71
+ parentWatcher: Watcher<FileWatcherEvents> | null;
72
+ refs: number;
73
+ /** @type {Map<string, boolean>} */
74
+ _activeEvents: Map<string, boolean>;
75
+ closed: boolean;
76
+ scanning: boolean;
77
+ scanAgain: boolean;
78
+ scanAgainInitial: boolean;
79
+ createWatcher(): void;
80
+ watcher: watchEventSource.Watcher | null | undefined;
81
+ /**
82
+ * @template {(watcher: Watcher<EventMap>) => void} T
83
+ * @param {string} path path
84
+ * @param {T} fn function
85
+ */
86
+ forEachWatcher<T extends (watcher: Watcher<EventMap>) => void>(
87
+ path: string,
88
+ fn: T,
89
+ ): void;
90
+ /**
91
+ * @param {string} itemPath an item path
92
+ * @param {boolean} initial true when initial, otherwise false
93
+ * @param {EventType} type even type
94
+ */
95
+ setMissing(itemPath: string, initial: boolean, type: EventType): void;
96
+ /**
97
+ * @param {string} target a target to set file time
98
+ * @param {number} mtime mtime
99
+ * @param {boolean} initial true when initial, otherwise false
100
+ * @param {boolean} ignoreWhenEqual true to ignore when equal, otherwise false
101
+ * @param {EventType} type type
102
+ */
103
+ setFileTime(
104
+ target: string,
105
+ mtime: number,
106
+ initial: boolean,
107
+ ignoreWhenEqual: boolean,
108
+ type: EventType,
109
+ ): void;
110
+ /**
111
+ * @param {string} directoryPath directory path
112
+ * @param {number} birthtime birthtime
113
+ * @param {boolean} initial true when initial, otherwise false
114
+ * @param {EventType} type even type
115
+ */
116
+ setDirectory(
117
+ directoryPath: string,
118
+ birthtime: number,
119
+ initial: boolean,
120
+ type: EventType,
121
+ ): void;
122
+ /**
123
+ * @param {string} directoryPath directory path
124
+ */
125
+ createNestedWatcher(directoryPath: string): void;
126
+ /**
127
+ * @param {boolean} flag true when nested, otherwise false
128
+ */
129
+ setNestedWatching(flag: boolean): void;
130
+ /**
131
+ * @param {string} target a target to watch
132
+ * @param {number=} startTime start time
133
+ * @returns {Watcher<DirectoryWatcherEvents> | Watcher<FileWatcherEvents>} watcher
134
+ */
135
+ watch(
136
+ target: string,
137
+ startTime?: number | undefined,
138
+ ): Watcher<DirectoryWatcherEvents> | Watcher<FileWatcherEvents>;
139
+ /**
140
+ * @param {EventType} eventType event type
141
+ * @param {string=} filename filename
142
+ */
143
+ onWatchEvent(eventType: EventType, filename?: string | undefined): void;
144
+ /**
145
+ * @param {unknown=} err error
146
+ */
147
+ onWatcherError(err?: unknown | undefined): void;
148
+ /**
149
+ * @param {Error | NodeJS.ErrnoException=} err error
150
+ */
151
+ onStatsError(err?: (Error | NodeJS.ErrnoException) | undefined): void;
152
+ /**
153
+ * @param {Error | NodeJS.ErrnoException=} err error
154
+ */
155
+ onScanError(err?: (Error | NodeJS.ErrnoException) | undefined): void;
156
+ onScanFinished(): void;
157
+ /**
158
+ * @param {string} reason a reason
159
+ */
160
+ onDirectoryRemoved(reason: string): void;
161
+ watchInParentDirectory(): void;
162
+ /**
163
+ * @param {boolean} initial true when initial, otherwise false
164
+ */
165
+ doScan(initial: boolean): void;
166
+ /**
167
+ * @returns {Record<string, number>} times
168
+ */
169
+ getTimes(): Record<string, number>;
170
+ /**
171
+ * @param {TimeInfoEntries} fileTimestamps file timestamps
172
+ * @param {TimeInfoEntries} directoryTimestamps directory timestamps
173
+ * @returns {number} safe time
174
+ */
175
+ collectTimeInfoEntries(
176
+ fileTimestamps: TimeInfoEntries,
177
+ directoryTimestamps: TimeInfoEntries,
178
+ ): number;
179
+ close(): void;
180
+ }
181
+ declare namespace DirectoryWatcher {
182
+ export {
183
+ EXISTANCE_ONLY_TIME_ENTRY,
184
+ Watcher,
185
+ IgnoredFunction,
186
+ EventType,
187
+ TimeInfoEntries,
188
+ Entry,
189
+ ExistenceOnlyTimeEntry,
190
+ OnlySafeTimeEntry,
191
+ EventMap,
192
+ WatcherManager,
193
+ EventSourceWatcher,
194
+ FileWatcherEvents,
195
+ DirectoryWatcherEvents,
196
+ InitialScanRemoved,
197
+ WatchpackEvents,
198
+ DirectoryWatcherOptions,
199
+ };
200
+ }
201
+ import { EventEmitter } from "events";
202
+ /**
203
+ * @typedef {object} FileWatcherEvents
204
+ * @property {(type: EventType) => void} initial-missing initial missing event
205
+ * @property {(mtime: number, type: EventType, initial: boolean) => void} change change event
206
+ * @property {(type: EventType) => void} remove remove event
207
+ * @property {() => void} closed closed event
208
+ */
209
+ /**
210
+ * @typedef {object} DirectoryWatcherEvents
211
+ * @property {(type: EventType) => void} initial-missing initial missing event
212
+ * @property {((file: string, mtime: number, type: EventType, initial: boolean) => void)} change change event
213
+ * @property {(type: EventType) => void} remove remove event
214
+ * @property {() => void} closed closed event
215
+ */
216
+ /**
217
+ * @template {EventMap} T
218
+ * @extends {EventEmitter<{ [K in keyof T]: Parameters<T[K]> }>}
219
+ */
220
+ declare class Watcher<T extends EventMap> extends EventEmitter<{
221
+ [K in keyof T]: Parameters<T[K]>;
222
+ }> {
223
+ /**
224
+ * @param {DirectoryWatcher} directoryWatcher a directory watcher
225
+ * @param {string} target a target to watch
226
+ * @param {number=} startTime start time
227
+ */
228
+ constructor(
229
+ directoryWatcher: DirectoryWatcher,
230
+ target: string,
231
+ startTime?: number | undefined,
232
+ );
233
+ directoryWatcher: DirectoryWatcher;
234
+ path: string;
235
+ startTime: number | undefined;
236
+ /**
237
+ * @param {number} mtime mtime
238
+ * @param {boolean} initial true when initial, otherwise false
239
+ * @returns {boolean} true of start time less than mtile, otherwise false
240
+ */
241
+ checkStartTime(mtime: number, initial: boolean): boolean;
242
+ close(): void;
243
+ }
244
+ import watchEventSource = require("./watchEventSource");
245
+ /** @typedef {import("./index").IgnoredFunction} IgnoredFunction */
246
+ /** @typedef {import("./index").EventType} EventType */
247
+ /** @typedef {import("./index").TimeInfoEntries} TimeInfoEntries */
248
+ /** @typedef {import("./index").Entry} Entry */
249
+ /** @typedef {import("./index").ExistenceOnlyTimeEntry} ExistenceOnlyTimeEntry */
250
+ /** @typedef {import("./index").OnlySafeTimeEntry} OnlySafeTimeEntry */
251
+ /** @typedef {import("./index").EventMap} EventMap */
252
+ /** @typedef {import("./getWatcherManager").WatcherManager} WatcherManager */
253
+ /** @typedef {import("./watchEventSource").Watcher} EventSourceWatcher */
254
+ /** @type {ExistenceOnlyTimeEntry} */
255
+ declare const EXISTANCE_ONLY_TIME_ENTRY: ExistenceOnlyTimeEntry;
256
+ type IgnoredFunction = import("./index").IgnoredFunction;
257
+ type EventType = import("./index").EventType;
258
+ type TimeInfoEntries = import("./index").TimeInfoEntries;
259
+ type Entry = import("./index").Entry;
260
+ type ExistenceOnlyTimeEntry = import("./index").ExistenceOnlyTimeEntry;
261
+ type OnlySafeTimeEntry = import("./index").OnlySafeTimeEntry;
262
+ type EventMap = import("./index").EventMap;
263
+ type WatcherManager = import("./getWatcherManager").WatcherManager;
264
+ type EventSourceWatcher = import("./watchEventSource").Watcher;
265
+ type FileWatcherEvents = {
266
+ /**
267
+ * initial missing event
268
+ */
269
+ "initial-missing": (type: EventType) => void;
270
+ /**
271
+ * change event
272
+ */
273
+ change: (mtime: number, type: EventType, initial: boolean) => void;
274
+ /**
275
+ * remove event
276
+ */
277
+ remove: (type: EventType) => void;
278
+ /**
279
+ * closed event
280
+ */
281
+ closed: () => void;
282
+ };
283
+ type DirectoryWatcherEvents = {
284
+ /**
285
+ * initial missing event
286
+ */
287
+ "initial-missing": (type: EventType) => void;
288
+ /**
289
+ * change event
290
+ */
291
+ change: (
292
+ file: string,
293
+ mtime: number,
294
+ type: EventType,
295
+ initial: boolean,
296
+ ) => void;
297
+ /**
298
+ * remove event
299
+ */
300
+ remove: (type: EventType) => void;
301
+ /**
302
+ * closed event
303
+ */
304
+ closed: () => void;
305
+ };
306
+ type InitialScanRemoved = Set<string>;
307
+ type WatchpackEvents = {
308
+ /**
309
+ * change event
310
+ */
311
+ change: (
312
+ target: string,
313
+ mtime: string,
314
+ type: EventType,
315
+ initial: boolean,
316
+ ) => void;
317
+ /**
318
+ * closed event
319
+ */
320
+ closed: () => void;
321
+ };
322
+ type DirectoryWatcherOptions = {
323
+ /**
324
+ * true when need to resolve symlinks and watch symlink and real file, otherwise false
325
+ */
326
+ followSymlinks?: boolean | undefined;
327
+ /**
328
+ * ignore some files from watching (glob pattern or regexp)
329
+ */
330
+ ignored?: IgnoredFunction | undefined;
331
+ /**
332
+ * true when need to enable polling mode for watching, otherwise false
333
+ */
334
+ poll?: (number | boolean) | undefined;
335
+ };
@@ -0,0 +1,10 @@
1
+ export = LinkResolver;
2
+ declare class LinkResolver {
3
+ /** @type {Map<string, readonly string[]>} */
4
+ cache: Map<string, readonly string[]>;
5
+ /**
6
+ * @param {string} file path to file or directory
7
+ * @returns {readonly string[]} array of file and all symlinks contributed in the resolving process (first item is the resolved file)
8
+ */
9
+ resolve(file: string): readonly string[];
10
+ }
@@ -0,0 +1,62 @@
1
+ declare namespace _exports {
2
+ export {
3
+ EventMap,
4
+ DirectoryWatcherOptions,
5
+ DirectoryWatcherEvents,
6
+ FileWatcherEvents,
7
+ Watcher,
8
+ };
9
+ }
10
+ declare function _exports(options: DirectoryWatcherOptions): WatcherManager;
11
+ declare namespace _exports {
12
+ export { WatcherManager };
13
+ }
14
+ export = _exports;
15
+ type EventMap = import("./index").EventMap;
16
+ type DirectoryWatcherOptions =
17
+ import("./DirectoryWatcher").DirectoryWatcherOptions;
18
+ type DirectoryWatcherEvents =
19
+ import("./DirectoryWatcher").DirectoryWatcherEvents;
20
+ type FileWatcherEvents = import("./DirectoryWatcher").FileWatcherEvents;
21
+ type Watcher<T extends EventMap> = import("./DirectoryWatcher").Watcher<T>;
22
+ /** @typedef {import("./index").EventMap} EventMap */
23
+ /** @typedef {import("./DirectoryWatcher").DirectoryWatcherOptions} DirectoryWatcherOptions */
24
+ /** @typedef {import("./DirectoryWatcher").DirectoryWatcherEvents} DirectoryWatcherEvents */
25
+ /** @typedef {import("./DirectoryWatcher").FileWatcherEvents} FileWatcherEvents */
26
+ /**
27
+ * @template {EventMap} T
28
+ * @typedef {import("./DirectoryWatcher").Watcher<T>} Watcher
29
+ */
30
+ declare class WatcherManager {
31
+ /**
32
+ * @param {DirectoryWatcherOptions=} options options
33
+ */
34
+ constructor(options?: DirectoryWatcherOptions | undefined);
35
+ options: DirectoryWatcher.DirectoryWatcherOptions;
36
+ /** @type {Map<string, DirectoryWatcher>} */
37
+ directoryWatchers: Map<string, DirectoryWatcher>;
38
+ /**
39
+ * @param {string} directory a directory
40
+ * @returns {DirectoryWatcher} a directory watcher
41
+ */
42
+ getDirectoryWatcher(directory: string): DirectoryWatcher;
43
+ /**
44
+ * @param {string} file file
45
+ * @param {number=} startTime start time
46
+ * @returns {Watcher<FileWatcherEvents> | null} watcher or null if file has no directory
47
+ */
48
+ watchFile(
49
+ file: string,
50
+ startTime?: number | undefined,
51
+ ): Watcher<FileWatcherEvents> | null;
52
+ /**
53
+ * @param {string} directory directory
54
+ * @param {number=} startTime start time
55
+ * @returns {Watcher<DirectoryWatcherEvents>} watcher
56
+ */
57
+ watchDirectory(
58
+ directory: string,
59
+ startTime?: number | undefined,
60
+ ): Watcher<DirectoryWatcherEvents>;
61
+ }
62
+ import DirectoryWatcher = require("./DirectoryWatcher");
@@ -0,0 +1,269 @@
1
+ declare namespace _exports {
2
+ export {
3
+ WatcherManager,
4
+ DirectoryWatcher,
5
+ DirectoryWatcherEvents,
6
+ FileWatcherEvents,
7
+ EventMap,
8
+ Watcher,
9
+ IgnoredFunction,
10
+ Ignored,
11
+ WatcherOptions,
12
+ WatchOptions,
13
+ NormalizedWatchOptions,
14
+ EventType,
15
+ Entry,
16
+ OnlySafeTimeEntry,
17
+ ExistenceOnlyTimeEntry,
18
+ TimeInfoEntries,
19
+ Changes,
20
+ Removals,
21
+ Aggregated,
22
+ WatchMethodOptions,
23
+ Times,
24
+ WatchpackEvents,
25
+ WatchpackExports,
26
+ };
27
+ }
28
+ declare const _exports: WatchpackExports;
29
+ export = _exports;
30
+ type WatcherManager = import("./getWatcherManager").WatcherManager;
31
+ type DirectoryWatcher = import("./DirectoryWatcher");
32
+ type DirectoryWatcherEvents =
33
+ import("./DirectoryWatcher").DirectoryWatcherEvents;
34
+ type FileWatcherEvents = import("./DirectoryWatcher").FileWatcherEvents;
35
+ type EventMap = Record<string, (...args: any[]) => any>;
36
+ type Watcher<T extends EventMap> = import("./DirectoryWatcher").Watcher<T>;
37
+ type IgnoredFunction = (item: string) => boolean;
38
+ type Ignored = string[] | RegExp | string | IgnoredFunction;
39
+ type WatcherOptions = {
40
+ /**
41
+ * true when need to resolve symlinks and watch symlink and real file, otherwise false
42
+ */
43
+ followSymlinks?: boolean | undefined;
44
+ /**
45
+ * ignore some files from watching (glob pattern or regexp)
46
+ */
47
+ ignored?: Ignored | undefined;
48
+ /**
49
+ * true when need to enable polling mode for watching, otherwise false
50
+ */
51
+ poll?: (number | boolean) | undefined;
52
+ };
53
+ type WatchOptions = WatcherOptions & {
54
+ aggregateTimeout?: number;
55
+ };
56
+ type NormalizedWatchOptions = {
57
+ /**
58
+ * true when need to resolve symlinks and watch symlink and real file, otherwise false
59
+ */
60
+ followSymlinks: boolean;
61
+ /**
62
+ * ignore some files from watching (glob pattern or regexp)
63
+ */
64
+ ignored: IgnoredFunction;
65
+ /**
66
+ * true when need to enable polling mode for watching, otherwise false
67
+ */
68
+ poll?: (number | boolean) | undefined;
69
+ };
70
+ type EventType =
71
+ | `scan (${string})`
72
+ | "change"
73
+ | "rename"
74
+ | `watch ${string}`
75
+ | `directory-removed ${string}`;
76
+ type Entry = {
77
+ safeTime: number;
78
+ timestamp: number;
79
+ accuracy: number;
80
+ };
81
+ type OnlySafeTimeEntry = {
82
+ safeTime: number;
83
+ };
84
+ type ExistenceOnlyTimeEntry = {};
85
+ type TimeInfoEntries = Map<
86
+ string,
87
+ Entry | OnlySafeTimeEntry | ExistenceOnlyTimeEntry | null
88
+ >;
89
+ type Changes = Set<string>;
90
+ type Removals = Set<string>;
91
+ type Aggregated = {
92
+ changes: Changes;
93
+ removals: Removals;
94
+ };
95
+ type WatchMethodOptions = {
96
+ files?: Iterable<string>;
97
+ directories?: Iterable<string>;
98
+ missing?: Iterable<string>;
99
+ startTime?: number;
100
+ };
101
+ type Times = Record<string, number>;
102
+ type WatchpackEvents = {
103
+ /**
104
+ * change event
105
+ */
106
+ change: (file: string, mtime: number, type: EventType) => void;
107
+ /**
108
+ * remove event
109
+ */
110
+ remove: (file: string, type: EventType) => void;
111
+ /**
112
+ * aggregated event
113
+ */
114
+ aggregated: (changes: Changes, removals: Removals) => void;
115
+ };
116
+ type WatchpackExports = typeof Watchpack & {
117
+ util: {
118
+ readonly globToRegExp: typeof globToRegExp;
119
+ };
120
+ };
121
+ /**
122
+ * @typedef {object} WatchpackEvents
123
+ * @property {(file: string, mtime: number, type: EventType) => void} change change event
124
+ * @property {(file: string, type: EventType) => void} remove remove event
125
+ * @property {(changes: Changes, removals: Removals) => void} aggregated aggregated event
126
+ */
127
+ /**
128
+ * @extends {EventEmitter<{ [K in keyof WatchpackEvents]: Parameters<WatchpackEvents[K]> }>}
129
+ */
130
+ declare class Watchpack extends EventEmitter<{
131
+ /**
132
+ * change event
133
+ */
134
+ change: [file: string, mtime: number, type: EventType];
135
+ /**
136
+ * remove event
137
+ */
138
+ remove: [file: string, type: EventType];
139
+ /**
140
+ * aggregated event
141
+ */
142
+ aggregated: [changes: Changes, removals: Removals];
143
+ }> {
144
+ /**
145
+ * @param {WatchOptions=} options options
146
+ */
147
+ constructor(options?: WatchOptions | undefined);
148
+ /** @type {WatchOptions} */
149
+ options: WatchOptions;
150
+ aggregateTimeout: number;
151
+ /** @type {NormalizedWatchOptions} */
152
+ watcherOptions: NormalizedWatchOptions;
153
+ /** @type {WatcherManager} */
154
+ watcherManager: WatcherManager;
155
+ /** @type {Map<string, WatchpackFileWatcher>} */
156
+ fileWatchers: Map<string, WatchpackFileWatcher>;
157
+ /** @type {Map<string, WatchpackDirectoryWatcher>} */
158
+ directoryWatchers: Map<string, WatchpackDirectoryWatcher>;
159
+ /** @type {Set<string>} */
160
+ _missing: Set<string>;
161
+ startTime: number | undefined;
162
+ paused: boolean;
163
+ /** @type {Changes} */
164
+ aggregatedChanges: Changes;
165
+ /** @type {Removals} */
166
+ aggregatedRemovals: Removals;
167
+ /** @type {undefined | NodeJS.Timeout} */
168
+ aggregateTimer: undefined | NodeJS.Timeout;
169
+ _onTimeout(): void;
170
+ /**
171
+ * @overload
172
+ * @param {Iterable<string>} arg1 files
173
+ * @param {Iterable<string>} arg2 directories
174
+ * @param {number=} arg3 startTime
175
+ * @returns {void}
176
+ */
177
+ watch(
178
+ arg1: Iterable<string>,
179
+ arg2: Iterable<string>,
180
+ arg3?: number | undefined,
181
+ ): void;
182
+ /**
183
+ * @overload
184
+ * @param {WatchMethodOptions} arg1 watch options
185
+ * @returns {void}
186
+ */
187
+ watch(arg1: WatchMethodOptions): void;
188
+ close(): void;
189
+ pause(): void;
190
+ /**
191
+ * @returns {Record<string, number>} times
192
+ */
193
+ getTimes(): Record<string, number>;
194
+ /**
195
+ * @returns {TimeInfoEntries} time info entries
196
+ */
197
+ getTimeInfoEntries(): TimeInfoEntries;
198
+ /**
199
+ * @param {TimeInfoEntries} fileTimestamps file timestamps
200
+ * @param {TimeInfoEntries} directoryTimestamps directory timestamps
201
+ */
202
+ collectTimeInfoEntries(
203
+ fileTimestamps: TimeInfoEntries,
204
+ directoryTimestamps: TimeInfoEntries,
205
+ ): void;
206
+ /**
207
+ * @returns {Aggregated} aggregated info
208
+ */
209
+ getAggregated(): Aggregated;
210
+ /**
211
+ * @param {string} item item
212
+ * @param {number} mtime mtime
213
+ * @param {string} file file
214
+ * @param {EventType} type type
215
+ */
216
+ _onChange(item: string, mtime: number, file: string, type: EventType): void;
217
+ /**
218
+ * @param {string} item item
219
+ * @param {string} file file
220
+ * @param {EventType} type type
221
+ */
222
+ _onRemove(item: string, file: string, type: EventType): void;
223
+ }
224
+ import globToRegExp = require("./util/globToRegExp");
225
+ import { EventEmitter } from "events";
226
+ declare class WatchpackFileWatcher {
227
+ /**
228
+ * @param {Watchpack} watchpack watchpack
229
+ * @param {Watcher<FileWatcherEvents>} watcher watcher
230
+ * @param {string | string[]} files files
231
+ */
232
+ constructor(
233
+ watchpack: Watchpack,
234
+ watcher: Watcher<FileWatcherEvents>,
235
+ files: string | string[],
236
+ );
237
+ /** @type {string[]} */
238
+ files: string[];
239
+ watcher: import("./DirectoryWatcher").Watcher<
240
+ import("./DirectoryWatcher").FileWatcherEvents
241
+ >;
242
+ /**
243
+ * @param {string | string[]} files files
244
+ */
245
+ update(files: string | string[]): void;
246
+ close(): void;
247
+ }
248
+ declare class WatchpackDirectoryWatcher {
249
+ /**
250
+ * @param {Watchpack} watchpack watchpack
251
+ * @param {Watcher<DirectoryWatcherEvents>} watcher watcher
252
+ * @param {string} directories directories
253
+ */
254
+ constructor(
255
+ watchpack: Watchpack,
256
+ watcher: Watcher<DirectoryWatcherEvents>,
257
+ directories: string,
258
+ );
259
+ /** @type {string[]} */
260
+ directories: string[];
261
+ watcher: import("./DirectoryWatcher").Watcher<
262
+ import("./DirectoryWatcher").DirectoryWatcherEvents
263
+ >;
264
+ /**
265
+ * @param {string | string[]} directories directories
266
+ */
267
+ update(directories: string | string[]): void;
268
+ close(): void;
269
+ }