bililive-cli 3.15.0 → 3.16.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.
|
@@ -16,29 +16,29 @@ var os$5 = require('node:os');
|
|
|
16
16
|
var path$z = require('node:path');
|
|
17
17
|
var process$2 = require('node:process');
|
|
18
18
|
var require$$3$1 = require('node:util');
|
|
19
|
+
var EventEmitter$k = require('node:events');
|
|
20
|
+
var fs$F = require('node:fs');
|
|
21
|
+
var require$$0$b = require('node:stream');
|
|
19
22
|
var Database = require('better-sqlite3');
|
|
20
23
|
var require$$3$2 = require('http');
|
|
21
24
|
var require$$1$4 = require('https');
|
|
22
25
|
var require$$1$5 = require('crypto');
|
|
23
26
|
var http2$1 = require('http2');
|
|
24
|
-
var require$$0$
|
|
27
|
+
var require$$0$c = require('tty');
|
|
25
28
|
var zlib$3 = require('zlib');
|
|
26
|
-
var require$$0$
|
|
27
|
-
var EventEmitter$k = require('node:events');
|
|
29
|
+
var require$$0$d = require('child_process');
|
|
28
30
|
var ntsuspend = require('ntsuspend');
|
|
29
31
|
var readline = require('node:readline');
|
|
30
32
|
var crypto$c = require('node:crypto');
|
|
31
|
-
var fs$F = require('node:fs');
|
|
32
33
|
var a$1 = require('node:https');
|
|
33
34
|
var require$$1$6 = require('node:url');
|
|
34
|
-
var require$$0$
|
|
35
|
+
var require$$0$e = require('net');
|
|
35
36
|
var require$$2 = require('node:http');
|
|
36
37
|
var require$$4 = require('dns');
|
|
37
38
|
var require$$1$7 = require('tls');
|
|
38
|
-
var require$$0$
|
|
39
|
+
var require$$0$f = require('punycode');
|
|
39
40
|
var canvas = require('@napi-rs/canvas');
|
|
40
|
-
var require$$0$
|
|
41
|
-
var require$$0$g = require('node:stream');
|
|
41
|
+
var require$$0$g = require('vm');
|
|
42
42
|
var promises = require('node:stream/promises');
|
|
43
43
|
var fs$G = require('fs/promises');
|
|
44
44
|
var require$$0$h = require('node:assert');
|
|
@@ -2319,7 +2319,7 @@ async function _writeFile (file, obj, options = {}) {
|
|
|
2319
2319
|
await universalify.fromCallback(fs.writeFile)(file, str, options);
|
|
2320
2320
|
}
|
|
2321
2321
|
|
|
2322
|
-
const writeFile$
|
|
2322
|
+
const writeFile$2 = universalify.fromPromise(_writeFile);
|
|
2323
2323
|
|
|
2324
2324
|
function writeFileSync (file, obj, options = {}) {
|
|
2325
2325
|
const fs = options.fs || _fs;
|
|
@@ -2332,7 +2332,7 @@ function writeFileSync (file, obj, options = {}) {
|
|
|
2332
2332
|
const jsonfile$1 = {
|
|
2333
2333
|
readFile: readFile$1,
|
|
2334
2334
|
readFileSync,
|
|
2335
|
-
writeFile: writeFile$
|
|
2335
|
+
writeFile: writeFile$2,
|
|
2336
2336
|
writeFileSync
|
|
2337
2337
|
};
|
|
2338
2338
|
|
|
@@ -7223,10 +7223,10 @@ var string$2 = {};
|
|
|
7223
7223
|
|
|
7224
7224
|
Object.defineProperty(string$2, "__esModule", { value: true });
|
|
7225
7225
|
string$2.isEmpty = string$2.isString = void 0;
|
|
7226
|
-
function isString$
|
|
7226
|
+
function isString$4(input) {
|
|
7227
7227
|
return typeof input === 'string';
|
|
7228
7228
|
}
|
|
7229
|
-
string$2.isString = isString$
|
|
7229
|
+
string$2.isString = isString$4;
|
|
7230
7230
|
function isEmpty$1(input) {
|
|
7231
7231
|
return input === '';
|
|
7232
7232
|
}
|
|
@@ -11219,6 +11219,426 @@ function checkDiskSpace(directoryPath, dependencies = {
|
|
|
11219
11219
|
return checkUnix(directoryPath);
|
|
11220
11220
|
}
|
|
11221
11221
|
|
|
11222
|
+
/* IMPORT */
|
|
11223
|
+
/* MAIN */
|
|
11224
|
+
const attemptifyAsync = (fn, options) => {
|
|
11225
|
+
const { onError } = options;
|
|
11226
|
+
return function attemptified(...args) {
|
|
11227
|
+
return fn.apply(undefined, args).catch(onError);
|
|
11228
|
+
}; //TSC
|
|
11229
|
+
};
|
|
11230
|
+
|
|
11231
|
+
/* IMPORT */
|
|
11232
|
+
/* MAIN */
|
|
11233
|
+
const attemptifySync = (fn, options) => {
|
|
11234
|
+
const { onError } = options;
|
|
11235
|
+
return function attemptified(...args) {
|
|
11236
|
+
try {
|
|
11237
|
+
return fn.apply(undefined, args);
|
|
11238
|
+
}
|
|
11239
|
+
catch (error) {
|
|
11240
|
+
return onError(error);
|
|
11241
|
+
}
|
|
11242
|
+
}; //TSC
|
|
11243
|
+
};
|
|
11244
|
+
|
|
11245
|
+
/* MAIN */
|
|
11246
|
+
const RETRY_INTERVAL = 250;
|
|
11247
|
+
|
|
11248
|
+
/* IMPORT */
|
|
11249
|
+
/* MAIN */
|
|
11250
|
+
const retryifyAsync = (fn, options) => {
|
|
11251
|
+
const { isRetriable } = options;
|
|
11252
|
+
return function retryified(options) {
|
|
11253
|
+
const { timeout } = options;
|
|
11254
|
+
const interval = options.interval ?? RETRY_INTERVAL;
|
|
11255
|
+
const timestamp = Date.now() + timeout;
|
|
11256
|
+
return function attempt(...args) {
|
|
11257
|
+
return fn.apply(undefined, args).catch((error) => {
|
|
11258
|
+
if (!isRetriable(error))
|
|
11259
|
+
throw error;
|
|
11260
|
+
if (Date.now() >= timestamp)
|
|
11261
|
+
throw error;
|
|
11262
|
+
const delay = Math.round(interval * Math.random());
|
|
11263
|
+
if (delay > 0) {
|
|
11264
|
+
const delayPromise = new Promise(resolve => setTimeout(resolve, delay));
|
|
11265
|
+
return delayPromise.then(() => attempt.apply(undefined, args));
|
|
11266
|
+
}
|
|
11267
|
+
else {
|
|
11268
|
+
return attempt.apply(undefined, args);
|
|
11269
|
+
}
|
|
11270
|
+
});
|
|
11271
|
+
}; //TSC
|
|
11272
|
+
};
|
|
11273
|
+
};
|
|
11274
|
+
|
|
11275
|
+
/* IMPORT */
|
|
11276
|
+
/* MAIN */
|
|
11277
|
+
const retryifySync = (fn, options) => {
|
|
11278
|
+
const { isRetriable } = options;
|
|
11279
|
+
return function retryified(options) {
|
|
11280
|
+
const { timeout } = options;
|
|
11281
|
+
const timestamp = Date.now() + timeout;
|
|
11282
|
+
return function attempt(...args) {
|
|
11283
|
+
while (true) {
|
|
11284
|
+
try {
|
|
11285
|
+
return fn.apply(undefined, args);
|
|
11286
|
+
}
|
|
11287
|
+
catch (error) {
|
|
11288
|
+
if (!isRetriable(error))
|
|
11289
|
+
throw error;
|
|
11290
|
+
if (Date.now() >= timestamp)
|
|
11291
|
+
throw error;
|
|
11292
|
+
continue;
|
|
11293
|
+
}
|
|
11294
|
+
}
|
|
11295
|
+
}; //TSC
|
|
11296
|
+
};
|
|
11297
|
+
};
|
|
11298
|
+
|
|
11299
|
+
/* IMPORT */
|
|
11300
|
+
/* MAIN */
|
|
11301
|
+
const Handlers = {
|
|
11302
|
+
/* API */
|
|
11303
|
+
isChangeErrorOk: (error) => {
|
|
11304
|
+
if (!Handlers.isNodeError(error))
|
|
11305
|
+
return false;
|
|
11306
|
+
const { code } = error;
|
|
11307
|
+
if (code === 'ENOSYS')
|
|
11308
|
+
return true;
|
|
11309
|
+
if (!IS_USER_ROOT && (code === 'EINVAL' || code === 'EPERM'))
|
|
11310
|
+
return true;
|
|
11311
|
+
return false;
|
|
11312
|
+
},
|
|
11313
|
+
isNodeError: (error) => {
|
|
11314
|
+
return (error instanceof Error);
|
|
11315
|
+
},
|
|
11316
|
+
isRetriableError: (error) => {
|
|
11317
|
+
if (!Handlers.isNodeError(error))
|
|
11318
|
+
return false;
|
|
11319
|
+
const { code } = error;
|
|
11320
|
+
if (code === 'EMFILE' || code === 'ENFILE' || code === 'EAGAIN' || code === 'EBUSY' || code === 'EACCESS' || code === 'EACCES' || code === 'EACCS' || code === 'EPERM')
|
|
11321
|
+
return true;
|
|
11322
|
+
return false;
|
|
11323
|
+
},
|
|
11324
|
+
onChangeError: (error) => {
|
|
11325
|
+
if (!Handlers.isNodeError(error))
|
|
11326
|
+
throw error;
|
|
11327
|
+
if (Handlers.isChangeErrorOk(error))
|
|
11328
|
+
return;
|
|
11329
|
+
throw error;
|
|
11330
|
+
}
|
|
11331
|
+
};
|
|
11332
|
+
|
|
11333
|
+
/* IMPORT */
|
|
11334
|
+
/* MAIN */
|
|
11335
|
+
const ATTEMPTIFY_CHANGE_ERROR_OPTIONS = {
|
|
11336
|
+
onError: Handlers.onChangeError
|
|
11337
|
+
};
|
|
11338
|
+
const ATTEMPTIFY_NOOP_OPTIONS = {
|
|
11339
|
+
onError: () => undefined
|
|
11340
|
+
};
|
|
11341
|
+
const IS_USER_ROOT = (process$2.getuid ? !process$2.getuid() : false);
|
|
11342
|
+
const RETRYIFY_OPTIONS = {
|
|
11343
|
+
isRetriable: Handlers.isRetriableError
|
|
11344
|
+
};
|
|
11345
|
+
|
|
11346
|
+
/* IMPORT */
|
|
11347
|
+
/* MAIN */
|
|
11348
|
+
const FS = {
|
|
11349
|
+
attempt: {
|
|
11350
|
+
/* ASYNC */
|
|
11351
|
+
chmod: attemptifyAsync(require$$3$1.promisify(fs$F.chmod), ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
11352
|
+
chown: attemptifyAsync(require$$3$1.promisify(fs$F.chown), ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
11353
|
+
close: attemptifyAsync(require$$3$1.promisify(fs$F.close), ATTEMPTIFY_NOOP_OPTIONS),
|
|
11354
|
+
fsync: attemptifyAsync(require$$3$1.promisify(fs$F.fsync), ATTEMPTIFY_NOOP_OPTIONS),
|
|
11355
|
+
mkdir: attemptifyAsync(require$$3$1.promisify(fs$F.mkdir), ATTEMPTIFY_NOOP_OPTIONS),
|
|
11356
|
+
realpath: attemptifyAsync(require$$3$1.promisify(fs$F.realpath), ATTEMPTIFY_NOOP_OPTIONS),
|
|
11357
|
+
stat: attemptifyAsync(require$$3$1.promisify(fs$F.stat), ATTEMPTIFY_NOOP_OPTIONS),
|
|
11358
|
+
unlink: attemptifyAsync(require$$3$1.promisify(fs$F.unlink), ATTEMPTIFY_NOOP_OPTIONS),
|
|
11359
|
+
/* SYNC */
|
|
11360
|
+
chmodSync: attemptifySync(fs$F.chmodSync, ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
11361
|
+
chownSync: attemptifySync(fs$F.chownSync, ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
|
|
11362
|
+
closeSync: attemptifySync(fs$F.closeSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
11363
|
+
existsSync: attemptifySync(fs$F.existsSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
11364
|
+
fsyncSync: attemptifySync(fs$F.fsync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
11365
|
+
mkdirSync: attemptifySync(fs$F.mkdirSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
11366
|
+
realpathSync: attemptifySync(fs$F.realpathSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
11367
|
+
statSync: attemptifySync(fs$F.statSync, ATTEMPTIFY_NOOP_OPTIONS),
|
|
11368
|
+
unlinkSync: attemptifySync(fs$F.unlinkSync, ATTEMPTIFY_NOOP_OPTIONS)
|
|
11369
|
+
},
|
|
11370
|
+
retry: {
|
|
11371
|
+
/* ASYNC */
|
|
11372
|
+
close: retryifyAsync(require$$3$1.promisify(fs$F.close), RETRYIFY_OPTIONS),
|
|
11373
|
+
fsync: retryifyAsync(require$$3$1.promisify(fs$F.fsync), RETRYIFY_OPTIONS),
|
|
11374
|
+
open: retryifyAsync(require$$3$1.promisify(fs$F.open), RETRYIFY_OPTIONS),
|
|
11375
|
+
readFile: retryifyAsync(require$$3$1.promisify(fs$F.readFile), RETRYIFY_OPTIONS),
|
|
11376
|
+
rename: retryifyAsync(require$$3$1.promisify(fs$F.rename), RETRYIFY_OPTIONS),
|
|
11377
|
+
stat: retryifyAsync(require$$3$1.promisify(fs$F.stat), RETRYIFY_OPTIONS),
|
|
11378
|
+
write: retryifyAsync(require$$3$1.promisify(fs$F.write), RETRYIFY_OPTIONS),
|
|
11379
|
+
writeFile: retryifyAsync(require$$3$1.promisify(fs$F.writeFile), RETRYIFY_OPTIONS),
|
|
11380
|
+
/* SYNC */
|
|
11381
|
+
closeSync: retryifySync(fs$F.closeSync, RETRYIFY_OPTIONS),
|
|
11382
|
+
fsyncSync: retryifySync(fs$F.fsyncSync, RETRYIFY_OPTIONS),
|
|
11383
|
+
openSync: retryifySync(fs$F.openSync, RETRYIFY_OPTIONS),
|
|
11384
|
+
readFileSync: retryifySync(fs$F.readFileSync, RETRYIFY_OPTIONS),
|
|
11385
|
+
renameSync: retryifySync(fs$F.renameSync, RETRYIFY_OPTIONS),
|
|
11386
|
+
statSync: retryifySync(fs$F.statSync, RETRYIFY_OPTIONS),
|
|
11387
|
+
writeSync: retryifySync(fs$F.writeSync, RETRYIFY_OPTIONS),
|
|
11388
|
+
writeFileSync: retryifySync(fs$F.writeFileSync, RETRYIFY_OPTIONS)
|
|
11389
|
+
}
|
|
11390
|
+
};
|
|
11391
|
+
|
|
11392
|
+
/* IMPORT */
|
|
11393
|
+
/* MAIN */
|
|
11394
|
+
const DEFAULT_ENCODING = 'utf8';
|
|
11395
|
+
const DEFAULT_FILE_MODE = 0o666;
|
|
11396
|
+
const DEFAULT_FOLDER_MODE = 0o777;
|
|
11397
|
+
const DEFAULT_WRITE_OPTIONS = {};
|
|
11398
|
+
const DEFAULT_USER_UID = process$2.geteuid ? process$2.geteuid() : -1;
|
|
11399
|
+
const DEFAULT_USER_GID = process$2.getegid ? process$2.getegid() : -1;
|
|
11400
|
+
const DEFAULT_INTERVAL_ASYNC = 200;
|
|
11401
|
+
const DEFAULT_TIMEOUT_ASYNC = 7500;
|
|
11402
|
+
const IS_POSIX = !!process$2.getuid;
|
|
11403
|
+
process$2.getuid ? !process$2.getuid() : false;
|
|
11404
|
+
const LIMIT_BASENAME_LENGTH = 128; //TODO: Fetch the real limit from the filesystem //TODO: Fetch the whole-path length limit too
|
|
11405
|
+
|
|
11406
|
+
/* IMPORT */
|
|
11407
|
+
/* MAIN */
|
|
11408
|
+
const isException = (value) => {
|
|
11409
|
+
return (value instanceof Error) && ('code' in value);
|
|
11410
|
+
};
|
|
11411
|
+
const isString$3 = (value) => {
|
|
11412
|
+
return (typeof value === 'string');
|
|
11413
|
+
};
|
|
11414
|
+
const isUndefined$1 = (value) => {
|
|
11415
|
+
return (value === undefined);
|
|
11416
|
+
};
|
|
11417
|
+
|
|
11418
|
+
/* IMPORT */
|
|
11419
|
+
/* HELPERS */
|
|
11420
|
+
const Queues = {};
|
|
11421
|
+
/* MAIN */
|
|
11422
|
+
//TODO: Maybe publish this as a standalone package
|
|
11423
|
+
const Scheduler = {
|
|
11424
|
+
/* API */
|
|
11425
|
+
next: (id) => {
|
|
11426
|
+
const queue = Queues[id];
|
|
11427
|
+
if (!queue)
|
|
11428
|
+
return;
|
|
11429
|
+
queue.shift();
|
|
11430
|
+
const job = queue[0];
|
|
11431
|
+
if (job) {
|
|
11432
|
+
job(() => Scheduler.next(id));
|
|
11433
|
+
}
|
|
11434
|
+
else {
|
|
11435
|
+
delete Queues[id];
|
|
11436
|
+
}
|
|
11437
|
+
},
|
|
11438
|
+
schedule: (id) => {
|
|
11439
|
+
return new Promise(resolve => {
|
|
11440
|
+
let queue = Queues[id];
|
|
11441
|
+
if (!queue)
|
|
11442
|
+
queue = Queues[id] = [];
|
|
11443
|
+
queue.push(resolve);
|
|
11444
|
+
if (queue.length > 1)
|
|
11445
|
+
return;
|
|
11446
|
+
resolve(() => Scheduler.next(id));
|
|
11447
|
+
});
|
|
11448
|
+
}
|
|
11449
|
+
};
|
|
11450
|
+
|
|
11451
|
+
/* IMPORT */
|
|
11452
|
+
/* MAIN */
|
|
11453
|
+
class Interceptor {
|
|
11454
|
+
/* CONSTRUCTOR */
|
|
11455
|
+
constructor() {
|
|
11456
|
+
/* VARIABLES */
|
|
11457
|
+
this.callbacks = new Set();
|
|
11458
|
+
/* API */
|
|
11459
|
+
this.exit = () => {
|
|
11460
|
+
for (const callback of this.callbacks) {
|
|
11461
|
+
callback();
|
|
11462
|
+
}
|
|
11463
|
+
};
|
|
11464
|
+
this.hook = () => {
|
|
11465
|
+
window.addEventListener('beforeunload', this.exit);
|
|
11466
|
+
};
|
|
11467
|
+
this.register = (callback) => {
|
|
11468
|
+
this.callbacks.add(callback);
|
|
11469
|
+
return () => {
|
|
11470
|
+
this.callbacks.delete(callback);
|
|
11471
|
+
};
|
|
11472
|
+
};
|
|
11473
|
+
this.hook();
|
|
11474
|
+
}
|
|
11475
|
+
}
|
|
11476
|
+
/* EXPORT */
|
|
11477
|
+
var Interceptor$1 = new Interceptor();
|
|
11478
|
+
|
|
11479
|
+
/* IMPORT */
|
|
11480
|
+
/* MAIN */
|
|
11481
|
+
const whenExit = Interceptor$1.register;
|
|
11482
|
+
|
|
11483
|
+
/* IMPORT */
|
|
11484
|
+
/* MAIN */
|
|
11485
|
+
//TODO: Maybe publish this as a standalone package
|
|
11486
|
+
const Temp = {
|
|
11487
|
+
/* VARIABLES */
|
|
11488
|
+
store: {}, // filePath => purge
|
|
11489
|
+
/* API */
|
|
11490
|
+
create: (filePath) => {
|
|
11491
|
+
const randomness = `000000${Math.floor(Math.random() * 16777215).toString(16)}`.slice(-6); // 6 random-enough hex characters
|
|
11492
|
+
const timestamp = Date.now().toString().slice(-10); // 10 precise timestamp digits
|
|
11493
|
+
const prefix = 'tmp-';
|
|
11494
|
+
const suffix = `.${prefix}${timestamp}${randomness}`;
|
|
11495
|
+
const tempPath = `${filePath}${suffix}`;
|
|
11496
|
+
return tempPath;
|
|
11497
|
+
},
|
|
11498
|
+
get: (filePath, creator, purge = true) => {
|
|
11499
|
+
const tempPath = Temp.truncate(creator(filePath));
|
|
11500
|
+
if (tempPath in Temp.store)
|
|
11501
|
+
return Temp.get(filePath, creator, purge); // Collision found, try again
|
|
11502
|
+
Temp.store[tempPath] = purge;
|
|
11503
|
+
const disposer = () => delete Temp.store[tempPath];
|
|
11504
|
+
return [tempPath, disposer];
|
|
11505
|
+
},
|
|
11506
|
+
purge: (filePath) => {
|
|
11507
|
+
if (!Temp.store[filePath])
|
|
11508
|
+
return;
|
|
11509
|
+
delete Temp.store[filePath];
|
|
11510
|
+
FS.attempt.unlink(filePath);
|
|
11511
|
+
},
|
|
11512
|
+
purgeSync: (filePath) => {
|
|
11513
|
+
if (!Temp.store[filePath])
|
|
11514
|
+
return;
|
|
11515
|
+
delete Temp.store[filePath];
|
|
11516
|
+
FS.attempt.unlinkSync(filePath);
|
|
11517
|
+
},
|
|
11518
|
+
purgeSyncAll: () => {
|
|
11519
|
+
for (const filePath in Temp.store) {
|
|
11520
|
+
Temp.purgeSync(filePath);
|
|
11521
|
+
}
|
|
11522
|
+
},
|
|
11523
|
+
truncate: (filePath) => {
|
|
11524
|
+
const basename = path$z.basename(filePath);
|
|
11525
|
+
if (basename.length <= LIMIT_BASENAME_LENGTH)
|
|
11526
|
+
return filePath; //FIXME: Rough and quick attempt at detecting ok lengths
|
|
11527
|
+
const truncable = /^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(basename);
|
|
11528
|
+
if (!truncable)
|
|
11529
|
+
return filePath; //FIXME: No truncable part detected, can't really do much without also changing the parent path, which is unsafe, hoping for the best here
|
|
11530
|
+
const truncationLength = basename.length - LIMIT_BASENAME_LENGTH;
|
|
11531
|
+
return `${filePath.slice(0, -basename.length)}${truncable[1]}${truncable[2].slice(0, -truncationLength)}${truncable[3]}`; //FIXME: The truncable part might be shorter than needed here
|
|
11532
|
+
}
|
|
11533
|
+
};
|
|
11534
|
+
/* INIT */
|
|
11535
|
+
whenExit(Temp.purgeSyncAll); // Ensuring purgeable temp files are purged on exit
|
|
11536
|
+
|
|
11537
|
+
/* IMPORT */
|
|
11538
|
+
function writeFile$1(filePath, data, options, callback) {
|
|
11539
|
+
const promise = writeFileAsync(filePath, data, options);
|
|
11540
|
+
return promise;
|
|
11541
|
+
}
|
|
11542
|
+
async function writeFileAsync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
|
|
11543
|
+
if (isString$3(options))
|
|
11544
|
+
return writeFileAsync(filePath, data, { encoding: options });
|
|
11545
|
+
const timeout = options.timeout ?? DEFAULT_TIMEOUT_ASYNC;
|
|
11546
|
+
const retryOptions = { timeout, interval: DEFAULT_INTERVAL_ASYNC };
|
|
11547
|
+
let schedulerCustomDisposer = null;
|
|
11548
|
+
let schedulerDisposer = null;
|
|
11549
|
+
let tempDisposer = null;
|
|
11550
|
+
let tempPath = null;
|
|
11551
|
+
let fd = null;
|
|
11552
|
+
try {
|
|
11553
|
+
if (options.schedule)
|
|
11554
|
+
schedulerCustomDisposer = await options.schedule(filePath);
|
|
11555
|
+
schedulerDisposer = await Scheduler.schedule(filePath);
|
|
11556
|
+
const filePathReal = await FS.attempt.realpath(filePath);
|
|
11557
|
+
const filePathExists = !!filePathReal;
|
|
11558
|
+
filePath = filePathReal || filePath;
|
|
11559
|
+
[tempPath, tempDisposer] = Temp.get(filePath, options.tmpCreate || Temp.create, !(options.tmpPurge === false));
|
|
11560
|
+
const useStatChown = IS_POSIX && isUndefined$1(options.chown);
|
|
11561
|
+
const useStatMode = isUndefined$1(options.mode);
|
|
11562
|
+
if (filePathExists && (useStatChown || useStatMode)) {
|
|
11563
|
+
const stats = await FS.attempt.stat(filePath);
|
|
11564
|
+
if (stats) {
|
|
11565
|
+
options = { ...options };
|
|
11566
|
+
if (useStatChown) {
|
|
11567
|
+
options.chown = { uid: stats.uid, gid: stats.gid };
|
|
11568
|
+
}
|
|
11569
|
+
if (useStatMode) {
|
|
11570
|
+
options.mode = stats.mode;
|
|
11571
|
+
}
|
|
11572
|
+
}
|
|
11573
|
+
}
|
|
11574
|
+
if (!filePathExists) {
|
|
11575
|
+
const parentPath = path$z.dirname(filePath);
|
|
11576
|
+
await FS.attempt.mkdir(parentPath, {
|
|
11577
|
+
mode: DEFAULT_FOLDER_MODE,
|
|
11578
|
+
recursive: true
|
|
11579
|
+
});
|
|
11580
|
+
}
|
|
11581
|
+
fd = await FS.retry.open(retryOptions)(tempPath, 'w', options.mode || DEFAULT_FILE_MODE);
|
|
11582
|
+
if (options.tmpCreated) {
|
|
11583
|
+
options.tmpCreated(tempPath);
|
|
11584
|
+
}
|
|
11585
|
+
if (isString$3(data)) {
|
|
11586
|
+
await FS.retry.write(retryOptions)(fd, data, 0, options.encoding || DEFAULT_ENCODING);
|
|
11587
|
+
}
|
|
11588
|
+
else if (data instanceof require$$0$b.Readable) {
|
|
11589
|
+
const writeStream = fs$F.createWriteStream(tempPath, { fd, autoClose: false });
|
|
11590
|
+
const finishPromise = EventEmitter$k.once(writeStream, 'finish');
|
|
11591
|
+
data.pipe(writeStream);
|
|
11592
|
+
await finishPromise;
|
|
11593
|
+
}
|
|
11594
|
+
else if (!isUndefined$1(data)) {
|
|
11595
|
+
await FS.retry.write(retryOptions)(fd, data, 0, data.length, 0);
|
|
11596
|
+
}
|
|
11597
|
+
if (options.fsync !== false) {
|
|
11598
|
+
if (options.fsyncWait !== false) {
|
|
11599
|
+
await FS.retry.fsync(retryOptions)(fd);
|
|
11600
|
+
}
|
|
11601
|
+
else {
|
|
11602
|
+
FS.attempt.fsync(fd);
|
|
11603
|
+
}
|
|
11604
|
+
}
|
|
11605
|
+
await FS.retry.close(retryOptions)(fd);
|
|
11606
|
+
fd = null;
|
|
11607
|
+
if (options.chown && (options.chown.uid !== DEFAULT_USER_UID || options.chown.gid !== DEFAULT_USER_GID)) {
|
|
11608
|
+
await FS.attempt.chown(tempPath, options.chown.uid, options.chown.gid);
|
|
11609
|
+
}
|
|
11610
|
+
if (options.mode && options.mode !== DEFAULT_FILE_MODE) {
|
|
11611
|
+
await FS.attempt.chmod(tempPath, options.mode);
|
|
11612
|
+
}
|
|
11613
|
+
try {
|
|
11614
|
+
await FS.retry.rename(retryOptions)(tempPath, filePath);
|
|
11615
|
+
}
|
|
11616
|
+
catch (error) {
|
|
11617
|
+
if (!isException(error))
|
|
11618
|
+
throw error;
|
|
11619
|
+
if (error.code !== 'ENAMETOOLONG')
|
|
11620
|
+
throw error;
|
|
11621
|
+
await FS.retry.rename(retryOptions)(tempPath, Temp.truncate(filePath));
|
|
11622
|
+
}
|
|
11623
|
+
tempDisposer();
|
|
11624
|
+
tempPath = null;
|
|
11625
|
+
}
|
|
11626
|
+
finally {
|
|
11627
|
+
if (fd)
|
|
11628
|
+
await FS.attempt.close(fd);
|
|
11629
|
+
if (tempPath)
|
|
11630
|
+
Temp.purge(tempPath);
|
|
11631
|
+
if (schedulerCustomDisposer)
|
|
11632
|
+
schedulerCustomDisposer();
|
|
11633
|
+
if (schedulerDisposer)
|
|
11634
|
+
schedulerDisposer();
|
|
11635
|
+
}
|
|
11636
|
+
}
|
|
11637
|
+
|
|
11638
|
+
function writeJSON(filePath, data) {
|
|
11639
|
+
const jsonData = JSON.stringify(data);
|
|
11640
|
+
return writeFile$1(filePath, jsonData, "utf-8");
|
|
11641
|
+
}
|
|
11222
11642
|
class CommonPreset {
|
|
11223
11643
|
filepath;
|
|
11224
11644
|
defaultConfig;
|
|
@@ -11241,7 +11661,7 @@ class CommonPreset {
|
|
|
11241
11661
|
allPresets[presetIndex] = presets;
|
|
11242
11662
|
}
|
|
11243
11663
|
const presetsPath = this.filepath;
|
|
11244
|
-
await
|
|
11664
|
+
await writeJSON(presetsPath, allPresets);
|
|
11245
11665
|
return true;
|
|
11246
11666
|
}
|
|
11247
11667
|
// 保存预设
|
|
@@ -11255,7 +11675,7 @@ class CommonPreset {
|
|
|
11255
11675
|
allPresets[presetIndex] = presets;
|
|
11256
11676
|
}
|
|
11257
11677
|
const presetsPath = this.filepath;
|
|
11258
|
-
await
|
|
11678
|
+
await writeJSON(presetsPath, allPresets);
|
|
11259
11679
|
return true;
|
|
11260
11680
|
}
|
|
11261
11681
|
// 删除预设
|
|
@@ -11270,7 +11690,7 @@ class CommonPreset {
|
|
|
11270
11690
|
}
|
|
11271
11691
|
allPresets.splice(presetIndex, 1);
|
|
11272
11692
|
const presetsPath = this.filepath;
|
|
11273
|
-
await
|
|
11693
|
+
await writeJSON(presetsPath, allPresets);
|
|
11274
11694
|
return true;
|
|
11275
11695
|
}
|
|
11276
11696
|
// 读取预设
|
|
@@ -11329,6 +11749,7 @@ var LLMType;
|
|
|
11329
11749
|
})(LLMType || (LLMType = {}));
|
|
11330
11750
|
const APP_DEFAULT_CONFIG = {
|
|
11331
11751
|
logLevel: "debug",
|
|
11752
|
+
uploadCrashReport: false,
|
|
11332
11753
|
autoUpdate: true,
|
|
11333
11754
|
autoLaunch: false,
|
|
11334
11755
|
trash: false,
|
|
@@ -11341,6 +11762,7 @@ const APP_DEFAULT_CONFIG = {
|
|
|
11341
11762
|
host: "127.0.0.1",
|
|
11342
11763
|
passKey: "",
|
|
11343
11764
|
https: false,
|
|
11765
|
+
externalWebhook: "",
|
|
11344
11766
|
webhook: {
|
|
11345
11767
|
open: false,
|
|
11346
11768
|
recoderFolder: "",
|
|
@@ -38712,8 +39134,17 @@ var ref = ReferenceError;
|
|
|
38712
39134
|
/** @type {import('./syntax')} */
|
|
38713
39135
|
var syntax = SyntaxError;
|
|
38714
39136
|
|
|
38715
|
-
|
|
38716
|
-
var
|
|
39137
|
+
var type$2;
|
|
39138
|
+
var hasRequiredType$1;
|
|
39139
|
+
|
|
39140
|
+
function requireType$1 () {
|
|
39141
|
+
if (hasRequiredType$1) return type$2;
|
|
39142
|
+
hasRequiredType$1 = 1;
|
|
39143
|
+
|
|
39144
|
+
/** @type {import('./type')} */
|
|
39145
|
+
type$2 = TypeError;
|
|
39146
|
+
return type$2;
|
|
39147
|
+
}
|
|
38717
39148
|
|
|
38718
39149
|
/** @type {import('./uri')} */
|
|
38719
39150
|
var uri = URIError;
|
|
@@ -38781,58 +39212,49 @@ if ($defineProperty$2) {
|
|
|
38781
39212
|
|
|
38782
39213
|
var esDefineProperty = $defineProperty$2;
|
|
38783
39214
|
|
|
38784
|
-
|
|
38785
|
-
|
|
38786
|
-
|
|
38787
|
-
function
|
|
38788
|
-
if (
|
|
38789
|
-
hasRequiredShams = 1;
|
|
38790
|
-
|
|
38791
|
-
/** @type {import('./shams')} */
|
|
38792
|
-
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
38793
|
-
shams$2 = function hasSymbols() {
|
|
38794
|
-
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
38795
|
-
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
39215
|
+
/** @type {import('./shams')} */
|
|
39216
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
39217
|
+
var shams$1 = function hasSymbols() {
|
|
39218
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
39219
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
38796
39220
|
|
|
38797
|
-
|
|
38798
|
-
|
|
38799
|
-
|
|
38800
|
-
|
|
38801
|
-
|
|
39221
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
39222
|
+
var obj = {};
|
|
39223
|
+
var sym = Symbol('test');
|
|
39224
|
+
var symObj = Object(sym);
|
|
39225
|
+
if (typeof sym === 'string') { return false; }
|
|
38802
39226
|
|
|
38803
|
-
|
|
38804
|
-
|
|
39227
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
39228
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
38805
39229
|
|
|
38806
|
-
|
|
38807
|
-
|
|
38808
|
-
|
|
38809
|
-
|
|
39230
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
39231
|
+
// if (sym instanceof Symbol) { return false; }
|
|
39232
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
39233
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
38810
39234
|
|
|
38811
|
-
|
|
38812
|
-
|
|
39235
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
39236
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
38813
39237
|
|
|
38814
|
-
|
|
38815
|
-
|
|
38816
|
-
|
|
38817
|
-
|
|
39238
|
+
var symVal = 42;
|
|
39239
|
+
obj[sym] = symVal;
|
|
39240
|
+
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
39241
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
38818
39242
|
|
|
38819
|
-
|
|
39243
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
38820
39244
|
|
|
38821
|
-
|
|
38822
|
-
|
|
39245
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
39246
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
38823
39247
|
|
|
38824
|
-
|
|
39248
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
38825
39249
|
|
|
38826
|
-
|
|
38827
|
-
|
|
38828
|
-
|
|
38829
|
-
|
|
38830
|
-
|
|
39250
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
39251
|
+
// eslint-disable-next-line no-extra-parens
|
|
39252
|
+
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
|
39253
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
39254
|
+
}
|
|
38831
39255
|
|
|
38832
|
-
|
|
38833
|
-
|
|
38834
|
-
return shams$2;
|
|
38835
|
-
}
|
|
39256
|
+
return true;
|
|
39257
|
+
};
|
|
38836
39258
|
|
|
38837
39259
|
var hasSymbols$2;
|
|
38838
39260
|
var hasRequiredHasSymbols;
|
|
@@ -38842,7 +39264,7 @@ function requireHasSymbols () {
|
|
|
38842
39264
|
hasRequiredHasSymbols = 1;
|
|
38843
39265
|
|
|
38844
39266
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
38845
|
-
var hasSymbolSham =
|
|
39267
|
+
var hasSymbolSham = shams$1;
|
|
38846
39268
|
|
|
38847
39269
|
/** @type {import('.')} */
|
|
38848
39270
|
hasSymbols$2 = function hasNativeSymbols() {
|
|
@@ -39031,7 +39453,7 @@ function requireCallBindApplyHelpers () {
|
|
|
39031
39453
|
hasRequiredCallBindApplyHelpers = 1;
|
|
39032
39454
|
|
|
39033
39455
|
var bind = functionBind;
|
|
39034
|
-
var $TypeError =
|
|
39456
|
+
var $TypeError = requireType$1();
|
|
39035
39457
|
|
|
39036
39458
|
var $call = requireFunctionCall();
|
|
39037
39459
|
var $actualApply = requireActualApply();
|
|
@@ -39135,7 +39557,7 @@ var $EvalError = _eval;
|
|
|
39135
39557
|
var $RangeError = range$2;
|
|
39136
39558
|
var $ReferenceError = ref;
|
|
39137
39559
|
var $SyntaxError = syntax;
|
|
39138
|
-
var $TypeError$1 =
|
|
39560
|
+
var $TypeError$1 = requireType$1();
|
|
39139
39561
|
var $URIError = uri;
|
|
39140
39562
|
|
|
39141
39563
|
var abs = abs$1;
|
|
@@ -39503,47 +39925,6 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
|
39503
39925
|
return value;
|
|
39504
39926
|
};
|
|
39505
39927
|
|
|
39506
|
-
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
39507
|
-
var shams$1 = function hasSymbols() {
|
|
39508
|
-
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
39509
|
-
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
39510
|
-
|
|
39511
|
-
var obj = {};
|
|
39512
|
-
var sym = Symbol('test');
|
|
39513
|
-
var symObj = Object(sym);
|
|
39514
|
-
if (typeof sym === 'string') { return false; }
|
|
39515
|
-
|
|
39516
|
-
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
39517
|
-
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
39518
|
-
|
|
39519
|
-
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
39520
|
-
// if (sym instanceof Symbol) { return false; }
|
|
39521
|
-
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
39522
|
-
// if (!(symObj instanceof Symbol)) { return false; }
|
|
39523
|
-
|
|
39524
|
-
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
39525
|
-
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
39526
|
-
|
|
39527
|
-
var symVal = 42;
|
|
39528
|
-
obj[sym] = symVal;
|
|
39529
|
-
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
39530
|
-
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
39531
|
-
|
|
39532
|
-
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
39533
|
-
|
|
39534
|
-
var syms = Object.getOwnPropertySymbols(obj);
|
|
39535
|
-
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
39536
|
-
|
|
39537
|
-
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
39538
|
-
|
|
39539
|
-
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
39540
|
-
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
39541
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
39542
|
-
}
|
|
39543
|
-
|
|
39544
|
-
return true;
|
|
39545
|
-
};
|
|
39546
|
-
|
|
39547
39928
|
var hasSymbols = shams$1;
|
|
39548
39929
|
|
|
39549
39930
|
/** @type {import('.')} */
|
|
@@ -39557,7 +39938,7 @@ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
|
39557
39938
|
|
|
39558
39939
|
var hasToStringTag = shams();
|
|
39559
39940
|
var hasOwn$1 = hasown;
|
|
39560
|
-
var $TypeError =
|
|
39941
|
+
var $TypeError = requireType$1();
|
|
39561
39942
|
|
|
39562
39943
|
var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
|
|
39563
39944
|
|
|
@@ -42321,7 +42702,7 @@ function requireSupportsColor () {
|
|
|
42321
42702
|
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
42322
42703
|
hasRequiredSupportsColor = 1;
|
|
42323
42704
|
const os = require$$1$2;
|
|
42324
|
-
const tty = require$$0$
|
|
42705
|
+
const tty = require$$0$c;
|
|
42325
42706
|
const hasFlag = requireHasFlag();
|
|
42326
42707
|
|
|
42327
42708
|
const {env} = process;
|
|
@@ -42467,7 +42848,7 @@ function requireNode$1 () {
|
|
|
42467
42848
|
if (hasRequiredNode$1) return node$3.exports;
|
|
42468
42849
|
hasRequiredNode$1 = 1;
|
|
42469
42850
|
(function (module, exports) {
|
|
42470
|
-
const tty = require$$0$
|
|
42851
|
+
const tty = require$$0$c;
|
|
42471
42852
|
const util = require$$1$1;
|
|
42472
42853
|
|
|
42473
42854
|
/**
|
|
@@ -46962,7 +47343,7 @@ function getMainModulePath() {
|
|
|
46962
47343
|
|
|
46963
47344
|
/* eslint-disable no-unused-vars */
|
|
46964
47345
|
|
|
46965
|
-
const childProcess$1 = require$$0$
|
|
47346
|
+
const childProcess$1 = require$$0$d;
|
|
46966
47347
|
const os$3 = require$$1$2;
|
|
46967
47348
|
const path$a = require$$0$7;
|
|
46968
47349
|
const packageJson = packageJson$1;
|
|
@@ -50067,7 +50448,7 @@ class SubtitleStylePreset {
|
|
|
50067
50448
|
}
|
|
50068
50449
|
}
|
|
50069
50450
|
|
|
50070
|
-
var childProcess = require$$0$
|
|
50451
|
+
var childProcess = require$$0$d;
|
|
50071
50452
|
var spawn$1 = childProcess.spawn;
|
|
50072
50453
|
var exec = childProcess.exec;
|
|
50073
50454
|
|
|
@@ -54507,7 +54888,7 @@ async function trash(paths, options) {
|
|
|
54507
54888
|
} else if (process$2.platform === 'win32') {
|
|
54508
54889
|
module = await Promise.resolve().then(function () { return require('./windows-OmnJ7a39.cjs'); });
|
|
54509
54890
|
} else {
|
|
54510
|
-
module = await Promise.resolve().then(function () { return require('./linux-
|
|
54891
|
+
module = await Promise.resolve().then(function () { return require('./linux-tUOZ0nkf.cjs'); });
|
|
54511
54892
|
}
|
|
54512
54893
|
|
|
54513
54894
|
return module.default(paths);
|
|
@@ -61311,6 +61692,34 @@ const decrypt = (encryptedData, password) => {
|
|
|
61311
61692
|
return decrypted;
|
|
61312
61693
|
};
|
|
61313
61694
|
|
|
61695
|
+
const getExternalWebhookUrl = () => {
|
|
61696
|
+
return appConfig.get("externalWebhook")?.trim();
|
|
61697
|
+
};
|
|
61698
|
+
const sendExternalEventRequest = async (type, data) => {
|
|
61699
|
+
const webhookUrl = getExternalWebhookUrl();
|
|
61700
|
+
if (!webhookUrl)
|
|
61701
|
+
return;
|
|
61702
|
+
const body = {
|
|
61703
|
+
id: crypto$c.randomUUID(),
|
|
61704
|
+
version: 1,
|
|
61705
|
+
time: new Date().toISOString(),
|
|
61706
|
+
type,
|
|
61707
|
+
data,
|
|
61708
|
+
};
|
|
61709
|
+
try {
|
|
61710
|
+
await axios.post(webhookUrl, body, {
|
|
61711
|
+
proxy: false,
|
|
61712
|
+
timeout: 10000,
|
|
61713
|
+
});
|
|
61714
|
+
}
|
|
61715
|
+
catch (error) {
|
|
61716
|
+
logObj.error("发送外部事件失败", {
|
|
61717
|
+
webhookUrl,
|
|
61718
|
+
error,
|
|
61719
|
+
});
|
|
61720
|
+
}
|
|
61721
|
+
};
|
|
61722
|
+
|
|
61314
61723
|
// ffmpeg的subtitle参数转义
|
|
61315
61724
|
const escaped = (s) => {
|
|
61316
61725
|
s = s.replaceAll("\\", "/");
|
|
@@ -64056,7 +64465,7 @@ function requireNode () {
|
|
|
64056
64465
|
if (hasRequiredNode) return node.exports;
|
|
64057
64466
|
hasRequiredNode = 1;
|
|
64058
64467
|
(function (module, exports) {
|
|
64059
|
-
var tty = require$$0$
|
|
64468
|
+
var tty = require$$0$c;
|
|
64060
64469
|
var util = require$$1$1;
|
|
64061
64470
|
|
|
64062
64471
|
/**
|
|
@@ -64244,7 +64653,7 @@ function requireNode () {
|
|
|
64244
64653
|
|
|
64245
64654
|
case 'PIPE':
|
|
64246
64655
|
case 'TCP':
|
|
64247
|
-
var net = require$$0$
|
|
64656
|
+
var net = require$$0$e;
|
|
64248
64657
|
stream = new net.Socket({
|
|
64249
64658
|
fd: fd,
|
|
64250
64659
|
readable: false,
|
|
@@ -77744,7 +78153,7 @@ const zlib$2 = zlib$3;
|
|
|
77744
78153
|
const PassThrough$5 = require$$0$4.PassThrough;
|
|
77745
78154
|
const Cookies = cookies$1;
|
|
77746
78155
|
const packageData$8 = require$$9;
|
|
77747
|
-
const net$a = require$$0$
|
|
78156
|
+
const net$a = require$$0$e;
|
|
77748
78157
|
|
|
77749
78158
|
const MAX_REDIRECTS = 5;
|
|
77750
78159
|
|
|
@@ -78021,7 +78430,7 @@ var fetchExports = fetch$3.exports;
|
|
|
78021
78430
|
const fs = require$$0$6;
|
|
78022
78431
|
const nmfetch = fetchExports;
|
|
78023
78432
|
const dns = require$$4;
|
|
78024
|
-
const net = require$$0$
|
|
78433
|
+
const net = require$$0$e;
|
|
78025
78434
|
const os = require$$1$2;
|
|
78026
78435
|
|
|
78027
78436
|
const DNS_TTL = 5 * 60 * 1000;
|
|
@@ -85251,7 +85660,7 @@ var dkim = DKIM$1;
|
|
|
85251
85660
|
* Minimal HTTP/S proxy client
|
|
85252
85661
|
*/
|
|
85253
85662
|
|
|
85254
|
-
const net$9 = require$$0$
|
|
85663
|
+
const net$9 = require$$0$e;
|
|
85255
85664
|
const tls$6 = require$$1$7;
|
|
85256
85665
|
const urllib$1 = require$$0$9;
|
|
85257
85666
|
|
|
@@ -85712,7 +86121,7 @@ const util$E = require$$1$1;
|
|
|
85712
86121
|
const urllib = require$$0$9;
|
|
85713
86122
|
const packageData$7 = require$$9;
|
|
85714
86123
|
const MailMessage = mailMessage;
|
|
85715
|
-
const net$8 = require$$0$
|
|
86124
|
+
const net$8 = require$$0$e;
|
|
85716
86125
|
const dns$2 = require$$4;
|
|
85717
86126
|
const crypto$6 = require$$1$5;
|
|
85718
86127
|
|
|
@@ -86239,7 +86648,7 @@ var dataStream = DataStream$1;
|
|
|
86239
86648
|
|
|
86240
86649
|
const packageInfo = require$$9;
|
|
86241
86650
|
const EventEmitter$f = require$$0$8.EventEmitter;
|
|
86242
|
-
const net$7 = require$$0$
|
|
86651
|
+
const net$7 = require$$0$e;
|
|
86243
86652
|
const tls$5 = require$$1$7;
|
|
86244
86653
|
const os = require$$1$2;
|
|
86245
86654
|
const crypto$5 = require$$1$5;
|
|
@@ -90213,7 +90622,7 @@ let SMTPTransport$1 = class SMTPTransport extends EventEmitter$c {
|
|
|
90213
90622
|
// expose to the world
|
|
90214
90623
|
var smtpTransport = SMTPTransport$1;
|
|
90215
90624
|
|
|
90216
|
-
const spawn = require$$0$
|
|
90625
|
+
const spawn = require$$0$d.spawn;
|
|
90217
90626
|
const packageData$4 = require$$9;
|
|
90218
90627
|
const shared$4 = sharedExports;
|
|
90219
90628
|
|
|
@@ -169010,7 +169419,7 @@ var require$$1 = [
|
|
|
169010
169419
|
]
|
|
169011
169420
|
];
|
|
169012
169421
|
|
|
169013
|
-
var punycode = require$$0$
|
|
169422
|
+
var punycode = require$$0$f;
|
|
169014
169423
|
var mappingTable = require$$1;
|
|
169015
169424
|
|
|
169016
169425
|
var PROCESSING_OPTIONS = {
|
|
@@ -169203,7 +169612,7 @@ tr46.toUnicode = function(domain_name, useSTD3) {
|
|
|
169203
169612
|
tr46.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
|
|
169204
169613
|
|
|
169205
169614
|
(function (module) {
|
|
169206
|
-
const punycode = require$$0$
|
|
169615
|
+
const punycode = require$$0$f;
|
|
169207
169616
|
const tr46$1 = tr46;
|
|
169208
169617
|
|
|
169209
169618
|
const specialSchemes = {
|
|
@@ -172789,9 +173198,11 @@ async function sendByTg(title, desp, options) {
|
|
|
172789
173198
|
*/
|
|
172790
173199
|
async function sendBySystem(title, desp) {
|
|
172791
173200
|
// 非electron环境不触发
|
|
173201
|
+
// @ts-ignore
|
|
172792
173202
|
if (process.type !== "browser")
|
|
172793
173203
|
return;
|
|
172794
|
-
|
|
173204
|
+
// @ts-ignore
|
|
173205
|
+
const { Notification } = await import('electron');
|
|
172795
173206
|
const event = new Notification({
|
|
172796
173207
|
title: title,
|
|
172797
173208
|
body: desp,
|
|
@@ -173210,7 +173621,7 @@ function whichSync (cmd, opt) {
|
|
|
173210
173621
|
|
|
173211
173622
|
/*jshint node:true*/
|
|
173212
173623
|
|
|
173213
|
-
require$$0$
|
|
173624
|
+
require$$0$d.exec;
|
|
173214
173625
|
var isWindows = require$$1$2.platform().match(/win(32|64)/);
|
|
173215
173626
|
var which = which_1;
|
|
173216
173627
|
|
|
@@ -175953,7 +176364,7 @@ function requireProcessor () {
|
|
|
175953
176364
|
if (hasRequiredProcessor) return processor;
|
|
175954
176365
|
hasRequiredProcessor = 1;
|
|
175955
176366
|
|
|
175956
|
-
var spawn = require$$0$
|
|
176367
|
+
var spawn = require$$0$d.spawn;
|
|
175957
176368
|
var async = requireAsync();
|
|
175958
176369
|
var utils = utilsExports;
|
|
175959
176370
|
|
|
@@ -177346,7 +177757,7 @@ function requireFfprobe () {
|
|
|
177346
177757
|
if (hasRequiredFfprobe) return ffprobe;
|
|
177347
177758
|
hasRequiredFfprobe = 1;
|
|
177348
177759
|
|
|
177349
|
-
var spawn = require$$0$
|
|
177760
|
+
var spawn = require$$0$d.spawn;
|
|
177350
177761
|
|
|
177351
177762
|
function legacyTag(key) {
|
|
177352
177763
|
return key.match(/^TAG:/);
|
|
@@ -183592,8 +184003,8 @@ class TaskQueue {
|
|
|
183592
184003
|
* @param autoRun 是否自动运行(true: 立即执行, false: 根据任务限制决定)
|
|
183593
184004
|
*/
|
|
183594
184005
|
addTask(task, autoRun = true) {
|
|
183595
|
-
task.emitter.on("task-end", ({ taskId }) => {
|
|
183596
|
-
this.emitter.emit("task-end", { taskId });
|
|
184006
|
+
task.emitter.on("task-end", ({ taskId, data }) => {
|
|
184007
|
+
this.emitter.emit("task-end", { taskId, data });
|
|
183597
184008
|
});
|
|
183598
184009
|
task.emitter.on("task-error", ({ taskId, error }) => {
|
|
183599
184010
|
this.emitter.emit("task-error", { taskId, error });
|
|
@@ -183613,6 +184024,9 @@ class TaskQueue {
|
|
|
183613
184024
|
task.emitter.on("task-cancel", ({ taskId, autoStart }) => {
|
|
183614
184025
|
this.emitter.emit("task-cancel", { taskId, autoStart });
|
|
183615
184026
|
});
|
|
184027
|
+
// task.emitter.on("task-removed-queue", ({ taskId }) => {
|
|
184028
|
+
// this.emitter.emit("task-removed-queue", { taskId });
|
|
184029
|
+
// });
|
|
183616
184030
|
this.queue.push(task);
|
|
183617
184031
|
if (autoRun) {
|
|
183618
184032
|
task.exec();
|
|
@@ -183688,11 +184102,11 @@ class TaskQueue {
|
|
|
183688
184102
|
const task = this.queryTask(taskId);
|
|
183689
184103
|
if (!task)
|
|
183690
184104
|
return;
|
|
184105
|
+
task.emit("task-removed-queue", { taskId: task.taskId });
|
|
183691
184106
|
const index = this.queue.indexOf(task);
|
|
183692
184107
|
if (index !== -1) {
|
|
183693
184108
|
this.queue.splice(index, 1);
|
|
183694
184109
|
}
|
|
183695
|
-
task.emit("task-removed-queue", { taskId: task.taskId });
|
|
183696
184110
|
}
|
|
183697
184111
|
/**
|
|
183698
184112
|
* 暂停任务
|
|
@@ -183794,6 +184208,68 @@ class TaskQueue {
|
|
|
183794
184208
|
};
|
|
183795
184209
|
}
|
|
183796
184210
|
|
|
184211
|
+
const getExternalTaskStatus = (eventName, status) => {
|
|
184212
|
+
if (status === "pending")
|
|
184213
|
+
return "pending";
|
|
184214
|
+
if (status === "running")
|
|
184215
|
+
return "running";
|
|
184216
|
+
if (status === "paused")
|
|
184217
|
+
return "paused";
|
|
184218
|
+
if (status === "completed")
|
|
184219
|
+
return "completed";
|
|
184220
|
+
if (status === "error")
|
|
184221
|
+
return "error";
|
|
184222
|
+
if (status === "canceled")
|
|
184223
|
+
return "cancelled";
|
|
184224
|
+
if (eventName === "task-start" || eventName === "task-resume") {
|
|
184225
|
+
return "running";
|
|
184226
|
+
}
|
|
184227
|
+
if (eventName === "task-pause")
|
|
184228
|
+
return "paused";
|
|
184229
|
+
if (eventName === "task-end")
|
|
184230
|
+
return "completed";
|
|
184231
|
+
if (eventName === "task-error")
|
|
184232
|
+
return "error";
|
|
184233
|
+
if (eventName === "task-cancel")
|
|
184234
|
+
return "cancelled";
|
|
184235
|
+
return undefined;
|
|
184236
|
+
};
|
|
184237
|
+
const getExternalTaskType = (taskType) => {
|
|
184238
|
+
if (taskType === TaskType.bili) {
|
|
184239
|
+
return TaskType.biliUpload;
|
|
184240
|
+
}
|
|
184241
|
+
return taskType;
|
|
184242
|
+
};
|
|
184243
|
+
const toISOString = (time) => {
|
|
184244
|
+
if (!time)
|
|
184245
|
+
return undefined;
|
|
184246
|
+
return new Date(time).toISOString();
|
|
184247
|
+
};
|
|
184248
|
+
const isTerminalTaskEvent = (eventName) => {
|
|
184249
|
+
return ["task-end", "task-error", "task-cancel"].includes(eventName);
|
|
184250
|
+
};
|
|
184251
|
+
const sendExternalTaskEvent = async (taskQueue, eventName, payload) => {
|
|
184252
|
+
const task = taskQueue.queryTask(payload.taskId);
|
|
184253
|
+
const taskInfo = task ? taskQueue.stringify([task])[0] : undefined;
|
|
184254
|
+
const eventTime = Date.now();
|
|
184255
|
+
const startedTime = taskInfo?.startTime || (eventName === "task-start" ? eventTime : undefined);
|
|
184256
|
+
const endedTime = taskInfo?.endTime || (isTerminalTaskEvent(eventName) ? eventTime : undefined);
|
|
184257
|
+
const durationMs = taskInfo?.duration ??
|
|
184258
|
+
(startedTime && endedTime ? Math.max(endedTime - startedTime, 0) : undefined);
|
|
184259
|
+
await sendExternalEventRequest("task", {
|
|
184260
|
+
event: eventName,
|
|
184261
|
+
taskId: payload.taskId,
|
|
184262
|
+
taskType: getExternalTaskType(taskInfo?.type),
|
|
184263
|
+
status: getExternalTaskStatus(eventName, taskInfo?.status),
|
|
184264
|
+
message: taskInfo?.custsomProgressMsg || undefined,
|
|
184265
|
+
error: "error" in payload ? payload.error : taskInfo?.error || undefined,
|
|
184266
|
+
startedAt: toISOString(startedTime),
|
|
184267
|
+
endedAt: toISOString(endedTime),
|
|
184268
|
+
durationMs,
|
|
184269
|
+
extra: taskInfo?.extra,
|
|
184270
|
+
});
|
|
184271
|
+
};
|
|
184272
|
+
|
|
183797
184273
|
/**
|
|
183798
184274
|
* 全局任务队列实例
|
|
183799
184275
|
*/
|
|
@@ -183860,6 +184336,24 @@ taskQueue.on("task-end", ({ taskId }) => {
|
|
|
183860
184336
|
taskQueue.on("task-error", ({ taskId }) => {
|
|
183861
184337
|
sendTaskNotify("failure", taskId);
|
|
183862
184338
|
});
|
|
184339
|
+
taskQueue.on("task-start", (payload) => {
|
|
184340
|
+
void sendExternalTaskEvent(taskQueue, "task-start", payload);
|
|
184341
|
+
});
|
|
184342
|
+
taskQueue.on("task-end", (payload) => {
|
|
184343
|
+
void sendExternalTaskEvent(taskQueue, "task-end", payload);
|
|
184344
|
+
});
|
|
184345
|
+
taskQueue.on("task-error", (payload) => {
|
|
184346
|
+
void sendExternalTaskEvent(taskQueue, "task-error", payload);
|
|
184347
|
+
});
|
|
184348
|
+
taskQueue.on("task-pause", (payload) => {
|
|
184349
|
+
void sendExternalTaskEvent(taskQueue, "task-pause", payload);
|
|
184350
|
+
});
|
|
184351
|
+
taskQueue.on("task-resume", (payload) => {
|
|
184352
|
+
void sendExternalTaskEvent(taskQueue, "task-resume", payload);
|
|
184353
|
+
});
|
|
184354
|
+
taskQueue.on("task-cancel", (payload) => {
|
|
184355
|
+
void sendExternalTaskEvent(taskQueue, "task-cancel", payload);
|
|
184356
|
+
});
|
|
183863
184357
|
/**
|
|
183864
184358
|
* 暂停任务
|
|
183865
184359
|
*/
|
|
@@ -185102,7 +185596,7 @@ class BiliCheckQueue extends TypedEmitter {
|
|
|
185102
185596
|
};
|
|
185103
185597
|
}
|
|
185104
185598
|
|
|
185105
|
-
var vm = require$$0$
|
|
185599
|
+
var vm = require$$0$g;
|
|
185106
185600
|
|
|
185107
185601
|
var safeEval = function safeEval (code, context, opts) {
|
|
185108
185602
|
var sandbox = {};
|
|
@@ -185710,7 +186204,7 @@ async function downloadImage(imageUrl, savePath) {
|
|
|
185710
186204
|
}
|
|
185711
186205
|
const fileStream = fs$F.createWriteStream(savePath, { flags: "wx" });
|
|
185712
186206
|
// @ts-ignore
|
|
185713
|
-
await promises.finished(require$$0$
|
|
186207
|
+
await promises.finished(require$$0$b.Readable.fromWeb(res.body).pipe(fileStream));
|
|
185714
186208
|
}
|
|
185715
186209
|
const md5$3 = (str) => {
|
|
185716
186210
|
return crypto$c.createHash("md5").update(str).digest("hex");
|
|
@@ -189175,7 +189669,7 @@ var tree_1 = {
|
|
|
189175
189669
|
const assert$l = require$$0$h;
|
|
189176
189670
|
const { kDestroyed: kDestroyed$2, kBodyUsed: kBodyUsed$1, kListeners, kBody: kBody$2 } = requireSymbols();
|
|
189177
189671
|
const { IncomingMessage } = require$$2;
|
|
189178
|
-
const stream$1 = require$$0$
|
|
189672
|
+
const stream$1 = require$$0$b;
|
|
189179
189673
|
const net$6 = require$$0$i;
|
|
189180
189674
|
const { stringify } = require$$5;
|
|
189181
189675
|
const { EventEmitter: EE$1 } = EventEmitter$k;
|
|
@@ -194198,7 +194692,7 @@ function requireUtil$5 () {
|
|
|
194198
194692
|
if (hasRequiredUtil$5) return util$z;
|
|
194199
194693
|
hasRequiredUtil$5 = 1;
|
|
194200
194694
|
|
|
194201
|
-
const { Transform } = require$$0$
|
|
194695
|
+
const { Transform } = require$$0$b;
|
|
194202
194696
|
const zlib = require$$3$3;
|
|
194203
194697
|
const { redirectStatusSet, referrerPolicyTokens, badPortsSet } = requireConstants$2();
|
|
194204
194698
|
const { getGlobalOrigin } = requireGlobal();
|
|
@@ -196619,7 +197113,7 @@ function requireBody () {
|
|
|
196619
197113
|
const { FormData, setFormDataState } = requireFormdata();
|
|
196620
197114
|
const { webidl } = requireWebidl();
|
|
196621
197115
|
const assert = require$$0$h;
|
|
196622
|
-
const { isErrored, isDisturbed } = require$$0$
|
|
197116
|
+
const { isErrored, isDisturbed } = require$$0$b;
|
|
196623
197117
|
const { isUint8Array } = require$$8;
|
|
196624
197118
|
const { serializeAMimeType } = requireDataUrl();
|
|
196625
197119
|
const { multipartFormDataParser } = requireFormdataParser();
|
|
@@ -198729,7 +199223,7 @@ class AsyncWriter {
|
|
|
198729
199223
|
var clientH1 = connectH1$1;
|
|
198730
199224
|
|
|
198731
199225
|
const assert$h = require$$0$h;
|
|
198732
|
-
const { pipeline: pipeline$2 } = require$$0$
|
|
199226
|
+
const { pipeline: pipeline$2 } = require$$0$b;
|
|
198733
199227
|
const util$x = util$C;
|
|
198734
199228
|
const {
|
|
198735
199229
|
RequestContentLengthMismatchError,
|
|
@@ -203149,7 +203643,7 @@ var api = {};
|
|
|
203149
203643
|
var apiRequest = {exports: {}};
|
|
203150
203644
|
|
|
203151
203645
|
const assert$e = require$$0$h;
|
|
203152
|
-
const { Readable: Readable$3 } = require$$0$
|
|
203646
|
+
const { Readable: Readable$3 } = require$$0$b;
|
|
203153
203647
|
const { RequestAbortedError: RequestAbortedError$5, NotSupportedError, InvalidArgumentError: InvalidArgumentError$i, AbortError: AbortError$1 } = errors;
|
|
203154
203648
|
const util$r = util$C;
|
|
203155
203649
|
const { ReadableStreamFrom } = util$C;
|
|
@@ -204001,7 +204495,7 @@ var abortSignal = {
|
|
|
204001
204495
|
};
|
|
204002
204496
|
|
|
204003
204497
|
const assert$c = require$$0$h;
|
|
204004
|
-
const { finished } = require$$0$
|
|
204498
|
+
const { finished } = require$$0$b;
|
|
204005
204499
|
const { AsyncResource: AsyncResource$3 } = require$$1$9;
|
|
204006
204500
|
const { InvalidArgumentError: InvalidArgumentError$g, InvalidReturnValueError: InvalidReturnValueError$1 } = errors;
|
|
204007
204501
|
const util$p = util$C;
|
|
@@ -204212,7 +204706,7 @@ const {
|
|
|
204212
204706
|
Readable: Readable$1,
|
|
204213
204707
|
Duplex,
|
|
204214
204708
|
PassThrough
|
|
204215
|
-
} = require$$0$
|
|
204709
|
+
} = require$$0$b;
|
|
204216
204710
|
const assert$b = require$$0$h;
|
|
204217
204711
|
const { AsyncResource: AsyncResource$2 } = require$$1$9;
|
|
204218
204712
|
const {
|
|
@@ -205814,7 +206308,7 @@ let MockPool$1 = class MockPool extends Pool {
|
|
|
205814
206308
|
|
|
205815
206309
|
var mockPool = MockPool$1;
|
|
205816
206310
|
|
|
205817
|
-
const { Transform } = require$$0$
|
|
206311
|
+
const { Transform } = require$$0$b;
|
|
205818
206312
|
const { Console } = require$$1$a;
|
|
205819
206313
|
|
|
205820
206314
|
const PERSISTENT = process.versions.icu ? '✅' : 'Y ';
|
|
@@ -209950,7 +210444,7 @@ function isValidDate (date) {
|
|
|
209950
210444
|
|
|
209951
210445
|
var cacheHandler = CacheHandler$1;
|
|
209952
210446
|
|
|
209953
|
-
const { Writable: Writable$2 } = require$$0$
|
|
210447
|
+
const { Writable: Writable$2 } = require$$0$b;
|
|
209954
210448
|
const { EventEmitter: EventEmitter$7 } = EventEmitter$k;
|
|
209955
210449
|
const { assertCacheKey: assertCacheKey$1, assertCacheValue: assertCacheValue$1 } = cache$2;
|
|
209956
210450
|
|
|
@@ -210307,7 +210801,7 @@ let CacheRevalidationHandler$1 = class CacheRevalidationHandler {
|
|
|
210307
210801
|
var cacheRevalidationHandler = CacheRevalidationHandler$1;
|
|
210308
210802
|
|
|
210309
210803
|
const assert$5 = require$$0$h;
|
|
210310
|
-
const { Readable } = require$$0$
|
|
210804
|
+
const { Readable } = require$$0$b;
|
|
210311
210805
|
const util$j = util$C;
|
|
210312
210806
|
const CacheHandler = cacheHandler;
|
|
210313
210807
|
const MemoryCacheStore = memoryCacheStore;
|
|
@@ -210801,7 +211295,7 @@ var cache$1 = (opts = {}) => {
|
|
|
210801
211295
|
};
|
|
210802
211296
|
|
|
210803
211297
|
const { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = require$$3$3;
|
|
210804
|
-
const { pipeline } = require$$0$
|
|
211298
|
+
const { pipeline } = require$$0$b;
|
|
210805
211299
|
const DecoratorHandler = decoratorHandler;
|
|
210806
211300
|
const { runtimeFeatures } = runtimeFeatures$2;
|
|
210807
211301
|
|
|
@@ -211633,7 +212127,7 @@ var deduplicate = (opts = {}) => {
|
|
|
211633
212127
|
}
|
|
211634
212128
|
};
|
|
211635
212129
|
|
|
211636
|
-
const { Writable: Writable$1 } = require$$0$
|
|
212130
|
+
const { Writable: Writable$1 } = require$$0$b;
|
|
211637
212131
|
const { assertCacheKey, assertCacheValue } = cache$2;
|
|
211638
212132
|
|
|
211639
212133
|
let DatabaseSync;
|
|
@@ -214967,7 +215461,7 @@ function requireFetch () {
|
|
|
214967
215461
|
subresourceSet
|
|
214968
215462
|
} = requireConstants$2();
|
|
214969
215463
|
const EE = EventEmitter$k;
|
|
214970
|
-
const { Readable, pipeline, finished, isErrored, isReadable } = require$$0$
|
|
215464
|
+
const { Readable, pipeline, finished, isErrored, isReadable } = require$$0$b;
|
|
214971
215465
|
const { addAbortListener, bufferToLowerCasedHeaderName } = util$C;
|
|
214972
215466
|
const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = requireDataUrl();
|
|
214973
215467
|
const { getGlobalDispatcher } = global$1;
|
|
@@ -220602,7 +221096,7 @@ function requireReceiver () {
|
|
|
220602
221096
|
if (hasRequiredReceiver) return receiver$2;
|
|
220603
221097
|
hasRequiredReceiver = 1;
|
|
220604
221098
|
|
|
220605
|
-
const { Writable } = require$$0$
|
|
221099
|
+
const { Writable } = require$$0$b;
|
|
220606
221100
|
const assert = require$$0$h;
|
|
220607
221101
|
const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = requireConstants();
|
|
220608
221102
|
const {
|
|
@@ -222577,7 +223071,7 @@ var hasRequiredEventsourceStream;
|
|
|
222577
223071
|
function requireEventsourceStream () {
|
|
222578
223072
|
if (hasRequiredEventsourceStream) return eventsourceStream;
|
|
222579
223073
|
hasRequiredEventsourceStream = 1;
|
|
222580
|
-
const { Transform } = require$$0$
|
|
223074
|
+
const { Transform } = require$$0$b;
|
|
222581
223075
|
const { isASCIINumber, isValidLastEventId } = requireUtil$1();
|
|
222582
223076
|
|
|
222583
223077
|
/**
|
|
@@ -222985,7 +223479,7 @@ function requireEventsource () {
|
|
|
222985
223479
|
if (hasRequiredEventsource) return eventsource;
|
|
222986
223480
|
hasRequiredEventsource = 1;
|
|
222987
223481
|
|
|
222988
|
-
const { pipeline } = require$$0$
|
|
223482
|
+
const { pipeline } = require$$0$b;
|
|
222989
223483
|
const { fetching } = requireFetch();
|
|
222990
223484
|
const { makeRequest } = requireRequest();
|
|
222991
223485
|
const { webidl } = requireWebidl();
|
|
@@ -231861,7 +232355,7 @@ var extension$3 = { format: format$2, parse: parse$4 };
|
|
|
231861
232355
|
const EventEmitter$6 = require$$0$8;
|
|
231862
232356
|
const https$2 = require$$1$4;
|
|
231863
232357
|
const http$2 = require$$3$2;
|
|
231864
|
-
const net$1 = require$$0$
|
|
232358
|
+
const net$1 = require$$0$e;
|
|
231865
232359
|
const tls$2 = require$$1$7;
|
|
231866
232360
|
const { randomBytes, createHash } = require$$1$5;
|
|
231867
232361
|
const { URL: URL$1 } = require$$0$9;
|
|
@@ -245526,7 +246020,7 @@ var SmartBuffer$1 = (function () {
|
|
|
245526
246020
|
|
|
245527
246021
|
var smartBuffer = SmartBuffer$1;
|
|
245528
246022
|
|
|
245529
|
-
var net = require$$0$
|
|
246023
|
+
var net = require$$0$e;
|
|
245530
246024
|
var ip = ip$1;
|
|
245531
246025
|
var SmartBuffer = smartBuffer;
|
|
245532
246026
|
|
|
@@ -268806,6 +269300,7 @@ async function getRoomInfoByUserWeb(secUserId, opts = {}) {
|
|
|
268806
269300
|
if (!res.data.includes("直播中")) {
|
|
268807
269301
|
return {
|
|
268808
269302
|
living: false,
|
|
269303
|
+
isLiveRadio: false,
|
|
268809
269304
|
nickname: "",
|
|
268810
269305
|
sec_uid: "",
|
|
268811
269306
|
avatar: "",
|
|
@@ -268824,19 +269319,38 @@ async function getRoomInfoByUserWeb(secUserId, opts = {}) {
|
|
|
268824
269319
|
.replace(/\\"/g, '"')
|
|
268825
269320
|
.replace(/\\"/g, '"')
|
|
268826
269321
|
.replace(/"\$\w+"/g, "null");
|
|
268827
|
-
// const roomRegex = /(\{\\"common\\":.*?)"\]\)/;
|
|
268828
|
-
// const roomMatch = res.data.match(roomRegex);
|
|
268829
|
-
// if (!roomMatch) {
|
|
268830
|
-
// throw new Error("No room match found in HTML");
|
|
268831
|
-
// }
|
|
268832
|
-
// let roomJsonStr = roomMatch[1];
|
|
268833
|
-
// roomJsonStr = roomJsonStr
|
|
268834
|
-
// .replace(/\\"/g, '"')
|
|
268835
|
-
// .replace(/\\"/g, '"')
|
|
268836
|
-
// .replace(/"\$\w+"/g, "null");
|
|
268837
269322
|
try {
|
|
268838
|
-
// console.log(userJsonStr);
|
|
268839
269323
|
const userData = JSON.parse(userJsonStr);
|
|
269324
|
+
const roomData = userData?.user?.user?.roomData;
|
|
269325
|
+
const streamUrl = roomData?.stream_url;
|
|
269326
|
+
let liveCoreSdkData = null;
|
|
269327
|
+
if (streamUrl) {
|
|
269328
|
+
liveCoreSdkData = { live_core_sdk_data: streamUrl.live_core_sdk_data };
|
|
269329
|
+
if (liveCoreSdkData?.live_core_sdk_data?.pull_data) {
|
|
269330
|
+
const flvPullUrl = streamUrl.flv_pull_url;
|
|
269331
|
+
let streamData = {};
|
|
269332
|
+
for (const quality of [{ key: "or4", desc: "原画" }, ...qualityList]) {
|
|
269333
|
+
const flvUrls = Object.values(flvPullUrl);
|
|
269334
|
+
if (flvUrls.some((url) => url.includes(`${quality.key}`))) {
|
|
269335
|
+
const url = flvUrls.find((url) => url.includes(`${quality.key}`));
|
|
269336
|
+
const convertedQuality = quality.key === "or4" ? "origin" : quality.key;
|
|
269337
|
+
streamData[convertedQuality] = {
|
|
269338
|
+
// @ts-ignore
|
|
269339
|
+
main: {
|
|
269340
|
+
flv: url,
|
|
269341
|
+
hls: "",
|
|
269342
|
+
},
|
|
269343
|
+
};
|
|
269344
|
+
}
|
|
269345
|
+
}
|
|
269346
|
+
liveCoreSdkData.live_core_sdk_data.pull_data.stream_data = streamData;
|
|
269347
|
+
}
|
|
269348
|
+
else {
|
|
269349
|
+
liveCoreSdkData = null;
|
|
269350
|
+
}
|
|
269351
|
+
}
|
|
269352
|
+
// console.log("pppp", JSON.stringify(liveCoreSdkData, null, 2));
|
|
269353
|
+
// console.log(JSON.stringify(streamUrl, null, 2));
|
|
268840
269354
|
// console.log(JSON.stringify(userData, null, 2));
|
|
268841
269355
|
// const roomData = JSON.parse(roomJsonStr);
|
|
268842
269356
|
// console.log(roomData);
|
|
@@ -268844,15 +269358,16 @@ async function getRoomInfoByUserWeb(secUserId, opts = {}) {
|
|
|
268844
269358
|
// const streamData = data.state.streamStore.streamData;
|
|
268845
269359
|
return {
|
|
268846
269360
|
living: userData?.user?.user?.roomData?.status === 2,
|
|
269361
|
+
isLiveRadio: roomData?.live_type_audio ?? false,
|
|
268847
269362
|
nickname: userData?.user?.user?.nickname ?? "",
|
|
268848
269363
|
sec_uid: userData?.user?.user?.secUid ?? "",
|
|
268849
269364
|
avatar: userData?.user?.user?.avatar ?? "",
|
|
268850
|
-
api: "
|
|
269365
|
+
api: "userHTML",
|
|
268851
269366
|
room: {
|
|
268852
269367
|
title: "",
|
|
268853
269368
|
cover: "",
|
|
268854
269369
|
id_str: userData?.user?.user?.roomIdStr,
|
|
268855
|
-
stream_url:
|
|
269370
|
+
stream_url: liveCoreSdkData,
|
|
268856
269371
|
},
|
|
268857
269372
|
};
|
|
268858
269373
|
}
|
|
@@ -268897,8 +269412,10 @@ async function getRoomInfoByHtml(webRoomId, opts = {}) {
|
|
|
268897
269412
|
const data = JSON.parse(jsonStr);
|
|
268898
269413
|
const roomInfo = data.state.roomStore.roomInfo;
|
|
268899
269414
|
const streamData = data.state.streamStore.streamData;
|
|
269415
|
+
const isLiveRadio = roomInfo.enter_mode == 1;
|
|
268900
269416
|
return {
|
|
268901
|
-
living: roomInfo?.room?.status === 2,
|
|
269417
|
+
living: roomInfo?.room?.status === 2 || isLiveRadio,
|
|
269418
|
+
isLiveRadio: isLiveRadio,
|
|
268902
269419
|
nickname: roomInfo?.anchor?.nickname ?? "",
|
|
268903
269420
|
sec_uid: roomInfo?.anchor?.sec_uid ?? "",
|
|
268904
269421
|
avatar: roomInfo?.anchor?.avatar_thumb?.url_list?.[0] ?? "",
|
|
@@ -268907,15 +269424,17 @@ async function getRoomInfoByHtml(webRoomId, opts = {}) {
|
|
|
268907
269424
|
title: roomInfo?.room?.title ?? "",
|
|
268908
269425
|
cover: roomInfo?.room?.cover?.url_list?.[0] ?? "",
|
|
268909
269426
|
id_str: roomInfo?.room?.id_str ?? "",
|
|
268910
|
-
stream_url:
|
|
268911
|
-
|
|
268912
|
-
|
|
268913
|
-
|
|
268914
|
-
|
|
268915
|
-
|
|
269427
|
+
stream_url: roomInfo?.room?.stream_url?.pull_datas
|
|
269428
|
+
? {
|
|
269429
|
+
pull_datas: roomInfo?.room?.stream_url?.pull_datas,
|
|
269430
|
+
live_core_sdk_data: {
|
|
269431
|
+
pull_data: {
|
|
269432
|
+
options: { qualities: streamData.H264_streamData?.options?.qualities ?? [] },
|
|
269433
|
+
stream_data: streamData.H264_streamData?.stream ?? {},
|
|
269434
|
+
},
|
|
268916
269435
|
},
|
|
268917
|
-
}
|
|
268918
|
-
|
|
269436
|
+
}
|
|
269437
|
+
: null,
|
|
268919
269438
|
},
|
|
268920
269439
|
};
|
|
268921
269440
|
}
|
|
@@ -268963,6 +269482,7 @@ async function getRoomInfoByWeb(webRoomId, opts = {}) {
|
|
|
268963
269482
|
// 直播已结束
|
|
268964
269483
|
return {
|
|
268965
269484
|
living: false,
|
|
269485
|
+
isLiveRadio: false,
|
|
268966
269486
|
nickname: "",
|
|
268967
269487
|
sec_uid: "",
|
|
268968
269488
|
avatar: "",
|
|
@@ -268979,7 +269499,8 @@ async function getRoomInfoByWeb(webRoomId, opts = {}) {
|
|
|
268979
269499
|
const data = res.data.data;
|
|
268980
269500
|
const room = data?.data?.[0];
|
|
268981
269501
|
return {
|
|
268982
|
-
living: data?.room_status === 0,
|
|
269502
|
+
living: data?.room_status === 0 || data?.room_status === 1,
|
|
269503
|
+
isLiveRadio: data?.room_status === 1,
|
|
268983
269504
|
nickname: data?.user?.nickname ?? "",
|
|
268984
269505
|
avatar: data?.user?.avatar_thumb?.url_list?.[0] ?? "",
|
|
268985
269506
|
sec_uid: data?.user?.sec_uid ?? "",
|
|
@@ -269018,6 +269539,7 @@ async function getRoomInfoByMobile(secUserId, opts = {}) {
|
|
|
269018
269539
|
const room = res?.data?.data?.room;
|
|
269019
269540
|
return {
|
|
269020
269541
|
living: room?.status === 2,
|
|
269542
|
+
isLiveRadio: room?.live_type_audio ?? false,
|
|
269021
269543
|
nickname: room?.owner?.nickname,
|
|
269022
269544
|
sec_uid: room?.owner?.sec_uid,
|
|
269023
269545
|
avatar: room?.owner?.avatar_thumb?.url_list?.[0],
|
|
@@ -269055,11 +269577,12 @@ async function getRoomInfo(webRoomId, opts = {}) {
|
|
|
269055
269577
|
else {
|
|
269056
269578
|
data = await getRoomInfoByWeb(webRoomId, opts);
|
|
269057
269579
|
}
|
|
269058
|
-
// console.log(JSON.stringify(data, null, 2));
|
|
269059
269580
|
const room = data.room;
|
|
269060
|
-
|
|
269581
|
+
assert(room, `No room data, id ${webRoomId}`);
|
|
269582
|
+
if (!room?.stream_url) {
|
|
269061
269583
|
return {
|
|
269062
269584
|
living: data.living,
|
|
269585
|
+
isLiveRadio: data.isLiveRadio,
|
|
269063
269586
|
roomId: webRoomId,
|
|
269064
269587
|
owner: data.nickname,
|
|
269065
269588
|
title: room?.title ?? data.nickname,
|
|
@@ -269072,22 +269595,6 @@ async function getRoomInfo(webRoomId, opts = {}) {
|
|
|
269072
269595
|
api: data.api,
|
|
269073
269596
|
};
|
|
269074
269597
|
}
|
|
269075
|
-
assert(room, `No room data, id ${webRoomId}`);
|
|
269076
|
-
if (room?.stream_url == null) {
|
|
269077
|
-
return {
|
|
269078
|
-
living: false,
|
|
269079
|
-
roomId: webRoomId,
|
|
269080
|
-
owner: data.nickname,
|
|
269081
|
-
title: room?.title ?? data.nickname,
|
|
269082
|
-
streams: [],
|
|
269083
|
-
sources: [],
|
|
269084
|
-
avatar: data.avatar,
|
|
269085
|
-
cover: room.cover,
|
|
269086
|
-
liveId: room.id_str,
|
|
269087
|
-
uid: data.sec_uid,
|
|
269088
|
-
api: data.api,
|
|
269089
|
-
};
|
|
269090
|
-
}
|
|
269091
269598
|
let qualities = [];
|
|
269092
269599
|
let stream_data = "";
|
|
269093
269600
|
if (opts.doubleScreen && !isEmpty(room.stream_url.pull_datas)) {
|
|
@@ -269156,6 +269663,7 @@ async function getRoomInfo(webRoomId, opts = {}) {
|
|
|
269156
269663
|
// console.log(JSON.stringify(sources, null, 2), qualities);
|
|
269157
269664
|
return {
|
|
269158
269665
|
living: data.living,
|
|
269666
|
+
isLiveRadio: data.isLiveRadio,
|
|
269159
269667
|
roomId: webRoomId,
|
|
269160
269668
|
owner: data.nickname,
|
|
269161
269669
|
title: room.title,
|
|
@@ -269434,6 +269942,7 @@ async function getInfo$1(channelId, opts) {
|
|
|
269434
269942
|
const startTime = new Date();
|
|
269435
269943
|
return {
|
|
269436
269944
|
living: info.living,
|
|
269945
|
+
isLiveRadio: info.isLiveRadio,
|
|
269437
269946
|
owner: info.owner,
|
|
269438
269947
|
title: info.title,
|
|
269439
269948
|
roomId: info.roomId,
|
|
@@ -269449,12 +269958,20 @@ async function getInfo$1(channelId, opts) {
|
|
|
269449
269958
|
}
|
|
269450
269959
|
async function getStream$1(opts) {
|
|
269451
269960
|
let api = opts.api ?? "web";
|
|
269452
|
-
if (api === "userHTML") {
|
|
269961
|
+
if (api === "userHTML" || api === "webHTML") {
|
|
269453
269962
|
// userHTML 接口只能用于状态检测
|
|
269454
269963
|
api = "web";
|
|
269455
269964
|
}
|
|
269456
269965
|
else if (api === "random") {
|
|
269457
|
-
api = selectRandomAPI(["userHTML"]);
|
|
269966
|
+
api = selectRandomAPI(["userHTML", "webHTML"]);
|
|
269967
|
+
}
|
|
269968
|
+
if (opts.isLiveRadio) {
|
|
269969
|
+
// 直播电台可能需要特殊处理,优先使用 userHTML 接口
|
|
269970
|
+
api = "userHTML";
|
|
269971
|
+
// 如果用户指定了mobile接口,那么优先使用mobile接口获取流信息
|
|
269972
|
+
if (opts.api === "mobile") {
|
|
269973
|
+
api = "mobile";
|
|
269974
|
+
}
|
|
269458
269975
|
}
|
|
269459
269976
|
const info = await getRoomInfo(opts.channelId, {
|
|
269460
269977
|
doubleScreen: opts.doubleScreen ?? true,
|
|
@@ -301148,6 +301665,7 @@ const checkLiveStatusAndRecord$1 = async function ({ getSavePath, banLiveId, isM
|
|
|
301148
301665
|
return this.recordHandle;
|
|
301149
301666
|
}
|
|
301150
301667
|
// 获取直播间信息
|
|
301668
|
+
let isLiveRadio = false;
|
|
301151
301669
|
try {
|
|
301152
301670
|
const liveInfo = await getInfo$1(this.channelId, {
|
|
301153
301671
|
auth: this.auth,
|
|
@@ -301155,6 +301673,7 @@ const checkLiveStatusAndRecord$1 = async function ({ getSavePath, banLiveId, isM
|
|
|
301155
301673
|
uid: this.uid,
|
|
301156
301674
|
});
|
|
301157
301675
|
this.liveInfo = liveInfo;
|
|
301676
|
+
isLiveRadio = liveInfo.isLiveRadio;
|
|
301158
301677
|
this.emit("stateChange", { state: "idle" });
|
|
301159
301678
|
}
|
|
301160
301679
|
catch (error) {
|
|
@@ -301192,6 +301711,7 @@ const checkLiveStatusAndRecord$1 = async function ({ getSavePath, banLiveId, isM
|
|
|
301192
301711
|
doubleScreen: this.doubleScreen,
|
|
301193
301712
|
api: this.api,
|
|
301194
301713
|
uid: this.uid,
|
|
301714
|
+
isLiveRadio: isLiveRadio,
|
|
301195
301715
|
});
|
|
301196
301716
|
this.liveInfo.owner = res.owner;
|
|
301197
301717
|
this.liveInfo.title = res.title;
|
|
@@ -302333,6 +302853,21 @@ class RecorderConfig {
|
|
|
302333
302853
|
|
|
302334
302854
|
// 缓存直播结束通知的最后触发时间,避免频繁通知
|
|
302335
302855
|
const endLiveNotificationCache = new Map();
|
|
302856
|
+
const getRecorderExternalBase = (recorder) => {
|
|
302857
|
+
return {
|
|
302858
|
+
roomId: String(recorder.channelId),
|
|
302859
|
+
platform: recorder.providerId,
|
|
302860
|
+
title: recorder.liveInfo?.title,
|
|
302861
|
+
username: recorder.liveInfo?.owner,
|
|
302862
|
+
time: new Date().toISOString(),
|
|
302863
|
+
liveId: recorder.liveInfo?.liveId || "",
|
|
302864
|
+
avatar: recorder.liveInfo?.avatar || recorder.extra?.avatar || "",
|
|
302865
|
+
cover: recorder.liveInfo?.cover || "",
|
|
302866
|
+
};
|
|
302867
|
+
};
|
|
302868
|
+
const sendRecorderExternalEvent = async (type, data) => {
|
|
302869
|
+
await sendExternalEventRequest(type, data);
|
|
302870
|
+
};
|
|
302336
302871
|
async function sendStartLiveNotification(appConfig, recorder, config) {
|
|
302337
302872
|
const name = recorder?.liveInfo?.owner ? recorder.liveInfo.owner : config.remarks;
|
|
302338
302873
|
const title = `${name}(${config.channelId}) 正在直播`;
|
|
@@ -302343,7 +302878,8 @@ async function sendStartLiveNotification(appConfig, recorder, config) {
|
|
|
302343
302878
|
}
|
|
302344
302879
|
if (notifyType === "system") {
|
|
302345
302880
|
const event = await sendBySystem(title, `${recorder?.liveInfo?.title}\n点击打开直播间`);
|
|
302346
|
-
|
|
302881
|
+
// @ts-ignore
|
|
302882
|
+
const { shell } = await import('electron');
|
|
302347
302883
|
event?.on("click", () => {
|
|
302348
302884
|
const url = recorder.getChannelURL();
|
|
302349
302885
|
shell.openExternal(url);
|
|
@@ -302380,8 +302916,9 @@ async function sendEndLiveNotification(appConfig, recorder, config) {
|
|
|
302380
302916
|
}
|
|
302381
302917
|
async function convert2Mp4(videoFile) {
|
|
302382
302918
|
const output = replaceExtName$1(videoFile, ".mp4");
|
|
302383
|
-
if (await fs$m.pathExists(output))
|
|
302384
|
-
|
|
302919
|
+
if (await fs$m.pathExists(output)) {
|
|
302920
|
+
throw new Error(`目标文件已存在: ${output}`);
|
|
302921
|
+
}
|
|
302385
302922
|
const name = path$z.basename(output);
|
|
302386
302923
|
return new Promise((resolve, reject) => {
|
|
302387
302924
|
transcode(videoFile, name, {
|
|
@@ -302540,9 +303077,16 @@ async function createRecorderManager(appConfig) {
|
|
|
302540
303077
|
recorder.extra = {};
|
|
302541
303078
|
const timestamp = Date.now();
|
|
302542
303079
|
recorder.extra.lastRecordTime = timestamp;
|
|
303080
|
+
void sendRecorderExternalEvent("record_start", {
|
|
303081
|
+
...getRecorderExternalBase(recorder),
|
|
303082
|
+
time: new Date(timestamp).toISOString(),
|
|
303083
|
+
});
|
|
302543
303084
|
});
|
|
302544
303085
|
manager.on("RecordStop", ({ recorder }) => {
|
|
302545
303086
|
logObj.info("Manager stop", recorder);
|
|
303087
|
+
void sendRecorderExternalEvent("record_end", {
|
|
303088
|
+
...getRecorderExternalBase(recorder),
|
|
303089
|
+
});
|
|
302546
303090
|
// 录制结束通知,自动监听&开启推送时才会发送
|
|
302547
303091
|
const config = recorderConfig.get(recorder.id);
|
|
302548
303092
|
if (!config)
|
|
@@ -302595,6 +303139,11 @@ async function createRecorderManager(appConfig) {
|
|
|
302595
303139
|
}, {
|
|
302596
303140
|
proxy: false,
|
|
302597
303141
|
});
|
|
303142
|
+
await sendRecorderExternalEvent("file_created", {
|
|
303143
|
+
filePath: filename,
|
|
303144
|
+
roomId: String(recorder.channelId),
|
|
303145
|
+
platform: recorder.providerId,
|
|
303146
|
+
});
|
|
302598
303147
|
recordHistory.addWithStreamer({
|
|
302599
303148
|
live_start_time: liveStartTime?.getTime(),
|
|
302600
303149
|
live_id: recorder?.liveInfo?.liveId,
|
|
@@ -302678,6 +303227,11 @@ async function createRecorderManager(appConfig) {
|
|
|
302678
303227
|
logObj.error("Update live error", { recorder, filename, error });
|
|
302679
303228
|
}
|
|
302680
303229
|
finally {
|
|
303230
|
+
await sendRecorderExternalEvent("file_completed", {
|
|
303231
|
+
filePath: filename,
|
|
303232
|
+
roomId: String(recorder.channelId),
|
|
303233
|
+
platform: recorder.providerId,
|
|
303234
|
+
});
|
|
302681
303235
|
if (data?.sendToWebhook) {
|
|
302682
303236
|
const webhookUrl = `http://127.0.0.1:${config.port}/webhook/custom`;
|
|
302683
303237
|
const payload = {
|
|
@@ -302995,7 +303549,6 @@ exports.Throttle = Throttle$1;
|
|
|
302995
303549
|
exports.TvQrcodeLogin = TvQrcodeLogin;
|
|
302996
303550
|
exports.TypedEmitter = TypedEmitter;
|
|
302997
303551
|
exports.VideoPreset = VideoPreset;
|
|
302998
|
-
exports._eval = _eval;
|
|
302999
303552
|
exports._send = _send;
|
|
303000
303553
|
exports.addExtractAudioTask = addExtractAudioTask;
|
|
303001
303554
|
exports.analyzeResolutionChanges = analyzeResolutionChanges;
|
|
@@ -303018,7 +303571,7 @@ exports.convertXml2Ass = convertXml2Ass;
|
|
|
303018
303571
|
exports.cut = cut;
|
|
303019
303572
|
exports.defaultRecordConfig = defaultRecordConfig;
|
|
303020
303573
|
exports.douyu = douyu;
|
|
303021
|
-
exports.
|
|
303574
|
+
exports.esDefineProperty = esDefineProperty;
|
|
303022
303575
|
exports.escaped = escaped;
|
|
303023
303576
|
exports.executeVirtualRecordConfig = executeVirtualRecordConfig;
|
|
303024
303577
|
exports.extension = extension$3;
|
|
@@ -303032,10 +303585,12 @@ exports.getBinPath = getBinPath;
|
|
|
303032
303585
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
303033
303586
|
exports.getFileSize = getFileSize$1;
|
|
303034
303587
|
exports.getInfo = getInfo$1;
|
|
303588
|
+
exports.getIntrinsic = getIntrinsic;
|
|
303035
303589
|
exports.getStream = getStream$1;
|
|
303036
303590
|
exports.getTempPath = getTempPath;
|
|
303037
303591
|
exports.getToken = getToken;
|
|
303038
303592
|
exports.globParent = globParent$1;
|
|
303593
|
+
exports.gopd = gopd;
|
|
303039
303594
|
exports.handleKillTask = handleKillTask;
|
|
303040
303595
|
exports.handleListTask = handleListTask;
|
|
303041
303596
|
exports.handlePauseTask = handlePauseTask;
|
|
@@ -303045,7 +303600,6 @@ exports.handleRestartTask = handleRestartTask;
|
|
|
303045
303600
|
exports.handleResumeTask = handleResumeTask;
|
|
303046
303601
|
exports.handleStartTask = handleStartTask;
|
|
303047
303602
|
exports.hanldeInterruptTask = hanldeInterruptTask;
|
|
303048
|
-
exports.hasown = hasown;
|
|
303049
303603
|
exports.huya = huya;
|
|
303050
303604
|
exports.index = index;
|
|
303051
303605
|
exports.inheritsExports = inheritsExports;
|
|
@@ -303065,18 +303619,18 @@ exports.parseMeta = parseMeta;
|
|
|
303065
303619
|
exports.parseSavePath = parseSavePath;
|
|
303066
303620
|
exports.permessageDeflate = permessageDeflate$1;
|
|
303067
303621
|
exports.pick = pick;
|
|
303068
|
-
exports.
|
|
303622
|
+
exports.picomatch = picomatch$1;
|
|
303069
303623
|
exports.readVideoMeta = readVideoMeta;
|
|
303070
303624
|
exports.readXmlTimestamp = readXmlTimestamp;
|
|
303071
303625
|
exports.reconnectDB = reconnectDB;
|
|
303072
303626
|
exports.recordHistory = recordHistory;
|
|
303073
|
-
exports.ref = ref;
|
|
303074
303627
|
exports.replaceExtName = replaceExtName$1;
|
|
303075
303628
|
exports.replaceFourByteUnicode = replaceFourByteUnicode;
|
|
303076
303629
|
exports.requireMs = requireMs$1;
|
|
303077
303630
|
exports.requireSupportsColor = requireSupportsColor;
|
|
303631
|
+
exports.requireType = requireType$1;
|
|
303632
|
+
exports.safeBufferExports = safeBufferExports;
|
|
303078
303633
|
exports.shams = shams;
|
|
303079
|
-
exports.shams$1 = shams$1;
|
|
303080
303634
|
exports.sleep = sleep;
|
|
303081
303635
|
exports.sleep$1 = sleep$1;
|
|
303082
303636
|
exports.srcExports = srcExports$2;
|
|
@@ -303085,8 +303639,6 @@ exports.taskQueue = taskQueue;
|
|
|
303085
303639
|
exports.testVirtualRecordConfig = testVirtualRecordConfig;
|
|
303086
303640
|
exports.transcode = transcode;
|
|
303087
303641
|
exports.trashItem = trashItem;
|
|
303088
|
-
exports.type = type$2;
|
|
303089
|
-
exports.uri = uri;
|
|
303090
303642
|
exports.uuid = uuid$4;
|
|
303091
303643
|
exports.validateBiliupConfig = validateBiliupConfig;
|
|
303092
303644
|
exports.validationExports = validationExports;
|