xshell 1.0.203 → 1.0.204
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 +2 -2
- package/path.d.ts +2 -2
- package/process.d.ts +2 -2
- package/process.js +1 -1
- package/utils.browser.d.ts +1 -1
- package/utils.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.204",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"@types/koa-compress": "^4.0.6",
|
|
127
127
|
"@types/lodash": "^4.17.13",
|
|
128
128
|
"@types/mime-types": "^2.1.4",
|
|
129
|
-
"@types/node": "^22.10.
|
|
129
|
+
"@types/node": "^22.10.1",
|
|
130
130
|
"@types/react": "^18.3.12",
|
|
131
131
|
"@types/through2": "^2.0.41",
|
|
132
132
|
"@types/tough-cookie": "^4.0.5",
|
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;
|
package/process.d.ts
CHANGED
|
@@ -114,13 +114,13 @@ export interface CallError<TOutput extends string | Buffer = string> {
|
|
|
114
114
|
- args: `[ ]` 参数列表
|
|
115
115
|
- options?:
|
|
116
116
|
- cwd?
|
|
117
|
+
- print?: `true` print 选项,支持设置细项
|
|
118
|
+
- throw_code?: `true` code 不为 0 时是否抛出异常
|
|
117
119
|
- envs?: `process.env` 覆盖/添加到 process.env 的环境变量,传 null 时可以取消设置该变量
|
|
118
120
|
- encoding?: `'utf-8'` 子进程输出编码, 设置为 binary 时返回 stdout, stderr 类型为 Buffer; 否则是 string
|
|
119
|
-
- print?: `true` print 选项,支持设置细项
|
|
120
121
|
- printers?: 实时处理 stdout 和 stderr 的每个 chunk,启用后子进程输出不会自动 print,且对应的 stdout, stderr 为空
|
|
121
122
|
- stdio?: `'pipe'` 设置为 'ignore' 时忽略 stdio 处理
|
|
122
123
|
- input?: string, 启动子进程之后写入到子进程 stdin 中的内容,写完后关闭子进程 stdin
|
|
123
|
-
- throw_code?: `true` code 不为 0 时是否抛出异常
|
|
124
124
|
- on_child?: 可以传入回调函数及时获取通过 start 创建的子进程,便于执行 kill、获得 pid 等操作 */
|
|
125
125
|
export declare function call(exe: string, args?: string[], options?: CallOptions): Promise<CallResult<string>>;
|
|
126
126
|
export interface CallNodeJsOptions extends CallOptions {
|
package/process.js
CHANGED
|
@@ -136,7 +136,7 @@ export async function call(exe, args = [], options = {}) {
|
|
|
136
136
|
await close_all_handles();
|
|
137
137
|
}
|
|
138
138
|
const { stdio } = spawn_options;
|
|
139
|
-
const { encoding = 'utf-8',
|
|
139
|
+
const { encoding = 'utf-8', throw_code = true, input, printers, on_child } = options;
|
|
140
140
|
// 防止 child spawn 失败时 crash nodejs 进程
|
|
141
141
|
child.on('error', error => {
|
|
142
142
|
console.error(error);
|
package/utils.browser.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export declare function encode(str: string): Uint8Array<ArrayBufferLike>;
|
|
|
81
81
|
在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
|
|
82
82
|
export declare function decode(buffer: Uint8Array): string;
|
|
83
83
|
/** 字符串字典序比较 */
|
|
84
|
-
export declare function strcmp(l: string, r: string):
|
|
84
|
+
export declare function strcmp(l: string, r: string): 0 | 1 | -1;
|
|
85
85
|
/** 比较 1.10.02 这种版本号
|
|
86
86
|
- l, r: 两个版本号字符串
|
|
87
87
|
- loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
|
package/utils.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare function filter_values<TObj extends Record<string, any>>(obj: TOb
|
|
|
44
44
|
/** 忽略对象中的 keys, 返回新对象 */
|
|
45
45
|
export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
|
|
46
46
|
/** 字符串字典序比较 */
|
|
47
|
-
export declare function strcmp(l: string, r: string):
|
|
47
|
+
export declare function strcmp(l: string, r: string): 0 | 1 | -1;
|
|
48
48
|
/** 比较 1.10.02 这种版本号
|
|
49
49
|
- l, r: 两个版本号字符串
|
|
50
50
|
- loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
|