vercel 25.1.1-canary.0 → 25.1.1-canary.11
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 +665 -183
- package/package.json +17 -14
package/dist/index.js
CHANGED
@@ -28433,116 +28433,6 @@ function tryAutoDetect(){
|
|
28433
28433
|
}
|
28434
28434
|
|
28435
28435
|
|
28436
|
-
/***/ }),
|
28437
|
-
|
28438
|
-
/***/ 52056:
|
28439
|
-
/***/ ((module, exports, __webpack_require__) => {
|
28440
|
-
|
28441
|
-
"use strict";
|
28442
|
-
|
28443
|
-
|
28444
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
28445
|
-
|
28446
|
-
const picomatch = __webpack_require__(9138);
|
28447
|
-
const normalizePath = __webpack_require__(34458);
|
28448
|
-
|
28449
|
-
/**
|
28450
|
-
* @typedef {(testString: string) => boolean} AnymatchFn
|
28451
|
-
* @typedef {string|RegExp|AnymatchFn} AnymatchPattern
|
28452
|
-
* @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher
|
28453
|
-
*/
|
28454
|
-
const BANG = '!';
|
28455
|
-
const DEFAULT_OPTIONS = {returnIndex: false};
|
28456
|
-
const arrify = (item) => Array.isArray(item) ? item : [item];
|
28457
|
-
|
28458
|
-
/**
|
28459
|
-
* @param {AnymatchPattern} matcher
|
28460
|
-
* @param {object} options
|
28461
|
-
* @returns {AnymatchFn}
|
28462
|
-
*/
|
28463
|
-
const createPattern = (matcher, options) => {
|
28464
|
-
if (typeof matcher === 'function') {
|
28465
|
-
return matcher;
|
28466
|
-
}
|
28467
|
-
if (typeof matcher === 'string') {
|
28468
|
-
const glob = picomatch(matcher, options);
|
28469
|
-
return (string) => matcher === string || glob(string);
|
28470
|
-
}
|
28471
|
-
if (matcher instanceof RegExp) {
|
28472
|
-
return (string) => matcher.test(string);
|
28473
|
-
}
|
28474
|
-
return (string) => false;
|
28475
|
-
};
|
28476
|
-
|
28477
|
-
/**
|
28478
|
-
* @param {Array<Function>} patterns
|
28479
|
-
* @param {Array<Function>} negPatterns
|
28480
|
-
* @param {String|Array} args
|
28481
|
-
* @param {Boolean} returnIndex
|
28482
|
-
* @returns {boolean|number}
|
28483
|
-
*/
|
28484
|
-
const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
|
28485
|
-
const isList = Array.isArray(args);
|
28486
|
-
const _path = isList ? args[0] : args;
|
28487
|
-
if (!isList && typeof _path !== 'string') {
|
28488
|
-
throw new TypeError('anymatch: second argument must be a string: got ' +
|
28489
|
-
Object.prototype.toString.call(_path))
|
28490
|
-
}
|
28491
|
-
const path = normalizePath(_path);
|
28492
|
-
|
28493
|
-
for (let index = 0; index < negPatterns.length; index++) {
|
28494
|
-
const nglob = negPatterns[index];
|
28495
|
-
if (nglob(path)) {
|
28496
|
-
return returnIndex ? -1 : false;
|
28497
|
-
}
|
28498
|
-
}
|
28499
|
-
|
28500
|
-
const applied = isList && [path].concat(args.slice(1));
|
28501
|
-
for (let index = 0; index < patterns.length; index++) {
|
28502
|
-
const pattern = patterns[index];
|
28503
|
-
if (isList ? pattern(...applied) : pattern(path)) {
|
28504
|
-
return returnIndex ? index : true;
|
28505
|
-
}
|
28506
|
-
}
|
28507
|
-
|
28508
|
-
return returnIndex ? -1 : false;
|
28509
|
-
};
|
28510
|
-
|
28511
|
-
/**
|
28512
|
-
* @param {AnymatchMatcher} matchers
|
28513
|
-
* @param {Array|string} testString
|
28514
|
-
* @param {object} options
|
28515
|
-
* @returns {boolean|number|Function}
|
28516
|
-
*/
|
28517
|
-
const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
|
28518
|
-
if (matchers == null) {
|
28519
|
-
throw new TypeError('anymatch: specify first argument');
|
28520
|
-
}
|
28521
|
-
const opts = typeof options === 'boolean' ? {returnIndex: options} : options;
|
28522
|
-
const returnIndex = opts.returnIndex || false;
|
28523
|
-
|
28524
|
-
// Early cache for matchers.
|
28525
|
-
const mtchers = arrify(matchers);
|
28526
|
-
const negatedGlobs = mtchers
|
28527
|
-
.filter(item => typeof item === 'string' && item.charAt(0) === BANG)
|
28528
|
-
.map(item => item.slice(1))
|
28529
|
-
.map(item => picomatch(item, opts));
|
28530
|
-
const patterns = mtchers.map(matcher => createPattern(matcher, opts));
|
28531
|
-
|
28532
|
-
if (testString == null) {
|
28533
|
-
return (testString, ri = false) => {
|
28534
|
-
const returnIndex = typeof ri === 'boolean' ? ri : false;
|
28535
|
-
return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
|
28536
|
-
}
|
28537
|
-
}
|
28538
|
-
|
28539
|
-
return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
|
28540
|
-
};
|
28541
|
-
|
28542
|
-
anymatch.default = anymatch;
|
28543
|
-
module.exports = anymatch;
|
28544
|
-
|
28545
|
-
|
28546
28436
|
/***/ }),
|
28547
28437
|
|
28548
28438
|
/***/ 57193:
|
@@ -41608,7 +41498,7 @@ const fs = __webpack_require__(35747);
|
|
41608
41498
|
const sysPath = __webpack_require__(85622);
|
41609
41499
|
const { promisify } = __webpack_require__(31669);
|
41610
41500
|
const readdirp = __webpack_require__(85316);
|
41611
|
-
const anymatch = __webpack_require__(
|
41501
|
+
const anymatch = __webpack_require__(3140).default;
|
41612
41502
|
const globParent = __webpack_require__(97507);
|
41613
41503
|
const isGlob = __webpack_require__(24042);
|
41614
41504
|
const braces = __webpack_require__(40538);
|
@@ -43776,6 +43666,116 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
|
|
43776
43666
|
module.exports = NodeFsHandler;
|
43777
43667
|
|
43778
43668
|
|
43669
|
+
/***/ }),
|
43670
|
+
|
43671
|
+
/***/ 3140:
|
43672
|
+
/***/ ((module, exports, __webpack_require__) => {
|
43673
|
+
|
43674
|
+
"use strict";
|
43675
|
+
|
43676
|
+
|
43677
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
43678
|
+
|
43679
|
+
const picomatch = __webpack_require__(9138);
|
43680
|
+
const normalizePath = __webpack_require__(34458);
|
43681
|
+
|
43682
|
+
/**
|
43683
|
+
* @typedef {(testString: string) => boolean} AnymatchFn
|
43684
|
+
* @typedef {string|RegExp|AnymatchFn} AnymatchPattern
|
43685
|
+
* @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher
|
43686
|
+
*/
|
43687
|
+
const BANG = '!';
|
43688
|
+
const DEFAULT_OPTIONS = {returnIndex: false};
|
43689
|
+
const arrify = (item) => Array.isArray(item) ? item : [item];
|
43690
|
+
|
43691
|
+
/**
|
43692
|
+
* @param {AnymatchPattern} matcher
|
43693
|
+
* @param {object} options
|
43694
|
+
* @returns {AnymatchFn}
|
43695
|
+
*/
|
43696
|
+
const createPattern = (matcher, options) => {
|
43697
|
+
if (typeof matcher === 'function') {
|
43698
|
+
return matcher;
|
43699
|
+
}
|
43700
|
+
if (typeof matcher === 'string') {
|
43701
|
+
const glob = picomatch(matcher, options);
|
43702
|
+
return (string) => matcher === string || glob(string);
|
43703
|
+
}
|
43704
|
+
if (matcher instanceof RegExp) {
|
43705
|
+
return (string) => matcher.test(string);
|
43706
|
+
}
|
43707
|
+
return (string) => false;
|
43708
|
+
};
|
43709
|
+
|
43710
|
+
/**
|
43711
|
+
* @param {Array<Function>} patterns
|
43712
|
+
* @param {Array<Function>} negPatterns
|
43713
|
+
* @param {String|Array} args
|
43714
|
+
* @param {Boolean} returnIndex
|
43715
|
+
* @returns {boolean|number}
|
43716
|
+
*/
|
43717
|
+
const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
|
43718
|
+
const isList = Array.isArray(args);
|
43719
|
+
const _path = isList ? args[0] : args;
|
43720
|
+
if (!isList && typeof _path !== 'string') {
|
43721
|
+
throw new TypeError('anymatch: second argument must be a string: got ' +
|
43722
|
+
Object.prototype.toString.call(_path))
|
43723
|
+
}
|
43724
|
+
const path = normalizePath(_path);
|
43725
|
+
|
43726
|
+
for (let index = 0; index < negPatterns.length; index++) {
|
43727
|
+
const nglob = negPatterns[index];
|
43728
|
+
if (nglob(path)) {
|
43729
|
+
return returnIndex ? -1 : false;
|
43730
|
+
}
|
43731
|
+
}
|
43732
|
+
|
43733
|
+
const applied = isList && [path].concat(args.slice(1));
|
43734
|
+
for (let index = 0; index < patterns.length; index++) {
|
43735
|
+
const pattern = patterns[index];
|
43736
|
+
if (isList ? pattern(...applied) : pattern(path)) {
|
43737
|
+
return returnIndex ? index : true;
|
43738
|
+
}
|
43739
|
+
}
|
43740
|
+
|
43741
|
+
return returnIndex ? -1 : false;
|
43742
|
+
};
|
43743
|
+
|
43744
|
+
/**
|
43745
|
+
* @param {AnymatchMatcher} matchers
|
43746
|
+
* @param {Array|string} testString
|
43747
|
+
* @param {object} options
|
43748
|
+
* @returns {boolean|number|Function}
|
43749
|
+
*/
|
43750
|
+
const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
|
43751
|
+
if (matchers == null) {
|
43752
|
+
throw new TypeError('anymatch: specify first argument');
|
43753
|
+
}
|
43754
|
+
const opts = typeof options === 'boolean' ? {returnIndex: options} : options;
|
43755
|
+
const returnIndex = opts.returnIndex || false;
|
43756
|
+
|
43757
|
+
// Early cache for matchers.
|
43758
|
+
const mtchers = arrify(matchers);
|
43759
|
+
const negatedGlobs = mtchers
|
43760
|
+
.filter(item => typeof item === 'string' && item.charAt(0) === BANG)
|
43761
|
+
.map(item => item.slice(1))
|
43762
|
+
.map(item => picomatch(item, opts));
|
43763
|
+
const patterns = mtchers.map(matcher => createPattern(matcher, opts));
|
43764
|
+
|
43765
|
+
if (testString == null) {
|
43766
|
+
return (testString, ri = false) => {
|
43767
|
+
const returnIndex = typeof ri === 'boolean' ? ri : false;
|
43768
|
+
return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
|
43769
|
+
}
|
43770
|
+
}
|
43771
|
+
|
43772
|
+
return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
|
43773
|
+
};
|
43774
|
+
|
43775
|
+
anymatch.default = anymatch;
|
43776
|
+
module.exports = anymatch;
|
43777
|
+
|
43778
|
+
|
43779
43779
|
/***/ }),
|
43780
43780
|
|
43781
43781
|
/***/ 5952:
|
@@ -68574,6 +68574,87 @@ module.exports.array = (stream, options) => getStream(stream, Object.assign({},
|
|
68574
68574
|
module.exports.MaxBufferError = MaxBufferError;
|
68575
68575
|
|
68576
68576
|
|
68577
|
+
/***/ }),
|
68578
|
+
|
68579
|
+
/***/ 13495:
|
68580
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
68581
|
+
|
68582
|
+
const process = __webpack_require__(63129),
|
68583
|
+
splitCharacter = '<##>'
|
68584
|
+
|
68585
|
+
const executeCommand = (command, options, callback) => {
|
68586
|
+
let dst = __dirname
|
68587
|
+
|
68588
|
+
if(!!options && options.dst) {
|
68589
|
+
dst = options.dst
|
68590
|
+
}
|
68591
|
+
|
68592
|
+
process.exec(command, {cwd: dst}, function(err, stdout, stderr) {
|
68593
|
+
if (stdout === '') {
|
68594
|
+
callback('this does not look like a git repo')
|
68595
|
+
return
|
68596
|
+
}
|
68597
|
+
|
68598
|
+
if (stderr) {
|
68599
|
+
callback(stderr)
|
68600
|
+
return
|
68601
|
+
}
|
68602
|
+
|
68603
|
+
callback(null, stdout)
|
68604
|
+
})
|
68605
|
+
}
|
68606
|
+
|
68607
|
+
const prettyFormat = ["%h", "%H", "%s", "%f", "%b", "%at", "%ct", "%an", "%ae", "%cn", "%ce", "%N", ""]
|
68608
|
+
|
68609
|
+
const getCommandString = splitCharacter =>
|
68610
|
+
'git log -1 --pretty=format:"' + prettyFormat.join(splitCharacter) +'"' +
|
68611
|
+
' && git rev-parse --abbrev-ref HEAD' +
|
68612
|
+
' && git tag --contains HEAD'
|
68613
|
+
|
68614
|
+
const getLastCommit = (callback, options) => {
|
68615
|
+
const command = getCommandString(splitCharacter)
|
68616
|
+
|
68617
|
+
executeCommand(command, options, function(err, res) {
|
68618
|
+
if (err) {
|
68619
|
+
callback(err)
|
68620
|
+
return
|
68621
|
+
}
|
68622
|
+
|
68623
|
+
var a = res.split(splitCharacter)
|
68624
|
+
|
68625
|
+
// e.g. master\n or master\nv1.1\n or master\nv1.1\nv1.2\n
|
68626
|
+
var branchAndTags = a[a.length-1].split('\n').filter(n => n)
|
68627
|
+
var branch = branchAndTags[0]
|
68628
|
+
var tags = branchAndTags.slice(1)
|
68629
|
+
|
68630
|
+
callback(null, {
|
68631
|
+
shortHash: a[0],
|
68632
|
+
hash: a[1],
|
68633
|
+
subject: a[2],
|
68634
|
+
sanitizedSubject: a[3],
|
68635
|
+
body: a[4],
|
68636
|
+
authoredOn: a[5],
|
68637
|
+
committedOn: a[6],
|
68638
|
+
author: {
|
68639
|
+
name: a[7],
|
68640
|
+
email: a[8],
|
68641
|
+
},
|
68642
|
+
committer: {
|
68643
|
+
name: a[9],
|
68644
|
+
email: a[10]
|
68645
|
+
},
|
68646
|
+
notes: a[11],
|
68647
|
+
branch,
|
68648
|
+
tags
|
68649
|
+
})
|
68650
|
+
})
|
68651
|
+
}
|
68652
|
+
|
68653
|
+
module.exports = {
|
68654
|
+
getLastCommit
|
68655
|
+
}
|
68656
|
+
|
68657
|
+
|
68577
68658
|
/***/ }),
|
68578
68659
|
|
68579
68660
|
/***/ 97507:
|
@@ -212193,6 +212274,241 @@ module.exports = (flag, argv = process.argv) => {
|
|
212193
212274
|
};
|
212194
212275
|
|
212195
212276
|
|
212277
|
+
/***/ }),
|
212278
|
+
|
212279
|
+
/***/ 61967:
|
212280
|
+
/***/ ((module) => {
|
212281
|
+
|
212282
|
+
const { hasOwnProperty } = Object.prototype
|
212283
|
+
|
212284
|
+
/* istanbul ignore next */
|
212285
|
+
const eol = typeof process !== 'undefined' &&
|
212286
|
+
process.platform === 'win32' ? '\r\n' : '\n'
|
212287
|
+
|
212288
|
+
const encode = (obj, opt) => {
|
212289
|
+
const children = []
|
212290
|
+
let out = ''
|
212291
|
+
|
212292
|
+
if (typeof opt === 'string') {
|
212293
|
+
opt = {
|
212294
|
+
section: opt,
|
212295
|
+
whitespace: false,
|
212296
|
+
}
|
212297
|
+
} else {
|
212298
|
+
opt = opt || Object.create(null)
|
212299
|
+
opt.whitespace = opt.whitespace === true
|
212300
|
+
}
|
212301
|
+
|
212302
|
+
const separator = opt.whitespace ? ' = ' : '='
|
212303
|
+
|
212304
|
+
for (const k of Object.keys(obj)) {
|
212305
|
+
const val = obj[k]
|
212306
|
+
if (val && Array.isArray(val)) {
|
212307
|
+
for (const item of val) {
|
212308
|
+
out += safe(k + '[]') + separator + safe(item) + eol
|
212309
|
+
}
|
212310
|
+
} else if (val && typeof val === 'object') {
|
212311
|
+
children.push(k)
|
212312
|
+
} else {
|
212313
|
+
out += safe(k) + separator + safe(val) + eol
|
212314
|
+
}
|
212315
|
+
}
|
212316
|
+
|
212317
|
+
if (opt.section && out.length) {
|
212318
|
+
out = '[' + safe(opt.section) + ']' + eol + out
|
212319
|
+
}
|
212320
|
+
|
212321
|
+
for (const k of children) {
|
212322
|
+
const nk = dotSplit(k).join('\\.')
|
212323
|
+
const section = (opt.section ? opt.section + '.' : '') + nk
|
212324
|
+
const { whitespace } = opt
|
212325
|
+
const child = encode(obj[k], {
|
212326
|
+
section,
|
212327
|
+
whitespace,
|
212328
|
+
})
|
212329
|
+
if (out.length && child.length) {
|
212330
|
+
out += eol
|
212331
|
+
}
|
212332
|
+
|
212333
|
+
out += child
|
212334
|
+
}
|
212335
|
+
|
212336
|
+
return out
|
212337
|
+
}
|
212338
|
+
|
212339
|
+
const dotSplit = str =>
|
212340
|
+
str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002')
|
212341
|
+
.replace(/\\\./g, '\u0001')
|
212342
|
+
.split(/\./)
|
212343
|
+
.map(part =>
|
212344
|
+
part.replace(/\1/g, '\\.')
|
212345
|
+
.replace(/\2LITERAL\\1LITERAL\2/g, '\u0001'))
|
212346
|
+
|
212347
|
+
const decode = str => {
|
212348
|
+
const out = Object.create(null)
|
212349
|
+
let p = out
|
212350
|
+
let section = null
|
212351
|
+
// section |key = value
|
212352
|
+
const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i
|
212353
|
+
const lines = str.split(/[\r\n]+/g)
|
212354
|
+
|
212355
|
+
for (const line of lines) {
|
212356
|
+
if (!line || line.match(/^\s*[;#]/)) {
|
212357
|
+
continue
|
212358
|
+
}
|
212359
|
+
const match = line.match(re)
|
212360
|
+
if (!match) {
|
212361
|
+
continue
|
212362
|
+
}
|
212363
|
+
if (match[1] !== undefined) {
|
212364
|
+
section = unsafe(match[1])
|
212365
|
+
if (section === '__proto__') {
|
212366
|
+
// not allowed
|
212367
|
+
// keep parsing the section, but don't attach it.
|
212368
|
+
p = Object.create(null)
|
212369
|
+
continue
|
212370
|
+
}
|
212371
|
+
p = out[section] = out[section] || Object.create(null)
|
212372
|
+
continue
|
212373
|
+
}
|
212374
|
+
const keyRaw = unsafe(match[2])
|
212375
|
+
const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === '[]'
|
212376
|
+
const key = isArray ? keyRaw.slice(0, -2) : keyRaw
|
212377
|
+
if (key === '__proto__') {
|
212378
|
+
continue
|
212379
|
+
}
|
212380
|
+
const valueRaw = match[3] ? unsafe(match[4]) : true
|
212381
|
+
const value = valueRaw === 'true' ||
|
212382
|
+
valueRaw === 'false' ||
|
212383
|
+
valueRaw === 'null' ? JSON.parse(valueRaw)
|
212384
|
+
: valueRaw
|
212385
|
+
|
212386
|
+
// Convert keys with '[]' suffix to an array
|
212387
|
+
if (isArray) {
|
212388
|
+
if (!hasOwnProperty.call(p, key)) {
|
212389
|
+
p[key] = []
|
212390
|
+
} else if (!Array.isArray(p[key])) {
|
212391
|
+
p[key] = [p[key]]
|
212392
|
+
}
|
212393
|
+
}
|
212394
|
+
|
212395
|
+
// safeguard against resetting a previously defined
|
212396
|
+
// array by accidentally forgetting the brackets
|
212397
|
+
if (Array.isArray(p[key])) {
|
212398
|
+
p[key].push(value)
|
212399
|
+
} else {
|
212400
|
+
p[key] = value
|
212401
|
+
}
|
212402
|
+
}
|
212403
|
+
|
212404
|
+
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
|
212405
|
+
// use a filter to return the keys that have to be deleted.
|
212406
|
+
const remove = []
|
212407
|
+
for (const k of Object.keys(out)) {
|
212408
|
+
if (!hasOwnProperty.call(out, k) ||
|
212409
|
+
typeof out[k] !== 'object' ||
|
212410
|
+
Array.isArray(out[k])) {
|
212411
|
+
continue
|
212412
|
+
}
|
212413
|
+
|
212414
|
+
// see if the parent section is also an object.
|
212415
|
+
// if so, add it to that, and mark this one for deletion
|
212416
|
+
const parts = dotSplit(k)
|
212417
|
+
p = out
|
212418
|
+
const l = parts.pop()
|
212419
|
+
const nl = l.replace(/\\\./g, '.')
|
212420
|
+
for (const part of parts) {
|
212421
|
+
if (part === '__proto__') {
|
212422
|
+
continue
|
212423
|
+
}
|
212424
|
+
if (!hasOwnProperty.call(p, part) || typeof p[part] !== 'object') {
|
212425
|
+
p[part] = Object.create(null)
|
212426
|
+
}
|
212427
|
+
p = p[part]
|
212428
|
+
}
|
212429
|
+
if (p === out && nl === l) {
|
212430
|
+
continue
|
212431
|
+
}
|
212432
|
+
|
212433
|
+
p[nl] = out[k]
|
212434
|
+
remove.push(k)
|
212435
|
+
}
|
212436
|
+
for (const del of remove) {
|
212437
|
+
delete out[del]
|
212438
|
+
}
|
212439
|
+
|
212440
|
+
return out
|
212441
|
+
}
|
212442
|
+
|
212443
|
+
const isQuoted = val => {
|
212444
|
+
return (val.startsWith('"') && val.endsWith('"')) ||
|
212445
|
+
(val.startsWith("'") && val.endsWith("'"))
|
212446
|
+
}
|
212447
|
+
|
212448
|
+
const safe = val => {
|
212449
|
+
if (
|
212450
|
+
typeof val !== 'string' ||
|
212451
|
+
val.match(/[=\r\n]/) ||
|
212452
|
+
val.match(/^\[/) ||
|
212453
|
+
(val.length > 1 && isQuoted(val)) ||
|
212454
|
+
val !== val.trim()
|
212455
|
+
) {
|
212456
|
+
return JSON.stringify(val)
|
212457
|
+
}
|
212458
|
+
return val.split(';').join('\\;').split('#').join('\\#')
|
212459
|
+
}
|
212460
|
+
|
212461
|
+
const unsafe = (val, doUnesc) => {
|
212462
|
+
val = (val || '').trim()
|
212463
|
+
if (isQuoted(val)) {
|
212464
|
+
// remove the single quotes before calling JSON.parse
|
212465
|
+
if (val.charAt(0) === "'") {
|
212466
|
+
val = val.slice(1, -1)
|
212467
|
+
}
|
212468
|
+
try {
|
212469
|
+
val = JSON.parse(val)
|
212470
|
+
} catch (_) {}
|
212471
|
+
} else {
|
212472
|
+
// walk the val to find the first not-escaped ; character
|
212473
|
+
let esc = false
|
212474
|
+
let unesc = ''
|
212475
|
+
for (let i = 0, l = val.length; i < l; i++) {
|
212476
|
+
const c = val.charAt(i)
|
212477
|
+
if (esc) {
|
212478
|
+
if ('\\;#'.indexOf(c) !== -1) {
|
212479
|
+
unesc += c
|
212480
|
+
} else {
|
212481
|
+
unesc += '\\' + c
|
212482
|
+
}
|
212483
|
+
|
212484
|
+
esc = false
|
212485
|
+
} else if (';#'.indexOf(c) !== -1) {
|
212486
|
+
break
|
212487
|
+
} else if (c === '\\') {
|
212488
|
+
esc = true
|
212489
|
+
} else {
|
212490
|
+
unesc += c
|
212491
|
+
}
|
212492
|
+
}
|
212493
|
+
if (esc) {
|
212494
|
+
unesc += '\\'
|
212495
|
+
}
|
212496
|
+
|
212497
|
+
return unesc.trim()
|
212498
|
+
}
|
212499
|
+
return val
|
212500
|
+
}
|
212501
|
+
|
212502
|
+
module.exports = {
|
212503
|
+
parse: decode,
|
212504
|
+
decode,
|
212505
|
+
stringify: encode,
|
212506
|
+
encode,
|
212507
|
+
safe,
|
212508
|
+
unsafe,
|
212509
|
+
}
|
212510
|
+
|
212511
|
+
|
212196
212512
|
/***/ }),
|
212197
212513
|
|
212198
212514
|
/***/ 16337:
|
@@ -230843,6 +231159,7 @@ const help = () => {
|
|
230843
231159
|
-A ${chalk_1.default.bold.underline('FILE')}, --local-config=${chalk_1.default.bold.underline('FILE')} Path to the local ${'`vercel.json`'} file
|
230844
231160
|
-Q ${chalk_1.default.bold.underline('DIR')}, --global-config=${chalk_1.default.bold.underline('DIR')} Path to the global ${'`.vercel`'} directory
|
230845
231161
|
--cwd [path] The current working directory
|
231162
|
+
--output [path] Directory where built assets should be written to
|
230846
231163
|
--prod Build a production deployment
|
230847
231164
|
-d, --debug Debug mode [off]
|
230848
231165
|
-y, --yes Skip the confirmation prompt
|
@@ -230869,6 +231186,7 @@ async function main(client) {
|
|
230869
231186
|
// Parse CLI args
|
230870
231187
|
const argv = get_args_1.default(client.argv.slice(2), {
|
230871
231188
|
'--cwd': String,
|
231189
|
+
'--output': String,
|
230872
231190
|
'--prod': Boolean,
|
230873
231191
|
'--yes': Boolean,
|
230874
231192
|
});
|
@@ -231008,7 +231326,9 @@ async function main(client) {
|
|
231008
231326
|
filesMap[path] = new build_utils_1.FileFsRef({ mode, fsPath });
|
231009
231327
|
}
|
231010
231328
|
// Delete output directory from potential previous build
|
231011
|
-
const outputDir =
|
231329
|
+
const outputDir = argv['--output']
|
231330
|
+
? path_1.resolve(argv['--output'])
|
231331
|
+
: path_1.join(cwd, write_build_result_1.OUTPUT_DIR);
|
231012
231332
|
await fs_extra_1.default.remove(outputDir);
|
231013
231333
|
const buildStamp = stamp_1.default();
|
231014
231334
|
// Create fresh new output directory
|
@@ -231018,6 +231338,7 @@ async function main(client) {
|
|
231018
231338
|
ops.push(fs_extra_1.default.writeJSON(path_1.join(outputDir, 'builds.json'), {
|
231019
231339
|
'//': 'This file was generated by the `vercel build` command. It is not part of the Build Output API.',
|
231020
231340
|
target,
|
231341
|
+
argv: process.argv,
|
231021
231342
|
builds: builds.map(build => {
|
231022
231343
|
const builderWithPkg = buildersWithPkgs.get(build.use);
|
231023
231344
|
if (!builderWithPkg) {
|
@@ -231026,6 +231347,7 @@ async function main(client) {
|
|
231026
231347
|
const { builder, pkg: builderPkg } = builderWithPkg;
|
231027
231348
|
return {
|
231028
231349
|
require: builderPkg.name,
|
231350
|
+
requirePath: builderWithPkg.path,
|
231029
231351
|
apiVersion: builder.version,
|
231030
231352
|
...build,
|
231031
231353
|
};
|
@@ -231153,20 +231475,35 @@ async function main(client) {
|
|
231153
231475
|
overrides: mergedOverrides,
|
231154
231476
|
};
|
231155
231477
|
await fs_extra_1.default.writeJSON(path_1.join(outputDir, 'config.json'), config, { spaces: 2 });
|
231156
|
-
|
231478
|
+
const relOutputDir = path_1.relative(cwd, outputDir);
|
231479
|
+
output.print(`${emoji_1.prependEmoji(`Build Completed in ${chalk_1.default.bold(relOutputDir.startsWith('..') ? outputDir : relOutputDir)} ${chalk_1.default.gray(buildStamp())}`, emoji_1.emoji('success'))}\n`);
|
231157
231480
|
return 0;
|
231158
231481
|
}
|
231159
231482
|
exports.default = main;
|
231160
231483
|
function expandBuild(files, build) {
|
231161
|
-
if (!build.
|
231162
|
-
|
231163
|
-
|
231164
|
-
|
231484
|
+
if (!build.use) {
|
231485
|
+
throw new build_utils_1.NowBuildError({
|
231486
|
+
code: `invalid_build_specification`,
|
231487
|
+
message: 'Field `use` is missing in build specification',
|
231488
|
+
link: 'https://vercel.com/docs/configuration#project/builds',
|
231489
|
+
action: 'View Documentation',
|
231490
|
+
});
|
231491
|
+
}
|
231492
|
+
let src = path_1.normalize(build.src || '**');
|
231493
|
+
if (src === '.' || src === './') {
|
231494
|
+
throw new build_utils_1.NowBuildError({
|
231495
|
+
code: `invalid_build_specification`,
|
231496
|
+
message: 'A build `src` path resolves to an empty string',
|
231497
|
+
link: 'https://vercel.com/docs/configuration#project/builds',
|
231498
|
+
action: 'View Documentation',
|
231499
|
+
});
|
231500
|
+
}
|
231501
|
+
if (src[0] === '/') {
|
231165
231502
|
// Remove a leading slash so that the globbing is relative
|
231166
231503
|
// to `cwd` instead of the root of the filesystem.
|
231167
|
-
|
231504
|
+
src = src.substring(1);
|
231168
231505
|
}
|
231169
|
-
const matches = files.filter(name => name ===
|
231506
|
+
const matches = files.filter(name => name === src || minimatch_1.default(name, src, { dot: true }));
|
231170
231507
|
return matches.map(m => {
|
231171
231508
|
return {
|
231172
231509
|
...build,
|
@@ -231936,6 +232273,7 @@ const args_1 = __webpack_require__(56870);
|
|
231936
232273
|
const get_deployment_checks_1 = __webpack_require__(58293);
|
231937
232274
|
const parse_target_1 = __importDefault(__webpack_require__(77601));
|
231938
232275
|
const get_prebuilt_json_1 = __importDefault(__webpack_require__(91307));
|
232276
|
+
const create_git_meta_1 = __webpack_require__(92282);
|
231939
232277
|
exports.default = async (client) => {
|
231940
232278
|
const { output } = client;
|
231941
232279
|
let argv = null;
|
@@ -232164,6 +232502,7 @@ exports.default = async (client) => {
|
|
232164
232502
|
}
|
232165
232503
|
// build `meta`
|
232166
232504
|
const meta = Object.assign({}, parse_meta_1.default(localConfig.meta), parse_meta_1.default(argv['--meta']));
|
232505
|
+
const gitMetadata = await create_git_meta_1.createGitMeta(path, output);
|
232167
232506
|
// Merge dotenv config, `env` from vercel.json, and `--env` / `-e` arguments
|
232168
232507
|
const deploymentEnv = Object.assign({}, parseEnv(localConfig.env), parseEnv(argv['--env']));
|
232169
232508
|
// Merge build env out of `build.env` from vercel.json, and `--build-env` args
|
@@ -232190,6 +232529,14 @@ exports.default = async (client) => {
|
|
232190
232529
|
});
|
232191
232530
|
let deployStamp = stamp_1.default();
|
232192
232531
|
let deployment = null;
|
232532
|
+
const localConfigurationOverrides = {
|
232533
|
+
buildCommand: localConfig?.buildCommand,
|
232534
|
+
devCommand: localConfig?.devCommand,
|
232535
|
+
framework: localConfig?.framework,
|
232536
|
+
commandForIgnoringBuildStep: localConfig?.ignoreCommand,
|
232537
|
+
installCommand: localConfig?.installCommand,
|
232538
|
+
outputDirectory: localConfig?.outputDirectory,
|
232539
|
+
};
|
232193
232540
|
try {
|
232194
232541
|
const createArgs = {
|
232195
232542
|
name: project ? project.name : newProjectName,
|
@@ -232205,13 +232552,19 @@ exports.default = async (client) => {
|
|
232205
232552
|
nowConfig: localConfig,
|
232206
232553
|
regions,
|
232207
232554
|
meta,
|
232555
|
+
gitMetadata,
|
232208
232556
|
deployStamp,
|
232209
232557
|
target,
|
232210
232558
|
skipAutoDetectionConfirmation: autoConfirm,
|
232211
232559
|
};
|
232212
232560
|
if (!localConfig.builds || localConfig.builds.length === 0) {
|
232213
232561
|
// Only add projectSettings for zero config deployments
|
232214
|
-
createArgs.projectSettings =
|
232562
|
+
createArgs.projectSettings =
|
232563
|
+
status === 'not_linked'
|
232564
|
+
? {
|
232565
|
+
sourceFilesOutsideRootDirectory,
|
232566
|
+
}
|
232567
|
+
: { ...localConfigurationOverrides, sourceFilesOutsideRootDirectory };
|
232215
232568
|
}
|
232216
232569
|
deployment = await create_deploy_1.default(client, now, contextName, [sourcePath], createArgs, org, !project, path);
|
232217
232570
|
if (deployment.code === 'missing_project_settings') {
|
@@ -232223,7 +232576,7 @@ exports.default = async (client) => {
|
|
232223
232576
|
projectSettings.sourceFilesOutsideRootDirectory =
|
232224
232577
|
sourceFilesOutsideRootDirectory;
|
232225
232578
|
}
|
232226
|
-
const settings = await edit_project_settings_1.default(output, projectSettings, framework);
|
232579
|
+
const settings = await edit_project_settings_1.default(output, projectSettings, framework, false, localConfigurationOverrides);
|
232227
232580
|
// deploy again, but send projectSettings this time
|
232228
232581
|
createArgs.projectSettings = settings;
|
232229
232582
|
deployStamp = stamp_1.default();
|
@@ -232576,9 +232929,11 @@ async function dev(client, opts, args) {
|
|
232576
232929
|
// v3 Build Output because it will incorrectly be detected by
|
232577
232930
|
// @vercel/static-build in BuildOutputV3.getBuildOutputDirectory()
|
232578
232931
|
if (!devCommand) {
|
232579
|
-
output.log(`Removing ${write_build_result_1.OUTPUT_DIR}`);
|
232580
232932
|
const outputDir = path_1.join(cwd, write_build_result_1.OUTPUT_DIR);
|
232581
|
-
await fs_extra_1.default.
|
232933
|
+
if (await fs_extra_1.default.pathExists(outputDir)) {
|
232934
|
+
output.log(`Removing ${write_build_result_1.OUTPUT_DIR}`);
|
232935
|
+
await fs_extra_1.default.remove(outputDir);
|
232936
|
+
}
|
232582
232937
|
}
|
232583
232938
|
const devServer = new server_1.default(cwd, {
|
232584
232939
|
output,
|
@@ -233624,16 +233979,7 @@ async function inspect(client, opts, args) {
|
|
233624
233979
|
output.print('\n');
|
233625
233980
|
}
|
233626
233981
|
if (domainConfig.misconfigured) {
|
233627
|
-
output.warn(`This Domain is not configured properly. To configure it you should either:`, null, null, null
|
233628
|
-
boxen: {
|
233629
|
-
margin: {
|
233630
|
-
left: 2,
|
233631
|
-
right: 0,
|
233632
|
-
bottom: 0,
|
233633
|
-
top: 0,
|
233634
|
-
},
|
233635
|
-
},
|
233636
|
-
});
|
233982
|
+
output.warn(`This Domain is not configured properly. To configure it you should either:`, null, null, null);
|
233637
233983
|
output.print(` ${chalk_1.default.grey('a)')} ` +
|
233638
233984
|
`Set the following record on your DNS provider to continue: ` +
|
233639
233985
|
`${code_1.default(`A ${domainName} 76.76.21.21`)} ` +
|
@@ -234768,6 +235114,7 @@ exports.default = new Map([
|
|
234768
235114
|
['certs', 'certs'],
|
234769
235115
|
['deploy', 'deploy'],
|
234770
235116
|
['dev', 'dev'],
|
235117
|
+
['develop', 'dev'],
|
234771
235118
|
['dns', 'dns'],
|
234772
235119
|
['domain', 'domains'],
|
234773
235120
|
['domains', 'domains'],
|
@@ -240331,6 +240678,84 @@ async function createDeploy(client, now, contextName, paths, createArgs, org, is
|
|
240331
240678
|
exports.default = createDeploy;
|
240332
240679
|
|
240333
240680
|
|
240681
|
+
/***/ }),
|
240682
|
+
|
240683
|
+
/***/ 92282:
|
240684
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
240685
|
+
|
240686
|
+
"use strict";
|
240687
|
+
|
240688
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
240689
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
240690
|
+
};
|
240691
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
240692
|
+
exports.createGitMeta = exports.getRemoteUrl = exports.isDirty = void 0;
|
240693
|
+
const fs_extra_1 = __importDefault(__webpack_require__(45392));
|
240694
|
+
const path_1 = __webpack_require__(85622);
|
240695
|
+
const ini_1 = __importDefault(__webpack_require__(61967));
|
240696
|
+
const git_last_commit_1 = __importDefault(__webpack_require__(13495));
|
240697
|
+
const child_process_1 = __webpack_require__(63129);
|
240698
|
+
function isDirty(directory) {
|
240699
|
+
return new Promise((resolve, reject) => {
|
240700
|
+
child_process_1.exec('git status -s', { cwd: directory }, function (err, stdout, stderr) {
|
240701
|
+
if (err)
|
240702
|
+
return reject(err);
|
240703
|
+
if (stderr)
|
240704
|
+
return reject(new Error(`Failed to determine if git repo has been modified: ${stderr.trim()}`));
|
240705
|
+
resolve(stdout.trim().length > 0);
|
240706
|
+
});
|
240707
|
+
});
|
240708
|
+
}
|
240709
|
+
exports.isDirty = isDirty;
|
240710
|
+
function getLastCommit(directory) {
|
240711
|
+
return new Promise((resolve, reject) => {
|
240712
|
+
git_last_commit_1.default.getLastCommit((err, commit) => {
|
240713
|
+
if (err)
|
240714
|
+
return reject(err);
|
240715
|
+
resolve(commit);
|
240716
|
+
}, { dst: directory });
|
240717
|
+
});
|
240718
|
+
}
|
240719
|
+
async function getRemoteUrl(configPath, output) {
|
240720
|
+
let gitConfig;
|
240721
|
+
try {
|
240722
|
+
gitConfig = ini_1.default.parse(await fs_extra_1.default.readFile(configPath, 'utf-8'));
|
240723
|
+
}
|
240724
|
+
catch (error) {
|
240725
|
+
output.debug(`Error while parsing repo data: ${error.message}`);
|
240726
|
+
}
|
240727
|
+
if (!gitConfig) {
|
240728
|
+
return null;
|
240729
|
+
}
|
240730
|
+
const originUrl = gitConfig['remote "origin"']?.url;
|
240731
|
+
if (originUrl) {
|
240732
|
+
return originUrl;
|
240733
|
+
}
|
240734
|
+
return null;
|
240735
|
+
}
|
240736
|
+
exports.getRemoteUrl = getRemoteUrl;
|
240737
|
+
async function createGitMeta(directory, output) {
|
240738
|
+
const remoteUrl = await getRemoteUrl(path_1.join(directory, '.git/config'), output);
|
240739
|
+
// If we can't get the repo URL, then don't return any metadata
|
240740
|
+
if (!remoteUrl) {
|
240741
|
+
return;
|
240742
|
+
}
|
240743
|
+
const [commit, dirty] = await Promise.all([
|
240744
|
+
getLastCommit(directory),
|
240745
|
+
isDirty(directory),
|
240746
|
+
]);
|
240747
|
+
return {
|
240748
|
+
remoteUrl,
|
240749
|
+
commitAuthorName: commit.author.name,
|
240750
|
+
commitMessage: commit.subject,
|
240751
|
+
commitRef: commit.branch,
|
240752
|
+
commitSha: commit.hash,
|
240753
|
+
dirty,
|
240754
|
+
};
|
240755
|
+
}
|
240756
|
+
exports.createGitMeta = createGitMeta;
|
240757
|
+
|
240758
|
+
|
240334
240759
|
/***/ }),
|
240335
240760
|
|
240336
240761
|
/***/ 80478:
|
@@ -241434,9 +241859,6 @@ async function getBuildMatches(vercelConfig, cwd, output, devServer, fileList) {
|
|
241434
241859
|
// of Vercel deployments.
|
241435
241860
|
src = src.substring(1);
|
241436
241861
|
}
|
241437
|
-
// We need to escape brackets since `glob` will
|
241438
|
-
// try to find a group otherwise
|
241439
|
-
src = src.replace(/(\[|\])/g, '[$1]');
|
241440
241862
|
// lambda function files are trimmed of their file extension
|
241441
241863
|
const mapToEntrypoint = new Map();
|
241442
241864
|
const extensionless = devServer.getExtensionlessFile(src);
|
@@ -241444,6 +241866,9 @@ async function getBuildMatches(vercelConfig, cwd, output, devServer, fileList) {
|
|
241444
241866
|
mapToEntrypoint.set(extensionless, src);
|
241445
241867
|
src = extensionless;
|
241446
241868
|
}
|
241869
|
+
// We need to escape brackets since `glob` will
|
241870
|
+
// try to find a group otherwise
|
241871
|
+
src = src.replace(/(\[|\])/g, '[$1]');
|
241447
241872
|
const files = fileList
|
241448
241873
|
.filter(name => name === src || minimatch_1.default(name, src, { dot: true }))
|
241449
241874
|
.map(name => path_1.join(cwd, name));
|
@@ -243648,8 +244073,9 @@ function needsBlockingBuild(buildMatch) {
|
|
243648
244073
|
return typeof builder.shouldServe !== 'function';
|
243649
244074
|
}
|
243650
244075
|
async function checkForPort(port, timeout) {
|
244076
|
+
const opts = { host: '127.0.0.1' };
|
243651
244077
|
const start = Date.now();
|
243652
|
-
while (!(await is_port_reachable_1.default(port))) {
|
244078
|
+
while (!(await is_port_reachable_1.default(port, opts))) {
|
243653
244079
|
if (Date.now() - start > timeout) {
|
243654
244080
|
throw new Error(`Detecting port ${port} timed out after ${timeout}ms`);
|
243655
244081
|
}
|
@@ -247347,7 +247773,7 @@ class Now extends events_1.default {
|
|
247347
247773
|
// Legacy
|
247348
247774
|
nowConfig: nowConfig = {},
|
247349
247775
|
// Latest
|
247350
|
-
name, project, prebuilt = false, rootDirectory, wantsPublic, meta, regions, quiet = false, env, build, forceNew = false, withCache = false, target = null, deployStamp, projectSettings, skipAutoDetectionConfirmation, }, org, isSettingUpProject, cwd) {
|
247776
|
+
name, project, prebuilt = false, rootDirectory, wantsPublic, meta, gitMetadata, regions, quiet = false, env, build, forceNew = false, withCache = false, target = null, deployStamp, projectSettings, skipAutoDetectionConfirmation, }, org, isSettingUpProject, cwd) {
|
247351
247777
|
let hashes = {};
|
247352
247778
|
const uploadStamp = stamp_1.default();
|
247353
247779
|
let requestBody = {
|
@@ -247358,6 +247784,7 @@ class Now extends events_1.default {
|
|
247358
247784
|
name,
|
247359
247785
|
project,
|
247360
247786
|
meta,
|
247787
|
+
gitMetadata,
|
247361
247788
|
regions,
|
247362
247789
|
target: target || undefined,
|
247363
247790
|
projectSettings,
|
@@ -247762,53 +248189,104 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
247762
248189
|
const inquirer_1 = __importDefault(__webpack_require__(64016));
|
247763
248190
|
const confirm_1 = __importDefault(__webpack_require__(33564));
|
247764
248191
|
const chalk_1 = __importDefault(__webpack_require__(961));
|
248192
|
+
const frameworks_1 = __importDefault(__webpack_require__(48438));
|
247765
248193
|
const is_setting_value_1 = __webpack_require__(41005);
|
247766
|
-
const
|
247767
|
-
|
247768
|
-
|
247769
|
-
|
247770
|
-
|
247771
|
-
|
247772
|
-
|
247773
|
-
|
247774
|
-
|
247775
|
-
|
247776
|
-
|
248194
|
+
const settingMap = {
|
248195
|
+
buildCommand: 'Build Command',
|
248196
|
+
devCommand: 'Development Command',
|
248197
|
+
commandForIgnoringBuildStep: 'Ignore Command',
|
248198
|
+
installCommand: 'Install Command',
|
248199
|
+
outputDirectory: 'Output Directory',
|
248200
|
+
framework: 'Framework',
|
248201
|
+
};
|
248202
|
+
const settingKeys = Object.keys(settingMap).sort();
|
248203
|
+
async function editProjectSettings(output, projectSettings, framework, autoConfirm, localConfigurationOverrides) {
|
248204
|
+
// Create initial settings object defaulting everything to `null` and assigning what may exist in `projectSettings`
|
248205
|
+
const settings = Object.assign({
|
248206
|
+
buildCommand: null,
|
248207
|
+
devCommand: null,
|
248208
|
+
framework: null,
|
248209
|
+
commandForIgnoringBuildStep: null,
|
248210
|
+
installCommand: null,
|
248211
|
+
outputDirectory: null,
|
248212
|
+
}, projectSettings);
|
248213
|
+
// Start UX by displaying (and applying) overrides. They will be referenced throughout remainder of CLI.
|
248214
|
+
if (localConfigurationOverrides) {
|
248215
|
+
// Apply local overrides (from `vercel.json`)
|
248216
|
+
for (const setting of settingKeys) {
|
248217
|
+
const localConfigValue = localConfigurationOverrides[setting];
|
248218
|
+
if (localConfigValue)
|
248219
|
+
settings[setting] = localConfigValue;
|
248220
|
+
}
|
248221
|
+
output.print('Local settings detected in vercel.json:\n');
|
248222
|
+
// Print provided overrides including framework
|
248223
|
+
for (const setting of settingKeys) {
|
248224
|
+
const override = localConfigurationOverrides[setting];
|
248225
|
+
if (override) {
|
248226
|
+
output.print(`${chalk_1.default.dim(`- ${chalk_1.default.bold(`${settingMap[setting]}:`)} ${override}`)}\n`);
|
248227
|
+
}
|
248228
|
+
}
|
248229
|
+
// If framework is overridden, set it to the `framework` parameter and let the normal framework-flow occur
|
248230
|
+
if (localConfigurationOverrides.framework) {
|
248231
|
+
const overrideFramework = frameworks_1.default.find(f => f.slug === localConfigurationOverrides.framework);
|
248232
|
+
if (overrideFramework) {
|
248233
|
+
framework = overrideFramework;
|
248234
|
+
output.print(`Merging default Project Settings for ${framework.name}. Previously listed overrides are prioritized.\n`);
|
248235
|
+
}
|
248236
|
+
}
|
247777
248237
|
}
|
247778
248238
|
// skip editing project settings if no framework is detected
|
247779
248239
|
if (!framework) {
|
247780
248240
|
settings.framework = null;
|
247781
248241
|
return settings;
|
247782
248242
|
}
|
248243
|
+
// A missing framework slug implies the "Other" framework was selected
|
247783
248244
|
output.print(!framework.slug
|
247784
248245
|
? `No framework detected. Default Project Settings:\n`
|
247785
248246
|
: `Auto-detected Project Settings (${chalk_1.default.bold(framework.name)}):\n`);
|
247786
248247
|
settings.framework = framework.slug;
|
247787
|
-
for
|
247788
|
-
|
247789
|
-
|
247790
|
-
|
247791
|
-
|
248248
|
+
// Now print defaults for the provided framework whether it was auto-detected or overwritten
|
248249
|
+
for (const setting of settingKeys) {
|
248250
|
+
if (setting === 'framework' || setting === 'commandForIgnoringBuildStep') {
|
248251
|
+
continue;
|
248252
|
+
}
|
248253
|
+
const defaultSetting = framework.settings[setting];
|
248254
|
+
const override = localConfigurationOverrides?.[setting];
|
248255
|
+
if (!override && defaultSetting) {
|
248256
|
+
output.print(`${chalk_1.default.dim(`- ${chalk_1.default.bold(`${settingMap[setting]}:`)} ${is_setting_value_1.isSettingValue(defaultSetting)
|
248257
|
+
? defaultSetting.value
|
248258
|
+
: chalk_1.default.italic(`${defaultSetting.placeholder}`)}`)}\n`);
|
248259
|
+
}
|
247792
248260
|
}
|
248261
|
+
// Prompt the user if they want to modify any settings not defined by local configuration.
|
247793
248262
|
if (autoConfirm ||
|
247794
|
-
!(await confirm_1.default(
|
248263
|
+
!(await confirm_1.default('Want to modify these settings?', false))) {
|
247795
248264
|
return settings;
|
247796
248265
|
}
|
248266
|
+
const choices = settingKeys.reduce((acc, setting) => {
|
248267
|
+
const skip = setting === 'framework' ||
|
248268
|
+
setting === 'commandForIgnoringBuildStep' ||
|
248269
|
+
setting === 'installCommand' ||
|
248270
|
+
localConfigurationOverrides?.[setting];
|
248271
|
+
if (!skip) {
|
248272
|
+
acc.push({ name: settingMap[setting], value: setting });
|
248273
|
+
}
|
248274
|
+
return acc;
|
248275
|
+
}, []);
|
247797
248276
|
const { settingFields } = await inquirer_1.default.prompt({
|
247798
248277
|
name: 'settingFields',
|
247799
248278
|
type: 'checkbox',
|
247800
248279
|
message: 'Which settings would you like to overwrite (select multiple)?',
|
247801
|
-
choices
|
248280
|
+
choices,
|
247802
248281
|
});
|
247803
248282
|
for (let setting of settingFields) {
|
247804
|
-
const field =
|
247805
|
-
const name = `${Date.now()}`;
|
248283
|
+
const field = settingMap[setting];
|
247806
248284
|
const answers = await inquirer_1.default.prompt({
|
247807
248285
|
type: 'input',
|
247808
|
-
name:
|
247809
|
-
message: `What's your ${chalk_1.default.bold(field
|
248286
|
+
name: setting,
|
248287
|
+
message: `What's your ${chalk_1.default.bold(field)}?`,
|
247810
248288
|
});
|
247811
|
-
settings[setting] = answers[
|
248289
|
+
settings[setting] = answers[setting];
|
247812
248290
|
}
|
247813
248291
|
return settings;
|
247814
248292
|
}
|
@@ -248902,6 +249380,14 @@ async function setupAndLink(client, path, { forceDelete = false, autoConfirm = f
|
|
248902
249380
|
client,
|
248903
249381
|
currentTeam: config.currentTeam,
|
248904
249382
|
});
|
249383
|
+
const localConfigurationOverrides = {
|
249384
|
+
buildCommand: localConfig?.buildCommand,
|
249385
|
+
devCommand: localConfig?.devCommand,
|
249386
|
+
framework: localConfig?.framework,
|
249387
|
+
commandForIgnoringBuildStep: localConfig?.ignoreCommand,
|
249388
|
+
installCommand: localConfig?.installCommand,
|
249389
|
+
outputDirectory: localConfig?.outputDirectory,
|
249390
|
+
};
|
248905
249391
|
const createArgs = {
|
248906
249392
|
name: newProjectName,
|
248907
249393
|
env: {},
|
@@ -248916,11 +249402,11 @@ async function setupAndLink(client, path, { forceDelete = false, autoConfirm = f
|
|
248916
249402
|
deployStamp: stamp_1.default(),
|
248917
249403
|
target: undefined,
|
248918
249404
|
skipAutoDetectionConfirmation: false,
|
249405
|
+
projectSettings: {
|
249406
|
+
...localConfigurationOverrides,
|
249407
|
+
sourceFilesOutsideRootDirectory,
|
249408
|
+
},
|
248919
249409
|
};
|
248920
|
-
if (isZeroConfig) {
|
248921
|
-
// Only add projectSettings for zero config deployments
|
248922
|
-
createArgs.projectSettings = { sourceFilesOutsideRootDirectory };
|
248923
|
-
}
|
248924
249410
|
const deployment = await create_deploy_1.default(client, now, config.currentTeam || 'current user', [sourcePath], createArgs, org, true, path);
|
248925
249411
|
if (!deployment ||
|
248926
249412
|
!('code' in deployment) ||
|
@@ -248936,7 +249422,7 @@ async function setupAndLink(client, path, { forceDelete = false, autoConfirm = f
|
|
248936
249422
|
};
|
248937
249423
|
}
|
248938
249424
|
const { projectSettings, framework } = deployment;
|
248939
|
-
settings = await edit_project_settings_1.default(output, projectSettings, framework, autoConfirm);
|
249425
|
+
settings = await edit_project_settings_1.default(output, projectSettings, framework, autoConfirm, localConfigurationOverrides);
|
248940
249426
|
}
|
248941
249427
|
if (rootDirectory) {
|
248942
249428
|
settings.rootDirectory = rootDirectory;
|
@@ -249878,7 +250364,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
249878
250364
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
249879
250365
|
exports.Output = void 0;
|
249880
250366
|
const chalk_1 = __importDefault(__webpack_require__(961));
|
249881
|
-
const boxen_1 = __importDefault(__webpack_require__(30396));
|
249882
250367
|
const link_1 = __importDefault(__webpack_require__(98472));
|
249883
250368
|
const wait_1 = __importDefault(__webpack_require__(22015));
|
249884
250369
|
class Output {
|
@@ -249897,20 +250382,11 @@ class Output {
|
|
249897
250382
|
this.dim = (str, color = chalk_1.default.grey) => {
|
249898
250383
|
this.print(`${color(`> ${str}`)}\n`);
|
249899
250384
|
};
|
249900
|
-
this.warn = (str, slug = null, link = null, action = 'Learn More'
|
250385
|
+
this.warn = (str, slug = null, link = null, action = 'Learn More') => {
|
249901
250386
|
const details = slug ? `https://err.sh/vercel/${slug}` : link;
|
249902
|
-
this.print(
|
250387
|
+
this.print(chalk_1.default.yellow(chalk_1.default.bold('WARN! ') +
|
249903
250388
|
str +
|
249904
|
-
(details ? `\n${action}: ${link_1.default(details)}` : '')
|
249905
|
-
padding: {
|
249906
|
-
top: 0,
|
249907
|
-
bottom: 0,
|
249908
|
-
left: 1,
|
249909
|
-
right: 1,
|
249910
|
-
},
|
249911
|
-
borderColor: 'yellow',
|
249912
|
-
...options?.boxen,
|
249913
|
-
}));
|
250389
|
+
(details ? `\n${action}: ${link_1.default(details)}` : '')));
|
249914
250390
|
this.print('\n');
|
249915
250391
|
};
|
249916
250392
|
this.note = (str) => {
|
@@ -250555,8 +251031,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
250555
251031
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
250556
251032
|
};
|
250557
251033
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
250558
|
-
const
|
250559
|
-
const
|
251034
|
+
const fs_1 = __importDefault(__webpack_require__(35747));
|
251035
|
+
const path_1 = __webpack_require__(85622);
|
251036
|
+
let rootDir = __dirname;
|
251037
|
+
while (!fs_1.default.existsSync(path_1.join(rootDir, 'package.json'))) {
|
251038
|
+
rootDir = path_1.join(rootDir, '..');
|
251039
|
+
}
|
251040
|
+
const pkgPath = path_1.join(rootDir, 'package.json');
|
251041
|
+
const pkg = JSON.parse(fs_1.default.readFileSync(pkgPath, 'utf8'));
|
250560
251042
|
exports.default = pkg;
|
250561
251043
|
|
250562
251044
|
|
@@ -251946,7 +252428,7 @@ module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source
|
|
251946
252428
|
/***/ ((module) => {
|
251947
252429
|
|
251948
252430
|
"use strict";
|
251949
|
-
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"25.1.1-canary.
|
252431
|
+
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"25.1.1-canary.11\",\"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 --runInBand --bail --forceExit\",\"test-unit\":\"yarn test test/unit/\",\"test-integration-cli\":\"rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose\",\"test-integration-dev\":\"yarn test test/dev/\",\"prepublishOnly\":\"yarn build\",\"coverage\":\"codecov\",\"build\":\"node -r ts-eager/register ./scripts/build.ts\",\"build-dev\":\"node -r ts-eager/register ./scripts/build.ts --dev\"},\"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\":\"4.1.1-canary.1\",\"@vercel/go\":\"2.0.2-canary.1\",\"@vercel/next\":\"3.0.5-canary.1\",\"@vercel/node\":\"2.2.1-canary.1\",\"@vercel/python\":\"3.0.2-canary.1\",\"@vercel/redwood\":\"1.0.2-canary.1\",\"@vercel/remix\":\"1.0.2-canary.1\",\"@vercel/ruby\":\"1.3.10-canary.1\",\"@vercel/static-build\":\"1.0.2-canary.1\",\"update-notifier\":\"5.1.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\",\"@tootallnate/once\":\"1.1.2\",\"@types/ansi-escapes\":\"3.0.0\",\"@types/ansi-regex\":\"4.0.0\",\"@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\":\"11.11.0\",\"@types/node-fetch\":\"2.5.10\",\"@types/npm-package-arg\":\"6.1.0\",\"@types/pluralize\":\"0.0.29\",\"@types/progress\":\"2.0.3\",\"@types/psl\":\"1.1.0\",\"@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.0.2-canary.1\",\"@vercel/frameworks\":\"1.0.2-canary.0\",\"@vercel/ncc\":\"0.24.0\",\"@zeit/fun\":\"0.11.2\",\"@zeit/source-map-support\":\"0.6.2\",\"ajv\":\"6.12.2\",\"alpha-sort\":\"2.0.1\",\"ansi-escapes\":\"3.0.0\",\"ansi-regex\":\"3.0.0\",\"arg\":\"5.0.0\",\"async-listen\":\"1.2.0\",\"async-retry\":\"1.1.3\",\"async-sema\":\"2.1.4\",\"ava\":\"2.2.0\",\"bytes\":\"3.0.0\",\"chalk\":\"4.1.0\",\"chance\":\"1.1.7\",\"chokidar\":\"3.3.1\",\"clipboardy\":\"2.1.0\",\"codecov\":\"3.8.2\",\"cpy\":\"7.2.0\",\"credit-card\":\"3.0.1\",\"date-fns\":\"1.29.0\",\"debug\":\"3.1.0\",\"dot\":\"1.1.3\",\"dotenv\":\"4.0.0\",\"email-prompt\":\"0.3.2\",\"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\",\"jsonlines\":\"0.1.1\",\"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.1\",\"npm-package-arg\":\"6.1.0\",\"open\":\"8.4.0\",\"ora\":\"3.4.0\",\"pcre-to-regexp\":\"1.0.0\",\"pluralize\":\"7.0.0\",\"progress\":\"2.0.3\",\"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\":\"5.2.0\",\"stripe\":\"5.1.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\":\"8.3.0\",\"typescript\":\"4.3.4\",\"universal-analytics\":\"0.4.20\",\"utility-types\":\"2.1.0\",\"which\":\"2.0.2\",\"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\"]},\"gitHead\":\"570fd24e29f5e8abb9e01e0ddb2a6c751dd4adfe\"}");
|
251950
252432
|
|
251951
252433
|
/***/ }),
|
251952
252434
|
|
@@ -251962,7 +252444,7 @@ module.exports = JSON.parse("{\"VISA\":\"Visa\",\"MASTERCARD\":\"MasterCard\",\"
|
|
251962
252444
|
/***/ ((module) => {
|
251963
252445
|
|
251964
252446
|
"use strict";
|
251965
|
-
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"12.0.2-canary.
|
252447
|
+
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"12.0.2-canary.1\",\"main\":\"dist/index.js\",\"typings\":\"dist/index.d.ts\",\"homepage\":\"https://vercel.com\",\"license\":\"MIT\",\"files\":[\"dist\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/client\"},\"scripts\":{\"build\":\"tsc\",\"test-integration-once\":\"yarn test tests/create-deployment.test.ts tests/create-legacy-deployment.test.ts tests/paths.test.ts\",\"test\":\"jest --env node --verbose --runInBand --bail\",\"test-unit\":\"yarn test tests/unit.*test.*\"},\"engines\":{\"node\":\">= 14\"},\"devDependencies\":{\"@types/async-retry\":\"1.4.1\",\"@types/fs-extra\":\"7.0.0\",\"@types/jest\":\"27.4.1\",\"@types/minimatch\":\"3.0.5\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"12.0.4\",\"@types/node-fetch\":\"2.5.4\",\"@types/recursive-readdir\":\"2.2.0\",\"typescript\":\"4.3.4\"},\"jest\":{\"preset\":\"ts-jest\",\"testEnvironment\":\"node\",\"verbose\":false,\"setupFilesAfterEnv\":[\"<rootDir>/tests/setup/index.ts\"]},\"dependencies\":{\"@vercel/build-utils\":\"4.1.1-canary.1\",\"@zeit/fetch\":\"5.2.0\",\"async-retry\":\"1.2.3\",\"async-sema\":\"3.0.0\",\"fs-extra\":\"8.0.1\",\"ignore\":\"4.0.6\",\"minimatch\":\"5.0.1\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.1\",\"querystring\":\"^0.2.0\",\"sleep-promise\":\"8.0.1\"}}");
|
251966
252448
|
|
251967
252449
|
/***/ }),
|
251968
252450
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vercel",
|
3
|
-
"version": "25.1.1-canary.
|
3
|
+
"version": "25.1.1-canary.11",
|
4
4
|
"preferGlobal": true,
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"description": "The command-line interface for Vercel",
|
@@ -42,15 +42,15 @@
|
|
42
42
|
"node": ">= 14"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@vercel/build-utils": "4.1.1-canary.
|
46
|
-
"@vercel/go": "2.0.2-canary.
|
47
|
-
"@vercel/next": "3.0.
|
48
|
-
"@vercel/node": "2.
|
49
|
-
"@vercel/python": "3.0.2-canary.
|
50
|
-
"@vercel/redwood": "1.0.2-canary.
|
51
|
-
"@vercel/remix": "1.0.2-canary.
|
52
|
-
"@vercel/ruby": "1.3.10-canary.
|
53
|
-
"@vercel/static-build": "1.0.2-canary.
|
45
|
+
"@vercel/build-utils": "4.1.1-canary.1",
|
46
|
+
"@vercel/go": "2.0.2-canary.1",
|
47
|
+
"@vercel/next": "3.0.5-canary.1",
|
48
|
+
"@vercel/node": "2.2.1-canary.1",
|
49
|
+
"@vercel/python": "3.0.2-canary.1",
|
50
|
+
"@vercel/redwood": "1.0.2-canary.1",
|
51
|
+
"@vercel/remix": "1.0.2-canary.1",
|
52
|
+
"@vercel/ruby": "1.3.10-canary.1",
|
53
|
+
"@vercel/static-build": "1.0.2-canary.1",
|
54
54
|
"update-notifier": "5.1.0"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
@@ -71,6 +71,7 @@
|
|
71
71
|
"@types/fs-extra": "9.0.13",
|
72
72
|
"@types/glob": "7.1.1",
|
73
73
|
"@types/http-proxy": "1.16.2",
|
74
|
+
"@types/ini": "1.3.31",
|
74
75
|
"@types/inquirer": "7.3.1",
|
75
76
|
"@types/jest": "27.4.1",
|
76
77
|
"@types/jest-expect-message": "1.0.3",
|
@@ -94,8 +95,8 @@
|
|
94
95
|
"@types/which": "1.3.2",
|
95
96
|
"@types/write-json-file": "2.2.1",
|
96
97
|
"@types/yauzl-promise": "2.1.0",
|
97
|
-
"@vercel/client": "12.0.2-canary.
|
98
|
-
"@vercel/frameworks": "1.0.
|
98
|
+
"@vercel/client": "12.0.2-canary.1",
|
99
|
+
"@vercel/frameworks": "1.0.2-canary.0",
|
99
100
|
"@vercel/ncc": "0.24.0",
|
100
101
|
"@zeit/fun": "0.11.2",
|
101
102
|
"@zeit/source-map-support": "0.6.2",
|
@@ -130,11 +131,13 @@
|
|
130
131
|
"fast-deep-equal": "3.1.3",
|
131
132
|
"fs-extra": "10.0.0",
|
132
133
|
"get-port": "5.1.1",
|
134
|
+
"git-last-commit": "1.0.1",
|
133
135
|
"glob": "7.1.2",
|
134
136
|
"http-proxy": "1.18.1",
|
137
|
+
"ini": "3.0.0",
|
135
138
|
"inquirer": "7.0.4",
|
136
139
|
"is-docker": "2.2.1",
|
137
|
-
"is-port-reachable": "3.
|
140
|
+
"is-port-reachable": "3.1.0",
|
138
141
|
"is-url": "1.2.2",
|
139
142
|
"jaro-winkler": "0.2.8",
|
140
143
|
"jsonlines": "0.1.1",
|
@@ -191,5 +194,5 @@
|
|
191
194
|
"<rootDir>/test/**/*.test.ts"
|
192
195
|
]
|
193
196
|
},
|
194
|
-
"gitHead": "
|
197
|
+
"gitHead": "570fd24e29f5e8abb9e01e0ddb2a6c751dd4adfe"
|
195
198
|
}
|