@builderbot/bot 1.0.28-alpha.0 → 1.0.30-alpha.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.
package/dist/index.cjs CHANGED
@@ -854,166 +854,7 @@ var followRedirects = {exports: {}};
854
854
 
855
855
  var src$1 = {exports: {}};
856
856
 
857
- var node$1 = {exports: {}};
858
-
859
- var hasFlag;
860
- var hasRequiredHasFlag;
861
-
862
- function requireHasFlag () {
863
- if (hasRequiredHasFlag) return hasFlag;
864
- hasRequiredHasFlag = 1;
865
-
866
- hasFlag = (flag, argv = process.argv) => {
867
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
868
- const position = argv.indexOf(prefix + flag);
869
- const terminatorPosition = argv.indexOf('--');
870
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
871
- };
872
- return hasFlag;
873
- }
874
-
875
- var supportsColor_1;
876
- var hasRequiredSupportsColor;
877
-
878
- function requireSupportsColor () {
879
- if (hasRequiredSupportsColor) return supportsColor_1;
880
- hasRequiredSupportsColor = 1;
881
- const os = require$$0$5;
882
- const tty = require$$0$4;
883
- const hasFlag = requireHasFlag();
884
-
885
- const {env} = process;
886
-
887
- let forceColor;
888
- if (hasFlag('no-color') ||
889
- hasFlag('no-colors') ||
890
- hasFlag('color=false') ||
891
- hasFlag('color=never')) {
892
- forceColor = 0;
893
- } else if (hasFlag('color') ||
894
- hasFlag('colors') ||
895
- hasFlag('color=true') ||
896
- hasFlag('color=always')) {
897
- forceColor = 1;
898
- }
899
-
900
- if ('FORCE_COLOR' in env) {
901
- if (env.FORCE_COLOR === 'true') {
902
- forceColor = 1;
903
- } else if (env.FORCE_COLOR === 'false') {
904
- forceColor = 0;
905
- } else {
906
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
907
- }
908
- }
909
-
910
- function translateLevel(level) {
911
- if (level === 0) {
912
- return false;
913
- }
914
-
915
- return {
916
- level,
917
- hasBasic: true,
918
- has256: level >= 2,
919
- has16m: level >= 3
920
- };
921
- }
922
-
923
- function supportsColor(haveStream, streamIsTTY) {
924
- if (forceColor === 0) {
925
- return 0;
926
- }
927
-
928
- if (hasFlag('color=16m') ||
929
- hasFlag('color=full') ||
930
- hasFlag('color=truecolor')) {
931
- return 3;
932
- }
933
-
934
- if (hasFlag('color=256')) {
935
- return 2;
936
- }
937
-
938
- if (haveStream && !streamIsTTY && forceColor === undefined) {
939
- return 0;
940
- }
941
-
942
- const min = forceColor || 0;
943
-
944
- if (env.TERM === 'dumb') {
945
- return min;
946
- }
947
-
948
- if (process.platform === 'win32') {
949
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
950
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
951
- const osRelease = os.release().split('.');
952
- if (
953
- Number(osRelease[0]) >= 10 &&
954
- Number(osRelease[2]) >= 10586
955
- ) {
956
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
957
- }
958
-
959
- return 1;
960
- }
961
-
962
- if ('CI' in env) {
963
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
964
- return 1;
965
- }
966
-
967
- return min;
968
- }
969
-
970
- if ('TEAMCITY_VERSION' in env) {
971
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
972
- }
973
-
974
- if (env.COLORTERM === 'truecolor') {
975
- return 3;
976
- }
977
-
978
- if ('TERM_PROGRAM' in env) {
979
- const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
980
-
981
- switch (env.TERM_PROGRAM) {
982
- case 'iTerm.app':
983
- return version >= 3 ? 3 : 2;
984
- case 'Apple_Terminal':
985
- return 2;
986
- // No default
987
- }
988
- }
989
-
990
- if (/-256(color)?$/i.test(env.TERM)) {
991
- return 2;
992
- }
993
-
994
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
995
- return 1;
996
- }
997
-
998
- if ('COLORTERM' in env) {
999
- return 1;
1000
- }
1001
-
1002
- return min;
1003
- }
1004
-
1005
- function getSupportLevel(stream) {
1006
- const level = supportsColor(stream, stream && stream.isTTY);
1007
- return translateLevel(level);
1008
- }
1009
-
1010
- supportsColor_1 = {
1011
- supportsColor: getSupportLevel,
1012
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1013
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1014
- };
1015
- return supportsColor_1;
1016
- }
857
+ var browser$1 = {exports: {}};
1017
858
 
1018
859
  /**
1019
860
  * Helpers.
@@ -1468,308 +1309,33 @@ function requireCommon () {
1468
1309
  return common;
1469
1310
  }
1470
1311
 
1471
- /**
1472
- * Module dependencies.
1473
- */
1312
+ /* eslint-env browser */
1474
1313
 
1475
- var hasRequiredNode$1;
1314
+ var hasRequiredBrowser$1;
1476
1315
 
1477
- function requireNode$1 () {
1478
- if (hasRequiredNode$1) return node$1.exports;
1479
- hasRequiredNode$1 = 1;
1316
+ function requireBrowser$1 () {
1317
+ if (hasRequiredBrowser$1) return browser$1.exports;
1318
+ hasRequiredBrowser$1 = 1;
1480
1319
  (function (module, exports) {
1481
- const tty = require$$0$4;
1482
- const util = require$$1$1;
1483
-
1484
1320
  /**
1485
- * This is the Node.js implementation of `debug()`.
1321
+ * This is the web browser implementation of `debug()`.
1486
1322
  */
1487
1323
 
1488
- exports.init = init;
1489
- exports.log = log;
1490
1324
  exports.formatArgs = formatArgs;
1491
1325
  exports.save = save;
1492
1326
  exports.load = load;
1493
1327
  exports.useColors = useColors;
1494
- exports.destroy = util.deprecate(
1495
- () => {},
1496
- 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
1497
- );
1498
-
1499
- /**
1500
- * Colors.
1501
- */
1502
-
1503
- exports.colors = [6, 2, 3, 4, 5, 1];
1504
-
1505
- try {
1506
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
1507
- // eslint-disable-next-line import/no-extraneous-dependencies
1508
- const supportsColor = requireSupportsColor();
1509
-
1510
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1511
- exports.colors = [
1512
- 20,
1513
- 21,
1514
- 26,
1515
- 27,
1516
- 32,
1517
- 33,
1518
- 38,
1519
- 39,
1520
- 40,
1521
- 41,
1522
- 42,
1523
- 43,
1524
- 44,
1525
- 45,
1526
- 56,
1527
- 57,
1528
- 62,
1529
- 63,
1530
- 68,
1531
- 69,
1532
- 74,
1533
- 75,
1534
- 76,
1535
- 77,
1536
- 78,
1537
- 79,
1538
- 80,
1539
- 81,
1540
- 92,
1541
- 93,
1542
- 98,
1543
- 99,
1544
- 112,
1545
- 113,
1546
- 128,
1547
- 129,
1548
- 134,
1549
- 135,
1550
- 148,
1551
- 149,
1552
- 160,
1553
- 161,
1554
- 162,
1555
- 163,
1556
- 164,
1557
- 165,
1558
- 166,
1559
- 167,
1560
- 168,
1561
- 169,
1562
- 170,
1563
- 171,
1564
- 172,
1565
- 173,
1566
- 178,
1567
- 179,
1568
- 184,
1569
- 185,
1570
- 196,
1571
- 197,
1572
- 198,
1573
- 199,
1574
- 200,
1575
- 201,
1576
- 202,
1577
- 203,
1578
- 204,
1579
- 205,
1580
- 206,
1581
- 207,
1582
- 208,
1583
- 209,
1584
- 214,
1585
- 215,
1586
- 220,
1587
- 221
1588
- ];
1589
- }
1590
- } catch (error) {
1591
- // Swallow - we only care if `supports-color` is available; it doesn't have to be.
1592
- }
1593
-
1594
- /**
1595
- * Build up the default `inspectOpts` object from the environment variables.
1596
- *
1597
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
1598
- */
1599
-
1600
- exports.inspectOpts = Object.keys(process.env).filter(key => {
1601
- return /^debug_/i.test(key);
1602
- }).reduce((obj, key) => {
1603
- // Camel-case
1604
- const prop = key
1605
- .substring(6)
1606
- .toLowerCase()
1607
- .replace(/_([a-z])/g, (_, k) => {
1608
- return k.toUpperCase();
1609
- });
1610
-
1611
- // Coerce string value into JS value
1612
- let val = process.env[key];
1613
- if (/^(yes|on|true|enabled)$/i.test(val)) {
1614
- val = true;
1615
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
1616
- val = false;
1617
- } else if (val === 'null') {
1618
- val = null;
1619
- } else {
1620
- val = Number(val);
1621
- }
1622
-
1623
- obj[prop] = val;
1624
- return obj;
1625
- }, {});
1626
-
1627
- /**
1628
- * Is stdout a TTY? Colored output is enabled when `true`.
1629
- */
1630
-
1631
- function useColors() {
1632
- return 'colors' in exports.inspectOpts ?
1633
- Boolean(exports.inspectOpts.colors) :
1634
- tty.isatty(process.stderr.fd);
1635
- }
1636
-
1637
- /**
1638
- * Adds ANSI color escape codes if enabled.
1639
- *
1640
- * @api public
1641
- */
1642
-
1643
- function formatArgs(args) {
1644
- const {namespace: name, useColors} = this;
1645
-
1646
- if (useColors) {
1647
- const c = this.color;
1648
- const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
1649
- const prefix = ` ${colorCode};1m${name} \u001B[0m`;
1650
-
1651
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
1652
- args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
1653
- } else {
1654
- args[0] = getDate() + name + ' ' + args[0];
1655
- }
1656
- }
1657
-
1658
- function getDate() {
1659
- if (exports.inspectOpts.hideDate) {
1660
- return '';
1661
- }
1662
- return new Date().toISOString() + ' ';
1663
- }
1664
-
1665
- /**
1666
- * Invokes `util.format()` with the specified arguments and writes to stderr.
1667
- */
1668
-
1669
- function log(...args) {
1670
- return process.stderr.write(util.format(...args) + '\n');
1671
- }
1672
-
1673
- /**
1674
- * Save `namespaces`.
1675
- *
1676
- * @param {String} namespaces
1677
- * @api private
1678
- */
1679
- function save(namespaces) {
1680
- if (namespaces) {
1681
- process.env.DEBUG = namespaces;
1682
- } else {
1683
- // If you set a process.env field to null or undefined, it gets cast to the
1684
- // string 'null' or 'undefined'. Just delete instead.
1685
- delete process.env.DEBUG;
1686
- }
1687
- }
1688
-
1689
- /**
1690
- * Load `namespaces`.
1691
- *
1692
- * @return {String} returns the previously persisted debug modes
1693
- * @api private
1694
- */
1695
-
1696
- function load() {
1697
- return process.env.DEBUG;
1698
- }
1699
-
1700
- /**
1701
- * Init logic for `debug` instances.
1702
- *
1703
- * Create a new `inspectOpts` object in case `useColors` is set
1704
- * differently for a particular `debug` instance.
1705
- */
1706
-
1707
- function init(debug) {
1708
- debug.inspectOpts = {};
1709
-
1710
- const keys = Object.keys(exports.inspectOpts);
1711
- for (let i = 0; i < keys.length; i++) {
1712
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1713
- }
1714
- }
1715
-
1716
- module.exports = requireCommon()(exports);
1717
-
1718
- const {formatters} = module.exports;
1719
-
1720
- /**
1721
- * Map %o to `util.inspect()`, all on a single line.
1722
- */
1723
-
1724
- formatters.o = function (v) {
1725
- this.inspectOpts.colors = this.useColors;
1726
- return util.inspect(v, this.inspectOpts)
1727
- .split('\n')
1728
- .map(str => str.trim())
1729
- .join(' ');
1730
- };
1731
-
1732
- /**
1733
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
1734
- */
1735
-
1736
- formatters.O = function (v) {
1737
- this.inspectOpts.colors = this.useColors;
1738
- return util.inspect(v, this.inspectOpts);
1739
- };
1740
- } (node$1, node$1.exports));
1741
- return node$1.exports;
1742
- }
1743
-
1744
- var browser$1 = {exports: {}};
1745
-
1746
- /* eslint-env browser */
1747
-
1748
- var hasRequiredBrowser$1;
1749
-
1750
- function requireBrowser$1 () {
1751
- if (hasRequiredBrowser$1) return browser$1.exports;
1752
- hasRequiredBrowser$1 = 1;
1753
- (function (module, exports) {
1754
- /**
1755
- * This is the web browser implementation of `debug()`.
1756
- */
1757
-
1758
- exports.formatArgs = formatArgs;
1759
- exports.save = save;
1760
- exports.load = load;
1761
- exports.useColors = useColors;
1762
- exports.storage = localstorage();
1763
- exports.destroy = (() => {
1764
- let warned = false;
1765
-
1766
- return () => {
1767
- if (!warned) {
1768
- warned = true;
1769
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
1770
- }
1771
- };
1772
- })();
1328
+ exports.storage = localstorage();
1329
+ exports.destroy = (() => {
1330
+ let warned = false;
1331
+
1332
+ return () => {
1333
+ if (!warned) {
1334
+ warned = true;
1335
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
1336
+ }
1337
+ };
1338
+ })();
1773
1339
 
1774
1340
  /**
1775
1341
  * Colors.
@@ -2022,37 +1588,471 @@ function requireBrowser$1 () {
2022
1588
  return browser$1.exports;
2023
1589
  }
2024
1590
 
2025
- /**
2026
- * Detect Electron renderer / nwjs process, which is node, but we should
2027
- * treat as a browser.
2028
- */
1591
+ var node$1 = {exports: {}};
2029
1592
 
2030
- var hasRequiredSrc$1;
1593
+ var hasFlag;
1594
+ var hasRequiredHasFlag;
2031
1595
 
2032
- function requireSrc$1 () {
2033
- if (hasRequiredSrc$1) return src$1.exports;
2034
- hasRequiredSrc$1 = 1;
2035
- if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
2036
- src$1.exports = requireBrowser$1();
2037
- } else {
2038
- src$1.exports = requireNode$1();
2039
- }
2040
- return src$1.exports;
1596
+ function requireHasFlag () {
1597
+ if (hasRequiredHasFlag) return hasFlag;
1598
+ hasRequiredHasFlag = 1;
1599
+
1600
+ hasFlag = (flag, argv = process.argv) => {
1601
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
1602
+ const position = argv.indexOf(prefix + flag);
1603
+ const terminatorPosition = argv.indexOf('--');
1604
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1605
+ };
1606
+ return hasFlag;
2041
1607
  }
2042
1608
 
2043
- var debug$2;
1609
+ var supportsColor_1;
1610
+ var hasRequiredSupportsColor;
2044
1611
 
2045
- var debug_1 = function () {
2046
- if (!debug$2) {
2047
- try {
2048
- /* eslint global-require: off */
2049
- debug$2 = requireSrc$1()("follow-redirects");
2050
- }
2051
- catch (error) { /* */ }
2052
- if (typeof debug$2 !== "function") {
2053
- debug$2 = function () { /* */ };
2054
- }
2055
- }
1612
+ function requireSupportsColor () {
1613
+ if (hasRequiredSupportsColor) return supportsColor_1;
1614
+ hasRequiredSupportsColor = 1;
1615
+ const os = require$$0$5;
1616
+ const tty = require$$0$4;
1617
+ const hasFlag = requireHasFlag();
1618
+
1619
+ const {env} = process;
1620
+
1621
+ let forceColor;
1622
+ if (hasFlag('no-color') ||
1623
+ hasFlag('no-colors') ||
1624
+ hasFlag('color=false') ||
1625
+ hasFlag('color=never')) {
1626
+ forceColor = 0;
1627
+ } else if (hasFlag('color') ||
1628
+ hasFlag('colors') ||
1629
+ hasFlag('color=true') ||
1630
+ hasFlag('color=always')) {
1631
+ forceColor = 1;
1632
+ }
1633
+
1634
+ if ('FORCE_COLOR' in env) {
1635
+ if (env.FORCE_COLOR === 'true') {
1636
+ forceColor = 1;
1637
+ } else if (env.FORCE_COLOR === 'false') {
1638
+ forceColor = 0;
1639
+ } else {
1640
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
1641
+ }
1642
+ }
1643
+
1644
+ function translateLevel(level) {
1645
+ if (level === 0) {
1646
+ return false;
1647
+ }
1648
+
1649
+ return {
1650
+ level,
1651
+ hasBasic: true,
1652
+ has256: level >= 2,
1653
+ has16m: level >= 3
1654
+ };
1655
+ }
1656
+
1657
+ function supportsColor(haveStream, streamIsTTY) {
1658
+ if (forceColor === 0) {
1659
+ return 0;
1660
+ }
1661
+
1662
+ if (hasFlag('color=16m') ||
1663
+ hasFlag('color=full') ||
1664
+ hasFlag('color=truecolor')) {
1665
+ return 3;
1666
+ }
1667
+
1668
+ if (hasFlag('color=256')) {
1669
+ return 2;
1670
+ }
1671
+
1672
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
1673
+ return 0;
1674
+ }
1675
+
1676
+ const min = forceColor || 0;
1677
+
1678
+ if (env.TERM === 'dumb') {
1679
+ return min;
1680
+ }
1681
+
1682
+ if (process.platform === 'win32') {
1683
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
1684
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
1685
+ const osRelease = os.release().split('.');
1686
+ if (
1687
+ Number(osRelease[0]) >= 10 &&
1688
+ Number(osRelease[2]) >= 10586
1689
+ ) {
1690
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1691
+ }
1692
+
1693
+ return 1;
1694
+ }
1695
+
1696
+ if ('CI' in env) {
1697
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
1698
+ return 1;
1699
+ }
1700
+
1701
+ return min;
1702
+ }
1703
+
1704
+ if ('TEAMCITY_VERSION' in env) {
1705
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1706
+ }
1707
+
1708
+ if (env.COLORTERM === 'truecolor') {
1709
+ return 3;
1710
+ }
1711
+
1712
+ if ('TERM_PROGRAM' in env) {
1713
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
1714
+
1715
+ switch (env.TERM_PROGRAM) {
1716
+ case 'iTerm.app':
1717
+ return version >= 3 ? 3 : 2;
1718
+ case 'Apple_Terminal':
1719
+ return 2;
1720
+ // No default
1721
+ }
1722
+ }
1723
+
1724
+ if (/-256(color)?$/i.test(env.TERM)) {
1725
+ return 2;
1726
+ }
1727
+
1728
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1729
+ return 1;
1730
+ }
1731
+
1732
+ if ('COLORTERM' in env) {
1733
+ return 1;
1734
+ }
1735
+
1736
+ return min;
1737
+ }
1738
+
1739
+ function getSupportLevel(stream) {
1740
+ const level = supportsColor(stream, stream && stream.isTTY);
1741
+ return translateLevel(level);
1742
+ }
1743
+
1744
+ supportsColor_1 = {
1745
+ supportsColor: getSupportLevel,
1746
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1747
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1748
+ };
1749
+ return supportsColor_1;
1750
+ }
1751
+
1752
+ /**
1753
+ * Module dependencies.
1754
+ */
1755
+
1756
+ var hasRequiredNode$1;
1757
+
1758
+ function requireNode$1 () {
1759
+ if (hasRequiredNode$1) return node$1.exports;
1760
+ hasRequiredNode$1 = 1;
1761
+ (function (module, exports) {
1762
+ const tty = require$$0$4;
1763
+ const util = require$$1$1;
1764
+
1765
+ /**
1766
+ * This is the Node.js implementation of `debug()`.
1767
+ */
1768
+
1769
+ exports.init = init;
1770
+ exports.log = log;
1771
+ exports.formatArgs = formatArgs;
1772
+ exports.save = save;
1773
+ exports.load = load;
1774
+ exports.useColors = useColors;
1775
+ exports.destroy = util.deprecate(
1776
+ () => {},
1777
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
1778
+ );
1779
+
1780
+ /**
1781
+ * Colors.
1782
+ */
1783
+
1784
+ exports.colors = [6, 2, 3, 4, 5, 1];
1785
+
1786
+ try {
1787
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
1788
+ // eslint-disable-next-line import/no-extraneous-dependencies
1789
+ const supportsColor = requireSupportsColor();
1790
+
1791
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1792
+ exports.colors = [
1793
+ 20,
1794
+ 21,
1795
+ 26,
1796
+ 27,
1797
+ 32,
1798
+ 33,
1799
+ 38,
1800
+ 39,
1801
+ 40,
1802
+ 41,
1803
+ 42,
1804
+ 43,
1805
+ 44,
1806
+ 45,
1807
+ 56,
1808
+ 57,
1809
+ 62,
1810
+ 63,
1811
+ 68,
1812
+ 69,
1813
+ 74,
1814
+ 75,
1815
+ 76,
1816
+ 77,
1817
+ 78,
1818
+ 79,
1819
+ 80,
1820
+ 81,
1821
+ 92,
1822
+ 93,
1823
+ 98,
1824
+ 99,
1825
+ 112,
1826
+ 113,
1827
+ 128,
1828
+ 129,
1829
+ 134,
1830
+ 135,
1831
+ 148,
1832
+ 149,
1833
+ 160,
1834
+ 161,
1835
+ 162,
1836
+ 163,
1837
+ 164,
1838
+ 165,
1839
+ 166,
1840
+ 167,
1841
+ 168,
1842
+ 169,
1843
+ 170,
1844
+ 171,
1845
+ 172,
1846
+ 173,
1847
+ 178,
1848
+ 179,
1849
+ 184,
1850
+ 185,
1851
+ 196,
1852
+ 197,
1853
+ 198,
1854
+ 199,
1855
+ 200,
1856
+ 201,
1857
+ 202,
1858
+ 203,
1859
+ 204,
1860
+ 205,
1861
+ 206,
1862
+ 207,
1863
+ 208,
1864
+ 209,
1865
+ 214,
1866
+ 215,
1867
+ 220,
1868
+ 221
1869
+ ];
1870
+ }
1871
+ } catch (error) {
1872
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
1873
+ }
1874
+
1875
+ /**
1876
+ * Build up the default `inspectOpts` object from the environment variables.
1877
+ *
1878
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
1879
+ */
1880
+
1881
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
1882
+ return /^debug_/i.test(key);
1883
+ }).reduce((obj, key) => {
1884
+ // Camel-case
1885
+ const prop = key
1886
+ .substring(6)
1887
+ .toLowerCase()
1888
+ .replace(/_([a-z])/g, (_, k) => {
1889
+ return k.toUpperCase();
1890
+ });
1891
+
1892
+ // Coerce string value into JS value
1893
+ let val = process.env[key];
1894
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
1895
+ val = true;
1896
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
1897
+ val = false;
1898
+ } else if (val === 'null') {
1899
+ val = null;
1900
+ } else {
1901
+ val = Number(val);
1902
+ }
1903
+
1904
+ obj[prop] = val;
1905
+ return obj;
1906
+ }, {});
1907
+
1908
+ /**
1909
+ * Is stdout a TTY? Colored output is enabled when `true`.
1910
+ */
1911
+
1912
+ function useColors() {
1913
+ return 'colors' in exports.inspectOpts ?
1914
+ Boolean(exports.inspectOpts.colors) :
1915
+ tty.isatty(process.stderr.fd);
1916
+ }
1917
+
1918
+ /**
1919
+ * Adds ANSI color escape codes if enabled.
1920
+ *
1921
+ * @api public
1922
+ */
1923
+
1924
+ function formatArgs(args) {
1925
+ const {namespace: name, useColors} = this;
1926
+
1927
+ if (useColors) {
1928
+ const c = this.color;
1929
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
1930
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
1931
+
1932
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
1933
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
1934
+ } else {
1935
+ args[0] = getDate() + name + ' ' + args[0];
1936
+ }
1937
+ }
1938
+
1939
+ function getDate() {
1940
+ if (exports.inspectOpts.hideDate) {
1941
+ return '';
1942
+ }
1943
+ return new Date().toISOString() + ' ';
1944
+ }
1945
+
1946
+ /**
1947
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
1948
+ */
1949
+
1950
+ function log(...args) {
1951
+ return process.stderr.write(util.format(...args) + '\n');
1952
+ }
1953
+
1954
+ /**
1955
+ * Save `namespaces`.
1956
+ *
1957
+ * @param {String} namespaces
1958
+ * @api private
1959
+ */
1960
+ function save(namespaces) {
1961
+ if (namespaces) {
1962
+ process.env.DEBUG = namespaces;
1963
+ } else {
1964
+ // If you set a process.env field to null or undefined, it gets cast to the
1965
+ // string 'null' or 'undefined'. Just delete instead.
1966
+ delete process.env.DEBUG;
1967
+ }
1968
+ }
1969
+
1970
+ /**
1971
+ * Load `namespaces`.
1972
+ *
1973
+ * @return {String} returns the previously persisted debug modes
1974
+ * @api private
1975
+ */
1976
+
1977
+ function load() {
1978
+ return process.env.DEBUG;
1979
+ }
1980
+
1981
+ /**
1982
+ * Init logic for `debug` instances.
1983
+ *
1984
+ * Create a new `inspectOpts` object in case `useColors` is set
1985
+ * differently for a particular `debug` instance.
1986
+ */
1987
+
1988
+ function init(debug) {
1989
+ debug.inspectOpts = {};
1990
+
1991
+ const keys = Object.keys(exports.inspectOpts);
1992
+ for (let i = 0; i < keys.length; i++) {
1993
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1994
+ }
1995
+ }
1996
+
1997
+ module.exports = requireCommon()(exports);
1998
+
1999
+ const {formatters} = module.exports;
2000
+
2001
+ /**
2002
+ * Map %o to `util.inspect()`, all on a single line.
2003
+ */
2004
+
2005
+ formatters.o = function (v) {
2006
+ this.inspectOpts.colors = this.useColors;
2007
+ return util.inspect(v, this.inspectOpts)
2008
+ .split('\n')
2009
+ .map(str => str.trim())
2010
+ .join(' ');
2011
+ };
2012
+
2013
+ /**
2014
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
2015
+ */
2016
+
2017
+ formatters.O = function (v) {
2018
+ this.inspectOpts.colors = this.useColors;
2019
+ return util.inspect(v, this.inspectOpts);
2020
+ };
2021
+ } (node$1, node$1.exports));
2022
+ return node$1.exports;
2023
+ }
2024
+
2025
+ /**
2026
+ * Detect Electron renderer / nwjs process, which is node, but we should
2027
+ * treat as a browser.
2028
+ */
2029
+
2030
+ var hasRequiredSrc$1;
2031
+
2032
+ function requireSrc$1 () {
2033
+ if (hasRequiredSrc$1) return src$1.exports;
2034
+ hasRequiredSrc$1 = 1;
2035
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
2036
+ src$1.exports = requireBrowser$1();
2037
+ } else {
2038
+ src$1.exports = requireNode$1();
2039
+ }
2040
+ return src$1.exports;
2041
+ }
2042
+
2043
+ var debug$2;
2044
+
2045
+ var debug_1 = function () {
2046
+ if (!debug$2) {
2047
+ try {
2048
+ /* eslint global-require: off */
2049
+ debug$2 = requireSrc$1()("follow-redirects");
2050
+ }
2051
+ catch (error) { /* */ }
2052
+ if (typeof debug$2 !== "function") {
2053
+ debug$2 = function () { /* */ };
2054
+ }
2055
+ }
2056
2056
  debug$2.apply(null, arguments);
2057
2057
  };
2058
2058
 
@@ -2519,7 +2519,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
2519
2519
  redirectUrl.protocol !== "https:" ||
2520
2520
  redirectUrl.host !== currentHost &&
2521
2521
  !isSubdomain(redirectUrl.host, currentHost)) {
2522
- removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
2522
+ removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
2523
2523
  }
2524
2524
 
2525
2525
  // Evaluate the beforeRedirect callback
@@ -16116,7 +16116,7 @@ function requireHttpErrors () {
16116
16116
 
16117
16117
  var src = {exports: {}};
16118
16118
 
16119
- var node = {exports: {}};
16119
+ var browser = {exports: {}};
16120
16120
 
16121
16121
  var debug = {exports: {}};
16122
16122
 
@@ -16278,480 +16278,220 @@ function requireMs () {
16278
16278
  }
16279
16279
  return Math.ceil(ms / n) + ' ' + name + 's';
16280
16280
  }
16281
- return ms;
16282
- }
16283
-
16284
- var hasRequiredDebug;
16285
-
16286
- function requireDebug () {
16287
- if (hasRequiredDebug) return debug.exports;
16288
- hasRequiredDebug = 1;
16289
- (function (module, exports) {
16290
- /**
16291
- * This is the common logic for both the Node.js and web browser
16292
- * implementations of `debug()`.
16293
- *
16294
- * Expose `debug()` as the module.
16295
- */
16296
-
16297
- exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
16298
- exports.coerce = coerce;
16299
- exports.disable = disable;
16300
- exports.enable = enable;
16301
- exports.enabled = enabled;
16302
- exports.humanize = requireMs();
16303
-
16304
- /**
16305
- * The currently active debug mode names, and names to skip.
16306
- */
16307
-
16308
- exports.names = [];
16309
- exports.skips = [];
16310
-
16311
- /**
16312
- * Map of special "%n" handling functions, for the debug "format" argument.
16313
- *
16314
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
16315
- */
16316
-
16317
- exports.formatters = {};
16318
-
16319
- /**
16320
- * Previous log timestamp.
16321
- */
16322
-
16323
- var prevTime;
16324
-
16325
- /**
16326
- * Select a color.
16327
- * @param {String} namespace
16328
- * @return {Number}
16329
- * @api private
16330
- */
16331
-
16332
- function selectColor(namespace) {
16333
- var hash = 0, i;
16334
-
16335
- for (i in namespace) {
16336
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
16337
- hash |= 0; // Convert to 32bit integer
16338
- }
16339
-
16340
- return exports.colors[Math.abs(hash) % exports.colors.length];
16341
- }
16342
-
16343
- /**
16344
- * Create a debugger with the given `namespace`.
16345
- *
16346
- * @param {String} namespace
16347
- * @return {Function}
16348
- * @api public
16349
- */
16350
-
16351
- function createDebug(namespace) {
16352
-
16353
- function debug() {
16354
- // disabled?
16355
- if (!debug.enabled) return;
16356
-
16357
- var self = debug;
16358
-
16359
- // set `diff` timestamp
16360
- var curr = +new Date();
16361
- var ms = curr - (prevTime || curr);
16362
- self.diff = ms;
16363
- self.prev = prevTime;
16364
- self.curr = curr;
16365
- prevTime = curr;
16366
-
16367
- // turn the `arguments` into a proper Array
16368
- var args = new Array(arguments.length);
16369
- for (var i = 0; i < args.length; i++) {
16370
- args[i] = arguments[i];
16371
- }
16372
-
16373
- args[0] = exports.coerce(args[0]);
16374
-
16375
- if ('string' !== typeof args[0]) {
16376
- // anything else let's inspect with %O
16377
- args.unshift('%O');
16378
- }
16379
-
16380
- // apply any `formatters` transformations
16381
- var index = 0;
16382
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
16383
- // if we encounter an escaped % then don't increase the array index
16384
- if (match === '%%') return match;
16385
- index++;
16386
- var formatter = exports.formatters[format];
16387
- if ('function' === typeof formatter) {
16388
- var val = args[index];
16389
- match = formatter.call(self, val);
16390
-
16391
- // now we need to remove `args[index]` since it's inlined in the `format`
16392
- args.splice(index, 1);
16393
- index--;
16394
- }
16395
- return match;
16396
- });
16397
-
16398
- // apply env-specific formatting (colors, etc.)
16399
- exports.formatArgs.call(self, args);
16400
-
16401
- var logFn = debug.log || exports.log || console.log.bind(console);
16402
- logFn.apply(self, args);
16403
- }
16404
-
16405
- debug.namespace = namespace;
16406
- debug.enabled = exports.enabled(namespace);
16407
- debug.useColors = exports.useColors();
16408
- debug.color = selectColor(namespace);
16409
-
16410
- // env-specific initialization logic for debug instances
16411
- if ('function' === typeof exports.init) {
16412
- exports.init(debug);
16413
- }
16414
-
16415
- return debug;
16416
- }
16417
-
16418
- /**
16419
- * Enables a debug mode by namespaces. This can include modes
16420
- * separated by a colon and wildcards.
16421
- *
16422
- * @param {String} namespaces
16423
- * @api public
16424
- */
16425
-
16426
- function enable(namespaces) {
16427
- exports.save(namespaces);
16428
-
16429
- exports.names = [];
16430
- exports.skips = [];
16431
-
16432
- var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
16433
- var len = split.length;
16434
-
16435
- for (var i = 0; i < len; i++) {
16436
- if (!split[i]) continue; // ignore empty strings
16437
- namespaces = split[i].replace(/\*/g, '.*?');
16438
- if (namespaces[0] === '-') {
16439
- exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
16440
- } else {
16441
- exports.names.push(new RegExp('^' + namespaces + '$'));
16442
- }
16443
- }
16444
- }
16445
-
16446
- /**
16447
- * Disable debug output.
16448
- *
16449
- * @api public
16450
- */
16451
-
16452
- function disable() {
16453
- exports.enable('');
16454
- }
16455
-
16456
- /**
16457
- * Returns true if the given mode name is enabled, false otherwise.
16458
- *
16459
- * @param {String} name
16460
- * @return {Boolean}
16461
- * @api public
16462
- */
16463
-
16464
- function enabled(name) {
16465
- var i, len;
16466
- for (i = 0, len = exports.skips.length; i < len; i++) {
16467
- if (exports.skips[i].test(name)) {
16468
- return false;
16469
- }
16470
- }
16471
- for (i = 0, len = exports.names.length; i < len; i++) {
16472
- if (exports.names[i].test(name)) {
16473
- return true;
16474
- }
16475
- }
16476
- return false;
16477
- }
16478
-
16479
- /**
16480
- * Coerce `val`.
16481
- *
16482
- * @param {Mixed} val
16483
- * @return {Mixed}
16484
- * @api private
16485
- */
16486
-
16487
- function coerce(val) {
16488
- if (val instanceof Error) return val.stack || val.message;
16489
- return val;
16490
- }
16491
- } (debug, debug.exports));
16492
- return debug.exports;
16493
- }
16494
-
16495
- /**
16496
- * Module dependencies.
16497
- */
16498
-
16499
- var hasRequiredNode;
16500
-
16501
- function requireNode () {
16502
- if (hasRequiredNode) return node.exports;
16503
- hasRequiredNode = 1;
16504
- (function (module, exports) {
16505
- var tty = require$$0$4;
16506
- var util = require$$1$1;
16507
-
16508
- /**
16509
- * This is the Node.js implementation of `debug()`.
16510
- *
16511
- * Expose `debug()` as the module.
16512
- */
16513
-
16514
- exports = module.exports = requireDebug();
16515
- exports.init = init;
16516
- exports.log = log;
16517
- exports.formatArgs = formatArgs;
16518
- exports.save = save;
16519
- exports.load = load;
16520
- exports.useColors = useColors;
16521
-
16522
- /**
16523
- * Colors.
16524
- */
16281
+ return ms;
16282
+ }
16525
16283
 
16526
- exports.colors = [6, 2, 3, 4, 5, 1];
16284
+ var hasRequiredDebug;
16527
16285
 
16286
+ function requireDebug () {
16287
+ if (hasRequiredDebug) return debug.exports;
16288
+ hasRequiredDebug = 1;
16289
+ (function (module, exports) {
16528
16290
  /**
16529
- * Build up the default `inspectOpts` object from the environment variables.
16291
+ * This is the common logic for both the Node.js and web browser
16292
+ * implementations of `debug()`.
16530
16293
  *
16531
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
16294
+ * Expose `debug()` as the module.
16532
16295
  */
16533
16296
 
16534
- exports.inspectOpts = Object.keys(process.env).filter(function (key) {
16535
- return /^debug_/i.test(key);
16536
- }).reduce(function (obj, key) {
16537
- // camel-case
16538
- var prop = key
16539
- .substring(6)
16540
- .toLowerCase()
16541
- .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
16297
+ exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
16298
+ exports.coerce = coerce;
16299
+ exports.disable = disable;
16300
+ exports.enable = enable;
16301
+ exports.enabled = enabled;
16302
+ exports.humanize = requireMs();
16542
16303
 
16543
- // coerce string value into JS value
16544
- var val = process.env[key];
16545
- if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
16546
- else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
16547
- else if (val === 'null') val = null;
16548
- else val = Number(val);
16304
+ /**
16305
+ * The currently active debug mode names, and names to skip.
16306
+ */
16549
16307
 
16550
- obj[prop] = val;
16551
- return obj;
16552
- }, {});
16308
+ exports.names = [];
16309
+ exports.skips = [];
16553
16310
 
16554
16311
  /**
16555
- * The file descriptor to write the `debug()` calls to.
16556
- * Set the `DEBUG_FD` env variable to override with another value. i.e.:
16312
+ * Map of special "%n" handling functions, for the debug "format" argument.
16557
16313
  *
16558
- * $ DEBUG_FD=3 node script.js 3>debug.log
16314
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
16559
16315
  */
16560
16316
 
16561
- var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
16562
-
16563
- if (1 !== fd && 2 !== fd) {
16564
- util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')();
16565
- }
16566
-
16567
- var stream = 1 === fd ? process.stdout :
16568
- 2 === fd ? process.stderr :
16569
- createWritableStdioStream(fd);
16317
+ exports.formatters = {};
16570
16318
 
16571
16319
  /**
16572
- * Is stdout a TTY? Colored output is enabled when `true`.
16320
+ * Previous log timestamp.
16573
16321
  */
16574
16322
 
16575
- function useColors() {
16576
- return 'colors' in exports.inspectOpts
16577
- ? Boolean(exports.inspectOpts.colors)
16578
- : tty.isatty(fd);
16579
- }
16323
+ var prevTime;
16580
16324
 
16581
16325
  /**
16582
- * Map %o to `util.inspect()`, all on a single line.
16326
+ * Select a color.
16327
+ * @param {String} namespace
16328
+ * @return {Number}
16329
+ * @api private
16583
16330
  */
16584
16331
 
16585
- exports.formatters.o = function(v) {
16586
- this.inspectOpts.colors = this.useColors;
16587
- return util.inspect(v, this.inspectOpts)
16588
- .split('\n').map(function(str) {
16589
- return str.trim()
16590
- }).join(' ');
16591
- };
16332
+ function selectColor(namespace) {
16333
+ var hash = 0, i;
16592
16334
 
16593
- /**
16594
- * Map %o to `util.inspect()`, allowing multiple lines if needed.
16595
- */
16335
+ for (i in namespace) {
16336
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
16337
+ hash |= 0; // Convert to 32bit integer
16338
+ }
16596
16339
 
16597
- exports.formatters.O = function(v) {
16598
- this.inspectOpts.colors = this.useColors;
16599
- return util.inspect(v, this.inspectOpts);
16600
- };
16340
+ return exports.colors[Math.abs(hash) % exports.colors.length];
16341
+ }
16601
16342
 
16602
16343
  /**
16603
- * Adds ANSI color escape codes if enabled.
16344
+ * Create a debugger with the given `namespace`.
16604
16345
  *
16346
+ * @param {String} namespace
16347
+ * @return {Function}
16605
16348
  * @api public
16606
16349
  */
16607
16350
 
16608
- function formatArgs(args) {
16609
- var name = this.namespace;
16610
- var useColors = this.useColors;
16351
+ function createDebug(namespace) {
16611
16352
 
16612
- if (useColors) {
16613
- var c = this.color;
16614
- var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
16353
+ function debug() {
16354
+ // disabled?
16355
+ if (!debug.enabled) return;
16615
16356
 
16616
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
16617
- args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
16618
- } else {
16619
- args[0] = new Date().toUTCString()
16620
- + ' ' + name + ' ' + args[0];
16621
- }
16622
- }
16357
+ var self = debug;
16623
16358
 
16624
- /**
16625
- * Invokes `util.format()` with the specified arguments and writes to `stream`.
16626
- */
16359
+ // set `diff` timestamp
16360
+ var curr = +new Date();
16361
+ var ms = curr - (prevTime || curr);
16362
+ self.diff = ms;
16363
+ self.prev = prevTime;
16364
+ self.curr = curr;
16365
+ prevTime = curr;
16627
16366
 
16628
- function log() {
16629
- return stream.write(util.format.apply(util, arguments) + '\n');
16630
- }
16367
+ // turn the `arguments` into a proper Array
16368
+ var args = new Array(arguments.length);
16369
+ for (var i = 0; i < args.length; i++) {
16370
+ args[i] = arguments[i];
16371
+ }
16631
16372
 
16632
- /**
16633
- * Save `namespaces`.
16634
- *
16635
- * @param {String} namespaces
16636
- * @api private
16637
- */
16373
+ args[0] = exports.coerce(args[0]);
16638
16374
 
16639
- function save(namespaces) {
16640
- if (null == namespaces) {
16641
- // If you set a process.env field to null or undefined, it gets cast to the
16642
- // string 'null' or 'undefined'. Just delete instead.
16643
- delete process.env.DEBUG;
16644
- } else {
16645
- process.env.DEBUG = namespaces;
16646
- }
16647
- }
16375
+ if ('string' !== typeof args[0]) {
16376
+ // anything else let's inspect with %O
16377
+ args.unshift('%O');
16378
+ }
16648
16379
 
16649
- /**
16650
- * Load `namespaces`.
16651
- *
16652
- * @return {String} returns the previously persisted debug modes
16653
- * @api private
16654
- */
16380
+ // apply any `formatters` transformations
16381
+ var index = 0;
16382
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
16383
+ // if we encounter an escaped % then don't increase the array index
16384
+ if (match === '%%') return match;
16385
+ index++;
16386
+ var formatter = exports.formatters[format];
16387
+ if ('function' === typeof formatter) {
16388
+ var val = args[index];
16389
+ match = formatter.call(self, val);
16655
16390
 
16656
- function load() {
16657
- return process.env.DEBUG;
16658
- }
16391
+ // now we need to remove `args[index]` since it's inlined in the `format`
16392
+ args.splice(index, 1);
16393
+ index--;
16394
+ }
16395
+ return match;
16396
+ });
16659
16397
 
16660
- /**
16661
- * Copied from `node/src/node.js`.
16662
- *
16663
- * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
16664
- * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
16665
- */
16398
+ // apply env-specific formatting (colors, etc.)
16399
+ exports.formatArgs.call(self, args);
16666
16400
 
16667
- function createWritableStdioStream (fd) {
16668
- var stream;
16669
- var tty_wrap = process.binding('tty_wrap');
16401
+ var logFn = debug.log || exports.log || console.log.bind(console);
16402
+ logFn.apply(self, args);
16403
+ }
16670
16404
 
16671
- // Note stream._type is used for test-module-load-list.js
16405
+ debug.namespace = namespace;
16406
+ debug.enabled = exports.enabled(namespace);
16407
+ debug.useColors = exports.useColors();
16408
+ debug.color = selectColor(namespace);
16672
16409
 
16673
- switch (tty_wrap.guessHandleType(fd)) {
16674
- case 'TTY':
16675
- stream = new tty.WriteStream(fd);
16676
- stream._type = 'tty';
16410
+ // env-specific initialization logic for debug instances
16411
+ if ('function' === typeof exports.init) {
16412
+ exports.init(debug);
16413
+ }
16677
16414
 
16678
- // Hack to have stream not keep the event loop alive.
16679
- // See https://github.com/joyent/node/issues/1726
16680
- if (stream._handle && stream._handle.unref) {
16681
- stream._handle.unref();
16682
- }
16683
- break;
16415
+ return debug;
16416
+ }
16684
16417
 
16685
- case 'FILE':
16686
- var fs = require$$3$1;
16687
- stream = new fs.SyncWriteStream(fd, { autoClose: false });
16688
- stream._type = 'fs';
16689
- break;
16418
+ /**
16419
+ * Enables a debug mode by namespaces. This can include modes
16420
+ * separated by a colon and wildcards.
16421
+ *
16422
+ * @param {String} namespaces
16423
+ * @api public
16424
+ */
16690
16425
 
16691
- case 'PIPE':
16692
- case 'TCP':
16693
- var net = require$$4$2;
16694
- stream = new net.Socket({
16695
- fd: fd,
16696
- readable: false,
16697
- writable: true
16698
- });
16426
+ function enable(namespaces) {
16427
+ exports.save(namespaces);
16699
16428
 
16700
- // FIXME Should probably have an option in net.Socket to create a
16701
- // stream from an existing fd which is writable only. But for now
16702
- // we'll just add this hack and set the `readable` member to false.
16703
- // Test: ./node test/fixtures/echo.js < /etc/passwd
16704
- stream.readable = false;
16705
- stream.read = null;
16706
- stream._type = 'pipe';
16429
+ exports.names = [];
16430
+ exports.skips = [];
16707
16431
 
16708
- // FIXME Hack to have stream not keep the event loop alive.
16709
- // See https://github.com/joyent/node/issues/1726
16710
- if (stream._handle && stream._handle.unref) {
16711
- stream._handle.unref();
16712
- }
16713
- break;
16432
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
16433
+ var len = split.length;
16714
16434
 
16715
- default:
16716
- // Probably an error on in uv_guess_handle()
16717
- throw new Error('Implement me. Unknown stream file type!');
16435
+ for (var i = 0; i < len; i++) {
16436
+ if (!split[i]) continue; // ignore empty strings
16437
+ namespaces = split[i].replace(/\*/g, '.*?');
16438
+ if (namespaces[0] === '-') {
16439
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
16440
+ } else {
16441
+ exports.names.push(new RegExp('^' + namespaces + '$'));
16442
+ }
16718
16443
  }
16444
+ }
16719
16445
 
16720
- // For supporting legacy API we put the FD here.
16721
- stream.fd = fd;
16722
-
16723
- stream._isStdio = true;
16446
+ /**
16447
+ * Disable debug output.
16448
+ *
16449
+ * @api public
16450
+ */
16724
16451
 
16725
- return stream;
16452
+ function disable() {
16453
+ exports.enable('');
16726
16454
  }
16727
16455
 
16728
16456
  /**
16729
- * Init logic for `debug` instances.
16457
+ * Returns true if the given mode name is enabled, false otherwise.
16730
16458
  *
16731
- * Create a new `inspectOpts` object in case `useColors` is set
16732
- * differently for a particular `debug` instance.
16459
+ * @param {String} name
16460
+ * @return {Boolean}
16461
+ * @api public
16733
16462
  */
16734
16463
 
16735
- function init (debug) {
16736
- debug.inspectOpts = {};
16737
-
16738
- var keys = Object.keys(exports.inspectOpts);
16739
- for (var i = 0; i < keys.length; i++) {
16740
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
16464
+ function enabled(name) {
16465
+ var i, len;
16466
+ for (i = 0, len = exports.skips.length; i < len; i++) {
16467
+ if (exports.skips[i].test(name)) {
16468
+ return false;
16469
+ }
16470
+ }
16471
+ for (i = 0, len = exports.names.length; i < len; i++) {
16472
+ if (exports.names[i].test(name)) {
16473
+ return true;
16474
+ }
16741
16475
  }
16476
+ return false;
16742
16477
  }
16743
16478
 
16744
16479
  /**
16745
- * Enable namespaces listed in `process.env.DEBUG` initially.
16480
+ * Coerce `val`.
16481
+ *
16482
+ * @param {Mixed} val
16483
+ * @return {Mixed}
16484
+ * @api private
16746
16485
  */
16747
16486
 
16748
- exports.enable(load());
16749
- } (node, node.exports));
16750
- return node.exports;
16487
+ function coerce(val) {
16488
+ if (val instanceof Error) return val.stack || val.message;
16489
+ return val;
16490
+ }
16491
+ } (debug, debug.exports));
16492
+ return debug.exports;
16751
16493
  }
16752
16494
 
16753
- var browser = {exports: {}};
16754
-
16755
16495
  /**
16756
16496
  * This is the web browser implementation of `debug()`.
16757
16497
  *
@@ -16865,22 +16605,225 @@ function requireBrowser () {
16865
16605
  }
16866
16606
  });
16867
16607
 
16868
- args.splice(lastC, 0, c);
16608
+ args.splice(lastC, 0, c);
16609
+ }
16610
+
16611
+ /**
16612
+ * Invokes `console.log()` when available.
16613
+ * No-op when `console.log` is not a "function".
16614
+ *
16615
+ * @api public
16616
+ */
16617
+
16618
+ function log() {
16619
+ // this hackery is required for IE8/9, where
16620
+ // the `console.log` function doesn't have 'apply'
16621
+ return 'object' === typeof console
16622
+ && console.log
16623
+ && Function.prototype.apply.call(console.log, console, arguments);
16624
+ }
16625
+
16626
+ /**
16627
+ * Save `namespaces`.
16628
+ *
16629
+ * @param {String} namespaces
16630
+ * @api private
16631
+ */
16632
+
16633
+ function save(namespaces) {
16634
+ try {
16635
+ if (null == namespaces) {
16636
+ exports.storage.removeItem('debug');
16637
+ } else {
16638
+ exports.storage.debug = namespaces;
16639
+ }
16640
+ } catch(e) {}
16641
+ }
16642
+
16643
+ /**
16644
+ * Load `namespaces`.
16645
+ *
16646
+ * @return {String} returns the previously persisted debug modes
16647
+ * @api private
16648
+ */
16649
+
16650
+ function load() {
16651
+ var r;
16652
+ try {
16653
+ r = exports.storage.debug;
16654
+ } catch(e) {}
16655
+
16656
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
16657
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
16658
+ r = process.env.DEBUG;
16659
+ }
16660
+
16661
+ return r;
16662
+ }
16663
+
16664
+ /**
16665
+ * Enable namespaces listed in `localStorage.debug` initially.
16666
+ */
16667
+
16668
+ exports.enable(load());
16669
+
16670
+ /**
16671
+ * Localstorage attempts to return the localstorage.
16672
+ *
16673
+ * This is necessary because safari throws
16674
+ * when a user disables cookies/localstorage
16675
+ * and you attempt to access it.
16676
+ *
16677
+ * @return {LocalStorage}
16678
+ * @api private
16679
+ */
16680
+
16681
+ function localstorage() {
16682
+ try {
16683
+ return window.localStorage;
16684
+ } catch (e) {}
16685
+ }
16686
+ } (browser, browser.exports));
16687
+ return browser.exports;
16688
+ }
16689
+
16690
+ var node = {exports: {}};
16691
+
16692
+ /**
16693
+ * Module dependencies.
16694
+ */
16695
+
16696
+ var hasRequiredNode;
16697
+
16698
+ function requireNode () {
16699
+ if (hasRequiredNode) return node.exports;
16700
+ hasRequiredNode = 1;
16701
+ (function (module, exports) {
16702
+ var tty = require$$0$4;
16703
+ var util = require$$1$1;
16704
+
16705
+ /**
16706
+ * This is the Node.js implementation of `debug()`.
16707
+ *
16708
+ * Expose `debug()` as the module.
16709
+ */
16710
+
16711
+ exports = module.exports = requireDebug();
16712
+ exports.init = init;
16713
+ exports.log = log;
16714
+ exports.formatArgs = formatArgs;
16715
+ exports.save = save;
16716
+ exports.load = load;
16717
+ exports.useColors = useColors;
16718
+
16719
+ /**
16720
+ * Colors.
16721
+ */
16722
+
16723
+ exports.colors = [6, 2, 3, 4, 5, 1];
16724
+
16725
+ /**
16726
+ * Build up the default `inspectOpts` object from the environment variables.
16727
+ *
16728
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
16729
+ */
16730
+
16731
+ exports.inspectOpts = Object.keys(process.env).filter(function (key) {
16732
+ return /^debug_/i.test(key);
16733
+ }).reduce(function (obj, key) {
16734
+ // camel-case
16735
+ var prop = key
16736
+ .substring(6)
16737
+ .toLowerCase()
16738
+ .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
16739
+
16740
+ // coerce string value into JS value
16741
+ var val = process.env[key];
16742
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
16743
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
16744
+ else if (val === 'null') val = null;
16745
+ else val = Number(val);
16746
+
16747
+ obj[prop] = val;
16748
+ return obj;
16749
+ }, {});
16750
+
16751
+ /**
16752
+ * The file descriptor to write the `debug()` calls to.
16753
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
16754
+ *
16755
+ * $ DEBUG_FD=3 node script.js 3>debug.log
16756
+ */
16757
+
16758
+ var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
16759
+
16760
+ if (1 !== fd && 2 !== fd) {
16761
+ util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')();
16762
+ }
16763
+
16764
+ var stream = 1 === fd ? process.stdout :
16765
+ 2 === fd ? process.stderr :
16766
+ createWritableStdioStream(fd);
16767
+
16768
+ /**
16769
+ * Is stdout a TTY? Colored output is enabled when `true`.
16770
+ */
16771
+
16772
+ function useColors() {
16773
+ return 'colors' in exports.inspectOpts
16774
+ ? Boolean(exports.inspectOpts.colors)
16775
+ : tty.isatty(fd);
16776
+ }
16777
+
16778
+ /**
16779
+ * Map %o to `util.inspect()`, all on a single line.
16780
+ */
16781
+
16782
+ exports.formatters.o = function(v) {
16783
+ this.inspectOpts.colors = this.useColors;
16784
+ return util.inspect(v, this.inspectOpts)
16785
+ .split('\n').map(function(str) {
16786
+ return str.trim()
16787
+ }).join(' ');
16788
+ };
16789
+
16790
+ /**
16791
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
16792
+ */
16793
+
16794
+ exports.formatters.O = function(v) {
16795
+ this.inspectOpts.colors = this.useColors;
16796
+ return util.inspect(v, this.inspectOpts);
16797
+ };
16798
+
16799
+ /**
16800
+ * Adds ANSI color escape codes if enabled.
16801
+ *
16802
+ * @api public
16803
+ */
16804
+
16805
+ function formatArgs(args) {
16806
+ var name = this.namespace;
16807
+ var useColors = this.useColors;
16808
+
16809
+ if (useColors) {
16810
+ var c = this.color;
16811
+ var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
16812
+
16813
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
16814
+ args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
16815
+ } else {
16816
+ args[0] = new Date().toUTCString()
16817
+ + ' ' + name + ' ' + args[0];
16818
+ }
16869
16819
  }
16870
16820
 
16871
16821
  /**
16872
- * Invokes `console.log()` when available.
16873
- * No-op when `console.log` is not a "function".
16874
- *
16875
- * @api public
16822
+ * Invokes `util.format()` with the specified arguments and writes to `stream`.
16876
16823
  */
16877
16824
 
16878
16825
  function log() {
16879
- // this hackery is required for IE8/9, where
16880
- // the `console.log` function doesn't have 'apply'
16881
- return 'object' === typeof console
16882
- && console.log
16883
- && Function.prototype.apply.call(console.log, console, arguments);
16826
+ return stream.write(util.format.apply(util, arguments) + '\n');
16884
16827
  }
16885
16828
 
16886
16829
  /**
@@ -16891,13 +16834,13 @@ function requireBrowser () {
16891
16834
  */
16892
16835
 
16893
16836
  function save(namespaces) {
16894
- try {
16895
- if (null == namespaces) {
16896
- exports.storage.removeItem('debug');
16897
- } else {
16898
- exports.storage.debug = namespaces;
16899
- }
16900
- } catch(e) {}
16837
+ if (null == namespaces) {
16838
+ // If you set a process.env field to null or undefined, it gets cast to the
16839
+ // string 'null' or 'undefined'. Just delete instead.
16840
+ delete process.env.DEBUG;
16841
+ } else {
16842
+ process.env.DEBUG = namespaces;
16843
+ }
16901
16844
  }
16902
16845
 
16903
16846
  /**
@@ -16908,43 +16851,100 @@ function requireBrowser () {
16908
16851
  */
16909
16852
 
16910
16853
  function load() {
16911
- var r;
16912
- try {
16913
- r = exports.storage.debug;
16914
- } catch(e) {}
16854
+ return process.env.DEBUG;
16855
+ }
16915
16856
 
16916
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
16917
- if (!r && typeof process !== 'undefined' && 'env' in process) {
16918
- r = process.env.DEBUG;
16857
+ /**
16858
+ * Copied from `node/src/node.js`.
16859
+ *
16860
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
16861
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
16862
+ */
16863
+
16864
+ function createWritableStdioStream (fd) {
16865
+ var stream;
16866
+ var tty_wrap = process.binding('tty_wrap');
16867
+
16868
+ // Note stream._type is used for test-module-load-list.js
16869
+
16870
+ switch (tty_wrap.guessHandleType(fd)) {
16871
+ case 'TTY':
16872
+ stream = new tty.WriteStream(fd);
16873
+ stream._type = 'tty';
16874
+
16875
+ // Hack to have stream not keep the event loop alive.
16876
+ // See https://github.com/joyent/node/issues/1726
16877
+ if (stream._handle && stream._handle.unref) {
16878
+ stream._handle.unref();
16879
+ }
16880
+ break;
16881
+
16882
+ case 'FILE':
16883
+ var fs = require$$3$1;
16884
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
16885
+ stream._type = 'fs';
16886
+ break;
16887
+
16888
+ case 'PIPE':
16889
+ case 'TCP':
16890
+ var net = require$$4$2;
16891
+ stream = new net.Socket({
16892
+ fd: fd,
16893
+ readable: false,
16894
+ writable: true
16895
+ });
16896
+
16897
+ // FIXME Should probably have an option in net.Socket to create a
16898
+ // stream from an existing fd which is writable only. But for now
16899
+ // we'll just add this hack and set the `readable` member to false.
16900
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
16901
+ stream.readable = false;
16902
+ stream.read = null;
16903
+ stream._type = 'pipe';
16904
+
16905
+ // FIXME Hack to have stream not keep the event loop alive.
16906
+ // See https://github.com/joyent/node/issues/1726
16907
+ if (stream._handle && stream._handle.unref) {
16908
+ stream._handle.unref();
16909
+ }
16910
+ break;
16911
+
16912
+ default:
16913
+ // Probably an error on in uv_guess_handle()
16914
+ throw new Error('Implement me. Unknown stream file type!');
16919
16915
  }
16920
16916
 
16921
- return r;
16917
+ // For supporting legacy API we put the FD here.
16918
+ stream.fd = fd;
16919
+
16920
+ stream._isStdio = true;
16921
+
16922
+ return stream;
16922
16923
  }
16923
16924
 
16924
16925
  /**
16925
- * Enable namespaces listed in `localStorage.debug` initially.
16926
+ * Init logic for `debug` instances.
16927
+ *
16928
+ * Create a new `inspectOpts` object in case `useColors` is set
16929
+ * differently for a particular `debug` instance.
16926
16930
  */
16927
16931
 
16928
- exports.enable(load());
16932
+ function init (debug) {
16933
+ debug.inspectOpts = {};
16934
+
16935
+ var keys = Object.keys(exports.inspectOpts);
16936
+ for (var i = 0; i < keys.length; i++) {
16937
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
16938
+ }
16939
+ }
16929
16940
 
16930
16941
  /**
16931
- * Localstorage attempts to return the localstorage.
16932
- *
16933
- * This is necessary because safari throws
16934
- * when a user disables cookies/localstorage
16935
- * and you attempt to access it.
16936
- *
16937
- * @return {LocalStorage}
16938
- * @api private
16942
+ * Enable namespaces listed in `process.env.DEBUG` initially.
16939
16943
  */
16940
16944
 
16941
- function localstorage() {
16942
- try {
16943
- return window.localStorage;
16944
- } catch (e) {}
16945
- }
16946
- } (browser, browser.exports));
16947
- return browser.exports;
16945
+ exports.enable(load());
16946
+ } (node, node.exports));
16947
+ return node.exports;
16948
16948
  }
16949
16949
 
16950
16950
  /**
@@ -30317,6 +30317,90 @@ function requireText () {
30317
30317
  return text_1;
30318
30318
  }
30319
30319
 
30320
+ var esErrors;
30321
+ var hasRequiredEsErrors;
30322
+
30323
+ function requireEsErrors () {
30324
+ if (hasRequiredEsErrors) return esErrors;
30325
+ hasRequiredEsErrors = 1;
30326
+
30327
+ /** @type {import('.')} */
30328
+ esErrors = Error;
30329
+ return esErrors;
30330
+ }
30331
+
30332
+ var _eval;
30333
+ var hasRequired_eval;
30334
+
30335
+ function require_eval () {
30336
+ if (hasRequired_eval) return _eval;
30337
+ hasRequired_eval = 1;
30338
+
30339
+ /** @type {import('./eval')} */
30340
+ _eval = EvalError;
30341
+ return _eval;
30342
+ }
30343
+
30344
+ var range;
30345
+ var hasRequiredRange;
30346
+
30347
+ function requireRange () {
30348
+ if (hasRequiredRange) return range;
30349
+ hasRequiredRange = 1;
30350
+
30351
+ /** @type {import('./range')} */
30352
+ range = RangeError;
30353
+ return range;
30354
+ }
30355
+
30356
+ var ref;
30357
+ var hasRequiredRef;
30358
+
30359
+ function requireRef () {
30360
+ if (hasRequiredRef) return ref;
30361
+ hasRequiredRef = 1;
30362
+
30363
+ /** @type {import('./ref')} */
30364
+ ref = ReferenceError;
30365
+ return ref;
30366
+ }
30367
+
30368
+ var syntax;
30369
+ var hasRequiredSyntax;
30370
+
30371
+ function requireSyntax () {
30372
+ if (hasRequiredSyntax) return syntax;
30373
+ hasRequiredSyntax = 1;
30374
+
30375
+ /** @type {import('./syntax')} */
30376
+ syntax = SyntaxError;
30377
+ return syntax;
30378
+ }
30379
+
30380
+ var type;
30381
+ var hasRequiredType;
30382
+
30383
+ function requireType () {
30384
+ if (hasRequiredType) return type;
30385
+ hasRequiredType = 1;
30386
+
30387
+ /** @type {import('./type')} */
30388
+ type = TypeError;
30389
+ return type;
30390
+ }
30391
+
30392
+ var uri;
30393
+ var hasRequiredUri;
30394
+
30395
+ function requireUri () {
30396
+ if (hasRequiredUri) return uri;
30397
+ hasRequiredUri = 1;
30398
+
30399
+ /** @type {import('./uri')} */
30400
+ uri = URIError;
30401
+ return uri;
30402
+ }
30403
+
30320
30404
  var shams;
30321
30405
  var hasRequiredShams;
30322
30406
 
@@ -30396,13 +30480,17 @@ function requireHasProto () {
30396
30480
  hasRequiredHasProto = 1;
30397
30481
 
30398
30482
  var test = {
30483
+ __proto__: null,
30399
30484
  foo: {}
30400
30485
  };
30401
30486
 
30402
30487
  var $Object = Object;
30403
30488
 
30489
+ /** @type {import('.')} */
30404
30490
  hasProto = function hasProto() {
30405
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
30491
+ // @ts-expect-error: TS errors on an inherited property for some reason
30492
+ return { __proto__: test }.foo === test.foo
30493
+ && !(test instanceof $Object);
30406
30494
  };
30407
30495
  return hasProto;
30408
30496
  }
@@ -30523,7 +30611,7 @@ function requireHasown () {
30523
30611
  var $hasOwn = Object.prototype.hasOwnProperty;
30524
30612
  var bind = requireFunctionBind();
30525
30613
 
30526
- /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
30614
+ /** @type {import('.')} */
30527
30615
  hasown = bind.call(call, $hasOwn);
30528
30616
  return hasown;
30529
30617
  }
@@ -30537,9 +30625,15 @@ function requireGetIntrinsic () {
30537
30625
 
30538
30626
  var undefined$1;
30539
30627
 
30540
- var $SyntaxError = SyntaxError;
30628
+ var $Error = requireEsErrors();
30629
+ var $EvalError = require_eval();
30630
+ var $RangeError = requireRange();
30631
+ var $ReferenceError = requireRef();
30632
+ var $SyntaxError = requireSyntax();
30633
+ var $TypeError = requireType();
30634
+ var $URIError = requireUri();
30635
+
30541
30636
  var $Function = Function;
30542
- var $TypeError = TypeError;
30543
30637
 
30544
30638
  // eslint-disable-next-line consistent-return
30545
30639
  var getEvalledConstructor = function (expressionSyntax) {
@@ -30591,6 +30685,7 @@ function requireGetIntrinsic () {
30591
30685
  var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
30592
30686
 
30593
30687
  var INTRINSICS = {
30688
+ __proto__: null,
30594
30689
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
30595
30690
  '%Array%': Array,
30596
30691
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
@@ -30611,9 +30706,9 @@ function requireGetIntrinsic () {
30611
30706
  '%decodeURIComponent%': decodeURIComponent,
30612
30707
  '%encodeURI%': encodeURI,
30613
30708
  '%encodeURIComponent%': encodeURIComponent,
30614
- '%Error%': Error,
30709
+ '%Error%': $Error,
30615
30710
  '%eval%': eval, // eslint-disable-line no-eval
30616
- '%EvalError%': EvalError,
30711
+ '%EvalError%': $EvalError,
30617
30712
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
30618
30713
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
30619
30714
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
@@ -30635,8 +30730,8 @@ function requireGetIntrinsic () {
30635
30730
  '%parseInt%': parseInt,
30636
30731
  '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
30637
30732
  '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
30638
- '%RangeError%': RangeError,
30639
- '%ReferenceError%': ReferenceError,
30733
+ '%RangeError%': $RangeError,
30734
+ '%ReferenceError%': $ReferenceError,
30640
30735
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
30641
30736
  '%RegExp%': RegExp,
30642
30737
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
@@ -30653,7 +30748,7 @@ function requireGetIntrinsic () {
30653
30748
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
30654
30749
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
30655
30750
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
30656
- '%URIError%': URIError,
30751
+ '%URIError%': $URIError,
30657
30752
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
30658
30753
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
30659
30754
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
@@ -30695,6 +30790,7 @@ function requireGetIntrinsic () {
30695
30790
  };
30696
30791
 
30697
30792
  var LEGACY_ALIASES = {
30793
+ __proto__: null,
30698
30794
  '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
30699
30795
  '%ArrayPrototype%': ['Array', 'prototype'],
30700
30796
  '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
@@ -30889,45 +30985,28 @@ function requireGetIntrinsic () {
30889
30985
 
30890
30986
  var callBind = {exports: {}};
30891
30987
 
30892
- var hasPropertyDescriptors_1;
30893
- var hasRequiredHasPropertyDescriptors;
30988
+ var esDefineProperty;
30989
+ var hasRequiredEsDefineProperty;
30894
30990
 
30895
- function requireHasPropertyDescriptors () {
30896
- if (hasRequiredHasPropertyDescriptors) return hasPropertyDescriptors_1;
30897
- hasRequiredHasPropertyDescriptors = 1;
30991
+ function requireEsDefineProperty () {
30992
+ if (hasRequiredEsDefineProperty) return esDefineProperty;
30993
+ hasRequiredEsDefineProperty = 1;
30898
30994
 
30899
30995
  var GetIntrinsic = requireGetIntrinsic();
30900
30996
 
30901
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
30902
-
30903
- var hasPropertyDescriptors = function hasPropertyDescriptors() {
30904
- if ($defineProperty) {
30905
- try {
30906
- $defineProperty({}, 'a', { value: 1 });
30907
- return true;
30908
- } catch (e) {
30909
- // IE 8 has a broken defineProperty
30910
- return false;
30911
- }
30912
- }
30913
- return false;
30914
- };
30915
-
30916
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
30917
- // node v0.6 has a bug where array lengths can be Set but not Defined
30918
- if (!hasPropertyDescriptors()) {
30919
- return null;
30920
- }
30997
+ /** @type {import('.')} */
30998
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
30999
+ if ($defineProperty) {
30921
31000
  try {
30922
- return $defineProperty([], 'length', { value: 1 }).length !== 1;
31001
+ $defineProperty({}, 'a', { value: 1 });
30923
31002
  } catch (e) {
30924
- // In Firefox 4-22, defining length on an array throws an exception.
30925
- return true;
31003
+ // IE 8 has a broken defineProperty
31004
+ $defineProperty = false;
30926
31005
  }
30927
- };
31006
+ }
30928
31007
 
30929
- hasPropertyDescriptors_1 = hasPropertyDescriptors;
30930
- return hasPropertyDescriptors_1;
31008
+ esDefineProperty = $defineProperty;
31009
+ return esDefineProperty;
30931
31010
  }
30932
31011
 
30933
31012
  var gopd;
@@ -30961,26 +31040,14 @@ function requireDefineDataProperty () {
30961
31040
  if (hasRequiredDefineDataProperty) return defineDataProperty;
30962
31041
  hasRequiredDefineDataProperty = 1;
30963
31042
 
30964
- var hasPropertyDescriptors = requireHasPropertyDescriptors()();
31043
+ var $defineProperty = requireEsDefineProperty();
30965
31044
 
30966
- var GetIntrinsic = requireGetIntrinsic();
30967
-
30968
- var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
30969
- if ($defineProperty) {
30970
- try {
30971
- $defineProperty({}, 'a', { value: 1 });
30972
- } catch (e) {
30973
- // IE 8 has a broken defineProperty
30974
- $defineProperty = false;
30975
- }
30976
- }
30977
-
30978
- var $SyntaxError = GetIntrinsic('%SyntaxError%');
30979
- var $TypeError = GetIntrinsic('%TypeError%');
31045
+ var $SyntaxError = requireSyntax();
31046
+ var $TypeError = requireType();
30980
31047
 
30981
31048
  var gopd = requireGopd();
30982
31049
 
30983
- /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
31050
+ /** @type {import('.')} */
30984
31051
  defineDataProperty = function defineDataProperty(
30985
31052
  obj,
30986
31053
  property,
@@ -31030,6 +31097,36 @@ function requireDefineDataProperty () {
31030
31097
  return defineDataProperty;
31031
31098
  }
31032
31099
 
31100
+ var hasPropertyDescriptors_1;
31101
+ var hasRequiredHasPropertyDescriptors;
31102
+
31103
+ function requireHasPropertyDescriptors () {
31104
+ if (hasRequiredHasPropertyDescriptors) return hasPropertyDescriptors_1;
31105
+ hasRequiredHasPropertyDescriptors = 1;
31106
+
31107
+ var $defineProperty = requireEsDefineProperty();
31108
+
31109
+ var hasPropertyDescriptors = function hasPropertyDescriptors() {
31110
+ return !!$defineProperty;
31111
+ };
31112
+
31113
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
31114
+ // node v0.6 has a bug where array lengths can be Set but not Defined
31115
+ if (!$defineProperty) {
31116
+ return null;
31117
+ }
31118
+ try {
31119
+ return $defineProperty([], 'length', { value: 1 }).length !== 1;
31120
+ } catch (e) {
31121
+ // In Firefox 4-22, defining length on an array throws an exception.
31122
+ return true;
31123
+ }
31124
+ };
31125
+
31126
+ hasPropertyDescriptors_1 = hasPropertyDescriptors;
31127
+ return hasPropertyDescriptors_1;
31128
+ }
31129
+
31033
31130
  var setFunctionLength;
31034
31131
  var hasRequiredSetFunctionLength;
31035
31132
 
@@ -31042,9 +31139,10 @@ function requireSetFunctionLength () {
31042
31139
  var hasDescriptors = requireHasPropertyDescriptors()();
31043
31140
  var gOPD = requireGopd();
31044
31141
 
31045
- var $TypeError = GetIntrinsic('%TypeError%');
31142
+ var $TypeError = requireType();
31046
31143
  var $floor = GetIntrinsic('%Math.floor%');
31047
31144
 
31145
+ /** @type {import('.')} */
31048
31146
  setFunctionLength = function setFunctionLength(fn, length) {
31049
31147
  if (typeof fn !== 'function') {
31050
31148
  throw new $TypeError('`fn` is not a function');
@@ -31069,9 +31167,9 @@ function requireSetFunctionLength () {
31069
31167
 
31070
31168
  if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
31071
31169
  if (hasDescriptors) {
31072
- define(fn, 'length', length, true, true);
31170
+ define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
31073
31171
  } else {
31074
- define(fn, 'length', length);
31172
+ define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
31075
31173
  }
31076
31174
  }
31077
31175
  return fn;
@@ -31090,23 +31188,14 @@ function requireCallBind () {
31090
31188
  var GetIntrinsic = requireGetIntrinsic();
31091
31189
  var setFunctionLength = requireSetFunctionLength();
31092
31190
 
31093
- var $TypeError = GetIntrinsic('%TypeError%');
31191
+ var $TypeError = requireType();
31094
31192
  var $apply = GetIntrinsic('%Function.prototype.apply%');
31095
31193
  var $call = GetIntrinsic('%Function.prototype.call%');
31096
31194
  var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
31097
31195
 
31098
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
31196
+ var $defineProperty = requireEsDefineProperty();
31099
31197
  var $max = GetIntrinsic('%Math.max%');
31100
31198
 
31101
- if ($defineProperty) {
31102
- try {
31103
- $defineProperty({}, 'a', { value: 1 });
31104
- } catch (e) {
31105
- // IE 8 has a broken defineProperty
31106
- $defineProperty = null;
31107
- }
31108
- }
31109
-
31110
31199
  module.exports = function callBind(originalFunction) {
31111
31200
  if (typeof originalFunction !== 'function') {
31112
31201
  throw new $TypeError('a function is required');
@@ -31709,7 +31798,7 @@ function requireSideChannel () {
31709
31798
  var callBound = requireCallBound();
31710
31799
  var inspect = requireObjectInspect();
31711
31800
 
31712
- var $TypeError = GetIntrinsic('%TypeError%');
31801
+ var $TypeError = requireType();
31713
31802
  var $WeakMap = GetIntrinsic('%WeakMap%', true);
31714
31803
  var $Map = GetIntrinsic('%Map%', true);
31715
31804
 
@@ -31721,49 +31810,58 @@ function requireSideChannel () {
31721
31810
  var $mapHas = callBound('Map.prototype.has', true);
31722
31811
 
31723
31812
  /*
31724
- * This function traverses the list returning the node corresponding to the
31725
- * given key.
31726
- *
31727
- * That node is also moved to the head of the list, so that if it's accessed
31728
- * again we don't need to traverse the whole list. By doing so, all the recently
31729
- * used nodes can be accessed relatively quickly.
31730
- */
31813
+ * This function traverses the list returning the node corresponding to the given key.
31814
+ *
31815
+ * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
31816
+ */
31817
+ /** @type {import('.').listGetNode} */
31731
31818
  var listGetNode = function (list, key) { // eslint-disable-line consistent-return
31732
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
31819
+ /** @type {typeof list | NonNullable<(typeof list)['next']>} */
31820
+ var prev = list;
31821
+ /** @type {(typeof list)['next']} */
31822
+ var curr;
31823
+ for (; (curr = prev.next) !== null; prev = curr) {
31733
31824
  if (curr.key === key) {
31734
31825
  prev.next = curr.next;
31735
- curr.next = list.next;
31826
+ // eslint-disable-next-line no-extra-parens
31827
+ curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
31736
31828
  list.next = curr; // eslint-disable-line no-param-reassign
31737
31829
  return curr;
31738
31830
  }
31739
31831
  }
31740
31832
  };
31741
31833
 
31834
+ /** @type {import('.').listGet} */
31742
31835
  var listGet = function (objects, key) {
31743
31836
  var node = listGetNode(objects, key);
31744
31837
  return node && node.value;
31745
31838
  };
31839
+ /** @type {import('.').listSet} */
31746
31840
  var listSet = function (objects, key, value) {
31747
31841
  var node = listGetNode(objects, key);
31748
31842
  if (node) {
31749
31843
  node.value = value;
31750
31844
  } else {
31751
31845
  // Prepend the new node to the beginning of the list
31752
- objects.next = { // eslint-disable-line no-param-reassign
31846
+ objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
31753
31847
  key: key,
31754
31848
  next: objects.next,
31755
31849
  value: value
31756
- };
31850
+ });
31757
31851
  }
31758
31852
  };
31853
+ /** @type {import('.').listHas} */
31759
31854
  var listHas = function (objects, key) {
31760
31855
  return !!listGetNode(objects, key);
31761
31856
  };
31762
31857
 
31858
+ /** @type {import('.')} */
31763
31859
  sideChannel = function getSideChannel() {
31764
- var $wm;
31765
- var $m;
31766
- var $o;
31860
+ /** @type {WeakMap<object, unknown>} */ var $wm;
31861
+ /** @type {Map<object, unknown>} */ var $m;
31862
+ /** @type {import('.').RootNode<unknown>} */ var $o;
31863
+
31864
+ /** @type {import('.').Channel} */
31767
31865
  var channel = {
31768
31866
  assert: function (key) {
31769
31867
  if (!channel.has(key)) {
@@ -31814,11 +31912,7 @@ function requireSideChannel () {
31814
31912
  $mapSet($m, key, value);
31815
31913
  } else {
31816
31914
  if (!$o) {
31817
- /*
31818
- * Initialize the linked list as an empty node, so that we don't have
31819
- * to special-case handling of the first node: we can always refer to
31820
- * it as (previous node).next, instead of something like (list).head
31821
- */
31915
+ // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
31822
31916
  $o = { key: {}, next: null };
31823
31917
  }
31824
31918
  listSet($o, key, value);