@rspack/dev-server 2.0.0-beta.6 → 2.0.0-rc.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 CHANGED
@@ -107,9 +107,9 @@ server.startCallback(() => {
107
107
 
108
108
  ## Credits
109
109
 
110
- This plugin is forked from [webpack-dev-server](https://github.com/webpack/webpack-dev-server), and is used to smooth out some differences between rspack and webpack, while also providing rspack-specific new features.
110
+ This repository is forked from [webpack-dev-server](https://github.com/webpack/webpack-dev-server). It adapts the original implementation for the Rspack ecosystem, bridging behavioral differences with webpack while adding Rspack-specific capabilities.
111
111
 
112
- > Thanks to the [webpack-dev-server](https://github.com/webpack/webpack-dev-server) project created by [@sokra](https://github.com/sokra)
112
+ > Thanks to the [webpack-dev-server](https://github.com/webpack/webpack-dev-server) maintainers and its original creator, [@sokra](https://github.com/sokra).
113
113
 
114
114
  ## License
115
115
 
@@ -31,12 +31,15 @@ type CreateOverlayOptions = {
31
31
  /** Runtime error catcher. If boolean, enables/disables catching. If function, handles the error. */
32
32
  catchRuntimeError?: boolean | ((error: Error) => void);
33
33
  };
34
+ type OverlayTrustedTypePolicy = {
35
+ createHTML: (value: string) => string;
36
+ };
34
37
  declare global {
35
38
  interface Window {
36
39
  trustedTypes?: {
37
40
  createPolicy: (name: string, policy: {
38
41
  createHTML: (value: string) => string;
39
- }) => TrustedTypePolicy;
42
+ }) => OverlayTrustedTypePolicy;
40
43
  };
41
44
  }
42
45
  }
@@ -1,11 +1,7 @@
1
- import * as __rspack_external_child_process from "child_process";
2
- import * as __rspack_external_fs from "fs";
3
- import * as __rspack_external_os from "os";
4
- import * as __rspack_external_path from "path";
5
- import * as __rspack_external_url from "url";
6
- import { __webpack_require__ } from "./rslib-runtime.js";
1
+ import { __webpack_require__ } from "./831.js";
2
+ import "./831.js";
7
3
  __webpack_require__.add({
8
- "./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/editor-info/linux.js" (module) {
4
+ "./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/linux.js" (module) {
9
5
  module.exports = {
10
6
  atom: 'atom',
11
7
  Brackets: 'brackets',
@@ -37,7 +33,7 @@ __webpack_require__.add({
37
33
  zed: 'zed'
38
34
  };
39
35
  },
40
- "./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/editor-info/macos.js" (module) {
36
+ "./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/macos.js" (module) {
41
37
  module.exports = {
42
38
  '/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
43
39
  '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
@@ -46,6 +42,7 @@ __webpack_require__.add({
46
42
  '/Applications/Sublime Text.app/Contents/MacOS/sublime_text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
47
43
  '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
48
44
  '/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl',
45
+ '/Applications/Visual Studio Code.app/Contents/MacOS/Code': 'code',
49
46
  '/Applications/Visual Studio Code.app/Contents/MacOS/Electron': 'code',
50
47
  '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders': 'code-insiders',
51
48
  '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron': 'code-insiders',
@@ -69,7 +66,7 @@ __webpack_require__.add({
69
66
  '/Applications/Zed.app/Contents/MacOS/zed': 'zed'
70
67
  };
71
68
  },
72
- "./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/editor-info/windows.js" (module) {
69
+ "./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/windows.js" (module) {
73
70
  module.exports = [
74
71
  'Brackets.exe',
75
72
  'Code.exe',
@@ -95,12 +92,12 @@ __webpack_require__.add({
95
92
  'goland64.exe',
96
93
  'rider.exe',
97
94
  'rider64.exe',
98
- 'trae.exe',
95
+ 'Trae.exe',
99
96
  'zed.exe',
100
97
  'Antigravity.exe'
101
98
  ];
102
99
  },
103
- "./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/get-args.js" (module, __unused_rspack_exports, __webpack_require__) {
100
+ "./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/get-args.js" (module, __unused_rspack_exports, __webpack_require__) {
104
101
  const path = __webpack_require__("path");
105
102
  module.exports = function(editor, fileName, lineNumber, columnNumber = 1) {
106
103
  const editorBasename = path.basename(editor).replace(/\.(exe|cmd|bat)$/i, '');
@@ -199,13 +196,13 @@ __webpack_require__.add({
199
196
  ];
200
197
  };
201
198
  },
202
- "./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/guess.js" (module, __unused_rspack_exports, __webpack_require__) {
199
+ "./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/guess.js" (module, __unused_rspack_exports, __webpack_require__) {
203
200
  const path = __webpack_require__("path");
204
201
  const shellQuote = __webpack_require__("./node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/index.js");
205
202
  const childProcess = __webpack_require__("child_process");
206
- const COMMON_EDITORS_MACOS = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/editor-info/macos.js");
207
- const COMMON_EDITORS_LINUX = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/editor-info/linux.js");
208
- const COMMON_EDITORS_WIN = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/editor-info/windows.js");
203
+ const COMMON_EDITORS_MACOS = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/macos.js");
204
+ const COMMON_EDITORS_LINUX = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/linux.js");
205
+ const COMMON_EDITORS_WIN = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/windows.js");
209
206
  module.exports = function(specifiedEditor) {
210
207
  if (specifiedEditor) return shellQuote.parse(specifiedEditor);
211
208
  if (process.env.LAUNCH_EDITOR) return [
@@ -285,14 +282,14 @@ __webpack_require__.add({
285
282
  ];
286
283
  };
287
284
  },
288
- "./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/index.js" (module, __unused_rspack_exports, __webpack_require__) {
285
+ "./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/index.js" (module, __unused_rspack_exports, __webpack_require__) {
289
286
  const fs = __webpack_require__("fs");
290
287
  const os = __webpack_require__("os");
291
288
  const path = __webpack_require__("path");
292
289
  const colors = __webpack_require__("./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
293
290
  const childProcess = __webpack_require__("child_process");
294
- const guessEditor = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/guess.js");
295
- const getArgumentsForPosition = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/get-args.js");
291
+ const guessEditor = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/guess.js");
292
+ const getArgumentsForPosition = __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/get-args.js");
296
293
  function wrapErrorCallback(cb) {
297
294
  return (fileName, errorMessage)=>{
298
295
  console.log();
@@ -445,7 +442,7 @@ __webpack_require__.add({
445
442
  module.exports.createColors = createColors;
446
443
  },
447
444
  "./node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/index.js" (__unused_rspack_module, exports, __webpack_require__) {
448
- __webpack_require__("./node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js");
445
+ exports.quote = __webpack_require__("./node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js");
449
446
  exports.parse = __webpack_require__("./node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/parse.js");
450
447
  },
451
448
  "./node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/parse.js" (module) {
@@ -599,21 +596,6 @@ __webpack_require__.add({
599
596
  return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2');
600
597
  }).join(' ');
601
598
  };
602
- },
603
- child_process (module) {
604
- module.exports = __rspack_external_child_process;
605
- },
606
- fs (module) {
607
- module.exports = __rspack_external_fs;
608
- },
609
- os (module) {
610
- module.exports = __rspack_external_os;
611
- },
612
- path (module) {
613
- module.exports = __rspack_external_path;
614
- },
615
- url (module) {
616
- module.exports = __rspack_external_url;
617
599
  }
618
600
  });
619
- __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/index.js");
601
+ __webpack_require__("./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/index.js");