vercel 54.14.1 → 54.14.5
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/chunks/{add-INSQH24S.js → add-5Z2AAQMM.js} +6 -6
- package/dist/chunks/{chunk-YQPAAXUU.js → chunk-25XEQWUS.js} +1 -1
- package/dist/chunks/{chunk-MKB32SJZ.js → chunk-2GOVUIMY.js} +1 -1
- package/dist/chunks/{chunk-TVBXGFEL.js → chunk-2N7NBUQX.js} +1 -1
- package/dist/chunks/{chunk-5QKYBWW2.js → chunk-45S2Y3TD.js} +1 -1
- package/dist/chunks/{chunk-FMN3NXRC.js → chunk-56AJHIQC.js} +1 -1
- package/dist/chunks/{chunk-467YGYFK.js → chunk-6ABEFMPX.js} +1 -1
- package/dist/chunks/{chunk-74VEZPM6.js → chunk-6H2YVMJJ.js} +2 -2
- package/dist/chunks/{chunk-F4WXNECT.js → chunk-6R3YPU76.js} +257 -32
- package/dist/chunks/{chunk-UPI3OHBK.js → chunk-AWD3IGXU.js} +2 -2
- package/dist/chunks/chunk-BRQ6PX3U.js +593 -0
- package/dist/chunks/{chunk-IQQJHYW4.js → chunk-DPS62LHL.js} +2 -2
- package/dist/chunks/{chunk-NMGGBH7K.js → chunk-EBIX223X.js} +2 -11
- package/dist/chunks/{chunk-DAKMPPIS.js → chunk-ETVOM3IR.js} +1 -1
- package/dist/chunks/{chunk-WFRHKZFI.js → chunk-IB56QKCM.js} +1 -1
- package/dist/chunks/{chunk-ZTPOJE63.js → chunk-IJJOI63T.js} +1 -1
- package/dist/chunks/{chunk-P6VIXOWO.js → chunk-IXTKPQYW.js} +5 -5
- package/dist/chunks/{chunk-F6SCQ6XU.js → chunk-JLLN34XF.js} +92 -34
- package/dist/chunks/{chunk-4WQGP4Z4.js → chunk-KSSRTKN4.js} +9 -7
- package/dist/chunks/{chunk-4NDOMD3E.js → chunk-LYCSVJIX.js} +1 -1
- package/dist/chunks/{chunk-J4LCBXF2.js → chunk-MOVGWTDQ.js} +9 -19
- package/dist/chunks/{chunk-6IQZVQV6.js → chunk-MYWLF3BZ.js} +18 -0
- package/dist/chunks/{chunk-JFWE5ORG.js → chunk-P4KQ3FJ4.js} +1 -0
- package/dist/chunks/{chunk-UJ3ZCBUA.js → chunk-PSG6ZBGQ.js} +2 -2
- package/dist/chunks/{chunk-L7U3Z7E4.js → chunk-PXJA4KXE.js} +2 -2
- package/dist/chunks/{chunk-FKNOCLZU.js → chunk-R5MIXAJF.js} +2 -2
- package/dist/chunks/{chunk-NGRSQRSN.js → chunk-SGPBULVT.js} +1 -1
- package/dist/chunks/{chunk-RM4XGGZO.js → chunk-TSENBD7C.js} +2 -2
- package/dist/chunks/{chunk-O4C4A7HM.js → chunk-VKRW77HH.js} +1 -1
- package/dist/chunks/{chunk-UEFCAT3N.js → chunk-X23JL3ZL.js} +2 -2
- package/dist/chunks/{chunk-ZRJQY3VK.js → chunk-YE3C5CUX.js} +2 -2
- package/dist/chunks/{chunk-XLLAD5DR.js → chunk-YIAUEFUY.js} +212 -788
- package/dist/chunks/{chunk-P2AMQX7F.js → chunk-ZR4XADWC.js} +16 -4
- package/dist/chunks/{compile-vercel-config-VPPGDFKL.js → compile-vercel-config-UMUHH55E.js} +2 -2
- package/dist/chunks/{delete-O3EHQHYD.js → delete-NO2U3UGV.js} +4 -4
- package/dist/chunks/{disable-GJDQC34I.js → disable-AGDDHVKZ.js} +4 -4
- package/dist/chunks/{discard-UZT23XN2.js → discard-Q5HML52L.js} +4 -4
- package/dist/chunks/{edit-PEQIROSE.js → edit-HSHJAKHM.js} +5 -5
- package/dist/chunks/{enable-ACNEAJ5S.js → enable-YMJAXOGA.js} +4 -4
- package/dist/chunks/{export-ZICIQKHJ.js → export-RCACOTPE.js} +4 -4
- package/dist/chunks/{inspect-PUFF7LND.js → inspect-OJHOQHD2.js} +6 -6
- package/dist/chunks/{list-L2UFHHQ7.js → list-LLUDMAWA.js} +7 -7
- package/dist/chunks/{list-FWUV4NO4.js → list-R7V2P6TM.js} +4 -4
- package/dist/chunks/{ls-6HVFGIQS.js → ls-KAI6V7SU.js} +6 -6
- package/dist/chunks/{publish-HKTAQMYG.js → publish-KCYVRDAT.js} +4 -4
- package/dist/chunks/{query-VQ5HDMFO.js → query-MBJLAQRX.js} +5 -5
- package/dist/chunks/{reorder-CVMW6VL7.js → reorder-C5BJWFJM.js} +4 -4
- package/dist/chunks/{restore-32NXH4EH.js → restore-F63NO7XP.js} +4 -4
- package/dist/chunks/{rm-7TPDWMJZ.js → rm-HT7YO3JX.js} +6 -6
- package/dist/chunks/{rule-inspect-PQORU3SU.js → rule-inspect-IHEUI5JT.js} +6 -6
- package/dist/chunks/{rules-VIITOYFN.js → rules-ZUBTVSNC.js} +6 -6
- package/dist/chunks/{schema-AECGMSF5.js → schema-VAQSZY2H.js} +6 -6
- package/dist/chunks/{types-P6JKZFEY.js → types-3R7HKP57.js} +3 -3
- package/dist/chunks/{update-J4QCT3GS.js → update-BS5FBLIP.js} +6 -6
- package/dist/commands/build/index.js +56 -32
- package/dist/commands/deploy/index.js +21 -20
- package/dist/commands/dev/index.js +244 -142
- package/dist/commands/dev/next-dev-websocket-shim-preload.cjs +190 -0
- package/dist/commands/env/index.js +18 -16
- package/dist/commands/link/index.js +17 -24
- package/dist/commands/list/index.js +7 -7
- package/dist/commands-bulk.js +658 -121
- package/dist/help.js +1 -1
- package/dist/index.js +19 -19
- package/dist/version.mjs +1 -1
- package/package.json +12 -12
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
require_string_width,
|
|
34
34
|
require_strip_ansi,
|
|
35
35
|
yesOption
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-MYWLF3BZ.js";
|
|
37
37
|
import {
|
|
38
38
|
APIError,
|
|
39
39
|
CantParseJSONFile,
|
|
@@ -889,7 +889,7 @@ var require_uri_all = __commonJS({
|
|
|
889
889
|
target.fragment = relative2.fragment;
|
|
890
890
|
return target;
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function resolve4(baseURI, relativeURI, options) {
|
|
893
893
|
var schemelessOptions = assign({ scheme: "null" }, options);
|
|
894
894
|
return serialize(resolveComponents(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
|
895
895
|
}
|
|
@@ -1157,7 +1157,7 @@ var require_uri_all = __commonJS({
|
|
|
1157
1157
|
exports2.removeDotSegments = removeDotSegments;
|
|
1158
1158
|
exports2.serialize = serialize;
|
|
1159
1159
|
exports2.resolveComponents = resolveComponents;
|
|
1160
|
-
exports2.resolve =
|
|
1160
|
+
exports2.resolve = resolve4;
|
|
1161
1161
|
exports2.normalize = normalize;
|
|
1162
1162
|
exports2.equal = equal;
|
|
1163
1163
|
exports2.escapeComponent = escapeComponent;
|
|
@@ -1543,20 +1543,20 @@ var require_resolve = __commonJS({
|
|
|
1543
1543
|
var util = require_util();
|
|
1544
1544
|
var SchemaObject = require_schema_obj();
|
|
1545
1545
|
var traverse = require_json_schema_traverse();
|
|
1546
|
-
module.exports =
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
function
|
|
1546
|
+
module.exports = resolve4;
|
|
1547
|
+
resolve4.normalizeId = normalizeId;
|
|
1548
|
+
resolve4.fullPath = getFullPath;
|
|
1549
|
+
resolve4.url = resolveUrl;
|
|
1550
|
+
resolve4.ids = resolveIds;
|
|
1551
|
+
resolve4.inlineRef = inlineRef;
|
|
1552
|
+
resolve4.schema = resolveSchema;
|
|
1553
|
+
function resolve4(compile, root, ref) {
|
|
1554
1554
|
var refVal = this._refs[ref];
|
|
1555
1555
|
if (typeof refVal == "string") {
|
|
1556
1556
|
if (this._refs[refVal])
|
|
1557
1557
|
refVal = this._refs[refVal];
|
|
1558
1558
|
else
|
|
1559
|
-
return
|
|
1559
|
+
return resolve4.call(this, compile, root, refVal);
|
|
1560
1560
|
}
|
|
1561
1561
|
refVal = refVal || this._schemas[ref];
|
|
1562
1562
|
if (refVal instanceof SchemaObject) {
|
|
@@ -1782,7 +1782,7 @@ var require_resolve = __commonJS({
|
|
|
1782
1782
|
var require_error_classes = __commonJS({
|
|
1783
1783
|
"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/error_classes.js"(exports, module) {
|
|
1784
1784
|
"use strict";
|
|
1785
|
-
var
|
|
1785
|
+
var resolve4 = require_resolve();
|
|
1786
1786
|
module.exports = {
|
|
1787
1787
|
Validation: errorSubclass(ValidationError2),
|
|
1788
1788
|
MissingRef: errorSubclass(MissingRefError)
|
|
@@ -1797,8 +1797,8 @@ var require_error_classes = __commonJS({
|
|
|
1797
1797
|
};
|
|
1798
1798
|
function MissingRefError(baseId, ref, message) {
|
|
1799
1799
|
this.message = message || MissingRefError.message(baseId, ref);
|
|
1800
|
-
this.missingRef =
|
|
1801
|
-
this.missingSchema =
|
|
1800
|
+
this.missingRef = resolve4.url(baseId, ref);
|
|
1801
|
+
this.missingSchema = resolve4.normalizeId(resolve4.fullPath(this.missingRef));
|
|
1802
1802
|
}
|
|
1803
1803
|
function errorSubclass(Subclass) {
|
|
1804
1804
|
Subclass.prototype = Object.create(Error.prototype);
|
|
@@ -2357,7 +2357,7 @@ var require_validate = __commonJS({
|
|
|
2357
2357
|
var require_compile = __commonJS({
|
|
2358
2358
|
"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/index.js"(exports, module) {
|
|
2359
2359
|
"use strict";
|
|
2360
|
-
var
|
|
2360
|
+
var resolve4 = require_resolve();
|
|
2361
2361
|
var util = require_util();
|
|
2362
2362
|
var errorClasses = require_error_classes();
|
|
2363
2363
|
var stableStringify = require_fast_json_stable_stringify();
|
|
@@ -2417,7 +2417,7 @@ var require_compile = __commonJS({
|
|
|
2417
2417
|
RULES,
|
|
2418
2418
|
validate: validateGenerator,
|
|
2419
2419
|
util,
|
|
2420
|
-
resolve:
|
|
2420
|
+
resolve: resolve4,
|
|
2421
2421
|
resolveRef,
|
|
2422
2422
|
usePattern,
|
|
2423
2423
|
useDefault,
|
|
@@ -2479,7 +2479,7 @@ var require_compile = __commonJS({
|
|
|
2479
2479
|
return validate;
|
|
2480
2480
|
}
|
|
2481
2481
|
function resolveRef(baseId2, ref, isRoot) {
|
|
2482
|
-
ref =
|
|
2482
|
+
ref = resolve4.url(baseId2, ref);
|
|
2483
2483
|
var refIndex = refs[ref];
|
|
2484
2484
|
var _refVal, refCode;
|
|
2485
2485
|
if (refIndex !== void 0) {
|
|
@@ -2496,11 +2496,11 @@ var require_compile = __commonJS({
|
|
|
2496
2496
|
}
|
|
2497
2497
|
}
|
|
2498
2498
|
refCode = addLocalRef(ref);
|
|
2499
|
-
var v2 =
|
|
2499
|
+
var v2 = resolve4.call(self2, localCompile, root, ref);
|
|
2500
2500
|
if (v2 === void 0) {
|
|
2501
2501
|
var localSchema = localRefs && localRefs[ref];
|
|
2502
2502
|
if (localSchema) {
|
|
2503
|
-
v2 =
|
|
2503
|
+
v2 = resolve4.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root, localRefs, baseId2);
|
|
2504
2504
|
}
|
|
2505
2505
|
}
|
|
2506
2506
|
if (v2 === void 0) {
|
|
@@ -6135,7 +6135,7 @@ var require_ajv = __commonJS({
|
|
|
6135
6135
|
"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/ajv.js"(exports, module) {
|
|
6136
6136
|
"use strict";
|
|
6137
6137
|
var compileSchema = require_compile();
|
|
6138
|
-
var
|
|
6138
|
+
var resolve4 = require_resolve();
|
|
6139
6139
|
var Cache = require_cache();
|
|
6140
6140
|
var SchemaObject = require_schema_obj();
|
|
6141
6141
|
var stableStringify = require_fast_json_stable_stringify();
|
|
@@ -6227,7 +6227,7 @@ var require_ajv = __commonJS({
|
|
|
6227
6227
|
var id = this._getId(schema);
|
|
6228
6228
|
if (id !== void 0 && typeof id != "string")
|
|
6229
6229
|
throw new Error("schema id must be string");
|
|
6230
|
-
key =
|
|
6230
|
+
key = resolve4.normalizeId(key || id);
|
|
6231
6231
|
checkUnique(this, key);
|
|
6232
6232
|
this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
|
|
6233
6233
|
return this;
|
|
@@ -6273,7 +6273,7 @@ var require_ajv = __commonJS({
|
|
|
6273
6273
|
}
|
|
6274
6274
|
}
|
|
6275
6275
|
function _getSchemaFragment(self2, ref) {
|
|
6276
|
-
var res =
|
|
6276
|
+
var res = resolve4.schema.call(self2, { schema: {} }, ref);
|
|
6277
6277
|
if (res) {
|
|
6278
6278
|
var schema = res.schema, root = res.root, baseId = res.baseId;
|
|
6279
6279
|
var v = compileSchema.call(self2, schema, root, void 0, baseId);
|
|
@@ -6289,7 +6289,7 @@ var require_ajv = __commonJS({
|
|
|
6289
6289
|
}
|
|
6290
6290
|
}
|
|
6291
6291
|
function _getSchemaObj(self2, keyRef) {
|
|
6292
|
-
keyRef =
|
|
6292
|
+
keyRef = resolve4.normalizeId(keyRef);
|
|
6293
6293
|
return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef];
|
|
6294
6294
|
}
|
|
6295
6295
|
function removeSchema(schemaKeyRef) {
|
|
@@ -6317,7 +6317,7 @@ var require_ajv = __commonJS({
|
|
|
6317
6317
|
this._cache.del(cacheKey);
|
|
6318
6318
|
var id = this._getId(schemaKeyRef);
|
|
6319
6319
|
if (id) {
|
|
6320
|
-
id =
|
|
6320
|
+
id = resolve4.normalizeId(id);
|
|
6321
6321
|
delete this._schemas[id];
|
|
6322
6322
|
delete this._refs[id];
|
|
6323
6323
|
}
|
|
@@ -6342,14 +6342,14 @@ var require_ajv = __commonJS({
|
|
|
6342
6342
|
if (cached)
|
|
6343
6343
|
return cached;
|
|
6344
6344
|
shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
|
|
6345
|
-
var id =
|
|
6345
|
+
var id = resolve4.normalizeId(this._getId(schema));
|
|
6346
6346
|
if (id && shouldAddSchema)
|
|
6347
6347
|
checkUnique(this, id);
|
|
6348
6348
|
var willValidate = this._opts.validateSchema !== false && !skipValidation;
|
|
6349
6349
|
var recursiveMeta;
|
|
6350
|
-
if (willValidate && !(recursiveMeta = id && id ==
|
|
6350
|
+
if (willValidate && !(recursiveMeta = id && id == resolve4.normalizeId(schema.$schema)))
|
|
6351
6351
|
this.validateSchema(schema, true);
|
|
6352
|
-
var localRefs =
|
|
6352
|
+
var localRefs = resolve4.ids.call(this, schema);
|
|
6353
6353
|
var schemaObj = new SchemaObject({
|
|
6354
6354
|
id,
|
|
6355
6355
|
schema,
|
|
@@ -6521,8 +6521,8 @@ var require_universalify = __commonJS({
|
|
|
6521
6521
|
if (typeof args[args.length - 1] === "function")
|
|
6522
6522
|
fn.apply(this, args);
|
|
6523
6523
|
else {
|
|
6524
|
-
return new Promise((
|
|
6525
|
-
args.push((err, res) => err != null ? reject(err) :
|
|
6524
|
+
return new Promise((resolve4, reject) => {
|
|
6525
|
+
args.push((err, res) => err != null ? reject(err) : resolve4(res));
|
|
6526
6526
|
fn.apply(this, args);
|
|
6527
6527
|
});
|
|
6528
6528
|
}
|
|
@@ -6595,19 +6595,19 @@ var require_fs = __commonJS({
|
|
|
6595
6595
|
if (typeof callback === "function") {
|
|
6596
6596
|
return fs5.exists(filename, callback);
|
|
6597
6597
|
}
|
|
6598
|
-
return new Promise((
|
|
6599
|
-
return fs5.exists(filename,
|
|
6598
|
+
return new Promise((resolve4) => {
|
|
6599
|
+
return fs5.exists(filename, resolve4);
|
|
6600
6600
|
});
|
|
6601
6601
|
};
|
|
6602
6602
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
6603
6603
|
if (typeof callback === "function") {
|
|
6604
6604
|
return fs5.read(fd, buffer, offset, length, position, callback);
|
|
6605
6605
|
}
|
|
6606
|
-
return new Promise((
|
|
6606
|
+
return new Promise((resolve4, reject) => {
|
|
6607
6607
|
fs5.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
6608
6608
|
if (err)
|
|
6609
6609
|
return reject(err);
|
|
6610
|
-
|
|
6610
|
+
resolve4({ bytesRead, buffer: buffer2 });
|
|
6611
6611
|
});
|
|
6612
6612
|
});
|
|
6613
6613
|
};
|
|
@@ -6615,11 +6615,11 @@ var require_fs = __commonJS({
|
|
|
6615
6615
|
if (typeof args[args.length - 1] === "function") {
|
|
6616
6616
|
return fs5.write(fd, buffer, ...args);
|
|
6617
6617
|
}
|
|
6618
|
-
return new Promise((
|
|
6618
|
+
return new Promise((resolve4, reject) => {
|
|
6619
6619
|
fs5.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
6620
6620
|
if (err)
|
|
6621
6621
|
return reject(err);
|
|
6622
|
-
|
|
6622
|
+
resolve4({ bytesWritten, buffer: buffer2 });
|
|
6623
6623
|
});
|
|
6624
6624
|
});
|
|
6625
6625
|
};
|
|
@@ -6628,11 +6628,11 @@ var require_fs = __commonJS({
|
|
|
6628
6628
|
if (typeof args[args.length - 1] === "function") {
|
|
6629
6629
|
return fs5.writev(fd, buffers, ...args);
|
|
6630
6630
|
}
|
|
6631
|
-
return new Promise((
|
|
6631
|
+
return new Promise((resolve4, reject) => {
|
|
6632
6632
|
fs5.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
6633
6633
|
if (err)
|
|
6634
6634
|
return reject(err);
|
|
6635
|
-
|
|
6635
|
+
resolve4({ bytesWritten, buffers: buffers2 });
|
|
6636
6636
|
});
|
|
6637
6637
|
});
|
|
6638
6638
|
};
|
|
@@ -8006,7 +8006,7 @@ var require_jsonfile = __commonJS({
|
|
|
8006
8006
|
}
|
|
8007
8007
|
return obj;
|
|
8008
8008
|
}
|
|
8009
|
-
var
|
|
8009
|
+
var readFile6 = universalify.fromPromise(_readFile);
|
|
8010
8010
|
function readFileSync(file, options = {}) {
|
|
8011
8011
|
if (typeof options === "string") {
|
|
8012
8012
|
options = { encoding: options };
|
|
@@ -8031,16 +8031,16 @@ var require_jsonfile = __commonJS({
|
|
|
8031
8031
|
const str = stringify(obj, options);
|
|
8032
8032
|
await universalify.fromCallback(fs5.writeFile)(file, str, options);
|
|
8033
8033
|
}
|
|
8034
|
-
var
|
|
8034
|
+
var writeFile5 = universalify.fromPromise(_writeFile);
|
|
8035
8035
|
function writeFileSync(file, obj, options = {}) {
|
|
8036
8036
|
const fs5 = options.fs || _fs;
|
|
8037
8037
|
const str = stringify(obj, options);
|
|
8038
8038
|
return fs5.writeFileSync(file, str, options);
|
|
8039
8039
|
}
|
|
8040
8040
|
module.exports = {
|
|
8041
|
-
readFile:
|
|
8041
|
+
readFile: readFile6,
|
|
8042
8042
|
readFileSync,
|
|
8043
|
-
writeFile:
|
|
8043
|
+
writeFile: writeFile5,
|
|
8044
8044
|
writeFileSync
|
|
8045
8045
|
};
|
|
8046
8046
|
}
|
|
@@ -8431,14 +8431,14 @@ var require_templates = __commonJS({
|
|
|
8431
8431
|
}
|
|
8432
8432
|
return results;
|
|
8433
8433
|
}
|
|
8434
|
-
function buildStyle(
|
|
8434
|
+
function buildStyle(chalk14, styles) {
|
|
8435
8435
|
const enabled = {};
|
|
8436
8436
|
for (const layer of styles) {
|
|
8437
8437
|
for (const style of layer.styles) {
|
|
8438
8438
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
8439
8439
|
}
|
|
8440
8440
|
}
|
|
8441
|
-
let current =
|
|
8441
|
+
let current = chalk14;
|
|
8442
8442
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
8443
8443
|
if (!Array.isArray(styles2)) {
|
|
8444
8444
|
continue;
|
|
@@ -8450,7 +8450,7 @@ var require_templates = __commonJS({
|
|
|
8450
8450
|
}
|
|
8451
8451
|
return current;
|
|
8452
8452
|
}
|
|
8453
|
-
module.exports = (
|
|
8453
|
+
module.exports = (chalk14, temporary) => {
|
|
8454
8454
|
const styles = [];
|
|
8455
8455
|
const chunks = [];
|
|
8456
8456
|
let chunk = [];
|
|
@@ -8460,13 +8460,13 @@ var require_templates = __commonJS({
|
|
|
8460
8460
|
} else if (style) {
|
|
8461
8461
|
const string = chunk.join("");
|
|
8462
8462
|
chunk = [];
|
|
8463
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
8463
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk14, styles)(string));
|
|
8464
8464
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
8465
8465
|
} else if (close) {
|
|
8466
8466
|
if (styles.length === 0) {
|
|
8467
8467
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
8468
8468
|
}
|
|
8469
|
-
chunks.push(buildStyle(
|
|
8469
|
+
chunks.push(buildStyle(chalk14, styles)(chunk.join("")));
|
|
8470
8470
|
chunk = [];
|
|
8471
8471
|
styles.pop();
|
|
8472
8472
|
} else {
|
|
@@ -8514,16 +8514,16 @@ var require_source2 = __commonJS({
|
|
|
8514
8514
|
}
|
|
8515
8515
|
};
|
|
8516
8516
|
var chalkFactory = (options) => {
|
|
8517
|
-
const
|
|
8518
|
-
applyOptions(
|
|
8519
|
-
|
|
8520
|
-
Object.setPrototypeOf(
|
|
8521
|
-
Object.setPrototypeOf(
|
|
8522
|
-
|
|
8517
|
+
const chalk15 = {};
|
|
8518
|
+
applyOptions(chalk15, options);
|
|
8519
|
+
chalk15.template = (...arguments_) => chalkTag(chalk15.template, ...arguments_);
|
|
8520
|
+
Object.setPrototypeOf(chalk15, Chalk.prototype);
|
|
8521
|
+
Object.setPrototypeOf(chalk15.template, chalk15);
|
|
8522
|
+
chalk15.template.constructor = () => {
|
|
8523
8523
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
8524
8524
|
};
|
|
8525
|
-
|
|
8526
|
-
return
|
|
8525
|
+
chalk15.template.Instance = ChalkClass;
|
|
8526
|
+
return chalk15.template;
|
|
8527
8527
|
};
|
|
8528
8528
|
function Chalk(options) {
|
|
8529
8529
|
return chalkFactory(options);
|
|
@@ -8634,7 +8634,7 @@ var require_source2 = __commonJS({
|
|
|
8634
8634
|
return openAll + string + closeAll;
|
|
8635
8635
|
};
|
|
8636
8636
|
var template;
|
|
8637
|
-
var chalkTag = (
|
|
8637
|
+
var chalkTag = (chalk15, ...strings) => {
|
|
8638
8638
|
const [firstString] = strings;
|
|
8639
8639
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
8640
8640
|
return strings.join(" ");
|
|
@@ -8650,14 +8650,14 @@ var require_source2 = __commonJS({
|
|
|
8650
8650
|
if (template === void 0) {
|
|
8651
8651
|
template = require_templates();
|
|
8652
8652
|
}
|
|
8653
|
-
return template(
|
|
8653
|
+
return template(chalk15, parts.join(""));
|
|
8654
8654
|
};
|
|
8655
8655
|
Object.defineProperties(Chalk.prototype, styles);
|
|
8656
|
-
var
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
module.exports =
|
|
8656
|
+
var chalk14 = Chalk();
|
|
8657
|
+
chalk14.supportsColor = stdoutColor;
|
|
8658
|
+
chalk14.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
8659
|
+
chalk14.stderr.supportsColor = stderrColor;
|
|
8660
|
+
module.exports = chalk14;
|
|
8661
8661
|
}
|
|
8662
8662
|
});
|
|
8663
8663
|
|
|
@@ -13734,10 +13734,10 @@ var require_read_config_file = __commonJS({
|
|
|
13734
13734
|
var import_smol_toml3 = __require("smol-toml");
|
|
13735
13735
|
var import_fs4 = __require("fs");
|
|
13736
13736
|
var import_error_utils5 = require_dist();
|
|
13737
|
-
var { readFile:
|
|
13737
|
+
var { readFile: readFile6 } = import_fs4.promises;
|
|
13738
13738
|
async function readFileOrNull(file) {
|
|
13739
13739
|
try {
|
|
13740
|
-
const data = await
|
|
13740
|
+
const data = await readFile6(file);
|
|
13741
13741
|
return data;
|
|
13742
13742
|
} catch (error) {
|
|
13743
13743
|
if (!(0, import_error_utils5.isErrnoException)(error)) {
|
|
@@ -13824,7 +13824,7 @@ var require_frameworks = __commonJS({
|
|
|
13824
13824
|
var import_fs4 = __require("fs");
|
|
13825
13825
|
var import_read_config_file = require_read_config_file();
|
|
13826
13826
|
__reExport(frameworks_exports, require_types(), module.exports);
|
|
13827
|
-
var { readdir, readFile:
|
|
13827
|
+
var { readdir, readFile: readFile6, unlink: unlink2 } = import_fs4.promises;
|
|
13828
13828
|
var frameworks = [
|
|
13829
13829
|
{
|
|
13830
13830
|
name: "Blitz.js (Legacy)",
|
|
@@ -13952,7 +13952,7 @@ var require_frameworks = __commonJS({
|
|
|
13952
13952
|
"public",
|
|
13953
13953
|
"__now_routes_g4t5bY.json"
|
|
13954
13954
|
);
|
|
13955
|
-
const content = await
|
|
13955
|
+
const content = await readFile6(nowRoutesPath, "utf8");
|
|
13956
13956
|
const nowRoutes = JSON.parse(content);
|
|
13957
13957
|
try {
|
|
13958
13958
|
await unlink2(nowRoutesPath);
|
|
@@ -16012,12 +16012,12 @@ var require_frameworks = __commonJS({
|
|
|
16012
16012
|
experimental: true
|
|
16013
16013
|
},
|
|
16014
16014
|
{
|
|
16015
|
-
name: "
|
|
16015
|
+
name: "eve",
|
|
16016
16016
|
slug: "eve",
|
|
16017
16017
|
logo: "https://api-frameworks.vercel.sh/framework-logos/eve.svg",
|
|
16018
16018
|
darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/eve-dark.svg",
|
|
16019
16019
|
tagline: "A filesystem-first framework for durable backend agents on Vercel.",
|
|
16020
|
-
description: "An
|
|
16020
|
+
description: "An eve app: agents authored as a directory of files, compiled and served on Vercel.",
|
|
16021
16021
|
detectors: {
|
|
16022
16022
|
every: [
|
|
16023
16023
|
{
|
|
@@ -18350,11 +18350,11 @@ var require_brace_expansion = __commonJS({
|
|
|
18350
18350
|
if (pad) {
|
|
18351
18351
|
var need = width - c.length;
|
|
18352
18352
|
if (need > 0) {
|
|
18353
|
-
var
|
|
18353
|
+
var z = new Array(need + 1).join("0");
|
|
18354
18354
|
if (i < 0)
|
|
18355
|
-
c = "-" +
|
|
18355
|
+
c = "-" + z + c.slice(1);
|
|
18356
18356
|
else
|
|
18357
|
-
c =
|
|
18357
|
+
c = z + c;
|
|
18358
18358
|
}
|
|
18359
18359
|
}
|
|
18360
18360
|
}
|
|
@@ -28760,7 +28760,7 @@ var require_local_file_system_detector = __commonJS({
|
|
|
28760
28760
|
LocalFileSystemDetector: () => LocalFileSystemDetector4
|
|
28761
28761
|
});
|
|
28762
28762
|
module.exports = __toCommonJS2(local_file_system_detector_exports);
|
|
28763
|
-
var
|
|
28763
|
+
var import_promises4 = __toESM2(__require("fs/promises"));
|
|
28764
28764
|
var import_path12 = __require("path");
|
|
28765
28765
|
var import_filesystem = require_filesystem();
|
|
28766
28766
|
var import_error_utils5 = require_dist();
|
|
@@ -28771,7 +28771,7 @@ var require_local_file_system_detector = __commonJS({
|
|
|
28771
28771
|
}
|
|
28772
28772
|
async _hasPath(name) {
|
|
28773
28773
|
try {
|
|
28774
|
-
await
|
|
28774
|
+
await import_promises4.default.stat(this.getFilePath(name));
|
|
28775
28775
|
return true;
|
|
28776
28776
|
} catch (err) {
|
|
28777
28777
|
if ((0, import_error_utils5.isErrnoException)(err) && err.code === "ENOENT") {
|
|
@@ -28781,15 +28781,15 @@ var require_local_file_system_detector = __commonJS({
|
|
|
28781
28781
|
}
|
|
28782
28782
|
}
|
|
28783
28783
|
_readFile(name) {
|
|
28784
|
-
return
|
|
28784
|
+
return import_promises4.default.readFile(this.getFilePath(name));
|
|
28785
28785
|
}
|
|
28786
28786
|
async _isFile(name) {
|
|
28787
|
-
const stat2 = await
|
|
28787
|
+
const stat2 = await import_promises4.default.stat(this.getFilePath(name));
|
|
28788
28788
|
return stat2.isFile();
|
|
28789
28789
|
}
|
|
28790
28790
|
async _readdir(dir) {
|
|
28791
28791
|
const dirPath = this.getFilePath(dir);
|
|
28792
|
-
const entries = await
|
|
28792
|
+
const entries = await import_promises4.default.readdir(dirPath, { withFileTypes: true });
|
|
28793
28793
|
const result = [];
|
|
28794
28794
|
for (const entry of entries) {
|
|
28795
28795
|
let type;
|
|
@@ -30685,11 +30685,11 @@ var require_brace_expansion2 = __commonJS({
|
|
|
30685
30685
|
if (pad) {
|
|
30686
30686
|
var need = width - c.length;
|
|
30687
30687
|
if (need > 0) {
|
|
30688
|
-
var
|
|
30688
|
+
var z = new Array(need + 1).join("0");
|
|
30689
30689
|
if (i < 0)
|
|
30690
|
-
c = "-" +
|
|
30690
|
+
c = "-" + z + c.slice(1);
|
|
30691
30691
|
else
|
|
30692
|
-
c =
|
|
30692
|
+
c = z + c;
|
|
30693
30693
|
}
|
|
30694
30694
|
}
|
|
30695
30695
|
}
|
|
@@ -33737,7 +33737,7 @@ var require_get_workspace_package_paths = __commonJS({
|
|
|
33737
33737
|
async function getPackagePaths(packages, fs5) {
|
|
33738
33738
|
return (await Promise.all(
|
|
33739
33739
|
packages.map(
|
|
33740
|
-
(packageGlob) => new Promise((
|
|
33740
|
+
(packageGlob) => new Promise((resolve4, reject) => {
|
|
33741
33741
|
(0, import_glob.default)(
|
|
33742
33742
|
normalizePath3(posixPath.join(packageGlob, "package.json")),
|
|
33743
33743
|
{
|
|
@@ -33748,7 +33748,7 @@ var require_get_workspace_package_paths = __commonJS({
|
|
|
33748
33748
|
if (err)
|
|
33749
33749
|
reject(err);
|
|
33750
33750
|
else
|
|
33751
|
-
|
|
33751
|
+
resolve4(matches);
|
|
33752
33752
|
}
|
|
33753
33753
|
);
|
|
33754
33754
|
})
|
|
@@ -34649,14 +34649,14 @@ var require_open = __commonJS({
|
|
|
34649
34649
|
}
|
|
34650
34650
|
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
34651
34651
|
if (options.wait) {
|
|
34652
|
-
return new Promise((
|
|
34652
|
+
return new Promise((resolve4, reject) => {
|
|
34653
34653
|
subprocess.once("error", reject);
|
|
34654
34654
|
subprocess.once("close", (exitCode) => {
|
|
34655
34655
|
if (options.allowNonzeroExitCode && exitCode > 0) {
|
|
34656
34656
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
34657
34657
|
return;
|
|
34658
34658
|
}
|
|
34659
|
-
|
|
34659
|
+
resolve4(subprocess);
|
|
34660
34660
|
});
|
|
34661
34661
|
});
|
|
34662
34662
|
}
|
|
@@ -34747,11 +34747,11 @@ var require_universalify2 = __commonJS({
|
|
|
34747
34747
|
if (typeof arguments[arguments.length - 1] === "function")
|
|
34748
34748
|
fn.apply(this, arguments);
|
|
34749
34749
|
else {
|
|
34750
|
-
return new Promise((
|
|
34750
|
+
return new Promise((resolve4, reject) => {
|
|
34751
34751
|
arguments[arguments.length] = (err, res) => {
|
|
34752
34752
|
if (err)
|
|
34753
34753
|
return reject(err);
|
|
34754
|
-
|
|
34754
|
+
resolve4(res);
|
|
34755
34755
|
};
|
|
34756
34756
|
arguments.length++;
|
|
34757
34757
|
fn.apply(this, arguments);
|
|
@@ -34826,19 +34826,19 @@ var require_fs3 = __commonJS({
|
|
|
34826
34826
|
if (typeof callback === "function") {
|
|
34827
34827
|
return fs5.exists(filename, callback);
|
|
34828
34828
|
}
|
|
34829
|
-
return new Promise((
|
|
34830
|
-
return fs5.exists(filename,
|
|
34829
|
+
return new Promise((resolve4) => {
|
|
34830
|
+
return fs5.exists(filename, resolve4);
|
|
34831
34831
|
});
|
|
34832
34832
|
};
|
|
34833
34833
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
34834
34834
|
if (typeof callback === "function") {
|
|
34835
34835
|
return fs5.read(fd, buffer, offset, length, position, callback);
|
|
34836
34836
|
}
|
|
34837
|
-
return new Promise((
|
|
34837
|
+
return new Promise((resolve4, reject) => {
|
|
34838
34838
|
fs5.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
34839
34839
|
if (err)
|
|
34840
34840
|
return reject(err);
|
|
34841
|
-
|
|
34841
|
+
resolve4({ bytesRead, buffer: buffer2 });
|
|
34842
34842
|
});
|
|
34843
34843
|
});
|
|
34844
34844
|
};
|
|
@@ -34846,11 +34846,11 @@ var require_fs3 = __commonJS({
|
|
|
34846
34846
|
if (typeof args[args.length - 1] === "function") {
|
|
34847
34847
|
return fs5.write(fd, buffer, ...args);
|
|
34848
34848
|
}
|
|
34849
|
-
return new Promise((
|
|
34849
|
+
return new Promise((resolve4, reject) => {
|
|
34850
34850
|
fs5.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
34851
34851
|
if (err)
|
|
34852
34852
|
return reject(err);
|
|
34853
|
-
|
|
34853
|
+
resolve4({ bytesWritten, buffer: buffer2 });
|
|
34854
34854
|
});
|
|
34855
34855
|
});
|
|
34856
34856
|
};
|
|
@@ -36329,7 +36329,7 @@ var require_jsonfile3 = __commonJS({
|
|
|
36329
36329
|
} catch (_) {
|
|
36330
36330
|
_fs = __require("fs");
|
|
36331
36331
|
}
|
|
36332
|
-
function
|
|
36332
|
+
function readFile6(file, options, callback) {
|
|
36333
36333
|
if (callback == null) {
|
|
36334
36334
|
callback = options;
|
|
36335
36335
|
options = {};
|
|
@@ -36398,7 +36398,7 @@ var require_jsonfile3 = __commonJS({
|
|
|
36398
36398
|
var str = JSON.stringify(obj, options ? options.replacer : null, spaces);
|
|
36399
36399
|
return str.replace(/\n/g, EOL) + EOL;
|
|
36400
36400
|
}
|
|
36401
|
-
function
|
|
36401
|
+
function writeFile5(file, obj, options, callback) {
|
|
36402
36402
|
if (callback == null) {
|
|
36403
36403
|
callback = options;
|
|
36404
36404
|
options = {};
|
|
@@ -36428,9 +36428,9 @@ var require_jsonfile3 = __commonJS({
|
|
|
36428
36428
|
return content;
|
|
36429
36429
|
}
|
|
36430
36430
|
var jsonfile = {
|
|
36431
|
-
readFile:
|
|
36431
|
+
readFile: readFile6,
|
|
36432
36432
|
readFileSync,
|
|
36433
|
-
writeFile:
|
|
36433
|
+
writeFile: writeFile5,
|
|
36434
36434
|
writeFileSync
|
|
36435
36435
|
};
|
|
36436
36436
|
module.exports = jsonfile;
|
|
@@ -36862,12 +36862,12 @@ var require_lib7 = __commonJS({
|
|
|
36862
36862
|
if (token !== void 0) {
|
|
36863
36863
|
return token;
|
|
36864
36864
|
}
|
|
36865
|
-
return new Promise((
|
|
36865
|
+
return new Promise((resolve4, reject) => {
|
|
36866
36866
|
if (this.pauseFn && !this.paused) {
|
|
36867
36867
|
this.paused = true;
|
|
36868
36868
|
this.pauseFn();
|
|
36869
36869
|
}
|
|
36870
|
-
this.waiting.push({ resolve:
|
|
36870
|
+
this.waiting.push({ resolve: resolve4, reject });
|
|
36871
36871
|
});
|
|
36872
36872
|
}
|
|
36873
36873
|
release(token) {
|
|
@@ -37549,14 +37549,14 @@ var require_readdir_recursive = __commonJS({
|
|
|
37549
37549
|
function readdir(path, ignores) {
|
|
37550
37550
|
ignores = ignores.map(toMatcherFunction);
|
|
37551
37551
|
let list2 = [];
|
|
37552
|
-
return new Promise(function(
|
|
37552
|
+
return new Promise(function(resolve4, reject) {
|
|
37553
37553
|
import_fs4.default.readdir(path, function(err, files) {
|
|
37554
37554
|
if (err) {
|
|
37555
37555
|
return reject(err);
|
|
37556
37556
|
}
|
|
37557
37557
|
let pending = files.length;
|
|
37558
37558
|
if (!pending) {
|
|
37559
|
-
return
|
|
37559
|
+
return resolve4(list2);
|
|
37560
37560
|
}
|
|
37561
37561
|
files.forEach(function(file) {
|
|
37562
37562
|
const filePath = import_path12.default.join(path, file);
|
|
@@ -37568,7 +37568,7 @@ var require_readdir_recursive = __commonJS({
|
|
|
37568
37568
|
if (matches) {
|
|
37569
37569
|
pending -= 1;
|
|
37570
37570
|
if (!pending) {
|
|
37571
|
-
return
|
|
37571
|
+
return resolve4(list2);
|
|
37572
37572
|
}
|
|
37573
37573
|
return null;
|
|
37574
37574
|
}
|
|
@@ -37580,14 +37580,14 @@ var require_readdir_recursive = __commonJS({
|
|
|
37580
37580
|
list2 = list2.concat(res);
|
|
37581
37581
|
pending -= 1;
|
|
37582
37582
|
if (!pending) {
|
|
37583
|
-
return
|
|
37583
|
+
return resolve4(list2);
|
|
37584
37584
|
}
|
|
37585
37585
|
}).catch(reject);
|
|
37586
37586
|
} else {
|
|
37587
37587
|
list2.push(filePath);
|
|
37588
37588
|
pending -= 1;
|
|
37589
37589
|
if (!pending) {
|
|
37590
|
-
return
|
|
37590
|
+
return resolve4(list2);
|
|
37591
37591
|
}
|
|
37592
37592
|
}
|
|
37593
37593
|
});
|
|
@@ -43839,42 +43839,42 @@ var require_queue = __commonJS({
|
|
|
43839
43839
|
queue.drained = drained;
|
|
43840
43840
|
return queue;
|
|
43841
43841
|
function push(value) {
|
|
43842
|
-
var p = new Promise(function(
|
|
43842
|
+
var p = new Promise(function(resolve4, reject) {
|
|
43843
43843
|
pushCb(value, function(err, result) {
|
|
43844
43844
|
if (err) {
|
|
43845
43845
|
reject(err);
|
|
43846
43846
|
return;
|
|
43847
43847
|
}
|
|
43848
|
-
|
|
43848
|
+
resolve4(result);
|
|
43849
43849
|
});
|
|
43850
43850
|
});
|
|
43851
43851
|
p.catch(noop);
|
|
43852
43852
|
return p;
|
|
43853
43853
|
}
|
|
43854
43854
|
function unshift(value) {
|
|
43855
|
-
var p = new Promise(function(
|
|
43855
|
+
var p = new Promise(function(resolve4, reject) {
|
|
43856
43856
|
unshiftCb(value, function(err, result) {
|
|
43857
43857
|
if (err) {
|
|
43858
43858
|
reject(err);
|
|
43859
43859
|
return;
|
|
43860
43860
|
}
|
|
43861
|
-
|
|
43861
|
+
resolve4(result);
|
|
43862
43862
|
});
|
|
43863
43863
|
});
|
|
43864
43864
|
p.catch(noop);
|
|
43865
43865
|
return p;
|
|
43866
43866
|
}
|
|
43867
43867
|
function drained() {
|
|
43868
|
-
var p = new Promise(function(
|
|
43868
|
+
var p = new Promise(function(resolve4) {
|
|
43869
43869
|
process.nextTick(function() {
|
|
43870
43870
|
if (queue.idle()) {
|
|
43871
|
-
|
|
43871
|
+
resolve4();
|
|
43872
43872
|
} else {
|
|
43873
43873
|
var previousDrain = queue.drain;
|
|
43874
43874
|
queue.drain = function() {
|
|
43875
43875
|
if (typeof previousDrain === "function")
|
|
43876
43876
|
previousDrain();
|
|
43877
|
-
|
|
43877
|
+
resolve4();
|
|
43878
43878
|
queue.drain = previousDrain;
|
|
43879
43879
|
};
|
|
43880
43880
|
}
|
|
@@ -44360,9 +44360,9 @@ var require_stream3 = __commonJS({
|
|
|
44360
44360
|
});
|
|
44361
44361
|
}
|
|
44362
44362
|
_getStat(filepath) {
|
|
44363
|
-
return new Promise((
|
|
44363
|
+
return new Promise((resolve4, reject) => {
|
|
44364
44364
|
this._stat(filepath, this._fsStatSettings, (error, stats) => {
|
|
44365
|
-
return error === null ?
|
|
44365
|
+
return error === null ? resolve4(stats) : reject(error);
|
|
44366
44366
|
});
|
|
44367
44367
|
});
|
|
44368
44368
|
}
|
|
@@ -44386,10 +44386,10 @@ var require_async6 = __commonJS({
|
|
|
44386
44386
|
this._readerStream = new stream_1.default(this._settings);
|
|
44387
44387
|
}
|
|
44388
44388
|
dynamic(root, options) {
|
|
44389
|
-
return new Promise((
|
|
44389
|
+
return new Promise((resolve4, reject) => {
|
|
44390
44390
|
this._walkAsync(root, options, (error, entries) => {
|
|
44391
44391
|
if (error === null) {
|
|
44392
|
-
|
|
44392
|
+
resolve4(entries);
|
|
44393
44393
|
} else {
|
|
44394
44394
|
reject(error);
|
|
44395
44395
|
}
|
|
@@ -44399,10 +44399,10 @@ var require_async6 = __commonJS({
|
|
|
44399
44399
|
async static(patterns, options) {
|
|
44400
44400
|
const entries = [];
|
|
44401
44401
|
const stream = this._readerStream.static(patterns, options);
|
|
44402
|
-
return new Promise((
|
|
44402
|
+
return new Promise((resolve4, reject) => {
|
|
44403
44403
|
stream.once("error", reject);
|
|
44404
44404
|
stream.on("data", (entry) => entries.push(entry));
|
|
44405
|
-
stream.once("end", () =>
|
|
44405
|
+
stream.once("end", () => resolve4(entries));
|
|
44406
44406
|
});
|
|
44407
44407
|
}
|
|
44408
44408
|
};
|
|
@@ -45097,14 +45097,14 @@ var require_utils8 = __commonJS({
|
|
|
45097
45097
|
});
|
|
45098
45098
|
module.exports = __toCommonJS2(utils_exports);
|
|
45099
45099
|
var import_node_fs2 = __toESM2(__require("fs"), 1);
|
|
45100
|
-
var
|
|
45100
|
+
var import_node_path2 = __require("path");
|
|
45101
45101
|
var CONFIGURATION_FILENAMES = [
|
|
45102
45102
|
"microfrontends.jsonc",
|
|
45103
45103
|
"microfrontends.json"
|
|
45104
45104
|
];
|
|
45105
45105
|
function findConfig({ dir }) {
|
|
45106
45106
|
for (const filename of CONFIGURATION_FILENAMES) {
|
|
45107
|
-
const maybeConfig = (0,
|
|
45107
|
+
const maybeConfig = (0, import_node_path2.join)(dir, filename);
|
|
45108
45108
|
if (import_node_fs2.default.existsSync(maybeConfig)) {
|
|
45109
45109
|
return maybeConfig;
|
|
45110
45110
|
}
|
|
@@ -46301,7 +46301,7 @@ var require_lib8 = __commonJS({
|
|
|
46301
46301
|
"../../node_modules/.pnpm/async-retry@1.2.3/node_modules/async-retry/lib/index.js"(exports, module) {
|
|
46302
46302
|
var retrier = require_retry2();
|
|
46303
46303
|
function retry(fn, opts) {
|
|
46304
|
-
function run(
|
|
46304
|
+
function run(resolve4, reject) {
|
|
46305
46305
|
var options = opts || {};
|
|
46306
46306
|
var op = retrier.operation(options);
|
|
46307
46307
|
function bail(err) {
|
|
@@ -46326,7 +46326,7 @@ var require_lib8 = __commonJS({
|
|
|
46326
46326
|
onError(err, num);
|
|
46327
46327
|
return;
|
|
46328
46328
|
}
|
|
46329
|
-
Promise.resolve(val).then(
|
|
46329
|
+
Promise.resolve(val).then(resolve4).catch(function catchIt(err) {
|
|
46330
46330
|
onError(err, num);
|
|
46331
46331
|
});
|
|
46332
46332
|
}
|
|
@@ -47006,7 +47006,7 @@ var require_BufferList = __commonJS({
|
|
|
47006
47006
|
this.head = this.tail = null;
|
|
47007
47007
|
this.length = 0;
|
|
47008
47008
|
};
|
|
47009
|
-
BufferList.prototype.join = function
|
|
47009
|
+
BufferList.prototype.join = function join11(s) {
|
|
47010
47010
|
if (this.length === 0)
|
|
47011
47011
|
return "";
|
|
47012
47012
|
var p = this.head;
|
|
@@ -52014,7 +52014,7 @@ var require_archive = __commonJS({
|
|
|
52014
52014
|
createTgzFiles: () => createTgzFiles
|
|
52015
52015
|
});
|
|
52016
52016
|
module.exports = __toCommonJS2(archive_exports);
|
|
52017
|
-
var
|
|
52017
|
+
var import_node_path2 = __require("path");
|
|
52018
52018
|
var import_node_zlib = __require("zlib");
|
|
52019
52019
|
var import_build_utils6 = __require("@vercel/build-utils");
|
|
52020
52020
|
var import_tar_fs = __toESM2(require_tar_fs());
|
|
@@ -52023,7 +52023,7 @@ var require_archive = __commonJS({
|
|
|
52023
52023
|
const filesToArchive = exclude ? fileList.filter((file) => !exclude.includes(file)) : fileList;
|
|
52024
52024
|
debug?.("Packing tarball");
|
|
52025
52025
|
const tarStream = import_tar_fs.default.pack(workPath, {
|
|
52026
|
-
entries: filesToArchive.map((file) => (0,
|
|
52026
|
+
entries: filesToArchive.map((file) => (0, import_node_path2.relative)(workPath, file))
|
|
52027
52027
|
}).pipe((0, import_node_zlib.createGzip)());
|
|
52028
52028
|
const chunkedTarBuffers = await (0, import_build_utils6.streamToBufferChunks)(tarStream);
|
|
52029
52029
|
debug?.(`Packed tarball into ${chunkedTarBuffers.length} chunks`);
|
|
@@ -52031,7 +52031,7 @@ var require_archive = __commonJS({
|
|
|
52031
52031
|
chunkedTarBuffers.map((chunk, index) => [
|
|
52032
52032
|
(0, import_hashes.hash)(chunk),
|
|
52033
52033
|
{
|
|
52034
|
-
names: [(0,
|
|
52034
|
+
names: [(0, import_node_path2.join)(workPath, `.vercel/source.tgz.part${index + 1}`)],
|
|
52035
52035
|
data: chunk,
|
|
52036
52036
|
mode: 438
|
|
52037
52037
|
}
|
|
@@ -52498,8 +52498,8 @@ var require_dist7 = __commonJS({
|
|
|
52498
52498
|
|
|
52499
52499
|
// src/util/compile-vercel-config.ts
|
|
52500
52500
|
var import_dotenv = __toESM(require_main(), 1);
|
|
52501
|
-
import { mkdir, readFile as
|
|
52502
|
-
import { join as
|
|
52501
|
+
import { mkdir, readFile as readFile5, writeFile as writeFile4, unlink, access } from "fs/promises";
|
|
52502
|
+
import { join as join10, basename as basename3 } from "path";
|
|
52503
52503
|
import { fork } from "child_process";
|
|
52504
52504
|
import { parse as tomlParse2 } from "smol-toml";
|
|
52505
52505
|
|
|
@@ -52507,7 +52507,7 @@ import { parse as tomlParse2 } from "smol-toml";
|
|
|
52507
52507
|
var import_ajv2 = __toESM(require_ajv(), 1);
|
|
52508
52508
|
var import_fs_extra8 = __toESM(require_lib3(), 1);
|
|
52509
52509
|
import fs4 from "fs";
|
|
52510
|
-
import { join as
|
|
52510
|
+
import { join as join9, relative } from "path";
|
|
52511
52511
|
import { promisify } from "util";
|
|
52512
52512
|
|
|
52513
52513
|
// src/util/projects/get-project-by-id-or-name.ts
|
|
@@ -52976,13 +52976,13 @@ var CancelablePromise = class _CancelablePromise extends Promise {
|
|
|
52976
52976
|
});
|
|
52977
52977
|
}
|
|
52978
52978
|
static withResolver() {
|
|
52979
|
-
let
|
|
52979
|
+
let resolve4;
|
|
52980
52980
|
let reject;
|
|
52981
52981
|
const promise = new _CancelablePromise((res, rej) => {
|
|
52982
|
-
|
|
52982
|
+
resolve4 = res;
|
|
52983
52983
|
reject = rej;
|
|
52984
52984
|
});
|
|
52985
|
-
return { promise, resolve:
|
|
52985
|
+
return { promise, resolve: resolve4, reject };
|
|
52986
52986
|
}
|
|
52987
52987
|
};
|
|
52988
52988
|
|
|
@@ -53345,7 +53345,7 @@ function createPrompt(view) {
|
|
|
53345
53345
|
const screen = new ScreenManager(rl);
|
|
53346
53346
|
let cancel = () => {
|
|
53347
53347
|
};
|
|
53348
|
-
const answer = new CancelablePromise((
|
|
53348
|
+
const answer = new CancelablePromise((resolve4, reject) => {
|
|
53349
53349
|
withHooks(rl, (store) => {
|
|
53350
53350
|
function checkCursorPos() {
|
|
53351
53351
|
screen.checkCursorPos();
|
|
@@ -53378,7 +53378,7 @@ function createPrompt(view) {
|
|
|
53378
53378
|
function done(value) {
|
|
53379
53379
|
setImmediate(() => {
|
|
53380
53380
|
onExit2();
|
|
53381
|
-
|
|
53381
|
+
resolve4(value);
|
|
53382
53382
|
});
|
|
53383
53383
|
}
|
|
53384
53384
|
function workLoop(resolvedConfig) {
|
|
@@ -53919,20 +53919,20 @@ ${dirtyResult.reason}`
|
|
|
53919
53919
|
};
|
|
53920
53920
|
}
|
|
53921
53921
|
function getLastCommit(directory) {
|
|
53922
|
-
return new Promise((
|
|
53922
|
+
return new Promise((resolve4, reject) => {
|
|
53923
53923
|
import_git_last_commit.default.getLastCommit(
|
|
53924
53924
|
(err, commit) => {
|
|
53925
53925
|
if (err) {
|
|
53926
53926
|
return reject((0, import_error_utils.normalizeError)(err));
|
|
53927
53927
|
}
|
|
53928
|
-
|
|
53928
|
+
resolve4(commit);
|
|
53929
53929
|
},
|
|
53930
53930
|
{ dst: directory }
|
|
53931
53931
|
);
|
|
53932
53932
|
});
|
|
53933
53933
|
}
|
|
53934
53934
|
function isDirty(directory) {
|
|
53935
|
-
return new Promise((
|
|
53935
|
+
return new Promise((resolve4, reject) => {
|
|
53936
53936
|
exec(
|
|
53937
53937
|
"git --no-optional-locks status -s",
|
|
53938
53938
|
{ cwd: directory },
|
|
@@ -53943,7 +53943,7 @@ function isDirty(directory) {
|
|
|
53943
53943
|
if (stderr !== void 0 && stderr.trim().length > 0) {
|
|
53944
53944
|
return reject(new Error(stderr));
|
|
53945
53945
|
}
|
|
53946
|
-
|
|
53946
|
+
resolve4(stdout.trim().length > 0);
|
|
53947
53947
|
}
|
|
53948
53948
|
);
|
|
53949
53949
|
});
|
|
@@ -54603,7 +54603,7 @@ async function selectAndParseRemoteUrl(client, remoteUrls) {
|
|
|
54603
54603
|
}
|
|
54604
54604
|
async function checkExistsAndConnect({
|
|
54605
54605
|
client,
|
|
54606
|
-
confirm
|
|
54606
|
+
confirm,
|
|
54607
54607
|
org,
|
|
54608
54608
|
project,
|
|
54609
54609
|
gitProviderLink,
|
|
@@ -54640,7 +54640,7 @@ async function checkExistsAndConnect({
|
|
|
54640
54640
|
}
|
|
54641
54641
|
const shouldReplaceRepo = await confirmRepoConnect(
|
|
54642
54642
|
client,
|
|
54643
|
-
|
|
54643
|
+
confirm,
|
|
54644
54644
|
connectedProvider,
|
|
54645
54645
|
connectedRepoPath
|
|
54646
54646
|
);
|
|
@@ -55162,10 +55162,10 @@ function findProjectsFromPath(projects, path) {
|
|
|
55162
55162
|
}
|
|
55163
55163
|
|
|
55164
55164
|
// src/commands/env/pull.ts
|
|
55165
|
-
var
|
|
55165
|
+
var import_chalk12 = __toESM(require_source(), 1);
|
|
55166
55166
|
var import_fs_extra5 = __toESM(require_lib3(), 1);
|
|
55167
55167
|
import { closeSync, openSync, readSync } from "fs";
|
|
55168
|
-
import { resolve as
|
|
55168
|
+
import { resolve as resolve3 } from "path";
|
|
55169
55169
|
|
|
55170
55170
|
// src/util/output/param.ts
|
|
55171
55171
|
var import_chalk8 = __toESM(require_source(), 1);
|
|
@@ -55762,584 +55762,11 @@ function parseTarget({
|
|
|
55762
55762
|
}
|
|
55763
55763
|
|
|
55764
55764
|
// src/commands/login/future.ts
|
|
55765
|
-
var
|
|
55765
|
+
var import_chalk11 = __toESM(require_source(), 1);
|
|
55766
55766
|
var open = __toESM(require_open(), 1);
|
|
55767
55767
|
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
|
55768
55768
|
import readline3 from "readline";
|
|
55769
|
-
import { KNOWN_AGENTS as KNOWN_AGENTS2 } from "@vercel/detect-agent";
|
|
55770
|
-
|
|
55771
|
-
// src/util/agent/auto-install-agentic.ts
|
|
55772
|
-
var import_chalk11 = __toESM(require_source(), 1);
|
|
55773
|
-
import { readFile as readFile3, writeFile as writeFile2 } from "fs/promises";
|
|
55774
|
-
import { access } from "fs/promises";
|
|
55775
|
-
import { dirname, join as join6, resolve as resolve3 } from "path";
|
|
55776
|
-
import { homedir as homedir3 } from "os";
|
|
55777
|
-
import { spawn } from "child_process";
|
|
55778
55769
|
import { KNOWN_AGENTS } from "@vercel/detect-agent";
|
|
55779
|
-
import { z } from "zod";
|
|
55780
|
-
var PREFS_FILE = "agent-preferences.json";
|
|
55781
|
-
var CLAUDE_LEGACY_PLUGIN_ID = "vercel-plugin@vercel";
|
|
55782
|
-
var CLAUDE_OFFICIAL_PLUGIN_ID = "vercel@claude-plugins-official";
|
|
55783
|
-
var VERCEL_PLUGIN_VERSION_URL = "https://raw.githubusercontent.com/vercel/vercel-plugin/main/.claude-plugin/plugin.json";
|
|
55784
|
-
var AGENT_TO_TARGET = {
|
|
55785
|
-
[KNOWN_AGENTS.CLAUDE]: "claude-code",
|
|
55786
|
-
[KNOWN_AGENTS.COWORK]: "claude-code"
|
|
55787
|
-
};
|
|
55788
|
-
function getPluginTargetForAgent(agentName) {
|
|
55789
|
-
if (!agentName) {
|
|
55790
|
-
return void 0;
|
|
55791
|
-
}
|
|
55792
|
-
if (agentName === KNOWN_AGENTS.CLAUDE || agentName.startsWith("claude-code") || agentName === KNOWN_AGENTS.COWORK) {
|
|
55793
|
-
return "claude-code";
|
|
55794
|
-
}
|
|
55795
|
-
return AGENT_TO_TARGET[agentName];
|
|
55796
|
-
}
|
|
55797
|
-
var promptedAtSchema = z.codec(
|
|
55798
|
-
z.union([z.iso.date(), z.iso.datetime()]),
|
|
55799
|
-
z.date(),
|
|
55800
|
-
{
|
|
55801
|
-
decode: (value) => new Date(value),
|
|
55802
|
-
encode: (value) => value.toISOString()
|
|
55803
|
-
}
|
|
55804
|
-
);
|
|
55805
|
-
var agentPreferencesSchema = z.object({
|
|
55806
|
-
pluginDeclined: z.boolean().optional(),
|
|
55807
|
-
pluginAutoUpdate: z.boolean().optional(),
|
|
55808
|
-
lastPromptedAt: promptedAtSchema.optional(),
|
|
55809
|
-
lastPluginAutoUpdateAttemptedAt: promptedAtSchema.optional(),
|
|
55810
|
-
lastPluginAutoUpdateAttemptedKey: z.string().optional()
|
|
55811
|
-
});
|
|
55812
|
-
async function fileExists(filePath) {
|
|
55813
|
-
try {
|
|
55814
|
-
await access(filePath);
|
|
55815
|
-
return true;
|
|
55816
|
-
} catch {
|
|
55817
|
-
return false;
|
|
55818
|
-
}
|
|
55819
|
-
}
|
|
55820
|
-
async function readPrefs(client) {
|
|
55821
|
-
return await client.maybeReadConfig(PREFS_FILE, agentPreferencesSchema) ?? {};
|
|
55822
|
-
}
|
|
55823
|
-
async function writePrefs(client, prefs) {
|
|
55824
|
-
try {
|
|
55825
|
-
await client.writeConfig(PREFS_FILE, agentPreferencesSchema, prefs);
|
|
55826
|
-
} catch {
|
|
55827
|
-
}
|
|
55828
|
-
}
|
|
55829
|
-
function encodeClaudeProjectDir(projectPath) {
|
|
55830
|
-
return projectPath.replace(/[^A-Za-z0-9]/g, "-");
|
|
55831
|
-
}
|
|
55832
|
-
async function projectHasUsedClaudeCode(cwd) {
|
|
55833
|
-
const home2 = homedir3();
|
|
55834
|
-
const projectsDir = join6(home2, ".claude", "projects");
|
|
55835
|
-
let dir = resolve3(cwd);
|
|
55836
|
-
while (dir !== home2) {
|
|
55837
|
-
if (await fileExists(join6(projectsDir, encodeClaudeProjectDir(dir)))) {
|
|
55838
|
-
return true;
|
|
55839
|
-
}
|
|
55840
|
-
const parent = dirname(dir);
|
|
55841
|
-
if (parent === dir) {
|
|
55842
|
-
break;
|
|
55843
|
-
}
|
|
55844
|
-
dir = parent;
|
|
55845
|
-
}
|
|
55846
|
-
return false;
|
|
55847
|
-
}
|
|
55848
|
-
async function getPluginTargets(agentName, cwd) {
|
|
55849
|
-
const targetForAgent = getPluginTargetForAgent(agentName);
|
|
55850
|
-
if (targetForAgent) {
|
|
55851
|
-
return [targetForAgent];
|
|
55852
|
-
}
|
|
55853
|
-
if (agentName) {
|
|
55854
|
-
return [];
|
|
55855
|
-
}
|
|
55856
|
-
if (cwd && await projectHasUsedClaudeCode(cwd)) {
|
|
55857
|
-
return ["claude-code"];
|
|
55858
|
-
}
|
|
55859
|
-
return [];
|
|
55860
|
-
}
|
|
55861
|
-
async function readClaudeInstalledPluginsFromRegistry() {
|
|
55862
|
-
try {
|
|
55863
|
-
const raw = await readFile3(
|
|
55864
|
-
getClaudeInstalledPluginsRegistryPath(),
|
|
55865
|
-
"utf-8"
|
|
55866
|
-
);
|
|
55867
|
-
const data = JSON.parse(raw);
|
|
55868
|
-
const plugins = data?.plugins ?? {};
|
|
55869
|
-
const entries = [];
|
|
55870
|
-
for (const [id, installs] of Object.entries(plugins)) {
|
|
55871
|
-
if (!Array.isArray(installs))
|
|
55872
|
-
continue;
|
|
55873
|
-
for (const install of installs) {
|
|
55874
|
-
if (!install || typeof install !== "object")
|
|
55875
|
-
continue;
|
|
55876
|
-
entries.push({
|
|
55877
|
-
id,
|
|
55878
|
-
...install,
|
|
55879
|
-
enabled: true
|
|
55880
|
-
});
|
|
55881
|
-
}
|
|
55882
|
-
}
|
|
55883
|
-
return entries;
|
|
55884
|
-
} catch {
|
|
55885
|
-
return [];
|
|
55886
|
-
}
|
|
55887
|
-
}
|
|
55888
|
-
function getClaudeInstalledPluginsRegistryPath() {
|
|
55889
|
-
return join6(homedir3(), ".claude", "plugins", "installed_plugins.json");
|
|
55890
|
-
}
|
|
55891
|
-
async function markStaleClaudePluginInstalls(plugins) {
|
|
55892
|
-
return Promise.all(
|
|
55893
|
-
plugins.map(async (plugin) => {
|
|
55894
|
-
if (plugin.installPath && !await fileExists(plugin.installPath)) {
|
|
55895
|
-
return { ...plugin, stale: true };
|
|
55896
|
-
}
|
|
55897
|
-
return plugin;
|
|
55898
|
-
})
|
|
55899
|
-
);
|
|
55900
|
-
}
|
|
55901
|
-
async function removeClaudePluginFromRegistry(pluginId) {
|
|
55902
|
-
try {
|
|
55903
|
-
const registryPath = getClaudeInstalledPluginsRegistryPath();
|
|
55904
|
-
const raw = await readFile3(registryPath, "utf-8");
|
|
55905
|
-
const data = JSON.parse(raw);
|
|
55906
|
-
if (!data.plugins || !(pluginId in data.plugins)) {
|
|
55907
|
-
return false;
|
|
55908
|
-
}
|
|
55909
|
-
delete data.plugins[pluginId];
|
|
55910
|
-
await writeFile2(
|
|
55911
|
-
registryPath,
|
|
55912
|
-
`${JSON.stringify(data, null, 2)}
|
|
55913
|
-
`,
|
|
55914
|
-
"utf-8"
|
|
55915
|
-
);
|
|
55916
|
-
return true;
|
|
55917
|
-
} catch (err) {
|
|
55918
|
-
output_manager_default.debug(`Failed to remove Claude plugin registry entry: ${err}`);
|
|
55919
|
-
return false;
|
|
55920
|
-
}
|
|
55921
|
-
}
|
|
55922
|
-
async function isPluginInstalledForTarget(target) {
|
|
55923
|
-
if (target === "claude-code") {
|
|
55924
|
-
const status = await getClaudePluginStatus();
|
|
55925
|
-
return status.state === "official-only";
|
|
55926
|
-
}
|
|
55927
|
-
return false;
|
|
55928
|
-
}
|
|
55929
|
-
async function confirm(client, message) {
|
|
55930
|
-
if (!client.stdin.isTTY) {
|
|
55931
|
-
return false;
|
|
55932
|
-
}
|
|
55933
|
-
return client.input.confirm(message, true);
|
|
55934
|
-
}
|
|
55935
|
-
function isSameDay(left, right) {
|
|
55936
|
-
return left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate();
|
|
55937
|
-
}
|
|
55938
|
-
function wasPromptedToday(prefs) {
|
|
55939
|
-
return prefs.lastPromptedAt ? isSameDay(prefs.lastPromptedAt, /* @__PURE__ */ new Date()) : false;
|
|
55940
|
-
}
|
|
55941
|
-
function wasPluginAutoUpdateAttemptedToday(prefs, attemptKey) {
|
|
55942
|
-
return prefs.lastPluginAutoUpdateAttemptedKey === attemptKey && !!prefs.lastPluginAutoUpdateAttemptedAt && isSameDay(prefs.lastPluginAutoUpdateAttemptedAt, /* @__PURE__ */ new Date());
|
|
55943
|
-
}
|
|
55944
|
-
async function markPromptedToday(client, prefs) {
|
|
55945
|
-
prefs.lastPromptedAt = /* @__PURE__ */ new Date();
|
|
55946
|
-
await writePrefs(client, prefs);
|
|
55947
|
-
}
|
|
55948
|
-
function markPluginAutoUpdateAttempted(prefs, attemptKey) {
|
|
55949
|
-
if (!attemptKey)
|
|
55950
|
-
return;
|
|
55951
|
-
prefs.lastPluginAutoUpdateAttemptedAt = /* @__PURE__ */ new Date();
|
|
55952
|
-
prefs.lastPluginAutoUpdateAttemptedKey = attemptKey;
|
|
55953
|
-
}
|
|
55954
|
-
async function runCommand(command, args) {
|
|
55955
|
-
return await new Promise((resolve5) => {
|
|
55956
|
-
const child = spawn(command, args, { stdio: "pipe" });
|
|
55957
|
-
let stdout = "";
|
|
55958
|
-
let stderr = "";
|
|
55959
|
-
child.stdout.on("data", (chunk) => {
|
|
55960
|
-
stdout += chunk.toString();
|
|
55961
|
-
});
|
|
55962
|
-
child.stderr.on("data", (chunk) => {
|
|
55963
|
-
stderr += chunk.toString();
|
|
55964
|
-
});
|
|
55965
|
-
child.on("close", (code2) => {
|
|
55966
|
-
resolve5({ exitCode: code2 ?? 1, stdout, stderr });
|
|
55967
|
-
});
|
|
55968
|
-
child.on("error", (err) => {
|
|
55969
|
-
resolve5({ exitCode: 1, stdout, stderr: `${stderr}${String(err)}` });
|
|
55970
|
-
});
|
|
55971
|
-
});
|
|
55972
|
-
}
|
|
55973
|
-
async function getClaudeInstalledPlugins() {
|
|
55974
|
-
const result = await runCommand("claude", ["plugins", "list", "--json"]);
|
|
55975
|
-
if (result.exitCode === 0) {
|
|
55976
|
-
try {
|
|
55977
|
-
const parsed = JSON.parse(result.stdout);
|
|
55978
|
-
if (Array.isArray(parsed)) {
|
|
55979
|
-
return markStaleClaudePluginInstalls(parsed);
|
|
55980
|
-
}
|
|
55981
|
-
} catch (err) {
|
|
55982
|
-
output_manager_default.debug(`Failed to parse Claude plugin list JSON: ${err}`);
|
|
55983
|
-
}
|
|
55984
|
-
} else if (result.stderr.trim().length > 0) {
|
|
55985
|
-
output_manager_default.debug(
|
|
55986
|
-
`Failed to run 'claude plugins list --json': ${result.stderr}`
|
|
55987
|
-
);
|
|
55988
|
-
}
|
|
55989
|
-
return markStaleClaudePluginInstalls(
|
|
55990
|
-
await readClaudeInstalledPluginsFromRegistry()
|
|
55991
|
-
);
|
|
55992
|
-
}
|
|
55993
|
-
async function fetchLatestVercelPluginVersion() {
|
|
55994
|
-
try {
|
|
55995
|
-
const response = await fetch(VERCEL_PLUGIN_VERSION_URL);
|
|
55996
|
-
if (!response.ok) {
|
|
55997
|
-
output_manager_default.debug(
|
|
55998
|
-
`Failed to fetch latest Vercel plugin version: ${response.status}`
|
|
55999
|
-
);
|
|
56000
|
-
return void 0;
|
|
56001
|
-
}
|
|
56002
|
-
const manifest = await response.json();
|
|
56003
|
-
return typeof manifest.version === "string" ? manifest.version : void 0;
|
|
56004
|
-
} catch (err) {
|
|
56005
|
-
output_manager_default.debug(`Failed to fetch latest Vercel plugin version: ${err}`);
|
|
56006
|
-
return void 0;
|
|
56007
|
-
}
|
|
56008
|
-
}
|
|
56009
|
-
function comparePluginVersions(a, b) {
|
|
56010
|
-
if (!a && !b)
|
|
56011
|
-
return 0;
|
|
56012
|
-
if (!a)
|
|
56013
|
-
return -1;
|
|
56014
|
-
if (!b)
|
|
56015
|
-
return 1;
|
|
56016
|
-
const parse3 = (value) => value.split(".").map((part) => Number.parseInt(part, 10) || 0);
|
|
56017
|
-
const left = parse3(a);
|
|
56018
|
-
const right = parse3(b);
|
|
56019
|
-
const maxLength = Math.max(left.length, right.length);
|
|
56020
|
-
for (let i = 0; i < maxLength; i++) {
|
|
56021
|
-
const l = left[i] ?? 0;
|
|
56022
|
-
const r = right[i] ?? 0;
|
|
56023
|
-
if (l > r)
|
|
56024
|
-
return 1;
|
|
56025
|
-
if (l < r)
|
|
56026
|
-
return -1;
|
|
56027
|
-
}
|
|
56028
|
-
return 0;
|
|
56029
|
-
}
|
|
56030
|
-
function buildClaudePluginStatus(installedPlugins, latestVersion) {
|
|
56031
|
-
const legacy = installedPlugins.find(
|
|
56032
|
-
(plugin) => plugin.id === CLAUDE_LEGACY_PLUGIN_ID
|
|
56033
|
-
);
|
|
56034
|
-
const official = installedPlugins.find(
|
|
56035
|
-
(plugin) => plugin.id === CLAUDE_OFFICIAL_PLUGIN_ID
|
|
56036
|
-
);
|
|
56037
|
-
let state = "none";
|
|
56038
|
-
if (legacy && official)
|
|
56039
|
-
state = "both";
|
|
56040
|
-
else if (legacy)
|
|
56041
|
-
state = "legacy-only";
|
|
56042
|
-
else if (official)
|
|
56043
|
-
state = "official-only";
|
|
56044
|
-
return {
|
|
56045
|
-
state,
|
|
56046
|
-
legacy,
|
|
56047
|
-
official,
|
|
56048
|
-
latestVersion
|
|
56049
|
-
};
|
|
56050
|
-
}
|
|
56051
|
-
function buildClaudePluginMigrationPlan(status) {
|
|
56052
|
-
const plan = {
|
|
56053
|
-
installOfficial: false,
|
|
56054
|
-
updateOfficial: false,
|
|
56055
|
-
removeLegacy: false,
|
|
56056
|
-
removeLegacyMarketplace: false
|
|
56057
|
-
};
|
|
56058
|
-
switch (status.state) {
|
|
56059
|
-
case "none":
|
|
56060
|
-
plan.installOfficial = true;
|
|
56061
|
-
break;
|
|
56062
|
-
case "legacy-only":
|
|
56063
|
-
plan.installOfficial = true;
|
|
56064
|
-
plan.removeLegacy = true;
|
|
56065
|
-
plan.removeLegacyMarketplace = true;
|
|
56066
|
-
break;
|
|
56067
|
-
case "both":
|
|
56068
|
-
plan.removeLegacy = true;
|
|
56069
|
-
plan.removeLegacyMarketplace = true;
|
|
56070
|
-
break;
|
|
56071
|
-
case "official-only":
|
|
56072
|
-
break;
|
|
56073
|
-
}
|
|
56074
|
-
if (status.official?.version && status.latestVersion && comparePluginVersions(status.official.version, status.latestVersion) < 0) {
|
|
56075
|
-
plan.updateOfficial = true;
|
|
56076
|
-
}
|
|
56077
|
-
return plan;
|
|
56078
|
-
}
|
|
56079
|
-
function hasClaudeMigrationActions(plan) {
|
|
56080
|
-
return plan.installOfficial || plan.updateOfficial || plan.removeLegacy || plan.removeLegacyMarketplace;
|
|
56081
|
-
}
|
|
56082
|
-
function getClaudeAutoUpdateAttemptKey(status, plan) {
|
|
56083
|
-
return [
|
|
56084
|
-
status.state,
|
|
56085
|
-
status.legacy?.version ?? "none",
|
|
56086
|
-
status.official?.version ?? "none",
|
|
56087
|
-
status.latestVersion ?? "unknown",
|
|
56088
|
-
plan.installOfficial ? "install" : "",
|
|
56089
|
-
plan.updateOfficial ? "update" : "",
|
|
56090
|
-
plan.removeLegacy ? "remove-legacy" : "",
|
|
56091
|
-
plan.removeLegacyMarketplace ? "remove-marketplace" : ""
|
|
56092
|
-
].join(":");
|
|
56093
|
-
}
|
|
56094
|
-
function buildClaudePromptCopy(status, plan) {
|
|
56095
|
-
if (plan.installOfficial && status.state === "none") {
|
|
56096
|
-
return {
|
|
56097
|
-
message: "Vercel Plugin for Claude Code is not installed.",
|
|
56098
|
-
confirm: "Would you like to install it now?"
|
|
56099
|
-
};
|
|
56100
|
-
}
|
|
56101
|
-
if (plan.installOfficial && status.state === "legacy-only") {
|
|
56102
|
-
return {
|
|
56103
|
-
message: "Update available for Vercel Plugin for Claude Code (legacy -> official).",
|
|
56104
|
-
confirm: "Would you like to update now?"
|
|
56105
|
-
};
|
|
56106
|
-
}
|
|
56107
|
-
if (status.state === "both" && plan.removeLegacy) {
|
|
56108
|
-
return {
|
|
56109
|
-
message: "Vercel Plugin for Claude Code has a legacy install to clean up.",
|
|
56110
|
-
confirm: "Would you like to update now?"
|
|
56111
|
-
};
|
|
56112
|
-
}
|
|
56113
|
-
if (plan.updateOfficial) {
|
|
56114
|
-
const fromVersion = status.official?.version;
|
|
56115
|
-
const toVersion = status.latestVersion;
|
|
56116
|
-
const versionRange = fromVersion && toVersion ? ` (v${fromVersion} -> v${toVersion})` : "";
|
|
56117
|
-
return {
|
|
56118
|
-
message: `Update available for Vercel Plugin for Claude Code${versionRange}.`,
|
|
56119
|
-
confirm: "Would you like to update now?"
|
|
56120
|
-
};
|
|
56121
|
-
}
|
|
56122
|
-
return {
|
|
56123
|
-
message: "The Vercel plugin needs attention in Claude Code before your agent harness is fully up to date.",
|
|
56124
|
-
confirm: "Apply the Vercel plugin changes for Claude Code?"
|
|
56125
|
-
};
|
|
56126
|
-
}
|
|
56127
|
-
async function runClaudeCommand(spinnerMessage, successMessage, failureMessage, args, options) {
|
|
56128
|
-
output_manager_default.spinner(spinnerMessage);
|
|
56129
|
-
const result = await runCommand("claude", args);
|
|
56130
|
-
output_manager_default.stopSpinner();
|
|
56131
|
-
if (result.exitCode === 0) {
|
|
56132
|
-
if (!options?.quietSuccess) {
|
|
56133
|
-
output_manager_default.success(successMessage);
|
|
56134
|
-
}
|
|
56135
|
-
return true;
|
|
56136
|
-
}
|
|
56137
|
-
output_manager_default.warn(failureMessage);
|
|
56138
|
-
output_manager_default.debug(
|
|
56139
|
-
`Claude command failed: claude ${args.join(" ")}
|
|
56140
|
-
${result.stderr || result.stdout}`
|
|
56141
|
-
);
|
|
56142
|
-
return false;
|
|
56143
|
-
}
|
|
56144
|
-
async function removeStaleLegacyClaudePlugin(removeMarketplace) {
|
|
56145
|
-
output_manager_default.spinner("Removing the stale legacy Vercel Claude plugin...");
|
|
56146
|
-
const removedRegistryEntry = await removeClaudePluginFromRegistry(
|
|
56147
|
-
CLAUDE_LEGACY_PLUGIN_ID
|
|
56148
|
-
);
|
|
56149
|
-
output_manager_default.stopSpinner();
|
|
56150
|
-
if (!removedRegistryEntry) {
|
|
56151
|
-
output_manager_default.warn(
|
|
56152
|
-
"Could not remove the stale legacy Vercel Claude plugin registry entry."
|
|
56153
|
-
);
|
|
56154
|
-
return false;
|
|
56155
|
-
}
|
|
56156
|
-
output_manager_default.success("Removed the stale legacy Vercel Claude plugin");
|
|
56157
|
-
if (removeMarketplace) {
|
|
56158
|
-
const removedMarketplace = await runClaudeCommand(
|
|
56159
|
-
"Removing the legacy Vercel marketplace...",
|
|
56160
|
-
"Removed the legacy Vercel marketplace",
|
|
56161
|
-
"Removed the stale legacy Vercel plugin, but could not remove the legacy marketplace.",
|
|
56162
|
-
["plugins", "marketplace", "remove", "vercel"],
|
|
56163
|
-
{ quietSuccess: true }
|
|
56164
|
-
);
|
|
56165
|
-
if (!removedMarketplace) {
|
|
56166
|
-
output_manager_default.log("Cleanup command: claude plugins marketplace remove vercel");
|
|
56167
|
-
}
|
|
56168
|
-
}
|
|
56169
|
-
return true;
|
|
56170
|
-
}
|
|
56171
|
-
async function runClaudeMigration(plan) {
|
|
56172
|
-
let removedStaleLegacy = false;
|
|
56173
|
-
if (plan.removeLegacy) {
|
|
56174
|
-
const statusBeforeInstall = await getClaudePluginStatus();
|
|
56175
|
-
if (statusBeforeInstall.legacy?.stale) {
|
|
56176
|
-
removedStaleLegacy = await removeStaleLegacyClaudePlugin(
|
|
56177
|
-
plan.removeLegacyMarketplace
|
|
56178
|
-
);
|
|
56179
|
-
}
|
|
56180
|
-
}
|
|
56181
|
-
if (plan.installOfficial) {
|
|
56182
|
-
const installed = await runClaudeCommand(
|
|
56183
|
-
"Installing the official Vercel Claude plugin...",
|
|
56184
|
-
"Updated the Vercel plugin",
|
|
56185
|
-
"Failed to install the official Vercel Claude plugin.",
|
|
56186
|
-
["plugins", "install", CLAUDE_OFFICIAL_PLUGIN_ID]
|
|
56187
|
-
);
|
|
56188
|
-
if (!installed) {
|
|
56189
|
-
return;
|
|
56190
|
-
}
|
|
56191
|
-
} else if (plan.updateOfficial) {
|
|
56192
|
-
await runClaudeCommand(
|
|
56193
|
-
"Updating the official Vercel Claude plugin...",
|
|
56194
|
-
"Updated the Vercel plugin",
|
|
56195
|
-
"Failed to update the official Vercel Claude plugin.",
|
|
56196
|
-
["plugins", "update", CLAUDE_OFFICIAL_PLUGIN_ID]
|
|
56197
|
-
);
|
|
56198
|
-
}
|
|
56199
|
-
const statusAfterInstall = await getClaudePluginStatus();
|
|
56200
|
-
if (!statusAfterInstall.official) {
|
|
56201
|
-
output_manager_default.warn(
|
|
56202
|
-
"Skipping Claude cleanup because the official Vercel plugin is not installed."
|
|
56203
|
-
);
|
|
56204
|
-
return;
|
|
56205
|
-
}
|
|
56206
|
-
if (plan.removeLegacy && statusAfterInstall.legacy) {
|
|
56207
|
-
const removedLegacy = await runClaudeCommand(
|
|
56208
|
-
"Removing the legacy Vercel Claude plugin...",
|
|
56209
|
-
"Removed the legacy Vercel Claude plugin",
|
|
56210
|
-
"Installed the official Vercel Claude plugin, but could not remove the legacy install.",
|
|
56211
|
-
["plugins", "uninstall", CLAUDE_LEGACY_PLUGIN_ID],
|
|
56212
|
-
{ quietSuccess: true }
|
|
56213
|
-
);
|
|
56214
|
-
if (!removedLegacy) {
|
|
56215
|
-
output_manager_default.log(
|
|
56216
|
-
`Cleanup command: claude plugins uninstall ${CLAUDE_LEGACY_PLUGIN_ID}`
|
|
56217
|
-
);
|
|
56218
|
-
return;
|
|
56219
|
-
}
|
|
56220
|
-
}
|
|
56221
|
-
if (plan.removeLegacyMarketplace && !removedStaleLegacy) {
|
|
56222
|
-
const finalStatus = await getClaudePluginStatus();
|
|
56223
|
-
if (!finalStatus.legacy) {
|
|
56224
|
-
const removedMarketplace = await runClaudeCommand(
|
|
56225
|
-
"Removing the legacy Vercel marketplace...",
|
|
56226
|
-
"Removed the legacy Vercel marketplace",
|
|
56227
|
-
"Removed the legacy Vercel plugin, but could not remove the legacy marketplace.",
|
|
56228
|
-
["plugins", "marketplace", "remove", "vercel"],
|
|
56229
|
-
{ quietSuccess: true }
|
|
56230
|
-
);
|
|
56231
|
-
if (!removedMarketplace) {
|
|
56232
|
-
output_manager_default.log("Cleanup command: claude plugins marketplace remove vercel");
|
|
56233
|
-
}
|
|
56234
|
-
}
|
|
56235
|
-
}
|
|
56236
|
-
}
|
|
56237
|
-
async function getClaudePluginStatus() {
|
|
56238
|
-
const [installedPlugins, latestVersion] = await Promise.all([
|
|
56239
|
-
getClaudeInstalledPlugins(),
|
|
56240
|
-
fetchLatestVercelPluginVersion()
|
|
56241
|
-
]);
|
|
56242
|
-
return buildClaudePluginStatus(installedPlugins, latestVersion);
|
|
56243
|
-
}
|
|
56244
|
-
async function applyPluginActions(targets, claudePlan) {
|
|
56245
|
-
for (const target of targets) {
|
|
56246
|
-
if (target === "claude-code" && claudePlan) {
|
|
56247
|
-
await runClaudeMigration(claudePlan);
|
|
56248
|
-
} else {
|
|
56249
|
-
output_manager_default.debug(`Skipping unsupported plugin target: ${target}`);
|
|
56250
|
-
}
|
|
56251
|
-
}
|
|
56252
|
-
}
|
|
56253
|
-
async function autoInstallVercelPlugin(client, options) {
|
|
56254
|
-
try {
|
|
56255
|
-
const prefs = await readPrefs(client);
|
|
56256
|
-
const applyMode = options?.mode === "apply";
|
|
56257
|
-
if (!prefs.pluginDeclined || prefs.pluginAutoUpdate || applyMode) {
|
|
56258
|
-
const targets = await getPluginTargets(client.agentName, client.cwd);
|
|
56259
|
-
const uninstalledTargets = [];
|
|
56260
|
-
const claudeStatus = targets.includes("claude-code") ? await getClaudePluginStatus() : void 0;
|
|
56261
|
-
const claudePlan = claudeStatus ? buildClaudePluginMigrationPlan(claudeStatus) : void 0;
|
|
56262
|
-
const claudeAutoUpdateAttemptKey = claudeStatus && claudePlan ? getClaudeAutoUpdateAttemptKey(claudeStatus, claudePlan) : void 0;
|
|
56263
|
-
for (const target of targets) {
|
|
56264
|
-
if (target === "claude-code") {
|
|
56265
|
-
if (claudePlan && hasClaudeMigrationActions(claudePlan)) {
|
|
56266
|
-
uninstalledTargets.push(target);
|
|
56267
|
-
}
|
|
56268
|
-
continue;
|
|
56269
|
-
}
|
|
56270
|
-
if (!await isPluginInstalledForTarget(target)) {
|
|
56271
|
-
uninstalledTargets.push(target);
|
|
56272
|
-
}
|
|
56273
|
-
}
|
|
56274
|
-
if (uninstalledTargets.length > 0) {
|
|
56275
|
-
if (prefs.pluginAutoUpdate) {
|
|
56276
|
-
if (claudeAutoUpdateAttemptKey && wasPluginAutoUpdateAttemptedToday(prefs, claudeAutoUpdateAttemptKey)) {
|
|
56277
|
-
return;
|
|
56278
|
-
}
|
|
56279
|
-
prefs.pluginDeclined = false;
|
|
56280
|
-
markPluginAutoUpdateAttempted(prefs, claudeAutoUpdateAttemptKey);
|
|
56281
|
-
await writePrefs(client, prefs);
|
|
56282
|
-
await applyPluginActions(uninstalledTargets, claudePlan);
|
|
56283
|
-
return;
|
|
56284
|
-
}
|
|
56285
|
-
if (!applyMode && wasPromptedToday(prefs)) {
|
|
56286
|
-
return;
|
|
56287
|
-
}
|
|
56288
|
-
if (applyMode) {
|
|
56289
|
-
prefs.pluginDeclined = false;
|
|
56290
|
-
prefs.pluginAutoUpdate = true;
|
|
56291
|
-
await writePrefs(client, prefs);
|
|
56292
|
-
await applyPluginActions(uninstalledTargets, claudePlan);
|
|
56293
|
-
return;
|
|
56294
|
-
}
|
|
56295
|
-
const promptMessages = [];
|
|
56296
|
-
let confirmMessage = "Install the Vercel plugin?";
|
|
56297
|
-
if (uninstalledTargets.includes("claude-code") && claudeStatus && claudePlan) {
|
|
56298
|
-
const claudePrompt = buildClaudePromptCopy(claudeStatus, claudePlan);
|
|
56299
|
-
promptMessages.push(claudePrompt.message);
|
|
56300
|
-
confirmMessage = claudePrompt.confirm;
|
|
56301
|
-
}
|
|
56302
|
-
const promptMessage = promptMessages.join(" ").trim();
|
|
56303
|
-
if (promptMessage) {
|
|
56304
|
-
output_manager_default.log(promptMessage);
|
|
56305
|
-
}
|
|
56306
|
-
const accepted = await confirm(client, confirmMessage);
|
|
56307
|
-
await markPromptedToday(client, prefs);
|
|
56308
|
-
if (accepted) {
|
|
56309
|
-
prefs.pluginDeclined = false;
|
|
56310
|
-
prefs.pluginAutoUpdate = true;
|
|
56311
|
-
await writePrefs(client, prefs);
|
|
56312
|
-
await applyPluginActions(uninstalledTargets, claudePlan);
|
|
56313
|
-
} else {
|
|
56314
|
-
prefs.pluginDeclined = true;
|
|
56315
|
-
prefs.pluginAutoUpdate = false;
|
|
56316
|
-
await writePrefs(client, prefs);
|
|
56317
|
-
}
|
|
56318
|
-
}
|
|
56319
|
-
}
|
|
56320
|
-
} catch (err) {
|
|
56321
|
-
output_manager_default.debug(`Auto-install agent tooling failed: ${err}`);
|
|
56322
|
-
}
|
|
56323
|
-
}
|
|
56324
|
-
async function showPluginTipIfNeeded(client) {
|
|
56325
|
-
try {
|
|
56326
|
-
const prefs = await readPrefs(client);
|
|
56327
|
-
if (prefs.pluginDeclined)
|
|
56328
|
-
return;
|
|
56329
|
-
const targets = await getPluginTargets(client.agentName, client.cwd);
|
|
56330
|
-
for (const target of targets) {
|
|
56331
|
-
if (!await isPluginInstalledForTarget(target)) {
|
|
56332
|
-
output_manager_default.log(
|
|
56333
|
-
import_chalk11.default.dim(
|
|
56334
|
-
"Tip: Run `npx plugins add vercel/vercel-plugin` to enhance your agent experience"
|
|
56335
|
-
)
|
|
56336
|
-
);
|
|
56337
|
-
return;
|
|
56338
|
-
}
|
|
56339
|
-
}
|
|
56340
|
-
} catch {
|
|
56341
|
-
}
|
|
56342
|
-
}
|
|
56343
55770
|
|
|
56344
55771
|
// src/util/login/update-current-team-after-login.ts
|
|
56345
55772
|
async function updateCurrentTeamAfterLogin(client, ssoTeamId) {
|
|
@@ -56618,17 +56045,17 @@ async function performDeviceCodeFlow(client, options) {
|
|
|
56618
56045
|
url.searchParams.set("team_id", options.teamId);
|
|
56619
56046
|
verification_uri_complete = url.toString();
|
|
56620
56047
|
}
|
|
56621
|
-
const isCursorAgent = client.agentName ===
|
|
56048
|
+
const isCursorAgent = client.agentName === KNOWN_AGENTS.CURSOR || client.agentName === KNOWN_AGENTS.CURSOR_CLI;
|
|
56622
56049
|
const shouldSkipBrowser = process.env.CI && !isCursorAgent;
|
|
56623
56050
|
output_manager_default.log(
|
|
56624
56051
|
`
|
|
56625
|
-
Visit ${
|
|
56052
|
+
Visit ${import_chalk11.default.bold(
|
|
56626
56053
|
output_manager_default.link(
|
|
56627
56054
|
verification_uri.replace("https://", ""),
|
|
56628
56055
|
verification_uri_complete,
|
|
56629
56056
|
{ color: false, fallback: () => verification_uri_complete }
|
|
56630
56057
|
)
|
|
56631
|
-
)}${output_manager_default.supportsHyperlink ? ` and enter ${
|
|
56058
|
+
)}${output_manager_default.supportsHyperlink ? ` and enter ${import_chalk11.default.bold(user_code)}` : ""}
|
|
56632
56059
|
`
|
|
56633
56060
|
);
|
|
56634
56061
|
if (!shouldSkipBrowser) {
|
|
@@ -56642,7 +56069,7 @@ async function performDeviceCodeFlow(client, options) {
|
|
|
56642
56069
|
if (client.isAgent && client.nonInteractive) {
|
|
56643
56070
|
output_manager_default.log(
|
|
56644
56071
|
`
|
|
56645
|
-
${
|
|
56072
|
+
${import_chalk11.default.yellow("\u26A0")} ${import_chalk11.default.bold("Browser could not be opened automatically.")}
|
|
56646
56073
|
`
|
|
56647
56074
|
);
|
|
56648
56075
|
output_manager_default.log(
|
|
@@ -56740,19 +56167,18 @@ async function login(client, telemetry) {
|
|
|
56740
56167
|
client.writeToConfigFile();
|
|
56741
56168
|
output_manager_default.debug(`Saved credentials in "${humanizePath(client.getGlobalPathConfig())}"`);
|
|
56742
56169
|
output_manager_default.print(`
|
|
56743
|
-
${
|
|
56170
|
+
${import_chalk11.default.cyan("Congratulations!")} You are now signed in.
|
|
56744
56171
|
|
|
56745
56172
|
To deploy something, run ${getCommandName()}.
|
|
56746
56173
|
|
|
56747
56174
|
${emoji("tip")} To deploy every commit automatically,
|
|
56748
|
-
connect a Git Repository (${
|
|
56175
|
+
connect a Git Repository (${import_chalk11.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).
|
|
56749
56176
|
`);
|
|
56750
56177
|
telemetry.trackState("success");
|
|
56751
|
-
await autoInstallVercelPlugin(client);
|
|
56752
56178
|
return 0;
|
|
56753
56179
|
}
|
|
56754
56180
|
async function wait(intervalMs) {
|
|
56755
|
-
await new Promise((
|
|
56181
|
+
await new Promise((resolve4) => setTimeout(resolve4, intervalMs));
|
|
56756
56182
|
}
|
|
56757
56183
|
|
|
56758
56184
|
// src/commands/env/pull.ts
|
|
@@ -56873,11 +56299,11 @@ async function pull(client, argv, source = "vercel-cli:env:pull") {
|
|
|
56873
56299
|
return 0;
|
|
56874
56300
|
}
|
|
56875
56301
|
async function envPullCommandLogic(client, filename, skipConfirmation, environment, link, gitBranch, cwd, source, deploymentId) {
|
|
56876
|
-
const fullPath =
|
|
56302
|
+
const fullPath = resolve3(cwd, filename);
|
|
56877
56303
|
const head = tryReadHeadSync(fullPath, Buffer.byteLength(CONTENTS_PREFIX));
|
|
56878
56304
|
const exists = typeof head !== "undefined";
|
|
56879
56305
|
if (head === CONTENTS_PREFIX) {
|
|
56880
|
-
output_manager_default.log(`Overwriting existing ${
|
|
56306
|
+
output_manager_default.log(`Overwriting existing ${import_chalk12.default.bold(filename)} file`);
|
|
56881
56307
|
} else if (exists && !skipConfirmation) {
|
|
56882
56308
|
if (client.nonInteractive) {
|
|
56883
56309
|
outputActionRequired(client, {
|
|
@@ -56905,11 +56331,11 @@ async function envPullCommandLogic(client, filename, skipConfirmation, environme
|
|
|
56905
56331
|
}
|
|
56906
56332
|
}
|
|
56907
56333
|
const projectSlugLink = formatProject(link.org.slug, link.project.name);
|
|
56908
|
-
const downloadMessage = gitBranch ? `Downloading \`${
|
|
56334
|
+
const downloadMessage = gitBranch ? `Downloading \`${import_chalk12.default.cyan(
|
|
56909
56335
|
environment
|
|
56910
|
-
)}\` environment variables for ${projectSlugLink} and any overrides for branch ${
|
|
56336
|
+
)}\` environment variables for ${projectSlugLink} and any overrides for branch ${import_chalk12.default.cyan(
|
|
56911
56337
|
gitBranch
|
|
56912
|
-
)}` : `Downloading \`${
|
|
56338
|
+
)}` : `Downloading \`${import_chalk12.default.cyan(
|
|
56913
56339
|
environment
|
|
56914
56340
|
)}\` environment variables for ${projectSlugLink}`;
|
|
56915
56341
|
output_manager_default.log(downloadMessage);
|
|
@@ -57001,15 +56427,15 @@ function escapeValue(value) {
|
|
|
57001
56427
|
}
|
|
57002
56428
|
|
|
57003
56429
|
// src/util/projects/find-project-root.ts
|
|
57004
|
-
var
|
|
56430
|
+
var import_chalk13 = __toESM(require_source(), 1);
|
|
57005
56431
|
var import_fs_extra7 = __toESM(require_lib3(), 1);
|
|
57006
56432
|
import { stat } from "fs/promises";
|
|
57007
|
-
import { join as
|
|
56433
|
+
import { join as join8, dirname } from "path";
|
|
57008
56434
|
|
|
57009
56435
|
// src/util/projects/detect-services.ts
|
|
57010
56436
|
var import_fs_detectors2 = __toESM(require_dist6(), 1);
|
|
57011
|
-
import { readFile as
|
|
57012
|
-
import { basename as basename2, join as
|
|
56437
|
+
import { readFile as readFile3, writeFile as writeFile2 } from "fs/promises";
|
|
56438
|
+
import { basename as basename2, join as join7 } from "path";
|
|
57013
56439
|
import { parse as tomlParse, stringify as tomlStringify } from "smol-toml";
|
|
57014
56440
|
|
|
57015
56441
|
// src/util/is-vercel-toml-enabled.ts
|
|
@@ -57698,7 +57124,7 @@ function validateConfig(config) {
|
|
|
57698
57124
|
}
|
|
57699
57125
|
|
|
57700
57126
|
// src/util/projects/detect-entrypoint.ts
|
|
57701
|
-
import { join as
|
|
57127
|
+
import { join as join6 } from "path";
|
|
57702
57128
|
import {
|
|
57703
57129
|
isPythonFramework,
|
|
57704
57130
|
isNodeBackendFramework,
|
|
@@ -57706,7 +57132,7 @@ import {
|
|
|
57706
57132
|
} from "@vercel/build-utils";
|
|
57707
57133
|
function createDetectEntrypoint(projectRoot) {
|
|
57708
57134
|
return async ({ workPath, framework }) => {
|
|
57709
|
-
const absWorkPath = normalizePath2(
|
|
57135
|
+
const absWorkPath = normalizePath2(join6(projectRoot, workPath));
|
|
57710
57136
|
if (isPythonFramework(framework)) {
|
|
57711
57137
|
const { detectEntrypoint } = await import("@vercel/python");
|
|
57712
57138
|
return detectEntrypoint({
|
|
@@ -57769,7 +57195,7 @@ async function tryDetectServices(cwd) {
|
|
|
57769
57195
|
}
|
|
57770
57196
|
async function writeServicesConfig(cwd, config) {
|
|
57771
57197
|
const prepared = await prepareServicesConfigWrite(cwd, config);
|
|
57772
|
-
await
|
|
57198
|
+
await writeFile2(prepared.configPath, prepared.content, "utf8");
|
|
57773
57199
|
return { configFileName: basename2(prepared.configPath) };
|
|
57774
57200
|
}
|
|
57775
57201
|
async function getServicesConfigWriteBlocker(cwd, config) {
|
|
@@ -57787,9 +57213,9 @@ function toProjectServicesConfigPatch(config) {
|
|
|
57787
57213
|
}
|
|
57788
57214
|
async function prepareServicesConfigWrite(cwd, config) {
|
|
57789
57215
|
const compileResult = await compileVercelConfig(cwd);
|
|
57790
|
-
const configPath =
|
|
57216
|
+
const configPath = join7(cwd, "vercel.json");
|
|
57791
57217
|
if (isVercelTomlEnabled() && compileResult.sourceFile === "vercel.toml") {
|
|
57792
|
-
return prepareTomlServicesConfigWrite(
|
|
57218
|
+
return prepareTomlServicesConfigWrite(join7(cwd, "vercel.toml"), config);
|
|
57793
57219
|
}
|
|
57794
57220
|
if (compileResult.wasCompiled) {
|
|
57795
57221
|
throw new Error(
|
|
@@ -57822,7 +57248,7 @@ async function prepareTomlServicesConfigWrite(configPath, config) {
|
|
|
57822
57248
|
const patchKeys = Object.keys(patch);
|
|
57823
57249
|
let existingContent;
|
|
57824
57250
|
try {
|
|
57825
|
-
existingContent = await
|
|
57251
|
+
existingContent = await readFile3(configPath, "utf8");
|
|
57826
57252
|
} catch {
|
|
57827
57253
|
existingContent = "";
|
|
57828
57254
|
}
|
|
@@ -57860,8 +57286,8 @@ async function findProjectRoot(startDir) {
|
|
|
57860
57286
|
} catch {
|
|
57861
57287
|
return null;
|
|
57862
57288
|
}
|
|
57863
|
-
let dir =
|
|
57864
|
-
while (
|
|
57289
|
+
let dir = dirname(startDir);
|
|
57290
|
+
while (dirname(dir) !== dir) {
|
|
57865
57291
|
try {
|
|
57866
57292
|
if ((await stat(dir)).dev !== cwdDev) {
|
|
57867
57293
|
return null;
|
|
@@ -57869,14 +57295,14 @@ async function findProjectRoot(startDir) {
|
|
|
57869
57295
|
} catch {
|
|
57870
57296
|
return null;
|
|
57871
57297
|
}
|
|
57872
|
-
const hasVercelDir = await (0, import_fs_extra7.pathExists)(
|
|
57873
|
-
const hasVercelJson = await (0, import_fs_extra7.pathExists)(
|
|
57874
|
-
const hasVercelToml = isVercelTomlEnabled() && await (0, import_fs_extra7.pathExists)(
|
|
57875
|
-
const hasGit = await (0, import_fs_extra7.pathExists)(
|
|
57298
|
+
const hasVercelDir = await (0, import_fs_extra7.pathExists)(join8(dir, ".vercel"));
|
|
57299
|
+
const hasVercelJson = await (0, import_fs_extra7.pathExists)(join8(dir, "vercel.json"));
|
|
57300
|
+
const hasVercelToml = isVercelTomlEnabled() && await (0, import_fs_extra7.pathExists)(join8(dir, "vercel.toml"));
|
|
57301
|
+
const hasGit = await (0, import_fs_extra7.pathExists)(join8(dir, ".git"));
|
|
57876
57302
|
if (hasVercelDir || hasVercelJson || hasVercelToml || hasGit) {
|
|
57877
57303
|
return dir;
|
|
57878
57304
|
}
|
|
57879
|
-
dir =
|
|
57305
|
+
dir = dirname(dir);
|
|
57880
57306
|
}
|
|
57881
57307
|
return null;
|
|
57882
57308
|
}
|
|
@@ -57890,15 +57316,15 @@ async function resolveProjectCwd(cwd) {
|
|
|
57890
57316
|
}
|
|
57891
57317
|
const result = await tryDetectServices(projectRoot);
|
|
57892
57318
|
if (result && (result.services?.length ?? 0) > 0) {
|
|
57893
|
-
output_manager_default.debug(`Running from project root: ${
|
|
57319
|
+
output_manager_default.debug(`Running from project root: ${import_chalk13.default.cyan(projectRoot)}`);
|
|
57894
57320
|
return projectRoot;
|
|
57895
57321
|
}
|
|
57896
57322
|
return cwd;
|
|
57897
57323
|
}
|
|
57898
57324
|
|
|
57899
57325
|
// src/util/projects/link.ts
|
|
57900
|
-
var
|
|
57901
|
-
var
|
|
57326
|
+
var readFile4 = promisify(fs4.readFile);
|
|
57327
|
+
var writeFile3 = promisify(fs4.writeFile);
|
|
57902
57328
|
var VERCEL_DIR = ".vercel";
|
|
57903
57329
|
var VERCEL_DIR_FALLBACK = ".now";
|
|
57904
57330
|
var VERCEL_DIR_README = "README.txt";
|
|
@@ -57923,7 +57349,7 @@ var linkSchema = {
|
|
|
57923
57349
|
}
|
|
57924
57350
|
};
|
|
57925
57351
|
function getVercelDirectory(cwd) {
|
|
57926
|
-
const possibleDirs = [
|
|
57352
|
+
const possibleDirs = [join9(cwd, VERCEL_DIR), join9(cwd, VERCEL_DIR_FALLBACK)];
|
|
57927
57353
|
const existingDirs = possibleDirs.filter((d) => isDirectory(d));
|
|
57928
57354
|
if (existingDirs.length > 1) {
|
|
57929
57355
|
throw new NowBuildError2({
|
|
@@ -58015,7 +57441,7 @@ async function getProjectLinkFromRepoLink(client, path, projectName, projectName
|
|
|
58015
57441
|
}
|
|
58016
57442
|
async function getLinkFromDir(dir) {
|
|
58017
57443
|
try {
|
|
58018
|
-
const json = await
|
|
57444
|
+
const json = await readFile4(join9(dir, VERCEL_DIR_PROJECT), "utf8");
|
|
58019
57445
|
const ajv2 = new import_ajv2.default();
|
|
58020
57446
|
const link = JSON.parse(json);
|
|
58021
57447
|
if (!ajv2.validate(linkSchema, link)) {
|
|
@@ -58175,8 +57601,8 @@ No, you should not share the ".vercel" folder with anyone.
|
|
|
58175
57601
|
Upon creation, it will be automatically added to your ".gitignore" file.
|
|
58176
57602
|
`;
|
|
58177
57603
|
async function writeReadme(path) {
|
|
58178
|
-
await
|
|
58179
|
-
|
|
57604
|
+
await writeFile3(
|
|
57605
|
+
join9(path, VERCEL_DIR, VERCEL_DIR_README),
|
|
58180
57606
|
VERCEL_DIR_README_CONTENT
|
|
58181
57607
|
);
|
|
58182
57608
|
}
|
|
@@ -58185,15 +57611,15 @@ async function linkFolderToProject(client, path, projectLink, projectName, orgSl
|
|
|
58185
57611
|
return;
|
|
58186
57612
|
}
|
|
58187
57613
|
try {
|
|
58188
|
-
await (0, import_fs_extra8.ensureDir)(
|
|
57614
|
+
await (0, import_fs_extra8.ensureDir)(join9(path, VERCEL_DIR));
|
|
58189
57615
|
} catch (err) {
|
|
58190
57616
|
if ((0, import_error_utils4.isErrnoException)(err) && err.code === "ENOTDIR") {
|
|
58191
57617
|
return;
|
|
58192
57618
|
}
|
|
58193
57619
|
throw err;
|
|
58194
57620
|
}
|
|
58195
|
-
await
|
|
58196
|
-
|
|
57621
|
+
await writeFile3(
|
|
57622
|
+
join9(path, VERCEL_DIR, VERCEL_DIR_PROJECT),
|
|
58197
57623
|
JSON.stringify({
|
|
58198
57624
|
...projectLink,
|
|
58199
57625
|
projectName
|
|
@@ -58307,9 +57733,9 @@ var VERCEL_CONFIG_EXTENSIONS = [
|
|
|
58307
57733
|
"cjs"
|
|
58308
57734
|
];
|
|
58309
57735
|
var DEFAULT_VERCEL_CONFIG_FILENAME = "Vercel config";
|
|
58310
|
-
async function
|
|
57736
|
+
async function fileExists(filePath) {
|
|
58311
57737
|
try {
|
|
58312
|
-
await
|
|
57738
|
+
await access(filePath);
|
|
58313
57739
|
return true;
|
|
58314
57740
|
} catch {
|
|
58315
57741
|
return false;
|
|
@@ -58318,8 +57744,8 @@ async function fileExists2(filePath) {
|
|
|
58318
57744
|
async function findAllVercelConfigFiles(workPath) {
|
|
58319
57745
|
const foundFiles = [];
|
|
58320
57746
|
for (const ext of VERCEL_CONFIG_EXTENSIONS) {
|
|
58321
|
-
const configPath =
|
|
58322
|
-
if (await
|
|
57747
|
+
const configPath = join10(workPath, `vercel.${ext}`);
|
|
57748
|
+
if (await fileExists(configPath)) {
|
|
58323
57749
|
foundFiles.push(configPath);
|
|
58324
57750
|
}
|
|
58325
57751
|
}
|
|
@@ -58327,14 +57753,14 @@ async function findAllVercelConfigFiles(workPath) {
|
|
|
58327
57753
|
}
|
|
58328
57754
|
async function findSourceVercelConfigFile(workPath) {
|
|
58329
57755
|
for (const ext of VERCEL_CONFIG_EXTENSIONS) {
|
|
58330
|
-
const configPath =
|
|
58331
|
-
if (await
|
|
57756
|
+
const configPath = join10(workPath, `vercel.${ext}`);
|
|
57757
|
+
if (await fileExists(configPath)) {
|
|
58332
57758
|
return basename3(configPath);
|
|
58333
57759
|
}
|
|
58334
57760
|
}
|
|
58335
57761
|
if (isVercelTomlEnabled()) {
|
|
58336
|
-
const tomlPath =
|
|
58337
|
-
if (await
|
|
57762
|
+
const tomlPath = join10(workPath, "vercel.toml");
|
|
57763
|
+
if (await fileExists(tomlPath)) {
|
|
58338
57764
|
return "vercel.toml";
|
|
58339
57765
|
}
|
|
58340
57766
|
}
|
|
@@ -58375,15 +57801,15 @@ function parseConfigLoaderError(stderr) {
|
|
|
58375
57801
|
return stderr.trim();
|
|
58376
57802
|
}
|
|
58377
57803
|
async function compileVercelConfig(workPath) {
|
|
58378
|
-
const vercelJsonPath =
|
|
58379
|
-
const nowJsonPath =
|
|
58380
|
-
const vercelTomlPath =
|
|
58381
|
-
const hasVercelJson = await
|
|
58382
|
-
const hasNowJson = await
|
|
58383
|
-
const hasVercelToml = isVercelTomlEnabled() && await
|
|
57804
|
+
const vercelJsonPath = join10(workPath, "vercel.json");
|
|
57805
|
+
const nowJsonPath = join10(workPath, "now.json");
|
|
57806
|
+
const vercelTomlPath = join10(workPath, "vercel.toml");
|
|
57807
|
+
const hasVercelJson = await fileExists(vercelJsonPath);
|
|
57808
|
+
const hasNowJson = await fileExists(nowJsonPath);
|
|
57809
|
+
const hasVercelToml = isVercelTomlEnabled() && await fileExists(vercelTomlPath);
|
|
58384
57810
|
const vercelConfigPath = await findVercelConfigFile(workPath);
|
|
58385
|
-
const vercelDir =
|
|
58386
|
-
const compiledConfigPath =
|
|
57811
|
+
const vercelDir = join10(workPath, VERCEL_DIR);
|
|
57812
|
+
const compiledConfigPath = join10(vercelDir, "vercel.json");
|
|
58387
57813
|
if (hasNowJson) {
|
|
58388
57814
|
throw new DeprecatedNowJson(nowJsonPath);
|
|
58389
57815
|
}
|
|
@@ -58408,7 +57834,7 @@ async function compileVercelConfig(workPath) {
|
|
|
58408
57834
|
wasCompiled: false
|
|
58409
57835
|
};
|
|
58410
57836
|
}
|
|
58411
|
-
if (await
|
|
57837
|
+
if (await fileExists(compiledConfigPath)) {
|
|
58412
57838
|
return {
|
|
58413
57839
|
configPath: compiledConfigPath,
|
|
58414
57840
|
wasCompiled: true,
|
|
@@ -58422,11 +57848,11 @@ async function compileVercelConfig(workPath) {
|
|
|
58422
57848
|
}
|
|
58423
57849
|
if (hasVercelToml) {
|
|
58424
57850
|
try {
|
|
58425
|
-
const tomlContent = await
|
|
57851
|
+
const tomlContent = await readFile5(vercelTomlPath, "utf8");
|
|
58426
57852
|
const config = tomlParse2(tomlContent);
|
|
58427
57853
|
const normalizedConfig = normalizeConfig(config);
|
|
58428
57854
|
await mkdir(vercelDir, { recursive: true });
|
|
58429
|
-
await
|
|
57855
|
+
await writeFile4(
|
|
58430
57856
|
compiledConfigPath,
|
|
58431
57857
|
JSON.stringify(normalizedConfig, null, 2),
|
|
58432
57858
|
"utf-8"
|
|
@@ -58446,10 +57872,10 @@ async function compileVercelConfig(workPath) {
|
|
|
58446
57872
|
}
|
|
58447
57873
|
}
|
|
58448
57874
|
const sourceConfigPath = vercelConfigPath;
|
|
58449
|
-
(0, import_dotenv.config)({ path:
|
|
58450
|
-
(0, import_dotenv.config)({ path:
|
|
58451
|
-
const tempOutPath =
|
|
58452
|
-
const loaderPath =
|
|
57875
|
+
(0, import_dotenv.config)({ path: join10(workPath, ".env") });
|
|
57876
|
+
(0, import_dotenv.config)({ path: join10(workPath, ".env.local") });
|
|
57877
|
+
const tempOutPath = join10(vercelDir, "vercel-temp.mjs");
|
|
57878
|
+
const loaderPath = join10(vercelDir, "vercel-loader.mjs");
|
|
58453
57879
|
try {
|
|
58454
57880
|
const { build } = await import("esbuild");
|
|
58455
57881
|
await mkdir(vercelDir, { recursive: true });
|
|
@@ -58469,8 +57895,8 @@ async function compileVercelConfig(workPath) {
|
|
|
58469
57895
|
const config = ('default' in configModule) ? configModule.default : ('config' in configModule) ? configModule.config : configModule;
|
|
58470
57896
|
process.send(config);
|
|
58471
57897
|
`;
|
|
58472
|
-
await
|
|
58473
|
-
const config = await new Promise((
|
|
57898
|
+
await writeFile4(loaderPath, loaderScript, "utf-8");
|
|
57899
|
+
const config = await new Promise((resolve4, reject) => {
|
|
58474
57900
|
const child = fork(loaderPath, [tempOutPath], {
|
|
58475
57901
|
stdio: ["pipe", "pipe", "pipe", "ipc"]
|
|
58476
57902
|
});
|
|
@@ -58493,7 +57919,7 @@ async function compileVercelConfig(workPath) {
|
|
|
58493
57919
|
child.on("message", (message) => {
|
|
58494
57920
|
clearTimeout(timeout);
|
|
58495
57921
|
child.kill();
|
|
58496
|
-
|
|
57922
|
+
resolve4(message);
|
|
58497
57923
|
});
|
|
58498
57924
|
child.on("error", (err) => {
|
|
58499
57925
|
clearTimeout(timeout);
|
|
@@ -58520,7 +57946,7 @@ async function compileVercelConfig(workPath) {
|
|
|
58520
57946
|
});
|
|
58521
57947
|
});
|
|
58522
57948
|
const normalizedConfig = normalizeConfig(config);
|
|
58523
|
-
await
|
|
57949
|
+
await writeFile4(
|
|
58524
57950
|
compiledConfigPath,
|
|
58525
57951
|
JSON.stringify(normalizedConfig, null, 2),
|
|
58526
57952
|
"utf-8"
|
|
@@ -58553,16 +57979,16 @@ async function compileVercelConfig(workPath) {
|
|
|
58553
57979
|
}
|
|
58554
57980
|
}
|
|
58555
57981
|
async function getVercelConfigPath(workPath) {
|
|
58556
|
-
const vercelJsonPath =
|
|
58557
|
-
const vercelTomlPath =
|
|
58558
|
-
const compiledConfigPath =
|
|
58559
|
-
if (await
|
|
57982
|
+
const vercelJsonPath = join10(workPath, "vercel.json");
|
|
57983
|
+
const vercelTomlPath = join10(workPath, "vercel.toml");
|
|
57984
|
+
const compiledConfigPath = join10(workPath, VERCEL_DIR, "vercel.json");
|
|
57985
|
+
if (await fileExists(vercelJsonPath)) {
|
|
58560
57986
|
return vercelJsonPath;
|
|
58561
57987
|
}
|
|
58562
|
-
if (isVercelTomlEnabled() && await
|
|
57988
|
+
if (isVercelTomlEnabled() && await fileExists(vercelTomlPath)) {
|
|
58563
57989
|
return vercelTomlPath;
|
|
58564
57990
|
}
|
|
58565
|
-
if (await
|
|
57991
|
+
if (await fileExists(compiledConfigPath)) {
|
|
58566
57992
|
return compiledConfigPath;
|
|
58567
57993
|
}
|
|
58568
57994
|
return vercelJsonPath;
|
|
@@ -58602,8 +58028,6 @@ export {
|
|
|
58602
58028
|
esm_default3,
|
|
58603
58029
|
ua_default,
|
|
58604
58030
|
require_open,
|
|
58605
|
-
autoInstallVercelPlugin,
|
|
58606
|
-
showPluginTipIfNeeded,
|
|
58607
58031
|
processTokenResponse,
|
|
58608
58032
|
revocationRequest,
|
|
58609
58033
|
processRevocationResponse,
|