@rsbuild/core 2.0.0-beta.7 → 2.0.0-beta.8
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/bin/rsbuild.js +13 -0
- package/compiled/connect-next/index.d.ts +56 -0
- package/compiled/{connect → connect-next}/license +1 -0
- package/compiled/connect-next/package.json +1 -0
- package/compiled/css-loader/index.js +2 -2
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/jiti/dist/babel.cjs +60 -60
- package/compiled/jiti/dist/jiti.cjs +2 -2
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rslog/index.d.ts +17 -1
- package/compiled/rslog/package.json +1 -1
- package/dist/{131.js → 958.js} +254 -357
- package/dist/chokidar.js +59 -57
- package/dist/client/hmr.js +1 -1
- package/dist/client/overlay.js +1 -1
- package/dist/connect-next.js +268 -0
- package/dist/{connect.js.LICENSE.txt → connect-next.js.LICENSE.txt} +3 -13
- package/dist/cors.js +2 -2
- package/dist/http-proxy-middleware.js +57 -552
- package/dist/index.js +1 -1
- package/dist/launch-editor-middleware.js +23 -8
- package/dist/manifest-plugin.js +18 -18
- package/dist/memfs.js +178 -717
- package/dist/{710.js → mrmime.js} +2 -1
- package/dist/open.js +35 -32
- package/dist/range-parser.js +2 -2
- package/dist/remapping.js +2 -2
- package/dist/rslib-runtime.js +3 -3
- package/dist/sirv.js +14 -14
- package/dist/src.js +510 -0
- package/dist/tinyglobby.js +25 -25
- package/dist/transformLoader.mjs +38 -1
- package/dist/transformRawLoader.mjs +1 -1
- package/dist/ws.js +1541 -0
- package/dist-types/helpers/index.d.ts +1 -1
- package/dist-types/helpers/vendors.d.ts +0 -1
- package/dist-types/server/runner/asModule.d.ts +1 -1
- package/dist-types/server/socketServer.d.ts +1 -1
- package/dist-types/types/thirdParty.d.ts +1 -1
- package/package.json +7 -8
- package/compiled/connect/index.d.ts +0 -90
- package/compiled/connect/package.json +0 -1
- package/compiled/ws/index.d.ts +0 -437
- package/compiled/ws/index.js +0 -3166
- package/compiled/ws/license +0 -20
- package/compiled/ws/package.json +0 -1
- package/dist/397.js +0 -11
- package/dist/7.js +0 -1
- package/dist/712.js +0 -15
- package/dist/743.js +0 -7
- package/dist/88.js +0 -40
- package/dist/connect.js +0 -574
- package/dist-types/helpers/color.d.ts +0 -4
- /package/dist/{131.js.LICENSE.txt → 958.js.LICENSE.txt} +0 -0
- /package/dist/client/{59.js → 797.js} +0 -0
- /package/dist/{31.js → trace-mapping.js} +0 -0
package/bin/rsbuild.js
CHANGED
|
@@ -12,7 +12,20 @@ if (enableCompileCache) {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
function checkNodeVersion() {
|
|
16
|
+
const { node, bun, deno } = process.versions;
|
|
17
|
+
if (!node || bun || deno) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (Number(node.split('.')[0]) < 20) {
|
|
21
|
+
throw new Error(
|
|
22
|
+
`Unsupported Node.js version "${node}", Rsbuild requires Node.js 20+.`,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
15
27
|
async function main() {
|
|
28
|
+
checkNodeVersion();
|
|
16
29
|
const { runCLI } = await import('../dist/index.js');
|
|
17
30
|
runCLI();
|
|
18
31
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
2
|
+
import * as http from 'node:http';
|
|
3
|
+
import { ListenOptions } from 'node:net';
|
|
4
|
+
|
|
5
|
+
/*!
|
|
6
|
+
* connect
|
|
7
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
8
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
9
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
10
|
+
* Copyright(c) 2025 Rstackjs
|
|
11
|
+
* MIT Licensed
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Public and internal Connect types.
|
|
16
|
+
*/
|
|
17
|
+
interface IncomingMessage extends http.IncomingMessage {
|
|
18
|
+
originalUrl?: http.IncomingMessage['url'] | undefined;
|
|
19
|
+
}
|
|
20
|
+
type NextFunction = (err?: any) => void;
|
|
21
|
+
type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void;
|
|
22
|
+
type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
|
|
23
|
+
type ErrorHandleFunction = (err: any, req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
|
|
24
|
+
type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
|
|
25
|
+
type ServerHandle = HandleFunction | http.Server;
|
|
26
|
+
interface ServerStackItem {
|
|
27
|
+
route: string;
|
|
28
|
+
handle: ServerHandle;
|
|
29
|
+
}
|
|
30
|
+
interface Server extends EventEmitter {
|
|
31
|
+
(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
|
|
32
|
+
route: string;
|
|
33
|
+
stack: ServerStackItem[];
|
|
34
|
+
handle(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
|
|
35
|
+
use(fn: NextHandleFunction): Server;
|
|
36
|
+
use(fn: HandleFunction): Server;
|
|
37
|
+
use(fn: http.Server): Server;
|
|
38
|
+
use(route: string, fn: NextHandleFunction): Server;
|
|
39
|
+
use(route: string, fn: HandleFunction): Server;
|
|
40
|
+
use(route: string, fn: http.Server): Server;
|
|
41
|
+
listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
|
|
42
|
+
listen(port: number, hostname?: string, callback?: Function): http.Server;
|
|
43
|
+
listen(path: string, callback?: Function): http.Server;
|
|
44
|
+
listen(options: ListenOptions, callback?: Function): http.Server;
|
|
45
|
+
listen(handle: unknown, listeningListener?: Function): http.Server;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a new connect server.
|
|
49
|
+
*
|
|
50
|
+
* @return {function}
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
declare function connect(): Server;
|
|
54
|
+
|
|
55
|
+
export { connect };
|
|
56
|
+
export type { ErrorHandleFunction, HandleFunction, IncomingMessage, NextFunction, NextHandleFunction, Server, ServerHandle, ServerStackItem, SimpleHandleFunction };
|
|
@@ -4,6 +4,7 @@ Copyright (c) 2010 Sencha Inc.
|
|
|
4
4
|
Copyright (c) 2011 LearnBoost
|
|
5
5
|
Copyright (c) 2011-2014 TJ Holowaychuk
|
|
6
6
|
Copyright (c) 2015 Douglas Christopher Wilson
|
|
7
|
+
Copyright (c) 2025 Rstackjs
|
|
7
8
|
|
|
8
9
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
9
10
|
a copy of this software and associated documentation files (the
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"connect-next","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"4.0.0","license":"MIT","types":"index.d.ts","type":"module"}
|