1
0
Эх сурвалжийг харах

chore(subprocess-local): bump node-pty beta

_Kerman 1 сар өмнө
parent
commit
078dd2b6df

+ 1 - 1
packages/subprocess/subprocess-local/package.json

@@ -42,7 +42,7 @@
     "@deepseek-ai/cordis": "workspace:^"
   },
   "dependencies": {
-    "node-pty": "^1.1.0"
+    "node-pty": "1.2.0-beta.15"
   },
   "devDependencies": {
     "@deepseek-ai/dsh-invariants": "workspace:^",

+ 0 - 62
patches/node-pty@1.1.0.patch

@@ -1,62 +0,0 @@
-diff --git a/lib/unixTerminal.js b/lib/unixTerminal.js
-index 1ec12f796a822c78fba9ad7f6448c3987e325c23..5cd6b7d635f4752be5a6c5ff9cf9edf988cf94c5 100644
---- a/lib/unixTerminal.js
-+++ b/lib/unixTerminal.js
-@@ -26,10 +26,23 @@ var terminal_1 = require("./terminal");
- var utils_1 = require("./utils");
- var native = utils_1.loadNativeModule('pty');
- var pty = native.module;
--var helperPath = native.dir + '/spawn-helper';
--helperPath = path.resolve(__dirname, helperPath);
--helperPath = helperPath.replace('app.asar', 'app.asar.unpacked');
--helperPath = helperPath.replace('node_modules.asar', 'node_modules.asar.unpacked');
-+// A current external embedded-runtime consumer supplies a non-sibling helper.
-+var helperPath = process.env.DSH_NODE_PTY_SPAWN_HELPER;
-+if (helperPath) {
-+    helperPath = path.resolve(helperPath);
-+}
-+else {
-+    var executableSibling = process.execPath + '-spawn-helper';
-+    if (fs.existsSync(executableSibling)) {
-+        helperPath = executableSibling;
-+    }
-+    else {
-+        helperPath = native.dir + '/spawn-helper';
-+        helperPath = path.resolve(__dirname, helperPath);
-+        helperPath = helperPath.replace('app.asar', 'app.asar.unpacked');
-+        helperPath = helperPath.replace('node_modules.asar', 'node_modules.asar.unpacked');
-+    }
-+}
- var DEFAULT_FILE = 'sh';
- var DEFAULT_NAME = 'xterm';
- var DESTROY_SOCKET_TIMEOUT_MS = 200;
-diff --git a/src/unixTerminal.ts b/src/unixTerminal.ts
-index 98733dc0cd752b554bd94e45904ca341ad141bba..fa234291206617ae5a6d8605abf9771220392d17 100644
---- a/src/unixTerminal.ts
-+++ b/src/unixTerminal.ts
-@@ -14,10 +14,21 @@ import { assign, loadNativeModule } from './utils';
-
- const native = loadNativeModule('pty');
- const pty: IUnixNative = native.module;
--let helperPath = native.dir + '/spawn-helper';
--helperPath = path.resolve(__dirname, helperPath);
--helperPath = helperPath.replace('app.asar', 'app.asar.unpacked');
--helperPath = helperPath.replace('node_modules.asar', 'node_modules.asar.unpacked');
-+// A current external embedded-runtime consumer supplies a non-sibling helper.
-+let helperPath = process.env.DSH_NODE_PTY_SPAWN_HELPER;
-+if (helperPath) {
-+  helperPath = path.resolve(helperPath);
-+} else {
-+  const executableSibling = process.execPath + '-spawn-helper';
-+  if (fs.existsSync(executableSibling)) {
-+    helperPath = executableSibling;
-+  } else {
-+    helperPath = native.dir + '/spawn-helper';
-+    helperPath = path.resolve(__dirname, helperPath);
-+    helperPath = helperPath.replace('app.asar', 'app.asar.unpacked');
-+    helperPath = helperPath.replace('node_modules.asar', 'node_modules.asar.unpacked');
-+  }
-+}
-
- const DEFAULT_FILE = 'sh';
- const DEFAULT_NAME = 'xterm';

+ 32 - 0
patches/node-pty@1.2.0-beta.15.patch

@@ -0,0 +1,32 @@
+diff --git a/lib/unixTerminal.js b/lib/unixTerminal.js
+index 6966d24..18f1d25 100644
+--- a/lib/unixTerminal.js
++++ b/lib/unixTerminal.js
+@@ -28,10 +28,23 @@ var terminal_1 = require("./terminal");
+ var utils_1 = require("./utils");
+ var native = (0, utils_1.loadNativeModule)('pty');
+ var pty = native.module;
+-var helperPath = native.dir + '/spawn-helper';
+-helperPath = path.resolve(__dirname, helperPath);
+-helperPath = helperPath.replace('app.asar', 'app.asar.unpacked');
+-helperPath = helperPath.replace('node_modules.asar', 'node_modules.asar.unpacked');
++// A current external embedded-runtime consumer supplies a non-sibling helper.
++var helperPath = process.env.DSH_NODE_PTY_SPAWN_HELPER;
++if (helperPath) {
++    helperPath = path.resolve(helperPath);
++}
++else {
++    var executableSibling = process.execPath + '-spawn-helper';
++    if (fs.existsSync(executableSibling)) {
++        helperPath = executableSibling;
++    }
++    else {
++        helperPath = native.dir + '/spawn-helper';
++        helperPath = path.resolve(__dirname, helperPath);
++        helperPath = helperPath.replace('app.asar', 'app.asar.unpacked');
++        helperPath = helperPath.replace('node_modules.asar', 'node_modules.asar.unpacked');
++    }
++}
+ var DEFAULT_FILE = 'sh';
+ var DEFAULT_NAME = 'xterm';
+ var DESTROY_SOCKET_TIMEOUT_MS = 200;

+ 6 - 6
pnpm-lock.yaml

@@ -9,7 +9,7 @@ overrides:
   '@deepseek-ai/schemastery': link:vendor/schemastery
 
 patchedDependencies:
-  node-pty@1.1.0: 7a0c04f1f49d798a9ffe2f7f414c01064a44ca2489772d0c3e1235ab336755e6
+  node-pty@1.2.0-beta.15: b40ae545608897914bd25fb009c97eeac478c34e8a910298ddcb01b746534bb0
 
 importers:
 
@@ -7493,8 +7493,8 @@ importers:
   packages/subprocess/subprocess-local:
     dependencies:
       node-pty:
-        specifier: ^1.1.0
-        version: 1.1.0(patch_hash=7a0c04f1f49d798a9ffe2f7f414c01064a44ca2489772d0c3e1235ab336755e6)
+        specifier: 1.2.0-beta.15
+        version: 1.2.0-beta.15(patch_hash=b40ae545608897914bd25fb009c97eeac478c34e8a910298ddcb01b746534bb0)
     devDependencies:
       '@deepseek-ai/cordis':
         specifier: workspace:^
@@ -13164,8 +13164,8 @@ packages:
     resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==}
     engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
 
-  node-pty@1.1.0:
-    resolution: {integrity: sha512-20JqtutY6JPXTUnL0ij1uad7Qe1baT46lyolh2sSENDd4sTzKZ4nmAFkeAARDKwmlLjPx6XKRlwRUxwjOy+lUg==}
+  node-pty@1.2.0-beta.15:
+    resolution: {integrity: sha512-vORSzHXi4Ofl7HemVWpuudLqCPdaQb4LfpRCUpE5HPxhp4JYscl8zZwxh11p26v2wvW24WMwnMfLjhRLixrfxA==}
 
   node-releases@2.0.51:
     resolution: {integrity: sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==}
@@ -18588,7 +18588,7 @@ snapshots:
       fetch-blob: 3.2.0
       formdata-polyfill: 4.0.10
 
-  node-pty@1.1.0(patch_hash=7a0c04f1f49d798a9ffe2f7f414c01064a44ca2489772d0c3e1235ab336755e6):
+  node-pty@1.2.0-beta.15(patch_hash=b40ae545608897914bd25fb009c97eeac478c34e8a910298ddcb01b746534bb0):
     dependencies:
       node-addon-api: 7.1.1
 

+ 1 - 1
pnpm-workspace.yaml

@@ -69,4 +69,4 @@ minimumReleaseAgeExclude:
   - node-addon-require-builtin@0.1.4
 
 patchedDependencies:
-  node-pty@1.1.0: patches/node-pty@1.1.0.patch
+  node-pty@1.2.0-beta.15: patches/node-pty@1.2.0-beta.15.patch