@lark-apaas/fullstack-rspack-preset 1.0.12-alpha.patch.1 → 1.0.12-alpha.patch.2

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/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-rspack-preset",
3
- "version": "1.0.12-alpha.patch.1",
3
+ "version": "1.0.12-alpha.patch.2",
4
4
  "files": [
5
5
  "lib",
6
+ "patches",
7
+ "scripts",
6
8
  "preset.config.js"
7
9
  ],
8
10
  "main": "./lib/index.js",
@@ -0,0 +1,12 @@
1
+ diff --git a/node_modules/webpack-dev-server/client/socket.js b/node_modules/webpack-dev-server/client/socket.js
2
+ index 7dac5b6..904097b 100644
3
+ --- a/node_modules/webpack-dev-server/client/socket.js
4
+ +++ b/node_modules/webpack-dev-server/client/socket.js
5
+ @@ -31,6 +31,7 @@ var socket = function initSocket(url, handlers, reconnect) {
6
+ if (timeout) {
7
+ clearTimeout(timeout);
8
+ }
9
+ + log.info("Socket connected");
10
+ if (typeof reconnect !== "undefined") {
11
+ maxRetries = reconnect;
12
+ }
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ import { execSync } from "child_process";
3
+ import path from "path";
4
+ import { fileURLToPath } from "url";
5
+
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const sdkRoot = path.resolve(__dirname, "..");
8
+ const hostRoot = path.resolve(sdkRoot, "../../.."); // npm、yarn 场景下,安装在 node_modules/@lark-apaas/nestjs-datapaas
9
+
10
+ console.log(`[patch] Applying webpack-dev-server patch at host: ${hostRoot}`);
11
+
12
+ try {
13
+ execSync(
14
+ "npx patch-package --patch-dir node_modules/@lark-apaas/fullstack-rspack-preset/patches",
15
+ { stdio: "inherit", cwd: hostRoot }
16
+ );
17
+ console.log("[patch] webpack-dev-server patched ✅");
18
+ } catch (err) {
19
+ console.error("[patch] Failed to apply webpack-dev-server patch ❌", err);
20
+ process.exit(1);
21
+ }