bililive-cli 1.6.1 → 1.7.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.
@@ -3,26 +3,26 @@
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('./index-C8BJBjBO.js');
7
- var require$$0 = require('fs');
8
- var require$$1 = require('path');
9
- var require$$0$1 = require('child_process');
10
- var require$$1$1 = require('os');
11
- var require$$1$2 = require('util');
6
+ var crypto = require('node:crypto');
7
+ var index = require('./index-YWKX2VuK.cjs');
8
+ var require$$0$1 = require('fs');
9
+ var require$$0 = require('path');
10
+ var require$$0$2 = require('child_process');
11
+ var require$$1 = require('os');
12
+ var require$$1$1 = require('util');
12
13
  var require$$5 = require('assert');
13
- var require$$0$2 = require('events');
14
- var require$$0$3 = require('buffer');
15
- var stream$1 = require('stream');
14
+ var require$$0$3 = require('events');
15
+ var require$$0$5 = require('buffer');
16
+ var require$$0$4 = require('stream');
16
17
  var process$2 = require('node:process');
17
- require('constants');
18
18
  require('url');
19
+ require('constants');
19
20
  require('node:events');
20
21
  require('ntsuspend');
21
22
  require('node:child_process');
22
23
  require('node:readline');
23
24
  require('http');
24
25
  require('https');
25
- require('node:crypto');
26
26
  require('zlib');
27
27
  require('net');
28
28
  require('dns');
@@ -31,76 +31,14 @@ require('tls');
31
31
  require('punycode');
32
32
  require('tty');
33
33
  require('node:url');
34
+ require('node:stream');
35
+ require('node:stream/promises');
34
36
  require('vm');
35
37
  require('node:net');
36
38
  require('node:https');
37
39
  require('node:buffer');
38
40
  require('node:zlib');
39
41
 
40
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
41
- // require the crypto API and do not support built-in fallback to lower quality random number
42
- // generators (like Math.random()).
43
- var getRandomValues;
44
- var rnds8 = new Uint8Array(16);
45
- function rng() {
46
- // lazy load so that environments that need to polyfill have a chance to do so
47
- if (!getRandomValues) {
48
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
49
- // find the complete implementation of crypto (msCrypto) on IE11.
50
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
51
-
52
- if (!getRandomValues) {
53
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
54
- }
55
- }
56
-
57
- return getRandomValues(rnds8);
58
- }
59
-
60
- 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;
61
-
62
- function validate(uuid) {
63
- return typeof uuid === 'string' && REGEX.test(uuid);
64
- }
65
-
66
- /**
67
- * Convert array of 16 byte values to UUID string format of the form:
68
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
69
- */
70
-
71
- var byteToHex = [];
72
-
73
- for (var i = 0; i < 256; ++i) {
74
- byteToHex.push((i + 0x100).toString(16).substr(1));
75
- }
76
-
77
- function stringify(arr) {
78
- var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
79
- // Note: Be careful editing this code! It's been tuned for performance
80
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
81
- 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
82
- // of the following:
83
- // - One or more input array values don't map to a hex octet (leading to
84
- // "undefined" in the uuid)
85
- // - Invalid input values for the RFC `version` or `variant` fields
86
-
87
- if (!validate(uuid)) {
88
- throw TypeError('Stringified UUID is invalid');
89
- }
90
-
91
- return uuid;
92
- }
93
-
94
- function v4(options, buf, offset) {
95
- options = options || {};
96
- var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
97
-
98
- rnds[6] = rnds[6] & 0x0f | 0x40;
99
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
100
-
101
- return stringify(rnds);
102
- }
103
-
104
42
  var xdgTrashdir$1 = {exports: {}};
105
43
 
106
44
  var df$5 = {exports: {}};
@@ -113,7 +51,7 @@ const isWindows = process.platform === 'win32' ||
113
51
  process.env.OSTYPE === 'cygwin' ||
114
52
  process.env.OSTYPE === 'msys';
115
53
 
116
- const path$4 = require$$1;
54
+ const path$4 = require$$0;
117
55
  const COLON = isWindows ? ';' : ':';
118
56
  const isexe = index.isexe_1;
119
57
 
@@ -254,7 +192,7 @@ pathKey$1.exports.default = pathKey;
254
192
 
255
193
  var pathKeyExports = pathKey$1.exports;
256
194
 
257
- const path$3 = require$$1;
195
+ const path$3 = require$$0;
258
196
  const which = which_1;
259
197
  const getPathKey = pathKeyExports;
260
198
 
@@ -322,15 +260,17 @@ function escapeArgument(arg, doubleEscapeMetaChars) {
322
260
  arg = `${arg}`;
323
261
 
324
262
  // Algorithm below is based on https://qntm.org/cmd
263
+ // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input
264
+ // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information
325
265
 
326
266
  // Sequence of backslashes followed by a double quote:
327
267
  // double up all the backslashes and escape the double quote
328
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
268
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
329
269
 
330
270
  // Sequence of backslashes followed by the end of the string
331
271
  // (which will become a double quote later):
332
272
  // double up all the backslashes
333
- arg = arg.replace(/(\\*)$/, '$1$1');
273
+ arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
334
274
 
335
275
  // All other backslashes occur literally
336
276
 
@@ -372,7 +312,7 @@ var shebangCommand$1 = (string = '') => {
372
312
  return argument ? `${binary} ${argument}` : binary;
373
313
  };
374
314
 
375
- const fs$2 = require$$0;
315
+ const fs$2 = require$$0$1;
376
316
  const shebangCommand = shebangCommand$1;
377
317
 
378
318
  function readShebang$1(command) {
@@ -394,7 +334,7 @@ function readShebang$1(command) {
394
334
 
395
335
  var readShebang_1 = readShebang$1;
396
336
 
397
- const path$2 = require$$1;
337
+ const path$2 = require$$0;
398
338
  const resolveCommand = resolveCommand_1;
399
339
  const escape = _escape;
400
340
  const readShebang = readShebang_1;
@@ -542,7 +482,7 @@ var enoent$1 = {
542
482
  notFoundError,
543
483
  };
544
484
 
545
- const cp = require$$0$1;
485
+ const cp = require$$0$2;
546
486
  const parse = parse_1;
547
487
  const enoent = enoent$1;
548
488
 
@@ -602,7 +542,7 @@ var npmRunPath$1 = {exports: {}};
602
542
  npmRunPath$1.exports;
603
543
 
604
544
  (function (module) {
605
- const path = require$$1;
545
+ const path = require$$0;
606
546
  const pathKey = pathKeyExports;
607
547
 
608
548
  const npmRunPath = options => {
@@ -714,8 +654,8 @@ onetime$2.exports.callCount = function_ => {
714
654
 
715
655
  var onetimeExports = onetime$2.exports;
716
656
 
717
- const os$2 = require$$1$1;
718
- const util = require$$1$2;
657
+ const os$2 = require$$1;
658
+ const util = require$$1$1;
719
659
 
720
660
  const getCode = (error, code) => {
721
661
  if (error && error.code) {
@@ -954,7 +894,7 @@ if (!processOk(process$1)) {
954
894
  var signals = requireSignals();
955
895
  var isWin = /^win/i.test(process$1.platform);
956
896
 
957
- var EE = require$$0$2;
897
+ var EE = require$$0$3;
958
898
  /* istanbul ignore if */
959
899
  if (typeof EE !== 'function') {
960
900
  EE = EE.EventEmitter;
@@ -1146,7 +1086,7 @@ var pFinally$1 = async (
1146
1086
  return value;
1147
1087
  };
1148
1088
 
1149
- const os$1 = require$$1$1;
1089
+ const os$1 = require$$1;
1150
1090
  const onExit = signalExitExports;
1151
1091
  const pFinally = pFinally$1;
1152
1092
 
@@ -1376,7 +1316,11 @@ var endOfStream = eos$1;
1376
1316
 
1377
1317
  var once = index.onceExports;
1378
1318
  var eos = endOfStream;
1379
- var fs$1 = require$$0; // we only need fs to get the ReadStream and WriteStream prototypes
1319
+ var fs$1;
1320
+
1321
+ try {
1322
+ fs$1 = require('fs'); // we only need fs to get the ReadStream and WriteStream prototypes
1323
+ } catch (e) {}
1380
1324
 
1381
1325
  var noop = function () {};
1382
1326
  var ancient = /^v?\.0/.test(process.version);
@@ -1457,7 +1401,7 @@ var pump$1 = function () {
1457
1401
 
1458
1402
  var pump_1 = pump$1;
1459
1403
 
1460
- const {PassThrough: PassThroughStream} = stream$1;
1404
+ const {PassThrough: PassThroughStream} = require$$0$4;
1461
1405
 
1462
1406
  var bufferStream$1 = options => {
1463
1407
  options = {...options};
@@ -1509,7 +1453,7 @@ var bufferStream$1 = options => {
1509
1453
  return stream;
1510
1454
  };
1511
1455
 
1512
- const {constants: BufferConstants} = require$$0$3;
1456
+ const {constants: BufferConstants} = require$$0$5;
1513
1457
  const pump = pump_1;
1514
1458
  const bufferStream = bufferStream$1;
1515
1459
 
@@ -1571,7 +1515,7 @@ getStream$2.exports.MaxBufferError = MaxBufferError;
1571
1515
 
1572
1516
  var getStreamExports = getStream$2.exports;
1573
1517
 
1574
- const { PassThrough } = stream$1;
1518
+ const { PassThrough } = require$$0$4;
1575
1519
 
1576
1520
  var mergeStream$1 = function (/*streams...*/) {
1577
1521
  var sources = [];
@@ -1805,8 +1749,8 @@ var command = {
1805
1749
  parseCommand: parseCommand$1
1806
1750
  };
1807
1751
 
1808
- const path$1 = require$$1;
1809
- const childProcess$1 = require$$0$1;
1752
+ const path$1 = require$$0;
1753
+ const childProcess$1 = require$$0$2;
1810
1754
  const crossSpawn = crossSpawnExports;
1811
1755
  const stripFinalNewline = stripFinalNewline$1;
1812
1756
  const npmRunPath = npmRunPathExports;
@@ -2158,7 +2102,7 @@ var dfExports$1 = df$5.exports;
2158
2102
 
2159
2103
  var df$3 = {exports: {}};
2160
2104
 
2161
- var childProcess = require$$0$1;
2105
+ var childProcess = require$$0$2;
2162
2106
 
2163
2107
  function run(args, cb) {
2164
2108
  childProcess.execFile('df', args, function (err, stdout) {
@@ -2608,7 +2552,7 @@ var mountPoint$1 = function (file) {
2608
2552
  });
2609
2553
  };
2610
2554
 
2611
- var os = require$$1$1;
2555
+ var os = require$$1;
2612
2556
 
2613
2557
  function homedir() {
2614
2558
  var env = process.env;
@@ -2637,8 +2581,8 @@ var userHome$1 = osHomedir();
2637
2581
  var xdgBasedir$1 = {};
2638
2582
 
2639
2583
  (function (exports) {
2640
- const os = require$$1$1;
2641
- const path = require$$1;
2584
+ const os = require$$1;
2585
+ const path = require$$0;
2642
2586
 
2643
2587
  const homeDirectory = os.homedir();
2644
2588
  const {env} = process;
@@ -2666,8 +2610,8 @@ var xdgBasedir$1 = {};
2666
2610
  }
2667
2611
  } (xdgBasedir$1));
2668
2612
 
2669
- const fs = require$$0.promises;
2670
- const path = require$$1;
2613
+ const fs = require$$0$1.promises;
2614
+ const path = require$$0;
2671
2615
  const df = dfExports$1;
2672
2616
  const mountPoint = mountPoint$1;
2673
2617
  const userHome = userHome$1;
@@ -2733,177 +2677,6 @@ xdgTrashdir$1.exports.all = async () => {
2733
2677
  var xdgTrashdirExports = xdgTrashdir$1.exports;
2734
2678
  var xdgTrashdir = /*@__PURE__*/index.getDefaultExportFromCjs(xdgTrashdirExports);
2735
2679
 
2736
- function indentString(string, count = 1, options = {}) {
2737
- const {
2738
- indent = ' ',
2739
- includeEmptyLines = false
2740
- } = options;
2741
-
2742
- if (typeof string !== 'string') {
2743
- throw new TypeError(
2744
- `Expected \`input\` to be a \`string\`, got \`${typeof string}\``
2745
- );
2746
- }
2747
-
2748
- if (typeof count !== 'number') {
2749
- throw new TypeError(
2750
- `Expected \`count\` to be a \`number\`, got \`${typeof count}\``
2751
- );
2752
- }
2753
-
2754
- if (count < 0) {
2755
- throw new RangeError(
2756
- `Expected \`count\` to be at least 0, got \`${count}\``
2757
- );
2758
- }
2759
-
2760
- if (typeof indent !== 'string') {
2761
- throw new TypeError(
2762
- `Expected \`options.indent\` to be a \`string\`, got \`${typeof indent}\``
2763
- );
2764
- }
2765
-
2766
- if (count === 0) {
2767
- return string;
2768
- }
2769
-
2770
- const regex = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
2771
-
2772
- return string.replace(regex, indent.repeat(count));
2773
- }
2774
-
2775
- function escapeStringRegexp(string) {
2776
- if (typeof string !== 'string') {
2777
- throw new TypeError('Expected a string');
2778
- }
2779
-
2780
- // Escape characters with special meaning either inside or outside character sets.
2781
- // Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
2782
- return string
2783
- .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
2784
- .replace(/-/g, '\\x2d');
2785
- }
2786
-
2787
- const extractPathRegex = /\s+at.*[(\s](.*)\)?/;
2788
- const pathRegex = /^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;
2789
- const homeDir = typeof require$$1$1.homedir === 'undefined' ? '' : require$$1$1.homedir().replace(/\\/g, '/');
2790
-
2791
- function cleanStack(stack, {pretty = false, basePath} = {}) {
2792
- const basePathRegex = basePath && new RegExp(`(at | \\()${escapeStringRegexp(basePath.replace(/\\/g, '/'))}`, 'g');
2793
-
2794
- if (typeof stack !== 'string') {
2795
- return undefined;
2796
- }
2797
-
2798
- return stack.replace(/\\/g, '/')
2799
- .split('\n')
2800
- .filter(line => {
2801
- const pathMatches = line.match(extractPathRegex);
2802
- if (pathMatches === null || !pathMatches[1]) {
2803
- return true;
2804
- }
2805
-
2806
- const match = pathMatches[1];
2807
-
2808
- // Electron
2809
- if (
2810
- match.includes('.app/Contents/Resources/electron.asar') ||
2811
- match.includes('.app/Contents/Resources/default_app.asar') ||
2812
- match.includes('node_modules/electron/dist/resources/electron.asar') ||
2813
- match.includes('node_modules/electron/dist/resources/default_app.asar')
2814
- ) {
2815
- return false;
2816
- }
2817
-
2818
- return !pathRegex.test(match);
2819
- })
2820
- .filter(line => line.trim() !== '')
2821
- .map(line => {
2822
- if (basePathRegex) {
2823
- line = line.replace(basePathRegex, '$1');
2824
- }
2825
-
2826
- if (pretty) {
2827
- line = line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~')));
2828
- }
2829
-
2830
- return line;
2831
- })
2832
- .join('\n');
2833
- }
2834
-
2835
- const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, '');
2836
-
2837
- class AggregateError extends Error {
2838
- #errors;
2839
-
2840
- name = 'AggregateError';
2841
-
2842
- constructor(errors) {
2843
- if (!Array.isArray(errors)) {
2844
- throw new TypeError(`Expected input to be an Array, got ${typeof errors}`);
2845
- }
2846
-
2847
- errors = errors.map(error => {
2848
- if (error instanceof Error) {
2849
- return error;
2850
- }
2851
-
2852
- if (error !== null && typeof error === 'object') {
2853
- // Handle plain error objects with message property and/or possibly other metadata
2854
- return Object.assign(new Error(error.message), error);
2855
- }
2856
-
2857
- return new Error(error);
2858
- });
2859
-
2860
- let message = errors
2861
- .map(error => {
2862
- // The `stack` property is not standardized, so we can't assume it exists
2863
- return typeof error.stack === 'string' && error.stack.length > 0 ? cleanInternalStack(cleanStack(error.stack)) : String(error);
2864
- })
2865
- .join('\n');
2866
- message = '\n' + indentString(message, 4);
2867
- super(message);
2868
-
2869
- this.#errors = errors;
2870
- }
2871
-
2872
- get errors() {
2873
- return this.#errors.slice();
2874
- }
2875
- }
2876
-
2877
- /**
2878
- An error to be thrown when the request is aborted by AbortController.
2879
- DOMException is thrown instead of this Error when DOMException is available.
2880
- */
2881
- class AbortError extends Error {
2882
- constructor(message) {
2883
- super();
2884
- this.name = 'AbortError';
2885
- this.message = message;
2886
- }
2887
- }
2888
-
2889
- /**
2890
- TODO: Remove AbortError and just throw DOMException when targeting Node 18.
2891
- */
2892
- const getDOMException = errorMessage => globalThis.DOMException === undefined
2893
- ? new AbortError(errorMessage)
2894
- : new DOMException(errorMessage);
2895
-
2896
- /**
2897
- TODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.
2898
- */
2899
- const getAbortedReason = signal => {
2900
- const reason = signal.reason === undefined
2901
- ? getDOMException('This operation was aborted.')
2902
- : signal.reason;
2903
-
2904
- return reason instanceof Error ? reason : getDOMException(reason);
2905
- };
2906
-
2907
2680
  async function pMap(
2908
2681
  iterable,
2909
2682
  mapper,
@@ -2922,7 +2695,7 @@ async function pMap(
2922
2695
  throw new TypeError('Mapper function is required');
2923
2696
  }
2924
2697
 
2925
- if (!((Number.isSafeInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency >= 1)) {
2698
+ if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
2926
2699
  throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
2927
2700
  }
2928
2701
 
@@ -2944,11 +2717,11 @@ async function pMap(
2944
2717
 
2945
2718
  if (signal) {
2946
2719
  if (signal.aborted) {
2947
- reject(getAbortedReason(signal));
2720
+ reject(signal.reason);
2948
2721
  }
2949
2722
 
2950
2723
  signal.addEventListener('abort', () => {
2951
- reject(getAbortedReason(signal));
2724
+ reject(signal.reason);
2952
2725
  });
2953
2726
  }
2954
2727
 
@@ -2973,7 +2746,7 @@ async function pMap(
2973
2746
 
2974
2747
  if (resolvingCount === 0 && !isResolved) {
2975
2748
  if (!stopOnError && errors.length > 0) {
2976
- reject(new AggregateError(errors));
2749
+ reject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message
2977
2750
  return;
2978
2751
  }
2979
2752
 
@@ -3247,7 +3020,7 @@ const {
3247
3020
  closeSync,
3248
3021
  readFileSync,
3249
3022
  existsSync,
3250
- } = require$$0;
3023
+ } = require$$0$1;
3251
3024
 
3252
3025
  const tmpBufMinLen = 4096 * 2;
3253
3026
  const tmpBufMaxLen = 4096 * 8;
@@ -3522,11 +3295,11 @@ const getDeletionDate = date => date.getFullYear()
3522
3295
  + ':' + pad(date.getSeconds());
3523
3296
 
3524
3297
  const trash = async (filePath, trashPaths) => {
3525
- const name = v4();
3298
+ const name = crypto.randomUUID();
3526
3299
  const destination = path$5.join(trashPaths.filesPath, name);
3527
3300
  const trashInfoPath = path$5.join(trashPaths.infoPath, `${name}.trashinfo`);
3528
3301
 
3529
- const trashInfoData = `[Trash Info]\nPath=${filePath.replace(/\s/g, '%20')}\nDeletionDate=${getDeletionDate(new Date())}`;
3302
+ const trashInfoData = `[Trash Info]\nPath=${filePath.replaceAll(/\s/g, '%20')}\nDeletionDate=${getDeletionDate(new Date())}`;
3530
3303
 
3531
3304
  await fs$3.promises.writeFile(trashInfoPath, trashInfoData);
3532
3305
  await moveFile(filePath, destination);
@@ -3554,11 +3327,11 @@ async function linux(paths) {
3554
3327
 
3555
3328
  const trashPathsCache = new Map();
3556
3329
 
3557
- const getDeviceTrashPaths = async devId => {
3558
- let trashPathsPromise = trashPathsCache.get(devId);
3330
+ const getDeviceTrashPaths = async developmentId => {
3331
+ let trashPathsPromise = trashPathsCache.get(developmentId);
3559
3332
  if (trashPathsPromise === undefined) {
3560
3333
  trashPathsPromise = (async () => {
3561
- const trashPath = await xdgTrashdir(mountPointMap.get(devId));
3334
+ const trashPath = await xdgTrashdir(mountPointMap.get(developmentId));
3562
3335
  const paths = {
3563
3336
  filesPath: path$5.join(trashPath, 'files'),
3564
3337
  infoPath: path$5.join(trashPath, 'info'),
@@ -3567,7 +3340,7 @@ async function linux(paths) {
3567
3340
  await fs$3.promises.mkdir(paths.infoPath, {mode: 0o700, recursive: true});
3568
3341
  return paths;
3569
3342
  })();
3570
- trashPathsCache.set(devId, trashPathsPromise);
3343
+ trashPathsCache.set(developmentId, trashPathsPromise);
3571
3344
  }
3572
3345
 
3573
3346
  return trashPathsPromise;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var os = require('node:os');
4
- var chunkedExec = require('./chunked-exec-De50pd_R.js');
4
+ var chunkedExec = require('./chunked-exec-BWQ1zFn6.cjs');
5
5
  require('node:util');
6
6
  require('node:child_process');
7
7
  require('node:url');
@@ -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-Byot1QEF.js', document.baseURI).href)));
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-Bb6zXuPv.cjs', document.baseURI).href)));
14
14
 
15
15
  async function macOS(paths) {
16
16
  if (isOlderThanMountainLion) {
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkedExec = require('./chunked-exec-De50pd_R.js');
3
+ var chunkedExec = require('./chunked-exec-BWQ1zFn6.cjs');
4
4
  require('node:util');
5
5
  require('node:child_process');
6
6
  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-DifqfaHn.js', document.baseURI).href)));
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-B6jKfaWo.cjs', 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.6.1",
3
+ "version": "1.7.2",
4
4
  "type": "module",
5
5
  "description": "biliLive-tools的cli程序",
6
6
  "main": "./lib/index.js",
@@ -24,20 +24,22 @@
24
24
  "lib"
25
25
  ],
26
26
  "dependencies": {
27
- "@napi-rs/canvas": "^0.1.53",
28
- "ntsuspend": "^1.0.2"
27
+ "@napi-rs/canvas": "^0.1.60",
28
+ "font-ls": "0.3.2",
29
+ "ntsuspend": "^1.0.2",
30
+ "better-sqlite3": "11.6.0"
29
31
  },
30
32
  "devDependencies": {
31
- "@types/cli-progress": "^3.11.5",
32
- "@yao-pkg/pkg": "^6.0.0",
33
+ "@types/cli-progress": "^3.11.6",
34
+ "@yao-pkg/pkg": "^6.1.1",
33
35
  "bestzip": "^2.2.1",
34
36
  "cli-progress": "^3.12.0",
35
- "commander": "^12.0.0",
37
+ "commander": "^12.1.0",
36
38
  "rimraf": "^6.0.1",
37
- "tsx": "^4.7.2",
38
- "@biliLive-tools/http": "1.6.1",
39
- "@biliLive-tools/shared": "1.6.1",
40
- "@biliLive-tools/types": "1.6.1"
39
+ "tsx": "^4.19.2",
40
+ "@biliLive-tools/http": "1.7.2",
41
+ "@biliLive-tools/shared": "1.7.2",
42
+ "@biliLive-tools/types": "1.7.2"
41
43
  },
42
44
  "scripts": {
43
45
  "start": "tsx src/index.ts",