xshell 1.2.3 → 1.2.5
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/file.d.ts +8 -4
- package/file.js +9 -2
- package/io.browser.js +5 -2
- package/io.js +5 -2
- package/net.browser.d.ts +9 -9
- package/net.browser.js +11 -5
- package/net.d.ts +10 -10
- package/net.js +11 -5
- package/package.json +3 -11
- package/path.d.ts +2 -2
package/file.d.ts
CHANGED
|
@@ -28,13 +28,11 @@ export declare function fopen(fp: string, flags?: string | number, { mode, print
|
|
|
28
28
|
mode: fs.Mode;
|
|
29
29
|
}>;
|
|
30
30
|
export declare function fread(fp: string): Promise<string>;
|
|
31
|
-
export declare function fread(fp: string,
|
|
32
|
-
dir?: string;
|
|
31
|
+
export declare function fread(fp: string, options?: {
|
|
33
32
|
encoding: 'binary';
|
|
34
33
|
print?: boolean;
|
|
35
34
|
}): Promise<Buffer>;
|
|
36
|
-
export declare function fread(fp: string,
|
|
37
|
-
dir?: string;
|
|
35
|
+
export declare function fread(fp: string, options?: {
|
|
38
36
|
encoding?: Encoding;
|
|
39
37
|
print?: boolean;
|
|
40
38
|
}): Promise<string>;
|
|
@@ -49,6 +47,9 @@ export declare function fread_json<T = any>(fp: string, options?: {
|
|
|
49
47
|
encoding?: Encoding;
|
|
50
48
|
print?: boolean;
|
|
51
49
|
}): Promise<T>;
|
|
50
|
+
export declare function fparse<TReturn>(fp: string, options?: {
|
|
51
|
+
print?: boolean;
|
|
52
|
+
}): Promise<TReturn>;
|
|
52
53
|
/** 比较两个文件是否一致,遇到任何文件系统错误都返回 false */
|
|
53
54
|
export declare function fequals(fp_left: string, fp_right: string, { print }?: {
|
|
54
55
|
print?: boolean;
|
|
@@ -70,6 +71,9 @@ interface FWriteOptions {
|
|
|
70
71
|
- print?: `true` */
|
|
71
72
|
export declare function fwrite(fp: string, data: string | Uint8Array | any, options?: FWriteOptions): Promise<string>;
|
|
72
73
|
export declare function fwrite(fp: FileHandle, data: string | Uint8Array | any, options?: FWriteOptions): Promise<FileHandle>;
|
|
74
|
+
export declare function fwrite(fp: string | FileHandle, data: string | Uint8Array | any, options?: FWriteOptions): Promise<string | FileHandle>;
|
|
75
|
+
export declare function fpack(fp: string, data: any, options?: FWriteOptions): Promise<string>;
|
|
76
|
+
export declare function fpack(fp: FileHandle, data: any, options?: FWriteOptions): Promise<FileHandle>;
|
|
73
77
|
/** 追加内容到文件末尾,如果文件不存在会自动创建 */
|
|
74
78
|
export declare function fappend(fp: string, data: string | Uint8Array, { print }?: {
|
|
75
79
|
print?: boolean;
|
package/file.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { promises as fsp, default as fs } from 'fs';
|
|
2
2
|
import { isUint8Array } from 'util/types';
|
|
3
|
-
import { path } from "./path.js";
|
|
4
3
|
import { t } from "./i18n/instance.js";
|
|
5
4
|
import { to_json } from "./prototype.js";
|
|
5
|
+
import { pack, parse } from "./io.js";
|
|
6
|
+
import { path } from "./path.js";
|
|
6
7
|
import { check, Lock, WritableMemoryStream, url_width } from "./utils.js";
|
|
7
8
|
export { fsp };
|
|
8
9
|
export const encodings = ['utf-8', 'gb18030', 'shift-jis', 'utf-16le'];
|
|
@@ -53,6 +54,9 @@ export async function fread_lines(fp, options = {}) {
|
|
|
53
54
|
export async function fread_json(fp, options = {}) {
|
|
54
55
|
return JSON.parse(await fread(fp, options));
|
|
55
56
|
}
|
|
57
|
+
export async function fparse(fp, options) {
|
|
58
|
+
return parse(await fread(fp, { ...options, encoding: 'binary' }));
|
|
59
|
+
}
|
|
56
60
|
/** 比较两个文件是否一致,遇到任何文件系统错误都返回 false */
|
|
57
61
|
export async function fequals(fp_left, fp_right, { print = true } = {}) {
|
|
58
62
|
if (print)
|
|
@@ -97,6 +101,9 @@ export async function fwrite(fp, data, { print = true } = {}) {
|
|
|
97
101
|
}
|
|
98
102
|
return fp;
|
|
99
103
|
}
|
|
104
|
+
export async function fpack(fp, data, options) {
|
|
105
|
+
return fwrite(fp, pack(data), options);
|
|
106
|
+
}
|
|
100
107
|
/** 追加内容到文件末尾,如果文件不存在会自动创建 */
|
|
101
108
|
export async function fappend(fp, data, { print = true } = {}) {
|
|
102
109
|
check(path.isAbsolute(fp), `${t('fp 必须是绝对路径,当前为:')} ${fp}`);
|
|
@@ -560,6 +567,6 @@ export async function freplace(fp, pattern, replacement, { print = true } = {})
|
|
|
560
567
|
.replaceAll(pattern, replacement), { print });
|
|
561
568
|
}
|
|
562
569
|
function log_action(action, fp_src, fp_dst, sep = '->') {
|
|
563
|
-
console.log(`${`${action}
|
|
570
|
+
console.log(`${`${action} ${fp_src}`.pad(url_width)} ${sep} ${fp_dst}`);
|
|
564
571
|
}
|
|
565
572
|
//# sourceMappingURL=file.js.map
|
package/io.browser.js
CHANGED
|
@@ -476,9 +476,12 @@ function _pack(value) {
|
|
|
476
476
|
}
|
|
477
477
|
nkv = 0;
|
|
478
478
|
for (const key in value) {
|
|
479
|
+
const v = value[key];
|
|
480
|
+
if (typeof v === 'function')
|
|
481
|
+
continue;
|
|
479
482
|
_pack(key);
|
|
480
|
-
_pack(
|
|
481
|
-
if (nkv
|
|
483
|
+
_pack(v);
|
|
484
|
+
if (++nkv > 0xffff)
|
|
482
485
|
throw new Error('对象 key 数量大于 65535,无法序列化');
|
|
483
486
|
}
|
|
484
487
|
if (nkv >= 16)
|
package/io.js
CHANGED
|
@@ -476,9 +476,12 @@ function _pack(value) {
|
|
|
476
476
|
}
|
|
477
477
|
nkv = 0;
|
|
478
478
|
for (const key in value) {
|
|
479
|
+
const v = value[key];
|
|
480
|
+
if (typeof v === 'function')
|
|
481
|
+
continue;
|
|
479
482
|
_pack(key);
|
|
480
|
-
_pack(
|
|
481
|
-
if (nkv
|
|
483
|
+
_pack(v);
|
|
484
|
+
if (++nkv > 0xffff)
|
|
482
485
|
throw new Error('对象 key 数量大于 65535,无法序列化');
|
|
483
486
|
}
|
|
484
487
|
if (nkv >= 16)
|
package/net.browser.d.ts
CHANGED
|
@@ -101,11 +101,8 @@ export declare function connect_websocket(url: string | URL, { protocols, on_mes
|
|
|
101
101
|
print?: boolean;
|
|
102
102
|
}): Promise<WebSocket>;
|
|
103
103
|
/** 接收到消息后的处理函数
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- void: 什么都不做
|
|
107
|
-
- 以上的 promise */
|
|
108
|
-
export type MessageHandler<TData extends any[] = any[]> = (message: Message<TData>, websocket?: WebSocket) => void | any[] | Promise<void | any[]>;
|
|
104
|
+
返回值会自动被 await,然后可能被封装为 message 回传 */
|
|
105
|
+
export type MessageHandler<TData = any> = (message: Message<TData>, websocket?: WebSocket) => void | any | Promise<void | any>;
|
|
109
106
|
/** 自动保持 remote 连接,只对 initiator 且传入 url 有效,
|
|
110
107
|
- 在未连接,或 websocket on_error 检测到连接断开后以 reconnect_interval 间隔尝试 remote.call(func) 重连
|
|
111
108
|
- 在连接状态下以 heartbeat_interval 间隔发送心跳包确保连接状态
|
|
@@ -159,7 +156,7 @@ export declare class Remote {
|
|
|
159
156
|
funcs: Record<string, MessageHandler>;
|
|
160
157
|
/** map<id, message handler>: 通过 (rpc message).id 找到对应的 handler
|
|
161
158
|
一元 rpc 接收方不需要设置 handlers, 发送方需要 */
|
|
162
|
-
handlers: Map<number, MessageHandler<any
|
|
159
|
+
handlers: Map<number, MessageHandler<any>>;
|
|
163
160
|
keeper?: RemoteKeeperOptions;
|
|
164
161
|
/** `true` 是否打印连接信息、错误信息 */
|
|
165
162
|
print: boolean;
|
|
@@ -198,14 +195,17 @@ export declare class Remote {
|
|
|
198
195
|
作为 websocket 连接接收方,必传 websocket 参数
|
|
199
196
|
发送或连接出错时自动清理 message.id 对应的 handler */
|
|
200
197
|
send(message: Message, websocket?: WebSocket): Promise<void>;
|
|
201
|
-
/** 处理接收到的 websocket message 并解析, 根据 message.id 或 message.func 分发到对应的 handler
|
|
198
|
+
/** 处理接收到的 websocket message 并解析, 根据 message.id 或 message.func 分发到对应的 handler 进行处理,
|
|
199
|
+
handler 处理完成后:
|
|
200
|
+
- 传了 func: 调用函数的情况下 (通常是一元 rpc),总是将返回值包装为 message 回传
|
|
201
|
+
- 未传 func: 通过 id 调用,如果 handler 返回非 undefined 的值,也包装为 message 回传
|
|
202
|
+
|
|
202
203
|
如果 message.done == true 则对端指示当前 remote 可以清理 handler
|
|
203
|
-
如果 handler 返回了值 (一定是数组),则包装为 message 发送
|
|
204
204
|
使用 Uint8Array 作为参数更灵活 https://stackoverflow.com/a/74505197/7609214
|
|
205
205
|
这个方法一般不会抛出错误,也不需要 await,一般在 websocket on_message 时使用 */
|
|
206
206
|
handle(data: Uint8Array, websocket: WebSocket): Promise<void>;
|
|
207
207
|
/** 调用对端 remote 中的 func, 只适用于最简单的一元 rpc (请求, 响应)
|
|
208
208
|
作为 websocket 连接发起方,不需要传入 websocket
|
|
209
209
|
作为 websocket 连接接收方,必传 websocket 参数 */
|
|
210
|
-
call<TReturn
|
|
210
|
+
call<TReturn = any>(func: string, args?: any[], websocket?: WebSocket): Promise<TReturn>;
|
|
211
211
|
}
|
package/net.browser.js
CHANGED
|
@@ -431,7 +431,6 @@ export class Remote {
|
|
|
431
431
|
作为 websocket 连接接收方,必传 websocket 参数
|
|
432
432
|
发送或连接出错时自动清理 message.id 对应的 handler */
|
|
433
433
|
async send(message, websocket) {
|
|
434
|
-
check(!message.data || message.data.every(arg => arg !== undefined), `message.data 数组中不能有 undefined 的项, 因为 json 序列化后会变为 null. (func: ${message.func}, id: ${message.id})`);
|
|
435
434
|
if (this.verbose)
|
|
436
435
|
console.log('remote.send:', message);
|
|
437
436
|
try {
|
|
@@ -445,9 +444,12 @@ export class Remote {
|
|
|
445
444
|
throw error;
|
|
446
445
|
}
|
|
447
446
|
}
|
|
448
|
-
/** 处理接收到的 websocket message 并解析, 根据 message.id 或 message.func 分发到对应的 handler
|
|
447
|
+
/** 处理接收到的 websocket message 并解析, 根据 message.id 或 message.func 分发到对应的 handler 进行处理,
|
|
448
|
+
handler 处理完成后:
|
|
449
|
+
- 传了 func: 调用函数的情况下 (通常是一元 rpc),总是将返回值包装为 message 回传
|
|
450
|
+
- 未传 func: 通过 id 调用,如果 handler 返回非 undefined 的值,也包装为 message 回传
|
|
451
|
+
|
|
449
452
|
如果 message.done == true 则对端指示当前 remote 可以清理 handler
|
|
450
|
-
如果 handler 返回了值 (一定是数组),则包装为 message 发送
|
|
451
453
|
使用 Uint8Array 作为参数更灵活 https://stackoverflow.com/a/74505197/7609214
|
|
452
454
|
这个方法一般不会抛出错误,也不需要 await,一般在 websocket on_message 时使用 */
|
|
453
455
|
async handle(data, websocket) {
|
|
@@ -464,8 +466,12 @@ export class Remote {
|
|
|
464
466
|
if (this.verbose)
|
|
465
467
|
console.log('remote.handle:', message);
|
|
466
468
|
let handler;
|
|
467
|
-
if (func)
|
|
469
|
+
if (func) {
|
|
468
470
|
handler = this.funcs[func];
|
|
471
|
+
// 传了 func 调用函数的情况下,如果 message.data 为 undefined, 默认为 [ ]
|
|
472
|
+
if (message.data === undefined)
|
|
473
|
+
message.data = [];
|
|
474
|
+
}
|
|
469
475
|
else {
|
|
470
476
|
handler = this.handlers.get(id);
|
|
471
477
|
if (done && handler)
|
|
@@ -474,7 +480,7 @@ export class Remote {
|
|
|
474
480
|
try {
|
|
475
481
|
if (handler) {
|
|
476
482
|
const data = await handler(message, websocket);
|
|
477
|
-
if (data)
|
|
483
|
+
if (func || data !== undefined)
|
|
478
484
|
await this.send({ id, data }, websocket);
|
|
479
485
|
}
|
|
480
486
|
else
|
package/net.d.ts
CHANGED
|
@@ -163,11 +163,8 @@ on_message, on_error, on_close, proxy, print, }: {
|
|
|
163
163
|
print?: boolean;
|
|
164
164
|
}): Promise<WebSocket>;
|
|
165
165
|
/** 接收到消息后的处理函数
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
- void: 什么都不做
|
|
169
|
-
- 以上的 promise */
|
|
170
|
-
export type MessageHandler<TData extends any[] = any[]> = (message: Message<TData>, websocket?: WebSocket) => void | any[] | Promise<void | any[]>;
|
|
166
|
+
返回值会自动被 await,然后可能被封装为 message 回传 */
|
|
167
|
+
export type MessageHandler<TData = any> = (message: Message<TData>, websocket?: WebSocket) => void | any | Promise<void | any>;
|
|
171
168
|
/** 自动保持 remote 连接,只对 initiator 且传入 url 有效,
|
|
172
169
|
- 在未连接,或 websocket on_error 检测到连接断开后以 reconnect_interval 间隔尝试 remote.call(func) 重连
|
|
173
170
|
- 在连接状态下以 heartbeat_interval 间隔发送心跳包确保连接状态
|
|
@@ -221,7 +218,7 @@ export declare class Remote {
|
|
|
221
218
|
funcs: Record<string, MessageHandler>;
|
|
222
219
|
/** map<id, message handler>: 通过 (rpc message).id 找到对应的 handler
|
|
223
220
|
一元 rpc 接收方不需要设置 handlers, 发送方需要 */
|
|
224
|
-
handlers: Map<number, MessageHandler<any
|
|
221
|
+
handlers: Map<number, MessageHandler<any>>;
|
|
225
222
|
keeper?: RemoteKeeperOptions;
|
|
226
223
|
/** `true` 是否打印连接信息、错误信息 */
|
|
227
224
|
print: boolean;
|
|
@@ -260,16 +257,19 @@ export declare class Remote {
|
|
|
260
257
|
作为 websocket 连接接收方,必传 websocket 参数
|
|
261
258
|
发送或连接出错时自动清理 message.id 对应的 handler */
|
|
262
259
|
send(message: Message, websocket?: WebSocket): Promise<void>;
|
|
263
|
-
/** 处理接收到的 websocket message 并解析, 根据 message.id 或 message.func 分发到对应的 handler
|
|
260
|
+
/** 处理接收到的 websocket message 并解析, 根据 message.id 或 message.func 分发到对应的 handler 进行处理,
|
|
261
|
+
handler 处理完成后:
|
|
262
|
+
- 传了 func: 调用函数的情况下 (通常是一元 rpc),总是将返回值包装为 message 回传
|
|
263
|
+
- 未传 func: 通过 id 调用,如果 handler 返回非 undefined 的值,也包装为 message 回传
|
|
264
|
+
|
|
264
265
|
如果 message.done == true 则对端指示当前 remote 可以清理 handler
|
|
265
|
-
如果 handler 返回了值 (一定是数组),则包装为 message 发送
|
|
266
266
|
使用 Uint8Array 作为参数更灵活 https://stackoverflow.com/a/74505197/7609214
|
|
267
267
|
这个方法一般不会抛出错误,也不需要 await,一般在 websocket on_message 时使用 */
|
|
268
268
|
handle(data: Uint8Array, websocket: WebSocket): Promise<void>;
|
|
269
269
|
/** 调用对端 remote 中的 func, 只适用于最简单的一元 rpc (请求, 响应)
|
|
270
270
|
作为 websocket 连接发起方,不需要传入 websocket
|
|
271
271
|
作为 websocket 连接接收方,必传 websocket 参数 */
|
|
272
|
-
call<TReturn
|
|
272
|
+
call<TReturn = any>(func: string, args?: any[], websocket?: WebSocket): Promise<TReturn>;
|
|
273
273
|
}
|
|
274
274
|
/** 为连接到 server 的 client 创建 RemoteClient,以便后续调用 client 中方法 */
|
|
275
275
|
export declare class RemoteClient {
|
|
@@ -277,7 +277,7 @@ export declare class RemoteClient {
|
|
|
277
277
|
websocket: WebSocket;
|
|
278
278
|
constructor(remote: Remote, websocket: WebSocket);
|
|
279
279
|
/** 调用 client 中的 func, 只适用于最简单的一元 rpc (请求, 响应) */
|
|
280
|
-
call<TReturn
|
|
280
|
+
call<TReturn = any>(func: string, args?: any[]): Promise<TReturn>;
|
|
281
281
|
/** 发送 message 到 client
|
|
282
282
|
发送或连接出错时自动清理 message.id 对应的 handler */
|
|
283
283
|
send(message: Message): Promise<void>;
|
package/net.js
CHANGED
|
@@ -616,7 +616,6 @@ export class Remote {
|
|
|
616
616
|
作为 websocket 连接接收方,必传 websocket 参数
|
|
617
617
|
发送或连接出错时自动清理 message.id 对应的 handler */
|
|
618
618
|
async send(message, websocket) {
|
|
619
|
-
check(!message.data || message.data.every(arg => arg !== undefined), `message.data 数组中不能有 undefined 的项, 因为 json 序列化后会变为 null. (func: ${message.func}, id: ${message.id})`);
|
|
620
619
|
if (this.verbose)
|
|
621
620
|
console.log('remote.send:', message);
|
|
622
621
|
try {
|
|
@@ -630,9 +629,12 @@ export class Remote {
|
|
|
630
629
|
throw error;
|
|
631
630
|
}
|
|
632
631
|
}
|
|
633
|
-
/** 处理接收到的 websocket message 并解析, 根据 message.id 或 message.func 分发到对应的 handler
|
|
632
|
+
/** 处理接收到的 websocket message 并解析, 根据 message.id 或 message.func 分发到对应的 handler 进行处理,
|
|
633
|
+
handler 处理完成后:
|
|
634
|
+
- 传了 func: 调用函数的情况下 (通常是一元 rpc),总是将返回值包装为 message 回传
|
|
635
|
+
- 未传 func: 通过 id 调用,如果 handler 返回非 undefined 的值,也包装为 message 回传
|
|
636
|
+
|
|
634
637
|
如果 message.done == true 则对端指示当前 remote 可以清理 handler
|
|
635
|
-
如果 handler 返回了值 (一定是数组),则包装为 message 发送
|
|
636
638
|
使用 Uint8Array 作为参数更灵活 https://stackoverflow.com/a/74505197/7609214
|
|
637
639
|
这个方法一般不会抛出错误,也不需要 await,一般在 websocket on_message 时使用 */
|
|
638
640
|
async handle(data, websocket) {
|
|
@@ -649,8 +651,12 @@ export class Remote {
|
|
|
649
651
|
if (this.verbose)
|
|
650
652
|
console.log('remote.handle:', message);
|
|
651
653
|
let handler;
|
|
652
|
-
if (func)
|
|
654
|
+
if (func) {
|
|
653
655
|
handler = this.funcs[func];
|
|
656
|
+
// 传了 func 调用函数的情况下,如果 message.data 为 undefined, 默认为 [ ]
|
|
657
|
+
if (message.data === undefined)
|
|
658
|
+
message.data = [];
|
|
659
|
+
}
|
|
654
660
|
else {
|
|
655
661
|
handler = this.handlers.get(id);
|
|
656
662
|
if (done && handler)
|
|
@@ -659,7 +665,7 @@ export class Remote {
|
|
|
659
665
|
try {
|
|
660
666
|
if (handler) {
|
|
661
667
|
const data = await handler(message, websocket);
|
|
662
|
-
if (data)
|
|
668
|
+
if (func || data !== undefined)
|
|
663
669
|
await this.send({ id, data }, websocket);
|
|
664
670
|
}
|
|
665
671
|
else
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -60,16 +60,10 @@
|
|
|
60
60
|
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
61
61
|
"@typescript-eslint/parser": "^8.20.0",
|
|
62
62
|
"@typescript-eslint/utils": "^8.20.0",
|
|
63
|
-
"@xterm/addon-fit": "^0.10.0",
|
|
64
|
-
"@xterm/addon-web-links": "^0.11.0",
|
|
65
|
-
"@xterm/addon-webgl": "^0.18.0",
|
|
66
|
-
"@xterm/xterm": "^5.5.0",
|
|
67
63
|
"archiver": "^7.0.1",
|
|
68
64
|
"chalk": "^5.4.1",
|
|
69
|
-
"chardet": "^2.0.0",
|
|
70
65
|
"cli-table3": "^0.6.5",
|
|
71
66
|
"cli-truncate": "^4.0.0",
|
|
72
|
-
"colors": "^1.4.0",
|
|
73
67
|
"commander": "^13.0.0",
|
|
74
68
|
"css-loader": "^7.1.2",
|
|
75
69
|
"emoji-regex": "^10.4.0",
|
|
@@ -77,7 +71,6 @@
|
|
|
77
71
|
"eslint-plugin-import": "^2.31.0",
|
|
78
72
|
"eslint-plugin-react": "^7.37.4",
|
|
79
73
|
"gulp-sort": "^2.0.0",
|
|
80
|
-
"hash-string": "^1.0.0",
|
|
81
74
|
"https-proxy-agent": "^7.0.6",
|
|
82
75
|
"i18next": "^24.2.1",
|
|
83
76
|
"i18next-scanner": "^4.6.0",
|
|
@@ -103,7 +96,7 @@
|
|
|
103
96
|
"tslib": "^2.8.1",
|
|
104
97
|
"typescript": "^5.7.3",
|
|
105
98
|
"ua-parser-js": "^2.0.0",
|
|
106
|
-
"undici": "^7.2.
|
|
99
|
+
"undici": "^7.2.2",
|
|
107
100
|
"vinyl": "^3.0.0",
|
|
108
101
|
"vinyl-fs": "^4.0.0",
|
|
109
102
|
"webpack": "^5.97.1",
|
|
@@ -114,7 +107,6 @@
|
|
|
114
107
|
"@babel/types": "^7.26.5",
|
|
115
108
|
"@types/archiver": "^6.0.3",
|
|
116
109
|
"@types/babel__traverse": "^7.20.6",
|
|
117
|
-
"@types/chardet": "^1.0.0",
|
|
118
110
|
"@types/eslint": "^9.6.1",
|
|
119
111
|
"@types/estree": "^1.0.6",
|
|
120
112
|
"@types/gulp-sort": "^2.0.4",
|
|
@@ -122,7 +114,7 @@
|
|
|
122
114
|
"@types/koa-compress": "^4.0.6",
|
|
123
115
|
"@types/lodash": "^4.17.14",
|
|
124
116
|
"@types/mime-types": "^2.1.4",
|
|
125
|
-
"@types/node": "^22.10.
|
|
117
|
+
"@types/node": "^22.10.7",
|
|
126
118
|
"@types/react": "^19.0.7",
|
|
127
119
|
"@types/through2": "^2.0.41",
|
|
128
120
|
"@types/tough-cookie": "^4.0.5",
|
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;
|