bililive-cli 1.7.2 → 1.9.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 CHANGED
@@ -1,53 +1,53 @@
1
- # 介绍
2
-
3
- [biliLive-tools](https://github.com/renmu123/biliLive-tools)的命令行版本
4
-
5
- # 安装
6
-
7
- `npm i bililive-cli -g`
8
-
9
- 也有可能需要使用
10
-
11
- `npm i bililive-cli -g --force`
12
-
13
- 或者下载二进制[文件](https://github.com/renmu123/biliLive-tools/releases)
14
-
15
- # 使用
16
-
17
- ## 配置
18
-
19
- 使用前通过 `biliLive config gen` 生成默认配置文件,如果你已经安装客户端,相关配置会被自动设置(仅限win)
20
- 如果你仅使用上传功能,那么无需配置二进制文件,二进制文件可在[这里](https://github.com/renmu123/biliLive-tools/releases/tag/0.2.1)找到,以`platform--arch-version`命名,如果没有当前版本,以最近版本为准,配置为绝对路径以及分配执行权限
21
-
22
- ```js
23
- {
24
- port: 18010, // 启动端口,如果不希望与客户端的冲突,请修改为其他端口号
25
- host: "127.0.0.1", // host,如果需要暴露出去,可以修改为0.0.0.0
26
- configFolder: "config", // 配置文件夹
27
- ffmpegPath: "ffmpeg.exe", // ffmpeg二进制路径
28
- ffprobePath: "ffprobe.exe", // ffprobe二进制路径
29
- danmakuFactoryPath: "DanmakuFactory.exe", // DanmakuFactory二进制路径
30
- logPath: "main.log", // log文件路径,绝对路径
31
- }
32
- ```
33
-
34
- ## 运行
35
-
36
- ```bash
37
- Usage: biliLive server
38
-
39
- 启动web服务器
40
-
41
- Options:
42
- -c, --config 配置文件
43
- -h, --host host,覆盖配置文件的参数,可选
44
- -p, --port port,覆盖配置文件的参数,可选
45
- ```
46
-
47
- ## webui
48
-
49
- 鉴权密钥为 `config/appConfig.json` 的 `passKey` 参数,或者设置 `BILILIVE_TOOLS_PASSKEY` 环境变量
50
-
51
- 你可以选择线上页面:https://bililive.irenmu.com/
52
-
53
- 或者也可以自行[部署](https://github.com/renmu123/biliLive-webui)
1
+ # 介绍
2
+
3
+ [biliLive-tools](https://github.com/renmu123/biliLive-tools)的命令行版本
4
+
5
+ # 安装
6
+
7
+ `npm i bililive-cli -g`
8
+
9
+ 也有可能需要使用
10
+
11
+ `npm i bililive-cli -g --force`
12
+
13
+ <!-- 或者下载二进制[文件](https://github.com/renmu123/biliLive-tools/releases) -->
14
+
15
+ # 使用
16
+
17
+ ## 配置
18
+
19
+ 使用前通过 `biliLive config gen` 生成默认配置文件,如果你已经安装客户端,相关配置会被自动设置(仅限win)
20
+ 如果你仅使用上传功能,那么无需配置二进制文件,二进制文件可在[这里](https://github.com/renmu123/biliLive-tools/releases/tag/0.2.1)找到,以`platform--arch-version`命名,如果没有当前版本,以最近版本为准,配置为绝对路径以及分配执行权限
21
+
22
+ ```js
23
+ {
24
+ port: 18010, // 启动端口,如果不希望与客户端的冲突,请修改为其他端口号
25
+ host: "127.0.0.1", // host,如果需要暴露出去,可以修改为0.0.0.0
26
+ configFolder: "config", // 配置文件夹
27
+ ffmpegPath: "ffmpeg.exe", // ffmpeg二进制路径
28
+ ffprobePath: "ffprobe.exe", // ffprobe二进制路径
29
+ danmakuFactoryPath: "DanmakuFactory.exe", // DanmakuFactory二进制路径
30
+ logPath: "main.log", // log文件路径,绝对路径
31
+ }
32
+ ```
33
+
34
+ ## 运行
35
+
36
+ ```bash
37
+ Usage: biliLive server
38
+
39
+ 启动web服务器
40
+
41
+ Options:
42
+ -c, --config 配置文件
43
+ -h, --host host,覆盖配置文件的参数,可选
44
+ -p, --port port,覆盖配置文件的参数,可选
45
+ ```
46
+
47
+ ## webui
48
+
49
+ 鉴权密钥为 `config/appConfig.json` 的 `passKey` 参数,或者设置 `BILILIVE_TOOLS_PASSKEY` 环境变量
50
+
51
+ 你可以选择线上页面:https://bililive.irenmu.com/
52
+
53
+ 或者也可以自行[部署](https://github.com/renmu123/biliLive-webui)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bililive-cli",
3
- "version": "1.7.2",
3
+ "version": "1.9.0",
4
4
  "type": "module",
5
5
  "description": "biliLive-tools的cli程序",
6
6
  "main": "./lib/index.js",
@@ -25,9 +25,9 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@napi-rs/canvas": "^0.1.60",
28
- "font-ls": "0.3.2",
28
+ "font-ls": "0.4.0",
29
29
  "ntsuspend": "^1.0.2",
30
- "better-sqlite3": "11.6.0"
30
+ "better-sqlite3": "11.9.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/cli-progress": "^3.11.6",
@@ -37,9 +37,9 @@
37
37
  "commander": "^12.1.0",
38
38
  "rimraf": "^6.0.1",
39
39
  "tsx": "^4.19.2",
40
- "@biliLive-tools/http": "1.7.2",
41
- "@biliLive-tools/shared": "1.7.2",
42
- "@biliLive-tools/types": "1.7.2"
40
+ "@biliLive-tools/http": "1.9.0",
41
+ "@biliLive-tools/shared": "1.9.0",
42
+ "@biliLive-tools/types": "1.9.0"
43
43
  },
44
44
  "scripts": {
45
45
  "start": "tsx src/index.ts",
@@ -1,53 +0,0 @@
1
- 'use strict';
2
-
3
- var require$$1 = require('node:util');
4
- var require$$1$1 = require('node:child_process');
5
- var require$$0 = require('node:url');
6
-
7
- function chunkify(iterable, chunkSize) {
8
- if (typeof iterable[Symbol.iterator] !== 'function') {
9
- throw new TypeError('Expected an `Iterable` in the first argument');
10
- }
11
-
12
- if (!(Number.isSafeInteger(chunkSize) && chunkSize > 0)) {
13
- throw new TypeError(`Expected \`chunkSize\` to be an integer from 1 and up, got \`${chunkSize}\``);
14
- }
15
-
16
- return {
17
- * [Symbol.iterator]() {
18
- if (Array.isArray(iterable)) {
19
- for (let index = 0; index < iterable.length; index += chunkSize) {
20
- yield iterable.slice(index, index + chunkSize);
21
- }
22
-
23
- return;
24
- }
25
-
26
- let chunk = [];
27
-
28
- for (const value of iterable) {
29
- chunk.push(value);
30
-
31
- if (chunk.length === chunkSize) {
32
- yield chunk;
33
- chunk = [];
34
- }
35
- }
36
-
37
- if (chunk.length > 0) {
38
- yield chunk;
39
- }
40
- },
41
- };
42
- }
43
-
44
- const pExecFile = require$$1.promisify(require$$1$1.execFile);
45
-
46
- async function chunkedExec(binary, paths, maxPaths) {
47
- for (const chunk of chunkify(paths, maxPaths)) {
48
- // eslint-disable-next-line no-await-in-loop
49
- await pExecFile(require$$0.fileURLToPath(binary).replace("app.asar", "app.asar.unpacked"), chunk);
50
- }
51
- }
52
-
53
- exports.chunkedExec = chunkedExec;
@@ -1,33 +0,0 @@
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;