vercel 27.0.1 → 27.1.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 +596 -232
- package/package.json +14 -14
package/dist/index.js
CHANGED
@@ -194021,6 +194021,7 @@ class EdgeFunction {
|
|
194021
194021
|
this.entrypoint = params.entrypoint;
|
194022
194022
|
this.files = params.files;
|
194023
194023
|
this.envVarsInUse = params.envVarsInUse;
|
194024
|
+
this.assets = params.assets;
|
194024
194025
|
}
|
194025
194026
|
}
|
194026
194027
|
exports.EdgeFunction = EdgeFunction;
|
@@ -194123,7 +194124,7 @@ function getSuggestion(topLevelProp, additionalProperty) {
|
|
194123
194124
|
/***/ }),
|
194124
194125
|
|
194125
194126
|
/***/ 2397:
|
194126
|
-
/***/ (function(__unused_webpack_module, exports,
|
194127
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_780057__) {
|
194127
194128
|
|
194128
194129
|
"use strict";
|
194129
194130
|
|
@@ -194131,8 +194132,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
194131
194132
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
194132
194133
|
};
|
194133
194134
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194134
|
-
const assert_1 = __importDefault(
|
194135
|
-
const into_stream_1 = __importDefault(
|
194135
|
+
const assert_1 = __importDefault(__nested_webpack_require_780057__(2357));
|
194136
|
+
const into_stream_1 = __importDefault(__nested_webpack_require_780057__(6130));
|
194136
194137
|
class FileBlob {
|
194137
194138
|
constructor({ mode = 0o100644, contentType, data }) {
|
194138
194139
|
assert_1.default(typeof mode === 'number');
|
@@ -194167,7 +194168,7 @@ exports.default = FileBlob;
|
|
194167
194168
|
/***/ }),
|
194168
194169
|
|
194169
194170
|
/***/ 9331:
|
194170
|
-
/***/ (function(__unused_webpack_module, exports,
|
194171
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_781575__) {
|
194171
194172
|
|
194172
194173
|
"use strict";
|
194173
194174
|
|
@@ -194175,11 +194176,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
194175
194176
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
194176
194177
|
};
|
194177
194178
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194178
|
-
const assert_1 = __importDefault(
|
194179
|
-
const fs_extra_1 = __importDefault(
|
194180
|
-
const multistream_1 = __importDefault(
|
194181
|
-
const path_1 = __importDefault(
|
194182
|
-
const async_sema_1 = __importDefault(
|
194179
|
+
const assert_1 = __importDefault(__nested_webpack_require_781575__(2357));
|
194180
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_781575__(5392));
|
194181
|
+
const multistream_1 = __importDefault(__nested_webpack_require_781575__(8179));
|
194182
|
+
const path_1 = __importDefault(__nested_webpack_require_781575__(5622));
|
194183
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_781575__(5758));
|
194183
194184
|
const semaToPreventEMFILE = new async_sema_1.default(20);
|
194184
194185
|
class FileFsRef {
|
194185
194186
|
constructor({ mode = 0o100644, contentType, fsPath }) {
|
@@ -194245,7 +194246,7 @@ exports.default = FileFsRef;
|
|
194245
194246
|
/***/ }),
|
194246
194247
|
|
194247
194248
|
/***/ 5187:
|
194248
|
-
/***/ (function(__unused_webpack_module, exports,
|
194249
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_784379__) {
|
194249
194250
|
|
194250
194251
|
"use strict";
|
194251
194252
|
|
@@ -194253,11 +194254,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
194253
194254
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
194254
194255
|
};
|
194255
194256
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194256
|
-
const assert_1 = __importDefault(
|
194257
|
-
const node_fetch_1 = __importDefault(
|
194258
|
-
const multistream_1 = __importDefault(
|
194259
|
-
const async_retry_1 = __importDefault(
|
194260
|
-
const async_sema_1 = __importDefault(
|
194257
|
+
const assert_1 = __importDefault(__nested_webpack_require_784379__(2357));
|
194258
|
+
const node_fetch_1 = __importDefault(__nested_webpack_require_784379__(2197));
|
194259
|
+
const multistream_1 = __importDefault(__nested_webpack_require_784379__(8179));
|
194260
|
+
const async_retry_1 = __importDefault(__nested_webpack_require_784379__(3691));
|
194261
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_784379__(5758));
|
194261
194262
|
const semaToDownloadFromS3 = new async_sema_1.default(5);
|
194262
194263
|
class BailableError extends Error {
|
194263
194264
|
constructor(...args) {
|
@@ -194338,7 +194339,7 @@ exports.default = FileRef;
|
|
194338
194339
|
/***/ }),
|
194339
194340
|
|
194340
194341
|
/***/ 1611:
|
194341
|
-
/***/ (function(__unused_webpack_module, exports,
|
194342
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_787780__) {
|
194342
194343
|
|
194343
194344
|
"use strict";
|
194344
194345
|
|
@@ -194347,11 +194348,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
194347
194348
|
};
|
194348
194349
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194349
194350
|
exports.isSymbolicLink = void 0;
|
194350
|
-
const path_1 = __importDefault(
|
194351
|
-
const debug_1 = __importDefault(
|
194352
|
-
const file_fs_ref_1 = __importDefault(
|
194353
|
-
const fs_extra_1 =
|
194354
|
-
const stream_to_buffer_1 = __importDefault(
|
194351
|
+
const path_1 = __importDefault(__nested_webpack_require_787780__(5622));
|
194352
|
+
const debug_1 = __importDefault(__nested_webpack_require_787780__(1868));
|
194353
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_787780__(9331));
|
194354
|
+
const fs_extra_1 = __nested_webpack_require_787780__(5392);
|
194355
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_787780__(2560));
|
194355
194356
|
const S_IFMT = 61440; /* 0170000 type of file */
|
194356
194357
|
const S_IFLNK = 40960; /* 0120000 symbolic link */
|
194357
194358
|
function isSymbolicLink(mode) {
|
@@ -194424,14 +194425,14 @@ exports.default = download;
|
|
194424
194425
|
/***/ }),
|
194425
194426
|
|
194426
194427
|
/***/ 3838:
|
194427
|
-
/***/ ((__unused_webpack_module, exports,
|
194428
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_791229__) => {
|
194428
194429
|
|
194429
194430
|
"use strict";
|
194430
194431
|
|
194431
194432
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194432
|
-
const path_1 =
|
194433
|
-
const os_1 =
|
194434
|
-
const fs_extra_1 =
|
194433
|
+
const path_1 = __nested_webpack_require_791229__(5622);
|
194434
|
+
const os_1 = __nested_webpack_require_791229__(2087);
|
194435
|
+
const fs_extra_1 = __nested_webpack_require_791229__(5392);
|
194435
194436
|
async function getWritableDirectory() {
|
194436
194437
|
const name = Math.floor(Math.random() * 0x7fffffff).toString(16);
|
194437
194438
|
const directory = path_1.join(os_1.tmpdir(), name);
|
@@ -194444,7 +194445,7 @@ exports.default = getWritableDirectory;
|
|
194444
194445
|
/***/ }),
|
194445
194446
|
|
194446
194447
|
/***/ 4240:
|
194447
|
-
/***/ (function(__unused_webpack_module, exports,
|
194448
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_791809__) {
|
194448
194449
|
|
194449
194450
|
"use strict";
|
194450
194451
|
|
@@ -194452,13 +194453,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
194452
194453
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
194453
194454
|
};
|
194454
194455
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194455
|
-
const path_1 = __importDefault(
|
194456
|
-
const assert_1 = __importDefault(
|
194457
|
-
const glob_1 = __importDefault(
|
194458
|
-
const util_1 =
|
194459
|
-
const fs_extra_1 =
|
194460
|
-
const normalize_path_1 =
|
194461
|
-
const file_fs_ref_1 = __importDefault(
|
194456
|
+
const path_1 = __importDefault(__nested_webpack_require_791809__(5622));
|
194457
|
+
const assert_1 = __importDefault(__nested_webpack_require_791809__(2357));
|
194458
|
+
const glob_1 = __importDefault(__nested_webpack_require_791809__(1104));
|
194459
|
+
const util_1 = __nested_webpack_require_791809__(1669);
|
194460
|
+
const fs_extra_1 = __nested_webpack_require_791809__(5392);
|
194461
|
+
const normalize_path_1 = __nested_webpack_require_791809__(6261);
|
194462
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_791809__(9331));
|
194462
194463
|
const vanillaGlob = util_1.promisify(glob_1.default);
|
194463
194464
|
async function glob(pattern, opts, mountpoint) {
|
194464
194465
|
let options;
|
@@ -194504,7 +194505,7 @@ exports.default = glob;
|
|
194504
194505
|
/***/ }),
|
194505
194506
|
|
194506
194507
|
/***/ 7903:
|
194507
|
-
/***/ (function(__unused_webpack_module, exports,
|
194508
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_794005__) {
|
194508
194509
|
|
194509
194510
|
"use strict";
|
194510
194511
|
|
@@ -194513,9 +194514,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
194513
194514
|
};
|
194514
194515
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194515
194516
|
exports.getSupportedNodeVersion = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = void 0;
|
194516
|
-
const semver_1 =
|
194517
|
-
const errors_1 =
|
194518
|
-
const debug_1 = __importDefault(
|
194517
|
+
const semver_1 = __nested_webpack_require_794005__(2879);
|
194518
|
+
const errors_1 = __nested_webpack_require_794005__(3983);
|
194519
|
+
const debug_1 = __importDefault(__nested_webpack_require_794005__(1868));
|
194519
194520
|
const allOptions = [
|
194520
194521
|
{ major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
194521
194522
|
{ major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
@@ -194615,7 +194616,7 @@ exports.normalizePath = normalizePath;
|
|
194615
194616
|
/***/ }),
|
194616
194617
|
|
194617
194618
|
/***/ 7792:
|
194618
|
-
/***/ (function(__unused_webpack_module, exports,
|
194619
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_798008__) {
|
194619
194620
|
|
194620
194621
|
"use strict";
|
194621
194622
|
|
@@ -194624,9 +194625,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
194624
194625
|
};
|
194625
194626
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194626
194627
|
exports.readConfigFile = void 0;
|
194627
|
-
const js_yaml_1 = __importDefault(
|
194628
|
-
const toml_1 = __importDefault(
|
194629
|
-
const fs_extra_1 =
|
194628
|
+
const js_yaml_1 = __importDefault(__nested_webpack_require_798008__(6540));
|
194629
|
+
const toml_1 = __importDefault(__nested_webpack_require_798008__(9434));
|
194630
|
+
const fs_extra_1 = __nested_webpack_require_798008__(5392);
|
194630
194631
|
async function readFileOrNull(file) {
|
194631
194632
|
try {
|
194632
194633
|
const data = await fs_extra_1.readFile(file);
|
@@ -194681,7 +194682,7 @@ exports.default = rename;
|
|
194681
194682
|
/***/ }),
|
194682
194683
|
|
194683
194684
|
/***/ 1442:
|
194684
|
-
/***/ (function(__unused_webpack_module, exports,
|
194685
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_799801__) {
|
194685
194686
|
|
194686
194687
|
"use strict";
|
194687
194688
|
|
@@ -194690,17 +194691,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
194690
194691
|
};
|
194691
194692
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
194692
194693
|
exports.installDependencies = exports.getScriptName = exports.runPipInstall = exports.runBundleInstall = exports.runPackageJsonScript = exports.runCustomInstallCommand = exports.getEnvForPackageManager = exports.runNpmInstall = exports.walkParentDirs = exports.scanParentDirs = exports.getNodeVersion = exports.getSpawnOptions = exports.runShellScript = exports.getNodeBinPath = exports.execCommand = exports.spawnCommand = exports.execAsync = exports.spawnAsync = void 0;
|
194693
|
-
const assert_1 = __importDefault(
|
194694
|
-
const fs_extra_1 = __importDefault(
|
194695
|
-
const path_1 = __importDefault(
|
194696
|
-
const async_sema_1 = __importDefault(
|
194697
|
-
const cross_spawn_1 = __importDefault(
|
194698
|
-
const semver_1 =
|
194699
|
-
const util_1 =
|
194700
|
-
const debug_1 = __importDefault(
|
194701
|
-
const errors_1 =
|
194702
|
-
const node_version_1 =
|
194703
|
-
const read_config_file_1 =
|
194694
|
+
const assert_1 = __importDefault(__nested_webpack_require_799801__(2357));
|
194695
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_799801__(5392));
|
194696
|
+
const path_1 = __importDefault(__nested_webpack_require_799801__(5622));
|
194697
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_799801__(5758));
|
194698
|
+
const cross_spawn_1 = __importDefault(__nested_webpack_require_799801__(7618));
|
194699
|
+
const semver_1 = __nested_webpack_require_799801__(2879);
|
194700
|
+
const util_1 = __nested_webpack_require_799801__(1669);
|
194701
|
+
const debug_1 = __importDefault(__nested_webpack_require_799801__(1868));
|
194702
|
+
const errors_1 = __nested_webpack_require_799801__(3983);
|
194703
|
+
const node_version_1 = __nested_webpack_require_799801__(7903);
|
194704
|
+
const read_config_file_1 = __nested_webpack_require_799801__(7792);
|
194704
194705
|
// Only allow one `runNpmInstall()` invocation to run concurrently
|
194705
194706
|
const runNpmInstallSema = new async_sema_1.default(1);
|
194706
194707
|
function spawnAsync(command, args, opts = {}) {
|
@@ -195149,7 +195150,7 @@ exports.installDependencies = util_1.deprecate(runNpmInstall, 'installDependenci
|
|
195149
195150
|
/***/ }),
|
195150
195151
|
|
195151
195152
|
/***/ 2560:
|
195152
|
-
/***/ (function(__unused_webpack_module, exports,
|
195153
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_819357__) {
|
195153
195154
|
|
195154
195155
|
"use strict";
|
195155
195156
|
|
@@ -195157,7 +195158,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
195157
195158
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
195158
195159
|
};
|
195159
195160
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
195160
|
-
const end_of_stream_1 = __importDefault(
|
195161
|
+
const end_of_stream_1 = __importDefault(__nested_webpack_require_819357__(687));
|
195161
195162
|
function streamToBuffer(stream) {
|
195162
195163
|
return new Promise((resolve, reject) => {
|
195163
195164
|
const buffers = [];
|
@@ -195186,7 +195187,7 @@ exports.default = streamToBuffer;
|
|
195186
195187
|
/***/ }),
|
195187
195188
|
|
195188
195189
|
/***/ 1148:
|
195189
|
-
/***/ (function(__unused_webpack_module, exports,
|
195190
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_820425__) {
|
195190
195191
|
|
195191
195192
|
"use strict";
|
195192
195193
|
|
@@ -195194,9 +195195,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
195194
195195
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
195195
195196
|
};
|
195196
195197
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
195197
|
-
const path_1 = __importDefault(
|
195198
|
-
const fs_extra_1 = __importDefault(
|
195199
|
-
const ignore_1 = __importDefault(
|
195198
|
+
const path_1 = __importDefault(__nested_webpack_require_820425__(5622));
|
195199
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_820425__(5392));
|
195200
|
+
const ignore_1 = __importDefault(__nested_webpack_require_820425__(3556));
|
195200
195201
|
function isCodedError(error) {
|
195201
195202
|
return (error !== null &&
|
195202
195203
|
error !== undefined &&
|
@@ -195253,13 +195254,13 @@ exports.default = default_1;
|
|
195253
195254
|
/***/ }),
|
195254
195255
|
|
195255
195256
|
/***/ 4678:
|
195256
|
-
/***/ ((__unused_webpack_module, exports,
|
195257
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_822799__) => {
|
195257
195258
|
|
195258
195259
|
"use strict";
|
195259
195260
|
|
195260
195261
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
195261
195262
|
exports.getPlatformEnv = void 0;
|
195262
|
-
const errors_1 =
|
195263
|
+
const errors_1 = __nested_webpack_require_822799__(3983);
|
195263
195264
|
/**
|
195264
195265
|
* Helper function to support both `VERCEL_` and legacy `NOW_` env vars.
|
195265
195266
|
* Throws an error if *both* env vars are defined.
|
@@ -195287,7 +195288,7 @@ exports.getPlatformEnv = getPlatformEnv;
|
|
195287
195288
|
/***/ }),
|
195288
195289
|
|
195289
195290
|
/***/ 2855:
|
195290
|
-
/***/ (function(__unused_webpack_module, exports,
|
195291
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_823836__) {
|
195291
195292
|
|
195292
195293
|
"use strict";
|
195293
195294
|
|
@@ -195318,30 +195319,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
195318
195319
|
};
|
195319
195320
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
195320
195321
|
exports.normalizePath = exports.readConfigFile = exports.EdgeFunction = exports.getIgnoreFilter = exports.scanParentDirs = exports.getLambdaOptionsFromFunction = exports.isSymbolicLink = exports.debug = exports.streamToBuffer = exports.getPlatformEnv = exports.getSpawnOptions = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = exports.getNodeVersion = exports.getEnvForPackageManager = exports.runCustomInstallCommand = exports.runShellScript = exports.runPipInstall = exports.runBundleInstall = exports.runNpmInstall = exports.getNodeBinPath = exports.walkParentDirs = exports.spawnCommand = exports.execCommand = exports.runPackageJsonScript = exports.installDependencies = exports.getScriptName = exports.spawnAsync = exports.execAsync = exports.rename = exports.glob = exports.getWriteableDirectory = exports.download = exports.Prerender = exports.createLambda = exports.NodejsLambda = exports.Lambda = exports.FileRef = exports.FileFsRef = exports.FileBlob = void 0;
|
195321
|
-
const file_blob_1 = __importDefault(
|
195322
|
+
const file_blob_1 = __importDefault(__nested_webpack_require_823836__(2397));
|
195322
195323
|
exports.FileBlob = file_blob_1.default;
|
195323
|
-
const file_fs_ref_1 = __importDefault(
|
195324
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_823836__(9331));
|
195324
195325
|
exports.FileFsRef = file_fs_ref_1.default;
|
195325
|
-
const file_ref_1 = __importDefault(
|
195326
|
+
const file_ref_1 = __importDefault(__nested_webpack_require_823836__(5187));
|
195326
195327
|
exports.FileRef = file_ref_1.default;
|
195327
|
-
const lambda_1 =
|
195328
|
+
const lambda_1 = __nested_webpack_require_823836__(6721);
|
195328
195329
|
Object.defineProperty(exports, "Lambda", ({ enumerable: true, get: function () { return lambda_1.Lambda; } }));
|
195329
195330
|
Object.defineProperty(exports, "createLambda", ({ enumerable: true, get: function () { return lambda_1.createLambda; } }));
|
195330
195331
|
Object.defineProperty(exports, "getLambdaOptionsFromFunction", ({ enumerable: true, get: function () { return lambda_1.getLambdaOptionsFromFunction; } }));
|
195331
|
-
const nodejs_lambda_1 =
|
195332
|
+
const nodejs_lambda_1 = __nested_webpack_require_823836__(7049);
|
195332
195333
|
Object.defineProperty(exports, "NodejsLambda", ({ enumerable: true, get: function () { return nodejs_lambda_1.NodejsLambda; } }));
|
195333
|
-
const prerender_1 =
|
195334
|
+
const prerender_1 = __nested_webpack_require_823836__(2850);
|
195334
195335
|
Object.defineProperty(exports, "Prerender", ({ enumerable: true, get: function () { return prerender_1.Prerender; } }));
|
195335
|
-
const download_1 = __importStar(
|
195336
|
+
const download_1 = __importStar(__nested_webpack_require_823836__(1611));
|
195336
195337
|
exports.download = download_1.default;
|
195337
195338
|
Object.defineProperty(exports, "isSymbolicLink", ({ enumerable: true, get: function () { return download_1.isSymbolicLink; } }));
|
195338
|
-
const get_writable_directory_1 = __importDefault(
|
195339
|
+
const get_writable_directory_1 = __importDefault(__nested_webpack_require_823836__(3838));
|
195339
195340
|
exports.getWriteableDirectory = get_writable_directory_1.default;
|
195340
|
-
const glob_1 = __importDefault(
|
195341
|
+
const glob_1 = __importDefault(__nested_webpack_require_823836__(4240));
|
195341
195342
|
exports.glob = glob_1.default;
|
195342
|
-
const rename_1 = __importDefault(
|
195343
|
+
const rename_1 = __importDefault(__nested_webpack_require_823836__(6718));
|
195343
195344
|
exports.rename = rename_1.default;
|
195344
|
-
const run_user_scripts_1 =
|
195345
|
+
const run_user_scripts_1 = __nested_webpack_require_823836__(1442);
|
195345
195346
|
Object.defineProperty(exports, "execAsync", ({ enumerable: true, get: function () { return run_user_scripts_1.execAsync; } }));
|
195346
195347
|
Object.defineProperty(exports, "spawnAsync", ({ enumerable: true, get: function () { return run_user_scripts_1.spawnAsync; } }));
|
195347
195348
|
Object.defineProperty(exports, "execCommand", ({ enumerable: true, get: function () { return run_user_scripts_1.execCommand; } }));
|
@@ -195360,33 +195361,33 @@ Object.defineProperty(exports, "getNodeVersion", ({ enumerable: true, get: funct
|
|
195360
195361
|
Object.defineProperty(exports, "getSpawnOptions", ({ enumerable: true, get: function () { return run_user_scripts_1.getSpawnOptions; } }));
|
195361
195362
|
Object.defineProperty(exports, "getNodeBinPath", ({ enumerable: true, get: function () { return run_user_scripts_1.getNodeBinPath; } }));
|
195362
195363
|
Object.defineProperty(exports, "scanParentDirs", ({ enumerable: true, get: function () { return run_user_scripts_1.scanParentDirs; } }));
|
195363
|
-
const node_version_1 =
|
195364
|
+
const node_version_1 = __nested_webpack_require_823836__(7903);
|
195364
195365
|
Object.defineProperty(exports, "getLatestNodeVersion", ({ enumerable: true, get: function () { return node_version_1.getLatestNodeVersion; } }));
|
195365
195366
|
Object.defineProperty(exports, "getDiscontinuedNodeVersions", ({ enumerable: true, get: function () { return node_version_1.getDiscontinuedNodeVersions; } }));
|
195366
|
-
const stream_to_buffer_1 = __importDefault(
|
195367
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_823836__(2560));
|
195367
195368
|
exports.streamToBuffer = stream_to_buffer_1.default;
|
195368
|
-
const debug_1 = __importDefault(
|
195369
|
+
const debug_1 = __importDefault(__nested_webpack_require_823836__(1868));
|
195369
195370
|
exports.debug = debug_1.default;
|
195370
|
-
const get_ignore_filter_1 = __importDefault(
|
195371
|
+
const get_ignore_filter_1 = __importDefault(__nested_webpack_require_823836__(1148));
|
195371
195372
|
exports.getIgnoreFilter = get_ignore_filter_1.default;
|
195372
|
-
const get_platform_env_1 =
|
195373
|
+
const get_platform_env_1 = __nested_webpack_require_823836__(4678);
|
195373
195374
|
Object.defineProperty(exports, "getPlatformEnv", ({ enumerable: true, get: function () { return get_platform_env_1.getPlatformEnv; } }));
|
195374
|
-
var edge_function_1 =
|
195375
|
+
var edge_function_1 = __nested_webpack_require_823836__(8038);
|
195375
195376
|
Object.defineProperty(exports, "EdgeFunction", ({ enumerable: true, get: function () { return edge_function_1.EdgeFunction; } }));
|
195376
|
-
var read_config_file_1 =
|
195377
|
+
var read_config_file_1 = __nested_webpack_require_823836__(7792);
|
195377
195378
|
Object.defineProperty(exports, "readConfigFile", ({ enumerable: true, get: function () { return read_config_file_1.readConfigFile; } }));
|
195378
|
-
var normalize_path_1 =
|
195379
|
+
var normalize_path_1 = __nested_webpack_require_823836__(6261);
|
195379
195380
|
Object.defineProperty(exports, "normalizePath", ({ enumerable: true, get: function () { return normalize_path_1.normalizePath; } }));
|
195380
|
-
__exportStar(
|
195381
|
-
__exportStar(
|
195382
|
-
__exportStar(
|
195383
|
-
__exportStar(
|
195381
|
+
__exportStar(__nested_webpack_require_823836__(2564), exports);
|
195382
|
+
__exportStar(__nested_webpack_require_823836__(2416), exports);
|
195383
|
+
__exportStar(__nested_webpack_require_823836__(5748), exports);
|
195384
|
+
__exportStar(__nested_webpack_require_823836__(3983), exports);
|
195384
195385
|
|
195385
195386
|
|
195386
195387
|
/***/ }),
|
195387
195388
|
|
195388
195389
|
/***/ 6721:
|
195389
|
-
/***/ (function(__unused_webpack_module, exports,
|
195390
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_832081__) {
|
195390
195391
|
|
195391
195392
|
"use strict";
|
195392
195393
|
|
@@ -195395,13 +195396,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
195395
195396
|
};
|
195396
195397
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
195397
195398
|
exports.getLambdaOptionsFromFunction = exports.createZip = exports.createLambda = exports.Lambda = void 0;
|
195398
|
-
const assert_1 = __importDefault(
|
195399
|
-
const async_sema_1 = __importDefault(
|
195400
|
-
const yazl_1 =
|
195401
|
-
const minimatch_1 = __importDefault(
|
195402
|
-
const fs_extra_1 =
|
195403
|
-
const download_1 =
|
195404
|
-
const stream_to_buffer_1 = __importDefault(
|
195399
|
+
const assert_1 = __importDefault(__nested_webpack_require_832081__(2357));
|
195400
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_832081__(5758));
|
195401
|
+
const yazl_1 = __nested_webpack_require_832081__(1223);
|
195402
|
+
const minimatch_1 = __importDefault(__nested_webpack_require_832081__(9566));
|
195403
|
+
const fs_extra_1 = __nested_webpack_require_832081__(5392);
|
195404
|
+
const download_1 = __nested_webpack_require_832081__(1611);
|
195405
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_832081__(2560));
|
195405
195406
|
class Lambda {
|
195406
195407
|
constructor(opts) {
|
195407
195408
|
const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, } = opts;
|
@@ -195523,13 +195524,13 @@ exports.getLambdaOptionsFromFunction = getLambdaOptionsFromFunction;
|
|
195523
195524
|
/***/ }),
|
195524
195525
|
|
195525
195526
|
/***/ 7049:
|
195526
|
-
/***/ ((__unused_webpack_module, exports,
|
195527
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_837538__) => {
|
195527
195528
|
|
195528
195529
|
"use strict";
|
195529
195530
|
|
195530
195531
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
195531
195532
|
exports.NodejsLambda = void 0;
|
195532
|
-
const lambda_1 =
|
195533
|
+
const lambda_1 = __nested_webpack_require_837538__(6721);
|
195533
195534
|
class NodejsLambda extends lambda_1.Lambda {
|
195534
195535
|
constructor({ shouldAddHelpers, shouldAddSourcemapSupport, awsLambdaHandler, ...opts }) {
|
195535
195536
|
super(opts);
|
@@ -195666,13 +195667,13 @@ exports.buildsSchema = {
|
|
195666
195667
|
/***/ }),
|
195667
195668
|
|
195668
195669
|
/***/ 2564:
|
195669
|
-
/***/ ((__unused_webpack_module, exports,
|
195670
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_841883__) => {
|
195670
195671
|
|
195671
195672
|
"use strict";
|
195672
195673
|
|
195673
195674
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
195674
195675
|
exports.shouldServe = void 0;
|
195675
|
-
const path_1 =
|
195676
|
+
const path_1 = __nested_webpack_require_841883__(5622);
|
195676
195677
|
const shouldServe = ({ entrypoint, files, requestPath, }) => {
|
195677
195678
|
requestPath = requestPath.replace(/\/$/, ''); // sanitize trailing '/'
|
195678
195679
|
entrypoint = entrypoint.replace(/\\/, '/'); // windows compatibility
|
@@ -195901,7 +195902,7 @@ module.exports = __webpack_require__(78761);
|
|
195901
195902
|
/******/ var __webpack_module_cache__ = {};
|
195902
195903
|
/******/
|
195903
195904
|
/******/ // The require function
|
195904
|
-
/******/ function
|
195905
|
+
/******/ function __nested_webpack_require_941560__(moduleId) {
|
195905
195906
|
/******/ // Check if module is in cache
|
195906
195907
|
/******/ if(__webpack_module_cache__[moduleId]) {
|
195907
195908
|
/******/ return __webpack_module_cache__[moduleId].exports;
|
@@ -195916,7 +195917,7 @@ module.exports = __webpack_require__(78761);
|
|
195916
195917
|
/******/ // Execute the module function
|
195917
195918
|
/******/ var threw = true;
|
195918
195919
|
/******/ try {
|
195919
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports,
|
195920
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_941560__);
|
195920
195921
|
/******/ threw = false;
|
195921
195922
|
/******/ } finally {
|
195922
195923
|
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
@@ -195929,11 +195930,11 @@ module.exports = __webpack_require__(78761);
|
|
195929
195930
|
/************************************************************************/
|
195930
195931
|
/******/ /* webpack/runtime/compat */
|
195931
195932
|
/******/
|
195932
|
-
/******/
|
195933
|
+
/******/ __nested_webpack_require_941560__.ab = __dirname + "/";/************************************************************************/
|
195933
195934
|
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
195934
195935
|
/******/ // startup
|
195935
195936
|
/******/ // Load entry module and return exports
|
195936
|
-
/******/ return
|
195937
|
+
/******/ return __nested_webpack_require_941560__(2855);
|
195937
195938
|
/******/ })()
|
195938
195939
|
;
|
195939
195940
|
|
@@ -219896,7 +219897,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
219896
219897
|
exports.detectFileSystemAPI = void 0;
|
219897
219898
|
const semver_1 = __importDefault(__webpack_require__(59445));
|
219898
219899
|
const _1 = __webpack_require__(20302);
|
219899
|
-
const enableFileSystemApiFrameworks = new Set(['solidstart']);
|
219900
219900
|
/**
|
219901
219901
|
* If the Deployment can be built with the new File System API,
|
219902
219902
|
* return the new Builder. Otherwise an "Exclusion Condition"
|
@@ -219913,10 +219913,7 @@ async function detectFileSystemAPI({ files, projectSettings, builders, vercelCon
|
|
219913
219913
|
hasDotOutput,
|
219914
219914
|
hasMiddleware,
|
219915
219915
|
};
|
219916
|
-
const isEnabled = enableFlag ||
|
219917
|
-
hasMiddleware ||
|
219918
|
-
hasDotOutput ||
|
219919
|
-
enableFileSystemApiFrameworks.has(framework);
|
219916
|
+
const isEnabled = enableFlag || hasMiddleware || hasDotOutput;
|
219920
219917
|
if (!isEnabled) {
|
219921
219918
|
return { metadata, fsApiBuilder: null, reason: 'Flag not enabled.' };
|
219922
219919
|
}
|
@@ -220121,12 +220118,13 @@ async function matches(fs, framework) {
|
|
220121
220118
|
return result.every(res => res === true);
|
220122
220119
|
}
|
220123
220120
|
async function detectFramework({ fs, frameworkList, }) {
|
220124
|
-
|
220125
|
-
if (await matches(fs,
|
220126
|
-
return
|
220121
|
+
const result = await Promise.all(frameworkList.map(async (frameworkMatch) => {
|
220122
|
+
if (await matches(fs, frameworkMatch)) {
|
220123
|
+
return frameworkMatch.slug;
|
220127
220124
|
}
|
220128
|
-
|
220129
|
-
|
220125
|
+
return null;
|
220126
|
+
}));
|
220127
|
+
return result.find(res => res !== null) ?? null;
|
220130
220128
|
}
|
220131
220129
|
exports.detectFramework = detectFramework;
|
220132
220130
|
//# sourceMappingURL=detect-framework.js.map
|
@@ -230739,6 +230737,7 @@ const stamp_1 = __importDefault(__webpack_require__(92205));
|
|
230739
230737
|
const write_build_result_1 = __webpack_require__(28689);
|
230740
230738
|
const import_builders_1 = __webpack_require__(57049);
|
230741
230739
|
const corepack_1 = __webpack_require__(51806);
|
230740
|
+
const sort_builders_1 = __webpack_require__(40233);
|
230742
230741
|
const help = () => {
|
230743
230742
|
return console.log(`
|
230744
230743
|
${chalk_1.default.bold(`${cli.logo} ${cli.name} build`)}
|
@@ -230953,13 +230952,13 @@ async function main(client) {
|
|
230953
230952
|
cliVersion: pkg_1.default.version,
|
230954
230953
|
};
|
230955
230954
|
// Execute Builders for detected entrypoints
|
230956
|
-
// TODO: parallelize builds
|
230955
|
+
// TODO: parallelize builds (except for frontend)
|
230956
|
+
const sortedBuilders = sort_builders_1.sortBuilders(builds);
|
230957
230957
|
const buildResults = new Map();
|
230958
230958
|
const overrides = [];
|
230959
230959
|
const repoRootPath = cwd;
|
230960
|
-
const
|
230961
|
-
const
|
230962
|
-
for (const build of builds) {
|
230960
|
+
const corepackShimDir = await corepack_1.initCorepack({ repoRootPath });
|
230961
|
+
for (const build of sortedBuilders) {
|
230963
230962
|
if (typeof build.src !== 'string')
|
230964
230963
|
continue;
|
230965
230964
|
const builderWithPkg = buildersWithPkgs.get(build.use);
|
@@ -231727,6 +231726,7 @@ const help = () => `
|
|
231727
231726
|
deploy [path] Performs a deployment ${chalk_1.default.bold('(default)')}
|
231728
231727
|
dev Start a local development server
|
231729
231728
|
env Manages the Environment Variables for your current Project
|
231729
|
+
git Manage Git provider repository for your current Project
|
231730
231730
|
init [example] Initialize an example project
|
231731
231731
|
ls | list [app] Lists deployments
|
231732
231732
|
inspect [id] Displays information related to a deployment
|
@@ -231861,7 +231861,7 @@ const args_1 = __webpack_require__(56870);
|
|
231861
231861
|
const get_deployment_checks_1 = __webpack_require__(58293);
|
231862
231862
|
const parse_target_1 = __importDefault(__webpack_require__(77601));
|
231863
231863
|
const get_prebuilt_json_1 = __importDefault(__webpack_require__(91307));
|
231864
|
-
const create_git_meta_1 = __webpack_require__(
|
231864
|
+
const create_git_meta_1 = __webpack_require__(21084);
|
231865
231865
|
exports.default = async (client) => {
|
231866
231866
|
const { output } = client;
|
231867
231867
|
let argv = null;
|
@@ -234666,6 +234666,251 @@ async function rm(client, project, opts, args, output) {
|
|
234666
234666
|
exports.default = rm;
|
234667
234667
|
|
234668
234668
|
|
234669
|
+
/***/ }),
|
234670
|
+
|
234671
|
+
/***/ 19017:
|
234672
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
234673
|
+
|
234674
|
+
"use strict";
|
234675
|
+
|
234676
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
234677
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
234678
|
+
};
|
234679
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
234680
|
+
const chalk_1 = __importDefault(__webpack_require__(961));
|
234681
|
+
const path_1 = __webpack_require__(85622);
|
234682
|
+
const create_git_meta_1 = __webpack_require__(21084);
|
234683
|
+
const confirm_1 = __importDefault(__webpack_require__(33564));
|
234684
|
+
const link_1 = __importDefault(__webpack_require__(98472));
|
234685
|
+
const pkg_name_1 = __webpack_require__(98106);
|
234686
|
+
const connect_git_provider_1 = __webpack_require__(35650);
|
234687
|
+
const validate_paths_1 = __importDefault(__webpack_require__(54579));
|
234688
|
+
async function connect(client, argv, args, project, org) {
|
234689
|
+
const { output } = client;
|
234690
|
+
const confirm = Boolean(argv['--confirm']);
|
234691
|
+
if (args.length !== 0) {
|
234692
|
+
output.error(`Invalid number of arguments. Usage: ${chalk_1.default.cyan(`${pkg_name_1.getCommandName('project connect')}`)}`);
|
234693
|
+
return 2;
|
234694
|
+
}
|
234695
|
+
if (!project || !org) {
|
234696
|
+
output.error(`Can't find \`org\` or \`project\`. Make sure your current directory is linked to a Vercel projet by running ${pkg_name_1.getCommandName('link')}.`);
|
234697
|
+
return 1;
|
234698
|
+
}
|
234699
|
+
let paths = [process.cwd()];
|
234700
|
+
const validate = await validate_paths_1.default(client, paths);
|
234701
|
+
if (!validate.valid) {
|
234702
|
+
return validate.exitCode;
|
234703
|
+
}
|
234704
|
+
const { path } = validate;
|
234705
|
+
const gitProviderLink = project.link;
|
234706
|
+
client.config.currentTeam = org.type === 'team' ? org.id : undefined;
|
234707
|
+
// get project from .git
|
234708
|
+
const gitConfigPath = path_1.join(path, '.git/config');
|
234709
|
+
const gitConfig = await create_git_meta_1.parseGitConfig(gitConfigPath, output);
|
234710
|
+
if (!gitConfig) {
|
234711
|
+
output.error(`No local git repo found. Run ${chalk_1.default.cyan('`git clone <url>`')} to clone a remote Git repository first.`);
|
234712
|
+
return 1;
|
234713
|
+
}
|
234714
|
+
const remoteUrl = create_git_meta_1.pluckRemoteUrl(gitConfig);
|
234715
|
+
if (!remoteUrl) {
|
234716
|
+
output.error(`No remote origin URL found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${chalk_1.default.cyan('`git remote --help`')} for more details.`);
|
234717
|
+
return 1;
|
234718
|
+
}
|
234719
|
+
output.log(`Identified Git remote "origin": ${link_1.default(remoteUrl)}`);
|
234720
|
+
const parsedUrl = connect_git_provider_1.parseRepoUrl(remoteUrl);
|
234721
|
+
if (!parsedUrl) {
|
234722
|
+
output.error(`Failed to parse Git repo data from the following remote URL in your Git config: ${link_1.default(remoteUrl)}`);
|
234723
|
+
return 1;
|
234724
|
+
}
|
234725
|
+
const { provider, org: gitOrg, repo } = parsedUrl;
|
234726
|
+
const repoPath = `${gitOrg}/${repo}`;
|
234727
|
+
let connectedRepoPath;
|
234728
|
+
if (!gitProviderLink) {
|
234729
|
+
const connect = await connect_git_provider_1.connectGitProvider(client, org, project.id, provider, repoPath);
|
234730
|
+
if (typeof connect === 'number') {
|
234731
|
+
return connect;
|
234732
|
+
}
|
234733
|
+
}
|
234734
|
+
else {
|
234735
|
+
const connectedProvider = gitProviderLink.type;
|
234736
|
+
const connectedOrg = gitProviderLink.org;
|
234737
|
+
const connectedRepo = gitProviderLink.repo;
|
234738
|
+
connectedRepoPath = `${connectedOrg}/${connectedRepo}`;
|
234739
|
+
const isSameRepo = connectedProvider === provider &&
|
234740
|
+
connectedOrg === gitOrg &&
|
234741
|
+
connectedRepo === repo;
|
234742
|
+
if (isSameRepo) {
|
234743
|
+
output.log(`${chalk_1.default.cyan(connectedRepoPath)} is already connected to your project.`);
|
234744
|
+
return 1;
|
234745
|
+
}
|
234746
|
+
const shouldReplaceRepo = await confirmRepoConnect(client, output, confirm, connectedRepoPath);
|
234747
|
+
if (!shouldReplaceRepo) {
|
234748
|
+
return 0;
|
234749
|
+
}
|
234750
|
+
await connect_git_provider_1.disconnectGitProvider(client, org, project.id);
|
234751
|
+
const connect = await connect_git_provider_1.connectGitProvider(client, org, project.id, provider, repoPath);
|
234752
|
+
if (typeof connect === 'number') {
|
234753
|
+
return connect;
|
234754
|
+
}
|
234755
|
+
}
|
234756
|
+
output.log(`Connected ${connect_git_provider_1.formatProvider(provider)} repository ${chalk_1.default.cyan(repoPath)}!`);
|
234757
|
+
return 0;
|
234758
|
+
}
|
234759
|
+
exports.default = connect;
|
234760
|
+
async function confirmRepoConnect(client, output, yes, connectedRepoPath) {
|
234761
|
+
let shouldReplaceProject = yes;
|
234762
|
+
if (!shouldReplaceProject) {
|
234763
|
+
shouldReplaceProject = await confirm_1.default(client, `Looks like you already have a repository connected: ${chalk_1.default.cyan(connectedRepoPath)}. Do you want to replace it?`, true);
|
234764
|
+
if (!shouldReplaceProject) {
|
234765
|
+
output.log(`Aborted. Repo not connected.`);
|
234766
|
+
}
|
234767
|
+
}
|
234768
|
+
return shouldReplaceProject;
|
234769
|
+
}
|
234770
|
+
|
234771
|
+
|
234772
|
+
/***/ }),
|
234773
|
+
|
234774
|
+
/***/ 36316:
|
234775
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
234776
|
+
|
234777
|
+
"use strict";
|
234778
|
+
|
234779
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
234780
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
234781
|
+
};
|
234782
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
234783
|
+
const chalk_1 = __importDefault(__webpack_require__(961));
|
234784
|
+
const confirm_1 = __importDefault(__webpack_require__(33564));
|
234785
|
+
const pkg_name_1 = __webpack_require__(98106);
|
234786
|
+
const connect_git_provider_1 = __webpack_require__(35650);
|
234787
|
+
async function disconnect(client, args, project, org) {
|
234788
|
+
const { output } = client;
|
234789
|
+
if (args.length !== 0) {
|
234790
|
+
output.error(`Invalid number of arguments. Usage: ${chalk_1.default.cyan(`${pkg_name_1.getCommandName('project disconnect')}`)}`);
|
234791
|
+
return 2;
|
234792
|
+
}
|
234793
|
+
if (!project || !org) {
|
234794
|
+
output.error('An unexpected error occurred.');
|
234795
|
+
return 1;
|
234796
|
+
}
|
234797
|
+
if (project.link) {
|
234798
|
+
const { org: linkOrg, repo } = project.link;
|
234799
|
+
output.print(`Your Vercel project will no longer create deployments when you push to this repository.\n`);
|
234800
|
+
const confirmDisconnect = await confirm_1.default(client, `Are you sure you want to disconnect ${chalk_1.default.cyan(`${linkOrg}/${repo}`)} from your project?`, false);
|
234801
|
+
if (confirmDisconnect) {
|
234802
|
+
await connect_git_provider_1.disconnectGitProvider(client, org, project.id);
|
234803
|
+
output.log(`Disconnected ${chalk_1.default.cyan(`${linkOrg}/${repo}`)}.`);
|
234804
|
+
}
|
234805
|
+
else {
|
234806
|
+
output.log('Aborted.');
|
234807
|
+
}
|
234808
|
+
}
|
234809
|
+
else {
|
234810
|
+
output.error(`No Git repository connected. Run ${pkg_name_1.getCommandName('project connect')} to connect one.`);
|
234811
|
+
return 1;
|
234812
|
+
}
|
234813
|
+
return 0;
|
234814
|
+
}
|
234815
|
+
exports.default = disconnect;
|
234816
|
+
|
234817
|
+
|
234818
|
+
/***/ }),
|
234819
|
+
|
234820
|
+
/***/ 94715:
|
234821
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
234822
|
+
|
234823
|
+
"use strict";
|
234824
|
+
|
234825
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
234826
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
234827
|
+
};
|
234828
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
234829
|
+
const chalk_1 = __importDefault(__webpack_require__(961));
|
234830
|
+
const ensure_link_1 = __webpack_require__(18067);
|
234831
|
+
const get_args_1 = __importDefault(__webpack_require__(87612));
|
234832
|
+
const get_invalid_subcommand_1 = __importDefault(__webpack_require__(89543));
|
234833
|
+
const handle_error_1 = __importDefault(__webpack_require__(70870));
|
234834
|
+
const logo_1 = __importDefault(__webpack_require__(9829));
|
234835
|
+
const pkg_name_1 = __webpack_require__(98106);
|
234836
|
+
const validate_paths_1 = __importDefault(__webpack_require__(54579));
|
234837
|
+
const connect_1 = __importDefault(__webpack_require__(19017));
|
234838
|
+
const disconnect_1 = __importDefault(__webpack_require__(36316));
|
234839
|
+
const help = () => {
|
234840
|
+
console.log(`
|
234841
|
+
${chalk_1.default.bold(`${logo_1.default} ${pkg_name_1.getPkgName()} git`)} <command>
|
234842
|
+
|
234843
|
+
${chalk_1.default.dim('Commands:')}
|
234844
|
+
|
234845
|
+
connect Connect your Git config "origin" remote as a Git provider to your project
|
234846
|
+
disconnect Disconnect the Git provider repository from your project
|
234847
|
+
|
234848
|
+
${chalk_1.default.dim('Options:')}
|
234849
|
+
|
234850
|
+
-h, --help Output usage information
|
234851
|
+
-t ${chalk_1.default.bold.underline('TOKEN')}, --token=${chalk_1.default.bold.underline('TOKEN')} Login token
|
234852
|
+
|
234853
|
+
${chalk_1.default.dim('Examples:')}
|
234854
|
+
|
234855
|
+
${chalk_1.default.gray('–')} Connect a Git provider repository
|
234856
|
+
|
234857
|
+
${chalk_1.default.cyan(`$ ${pkg_name_1.getPkgName()} git connect`)}
|
234858
|
+
|
234859
|
+
${chalk_1.default.gray('–')} Disconnect the Git provider repository
|
234860
|
+
|
234861
|
+
${chalk_1.default.cyan(`$ ${pkg_name_1.getPkgName()} git disconnect`)}
|
234862
|
+
`);
|
234863
|
+
};
|
234864
|
+
const COMMAND_CONFIG = {
|
234865
|
+
connect: ['connect'],
|
234866
|
+
disconnect: ['disconnect'],
|
234867
|
+
};
|
234868
|
+
async function main(client) {
|
234869
|
+
let argv;
|
234870
|
+
let subcommand;
|
234871
|
+
try {
|
234872
|
+
argv = get_args_1.default(client.argv.slice(2), {
|
234873
|
+
'--confirm': Boolean,
|
234874
|
+
});
|
234875
|
+
}
|
234876
|
+
catch (error) {
|
234877
|
+
handle_error_1.default(error);
|
234878
|
+
return 1;
|
234879
|
+
}
|
234880
|
+
if (argv['--help']) {
|
234881
|
+
help();
|
234882
|
+
return 2;
|
234883
|
+
}
|
234884
|
+
argv._ = argv._.slice(1);
|
234885
|
+
subcommand = argv._[0];
|
234886
|
+
const args = argv._.slice(1);
|
234887
|
+
const confirm = Boolean(argv['--confirm']);
|
234888
|
+
const { output } = client;
|
234889
|
+
let paths = [process.cwd()];
|
234890
|
+
const pathValidation = await validate_paths_1.default(client, paths);
|
234891
|
+
if (!pathValidation.valid) {
|
234892
|
+
return pathValidation.exitCode;
|
234893
|
+
}
|
234894
|
+
const { path } = pathValidation;
|
234895
|
+
const linkedProject = await ensure_link_1.ensureLink('git', client, path, confirm);
|
234896
|
+
if (typeof linkedProject === 'number') {
|
234897
|
+
return linkedProject;
|
234898
|
+
}
|
234899
|
+
const { org, project } = linkedProject;
|
234900
|
+
switch (subcommand) {
|
234901
|
+
case 'connect':
|
234902
|
+
return await connect_1.default(client, argv, args, project, org);
|
234903
|
+
case 'disconnect':
|
234904
|
+
return await disconnect_1.default(client, args, project, org);
|
234905
|
+
default:
|
234906
|
+
output.error(get_invalid_subcommand_1.default(COMMAND_CONFIG));
|
234907
|
+
help();
|
234908
|
+
return 2;
|
234909
|
+
}
|
234910
|
+
}
|
234911
|
+
exports.default = main;
|
234912
|
+
|
234913
|
+
|
234669
234914
|
/***/ }),
|
234670
234915
|
|
234671
234916
|
/***/ 87136:
|
@@ -234690,6 +234935,7 @@ exports.default = new Map([
|
|
234690
234935
|
['domain', 'domains'],
|
234691
234936
|
['domains', 'domains'],
|
234692
234937
|
['env', 'env'],
|
234938
|
+
['git', 'git'],
|
234693
234939
|
['help', 'help'],
|
234694
234940
|
['init', 'init'],
|
234695
234941
|
['inspect', 'inspect'],
|
@@ -236039,7 +236285,6 @@ const get_scope_1 = __importDefault(__webpack_require__(73389));
|
|
236039
236285
|
const handle_error_1 = __importDefault(__webpack_require__(70870));
|
236040
236286
|
const logo_1 = __importDefault(__webpack_require__(9829));
|
236041
236287
|
const pkg_name_1 = __webpack_require__(98106);
|
236042
|
-
const validate_paths_1 = __importDefault(__webpack_require__(54579));
|
236043
236288
|
const add_1 = __importDefault(__webpack_require__(38128));
|
236044
236289
|
const list_1 = __importDefault(__webpack_require__(38696));
|
236045
236290
|
const rm_1 = __importDefault(__webpack_require__(76136));
|
@@ -236075,7 +236320,6 @@ const COMMAND_CONFIG = {
|
|
236075
236320
|
ls: ['ls', 'list'],
|
236076
236321
|
add: ['add'],
|
236077
236322
|
rm: ['rm', 'remove'],
|
236078
|
-
connect: ['connect'],
|
236079
236323
|
};
|
236080
236324
|
async function main(client) {
|
236081
236325
|
let argv;
|
@@ -236084,7 +236328,6 @@ async function main(client) {
|
|
236084
236328
|
argv = get_args_1.default(client.argv.slice(2), {
|
236085
236329
|
'--next': Number,
|
236086
236330
|
'-N': '--next',
|
236087
|
-
'--yes': Boolean,
|
236088
236331
|
});
|
236089
236332
|
}
|
236090
236333
|
catch (error) {
|
@@ -236099,11 +236342,6 @@ async function main(client) {
|
|
236099
236342
|
subcommand = argv._[0] || 'list';
|
236100
236343
|
const args = argv._.slice(1);
|
236101
236344
|
const { output } = client;
|
236102
|
-
let paths = [process.cwd()];
|
236103
|
-
const pathValidation = await validate_paths_1.default(client, paths);
|
236104
|
-
if (!pathValidation.valid) {
|
236105
|
-
return pathValidation.exitCode;
|
236106
|
-
}
|
236107
236345
|
let contextName = '';
|
236108
236346
|
try {
|
236109
236347
|
({ contextName } = await get_scope_1.default(client));
|
@@ -237542,7 +237780,7 @@ const main = async () => {
|
|
237542
237780
|
// * a subcommand (as in: `vercel ls`)
|
237543
237781
|
const targetOrSubcommand = argv._[2];
|
237544
237782
|
// Currently no beta commands - add here as needed
|
237545
|
-
const betaCommands = [
|
237783
|
+
const betaCommands = [];
|
237546
237784
|
if (betaCommands.includes(targetOrSubcommand)) {
|
237547
237785
|
console.log(`${chalk_1.default.grey(`${pkg_name_1.getTitleName()} CLI ${pkg_1.default.version} ${targetOrSubcommand} (beta) — https://vercel.com/feedback`)}`);
|
237548
237786
|
}
|
@@ -237881,6 +238119,9 @@ const main = async () => {
|
|
237881
238119
|
case 'env':
|
237882
238120
|
func = __webpack_require__(41872).default;
|
237883
238121
|
break;
|
238122
|
+
case 'git':
|
238123
|
+
func = __webpack_require__(94715).default;
|
238124
|
+
break;
|
237884
238125
|
case 'init':
|
237885
238126
|
func = __webpack_require__(34499).default;
|
237886
238127
|
break;
|
@@ -238422,13 +238663,13 @@ const fs_extra_1 = __importDefault(__webpack_require__(45392));
|
|
238422
238663
|
const errors_ts_1 = __webpack_require__(60156);
|
238423
238664
|
const link_1 = __webpack_require__(67630);
|
238424
238665
|
const read_json_file_1 = __importDefault(__webpack_require__(16898));
|
238425
|
-
async function initCorepack({
|
238666
|
+
async function initCorepack({ repoRootPath, }) {
|
238426
238667
|
if (process.env.ENABLE_EXPERIMENTAL_COREPACK !== '1') {
|
238427
238668
|
// Since corepack is experimental, we need to exit early
|
238428
238669
|
// unless the user explicitly enables it with the env var.
|
238429
238670
|
return null;
|
238430
238671
|
}
|
238431
|
-
const pkg = await read_json_file_1.default(path_1.join(
|
238672
|
+
const pkg = await read_json_file_1.default(path_1.join(repoRootPath, 'package.json'));
|
238432
238673
|
if (pkg instanceof errors_ts_1.CantParseJSONFile) {
|
238433
238674
|
console.warn('Warning: Could not enable corepack because package.json is invalid JSON');
|
238434
238675
|
}
|
@@ -238437,16 +238678,13 @@ async function initCorepack({ cwd, rootPackageJsonPath, }) {
|
|
238437
238678
|
}
|
238438
238679
|
else {
|
238439
238680
|
console.log(`Detected ENABLE_EXPERIMENTAL_COREPACK=1 and "${pkg.packageManager}" in package.json`);
|
238440
|
-
const corepackRootDir = path_1.join(
|
238681
|
+
const corepackRootDir = path_1.join(repoRootPath, link_1.VERCEL_DIR, 'cache', 'corepack');
|
238441
238682
|
const corepackHomeDir = path_1.join(corepackRootDir, 'home');
|
238442
238683
|
const corepackShimDir = path_1.join(corepackRootDir, 'shim');
|
238443
238684
|
await fs_extra_1.default.mkdirp(corepackHomeDir);
|
238444
238685
|
await fs_extra_1.default.mkdirp(corepackShimDir);
|
238445
238686
|
process.env.COREPACK_HOME = corepackHomeDir;
|
238446
238687
|
process.env.PATH = `${corepackShimDir}${path_1.delimiter}${process.env.PATH}`;
|
238447
|
-
process.env.DEBUG = process.env.DEBUG
|
238448
|
-
? `corepack,${process.env.DEBUG}`
|
238449
|
-
: 'corepack';
|
238450
238688
|
const pkgManagerName = pkg.packageManager.split('@')[0];
|
238451
238689
|
// We must explicitly call `corepack enable npm` since `corepack enable`
|
238452
238690
|
// doesn't work with npm. See https://github.com/nodejs/corepack/pull/24
|
@@ -238470,14 +238708,6 @@ function cleanupCorepack(corepackShimDir) {
|
|
238470
238708
|
if (process.env.PATH) {
|
238471
238709
|
process.env.PATH = process.env.PATH.replace(`${corepackShimDir}${path_1.delimiter}`, '');
|
238472
238710
|
}
|
238473
|
-
if (process.env.DEBUG) {
|
238474
|
-
if (process.env.DEBUG === 'corepack') {
|
238475
|
-
delete process.env.DEBUG;
|
238476
|
-
}
|
238477
|
-
else {
|
238478
|
-
process.env.DEBUG = process.env.DEBUG.replace('corepack,', '');
|
238479
|
-
}
|
238480
|
-
}
|
238481
238711
|
}
|
238482
238712
|
exports.cleanupCorepack = cleanupCorepack;
|
238483
238713
|
|
@@ -238681,6 +238911,29 @@ async function installBuilders(buildersDir, buildersToAdd, output) {
|
|
238681
238911
|
}
|
238682
238912
|
|
238683
238913
|
|
238914
|
+
/***/ }),
|
238915
|
+
|
238916
|
+
/***/ 40233:
|
238917
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
238918
|
+
|
238919
|
+
"use strict";
|
238920
|
+
|
238921
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
238922
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
238923
|
+
};
|
238924
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
238925
|
+
exports.sortBuilders = void 0;
|
238926
|
+
const frameworks_1 = __importDefault(__webpack_require__(48438));
|
238927
|
+
function sortBuilders(builds) {
|
238928
|
+
const frontendRuntimeSet = new Set(frameworks_1.default.map(f => f.useRuntime?.use || '@vercel/static-build'));
|
238929
|
+
const toNumber = (build) => (frontendRuntimeSet.has(build.use) ? 0 : 1);
|
238930
|
+
return builds.sort((build1, build2) => {
|
238931
|
+
return toNumber(build1) - toNumber(build2);
|
238932
|
+
});
|
238933
|
+
}
|
238934
|
+
exports.sortBuilders = sortBuilders;
|
238935
|
+
|
238936
|
+
|
238684
238937
|
/***/ }),
|
238685
238938
|
|
238686
238939
|
/***/ 33274:
|
@@ -240282,6 +240535,103 @@ exports.GA_TRACKING_ID = "UA-117491914-3";
|
|
240282
240535
|
exports.SENTRY_DSN = "https://26a24e59ba954011919a524b341b6ab5@sentry.io/1323225";
|
240283
240536
|
|
240284
240537
|
|
240538
|
+
/***/ }),
|
240539
|
+
|
240540
|
+
/***/ 21084:
|
240541
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
240542
|
+
|
240543
|
+
"use strict";
|
240544
|
+
|
240545
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
240546
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
240547
|
+
};
|
240548
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
240549
|
+
exports.createGitMeta = exports.getRemoteUrl = exports.pluckRemoteUrl = exports.parseGitConfig = exports.isDirty = void 0;
|
240550
|
+
const fs_extra_1 = __importDefault(__webpack_require__(45392));
|
240551
|
+
const path_1 = __webpack_require__(85622);
|
240552
|
+
const ini_1 = __importDefault(__webpack_require__(61967));
|
240553
|
+
const git_last_commit_1 = __importDefault(__webpack_require__(13495));
|
240554
|
+
const child_process_1 = __webpack_require__(63129);
|
240555
|
+
function isDirty(directory, output) {
|
240556
|
+
return new Promise(resolve => {
|
240557
|
+
child_process_1.exec('git status -s', { cwd: directory }, function (err, stdout, stderr) {
|
240558
|
+
let debugMessage = `Failed to determine if Git repo has been modified:`;
|
240559
|
+
if (err || stderr) {
|
240560
|
+
if (err)
|
240561
|
+
debugMessage += `\n${err}`;
|
240562
|
+
if (stderr)
|
240563
|
+
debugMessage += `\n${stderr.trim()}`;
|
240564
|
+
output.debug(debugMessage);
|
240565
|
+
return resolve(false);
|
240566
|
+
}
|
240567
|
+
resolve(stdout.trim().length > 0);
|
240568
|
+
});
|
240569
|
+
});
|
240570
|
+
}
|
240571
|
+
exports.isDirty = isDirty;
|
240572
|
+
function getLastCommit(directory) {
|
240573
|
+
return new Promise((resolve, reject) => {
|
240574
|
+
git_last_commit_1.default.getLastCommit((err, commit) => {
|
240575
|
+
if (err)
|
240576
|
+
return reject(err);
|
240577
|
+
resolve(commit);
|
240578
|
+
}, { dst: directory });
|
240579
|
+
});
|
240580
|
+
}
|
240581
|
+
async function parseGitConfig(configPath, output) {
|
240582
|
+
try {
|
240583
|
+
return ini_1.default.parse(await fs_extra_1.default.readFile(configPath, 'utf-8'));
|
240584
|
+
}
|
240585
|
+
catch (error) {
|
240586
|
+
output.debug(`Error while parsing repo data: ${error.message}`);
|
240587
|
+
}
|
240588
|
+
}
|
240589
|
+
exports.parseGitConfig = parseGitConfig;
|
240590
|
+
function pluckRemoteUrl(gitConfig) {
|
240591
|
+
// Assuming "origin" is the remote url that the user would want to use
|
240592
|
+
return gitConfig['remote "origin"']?.url;
|
240593
|
+
}
|
240594
|
+
exports.pluckRemoteUrl = pluckRemoteUrl;
|
240595
|
+
async function getRemoteUrl(configPath, output) {
|
240596
|
+
let gitConfig = await parseGitConfig(configPath, output);
|
240597
|
+
if (!gitConfig) {
|
240598
|
+
return null;
|
240599
|
+
}
|
240600
|
+
const originUrl = pluckRemoteUrl(gitConfig);
|
240601
|
+
if (originUrl) {
|
240602
|
+
return originUrl;
|
240603
|
+
}
|
240604
|
+
return null;
|
240605
|
+
}
|
240606
|
+
exports.getRemoteUrl = getRemoteUrl;
|
240607
|
+
async function createGitMeta(directory, output) {
|
240608
|
+
const remoteUrl = await getRemoteUrl(path_1.join(directory, '.git/config'), output);
|
240609
|
+
// If we can't get the repo URL, then don't return any metadata
|
240610
|
+
if (!remoteUrl) {
|
240611
|
+
return;
|
240612
|
+
}
|
240613
|
+
const [commit, dirty] = await Promise.all([
|
240614
|
+
getLastCommit(directory).catch(err => {
|
240615
|
+
output.debug(`Failed to get last commit. The directory is likely not a Git repo, there are no latest commits, or it is corrupted.\n${err}`);
|
240616
|
+
return;
|
240617
|
+
}),
|
240618
|
+
isDirty(directory, output),
|
240619
|
+
]);
|
240620
|
+
if (!commit) {
|
240621
|
+
return;
|
240622
|
+
}
|
240623
|
+
return {
|
240624
|
+
remoteUrl,
|
240625
|
+
commitAuthorName: commit.author.name,
|
240626
|
+
commitMessage: commit.subject,
|
240627
|
+
commitRef: commit.branch,
|
240628
|
+
commitSha: commit.hash,
|
240629
|
+
dirty,
|
240630
|
+
};
|
240631
|
+
}
|
240632
|
+
exports.createGitMeta = createGitMeta;
|
240633
|
+
|
240634
|
+
|
240285
240635
|
/***/ }),
|
240286
240636
|
|
240287
240637
|
/***/ 80974:
|
@@ -240389,95 +240739,6 @@ async function createDeploy(client, now, contextName, paths, createArgs, org, is
|
|
240389
240739
|
exports.default = createDeploy;
|
240390
240740
|
|
240391
240741
|
|
240392
|
-
/***/ }),
|
240393
|
-
|
240394
|
-
/***/ 92282:
|
240395
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
240396
|
-
|
240397
|
-
"use strict";
|
240398
|
-
|
240399
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
240400
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
240401
|
-
};
|
240402
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
240403
|
-
exports.createGitMeta = exports.getRemoteUrl = exports.isDirty = void 0;
|
240404
|
-
const fs_extra_1 = __importDefault(__webpack_require__(45392));
|
240405
|
-
const path_1 = __webpack_require__(85622);
|
240406
|
-
const ini_1 = __importDefault(__webpack_require__(61967));
|
240407
|
-
const git_last_commit_1 = __importDefault(__webpack_require__(13495));
|
240408
|
-
const child_process_1 = __webpack_require__(63129);
|
240409
|
-
function isDirty(directory, output) {
|
240410
|
-
return new Promise(resolve => {
|
240411
|
-
child_process_1.exec('git status -s', { cwd: directory }, function (err, stdout, stderr) {
|
240412
|
-
let debugMessage = `Failed to determine if Git repo has been modified:`;
|
240413
|
-
if (err || stderr) {
|
240414
|
-
if (err)
|
240415
|
-
debugMessage += `\n${err}`;
|
240416
|
-
if (stderr)
|
240417
|
-
debugMessage += `\n${stderr.trim()}`;
|
240418
|
-
output.debug(debugMessage);
|
240419
|
-
return resolve(false);
|
240420
|
-
}
|
240421
|
-
resolve(stdout.trim().length > 0);
|
240422
|
-
});
|
240423
|
-
});
|
240424
|
-
}
|
240425
|
-
exports.isDirty = isDirty;
|
240426
|
-
function getLastCommit(directory) {
|
240427
|
-
return new Promise((resolve, reject) => {
|
240428
|
-
git_last_commit_1.default.getLastCommit((err, commit) => {
|
240429
|
-
if (err)
|
240430
|
-
return reject(err);
|
240431
|
-
resolve(commit);
|
240432
|
-
}, { dst: directory });
|
240433
|
-
});
|
240434
|
-
}
|
240435
|
-
async function getRemoteUrl(configPath, output) {
|
240436
|
-
let gitConfig;
|
240437
|
-
try {
|
240438
|
-
gitConfig = ini_1.default.parse(await fs_extra_1.default.readFile(configPath, 'utf-8'));
|
240439
|
-
}
|
240440
|
-
catch (error) {
|
240441
|
-
output.debug(`Error while parsing repo data: ${error.message}`);
|
240442
|
-
}
|
240443
|
-
if (!gitConfig) {
|
240444
|
-
return null;
|
240445
|
-
}
|
240446
|
-
const originUrl = gitConfig['remote "origin"']?.url;
|
240447
|
-
if (originUrl) {
|
240448
|
-
return originUrl;
|
240449
|
-
}
|
240450
|
-
return null;
|
240451
|
-
}
|
240452
|
-
exports.getRemoteUrl = getRemoteUrl;
|
240453
|
-
async function createGitMeta(directory, output) {
|
240454
|
-
const remoteUrl = await getRemoteUrl(path_1.join(directory, '.git/config'), output);
|
240455
|
-
// If we can't get the repo URL, then don't return any metadata
|
240456
|
-
if (!remoteUrl) {
|
240457
|
-
return;
|
240458
|
-
}
|
240459
|
-
const [commit, dirty] = await Promise.all([
|
240460
|
-
getLastCommit(directory).catch(err => {
|
240461
|
-
output.debug(`Failed to get last commit. The directory is likely not a Git repo, there are no latest commits, or it is corrupted.\n${err}`);
|
240462
|
-
return;
|
240463
|
-
}),
|
240464
|
-
isDirty(directory, output),
|
240465
|
-
]);
|
240466
|
-
if (!commit) {
|
240467
|
-
return;
|
240468
|
-
}
|
240469
|
-
return {
|
240470
|
-
remoteUrl,
|
240471
|
-
commitAuthorName: commit.author.name,
|
240472
|
-
commitMessage: commit.subject,
|
240473
|
-
commitRef: commit.branch,
|
240474
|
-
commitSha: commit.hash,
|
240475
|
-
dirty,
|
240476
|
-
};
|
240477
|
-
}
|
240478
|
-
exports.createGitMeta = createGitMeta;
|
240479
|
-
|
240480
|
-
|
240481
240742
|
/***/ }),
|
240482
240743
|
|
240483
240744
|
/***/ 80478:
|
@@ -248748,7 +249009,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
248748
249009
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
248749
249010
|
};
|
248750
249011
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
248751
|
-
const inquirer_1 = __importDefault(__webpack_require__(64016));
|
248752
249012
|
const get_user_1 = __importDefault(__webpack_require__(89796));
|
248753
249013
|
const get_teams_1 = __importDefault(__webpack_require__(1280));
|
248754
249014
|
async function selectOrg(client, question, autoConfirm) {
|
@@ -248777,7 +249037,7 @@ async function selectOrg(client, question, autoConfirm) {
|
|
248777
249037
|
if (autoConfirm) {
|
248778
249038
|
return choices[defaultOrgIndex].value;
|
248779
249039
|
}
|
248780
|
-
const answers = await
|
249040
|
+
const answers = await client.prompt({
|
248781
249041
|
type: 'list',
|
248782
249042
|
name: 'org',
|
248783
249043
|
message: question,
|
@@ -250981,6 +251241,109 @@ async function addDomainToProject(client, projectNameOrId, domain) {
|
|
250981
251241
|
exports.addDomainToProject = addDomainToProject;
|
250982
251242
|
|
250983
251243
|
|
251244
|
+
/***/ }),
|
251245
|
+
|
251246
|
+
/***/ 35650:
|
251247
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
251248
|
+
|
251249
|
+
"use strict";
|
251250
|
+
|
251251
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
251252
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
251253
|
+
};
|
251254
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
251255
|
+
exports.parseRepoUrl = exports.formatProvider = exports.connectGitProvider = exports.disconnectGitProvider = void 0;
|
251256
|
+
const qs_1 = __webpack_require__(84860);
|
251257
|
+
const chalk_1 = __importDefault(__webpack_require__(961));
|
251258
|
+
const link_1 = __importDefault(__webpack_require__(98472));
|
251259
|
+
async function disconnectGitProvider(client, org, projectId) {
|
251260
|
+
const fetchUrl = `/v4/projects/${projectId}/link?${qs_1.stringify({
|
251261
|
+
teamId: org.type === 'team' ? org.id : undefined,
|
251262
|
+
})}`;
|
251263
|
+
return client.fetch(fetchUrl, {
|
251264
|
+
method: 'DELETE',
|
251265
|
+
headers: {
|
251266
|
+
'Content-Type': 'application/json',
|
251267
|
+
},
|
251268
|
+
});
|
251269
|
+
}
|
251270
|
+
exports.disconnectGitProvider = disconnectGitProvider;
|
251271
|
+
async function connectGitProvider(client, org, projectId, type, repo) {
|
251272
|
+
const fetchUrl = `/v4/projects/${projectId}/link?${qs_1.stringify({
|
251273
|
+
teamId: org.type === 'team' ? org.id : undefined,
|
251274
|
+
})}`;
|
251275
|
+
try {
|
251276
|
+
return await client.fetch(fetchUrl, {
|
251277
|
+
method: 'POST',
|
251278
|
+
headers: {
|
251279
|
+
'Content-Type': 'application/json',
|
251280
|
+
},
|
251281
|
+
body: JSON.stringify({
|
251282
|
+
type,
|
251283
|
+
repo,
|
251284
|
+
}),
|
251285
|
+
});
|
251286
|
+
}
|
251287
|
+
catch (err) {
|
251288
|
+
if (err.meta?.action === 'Install GitHub App' ||
|
251289
|
+
err.code === 'repo_not_found') {
|
251290
|
+
client.output.error(`Failed to link ${chalk_1.default.cyan(repo)}. Make sure there aren't any typos and that you have access to the repository if it's private.`);
|
251291
|
+
}
|
251292
|
+
else if (err.action === 'Add a Login Connection') {
|
251293
|
+
client.output.error(err.message.replace(repo, chalk_1.default.cyan(repo)) +
|
251294
|
+
`\nVisit ${link_1.default(err.link)} for more information.`);
|
251295
|
+
}
|
251296
|
+
else {
|
251297
|
+
client.output.error(`Failed to connect the ${formatProvider(type)} repository ${repo}.\n${err}`);
|
251298
|
+
}
|
251299
|
+
return 1;
|
251300
|
+
}
|
251301
|
+
}
|
251302
|
+
exports.connectGitProvider = connectGitProvider;
|
251303
|
+
function formatProvider(type) {
|
251304
|
+
switch (type) {
|
251305
|
+
case 'github':
|
251306
|
+
return 'GitHub';
|
251307
|
+
case 'gitlab':
|
251308
|
+
return 'GitLab';
|
251309
|
+
case 'bitbucket':
|
251310
|
+
return 'Bitbucket';
|
251311
|
+
default:
|
251312
|
+
return type;
|
251313
|
+
}
|
251314
|
+
}
|
251315
|
+
exports.formatProvider = formatProvider;
|
251316
|
+
function parseRepoUrl(originUrl) {
|
251317
|
+
const isSSH = originUrl.startsWith('git@');
|
251318
|
+
// Matches all characters between (// or @) and (.com or .org)
|
251319
|
+
// eslint-disable-next-line prefer-named-capture-group
|
251320
|
+
const provider = /(?<=(\/\/|@)).*(?=(\.com|\.org))/.exec(originUrl);
|
251321
|
+
if (!provider) {
|
251322
|
+
return null;
|
251323
|
+
}
|
251324
|
+
let org;
|
251325
|
+
let repo;
|
251326
|
+
if (isSSH) {
|
251327
|
+
org = originUrl.split(':')[1].split('/')[0];
|
251328
|
+
repo = originUrl.split('/')[1]?.replace('.git', '');
|
251329
|
+
}
|
251330
|
+
else {
|
251331
|
+
// Assume https:// or git://
|
251332
|
+
org = originUrl.split('/')[3];
|
251333
|
+
repo = originUrl.split('/')[4]?.replace('.git', '');
|
251334
|
+
}
|
251335
|
+
if (!org || !repo) {
|
251336
|
+
return null;
|
251337
|
+
}
|
251338
|
+
return {
|
251339
|
+
provider: provider[0],
|
251340
|
+
org,
|
251341
|
+
repo,
|
251342
|
+
};
|
251343
|
+
}
|
251344
|
+
exports.parseRepoUrl = parseRepoUrl;
|
251345
|
+
|
251346
|
+
|
250984
251347
|
/***/ }),
|
250985
251348
|
|
250986
251349
|
/***/ 8721:
|
@@ -251299,6 +251662,7 @@ async function writeProjectSettings(cwd, project, org) {
|
|
251299
251662
|
projectId: project.id,
|
251300
251663
|
orgId: org.id,
|
251301
251664
|
settings: {
|
251665
|
+
createdAt: project.createdAt,
|
251302
251666
|
framework: project.framework,
|
251303
251667
|
devCommand: project.devCommand,
|
251304
251668
|
installCommand: project.installCommand,
|
@@ -252287,7 +252651,7 @@ module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source
|
|
252287
252651
|
/***/ ((module) => {
|
252288
252652
|
|
252289
252653
|
"use strict";
|
252290
|
-
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"27.
|
252654
|
+
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"27.1.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 --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\":\"5.0.2\",\"@vercel/go\":\"2.0.6\",\"@vercel/hydrogen\":\"0.0.3\",\"@vercel/next\":\"3.1.5\",\"@vercel/node\":\"2.4.3\",\"@vercel/python\":\"3.0.6\",\"@vercel/redwood\":\"1.0.7\",\"@vercel/remix\":\"1.0.8\",\"@vercel/ruby\":\"1.3.14\",\"@vercel/static-build\":\"1.0.6\",\"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.1.1\",\"@vercel/frameworks\":\"1.1.0\",\"@vercel/fs-detectors\":\"2.0.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\",\"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\":\"38a67858595897b54299500d432071a98a8f153a\"}");
|
252291
252655
|
|
252292
252656
|
/***/ }),
|
252293
252657
|
|
@@ -252303,7 +252667,7 @@ module.exports = JSON.parse("{\"VISA\":\"Visa\",\"MASTERCARD\":\"MasterCard\",\"
|
|
252303
252667
|
/***/ ((module) => {
|
252304
252668
|
|
252305
252669
|
"use strict";
|
252306
|
-
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"12.1.
|
252670
|
+
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"12.1.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\":\"5.0.2\",\"@vercel/routing-utils\":\"1.13.5\",\"@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\"}}");
|
252307
252671
|
|
252308
252672
|
/***/ }),
|
252309
252673
|
|