@vercel/static-build 1.3.16 → 1.3.17

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -956
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -3288,7 +3288,7 @@ exports.libFiles = libFiles;
3288
3288
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3289
3289
 
3290
3290
  var ts = __webpack_require__(11);
3291
- var minimatch = __webpack_require__(7345);
3291
+ var minimatch = __webpack_require__(7767);
3292
3292
  var fastGlob = __webpack_require__(4910);
3293
3293
  var fs$1 = __webpack_require__(5747);
3294
3294
  var mkdirp = __webpack_require__(7981);
@@ -197294,960 +197294,6 @@ function regExpEscape (s) {
197294
197294
  }
197295
197295
 
197296
197296
 
197297
- /***/ }),
197298
-
197299
- /***/ 7345:
197300
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
197301
-
197302
- module.exports = minimatch
197303
- minimatch.Minimatch = Minimatch
197304
-
197305
- var path = (function () { try { return __webpack_require__(5622) } catch (e) {}}()) || {
197306
- sep: '/'
197307
- }
197308
- minimatch.sep = path.sep
197309
-
197310
- var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
197311
- var expand = __webpack_require__(490)
197312
-
197313
- var plTypes = {
197314
- '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
197315
- '?': { open: '(?:', close: ')?' },
197316
- '+': { open: '(?:', close: ')+' },
197317
- '*': { open: '(?:', close: ')*' },
197318
- '@': { open: '(?:', close: ')' }
197319
- }
197320
-
197321
- // any single thing other than /
197322
- // don't need to escape / when using new RegExp()
197323
- var qmark = '[^/]'
197324
-
197325
- // * => any number of characters
197326
- var star = qmark + '*?'
197327
-
197328
- // ** when dots are allowed. Anything goes, except .. and .
197329
- // not (^ or / followed by one or two dots followed by $ or /),
197330
- // followed by anything, any number of times.
197331
- var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
197332
-
197333
- // not a ^ or / followed by a dot,
197334
- // followed by anything, any number of times.
197335
- var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
197336
-
197337
- // characters that need to be escaped in RegExp.
197338
- var reSpecials = charSet('().*{}+?[]^$\\!')
197339
-
197340
- // "abc" -> { a:true, b:true, c:true }
197341
- function charSet (s) {
197342
- return s.split('').reduce(function (set, c) {
197343
- set[c] = true
197344
- return set
197345
- }, {})
197346
- }
197347
-
197348
- // normalizes slashes.
197349
- var slashSplit = /\/+/
197350
-
197351
- minimatch.filter = filter
197352
- function filter (pattern, options) {
197353
- options = options || {}
197354
- return function (p, i, list) {
197355
- return minimatch(p, pattern, options)
197356
- }
197357
- }
197358
-
197359
- function ext (a, b) {
197360
- b = b || {}
197361
- var t = {}
197362
- Object.keys(a).forEach(function (k) {
197363
- t[k] = a[k]
197364
- })
197365
- Object.keys(b).forEach(function (k) {
197366
- t[k] = b[k]
197367
- })
197368
- return t
197369
- }
197370
-
197371
- minimatch.defaults = function (def) {
197372
- if (!def || typeof def !== 'object' || !Object.keys(def).length) {
197373
- return minimatch
197374
- }
197375
-
197376
- var orig = minimatch
197377
-
197378
- var m = function minimatch (p, pattern, options) {
197379
- return orig(p, pattern, ext(def, options))
197380
- }
197381
-
197382
- m.Minimatch = function Minimatch (pattern, options) {
197383
- return new orig.Minimatch(pattern, ext(def, options))
197384
- }
197385
- m.Minimatch.defaults = function defaults (options) {
197386
- return orig.defaults(ext(def, options)).Minimatch
197387
- }
197388
-
197389
- m.filter = function filter (pattern, options) {
197390
- return orig.filter(pattern, ext(def, options))
197391
- }
197392
-
197393
- m.defaults = function defaults (options) {
197394
- return orig.defaults(ext(def, options))
197395
- }
197396
-
197397
- m.makeRe = function makeRe (pattern, options) {
197398
- return orig.makeRe(pattern, ext(def, options))
197399
- }
197400
-
197401
- m.braceExpand = function braceExpand (pattern, options) {
197402
- return orig.braceExpand(pattern, ext(def, options))
197403
- }
197404
-
197405
- m.match = function (list, pattern, options) {
197406
- return orig.match(list, pattern, ext(def, options))
197407
- }
197408
-
197409
- return m
197410
- }
197411
-
197412
- Minimatch.defaults = function (def) {
197413
- return minimatch.defaults(def).Minimatch
197414
- }
197415
-
197416
- function minimatch (p, pattern, options) {
197417
- assertValidPattern(pattern)
197418
-
197419
- if (!options) options = {}
197420
-
197421
- // shortcut: comments match nothing.
197422
- if (!options.nocomment && pattern.charAt(0) === '#') {
197423
- return false
197424
- }
197425
-
197426
- return new Minimatch(pattern, options).match(p)
197427
- }
197428
-
197429
- function Minimatch (pattern, options) {
197430
- if (!(this instanceof Minimatch)) {
197431
- return new Minimatch(pattern, options)
197432
- }
197433
-
197434
- assertValidPattern(pattern)
197435
-
197436
- if (!options) options = {}
197437
-
197438
- pattern = pattern.trim()
197439
-
197440
- // windows support: need to use /, not \
197441
- if (!options.allowWindowsEscape && path.sep !== '/') {
197442
- pattern = pattern.split(path.sep).join('/')
197443
- }
197444
-
197445
- this.options = options
197446
- this.set = []
197447
- this.pattern = pattern
197448
- this.regexp = null
197449
- this.negate = false
197450
- this.comment = false
197451
- this.empty = false
197452
- this.partial = !!options.partial
197453
-
197454
- // make the set of regexps etc.
197455
- this.make()
197456
- }
197457
-
197458
- Minimatch.prototype.debug = function () {}
197459
-
197460
- Minimatch.prototype.make = make
197461
- function make () {
197462
- var pattern = this.pattern
197463
- var options = this.options
197464
-
197465
- // empty patterns and comments match nothing.
197466
- if (!options.nocomment && pattern.charAt(0) === '#') {
197467
- this.comment = true
197468
- return
197469
- }
197470
- if (!pattern) {
197471
- this.empty = true
197472
- return
197473
- }
197474
-
197475
- // step 1: figure out negation, etc.
197476
- this.parseNegate()
197477
-
197478
- // step 2: expand braces
197479
- var set = this.globSet = this.braceExpand()
197480
-
197481
- if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
197482
-
197483
- this.debug(this.pattern, set)
197484
-
197485
- // step 3: now we have a set, so turn each one into a series of path-portion
197486
- // matching patterns.
197487
- // These will be regexps, except in the case of "**", which is
197488
- // set to the GLOBSTAR object for globstar behavior,
197489
- // and will not contain any / characters
197490
- set = this.globParts = set.map(function (s) {
197491
- return s.split(slashSplit)
197492
- })
197493
-
197494
- this.debug(this.pattern, set)
197495
-
197496
- // glob --> regexps
197497
- set = set.map(function (s, si, set) {
197498
- return s.map(this.parse, this)
197499
- }, this)
197500
-
197501
- this.debug(this.pattern, set)
197502
-
197503
- // filter out everything that didn't compile properly.
197504
- set = set.filter(function (s) {
197505
- return s.indexOf(false) === -1
197506
- })
197507
-
197508
- this.debug(this.pattern, set)
197509
-
197510
- this.set = set
197511
- }
197512
-
197513
- Minimatch.prototype.parseNegate = parseNegate
197514
- function parseNegate () {
197515
- var pattern = this.pattern
197516
- var negate = false
197517
- var options = this.options
197518
- var negateOffset = 0
197519
-
197520
- if (options.nonegate) return
197521
-
197522
- for (var i = 0, l = pattern.length
197523
- ; i < l && pattern.charAt(i) === '!'
197524
- ; i++) {
197525
- negate = !negate
197526
- negateOffset++
197527
- }
197528
-
197529
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
197530
- this.negate = negate
197531
- }
197532
-
197533
- // Brace expansion:
197534
- // a{b,c}d -> abd acd
197535
- // a{b,}c -> abc ac
197536
- // a{0..3}d -> a0d a1d a2d a3d
197537
- // a{b,c{d,e}f}g -> abg acdfg acefg
197538
- // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
197539
- //
197540
- // Invalid sets are not expanded.
197541
- // a{2..}b -> a{2..}b
197542
- // a{b}c -> a{b}c
197543
- minimatch.braceExpand = function (pattern, options) {
197544
- return braceExpand(pattern, options)
197545
- }
197546
-
197547
- Minimatch.prototype.braceExpand = braceExpand
197548
-
197549
- function braceExpand (pattern, options) {
197550
- if (!options) {
197551
- if (this instanceof Minimatch) {
197552
- options = this.options
197553
- } else {
197554
- options = {}
197555
- }
197556
- }
197557
-
197558
- pattern = typeof pattern === 'undefined'
197559
- ? this.pattern : pattern
197560
-
197561
- assertValidPattern(pattern)
197562
-
197563
- // Thanks to Yeting Li <https://github.com/yetingli> for
197564
- // improving this regexp to avoid a ReDOS vulnerability.
197565
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
197566
- // shortcut. no need to expand.
197567
- return [pattern]
197568
- }
197569
-
197570
- return expand(pattern)
197571
- }
197572
-
197573
- var MAX_PATTERN_LENGTH = 1024 * 64
197574
- var assertValidPattern = function (pattern) {
197575
- if (typeof pattern !== 'string') {
197576
- throw new TypeError('invalid pattern')
197577
- }
197578
-
197579
- if (pattern.length > MAX_PATTERN_LENGTH) {
197580
- throw new TypeError('pattern is too long')
197581
- }
197582
- }
197583
-
197584
- // parse a component of the expanded set.
197585
- // At this point, no pattern may contain "/" in it
197586
- // so we're going to return a 2d array, where each entry is the full
197587
- // pattern, split on '/', and then turned into a regular expression.
197588
- // A regexp is made at the end which joins each array with an
197589
- // escaped /, and another full one which joins each regexp with |.
197590
- //
197591
- // Following the lead of Bash 4.1, note that "**" only has special meaning
197592
- // when it is the *only* thing in a path portion. Otherwise, any series
197593
- // of * is equivalent to a single *. Globstar behavior is enabled by
197594
- // default, and can be disabled by setting options.noglobstar.
197595
- Minimatch.prototype.parse = parse
197596
- var SUBPARSE = {}
197597
- function parse (pattern, isSub) {
197598
- assertValidPattern(pattern)
197599
-
197600
- var options = this.options
197601
-
197602
- // shortcuts
197603
- if (pattern === '**') {
197604
- if (!options.noglobstar)
197605
- return GLOBSTAR
197606
- else
197607
- pattern = '*'
197608
- }
197609
- if (pattern === '') return ''
197610
-
197611
- var re = ''
197612
- var hasMagic = !!options.nocase
197613
- var escaping = false
197614
- // ? => one single character
197615
- var patternListStack = []
197616
- var negativeLists = []
197617
- var stateChar
197618
- var inClass = false
197619
- var reClassStart = -1
197620
- var classStart = -1
197621
- // . and .. never match anything that doesn't start with .,
197622
- // even when options.dot is set.
197623
- var patternStart = pattern.charAt(0) === '.' ? '' // anything
197624
- // not (start or / followed by . or .. followed by / or end)
197625
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
197626
- : '(?!\\.)'
197627
- var self = this
197628
-
197629
- function clearStateChar () {
197630
- if (stateChar) {
197631
- // we had some state-tracking character
197632
- // that wasn't consumed by this pass.
197633
- switch (stateChar) {
197634
- case '*':
197635
- re += star
197636
- hasMagic = true
197637
- break
197638
- case '?':
197639
- re += qmark
197640
- hasMagic = true
197641
- break
197642
- default:
197643
- re += '\\' + stateChar
197644
- break
197645
- }
197646
- self.debug('clearStateChar %j %j', stateChar, re)
197647
- stateChar = false
197648
- }
197649
- }
197650
-
197651
- for (var i = 0, len = pattern.length, c
197652
- ; (i < len) && (c = pattern.charAt(i))
197653
- ; i++) {
197654
- this.debug('%s\t%s %s %j', pattern, i, re, c)
197655
-
197656
- // skip over any that are escaped.
197657
- if (escaping && reSpecials[c]) {
197658
- re += '\\' + c
197659
- escaping = false
197660
- continue
197661
- }
197662
-
197663
- switch (c) {
197664
- /* istanbul ignore next */
197665
- case '/': {
197666
- // completely not allowed, even escaped.
197667
- // Should already be path-split by now.
197668
- return false
197669
- }
197670
-
197671
- case '\\':
197672
- clearStateChar()
197673
- escaping = true
197674
- continue
197675
-
197676
- // the various stateChar values
197677
- // for the "extglob" stuff.
197678
- case '?':
197679
- case '*':
197680
- case '+':
197681
- case '@':
197682
- case '!':
197683
- this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
197684
-
197685
- // all of those are literals inside a class, except that
197686
- // the glob [!a] means [^a] in regexp
197687
- if (inClass) {
197688
- this.debug(' in class')
197689
- if (c === '!' && i === classStart + 1) c = '^'
197690
- re += c
197691
- continue
197692
- }
197693
-
197694
- // if we already have a stateChar, then it means
197695
- // that there was something like ** or +? in there.
197696
- // Handle the stateChar, then proceed with this one.
197697
- self.debug('call clearStateChar %j', stateChar)
197698
- clearStateChar()
197699
- stateChar = c
197700
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
197701
- // just clear the statechar *now*, rather than even diving into
197702
- // the patternList stuff.
197703
- if (options.noext) clearStateChar()
197704
- continue
197705
-
197706
- case '(':
197707
- if (inClass) {
197708
- re += '('
197709
- continue
197710
- }
197711
-
197712
- if (!stateChar) {
197713
- re += '\\('
197714
- continue
197715
- }
197716
-
197717
- patternListStack.push({
197718
- type: stateChar,
197719
- start: i - 1,
197720
- reStart: re.length,
197721
- open: plTypes[stateChar].open,
197722
- close: plTypes[stateChar].close
197723
- })
197724
- // negation is (?:(?!js)[^/]*)
197725
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
197726
- this.debug('plType %j %j', stateChar, re)
197727
- stateChar = false
197728
- continue
197729
-
197730
- case ')':
197731
- if (inClass || !patternListStack.length) {
197732
- re += '\\)'
197733
- continue
197734
- }
197735
-
197736
- clearStateChar()
197737
- hasMagic = true
197738
- var pl = patternListStack.pop()
197739
- // negation is (?:(?!js)[^/]*)
197740
- // The others are (?:<pattern>)<type>
197741
- re += pl.close
197742
- if (pl.type === '!') {
197743
- negativeLists.push(pl)
197744
- }
197745
- pl.reEnd = re.length
197746
- continue
197747
-
197748
- case '|':
197749
- if (inClass || !patternListStack.length || escaping) {
197750
- re += '\\|'
197751
- escaping = false
197752
- continue
197753
- }
197754
-
197755
- clearStateChar()
197756
- re += '|'
197757
- continue
197758
-
197759
- // these are mostly the same in regexp and glob
197760
- case '[':
197761
- // swallow any state-tracking char before the [
197762
- clearStateChar()
197763
-
197764
- if (inClass) {
197765
- re += '\\' + c
197766
- continue
197767
- }
197768
-
197769
- inClass = true
197770
- classStart = i
197771
- reClassStart = re.length
197772
- re += c
197773
- continue
197774
-
197775
- case ']':
197776
- // a right bracket shall lose its special
197777
- // meaning and represent itself in
197778
- // a bracket expression if it occurs
197779
- // first in the list. -- POSIX.2 2.8.3.2
197780
- if (i === classStart + 1 || !inClass) {
197781
- re += '\\' + c
197782
- escaping = false
197783
- continue
197784
- }
197785
-
197786
- // handle the case where we left a class open.
197787
- // "[z-a]" is valid, equivalent to "\[z-a\]"
197788
- // split where the last [ was, make sure we don't have
197789
- // an invalid re. if so, re-walk the contents of the
197790
- // would-be class to re-translate any characters that
197791
- // were passed through as-is
197792
- // TODO: It would probably be faster to determine this
197793
- // without a try/catch and a new RegExp, but it's tricky
197794
- // to do safely. For now, this is safe and works.
197795
- var cs = pattern.substring(classStart + 1, i)
197796
- try {
197797
- RegExp('[' + cs + ']')
197798
- } catch (er) {
197799
- // not a valid class!
197800
- var sp = this.parse(cs, SUBPARSE)
197801
- re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
197802
- hasMagic = hasMagic || sp[1]
197803
- inClass = false
197804
- continue
197805
- }
197806
-
197807
- // finish up the class.
197808
- hasMagic = true
197809
- inClass = false
197810
- re += c
197811
- continue
197812
-
197813
- default:
197814
- // swallow any state char that wasn't consumed
197815
- clearStateChar()
197816
-
197817
- if (escaping) {
197818
- // no need
197819
- escaping = false
197820
- } else if (reSpecials[c]
197821
- && !(c === '^' && inClass)) {
197822
- re += '\\'
197823
- }
197824
-
197825
- re += c
197826
-
197827
- } // switch
197828
- } // for
197829
-
197830
- // handle the case where we left a class open.
197831
- // "[abc" is valid, equivalent to "\[abc"
197832
- if (inClass) {
197833
- // split where the last [ was, and escape it
197834
- // this is a huge pita. We now have to re-walk
197835
- // the contents of the would-be class to re-translate
197836
- // any characters that were passed through as-is
197837
- cs = pattern.substr(classStart + 1)
197838
- sp = this.parse(cs, SUBPARSE)
197839
- re = re.substr(0, reClassStart) + '\\[' + sp[0]
197840
- hasMagic = hasMagic || sp[1]
197841
- }
197842
-
197843
- // handle the case where we had a +( thing at the *end*
197844
- // of the pattern.
197845
- // each pattern list stack adds 3 chars, and we need to go through
197846
- // and escape any | chars that were passed through as-is for the regexp.
197847
- // Go through and escape them, taking care not to double-escape any
197848
- // | chars that were already escaped.
197849
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
197850
- var tail = re.slice(pl.reStart + pl.open.length)
197851
- this.debug('setting tail', re, pl)
197852
- // maybe some even number of \, then maybe 1 \, followed by a |
197853
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
197854
- if (!$2) {
197855
- // the | isn't already escaped, so escape it.
197856
- $2 = '\\'
197857
- }
197858
-
197859
- // need to escape all those slashes *again*, without escaping the
197860
- // one that we need for escaping the | character. As it works out,
197861
- // escaping an even number of slashes can be done by simply repeating
197862
- // it exactly after itself. That's why this trick works.
197863
- //
197864
- // I am sorry that you have to see this.
197865
- return $1 + $1 + $2 + '|'
197866
- })
197867
-
197868
- this.debug('tail=%j\n %s', tail, tail, pl, re)
197869
- var t = pl.type === '*' ? star
197870
- : pl.type === '?' ? qmark
197871
- : '\\' + pl.type
197872
-
197873
- hasMagic = true
197874
- re = re.slice(0, pl.reStart) + t + '\\(' + tail
197875
- }
197876
-
197877
- // handle trailing things that only matter at the very end.
197878
- clearStateChar()
197879
- if (escaping) {
197880
- // trailing \\
197881
- re += '\\\\'
197882
- }
197883
-
197884
- // only need to apply the nodot start if the re starts with
197885
- // something that could conceivably capture a dot
197886
- var addPatternStart = false
197887
- switch (re.charAt(0)) {
197888
- case '[': case '.': case '(': addPatternStart = true
197889
- }
197890
-
197891
- // Hack to work around lack of negative lookbehind in JS
197892
- // A pattern like: *.!(x).!(y|z) needs to ensure that a name
197893
- // like 'a.xyz.yz' doesn't match. So, the first negative
197894
- // lookahead, has to look ALL the way ahead, to the end of
197895
- // the pattern.
197896
- for (var n = negativeLists.length - 1; n > -1; n--) {
197897
- var nl = negativeLists[n]
197898
-
197899
- var nlBefore = re.slice(0, nl.reStart)
197900
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
197901
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
197902
- var nlAfter = re.slice(nl.reEnd)
197903
-
197904
- nlLast += nlAfter
197905
-
197906
- // Handle nested stuff like *(*.js|!(*.json)), where open parens
197907
- // mean that we should *not* include the ) in the bit that is considered
197908
- // "after" the negated section.
197909
- var openParensBefore = nlBefore.split('(').length - 1
197910
- var cleanAfter = nlAfter
197911
- for (i = 0; i < openParensBefore; i++) {
197912
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
197913
- }
197914
- nlAfter = cleanAfter
197915
-
197916
- var dollar = ''
197917
- if (nlAfter === '' && isSub !== SUBPARSE) {
197918
- dollar = '$'
197919
- }
197920
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
197921
- re = newRe
197922
- }
197923
-
197924
- // if the re is not "" at this point, then we need to make sure
197925
- // it doesn't match against an empty path part.
197926
- // Otherwise a/* will match a/, which it should not.
197927
- if (re !== '' && hasMagic) {
197928
- re = '(?=.)' + re
197929
- }
197930
-
197931
- if (addPatternStart) {
197932
- re = patternStart + re
197933
- }
197934
-
197935
- // parsing just a piece of a larger pattern.
197936
- if (isSub === SUBPARSE) {
197937
- return [re, hasMagic]
197938
- }
197939
-
197940
- // skip the regexp for non-magical patterns
197941
- // unescape anything in it, though, so that it'll be
197942
- // an exact match against a file etc.
197943
- if (!hasMagic) {
197944
- return globUnescape(pattern)
197945
- }
197946
-
197947
- var flags = options.nocase ? 'i' : ''
197948
- try {
197949
- var regExp = new RegExp('^' + re + '$', flags)
197950
- } catch (er) /* istanbul ignore next - should be impossible */ {
197951
- // If it was an invalid regular expression, then it can't match
197952
- // anything. This trick looks for a character after the end of
197953
- // the string, which is of course impossible, except in multi-line
197954
- // mode, but it's not a /m regex.
197955
- return new RegExp('$.')
197956
- }
197957
-
197958
- regExp._glob = pattern
197959
- regExp._src = re
197960
-
197961
- return regExp
197962
- }
197963
-
197964
- minimatch.makeRe = function (pattern, options) {
197965
- return new Minimatch(pattern, options || {}).makeRe()
197966
- }
197967
-
197968
- Minimatch.prototype.makeRe = makeRe
197969
- function makeRe () {
197970
- if (this.regexp || this.regexp === false) return this.regexp
197971
-
197972
- // at this point, this.set is a 2d array of partial
197973
- // pattern strings, or "**".
197974
- //
197975
- // It's better to use .match(). This function shouldn't
197976
- // be used, really, but it's pretty convenient sometimes,
197977
- // when you just want to work with a regex.
197978
- var set = this.set
197979
-
197980
- if (!set.length) {
197981
- this.regexp = false
197982
- return this.regexp
197983
- }
197984
- var options = this.options
197985
-
197986
- var twoStar = options.noglobstar ? star
197987
- : options.dot ? twoStarDot
197988
- : twoStarNoDot
197989
- var flags = options.nocase ? 'i' : ''
197990
-
197991
- var re = set.map(function (pattern) {
197992
- return pattern.map(function (p) {
197993
- return (p === GLOBSTAR) ? twoStar
197994
- : (typeof p === 'string') ? regExpEscape(p)
197995
- : p._src
197996
- }).join('\\\/')
197997
- }).join('|')
197998
-
197999
- // must match entire pattern
198000
- // ending in a * or ** will make it less strict.
198001
- re = '^(?:' + re + ')$'
198002
-
198003
- // can match anything, as long as it's not this.
198004
- if (this.negate) re = '^(?!' + re + ').*$'
198005
-
198006
- try {
198007
- this.regexp = new RegExp(re, flags)
198008
- } catch (ex) /* istanbul ignore next - should be impossible */ {
198009
- this.regexp = false
198010
- }
198011
- return this.regexp
198012
- }
198013
-
198014
- minimatch.match = function (list, pattern, options) {
198015
- options = options || {}
198016
- var mm = new Minimatch(pattern, options)
198017
- list = list.filter(function (f) {
198018
- return mm.match(f)
198019
- })
198020
- if (mm.options.nonull && !list.length) {
198021
- list.push(pattern)
198022
- }
198023
- return list
198024
- }
198025
-
198026
- Minimatch.prototype.match = function match (f, partial) {
198027
- if (typeof partial === 'undefined') partial = this.partial
198028
- this.debug('match', f, this.pattern)
198029
- // short-circuit in the case of busted things.
198030
- // comments, etc.
198031
- if (this.comment) return false
198032
- if (this.empty) return f === ''
198033
-
198034
- if (f === '/' && partial) return true
198035
-
198036
- var options = this.options
198037
-
198038
- // windows: need to use /, not \
198039
- if (path.sep !== '/') {
198040
- f = f.split(path.sep).join('/')
198041
- }
198042
-
198043
- // treat the test path as a set of pathparts.
198044
- f = f.split(slashSplit)
198045
- this.debug(this.pattern, 'split', f)
198046
-
198047
- // just ONE of the pattern sets in this.set needs to match
198048
- // in order for it to be valid. If negating, then just one
198049
- // match means that we have failed.
198050
- // Either way, return on the first hit.
198051
-
198052
- var set = this.set
198053
- this.debug(this.pattern, 'set', set)
198054
-
198055
- // Find the basename of the path by looking for the last non-empty segment
198056
- var filename
198057
- var i
198058
- for (i = f.length - 1; i >= 0; i--) {
198059
- filename = f[i]
198060
- if (filename) break
198061
- }
198062
-
198063
- for (i = 0; i < set.length; i++) {
198064
- var pattern = set[i]
198065
- var file = f
198066
- if (options.matchBase && pattern.length === 1) {
198067
- file = [filename]
198068
- }
198069
- var hit = this.matchOne(file, pattern, partial)
198070
- if (hit) {
198071
- if (options.flipNegate) return true
198072
- return !this.negate
198073
- }
198074
- }
198075
-
198076
- // didn't get any hits. this is success if it's a negative
198077
- // pattern, failure otherwise.
198078
- if (options.flipNegate) return false
198079
- return this.negate
198080
- }
198081
-
198082
- // set partial to true to test if, for example,
198083
- // "/a/b" matches the start of "/*/b/*/d"
198084
- // Partial means, if you run out of file before you run
198085
- // out of pattern, then that's fine, as long as all
198086
- // the parts match.
198087
- Minimatch.prototype.matchOne = function (file, pattern, partial) {
198088
- var options = this.options
198089
-
198090
- this.debug('matchOne',
198091
- { 'this': this, file: file, pattern: pattern })
198092
-
198093
- this.debug('matchOne', file.length, pattern.length)
198094
-
198095
- for (var fi = 0,
198096
- pi = 0,
198097
- fl = file.length,
198098
- pl = pattern.length
198099
- ; (fi < fl) && (pi < pl)
198100
- ; fi++, pi++) {
198101
- this.debug('matchOne loop')
198102
- var p = pattern[pi]
198103
- var f = file[fi]
198104
-
198105
- this.debug(pattern, p, f)
198106
-
198107
- // should be impossible.
198108
- // some invalid regexp stuff in the set.
198109
- /* istanbul ignore if */
198110
- if (p === false) return false
198111
-
198112
- if (p === GLOBSTAR) {
198113
- this.debug('GLOBSTAR', [pattern, p, f])
198114
-
198115
- // "**"
198116
- // a/**/b/**/c would match the following:
198117
- // a/b/x/y/z/c
198118
- // a/x/y/z/b/c
198119
- // a/b/x/b/x/c
198120
- // a/b/c
198121
- // To do this, take the rest of the pattern after
198122
- // the **, and see if it would match the file remainder.
198123
- // If so, return success.
198124
- // If not, the ** "swallows" a segment, and try again.
198125
- // This is recursively awful.
198126
- //
198127
- // a/**/b/**/c matching a/b/x/y/z/c
198128
- // - a matches a
198129
- // - doublestar
198130
- // - matchOne(b/x/y/z/c, b/**/c)
198131
- // - b matches b
198132
- // - doublestar
198133
- // - matchOne(x/y/z/c, c) -> no
198134
- // - matchOne(y/z/c, c) -> no
198135
- // - matchOne(z/c, c) -> no
198136
- // - matchOne(c, c) yes, hit
198137
- var fr = fi
198138
- var pr = pi + 1
198139
- if (pr === pl) {
198140
- this.debug('** at the end')
198141
- // a ** at the end will just swallow the rest.
198142
- // We have found a match.
198143
- // however, it will not swallow /.x, unless
198144
- // options.dot is set.
198145
- // . and .. are *never* matched by **, for explosively
198146
- // exponential reasons.
198147
- for (; fi < fl; fi++) {
198148
- if (file[fi] === '.' || file[fi] === '..' ||
198149
- (!options.dot && file[fi].charAt(0) === '.')) return false
198150
- }
198151
- return true
198152
- }
198153
-
198154
- // ok, let's see if we can swallow whatever we can.
198155
- while (fr < fl) {
198156
- var swallowee = file[fr]
198157
-
198158
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
198159
-
198160
- // XXX remove this slice. Just pass the start index.
198161
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
198162
- this.debug('globstar found match!', fr, fl, swallowee)
198163
- // found a match.
198164
- return true
198165
- } else {
198166
- // can't swallow "." or ".." ever.
198167
- // can only swallow ".foo" when explicitly asked.
198168
- if (swallowee === '.' || swallowee === '..' ||
198169
- (!options.dot && swallowee.charAt(0) === '.')) {
198170
- this.debug('dot detected!', file, fr, pattern, pr)
198171
- break
198172
- }
198173
-
198174
- // ** swallows a segment, and continue.
198175
- this.debug('globstar swallow a segment, and continue')
198176
- fr++
198177
- }
198178
- }
198179
-
198180
- // no match was found.
198181
- // However, in partial mode, we can't say this is necessarily over.
198182
- // If there's more *pattern* left, then
198183
- /* istanbul ignore if */
198184
- if (partial) {
198185
- // ran out of file
198186
- this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
198187
- if (fr === fl) return true
198188
- }
198189
- return false
198190
- }
198191
-
198192
- // something other than **
198193
- // non-magic patterns just have to match exactly
198194
- // patterns with magic have been turned into regexps.
198195
- var hit
198196
- if (typeof p === 'string') {
198197
- hit = f === p
198198
- this.debug('string match', p, f, hit)
198199
- } else {
198200
- hit = f.match(p)
198201
- this.debug('pattern match', p, f, hit)
198202
- }
198203
-
198204
- if (!hit) return false
198205
- }
198206
-
198207
- // Note: ending in / means that we'll get a final ""
198208
- // at the end of the pattern. This can only match a
198209
- // corresponding "" at the end of the file.
198210
- // If the file ends in /, then it can only match a
198211
- // a pattern that ends in /, unless the pattern just
198212
- // doesn't have any more for it. But, a/b/ should *not*
198213
- // match "a/b/*", even though "" matches against the
198214
- // [^/]*? pattern, except in partial mode, where it might
198215
- // simply not be reached yet.
198216
- // However, a/b/ should still satisfy a/*
198217
-
198218
- // now either we fell off the end of the pattern, or we're done.
198219
- if (fi === fl && pi === pl) {
198220
- // ran out of pattern and filename at the same time.
198221
- // an exact hit!
198222
- return true
198223
- } else if (fi === fl) {
198224
- // ran out of file, but still had pattern left.
198225
- // this is ok if we're doing the match as part of
198226
- // a glob fs traversal.
198227
- return partial
198228
- } else /* istanbul ignore else */ if (pi === pl) {
198229
- // ran out of pattern, still have file left.
198230
- // this is only acceptable if we're on the very last
198231
- // empty segment of a file with a trailing slash.
198232
- // a/* should match a/b/
198233
- return (fi === fl - 1) && (file[fi] === '')
198234
- }
198235
-
198236
- // should be unreachable.
198237
- /* istanbul ignore next */
198238
- throw new Error('wtf?')
198239
- }
198240
-
198241
- // replace stuff like \* with *
198242
- function globUnescape (s) {
198243
- return s.replace(/\\(.)/g, '$1')
198244
- }
198245
-
198246
- function regExpEscape (s) {
198247
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
198248
- }
198249
-
198250
-
198251
197297
  /***/ }),
198252
197298
 
198253
197299
  /***/ 5314:
@@ -237437,7 +236483,7 @@ exports.frameworks = [
237437
236483
  description: 'A new Remix app — the result of running `npx create-remix`.',
237438
236484
  website: 'https://remix.run',
237439
236485
  sort: 6,
237440
- useRuntime: { src: 'package.json', use: '@vercel/remix' },
236486
+ useRuntime: { src: 'package.json', use: '@vercel/remix-builder' },
237441
236487
  ignoreRuntimes: ['@vercel/node'],
237442
236488
  detectors: {
237443
236489
  some: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "1.3.16",
3
+ "version": "1.3.17",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@vercel/gatsby-plugin-vercel-analytics": "1.0.8",
33
- "@vercel/gatsby-plugin-vercel-builder": "1.2.1"
33
+ "@vercel/gatsby-plugin-vercel-builder": "1.2.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/aws-lambda": "8.10.64",
@@ -42,12 +42,12 @@
42
42
  "@types/node-fetch": "2.5.4",
43
43
  "@types/promise-timeout": "1.3.0",
44
44
  "@types/semver": "7.3.13",
45
- "@vercel/build-utils": "6.3.4",
46
- "@vercel/frameworks": "1.3.2",
47
- "@vercel/fs-detectors": "3.8.4",
45
+ "@vercel/build-utils": "6.4.0",
46
+ "@vercel/frameworks": "1.3.3",
47
+ "@vercel/fs-detectors": "3.8.5",
48
48
  "@vercel/ncc": "0.24.0",
49
- "@vercel/routing-utils": "2.1.10",
50
- "@vercel/static-config": "2.0.13",
49
+ "@vercel/routing-utils": "2.1.11",
50
+ "@vercel/static-config": "2.0.14",
51
51
  "execa": "3.2.0",
52
52
  "fs-extra": "10.0.0",
53
53
  "get-port": "5.0.0",
@@ -60,5 +60,5 @@
60
60
  "ts-morph": "12.0.0",
61
61
  "typescript": "4.3.4"
62
62
  },
63
- "gitHead": "21a440b83262760ccae70f5c58dc73b3718182a5"
63
+ "gitHead": "b2c68f1301b6a5eb41b6261b7faac6a8fa4c53eb"
64
64
  }