xshell 1.3.66 → 1.3.68

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/apps.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import util from 'node:util';
2
2
  import { call_nodejs, platform, username } from './process.js';
3
3
  export let npm = {
4
- bin: platform == 'win32' ? `C:/Users/${username}/AppData/Roaming/npm/node_modules/pnpm/bin/pnpm.cjs` : '/usr/bin/pnpm',
4
+ bin: platform == 'win32' ? `C:/Users/${username}/AppData/Roaming/npm/node_modules/pnpm/bin/pnpm.mjs` : '/usr/bin/pnpm',
5
5
  async call(cwd, bin, args, options) {
6
6
  return call_nodejs(bin, args, { cwd, ...options });
7
7
  },
package/net.common.d.ts CHANGED
@@ -204,8 +204,10 @@ export declare class Remote {
204
204
  使用 Uint8Array 作为参数更灵活 https://stackoverflow.com/a/74505197/7609214
205
205
  这个方法一般不会抛出错误,也不需要 await,一般在 websocket on_message 时使用 */
206
206
  handle(data: Uint8Array): Promise<void>;
207
+ /** 向对端 remote 中的 func 推送数据,没有期望任何返回信息 */
208
+ push(func: string, data?: any): Promise<void>;
207
209
  /** 调用对端 remote 中的 func, 只适用于最简单的一元 rpc (请求, 响应) */
208
- call<TReturn = any>(func: string, args?: any): Promise<TReturn>;
210
+ call<TReturn = any>(func: string, data?: any): Promise<TReturn>;
209
211
  /** 调用对端 remote 中的 func, 开始订阅并接收连续的消息 (订阅流)
210
212
  - func: 订阅处理函数
211
213
  - on_data: 接收开始订阅后的数据
package/net.common.js CHANGED
@@ -509,8 +509,12 @@ export class Remote {
509
509
  catch { }
510
510
  }
511
511
  }
512
+ /** 向对端 remote 中的 func 推送数据,没有期望任何返回信息 */
513
+ async push(func, data) {
514
+ await this.send({ func, data });
515
+ }
512
516
  /** 调用对端 remote 中的 func, 只适用于最简单的一元 rpc (请求, 响应) */
513
- async call(func, args) {
517
+ async call(func, data) {
514
518
  let promise = defer();
515
519
  const id = genid();
516
520
  this.handlers.set(id, ({ error, data }) => {
@@ -520,7 +524,7 @@ export class Remote {
520
524
  promise.resolve(data);
521
525
  this.handlers.delete(id);
522
526
  });
523
- await this.send({ id, func, data: args }); // 不需要 done: true, 因为对面的 remote.handlers 中不会有这个 id 的 handler
527
+ await this.send({ id, func, data }); // 不需要 done: true, 因为对面的 remote.handlers 中不会有这个 id 的 handler
524
528
  return promise;
525
529
  }
526
530
  /** 调用对端 remote 中的 func, 开始订阅并接收连续的消息 (订阅流)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.3.66",
3
+ "version": "1.3.68",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -55,15 +55,15 @@
55
55
  "@stylistic/eslint-plugin": "^5.10.0",
56
56
  "@svgr/webpack": "^8.1.0",
57
57
  "@types/sass-loader": "^8.0.10",
58
- "@typescript-eslint/eslint-plugin": "^8.59.2",
59
- "@typescript-eslint/parser": "^8.59.2",
60
- "@typescript-eslint/utils": "^8.59.2",
58
+ "@typescript-eslint/eslint-plugin": "^8.59.3",
59
+ "@typescript-eslint/parser": "^8.59.3",
60
+ "@typescript-eslint/utils": "^8.59.3",
61
61
  "archiver": "^8.0.0",
62
62
  "chalk": "^5.6.2",
63
63
  "commander": "^14.0.3",
64
64
  "css-loader": "^7.1.4",
65
65
  "emoji-regex": "^10.6.0",
66
- "eslint": "^10.3.0",
66
+ "eslint": "^10.4.0",
67
67
  "eslint-plugin-react": "^7.37.5",
68
68
  "https-proxy-agent": "^9.0.0",
69
69
  "i18next": "25.8.1",
@@ -74,7 +74,7 @@
74
74
  "mime-types": "^3.0.2",
75
75
  "p-map": "^7.0.4",
76
76
  "react": "^19.2.6",
77
- "react-i18next": "^17.0.7",
77
+ "react-i18next": "^17.0.8",
78
78
  "resolve-path": "^1.4.0",
79
79
  "sass": "^1.99.0",
80
80
  "sass-loader": "^16.0.8",
@@ -85,10 +85,10 @@
85
85
  "ts-loader": "^9.5.7",
86
86
  "tslib": "^2.8.1",
87
87
  "typescript": "^6.0.3",
88
- "undici": "^8.2.0",
88
+ "undici": "^8.3.0",
89
89
  "webpack": "^5.106.2",
90
90
  "webpack-bundle-analyzer": "^5.3.0",
91
- "ws": "^8.20.0"
91
+ "ws": "^8.20.1"
92
92
  },
93
93
  "devDependencies": {
94
94
  "@babel/types": "^7.29.0",
@@ -99,10 +99,10 @@
99
99
  "@types/koa": "^3.0.2",
100
100
  "@types/koa-compress": "^4.0.7",
101
101
  "@types/mime-types": "^3.0.1",
102
- "@types/node": "^25.6.2",
102
+ "@types/node": "^25.8.0",
103
103
  "@types/react": "^19.2.14",
104
104
  "@types/tough-cookie": "^4.0.5",
105
- "@types/vscode": "^1.118.0",
105
+ "@types/vscode": "^1.120.0",
106
106
  "@types/webpack-bundle-analyzer": "^4.7.0",
107
107
  "@types/ws": "^8.18.1"
108
108
  }