@rsbuild/core 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/css-loader/index.js +2 -2
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/http-proxy-middleware/index.d.ts +77 -1
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/postcss/index.js +1 -1
- package/compiled/postcss/lib/postcss.d.ts +5 -0
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/dist/753.js +116 -54
- package/dist/client/hmr.js +3 -1
- package/dist/cssUrlLoader.mjs +38 -0
- package/dist/http-proxy-middleware.js +14 -8
- package/dist/manifest-plugin.js +6 -6
- package/dist-types/configChain.d.ts +3 -0
- package/dist-types/helpers/overlayConfig.d.ts +4 -0
- package/dist-types/index.d.ts +1 -1
- package/dist-types/loader/cssUrlLoader.d.ts +9 -0
- package/dist-types/server/socketServer.d.ts +1 -1
- package/dist-types/types/config.d.ts +29 -23
- package/package.json +3 -3
- package/types.d.ts +4 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
735: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(828);
|
|
6
6
|
const compilerMap = new WeakMap();
|
|
7
7
|
class CachedChildCompilation {
|
|
8
8
|
constructor(compiler) {
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
}
|
|
312
312
|
module.exports = { CachedChildCompilation };
|
|
313
313
|
},
|
|
314
|
-
|
|
314
|
+
828: (module) => {
|
|
315
315
|
"use strict";
|
|
316
316
|
class HtmlWebpackChildCompiler {
|
|
317
317
|
constructor(templates) {
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
}
|
|
481
481
|
module.exports = { HtmlWebpackChildCompiler };
|
|
482
482
|
},
|
|
483
|
-
|
|
483
|
+
516: (module) => {
|
|
484
484
|
"use strict";
|
|
485
485
|
module.exports = {};
|
|
486
486
|
module.exports.none = (chunks) => chunks;
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
};
|
|
500
500
|
module.exports.auto = module.exports.none;
|
|
501
501
|
},
|
|
502
|
-
|
|
502
|
+
859: (module) => {
|
|
503
503
|
"use strict";
|
|
504
504
|
module.exports = function (err) {
|
|
505
505
|
return {
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
525
|
},
|
|
526
|
-
|
|
526
|
+
858: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
527
527
|
"use strict";
|
|
528
528
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(159);
|
|
529
529
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
}
|
|
550
550
|
module.exports = { getHtmlRspackPluginHooks };
|
|
551
551
|
},
|
|
552
|
-
|
|
552
|
+
511: (module) => {
|
|
553
553
|
const voidTags = [
|
|
554
554
|
"area",
|
|
555
555
|
"base",
|
|
@@ -617,19 +617,19 @@
|
|
|
617
617
|
htmlTagObjectToString,
|
|
618
618
|
};
|
|
619
619
|
},
|
|
620
|
-
|
|
620
|
+
390: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
621
621
|
"use strict";
|
|
622
622
|
const promisify = __nccwpck_require__(23).promisify;
|
|
623
623
|
const vm = __nccwpck_require__(154);
|
|
624
624
|
const fs = __nccwpck_require__(896);
|
|
625
625
|
const path = __nccwpck_require__(928);
|
|
626
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
626
|
+
const { CachedChildCompilation } = __nccwpck_require__(735);
|
|
627
627
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
628
|
-
__nccwpck_require__(
|
|
629
|
-
const prettyError = __nccwpck_require__(
|
|
630
|
-
const chunkSorter = __nccwpck_require__(
|
|
628
|
+
__nccwpck_require__(511);
|
|
629
|
+
const prettyError = __nccwpck_require__(859);
|
|
630
|
+
const chunkSorter = __nccwpck_require__(516);
|
|
631
631
|
const getHtmlRspackPluginHooks =
|
|
632
|
-
__nccwpck_require__(
|
|
632
|
+
__nccwpck_require__(858).getHtmlRspackPluginHooks;
|
|
633
633
|
const WITH_PLACEHOLDER = "function __with_placeholder__";
|
|
634
634
|
class HtmlRspackPlugin {
|
|
635
635
|
constructor(userOptions = {}) {
|
|
@@ -2398,6 +2398,6 @@
|
|
|
2398
2398
|
}
|
|
2399
2399
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
2400
2400
|
__nccwpck_require__.ab = __dirname + "/";
|
|
2401
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
2401
|
+
var __webpack_exports__ = __nccwpck_require__(390);
|
|
2402
2402
|
module.exports = __webpack_exports__;
|
|
2403
2403
|
})();
|
|
@@ -142,7 +142,7 @@ declare class ProxyServer<Req extends http__default.IncomingMessage | http2.Http
|
|
|
142
142
|
type NextFunction<T = (err?: any) => void> = T;
|
|
143
143
|
interface RequestHandler<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse, TNext = NextFunction> {
|
|
144
144
|
(req: TReq, res: TRes, next?: TNext): Promise<void>;
|
|
145
|
-
upgrade: (req:
|
|
145
|
+
upgrade: (req: TReq, socket: net.Socket, head: Buffer) => void;
|
|
146
146
|
}
|
|
147
147
|
type Filter<TReq extends http.IncomingMessage = http.IncomingMessage> = string | string[] | ((pathname: string, req: TReq) => boolean);
|
|
148
148
|
interface Plugin<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse> {
|
|
@@ -254,6 +254,82 @@ interface Options<TReq extends http.IncomingMessage = http.IncomingMessage, TRes
|
|
|
254
254
|
logger?: Logger;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Create proxy middleware for Express-like servers. ([list of servers with examples](https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/servers.md))
|
|
259
|
+
*
|
|
260
|
+
* @example Basic proxy to a single target.
|
|
261
|
+
* ```ts
|
|
262
|
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
263
|
+
*
|
|
264
|
+
* const proxy = createProxyMiddleware({
|
|
265
|
+
* target: 'http://www.example.org',
|
|
266
|
+
* changeOrigin: true,
|
|
267
|
+
* });
|
|
268
|
+
* ```
|
|
269
|
+
*
|
|
270
|
+
* @example Proxy only matching paths and rewrite the forwarded path.
|
|
271
|
+
* ```ts
|
|
272
|
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
273
|
+
*
|
|
274
|
+
* const proxy = createProxyMiddleware({
|
|
275
|
+
* target: 'http://localhost:3000',
|
|
276
|
+
* pathFilter: '/api',
|
|
277
|
+
* pathRewrite: {
|
|
278
|
+
* '^/api/': '/',
|
|
279
|
+
* },
|
|
280
|
+
* });
|
|
281
|
+
* ```
|
|
282
|
+
*
|
|
283
|
+
* @example Native path rewrite by mounting at a route (alternative to `pathRewrite`).
|
|
284
|
+
* ```ts
|
|
285
|
+
* import express from 'express';
|
|
286
|
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
287
|
+
*
|
|
288
|
+
* const app = express();
|
|
289
|
+
* app.use(
|
|
290
|
+
* '/users',
|
|
291
|
+
* createProxyMiddleware({
|
|
292
|
+
* target: 'http://jsonplaceholder.typicode.com/users',
|
|
293
|
+
* changeOrigin: true,
|
|
294
|
+
* }),
|
|
295
|
+
* );
|
|
296
|
+
* ```
|
|
297
|
+
*
|
|
298
|
+
* @example Use framework-specific request/response types (Express).
|
|
299
|
+
* ```ts
|
|
300
|
+
* import type { Request, Response } from 'express';
|
|
301
|
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
302
|
+
*
|
|
303
|
+
* const proxy = createProxyMiddleware<Request, Response>({
|
|
304
|
+
* target: 'http://www.example.org/api',
|
|
305
|
+
* changeOrigin: true,
|
|
306
|
+
* });
|
|
307
|
+
* ```
|
|
308
|
+
*
|
|
309
|
+
* @example Intercept and modify a proxied response body.
|
|
310
|
+
* ```ts
|
|
311
|
+
* import { createProxyMiddleware, responseInterceptor } from 'http-proxy-middleware';
|
|
312
|
+
*
|
|
313
|
+
* const proxy = createProxyMiddleware({
|
|
314
|
+
* target: 'http://www.example.org',
|
|
315
|
+
* selfHandleResponse: true,
|
|
316
|
+
* on: {
|
|
317
|
+
* proxyRes: responseInterceptor(async (responseBuffer) => {
|
|
318
|
+
* const response = responseBuffer.toString('utf8');
|
|
319
|
+
* return response.replace('Hello', 'Goodbye');
|
|
320
|
+
* }),
|
|
321
|
+
* },
|
|
322
|
+
* });
|
|
323
|
+
* ```
|
|
324
|
+
*
|
|
325
|
+
* @see https://github.com/chimurai/http-proxy-middleware/
|
|
326
|
+
* @see https://github.com/chimurai/http-proxy-middleware/#basic-usage
|
|
327
|
+
* @see https://github.com/chimurai/http-proxy-middleware/#intercept-and-manipulate-responses
|
|
328
|
+
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/servers.md
|
|
329
|
+
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/pathFilter.md
|
|
330
|
+
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/pathRewrite.md
|
|
331
|
+
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/response-interceptor.md
|
|
332
|
+
*/
|
|
257
333
|
declare function createProxyMiddleware<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse, TNext = NextFunction>(options: Options<TReq, TRes>): RequestHandler<TReq, TRes, TNext>;
|
|
258
334
|
|
|
259
335
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"http-proxy-middleware","author":"Steven Chim","version":"4.0.0-beta.
|
|
1
|
+
{"name":"http-proxy-middleware","author":"Steven Chim","version":"4.0.0-beta.5","license":"MIT","types":"index.d.ts","type":"module"}
|