@vercel/next 3.1.0 → 3.1.3

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.js CHANGED
@@ -43,7 +43,7 @@ const mocking = exports.mockS3Http('get');
43
43
 
44
44
  const fs = __webpack_require__(5747);
45
45
  const path = __webpack_require__(5622);
46
- const nopt = __webpack_require__(1400);
46
+ const nopt = __webpack_require__(6689);
47
47
  const log = __webpack_require__(9658);
48
48
  log.disableProgress();
49
49
  const napi = __webpack_require__(5677);
@@ -1444,454 +1444,6 @@ const forEachStep = (self, fn, node, thisp) => {
1444
1444
  module.exports = LRUCache
1445
1445
 
1446
1446
 
1447
- /***/ }),
1448
-
1449
- /***/ 1400:
1450
- /***/ ((module, exports, __webpack_require__) => {
1451
-
1452
- // info about each config option.
1453
-
1454
- var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG
1455
- ? function () { console.error.apply(console, arguments) }
1456
- : function () {}
1457
-
1458
- var url = __webpack_require__(8835)
1459
- , path = __webpack_require__(5622)
1460
- , Stream = __webpack_require__(2413).Stream
1461
- , abbrev = __webpack_require__(5920)
1462
- , os = __webpack_require__(2087)
1463
-
1464
- module.exports = exports = nopt
1465
- exports.clean = clean
1466
-
1467
- exports.typeDefs =
1468
- { String : { type: String, validate: validateString }
1469
- , Boolean : { type: Boolean, validate: validateBoolean }
1470
- , url : { type: url, validate: validateUrl }
1471
- , Number : { type: Number, validate: validateNumber }
1472
- , path : { type: path, validate: validatePath }
1473
- , Stream : { type: Stream, validate: validateStream }
1474
- , Date : { type: Date, validate: validateDate }
1475
- }
1476
-
1477
- function nopt (types, shorthands, args, slice) {
1478
- args = args || process.argv
1479
- types = types || {}
1480
- shorthands = shorthands || {}
1481
- if (typeof slice !== "number") slice = 2
1482
-
1483
- debug(types, shorthands, args, slice)
1484
-
1485
- args = args.slice(slice)
1486
- var data = {}
1487
- , key
1488
- , argv = {
1489
- remain: [],
1490
- cooked: args,
1491
- original: args.slice(0)
1492
- }
1493
-
1494
- parse(args, data, argv.remain, types, shorthands)
1495
- // now data is full
1496
- clean(data, types, exports.typeDefs)
1497
- data.argv = argv
1498
- Object.defineProperty(data.argv, 'toString', { value: function () {
1499
- return this.original.map(JSON.stringify).join(" ")
1500
- }, enumerable: false })
1501
- return data
1502
- }
1503
-
1504
- function clean (data, types, typeDefs) {
1505
- typeDefs = typeDefs || exports.typeDefs
1506
- var remove = {}
1507
- , typeDefault = [false, true, null, String, Array]
1508
-
1509
- Object.keys(data).forEach(function (k) {
1510
- if (k === "argv") return
1511
- var val = data[k]
1512
- , isArray = Array.isArray(val)
1513
- , type = types[k]
1514
- if (!isArray) val = [val]
1515
- if (!type) type = typeDefault
1516
- if (type === Array) type = typeDefault.concat(Array)
1517
- if (!Array.isArray(type)) type = [type]
1518
-
1519
- debug("val=%j", val)
1520
- debug("types=", type)
1521
- val = val.map(function (val) {
1522
- // if it's an unknown value, then parse false/true/null/numbers/dates
1523
- if (typeof val === "string") {
1524
- debug("string %j", val)
1525
- val = val.trim()
1526
- if ((val === "null" && ~type.indexOf(null))
1527
- || (val === "true" &&
1528
- (~type.indexOf(true) || ~type.indexOf(Boolean)))
1529
- || (val === "false" &&
1530
- (~type.indexOf(false) || ~type.indexOf(Boolean)))) {
1531
- val = JSON.parse(val)
1532
- debug("jsonable %j", val)
1533
- } else if (~type.indexOf(Number) && !isNaN(val)) {
1534
- debug("convert to number", val)
1535
- val = +val
1536
- } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) {
1537
- debug("convert to date", val)
1538
- val = new Date(val)
1539
- }
1540
- }
1541
-
1542
- if (!types.hasOwnProperty(k)) {
1543
- return val
1544
- }
1545
-
1546
- // allow `--no-blah` to set 'blah' to null if null is allowed
1547
- if (val === false && ~type.indexOf(null) &&
1548
- !(~type.indexOf(false) || ~type.indexOf(Boolean))) {
1549
- val = null
1550
- }
1551
-
1552
- var d = {}
1553
- d[k] = val
1554
- debug("prevalidated val", d, val, types[k])
1555
- if (!validate(d, k, val, types[k], typeDefs)) {
1556
- if (exports.invalidHandler) {
1557
- exports.invalidHandler(k, val, types[k], data)
1558
- } else if (exports.invalidHandler !== false) {
1559
- debug("invalid: "+k+"="+val, types[k])
1560
- }
1561
- return remove
1562
- }
1563
- debug("validated val", d, val, types[k])
1564
- return d[k]
1565
- }).filter(function (val) { return val !== remove })
1566
-
1567
- // if we allow Array specifically, then an empty array is how we
1568
- // express 'no value here', not null. Allow it.
1569
- if (!val.length && type.indexOf(Array) === -1) {
1570
- debug('VAL HAS NO LENGTH, DELETE IT', val, k, type.indexOf(Array))
1571
- delete data[k]
1572
- }
1573
- else if (isArray) {
1574
- debug(isArray, data[k], val)
1575
- data[k] = val
1576
- } else data[k] = val[0]
1577
-
1578
- debug("k=%s val=%j", k, val, data[k])
1579
- })
1580
- }
1581
-
1582
- function validateString (data, k, val) {
1583
- data[k] = String(val)
1584
- }
1585
-
1586
- function validatePath (data, k, val) {
1587
- if (val === true) return false
1588
- if (val === null) return true
1589
-
1590
- val = String(val)
1591
-
1592
- var isWin = process.platform === 'win32'
1593
- , homePattern = isWin ? /^~(\/|\\)/ : /^~\//
1594
- , home = os.homedir()
1595
-
1596
- if (home && val.match(homePattern)) {
1597
- data[k] = path.resolve(home, val.substr(2))
1598
- } else {
1599
- data[k] = path.resolve(val)
1600
- }
1601
- return true
1602
- }
1603
-
1604
- function validateNumber (data, k, val) {
1605
- debug("validate Number %j %j %j", k, val, isNaN(val))
1606
- if (isNaN(val)) return false
1607
- data[k] = +val
1608
- }
1609
-
1610
- function validateDate (data, k, val) {
1611
- var s = Date.parse(val)
1612
- debug("validate Date %j %j %j", k, val, s)
1613
- if (isNaN(s)) return false
1614
- data[k] = new Date(val)
1615
- }
1616
-
1617
- function validateBoolean (data, k, val) {
1618
- if (val instanceof Boolean) val = val.valueOf()
1619
- else if (typeof val === "string") {
1620
- if (!isNaN(val)) val = !!(+val)
1621
- else if (val === "null" || val === "false") val = false
1622
- else val = true
1623
- } else val = !!val
1624
- data[k] = val
1625
- }
1626
-
1627
- function validateUrl (data, k, val) {
1628
- val = url.parse(String(val))
1629
- if (!val.host) return false
1630
- data[k] = val.href
1631
- }
1632
-
1633
- function validateStream (data, k, val) {
1634
- if (!(val instanceof Stream)) return false
1635
- data[k] = val
1636
- }
1637
-
1638
- function validate (data, k, val, type, typeDefs) {
1639
- // arrays are lists of types.
1640
- if (Array.isArray(type)) {
1641
- for (var i = 0, l = type.length; i < l; i ++) {
1642
- if (type[i] === Array) continue
1643
- if (validate(data, k, val, type[i], typeDefs)) return true
1644
- }
1645
- delete data[k]
1646
- return false
1647
- }
1648
-
1649
- // an array of anything?
1650
- if (type === Array) return true
1651
-
1652
- // NaN is poisonous. Means that something is not allowed.
1653
- if (type !== type) {
1654
- debug("Poison NaN", k, val, type)
1655
- delete data[k]
1656
- return false
1657
- }
1658
-
1659
- // explicit list of values
1660
- if (val === type) {
1661
- debug("Explicitly allowed %j", val)
1662
- // if (isArray) (data[k] = data[k] || []).push(val)
1663
- // else data[k] = val
1664
- data[k] = val
1665
- return true
1666
- }
1667
-
1668
- // now go through the list of typeDefs, validate against each one.
1669
- var ok = false
1670
- , types = Object.keys(typeDefs)
1671
- for (var i = 0, l = types.length; i < l; i ++) {
1672
- debug("test type %j %j %j", k, val, types[i])
1673
- var t = typeDefs[types[i]]
1674
- if (t &&
1675
- ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) {
1676
- var d = {}
1677
- ok = false !== t.validate(d, k, val)
1678
- val = d[k]
1679
- if (ok) {
1680
- // if (isArray) (data[k] = data[k] || []).push(val)
1681
- // else data[k] = val
1682
- data[k] = val
1683
- break
1684
- }
1685
- }
1686
- }
1687
- debug("OK? %j (%j %j %j)", ok, k, val, types[i])
1688
-
1689
- if (!ok) delete data[k]
1690
- return ok
1691
- }
1692
-
1693
- function parse (args, data, remain, types, shorthands) {
1694
- debug("parse", args, data, remain)
1695
-
1696
- var key = null
1697
- , abbrevs = abbrev(Object.keys(types))
1698
- , shortAbbr = abbrev(Object.keys(shorthands))
1699
-
1700
- for (var i = 0; i < args.length; i ++) {
1701
- var arg = args[i]
1702
- debug("arg", arg)
1703
-
1704
- if (arg.match(/^-{2,}$/)) {
1705
- // done with keys.
1706
- // the rest are args.
1707
- remain.push.apply(remain, args.slice(i + 1))
1708
- args[i] = "--"
1709
- break
1710
- }
1711
- var hadEq = false
1712
- if (arg.charAt(0) === "-" && arg.length > 1) {
1713
- var at = arg.indexOf('=')
1714
- if (at > -1) {
1715
- hadEq = true
1716
- var v = arg.substr(at + 1)
1717
- arg = arg.substr(0, at)
1718
- args.splice(i, 1, arg, v)
1719
- }
1720
-
1721
- // see if it's a shorthand
1722
- // if so, splice and back up to re-parse it.
1723
- var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs)
1724
- debug("arg=%j shRes=%j", arg, shRes)
1725
- if (shRes) {
1726
- debug(arg, shRes)
1727
- args.splice.apply(args, [i, 1].concat(shRes))
1728
- if (arg !== shRes[0]) {
1729
- i --
1730
- continue
1731
- }
1732
- }
1733
- arg = arg.replace(/^-+/, "")
1734
- var no = null
1735
- while (arg.toLowerCase().indexOf("no-") === 0) {
1736
- no = !no
1737
- arg = arg.substr(3)
1738
- }
1739
-
1740
- if (abbrevs[arg]) arg = abbrevs[arg]
1741
-
1742
- var argType = types[arg]
1743
- var isTypeArray = Array.isArray(argType)
1744
- if (isTypeArray && argType.length === 1) {
1745
- isTypeArray = false
1746
- argType = argType[0]
1747
- }
1748
-
1749
- var isArray = argType === Array ||
1750
- isTypeArray && argType.indexOf(Array) !== -1
1751
-
1752
- // allow unknown things to be arrays if specified multiple times.
1753
- if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) {
1754
- if (!Array.isArray(data[arg]))
1755
- data[arg] = [data[arg]]
1756
- isArray = true
1757
- }
1758
-
1759
- var val
1760
- , la = args[i + 1]
1761
-
1762
- var isBool = typeof no === 'boolean' ||
1763
- argType === Boolean ||
1764
- isTypeArray && argType.indexOf(Boolean) !== -1 ||
1765
- (typeof argType === 'undefined' && !hadEq) ||
1766
- (la === "false" &&
1767
- (argType === null ||
1768
- isTypeArray && ~argType.indexOf(null)))
1769
-
1770
- if (isBool) {
1771
- // just set and move along
1772
- val = !no
1773
- // however, also support --bool true or --bool false
1774
- if (la === "true" || la === "false") {
1775
- val = JSON.parse(la)
1776
- la = null
1777
- if (no) val = !val
1778
- i ++
1779
- }
1780
-
1781
- // also support "foo":[Boolean, "bar"] and "--foo bar"
1782
- if (isTypeArray && la) {
1783
- if (~argType.indexOf(la)) {
1784
- // an explicit type
1785
- val = la
1786
- i ++
1787
- } else if ( la === "null" && ~argType.indexOf(null) ) {
1788
- // null allowed
1789
- val = null
1790
- i ++
1791
- } else if ( !la.match(/^-{2,}[^-]/) &&
1792
- !isNaN(la) &&
1793
- ~argType.indexOf(Number) ) {
1794
- // number
1795
- val = +la
1796
- i ++
1797
- } else if ( !la.match(/^-[^-]/) && ~argType.indexOf(String) ) {
1798
- // string
1799
- val = la
1800
- i ++
1801
- }
1802
- }
1803
-
1804
- if (isArray) (data[arg] = data[arg] || []).push(val)
1805
- else data[arg] = val
1806
-
1807
- continue
1808
- }
1809
-
1810
- if (argType === String) {
1811
- if (la === undefined) {
1812
- la = ""
1813
- } else if (la.match(/^-{1,2}[^-]+/)) {
1814
- la = ""
1815
- i --
1816
- }
1817
- }
1818
-
1819
- if (la && la.match(/^-{2,}$/)) {
1820
- la = undefined
1821
- i --
1822
- }
1823
-
1824
- val = la === undefined ? true : la
1825
- if (isArray) (data[arg] = data[arg] || []).push(val)
1826
- else data[arg] = val
1827
-
1828
- i ++
1829
- continue
1830
- }
1831
- remain.push(arg)
1832
- }
1833
- }
1834
-
1835
- function resolveShort (arg, shorthands, shortAbbr, abbrevs) {
1836
- // handle single-char shorthands glommed together, like
1837
- // npm ls -glp, but only if there is one dash, and only if
1838
- // all of the chars are single-char shorthands, and it's
1839
- // not a match to some other abbrev.
1840
- arg = arg.replace(/^-+/, '')
1841
-
1842
- // if it's an exact known option, then don't go any further
1843
- if (abbrevs[arg] === arg)
1844
- return null
1845
-
1846
- // if it's an exact known shortopt, same deal
1847
- if (shorthands[arg]) {
1848
- // make it an array, if it's a list of words
1849
- if (shorthands[arg] && !Array.isArray(shorthands[arg]))
1850
- shorthands[arg] = shorthands[arg].split(/\s+/)
1851
-
1852
- return shorthands[arg]
1853
- }
1854
-
1855
- // first check to see if this arg is a set of single-char shorthands
1856
- var singles = shorthands.___singles
1857
- if (!singles) {
1858
- singles = Object.keys(shorthands).filter(function (s) {
1859
- return s.length === 1
1860
- }).reduce(function (l,r) {
1861
- l[r] = true
1862
- return l
1863
- }, {})
1864
- shorthands.___singles = singles
1865
- debug('shorthand singles', singles)
1866
- }
1867
-
1868
- var chrs = arg.split("").filter(function (c) {
1869
- return singles[c]
1870
- })
1871
-
1872
- if (chrs.join("") === arg) return chrs.map(function (c) {
1873
- return shorthands[c]
1874
- }).reduce(function (l, r) {
1875
- return l.concat(r)
1876
- }, [])
1877
-
1878
-
1879
- // if it's an arg abbrev, and not a literal shorthand, then prefer the arg
1880
- if (abbrevs[arg] && !shorthands[arg])
1881
- return null
1882
-
1883
- // if it's an abbr for a shorthand, then use that
1884
- if (shortAbbr[arg])
1885
- arg = shortAbbr[arg]
1886
-
1887
- // make it an array, if it's a list of words
1888
- if (shorthands[arg] && !Array.isArray(shorthands[arg]))
1889
- shorthands[arg] = shorthands[arg].split(/\s+/)
1890
-
1891
- return shorthands[arg]
1892
- }
1893
-
1894
-
1895
1447
  /***/ }),
1896
1448
 
1897
1449
  /***/ 6286:
@@ -12944,10 +12496,7 @@ async function nodeFileTrace(files, opts = {}) {
12944
12496
  await Promise.all(files.map(async (file) => {
12945
12497
  const path = path_1.resolve(file);
12946
12498
  await job.emitFile(path, 'initial');
12947
- if (path.endsWith('.js') || path.endsWith('.cjs') || path.endsWith('.mjs') || path.endsWith('.node') || job.ts && (path.endsWith('.ts') || path.endsWith('.tsx'))) {
12948
- return job.emitDependency(path);
12949
- }
12950
- return undefined;
12499
+ return job.emitDependency(path);
12951
12500
  }));
12952
12501
  const result = {
12953
12502
  fileList: job.fileList,
@@ -13607,8 +13156,8 @@ exports.nbind = exports.pregyp = void 0;
13607
13156
  const path_1 = __importDefault(__webpack_require__(5622));
13608
13157
  const graceful_fs_1 = __importDefault(__webpack_require__(2029));
13609
13158
  // pregyp
13610
- const versioning = __webpack_require__(5574);
13611
- const napi = __webpack_require__(9248);
13159
+ const versioning = __webpack_require__(302);
13160
+ const napi = __webpack_require__(5677);
13612
13161
  const pregypFind = (package_json_path, opts) => {
13613
13162
  const package_json = JSON.parse(graceful_fs_1.default.readFileSync(package_json_path).toString());
13614
13163
  versioning.validate_config(package_json, opts);
@@ -23805,2041 +23354,449 @@ load.compareTags = compareTags
23805
23354
 
23806
23355
  /***/ }),
23807
23356
 
23808
- /***/ 9248:
23357
+ /***/ 6689:
23809
23358
  /***/ ((module, exports, __webpack_require__) => {
23810
23359
 
23811
- "use strict";
23360
+ // info about each config option.
23812
23361
 
23362
+ var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG
23363
+ ? function () { console.error.apply(console, arguments) }
23364
+ : function () {}
23813
23365
 
23814
- var fs = __webpack_require__(5747);
23815
- var rm = __webpack_require__(2780);
23816
- var log = __webpack_require__(9658);
23366
+ var url = __webpack_require__(8835)
23367
+ , path = __webpack_require__(5622)
23368
+ , Stream = __webpack_require__(2413).Stream
23369
+ , abbrev = __webpack_require__(5920)
23370
+ , os = __webpack_require__(2087)
23817
23371
 
23818
- module.exports = exports;
23372
+ module.exports = exports = nopt
23373
+ exports.clean = clean
23819
23374
 
23820
- var versionArray = process.version
23821
- .substr(1)
23822
- .replace(/-.*$/, '')
23823
- .split('.')
23824
- .map(function(item) {
23825
- return +item;
23826
- });
23375
+ exports.typeDefs =
23376
+ { String : { type: String, validate: validateString }
23377
+ , Boolean : { type: Boolean, validate: validateBoolean }
23378
+ , url : { type: url, validate: validateUrl }
23379
+ , Number : { type: Number, validate: validateNumber }
23380
+ , path : { type: path, validate: validatePath }
23381
+ , Stream : { type: Stream, validate: validateStream }
23382
+ , Date : { type: Date, validate: validateDate }
23383
+ }
23827
23384
 
23828
- var napi_multiple_commands = [
23829
- 'build',
23830
- 'clean',
23831
- 'configure',
23832
- 'package',
23833
- 'publish',
23834
- 'reveal',
23835
- 'testbinary',
23836
- 'testpackage',
23837
- 'unpublish'
23838
- ];
23385
+ function nopt (types, shorthands, args, slice) {
23386
+ args = args || process.argv
23387
+ types = types || {}
23388
+ shorthands = shorthands || {}
23389
+ if (typeof slice !== "number") slice = 2
23839
23390
 
23840
- var napi_build_version_tag = 'napi_build_version=';
23391
+ debug(types, shorthands, args, slice)
23841
23392
 
23842
- module.exports.get_napi_version = function(target) { // target may be undefined
23843
- // returns the non-zero numeric napi version or undefined if napi is not supported.
23844
- // correctly supporting target requires an updated cross-walk
23845
- var version = process.versions.napi; // can be undefined
23846
- if (!version) { // this code should never need to be updated
23847
- if (versionArray[0] === 9 && versionArray[1] >= 3) version = 2; // 9.3.0+
23848
- else if (versionArray[0] === 8) version = 1; // 8.0.0+
23849
- }
23850
- return version;
23851
- };
23393
+ args = args.slice(slice)
23394
+ var data = {}
23395
+ , key
23396
+ , argv = {
23397
+ remain: [],
23398
+ cooked: args,
23399
+ original: args.slice(0)
23400
+ }
23852
23401
 
23853
- module.exports.get_napi_version_as_string = function(target) {
23854
- // returns the napi version as a string or an empty string if napi is not supported.
23855
- var version = module.exports.get_napi_version(target);
23856
- return version ? ''+version : '';
23857
- };
23402
+ parse(args, data, argv.remain, types, shorthands)
23403
+ // now data is full
23404
+ clean(data, types, exports.typeDefs)
23405
+ data.argv = argv
23406
+ Object.defineProperty(data.argv, 'toString', { value: function () {
23407
+ return this.original.map(JSON.stringify).join(" ")
23408
+ }, enumerable: false })
23409
+ return data
23410
+ }
23858
23411
 
23859
- module.exports.validate_package_json = function(package_json, opts) { // throws Error
23412
+ function clean (data, types, typeDefs) {
23413
+ typeDefs = typeDefs || exports.typeDefs
23414
+ var remove = {}
23415
+ , typeDefault = [false, true, null, String, Array]
23860
23416
 
23861
- var binary = package_json.binary;
23862
- var module_path_ok = pathOK(binary.module_path);
23863
- var remote_path_ok = pathOK(binary.remote_path);
23864
- var package_name_ok = pathOK(binary.package_name);
23865
- var napi_build_versions = module.exports.get_napi_build_versions(package_json,opts,true);
23866
- var napi_build_versions_raw = module.exports.get_napi_build_versions_raw(package_json);
23867
-
23868
- if (napi_build_versions) {
23869
- napi_build_versions.forEach(function(napi_build_version){
23870
- if (!(parseInt(napi_build_version,10) === napi_build_version && napi_build_version > 0)) {
23871
- throw new Error("All values specified in napi_versions must be positive integers.");
23872
- }
23873
- });
23874
- }
23417
+ Object.keys(data).forEach(function (k) {
23418
+ if (k === "argv") return
23419
+ var val = data[k]
23420
+ , isArray = Array.isArray(val)
23421
+ , type = types[k]
23422
+ if (!isArray) val = [val]
23423
+ if (!type) type = typeDefault
23424
+ if (type === Array) type = typeDefault.concat(Array)
23425
+ if (!Array.isArray(type)) type = [type]
23875
23426
 
23876
- if (napi_build_versions && (!module_path_ok || (!remote_path_ok && !package_name_ok))) {
23877
- throw new Error("When napi_versions is specified; module_path and either remote_path or " +
23878
- "package_name must contain the substitution string '{napi_build_version}`.");
23879
- }
23427
+ debug("val=%j", val)
23428
+ debug("types=", type)
23429
+ val = val.map(function (val) {
23430
+ // if it's an unknown value, then parse false/true/null/numbers/dates
23431
+ if (typeof val === "string") {
23432
+ debug("string %j", val)
23433
+ val = val.trim()
23434
+ if ((val === "null" && ~type.indexOf(null))
23435
+ || (val === "true" &&
23436
+ (~type.indexOf(true) || ~type.indexOf(Boolean)))
23437
+ || (val === "false" &&
23438
+ (~type.indexOf(false) || ~type.indexOf(Boolean)))) {
23439
+ val = JSON.parse(val)
23440
+ debug("jsonable %j", val)
23441
+ } else if (~type.indexOf(Number) && !isNaN(val)) {
23442
+ debug("convert to number", val)
23443
+ val = +val
23444
+ } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) {
23445
+ debug("convert to date", val)
23446
+ val = new Date(val)
23447
+ }
23448
+ }
23880
23449
 
23881
- if ((module_path_ok || remote_path_ok || package_name_ok) && !napi_build_versions_raw) {
23882
- throw new Error("When the substitution string '{napi_build_version}` is specified in " +
23883
- "module_path, remote_path, or package_name; napi_versions must also be specified.");
23884
- }
23450
+ if (!types.hasOwnProperty(k)) {
23451
+ return val
23452
+ }
23885
23453
 
23886
- if (napi_build_versions && !module.exports.get_best_napi_build_version(package_json, opts) &&
23887
- module.exports.build_napi_only(package_json)) {
23888
- throw new Error(
23889
- 'The N-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' +
23890
- 'This module supports N-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' +
23891
- 'This Node instance cannot run this module.');
23892
- }
23454
+ // allow `--no-blah` to set 'blah' to null if null is allowed
23455
+ if (val === false && ~type.indexOf(null) &&
23456
+ !(~type.indexOf(false) || ~type.indexOf(Boolean))) {
23457
+ val = null
23458
+ }
23893
23459
 
23894
- if (napi_build_versions_raw && !napi_build_versions && module.exports.build_napi_only(package_json)) {
23895
- throw new Error(
23896
- 'The N-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' +
23897
- 'This module supports N-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' +
23898
- 'This Node instance cannot run this module.');
23899
- }
23460
+ var d = {}
23461
+ d[k] = val
23462
+ debug("prevalidated val", d, val, types[k])
23463
+ if (!validate(d, k, val, types[k], typeDefs)) {
23464
+ if (exports.invalidHandler) {
23465
+ exports.invalidHandler(k, val, types[k], data)
23466
+ } else if (exports.invalidHandler !== false) {
23467
+ debug("invalid: "+k+"="+val, types[k])
23468
+ }
23469
+ return remove
23470
+ }
23471
+ debug("validated val", d, val, types[k])
23472
+ return d[k]
23473
+ }).filter(function (val) { return val !== remove })
23900
23474
 
23901
- };
23475
+ // if we allow Array specifically, then an empty array is how we
23476
+ // express 'no value here', not null. Allow it.
23477
+ if (!val.length && type.indexOf(Array) === -1) {
23478
+ debug('VAL HAS NO LENGTH, DELETE IT', val, k, type.indexOf(Array))
23479
+ delete data[k]
23480
+ }
23481
+ else if (isArray) {
23482
+ debug(isArray, data[k], val)
23483
+ data[k] = val
23484
+ } else data[k] = val[0]
23902
23485
 
23903
- function pathOK (path) {
23904
- return path && (path.indexOf('{napi_build_version}') !== -1 || path.indexOf('{node_napi_label}') !== -1);
23486
+ debug("k=%s val=%j", k, val, data[k])
23487
+ })
23905
23488
  }
23906
23489
 
23907
- module.exports.expand_commands = function(package_json, opts, commands) {
23908
- var expanded_commands = [];
23909
- var napi_build_versions = module.exports.get_napi_build_versions(package_json, opts);
23910
- commands.forEach(function(command){
23911
- if (napi_build_versions && command.name === 'install') {
23912
- var napi_build_version = module.exports.get_best_napi_build_version(package_json, opts);
23913
- var args = napi_build_version ? [ napi_build_version_tag+napi_build_version ] : [ ];
23914
- expanded_commands.push ({ name: command.name, args: args });
23915
- } else if (napi_build_versions && napi_multiple_commands.indexOf(command.name) !== -1) {
23916
- napi_build_versions.forEach(function(napi_build_version){
23917
- var args = command.args.slice();
23918
- args.push (napi_build_version_tag+napi_build_version);
23919
- expanded_commands.push ({ name: command.name, args: args });
23920
- });
23921
- } else {
23922
- expanded_commands.push (command);
23923
- }
23924
- });
23925
- return expanded_commands;
23926
- };
23927
-
23928
- module.exports.get_napi_build_versions = function(package_json, opts, warnings) { // opts may be undefined
23929
- var napi_build_versions = [];
23930
- var supported_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined);
23931
- // remove duplicates, verify each napi version can actaully be built
23932
- if (package_json.binary && package_json.binary.napi_versions) {
23933
- package_json.binary.napi_versions.forEach(function(napi_version) {
23934
- var duplicated = napi_build_versions.indexOf(napi_version) !== -1;
23935
- if (!duplicated && supported_napi_version && napi_version <= supported_napi_version) {
23936
- napi_build_versions.push(napi_version);
23937
- } else if (warnings && !duplicated && supported_napi_version) {
23938
- log.info('This Node instance does not support builds for N-API version', napi_version);
23939
- }
23940
- });
23941
- }
23942
- if (opts && opts["build-latest-napi-version-only"]) {
23943
- var latest_version = 0;
23944
- napi_build_versions.forEach(function(napi_version) {
23945
- if (napi_version > latest_version) latest_version = napi_version;
23946
- });
23947
- napi_build_versions = latest_version ? [ latest_version ] : [];
23948
- }
23949
- return napi_build_versions.length ? napi_build_versions : undefined;
23950
- };
23951
-
23952
- module.exports.get_napi_build_versions_raw = function(package_json) {
23953
- var napi_build_versions = [];
23954
- // remove duplicates
23955
- if (package_json.binary && package_json.binary.napi_versions) {
23956
- package_json.binary.napi_versions.forEach(function(napi_version) {
23957
- if (napi_build_versions.indexOf(napi_version) === -1) {
23958
- napi_build_versions.push(napi_version);
23959
- }
23960
- });
23961
- }
23962
- return napi_build_versions.length ? napi_build_versions : undefined;
23963
- };
23490
+ function validateString (data, k, val) {
23491
+ data[k] = String(val)
23492
+ }
23964
23493
 
23965
- module.exports.get_command_arg = function(napi_build_version) {
23966
- return napi_build_version_tag + napi_build_version;
23967
- };
23494
+ function validatePath (data, k, val) {
23495
+ if (val === true) return false
23496
+ if (val === null) return true
23968
23497
 
23969
- module.exports.get_napi_build_version_from_command_args = function(command_args) {
23970
- for (var i = 0; i < command_args.length; i++) {
23971
- var arg = command_args[i];
23972
- if (arg.indexOf(napi_build_version_tag) === 0) {
23973
- return parseInt(arg.substr(napi_build_version_tag.length),10);
23974
- }
23975
- }
23976
- return undefined;
23977
- };
23498
+ val = String(val)
23978
23499
 
23979
- module.exports.swap_build_dir_out = function(napi_build_version) {
23980
- if (napi_build_version) {
23981
- rm.sync(module.exports.get_build_dir(napi_build_version));
23982
- fs.renameSync('build', module.exports.get_build_dir(napi_build_version));
23983
- }
23984
- };
23500
+ var isWin = process.platform === 'win32'
23501
+ , homePattern = isWin ? /^~(\/|\\)/ : /^~\//
23502
+ , home = os.homedir()
23985
23503
 
23986
- module.exports.swap_build_dir_in = function(napi_build_version) {
23987
- if (napi_build_version) {
23988
- rm.sync('build');
23989
- fs.renameSync(module.exports.get_build_dir(napi_build_version), 'build');
23990
- }
23991
- };
23504
+ if (home && val.match(homePattern)) {
23505
+ data[k] = path.resolve(home, val.substr(2))
23506
+ } else {
23507
+ data[k] = path.resolve(val)
23508
+ }
23509
+ return true
23510
+ }
23992
23511
 
23993
- module.exports.get_build_dir = function(napi_build_version) {
23994
- return 'build-tmp-napi-v'+napi_build_version;
23995
- };
23512
+ function validateNumber (data, k, val) {
23513
+ debug("validate Number %j %j %j", k, val, isNaN(val))
23514
+ if (isNaN(val)) return false
23515
+ data[k] = +val
23516
+ }
23996
23517
 
23997
- module.exports.get_best_napi_build_version = function(package_json, opts) {
23998
- var best_napi_build_version = 0;
23999
- var napi_build_versions = module.exports.get_napi_build_versions (package_json, opts);
24000
- if (napi_build_versions) {
24001
- var our_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined);
24002
- napi_build_versions.forEach(function(napi_build_version){
24003
- if (napi_build_version > best_napi_build_version &&
24004
- napi_build_version <= our_napi_version) {
24005
- best_napi_build_version = napi_build_version;
24006
- }
24007
- });
24008
- }
24009
- return best_napi_build_version === 0 ? undefined : best_napi_build_version;
24010
- };
23518
+ function validateDate (data, k, val) {
23519
+ var s = Date.parse(val)
23520
+ debug("validate Date %j %j %j", k, val, s)
23521
+ if (isNaN(s)) return false
23522
+ data[k] = new Date(val)
23523
+ }
24011
23524
 
24012
- module.exports.build_napi_only = function(package_json) {
24013
- return package_json.binary && package_json.binary.package_name &&
24014
- package_json.binary.package_name.indexOf('{node_napi_label}') === -1;
24015
- };
23525
+ function validateBoolean (data, k, val) {
23526
+ if (val instanceof Boolean) val = val.valueOf()
23527
+ else if (typeof val === "string") {
23528
+ if (!isNaN(val)) val = !!(+val)
23529
+ else if (val === "null" || val === "false") val = false
23530
+ else val = true
23531
+ } else val = !!val
23532
+ data[k] = val
23533
+ }
24016
23534
 
24017
- /***/ }),
23535
+ function validateUrl (data, k, val) {
23536
+ val = url.parse(String(val))
23537
+ if (!val.host) return false
23538
+ data[k] = val.href
23539
+ }
24018
23540
 
24019
- /***/ 5574:
24020
- /***/ ((module, exports, __webpack_require__) => {
23541
+ function validateStream (data, k, val) {
23542
+ if (!(val instanceof Stream)) return false
23543
+ data[k] = val
23544
+ }
24021
23545
 
24022
- "use strict";
23546
+ function validate (data, k, val, type, typeDefs) {
23547
+ // arrays are lists of types.
23548
+ if (Array.isArray(type)) {
23549
+ for (var i = 0, l = type.length; i < l; i ++) {
23550
+ if (type[i] === Array) continue
23551
+ if (validate(data, k, val, type[i], typeDefs)) return true
23552
+ }
23553
+ delete data[k]
23554
+ return false
23555
+ }
24023
23556
 
23557
+ // an array of anything?
23558
+ if (type === Array) return true
24024
23559
 
24025
- module.exports = exports;
23560
+ // NaN is poisonous. Means that something is not allowed.
23561
+ if (type !== type) {
23562
+ debug("Poison NaN", k, val, type)
23563
+ delete data[k]
23564
+ return false
23565
+ }
24026
23566
 
24027
- var path = __webpack_require__(5622);
24028
- var semver = __webpack_require__(5720);
24029
- var url = __webpack_require__(8835);
24030
- var detect_libc = __webpack_require__(2157);
24031
- var napi = __webpack_require__(9248);
23567
+ // explicit list of values
23568
+ if (val === type) {
23569
+ debug("Explicitly allowed %j", val)
23570
+ // if (isArray) (data[k] = data[k] || []).push(val)
23571
+ // else data[k] = val
23572
+ data[k] = val
23573
+ return true
23574
+ }
24032
23575
 
24033
- var abi_crosswalk;
23576
+ // now go through the list of typeDefs, validate against each one.
23577
+ var ok = false
23578
+ , types = Object.keys(typeDefs)
23579
+ for (var i = 0, l = types.length; i < l; i ++) {
23580
+ debug("test type %j %j %j", k, val, types[i])
23581
+ var t = typeDefs[types[i]]
23582
+ if (t &&
23583
+ ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) {
23584
+ var d = {}
23585
+ ok = false !== t.validate(d, k, val)
23586
+ val = d[k]
23587
+ if (ok) {
23588
+ // if (isArray) (data[k] = data[k] || []).push(val)
23589
+ // else data[k] = val
23590
+ data[k] = val
23591
+ break
23592
+ }
23593
+ }
23594
+ }
23595
+ debug("OK? %j (%j %j %j)", ok, k, val, types[i])
24034
23596
 
24035
- // This is used for unit testing to provide a fake
24036
- // ABI crosswalk that emulates one that is not updated
24037
- // for the current version
24038
- if (process.env.NODE_PRE_GYP_ABI_CROSSWALK) {
24039
- abi_crosswalk = require(process.env.NODE_PRE_GYP_ABI_CROSSWALK);
24040
- } else {
24041
- abi_crosswalk = __webpack_require__(772);
23597
+ if (!ok) delete data[k]
23598
+ return ok
24042
23599
  }
24043
23600
 
24044
- var major_versions = {};
24045
- Object.keys(abi_crosswalk).forEach(function(v) {
24046
- var major = v.split('.')[0];
24047
- if (!major_versions[major]) {
24048
- major_versions[major] = v;
24049
- }
24050
- });
23601
+ function parse (args, data, remain, types, shorthands) {
23602
+ debug("parse", args, data, remain)
24051
23603
 
24052
- function get_electron_abi(runtime, target_version) {
24053
- if (!runtime) {
24054
- throw new Error("get_electron_abi requires valid runtime arg");
24055
- }
24056
- if (typeof target_version === 'undefined') {
24057
- // erroneous CLI call
24058
- throw new Error("Empty target version is not supported if electron is the target.");
24059
- }
24060
- // Electron guarantees that patch version update won't break native modules.
24061
- var sem_ver = semver.parse(target_version);
24062
- return runtime + '-v' + sem_ver.major + '.' + sem_ver.minor;
24063
- }
24064
- module.exports.get_electron_abi = get_electron_abi;
23604
+ var key = null
23605
+ , abbrevs = abbrev(Object.keys(types))
23606
+ , shortAbbr = abbrev(Object.keys(shorthands))
24065
23607
 
24066
- function get_node_webkit_abi(runtime, target_version) {
24067
- if (!runtime) {
24068
- throw new Error("get_node_webkit_abi requires valid runtime arg");
24069
- }
24070
- if (typeof target_version === 'undefined') {
24071
- // erroneous CLI call
24072
- throw new Error("Empty target version is not supported if node-webkit is the target.");
24073
- }
24074
- return runtime + '-v' + target_version;
24075
- }
24076
- module.exports.get_node_webkit_abi = get_node_webkit_abi;
23608
+ for (var i = 0; i < args.length; i ++) {
23609
+ var arg = args[i]
23610
+ debug("arg", arg)
24077
23611
 
24078
- function get_node_abi(runtime, versions) {
24079
- if (!runtime) {
24080
- throw new Error("get_node_abi requires valid runtime arg");
24081
- }
24082
- if (!versions) {
24083
- throw new Error("get_node_abi requires valid process.versions object");
24084
- }
24085
- var sem_ver = semver.parse(versions.node);
24086
- if (sem_ver.major === 0 && sem_ver.minor % 2) { // odd series
24087
- // https://github.com/mapbox/node-pre-gyp/issues/124
24088
- return runtime+'-v'+versions.node;
24089
- } else {
24090
- // process.versions.modules added in >= v0.10.4 and v0.11.7
24091
- // https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e
24092
- return versions.modules ? runtime+'-v' + (+versions.modules) :
24093
- 'v8-' + versions.v8.split('.').slice(0,2).join('.');
23612
+ if (arg.match(/^-{2,}$/)) {
23613
+ // done with keys.
23614
+ // the rest are args.
23615
+ remain.push.apply(remain, args.slice(i + 1))
23616
+ args[i] = "--"
23617
+ break
24094
23618
  }
24095
- }
24096
- module.exports.get_node_abi = get_node_abi;
23619
+ var hadEq = false
23620
+ if (arg.charAt(0) === "-" && arg.length > 1) {
23621
+ var at = arg.indexOf('=')
23622
+ if (at > -1) {
23623
+ hadEq = true
23624
+ var v = arg.substr(at + 1)
23625
+ arg = arg.substr(0, at)
23626
+ args.splice(i, 1, arg, v)
23627
+ }
24097
23628
 
24098
- function get_runtime_abi(runtime, target_version) {
24099
- if (!runtime) {
24100
- throw new Error("get_runtime_abi requires valid runtime arg");
24101
- }
24102
- if (runtime === 'node-webkit') {
24103
- return get_node_webkit_abi(runtime, target_version || process.versions['node-webkit']);
24104
- } else if (runtime === 'electron') {
24105
- return get_electron_abi(runtime, target_version || process.versions.electron);
24106
- } else {
24107
- if (runtime != 'node') {
24108
- throw new Error("Unknown Runtime: '" + runtime + "'");
23629
+ // see if it's a shorthand
23630
+ // if so, splice and back up to re-parse it.
23631
+ var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs)
23632
+ debug("arg=%j shRes=%j", arg, shRes)
23633
+ if (shRes) {
23634
+ debug(arg, shRes)
23635
+ args.splice.apply(args, [i, 1].concat(shRes))
23636
+ if (arg !== shRes[0]) {
23637
+ i --
23638
+ continue
24109
23639
  }
24110
- if (!target_version) {
24111
- return get_node_abi(runtime,process.versions);
24112
- } else {
24113
- var cross_obj;
24114
- // abi_crosswalk generated with ./scripts/abi_crosswalk.js
24115
- if (abi_crosswalk[target_version]) {
24116
- cross_obj = abi_crosswalk[target_version];
24117
- } else {
24118
- var target_parts = target_version.split('.').map(function(i) { return +i; });
24119
- if (target_parts.length != 3) { // parse failed
24120
- throw new Error("Unknown target version: " + target_version);
24121
- }
24122
- /*
24123
- The below code tries to infer the last known ABI compatible version
24124
- that we have recorded in the abi_crosswalk.json when an exact match
24125
- is not possible. The reasons for this to exist are complicated:
23640
+ }
23641
+ arg = arg.replace(/^-+/, "")
23642
+ var no = null
23643
+ while (arg.toLowerCase().indexOf("no-") === 0) {
23644
+ no = !no
23645
+ arg = arg.substr(3)
23646
+ }
24126
23647
 
24127
- - We support passing --target to be able to allow developers to package binaries for versions of node
24128
- that are not the same one as they are running. This might also be used in combination with the
24129
- --target_arch or --target_platform flags to also package binaries for alternative platforms
24130
- - When --target is passed we can't therefore determine the ABI (process.versions.modules) from the node
24131
- version that is running in memory
24132
- - So, therefore node-pre-gyp keeps an "ABI crosswalk" (lib/util/abi_crosswalk.json) to be able to look
24133
- this info up for all versions
24134
- - But we cannot easily predict what the future ABI will be for released versions
24135
- - And node-pre-gyp needs to be a `bundledDependency` in apps that depend on it in order to work correctly
24136
- by being fully available at install time.
24137
- - So, the speed of node releases and the bundled nature of node-pre-gyp mean that a new node-pre-gyp release
24138
- need to happen for every node.js/io.js/node-webkit/nw.js/atom-shell/etc release that might come online if
24139
- you want the `--target` flag to keep working for the latest version
24140
- - Which is impractical ^^
24141
- - Hence the below code guesses about future ABI to make the need to update node-pre-gyp less demanding.
23648
+ if (abbrevs[arg]) arg = abbrevs[arg]
24142
23649
 
24143
- In practice then you can have a dependency of your app like `node-sqlite3` that bundles a `node-pre-gyp` that
24144
- only knows about node v0.10.33 in the `abi_crosswalk.json` but target node v0.10.34 (which is assumed to be
24145
- ABI compatible with v0.10.33).
23650
+ var argType = types[arg]
23651
+ var isTypeArray = Array.isArray(argType)
23652
+ if (isTypeArray && argType.length === 1) {
23653
+ isTypeArray = false
23654
+ argType = argType[0]
23655
+ }
24146
23656
 
24147
- TODO: use semver module instead of custom version parsing
24148
- */
24149
- var major = target_parts[0];
24150
- var minor = target_parts[1];
24151
- var patch = target_parts[2];
24152
- // io.js: yeah if node.js ever releases 1.x this will break
24153
- // but that is unlikely to happen: https://github.com/iojs/io.js/pull/253#issuecomment-69432616
24154
- if (major === 1) {
24155
- // look for last release that is the same major version
24156
- // e.g. we assume io.js 1.x is ABI compatible with >= 1.0.0
24157
- while (true) {
24158
- if (minor > 0) --minor;
24159
- if (patch > 0) --patch;
24160
- var new_iojs_target = '' + major + '.' + minor + '.' + patch;
24161
- if (abi_crosswalk[new_iojs_target]) {
24162
- cross_obj = abi_crosswalk[new_iojs_target];
24163
- console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
24164
- console.log('Warning: but node-pre-gyp successfully choose ' + new_iojs_target + ' as ABI compatible target');
24165
- break;
24166
- }
24167
- if (minor === 0 && patch === 0) {
24168
- break;
24169
- }
24170
- }
24171
- } else if (major >= 2) {
24172
- // look for last release that is the same major version
24173
- if (major_versions[major]) {
24174
- cross_obj = abi_crosswalk[major_versions[major]];
24175
- console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
24176
- console.log('Warning: but node-pre-gyp successfully choose ' + major_versions[major] + ' as ABI compatible target');
24177
- }
24178
- } else if (major === 0) { // node.js
24179
- if (target_parts[1] % 2 === 0) { // for stable/even node.js series
24180
- // look for the last release that is the same minor release
24181
- // e.g. we assume node 0.10.x is ABI compatible with >= 0.10.0
24182
- while (--patch > 0) {
24183
- var new_node_target = '' + major + '.' + minor + '.' + patch;
24184
- if (abi_crosswalk[new_node_target]) {
24185
- cross_obj = abi_crosswalk[new_node_target];
24186
- console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
24187
- console.log('Warning: but node-pre-gyp successfully choose ' + new_node_target + ' as ABI compatible target');
24188
- break;
24189
- }
24190
- }
24191
- }
24192
- }
24193
- }
24194
- if (!cross_obj) {
24195
- throw new Error("Unsupported target version: " + target_version);
24196
- }
24197
- // emulate process.versions
24198
- var versions_obj = {
24199
- node: target_version,
24200
- v8: cross_obj.v8+'.0',
24201
- // abi_crosswalk uses 1 for node versions lacking process.versions.modules
24202
- // process.versions.modules added in >= v0.10.4 and v0.11.7
24203
- modules: cross_obj.node_abi > 1 ? cross_obj.node_abi : undefined
24204
- };
24205
- return get_node_abi(runtime, versions_obj);
24206
- }
24207
- }
24208
- }
24209
- module.exports.get_runtime_abi = get_runtime_abi;
23657
+ var isArray = argType === Array ||
23658
+ isTypeArray && argType.indexOf(Array) !== -1
24210
23659
 
24211
- var required_parameters = [
24212
- 'module_name',
24213
- 'module_path',
24214
- 'host'
24215
- ];
23660
+ // allow unknown things to be arrays if specified multiple times.
23661
+ if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) {
23662
+ if (!Array.isArray(data[arg]))
23663
+ data[arg] = [data[arg]]
23664
+ isArray = true
23665
+ }
24216
23666
 
24217
- function validate_config(package_json,opts) {
24218
- var msg = package_json.name + ' package.json is not node-pre-gyp ready:\n';
24219
- var missing = [];
24220
- if (!package_json.main) {
24221
- missing.push('main');
24222
- }
24223
- if (!package_json.version) {
24224
- missing.push('version');
24225
- }
24226
- if (!package_json.name) {
24227
- missing.push('name');
24228
- }
24229
- if (!package_json.binary) {
24230
- missing.push('binary');
24231
- }
24232
- var o = package_json.binary;
24233
- required_parameters.forEach(function(p) {
24234
- if (missing.indexOf('binary') > -1) {
24235
- missing.pop('binary');
24236
- }
24237
- if (!o || o[p] === undefined || o[p] === "") {
24238
- missing.push('binary.' + p);
23667
+ var val
23668
+ , la = args[i + 1]
23669
+
23670
+ var isBool = typeof no === 'boolean' ||
23671
+ argType === Boolean ||
23672
+ isTypeArray && argType.indexOf(Boolean) !== -1 ||
23673
+ (typeof argType === 'undefined' && !hadEq) ||
23674
+ (la === "false" &&
23675
+ (argType === null ||
23676
+ isTypeArray && ~argType.indexOf(null)))
23677
+
23678
+ if (isBool) {
23679
+ // just set and move along
23680
+ val = !no
23681
+ // however, also support --bool true or --bool false
23682
+ if (la === "true" || la === "false") {
23683
+ val = JSON.parse(la)
23684
+ la = null
23685
+ if (no) val = !val
23686
+ i ++
24239
23687
  }
24240
- });
24241
- if (missing.length >= 1) {
24242
- throw new Error(msg+"package.json must declare these properties: \n" + missing.join('\n'));
24243
- }
24244
- if (o) {
24245
- // enforce https over http
24246
- var protocol = url.parse(o.host).protocol;
24247
- if (protocol === 'http:') {
24248
- throw new Error("'host' protocol ("+protocol+") is invalid - only 'https:' is accepted");
23688
+
23689
+ // also support "foo":[Boolean, "bar"] and "--foo bar"
23690
+ if (isTypeArray && la) {
23691
+ if (~argType.indexOf(la)) {
23692
+ // an explicit type
23693
+ val = la
23694
+ i ++
23695
+ } else if ( la === "null" && ~argType.indexOf(null) ) {
23696
+ // null allowed
23697
+ val = null
23698
+ i ++
23699
+ } else if ( !la.match(/^-{2,}[^-]/) &&
23700
+ !isNaN(la) &&
23701
+ ~argType.indexOf(Number) ) {
23702
+ // number
23703
+ val = +la
23704
+ i ++
23705
+ } else if ( !la.match(/^-[^-]/) && ~argType.indexOf(String) ) {
23706
+ // string
23707
+ val = la
23708
+ i ++
23709
+ }
24249
23710
  }
24250
- }
24251
- napi.validate_package_json(package_json,opts);
24252
- }
24253
23711
 
24254
- module.exports.validate_config = validate_config;
23712
+ if (isArray) (data[arg] = data[arg] || []).push(val)
23713
+ else data[arg] = val
23714
+
23715
+ continue
23716
+ }
24255
23717
 
24256
- function eval_template(template,opts) {
24257
- Object.keys(opts).forEach(function(key) {
24258
- var pattern = '{'+key+'}';
24259
- while (template.indexOf(pattern) > -1) {
24260
- template = template.replace(pattern,opts[key]);
23718
+ if (argType === String) {
23719
+ if (la === undefined) {
23720
+ la = ""
23721
+ } else if (la.match(/^-{1,2}[^-]+/)) {
23722
+ la = ""
23723
+ i --
24261
23724
  }
24262
- });
24263
- return template;
24264
- }
23725
+ }
24265
23726
 
24266
- // url.resolve needs single trailing slash
24267
- // to behave correctly, otherwise a double slash
24268
- // may end up in the url which breaks requests
24269
- // and a lacking slash may not lead to proper joining
24270
- function fix_slashes(pathname) {
24271
- if (pathname.slice(-1) != '/') {
24272
- return pathname + '/';
24273
- }
24274
- return pathname;
24275
- }
23727
+ if (la && la.match(/^-{2,}$/)) {
23728
+ la = undefined
23729
+ i --
23730
+ }
24276
23731
 
24277
- // remove double slashes
24278
- // note: path.normalize will not work because
24279
- // it will convert forward to back slashes
24280
- function drop_double_slashes(pathname) {
24281
- return pathname.replace(/\/\//g,'/');
24282
- }
23732
+ val = la === undefined ? true : la
23733
+ if (isArray) (data[arg] = data[arg] || []).push(val)
23734
+ else data[arg] = val
24283
23735
 
24284
- function get_process_runtime(versions) {
24285
- var runtime = 'node';
24286
- if (versions['node-webkit']) {
24287
- runtime = 'node-webkit';
24288
- } else if (versions.electron) {
24289
- runtime = 'electron';
23736
+ i ++
23737
+ continue
24290
23738
  }
24291
- return runtime;
23739
+ remain.push(arg)
23740
+ }
24292
23741
  }
24293
23742
 
24294
- module.exports.get_process_runtime = get_process_runtime;
23743
+ function resolveShort (arg, shorthands, shortAbbr, abbrevs) {
23744
+ // handle single-char shorthands glommed together, like
23745
+ // npm ls -glp, but only if there is one dash, and only if
23746
+ // all of the chars are single-char shorthands, and it's
23747
+ // not a match to some other abbrev.
23748
+ arg = arg.replace(/^-+/, '')
24295
23749
 
24296
- var default_package_name = '{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz';
24297
- var default_remote_path = '';
23750
+ // if it's an exact known option, then don't go any further
23751
+ if (abbrevs[arg] === arg)
23752
+ return null
24298
23753
 
24299
- module.exports.evaluate = function(package_json,options,napi_build_version) {
24300
- options = options || {};
24301
- validate_config(package_json,options); // options is a suitable substitute for opts in this case
24302
- var v = package_json.version;
24303
- var module_version = semver.parse(v);
24304
- var runtime = options.runtime || get_process_runtime(process.versions);
24305
- var opts = {
24306
- name: package_json.name,
24307
- configuration: Boolean(options.debug) ? 'Debug' : 'Release',
24308
- debug: options.debug,
24309
- module_name: package_json.binary.module_name,
24310
- version: module_version.version,
24311
- prerelease: module_version.prerelease.length ? module_version.prerelease.join('.') : '',
24312
- build: module_version.build.length ? module_version.build.join('.') : '',
24313
- major: module_version.major,
24314
- minor: module_version.minor,
24315
- patch: module_version.patch,
24316
- runtime: runtime,
24317
- node_abi: get_runtime_abi(runtime,options.target),
24318
- node_abi_napi: napi.get_napi_version(options.target) ? 'napi' : get_runtime_abi(runtime,options.target),
24319
- napi_version: napi.get_napi_version(options.target), // non-zero numeric, undefined if unsupported
24320
- napi_build_version: napi_build_version || '',
24321
- node_napi_label: napi_build_version ? 'napi-v' + napi_build_version : get_runtime_abi(runtime,options.target),
24322
- target: options.target || '',
24323
- platform: options.target_platform || process.platform,
24324
- target_platform: options.target_platform || process.platform,
24325
- arch: options.target_arch || process.arch,
24326
- target_arch: options.target_arch || process.arch,
24327
- libc: options.target_libc || detect_libc.family || 'unknown',
24328
- module_main: package_json.main,
24329
- toolset : options.toolset || '' // address https://github.com/mapbox/node-pre-gyp/issues/119
24330
- };
24331
- // support host mirror with npm config `--{module_name}_binary_host_mirror`
24332
- // e.g.: https://github.com/node-inspector/v8-profiler/blob/master/package.json#L25
24333
- // > npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/
24334
- var host = process.env['npm_config_' + opts.module_name + '_binary_host_mirror'] || package_json.binary.host;
24335
- opts.host = fix_slashes(eval_template(host,opts));
24336
- opts.module_path = eval_template(package_json.binary.module_path,opts);
24337
- // now we resolve the module_path to ensure it is absolute so that binding.gyp variables work predictably
24338
- if (options.module_root) {
24339
- // resolve relative to known module root: works for pre-binding require
24340
- opts.module_path = path.join(options.module_root,opts.module_path);
24341
- } else {
24342
- // resolve relative to current working directory: works for node-pre-gyp commands
24343
- opts.module_path = path.resolve(opts.module_path);
24344
- }
24345
- opts.module = path.join(opts.module_path,opts.module_name + '.node');
24346
- opts.remote_path = package_json.binary.remote_path ? drop_double_slashes(fix_slashes(eval_template(package_json.binary.remote_path,opts))) : default_remote_path;
24347
- var package_name = package_json.binary.package_name ? package_json.binary.package_name : default_package_name;
24348
- opts.package_name = eval_template(package_name,opts);
24349
- opts.staged_tarball = path.join('build/stage',opts.remote_path,opts.package_name);
24350
- opts.hosted_path = url.resolve(opts.host,opts.remote_path);
24351
- opts.hosted_tarball = url.resolve(opts.hosted_path,opts.package_name);
24352
- return opts;
24353
- };
24354
-
24355
-
24356
- /***/ }),
24357
-
24358
- /***/ 5720:
24359
- /***/ ((module, exports) => {
24360
-
24361
- exports = module.exports = SemVer
24362
-
24363
- var debug
24364
- /* istanbul ignore next */
24365
- if (typeof process === 'object' &&
24366
- process.env &&
24367
- process.env.NODE_DEBUG &&
24368
- /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
24369
- debug = function () {
24370
- var args = Array.prototype.slice.call(arguments, 0)
24371
- args.unshift('SEMVER')
24372
- console.log.apply(console, args)
24373
- }
24374
- } else {
24375
- debug = function () {}
24376
- }
24377
-
24378
- // Note: this is the semver.org version of the spec that it implements
24379
- // Not necessarily the package version of this code.
24380
- exports.SEMVER_SPEC_VERSION = '2.0.0'
24381
-
24382
- var MAX_LENGTH = 256
24383
- var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
24384
- /* istanbul ignore next */ 9007199254740991
24385
-
24386
- // Max safe segment length for coercion.
24387
- var MAX_SAFE_COMPONENT_LENGTH = 16
24388
-
24389
- // The actual regexps go on exports.re
24390
- var re = exports.re = []
24391
- var src = exports.src = []
24392
- var R = 0
24393
-
24394
- // The following Regular Expressions can be used for tokenizing,
24395
- // validating, and parsing SemVer version strings.
24396
-
24397
- // ## Numeric Identifier
24398
- // A single `0`, or a non-zero digit followed by zero or more digits.
24399
-
24400
- var NUMERICIDENTIFIER = R++
24401
- src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'
24402
- var NUMERICIDENTIFIERLOOSE = R++
24403
- src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'
24404
-
24405
- // ## Non-numeric Identifier
24406
- // Zero or more digits, followed by a letter or hyphen, and then zero or
24407
- // more letters, digits, or hyphens.
24408
-
24409
- var NONNUMERICIDENTIFIER = R++
24410
- src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
24411
-
24412
- // ## Main Version
24413
- // Three dot-separated numeric identifiers.
24414
-
24415
- var MAINVERSION = R++
24416
- src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
24417
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
24418
- '(' + src[NUMERICIDENTIFIER] + ')'
24419
-
24420
- var MAINVERSIONLOOSE = R++
24421
- src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
24422
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
24423
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')'
24424
-
24425
- // ## Pre-release Version Identifier
24426
- // A numeric identifier, or a non-numeric identifier.
24427
-
24428
- var PRERELEASEIDENTIFIER = R++
24429
- src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
24430
- '|' + src[NONNUMERICIDENTIFIER] + ')'
24431
-
24432
- var PRERELEASEIDENTIFIERLOOSE = R++
24433
- src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
24434
- '|' + src[NONNUMERICIDENTIFIER] + ')'
24435
-
24436
- // ## Pre-release Version
24437
- // Hyphen, followed by one or more dot-separated pre-release version
24438
- // identifiers.
24439
-
24440
- var PRERELEASE = R++
24441
- src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
24442
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'
24443
-
24444
- var PRERELEASELOOSE = R++
24445
- src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
24446
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'
24447
-
24448
- // ## Build Metadata Identifier
24449
- // Any combination of digits, letters, or hyphens.
24450
-
24451
- var BUILDIDENTIFIER = R++
24452
- src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
24453
-
24454
- // ## Build Metadata
24455
- // Plus sign, followed by one or more period-separated build metadata
24456
- // identifiers.
24457
-
24458
- var BUILD = R++
24459
- src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
24460
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'
24461
-
24462
- // ## Full Version String
24463
- // A main version, followed optionally by a pre-release version and
24464
- // build metadata.
24465
-
24466
- // Note that the only major, minor, patch, and pre-release sections of
24467
- // the version string are capturing groups. The build metadata is not a
24468
- // capturing group, because it should not ever be used in version
24469
- // comparison.
24470
-
24471
- var FULL = R++
24472
- var FULLPLAIN = 'v?' + src[MAINVERSION] +
24473
- src[PRERELEASE] + '?' +
24474
- src[BUILD] + '?'
24475
-
24476
- src[FULL] = '^' + FULLPLAIN + '$'
24477
-
24478
- // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
24479
- // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
24480
- // common in the npm registry.
24481
- var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
24482
- src[PRERELEASELOOSE] + '?' +
24483
- src[BUILD] + '?'
24484
-
24485
- var LOOSE = R++
24486
- src[LOOSE] = '^' + LOOSEPLAIN + '$'
24487
-
24488
- var GTLT = R++
24489
- src[GTLT] = '((?:<|>)?=?)'
24490
-
24491
- // Something like "2.*" or "1.2.x".
24492
- // Note that "x.x" is a valid xRange identifer, meaning "any version"
24493
- // Only the first item is strictly required.
24494
- var XRANGEIDENTIFIERLOOSE = R++
24495
- src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
24496
- var XRANGEIDENTIFIER = R++
24497
- src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'
24498
-
24499
- var XRANGEPLAIN = R++
24500
- src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
24501
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
24502
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
24503
- '(?:' + src[PRERELEASE] + ')?' +
24504
- src[BUILD] + '?' +
24505
- ')?)?'
24506
-
24507
- var XRANGEPLAINLOOSE = R++
24508
- src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
24509
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
24510
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
24511
- '(?:' + src[PRERELEASELOOSE] + ')?' +
24512
- src[BUILD] + '?' +
24513
- ')?)?'
24514
-
24515
- var XRANGE = R++
24516
- src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'
24517
- var XRANGELOOSE = R++
24518
- src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'
24519
-
24520
- // Coercion.
24521
- // Extract anything that could conceivably be a part of a valid semver
24522
- var COERCE = R++
24523
- src[COERCE] = '(?:^|[^\\d])' +
24524
- '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
24525
- '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
24526
- '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
24527
- '(?:$|[^\\d])'
24528
-
24529
- // Tilde ranges.
24530
- // Meaning is "reasonably at or greater than"
24531
- var LONETILDE = R++
24532
- src[LONETILDE] = '(?:~>?)'
24533
-
24534
- var TILDETRIM = R++
24535
- src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'
24536
- re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')
24537
- var tildeTrimReplace = '$1~'
24538
-
24539
- var TILDE = R++
24540
- src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'
24541
- var TILDELOOSE = R++
24542
- src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'
24543
-
24544
- // Caret ranges.
24545
- // Meaning is "at least and backwards compatible with"
24546
- var LONECARET = R++
24547
- src[LONECARET] = '(?:\\^)'
24548
-
24549
- var CARETTRIM = R++
24550
- src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'
24551
- re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')
24552
- var caretTrimReplace = '$1^'
24553
-
24554
- var CARET = R++
24555
- src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'
24556
- var CARETLOOSE = R++
24557
- src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'
24558
-
24559
- // A simple gt/lt/eq thing, or just "" to indicate "any version"
24560
- var COMPARATORLOOSE = R++
24561
- src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'
24562
- var COMPARATOR = R++
24563
- src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'
24564
-
24565
- // An expression to strip any whitespace between the gtlt and the thing
24566
- // it modifies, so that `> 1.2.3` ==> `>1.2.3`
24567
- var COMPARATORTRIM = R++
24568
- src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
24569
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'
24570
-
24571
- // this one has to use the /g flag
24572
- re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')
24573
- var comparatorTrimReplace = '$1$2$3'
24574
-
24575
- // Something like `1.2.3 - 1.2.4`
24576
- // Note that these all use the loose form, because they'll be
24577
- // checked against either the strict or loose comparator form
24578
- // later.
24579
- var HYPHENRANGE = R++
24580
- src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
24581
- '\\s+-\\s+' +
24582
- '(' + src[XRANGEPLAIN] + ')' +
24583
- '\\s*$'
24584
-
24585
- var HYPHENRANGELOOSE = R++
24586
- src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
24587
- '\\s+-\\s+' +
24588
- '(' + src[XRANGEPLAINLOOSE] + ')' +
24589
- '\\s*$'
24590
-
24591
- // Star ranges basically just allow anything at all.
24592
- var STAR = R++
24593
- src[STAR] = '(<|>)?=?\\s*\\*'
24594
-
24595
- // Compile to actual regexp objects.
24596
- // All are flag-free, unless they were created above with a flag.
24597
- for (var i = 0; i < R; i++) {
24598
- debug(i, src[i])
24599
- if (!re[i]) {
24600
- re[i] = new RegExp(src[i])
24601
- }
24602
- }
24603
-
24604
- exports.parse = parse
24605
- function parse (version, options) {
24606
- if (!options || typeof options !== 'object') {
24607
- options = {
24608
- loose: !!options,
24609
- includePrerelease: false
24610
- }
24611
- }
24612
-
24613
- if (version instanceof SemVer) {
24614
- return version
24615
- }
24616
-
24617
- if (typeof version !== 'string') {
24618
- return null
24619
- }
24620
-
24621
- if (version.length > MAX_LENGTH) {
24622
- return null
24623
- }
24624
-
24625
- var r = options.loose ? re[LOOSE] : re[FULL]
24626
- if (!r.test(version)) {
24627
- return null
24628
- }
24629
-
24630
- try {
24631
- return new SemVer(version, options)
24632
- } catch (er) {
24633
- return null
24634
- }
24635
- }
24636
-
24637
- exports.valid = valid
24638
- function valid (version, options) {
24639
- var v = parse(version, options)
24640
- return v ? v.version : null
24641
- }
24642
-
24643
- exports.clean = clean
24644
- function clean (version, options) {
24645
- var s = parse(version.trim().replace(/^[=v]+/, ''), options)
24646
- return s ? s.version : null
24647
- }
24648
-
24649
- exports.SemVer = SemVer
24650
-
24651
- function SemVer (version, options) {
24652
- if (!options || typeof options !== 'object') {
24653
- options = {
24654
- loose: !!options,
24655
- includePrerelease: false
24656
- }
24657
- }
24658
- if (version instanceof SemVer) {
24659
- if (version.loose === options.loose) {
24660
- return version
24661
- } else {
24662
- version = version.version
24663
- }
24664
- } else if (typeof version !== 'string') {
24665
- throw new TypeError('Invalid Version: ' + version)
24666
- }
24667
-
24668
- if (version.length > MAX_LENGTH) {
24669
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
24670
- }
24671
-
24672
- if (!(this instanceof SemVer)) {
24673
- return new SemVer(version, options)
24674
- }
24675
-
24676
- debug('SemVer', version, options)
24677
- this.options = options
24678
- this.loose = !!options.loose
24679
-
24680
- var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL])
24681
-
24682
- if (!m) {
24683
- throw new TypeError('Invalid Version: ' + version)
24684
- }
24685
-
24686
- this.raw = version
24687
-
24688
- // these are actually numbers
24689
- this.major = +m[1]
24690
- this.minor = +m[2]
24691
- this.patch = +m[3]
24692
-
24693
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
24694
- throw new TypeError('Invalid major version')
24695
- }
24696
-
24697
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
24698
- throw new TypeError('Invalid minor version')
24699
- }
24700
-
24701
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
24702
- throw new TypeError('Invalid patch version')
24703
- }
24704
-
24705
- // numberify any prerelease numeric ids
24706
- if (!m[4]) {
24707
- this.prerelease = []
24708
- } else {
24709
- this.prerelease = m[4].split('.').map(function (id) {
24710
- if (/^[0-9]+$/.test(id)) {
24711
- var num = +id
24712
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
24713
- return num
24714
- }
24715
- }
24716
- return id
24717
- })
24718
- }
24719
-
24720
- this.build = m[5] ? m[5].split('.') : []
24721
- this.format()
24722
- }
24723
-
24724
- SemVer.prototype.format = function () {
24725
- this.version = this.major + '.' + this.minor + '.' + this.patch
24726
- if (this.prerelease.length) {
24727
- this.version += '-' + this.prerelease.join('.')
24728
- }
24729
- return this.version
24730
- }
24731
-
24732
- SemVer.prototype.toString = function () {
24733
- return this.version
24734
- }
24735
-
24736
- SemVer.prototype.compare = function (other) {
24737
- debug('SemVer.compare', this.version, this.options, other)
24738
- if (!(other instanceof SemVer)) {
24739
- other = new SemVer(other, this.options)
24740
- }
24741
-
24742
- return this.compareMain(other) || this.comparePre(other)
24743
- }
24744
-
24745
- SemVer.prototype.compareMain = function (other) {
24746
- if (!(other instanceof SemVer)) {
24747
- other = new SemVer(other, this.options)
24748
- }
24749
-
24750
- return compareIdentifiers(this.major, other.major) ||
24751
- compareIdentifiers(this.minor, other.minor) ||
24752
- compareIdentifiers(this.patch, other.patch)
24753
- }
24754
-
24755
- SemVer.prototype.comparePre = function (other) {
24756
- if (!(other instanceof SemVer)) {
24757
- other = new SemVer(other, this.options)
24758
- }
24759
-
24760
- // NOT having a prerelease is > having one
24761
- if (this.prerelease.length && !other.prerelease.length) {
24762
- return -1
24763
- } else if (!this.prerelease.length && other.prerelease.length) {
24764
- return 1
24765
- } else if (!this.prerelease.length && !other.prerelease.length) {
24766
- return 0
24767
- }
24768
-
24769
- var i = 0
24770
- do {
24771
- var a = this.prerelease[i]
24772
- var b = other.prerelease[i]
24773
- debug('prerelease compare', i, a, b)
24774
- if (a === undefined && b === undefined) {
24775
- return 0
24776
- } else if (b === undefined) {
24777
- return 1
24778
- } else if (a === undefined) {
24779
- return -1
24780
- } else if (a === b) {
24781
- continue
24782
- } else {
24783
- return compareIdentifiers(a, b)
24784
- }
24785
- } while (++i)
24786
- }
24787
-
24788
- // preminor will bump the version up to the next minor release, and immediately
24789
- // down to pre-release. premajor and prepatch work the same way.
24790
- SemVer.prototype.inc = function (release, identifier) {
24791
- switch (release) {
24792
- case 'premajor':
24793
- this.prerelease.length = 0
24794
- this.patch = 0
24795
- this.minor = 0
24796
- this.major++
24797
- this.inc('pre', identifier)
24798
- break
24799
- case 'preminor':
24800
- this.prerelease.length = 0
24801
- this.patch = 0
24802
- this.minor++
24803
- this.inc('pre', identifier)
24804
- break
24805
- case 'prepatch':
24806
- // If this is already a prerelease, it will bump to the next version
24807
- // drop any prereleases that might already exist, since they are not
24808
- // relevant at this point.
24809
- this.prerelease.length = 0
24810
- this.inc('patch', identifier)
24811
- this.inc('pre', identifier)
24812
- break
24813
- // If the input is a non-prerelease version, this acts the same as
24814
- // prepatch.
24815
- case 'prerelease':
24816
- if (this.prerelease.length === 0) {
24817
- this.inc('patch', identifier)
24818
- }
24819
- this.inc('pre', identifier)
24820
- break
24821
-
24822
- case 'major':
24823
- // If this is a pre-major version, bump up to the same major version.
24824
- // Otherwise increment major.
24825
- // 1.0.0-5 bumps to 1.0.0
24826
- // 1.1.0 bumps to 2.0.0
24827
- if (this.minor !== 0 ||
24828
- this.patch !== 0 ||
24829
- this.prerelease.length === 0) {
24830
- this.major++
24831
- }
24832
- this.minor = 0
24833
- this.patch = 0
24834
- this.prerelease = []
24835
- break
24836
- case 'minor':
24837
- // If this is a pre-minor version, bump up to the same minor version.
24838
- // Otherwise increment minor.
24839
- // 1.2.0-5 bumps to 1.2.0
24840
- // 1.2.1 bumps to 1.3.0
24841
- if (this.patch !== 0 || this.prerelease.length === 0) {
24842
- this.minor++
24843
- }
24844
- this.patch = 0
24845
- this.prerelease = []
24846
- break
24847
- case 'patch':
24848
- // If this is not a pre-release version, it will increment the patch.
24849
- // If it is a pre-release it will bump up to the same patch version.
24850
- // 1.2.0-5 patches to 1.2.0
24851
- // 1.2.0 patches to 1.2.1
24852
- if (this.prerelease.length === 0) {
24853
- this.patch++
24854
- }
24855
- this.prerelease = []
24856
- break
24857
- // This probably shouldn't be used publicly.
24858
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
24859
- case 'pre':
24860
- if (this.prerelease.length === 0) {
24861
- this.prerelease = [0]
24862
- } else {
24863
- var i = this.prerelease.length
24864
- while (--i >= 0) {
24865
- if (typeof this.prerelease[i] === 'number') {
24866
- this.prerelease[i]++
24867
- i = -2
24868
- }
24869
- }
24870
- if (i === -1) {
24871
- // didn't increment anything
24872
- this.prerelease.push(0)
24873
- }
24874
- }
24875
- if (identifier) {
24876
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
24877
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
24878
- if (this.prerelease[0] === identifier) {
24879
- if (isNaN(this.prerelease[1])) {
24880
- this.prerelease = [identifier, 0]
24881
- }
24882
- } else {
24883
- this.prerelease = [identifier, 0]
24884
- }
24885
- }
24886
- break
24887
-
24888
- default:
24889
- throw new Error('invalid increment argument: ' + release)
24890
- }
24891
- this.format()
24892
- this.raw = this.version
24893
- return this
24894
- }
24895
-
24896
- exports.inc = inc
24897
- function inc (version, release, loose, identifier) {
24898
- if (typeof (loose) === 'string') {
24899
- identifier = loose
24900
- loose = undefined
24901
- }
24902
-
24903
- try {
24904
- return new SemVer(version, loose).inc(release, identifier).version
24905
- } catch (er) {
24906
- return null
24907
- }
24908
- }
24909
-
24910
- exports.diff = diff
24911
- function diff (version1, version2) {
24912
- if (eq(version1, version2)) {
24913
- return null
24914
- } else {
24915
- var v1 = parse(version1)
24916
- var v2 = parse(version2)
24917
- var prefix = ''
24918
- if (v1.prerelease.length || v2.prerelease.length) {
24919
- prefix = 'pre'
24920
- var defaultResult = 'prerelease'
24921
- }
24922
- for (var key in v1) {
24923
- if (key === 'major' || key === 'minor' || key === 'patch') {
24924
- if (v1[key] !== v2[key]) {
24925
- return prefix + key
24926
- }
24927
- }
24928
- }
24929
- return defaultResult // may be undefined
24930
- }
24931
- }
24932
-
24933
- exports.compareIdentifiers = compareIdentifiers
24934
-
24935
- var numeric = /^[0-9]+$/
24936
- function compareIdentifiers (a, b) {
24937
- var anum = numeric.test(a)
24938
- var bnum = numeric.test(b)
24939
-
24940
- if (anum && bnum) {
24941
- a = +a
24942
- b = +b
24943
- }
24944
-
24945
- return a === b ? 0
24946
- : (anum && !bnum) ? -1
24947
- : (bnum && !anum) ? 1
24948
- : a < b ? -1
24949
- : 1
24950
- }
24951
-
24952
- exports.rcompareIdentifiers = rcompareIdentifiers
24953
- function rcompareIdentifiers (a, b) {
24954
- return compareIdentifiers(b, a)
24955
- }
24956
-
24957
- exports.major = major
24958
- function major (a, loose) {
24959
- return new SemVer(a, loose).major
24960
- }
24961
-
24962
- exports.minor = minor
24963
- function minor (a, loose) {
24964
- return new SemVer(a, loose).minor
24965
- }
24966
-
24967
- exports.patch = patch
24968
- function patch (a, loose) {
24969
- return new SemVer(a, loose).patch
24970
- }
24971
-
24972
- exports.compare = compare
24973
- function compare (a, b, loose) {
24974
- return new SemVer(a, loose).compare(new SemVer(b, loose))
24975
- }
24976
-
24977
- exports.compareLoose = compareLoose
24978
- function compareLoose (a, b) {
24979
- return compare(a, b, true)
24980
- }
24981
-
24982
- exports.rcompare = rcompare
24983
- function rcompare (a, b, loose) {
24984
- return compare(b, a, loose)
24985
- }
24986
-
24987
- exports.sort = sort
24988
- function sort (list, loose) {
24989
- return list.sort(function (a, b) {
24990
- return exports.compare(a, b, loose)
24991
- })
24992
- }
24993
-
24994
- exports.rsort = rsort
24995
- function rsort (list, loose) {
24996
- return list.sort(function (a, b) {
24997
- return exports.rcompare(a, b, loose)
24998
- })
24999
- }
25000
-
25001
- exports.gt = gt
25002
- function gt (a, b, loose) {
25003
- return compare(a, b, loose) > 0
25004
- }
25005
-
25006
- exports.lt = lt
25007
- function lt (a, b, loose) {
25008
- return compare(a, b, loose) < 0
25009
- }
25010
-
25011
- exports.eq = eq
25012
- function eq (a, b, loose) {
25013
- return compare(a, b, loose) === 0
25014
- }
25015
-
25016
- exports.neq = neq
25017
- function neq (a, b, loose) {
25018
- return compare(a, b, loose) !== 0
25019
- }
25020
-
25021
- exports.gte = gte
25022
- function gte (a, b, loose) {
25023
- return compare(a, b, loose) >= 0
25024
- }
25025
-
25026
- exports.lte = lte
25027
- function lte (a, b, loose) {
25028
- return compare(a, b, loose) <= 0
25029
- }
25030
-
25031
- exports.cmp = cmp
25032
- function cmp (a, op, b, loose) {
25033
- switch (op) {
25034
- case '===':
25035
- if (typeof a === 'object')
25036
- a = a.version
25037
- if (typeof b === 'object')
25038
- b = b.version
25039
- return a === b
25040
-
25041
- case '!==':
25042
- if (typeof a === 'object')
25043
- a = a.version
25044
- if (typeof b === 'object')
25045
- b = b.version
25046
- return a !== b
25047
-
25048
- case '':
25049
- case '=':
25050
- case '==':
25051
- return eq(a, b, loose)
25052
-
25053
- case '!=':
25054
- return neq(a, b, loose)
25055
-
25056
- case '>':
25057
- return gt(a, b, loose)
25058
-
25059
- case '>=':
25060
- return gte(a, b, loose)
25061
-
25062
- case '<':
25063
- return lt(a, b, loose)
25064
-
25065
- case '<=':
25066
- return lte(a, b, loose)
25067
-
25068
- default:
25069
- throw new TypeError('Invalid operator: ' + op)
25070
- }
25071
- }
25072
-
25073
- exports.Comparator = Comparator
25074
- function Comparator (comp, options) {
25075
- if (!options || typeof options !== 'object') {
25076
- options = {
25077
- loose: !!options,
25078
- includePrerelease: false
25079
- }
25080
- }
25081
-
25082
- if (comp instanceof Comparator) {
25083
- if (comp.loose === !!options.loose) {
25084
- return comp
25085
- } else {
25086
- comp = comp.value
25087
- }
25088
- }
25089
-
25090
- if (!(this instanceof Comparator)) {
25091
- return new Comparator(comp, options)
25092
- }
25093
-
25094
- debug('comparator', comp, options)
25095
- this.options = options
25096
- this.loose = !!options.loose
25097
- this.parse(comp)
25098
-
25099
- if (this.semver === ANY) {
25100
- this.value = ''
25101
- } else {
25102
- this.value = this.operator + this.semver.version
25103
- }
25104
-
25105
- debug('comp', this)
25106
- }
25107
-
25108
- var ANY = {}
25109
- Comparator.prototype.parse = function (comp) {
25110
- var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
25111
- var m = comp.match(r)
25112
-
25113
- if (!m) {
25114
- throw new TypeError('Invalid comparator: ' + comp)
25115
- }
25116
-
25117
- this.operator = m[1]
25118
- if (this.operator === '=') {
25119
- this.operator = ''
25120
- }
25121
-
25122
- // if it literally is just '>' or '' then allow anything.
25123
- if (!m[2]) {
25124
- this.semver = ANY
25125
- } else {
25126
- this.semver = new SemVer(m[2], this.options.loose)
25127
- }
25128
- }
25129
-
25130
- Comparator.prototype.toString = function () {
25131
- return this.value
25132
- }
25133
-
25134
- Comparator.prototype.test = function (version) {
25135
- debug('Comparator.test', version, this.options.loose)
25136
-
25137
- if (this.semver === ANY) {
25138
- return true
25139
- }
25140
-
25141
- if (typeof version === 'string') {
25142
- version = new SemVer(version, this.options)
25143
- }
25144
-
25145
- return cmp(version, this.operator, this.semver, this.options)
25146
- }
25147
-
25148
- Comparator.prototype.intersects = function (comp, options) {
25149
- if (!(comp instanceof Comparator)) {
25150
- throw new TypeError('a Comparator is required')
25151
- }
25152
-
25153
- if (!options || typeof options !== 'object') {
25154
- options = {
25155
- loose: !!options,
25156
- includePrerelease: false
25157
- }
25158
- }
25159
-
25160
- var rangeTmp
25161
-
25162
- if (this.operator === '') {
25163
- rangeTmp = new Range(comp.value, options)
25164
- return satisfies(this.value, rangeTmp, options)
25165
- } else if (comp.operator === '') {
25166
- rangeTmp = new Range(this.value, options)
25167
- return satisfies(comp.semver, rangeTmp, options)
25168
- }
25169
-
25170
- var sameDirectionIncreasing =
25171
- (this.operator === '>=' || this.operator === '>') &&
25172
- (comp.operator === '>=' || comp.operator === '>')
25173
- var sameDirectionDecreasing =
25174
- (this.operator === '<=' || this.operator === '<') &&
25175
- (comp.operator === '<=' || comp.operator === '<')
25176
- var sameSemVer = this.semver.version === comp.semver.version
25177
- var differentDirectionsInclusive =
25178
- (this.operator === '>=' || this.operator === '<=') &&
25179
- (comp.operator === '>=' || comp.operator === '<=')
25180
- var oppositeDirectionsLessThan =
25181
- cmp(this.semver, '<', comp.semver, options) &&
25182
- ((this.operator === '>=' || this.operator === '>') &&
25183
- (comp.operator === '<=' || comp.operator === '<'))
25184
- var oppositeDirectionsGreaterThan =
25185
- cmp(this.semver, '>', comp.semver, options) &&
25186
- ((this.operator === '<=' || this.operator === '<') &&
25187
- (comp.operator === '>=' || comp.operator === '>'))
25188
-
25189
- return sameDirectionIncreasing || sameDirectionDecreasing ||
25190
- (sameSemVer && differentDirectionsInclusive) ||
25191
- oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
25192
- }
25193
-
25194
- exports.Range = Range
25195
- function Range (range, options) {
25196
- if (!options || typeof options !== 'object') {
25197
- options = {
25198
- loose: !!options,
25199
- includePrerelease: false
25200
- }
25201
- }
25202
-
25203
- if (range instanceof Range) {
25204
- if (range.loose === !!options.loose &&
25205
- range.includePrerelease === !!options.includePrerelease) {
25206
- return range
25207
- } else {
25208
- return new Range(range.raw, options)
25209
- }
25210
- }
25211
-
25212
- if (range instanceof Comparator) {
25213
- return new Range(range.value, options)
25214
- }
25215
-
25216
- if (!(this instanceof Range)) {
25217
- return new Range(range, options)
25218
- }
25219
-
25220
- this.options = options
25221
- this.loose = !!options.loose
25222
- this.includePrerelease = !!options.includePrerelease
25223
-
25224
- // First, split based on boolean or ||
25225
- this.raw = range
25226
- this.set = range.split(/\s*\|\|\s*/).map(function (range) {
25227
- return this.parseRange(range.trim())
25228
- }, this).filter(function (c) {
25229
- // throw out any that are not relevant for whatever reason
25230
- return c.length
25231
- })
25232
-
25233
- if (!this.set.length) {
25234
- throw new TypeError('Invalid SemVer Range: ' + range)
25235
- }
25236
-
25237
- this.format()
25238
- }
25239
-
25240
- Range.prototype.format = function () {
25241
- this.range = this.set.map(function (comps) {
25242
- return comps.join(' ').trim()
25243
- }).join('||').trim()
25244
- return this.range
25245
- }
25246
-
25247
- Range.prototype.toString = function () {
25248
- return this.range
25249
- }
25250
-
25251
- Range.prototype.parseRange = function (range) {
25252
- var loose = this.options.loose
25253
- range = range.trim()
25254
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
25255
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]
25256
- range = range.replace(hr, hyphenReplace)
25257
- debug('hyphen replace', range)
25258
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
25259
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace)
25260
- debug('comparator trim', range, re[COMPARATORTRIM])
25261
-
25262
- // `~ 1.2.3` => `~1.2.3`
25263
- range = range.replace(re[TILDETRIM], tildeTrimReplace)
25264
-
25265
- // `^ 1.2.3` => `^1.2.3`
25266
- range = range.replace(re[CARETTRIM], caretTrimReplace)
25267
-
25268
- // normalize spaces
25269
- range = range.split(/\s+/).join(' ')
25270
-
25271
- // At this point, the range is completely trimmed and
25272
- // ready to be split into comparators.
25273
-
25274
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
25275
- var set = range.split(' ').map(function (comp) {
25276
- return parseComparator(comp, this.options)
25277
- }, this).join(' ').split(/\s+/)
25278
- if (this.options.loose) {
25279
- // in loose mode, throw out any that are not valid comparators
25280
- set = set.filter(function (comp) {
25281
- return !!comp.match(compRe)
25282
- })
25283
- }
25284
- set = set.map(function (comp) {
25285
- return new Comparator(comp, this.options)
25286
- }, this)
25287
-
25288
- return set
25289
- }
25290
-
25291
- Range.prototype.intersects = function (range, options) {
25292
- if (!(range instanceof Range)) {
25293
- throw new TypeError('a Range is required')
25294
- }
25295
-
25296
- return this.set.some(function (thisComparators) {
25297
- return thisComparators.every(function (thisComparator) {
25298
- return range.set.some(function (rangeComparators) {
25299
- return rangeComparators.every(function (rangeComparator) {
25300
- return thisComparator.intersects(rangeComparator, options)
25301
- })
25302
- })
25303
- })
25304
- })
25305
- }
25306
-
25307
- // Mostly just for testing and legacy API reasons
25308
- exports.toComparators = toComparators
25309
- function toComparators (range, options) {
25310
- return new Range(range, options).set.map(function (comp) {
25311
- return comp.map(function (c) {
25312
- return c.value
25313
- }).join(' ').trim().split(' ')
25314
- })
25315
- }
25316
-
25317
- // comprised of xranges, tildes, stars, and gtlt's at this point.
25318
- // already replaced the hyphen ranges
25319
- // turn into a set of JUST comparators.
25320
- function parseComparator (comp, options) {
25321
- debug('comp', comp, options)
25322
- comp = replaceCarets(comp, options)
25323
- debug('caret', comp)
25324
- comp = replaceTildes(comp, options)
25325
- debug('tildes', comp)
25326
- comp = replaceXRanges(comp, options)
25327
- debug('xrange', comp)
25328
- comp = replaceStars(comp, options)
25329
- debug('stars', comp)
25330
- return comp
25331
- }
25332
-
25333
- function isX (id) {
25334
- return !id || id.toLowerCase() === 'x' || id === '*'
25335
- }
25336
-
25337
- // ~, ~> --> * (any, kinda silly)
25338
- // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
25339
- // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
25340
- // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
25341
- // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
25342
- // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
25343
- function replaceTildes (comp, options) {
25344
- return comp.trim().split(/\s+/).map(function (comp) {
25345
- return replaceTilde(comp, options)
25346
- }).join(' ')
25347
- }
25348
-
25349
- function replaceTilde (comp, options) {
25350
- var r = options.loose ? re[TILDELOOSE] : re[TILDE]
25351
- return comp.replace(r, function (_, M, m, p, pr) {
25352
- debug('tilde', comp, _, M, m, p, pr)
25353
- var ret
25354
-
25355
- if (isX(M)) {
25356
- ret = ''
25357
- } else if (isX(m)) {
25358
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
25359
- } else if (isX(p)) {
25360
- // ~1.2 == >=1.2.0 <1.3.0
25361
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
25362
- } else if (pr) {
25363
- debug('replaceTilde pr', pr)
25364
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
25365
- ' <' + M + '.' + (+m + 1) + '.0'
25366
- } else {
25367
- // ~1.2.3 == >=1.2.3 <1.3.0
25368
- ret = '>=' + M + '.' + m + '.' + p +
25369
- ' <' + M + '.' + (+m + 1) + '.0'
25370
- }
25371
-
25372
- debug('tilde return', ret)
25373
- return ret
25374
- })
25375
- }
25376
-
25377
- // ^ --> * (any, kinda silly)
25378
- // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
25379
- // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
25380
- // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
25381
- // ^1.2.3 --> >=1.2.3 <2.0.0
25382
- // ^1.2.0 --> >=1.2.0 <2.0.0
25383
- function replaceCarets (comp, options) {
25384
- return comp.trim().split(/\s+/).map(function (comp) {
25385
- return replaceCaret(comp, options)
25386
- }).join(' ')
25387
- }
25388
-
25389
- function replaceCaret (comp, options) {
25390
- debug('caret', comp, options)
25391
- var r = options.loose ? re[CARETLOOSE] : re[CARET]
25392
- return comp.replace(r, function (_, M, m, p, pr) {
25393
- debug('caret', comp, _, M, m, p, pr)
25394
- var ret
25395
-
25396
- if (isX(M)) {
25397
- ret = ''
25398
- } else if (isX(m)) {
25399
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
25400
- } else if (isX(p)) {
25401
- if (M === '0') {
25402
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
25403
- } else {
25404
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
25405
- }
25406
- } else if (pr) {
25407
- debug('replaceCaret pr', pr)
25408
- if (M === '0') {
25409
- if (m === '0') {
25410
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
25411
- ' <' + M + '.' + m + '.' + (+p + 1)
25412
- } else {
25413
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
25414
- ' <' + M + '.' + (+m + 1) + '.0'
25415
- }
25416
- } else {
25417
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
25418
- ' <' + (+M + 1) + '.0.0'
25419
- }
25420
- } else {
25421
- debug('no pr')
25422
- if (M === '0') {
25423
- if (m === '0') {
25424
- ret = '>=' + M + '.' + m + '.' + p +
25425
- ' <' + M + '.' + m + '.' + (+p + 1)
25426
- } else {
25427
- ret = '>=' + M + '.' + m + '.' + p +
25428
- ' <' + M + '.' + (+m + 1) + '.0'
25429
- }
25430
- } else {
25431
- ret = '>=' + M + '.' + m + '.' + p +
25432
- ' <' + (+M + 1) + '.0.0'
25433
- }
25434
- }
25435
-
25436
- debug('caret return', ret)
25437
- return ret
25438
- })
25439
- }
25440
-
25441
- function replaceXRanges (comp, options) {
25442
- debug('replaceXRanges', comp, options)
25443
- return comp.split(/\s+/).map(function (comp) {
25444
- return replaceXRange(comp, options)
25445
- }).join(' ')
25446
- }
25447
-
25448
- function replaceXRange (comp, options) {
25449
- comp = comp.trim()
25450
- var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]
25451
- return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
25452
- debug('xRange', comp, ret, gtlt, M, m, p, pr)
25453
- var xM = isX(M)
25454
- var xm = xM || isX(m)
25455
- var xp = xm || isX(p)
25456
- var anyX = xp
25457
-
25458
- if (gtlt === '=' && anyX) {
25459
- gtlt = ''
25460
- }
25461
-
25462
- if (xM) {
25463
- if (gtlt === '>' || gtlt === '<') {
25464
- // nothing is allowed
25465
- ret = '<0.0.0'
25466
- } else {
25467
- // nothing is forbidden
25468
- ret = '*'
25469
- }
25470
- } else if (gtlt && anyX) {
25471
- // we know patch is an x, because we have any x at all.
25472
- // replace X with 0
25473
- if (xm) {
25474
- m = 0
25475
- }
25476
- p = 0
25477
-
25478
- if (gtlt === '>') {
25479
- // >1 => >=2.0.0
25480
- // >1.2 => >=1.3.0
25481
- // >1.2.3 => >= 1.2.4
25482
- gtlt = '>='
25483
- if (xm) {
25484
- M = +M + 1
25485
- m = 0
25486
- p = 0
25487
- } else {
25488
- m = +m + 1
25489
- p = 0
25490
- }
25491
- } else if (gtlt === '<=') {
25492
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
25493
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
25494
- gtlt = '<'
25495
- if (xm) {
25496
- M = +M + 1
25497
- } else {
25498
- m = +m + 1
25499
- }
25500
- }
25501
-
25502
- ret = gtlt + M + '.' + m + '.' + p
25503
- } else if (xm) {
25504
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
25505
- } else if (xp) {
25506
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
25507
- }
25508
-
25509
- debug('xRange return', ret)
25510
-
25511
- return ret
25512
- })
25513
- }
25514
-
25515
- // Because * is AND-ed with everything else in the comparator,
25516
- // and '' means "any version", just remove the *s entirely.
25517
- function replaceStars (comp, options) {
25518
- debug('replaceStars', comp, options)
25519
- // Looseness is ignored here. star is always as loose as it gets!
25520
- return comp.trim().replace(re[STAR], '')
25521
- }
25522
-
25523
- // This function is passed to string.replace(re[HYPHENRANGE])
25524
- // M, m, patch, prerelease, build
25525
- // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
25526
- // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
25527
- // 1.2 - 3.4 => >=1.2.0 <3.5.0
25528
- function hyphenReplace ($0,
25529
- from, fM, fm, fp, fpr, fb,
25530
- to, tM, tm, tp, tpr, tb) {
25531
- if (isX(fM)) {
25532
- from = ''
25533
- } else if (isX(fm)) {
25534
- from = '>=' + fM + '.0.0'
25535
- } else if (isX(fp)) {
25536
- from = '>=' + fM + '.' + fm + '.0'
25537
- } else {
25538
- from = '>=' + from
25539
- }
25540
-
25541
- if (isX(tM)) {
25542
- to = ''
25543
- } else if (isX(tm)) {
25544
- to = '<' + (+tM + 1) + '.0.0'
25545
- } else if (isX(tp)) {
25546
- to = '<' + tM + '.' + (+tm + 1) + '.0'
25547
- } else if (tpr) {
25548
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
25549
- } else {
25550
- to = '<=' + to
25551
- }
25552
-
25553
- return (from + ' ' + to).trim()
25554
- }
25555
-
25556
- // if ANY of the sets match ALL of its comparators, then pass
25557
- Range.prototype.test = function (version) {
25558
- if (!version) {
25559
- return false
25560
- }
25561
-
25562
- if (typeof version === 'string') {
25563
- version = new SemVer(version, this.options)
25564
- }
25565
-
25566
- for (var i = 0; i < this.set.length; i++) {
25567
- if (testSet(this.set[i], version, this.options)) {
25568
- return true
25569
- }
25570
- }
25571
- return false
25572
- }
25573
-
25574
- function testSet (set, version, options) {
25575
- for (var i = 0; i < set.length; i++) {
25576
- if (!set[i].test(version)) {
25577
- return false
25578
- }
25579
- }
25580
-
25581
- if (version.prerelease.length && !options.includePrerelease) {
25582
- // Find the set of versions that are allowed to have prereleases
25583
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
25584
- // That should allow `1.2.3-pr.2` to pass.
25585
- // However, `1.2.4-alpha.notready` should NOT be allowed,
25586
- // even though it's within the range set by the comparators.
25587
- for (i = 0; i < set.length; i++) {
25588
- debug(set[i].semver)
25589
- if (set[i].semver === ANY) {
25590
- continue
25591
- }
25592
-
25593
- if (set[i].semver.prerelease.length > 0) {
25594
- var allowed = set[i].semver
25595
- if (allowed.major === version.major &&
25596
- allowed.minor === version.minor &&
25597
- allowed.patch === version.patch) {
25598
- return true
25599
- }
25600
- }
25601
- }
25602
-
25603
- // Version has a -pre, but it's not one of the ones we like.
25604
- return false
25605
- }
25606
-
25607
- return true
25608
- }
23754
+ // if it's an exact known shortopt, same deal
23755
+ if (shorthands[arg]) {
23756
+ // make it an array, if it's a list of words
23757
+ if (shorthands[arg] && !Array.isArray(shorthands[arg]))
23758
+ shorthands[arg] = shorthands[arg].split(/\s+/)
25609
23759
 
25610
- exports.satisfies = satisfies
25611
- function satisfies (version, range, options) {
25612
- try {
25613
- range = new Range(range, options)
25614
- } catch (er) {
25615
- return false
23760
+ return shorthands[arg]
25616
23761
  }
25617
- return range.test(version)
25618
- }
25619
23762
 
25620
- exports.maxSatisfying = maxSatisfying
25621
- function maxSatisfying (versions, range, options) {
25622
- var max = null
25623
- var maxSV = null
25624
- try {
25625
- var rangeObj = new Range(range, options)
25626
- } catch (er) {
25627
- return null
23763
+ // first check to see if this arg is a set of single-char shorthands
23764
+ var singles = shorthands.___singles
23765
+ if (!singles) {
23766
+ singles = Object.keys(shorthands).filter(function (s) {
23767
+ return s.length === 1
23768
+ }).reduce(function (l,r) {
23769
+ l[r] = true
23770
+ return l
23771
+ }, {})
23772
+ shorthands.___singles = singles
23773
+ debug('shorthand singles', singles)
25628
23774
  }
25629
- versions.forEach(function (v) {
25630
- if (rangeObj.test(v)) {
25631
- // satisfies(v, range, options)
25632
- if (!max || maxSV.compare(v) === -1) {
25633
- // compare(max, v, true)
25634
- max = v
25635
- maxSV = new SemVer(max, options)
25636
- }
25637
- }
25638
- })
25639
- return max
25640
- }
25641
23775
 
25642
- exports.minSatisfying = minSatisfying
25643
- function minSatisfying (versions, range, options) {
25644
- var min = null
25645
- var minSV = null
25646
- try {
25647
- var rangeObj = new Range(range, options)
25648
- } catch (er) {
25649
- return null
25650
- }
25651
- versions.forEach(function (v) {
25652
- if (rangeObj.test(v)) {
25653
- // satisfies(v, range, options)
25654
- if (!min || minSV.compare(v) === 1) {
25655
- // compare(min, v, true)
25656
- min = v
25657
- minSV = new SemVer(min, options)
25658
- }
25659
- }
23776
+ var chrs = arg.split("").filter(function (c) {
23777
+ return singles[c]
25660
23778
  })
25661
- return min
25662
- }
25663
-
25664
- exports.minVersion = minVersion
25665
- function minVersion (range, loose) {
25666
- range = new Range(range, loose)
25667
-
25668
- var minver = new SemVer('0.0.0')
25669
- if (range.test(minver)) {
25670
- return minver
25671
- }
25672
-
25673
- minver = new SemVer('0.0.0-0')
25674
- if (range.test(minver)) {
25675
- return minver
25676
- }
25677
-
25678
- minver = null
25679
- for (var i = 0; i < range.set.length; ++i) {
25680
- var comparators = range.set[i]
25681
-
25682
- comparators.forEach(function (comparator) {
25683
- // Clone to avoid manipulating the comparator's semver object.
25684
- var compver = new SemVer(comparator.semver.version)
25685
- switch (comparator.operator) {
25686
- case '>':
25687
- if (compver.prerelease.length === 0) {
25688
- compver.patch++
25689
- } else {
25690
- compver.prerelease.push(0)
25691
- }
25692
- compver.raw = compver.format()
25693
- /* fallthrough */
25694
- case '':
25695
- case '>=':
25696
- if (!minver || gt(minver, compver)) {
25697
- minver = compver
25698
- }
25699
- break
25700
- case '<':
25701
- case '<=':
25702
- /* Ignore maximum versions */
25703
- break
25704
- /* istanbul ignore next */
25705
- default:
25706
- throw new Error('Unexpected operation: ' + comparator.operator)
25707
- }
25708
- })
25709
- }
25710
-
25711
- if (minver && range.test(minver)) {
25712
- return minver
25713
- }
25714
-
25715
- return null
25716
- }
25717
-
25718
- exports.validRange = validRange
25719
- function validRange (range, options) {
25720
- try {
25721
- // Return '*' instead of '' so that truthiness works.
25722
- // This will throw if it's invalid anyway
25723
- return new Range(range, options).range || '*'
25724
- } catch (er) {
25725
- return null
25726
- }
25727
- }
25728
-
25729
- // Determine if version is less than all the versions possible in the range
25730
- exports.ltr = ltr
25731
- function ltr (version, range, options) {
25732
- return outside(version, range, '<', options)
25733
- }
25734
-
25735
- // Determine if version is greater than all the versions possible in the range.
25736
- exports.gtr = gtr
25737
- function gtr (version, range, options) {
25738
- return outside(version, range, '>', options)
25739
- }
25740
-
25741
- exports.outside = outside
25742
- function outside (version, range, hilo, options) {
25743
- version = new SemVer(version, options)
25744
- range = new Range(range, options)
25745
-
25746
- var gtfn, ltefn, ltfn, comp, ecomp
25747
- switch (hilo) {
25748
- case '>':
25749
- gtfn = gt
25750
- ltefn = lte
25751
- ltfn = lt
25752
- comp = '>'
25753
- ecomp = '>='
25754
- break
25755
- case '<':
25756
- gtfn = lt
25757
- ltefn = gte
25758
- ltfn = gt
25759
- comp = '<'
25760
- ecomp = '<='
25761
- break
25762
- default:
25763
- throw new TypeError('Must provide a hilo val of "<" or ">"')
25764
- }
25765
-
25766
- // If it satisifes the range it is not outside
25767
- if (satisfies(version, range, options)) {
25768
- return false
25769
- }
25770
-
25771
- // From now on, variable terms are as if we're in "gtr" mode.
25772
- // but note that everything is flipped for the "ltr" function.
25773
-
25774
- for (var i = 0; i < range.set.length; ++i) {
25775
- var comparators = range.set[i]
25776
-
25777
- var high = null
25778
- var low = null
25779
-
25780
- comparators.forEach(function (comparator) {
25781
- if (comparator.semver === ANY) {
25782
- comparator = new Comparator('>=0.0.0')
25783
- }
25784
- high = high || comparator
25785
- low = low || comparator
25786
- if (gtfn(comparator.semver, high.semver, options)) {
25787
- high = comparator
25788
- } else if (ltfn(comparator.semver, low.semver, options)) {
25789
- low = comparator
25790
- }
25791
- })
25792
-
25793
- // If the edge version comparator has a operator then our version
25794
- // isn't outside it
25795
- if (high.operator === comp || high.operator === ecomp) {
25796
- return false
25797
- }
25798
-
25799
- // If the lowest version comparator has an operator and our version
25800
- // is less than it then it isn't higher than the range
25801
- if ((!low.operator || low.operator === comp) &&
25802
- ltefn(version, low.semver)) {
25803
- return false
25804
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
25805
- return false
25806
- }
25807
- }
25808
- return true
25809
- }
25810
-
25811
- exports.prerelease = prerelease
25812
- function prerelease (version, options) {
25813
- var parsed = parse(version, options)
25814
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
25815
- }
25816
23779
 
25817
- exports.intersects = intersects
25818
- function intersects (r1, r2, options) {
25819
- r1 = new Range(r1, options)
25820
- r2 = new Range(r2, options)
25821
- return r1.intersects(r2)
25822
- }
23780
+ if (chrs.join("") === arg) return chrs.map(function (c) {
23781
+ return shorthands[c]
23782
+ }).reduce(function (l, r) {
23783
+ return l.concat(r)
23784
+ }, [])
25823
23785
 
25824
- exports.coerce = coerce
25825
- function coerce (version) {
25826
- if (version instanceof SemVer) {
25827
- return version
25828
- }
25829
23786
 
25830
- if (typeof version !== 'string') {
23787
+ // if it's an arg abbrev, and not a literal shorthand, then prefer the arg
23788
+ if (abbrevs[arg] && !shorthands[arg])
25831
23789
  return null
25832
- }
25833
23790
 
25834
- var match = version.match(re[COERCE])
23791
+ // if it's an abbr for a shorthand, then use that
23792
+ if (shortAbbr[arg])
23793
+ arg = shortAbbr[arg]
25835
23794
 
25836
- if (match == null) {
25837
- return null
25838
- }
23795
+ // make it an array, if it's a list of words
23796
+ if (shorthands[arg] && !Array.isArray(shorthands[arg]))
23797
+ shorthands[arg] = shorthands[arg].split(/\s+/)
25839
23798
 
25840
- return parse(match[1] +
25841
- '.' + (match[2] || '0') +
25842
- '.' + (match[3] || '0'))
23799
+ return shorthands[arg]
25843
23800
  }
25844
23801
 
25845
23802
 
@@ -31633,385 +29590,6 @@ module.exports = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleI
31633
29590
  module.exports.silent = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId, true);
31634
29591
 
31635
29592
 
31636
- /***/ }),
31637
-
31638
- /***/ 2780:
31639
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
31640
-
31641
- module.exports = rimraf
31642
- rimraf.sync = rimrafSync
31643
-
31644
- var assert = __webpack_require__(2357)
31645
- var path = __webpack_require__(5622)
31646
- var fs = __webpack_require__(5747)
31647
- var glob = undefined
31648
- try {
31649
- glob = __webpack_require__(3700)
31650
- } catch (_err) {
31651
- // treat glob as optional.
31652
- }
31653
- var _0666 = parseInt('666', 8)
31654
-
31655
- var defaultGlobOpts = {
31656
- nosort: true,
31657
- silent: true
31658
- }
31659
-
31660
- // for EMFILE handling
31661
- var timeout = 0
31662
-
31663
- var isWindows = (process.platform === "win32")
31664
-
31665
- function defaults (options) {
31666
- var methods = [
31667
- 'unlink',
31668
- 'chmod',
31669
- 'stat',
31670
- 'lstat',
31671
- 'rmdir',
31672
- 'readdir'
31673
- ]
31674
- methods.forEach(function(m) {
31675
- options[m] = options[m] || fs[m]
31676
- m = m + 'Sync'
31677
- options[m] = options[m] || fs[m]
31678
- })
31679
-
31680
- options.maxBusyTries = options.maxBusyTries || 3
31681
- options.emfileWait = options.emfileWait || 1000
31682
- if (options.glob === false) {
31683
- options.disableGlob = true
31684
- }
31685
- if (options.disableGlob !== true && glob === undefined) {
31686
- throw Error('glob dependency not found, set `options.disableGlob = true` if intentional')
31687
- }
31688
- options.disableGlob = options.disableGlob || false
31689
- options.glob = options.glob || defaultGlobOpts
31690
- }
31691
-
31692
- function rimraf (p, options, cb) {
31693
- if (typeof options === 'function') {
31694
- cb = options
31695
- options = {}
31696
- }
31697
-
31698
- assert(p, 'rimraf: missing path')
31699
- assert.equal(typeof p, 'string', 'rimraf: path should be a string')
31700
- assert.equal(typeof cb, 'function', 'rimraf: callback function required')
31701
- assert(options, 'rimraf: invalid options argument provided')
31702
- assert.equal(typeof options, 'object', 'rimraf: options should be object')
31703
-
31704
- defaults(options)
31705
-
31706
- var busyTries = 0
31707
- var errState = null
31708
- var n = 0
31709
-
31710
- if (options.disableGlob || !glob.hasMagic(p))
31711
- return afterGlob(null, [p])
31712
-
31713
- options.lstat(p, function (er, stat) {
31714
- if (!er)
31715
- return afterGlob(null, [p])
31716
-
31717
- glob(p, options.glob, afterGlob)
31718
- })
31719
-
31720
- function next (er) {
31721
- errState = errState || er
31722
- if (--n === 0)
31723
- cb(errState)
31724
- }
31725
-
31726
- function afterGlob (er, results) {
31727
- if (er)
31728
- return cb(er)
31729
-
31730
- n = results.length
31731
- if (n === 0)
31732
- return cb()
31733
-
31734
- results.forEach(function (p) {
31735
- rimraf_(p, options, function CB (er) {
31736
- if (er) {
31737
- if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") &&
31738
- busyTries < options.maxBusyTries) {
31739
- busyTries ++
31740
- var time = busyTries * 100
31741
- // try again, with the same exact callback as this one.
31742
- return setTimeout(function () {
31743
- rimraf_(p, options, CB)
31744
- }, time)
31745
- }
31746
-
31747
- // this one won't happen if graceful-fs is used.
31748
- if (er.code === "EMFILE" && timeout < options.emfileWait) {
31749
- return setTimeout(function () {
31750
- rimraf_(p, options, CB)
31751
- }, timeout ++)
31752
- }
31753
-
31754
- // already gone
31755
- if (er.code === "ENOENT") er = null
31756
- }
31757
-
31758
- timeout = 0
31759
- next(er)
31760
- })
31761
- })
31762
- }
31763
- }
31764
-
31765
- // Two possible strategies.
31766
- // 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
31767
- // 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
31768
- //
31769
- // Both result in an extra syscall when you guess wrong. However, there
31770
- // are likely far more normal files in the world than directories. This
31771
- // is based on the assumption that a the average number of files per
31772
- // directory is >= 1.
31773
- //
31774
- // If anyone ever complains about this, then I guess the strategy could
31775
- // be made configurable somehow. But until then, YAGNI.
31776
- function rimraf_ (p, options, cb) {
31777
- assert(p)
31778
- assert(options)
31779
- assert(typeof cb === 'function')
31780
-
31781
- // sunos lets the root user unlink directories, which is... weird.
31782
- // so we have to lstat here and make sure it's not a dir.
31783
- options.lstat(p, function (er, st) {
31784
- if (er && er.code === "ENOENT")
31785
- return cb(null)
31786
-
31787
- // Windows can EPERM on stat. Life is suffering.
31788
- if (er && er.code === "EPERM" && isWindows)
31789
- fixWinEPERM(p, options, er, cb)
31790
-
31791
- if (st && st.isDirectory())
31792
- return rmdir(p, options, er, cb)
31793
-
31794
- options.unlink(p, function (er) {
31795
- if (er) {
31796
- if (er.code === "ENOENT")
31797
- return cb(null)
31798
- if (er.code === "EPERM")
31799
- return (isWindows)
31800
- ? fixWinEPERM(p, options, er, cb)
31801
- : rmdir(p, options, er, cb)
31802
- if (er.code === "EISDIR")
31803
- return rmdir(p, options, er, cb)
31804
- }
31805
- return cb(er)
31806
- })
31807
- })
31808
- }
31809
-
31810
- function fixWinEPERM (p, options, er, cb) {
31811
- assert(p)
31812
- assert(options)
31813
- assert(typeof cb === 'function')
31814
- if (er)
31815
- assert(er instanceof Error)
31816
-
31817
- options.chmod(p, _0666, function (er2) {
31818
- if (er2)
31819
- cb(er2.code === "ENOENT" ? null : er)
31820
- else
31821
- options.stat(p, function(er3, stats) {
31822
- if (er3)
31823
- cb(er3.code === "ENOENT" ? null : er)
31824
- else if (stats.isDirectory())
31825
- rmdir(p, options, er, cb)
31826
- else
31827
- options.unlink(p, cb)
31828
- })
31829
- })
31830
- }
31831
-
31832
- function fixWinEPERMSync (p, options, er) {
31833
- assert(p)
31834
- assert(options)
31835
- if (er)
31836
- assert(er instanceof Error)
31837
-
31838
- try {
31839
- options.chmodSync(p, _0666)
31840
- } catch (er2) {
31841
- if (er2.code === "ENOENT")
31842
- return
31843
- else
31844
- throw er
31845
- }
31846
-
31847
- try {
31848
- var stats = options.statSync(p)
31849
- } catch (er3) {
31850
- if (er3.code === "ENOENT")
31851
- return
31852
- else
31853
- throw er
31854
- }
31855
-
31856
- if (stats.isDirectory())
31857
- rmdirSync(p, options, er)
31858
- else
31859
- options.unlinkSync(p)
31860
- }
31861
-
31862
- function rmdir (p, options, originalEr, cb) {
31863
- assert(p)
31864
- assert(options)
31865
- if (originalEr)
31866
- assert(originalEr instanceof Error)
31867
- assert(typeof cb === 'function')
31868
-
31869
- // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
31870
- // if we guessed wrong, and it's not a directory, then
31871
- // raise the original error.
31872
- options.rmdir(p, function (er) {
31873
- if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
31874
- rmkids(p, options, cb)
31875
- else if (er && er.code === "ENOTDIR")
31876
- cb(originalEr)
31877
- else
31878
- cb(er)
31879
- })
31880
- }
31881
-
31882
- function rmkids(p, options, cb) {
31883
- assert(p)
31884
- assert(options)
31885
- assert(typeof cb === 'function')
31886
-
31887
- options.readdir(p, function (er, files) {
31888
- if (er)
31889
- return cb(er)
31890
- var n = files.length
31891
- if (n === 0)
31892
- return options.rmdir(p, cb)
31893
- var errState
31894
- files.forEach(function (f) {
31895
- rimraf(path.join(p, f), options, function (er) {
31896
- if (errState)
31897
- return
31898
- if (er)
31899
- return cb(errState = er)
31900
- if (--n === 0)
31901
- options.rmdir(p, cb)
31902
- })
31903
- })
31904
- })
31905
- }
31906
-
31907
- // this looks simpler, and is strictly *faster*, but will
31908
- // tie up the JavaScript thread and fail on excessively
31909
- // deep directory trees.
31910
- function rimrafSync (p, options) {
31911
- options = options || {}
31912
- defaults(options)
31913
-
31914
- assert(p, 'rimraf: missing path')
31915
- assert.equal(typeof p, 'string', 'rimraf: path should be a string')
31916
- assert(options, 'rimraf: missing options')
31917
- assert.equal(typeof options, 'object', 'rimraf: options should be object')
31918
-
31919
- var results
31920
-
31921
- if (options.disableGlob || !glob.hasMagic(p)) {
31922
- results = [p]
31923
- } else {
31924
- try {
31925
- options.lstatSync(p)
31926
- results = [p]
31927
- } catch (er) {
31928
- results = glob.sync(p, options.glob)
31929
- }
31930
- }
31931
-
31932
- if (!results.length)
31933
- return
31934
-
31935
- for (var i = 0; i < results.length; i++) {
31936
- var p = results[i]
31937
-
31938
- try {
31939
- var st = options.lstatSync(p)
31940
- } catch (er) {
31941
- if (er.code === "ENOENT")
31942
- return
31943
-
31944
- // Windows can EPERM on stat. Life is suffering.
31945
- if (er.code === "EPERM" && isWindows)
31946
- fixWinEPERMSync(p, options, er)
31947
- }
31948
-
31949
- try {
31950
- // sunos lets the root user unlink directories, which is... weird.
31951
- if (st && st.isDirectory())
31952
- rmdirSync(p, options, null)
31953
- else
31954
- options.unlinkSync(p)
31955
- } catch (er) {
31956
- if (er.code === "ENOENT")
31957
- return
31958
- if (er.code === "EPERM")
31959
- return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
31960
- if (er.code !== "EISDIR")
31961
- throw er
31962
-
31963
- rmdirSync(p, options, er)
31964
- }
31965
- }
31966
- }
31967
-
31968
- function rmdirSync (p, options, originalEr) {
31969
- assert(p)
31970
- assert(options)
31971
- if (originalEr)
31972
- assert(originalEr instanceof Error)
31973
-
31974
- try {
31975
- options.rmdirSync(p)
31976
- } catch (er) {
31977
- if (er.code === "ENOENT")
31978
- return
31979
- if (er.code === "ENOTDIR")
31980
- throw originalEr
31981
- if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
31982
- rmkidsSync(p, options)
31983
- }
31984
- }
31985
-
31986
- function rmkidsSync (p, options) {
31987
- assert(p)
31988
- assert(options)
31989
- options.readdirSync(p).forEach(function (f) {
31990
- rimrafSync(path.join(p, f), options)
31991
- })
31992
-
31993
- // We only end up here once we got ENOTEMPTY at least once, and
31994
- // at this point, we are guaranteed to have removed all the kids.
31995
- // So, we know that it won't be ENOENT or ENOTDIR or anything else.
31996
- // try really hard to delete stuff on windows, because it has a
31997
- // PROFOUNDLY annoying habit of not closing handles promptly when
31998
- // files are deleted, resulting in spurious ENOTEMPTY errors.
31999
- var retries = isWindows ? 100 : 1
32000
- var i = 0
32001
- do {
32002
- var threw = true
32003
- try {
32004
- var ret = options.rmdirSync(p, options)
32005
- threw = false
32006
- return ret
32007
- } finally {
32008
- if (++i < retries && threw)
32009
- continue
32010
- }
32011
- } while (true)
32012
- }
32013
-
32014
-
32015
29593
  /***/ }),
32016
29594
 
32017
29595
  /***/ 7586:
@@ -44975,6 +42553,13 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
44975
42553
  const nextVersionRange = await getNextVersionRange(entryPath);
44976
42554
  const nodeVersion = await (0, build_utils_1.getNodeVersion)(entryPath, undefined, config, meta);
44977
42555
  const spawnOpts = (0, build_utils_1.getSpawnOptions)(meta, nodeVersion);
42556
+ const { cliType, lockfileVersion } = await (0, build_utils_1.scanParentDirs)(entryPath);
42557
+ spawnOpts.env = (0, build_utils_1.getEnvForPackageManager)({
42558
+ cliType,
42559
+ lockfileVersion,
42560
+ nodeVersion,
42561
+ env: spawnOpts.env || {},
42562
+ });
44978
42563
  const nowJsonPath = await (0, find_up_1.default)(['now.json', 'vercel.json'], {
44979
42564
  cwd: entryPath,
44980
42565
  });
@@ -45022,25 +42607,8 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
45022
42607
  if (typeof installCommand === 'string') {
45023
42608
  if (installCommand.trim()) {
45024
42609
  console.log(`Running "install" command: \`${installCommand}\`...`);
45025
- const { cliType, lockfileVersion } = await (0, build_utils_1.scanParentDirs)(entryPath);
45026
- const env = {
45027
- YARN_NODE_LINKER: 'node-modules',
45028
- ...spawnOpts.env,
45029
- };
45030
- if (cliType === 'npm') {
45031
- if (typeof lockfileVersion === 'number' &&
45032
- lockfileVersion >= 2 &&
45033
- (nodeVersion?.major || 0) < 16) {
45034
- // Ensure that npm 7 is at the beginning of the `$PATH`
45035
- env.PATH = `/node16/bin-npm7${path_1.default.delimiter}${env.PATH}`;
45036
- console.log('Detected `package-lock.json` generated by npm 7...');
45037
- }
45038
- }
45039
42610
  await (0, build_utils_1.execCommand)(installCommand, {
45040
42611
  ...spawnOpts,
45041
- // Yarn v2 PnP mode may be activated, so force
45042
- // "node-modules" linker style
45043
- env,
45044
42612
  cwd: entryPath,
45045
42613
  });
45046
42614
  }
@@ -45481,6 +43049,7 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
45481
43049
  await (0, fs_extra_1.remove)(path_1.default.join(entryPath, '.npmrc'));
45482
43050
  }
45483
43051
  const trailingSlashRedirects = [];
43052
+ let trailingSlash = false;
45484
43053
  redirects = redirects.filter(_redir => {
45485
43054
  const redir = _redir;
45486
43055
  // detect the trailing slash redirect and make sure it's
@@ -45494,6 +43063,9 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
45494
43063
  // moving underneath i18n routes
45495
43064
  redir.continue = true;
45496
43065
  trailingSlashRedirects.push(redir);
43066
+ if (location === '/$1/') {
43067
+ trailingSlash = true;
43068
+ }
45497
43069
  return false;
45498
43070
  }
45499
43071
  return true;
@@ -45706,6 +43278,7 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
45706
43278
  return (0, server_build_1.serverBuild)({
45707
43279
  config,
45708
43280
  nextVersion,
43281
+ trailingSlash,
45709
43282
  dynamicPages,
45710
43283
  canUsePreviewMode,
45711
43284
  staticPages,
@@ -45865,11 +43438,34 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
45865
43438
  const apiLambdaGroups = [];
45866
43439
  const pageLambdaGroups = [];
45867
43440
  if (isSharedLambdas) {
45868
- const initialPageLambdaGroups = await (0, utils_1.getPageLambdaGroups)(entryPath, config, nonApiPages, new Set(), pageTraces, compressedPages, tracedPseudoLayer?.pseudoLayer || {}, { pseudoLayer: {}, pseudoLayerBytes: 0 }, 0, lambdaCompressedByteLimit,
45869
- // internal pages are already referenced in traces for serverless
45870
- // like builds
45871
- []);
45872
- const initialApiLambdaGroups = await (0, utils_1.getPageLambdaGroups)(entryPath, config, apiPages, new Set(), pageTraces, compressedPages, tracedPseudoLayer?.pseudoLayer || {}, { pseudoLayer: {}, pseudoLayerBytes: 0 }, 0, lambdaCompressedByteLimit, []);
43441
+ const initialPageLambdaGroups = await (0, utils_1.getPageLambdaGroups)({
43442
+ entryPath,
43443
+ config,
43444
+ pages: nonApiPages,
43445
+ prerenderRoutes: new Set(),
43446
+ pageTraces,
43447
+ compressedPages,
43448
+ tracedPseudoLayer: tracedPseudoLayer?.pseudoLayer || {},
43449
+ initialPseudoLayer: { pseudoLayer: {}, pseudoLayerBytes: 0 },
43450
+ initialPseudoLayerUncompressed: 0,
43451
+ lambdaCompressedByteLimit,
43452
+ // internal pages are already referenced in traces for serverless
43453
+ // like builds
43454
+ internalPages: [],
43455
+ });
43456
+ const initialApiLambdaGroups = await (0, utils_1.getPageLambdaGroups)({
43457
+ entryPath,
43458
+ config,
43459
+ pages: apiPages,
43460
+ prerenderRoutes: new Set(),
43461
+ pageTraces,
43462
+ compressedPages,
43463
+ tracedPseudoLayer: tracedPseudoLayer?.pseudoLayer || {},
43464
+ initialPseudoLayer: { pseudoLayer: {}, pseudoLayerBytes: 0 },
43465
+ initialPseudoLayerUncompressed: 0,
43466
+ lambdaCompressedByteLimit,
43467
+ internalPages: [],
43468
+ });
45873
43469
  (0, build_utils_1.debug)(JSON.stringify({
45874
43470
  apiLambdaGroups: initialApiLambdaGroups.map(group => ({
45875
43471
  pages: group.pages,
@@ -47036,7 +44632,7 @@ const pretty_bytes_1 = __importDefault(__webpack_require__(539));
47036
44632
  const CORRECT_NOT_FOUND_ROUTES_VERSION = 'v12.0.1';
47037
44633
  const CORRECT_MIDDLEWARE_ORDER_VERSION = 'v12.1.7-canary.29';
47038
44634
  const NEXT_DATA_MIDDLEWARE_RESOLVING_VERSION = 'v12.1.7-canary.33';
47039
- async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs, baseDir, workPath, entryPath, nodeVersion, buildId, escapedBuildId, dynamicPrefix, entryDirectory, outputDirectory, redirects, beforeFilesRewrites, afterFilesRewrites, fallbackRewrites, headers, dataRoutes, hasIsr404Page, imagesManifest, wildcardConfig, routesManifest, staticPages, lambdaPages, nextVersion, canUsePreviewMode, prerenderManifest, omittedPrerenderRoutes, trailingSlashRedirects, isCorrectLocaleAPIRoutes, lambdaCompressedByteLimit, requiredServerFilesManifest, }) {
44635
+ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs, baseDir, workPath, entryPath, nodeVersion, buildId, escapedBuildId, dynamicPrefix, entryDirectory, outputDirectory, redirects, beforeFilesRewrites, afterFilesRewrites, fallbackRewrites, headers, dataRoutes, hasIsr404Page, imagesManifest, wildcardConfig, routesManifest, staticPages, lambdaPages, nextVersion, canUsePreviewMode, trailingSlash, prerenderManifest, omittedPrerenderRoutes, trailingSlashRedirects, isCorrectLocaleAPIRoutes, lambdaCompressedByteLimit, requiredServerFilesManifest, }) {
47040
44636
  const lambdas = {};
47041
44637
  const prerenders = {};
47042
44638
  const lambdaPageKeys = Object.keys(lambdaPages);
@@ -47333,8 +44929,33 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
47333
44929
  return prev;
47334
44930
  }, {}));
47335
44931
  const pageExtensions = requiredServerFilesManifest.config?.pageExtensions;
47336
- const pageLambdaGroups = await (0, utils_1.getPageLambdaGroups)(requiredServerFilesManifest.appDir || entryPath, config, nonApiPages, prerenderRoutes, pageTraces, compressedPages, tracedPseudoLayer.pseudoLayer, initialPseudoLayer, lambdaCompressedByteLimit, uncompressedInitialSize, internalPages, pageExtensions);
47337
- const apiLambdaGroups = await (0, utils_1.getPageLambdaGroups)(requiredServerFilesManifest.appDir || entryPath, config, apiPages, prerenderRoutes, pageTraces, compressedPages, tracedPseudoLayer.pseudoLayer, initialPseudoLayer, uncompressedInitialSize, lambdaCompressedByteLimit, internalPages);
44932
+ const pageLambdaGroups = await (0, utils_1.getPageLambdaGroups)({
44933
+ entryPath: requiredServerFilesManifest.appDir || entryPath,
44934
+ config,
44935
+ pages: nonApiPages,
44936
+ prerenderRoutes,
44937
+ pageTraces,
44938
+ compressedPages,
44939
+ tracedPseudoLayer: tracedPseudoLayer.pseudoLayer,
44940
+ initialPseudoLayer,
44941
+ lambdaCompressedByteLimit,
44942
+ initialPseudoLayerUncompressed: uncompressedInitialSize,
44943
+ internalPages,
44944
+ pageExtensions,
44945
+ });
44946
+ const apiLambdaGroups = await (0, utils_1.getPageLambdaGroups)({
44947
+ entryPath: requiredServerFilesManifest.appDir || entryPath,
44948
+ config,
44949
+ pages: apiPages,
44950
+ prerenderRoutes,
44951
+ pageTraces,
44952
+ compressedPages,
44953
+ tracedPseudoLayer: tracedPseudoLayer.pseudoLayer,
44954
+ initialPseudoLayer,
44955
+ initialPseudoLayerUncompressed: uncompressedInitialSize,
44956
+ lambdaCompressedByteLimit,
44957
+ internalPages,
44958
+ });
47338
44959
  (0, build_utils_1.debug)(JSON.stringify({
47339
44960
  apiLambdaGroups: apiLambdaGroups.map(group => ({
47340
44961
  pages: group.pages,
@@ -47480,7 +45101,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
47480
45101
  // strip _next/data prefix for resolving
47481
45102
  {
47482
45103
  src: `^${path_1.default.join('/', entryDirectory, '/_next/data/', escapedBuildId, '/(.*).json')}`,
47483
- dest: `${path_1.default.join('/', entryDirectory, '/$1')}`,
45104
+ dest: `${path_1.default.join('/', entryDirectory, '/$1', trailingSlash ? '/' : '')}`,
47484
45105
  ...(isOverride ? { override: true } : {}),
47485
45106
  continue: true,
47486
45107
  has: [
@@ -47493,14 +45114,14 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
47493
45114
  // normalize "/index" from "/_next/data/index.json" to -> just "/"
47494
45115
  // as matches a rewrite sources will expect just "/"
47495
45116
  {
47496
- src: path_1.default.join('^/', entryDirectory, '/index'),
45117
+ src: path_1.default.join('^/', entryDirectory, '/index(?:/)?'),
47497
45118
  has: [
47498
45119
  {
47499
45120
  type: 'header',
47500
45121
  key: 'x-nextjs-data',
47501
45122
  },
47502
45123
  ],
47503
- dest: path_1.default.join('/', entryDirectory),
45124
+ dest: path_1.default.join('/', entryDirectory, trailingSlash ? '/' : ''),
47504
45125
  ...(isOverride ? { override: true } : {}),
47505
45126
  continue: true,
47506
45127
  },
@@ -47511,7 +45132,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
47511
45132
  return isNextDataServerResolving
47512
45133
  ? [
47513
45134
  {
47514
- src: path_1.default.join('^/', entryDirectory, '$'),
45135
+ src: path_1.default.join('^/', entryDirectory, trailingSlash ? '/' : '', '$'),
47515
45136
  has: [
47516
45137
  {
47517
45138
  type: 'header',
@@ -47522,7 +45143,6 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
47522
45143
  continue: true,
47523
45144
  ...(isOverride ? { override: true } : {}),
47524
45145
  },
47525
- // handle non-trailing slash
47526
45146
  {
47527
45147
  src: path_1.default.join('^/', entryDirectory, '((?!_next/)(?:.*[^/]|.*))/?$'),
47528
45148
  has: [
@@ -48814,7 +46434,7 @@ exports.addLocaleOrDefault = addLocaleOrDefault;
48814
46434
  exports.MAX_UNCOMPRESSED_LAMBDA_SIZE = 250 * 1000 * 1000; // 250MB
48815
46435
  const LAMBDA_RESERVED_UNCOMPRESSED_SIZE = 2.5 * 1000 * 1000; // 2.5MB
48816
46436
  const LAMBDA_RESERVED_COMPRESSED_SIZE = 250 * 1000; // 250KB
48817
- async function getPageLambdaGroups(entryPath, config, pages, prerenderRoutes, pageTraces, compressedPages, tracedPseudoLayer, initialPseudoLayer, initialPseudoLayerUncompressed, lambdaCompressedByteLimit, internalPages, pageExtensions) {
46437
+ async function getPageLambdaGroups({ entryPath, config, pages, prerenderRoutes, pageTraces, compressedPages, tracedPseudoLayer, initialPseudoLayer, initialPseudoLayerUncompressed, lambdaCompressedByteLimit, internalPages, pageExtensions, }) {
48818
46438
  const groups = [];
48819
46439
  for (const page of pages) {
48820
46440
  const newPages = [...internalPages, page];
@@ -49566,14 +47186,6 @@ module.exports = eval("require")("mock-aws-s3");
49566
47186
  module.exports = eval("require")("nock");
49567
47187
 
49568
47188
 
49569
- /***/ }),
49570
-
49571
- /***/ 772:
49572
- /***/ ((module) => {
49573
-
49574
- "use strict";
49575
- module.exports = JSON.parse("{\"0.1.14\":{\"node_abi\":null,\"v8\":\"1.3\"},\"0.1.15\":{\"node_abi\":null,\"v8\":\"1.3\"},\"0.1.16\":{\"node_abi\":null,\"v8\":\"1.3\"},\"0.1.17\":{\"node_abi\":null,\"v8\":\"1.3\"},\"0.1.18\":{\"node_abi\":null,\"v8\":\"1.3\"},\"0.1.19\":{\"node_abi\":null,\"v8\":\"2.0\"},\"0.1.20\":{\"node_abi\":null,\"v8\":\"2.0\"},\"0.1.21\":{\"node_abi\":null,\"v8\":\"2.0\"},\"0.1.22\":{\"node_abi\":null,\"v8\":\"2.0\"},\"0.1.23\":{\"node_abi\":null,\"v8\":\"2.0\"},\"0.1.24\":{\"node_abi\":null,\"v8\":\"2.0\"},\"0.1.25\":{\"node_abi\":null,\"v8\":\"2.0\"},\"0.1.26\":{\"node_abi\":null,\"v8\":\"2.0\"},\"0.1.27\":{\"node_abi\":null,\"v8\":\"2.1\"},\"0.1.28\":{\"node_abi\":null,\"v8\":\"2.1\"},\"0.1.29\":{\"node_abi\":null,\"v8\":\"2.1\"},\"0.1.30\":{\"node_abi\":null,\"v8\":\"2.1\"},\"0.1.31\":{\"node_abi\":null,\"v8\":\"2.1\"},\"0.1.32\":{\"node_abi\":null,\"v8\":\"2.1\"},\"0.1.33\":{\"node_abi\":null,\"v8\":\"2.1\"},\"0.1.90\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.91\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.92\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.93\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.94\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.95\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.96\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.97\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.98\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.99\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.100\":{\"node_abi\":null,\"v8\":\"2.2\"},\"0.1.101\":{\"node_abi\":null,\"v8\":\"2.3\"},\"0.1.102\":{\"node_abi\":null,\"v8\":\"2.3\"},\"0.1.103\":{\"node_abi\":null,\"v8\":\"2.3\"},\"0.1.104\":{\"node_abi\":null,\"v8\":\"2.3\"},\"0.2.0\":{\"node_abi\":1,\"v8\":\"2.3\"},\"0.2.1\":{\"node_abi\":1,\"v8\":\"2.3\"},\"0.2.2\":{\"node_abi\":1,\"v8\":\"2.3\"},\"0.2.3\":{\"node_abi\":1,\"v8\":\"2.3\"},\"0.2.4\":{\"node_abi\":1,\"v8\":\"2.3\"},\"0.2.5\":{\"node_abi\":1,\"v8\":\"2.3\"},\"0.2.6\":{\"node_abi\":1,\"v8\":\"2.3\"},\"0.3.0\":{\"node_abi\":1,\"v8\":\"2.5\"},\"0.3.1\":{\"node_abi\":1,\"v8\":\"2.5\"},\"0.3.2\":{\"node_abi\":1,\"v8\":\"3.0\"},\"0.3.3\":{\"node_abi\":1,\"v8\":\"3.0\"},\"0.3.4\":{\"node_abi\":1,\"v8\":\"3.0\"},\"0.3.5\":{\"node_abi\":1,\"v8\":\"3.0\"},\"0.3.6\":{\"node_abi\":1,\"v8\":\"3.0\"},\"0.3.7\":{\"node_abi\":1,\"v8\":\"3.0\"},\"0.3.8\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.0\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.1\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.2\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.3\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.4\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.5\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.6\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.7\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.8\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.9\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.10\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.11\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.4.12\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.5.0\":{\"node_abi\":1,\"v8\":\"3.1\"},\"0.5.1\":{\"node_abi\":1,\"v8\":\"3.4\"},\"0.5.2\":{\"node_abi\":1,\"v8\":\"3.4\"},\"0.5.3\":{\"node_abi\":1,\"v8\":\"3.4\"},\"0.5.4\":{\"node_abi\":1,\"v8\":\"3.5\"},\"0.5.5\":{\"node_abi\":1,\"v8\":\"3.5\"},\"0.5.6\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.5.7\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.5.8\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.5.9\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.5.10\":{\"node_abi\":1,\"v8\":\"3.7\"},\"0.6.0\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.1\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.2\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.3\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.4\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.5\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.6\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.7\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.8\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.9\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.10\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.11\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.12\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.13\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.14\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.15\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.16\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.17\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.18\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.19\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.20\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.6.21\":{\"node_abi\":1,\"v8\":\"3.6\"},\"0.7.0\":{\"node_abi\":1,\"v8\":\"3.8\"},\"0.7.1\":{\"node_abi\":1,\"v8\":\"3.8\"},\"0.7.2\":{\"node_abi\":1,\"v8\":\"3.8\"},\"0.7.3\":{\"node_abi\":1,\"v8\":\"3.9\"},\"0.7.4\":{\"node_abi\":1,\"v8\":\"3.9\"},\"0.7.5\":{\"node_abi\":1,\"v8\":\"3.9\"},\"0.7.6\":{\"node_abi\":1,\"v8\":\"3.9\"},\"0.7.7\":{\"node_abi\":1,\"v8\":\"3.9\"},\"0.7.8\":{\"node_abi\":1,\"v8\":\"3.9\"},\"0.7.9\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.7.10\":{\"node_abi\":1,\"v8\":\"3.9\"},\"0.7.11\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.7.12\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.0\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.1\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.2\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.3\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.4\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.5\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.6\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.7\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.8\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.9\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.10\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.11\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.12\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.13\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.14\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.15\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.16\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.17\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.18\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.19\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.20\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.21\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.22\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.23\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.24\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.25\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.26\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.27\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.8.28\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.9.0\":{\"node_abi\":1,\"v8\":\"3.11\"},\"0.9.1\":{\"node_abi\":10,\"v8\":\"3.11\"},\"0.9.2\":{\"node_abi\":10,\"v8\":\"3.11\"},\"0.9.3\":{\"node_abi\":10,\"v8\":\"3.13\"},\"0.9.4\":{\"node_abi\":10,\"v8\":\"3.13\"},\"0.9.5\":{\"node_abi\":10,\"v8\":\"3.13\"},\"0.9.6\":{\"node_abi\":10,\"v8\":\"3.15\"},\"0.9.7\":{\"node_abi\":10,\"v8\":\"3.15\"},\"0.9.8\":{\"node_abi\":10,\"v8\":\"3.15\"},\"0.9.9\":{\"node_abi\":11,\"v8\":\"3.15\"},\"0.9.10\":{\"node_abi\":11,\"v8\":\"3.15\"},\"0.9.11\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.9.12\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.0\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.1\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.2\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.3\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.4\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.5\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.6\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.7\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.8\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.9\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.10\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.11\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.12\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.13\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.14\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.15\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.16\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.17\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.18\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.19\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.20\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.21\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.22\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.23\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.24\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.25\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.26\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.27\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.28\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.29\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.30\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.31\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.32\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.33\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.34\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.35\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.36\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.37\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.38\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.39\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.40\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.41\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.42\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.43\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.44\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.45\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.46\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.47\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.10.48\":{\"node_abi\":11,\"v8\":\"3.14\"},\"0.11.0\":{\"node_abi\":12,\"v8\":\"3.17\"},\"0.11.1\":{\"node_abi\":12,\"v8\":\"3.18\"},\"0.11.2\":{\"node_abi\":12,\"v8\":\"3.19\"},\"0.11.3\":{\"node_abi\":12,\"v8\":\"3.19\"},\"0.11.4\":{\"node_abi\":12,\"v8\":\"3.20\"},\"0.11.5\":{\"node_abi\":12,\"v8\":\"3.20\"},\"0.11.6\":{\"node_abi\":12,\"v8\":\"3.20\"},\"0.11.7\":{\"node_abi\":12,\"v8\":\"3.20\"},\"0.11.8\":{\"node_abi\":13,\"v8\":\"3.21\"},\"0.11.9\":{\"node_abi\":13,\"v8\":\"3.22\"},\"0.11.10\":{\"node_abi\":13,\"v8\":\"3.22\"},\"0.11.11\":{\"node_abi\":14,\"v8\":\"3.22\"},\"0.11.12\":{\"node_abi\":14,\"v8\":\"3.22\"},\"0.11.13\":{\"node_abi\":14,\"v8\":\"3.25\"},\"0.11.14\":{\"node_abi\":14,\"v8\":\"3.26\"},\"0.11.15\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.11.16\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.0\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.1\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.2\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.3\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.4\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.5\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.6\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.7\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.8\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.9\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.10\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.11\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.12\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.13\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.14\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.15\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.16\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.17\":{\"node_abi\":14,\"v8\":\"3.28\"},\"0.12.18\":{\"node_abi\":14,\"v8\":\"3.28\"},\"1.0.0\":{\"node_abi\":42,\"v8\":\"3.31\"},\"1.0.1\":{\"node_abi\":42,\"v8\":\"3.31\"},\"1.0.2\":{\"node_abi\":42,\"v8\":\"3.31\"},\"1.0.3\":{\"node_abi\":42,\"v8\":\"4.1\"},\"1.0.4\":{\"node_abi\":42,\"v8\":\"4.1\"},\"1.1.0\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.2.0\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.3.0\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.4.1\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.4.2\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.4.3\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.5.0\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.5.1\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.6.0\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.6.1\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.6.2\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.6.3\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.6.4\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.7.1\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.8.1\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.8.2\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.8.3\":{\"node_abi\":43,\"v8\":\"4.1\"},\"1.8.4\":{\"node_abi\":43,\"v8\":\"4.1\"},\"2.0.0\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.0.1\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.0.2\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.1.0\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.2.0\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.2.1\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.3.0\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.3.1\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.3.2\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.3.3\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.3.4\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.4.0\":{\"node_abi\":44,\"v8\":\"4.2\"},\"2.5.0\":{\"node_abi\":44,\"v8\":\"4.2\"},\"3.0.0\":{\"node_abi\":45,\"v8\":\"4.4\"},\"3.1.0\":{\"node_abi\":45,\"v8\":\"4.4\"},\"3.2.0\":{\"node_abi\":45,\"v8\":\"4.4\"},\"3.3.0\":{\"node_abi\":45,\"v8\":\"4.4\"},\"3.3.1\":{\"node_abi\":45,\"v8\":\"4.4\"},\"4.0.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.1.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.1.1\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.1.2\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.2.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.2.1\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.2.2\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.2.3\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.2.4\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.2.5\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.2.6\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.3.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.3.1\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.3.2\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.4.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.4.1\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.4.2\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.4.3\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.4.4\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.4.5\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.4.6\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.4.7\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.5.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.6.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.6.1\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.6.2\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.7.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.7.1\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.7.2\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.7.3\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.8.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.8.1\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.8.2\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.8.3\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.8.4\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.8.5\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.8.6\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.8.7\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.9.0\":{\"node_abi\":46,\"v8\":\"4.5\"},\"4.9.1\":{\"node_abi\":46,\"v8\":\"4.5\"},\"5.0.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.1.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.1.1\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.2.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.3.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.4.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.4.1\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.5.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.6.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.7.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.7.1\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.8.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.9.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.9.1\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.10.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.10.1\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.11.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.11.1\":{\"node_abi\":47,\"v8\":\"4.6\"},\"5.12.0\":{\"node_abi\":47,\"v8\":\"4.6\"},\"6.0.0\":{\"node_abi\":48,\"v8\":\"5.0\"},\"6.1.0\":{\"node_abi\":48,\"v8\":\"5.0\"},\"6.2.0\":{\"node_abi\":48,\"v8\":\"5.0\"},\"6.2.1\":{\"node_abi\":48,\"v8\":\"5.0\"},\"6.2.2\":{\"node_abi\":48,\"v8\":\"5.0\"},\"6.3.0\":{\"node_abi\":48,\"v8\":\"5.0\"},\"6.3.1\":{\"node_abi\":48,\"v8\":\"5.0\"},\"6.4.0\":{\"node_abi\":48,\"v8\":\"5.0\"},\"6.5.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.6.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.7.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.8.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.8.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.9.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.9.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.9.2\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.9.3\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.9.4\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.9.5\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.10.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.10.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.10.2\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.10.3\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.11.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.11.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.11.2\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.11.3\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.11.4\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.11.5\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.12.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.12.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.12.2\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.12.3\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.13.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.13.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.14.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.14.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.14.2\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.14.3\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.14.4\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.15.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.15.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.16.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.17.0\":{\"node_abi\":48,\"v8\":\"5.1\"},\"6.17.1\":{\"node_abi\":48,\"v8\":\"5.1\"},\"7.0.0\":{\"node_abi\":51,\"v8\":\"5.4\"},\"7.1.0\":{\"node_abi\":51,\"v8\":\"5.4\"},\"7.2.0\":{\"node_abi\":51,\"v8\":\"5.4\"},\"7.2.1\":{\"node_abi\":51,\"v8\":\"5.4\"},\"7.3.0\":{\"node_abi\":51,\"v8\":\"5.4\"},\"7.4.0\":{\"node_abi\":51,\"v8\":\"5.4\"},\"7.5.0\":{\"node_abi\":51,\"v8\":\"5.4\"},\"7.6.0\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.7.0\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.7.1\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.7.2\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.7.3\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.7.4\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.8.0\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.9.0\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.10.0\":{\"node_abi\":51,\"v8\":\"5.5\"},\"7.10.1\":{\"node_abi\":51,\"v8\":\"5.5\"},\"8.0.0\":{\"node_abi\":57,\"v8\":\"5.8\"},\"8.1.0\":{\"node_abi\":57,\"v8\":\"5.8\"},\"8.1.1\":{\"node_abi\":57,\"v8\":\"5.8\"},\"8.1.2\":{\"node_abi\":57,\"v8\":\"5.8\"},\"8.1.3\":{\"node_abi\":57,\"v8\":\"5.8\"},\"8.1.4\":{\"node_abi\":57,\"v8\":\"5.8\"},\"8.2.0\":{\"node_abi\":57,\"v8\":\"5.8\"},\"8.2.1\":{\"node_abi\":57,\"v8\":\"5.8\"},\"8.3.0\":{\"node_abi\":57,\"v8\":\"6.0\"},\"8.4.0\":{\"node_abi\":57,\"v8\":\"6.0\"},\"8.5.0\":{\"node_abi\":57,\"v8\":\"6.0\"},\"8.6.0\":{\"node_abi\":57,\"v8\":\"6.0\"},\"8.7.0\":{\"node_abi\":57,\"v8\":\"6.1\"},\"8.8.0\":{\"node_abi\":57,\"v8\":\"6.1\"},\"8.8.1\":{\"node_abi\":57,\"v8\":\"6.1\"},\"8.9.0\":{\"node_abi\":57,\"v8\":\"6.1\"},\"8.9.1\":{\"node_abi\":57,\"v8\":\"6.1\"},\"8.9.2\":{\"node_abi\":57,\"v8\":\"6.1\"},\"8.9.3\":{\"node_abi\":57,\"v8\":\"6.1\"},\"8.9.4\":{\"node_abi\":57,\"v8\":\"6.1\"},\"8.10.0\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.11.0\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.11.1\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.11.2\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.11.3\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.11.4\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.12.0\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.13.0\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.14.0\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.14.1\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.15.0\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.15.1\":{\"node_abi\":57,\"v8\":\"6.2\"},\"8.16.0\":{\"node_abi\":57,\"v8\":\"6.2\"},\"9.0.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.1.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.2.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.2.1\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.3.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.4.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.5.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.6.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.6.1\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.7.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.7.1\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.8.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.9.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.10.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.10.1\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.11.0\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.11.1\":{\"node_abi\":59,\"v8\":\"6.2\"},\"9.11.2\":{\"node_abi\":59,\"v8\":\"6.2\"},\"10.0.0\":{\"node_abi\":64,\"v8\":\"6.6\"},\"10.1.0\":{\"node_abi\":64,\"v8\":\"6.6\"},\"10.2.0\":{\"node_abi\":64,\"v8\":\"6.6\"},\"10.2.1\":{\"node_abi\":64,\"v8\":\"6.6\"},\"10.3.0\":{\"node_abi\":64,\"v8\":\"6.6\"},\"10.4.0\":{\"node_abi\":64,\"v8\":\"6.7\"},\"10.4.1\":{\"node_abi\":64,\"v8\":\"6.7\"},\"10.5.0\":{\"node_abi\":64,\"v8\":\"6.7\"},\"10.6.0\":{\"node_abi\":64,\"v8\":\"6.7\"},\"10.7.0\":{\"node_abi\":64,\"v8\":\"6.7\"},\"10.8.0\":{\"node_abi\":64,\"v8\":\"6.7\"},\"10.9.0\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.10.0\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.11.0\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.12.0\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.13.0\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.14.0\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.14.1\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.14.2\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.15.0\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.15.1\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.15.2\":{\"node_abi\":64,\"v8\":\"6.8\"},\"10.15.3\":{\"node_abi\":64,\"v8\":\"6.8\"},\"11.0.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.1.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.2.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.3.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.4.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.5.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.6.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.7.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.8.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.9.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.10.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.10.1\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.11.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.12.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.13.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"11.14.0\":{\"node_abi\":67,\"v8\":\"7.0\"},\"12.0.0\":{\"node_abi\":72,\"v8\":\"7.4\"}}");
49576
-
49577
47189
  /***/ }),
49578
47190
 
49579
47191
  /***/ 3445: