xshell 1.3.9 → 1.3.10

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/builder.js CHANGED
@@ -79,18 +79,6 @@ const dependencies = {
79
79
  assets: {
80
80
  productions: ['monaco-editor/min/vs/'],
81
81
  devs: ['monaco-editor/dev/vs/']
82
- },
83
- maps: {
84
- productions: [
85
- 'monaco-editor/min-maps/vs/base/worker/workerMain.js.map',
86
- 'monaco-editor/min-maps/vs/editor/editor.main.js.map',
87
- 'monaco-editor/min-maps/vs/loader.js.map',
88
- 'monaco-editor/min-maps/nls.messages.zh-cn.js.map',
89
- ],
90
- devs: [
91
- 'monaco-editor/dev/vs/base/worker/workerMain.js.map',
92
- 'monaco-editor/dev/vs/editor/editor.main.js.map',
93
- ],
94
82
  }
95
83
  },
96
84
  echarts: {
package/file.d.ts CHANGED
@@ -207,13 +207,13 @@ export interface FMkdirOptions {
207
207
  - print?: `true` */
208
208
  export declare function fmkdir(fpd: string, { print }?: FMkdirOptions): Promise<string>;
209
209
  /** 创建软链接
210
- - fp_real: 现在真实文件/文件夹的路径
211
- - fp_link: 目标链接文件/文件夹的路径
210
+ - fp_link: 创建的链接的路径
211
+ - fp_real: 真实目标文件/文件夹的路径
212
212
  - options?:
213
213
  - skip_existing?: `false` 忽略已存在的同名的文件,文件夹
214
214
  - print?: `true`
215
215
  - junction? */
216
- export declare function flink(fp_real: string, fp_link: string, { skip_existing, print, junction }?: {
216
+ export declare function flink(fp_link: string, fp_real: string, { skip_existing, print, junction }?: {
217
217
  skip_existing?: boolean;
218
218
  print?: boolean;
219
219
  junction?: boolean;
package/file.js CHANGED
@@ -455,13 +455,13 @@ export async function fmkdir(fpd, { print = true } = {}) {
455
455
  return fpd_;
456
456
  }
457
457
  /** 创建软链接
458
- - fp_real: 现在真实文件/文件夹的路径
459
- - fp_link: 目标链接文件/文件夹的路径
458
+ - fp_link: 创建的链接的路径
459
+ - fp_real: 真实目标文件/文件夹的路径
460
460
  - options?:
461
461
  - skip_existing?: `false` 忽略已存在的同名的文件,文件夹
462
462
  - print?: `true`
463
463
  - junction? */
464
- export async function flink(fp_real, fp_link, { skip_existing = false, print = true, junction = false } = {}) {
464
+ export async function flink(fp_link, fp_real, { skip_existing = false, print = true, junction = false } = {}) {
465
465
  check(path.isAbsolute(fp_real) && path.isAbsolute(fp_link), 'fp 必须是绝对路径');
466
466
  const is_fpd_real = fp_real.isdir;
467
467
  const is_fpd_link = fp_link.isdir;
@@ -475,7 +475,7 @@ export async function flink(fp_real, fp_link, { skip_existing = false, print = t
475
475
  return;
476
476
  }
477
477
  if (print)
478
- log_action('已将源文件', fp_real, fp_link, '链接到');
478
+ log_action('创建链接', fp_link, fp_real);
479
479
  if (junction)
480
480
  await fsp.symlink(fp_real, fp_link, 'junction');
481
481
  else
package/net.js CHANGED
@@ -308,8 +308,11 @@ export async function request_json(url, options) {
308
308
  export function connect(hostname, port, { local_port, timeout: _timeout = 2000, on_timeout, keep_alive_duration, print = { error: true, connect: false } } = {}) {
309
309
  let pconnected = defer2();
310
310
  let timeouted = false;
311
- function get_message(message) {
312
- return `${nowstr()} tcp://${hostname}:${port} ${message}`;
311
+ function get_log_message(message) {
312
+ return `${nowstr()} ${get_error_message(message)}`;
313
+ }
314
+ function get_error_message(message) {
315
+ return `tcp://${hostname}:${port} ${message}`;
313
316
  }
314
317
  let socket = net.connect({
315
318
  host: hostname,
@@ -321,14 +324,14 @@ export function connect(hostname, port, { local_port, timeout: _timeout = 2000,
321
324
  }, () => {
322
325
  if (pconnected.settled) {
323
326
  if (print)
324
- console.warn(get_message('连接建立了,但是已超时'.yellow));
327
+ console.warn(get_log_message('连接建立了,但是已超时'.yellow));
325
328
  socket.resetAndDestroy();
326
329
  }
327
330
  else {
328
331
  clearTimeout(timeout);
329
332
  socket.off('error', on_error);
330
333
  if (print.connect)
331
- console.log(get_message('已连接'));
334
+ console.log(get_log_message('已连接'));
332
335
  pconnected.resolve(socket);
333
336
  }
334
337
  });
@@ -339,11 +342,11 @@ export function connect(hostname, port, { local_port, timeout: _timeout = 2000,
339
342
  return;
340
343
  // 待观察:不太可能走到这里
341
344
  if (print.error)
342
- console.error(get_message(error.message.red));
345
+ console.error(get_log_message(error.message.red));
343
346
  }
344
347
  else {
345
348
  clearTimeout(timeout);
346
- pconnected.reject(set_error_message(error, get_message(error.message)));
349
+ pconnected.reject(set_error_message(error, get_error_message(error.message)));
347
350
  }
348
351
  };
349
352
  socket.once('error', on_error);
@@ -354,14 +357,14 @@ export function connect(hostname, port, { local_port, timeout: _timeout = 2000,
354
357
  if (typeof on_timeout === 'function') {
355
358
  pconnected.resolve(null);
356
359
  try {
357
- await on_timeout(new TimeoutError(get_message('超时了')));
360
+ await on_timeout(new TimeoutError(get_error_message('超时了')));
358
361
  }
359
362
  catch (error) {
360
363
  pconnected.reject(error);
361
364
  }
362
365
  }
363
366
  else
364
- pconnected.reject(new TimeoutError(on_timeout || get_message('超时了')));
367
+ pconnected.reject(new TimeoutError(on_timeout || get_error_message('超时了')));
365
368
  }, _timeout);
366
369
  return pconnected;
367
370
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.3.9",
3
+ "version": "1.3.10",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -56,9 +56,9 @@
56
56
  "@stylistic/eslint-plugin": "^5.6.1",
57
57
  "@svgr/webpack": "^8.1.0",
58
58
  "@types/sass-loader": "^8.0.10",
59
- "@typescript-eslint/eslint-plugin": "^8.47.0",
60
- "@typescript-eslint/parser": "^8.47.0",
61
- "@typescript-eslint/utils": "^8.47.0",
59
+ "@typescript-eslint/eslint-plugin": "^8.48.0",
60
+ "@typescript-eslint/parser": "^8.48.0",
61
+ "@typescript-eslint/utils": "^8.48.0",
62
62
  "archiver": "^7.0.1",
63
63
  "chalk": "^5.6.2",
64
64
  "commander": "^14.0.2",
@@ -73,7 +73,7 @@
73
73
  "koa": "^3.1.1",
74
74
  "koa-compress": "^5.1.1",
75
75
  "license-webpack-plugin": "^4.0.2",
76
- "mime-types": "^3.0.1",
76
+ "mime-types": "^3.0.2",
77
77
  "p-map": "^7.0.4",
78
78
  "react": "^19.2.0",
79
79
  "react-i18next": "^16.3.5",
@@ -88,7 +88,7 @@
88
88
  "tslib": "^2.8.1",
89
89
  "typescript": "^5.9.3",
90
90
  "undici": "^7.16.0",
91
- "webpack": "^5.103.0",
91
+ "webpack": "5.101.0",
92
92
  "webpack-bundle-analyzer": "^5.0.1",
93
93
  "ws": "^8.18.3"
94
94
  },
@@ -102,7 +102,7 @@
102
102
  "@types/koa-compress": "^4.0.7",
103
103
  "@types/mime-types": "^3.0.1",
104
104
  "@types/node": "^24.10.1",
105
- "@types/react": "^19.2.6",
105
+ "@types/react": "^19.2.7",
106
106
  "@types/tough-cookie": "^4.0.5",
107
107
  "@types/vscode": "^1.106.1",
108
108
  "@types/webpack-bundle-analyzer": "^4.7.0",
package/path.d.ts CHANGED
@@ -54,7 +54,7 @@ export declare function extname(path: string): string;
54
54
  /** `/` */
55
55
  export declare const sep = "/";
56
56
  /** The platform-specific file delimiter. ';' or ':'. */
57
- export declare const delimiter: ":" | ";";
57
+ export declare const delimiter: ";" | ":";
58
58
  /** Returns an object from a path string - the opposite of format().
59
59
  @param path path to evaluate.
60
60
  @throws {TypeError} if `path` is not a string. */
@@ -81,7 +81,7 @@ export declare let path: {
81
81
  basename: typeof basename;
82
82
  extname: typeof extname;
83
83
  sep: string;
84
- delimiter: ":" | ";";
84
+ delimiter: ";" | ":";
85
85
  parse: typeof parse;
86
86
  format: typeof format;
87
87
  toNamespacedPath: typeof toNamespacedPath;