@rspack-canary/browser 1.4.12-canary-f056cdd6-20250801072217 → 1.4.12-canary-d2f8a578-20250801090118

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 (246) hide show
  1. package/dist/BuildInfo.d.ts +17 -0
  2. package/dist/Chunk.d.ts +16 -0
  3. package/dist/ChunkGraph.d.ts +9 -0
  4. package/dist/Chunks.d.ts +12 -0
  5. package/dist/CodeGenerationResults.d.ts +1 -0
  6. package/dist/Compilation.d.ts +420 -0
  7. package/dist/Compiler.d.ts +192 -0
  8. package/dist/ConcatenatedModule.d.ts +1 -0
  9. package/dist/ContextModule.d.ts +1 -0
  10. package/dist/ContextModuleFactory.d.ts +13 -0
  11. package/dist/Diagnostics.d.ts +7 -0
  12. package/dist/Entrypoint.d.ts +2 -0
  13. package/dist/ErrorHelpers.d.ts +3 -0
  14. package/dist/ExecuteModulePlugin.d.ts +4 -0
  15. package/dist/ExportsInfo.d.ts +20 -0
  16. package/dist/ExternalModule.d.ts +1 -0
  17. package/dist/FileSystem.d.ts +54 -0
  18. package/dist/FileSystemInfo.d.ts +5 -0
  19. package/dist/Module.d.ts +53 -0
  20. package/dist/ModuleGraph.d.ts +19 -0
  21. package/dist/ModuleTypeConstants.d.ts +8 -0
  22. package/dist/MultiCompiler.d.ts +78 -0
  23. package/dist/MultiStats.d.ts +22 -0
  24. package/dist/MultiWatching.d.ts +27 -0
  25. package/dist/NativeWatchFileSystem.d.ts +17 -0
  26. package/dist/NormalModule.d.ts +15 -0
  27. package/dist/NormalModuleFactory.d.ts +23 -0
  28. package/dist/Resolver.d.ts +24 -0
  29. package/dist/ResolverFactory.d.ts +14 -0
  30. package/dist/RspackError.d.ts +9 -0
  31. package/dist/RuleSetCompiler.d.ts +9 -0
  32. package/dist/RuntimeGlobals.d.ts +325 -0
  33. package/dist/RuntimeModule.d.ts +32 -0
  34. package/dist/Stats.d.ts +17 -0
  35. package/dist/Template.d.ts +77 -0
  36. package/dist/Watching.d.ts +47 -0
  37. package/dist/browser/buffer.d.ts +1 -0
  38. package/dist/browser/fs.d.ts +12 -0
  39. package/dist/browser/index.d.ts +5 -0
  40. package/dist/browser/service.d.ts +3 -0
  41. package/dist/builtin-loader/index.d.ts +1 -0
  42. package/dist/builtin-loader/lightningcss/index.d.ts +117 -0
  43. package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +21 -0
  44. package/dist/builtin-loader/swc/index.d.ts +5 -0
  45. package/dist/builtin-loader/swc/pluginImport.d.ts +33 -0
  46. package/dist/builtin-loader/swc/types.d.ts +83 -0
  47. package/dist/builtin-plugin/APIPlugin.d.ts +9 -0
  48. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +9 -0
  49. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +9 -0
  50. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +9 -0
  51. package/dist/builtin-plugin/BannerPlugin.d.ts +40 -0
  52. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +14 -0
  53. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +9 -0
  54. package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +59 -0
  55. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +9 -0
  56. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +9 -0
  57. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +14 -0
  58. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +21 -0
  59. package/dist/builtin-plugin/CssModulesPlugin.d.ts +9 -0
  60. package/dist/builtin-plugin/DataUriPlugin.d.ts +9 -0
  61. package/dist/builtin-plugin/DefinePlugin.d.ts +16 -0
  62. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +8 -0
  63. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +8 -0
  64. package/dist/builtin-plugin/DllEntryPlugin.d.ts +12 -0
  65. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +11 -0
  66. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +12 -0
  67. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +9 -0
  68. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +25 -0
  69. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +11 -0
  70. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +9 -0
  71. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +9 -0
  72. package/dist/builtin-plugin/EntryPlugin.d.ts +32 -0
  73. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +11 -0
  74. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +10 -0
  75. package/dist/builtin-plugin/ExternalsPlugin.d.ts +11 -0
  76. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +9 -0
  77. package/dist/builtin-plugin/FileUriPlugin.d.ts +9 -0
  78. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +9 -0
  79. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +9 -0
  80. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +10 -0
  81. package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +7 -0
  82. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +9 -0
  83. package/dist/builtin-plugin/HttpUriPlugin.d.ts +36 -0
  84. package/dist/builtin-plugin/IgnorePlugin.d.ts +19 -0
  85. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +9 -0
  86. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +15 -0
  87. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +10 -0
  88. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +9 -0
  89. package/dist/builtin-plugin/LibManifestPlugin.d.ts +17 -0
  90. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +32 -0
  91. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +14 -0
  92. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +10 -0
  93. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +9 -0
  94. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +9 -0
  95. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +8 -0
  96. package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +9 -0
  97. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +9 -0
  98. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +9 -0
  99. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +8 -0
  100. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +8 -0
  101. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +9 -0
  102. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +9 -0
  103. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +10 -0
  104. package/dist/builtin-plugin/ProgressPlugin.d.ts +11 -0
  105. package/dist/builtin-plugin/ProvidePlugin.d.ts +10 -0
  106. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +9 -0
  107. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +9 -0
  108. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +9 -0
  109. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +49 -0
  110. package/dist/builtin-plugin/RslibPlugin.d.ts +11 -0
  111. package/dist/builtin-plugin/RstestPlugin.d.ts +11 -0
  112. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +11 -0
  113. package/dist/builtin-plugin/RuntimePlugin.d.ts +28 -0
  114. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +9 -0
  115. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +19 -0
  116. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +11 -0
  117. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +11 -0
  118. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +40 -0
  119. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +214 -0
  120. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +9 -0
  121. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +7 -0
  122. package/dist/builtin-plugin/WorkerPlugin.d.ts +13 -0
  123. package/dist/builtin-plugin/base.d.ts +45 -0
  124. package/dist/builtin-plugin/css-extract/index.d.ts +24 -0
  125. package/dist/builtin-plugin/css-extract/loader.d.ts +21 -0
  126. package/dist/builtin-plugin/css-extract/utils.d.ts +6 -0
  127. package/dist/builtin-plugin/html-plugin/hooks.d.ts +32 -0
  128. package/dist/builtin-plugin/html-plugin/index.d.ts +2 -0
  129. package/dist/builtin-plugin/html-plugin/options.d.ts +83 -0
  130. package/dist/builtin-plugin/html-plugin/plugin.d.ts +24 -0
  131. package/dist/builtin-plugin/html-plugin/taps.d.ts +2 -0
  132. package/dist/builtin-plugin/index.d.ts +80 -0
  133. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +24 -0
  134. package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +4 -0
  135. package/dist/config/adapter.d.ts +8 -0
  136. package/dist/config/adapterRuleUse.d.ts +333 -0
  137. package/dist/config/browserslistTargetHandler.d.ts +15 -0
  138. package/dist/config/defaults.d.ts +13 -0
  139. package/dist/config/devServer.d.ts +207 -0
  140. package/dist/config/index.d.ts +4 -0
  141. package/dist/config/normalization.d.ts +154 -0
  142. package/dist/config/target.d.ts +89 -0
  143. package/dist/config/types.d.ts +2282 -0
  144. package/dist/container/ContainerPlugin.d.ts +40 -0
  145. package/dist/container/ContainerReferencePlugin.d.ts +33 -0
  146. package/dist/container/ModuleFederationPlugin.d.ts +13 -0
  147. package/dist/container/ModuleFederationPluginV1.d.ts +22 -0
  148. package/dist/container/ModuleFederationRuntimePlugin.d.ts +12 -0
  149. package/dist/container/index.d.ts +4 -0
  150. package/dist/container/options.d.ts +3 -0
  151. package/dist/error/ConcurrentCompilationError.d.ts +14 -0
  152. package/dist/exports.d.ts +166 -0
  153. package/dist/index.d.ts +10 -0
  154. package/dist/index.mjs +57013 -0
  155. package/dist/index.mjs.LICENSE.txt +10 -0
  156. package/dist/lib/AbstractMethodError.d.ts +23 -0
  157. package/dist/lib/Cache.d.ts +65 -0
  158. package/dist/lib/CacheFacade.d.ts +139 -0
  159. package/dist/lib/DllPlugin.d.ts +42 -0
  160. package/dist/lib/DllReferencePlugin.d.ts +119 -0
  161. package/dist/lib/EntryOptionPlugin.d.ts +33 -0
  162. package/dist/lib/EnvironmentPlugin.d.ts +22 -0
  163. package/dist/lib/HookWebpackError.d.ts +40 -0
  164. package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
  165. package/dist/lib/LoaderOptionsPlugin.d.ts +28 -0
  166. package/dist/lib/LoaderTargetPlugin.d.ts +24 -0
  167. package/dist/lib/ModuleFilenameHelpers.d.ts +53 -0
  168. package/dist/lib/NormalModuleReplacementPlugin.d.ts +29 -0
  169. package/dist/lib/WebpackError.d.ts +21 -0
  170. package/dist/lib/cache/MemoryCachePlugin.d.ts +5 -0
  171. package/dist/lib/cache/getLazyHashedEtag.d.ts +35 -0
  172. package/dist/lib/cache/mergeEtags.d.ts +17 -0
  173. package/dist/loader-runner/LoaderLoadingError.d.ts +13 -0
  174. package/dist/loader-runner/ModuleError.d.ts +7 -0
  175. package/dist/loader-runner/ModuleWarning.d.ts +7 -0
  176. package/dist/loader-runner/index.d.ts +34 -0
  177. package/dist/loader-runner/loadLoader.d.ts +12 -0
  178. package/dist/loader-runner/service.d.ts +71 -0
  179. package/dist/loader-runner/utils.d.ts +7 -0
  180. package/dist/loader-runner/worker.d.ts +14 -0
  181. package/dist/logging/Logger.d.ts +61 -0
  182. package/dist/logging/createConsoleLogger.d.ts +35 -0
  183. package/dist/logging/truncateArgs.d.ts +16 -0
  184. package/dist/node/NodeEnvironmentPlugin.d.ts +10 -0
  185. package/dist/node/NodeTemplatePlugin.d.ts +18 -0
  186. package/dist/node/NodeWatchFileSystem.d.ts +18 -0
  187. package/dist/node/nodeConsole.d.ts +15 -0
  188. package/dist/rspack.d.ts +16 -0
  189. package/dist/rspack.wasi-browser.js +101 -0
  190. package/dist/rspackOptionsApply.d.ts +4 -0
  191. package/dist/runtime/cssExtractHmr.d.ts +4 -0
  192. package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
  193. package/dist/schema/config.d.ts +995 -0
  194. package/dist/schema/loaders.d.ts +399 -0
  195. package/dist/schema/plugins.d.ts +166 -0
  196. package/dist/schema/utils.d.ts +3 -0
  197. package/dist/schema/validate.d.ts +9 -0
  198. package/dist/sharing/ConsumeSharedPlugin.d.ts +41 -0
  199. package/dist/sharing/ProvideSharedPlugin.d.ts +34 -0
  200. package/dist/sharing/SharePlugin.d.ts +51 -0
  201. package/dist/sharing/ShareRuntimePlugin.d.ts +9 -0
  202. package/dist/sharing/utils.d.ts +1 -0
  203. package/dist/stats/DefaultStatsFactoryPlugin.d.ts +4 -0
  204. package/dist/stats/DefaultStatsPresetPlugin.d.ts +4 -0
  205. package/dist/stats/DefaultStatsPrinterPlugin.d.ts +13 -0
  206. package/dist/stats/StatsFactory.d.ts +57 -0
  207. package/dist/stats/StatsPrinter.d.ts +57 -0
  208. package/dist/stats/statsFactoryUtils.d.ts +325 -0
  209. package/dist/swc.d.ts +7 -0
  210. package/dist/taps/compilation.d.ts +8 -0
  211. package/dist/taps/compiler.d.ts +2 -0
  212. package/dist/taps/contextModuleFactory.d.ts +2 -0
  213. package/dist/taps/index.d.ts +6 -0
  214. package/dist/taps/javascriptModules.d.ts +2 -0
  215. package/dist/taps/normalModuleFactory.d.ts +2 -0
  216. package/dist/taps/types.d.ts +11 -0
  217. package/dist/trace/index.d.ts +46 -0
  218. package/dist/trace/traceHookPlugin.d.ts +5 -0
  219. package/dist/util/ArrayQueue.d.ts +45 -0
  220. package/dist/util/AsyncTask.d.ts +7 -0
  221. package/dist/util/MergeCaller.d.ts +10 -0
  222. package/dist/util/SizeFormatHelpers.d.ts +10 -0
  223. package/dist/util/SplitChunkSize.d.ts +5 -0
  224. package/dist/util/assertNotNil.d.ts +1 -0
  225. package/dist/util/assetCondition.d.ts +2 -0
  226. package/dist/util/asyncLib.d.ts +54 -0
  227. package/dist/util/bindingVersionCheck.d.ts +5 -0
  228. package/dist/util/cleverMerge.d.ts +24 -0
  229. package/dist/util/comparators.d.ts +16 -0
  230. package/dist/util/createHash.d.ts +16 -0
  231. package/dist/util/createReadonlyMap.d.ts +1 -0
  232. package/dist/util/fake.d.ts +9 -0
  233. package/dist/util/fs.d.ts +352 -0
  234. package/dist/util/hash/index.d.ts +26 -0
  235. package/dist/util/hash/md4.d.ts +11 -0
  236. package/dist/util/hash/wasm-hash.d.ts +51 -0
  237. package/dist/util/hash/xxhash64.d.ts +11 -0
  238. package/dist/util/identifier.d.ts +31 -0
  239. package/dist/util/index.d.ts +11 -0
  240. package/dist/util/memoize.d.ts +2 -0
  241. package/dist/util/require.d.ts +3 -0
  242. package/dist/util/runtime.d.ts +2 -0
  243. package/dist/util/smartGrouping.d.ts +21 -0
  244. package/dist/util/source.d.ts +7 -0
  245. package/dist/wasi-worker-browser.mjs +34 -0
  246. package/package.json +3 -3
@@ -0,0 +1,325 @@
1
+ /**
2
+ * The following code is modified based on
3
+ * https://github.com/webpack/webpack/blob/v5.88.2/lib/RuntimeGlobals.js
4
+ *
5
+ * MIT Licensed
6
+ * Author Tobias Koppers \@sokra
7
+ * Copyright (c) JS Foundation and other contributors
8
+ * https://github.com/webpack/webpack/blob/main/LICENSE
9
+ */
10
+ import type { JsRuntimeGlobals } from "@rspack/binding";
11
+ export declare function __from_binding_runtime_globals(runtimeRequirements: JsRuntimeGlobals): Set<string>;
12
+ export declare function __to_binding_runtime_globals(runtimeRequirements: Set<string>): JsRuntimeGlobals;
13
+ export declare const RuntimeGlobals: {
14
+ /**
15
+ * the internal require function
16
+ */
17
+ readonly require: "__webpack_require__";
18
+ /**
19
+ * access to properties of the internal require function/object
20
+ */
21
+ readonly requireScope: "__webpack_require__.*";
22
+ /**
23
+ * the internal exports object
24
+ */
25
+ readonly exports: "__webpack_exports__";
26
+ /**
27
+ * top-level this need to be the exports object
28
+ */
29
+ readonly thisAsExports: "top-level-this-exports";
30
+ /**
31
+ * runtime need to return the exports of the last entry module
32
+ */
33
+ readonly returnExportsFromRuntime: "return-exports-from-runtime";
34
+ /**
35
+ * the internal module object
36
+ */
37
+ readonly module: "module";
38
+ /**
39
+ * the internal module object
40
+ */
41
+ readonly moduleId: "module.id";
42
+ /**
43
+ * the internal module object
44
+ */
45
+ readonly moduleLoaded: "module.loaded";
46
+ /**
47
+ * the bundle public path
48
+ */
49
+ readonly publicPath: "__webpack_require__.p";
50
+ /**
51
+ * the module id of the entry point
52
+ */
53
+ readonly entryModuleId: "__webpack_require__.s";
54
+ /**
55
+ * the module cache
56
+ */
57
+ readonly moduleCache: "__webpack_require__.c";
58
+ /**
59
+ * the module functions
60
+ */
61
+ readonly moduleFactories: "__webpack_require__.m";
62
+ /**
63
+ * the module functions, with only write access
64
+ */
65
+ readonly moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
66
+ /**
67
+ * the chunk ensure function
68
+ */
69
+ readonly ensureChunk: "__webpack_require__.e";
70
+ /**
71
+ * an object with handlers to ensure a chunk
72
+ */
73
+ readonly ensureChunkHandlers: "__webpack_require__.f";
74
+ /**
75
+ * a runtime requirement if ensureChunkHandlers should include loading of chunk needed for entries
76
+ */
77
+ readonly ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
78
+ /**
79
+ * the chunk prefetch function
80
+ */
81
+ readonly prefetchChunk: "__webpack_require__.E";
82
+ /**
83
+ * an object with handlers to prefetch a chunk
84
+ */
85
+ readonly prefetchChunkHandlers: "__webpack_require__.F";
86
+ /**
87
+ * the chunk preload function
88
+ */
89
+ readonly preloadChunk: "__webpack_require__.G";
90
+ /**
91
+ * an object with handlers to preload a chunk
92
+ */
93
+ readonly preloadChunkHandlers: "__webpack_require__.H";
94
+ /**
95
+ * the exported property define getters function
96
+ */
97
+ readonly definePropertyGetters: "__webpack_require__.d";
98
+ /**
99
+ * define compatibility on export
100
+ */
101
+ readonly makeNamespaceObject: "__webpack_require__.r";
102
+ /**
103
+ * create a fake namespace object
104
+ */
105
+ readonly createFakeNamespaceObject: "__webpack_require__.t";
106
+ /**
107
+ * compatibility get default export
108
+ */
109
+ readonly compatGetDefaultExport: "__webpack_require__.n";
110
+ /**
111
+ * ES modules decorator
112
+ */
113
+ readonly harmonyModuleDecorator: "__webpack_require__.hmd";
114
+ /**
115
+ * node.js module decorator
116
+ */
117
+ readonly nodeModuleDecorator: "__webpack_require__.nmd";
118
+ /**
119
+ * the webpack hash
120
+ */
121
+ readonly getFullHash: "__webpack_require__.h";
122
+ /**
123
+ * an object containing all installed WebAssembly.Instance export objects keyed by module id
124
+ */
125
+ readonly wasmInstances: "__webpack_require__.w";
126
+ /**
127
+ * instantiate a wasm instance from module exports object, id, hash and importsObject
128
+ */
129
+ readonly instantiateWasm: "__webpack_require__.v";
130
+ /**
131
+ * the uncaught error handler for the webpack runtime
132
+ */
133
+ readonly uncaughtErrorHandler: "__webpack_require__.oe";
134
+ /**
135
+ * the script nonce
136
+ */
137
+ readonly scriptNonce: "__webpack_require__.nc";
138
+ /**
139
+ * function to load a script tag.
140
+ * Arguments: (url: string, done: (event) =\> void), key?: string | number, chunkId?: string | number) =\> void
141
+ * done function is called when loading has finished or timeout occurred.
142
+ * It will attach to existing script tags with data-webpack == uniqueName + ":" + key or src == url.
143
+ */
144
+ readonly loadScript: "__webpack_require__.l";
145
+ /**
146
+ * function to promote a string to a TrustedScript using webpack's Trusted
147
+ * Types policy
148
+ * Arguments: (script: string) =\> TrustedScript
149
+ */
150
+ readonly createScript: "__webpack_require__.ts";
151
+ /**
152
+ * function to promote a string to a TrustedScriptURL using webpack's Trusted
153
+ * Types policy
154
+ * Arguments: (url: string) =\> TrustedScriptURL
155
+ */
156
+ readonly createScriptUrl: "__webpack_require__.tu";
157
+ /**
158
+ * function to return webpack's Trusted Types policy
159
+ * Arguments: () =\> TrustedTypePolicy
160
+ */
161
+ readonly getTrustedTypesPolicy: "__webpack_require__.tt";
162
+ /**
163
+ * a flag when a chunk has a fetch priority
164
+ */
165
+ readonly hasFetchPriority: "has fetch priority";
166
+ /**
167
+ * the chunk name of the chunk with the runtime
168
+ */
169
+ readonly chunkName: "__webpack_require__.cn";
170
+ /**
171
+ * the runtime id of the current runtime
172
+ */
173
+ readonly runtimeId: "__webpack_require__.j";
174
+ /**
175
+ * the filename of the script part of the chunk
176
+ */
177
+ readonly getChunkScriptFilename: "__webpack_require__.u";
178
+ /**
179
+ * the filename of the css part of the chunk
180
+ */
181
+ readonly getChunkCssFilename: "__webpack_require__.k";
182
+ /**
183
+ * a flag when a module/chunk/tree has css modules
184
+ */
185
+ readonly hasCssModules: "has css modules";
186
+ /**
187
+ * the filename of the script part of the hot update chunk
188
+ */
189
+ readonly getChunkUpdateScriptFilename: "__webpack_require__.hu";
190
+ /**
191
+ * the filename of the css part of the hot update chunk
192
+ */
193
+ readonly getChunkUpdateCssFilename: "__webpack_require__.hk";
194
+ /**
195
+ * startup signal from runtime
196
+ * This will be called when the runtime chunk has been loaded.
197
+ */
198
+ readonly startup: "__webpack_require__.x";
199
+ /**
200
+ * @deprecated
201
+ * creating a default startup function with the entry modules
202
+ */
203
+ readonly startupNoDefault: "__webpack_require__.x (no default handler)";
204
+ /**
205
+ * startup signal from runtime but only used to add logic after the startup
206
+ */
207
+ readonly startupOnlyAfter: "__webpack_require__.x (only after)";
208
+ /**
209
+ * startup signal from runtime but only used to add sync logic before the startup
210
+ */
211
+ readonly startupOnlyBefore: "__webpack_require__.x (only before)";
212
+ /**
213
+ * global callback functions for installing chunks
214
+ */
215
+ readonly chunkCallback: "webpackChunk";
216
+ /**
217
+ * method to startup an entrypoint with needed chunks.
218
+ * Signature: (moduleId: Id, chunkIds: Id[]) =\> any.
219
+ * Returns the exports of the module or a Promise
220
+ */
221
+ readonly startupEntrypoint: "__webpack_require__.X";
222
+ /**
223
+ * register deferred code, which will run when certain
224
+ * chunks are loaded.
225
+ * Signature: (chunkIds: Id[], fn: () =\> any, priority: int \>= 0 = 0) =\> any
226
+ * Returned value will be returned directly when all chunks are already loaded
227
+ * When (priority & 1) it will wait for all other handlers with lower priority to
228
+ * be executed before itself is executed
229
+ */
230
+ readonly onChunksLoaded: "__webpack_require__.O";
231
+ /**
232
+ * method to install a chunk that was loaded somehow
233
+ * Signature: (\{ id, ids, modules, runtime \}) =\> void
234
+ */
235
+ readonly externalInstallChunk: "__webpack_require__.C";
236
+ /**
237
+ * interceptor for module executions
238
+ */
239
+ readonly interceptModuleExecution: "__webpack_require__.i";
240
+ /**
241
+ * the global object
242
+ */
243
+ readonly global: "__webpack_require__.g";
244
+ /**
245
+ * an object with all share scopes
246
+ */
247
+ readonly shareScopeMap: "__webpack_require__.S";
248
+ /**
249
+ * The sharing init sequence function (only runs once per share scope).
250
+ * Has one argument, the name of the share scope.
251
+ * Creates a share scope if not existing
252
+ */
253
+ readonly initializeSharing: "__webpack_require__.I";
254
+ /**
255
+ * The current scope when getting a module from a remote
256
+ */
257
+ readonly currentRemoteGetScope: "__webpack_require__.R";
258
+ /**
259
+ * the filename of the HMR manifest
260
+ */
261
+ readonly getUpdateManifestFilename: "__webpack_require__.hmrF";
262
+ /**
263
+ * function downloading the update manifest
264
+ */
265
+ readonly hmrDownloadManifest: "__webpack_require__.hmrM";
266
+ /**
267
+ * array with handler functions to download chunk updates
268
+ */
269
+ readonly hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
270
+ /**
271
+ * object with all hmr module data for all modules
272
+ */
273
+ readonly hmrModuleData: "__webpack_require__.hmrD";
274
+ /**
275
+ * array with handler functions when a module should be invalidated
276
+ */
277
+ readonly hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
278
+ /**
279
+ * the prefix for storing state of runtime modules when hmr is enabled
280
+ */
281
+ readonly hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
282
+ /**
283
+ * the AMD define function
284
+ */
285
+ readonly amdDefine: "__webpack_require__.amdD";
286
+ /**
287
+ * the AMD options
288
+ */
289
+ readonly amdOptions: "__webpack_require__.amdO";
290
+ /**
291
+ * the System polyfill object
292
+ */
293
+ readonly system: "__webpack_require__.System";
294
+ /**
295
+ * the shorthand for Object.prototype.hasOwnProperty
296
+ * using of it decreases the compiled bundle size
297
+ */
298
+ readonly hasOwnProperty: "__webpack_require__.o";
299
+ /**
300
+ * the System.register context object
301
+ */
302
+ readonly systemContext: "__webpack_require__.y";
303
+ /**
304
+ * the baseURI of current document
305
+ */
306
+ readonly baseURI: "__webpack_require__.b";
307
+ /**
308
+ * a RelativeURL class when relative URLs are used
309
+ */
310
+ readonly relativeUrl: "__webpack_require__.U";
311
+ /**
312
+ * Creates an async module. The body function must be a async function.
313
+ * "module.exports" will be decorated with an AsyncModulePromise.
314
+ * The body function will be called.
315
+ * To handle async dependencies correctly do this: "([a, b, c] = await handleDependencies([a, b, c]));".
316
+ * If "hasAwaitAfterDependencies" is truthy, "handleDependencies()" must be called at the end of the body function.
317
+ * Signature: function(
318
+ * module: Module,
319
+ * body: (handleDependencies: (deps: AsyncModulePromise[]) =\> Promise\<any[]\> & () =\> void,
320
+ * hasAwaitAfterDependencies?: boolean
321
+ * ) =\> void
322
+ */
323
+ readonly asyncModule: "__webpack_require__.a";
324
+ };
325
+ export declare const isReservedRuntimeGlobal: (r: string) => boolean;
@@ -0,0 +1,32 @@
1
+ import type { JsAddingRuntimeModule } from "@rspack/binding";
2
+ import type { Chunk } from "./Chunk";
3
+ import type { ChunkGraph } from "./ChunkGraph";
4
+ import type { Compilation } from "./Compilation";
5
+ export declare enum RuntimeModuleStage {
6
+ NORMAL = 0,
7
+ BASIC = 5,
8
+ ATTACH = 10,
9
+ TRIGGER = 20
10
+ }
11
+ export declare class RuntimeModule {
12
+ static STAGE_NORMAL: RuntimeModuleStage;
13
+ static STAGE_BASIC: RuntimeModuleStage;
14
+ static STAGE_ATTACH: RuntimeModuleStage;
15
+ static STAGE_TRIGGER: RuntimeModuleStage;
16
+ static __to_binding(compilation: Compilation, module: RuntimeModule): JsAddingRuntimeModule;
17
+ private _name;
18
+ private _stage;
19
+ fullHash: boolean;
20
+ dependentHash: boolean;
21
+ protected chunk: Chunk | null;
22
+ protected compilation: Compilation | null;
23
+ protected chunkGraph: ChunkGraph | null;
24
+ constructor(name: string, stage?: RuntimeModuleStage);
25
+ attach(compilation: Compilation, chunk: Chunk, chunkGraph: ChunkGraph): void;
26
+ get name(): string;
27
+ get stage(): RuntimeModuleStage;
28
+ identifier(): string;
29
+ readableIdentifier(): string;
30
+ shouldIsolate(): boolean;
31
+ generate(): string;
32
+ }
@@ -0,0 +1,17 @@
1
+ import type { Compilation } from "./Compilation";
2
+ import type { StatsOptions, StatsValue } from "./config";
3
+ import type { StatsCompilation } from "./stats/statsFactoryUtils";
4
+ export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule } from "./stats/statsFactoryUtils";
5
+ export declare class Stats {
6
+ #private;
7
+ constructor(compilation: Compilation);
8
+ get compilation(): Compilation;
9
+ get hash(): Readonly<string | null>;
10
+ get startTime(): number | undefined;
11
+ get endTime(): number | undefined;
12
+ hasErrors(): boolean;
13
+ hasWarnings(): boolean;
14
+ toJson(opts?: StatsValue, forToString?: boolean): StatsCompilation;
15
+ toString(opts?: StatsValue): string;
16
+ }
17
+ export declare function normalizeStatsPreset(options?: StatsValue): StatsOptions;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * The following code is modified based on
3
+ * https://github.com/webpack/webpack/blob/4b4ca3b/lib/Template.js
4
+ *
5
+ * MIT Licensed
6
+ * Author Tobias Koppers @sokra
7
+ * Copyright (c) JS Foundation and other contributors
8
+ * https://github.com/webpack/webpack/blob/main/LICENSE
9
+ */
10
+ declare class Template {
11
+ /**
12
+ *
13
+ * @param fn a runtime function (.runtime.js) "template"
14
+ * @returns the updated and normalized function string
15
+ */
16
+ static getFunctionContent(fn: Function): string;
17
+ /**
18
+ * @param str the string converted to identifier
19
+ * @returns created identifier
20
+ */
21
+ static toIdentifier(str: any): string;
22
+ /**
23
+ *
24
+ * @param str string to be converted to commented in bundle code
25
+ * @returns returns a commented version of string
26
+ */
27
+ static toComment(str: string): string;
28
+ /**
29
+ *
30
+ * @param str string to be converted to "normal comment"
31
+ * @returns returns a commented version of string
32
+ */
33
+ static toNormalComment(str: string): string;
34
+ /**
35
+ * @param str string path to be normalized
36
+ * @returns normalized bundle-safe path
37
+ */
38
+ static toPath(str: string): string;
39
+ /**
40
+ * @param num number to convert to ident
41
+ * @returns returns single character ident
42
+ */
43
+ static numberToIdentifier(num: number): string;
44
+ /**
45
+ * @param num number to convert to ident
46
+ * @returns returns single character ident
47
+ */
48
+ static numberToIdentifierContinuation(num: number): string;
49
+ /**
50
+ *
51
+ * @param s string to convert to identity
52
+ * @returns converted identity
53
+ */
54
+ static indent(s: string | string[]): string;
55
+ /**
56
+ *
57
+ * @param s string to create prefix for
58
+ * @param prefix prefix to compose
59
+ * @returns returns new prefix string
60
+ */
61
+ static prefix(s: string | string[], prefix: string): string;
62
+ /**
63
+ *
64
+ * @param str string or string collection
65
+ * @returns returns a single string from array
66
+ */
67
+ static asString(str: string | string[]): string;
68
+ /**
69
+ * @param modules a collection of modules to get array bounds for
70
+ * @returns returns the upper and lower array bounds
71
+ * or false if not every module has a number based id
72
+ */
73
+ static getModulesArrayBounds(modules: {
74
+ id: string | number;
75
+ }[]): [number, number] | false;
76
+ }
77
+ export { Template };
@@ -0,0 +1,47 @@
1
+ import type { Callback } from "@rspack/lite-tapable";
2
+ import type { Compiler } from ".";
3
+ import { Stats } from ".";
4
+ import type { WatchOptions } from "./config";
5
+ import type { Watcher } from "./util/fs";
6
+ export declare class Watching {
7
+ #private;
8
+ watcher?: Watcher;
9
+ pausedWatcher?: Watcher;
10
+ compiler: Compiler;
11
+ handler: Callback<Error, Stats>;
12
+ callbacks: Callback<Error, void>[];
13
+ watchOptions: WatchOptions;
14
+ lastWatcherStartTime: number;
15
+ running: boolean;
16
+ blocked: boolean;
17
+ isBlocked: () => boolean;
18
+ onChange: () => void;
19
+ onInvalid: () => void;
20
+ invalid: boolean;
21
+ startTime?: number;
22
+ suspended: boolean;
23
+ constructor(compiler: Compiler, watchOptions: WatchOptions, handler: Callback<Error, Stats>);
24
+ watch(files: Iterable<string> & {
25
+ added?: Iterable<string>;
26
+ removed?: Iterable<string>;
27
+ }, dirs: Iterable<string> & {
28
+ added?: Iterable<string>;
29
+ removed?: Iterable<string>;
30
+ }, missing: Iterable<string> & {
31
+ added?: Iterable<string>;
32
+ removed?: Iterable<string>;
33
+ }): void;
34
+ close(callback?: () => void): void;
35
+ invalidate(callback?: Callback<Error, void>): void;
36
+ /**
37
+ * @internal This is not a public API yet, still unstable, might change in the future
38
+ */
39
+ invalidateWithChangesAndRemovals(changedFiles?: Set<string>, removedFiles?: Set<string>, callback?: Callback<Error, void>): void;
40
+ /**
41
+ * The reason why this is _done instead of #done, is that in Webpack,
42
+ * it will rewrite this function to another function
43
+ */
44
+ private _done;
45
+ suspend(): void;
46
+ resume(): void;
47
+ }
@@ -0,0 +1 @@
1
+ export { Buffer } from "@napi-rs/wasm-runtime/fs";
@@ -0,0 +1,12 @@
1
+ import type { IFs, Volume } from "memfs";
2
+ export declare const fs: IFs;
3
+ export declare const volume: Volume;
4
+ declare const readFileSync: (file: import("memfs/lib/volume").TFileId, options?: import("memfs/lib/node/types/options").IReadFileOptions | string) => import("memfs/lib/encoding").TDataOut, readdirSync: (path: import("memfs/lib/node/types/misc").PathLike, options?: import("memfs/lib/node/types/options").IReaddirOptions | string) => import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/Dirent").Dirent[], lstat: {
5
+ (path: import("memfs/lib/node/types/misc").PathLike, callback: import("memfs/lib/volume").TCallback<import("memfs/lib/Stats").Stats>): void;
6
+ (path: import("memfs/lib/node/types/misc").PathLike, options: import("memfs/lib/node/types/options").IStatOptions, callback: import("memfs/lib/volume").TCallback<import("memfs/lib/Stats").Stats>): void;
7
+ }, existsSync: (path: import("memfs/lib/node/types/misc").PathLike) => boolean, readdir: {
8
+ (path: import("memfs/lib/node/types/misc").PathLike, callback: import("memfs/lib/volume").TCallback<import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/Dirent").Dirent[]>): any;
9
+ (path: import("memfs/lib/node/types/misc").PathLike, options: import("memfs/lib/node/types/options").IReaddirOptions | string, callback: import("memfs/lib/volume").TCallback<import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/Dirent").Dirent[]>): any;
10
+ }, watch: (path: import("memfs/lib/node/types/misc").PathLike, options?: import("memfs/lib/volume").IWatchOptions | string, listener?: (eventType: string, filename: string) => void) => import("memfs/lib/volume").FSWatcher;
11
+ export default fs;
12
+ export { readFileSync, readdirSync, lstat, existsSync, readdir, watch };
@@ -0,0 +1,5 @@
1
+ export * from "../index";
2
+ export declare const builtinMemFs: {
3
+ fs: import("memfs").IFs;
4
+ volume: import("memfs").Volume;
5
+ };
@@ -0,0 +1,3 @@
1
+ export declare enum RequestType {
2
+ }
3
+ export declare function run(): Promise<void>;
@@ -0,0 +1 @@
1
+ export * from "./swc";
@@ -0,0 +1,117 @@
1
+ /**
2
+ MIT License
3
+
4
+ Copyright (c) 2021-present Devon Govett
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+ */
24
+ export declare function toFeatures(featureOptions: FeatureOptions): Features;
25
+ export declare enum Features {
26
+ Empty = 0,
27
+ Nesting = 1,
28
+ NotSelectorList = 2,
29
+ DirSelector = 4,
30
+ LangSelectorList = 8,
31
+ IsSelector = 16,
32
+ TextDecorationThicknessPercent = 32,
33
+ MediaIntervalSyntax = 64,
34
+ MediaRangeSyntax = 128,
35
+ CustomMediaQueries = 256,
36
+ ClampFunction = 512,
37
+ ColorFunction = 1024,
38
+ OklabColors = 2048,
39
+ LabColors = 4096,
40
+ P3Colors = 8192,
41
+ HexAlphaColors = 16384,
42
+ SpaceSeparatedColorNotation = 32768,
43
+ FontFamilySystemUi = 65536,
44
+ DoublePositionGradients = 131072,
45
+ VendorPrefixes = 262144,
46
+ LogicalProperties = 524288,
47
+ Selectors = 31,
48
+ MediaQueries = 448,
49
+ Color = 64512
50
+ }
51
+ export interface Targets {
52
+ android?: number;
53
+ chrome?: number;
54
+ edge?: number;
55
+ firefox?: number;
56
+ ie?: number;
57
+ ios_saf?: number;
58
+ opera?: number;
59
+ safari?: number;
60
+ samsung?: number;
61
+ }
62
+ export interface Drafts {
63
+ /** Whether to enable @custom-media rules. */
64
+ customMedia?: boolean;
65
+ }
66
+ export interface NonStandard {
67
+ /** Whether to enable the non-standard >>> and /deep/ selector combinators used by Angular and Vue. */
68
+ deepSelectorCombinator?: boolean;
69
+ }
70
+ export interface PseudoClasses {
71
+ hover?: string;
72
+ active?: string;
73
+ focus?: string;
74
+ focusVisible?: string;
75
+ focusWithin?: string;
76
+ }
77
+ export type FeatureOptions = {
78
+ nesting?: boolean;
79
+ notSelectorList?: boolean;
80
+ dirSelector?: boolean;
81
+ langSelectorList?: boolean;
82
+ isSelector?: boolean;
83
+ textDecorationThicknessPercent?: boolean;
84
+ mediaIntervalSyntax?: boolean;
85
+ mediaRangeSyntax?: boolean;
86
+ customMediaQueries?: boolean;
87
+ clampFunction?: boolean;
88
+ colorFunction?: boolean;
89
+ oklabColors?: boolean;
90
+ labColors?: boolean;
91
+ p3Colors?: boolean;
92
+ hexAlphaColors?: boolean;
93
+ spaceSeparatedColorNotation?: boolean;
94
+ fontFamilySystemUi?: boolean;
95
+ doublePositionGradients?: boolean;
96
+ vendorPrefixes?: boolean;
97
+ logicalProperties?: boolean;
98
+ selectors?: boolean;
99
+ mediaQueries?: boolean;
100
+ color?: boolean;
101
+ };
102
+ export type LoaderOptions = {
103
+ minify?: boolean;
104
+ errorRecovery?: boolean;
105
+ targets?: Targets | string[] | string;
106
+ include?: FeatureOptions;
107
+ exclude?: FeatureOptions;
108
+ /**
109
+ * @deprecated Use `drafts` instead.
110
+ * This will be removed in the next major version.
111
+ */
112
+ draft?: Drafts;
113
+ drafts?: Drafts;
114
+ nonStandard?: NonStandard;
115
+ pseudoClasses?: PseudoClasses;
116
+ unusedSymbols?: string[];
117
+ };
@@ -0,0 +1,21 @@
1
+ export type CollectTypeScriptInfoOptions = {
2
+ /**
3
+ * Whether to collect type exports information for `typeReexportsPresence`.
4
+ * This is used to check type exports of submodules when running in `'tolerant'` mode.
5
+ * @default false
6
+ */
7
+ typeExports?: boolean;
8
+ /**
9
+ * Whether to collect information about exported `enum`s.
10
+ * - `true` will collect all `enum` information, including `const enum`s and regular `enum`s.
11
+ * - `false` will not collect any `enum` information.
12
+ * - `'const-only'` will gather only `const enum`s, enabling Rspack to perform cross-module
13
+ * inlining optimizations for them.
14
+ * @default false
15
+ */
16
+ exportedEnum?: boolean | "const-only";
17
+ };
18
+ export declare function resolveCollectTypeScriptInfo(options: CollectTypeScriptInfoOptions): {
19
+ typeExports: boolean | undefined;
20
+ exportedEnum: string;
21
+ };
@@ -0,0 +1,5 @@
1
+ export type { CollectTypeScriptInfoOptions } from "./collectTypeScriptInfo";
2
+ export { resolveCollectTypeScriptInfo } from "./collectTypeScriptInfo";
3
+ export type { PluginImportOptions } from "./pluginImport";
4
+ export { resolvePluginImport } from "./pluginImport";
5
+ export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./types";