llonebot-dist 7.12.0 → 7.12.1
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.
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"webui": {
|
|
3
|
+
"enable": true,
|
|
4
|
+
"host": "127.0.0.1",
|
|
5
|
+
"port": 3080
|
|
6
|
+
},
|
|
7
|
+
"milky": {
|
|
8
|
+
"enable": false,
|
|
9
|
+
"reportSelfMessage": false,
|
|
10
|
+
"http": {
|
|
11
|
+
"host": "127.0.0.1",
|
|
12
|
+
"port": 3010,
|
|
13
|
+
"prefix": "",
|
|
14
|
+
"accessToken": ""
|
|
15
|
+
},
|
|
16
|
+
"webhook": {
|
|
17
|
+
"urls": [],
|
|
18
|
+
"accessToken": ""
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"satori": {
|
|
22
|
+
"enable": false,
|
|
23
|
+
"host": "127.0.0.1",
|
|
24
|
+
"port": 5600,
|
|
25
|
+
"token": ""
|
|
26
|
+
},
|
|
27
|
+
"ob11": {
|
|
28
|
+
"enable": true,
|
|
29
|
+
"connect": [
|
|
30
|
+
{
|
|
31
|
+
"type": "ws",
|
|
32
|
+
"enable": false,
|
|
33
|
+
"host": "127.0.0.1",
|
|
34
|
+
"port": 3001,
|
|
35
|
+
"heartInterval": 60000,
|
|
36
|
+
"token": "",
|
|
37
|
+
"reportSelfMessage": false,
|
|
38
|
+
"reportOfflineMessage": false,
|
|
39
|
+
"messageFormat": "array",
|
|
40
|
+
"debug": false
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "ws-reverse",
|
|
44
|
+
"enable": false,
|
|
45
|
+
"url": "",
|
|
46
|
+
"heartInterval": 60000,
|
|
47
|
+
"token": "",
|
|
48
|
+
"reportSelfMessage": false,
|
|
49
|
+
"reportOfflineMessage": false,
|
|
50
|
+
"messageFormat": "array",
|
|
51
|
+
"debug": false
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "http",
|
|
55
|
+
"enable": false,
|
|
56
|
+
"host": "127.0.0.1",
|
|
57
|
+
"port": 3000,
|
|
58
|
+
"token": "",
|
|
59
|
+
"reportSelfMessage": false,
|
|
60
|
+
"reportOfflineMessage": false,
|
|
61
|
+
"messageFormat": "array",
|
|
62
|
+
"debug": false
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "http-post",
|
|
66
|
+
"enable": false,
|
|
67
|
+
"url": "",
|
|
68
|
+
"enableHeart": false,
|
|
69
|
+
"heartInterval": 60000,
|
|
70
|
+
"token": "",
|
|
71
|
+
"reportSelfMessage": false,
|
|
72
|
+
"reportOfflineMessage": false,
|
|
73
|
+
"messageFormat": "array",
|
|
74
|
+
"debug": false
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"enableLocalFile2Url": false,
|
|
79
|
+
"log": true,
|
|
80
|
+
"autoDeleteFile": false,
|
|
81
|
+
"autoDeleteFileSecond": 60,
|
|
82
|
+
"musicSignUrl": "https://llob.linyuchen.net/sign/music",
|
|
83
|
+
"msgCacheExpire": 120,
|
|
84
|
+
"ffmpeg": ""
|
|
85
|
+
}
|
package/llbot.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import * as path$4 from "node:path";
|
|
3
3
|
import path, { dirname } from "node:path";
|
|
4
|
-
import
|
|
5
|
-
import fs
|
|
4
|
+
import fsPromise, { access, copyFile, mkdir, readFile, stat, unlink, writeFile } from "node:fs/promises";
|
|
5
|
+
import fs, { createReadStream, existsSync, statSync } from "fs";
|
|
6
6
|
import { Readable } from "stream";
|
|
7
|
-
import * as fs$
|
|
8
|
-
import fs$
|
|
7
|
+
import * as fs$5 from "node:fs";
|
|
8
|
+
import fs$1, { appendFile, appendFileSync, createReadStream as createReadStream$1, existsSync as existsSync$1, mkdirSync, promises, stat as stat$1, watch } from "node:fs";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import { Binary, Time, camelize, clone, deduplicate, deepEqual, defineProperty, difference, filterKeys, hyphenate, is, isNonNullable, isNullable, isPlainObject, makeArray, mapValues, noop, omit, pick, remove, valueMap } from "cosmokit";
|
|
11
11
|
import { Exporter, Factory } from "reggol";
|
|
@@ -21,7 +21,7 @@ import { createServer } from "http";
|
|
|
21
21
|
import { Http2ServerRequest, constants as constants$1 } from "http2";
|
|
22
22
|
import crypto$2 from "crypto";
|
|
23
23
|
import { deflateSync, gunzipSync, gzipSync, inflateSync } from "node:zlib";
|
|
24
|
-
import fsPromise, { stat as stat$2, unlink as unlink$1 } from "fs/promises";
|
|
24
|
+
import fsPromise$1, { stat as stat$2, unlink as unlink$1 } from "fs/promises";
|
|
25
25
|
import http, { STATUS_CODES, request } from "node:http";
|
|
26
26
|
import { inspect, isDeepStrictEqual } from "node:util";
|
|
27
27
|
import { Transform } from "node:stream";
|
|
@@ -3964,7 +3964,7 @@ var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3964
3964
|
//#endregion
|
|
3965
3965
|
//#region node_modules/qrcode/lib/renderer/png.js
|
|
3966
3966
|
var require_png = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3967
|
-
var fs$
|
|
3967
|
+
var fs$10 = __require("fs");
|
|
3968
3968
|
var PNG = require_png$1().PNG;
|
|
3969
3969
|
var Utils = require_utils$1();
|
|
3970
3970
|
exports.render = function render(qrData, options) {
|
|
@@ -4016,7 +4016,7 @@ var require_png = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4016
4016
|
called = true;
|
|
4017
4017
|
cb.apply(null, args);
|
|
4018
4018
|
};
|
|
4019
|
-
const stream = fs$
|
|
4019
|
+
const stream = fs$10.createWriteStream(path);
|
|
4020
4020
|
stream.on("error", done);
|
|
4021
4021
|
stream.on("close", done);
|
|
4022
4022
|
exports.renderToFileStream(stream, qrData, options);
|
|
@@ -6614,7 +6614,7 @@ async function logSummaryMessage(ctx, message) {
|
|
|
6614
6614
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6615
6615
|
module.exports = isexe;
|
|
6616
6616
|
isexe.sync = sync;
|
|
6617
|
-
var fs$
|
|
6617
|
+
var fs$9 = __require("fs");
|
|
6618
6618
|
function checkPathExt(path, options) {
|
|
6619
6619
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
6620
6620
|
if (!pathext) return true;
|
|
@@ -6631,12 +6631,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6631
6631
|
return checkPathExt(path, options);
|
|
6632
6632
|
}
|
|
6633
6633
|
function isexe(path, options, cb) {
|
|
6634
|
-
fs$
|
|
6634
|
+
fs$9.stat(path, function(er, stat) {
|
|
6635
6635
|
cb(er, er ? false : checkStat(stat, path, options));
|
|
6636
6636
|
});
|
|
6637
6637
|
}
|
|
6638
6638
|
function sync(path, options) {
|
|
6639
|
-
return checkStat(fs$
|
|
6639
|
+
return checkStat(fs$9.statSync(path), path, options);
|
|
6640
6640
|
}
|
|
6641
6641
|
}));
|
|
6642
6642
|
//#endregion
|
|
@@ -6644,14 +6644,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6644
6644
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6645
6645
|
module.exports = isexe;
|
|
6646
6646
|
isexe.sync = sync;
|
|
6647
|
-
var fs$
|
|
6647
|
+
var fs$8 = __require("fs");
|
|
6648
6648
|
function isexe(path, options, cb) {
|
|
6649
|
-
fs$
|
|
6649
|
+
fs$8.stat(path, function(er, stat) {
|
|
6650
6650
|
cb(er, er ? false : checkStat(stat, options));
|
|
6651
6651
|
});
|
|
6652
6652
|
}
|
|
6653
6653
|
function sync(path, options) {
|
|
6654
|
-
return checkStat(fs$
|
|
6654
|
+
return checkStat(fs$8.statSync(path), options);
|
|
6655
6655
|
}
|
|
6656
6656
|
function checkStat(stat, options) {
|
|
6657
6657
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -9061,7 +9061,7 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9061
9061
|
//#endregion
|
|
9062
9062
|
//#region node_modules/fluent-ffmpeg/lib/capabilities.js
|
|
9063
9063
|
var require_capabilities = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9064
|
-
var fs$
|
|
9064
|
+
var fs$7 = __require("fs");
|
|
9065
9065
|
var path$7 = __require("path");
|
|
9066
9066
|
var async = require_async();
|
|
9067
9067
|
var utils = require_utils();
|
|
@@ -9137,7 +9137,7 @@ var require_capabilities = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9137
9137
|
proto._getFfmpegPath = function(callback) {
|
|
9138
9138
|
if ("ffmpegPath" in cache) return callback(null, cache.ffmpegPath);
|
|
9139
9139
|
async.waterfall([function(cb) {
|
|
9140
|
-
if (process.env.FFMPEG_PATH) fs$
|
|
9140
|
+
if (process.env.FFMPEG_PATH) fs$7.exists(process.env.FFMPEG_PATH, function(exists) {
|
|
9141
9141
|
if (exists) cb(null, process.env.FFMPEG_PATH);
|
|
9142
9142
|
else cb(null, "");
|
|
9143
9143
|
});
|
|
@@ -9168,7 +9168,7 @@ var require_capabilities = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9168
9168
|
if ("ffprobePath" in cache) return callback(null, cache.ffprobePath);
|
|
9169
9169
|
async.waterfall([
|
|
9170
9170
|
function(cb) {
|
|
9171
|
-
if (process.env.FFPROBE_PATH) fs$
|
|
9171
|
+
if (process.env.FFPROBE_PATH) fs$7.exists(process.env.FFPROBE_PATH, function(exists) {
|
|
9172
9172
|
cb(null, exists ? process.env.FFPROBE_PATH : "");
|
|
9173
9173
|
});
|
|
9174
9174
|
else cb(null, "");
|
|
@@ -9186,7 +9186,7 @@ var require_capabilities = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9186
9186
|
else if (ffmpeg.length) {
|
|
9187
9187
|
var name = utils.isWindows ? "ffprobe.exe" : "ffprobe";
|
|
9188
9188
|
var ffprobe = path$7.join(path$7.dirname(ffmpeg), name);
|
|
9189
|
-
fs$
|
|
9189
|
+
fs$7.exists(ffprobe, function(exists) {
|
|
9190
9190
|
cb(null, exists ? ffprobe : "");
|
|
9191
9191
|
});
|
|
9192
9192
|
} else cb(null, "");
|
|
@@ -9211,14 +9211,14 @@ var require_capabilities = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9211
9211
|
if ("flvtoolPath" in cache) return callback(null, cache.flvtoolPath);
|
|
9212
9212
|
async.waterfall([
|
|
9213
9213
|
function(cb) {
|
|
9214
|
-
if (process.env.FLVMETA_PATH) fs$
|
|
9214
|
+
if (process.env.FLVMETA_PATH) fs$7.exists(process.env.FLVMETA_PATH, function(exists) {
|
|
9215
9215
|
cb(null, exists ? process.env.FLVMETA_PATH : "");
|
|
9216
9216
|
});
|
|
9217
9217
|
else cb(null, "");
|
|
9218
9218
|
},
|
|
9219
9219
|
function(flvtool, cb) {
|
|
9220
9220
|
if (flvtool.length) return cb(null, flvtool);
|
|
9221
|
-
if (process.env.FLVTOOL2_PATH) fs$
|
|
9221
|
+
if (process.env.FLVTOOL2_PATH) fs$7.exists(process.env.FLVTOOL2_PATH, function(exists) {
|
|
9222
9222
|
cb(null, exists ? process.env.FLVTOOL2_PATH : "");
|
|
9223
9223
|
});
|
|
9224
9224
|
else cb(null, "");
|
|
@@ -9723,7 +9723,7 @@ var require_ffprobe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9723
9723
|
//#endregion
|
|
9724
9724
|
//#region node_modules/fluent-ffmpeg/lib/recipes.js
|
|
9725
9725
|
var require_recipes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9726
|
-
var fs$
|
|
9726
|
+
var fs$6 = __require("fs");
|
|
9727
9727
|
var path$6 = __require("path");
|
|
9728
9728
|
var PassThrough$4 = __require("stream").PassThrough;
|
|
9729
9729
|
var async = require_async();
|
|
@@ -9929,8 +9929,8 @@ var require_recipes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9929
9929
|
next(null, filenames);
|
|
9930
9930
|
},
|
|
9931
9931
|
function createDirectory(filenames, next) {
|
|
9932
|
-
fs$
|
|
9933
|
-
if (!exists) fs$
|
|
9932
|
+
fs$6.exists(config.folder, function(exists) {
|
|
9933
|
+
if (!exists) fs$6.mkdir(config.folder, function(err) {
|
|
9934
9934
|
if (err) next(err);
|
|
9935
9935
|
else next(null, filenames);
|
|
9936
9936
|
});
|
|
@@ -10178,7 +10178,7 @@ function setFFMpegPath(ffmpegPath) {
|
|
|
10178
10178
|
path.join(import.meta.dirname, "ffmpeg.exe"),
|
|
10179
10179
|
process.env["FFMPEG_PATH"] || ""
|
|
10180
10180
|
];
|
|
10181
|
-
for (const p of paths) if (fs$
|
|
10181
|
+
for (const p of paths) if (fs$1.existsSync(p)) {
|
|
10182
10182
|
import_fluent_ffmpeg.default.setFfmpegPath(p);
|
|
10183
10183
|
console.log("set ffmpeg successfully", p);
|
|
10184
10184
|
break;
|
|
@@ -11292,7 +11292,7 @@ var OB11HeartbeatEvent = class extends OB11BaseMetaEvent {
|
|
|
11292
11292
|
};
|
|
11293
11293
|
//#endregion
|
|
11294
11294
|
//#region src/version.ts
|
|
11295
|
-
var version$2 = "7.12.
|
|
11295
|
+
var version$2 = "7.12.1";
|
|
11296
11296
|
//#endregion
|
|
11297
11297
|
//#region node_modules/sift/es5m/index.js
|
|
11298
11298
|
/******************************************************************************
|
|
@@ -16951,7 +16951,7 @@ var processQueue = async () => {
|
|
|
16951
16951
|
const promises = queue.splice(0, concurrency).map(async ({ filePath, resolve, reject }) => {
|
|
16952
16952
|
let handle;
|
|
16953
16953
|
try {
|
|
16954
|
-
handle = await fs$
|
|
16954
|
+
handle = await fs$5.promises.open(path$4.resolve(filePath), "r");
|
|
16955
16955
|
} catch (err) {
|
|
16956
16956
|
return reject(err);
|
|
16957
16957
|
}
|
|
@@ -16998,7 +16998,7 @@ function checkUriType(uri) {
|
|
|
16998
16998
|
if (uri.startsWith("data:")) return { type: FileUriType.DataURL };
|
|
16999
16999
|
if (uri.startsWith("http://") || uri.startsWith("https://")) return { type: FileUriType.RemoteURL };
|
|
17000
17000
|
if (uri.startsWith("file://")) return { type: FileUriType.FileURL };
|
|
17001
|
-
if (fs$
|
|
17001
|
+
if (fs$1.existsSync(uri)) return { type: FileUriType.Path };
|
|
17002
17002
|
return { type: FileUriType.Unknown };
|
|
17003
17003
|
}
|
|
17004
17004
|
async function fetchFile(url, headersInit) {
|
|
@@ -17028,7 +17028,7 @@ async function uri2local(ctx, uri, needExt) {
|
|
|
17028
17028
|
const { type } = checkUriType(uri);
|
|
17029
17029
|
if (type === FileUriType.FileURL) {
|
|
17030
17030
|
const filePath = fileURLToPath(uri);
|
|
17031
|
-
if (!fs$
|
|
17031
|
+
if (!fs$1.existsSync(filePath)) return {
|
|
17032
17032
|
success: false,
|
|
17033
17033
|
errMsg: "路径不存在",
|
|
17034
17034
|
fileName: "",
|
|
@@ -17054,12 +17054,12 @@ async function uri2local(ctx, uri, needExt) {
|
|
|
17054
17054
|
const res = await fetchFile(uri);
|
|
17055
17055
|
let fileName = randomUUID();
|
|
17056
17056
|
let filePath = path.join(TEMP_DIR, fileName);
|
|
17057
|
-
await
|
|
17057
|
+
await fsPromise.writeFile(filePath, res.data);
|
|
17058
17058
|
if (needExt) {
|
|
17059
17059
|
const ext = (await ctx.ntFileApi.getFileType(filePath)).ext;
|
|
17060
17060
|
fileName += `.${ext}`;
|
|
17061
17061
|
const newPath = `${filePath}.${ext}`;
|
|
17062
|
-
await
|
|
17062
|
+
await fsPromise.rename(filePath, newPath);
|
|
17063
17063
|
filePath = newPath;
|
|
17064
17064
|
}
|
|
17065
17065
|
return {
|
|
@@ -17082,11 +17082,11 @@ async function uri2local(ctx, uri, needExt) {
|
|
|
17082
17082
|
let filename = randomUUID();
|
|
17083
17083
|
let filePath = path.join(TEMP_DIR, filename);
|
|
17084
17084
|
const base64 = uri.replace(/^base64:\/\//, "");
|
|
17085
|
-
await
|
|
17085
|
+
await fsPromise.writeFile(filePath, base64, "base64");
|
|
17086
17086
|
if (needExt) {
|
|
17087
17087
|
const ext = (await ctx.ntFileApi.getFileType(filePath)).ext;
|
|
17088
17088
|
filename += `.${ext}`;
|
|
17089
|
-
await
|
|
17089
|
+
await fsPromise.rename(filePath, `${filePath}.${ext}`);
|
|
17090
17090
|
filePath = `${filePath}.${ext}`;
|
|
17091
17091
|
}
|
|
17092
17092
|
return {
|
|
@@ -17103,11 +17103,11 @@ async function uri2local(ctx, uri, needExt) {
|
|
|
17103
17103
|
let filename = randomUUID();
|
|
17104
17104
|
const [, _type, base64] = capture;
|
|
17105
17105
|
let filePath = path.join(TEMP_DIR, filename);
|
|
17106
|
-
await
|
|
17106
|
+
await fsPromise.writeFile(filePath, base64, "base64");
|
|
17107
17107
|
if (needExt) {
|
|
17108
17108
|
const ext = (await ctx.ntFileApi.getFileType(filePath)).ext;
|
|
17109
17109
|
filename += `.${ext}`;
|
|
17110
|
-
await
|
|
17110
|
+
await fsPromise.rename(filePath, `${filePath}.${ext}`);
|
|
17111
17111
|
filePath = `${filePath}.${ext}`;
|
|
17112
17112
|
}
|
|
17113
17113
|
return {
|
|
@@ -17165,13 +17165,13 @@ async function getImageSize(path) {
|
|
|
17165
17165
|
}
|
|
17166
17166
|
async function getMd5HexFromFile(filePath) {
|
|
17167
17167
|
const hash = createHash("md5");
|
|
17168
|
-
const stream = fs$
|
|
17168
|
+
const stream = fs$1.createReadStream(filePath);
|
|
17169
17169
|
for await (const chunk of stream) hash.update(chunk);
|
|
17170
17170
|
return hash.digest("hex");
|
|
17171
17171
|
}
|
|
17172
17172
|
async function getSha1HexFromFile(filePath) {
|
|
17173
17173
|
const hash = createHash("sha1");
|
|
17174
|
-
const stream = fs$
|
|
17174
|
+
const stream = fs$1.createReadStream(filePath);
|
|
17175
17175
|
for await (const chunk of stream) hash.update(chunk);
|
|
17176
17176
|
return hash.digest("hex");
|
|
17177
17177
|
}
|
|
@@ -17180,13 +17180,13 @@ function getMd5BufferFromBuffer(buf) {
|
|
|
17180
17180
|
}
|
|
17181
17181
|
async function getMd5BufferFromFile(filePath) {
|
|
17182
17182
|
const hash = createHash("md5");
|
|
17183
|
-
const stream = fs$
|
|
17183
|
+
const stream = fs$1.createReadStream(filePath);
|
|
17184
17184
|
for await (const chunk of stream) hash.update(chunk);
|
|
17185
17185
|
return hash.digest();
|
|
17186
17186
|
}
|
|
17187
17187
|
async function getSha1BufferFromFile(filePath) {
|
|
17188
17188
|
const hash = createHash("sha1");
|
|
17189
|
-
const stream = fs$
|
|
17189
|
+
const stream = fs$1.createReadStream(filePath);
|
|
17190
17190
|
for await (const chunk of stream) hash.update(chunk);
|
|
17191
17191
|
return hash.digest();
|
|
17192
17192
|
}
|
|
@@ -17422,7 +17422,7 @@ async function calculateSha1StreamBytes(filePath) {
|
|
|
17422
17422
|
let bytesRead = 0;
|
|
17423
17423
|
let nextBlockBoundary = blockSize;
|
|
17424
17424
|
const byteArrayList = [];
|
|
17425
|
-
const readable = fs$
|
|
17425
|
+
const readable = fs$1.createReadStream(filePath);
|
|
17426
17426
|
for await (const chunk of readable) {
|
|
17427
17427
|
let buf;
|
|
17428
17428
|
if (tail.length > 0) {
|
|
@@ -17447,7 +17447,7 @@ async function calculateSha1StreamBytes(filePath) {
|
|
|
17447
17447
|
}
|
|
17448
17448
|
async function readAndHash10M(filePath) {
|
|
17449
17449
|
const maxSize = 10002432;
|
|
17450
|
-
const fd = await
|
|
17450
|
+
const fd = await fsPromise.open(filePath, "r");
|
|
17451
17451
|
const buffer = Buffer.allocUnsafe(maxSize);
|
|
17452
17452
|
const { bytesRead } = await fd.read(buffer, 0, maxSize, 0);
|
|
17453
17453
|
await fd.close();
|
|
@@ -17489,13 +17489,13 @@ var TriSha1 = class {
|
|
|
17489
17489
|
};
|
|
17490
17490
|
async function calculateTriSha1(filePath, fileSize) {
|
|
17491
17491
|
const hash = new TriSha1(fileSize);
|
|
17492
|
-
const stream = fs$
|
|
17492
|
+
const stream = fs$1.createReadStream(filePath);
|
|
17493
17493
|
for await (const chunk of stream) hash.update(chunk);
|
|
17494
17494
|
return hash.finalize();
|
|
17495
17495
|
}
|
|
17496
17496
|
var defaultVideoThumb = Buffer.from("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", "base64");
|
|
17497
17497
|
async function getVideoInfo(filePath) {
|
|
17498
|
-
const size = fs$
|
|
17498
|
+
const size = fs$1.statSync(filePath).size;
|
|
17499
17499
|
return new Promise((resolve, reject) => {
|
|
17500
17500
|
(0, import_fluent_ffmpeg.default)(filePath).ffprobe((err, metadata) => {
|
|
17501
17501
|
if (err) reject(err);
|
|
@@ -17572,7 +17572,7 @@ function convert(ctx, input, options, outputPath) {
|
|
|
17572
17572
|
});
|
|
17573
17573
|
}
|
|
17574
17574
|
async function encodeSilk(ctx, filePath) {
|
|
17575
|
-
const file = await
|
|
17575
|
+
const file = await fsPromise.readFile(filePath);
|
|
17576
17576
|
if (!isSilk(file)) {
|
|
17577
17577
|
ctx.logger.info(`语音文件${filePath}需要转换成silk`);
|
|
17578
17578
|
let result;
|
|
@@ -17591,7 +17591,7 @@ async function encodeSilk(ctx, filePath) {
|
|
|
17591
17591
|
"-f s16le"
|
|
17592
17592
|
] }), 24e3);
|
|
17593
17593
|
const pttPath = path.join(TEMP_DIR, randomUUID());
|
|
17594
|
-
await
|
|
17594
|
+
await fsPromise.writeFile(pttPath, result.data);
|
|
17595
17595
|
ctx.logger.info(`语音文件${filePath}转换成功!`, pttPath, `时长:`, result.duration);
|
|
17596
17596
|
return {
|
|
17597
17597
|
converted: true,
|
|
@@ -17614,11 +17614,11 @@ async function encodeSilk(ctx, filePath) {
|
|
|
17614
17614
|
}
|
|
17615
17615
|
}
|
|
17616
17616
|
async function decodeSilk(ctx, inputFilePath, outFormat) {
|
|
17617
|
-
const { data } = await decode(await
|
|
17617
|
+
const { data } = await decode(await fsPromise.readFile(inputFilePath), 24e3);
|
|
17618
17618
|
const tmpPath = path.join(TEMP_DIR, path.basename(inputFilePath));
|
|
17619
17619
|
const outFilePath = tmpPath + `.${outFormat}`;
|
|
17620
17620
|
const pcmFilePath = tmpPath + ".pcm";
|
|
17621
|
-
await
|
|
17621
|
+
await fsPromise.writeFile(pcmFilePath, data);
|
|
17622
17622
|
return convert(ctx, pcmFilePath, { input: [
|
|
17623
17623
|
"-f s16le",
|
|
17624
17624
|
"-ar 24000",
|
|
@@ -24236,17 +24236,17 @@ var DownloadFile = class extends BaseAction {
|
|
|
24236
24236
|
const isRandomName = !payload.name;
|
|
24237
24237
|
const name = payload.name ? path.basename(payload.name) : randomUUID();
|
|
24238
24238
|
const filePath = path.join(TEMP_DIR, name);
|
|
24239
|
-
if (payload.base64) await fsPromise.writeFile(filePath, payload.base64, "base64");
|
|
24239
|
+
if (payload.base64) await fsPromise$1.writeFile(filePath, payload.base64, "base64");
|
|
24240
24240
|
else if (payload.url) {
|
|
24241
24241
|
const headers = this.getHeaders(payload.headers);
|
|
24242
24242
|
const res = await fetchFile(payload.url, headers);
|
|
24243
|
-
await fsPromise.writeFile(filePath, res.data);
|
|
24243
|
+
await fsPromise$1.writeFile(filePath, res.data);
|
|
24244
24244
|
} else throw new Error("不存在任何文件, 无法下载");
|
|
24245
|
-
if (fs
|
|
24245
|
+
if (fs.existsSync(filePath)) {
|
|
24246
24246
|
if (isRandomName) {
|
|
24247
24247
|
const md5 = await getMd5HexFromFile(filePath);
|
|
24248
24248
|
const newPath = path.join(TEMP_DIR, md5);
|
|
24249
|
-
await fsPromise.rename(filePath, newPath);
|
|
24249
|
+
await fsPromise$1.rename(filePath, newPath);
|
|
24250
24250
|
return { file: newPath };
|
|
24251
24251
|
}
|
|
24252
24252
|
return { file: filePath };
|
|
@@ -42900,7 +42900,7 @@ async function download(url, headers) {
|
|
|
42900
42900
|
return Buffer.from(bytes);
|
|
42901
42901
|
}
|
|
42902
42902
|
async function resolveMilkyUri(uri) {
|
|
42903
|
-
if (uri.startsWith("file://")) return await
|
|
42903
|
+
if (uri.startsWith("file://")) return await fsPromise.readFile(fileURLToPath(uri));
|
|
42904
42904
|
if (uri.startsWith("http://") || uri.startsWith("https://")) return await download(uri);
|
|
42905
42905
|
if (uri.startsWith("base64://")) return Buffer.from(uri.slice(9), "base64");
|
|
42906
42906
|
throw new Error(`Unsupported URI scheme: ${uri}`);
|
|
@@ -53712,7 +53712,7 @@ var NTQQWebApi = class extends Service {
|
|
|
53712
53712
|
const iBatchID = Math.floor(Date.now() / 1e3);
|
|
53713
53713
|
for (let i = 0; i < filePathList.length; i++) {
|
|
53714
53714
|
const filePath = filePathList[i];
|
|
53715
|
-
const fileBuffer = await
|
|
53715
|
+
const fileBuffer = await fsPromise.readFile(filePath);
|
|
53716
53716
|
const fileSize = fileBuffer.length;
|
|
53717
53717
|
const checksum = await getMd5HexFromFile(filePath);
|
|
53718
53718
|
const getSessionUrl = `https://${domain}/webapp/json/sliceUpload/FileBatchControl/${checksum}?g_tk=${gtk}`;
|
|
@@ -55185,7 +55185,7 @@ var Config = class extends Service {
|
|
|
55185
55185
|
this.logger.info("配置文件位于", this.configPath);
|
|
55186
55186
|
this.config = this.get();
|
|
55187
55187
|
if (this.configPath) {
|
|
55188
|
-
fs$
|
|
55188
|
+
fs$1.watchFile(this.configPath, {
|
|
55189
55189
|
persistent: true,
|
|
55190
55190
|
interval: 1e3
|
|
55191
55191
|
}, () => {
|
|
@@ -55203,7 +55203,7 @@ var Config = class extends Service {
|
|
|
55203
55203
|
}
|
|
55204
55204
|
getDefaultConfig() {
|
|
55205
55205
|
const _defaultConfig = { ...defaultConfig };
|
|
55206
|
-
const defaultConfigFromFile = fs$
|
|
55206
|
+
const defaultConfigFromFile = fs$1.readFileSync(this.defaultConfigPath, "utf-8");
|
|
55207
55207
|
try {
|
|
55208
55208
|
const parsedDefaultConfig = import_dist.default.parse(defaultConfigFromFile);
|
|
55209
55209
|
Object.assign(_defaultConfig, parsedDefaultConfig);
|
|
@@ -55214,12 +55214,12 @@ var Config = class extends Service {
|
|
|
55214
55214
|
}
|
|
55215
55215
|
reloadConfig() {
|
|
55216
55216
|
if (!this.configPath) return this.getDefaultConfig();
|
|
55217
|
-
if (!fs$
|
|
55217
|
+
if (!fs$1.existsSync(this.configPath)) {
|
|
55218
55218
|
this.config = this.getDefaultConfig();
|
|
55219
55219
|
this.set(this.config);
|
|
55220
55220
|
return this.config;
|
|
55221
55221
|
} else {
|
|
55222
|
-
const data = fs$
|
|
55222
|
+
const data = fs$1.readFileSync(this.configPath, "utf-8");
|
|
55223
55223
|
let jsonData = defaultConfig;
|
|
55224
55224
|
try {
|
|
55225
55225
|
jsonData = import_dist.default.parse(data);
|
|
@@ -55245,7 +55245,7 @@ var Config = class extends Service {
|
|
|
55245
55245
|
writeConfig(config) {
|
|
55246
55246
|
if (!this.configPath) return;
|
|
55247
55247
|
this.watch = false;
|
|
55248
|
-
fs$
|
|
55248
|
+
fs$1.writeFileSync(this.configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
55249
55249
|
setTimeout(() => {
|
|
55250
55250
|
this.watch = true;
|
|
55251
55251
|
}, 1500);
|
|
@@ -55351,13 +55351,13 @@ var WebUITokenUtil = class {
|
|
|
55351
55351
|
}
|
|
55352
55352
|
getToken() {
|
|
55353
55353
|
if (!this.token) {
|
|
55354
|
-
if (fs$
|
|
55354
|
+
if (fs$1.existsSync(this.tokenPath)) this.token = fs$1.readFileSync(this.tokenPath, "utf-8").trim();
|
|
55355
55355
|
}
|
|
55356
55356
|
return this.token;
|
|
55357
55357
|
}
|
|
55358
55358
|
setToken(token) {
|
|
55359
55359
|
this.token = token.trim();
|
|
55360
|
-
fs$
|
|
55360
|
+
fs$1.writeFileSync(this.tokenPath, token, "utf-8");
|
|
55361
55361
|
}
|
|
55362
55362
|
};
|
|
55363
55363
|
var webuiTokenUtil = new WebUITokenUtil(path.join(DATA_DIR, "webui_token.txt"));
|
|
@@ -57633,7 +57633,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
57633
57633
|
var require_shared = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
57634
57634
|
var urllib$2 = __require("url");
|
|
57635
57635
|
var util$1 = __require("util");
|
|
57636
|
-
var fs$
|
|
57636
|
+
var fs$4 = __require("fs");
|
|
57637
57637
|
var nmfetch = require_fetch();
|
|
57638
57638
|
var dns$1 = __require("dns");
|
|
57639
57639
|
var net$4 = __require("net");
|
|
@@ -57969,7 +57969,7 @@ var require_shared = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
57969
57969
|
const parsedDataUri = module.exports.parseDataURI(content.path || content.href);
|
|
57970
57970
|
if (!parsedDataUri || !parsedDataUri.data) return callback(null, Buffer.from(0));
|
|
57971
57971
|
return callback(null, parsedDataUri.data);
|
|
57972
|
-
} else if (content.path) return resolveStream(fs$
|
|
57972
|
+
} else if (content.path) return resolveStream(fs$4.createReadStream(content.path), callback);
|
|
57973
57973
|
}
|
|
57974
57974
|
if (typeof data[key].content === "string" && ![
|
|
57975
57975
|
"utf8",
|
|
@@ -61795,7 +61795,7 @@ var require_le_unix = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
61795
61795
|
//#region node_modules/nodemailer/lib/mime-node/index.js
|
|
61796
61796
|
var require_mime_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
61797
61797
|
var crypto$9 = __require("crypto");
|
|
61798
|
-
var fs$
|
|
61798
|
+
var fs$3 = __require("fs");
|
|
61799
61799
|
var punycode = require_punycode();
|
|
61800
61800
|
var { PassThrough: PassThrough$2 } = __require("stream");
|
|
61801
61801
|
var shared = require_shared();
|
|
@@ -62504,7 +62504,7 @@ var require_mime_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
62504
62504
|
});
|
|
62505
62505
|
return contentStream;
|
|
62506
62506
|
}
|
|
62507
|
-
return fs$
|
|
62507
|
+
return fs$3.createReadStream(content.path);
|
|
62508
62508
|
}
|
|
62509
62509
|
if (content && typeof content.href === "string") {
|
|
62510
62510
|
if (this.disableUrlAccess) {
|
|
@@ -63342,7 +63342,7 @@ var require_dkim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
63342
63342
|
var RelaxedBody = require_relaxed_body();
|
|
63343
63343
|
var sign = require_sign();
|
|
63344
63344
|
var { PassThrough: PassThrough$1 } = __require("stream");
|
|
63345
|
-
var fs$
|
|
63345
|
+
var fs$2 = __require("fs");
|
|
63346
63346
|
var path$2 = __require("path");
|
|
63347
63347
|
var crypto$6 = __require("crypto");
|
|
63348
63348
|
var DKIM_ALGO = "sha256";
|
|
@@ -63375,10 +63375,10 @@ var require_dkim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
63375
63375
|
}
|
|
63376
63376
|
cleanup() {
|
|
63377
63377
|
if (!this.cache || !this.cachePath) return;
|
|
63378
|
-
fs$
|
|
63378
|
+
fs$2.unlink(this.cachePath, () => false);
|
|
63379
63379
|
}
|
|
63380
63380
|
createReadCache() {
|
|
63381
|
-
this.cache = fs$
|
|
63381
|
+
this.cache = fs$2.createReadStream(this.cachePath);
|
|
63382
63382
|
this.cache.once("error", (err) => {
|
|
63383
63383
|
this.cleanup();
|
|
63384
63384
|
this.output.emit("error", err);
|
|
@@ -63424,7 +63424,7 @@ var require_dkim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
63424
63424
|
}
|
|
63425
63425
|
createWriteCache() {
|
|
63426
63426
|
this.output.usingCache = true;
|
|
63427
|
-
this.cache = fs$
|
|
63427
|
+
this.cache = fs$2.createWriteStream(this.cachePath);
|
|
63428
63428
|
this.cache.once("error", (err) => {
|
|
63429
63429
|
this.cleanup();
|
|
63430
63430
|
this.relaxedBody.unpipe(this.cache);
|