bililive-cli 3.21.0 → 3.22.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.
@@ -4,7 +4,7 @@ var path$3 = require('node:path');
4
4
  var http$4 = require('node:http');
5
5
  var urlLib = require('node:url');
6
6
  var https = require('node:https');
7
- var index$1 = require('./index-BC-o_4nM.cjs');
7
+ var index$1 = require('./index-ByKMHGR7.cjs');
8
8
  var require$$0$5 = require('tty');
9
9
  var require$$1$4 = require('util');
10
10
  var require$$0$b = require('assert');
@@ -56217,7 +56217,7 @@ router$c.get("/video/:id", async (ctx) => {
56217
56217
  router$c.post("/video", async (ctx) => {
56218
56218
  const preset = container.resolve("videoPreset");
56219
56219
  const data = ctx.request.body;
56220
- data.config = index$1.omit(data.config, ["dtime"]);
56220
+ data.config = index$1.omit(data.config, ["dtime", "staffs"]);
56221
56221
  const [status, msg] = index$1.validateBiliupConfig(data.config);
56222
56222
  if (!status) {
56223
56223
  throw new Error(msg || "配置验证失败");
@@ -56231,7 +56231,7 @@ router$c.del("/video/:id", async (ctx) => {
56231
56231
  router$c.put("/video/:id", async (ctx) => {
56232
56232
  const preset = container.resolve("videoPreset");
56233
56233
  const data = ctx.request.body;
56234
- data.config = index$1.omit(data.config, ["dtime"]);
56234
+ data.config = index$1.omit(data.config, ["dtime", "staffs"]);
56235
56235
  const [status, msg] = index$1.validateBiliupConfig(data.config);
56236
56236
  if (!status) {
56237
56237
  throw new Error(msg || "配置验证失败");
@@ -62606,7 +62606,7 @@ class MultipartBody {
62606
62606
  let fileFromPathWarned = false;
62607
62607
  async function fileFromPath(path, ...args) {
62608
62608
  // this import fails in environments that don't handle export maps correctly, like old versions of Jest
62609
- const { fileFromPath: _fileFromPath } = await Promise.resolve().then(function () { return require('./fileFromPath-CXG-E0Z1.cjs'); });
62609
+ const { fileFromPath: _fileFromPath } = await Promise.resolve().then(function () { return require('./fileFromPath-1V4Za2hv.cjs'); });
62610
62610
  if (!fileFromPathWarned) {
62611
62611
  console.warn(`fileFromPath is deprecated; use fs.createReadStream(${JSON.stringify(path)}) instead`);
62612
62612
  fileFromPathWarned = true;
@@ -74397,6 +74397,11 @@ router$9.post("/upload", async (ctx) => {
74397
74397
  ctx.status = 400;
74398
74398
  return;
74399
74399
  }
74400
+ if (data.config.staffs && data.config.staffs.length > 0) {
74401
+ if (appConfig?.get("biliUpload")?.useBCutAPI) {
74402
+ throw new Error("联合投稿暂不支持必剪接口");
74403
+ }
74404
+ }
74400
74405
  if (data.vid) {
74401
74406
  const task = await index$1.biliApi.editMedia(data.vid, data.videos, data.config, data.uid, {
74402
74407
  afterUploadDeletAction: data.options?.removeOriginAfterUploadCheck
@@ -74515,6 +74520,18 @@ router$9.post("/formatDesc", async (ctx) => {
74515
74520
  }, template);
74516
74521
  ctx.body = desc;
74517
74522
  });
74523
+ // 搜索联合投稿UP主
74524
+ router$9.get("/searchStaff", async (ctx) => {
74525
+ const { kw, uid } = ctx.request.query;
74526
+ const data = await index$1.biliApi.searchStaffUser(Number(uid), kw);
74527
+ ctx.body = data;
74528
+ });
74529
+ // 获取联合投稿剩余次数
74530
+ router$9.get("/staffRemaining", async (ctx) => {
74531
+ const { uid } = ctx.request.query;
74532
+ const data = await index$1.biliApi.getStaffRemaining(Number(uid));
74533
+ ctx.body = data;
74534
+ });
74518
74535
 
74519
74536
  async function flvRepair(input, output, opts) {
74520
74537
  // 如果不是flv,直接报错
@@ -79258,7 +79275,7 @@ let handler;
79258
79275
  let appConfig;
79259
79276
  let container;
79260
79277
  const fileCache = createFileCache();
79261
- path$3.dirname(urlLib.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CNjM3nfn.cjs', document.baseURI).href))));
79278
+ path$3.dirname(urlLib.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-Db-mrTi0.cjs', document.baseURI).href))));
79262
79279
  const authMiddleware = (passKey) => {
79263
79280
  return async (ctx, next) => {
79264
79281
  const authHeader = ctx.headers["authorization"] || ctx.request.query.auth;
package/lib/index.cjs CHANGED
@@ -3715,7 +3715,7 @@ const {
3715
3715
  Help,
3716
3716
  } = commander;
3717
3717
 
3718
- var version = "3.21.0";
3718
+ var version = "3.22.0";
3719
3719
 
3720
3720
  process.on("uncaughtException", function (error) {
3721
3721
  console.error(`${new Date().toISOString()} uncaughtException`, error);
@@ -3741,8 +3741,8 @@ program
3741
3741
  throw new Error(`${c.configFolder}参数不存在,请先重新运行 config gen 命令`);
3742
3742
  }
3743
3743
  // 下面两行顺序不能换(
3744
- const { init } = await Promise.resolve().then(function () { return require('./index-BC-o_4nM.cjs'); }).then(function (n) { return n.index; });
3745
- const { serverStart } = await Promise.resolve().then(function () { return require('./index-CNjM3nfn.cjs'); }).then(function (n) { return n.index; });
3744
+ const { init } = await Promise.resolve().then(function () { return require('./index-ByKMHGR7.cjs'); }).then(function (n) { return n.index; });
3745
+ const { serverStart } = await Promise.resolve().then(function () { return require('./index-Db-mrTi0.cjs'); }).then(function (n) { return n.index; });
3746
3746
  const globalConfig = {
3747
3747
  ffmpegPresetPath: path$1.join(c.configFolder, "ffmpeg_presets.json"),
3748
3748
  videoPresetPath: path$1.join(c.configFolder, "presets.json"),
@@ -4,7 +4,7 @@ var os$3 = require('node:os');
4
4
  var path$5 = require('node:path');
5
5
  var fs$3 = require('node:fs');
6
6
  var crypto = require('node:crypto');
7
- var index = require('./index-BC-o_4nM.cjs');
7
+ var index = require('./index-ByKMHGR7.cjs');
8
8
  var require$$0$1 = require('fs');
9
9
  var require$$0 = require('path');
10
10
  var require$$0$2 = require('child_process');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bililive-cli",
3
- "version": "3.21.0",
3
+ "version": "3.22.0",
4
4
  "type": "module",
5
5
  "description": "biliLive-tools的cli程序",
6
6
  "main": "./lib/index.js",
@@ -24,7 +24,7 @@
24
24
  "lib"
25
25
  ],
26
26
  "dependencies": {
27
- "@napi-rs/canvas": "^0.1.60",
27
+ "@napi-rs/canvas": "^1.0.9",
28
28
  "font-ls": "0.6.6",
29
29
  "better-sqlite3": "12.11.1",
30
30
  "shazamio-core": "^1.3.1",
@@ -41,9 +41,9 @@
41
41
  "commander": "^12.1.0",
42
42
  "rimraf": "^6.0.1",
43
43
  "tsx": "^4.19.2",
44
- "@biliLive-tools/shared": "3.21.0",
45
- "@biliLive-tools/types": "3.21.0",
46
- "@biliLive-tools/http": "3.21.0"
44
+ "@biliLive-tools/shared": "3.22.0",
45
+ "@biliLive-tools/types": "3.22.0",
46
+ "@biliLive-tools/http": "3.22.0"
47
47
  },
48
48
  "scripts": {
49
49
  "start": "tsx src/index.ts",