xshell 1.0.119 → 1.0.123
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 +1 -0
- package/file.js +1 -0
- package/package.json +3 -7
- package/path.d.ts +2 -2
- package/process.d.ts +3 -0
- package/process.js +1 -0
- package/utils.browser.d.ts +1 -1
- package/utils.d.ts +1 -1
package/file.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ type FileHandle = fsp.FileHandle & {
|
|
|
8
8
|
export { fsp };
|
|
9
9
|
export type Encoding = 'utf-8' | 'gb18030' | 'shift-jis' | 'utf-16le';
|
|
10
10
|
export declare const encodings: readonly ["utf-8", "gb18030", "shift-jis", "utf-16le"];
|
|
11
|
+
export declare const ramdisk: boolean;
|
|
11
12
|
/** fp 所指向的 文件/ 文件夹 是否存在
|
|
12
13
|
Does the file/folder pointed to by fp exist? */
|
|
13
14
|
export declare function fexists(fp: string, { print }?: {
|
package/file.js
CHANGED
|
@@ -6,6 +6,7 @@ import { to_json } from './prototype.js';
|
|
|
6
6
|
import { assert, Lock, WritableMemoryStream } from './utils.js';
|
|
7
7
|
export { fsp };
|
|
8
8
|
export const encodings = ['utf-8', 'gb18030', 'shift-jis', 'utf-16le'];
|
|
9
|
+
export const ramdisk = fexists('T:/TEMP/', { print: false });
|
|
9
10
|
/** fp 所指向的 文件/ 文件夹 是否存在
|
|
10
11
|
Does the file/folder pointed to by fp exist? */
|
|
11
12
|
export function fexists(fp, { print = true } = {}) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.123",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"xshell": "
|
|
8
|
-
"i18n-scan": "
|
|
7
|
+
"xshell": "xshell.js",
|
|
8
|
+
"i18n-scan": "i18n/i18n-scan.js"
|
|
9
9
|
},
|
|
10
10
|
"description": "xshell is a shell designed to provide a brand new human-computer interaction experience.",
|
|
11
11
|
"keywords": [
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
"i18n",
|
|
16
16
|
"interactive programming"
|
|
17
17
|
],
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": ">=22.2.0",
|
|
20
|
-
"vscode": ">=1.81.0"
|
|
21
|
-
},
|
|
22
18
|
"scripts": {
|
|
23
19
|
"start": "node --title=xshell --inspect=0.0.0.0:8420 ./xshell.js",
|
|
24
20
|
"typecheck": "tsc --noEmit",
|
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;
|
package/process.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ import { inspect } from './utils.js';
|
|
|
8
8
|
export declare const exe_nodejs: string;
|
|
9
9
|
export declare const platform: NodeJS.Platform;
|
|
10
10
|
export declare const username: string;
|
|
11
|
+
export declare const noprint: {
|
|
12
|
+
readonly print: false;
|
|
13
|
+
};
|
|
11
14
|
interface StartOptions {
|
|
12
15
|
/** `继承当前工作目录 process.cwd()` 子进程的工作目录 `inherit the cwd` cwd of the child process. */
|
|
13
16
|
cwd?: string;
|
package/process.js
CHANGED
|
@@ -6,6 +6,7 @@ import { inspect, DecoderStream } from './utils.js';
|
|
|
6
6
|
export const exe_nodejs = process.execPath.fp;
|
|
7
7
|
export const platform = os.platform();
|
|
8
8
|
export const username = os.userInfo().username;
|
|
9
|
+
export const noprint = { print: false };
|
|
9
10
|
/** start process
|
|
10
11
|
- exe: .exe 路径或文件名 (建议使用完整路径,跳过 path 搜索,性能更高) path or filename (full path is recommanded to skip path searching for better perf)
|
|
11
12
|
- args: `[]` 参数列表 arguments list
|
package/utils.browser.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare function encode(str: string): Uint8Array;
|
|
|
65
65
|
在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
|
|
66
66
|
export declare function decode(buffer: Uint8Array): string;
|
|
67
67
|
/** 字符串字典序比较 */
|
|
68
|
-
export declare function strcmp(l: string, r: string):
|
|
68
|
+
export declare function strcmp(l: string, r: string): 1 | 0 | -1;
|
|
69
69
|
/** 比较 1.10.02 这种版本号 */
|
|
70
70
|
export declare function vercmp(l: string, r: string): number;
|
|
71
71
|
export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
|
package/utils.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare function filter_values<TObj extends Record<string, any>>(obj: TOb
|
|
|
41
41
|
/** 忽略对象中的 keys, 返回新对象 */
|
|
42
42
|
export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
|
|
43
43
|
/** 字符串字典序比较 */
|
|
44
|
-
export declare function strcmp(l: string, r: string):
|
|
44
|
+
export declare function strcmp(l: string, r: string): 1 | 0 | -1;
|
|
45
45
|
/** 比较 1.10.02 这种版本号 */
|
|
46
46
|
export declare function vercmp(l: string, r: string): number;
|
|
47
47
|
export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
|