vercel 28.12.8 → 28.13.1
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 +1508 -8
- package/package.json +5 -5
package/dist/index.js
CHANGED
@@ -42800,7 +42800,7 @@ function setup(env) {
|
|
42800
42800
|
createDebug.disable = disable;
|
42801
42801
|
createDebug.enable = enable;
|
42802
42802
|
createDebug.enabled = enabled;
|
42803
|
-
createDebug.humanize = __webpack_require__(
|
42803
|
+
createDebug.humanize = __webpack_require__(82801);
|
42804
42804
|
|
42805
42805
|
Object.keys(env).forEach(key => {
|
42806
42806
|
createDebug[key] = env[key];
|
@@ -116990,7 +116990,7 @@ function fromRegistry (res) {
|
|
116990
116990
|
// version, not on the argument so this can't compute that.
|
116991
116991
|
res.saveSpec = null
|
116992
116992
|
res.fetchSpec = spec
|
116993
|
-
if (!semver) semver = __webpack_require__(
|
116993
|
+
if (!semver) semver = __webpack_require__(58223)
|
116994
116994
|
const version = semver.valid(spec, true)
|
116995
116995
|
const range = semver.validRange(spec, true)
|
116996
116996
|
if (version) {
|
@@ -145064,6 +145064,1496 @@ function coerce(version) {
|
|
145064
145064
|
}
|
145065
145065
|
|
145066
145066
|
|
145067
|
+
/***/ }),
|
145068
|
+
|
145069
|
+
/***/ 58223:
|
145070
|
+
/***/ ((module, exports) => {
|
145071
|
+
|
145072
|
+
exports = module.exports = SemVer
|
145073
|
+
|
145074
|
+
var debug
|
145075
|
+
/* istanbul ignore next */
|
145076
|
+
if (typeof process === 'object' &&
|
145077
|
+
process.env &&
|
145078
|
+
process.env.NODE_DEBUG &&
|
145079
|
+
/\bsemver\b/i.test(process.env.NODE_DEBUG)) {
|
145080
|
+
debug = function () {
|
145081
|
+
var args = Array.prototype.slice.call(arguments, 0)
|
145082
|
+
args.unshift('SEMVER')
|
145083
|
+
console.log.apply(console, args)
|
145084
|
+
}
|
145085
|
+
} else {
|
145086
|
+
debug = function () {}
|
145087
|
+
}
|
145088
|
+
|
145089
|
+
// Note: this is the semver.org version of the spec that it implements
|
145090
|
+
// Not necessarily the package version of this code.
|
145091
|
+
exports.SEMVER_SPEC_VERSION = '2.0.0'
|
145092
|
+
|
145093
|
+
var MAX_LENGTH = 256
|
145094
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
145095
|
+
/* istanbul ignore next */ 9007199254740991
|
145096
|
+
|
145097
|
+
// Max safe segment length for coercion.
|
145098
|
+
var MAX_SAFE_COMPONENT_LENGTH = 16
|
145099
|
+
|
145100
|
+
// The actual regexps go on exports.re
|
145101
|
+
var re = exports.re = []
|
145102
|
+
var src = exports.src = []
|
145103
|
+
var R = 0
|
145104
|
+
|
145105
|
+
// The following Regular Expressions can be used for tokenizing,
|
145106
|
+
// validating, and parsing SemVer version strings.
|
145107
|
+
|
145108
|
+
// ## Numeric Identifier
|
145109
|
+
// A single `0`, or a non-zero digit followed by zero or more digits.
|
145110
|
+
|
145111
|
+
var NUMERICIDENTIFIER = R++
|
145112
|
+
src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'
|
145113
|
+
var NUMERICIDENTIFIERLOOSE = R++
|
145114
|
+
src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'
|
145115
|
+
|
145116
|
+
// ## Non-numeric Identifier
|
145117
|
+
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
145118
|
+
// more letters, digits, or hyphens.
|
145119
|
+
|
145120
|
+
var NONNUMERICIDENTIFIER = R++
|
145121
|
+
src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
|
145122
|
+
|
145123
|
+
// ## Main Version
|
145124
|
+
// Three dot-separated numeric identifiers.
|
145125
|
+
|
145126
|
+
var MAINVERSION = R++
|
145127
|
+
src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
|
145128
|
+
'(' + src[NUMERICIDENTIFIER] + ')\\.' +
|
145129
|
+
'(' + src[NUMERICIDENTIFIER] + ')'
|
145130
|
+
|
145131
|
+
var MAINVERSIONLOOSE = R++
|
145132
|
+
src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
|
145133
|
+
'(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
|
145134
|
+
'(' + src[NUMERICIDENTIFIERLOOSE] + ')'
|
145135
|
+
|
145136
|
+
// ## Pre-release Version Identifier
|
145137
|
+
// A numeric identifier, or a non-numeric identifier.
|
145138
|
+
|
145139
|
+
var PRERELEASEIDENTIFIER = R++
|
145140
|
+
src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
|
145141
|
+
'|' + src[NONNUMERICIDENTIFIER] + ')'
|
145142
|
+
|
145143
|
+
var PRERELEASEIDENTIFIERLOOSE = R++
|
145144
|
+
src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
|
145145
|
+
'|' + src[NONNUMERICIDENTIFIER] + ')'
|
145146
|
+
|
145147
|
+
// ## Pre-release Version
|
145148
|
+
// Hyphen, followed by one or more dot-separated pre-release version
|
145149
|
+
// identifiers.
|
145150
|
+
|
145151
|
+
var PRERELEASE = R++
|
145152
|
+
src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
|
145153
|
+
'(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'
|
145154
|
+
|
145155
|
+
var PRERELEASELOOSE = R++
|
145156
|
+
src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
|
145157
|
+
'(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'
|
145158
|
+
|
145159
|
+
// ## Build Metadata Identifier
|
145160
|
+
// Any combination of digits, letters, or hyphens.
|
145161
|
+
|
145162
|
+
var BUILDIDENTIFIER = R++
|
145163
|
+
src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
|
145164
|
+
|
145165
|
+
// ## Build Metadata
|
145166
|
+
// Plus sign, followed by one or more period-separated build metadata
|
145167
|
+
// identifiers.
|
145168
|
+
|
145169
|
+
var BUILD = R++
|
145170
|
+
src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
|
145171
|
+
'(?:\\.' + src[BUILDIDENTIFIER] + ')*))'
|
145172
|
+
|
145173
|
+
// ## Full Version String
|
145174
|
+
// A main version, followed optionally by a pre-release version and
|
145175
|
+
// build metadata.
|
145176
|
+
|
145177
|
+
// Note that the only major, minor, patch, and pre-release sections of
|
145178
|
+
// the version string are capturing groups. The build metadata is not a
|
145179
|
+
// capturing group, because it should not ever be used in version
|
145180
|
+
// comparison.
|
145181
|
+
|
145182
|
+
var FULL = R++
|
145183
|
+
var FULLPLAIN = 'v?' + src[MAINVERSION] +
|
145184
|
+
src[PRERELEASE] + '?' +
|
145185
|
+
src[BUILD] + '?'
|
145186
|
+
|
145187
|
+
src[FULL] = '^' + FULLPLAIN + '$'
|
145188
|
+
|
145189
|
+
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
145190
|
+
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
145191
|
+
// common in the npm registry.
|
145192
|
+
var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
|
145193
|
+
src[PRERELEASELOOSE] + '?' +
|
145194
|
+
src[BUILD] + '?'
|
145195
|
+
|
145196
|
+
var LOOSE = R++
|
145197
|
+
src[LOOSE] = '^' + LOOSEPLAIN + '$'
|
145198
|
+
|
145199
|
+
var GTLT = R++
|
145200
|
+
src[GTLT] = '((?:<|>)?=?)'
|
145201
|
+
|
145202
|
+
// Something like "2.*" or "1.2.x".
|
145203
|
+
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
145204
|
+
// Only the first item is strictly required.
|
145205
|
+
var XRANGEIDENTIFIERLOOSE = R++
|
145206
|
+
src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
|
145207
|
+
var XRANGEIDENTIFIER = R++
|
145208
|
+
src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'
|
145209
|
+
|
145210
|
+
var XRANGEPLAIN = R++
|
145211
|
+
src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
|
145212
|
+
'(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
|
145213
|
+
'(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
|
145214
|
+
'(?:' + src[PRERELEASE] + ')?' +
|
145215
|
+
src[BUILD] + '?' +
|
145216
|
+
')?)?'
|
145217
|
+
|
145218
|
+
var XRANGEPLAINLOOSE = R++
|
145219
|
+
src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
|
145220
|
+
'(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
|
145221
|
+
'(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
|
145222
|
+
'(?:' + src[PRERELEASELOOSE] + ')?' +
|
145223
|
+
src[BUILD] + '?' +
|
145224
|
+
')?)?'
|
145225
|
+
|
145226
|
+
var XRANGE = R++
|
145227
|
+
src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'
|
145228
|
+
var XRANGELOOSE = R++
|
145229
|
+
src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'
|
145230
|
+
|
145231
|
+
// Coercion.
|
145232
|
+
// Extract anything that could conceivably be a part of a valid semver
|
145233
|
+
var COERCE = R++
|
145234
|
+
src[COERCE] = '(?:^|[^\\d])' +
|
145235
|
+
'(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
|
145236
|
+
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
|
145237
|
+
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
|
145238
|
+
'(?:$|[^\\d])'
|
145239
|
+
|
145240
|
+
// Tilde ranges.
|
145241
|
+
// Meaning is "reasonably at or greater than"
|
145242
|
+
var LONETILDE = R++
|
145243
|
+
src[LONETILDE] = '(?:~>?)'
|
145244
|
+
|
145245
|
+
var TILDETRIM = R++
|
145246
|
+
src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'
|
145247
|
+
re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')
|
145248
|
+
var tildeTrimReplace = '$1~'
|
145249
|
+
|
145250
|
+
var TILDE = R++
|
145251
|
+
src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'
|
145252
|
+
var TILDELOOSE = R++
|
145253
|
+
src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'
|
145254
|
+
|
145255
|
+
// Caret ranges.
|
145256
|
+
// Meaning is "at least and backwards compatible with"
|
145257
|
+
var LONECARET = R++
|
145258
|
+
src[LONECARET] = '(?:\\^)'
|
145259
|
+
|
145260
|
+
var CARETTRIM = R++
|
145261
|
+
src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'
|
145262
|
+
re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')
|
145263
|
+
var caretTrimReplace = '$1^'
|
145264
|
+
|
145265
|
+
var CARET = R++
|
145266
|
+
src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'
|
145267
|
+
var CARETLOOSE = R++
|
145268
|
+
src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'
|
145269
|
+
|
145270
|
+
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
145271
|
+
var COMPARATORLOOSE = R++
|
145272
|
+
src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'
|
145273
|
+
var COMPARATOR = R++
|
145274
|
+
src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'
|
145275
|
+
|
145276
|
+
// An expression to strip any whitespace between the gtlt and the thing
|
145277
|
+
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
145278
|
+
var COMPARATORTRIM = R++
|
145279
|
+
src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
|
145280
|
+
'\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'
|
145281
|
+
|
145282
|
+
// this one has to use the /g flag
|
145283
|
+
re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')
|
145284
|
+
var comparatorTrimReplace = '$1$2$3'
|
145285
|
+
|
145286
|
+
// Something like `1.2.3 - 1.2.4`
|
145287
|
+
// Note that these all use the loose form, because they'll be
|
145288
|
+
// checked against either the strict or loose comparator form
|
145289
|
+
// later.
|
145290
|
+
var HYPHENRANGE = R++
|
145291
|
+
src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
|
145292
|
+
'\\s+-\\s+' +
|
145293
|
+
'(' + src[XRANGEPLAIN] + ')' +
|
145294
|
+
'\\s*$'
|
145295
|
+
|
145296
|
+
var HYPHENRANGELOOSE = R++
|
145297
|
+
src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
|
145298
|
+
'\\s+-\\s+' +
|
145299
|
+
'(' + src[XRANGEPLAINLOOSE] + ')' +
|
145300
|
+
'\\s*$'
|
145301
|
+
|
145302
|
+
// Star ranges basically just allow anything at all.
|
145303
|
+
var STAR = R++
|
145304
|
+
src[STAR] = '(<|>)?=?\\s*\\*'
|
145305
|
+
|
145306
|
+
// Compile to actual regexp objects.
|
145307
|
+
// All are flag-free, unless they were created above with a flag.
|
145308
|
+
for (var i = 0; i < R; i++) {
|
145309
|
+
debug(i, src[i])
|
145310
|
+
if (!re[i]) {
|
145311
|
+
re[i] = new RegExp(src[i])
|
145312
|
+
}
|
145313
|
+
}
|
145314
|
+
|
145315
|
+
exports.parse = parse
|
145316
|
+
function parse (version, options) {
|
145317
|
+
if (!options || typeof options !== 'object') {
|
145318
|
+
options = {
|
145319
|
+
loose: !!options,
|
145320
|
+
includePrerelease: false
|
145321
|
+
}
|
145322
|
+
}
|
145323
|
+
|
145324
|
+
if (version instanceof SemVer) {
|
145325
|
+
return version
|
145326
|
+
}
|
145327
|
+
|
145328
|
+
if (typeof version !== 'string') {
|
145329
|
+
return null
|
145330
|
+
}
|
145331
|
+
|
145332
|
+
if (version.length > MAX_LENGTH) {
|
145333
|
+
return null
|
145334
|
+
}
|
145335
|
+
|
145336
|
+
var r = options.loose ? re[LOOSE] : re[FULL]
|
145337
|
+
if (!r.test(version)) {
|
145338
|
+
return null
|
145339
|
+
}
|
145340
|
+
|
145341
|
+
try {
|
145342
|
+
return new SemVer(version, options)
|
145343
|
+
} catch (er) {
|
145344
|
+
return null
|
145345
|
+
}
|
145346
|
+
}
|
145347
|
+
|
145348
|
+
exports.valid = valid
|
145349
|
+
function valid (version, options) {
|
145350
|
+
var v = parse(version, options)
|
145351
|
+
return v ? v.version : null
|
145352
|
+
}
|
145353
|
+
|
145354
|
+
exports.clean = clean
|
145355
|
+
function clean (version, options) {
|
145356
|
+
var s = parse(version.trim().replace(/^[=v]+/, ''), options)
|
145357
|
+
return s ? s.version : null
|
145358
|
+
}
|
145359
|
+
|
145360
|
+
exports.SemVer = SemVer
|
145361
|
+
|
145362
|
+
function SemVer (version, options) {
|
145363
|
+
if (!options || typeof options !== 'object') {
|
145364
|
+
options = {
|
145365
|
+
loose: !!options,
|
145366
|
+
includePrerelease: false
|
145367
|
+
}
|
145368
|
+
}
|
145369
|
+
if (version instanceof SemVer) {
|
145370
|
+
if (version.loose === options.loose) {
|
145371
|
+
return version
|
145372
|
+
} else {
|
145373
|
+
version = version.version
|
145374
|
+
}
|
145375
|
+
} else if (typeof version !== 'string') {
|
145376
|
+
throw new TypeError('Invalid Version: ' + version)
|
145377
|
+
}
|
145378
|
+
|
145379
|
+
if (version.length > MAX_LENGTH) {
|
145380
|
+
throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
|
145381
|
+
}
|
145382
|
+
|
145383
|
+
if (!(this instanceof SemVer)) {
|
145384
|
+
return new SemVer(version, options)
|
145385
|
+
}
|
145386
|
+
|
145387
|
+
debug('SemVer', version, options)
|
145388
|
+
this.options = options
|
145389
|
+
this.loose = !!options.loose
|
145390
|
+
|
145391
|
+
var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL])
|
145392
|
+
|
145393
|
+
if (!m) {
|
145394
|
+
throw new TypeError('Invalid Version: ' + version)
|
145395
|
+
}
|
145396
|
+
|
145397
|
+
this.raw = version
|
145398
|
+
|
145399
|
+
// these are actually numbers
|
145400
|
+
this.major = +m[1]
|
145401
|
+
this.minor = +m[2]
|
145402
|
+
this.patch = +m[3]
|
145403
|
+
|
145404
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
145405
|
+
throw new TypeError('Invalid major version')
|
145406
|
+
}
|
145407
|
+
|
145408
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
145409
|
+
throw new TypeError('Invalid minor version')
|
145410
|
+
}
|
145411
|
+
|
145412
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
145413
|
+
throw new TypeError('Invalid patch version')
|
145414
|
+
}
|
145415
|
+
|
145416
|
+
// numberify any prerelease numeric ids
|
145417
|
+
if (!m[4]) {
|
145418
|
+
this.prerelease = []
|
145419
|
+
} else {
|
145420
|
+
this.prerelease = m[4].split('.').map(function (id) {
|
145421
|
+
if (/^[0-9]+$/.test(id)) {
|
145422
|
+
var num = +id
|
145423
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
145424
|
+
return num
|
145425
|
+
}
|
145426
|
+
}
|
145427
|
+
return id
|
145428
|
+
})
|
145429
|
+
}
|
145430
|
+
|
145431
|
+
this.build = m[5] ? m[5].split('.') : []
|
145432
|
+
this.format()
|
145433
|
+
}
|
145434
|
+
|
145435
|
+
SemVer.prototype.format = function () {
|
145436
|
+
this.version = this.major + '.' + this.minor + '.' + this.patch
|
145437
|
+
if (this.prerelease.length) {
|
145438
|
+
this.version += '-' + this.prerelease.join('.')
|
145439
|
+
}
|
145440
|
+
return this.version
|
145441
|
+
}
|
145442
|
+
|
145443
|
+
SemVer.prototype.toString = function () {
|
145444
|
+
return this.version
|
145445
|
+
}
|
145446
|
+
|
145447
|
+
SemVer.prototype.compare = function (other) {
|
145448
|
+
debug('SemVer.compare', this.version, this.options, other)
|
145449
|
+
if (!(other instanceof SemVer)) {
|
145450
|
+
other = new SemVer(other, this.options)
|
145451
|
+
}
|
145452
|
+
|
145453
|
+
return this.compareMain(other) || this.comparePre(other)
|
145454
|
+
}
|
145455
|
+
|
145456
|
+
SemVer.prototype.compareMain = function (other) {
|
145457
|
+
if (!(other instanceof SemVer)) {
|
145458
|
+
other = new SemVer(other, this.options)
|
145459
|
+
}
|
145460
|
+
|
145461
|
+
return compareIdentifiers(this.major, other.major) ||
|
145462
|
+
compareIdentifiers(this.minor, other.minor) ||
|
145463
|
+
compareIdentifiers(this.patch, other.patch)
|
145464
|
+
}
|
145465
|
+
|
145466
|
+
SemVer.prototype.comparePre = function (other) {
|
145467
|
+
if (!(other instanceof SemVer)) {
|
145468
|
+
other = new SemVer(other, this.options)
|
145469
|
+
}
|
145470
|
+
|
145471
|
+
// NOT having a prerelease is > having one
|
145472
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
145473
|
+
return -1
|
145474
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
145475
|
+
return 1
|
145476
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
145477
|
+
return 0
|
145478
|
+
}
|
145479
|
+
|
145480
|
+
var i = 0
|
145481
|
+
do {
|
145482
|
+
var a = this.prerelease[i]
|
145483
|
+
var b = other.prerelease[i]
|
145484
|
+
debug('prerelease compare', i, a, b)
|
145485
|
+
if (a === undefined && b === undefined) {
|
145486
|
+
return 0
|
145487
|
+
} else if (b === undefined) {
|
145488
|
+
return 1
|
145489
|
+
} else if (a === undefined) {
|
145490
|
+
return -1
|
145491
|
+
} else if (a === b) {
|
145492
|
+
continue
|
145493
|
+
} else {
|
145494
|
+
return compareIdentifiers(a, b)
|
145495
|
+
}
|
145496
|
+
} while (++i)
|
145497
|
+
}
|
145498
|
+
|
145499
|
+
// preminor will bump the version up to the next minor release, and immediately
|
145500
|
+
// down to pre-release. premajor and prepatch work the same way.
|
145501
|
+
SemVer.prototype.inc = function (release, identifier) {
|
145502
|
+
switch (release) {
|
145503
|
+
case 'premajor':
|
145504
|
+
this.prerelease.length = 0
|
145505
|
+
this.patch = 0
|
145506
|
+
this.minor = 0
|
145507
|
+
this.major++
|
145508
|
+
this.inc('pre', identifier)
|
145509
|
+
break
|
145510
|
+
case 'preminor':
|
145511
|
+
this.prerelease.length = 0
|
145512
|
+
this.patch = 0
|
145513
|
+
this.minor++
|
145514
|
+
this.inc('pre', identifier)
|
145515
|
+
break
|
145516
|
+
case 'prepatch':
|
145517
|
+
// If this is already a prerelease, it will bump to the next version
|
145518
|
+
// drop any prereleases that might already exist, since they are not
|
145519
|
+
// relevant at this point.
|
145520
|
+
this.prerelease.length = 0
|
145521
|
+
this.inc('patch', identifier)
|
145522
|
+
this.inc('pre', identifier)
|
145523
|
+
break
|
145524
|
+
// If the input is a non-prerelease version, this acts the same as
|
145525
|
+
// prepatch.
|
145526
|
+
case 'prerelease':
|
145527
|
+
if (this.prerelease.length === 0) {
|
145528
|
+
this.inc('patch', identifier)
|
145529
|
+
}
|
145530
|
+
this.inc('pre', identifier)
|
145531
|
+
break
|
145532
|
+
|
145533
|
+
case 'major':
|
145534
|
+
// If this is a pre-major version, bump up to the same major version.
|
145535
|
+
// Otherwise increment major.
|
145536
|
+
// 1.0.0-5 bumps to 1.0.0
|
145537
|
+
// 1.1.0 bumps to 2.0.0
|
145538
|
+
if (this.minor !== 0 ||
|
145539
|
+
this.patch !== 0 ||
|
145540
|
+
this.prerelease.length === 0) {
|
145541
|
+
this.major++
|
145542
|
+
}
|
145543
|
+
this.minor = 0
|
145544
|
+
this.patch = 0
|
145545
|
+
this.prerelease = []
|
145546
|
+
break
|
145547
|
+
case 'minor':
|
145548
|
+
// If this is a pre-minor version, bump up to the same minor version.
|
145549
|
+
// Otherwise increment minor.
|
145550
|
+
// 1.2.0-5 bumps to 1.2.0
|
145551
|
+
// 1.2.1 bumps to 1.3.0
|
145552
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
145553
|
+
this.minor++
|
145554
|
+
}
|
145555
|
+
this.patch = 0
|
145556
|
+
this.prerelease = []
|
145557
|
+
break
|
145558
|
+
case 'patch':
|
145559
|
+
// If this is not a pre-release version, it will increment the patch.
|
145560
|
+
// If it is a pre-release it will bump up to the same patch version.
|
145561
|
+
// 1.2.0-5 patches to 1.2.0
|
145562
|
+
// 1.2.0 patches to 1.2.1
|
145563
|
+
if (this.prerelease.length === 0) {
|
145564
|
+
this.patch++
|
145565
|
+
}
|
145566
|
+
this.prerelease = []
|
145567
|
+
break
|
145568
|
+
// This probably shouldn't be used publicly.
|
145569
|
+
// 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
|
145570
|
+
case 'pre':
|
145571
|
+
if (this.prerelease.length === 0) {
|
145572
|
+
this.prerelease = [0]
|
145573
|
+
} else {
|
145574
|
+
var i = this.prerelease.length
|
145575
|
+
while (--i >= 0) {
|
145576
|
+
if (typeof this.prerelease[i] === 'number') {
|
145577
|
+
this.prerelease[i]++
|
145578
|
+
i = -2
|
145579
|
+
}
|
145580
|
+
}
|
145581
|
+
if (i === -1) {
|
145582
|
+
// didn't increment anything
|
145583
|
+
this.prerelease.push(0)
|
145584
|
+
}
|
145585
|
+
}
|
145586
|
+
if (identifier) {
|
145587
|
+
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
|
145588
|
+
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
|
145589
|
+
if (this.prerelease[0] === identifier) {
|
145590
|
+
if (isNaN(this.prerelease[1])) {
|
145591
|
+
this.prerelease = [identifier, 0]
|
145592
|
+
}
|
145593
|
+
} else {
|
145594
|
+
this.prerelease = [identifier, 0]
|
145595
|
+
}
|
145596
|
+
}
|
145597
|
+
break
|
145598
|
+
|
145599
|
+
default:
|
145600
|
+
throw new Error('invalid increment argument: ' + release)
|
145601
|
+
}
|
145602
|
+
this.format()
|
145603
|
+
this.raw = this.version
|
145604
|
+
return this
|
145605
|
+
}
|
145606
|
+
|
145607
|
+
exports.inc = inc
|
145608
|
+
function inc (version, release, loose, identifier) {
|
145609
|
+
if (typeof (loose) === 'string') {
|
145610
|
+
identifier = loose
|
145611
|
+
loose = undefined
|
145612
|
+
}
|
145613
|
+
|
145614
|
+
try {
|
145615
|
+
return new SemVer(version, loose).inc(release, identifier).version
|
145616
|
+
} catch (er) {
|
145617
|
+
return null
|
145618
|
+
}
|
145619
|
+
}
|
145620
|
+
|
145621
|
+
exports.diff = diff
|
145622
|
+
function diff (version1, version2) {
|
145623
|
+
if (eq(version1, version2)) {
|
145624
|
+
return null
|
145625
|
+
} else {
|
145626
|
+
var v1 = parse(version1)
|
145627
|
+
var v2 = parse(version2)
|
145628
|
+
var prefix = ''
|
145629
|
+
if (v1.prerelease.length || v2.prerelease.length) {
|
145630
|
+
prefix = 'pre'
|
145631
|
+
var defaultResult = 'prerelease'
|
145632
|
+
}
|
145633
|
+
for (var key in v1) {
|
145634
|
+
if (key === 'major' || key === 'minor' || key === 'patch') {
|
145635
|
+
if (v1[key] !== v2[key]) {
|
145636
|
+
return prefix + key
|
145637
|
+
}
|
145638
|
+
}
|
145639
|
+
}
|
145640
|
+
return defaultResult // may be undefined
|
145641
|
+
}
|
145642
|
+
}
|
145643
|
+
|
145644
|
+
exports.compareIdentifiers = compareIdentifiers
|
145645
|
+
|
145646
|
+
var numeric = /^[0-9]+$/
|
145647
|
+
function compareIdentifiers (a, b) {
|
145648
|
+
var anum = numeric.test(a)
|
145649
|
+
var bnum = numeric.test(b)
|
145650
|
+
|
145651
|
+
if (anum && bnum) {
|
145652
|
+
a = +a
|
145653
|
+
b = +b
|
145654
|
+
}
|
145655
|
+
|
145656
|
+
return a === b ? 0
|
145657
|
+
: (anum && !bnum) ? -1
|
145658
|
+
: (bnum && !anum) ? 1
|
145659
|
+
: a < b ? -1
|
145660
|
+
: 1
|
145661
|
+
}
|
145662
|
+
|
145663
|
+
exports.rcompareIdentifiers = rcompareIdentifiers
|
145664
|
+
function rcompareIdentifiers (a, b) {
|
145665
|
+
return compareIdentifiers(b, a)
|
145666
|
+
}
|
145667
|
+
|
145668
|
+
exports.major = major
|
145669
|
+
function major (a, loose) {
|
145670
|
+
return new SemVer(a, loose).major
|
145671
|
+
}
|
145672
|
+
|
145673
|
+
exports.minor = minor
|
145674
|
+
function minor (a, loose) {
|
145675
|
+
return new SemVer(a, loose).minor
|
145676
|
+
}
|
145677
|
+
|
145678
|
+
exports.patch = patch
|
145679
|
+
function patch (a, loose) {
|
145680
|
+
return new SemVer(a, loose).patch
|
145681
|
+
}
|
145682
|
+
|
145683
|
+
exports.compare = compare
|
145684
|
+
function compare (a, b, loose) {
|
145685
|
+
return new SemVer(a, loose).compare(new SemVer(b, loose))
|
145686
|
+
}
|
145687
|
+
|
145688
|
+
exports.compareLoose = compareLoose
|
145689
|
+
function compareLoose (a, b) {
|
145690
|
+
return compare(a, b, true)
|
145691
|
+
}
|
145692
|
+
|
145693
|
+
exports.rcompare = rcompare
|
145694
|
+
function rcompare (a, b, loose) {
|
145695
|
+
return compare(b, a, loose)
|
145696
|
+
}
|
145697
|
+
|
145698
|
+
exports.sort = sort
|
145699
|
+
function sort (list, loose) {
|
145700
|
+
return list.sort(function (a, b) {
|
145701
|
+
return exports.compare(a, b, loose)
|
145702
|
+
})
|
145703
|
+
}
|
145704
|
+
|
145705
|
+
exports.rsort = rsort
|
145706
|
+
function rsort (list, loose) {
|
145707
|
+
return list.sort(function (a, b) {
|
145708
|
+
return exports.rcompare(a, b, loose)
|
145709
|
+
})
|
145710
|
+
}
|
145711
|
+
|
145712
|
+
exports.gt = gt
|
145713
|
+
function gt (a, b, loose) {
|
145714
|
+
return compare(a, b, loose) > 0
|
145715
|
+
}
|
145716
|
+
|
145717
|
+
exports.lt = lt
|
145718
|
+
function lt (a, b, loose) {
|
145719
|
+
return compare(a, b, loose) < 0
|
145720
|
+
}
|
145721
|
+
|
145722
|
+
exports.eq = eq
|
145723
|
+
function eq (a, b, loose) {
|
145724
|
+
return compare(a, b, loose) === 0
|
145725
|
+
}
|
145726
|
+
|
145727
|
+
exports.neq = neq
|
145728
|
+
function neq (a, b, loose) {
|
145729
|
+
return compare(a, b, loose) !== 0
|
145730
|
+
}
|
145731
|
+
|
145732
|
+
exports.gte = gte
|
145733
|
+
function gte (a, b, loose) {
|
145734
|
+
return compare(a, b, loose) >= 0
|
145735
|
+
}
|
145736
|
+
|
145737
|
+
exports.lte = lte
|
145738
|
+
function lte (a, b, loose) {
|
145739
|
+
return compare(a, b, loose) <= 0
|
145740
|
+
}
|
145741
|
+
|
145742
|
+
exports.cmp = cmp
|
145743
|
+
function cmp (a, op, b, loose) {
|
145744
|
+
switch (op) {
|
145745
|
+
case '===':
|
145746
|
+
if (typeof a === 'object')
|
145747
|
+
a = a.version
|
145748
|
+
if (typeof b === 'object')
|
145749
|
+
b = b.version
|
145750
|
+
return a === b
|
145751
|
+
|
145752
|
+
case '!==':
|
145753
|
+
if (typeof a === 'object')
|
145754
|
+
a = a.version
|
145755
|
+
if (typeof b === 'object')
|
145756
|
+
b = b.version
|
145757
|
+
return a !== b
|
145758
|
+
|
145759
|
+
case '':
|
145760
|
+
case '=':
|
145761
|
+
case '==':
|
145762
|
+
return eq(a, b, loose)
|
145763
|
+
|
145764
|
+
case '!=':
|
145765
|
+
return neq(a, b, loose)
|
145766
|
+
|
145767
|
+
case '>':
|
145768
|
+
return gt(a, b, loose)
|
145769
|
+
|
145770
|
+
case '>=':
|
145771
|
+
return gte(a, b, loose)
|
145772
|
+
|
145773
|
+
case '<':
|
145774
|
+
return lt(a, b, loose)
|
145775
|
+
|
145776
|
+
case '<=':
|
145777
|
+
return lte(a, b, loose)
|
145778
|
+
|
145779
|
+
default:
|
145780
|
+
throw new TypeError('Invalid operator: ' + op)
|
145781
|
+
}
|
145782
|
+
}
|
145783
|
+
|
145784
|
+
exports.Comparator = Comparator
|
145785
|
+
function Comparator (comp, options) {
|
145786
|
+
if (!options || typeof options !== 'object') {
|
145787
|
+
options = {
|
145788
|
+
loose: !!options,
|
145789
|
+
includePrerelease: false
|
145790
|
+
}
|
145791
|
+
}
|
145792
|
+
|
145793
|
+
if (comp instanceof Comparator) {
|
145794
|
+
if (comp.loose === !!options.loose) {
|
145795
|
+
return comp
|
145796
|
+
} else {
|
145797
|
+
comp = comp.value
|
145798
|
+
}
|
145799
|
+
}
|
145800
|
+
|
145801
|
+
if (!(this instanceof Comparator)) {
|
145802
|
+
return new Comparator(comp, options)
|
145803
|
+
}
|
145804
|
+
|
145805
|
+
debug('comparator', comp, options)
|
145806
|
+
this.options = options
|
145807
|
+
this.loose = !!options.loose
|
145808
|
+
this.parse(comp)
|
145809
|
+
|
145810
|
+
if (this.semver === ANY) {
|
145811
|
+
this.value = ''
|
145812
|
+
} else {
|
145813
|
+
this.value = this.operator + this.semver.version
|
145814
|
+
}
|
145815
|
+
|
145816
|
+
debug('comp', this)
|
145817
|
+
}
|
145818
|
+
|
145819
|
+
var ANY = {}
|
145820
|
+
Comparator.prototype.parse = function (comp) {
|
145821
|
+
var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
|
145822
|
+
var m = comp.match(r)
|
145823
|
+
|
145824
|
+
if (!m) {
|
145825
|
+
throw new TypeError('Invalid comparator: ' + comp)
|
145826
|
+
}
|
145827
|
+
|
145828
|
+
this.operator = m[1]
|
145829
|
+
if (this.operator === '=') {
|
145830
|
+
this.operator = ''
|
145831
|
+
}
|
145832
|
+
|
145833
|
+
// if it literally is just '>' or '' then allow anything.
|
145834
|
+
if (!m[2]) {
|
145835
|
+
this.semver = ANY
|
145836
|
+
} else {
|
145837
|
+
this.semver = new SemVer(m[2], this.options.loose)
|
145838
|
+
}
|
145839
|
+
}
|
145840
|
+
|
145841
|
+
Comparator.prototype.toString = function () {
|
145842
|
+
return this.value
|
145843
|
+
}
|
145844
|
+
|
145845
|
+
Comparator.prototype.test = function (version) {
|
145846
|
+
debug('Comparator.test', version, this.options.loose)
|
145847
|
+
|
145848
|
+
if (this.semver === ANY) {
|
145849
|
+
return true
|
145850
|
+
}
|
145851
|
+
|
145852
|
+
if (typeof version === 'string') {
|
145853
|
+
version = new SemVer(version, this.options)
|
145854
|
+
}
|
145855
|
+
|
145856
|
+
return cmp(version, this.operator, this.semver, this.options)
|
145857
|
+
}
|
145858
|
+
|
145859
|
+
Comparator.prototype.intersects = function (comp, options) {
|
145860
|
+
if (!(comp instanceof Comparator)) {
|
145861
|
+
throw new TypeError('a Comparator is required')
|
145862
|
+
}
|
145863
|
+
|
145864
|
+
if (!options || typeof options !== 'object') {
|
145865
|
+
options = {
|
145866
|
+
loose: !!options,
|
145867
|
+
includePrerelease: false
|
145868
|
+
}
|
145869
|
+
}
|
145870
|
+
|
145871
|
+
var rangeTmp
|
145872
|
+
|
145873
|
+
if (this.operator === '') {
|
145874
|
+
rangeTmp = new Range(comp.value, options)
|
145875
|
+
return satisfies(this.value, rangeTmp, options)
|
145876
|
+
} else if (comp.operator === '') {
|
145877
|
+
rangeTmp = new Range(this.value, options)
|
145878
|
+
return satisfies(comp.semver, rangeTmp, options)
|
145879
|
+
}
|
145880
|
+
|
145881
|
+
var sameDirectionIncreasing =
|
145882
|
+
(this.operator === '>=' || this.operator === '>') &&
|
145883
|
+
(comp.operator === '>=' || comp.operator === '>')
|
145884
|
+
var sameDirectionDecreasing =
|
145885
|
+
(this.operator === '<=' || this.operator === '<') &&
|
145886
|
+
(comp.operator === '<=' || comp.operator === '<')
|
145887
|
+
var sameSemVer = this.semver.version === comp.semver.version
|
145888
|
+
var differentDirectionsInclusive =
|
145889
|
+
(this.operator === '>=' || this.operator === '<=') &&
|
145890
|
+
(comp.operator === '>=' || comp.operator === '<=')
|
145891
|
+
var oppositeDirectionsLessThan =
|
145892
|
+
cmp(this.semver, '<', comp.semver, options) &&
|
145893
|
+
((this.operator === '>=' || this.operator === '>') &&
|
145894
|
+
(comp.operator === '<=' || comp.operator === '<'))
|
145895
|
+
var oppositeDirectionsGreaterThan =
|
145896
|
+
cmp(this.semver, '>', comp.semver, options) &&
|
145897
|
+
((this.operator === '<=' || this.operator === '<') &&
|
145898
|
+
(comp.operator === '>=' || comp.operator === '>'))
|
145899
|
+
|
145900
|
+
return sameDirectionIncreasing || sameDirectionDecreasing ||
|
145901
|
+
(sameSemVer && differentDirectionsInclusive) ||
|
145902
|
+
oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
|
145903
|
+
}
|
145904
|
+
|
145905
|
+
exports.Range = Range
|
145906
|
+
function Range (range, options) {
|
145907
|
+
if (!options || typeof options !== 'object') {
|
145908
|
+
options = {
|
145909
|
+
loose: !!options,
|
145910
|
+
includePrerelease: false
|
145911
|
+
}
|
145912
|
+
}
|
145913
|
+
|
145914
|
+
if (range instanceof Range) {
|
145915
|
+
if (range.loose === !!options.loose &&
|
145916
|
+
range.includePrerelease === !!options.includePrerelease) {
|
145917
|
+
return range
|
145918
|
+
} else {
|
145919
|
+
return new Range(range.raw, options)
|
145920
|
+
}
|
145921
|
+
}
|
145922
|
+
|
145923
|
+
if (range instanceof Comparator) {
|
145924
|
+
return new Range(range.value, options)
|
145925
|
+
}
|
145926
|
+
|
145927
|
+
if (!(this instanceof Range)) {
|
145928
|
+
return new Range(range, options)
|
145929
|
+
}
|
145930
|
+
|
145931
|
+
this.options = options
|
145932
|
+
this.loose = !!options.loose
|
145933
|
+
this.includePrerelease = !!options.includePrerelease
|
145934
|
+
|
145935
|
+
// First, split based on boolean or ||
|
145936
|
+
this.raw = range
|
145937
|
+
this.set = range.split(/\s*\|\|\s*/).map(function (range) {
|
145938
|
+
return this.parseRange(range.trim())
|
145939
|
+
}, this).filter(function (c) {
|
145940
|
+
// throw out any that are not relevant for whatever reason
|
145941
|
+
return c.length
|
145942
|
+
})
|
145943
|
+
|
145944
|
+
if (!this.set.length) {
|
145945
|
+
throw new TypeError('Invalid SemVer Range: ' + range)
|
145946
|
+
}
|
145947
|
+
|
145948
|
+
this.format()
|
145949
|
+
}
|
145950
|
+
|
145951
|
+
Range.prototype.format = function () {
|
145952
|
+
this.range = this.set.map(function (comps) {
|
145953
|
+
return comps.join(' ').trim()
|
145954
|
+
}).join('||').trim()
|
145955
|
+
return this.range
|
145956
|
+
}
|
145957
|
+
|
145958
|
+
Range.prototype.toString = function () {
|
145959
|
+
return this.range
|
145960
|
+
}
|
145961
|
+
|
145962
|
+
Range.prototype.parseRange = function (range) {
|
145963
|
+
var loose = this.options.loose
|
145964
|
+
range = range.trim()
|
145965
|
+
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
145966
|
+
var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]
|
145967
|
+
range = range.replace(hr, hyphenReplace)
|
145968
|
+
debug('hyphen replace', range)
|
145969
|
+
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
145970
|
+
range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace)
|
145971
|
+
debug('comparator trim', range, re[COMPARATORTRIM])
|
145972
|
+
|
145973
|
+
// `~ 1.2.3` => `~1.2.3`
|
145974
|
+
range = range.replace(re[TILDETRIM], tildeTrimReplace)
|
145975
|
+
|
145976
|
+
// `^ 1.2.3` => `^1.2.3`
|
145977
|
+
range = range.replace(re[CARETTRIM], caretTrimReplace)
|
145978
|
+
|
145979
|
+
// normalize spaces
|
145980
|
+
range = range.split(/\s+/).join(' ')
|
145981
|
+
|
145982
|
+
// At this point, the range is completely trimmed and
|
145983
|
+
// ready to be split into comparators.
|
145984
|
+
|
145985
|
+
var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
|
145986
|
+
var set = range.split(' ').map(function (comp) {
|
145987
|
+
return parseComparator(comp, this.options)
|
145988
|
+
}, this).join(' ').split(/\s+/)
|
145989
|
+
if (this.options.loose) {
|
145990
|
+
// in loose mode, throw out any that are not valid comparators
|
145991
|
+
set = set.filter(function (comp) {
|
145992
|
+
return !!comp.match(compRe)
|
145993
|
+
})
|
145994
|
+
}
|
145995
|
+
set = set.map(function (comp) {
|
145996
|
+
return new Comparator(comp, this.options)
|
145997
|
+
}, this)
|
145998
|
+
|
145999
|
+
return set
|
146000
|
+
}
|
146001
|
+
|
146002
|
+
Range.prototype.intersects = function (range, options) {
|
146003
|
+
if (!(range instanceof Range)) {
|
146004
|
+
throw new TypeError('a Range is required')
|
146005
|
+
}
|
146006
|
+
|
146007
|
+
return this.set.some(function (thisComparators) {
|
146008
|
+
return thisComparators.every(function (thisComparator) {
|
146009
|
+
return range.set.some(function (rangeComparators) {
|
146010
|
+
return rangeComparators.every(function (rangeComparator) {
|
146011
|
+
return thisComparator.intersects(rangeComparator, options)
|
146012
|
+
})
|
146013
|
+
})
|
146014
|
+
})
|
146015
|
+
})
|
146016
|
+
}
|
146017
|
+
|
146018
|
+
// Mostly just for testing and legacy API reasons
|
146019
|
+
exports.toComparators = toComparators
|
146020
|
+
function toComparators (range, options) {
|
146021
|
+
return new Range(range, options).set.map(function (comp) {
|
146022
|
+
return comp.map(function (c) {
|
146023
|
+
return c.value
|
146024
|
+
}).join(' ').trim().split(' ')
|
146025
|
+
})
|
146026
|
+
}
|
146027
|
+
|
146028
|
+
// comprised of xranges, tildes, stars, and gtlt's at this point.
|
146029
|
+
// already replaced the hyphen ranges
|
146030
|
+
// turn into a set of JUST comparators.
|
146031
|
+
function parseComparator (comp, options) {
|
146032
|
+
debug('comp', comp, options)
|
146033
|
+
comp = replaceCarets(comp, options)
|
146034
|
+
debug('caret', comp)
|
146035
|
+
comp = replaceTildes(comp, options)
|
146036
|
+
debug('tildes', comp)
|
146037
|
+
comp = replaceXRanges(comp, options)
|
146038
|
+
debug('xrange', comp)
|
146039
|
+
comp = replaceStars(comp, options)
|
146040
|
+
debug('stars', comp)
|
146041
|
+
return comp
|
146042
|
+
}
|
146043
|
+
|
146044
|
+
function isX (id) {
|
146045
|
+
return !id || id.toLowerCase() === 'x' || id === '*'
|
146046
|
+
}
|
146047
|
+
|
146048
|
+
// ~, ~> --> * (any, kinda silly)
|
146049
|
+
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
|
146050
|
+
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
|
146051
|
+
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
|
146052
|
+
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
|
146053
|
+
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
|
146054
|
+
function replaceTildes (comp, options) {
|
146055
|
+
return comp.trim().split(/\s+/).map(function (comp) {
|
146056
|
+
return replaceTilde(comp, options)
|
146057
|
+
}).join(' ')
|
146058
|
+
}
|
146059
|
+
|
146060
|
+
function replaceTilde (comp, options) {
|
146061
|
+
var r = options.loose ? re[TILDELOOSE] : re[TILDE]
|
146062
|
+
return comp.replace(r, function (_, M, m, p, pr) {
|
146063
|
+
debug('tilde', comp, _, M, m, p, pr)
|
146064
|
+
var ret
|
146065
|
+
|
146066
|
+
if (isX(M)) {
|
146067
|
+
ret = ''
|
146068
|
+
} else if (isX(m)) {
|
146069
|
+
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
|
146070
|
+
} else if (isX(p)) {
|
146071
|
+
// ~1.2 == >=1.2.0 <1.3.0
|
146072
|
+
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
|
146073
|
+
} else if (pr) {
|
146074
|
+
debug('replaceTilde pr', pr)
|
146075
|
+
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
|
146076
|
+
' <' + M + '.' + (+m + 1) + '.0'
|
146077
|
+
} else {
|
146078
|
+
// ~1.2.3 == >=1.2.3 <1.3.0
|
146079
|
+
ret = '>=' + M + '.' + m + '.' + p +
|
146080
|
+
' <' + M + '.' + (+m + 1) + '.0'
|
146081
|
+
}
|
146082
|
+
|
146083
|
+
debug('tilde return', ret)
|
146084
|
+
return ret
|
146085
|
+
})
|
146086
|
+
}
|
146087
|
+
|
146088
|
+
// ^ --> * (any, kinda silly)
|
146089
|
+
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
|
146090
|
+
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
|
146091
|
+
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
|
146092
|
+
// ^1.2.3 --> >=1.2.3 <2.0.0
|
146093
|
+
// ^1.2.0 --> >=1.2.0 <2.0.0
|
146094
|
+
function replaceCarets (comp, options) {
|
146095
|
+
return comp.trim().split(/\s+/).map(function (comp) {
|
146096
|
+
return replaceCaret(comp, options)
|
146097
|
+
}).join(' ')
|
146098
|
+
}
|
146099
|
+
|
146100
|
+
function replaceCaret (comp, options) {
|
146101
|
+
debug('caret', comp, options)
|
146102
|
+
var r = options.loose ? re[CARETLOOSE] : re[CARET]
|
146103
|
+
return comp.replace(r, function (_, M, m, p, pr) {
|
146104
|
+
debug('caret', comp, _, M, m, p, pr)
|
146105
|
+
var ret
|
146106
|
+
|
146107
|
+
if (isX(M)) {
|
146108
|
+
ret = ''
|
146109
|
+
} else if (isX(m)) {
|
146110
|
+
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
|
146111
|
+
} else if (isX(p)) {
|
146112
|
+
if (M === '0') {
|
146113
|
+
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
|
146114
|
+
} else {
|
146115
|
+
ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
|
146116
|
+
}
|
146117
|
+
} else if (pr) {
|
146118
|
+
debug('replaceCaret pr', pr)
|
146119
|
+
if (M === '0') {
|
146120
|
+
if (m === '0') {
|
146121
|
+
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
|
146122
|
+
' <' + M + '.' + m + '.' + (+p + 1)
|
146123
|
+
} else {
|
146124
|
+
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
|
146125
|
+
' <' + M + '.' + (+m + 1) + '.0'
|
146126
|
+
}
|
146127
|
+
} else {
|
146128
|
+
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
|
146129
|
+
' <' + (+M + 1) + '.0.0'
|
146130
|
+
}
|
146131
|
+
} else {
|
146132
|
+
debug('no pr')
|
146133
|
+
if (M === '0') {
|
146134
|
+
if (m === '0') {
|
146135
|
+
ret = '>=' + M + '.' + m + '.' + p +
|
146136
|
+
' <' + M + '.' + m + '.' + (+p + 1)
|
146137
|
+
} else {
|
146138
|
+
ret = '>=' + M + '.' + m + '.' + p +
|
146139
|
+
' <' + M + '.' + (+m + 1) + '.0'
|
146140
|
+
}
|
146141
|
+
} else {
|
146142
|
+
ret = '>=' + M + '.' + m + '.' + p +
|
146143
|
+
' <' + (+M + 1) + '.0.0'
|
146144
|
+
}
|
146145
|
+
}
|
146146
|
+
|
146147
|
+
debug('caret return', ret)
|
146148
|
+
return ret
|
146149
|
+
})
|
146150
|
+
}
|
146151
|
+
|
146152
|
+
function replaceXRanges (comp, options) {
|
146153
|
+
debug('replaceXRanges', comp, options)
|
146154
|
+
return comp.split(/\s+/).map(function (comp) {
|
146155
|
+
return replaceXRange(comp, options)
|
146156
|
+
}).join(' ')
|
146157
|
+
}
|
146158
|
+
|
146159
|
+
function replaceXRange (comp, options) {
|
146160
|
+
comp = comp.trim()
|
146161
|
+
var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]
|
146162
|
+
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
|
146163
|
+
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
146164
|
+
var xM = isX(M)
|
146165
|
+
var xm = xM || isX(m)
|
146166
|
+
var xp = xm || isX(p)
|
146167
|
+
var anyX = xp
|
146168
|
+
|
146169
|
+
if (gtlt === '=' && anyX) {
|
146170
|
+
gtlt = ''
|
146171
|
+
}
|
146172
|
+
|
146173
|
+
if (xM) {
|
146174
|
+
if (gtlt === '>' || gtlt === '<') {
|
146175
|
+
// nothing is allowed
|
146176
|
+
ret = '<0.0.0'
|
146177
|
+
} else {
|
146178
|
+
// nothing is forbidden
|
146179
|
+
ret = '*'
|
146180
|
+
}
|
146181
|
+
} else if (gtlt && anyX) {
|
146182
|
+
// we know patch is an x, because we have any x at all.
|
146183
|
+
// replace X with 0
|
146184
|
+
if (xm) {
|
146185
|
+
m = 0
|
146186
|
+
}
|
146187
|
+
p = 0
|
146188
|
+
|
146189
|
+
if (gtlt === '>') {
|
146190
|
+
// >1 => >=2.0.0
|
146191
|
+
// >1.2 => >=1.3.0
|
146192
|
+
// >1.2.3 => >= 1.2.4
|
146193
|
+
gtlt = '>='
|
146194
|
+
if (xm) {
|
146195
|
+
M = +M + 1
|
146196
|
+
m = 0
|
146197
|
+
p = 0
|
146198
|
+
} else {
|
146199
|
+
m = +m + 1
|
146200
|
+
p = 0
|
146201
|
+
}
|
146202
|
+
} else if (gtlt === '<=') {
|
146203
|
+
// <=0.7.x is actually <0.8.0, since any 0.7.x should
|
146204
|
+
// pass. Similarly, <=7.x is actually <8.0.0, etc.
|
146205
|
+
gtlt = '<'
|
146206
|
+
if (xm) {
|
146207
|
+
M = +M + 1
|
146208
|
+
} else {
|
146209
|
+
m = +m + 1
|
146210
|
+
}
|
146211
|
+
}
|
146212
|
+
|
146213
|
+
ret = gtlt + M + '.' + m + '.' + p
|
146214
|
+
} else if (xm) {
|
146215
|
+
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
|
146216
|
+
} else if (xp) {
|
146217
|
+
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
|
146218
|
+
}
|
146219
|
+
|
146220
|
+
debug('xRange return', ret)
|
146221
|
+
|
146222
|
+
return ret
|
146223
|
+
})
|
146224
|
+
}
|
146225
|
+
|
146226
|
+
// Because * is AND-ed with everything else in the comparator,
|
146227
|
+
// and '' means "any version", just remove the *s entirely.
|
146228
|
+
function replaceStars (comp, options) {
|
146229
|
+
debug('replaceStars', comp, options)
|
146230
|
+
// Looseness is ignored here. star is always as loose as it gets!
|
146231
|
+
return comp.trim().replace(re[STAR], '')
|
146232
|
+
}
|
146233
|
+
|
146234
|
+
// This function is passed to string.replace(re[HYPHENRANGE])
|
146235
|
+
// M, m, patch, prerelease, build
|
146236
|
+
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
146237
|
+
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
|
146238
|
+
// 1.2 - 3.4 => >=1.2.0 <3.5.0
|
146239
|
+
function hyphenReplace ($0,
|
146240
|
+
from, fM, fm, fp, fpr, fb,
|
146241
|
+
to, tM, tm, tp, tpr, tb) {
|
146242
|
+
if (isX(fM)) {
|
146243
|
+
from = ''
|
146244
|
+
} else if (isX(fm)) {
|
146245
|
+
from = '>=' + fM + '.0.0'
|
146246
|
+
} else if (isX(fp)) {
|
146247
|
+
from = '>=' + fM + '.' + fm + '.0'
|
146248
|
+
} else {
|
146249
|
+
from = '>=' + from
|
146250
|
+
}
|
146251
|
+
|
146252
|
+
if (isX(tM)) {
|
146253
|
+
to = ''
|
146254
|
+
} else if (isX(tm)) {
|
146255
|
+
to = '<' + (+tM + 1) + '.0.0'
|
146256
|
+
} else if (isX(tp)) {
|
146257
|
+
to = '<' + tM + '.' + (+tm + 1) + '.0'
|
146258
|
+
} else if (tpr) {
|
146259
|
+
to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
|
146260
|
+
} else {
|
146261
|
+
to = '<=' + to
|
146262
|
+
}
|
146263
|
+
|
146264
|
+
return (from + ' ' + to).trim()
|
146265
|
+
}
|
146266
|
+
|
146267
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
146268
|
+
Range.prototype.test = function (version) {
|
146269
|
+
if (!version) {
|
146270
|
+
return false
|
146271
|
+
}
|
146272
|
+
|
146273
|
+
if (typeof version === 'string') {
|
146274
|
+
version = new SemVer(version, this.options)
|
146275
|
+
}
|
146276
|
+
|
146277
|
+
for (var i = 0; i < this.set.length; i++) {
|
146278
|
+
if (testSet(this.set[i], version, this.options)) {
|
146279
|
+
return true
|
146280
|
+
}
|
146281
|
+
}
|
146282
|
+
return false
|
146283
|
+
}
|
146284
|
+
|
146285
|
+
function testSet (set, version, options) {
|
146286
|
+
for (var i = 0; i < set.length; i++) {
|
146287
|
+
if (!set[i].test(version)) {
|
146288
|
+
return false
|
146289
|
+
}
|
146290
|
+
}
|
146291
|
+
|
146292
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
146293
|
+
// Find the set of versions that are allowed to have prereleases
|
146294
|
+
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
|
146295
|
+
// That should allow `1.2.3-pr.2` to pass.
|
146296
|
+
// However, `1.2.4-alpha.notready` should NOT be allowed,
|
146297
|
+
// even though it's within the range set by the comparators.
|
146298
|
+
for (i = 0; i < set.length; i++) {
|
146299
|
+
debug(set[i].semver)
|
146300
|
+
if (set[i].semver === ANY) {
|
146301
|
+
continue
|
146302
|
+
}
|
146303
|
+
|
146304
|
+
if (set[i].semver.prerelease.length > 0) {
|
146305
|
+
var allowed = set[i].semver
|
146306
|
+
if (allowed.major === version.major &&
|
146307
|
+
allowed.minor === version.minor &&
|
146308
|
+
allowed.patch === version.patch) {
|
146309
|
+
return true
|
146310
|
+
}
|
146311
|
+
}
|
146312
|
+
}
|
146313
|
+
|
146314
|
+
// Version has a -pre, but it's not one of the ones we like.
|
146315
|
+
return false
|
146316
|
+
}
|
146317
|
+
|
146318
|
+
return true
|
146319
|
+
}
|
146320
|
+
|
146321
|
+
exports.satisfies = satisfies
|
146322
|
+
function satisfies (version, range, options) {
|
146323
|
+
try {
|
146324
|
+
range = new Range(range, options)
|
146325
|
+
} catch (er) {
|
146326
|
+
return false
|
146327
|
+
}
|
146328
|
+
return range.test(version)
|
146329
|
+
}
|
146330
|
+
|
146331
|
+
exports.maxSatisfying = maxSatisfying
|
146332
|
+
function maxSatisfying (versions, range, options) {
|
146333
|
+
var max = null
|
146334
|
+
var maxSV = null
|
146335
|
+
try {
|
146336
|
+
var rangeObj = new Range(range, options)
|
146337
|
+
} catch (er) {
|
146338
|
+
return null
|
146339
|
+
}
|
146340
|
+
versions.forEach(function (v) {
|
146341
|
+
if (rangeObj.test(v)) {
|
146342
|
+
// satisfies(v, range, options)
|
146343
|
+
if (!max || maxSV.compare(v) === -1) {
|
146344
|
+
// compare(max, v, true)
|
146345
|
+
max = v
|
146346
|
+
maxSV = new SemVer(max, options)
|
146347
|
+
}
|
146348
|
+
}
|
146349
|
+
})
|
146350
|
+
return max
|
146351
|
+
}
|
146352
|
+
|
146353
|
+
exports.minSatisfying = minSatisfying
|
146354
|
+
function minSatisfying (versions, range, options) {
|
146355
|
+
var min = null
|
146356
|
+
var minSV = null
|
146357
|
+
try {
|
146358
|
+
var rangeObj = new Range(range, options)
|
146359
|
+
} catch (er) {
|
146360
|
+
return null
|
146361
|
+
}
|
146362
|
+
versions.forEach(function (v) {
|
146363
|
+
if (rangeObj.test(v)) {
|
146364
|
+
// satisfies(v, range, options)
|
146365
|
+
if (!min || minSV.compare(v) === 1) {
|
146366
|
+
// compare(min, v, true)
|
146367
|
+
min = v
|
146368
|
+
minSV = new SemVer(min, options)
|
146369
|
+
}
|
146370
|
+
}
|
146371
|
+
})
|
146372
|
+
return min
|
146373
|
+
}
|
146374
|
+
|
146375
|
+
exports.minVersion = minVersion
|
146376
|
+
function minVersion (range, loose) {
|
146377
|
+
range = new Range(range, loose)
|
146378
|
+
|
146379
|
+
var minver = new SemVer('0.0.0')
|
146380
|
+
if (range.test(minver)) {
|
146381
|
+
return minver
|
146382
|
+
}
|
146383
|
+
|
146384
|
+
minver = new SemVer('0.0.0-0')
|
146385
|
+
if (range.test(minver)) {
|
146386
|
+
return minver
|
146387
|
+
}
|
146388
|
+
|
146389
|
+
minver = null
|
146390
|
+
for (var i = 0; i < range.set.length; ++i) {
|
146391
|
+
var comparators = range.set[i]
|
146392
|
+
|
146393
|
+
comparators.forEach(function (comparator) {
|
146394
|
+
// Clone to avoid manipulating the comparator's semver object.
|
146395
|
+
var compver = new SemVer(comparator.semver.version)
|
146396
|
+
switch (comparator.operator) {
|
146397
|
+
case '>':
|
146398
|
+
if (compver.prerelease.length === 0) {
|
146399
|
+
compver.patch++
|
146400
|
+
} else {
|
146401
|
+
compver.prerelease.push(0)
|
146402
|
+
}
|
146403
|
+
compver.raw = compver.format()
|
146404
|
+
/* fallthrough */
|
146405
|
+
case '':
|
146406
|
+
case '>=':
|
146407
|
+
if (!minver || gt(minver, compver)) {
|
146408
|
+
minver = compver
|
146409
|
+
}
|
146410
|
+
break
|
146411
|
+
case '<':
|
146412
|
+
case '<=':
|
146413
|
+
/* Ignore maximum versions */
|
146414
|
+
break
|
146415
|
+
/* istanbul ignore next */
|
146416
|
+
default:
|
146417
|
+
throw new Error('Unexpected operation: ' + comparator.operator)
|
146418
|
+
}
|
146419
|
+
})
|
146420
|
+
}
|
146421
|
+
|
146422
|
+
if (minver && range.test(minver)) {
|
146423
|
+
return minver
|
146424
|
+
}
|
146425
|
+
|
146426
|
+
return null
|
146427
|
+
}
|
146428
|
+
|
146429
|
+
exports.validRange = validRange
|
146430
|
+
function validRange (range, options) {
|
146431
|
+
try {
|
146432
|
+
// Return '*' instead of '' so that truthiness works.
|
146433
|
+
// This will throw if it's invalid anyway
|
146434
|
+
return new Range(range, options).range || '*'
|
146435
|
+
} catch (er) {
|
146436
|
+
return null
|
146437
|
+
}
|
146438
|
+
}
|
146439
|
+
|
146440
|
+
// Determine if version is less than all the versions possible in the range
|
146441
|
+
exports.ltr = ltr
|
146442
|
+
function ltr (version, range, options) {
|
146443
|
+
return outside(version, range, '<', options)
|
146444
|
+
}
|
146445
|
+
|
146446
|
+
// Determine if version is greater than all the versions possible in the range.
|
146447
|
+
exports.gtr = gtr
|
146448
|
+
function gtr (version, range, options) {
|
146449
|
+
return outside(version, range, '>', options)
|
146450
|
+
}
|
146451
|
+
|
146452
|
+
exports.outside = outside
|
146453
|
+
function outside (version, range, hilo, options) {
|
146454
|
+
version = new SemVer(version, options)
|
146455
|
+
range = new Range(range, options)
|
146456
|
+
|
146457
|
+
var gtfn, ltefn, ltfn, comp, ecomp
|
146458
|
+
switch (hilo) {
|
146459
|
+
case '>':
|
146460
|
+
gtfn = gt
|
146461
|
+
ltefn = lte
|
146462
|
+
ltfn = lt
|
146463
|
+
comp = '>'
|
146464
|
+
ecomp = '>='
|
146465
|
+
break
|
146466
|
+
case '<':
|
146467
|
+
gtfn = lt
|
146468
|
+
ltefn = gte
|
146469
|
+
ltfn = gt
|
146470
|
+
comp = '<'
|
146471
|
+
ecomp = '<='
|
146472
|
+
break
|
146473
|
+
default:
|
146474
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"')
|
146475
|
+
}
|
146476
|
+
|
146477
|
+
// If it satisifes the range it is not outside
|
146478
|
+
if (satisfies(version, range, options)) {
|
146479
|
+
return false
|
146480
|
+
}
|
146481
|
+
|
146482
|
+
// From now on, variable terms are as if we're in "gtr" mode.
|
146483
|
+
// but note that everything is flipped for the "ltr" function.
|
146484
|
+
|
146485
|
+
for (var i = 0; i < range.set.length; ++i) {
|
146486
|
+
var comparators = range.set[i]
|
146487
|
+
|
146488
|
+
var high = null
|
146489
|
+
var low = null
|
146490
|
+
|
146491
|
+
comparators.forEach(function (comparator) {
|
146492
|
+
if (comparator.semver === ANY) {
|
146493
|
+
comparator = new Comparator('>=0.0.0')
|
146494
|
+
}
|
146495
|
+
high = high || comparator
|
146496
|
+
low = low || comparator
|
146497
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
146498
|
+
high = comparator
|
146499
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
146500
|
+
low = comparator
|
146501
|
+
}
|
146502
|
+
})
|
146503
|
+
|
146504
|
+
// If the edge version comparator has a operator then our version
|
146505
|
+
// isn't outside it
|
146506
|
+
if (high.operator === comp || high.operator === ecomp) {
|
146507
|
+
return false
|
146508
|
+
}
|
146509
|
+
|
146510
|
+
// If the lowest version comparator has an operator and our version
|
146511
|
+
// is less than it then it isn't higher than the range
|
146512
|
+
if ((!low.operator || low.operator === comp) &&
|
146513
|
+
ltefn(version, low.semver)) {
|
146514
|
+
return false
|
146515
|
+
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
146516
|
+
return false
|
146517
|
+
}
|
146518
|
+
}
|
146519
|
+
return true
|
146520
|
+
}
|
146521
|
+
|
146522
|
+
exports.prerelease = prerelease
|
146523
|
+
function prerelease (version, options) {
|
146524
|
+
var parsed = parse(version, options)
|
146525
|
+
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
|
146526
|
+
}
|
146527
|
+
|
146528
|
+
exports.intersects = intersects
|
146529
|
+
function intersects (r1, r2, options) {
|
146530
|
+
r1 = new Range(r1, options)
|
146531
|
+
r2 = new Range(r2, options)
|
146532
|
+
return r1.intersects(r2)
|
146533
|
+
}
|
146534
|
+
|
146535
|
+
exports.coerce = coerce
|
146536
|
+
function coerce (version) {
|
146537
|
+
if (version instanceof SemVer) {
|
146538
|
+
return version
|
146539
|
+
}
|
146540
|
+
|
146541
|
+
if (typeof version !== 'string') {
|
146542
|
+
return null
|
146543
|
+
}
|
146544
|
+
|
146545
|
+
var match = version.match(re[COERCE])
|
146546
|
+
|
146547
|
+
if (match == null) {
|
146548
|
+
return null
|
146549
|
+
}
|
146550
|
+
|
146551
|
+
return parse(match[1] +
|
146552
|
+
'.' + (match[2] || '0') +
|
146553
|
+
'.' + (match[3] || '0'))
|
146554
|
+
}
|
146555
|
+
|
146556
|
+
|
145067
146557
|
/***/ }),
|
145068
146558
|
|
145069
146559
|
/***/ 41039:
|
@@ -189585,7 +191075,7 @@ async function ls(client, opts, args) {
|
|
189585
191075
|
// Get the list of alias
|
189586
191076
|
const { aliases, pagination } = await (0, get_aliases_1.default)(client, undefined, ...paginationOptions);
|
189587
191077
|
output.log(`aliases found under ${chalk_1.default.bold(contextName)} ${lsStamp()}`);
|
189588
|
-
|
191078
|
+
client.stdout.write(printAliasTable(aliases));
|
189589
191079
|
if (pagination && pagination.count === 20) {
|
189590
191080
|
const flags = (0, get_command_flags_1.default)(opts, ['_', '--next']);
|
189591
191081
|
output.log(`To display the next page run ${(0, pkg_name_1.getCommandName)(`alias ls${flags} --next ${pagination.next}`)}`);
|
@@ -191175,7 +192665,7 @@ async function ls(client, opts, args) {
|
|
191175
192665
|
const { certs, pagination } = await (0, get_certs_1.default)(client, ...paginationOptions).catch(err => err);
|
191176
192666
|
output.log(`${certs.length > 0 ? 'Certificates' : 'No certificates'} found under ${chalk_1.default.bold(contextName)} ${lsStamp()}`);
|
191177
192667
|
if (certs.length > 0) {
|
191178
|
-
|
192668
|
+
client.stdout.write(formatCertsTable(certs));
|
191179
192669
|
}
|
191180
192670
|
if (pagination && pagination.count === 20) {
|
191181
192671
|
const flags = (0, get_command_flags_1.default)(opts, ['_', '--next']);
|
@@ -192546,7 +194036,7 @@ async function ls(client, opts, args) {
|
|
192546
194036
|
}
|
192547
194037
|
const { records, pagination } = data;
|
192548
194038
|
output.log(`${records.length > 0 ? 'Records' : 'No records'} found under ${chalk_1.default.bold(contextName)} ${chalk_1.default.gray(lsStamp())}`);
|
192549
|
-
|
194039
|
+
client.stdout.write(getDNSRecordsTable([{ domainName, records }]));
|
192550
194040
|
if (pagination && pagination.count === 20) {
|
192551
194041
|
const flags = (0, get_command_flags_1.default)(opts, ['_', '--next']);
|
192552
194042
|
output.log(`To display the next page run ${(0, pkg_name_1.getCommandName)(`dns ls ${domainName}${flags} --next ${pagination.next}`)}`);
|
@@ -198979,12 +200469,13 @@ const build_utils_1 = __webpack_require__(63445);
|
|
198979
200469
|
const promisepipe_1 = __importDefault(__webpack_require__(79860));
|
198980
200470
|
const unzip_1 = __webpack_require__(37585);
|
198981
200471
|
const link_1 = __webpack_require__(49347);
|
200472
|
+
const client_1 = __webpack_require__(40521);
|
198982
200473
|
const { normalize } = path_1.posix;
|
198983
200474
|
exports.OUTPUT_DIR = (0, path_1.join)(link_1.VERCEL_DIR, 'output');
|
198984
200475
|
async function writeBuildResult(outputDir, buildResult, build, builder, builderPkg, vercelConfig) {
|
198985
200476
|
const { version } = builder;
|
198986
200477
|
if (typeof version !== 'number' || version === 2) {
|
198987
|
-
return writeBuildResultV2(outputDir, buildResult, vercelConfig);
|
200478
|
+
return writeBuildResultV2(outputDir, buildResult, build, vercelConfig);
|
198988
200479
|
}
|
198989
200480
|
else if (version === 3) {
|
198990
200481
|
return writeBuildResultV3(outputDir, buildResult, build, vercelConfig);
|
@@ -199015,11 +200506,20 @@ function stripDuplicateSlashes(path) {
|
|
199015
200506
|
* Writes the output from the `build()` return value of a v2 Builder to
|
199016
200507
|
* the filesystem.
|
199017
200508
|
*/
|
199018
|
-
async function writeBuildResultV2(outputDir, buildResult, vercelConfig) {
|
200509
|
+
async function writeBuildResultV2(outputDir, buildResult, build, vercelConfig) {
|
199019
200510
|
if ('buildOutputPath' in buildResult) {
|
199020
200511
|
await mergeBuilderOutput(outputDir, buildResult);
|
199021
200512
|
return;
|
199022
200513
|
}
|
200514
|
+
// Some very old `@now` scoped Builders return `output` at the top-level.
|
200515
|
+
// These Builders are no longer supported.
|
200516
|
+
if (!buildResult.output) {
|
200517
|
+
const configFile = vercelConfig?.[client_1.fileNameSymbol];
|
200518
|
+
const updateMessage = build.use.startsWith('@now/')
|
200519
|
+
? ` Please update from "@now" to "@vercel" in your \`${configFile}\` file.`
|
200520
|
+
: '';
|
200521
|
+
throw new Error(`The build result from "${build.use}" is missing the "output" property.${updateMessage}`);
|
200522
|
+
}
|
199023
200523
|
const lambdas = new Map();
|
199024
200524
|
const overrides = {};
|
199025
200525
|
for (const [path, output] of Object.entries(buildResult.output)) {
|
@@ -213068,7 +214568,7 @@ module.exports = JSON.parse("[[[0,44],\"disallowed_STD3_valid\"],[[45,46],\"vali
|
|
213068
214568
|
/***/ ((module) => {
|
213069
214569
|
|
213070
214570
|
"use strict";
|
213071
|
-
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"28.
|
214571
|
+
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"28.13.1\",\"preferGlobal\":true,\"license\":\"Apache-2.0\",\"description\":\"The command-line interface for Vercel\",\"homepage\":\"https://vercel.com\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/cli\"},\"scripts\":{\"preinstall\":\"node ./scripts/preinstall.js\",\"test\":\"jest --env node --verbose --bail\",\"test-unit\":\"pnpm test test/unit/\",\"test-integration-cli\":\"rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose\",\"test-integration-dev\":\"pnpm test test/dev/\",\"coverage\":\"codecov\",\"build\":\"ts-node ./scripts/build.ts\",\"dev\":\"ts-node ./src/index.ts\"},\"bin\":{\"vc\":\"./dist/index.js\",\"vercel\":\"./dist/index.js\"},\"files\":[\"dist\",\"scripts/preinstall.js\"],\"ava\":{\"extensions\":[\"ts\"],\"require\":[\"ts-node/register/transpile-only\",\"esm\"]},\"engines\":{\"node\":\">= 14\"},\"dependencies\":{\"@vercel/build-utils\":\"5.9.0\",\"@vercel/go\":\"2.2.30\",\"@vercel/hydrogen\":\"0.0.44\",\"@vercel/next\":\"3.3.18\",\"@vercel/node\":\"2.8.15\",\"@vercel/python\":\"3.1.40\",\"@vercel/redwood\":\"1.0.51\",\"@vercel/remix\":\"1.2.7\",\"@vercel/ruby\":\"1.3.56\",\"@vercel/static-build\":\"1.2.0\"},\"devDependencies\":{\"@alex_neo/jest-expect-message\":\"1.0.5\",\"@next/env\":\"11.1.2\",\"@sentry/node\":\"5.5.0\",\"@sindresorhus/slugify\":\"0.11.0\",\"@swc/core\":\"1.2.218\",\"@tootallnate/once\":\"1.1.2\",\"@types/async-retry\":\"1.2.1\",\"@types/bytes\":\"3.0.0\",\"@types/chance\":\"1.1.3\",\"@types/debug\":\"0.0.31\",\"@types/dotenv\":\"6.1.1\",\"@types/escape-html\":\"0.0.20\",\"@types/express\":\"4.17.13\",\"@types/fs-extra\":\"9.0.13\",\"@types/glob\":\"7.1.1\",\"@types/http-proxy\":\"1.16.2\",\"@types/ini\":\"1.3.31\",\"@types/inquirer\":\"7.3.1\",\"@types/jest\":\"27.4.1\",\"@types/jest-expect-message\":\"1.0.3\",\"@types/load-json-file\":\"2.0.7\",\"@types/mime-types\":\"2.1.0\",\"@types/minimatch\":\"3.0.3\",\"@types/mri\":\"1.1.0\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"14.18.33\",\"@types/node-fetch\":\"2.5.10\",\"@types/npm-package-arg\":\"6.1.0\",\"@types/pluralize\":\"0.0.29\",\"@types/psl\":\"1.1.0\",\"@types/qs\":\"6.9.7\",\"@types/semver\":\"6.0.1\",\"@types/tar-fs\":\"1.16.1\",\"@types/text-table\":\"0.2.0\",\"@types/title\":\"3.4.1\",\"@types/universal-analytics\":\"0.4.2\",\"@types/update-notifier\":\"5.1.0\",\"@types/which\":\"1.3.2\",\"@types/write-json-file\":\"2.2.1\",\"@types/yauzl-promise\":\"2.1.0\",\"@vercel/client\":\"12.3.2\",\"@vercel/error-utils\":\"1.0.8\",\"@vercel/frameworks\":\"1.2.4\",\"@vercel/fs-detectors\":\"3.7.5\",\"@vercel/fun\":\"1.0.4\",\"@vercel/ncc\":\"0.24.0\",\"@vercel/routing-utils\":\"2.1.8\",\"@zeit/source-map-support\":\"0.6.2\",\"ajv\":\"6.12.2\",\"alpha-sort\":\"2.0.1\",\"ansi-escapes\":\"4.3.2\",\"ansi-regex\":\"5.0.1\",\"arg\":\"5.0.0\",\"async-listen\":\"1.2.0\",\"async-retry\":\"1.1.3\",\"async-sema\":\"2.1.4\",\"ava\":\"2.2.0\",\"boxen\":\"4.2.0\",\"bytes\":\"3.0.0\",\"chalk\":\"4.1.0\",\"chance\":\"1.1.7\",\"chokidar\":\"3.3.1\",\"codecov\":\"3.8.2\",\"cpy\":\"7.2.0\",\"date-fns\":\"1.29.0\",\"debug\":\"3.1.0\",\"dot\":\"1.1.3\",\"dotenv\":\"4.0.0\",\"email-validator\":\"1.1.1\",\"epipebomb\":\"1.0.0\",\"escape-html\":\"1.0.3\",\"esm\":\"3.1.4\",\"execa\":\"3.2.0\",\"express\":\"4.17.1\",\"fast-deep-equal\":\"3.1.3\",\"fs-extra\":\"10.0.0\",\"get-port\":\"5.1.1\",\"git-last-commit\":\"1.0.1\",\"glob\":\"7.1.2\",\"http-proxy\":\"1.18.1\",\"ini\":\"3.0.0\",\"inquirer\":\"7.0.4\",\"is-docker\":\"2.2.1\",\"is-port-reachable\":\"3.1.0\",\"is-url\":\"1.2.2\",\"jaro-winkler\":\"0.2.8\",\"jest-matcher-utils\":\"29.3.1\",\"json5\":\"2.2.1\",\"jsonlines\":\"0.1.1\",\"line-async-iterator\":\"3.0.0\",\"load-json-file\":\"3.0.0\",\"mime-types\":\"2.1.24\",\"minimatch\":\"3.0.4\",\"mri\":\"1.1.5\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.7\",\"npm-package-arg\":\"6.1.0\",\"open\":\"8.4.0\",\"ora\":\"3.4.0\",\"pcre-to-regexp\":\"1.0.0\",\"pluralize\":\"7.0.0\",\"promisepipe\":\"3.0.0\",\"psl\":\"1.1.31\",\"qr-image\":\"3.2.0\",\"raw-body\":\"2.4.1\",\"rimraf\":\"3.0.2\",\"semver\":\"5.5.0\",\"serve-handler\":\"6.1.1\",\"strip-ansi\":\"6.0.1\",\"stripe\":\"5.1.0\",\"supports-hyperlinks\":\"2.2.0\",\"tar-fs\":\"1.16.3\",\"test-listen\":\"1.1.0\",\"text-table\":\"0.2.0\",\"title\":\"3.4.1\",\"tmp-promise\":\"1.0.3\",\"tree-kill\":\"1.2.2\",\"ts-node\":\"10.9.1\",\"typescript\":\"4.7.4\",\"universal-analytics\":\"0.4.20\",\"utility-types\":\"2.1.0\",\"write-json-file\":\"2.2.0\",\"xdg-app-paths\":\"5.1.0\",\"yauzl-promise\":\"2.1.3\"},\"jest\":{\"preset\":\"ts-jest\",\"globals\":{\"ts-jest\":{\"diagnostics\":false,\"isolatedModules\":true}},\"setupFilesAfterEnv\":[\"@alex_neo/jest-expect-message\"],\"verbose\":false,\"testEnvironment\":\"node\",\"testMatch\":[\"<rootDir>/test/**/*.test.ts\"]}}");
|
213072
214572
|
|
213073
214573
|
/***/ }),
|
213074
214574
|
|