xshell 1.3.68 → 1.3.71
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.d.ts +1 -2
- package/apps.js +5 -4
- package/file.js +2 -2
- package/package.json +23 -23
- package/polyfill.browser.d.ts +1 -1
- package/polyfill.browser.js +1 -1
- package/tsconfig.json +2 -0
- package/utils.common.d.ts +1 -0
- package/utils.common.js +18 -0
- package/utils.d.ts +1 -0
- package/utils.js +4 -0
package/apps.d.ts
CHANGED
|
@@ -5,11 +5,10 @@ export declare let npm: {
|
|
|
5
5
|
/** node.exe E:/sdk/nodejs/node_modules/corepack/dist/pnpm.js install
|
|
6
6
|
- cwd
|
|
7
7
|
- pkgs?: `[ ]` */
|
|
8
|
-
install(fpd: string, pkgs?: string[], { save_dev, save_peer, legacy,
|
|
8
|
+
install(fpd: string, pkgs?: string[], { save_dev, save_peer, legacy, break: _break, }?: {
|
|
9
9
|
save_dev?: boolean;
|
|
10
10
|
save_peer?: boolean;
|
|
11
11
|
legacy?: boolean;
|
|
12
|
-
force?: boolean;
|
|
13
12
|
break?: boolean;
|
|
14
13
|
}): Promise<void>;
|
|
15
14
|
};
|
package/apps.js
CHANGED
|
@@ -8,15 +8,16 @@ export let npm = {
|
|
|
8
8
|
/** node.exe E:/sdk/nodejs/node_modules/corepack/dist/pnpm.js install
|
|
9
9
|
- cwd
|
|
10
10
|
- pkgs?: `[ ]` */
|
|
11
|
-
async install(fpd, pkgs = [], { save_dev = false, save_peer = false, legacy = false,
|
|
11
|
+
async install(fpd, pkgs = [], { save_dev = false, save_peer = false, legacy = false, break: _break = false, } = {}) {
|
|
12
|
+
if (!Array.isArray(pkgs))
|
|
13
|
+
pkgs = [pkgs];
|
|
12
14
|
const args = [
|
|
13
|
-
'install',
|
|
15
|
+
pkgs.length ? 'add' : 'install',
|
|
16
|
+
...pkgs,
|
|
14
17
|
...util.inspect.defaultOptions.colors ? ['--color'] : [],
|
|
15
18
|
...legacy ? ['--legacy-peer-deps'] : [],
|
|
16
|
-
...force ? ['--force'] : [],
|
|
17
19
|
...save_dev ? ['--save-dev'] : [],
|
|
18
20
|
...save_peer ? ['--save-peer'] : [],
|
|
19
|
-
...pkgs || []
|
|
20
21
|
];
|
|
21
22
|
await this.call(fpd, this.bin, args);
|
|
22
23
|
}
|
package/file.js
CHANGED
|
@@ -90,9 +90,9 @@ export async function fequals(fp_left, fp_right, { print = true } = {}) {
|
|
|
90
90
|
console.log(`比较 ${fp_left} 和 ${fp_right}`);
|
|
91
91
|
try {
|
|
92
92
|
const fps = [fp_left, fp_right];
|
|
93
|
-
const [{ size: size_left }, { size: size_right }] = await Promise.all(fps.map(
|
|
93
|
+
const [{ size: size_left }, { size: size_right }] = await Promise.all(fps.map(fp => fstat(fp)));
|
|
94
94
|
if (size_left === size_right) {
|
|
95
|
-
const [data_left, data_right] = await Promise.all(fps.map(
|
|
95
|
+
const [data_left, data_right] = await Promise.all(fps.map(fp => fread(fp, { encoding: 'binary', print: false })));
|
|
96
96
|
return data_left.equals(data_right);
|
|
97
97
|
}
|
|
98
98
|
else
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.71",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -48,59 +48,59 @@
|
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@babel/core": "^7.29.
|
|
52
|
-
"@babel/parser": "^7.29.
|
|
53
|
-
"@babel/traverse": "^7.29.
|
|
51
|
+
"@babel/core": "^7.29.7",
|
|
52
|
+
"@babel/parser": "^7.29.7",
|
|
53
|
+
"@babel/traverse": "^7.29.7",
|
|
54
54
|
"@koa/cors": "^5.0.0",
|
|
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
|
-
"@typescript-eslint/parser": "^8.
|
|
60
|
-
"@typescript-eslint/utils": "^8.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^8.61.0",
|
|
59
|
+
"@typescript-eslint/parser": "^8.61.0",
|
|
60
|
+
"@typescript-eslint/utils": "^8.61.0",
|
|
61
61
|
"archiver": "^8.0.0",
|
|
62
62
|
"chalk": "^5.6.2",
|
|
63
|
-
"commander": "^
|
|
63
|
+
"commander": "^15.0.0",
|
|
64
64
|
"css-loader": "^7.1.4",
|
|
65
65
|
"emoji-regex": "^10.6.0",
|
|
66
|
-
"eslint": "^10.4.
|
|
66
|
+
"eslint": "^10.4.1",
|
|
67
67
|
"eslint-plugin-react": "^7.37.5",
|
|
68
|
-
"https-proxy-agent": "^9.
|
|
68
|
+
"https-proxy-agent": "^9.1.0",
|
|
69
69
|
"i18next": "25.8.1",
|
|
70
70
|
"i18next-scanner": "^4.6.0",
|
|
71
|
-
"koa": "^3.2.
|
|
71
|
+
"koa": "^3.2.1",
|
|
72
72
|
"koa-compress": "^5.2.1",
|
|
73
73
|
"license-webpack-plugin": "^4.0.2",
|
|
74
74
|
"mime-types": "^3.0.2",
|
|
75
75
|
"p-map": "^7.0.4",
|
|
76
|
-
"react": "^19.2.
|
|
76
|
+
"react": "^19.2.7",
|
|
77
77
|
"react-i18next": "^17.0.8",
|
|
78
78
|
"resolve-path": "^1.4.0",
|
|
79
|
-
"sass": "^1.
|
|
80
|
-
"sass-loader": "^
|
|
79
|
+
"sass": "^1.100.0",
|
|
80
|
+
"sass-loader": "^17.0.0",
|
|
81
81
|
"source-map-loader": "^5.0.0",
|
|
82
82
|
"strip-ansi": "^7.2.0",
|
|
83
83
|
"style-loader": "^4.0.0",
|
|
84
84
|
"tough-cookie": "^6.0.1",
|
|
85
|
-
"ts-loader": "^9.
|
|
85
|
+
"ts-loader": "^9.6.0",
|
|
86
86
|
"tslib": "^2.8.1",
|
|
87
87
|
"typescript": "^6.0.3",
|
|
88
|
-
"undici": "^8.
|
|
89
|
-
"webpack": "^5.
|
|
88
|
+
"undici": "^8.4.1",
|
|
89
|
+
"webpack": "^5.107.2",
|
|
90
90
|
"webpack-bundle-analyzer": "^5.3.0",
|
|
91
|
-
"ws": "^8.
|
|
91
|
+
"ws": "^8.21.0"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@babel/types": "^7.29.
|
|
95
|
-
"@types/archiver": "^
|
|
94
|
+
"@babel/types": "^7.29.7",
|
|
95
|
+
"@types/archiver": "^8.0.0",
|
|
96
96
|
"@types/babel__traverse": "^7.28.0",
|
|
97
97
|
"@types/eslint": "^9.6.1",
|
|
98
98
|
"@types/estree": "^1.0.9",
|
|
99
|
-
"@types/koa": "^3.0.
|
|
99
|
+
"@types/koa": "^3.0.3",
|
|
100
100
|
"@types/koa-compress": "^4.0.7",
|
|
101
101
|
"@types/mime-types": "^3.0.1",
|
|
102
|
-
"@types/node": "^25.
|
|
103
|
-
"@types/react": "^19.2.
|
|
102
|
+
"@types/node": "^25.9.2",
|
|
103
|
+
"@types/react": "^19.2.17",
|
|
104
104
|
"@types/tough-cookie": "^4.0.5",
|
|
105
105
|
"@types/vscode": "^1.120.0",
|
|
106
106
|
"@types/webpack-bundle-analyzer": "^4.7.0",
|
package/polyfill.browser.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
package/polyfill.browser.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
function define(proto, key, func) {
|
|
3
2
|
Object.defineProperty(proto, key, {
|
|
4
3
|
configurable: true,
|
|
@@ -62,4 +61,5 @@ if (!Uint8Array.fromBase64)
|
|
|
62
61
|
bytes[i] = binary.charCodeAt(i);
|
|
63
62
|
return bytes;
|
|
64
63
|
});
|
|
64
|
+
export {};
|
|
65
65
|
//# sourceMappingURL=polyfill.browser.js.map
|
package/tsconfig.json
CHANGED
package/utils.common.d.ts
CHANGED
|
@@ -192,6 +192,7 @@ export declare function to_csv_field(str: string): string;
|
|
|
192
192
|
export declare function set_error_message(error: Error, message: string): Error;
|
|
193
193
|
/** 比较两个数组中的元素完全相同,数组元素用引用比较 */
|
|
194
194
|
export declare function array_equals(a: any[], b: any[]): boolean;
|
|
195
|
+
export declare function deep_equals(a: any, b: any): boolean;
|
|
195
196
|
/** - with_date?: `false` */
|
|
196
197
|
export declare function nowstr(with_date?: boolean): string;
|
|
197
198
|
export declare function has_chinese(str: string): boolean;
|
package/utils.common.js
CHANGED
|
@@ -648,6 +648,24 @@ export function array_equals(a, b) {
|
|
|
648
648
|
return false;
|
|
649
649
|
return a.every((x, i) => x === b[i]);
|
|
650
650
|
}
|
|
651
|
+
export function deep_equals(a, b) {
|
|
652
|
+
if (a === b)
|
|
653
|
+
return true;
|
|
654
|
+
// 如果任一不是对象、或是 null,则不等(因为基本类型已在上面处理)
|
|
655
|
+
if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null)
|
|
656
|
+
return false;
|
|
657
|
+
const keys_a = Object.keys(a);
|
|
658
|
+
const keys_b = Object.keys(b);
|
|
659
|
+
if (keys_a.length !== keys_b.length)
|
|
660
|
+
return false;
|
|
661
|
+
for (const key of keys_a) {
|
|
662
|
+
if (!(key in b))
|
|
663
|
+
return false;
|
|
664
|
+
if (!deep_equals(a[key], b[key]))
|
|
665
|
+
return false;
|
|
666
|
+
}
|
|
667
|
+
return true;
|
|
668
|
+
}
|
|
651
669
|
/** - with_date?: `false` */
|
|
652
670
|
export function nowstr(with_date = false) {
|
|
653
671
|
const date = new Date();
|
package/utils.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare function typed_array_to_buffer(view: ArrayBufferView): Buffer<Arr
|
|
|
12
12
|
export declare function log_line(): void;
|
|
13
13
|
export declare function sha256(data: string | Uint8Array): string;
|
|
14
14
|
export declare function sha1(data: string | Uint8Array): string;
|
|
15
|
+
export declare function crc32(data: string | Uint8Array): string;
|
|
15
16
|
export declare function escape_line_feed(str: string): string;
|
|
16
17
|
/** util.inspect(obj)
|
|
17
18
|
- options
|
package/utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Writable, Transform } from 'node:stream';
|
|
2
2
|
import util from 'node:util';
|
|
3
3
|
import ncrypto from 'node:crypto';
|
|
4
|
+
import zlib from 'node:zlib';
|
|
4
5
|
import './prototype.js';
|
|
5
6
|
import './platform.js';
|
|
6
7
|
import { assert, check, decode, defer } from './utils.common.js';
|
|
@@ -37,6 +38,9 @@ export function sha256(data) {
|
|
|
37
38
|
export function sha1(data) {
|
|
38
39
|
return ncrypto.hash('sha1', data);
|
|
39
40
|
}
|
|
41
|
+
export function crc32(data) {
|
|
42
|
+
return zlib.crc32(data).toString(16).padStart(8, '0');
|
|
43
|
+
}
|
|
40
44
|
export function escape_line_feed(str) {
|
|
41
45
|
return str.replace(/\n/g, '\\n');
|
|
42
46
|
}
|