@rsbuild/core 2.0.0-beta.7 → 2.0.0-beta.9

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 (59) hide show
  1. package/compiled/connect-next/index.d.ts +56 -0
  2. package/compiled/{connect → connect-next}/license +1 -0
  3. package/compiled/connect-next/package.json +1 -0
  4. package/compiled/css-loader/index.js +2 -2
  5. package/compiled/html-rspack-plugin/index.js +14 -14
  6. package/compiled/jiti/dist/babel.cjs +60 -60
  7. package/compiled/jiti/dist/jiti.cjs +2 -2
  8. package/compiled/postcss-loader/index.js +6 -6
  9. package/compiled/rslog/index.d.ts +17 -1
  10. package/compiled/rslog/package.json +1 -1
  11. package/compiled/rspack-chain/package.json +1 -1
  12. package/compiled/rspack-chain/types/index.d.ts +0 -3
  13. package/compiled/style-loader/index.js +10 -10
  14. package/dist/{131.js → 958.js} +258 -361
  15. package/dist/chokidar.js +59 -57
  16. package/dist/client/hmr.js +1 -1
  17. package/dist/client/overlay.js +1 -1
  18. package/dist/connect-next.js +268 -0
  19. package/dist/{connect.js.LICENSE.txt → connect-next.js.LICENSE.txt} +3 -13
  20. package/dist/cors.js +2 -2
  21. package/dist/http-proxy-middleware.js +57 -552
  22. package/dist/index.js +1 -1
  23. package/dist/launch-editor-middleware.js +23 -8
  24. package/dist/manifest-plugin.js +18 -18
  25. package/dist/memfs.js +178 -717
  26. package/dist/{710.js → mrmime.js} +2 -1
  27. package/dist/open.js +35 -32
  28. package/dist/range-parser.js +2 -2
  29. package/dist/remapping.js +2 -2
  30. package/dist/rslib-runtime.js +3 -3
  31. package/dist/sirv.js +14 -14
  32. package/dist/src.js +510 -0
  33. package/dist/tinyglobby.js +25 -25
  34. package/dist/transformLoader.mjs +38 -1
  35. package/dist/transformRawLoader.mjs +1 -1
  36. package/dist/ws.js +1541 -0
  37. package/dist-types/helpers/index.d.ts +1 -1
  38. package/dist-types/helpers/vendors.d.ts +0 -1
  39. package/dist-types/server/runner/asModule.d.ts +1 -1
  40. package/dist-types/server/socketServer.d.ts +1 -1
  41. package/dist-types/types/config.d.ts +3 -2
  42. package/dist-types/types/thirdParty.d.ts +1 -1
  43. package/package.json +9 -10
  44. package/compiled/connect/index.d.ts +0 -90
  45. package/compiled/connect/package.json +0 -1
  46. package/compiled/ws/index.d.ts +0 -437
  47. package/compiled/ws/index.js +0 -3166
  48. package/compiled/ws/license +0 -20
  49. package/compiled/ws/package.json +0 -1
  50. package/dist/397.js +0 -11
  51. package/dist/7.js +0 -1
  52. package/dist/712.js +0 -15
  53. package/dist/743.js +0 -7
  54. package/dist/88.js +0 -40
  55. package/dist/connect.js +0 -574
  56. package/dist-types/helpers/color.d.ts +0 -4
  57. /package/dist/{131.js.LICENSE.txt → 958.js.LICENSE.txt} +0 -0
  58. /package/dist/client/{59.js → 797.js} +0 -0
  59. /package/dist/{31.js → trace-mapping.js} +0 -0
@@ -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"}