xshell 1.0.140 → 1.0.142
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/builder.js +2 -2
- package/package.json +1 -1
- package/path.d.ts +3 -0
- package/path.js +8 -0
- package/utils.browser.d.ts +1 -1
- package/utils.d.ts +1 -1
package/builder.js
CHANGED
|
@@ -312,7 +312,7 @@ export class Bundler {
|
|
|
312
312
|
},
|
|
313
313
|
] : [],
|
|
314
314
|
{
|
|
315
|
-
test: /\.(txt|csv)$/,
|
|
315
|
+
test: /\.(txt|csv|dos)$/,
|
|
316
316
|
type: 'asset/source',
|
|
317
317
|
}
|
|
318
318
|
]
|
|
@@ -529,7 +529,7 @@ export class Bundler {
|
|
|
529
529
|
src = out = asset;
|
|
530
530
|
else
|
|
531
531
|
({ src, out } = asset);
|
|
532
|
-
await fcopy(
|
|
532
|
+
await fcopy(path.resolve_with_slash(fpd_root, src), `${fpd_out}${out}`, { print: print.files });
|
|
533
533
|
}
|
|
534
534
|
await Promise.all([
|
|
535
535
|
...this.resolve_dependency_files(dependencies, true, { production })
|
package/package.json
CHANGED
package/path.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare function join(...paths: string[]): string;
|
|
|
21
21
|
@param paths A sequence of paths or path segments.
|
|
22
22
|
@throws {TypeError} if any of the arguments is not a string. */
|
|
23
23
|
export declare function resolve(...paths: string[]): string;
|
|
24
|
+
/** 和 resolve 一样,但是保留最后一个 path 结尾的 / */
|
|
25
|
+
export declare function resolve_with_slash(...paths: string[]): string;
|
|
24
26
|
/** Determines whether {path} is an absolute path.
|
|
25
27
|
An absolute path will always resolve to the same location, regardless of the working directory.
|
|
26
28
|
|
|
@@ -74,6 +76,7 @@ export declare let path: {
|
|
|
74
76
|
normalize: typeof normalize;
|
|
75
77
|
join: typeof join;
|
|
76
78
|
resolve: typeof resolve;
|
|
79
|
+
resolve_with_slash: typeof resolve_with_slash;
|
|
77
80
|
isAbsolute: typeof isAbsolute;
|
|
78
81
|
relative: typeof relative;
|
|
79
82
|
dirname: typeof dirname;
|
package/path.js
CHANGED
|
@@ -36,6 +36,13 @@ export function join(...paths) {
|
|
|
36
36
|
export function resolve(...paths) {
|
|
37
37
|
return to_fp(npath.resolve(...paths.map(p => to_fp(p))));
|
|
38
38
|
}
|
|
39
|
+
/** 和 resolve 一样,但是保留最后一个 path 结尾的 / */
|
|
40
|
+
export function resolve_with_slash(...paths) {
|
|
41
|
+
let fp = path.resolve(...paths);
|
|
42
|
+
if (paths.last.endsWith('/'))
|
|
43
|
+
fp += '/';
|
|
44
|
+
return fp;
|
|
45
|
+
}
|
|
39
46
|
/** Determines whether {path} is an absolute path.
|
|
40
47
|
An absolute path will always resolve to the same location, regardless of the working directory.
|
|
41
48
|
|
|
@@ -105,6 +112,7 @@ export let path = {
|
|
|
105
112
|
normalize,
|
|
106
113
|
join,
|
|
107
114
|
resolve,
|
|
115
|
+
resolve_with_slash,
|
|
108
116
|
isAbsolute,
|
|
109
117
|
relative,
|
|
110
118
|
dirname,
|
package/utils.browser.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export declare function encode(str: string): Uint8Array;
|
|
|
68
68
|
在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
|
|
69
69
|
export declare function decode(buffer: Uint8Array): string;
|
|
70
70
|
/** 字符串字典序比较 */
|
|
71
|
-
export declare function strcmp(l: string, r: string):
|
|
71
|
+
export declare function strcmp(l: string, r: string): 1 | 0 | -1;
|
|
72
72
|
/** 比较 1.10.02 这种版本号 */
|
|
73
73
|
export declare function vercmp(l: string, r: string): number;
|
|
74
74
|
export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
|
package/utils.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare function filter_values<TObj extends Record<string, any>>(obj: TOb
|
|
|
37
37
|
/** 忽略对象中的 keys, 返回新对象 */
|
|
38
38
|
export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
|
|
39
39
|
/** 字符串字典序比较 */
|
|
40
|
-
export declare function strcmp(l: string, r: string):
|
|
40
|
+
export declare function strcmp(l: string, r: string): 1 | 0 | -1;
|
|
41
41
|
/** 比较 1.10.02 这种版本号 */
|
|
42
42
|
export declare function vercmp(l: string, r: string): number;
|
|
43
43
|
export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
|