@rsbuild/core 1.7.1 → 2.0.0-alpha.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 (121) hide show
  1. package/compiled/css-loader/index.js +2 -2
  2. package/compiled/html-rspack-plugin/index.js +14 -14
  3. package/compiled/http-proxy-middleware/index.d.ts +2 -2
  4. package/compiled/postcss/index.js +1 -1
  5. package/compiled/postcss-loader/index.js +6 -6
  6. package/compiled/ws/index.js +59 -54
  7. package/compiled/ws/package.json +1 -1
  8. package/dist/131.js +1070 -1122
  9. package/dist/31.js +336 -0
  10. package/dist/710.js +445 -0
  11. package/dist/743.js +7 -0
  12. package/dist/{136.mjs → 88.js} +11 -13
  13. package/dist/client/hmr.js +0 -1
  14. package/dist/client/overlay.js +32 -21
  15. package/dist/connect.js +581 -0
  16. package/dist/connect.js.LICENSE.txt +54 -0
  17. package/dist/cors.js +188 -0
  18. package/dist/cors.js.LICENSE.txt +11 -0
  19. package/dist/launch-editor-middleware.js +439 -0
  20. package/dist/manifest-plugin.js +177 -0
  21. package/dist/memfs.js +3644 -0
  22. package/dist/{0~open.js → open.js} +21 -13
  23. package/dist/{0~range-parser.js → range-parser.js} +1 -1
  24. package/dist/remapping.js +196 -0
  25. package/dist/sirv.js +122 -0
  26. package/dist/tinyglobby.js +1463 -0
  27. package/dist/transformLoader.mjs +1 -1
  28. package/dist/transformRawLoader.mjs +1 -1
  29. package/dist-types/{provider/build.d.ts → build.d.ts} +2 -2
  30. package/dist-types/cli/commands.d.ts +1 -1
  31. package/dist-types/configChain.d.ts +0 -2
  32. package/dist-types/constants.d.ts +2 -3
  33. package/dist-types/{provider/createCompiler.d.ts → createCompiler.d.ts} +1 -1
  34. package/dist-types/defaultConfig.d.ts +1 -1
  35. package/dist-types/helpers/fs.d.ts +4 -0
  36. package/dist-types/helpers/index.d.ts +1 -1
  37. package/dist-types/helpers/url.d.ts +0 -1
  38. package/dist-types/helpers/vendors.d.ts +0 -13
  39. package/dist-types/hooks.d.ts +3 -5
  40. package/dist-types/index.d.ts +1 -1
  41. package/dist-types/{provider/initConfigs.d.ts → initConfigs.d.ts} +1 -1
  42. package/dist-types/inspectConfig.d.ts +5 -33
  43. package/dist-types/pluginHelper.d.ts +1 -1
  44. package/dist-types/plugins/css.d.ts +1 -1
  45. package/dist-types/plugins/inlineChunk.d.ts +1 -1
  46. package/dist-types/plugins/minimize.d.ts +2 -2
  47. package/dist-types/{provider/rspackConfig.d.ts → rspackConfig.d.ts} +1 -1
  48. package/dist-types/server/assets-middleware/getFileFromUrl.d.ts +1 -2
  49. package/dist-types/server/assets-middleware/setupOutputFileSystem.d.ts +1 -1
  50. package/dist-types/server/browserLogs.d.ts +1 -1
  51. package/dist-types/server/devMiddlewares.d.ts +1 -1
  52. package/dist-types/server/devServer.d.ts +1 -1
  53. package/dist-types/server/gzipMiddleware.d.ts +1 -1
  54. package/dist-types/server/helper.d.ts +13 -10
  55. package/dist-types/server/proxy.d.ts +2 -2
  56. package/dist-types/server/socketServer.d.ts +1 -1
  57. package/dist-types/types/config.d.ts +7 -51
  58. package/dist-types/types/context.d.ts +3 -2
  59. package/dist-types/types/hooks.d.ts +9 -9
  60. package/dist-types/types/plugin.d.ts +3 -40
  61. package/dist-types/types/rsbuild.d.ts +6 -31
  62. package/dist-types/types/thirdParty.d.ts +1 -4
  63. package/package.json +15 -20
  64. package/compiled/@jridgewell/remapping/index.d.ts +0 -1
  65. package/compiled/@jridgewell/remapping/index.js +0 -1222
  66. package/compiled/@jridgewell/remapping/license +0 -19
  67. package/compiled/@jridgewell/remapping/package.json +0 -1
  68. package/compiled/@jridgewell/trace-mapping/index.d.ts +0 -194
  69. package/compiled/@jridgewell/trace-mapping/index.js +0 -1408
  70. package/compiled/@jridgewell/trace-mapping/license +0 -19
  71. package/compiled/@jridgewell/trace-mapping/package.json +0 -1
  72. package/compiled/connect/index.d.ts +0 -90
  73. package/compiled/connect/index.js +0 -1240
  74. package/compiled/connect/license +0 -25
  75. package/compiled/connect/package.json +0 -1
  76. package/compiled/cors/index.d.ts +0 -56
  77. package/compiled/cors/index.js +0 -371
  78. package/compiled/cors/license +0 -22
  79. package/compiled/cors/package.json +0 -1
  80. package/compiled/launch-editor-middleware/index.d.ts +0 -1
  81. package/compiled/launch-editor-middleware/index.js +0 -719
  82. package/compiled/launch-editor-middleware/license +0 -21
  83. package/compiled/launch-editor-middleware/package.json +0 -1
  84. package/compiled/memfs/index.d.ts +0 -1462
  85. package/compiled/memfs/index.js +0 -1
  86. package/compiled/memfs/license +0 -201
  87. package/compiled/memfs/package.json +0 -1
  88. package/compiled/mrmime/index.d.ts +0 -4
  89. package/compiled/mrmime/index.js +0 -456
  90. package/compiled/mrmime/package.json +0 -1
  91. package/compiled/picocolors/index.d.ts +0 -55
  92. package/compiled/picocolors/index.js +0 -108
  93. package/compiled/picocolors/license +0 -15
  94. package/compiled/picocolors/package.json +0 -1
  95. package/compiled/rspack-manifest-plugin/index.d.ts +0 -48
  96. package/compiled/rspack-manifest-plugin/index.js +0 -409
  97. package/compiled/rspack-manifest-plugin/license +0 -21
  98. package/compiled/rspack-manifest-plugin/package.json +0 -1
  99. package/compiled/sirv/index.d.ts +0 -1
  100. package/compiled/sirv/index.js +0 -274
  101. package/compiled/sirv/package.json +0 -1
  102. package/compiled/tinyglobby/index.d.ts +0 -46
  103. package/compiled/tinyglobby/index.js +0 -2664
  104. package/compiled/tinyglobby/license +0 -21
  105. package/compiled/tinyglobby/package.json +0 -1
  106. package/compiled/webpack-bundle-analyzer/index.d.ts +0 -160
  107. package/compiled/webpack-bundle-analyzer/index.js +0 -23
  108. package/compiled/webpack-bundle-analyzer/license +0 -20
  109. package/compiled/webpack-bundle-analyzer/package.json +0 -1
  110. package/compiled/webpack-bundle-analyzer/public/viewer.js +0 -16
  111. package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +0 -10
  112. package/dist/2~open.cjs +0 -436
  113. package/dist/2~range-parser.cjs +0 -52
  114. package/dist/2~range-parser.cjs.LICENSE.txt +0 -6
  115. package/dist/index.cjs +0 -9442
  116. package/dist/index.cjs.LICENSE.txt +0 -26
  117. package/dist-types/plugins/bundleAnalyzer.d.ts +0 -2
  118. package/dist-types/plugins/performance.d.ts +0 -5
  119. package/dist-types/provider/helpers.d.ts +0 -12
  120. package/dist-types/provider/provider.d.ts +0 -2
  121. /package/dist/{0~range-parser.js.LICENSE.txt → range-parser.js.LICENSE.txt} +0 -0
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Madeline Gurriarán
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1 +0,0 @@
1
- {"name":"tinyglobby","author":"Superchupu","version":"0.2.14","funding":{"url":"https://github.com/sponsors/SuperchupuDev"},"license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -1,160 +0,0 @@
1
- /// <reference types="node" />
2
- import { Server } from 'http';
3
- import { AddressInfo } from 'net';
4
- import { StatsOptions, WebpackPluginInstance, Compiler, Stats } from "@rspack/core";
5
-
6
- declare namespace BundleAnalyzerPlugin {
7
- // Copied from @types/webpack@4 as webpack@5 only has `any` defined at the moment.
8
- // See https://github.com/webpack/webpack/issues/11630
9
- namespace Stats {
10
- type Preset = boolean | "errors-only" | "errors-warnings" | "minimal" | "none" | "normal" | "verbose";
11
-
12
- type ToJsonOptionsObject = StatsOptions;
13
-
14
- type ToJsonOptions = Preset | ToJsonOptionsObject;
15
-
16
- type StatsExcludeFilter =
17
- | string
18
- | string[]
19
- | RegExp
20
- | RegExp[]
21
- | ((assetName: string) => boolean)
22
- | Array<(assetName: string) => boolean>;
23
- }
24
-
25
- type ExcludeAssetsPatternFn = (assetName: string) => boolean;
26
- type ExcludeAssetsPattern = string | RegExp | ExcludeAssetsPatternFn;
27
-
28
- interface Options {
29
- /**
30
- * Can be "server", "static" or "disabled".
31
- * Defaults to "server".
32
- * In "server" mode analyzer will start HTTP server to show bundle report.
33
- * In "static" mode single HTML file with bundle report will be generated.
34
- * In "json" mode single JSON file with bundle report will be generated
35
- * In "disabled" mode you can use this plugin to just generate Webpack Stats JSON file by setting "generateStatsFile" to true.
36
- */
37
- analyzerMode?: "server" | "static" | "json" | "disabled" | undefined;
38
-
39
- /**
40
- * Host that will be used in `server` mode to start HTTP server.
41
- * @default '127.0.0.1'
42
- */
43
- analyzerHost?: string | undefined;
44
-
45
- /**
46
- * Port that will be used in `server` mode to start HTTP server.
47
- * @default 8888
48
- */
49
- analyzerPort?: number | "auto" | undefined;
50
-
51
- /**
52
- * The URL printed to console with server mode.
53
- * @default 'http://${listenHost}:${boundAddress.port}'
54
- */
55
- analyzerUrl?: (options: { listenPort: string; listenHost: string; boundAddress: AddressInfo }) => string;
56
-
57
- /**
58
- * Path to bundle report file that will be generated in "static" mode.
59
- * Relative to bundles output directory.
60
- * @default 'report.html'
61
- */
62
- reportFilename?: string | undefined;
63
-
64
- /**
65
- * Content of the HTML title element; or a function of the form () => string that provides the content.
66
- * @default function that returns pretty printed current date and time.
67
- */
68
- reportTitle?: string | (() => string) | undefined;
69
-
70
- /**
71
- * Module sizes to show in report by default.
72
- * Should be one of "stat", "parsed" or "gzip".
73
- * @default 'parsed'
74
- */
75
- defaultSizes?: "parsed" | "stat" | "gzip" | undefined;
76
-
77
- /**
78
- * Automatically open report in default browser.
79
- * @default true
80
- */
81
- openAnalyzer?: boolean | undefined;
82
-
83
- /**
84
- * If true, Webpack Stats JSON file will be generated in bundles output directory.
85
- * @default false
86
- */
87
- generateStatsFile?: boolean | undefined;
88
-
89
- /**
90
- * Name of Webpack Stats JSON file that will be generated if generateStatsFile is true.
91
- * Relative to bundles output directory.
92
- * @default 'stats.json'
93
- */
94
- statsFilename?: string | undefined;
95
-
96
- /**
97
- * Options for stats.toJson() method.
98
- * For example you can exclude sources of your modules from stats file with "source: false" option.
99
- * @default null
100
- */
101
- statsOptions?: null | Stats.ToJsonOptions | undefined;
102
-
103
- /**
104
- * Patterns that will be used to match against asset names to exclude them from the report.
105
- * If pattern is a string it will be converted to RegExp via `new RegExp(str)`.
106
- * If pattern is a function it should have the following signature `(assetName: string) => boolean`
107
- * and should return true to exclude matching asset.
108
- * If multiple patterns are provided asset should match at least one of them to be excluded.
109
- * @default null
110
- */
111
- excludeAssets?: null | ExcludeAssetsPattern | ExcludeAssetsPattern[] | undefined;
112
-
113
- /**
114
- * Log level. Can be "info", "warn", "error" or "silent".
115
- * @default 'info'
116
- */
117
- logLevel?: "info" | "warn" | "error" | "silent" | undefined;
118
- }
119
-
120
- interface JsonReportItem {
121
- label: string;
122
- /** in bytes */
123
- gzipSize: number;
124
- concatenated?: boolean | undefined;
125
- /** in bytes */
126
- statSize: number;
127
- /** in bytes */
128
- parsedSize: number;
129
-
130
- groups?: JsonReportItem[] | undefined;
131
- path?: string | undefined;
132
- inaccurateSizes?: boolean | undefined;
133
- id?: number | null | undefined;
134
- isAsset?: boolean | undefined;
135
- isInitialByEntrypoint?: Record<string, boolean> | undefined;
136
- }
137
-
138
- /** The json report that will be produced if `analyzerMode: 'json'` */
139
- type JsonReport = JsonReportItem[];
140
- }
141
-
142
- declare class BundleAnalyzerPlugin implements WebpackPluginInstance {
143
- opts: BundleAnalyzerPlugin.Options;
144
- compiler?: Compiler;
145
- server: null | Server;
146
-
147
- constructor(options?: BundleAnalyzerPlugin.Options);
148
-
149
- apply(compiler: Compiler): void;
150
- /** @async */
151
- startAnalyzerServer: (stats: Stats) => Promise<void>;
152
- /** @async */
153
- generateJSONReport: (stats: Stats) => Promise<void>;
154
- generateStatsFile: (stats: Stats) => Promise<void>;
155
- /** @async */
156
- generateStaticReport: (stats: Stats) => Promise<void>;
157
- getBundleDirFromCompiler: () => null | string;
158
- }
159
-
160
- export { BundleAnalyzerPlugin };