xshell 1.0.156 → 1.0.157
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/net.d.ts +1 -1
- package/net.js +1 -1
- package/package.json +20 -20
- package/utils.browser.d.ts +4 -2
- package/utils.browser.js +10 -5
- package/utils.d.ts +4 -2
- package/utils.js +10 -5
package/net.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const WebSocketOpen = 1;
|
|
|
16
16
|
export declare const WebSocketClosing = 2;
|
|
17
17
|
export declare const WebSocketClosed = 3;
|
|
18
18
|
export declare enum MyProxy {
|
|
19
|
-
socks5 = "http://
|
|
19
|
+
socks5 = "http://127.0.0.1:10080",
|
|
20
20
|
whistle = "http://localhost:8899",
|
|
21
21
|
work = "http://localhost:10090"
|
|
22
22
|
}
|
package/net.js
CHANGED
|
@@ -10,7 +10,7 @@ export const WebSocketClosing = 2;
|
|
|
10
10
|
export const WebSocketClosed = 3;
|
|
11
11
|
export var MyProxy;
|
|
12
12
|
(function (MyProxy) {
|
|
13
|
-
MyProxy["socks5"] = "http://
|
|
13
|
+
MyProxy["socks5"] = "http://127.0.0.1:10080";
|
|
14
14
|
MyProxy["whistle"] = "http://localhost:8899";
|
|
15
15
|
MyProxy["work"] = "http://localhost:10090";
|
|
16
16
|
})(MyProxy || (MyProxy = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.157",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@babel/core": "^7.24.
|
|
53
|
-
"@babel/parser": "^7.24.
|
|
54
|
-
"@babel/traverse": "^7.24.
|
|
52
|
+
"@babel/core": "^7.24.9",
|
|
53
|
+
"@babel/parser": "^7.24.8",
|
|
54
|
+
"@babel/traverse": "^7.24.8",
|
|
55
55
|
"@koa/cors": "^5.0.0",
|
|
56
56
|
"@svgr/webpack": "^8.1.0",
|
|
57
57
|
"@types/sass-loader": "^8.0.8",
|
|
58
|
-
"@types/ws": "^8.5.
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
60
|
-
"@typescript-eslint/parser": "^7.
|
|
61
|
-
"@typescript-eslint/utils": "^7.
|
|
58
|
+
"@types/ws": "^8.5.11",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
|
60
|
+
"@typescript-eslint/parser": "^7.16.1",
|
|
61
|
+
"@typescript-eslint/utils": "^7.16.1",
|
|
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,13 +74,13 @@
|
|
|
74
74
|
"commander": "^12.1.0",
|
|
75
75
|
"css-loader": "^7.1.2",
|
|
76
76
|
"emoji-regex": "^10.3.0",
|
|
77
|
-
"eslint": "^9.
|
|
77
|
+
"eslint": "^9.7.0",
|
|
78
78
|
"eslint-plugin-import": "^2.29.1",
|
|
79
|
-
"eslint-plugin-react": "^7.34.
|
|
79
|
+
"eslint-plugin-react": "^7.34.4",
|
|
80
80
|
"gulp-sort": "^2.0.0",
|
|
81
81
|
"hash-string": "^1.0.0",
|
|
82
82
|
"https-proxy-agent": "^7.0.5",
|
|
83
|
-
"i18next": "^23.
|
|
83
|
+
"i18next": "^23.12.1",
|
|
84
84
|
"i18next-scanner": "^4.5.0",
|
|
85
85
|
"koa": "^2.15.3",
|
|
86
86
|
"koa-compress": "^5.1.1",
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
"mime-types": "^2.1.35",
|
|
91
91
|
"ora": "^8.0.1",
|
|
92
92
|
"react": "^18.3.1",
|
|
93
|
-
"react-i18next": "^14.1.
|
|
94
|
-
"react-object-model": "^1.2.
|
|
93
|
+
"react-i18next": "^14.1.3",
|
|
94
|
+
"react-object-model": "^1.2.8",
|
|
95
95
|
"resolve-path": "^1.4.0",
|
|
96
|
-
"sass": "^1.77.
|
|
96
|
+
"sass": "^1.77.8",
|
|
97
97
|
"sass-loader": "^14.2.1",
|
|
98
98
|
"source-map-loader": "^5.0.0",
|
|
99
99
|
"strip-ansi": "^7.1.0",
|
|
@@ -107,12 +107,12 @@
|
|
|
107
107
|
"undici": "^6.19.2",
|
|
108
108
|
"vinyl": "^3.0.0",
|
|
109
109
|
"vinyl-fs": "^4.0.0",
|
|
110
|
-
"webpack": "^5.
|
|
110
|
+
"webpack": "^5.93.0",
|
|
111
111
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
112
|
-
"ws": "^8.
|
|
112
|
+
"ws": "^8.18.0"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@babel/types": "^7.24.
|
|
115
|
+
"@babel/types": "^7.24.9",
|
|
116
116
|
"@types/ali-oss": "^6.16.11",
|
|
117
117
|
"@types/archiver": "^6.0.2",
|
|
118
118
|
"@types/babel__traverse": "^7.20.6",
|
|
@@ -123,15 +123,15 @@
|
|
|
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.
|
|
126
|
+
"@types/lodash": "^4.17.7",
|
|
127
127
|
"@types/mime-types": "^2.1.4",
|
|
128
|
-
"@types/node": "^20.14.
|
|
128
|
+
"@types/node": "^20.14.10",
|
|
129
129
|
"@types/react": "^18.3.3",
|
|
130
130
|
"@types/through2": "^2.0.41",
|
|
131
131
|
"@types/tough-cookie": "^4.0.5",
|
|
132
132
|
"@types/ua-parser-js": "^0.7.39",
|
|
133
133
|
"@types/vinyl-fs": "^3.0.5",
|
|
134
|
-
"@types/vscode": "^1.
|
|
134
|
+
"@types/vscode": "^1.91.0",
|
|
135
135
|
"@types/webpack-bundle-analyzer": "^4.7.0"
|
|
136
136
|
},
|
|
137
137
|
"pnpm": {
|
package/utils.browser.d.ts
CHANGED
|
@@ -69,8 +69,10 @@ export declare function encode(str: string): Uint8Array;
|
|
|
69
69
|
export declare function decode(buffer: Uint8Array): string;
|
|
70
70
|
/** 字符串字典序比较 */
|
|
71
71
|
export declare function strcmp(l: string, r: string): 0 | 1 | -1;
|
|
72
|
-
/** 比较 1.10.02 这种版本号
|
|
73
|
-
|
|
72
|
+
/** 比较 1.10.02 这种版本号
|
|
73
|
+
- l, r: 两个版本号字符串
|
|
74
|
+
- loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
|
|
75
|
+
export declare function vercmp(l: string, r: string, loose?: boolean): number;
|
|
74
76
|
export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
|
|
75
77
|
export declare function global_get<TReturn = any>(keypath: string): TReturn;
|
|
76
78
|
export declare function invoke<TReturn = any>(obj: any, funcpath: string, args: any[]): TReturn;
|
package/utils.browser.js
CHANGED
|
@@ -179,19 +179,24 @@ export function strcmp(l, r) {
|
|
|
179
179
|
return -1;
|
|
180
180
|
return 1;
|
|
181
181
|
}
|
|
182
|
-
/** 比较 1.10.02 这种版本号
|
|
183
|
-
|
|
182
|
+
/** 比较 1.10.02 这种版本号
|
|
183
|
+
- l, r: 两个版本号字符串
|
|
184
|
+
- loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
|
|
185
|
+
export function vercmp(l, r, loose = false) {
|
|
184
186
|
const lparts = l.split('.').map(x => Number(x));
|
|
185
187
|
const rparts = r.split('.').map(x => Number(x));
|
|
186
|
-
|
|
187
|
-
|
|
188
|
+
if (!loose && lparts.length !== rparts.length)
|
|
189
|
+
throw new Error('传入 vercmp 的两个版本号格式不一致');
|
|
190
|
+
let minlen = Math.min(lparts.length, rparts.length);
|
|
191
|
+
for (let i = 0; i < minlen; i++) {
|
|
188
192
|
const l = lparts[i];
|
|
189
193
|
const r = rparts[i];
|
|
190
194
|
assert(!isNaN(l) && !isNaN(r), '传入 vercmp 的版本非法');
|
|
191
195
|
if (l !== r)
|
|
192
196
|
return l - r;
|
|
193
197
|
}
|
|
194
|
-
|
|
198
|
+
// loose 下按短的优先,否则应该一样,为 0
|
|
199
|
+
return lparts.length - rparts.length;
|
|
195
200
|
}
|
|
196
201
|
export function get(obj, keypath) {
|
|
197
202
|
let obj_ = obj;
|
package/utils.d.ts
CHANGED
|
@@ -38,8 +38,10 @@ export declare function filter_values<TObj extends Record<string, any>>(obj: TOb
|
|
|
38
38
|
export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
|
|
39
39
|
/** 字符串字典序比较 */
|
|
40
40
|
export declare function strcmp(l: string, r: string): 0 | 1 | -1;
|
|
41
|
-
/** 比较 1.10.02 这种版本号
|
|
42
|
-
|
|
41
|
+
/** 比较 1.10.02 这种版本号
|
|
42
|
+
- l, r: 两个版本号字符串
|
|
43
|
+
- loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
|
|
44
|
+
export declare function vercmp(l: string, r: string, loose?: boolean): number;
|
|
43
45
|
export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
|
|
44
46
|
export declare function global_get<TReturn = any>(keypath: string): TReturn;
|
|
45
47
|
export declare function invoke<TReturn = any>(obj: any, funcpath: string, args: any[]): TReturn;
|
package/utils.js
CHANGED
|
@@ -99,19 +99,24 @@ export function strcmp(l, r) {
|
|
|
99
99
|
return -1;
|
|
100
100
|
return 1;
|
|
101
101
|
}
|
|
102
|
-
/** 比较 1.10.02 这种版本号
|
|
103
|
-
|
|
102
|
+
/** 比较 1.10.02 这种版本号
|
|
103
|
+
- l, r: 两个版本号字符串
|
|
104
|
+
- loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
|
|
105
|
+
export function vercmp(l, r, loose = false) {
|
|
104
106
|
const lparts = l.split('.').map(x => Number(x));
|
|
105
107
|
const rparts = r.split('.').map(x => Number(x));
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
if (!loose && lparts.length !== rparts.length)
|
|
109
|
+
throw new Error('传入 vercmp 的两个版本号格式不一致');
|
|
110
|
+
let minlen = Math.min(lparts.length, rparts.length);
|
|
111
|
+
for (let i = 0; i < minlen; i++) {
|
|
108
112
|
const l = lparts[i];
|
|
109
113
|
const r = rparts[i];
|
|
110
114
|
assert(!isNaN(l) && !isNaN(r), '传入 vercmp 的版本非法');
|
|
111
115
|
if (l !== r)
|
|
112
116
|
return l - r;
|
|
113
117
|
}
|
|
114
|
-
|
|
118
|
+
// loose 下按短的优先,否则应该一样,为 0
|
|
119
|
+
return lparts.length - rparts.length;
|
|
115
120
|
}
|
|
116
121
|
export function get(obj, keypath) {
|
|
117
122
|
let obj_ = obj;
|