@ohos-ports/rspack-core 2.2.9-beta.0 → 2.3.2-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.
- package/README.md +5 -6
- package/compiled/http-proxy-middleware/index.d.ts +10 -10
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/watchpack/index.js +276 -49
- package/compiled/watchpack/package.json +1 -1
- package/compiled/watchpack/types/DirectoryWatcher.d.ts +24 -0
- package/compiled/watchpack/types/index.d.ts +1 -1
- package/compiled/watchpack/types/watchEventSource.d.ts +9 -0
- package/dist/BuildInfo.d.ts +7 -0
- package/dist/Compilation.d.ts +3 -1
- package/dist/Compiler.d.ts +5 -6
- package/dist/ConcatenatedModule.d.ts +5 -1
- package/dist/ContextModule.d.ts +3 -1
- package/dist/ExternalModule.d.ts +7 -6
- package/dist/FileSystemInfo.d.ts +1 -0
- package/dist/Module.d.ts +12 -8
- package/dist/ModuleGraphConnection.d.ts +9 -3
- package/dist/NativeWatchFileSystem.d.ts +19 -7
- package/dist/NormalModule.d.ts +14 -6
- package/dist/RuntimeTemplate.d.ts +1 -0
- package/dist/Stats.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +3 -2
- package/dist/builtin-plugin/ImportedByDeferModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -0
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +2 -2
- package/dist/config/normalization.d.ts +2 -2
- package/dist/config/target.d.ts +2 -0
- package/dist/config/types.d.ts +57 -35
- package/dist/cssExtractHmr.js +1 -1
- package/dist/exports.d.ts +3 -3
- package/dist/index.js +1140 -842
- package/dist/loader-runner/codeFilter.d.ts +9 -0
- package/dist/loader-runner/dependencies.d.ts +1 -1
- package/dist/loader-runner/index.d.ts +2 -1
- package/dist/loader-runner/service.d.ts +0 -4
- package/dist/loader-runner/worker.d.ts +4 -1
- package/dist/node/NodeWatchFileSystem.d.ts +7 -4
- package/dist/sources.d.ts +3 -0
- package/dist/stats/statsFactoryUtils.d.ts +7 -0
- package/dist/util/bindingHelpers.d.ts +2 -0
- package/dist/util/createModule.d.ts +3 -0
- package/dist/util/fs.d.ts +13 -7
- package/dist/util/resolveLayerExternals.d.ts +1 -0
- package/dist/util/source.d.ts +12 -3
- package/dist/util/symbols.d.ts +10 -0
- package/dist/util/watchTimeInfo.d.ts +5 -1
- package/dist/worker.js +323 -325
- package/hot/lazy-compilation-node.js +1 -1
- package/hot/lazy-compilation-web.js +1 -1
- package/package.json +3 -3
- package/dist/loader-runner/cache.d.ts +0 -27
package/README.md
CHANGED
|
@@ -16,10 +16,9 @@ Rspack is [MIT licensed](https://github.com/web-infra-dev/rspack/blob/main/LICEN
|
|
|
16
16
|
|
|
17
17
|
## OpenHarmony port
|
|
18
18
|
|
|
19
|
-
`@ohos-ports` distribution of `@rspack/core@2.2
|
|
20
|
-
|
|
21
|
-
(`"@
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`@ohos-ports/rspack-binding-openharmony-arm64` (compiled from rspack v2.2.9
|
|
19
|
+
`@ohos-ports` distribution of `@rspack/core@2.3.2`. The bundled dist code's
|
|
20
|
+
`@rspack/binding` references are rewritten to `@ohos-ports/rspack-binding`
|
|
21
|
+
(dependency `"@ohos-ports/rspack-binding": "2.3.2-beta.0"`), whose loader
|
|
22
|
+
probes the OpenHarmony arm64 native binary slot
|
|
23
|
+
`@ohos-ports/rspack-binding-openharmony-arm64` (compiled from rspack v2.3.2
|
|
25
24
|
Rust source for `aarch64-unknown-linux-ohos`, signed).
|
|
@@ -136,7 +136,7 @@ declare class ProxyServer<Req extends http__default.IncomingMessage | http2.Http
|
|
|
136
136
|
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/6f529c6c67a447190f86bfbf894d1061e41e07b7/types/http-proxy-middleware/index.d.ts
|
|
137
137
|
*/
|
|
138
138
|
|
|
139
|
-
type NextFunction<T = (err?:
|
|
139
|
+
type NextFunction<T = (err?: unknown) => void> = T;
|
|
140
140
|
interface RequestHandler<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse, TNext = NextFunction> {
|
|
141
141
|
(req: TReq, res: TRes, next?: TNext): Promise<void>;
|
|
142
142
|
upgrade: (req: TReq, socket: net.Socket, head: Buffer) => void;
|
|
@@ -149,15 +149,15 @@ interface Plugin<TReq extends http.IncomingMessage = http.IncomingMessage, TRes
|
|
|
149
149
|
(proxyServer: ProxyServer<TReq, TRes>, options: Options<TReq, TRes>): void;
|
|
150
150
|
}
|
|
151
151
|
interface OnProxyEvent<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse> {
|
|
152
|
-
error?: (err: Error, req: TReq, res: TRes | net.Socket, target?:
|
|
152
|
+
error?: (err: Error, req: TReq, res: TRes | net.Socket, target?: ProxyTarget) => void;
|
|
153
153
|
proxyReq?: (proxyReq: http.ClientRequest, req: TReq, res: TRes, options: ProxyServerOptions) => void;
|
|
154
|
-
proxyReqWs?: (proxyReq: http.ClientRequest, req: TReq, socket: net.Socket, options: ProxyServerOptions, head:
|
|
154
|
+
proxyReqWs?: (proxyReq: http.ClientRequest, req: TReq, socket: net.Socket, options: ProxyServerOptions, head: Buffer) => void;
|
|
155
155
|
proxyRes?: (proxyRes: TReq, req: TReq, res: TRes) => void | Promise<void>;
|
|
156
156
|
open?: (proxySocket: net.Socket) => void;
|
|
157
|
-
close?: (proxyRes: TReq, proxySocket: net.Socket, proxyHead:
|
|
158
|
-
start?: (req: TReq, res: TRes, target:
|
|
157
|
+
close?: (proxyRes: TReq, proxySocket: net.Socket, proxyHead: Buffer) => void;
|
|
158
|
+
start?: (req: TReq, res: TRes, target: ProxyTarget) => void;
|
|
159
159
|
end?: (req: TReq, res: TRes, proxyRes: TReq) => void;
|
|
160
|
-
econnreset?: (err: Error, req: TReq, res: TRes, target:
|
|
160
|
+
econnreset?: (err: Error, req: TReq, res: TRes, target: ProxyTarget) => void;
|
|
161
161
|
}
|
|
162
162
|
type Logger = Pick<Console, 'info' | 'warn' | 'error'>;
|
|
163
163
|
type PathRewriteConfig<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse> = {
|
|
@@ -254,7 +254,7 @@ interface Options<TReq extends http.IncomingMessage = http.IncomingMessage, TRes
|
|
|
254
254
|
*
|
|
255
255
|
* @link https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/router.md
|
|
256
256
|
*/
|
|
257
|
-
router?: Record<string,
|
|
257
|
+
router?: Record<string, ProxyTarget> | ((req: TReq, res: TRes | undefined, options: Options<TReq, TRes>) => ProxyTarget) | ((req: TReq, res: TRes | undefined, options: Options<TReq, TRes>) => Promise<ProxyTarget>);
|
|
258
258
|
/**
|
|
259
259
|
* Log information from http-proxy-middleware
|
|
260
260
|
* @example
|
|
@@ -345,7 +345,7 @@ interface Options<TReq extends http.IncomingMessage = http.IncomingMessage, TRes
|
|
|
345
345
|
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/pathRewrite.md
|
|
346
346
|
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/response-interceptor.md
|
|
347
347
|
*/
|
|
348
|
-
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>;
|
|
348
|
+
declare function createProxyMiddleware<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse, TNext extends (err?: unknown) => void = NextFunction>(options: Options<TReq, TRes>): RequestHandler<TReq, TRes, TNext>;
|
|
349
349
|
|
|
350
350
|
type Interceptor<TReq = http.IncomingMessage, TRes = http.ServerResponse> = (buffer: Buffer, proxyRes: http.IncomingMessage, req: TReq, res: TRes) => Promise<Buffer | string>;
|
|
351
351
|
/**
|
|
@@ -373,8 +373,8 @@ type Interceptor<TReq = http.IncomingMessage, TRes = http.ServerResponse> = (buf
|
|
|
373
373
|
*/
|
|
374
374
|
declare function responseInterceptor<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse>(interceptor: Interceptor<TReq, TRes>): (proxyRes: http.IncomingMessage, req: TReq, res: TRes) => Promise<void>;
|
|
375
375
|
|
|
376
|
-
type BodyParserLikeRequest = http.IncomingMessage & {
|
|
377
|
-
body?:
|
|
376
|
+
type BodyParserLikeRequest<TBody = unknown> = http.IncomingMessage & {
|
|
377
|
+
body?: TBody;
|
|
378
378
|
};
|
|
379
379
|
/**
|
|
380
380
|
* Fix proxied body if bodyParser is involved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"http-proxy-middleware","author":"Steven Chim","version":"4.2.
|
|
1
|
+
{"name":"http-proxy-middleware","author":"Steven Chim","version":"4.2.1","license":"MIT","types":"index.d.ts","type":"module"}
|