xshell 1.0.154 → 1.0.156

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/Terminal.js CHANGED
@@ -6,7 +6,7 @@ import { FitAddon } from '@xterm/addon-fit';
6
6
  import { WebglAddon } from '@xterm/addon-webgl';
7
7
  import { WebLinksAddon } from '@xterm/addon-web-links';
8
8
  // 没有 ui
9
- // import { SearchAddon } from 'xterm-addon-search'
9
+ // import { SearchAddon } from '@xterm/addon-search'
10
10
  import { Model } from 'react-object-model';
11
11
  import { assert, genid } from './utils.browser.js';
12
12
  export function Terminal({ font }) {
package/builder.js CHANGED
@@ -93,7 +93,8 @@ const dependencies = {
93
93
  }
94
94
  },
95
95
  echarts: {
96
- productions: ['echarts/dist/echarts.js'],
96
+ devs: ['echarts/dist/echarts.js'],
97
+ productions: ['echarts/dist/echarts.min.js'],
97
98
  maps: {
98
99
  devs: ['echarts/dist/echarts.js.map']
99
100
  }
@@ -410,6 +411,10 @@ export class Bundler {
410
411
  'ahooks',
411
412
  'size-sensor',
412
413
  'client-only',
414
+ 'only',
415
+ 'koa-compose',
416
+ 'cache-content-type',
417
+ 'isarray',
413
418
  ...this.license.ignores || []
414
419
  ]);
415
420
  this.config.plugins.push(new LicenseWebpackPlugin({
package/file.d.ts CHANGED
@@ -114,6 +114,11 @@ export declare function fdelete(fp: string, { print }?: {
114
114
  export declare function fdclear(fpd: string, { print }?: {
115
115
  print?: boolean;
116
116
  }): Promise<void>;
117
+ export interface FCopyOptions {
118
+ print?: boolean;
119
+ overwrite?: boolean;
120
+ filter?: (fp: string) => true | false | 'filter';
121
+ }
117
122
  /** 复制文件或文件夹
118
123
  会在因不存在父文件夹导致复制失败时,自动创建父文件夹,并再次尝试复制
119
124
  最好预先创建父文件夹,减少文件系统操作,提升性能
@@ -122,15 +127,15 @@ export declare function fdclear(fpd: string, { print }?: {
122
127
  - options?:
123
128
  - print?: `true`
124
129
  - overwrite?: `true`
125
- - filter?: 当 fp_src 为文件夹时选择性复制里面的部分内容,和 flist 的 filter 选项一样,但只支持文件夹中第一层的文件
130
+ - filter?: 当 fp_src 为文件夹时选择性复制里面的部分内容,
131
+ 和 flist 的 filter 选项不同,只支持函数,且函数返回值决定是否要继续进行过滤
132
+ - true: 复制文件夹的所有文件,交给 fsp.cp
133
+ - false 或不返回任何值: 不复制
134
+ - 'partial': 进一步进行过滤复制(先 flist with filter 再 fcopy),只有文件夹能返回这个值
126
135
 
127
136
  @example
128
137
  fcopy('D:/temp/camera/', 'D:/camera/') */
129
- export declare function fcopy(fp_src: string, fp_dst: string, { print, overwrite, filter, }?: {
130
- print?: boolean;
131
- overwrite?: boolean;
132
- filter?: FListOptions['filter'];
133
- }): Promise<void>;
138
+ export declare function fcopy(fp_src: string, fp_dst: string, { print, overwrite, filter, }?: FCopyOptions): Promise<void>;
134
139
  /** 移动文件或文件夹
135
140
  相同分区 / 文件系统下使用 rename, 否则 fallback 到复制后删除源文件
136
141
  - src: 源 文件/文件夹 完整路径
package/file.js CHANGED
@@ -238,7 +238,11 @@ export async function fdclear(fpd, { print = true } = {}) {
238
238
  - options?:
239
239
  - print?: `true`
240
240
  - overwrite?: `true`
241
- - filter?: 当 fp_src 为文件夹时选择性复制里面的部分内容,和 flist 的 filter 选项一样,但只支持文件夹中第一层的文件
241
+ - filter?: 当 fp_src 为文件夹时选择性复制里面的部分内容,
242
+ 和 flist 的 filter 选项不同,只支持函数,且函数返回值决定是否要继续进行过滤
243
+ - true: 复制文件夹的所有文件,交给 fsp.cp
244
+ - false 或不返回任何值: 不复制
245
+ - 'partial': 进一步进行过滤复制(先 flist with filter 再 fcopy),只有文件夹能返回这个值
242
246
 
243
247
  @example
244
248
  fcopy('D:/temp/camera/', 'D:/camera/') */
@@ -254,7 +258,13 @@ export async function fcopy(fp_src, fp_dst, { print = true, overwrite = true, fi
254
258
  if (filter) {
255
259
  await fmkdir(fp_dst, { print });
256
260
  await Promise.all((await flist(fp_src, { filter, print: false }))
257
- .map(async (fname) => fcopy(fp_src + fname, fp_dst + fname, { print, overwrite })));
261
+ .map(async (fname) => fcopy(`${fp_src}${fname}`, `${fp_dst}${fname}`, {
262
+ print,
263
+ overwrite,
264
+ ...fname.isdir && filter(fname) === 'filter' ? {
265
+ filter: fp => filter(`${fname}${fp}`),
266
+ } : {}
267
+ })));
258
268
  }
259
269
  else
260
270
  await fsp.cp(fp_src, fp_dst, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.0.154",
3
+ "version": "1.0.156",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -56,9 +56,9 @@
56
56
  "@svgr/webpack": "^8.1.0",
57
57
  "@types/sass-loader": "^8.0.8",
58
58
  "@types/ws": "^8.5.10",
59
- "@typescript-eslint/eslint-plugin": "^7.13.1",
60
- "@typescript-eslint/parser": "^7.13.1",
61
- "@typescript-eslint/utils": "^7.13.1",
59
+ "@typescript-eslint/eslint-plugin": "^7.15.0",
60
+ "@typescript-eslint/parser": "^7.15.0",
61
+ "@typescript-eslint/utils": "^7.15.0",
62
62
  "@xterm/addon-fit": "^0.10.0",
63
63
  "@xterm/addon-web-links": "^0.11.0",
64
64
  "@xterm/addon-webgl": "^0.18.0",
@@ -74,12 +74,12 @@
74
74
  "commander": "^12.1.0",
75
75
  "css-loader": "^7.1.2",
76
76
  "emoji-regex": "^10.3.0",
77
- "eslint": "^9.5.0",
77
+ "eslint": "^9.6.0",
78
78
  "eslint-plugin-import": "^2.29.1",
79
79
  "eslint-plugin-react": "^7.34.3",
80
80
  "gulp-sort": "^2.0.0",
81
81
  "hash-string": "^1.0.0",
82
- "https-proxy-agent": "^7.0.4",
82
+ "https-proxy-agent": "^7.0.5",
83
83
  "i18next": "^23.11.5",
84
84
  "i18next-scanner": "^4.5.0",
85
85
  "koa": "^2.15.3",
@@ -91,7 +91,7 @@
91
91
  "ora": "^8.0.1",
92
92
  "react": "^18.3.1",
93
93
  "react-i18next": "^14.1.2",
94
- "react-object-model": "^1.2.6",
94
+ "react-object-model": "^1.2.7",
95
95
  "resolve-path": "^1.4.0",
96
96
  "sass": "^1.77.6",
97
97
  "sass-loader": "^14.2.1",
@@ -102,7 +102,7 @@
102
102
  "tough-cookie": "^4.1.4",
103
103
  "ts-loader": "^9.5.1",
104
104
  "tslib": "^2.6.3",
105
- "typescript": "^5.5.2",
105
+ "typescript": "^5.5.3",
106
106
  "ua-parser-js": "^2.0.0-beta.3",
107
107
  "undici": "^6.19.2",
108
108
  "vinyl": "^3.0.0",
@@ -123,9 +123,9 @@
123
123
  "@types/gulp-sort": "^2.0.4",
124
124
  "@types/koa": "^2.15.0",
125
125
  "@types/koa-compress": "^4.0.6",
126
- "@types/lodash": "^4.17.5",
126
+ "@types/lodash": "^4.17.6",
127
127
  "@types/mime-types": "^2.1.4",
128
- "@types/node": "^20.14.8",
128
+ "@types/node": "^20.14.9",
129
129
  "@types/react": "^18.3.3",
130
130
  "@types/through2": "^2.0.41",
131
131
  "@types/tough-cookie": "^4.0.5",
package/process.js CHANGED
@@ -188,6 +188,7 @@ export async function call(exe, args = [], options = {}) {
188
188
  - break?: break at first line */
189
189
  export async function call_nodejs(js, args = [], { inspect, break: _break, ...options } = {}) {
190
190
  return call(exe_nodejs, [
191
+ '--enable-source-maps',
191
192
  ...inspect ? [`--inspect${_break ? '-brk' : ''}=localhost:${inspect}`] : [],
192
193
  js,
193
194
  ...args
@@ -215,6 +216,7 @@ export async function term(exe, args = [], { cwd = process.cwd().fpd, print = tr
215
216
  /** 在 term tab 中创建 node.exe 进程 */
216
217
  export async function term_nodejs(fp_js, args = [], { title, inspect, tsnode = false, break: _break, resolve = false, trace_warnings = false, ...options } = {}) {
217
218
  return term(exe_nodejs, [
219
+ '--enable-source-maps',
218
220
  ...trace_warnings ? ['--trace-warnings'] : [],
219
221
  ...resolve ? ['--experimental-specifier-resolution=node'] : [],
220
222
  ...title ? [`--title=${title}`] : [],
@@ -68,7 +68,7 @@ export declare function encode(str: string): Uint8Array;
68
68
  在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
69
69
  export declare function decode(buffer: Uint8Array): string;
70
70
  /** 字符串字典序比较 */
71
- export declare function strcmp(l: string, r: string): 1 | 0 | -1;
71
+ export declare function strcmp(l: string, r: string): 0 | 1 | -1;
72
72
  /** 比较 1.10.02 这种版本号 */
73
73
  export declare function vercmp(l: string, r: string): number;
74
74
  export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
package/utils.d.ts CHANGED
@@ -37,7 +37,7 @@ export declare function filter_values<TObj extends Record<string, any>>(obj: TOb
37
37
  /** 忽略对象中的 keys, 返回新对象 */
38
38
  export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
39
39
  /** 字符串字典序比较 */
40
- export declare function strcmp(l: string, r: string): 1 | 0 | -1;
40
+ export declare function strcmp(l: string, r: string): 0 | 1 | -1;
41
41
  /** 比较 1.10.02 这种版本号 */
42
42
  export declare function vercmp(l: string, r: string): number;
43
43
  export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;