bililive-cli 1.4.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/lib/bili-D3J1MVEe.js +77902 -0
- package/lib/index-ClJgJB5w.js +28010 -0
- package/lib/{index-BZRzMMRb.js → index-Dkt7D2TB.js} +4 -4
- package/lib/index.cjs +105 -108653
- package/lib/{linux-BetMzq9g.js → linux-D-VDnP7t.js} +49 -111
- package/lib/{macos-BaatW38k.js → macos-DVOnmFU5.js} +1 -1
- package/lib/v4-D4KzFnn8.js +67 -0
- package/lib/{windows-B0oX8Um0.js → windows-wcJYLyu-.js} +1 -1
- package/package.json +4 -4
- package/lib/linux-oSTOTwiW.js +0 -3582
|
@@ -3,101 +3,35 @@
|
|
|
3
3
|
var os$3 = require('node:os');
|
|
4
4
|
var path$5 = require('node:path');
|
|
5
5
|
var fs$3 = require('node:fs');
|
|
6
|
-
var index = require('./
|
|
7
|
-
var require$$0 = require('fs');
|
|
8
|
-
var require$$
|
|
9
|
-
var require$$0$
|
|
10
|
-
var require$$0$
|
|
11
|
-
var require$$1
|
|
6
|
+
var index = require('./bili-D3J1MVEe.js');
|
|
7
|
+
var require$$0$1 = require('fs');
|
|
8
|
+
var require$$0 = require('path');
|
|
9
|
+
var require$$0$2 = require('child_process');
|
|
10
|
+
var require$$0$3 = require('os');
|
|
11
|
+
var require$$1 = require('util');
|
|
12
12
|
var require$$5 = require('assert');
|
|
13
|
-
var require$$0$
|
|
14
|
-
var require$$0$
|
|
15
|
-
var require$$0$
|
|
13
|
+
var require$$0$4 = require('events');
|
|
14
|
+
var require$$0$6 = require('buffer');
|
|
15
|
+
var require$$0$5 = require('stream');
|
|
16
16
|
var process$2 = require('node:process');
|
|
17
|
-
require('
|
|
17
|
+
var v4 = require('./v4-D4KzFnn8.js');
|
|
18
|
+
require('node:crypto');
|
|
19
|
+
require('node:child_process');
|
|
20
|
+
require('http');
|
|
21
|
+
require('https');
|
|
22
|
+
require('url');
|
|
18
23
|
require('tty');
|
|
19
24
|
require('zlib');
|
|
20
|
-
require('
|
|
25
|
+
require('node:events');
|
|
21
26
|
require('crypto');
|
|
22
|
-
require('
|
|
23
|
-
require('net');
|
|
24
|
-
require('querystring');
|
|
25
|
-
require('async_hooks');
|
|
26
|
-
require('string_decoder');
|
|
27
|
+
require('node:url');
|
|
27
28
|
require('constants');
|
|
28
|
-
require('https');
|
|
29
|
-
require('node:events');
|
|
30
29
|
require('node:module');
|
|
30
|
+
require('net');
|
|
31
31
|
require('dns');
|
|
32
32
|
require('tls');
|
|
33
|
-
require('
|
|
34
|
-
require('
|
|
35
|
-
require('node:url');
|
|
36
|
-
require('@napi-rs/canvas');
|
|
37
|
-
|
|
38
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
39
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
40
|
-
// generators (like Math.random()).
|
|
41
|
-
var getRandomValues;
|
|
42
|
-
var rnds8 = new Uint8Array(16);
|
|
43
|
-
function rng() {
|
|
44
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
45
|
-
if (!getRandomValues) {
|
|
46
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
47
|
-
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
48
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
49
|
-
|
|
50
|
-
if (!getRandomValues) {
|
|
51
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return getRandomValues(rnds8);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
59
|
-
|
|
60
|
-
function validate(uuid) {
|
|
61
|
-
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
66
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
var byteToHex = [];
|
|
70
|
-
|
|
71
|
-
for (var i = 0; i < 256; ++i) {
|
|
72
|
-
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function stringify(arr) {
|
|
76
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
77
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
78
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
79
|
-
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
80
|
-
// of the following:
|
|
81
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
82
|
-
// "undefined" in the uuid)
|
|
83
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
84
|
-
|
|
85
|
-
if (!validate(uuid)) {
|
|
86
|
-
throw TypeError('Stringified UUID is invalid');
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return uuid;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function v4(options, buf, offset) {
|
|
93
|
-
options = options || {};
|
|
94
|
-
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
95
|
-
|
|
96
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
97
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
98
|
-
|
|
99
|
-
return stringify(rnds);
|
|
100
|
-
}
|
|
33
|
+
require('@autorecord/manager');
|
|
34
|
+
require('@autorecord/douyu-recorder');
|
|
101
35
|
|
|
102
36
|
var xdgTrashdir$1 = {exports: {}};
|
|
103
37
|
|
|
@@ -111,7 +45,7 @@ const isWindows = process.platform === 'win32' ||
|
|
|
111
45
|
process.env.OSTYPE === 'cygwin' ||
|
|
112
46
|
process.env.OSTYPE === 'msys';
|
|
113
47
|
|
|
114
|
-
const path$4 = require$$
|
|
48
|
+
const path$4 = require$$0;
|
|
115
49
|
const COLON = isWindows ? ';' : ':';
|
|
116
50
|
const isexe = index.isexe_1;
|
|
117
51
|
|
|
@@ -252,7 +186,7 @@ pathKey$1.exports.default = pathKey;
|
|
|
252
186
|
|
|
253
187
|
var pathKeyExports = pathKey$1.exports;
|
|
254
188
|
|
|
255
|
-
const path$3 = require$$
|
|
189
|
+
const path$3 = require$$0;
|
|
256
190
|
const which = which_1;
|
|
257
191
|
const getPathKey = pathKeyExports;
|
|
258
192
|
|
|
@@ -370,7 +304,7 @@ var shebangCommand$1 = (string = '') => {
|
|
|
370
304
|
return argument ? `${binary} ${argument}` : binary;
|
|
371
305
|
};
|
|
372
306
|
|
|
373
|
-
const fs$2 = require$$0;
|
|
307
|
+
const fs$2 = require$$0$1;
|
|
374
308
|
const shebangCommand = shebangCommand$1;
|
|
375
309
|
|
|
376
310
|
function readShebang$1(command) {
|
|
@@ -392,7 +326,7 @@ function readShebang$1(command) {
|
|
|
392
326
|
|
|
393
327
|
var readShebang_1 = readShebang$1;
|
|
394
328
|
|
|
395
|
-
const path$2 = require$$
|
|
329
|
+
const path$2 = require$$0;
|
|
396
330
|
const resolveCommand = resolveCommand_1;
|
|
397
331
|
const escape = _escape;
|
|
398
332
|
const readShebang = readShebang_1;
|
|
@@ -540,7 +474,7 @@ var enoent$1 = {
|
|
|
540
474
|
notFoundError,
|
|
541
475
|
};
|
|
542
476
|
|
|
543
|
-
const cp = require$$0$
|
|
477
|
+
const cp = require$$0$2;
|
|
544
478
|
const parse = parse_1;
|
|
545
479
|
const enoent = enoent$1;
|
|
546
480
|
|
|
@@ -600,7 +534,7 @@ var npmRunPath$1 = {exports: {}};
|
|
|
600
534
|
npmRunPath$1.exports;
|
|
601
535
|
|
|
602
536
|
(function (module) {
|
|
603
|
-
const path = require$$
|
|
537
|
+
const path = require$$0;
|
|
604
538
|
const pathKey = pathKeyExports;
|
|
605
539
|
|
|
606
540
|
const npmRunPath = options => {
|
|
@@ -712,8 +646,8 @@ onetime$2.exports.callCount = function_ => {
|
|
|
712
646
|
|
|
713
647
|
var onetimeExports = onetime$2.exports;
|
|
714
648
|
|
|
715
|
-
const os$2 = require$$0$
|
|
716
|
-
const util = require$$1
|
|
649
|
+
const os$2 = require$$0$3;
|
|
650
|
+
const util = require$$1;
|
|
717
651
|
|
|
718
652
|
const getCode = (error, code) => {
|
|
719
653
|
if (error && error.code) {
|
|
@@ -952,7 +886,7 @@ if (!processOk(process$1)) {
|
|
|
952
886
|
var signals = requireSignals();
|
|
953
887
|
var isWin = /^win/i.test(process$1.platform);
|
|
954
888
|
|
|
955
|
-
var EE = require$$0$
|
|
889
|
+
var EE = require$$0$4;
|
|
956
890
|
/* istanbul ignore if */
|
|
957
891
|
if (typeof EE !== 'function') {
|
|
958
892
|
EE = EE.EventEmitter;
|
|
@@ -1144,7 +1078,7 @@ var pFinally$1 = async (
|
|
|
1144
1078
|
return value;
|
|
1145
1079
|
};
|
|
1146
1080
|
|
|
1147
|
-
const os$1 = require$$0$
|
|
1081
|
+
const os$1 = require$$0$3;
|
|
1148
1082
|
const onExit = signalExitExports;
|
|
1149
1083
|
const pFinally = pFinally$1;
|
|
1150
1084
|
|
|
@@ -1374,7 +1308,11 @@ var endOfStream = eos$1;
|
|
|
1374
1308
|
|
|
1375
1309
|
var once = index.onceExports;
|
|
1376
1310
|
var eos = endOfStream;
|
|
1377
|
-
var fs$1
|
|
1311
|
+
var fs$1;
|
|
1312
|
+
|
|
1313
|
+
try {
|
|
1314
|
+
fs$1 = require('fs'); // we only need fs to get the ReadStream and WriteStream prototypes
|
|
1315
|
+
} catch (e) {}
|
|
1378
1316
|
|
|
1379
1317
|
var noop = function () {};
|
|
1380
1318
|
var ancient = /^v?\.0/.test(process.version);
|
|
@@ -1455,7 +1393,7 @@ var pump$1 = function () {
|
|
|
1455
1393
|
|
|
1456
1394
|
var pump_1 = pump$1;
|
|
1457
1395
|
|
|
1458
|
-
const {PassThrough: PassThroughStream} = require$$0$
|
|
1396
|
+
const {PassThrough: PassThroughStream} = require$$0$5;
|
|
1459
1397
|
|
|
1460
1398
|
var bufferStream$1 = options => {
|
|
1461
1399
|
options = {...options};
|
|
@@ -1507,7 +1445,7 @@ var bufferStream$1 = options => {
|
|
|
1507
1445
|
return stream;
|
|
1508
1446
|
};
|
|
1509
1447
|
|
|
1510
|
-
const {constants: BufferConstants} = require$$0$
|
|
1448
|
+
const {constants: BufferConstants} = require$$0$6;
|
|
1511
1449
|
const pump = pump_1;
|
|
1512
1450
|
const bufferStream = bufferStream$1;
|
|
1513
1451
|
|
|
@@ -1569,7 +1507,7 @@ getStream$2.exports.MaxBufferError = MaxBufferError;
|
|
|
1569
1507
|
|
|
1570
1508
|
var getStreamExports = getStream$2.exports;
|
|
1571
1509
|
|
|
1572
|
-
const { PassThrough } = require$$0$
|
|
1510
|
+
const { PassThrough } = require$$0$5;
|
|
1573
1511
|
|
|
1574
1512
|
var mergeStream$1 = function (/*streams...*/) {
|
|
1575
1513
|
var sources = [];
|
|
@@ -1803,8 +1741,8 @@ var command = {
|
|
|
1803
1741
|
parseCommand: parseCommand$1
|
|
1804
1742
|
};
|
|
1805
1743
|
|
|
1806
|
-
const path$1 = require$$
|
|
1807
|
-
const childProcess$1 = require$$0$
|
|
1744
|
+
const path$1 = require$$0;
|
|
1745
|
+
const childProcess$1 = require$$0$2;
|
|
1808
1746
|
const crossSpawn = crossSpawnExports;
|
|
1809
1747
|
const stripFinalNewline = stripFinalNewline$1;
|
|
1810
1748
|
const npmRunPath = npmRunPathExports;
|
|
@@ -2156,7 +2094,7 @@ var dfExports$1 = df$5.exports;
|
|
|
2156
2094
|
|
|
2157
2095
|
var df$3 = {exports: {}};
|
|
2158
2096
|
|
|
2159
|
-
var childProcess = require$$0$
|
|
2097
|
+
var childProcess = require$$0$2;
|
|
2160
2098
|
|
|
2161
2099
|
function run(args, cb) {
|
|
2162
2100
|
childProcess.execFile('df', args, function (err, stdout) {
|
|
@@ -2606,7 +2544,7 @@ var mountPoint$1 = function (file) {
|
|
|
2606
2544
|
});
|
|
2607
2545
|
};
|
|
2608
2546
|
|
|
2609
|
-
var os = require$$0$
|
|
2547
|
+
var os = require$$0$3;
|
|
2610
2548
|
|
|
2611
2549
|
function homedir() {
|
|
2612
2550
|
var env = process.env;
|
|
@@ -2635,8 +2573,8 @@ var userHome$1 = osHomedir();
|
|
|
2635
2573
|
var xdgBasedir$1 = {};
|
|
2636
2574
|
|
|
2637
2575
|
(function (exports) {
|
|
2638
|
-
const os = require$$0$
|
|
2639
|
-
const path = require$$
|
|
2576
|
+
const os = require$$0$3;
|
|
2577
|
+
const path = require$$0;
|
|
2640
2578
|
|
|
2641
2579
|
const homeDirectory = os.homedir();
|
|
2642
2580
|
const {env} = process;
|
|
@@ -2664,8 +2602,8 @@ var xdgBasedir$1 = {};
|
|
|
2664
2602
|
}
|
|
2665
2603
|
} (xdgBasedir$1));
|
|
2666
2604
|
|
|
2667
|
-
const fs = require$$0.promises;
|
|
2668
|
-
const path = require$$
|
|
2605
|
+
const fs = require$$0$1.promises;
|
|
2606
|
+
const path = require$$0;
|
|
2669
2607
|
const df = dfExports$1;
|
|
2670
2608
|
const mountPoint = mountPoint$1;
|
|
2671
2609
|
const userHome = userHome$1;
|
|
@@ -2784,7 +2722,7 @@ function escapeStringRegexp(string) {
|
|
|
2784
2722
|
|
|
2785
2723
|
const extractPathRegex = /\s+at.*[(\s](.*)\)?/;
|
|
2786
2724
|
const pathRegex = /^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;
|
|
2787
|
-
const homeDir = typeof require$$0$
|
|
2725
|
+
const homeDir = typeof require$$0$3.homedir === 'undefined' ? '' : require$$0$3.homedir().replace(/\\/g, '/');
|
|
2788
2726
|
|
|
2789
2727
|
function cleanStack(stack, {pretty = false, basePath} = {}) {
|
|
2790
2728
|
const basePathRegex = basePath && new RegExp(`(at | \\()${escapeStringRegexp(basePath.replace(/\\/g, '/'))}`, 'g');
|
|
@@ -3245,7 +3183,7 @@ const {
|
|
|
3245
3183
|
closeSync,
|
|
3246
3184
|
readFileSync,
|
|
3247
3185
|
existsSync,
|
|
3248
|
-
} = require$$0;
|
|
3186
|
+
} = require$$0$1;
|
|
3249
3187
|
|
|
3250
3188
|
const tmpBufMinLen = 4096 * 2;
|
|
3251
3189
|
const tmpBufMaxLen = 4096 * 8;
|
|
@@ -3520,7 +3458,7 @@ const getDeletionDate = date => date.getFullYear()
|
|
|
3520
3458
|
+ ':' + pad(date.getSeconds());
|
|
3521
3459
|
|
|
3522
3460
|
const trash = async (filePath, trashPaths) => {
|
|
3523
|
-
const name = v4();
|
|
3461
|
+
const name = v4.v4();
|
|
3524
3462
|
const destination = path$5.join(trashPaths.filesPath, name);
|
|
3525
3463
|
const trashInfoPath = path$5.join(trashPaths.infoPath, `${name}.trashinfo`);
|
|
3526
3464
|
|
|
@@ -10,7 +10,7 @@ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentS
|
|
|
10
10
|
const isOlderThanMountainLion = Number(os.release().split('.')[0]) < 12;
|
|
11
11
|
|
|
12
12
|
// Binary source: https://github.com/sindresorhus/macos-trash
|
|
13
|
-
const binary = new URL('macos-trash', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('macos-
|
|
13
|
+
const binary = new URL('macos-trash', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('macos-DVOnmFU5.js', document.baseURI).href)));
|
|
14
14
|
|
|
15
15
|
async function macOS(paths) {
|
|
16
16
|
if (isOlderThanMountainLion) {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
4
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
5
|
+
// generators (like Math.random()).
|
|
6
|
+
var getRandomValues;
|
|
7
|
+
var rnds8 = new Uint8Array(16);
|
|
8
|
+
function rng() {
|
|
9
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
10
|
+
if (!getRandomValues) {
|
|
11
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
12
|
+
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
13
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
14
|
+
|
|
15
|
+
if (!getRandomValues) {
|
|
16
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return getRandomValues(rnds8);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
24
|
+
|
|
25
|
+
function validate(uuid) {
|
|
26
|
+
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
31
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
var byteToHex = [];
|
|
35
|
+
|
|
36
|
+
for (var i = 0; i < 256; ++i) {
|
|
37
|
+
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function stringify(arr) {
|
|
41
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
42
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
43
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
44
|
+
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
45
|
+
// of the following:
|
|
46
|
+
// - One or more input array values don't map to a hex octet (leading to
|
|
47
|
+
// "undefined" in the uuid)
|
|
48
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
|
49
|
+
|
|
50
|
+
if (!validate(uuid)) {
|
|
51
|
+
throw TypeError('Stringified UUID is invalid');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return uuid;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function v4(options, buf, offset) {
|
|
58
|
+
options = options || {};
|
|
59
|
+
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
60
|
+
|
|
61
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
62
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
63
|
+
|
|
64
|
+
return stringify(rnds);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
exports.v4 = v4;
|
|
@@ -7,7 +7,7 @@ require('node:url');
|
|
|
7
7
|
|
|
8
8
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
9
9
|
// Binary source: https://github.com/sindresorhus/recycle-bin
|
|
10
|
-
const binary = new URL('windows-trash.exe', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('windows-
|
|
10
|
+
const binary = new URL('windows-trash.exe', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('windows-wcJYLyu-.js', document.baseURI).href)));
|
|
11
11
|
|
|
12
12
|
async function windows(paths) {
|
|
13
13
|
await chunkedExec.chunkedExec(binary, paths, 200);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bililive-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "biliLive-tools的cli程序",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"tsx": "^4.7.2",
|
|
32
32
|
"cli-progress": "^3.12.0",
|
|
33
33
|
"commander": "^12.0.0",
|
|
34
|
-
"@biliLive-tools/http": "1.
|
|
35
|
-
"@biliLive-tools/shared": "1.
|
|
36
|
-
"@biliLive-tools/types": "1.
|
|
34
|
+
"@biliLive-tools/http": "1.5.2",
|
|
35
|
+
"@biliLive-tools/shared": "1.5.2",
|
|
36
|
+
"@biliLive-tools/types": "1.5.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"start": "tsx src/index.ts",
|