xshell 1.0.164 → 1.0.165

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,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.0.164",
3
+ "version": "1.0.165",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -50,10 +50,10 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@babel/core": "^7.25.2",
53
- "@babel/parser": "^7.25.4",
54
- "@babel/traverse": "^7.25.4",
53
+ "@babel/parser": "^7.25.6",
54
+ "@babel/traverse": "^7.25.6",
55
55
  "@koa/cors": "^5.0.0",
56
- "@stylistic/eslint-plugin": "^2.6.4",
56
+ "@stylistic/eslint-plugin": "^2.7.2",
57
57
  "@svgr/webpack": "^8.1.0",
58
58
  "@types/sass-loader": "^8.0.9",
59
59
  "@types/ws": "^8.5.12",
@@ -113,7 +113,7 @@
113
113
  "ws": "^8.18.0"
114
114
  },
115
115
  "devDependencies": {
116
- "@babel/types": "^7.25.4",
116
+ "@babel/types": "^7.25.6",
117
117
  "@types/ali-oss": "^6.16.11",
118
118
  "@types/archiver": "^6.0.2",
119
119
  "@types/babel__traverse": "^7.20.6",
@@ -126,8 +126,8 @@
126
126
  "@types/koa-compress": "^4.0.6",
127
127
  "@types/lodash": "^4.17.7",
128
128
  "@types/mime-types": "^2.1.4",
129
- "@types/node": "^22.5.0",
130
- "@types/react": "^18.3.4",
129
+ "@types/node": "^22.5.2",
130
+ "@types/react": "^18.3.5",
131
131
  "@types/through2": "^2.0.41",
132
132
  "@types/tough-cookie": "^4.0.5",
133
133
  "@types/ua-parser-js": "^0.7.39",
package/path.d.ts CHANGED
@@ -55,7 +55,7 @@ export declare function extname(path: string): string;
55
55
  /** `/` */
56
56
  export declare const sep = "/";
57
57
  /** The platform-specific file delimiter. ';' or ':'. */
58
- export declare const delimiter: ";" | ":";
58
+ export declare const delimiter: ":" | ";";
59
59
  /** Returns an object from a path string - the opposite of format().
60
60
  @param path path to evaluate.
61
61
  @throws {TypeError} if `path` is not a string. */
@@ -83,7 +83,7 @@ export declare let path: {
83
83
  basename: typeof basename;
84
84
  extname: typeof extname;
85
85
  sep: string;
86
- delimiter: ";" | ":";
86
+ delimiter: ":" | ";";
87
87
  parse: typeof parse;
88
88
  format: typeof format;
89
89
  toNamespacedPath: typeof toNamespacedPath;
@@ -11,6 +11,8 @@ export declare function unique<TObj>(iterable: TObj[] | Iterable<TObj>, selector
11
11
  export declare function seq<T = number>(n: number, generator?: (index: number) => T): T[];
12
12
  /** 将 keys, values 数组按对应的顺序组合成一个对象 */
13
13
  export declare function zip_object<TValue>(keys: (string | number)[], values: TValue[]): Record<string, TValue>;
14
+ /** 过滤对象中的 values, 返回新对象 */
15
+ export declare function filter_values<TObj extends Record<string, any>>(obj: TObj, filter?: (value: TObj[string]) => any): TObj;
14
16
  export declare function delay(milliseconds: number, { signal }?: {
15
17
  signal?: AbortSignal;
16
18
  }): Promise<void>;
@@ -68,7 +70,7 @@ export declare function encode(str: string): Uint8Array;
68
70
  在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
69
71
  export declare function decode(buffer: Uint8Array): string;
70
72
  /** 字符串字典序比较 */
71
- export declare function strcmp(l: string, r: string): 1 | 0 | -1;
73
+ export declare function strcmp(l: string, r: string): 0 | 1 | -1;
72
74
  /** 比较 1.10.02 这种版本号
73
75
  - l, r: 两个版本号字符串
74
76
  - loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
package/utils.browser.js CHANGED
@@ -38,6 +38,11 @@ export function zip_object(keys, values) {
38
38
  return obj;
39
39
  }, {});
40
40
  }
41
+ /** 过滤对象中的 values, 返回新对象 */
42
+ export function filter_values(obj, filter = not_empty) {
43
+ return Object.fromEntries(Object.entries(obj)
44
+ .filter(([, value]) => filter(value)));
45
+ }
41
46
  export async function delay(milliseconds, { signal } = {}) {
42
47
  signal?.throwIfAborted();
43
48
  return new Promise((resolve, reject) => {
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
  - l, r: 两个版本号字符串
43
43
  - loose?: 宽松模式,允许两个版本号格式(位数)不一致 */