bililive-cli 1.6.2 → 1.8.0
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/README.md +7 -3
- package/lib/{chunked-exec-De50pd_R.cjs → chunked-exec-BWQ1zFn6.cjs} +5 -7
- package/lib/fonts-BextoGQN.cjs +33 -0
- package/lib/{index-CSU11uxG.cjs → index-CEo5tP7w.cjs} +23518 -26931
- package/lib/{index-BZRzMMRb.cjs → index-Dkt7D2TB.cjs} +4 -4
- package/lib/{index-BvslFWVg.cjs → index-nT_yCbCf.cjs} +41894 -14660
- package/lib/index.cjs +547 -265
- package/lib/{linux-CzPApWjU.cjs → linux-CbFmQBj-.cjs} +57 -281
- package/lib/{macos-DJE3Xyb_.cjs → macos-Bb6zXuPv.cjs} +2 -2
- package/lib/{windows-CuDjLP0Y.cjs → windows-B6jKfaWo.cjs} +2 -2
- package/package.json +12 -10
package/README.md
CHANGED
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
`npm i bililive-cli -g`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
也有可能需要使用
|
|
10
|
+
|
|
11
|
+
`npm i bililive-cli -g --force`
|
|
12
|
+
|
|
13
|
+
或者下载二进制[文件](https://github.com/renmu123/biliLive-tools/releases)
|
|
10
14
|
|
|
11
15
|
# 使用
|
|
12
16
|
|
|
@@ -44,6 +48,6 @@ Options:
|
|
|
44
48
|
|
|
45
49
|
鉴权密钥为 `config/appConfig.json` 的 `passKey` 参数,或者设置 `BILILIVE_TOOLS_PASSKEY` 环境变量
|
|
46
50
|
|
|
47
|
-
你可以选择线上页面:https://
|
|
51
|
+
你可以选择线上页面:https://bililive.irenmu.com/
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
或者也可以自行[部署](https://github.com/renmu123/biliLive-webui)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var require$$1 = require('node:util');
|
|
4
|
-
var
|
|
4
|
+
var require$$1$1 = require('node:child_process');
|
|
5
5
|
var require$$0 = require('node:url');
|
|
6
6
|
|
|
7
7
|
function chunkify(iterable, chunkSize) {
|
|
@@ -10,9 +10,7 @@ function chunkify(iterable, chunkSize) {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
if (!(Number.isSafeInteger(chunkSize) && chunkSize > 0)) {
|
|
13
|
-
throw new TypeError(
|
|
14
|
-
`Expected \`chunkSize\` to be a an integer from 1 and up, got \`${chunkSize}\``
|
|
15
|
-
);
|
|
13
|
+
throw new TypeError(`Expected \`chunkSize\` to be an integer from 1 and up, got \`${chunkSize}\``);
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
return {
|
|
@@ -39,16 +37,16 @@ function chunkify(iterable, chunkSize) {
|
|
|
39
37
|
if (chunk.length > 0) {
|
|
40
38
|
yield chunk;
|
|
41
39
|
}
|
|
42
|
-
}
|
|
40
|
+
},
|
|
43
41
|
};
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
const pExecFile = require$$1.promisify(
|
|
44
|
+
const pExecFile = require$$1.promisify(require$$1$1.execFile);
|
|
47
45
|
|
|
48
46
|
async function chunkedExec(binary, paths, maxPaths) {
|
|
49
47
|
for (const chunk of chunkify(paths, maxPaths)) {
|
|
50
48
|
// eslint-disable-next-line no-await-in-loop
|
|
51
|
-
await pExecFile(require$$0.fileURLToPath(binary), chunk);
|
|
49
|
+
await pExecFile(require$$0.fileURLToPath(binary).replace("app.asar", "app.asar.unpacked"), chunk);
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var font = require('font-ls');
|
|
4
|
+
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
/**
|
|
7
|
+
* 判断字符串是否全部为 ASCII 字符
|
|
8
|
+
* @param str 要检查的字符串
|
|
9
|
+
* @returns 如果字符串全部为 ASCII 字符,则返回 true;否则返回 false
|
|
10
|
+
*/
|
|
11
|
+
function isAscii(str) {
|
|
12
|
+
// eslint-disable-next-line no-control-regex
|
|
13
|
+
return /^[\x00-\x7F]*$/.test(str);
|
|
14
|
+
}
|
|
15
|
+
async function getFontsList() {
|
|
16
|
+
const fonts = await font.getAvailableFonts();
|
|
17
|
+
return fonts.map((font) => {
|
|
18
|
+
if (isAscii(font.postscriptName)) {
|
|
19
|
+
return {
|
|
20
|
+
postscriptName: font.postscriptName,
|
|
21
|
+
fullName: font.localizedName,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return {
|
|
26
|
+
postscriptName: font.enName,
|
|
27
|
+
fullName: font.localizedName,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
exports.getFontsList = getFontsList;
|