vercel 44.2.13 → 44.3.0
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 +161 -93
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -860,7 +860,7 @@ var require_graceful_fs = __commonJS2({
|
|
|
860
860
|
}
|
|
861
861
|
function ReadStream$open() {
|
|
862
862
|
var that = this;
|
|
863
|
-
|
|
863
|
+
open7(that.path, that.flags, that.mode, function(err, fd) {
|
|
864
864
|
if (err) {
|
|
865
865
|
if (that.autoClose)
|
|
866
866
|
that.destroy();
|
|
@@ -880,7 +880,7 @@ var require_graceful_fs = __commonJS2({
|
|
|
880
880
|
}
|
|
881
881
|
function WriteStream$open() {
|
|
882
882
|
var that = this;
|
|
883
|
-
|
|
883
|
+
open7(that.path, that.flags, that.mode, function(err, fd) {
|
|
884
884
|
if (err) {
|
|
885
885
|
that.destroy();
|
|
886
886
|
that.emit("error", err);
|
|
@@ -897,8 +897,8 @@ var require_graceful_fs = __commonJS2({
|
|
|
897
897
|
return new fs16.WriteStream(path11, options);
|
|
898
898
|
}
|
|
899
899
|
var fs$open = fs16.open;
|
|
900
|
-
fs16.open =
|
|
901
|
-
function
|
|
900
|
+
fs16.open = open7;
|
|
901
|
+
function open7(path11, flags, mode, cb) {
|
|
902
902
|
if (typeof mode === "function")
|
|
903
903
|
cb = mode, mode = null;
|
|
904
904
|
return go$open(path11, flags, mode, cb);
|
|
@@ -2430,7 +2430,7 @@ var require_jsonfile = __commonJS2({
|
|
|
2430
2430
|
return obj;
|
|
2431
2431
|
}
|
|
2432
2432
|
var readFile6 = universalify.fromPromise(_readFile);
|
|
2433
|
-
function
|
|
2433
|
+
function readFileSync3(file, options = {}) {
|
|
2434
2434
|
if (typeof options === "string") {
|
|
2435
2435
|
options = { encoding: options };
|
|
2436
2436
|
}
|
|
@@ -2462,7 +2462,7 @@ var require_jsonfile = __commonJS2({
|
|
|
2462
2462
|
}
|
|
2463
2463
|
var jsonfile = {
|
|
2464
2464
|
readFile: readFile6,
|
|
2465
|
-
readFileSync:
|
|
2465
|
+
readFileSync: readFileSync3,
|
|
2466
2466
|
writeFile: writeFile4,
|
|
2467
2467
|
writeFileSync
|
|
2468
2468
|
};
|
|
@@ -4221,18 +4221,18 @@ var require_source = __commonJS2({
|
|
|
4221
4221
|
}
|
|
4222
4222
|
}
|
|
4223
4223
|
});
|
|
4224
|
-
var createStyler = (
|
|
4224
|
+
var createStyler = (open7, close2, parent) => {
|
|
4225
4225
|
let openAll;
|
|
4226
4226
|
let closeAll;
|
|
4227
4227
|
if (parent === void 0) {
|
|
4228
|
-
openAll =
|
|
4228
|
+
openAll = open7;
|
|
4229
4229
|
closeAll = close2;
|
|
4230
4230
|
} else {
|
|
4231
|
-
openAll = parent.openAll +
|
|
4231
|
+
openAll = parent.openAll + open7;
|
|
4232
4232
|
closeAll = close2 + parent.closeAll;
|
|
4233
4233
|
}
|
|
4234
4234
|
return {
|
|
4235
|
-
open:
|
|
4235
|
+
open: open7,
|
|
4236
4236
|
close: close2,
|
|
4237
4237
|
openAll,
|
|
4238
4238
|
closeAll,
|
|
@@ -7322,9 +7322,9 @@ var require_chalk = __commonJS2({
|
|
|
7322
7322
|
get() {
|
|
7323
7323
|
const level = this.level;
|
|
7324
7324
|
return function() {
|
|
7325
|
-
const
|
|
7325
|
+
const open7 = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
|
|
7326
7326
|
const codes = {
|
|
7327
|
-
open:
|
|
7327
|
+
open: open7,
|
|
7328
7328
|
close: ansiStyles.color.close,
|
|
7329
7329
|
closeRe: ansiStyles.color.closeRe
|
|
7330
7330
|
};
|
|
@@ -7343,9 +7343,9 @@ var require_chalk = __commonJS2({
|
|
|
7343
7343
|
get() {
|
|
7344
7344
|
const level = this.level;
|
|
7345
7345
|
return function() {
|
|
7346
|
-
const
|
|
7346
|
+
const open7 = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
|
|
7347
7347
|
const codes = {
|
|
7348
|
-
open:
|
|
7348
|
+
open: open7,
|
|
7349
7349
|
close: ansiStyles.bgColor.close,
|
|
7350
7350
|
closeRe: ansiStyles.bgColor.closeRe
|
|
7351
7351
|
};
|
|
@@ -34432,8 +34432,26 @@ var init_command35 = __esm({
|
|
|
34432
34432
|
required: false
|
|
34433
34433
|
}
|
|
34434
34434
|
],
|
|
34435
|
-
options: [
|
|
34436
|
-
|
|
34435
|
+
options: [
|
|
34436
|
+
{
|
|
34437
|
+
name: "region",
|
|
34438
|
+
shorthand: "r",
|
|
34439
|
+
type: String,
|
|
34440
|
+
deprecated: false,
|
|
34441
|
+
description: 'Region to create the Blob store in (default: "iad1"). See https://vercel.com/docs/edge-network/regions#region-list for all available regions',
|
|
34442
|
+
argument: "STRING"
|
|
34443
|
+
}
|
|
34444
|
+
],
|
|
34445
|
+
examples: [
|
|
34446
|
+
{
|
|
34447
|
+
name: 'Create a blob store (uses default region "iad1")',
|
|
34448
|
+
value: "vercel blob store add my-store"
|
|
34449
|
+
},
|
|
34450
|
+
{
|
|
34451
|
+
name: "Create a blob store in a specific region",
|
|
34452
|
+
value: "vercel blob store add my-store --region cdg1"
|
|
34453
|
+
}
|
|
34454
|
+
]
|
|
34437
34455
|
};
|
|
34438
34456
|
removeStoreSubcommand = {
|
|
34439
34457
|
name: "remove",
|
|
@@ -36041,18 +36059,18 @@ var require_source2 = __commonJS2({
|
|
|
36041
36059
|
}
|
|
36042
36060
|
}
|
|
36043
36061
|
});
|
|
36044
|
-
var createStyler = (
|
|
36062
|
+
var createStyler = (open7, close2, parent) => {
|
|
36045
36063
|
let openAll;
|
|
36046
36064
|
let closeAll;
|
|
36047
36065
|
if (parent === void 0) {
|
|
36048
|
-
openAll =
|
|
36066
|
+
openAll = open7;
|
|
36049
36067
|
closeAll = close2;
|
|
36050
36068
|
} else {
|
|
36051
|
-
openAll = parent.openAll +
|
|
36069
|
+
openAll = parent.openAll + open7;
|
|
36052
36070
|
closeAll = close2 + parent.closeAll;
|
|
36053
36071
|
}
|
|
36054
36072
|
return {
|
|
36055
|
-
open:
|
|
36073
|
+
open: open7,
|
|
36056
36074
|
close: close2,
|
|
36057
36075
|
openAll,
|
|
36058
36076
|
closeAll,
|
|
@@ -41711,7 +41729,7 @@ var require_open = __commonJS2({
|
|
|
41711
41729
|
subprocess.unref();
|
|
41712
41730
|
return subprocess;
|
|
41713
41731
|
};
|
|
41714
|
-
var
|
|
41732
|
+
var open7 = (target, options) => {
|
|
41715
41733
|
if (typeof target !== "string") {
|
|
41716
41734
|
throw new TypeError("Expected a `target`");
|
|
41717
41735
|
}
|
|
@@ -41780,9 +41798,9 @@ var require_open = __commonJS2({
|
|
|
41780
41798
|
}, {
|
|
41781
41799
|
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
41782
41800
|
}));
|
|
41783
|
-
|
|
41784
|
-
|
|
41785
|
-
module2.exports =
|
|
41801
|
+
open7.apps = apps;
|
|
41802
|
+
open7.openApp = openApp;
|
|
41803
|
+
module2.exports = open7;
|
|
41786
41804
|
}
|
|
41787
41805
|
});
|
|
41788
41806
|
|
|
@@ -45668,7 +45686,7 @@ var require_jsonfile3 = __commonJS2({
|
|
|
45668
45686
|
callback(null, obj);
|
|
45669
45687
|
});
|
|
45670
45688
|
}
|
|
45671
|
-
function
|
|
45689
|
+
function readFileSync3(file, options) {
|
|
45672
45690
|
options = options || {};
|
|
45673
45691
|
if (typeof options === "string") {
|
|
45674
45692
|
options = { encoding: options };
|
|
@@ -45736,7 +45754,7 @@ var require_jsonfile3 = __commonJS2({
|
|
|
45736
45754
|
}
|
|
45737
45755
|
var jsonfile = {
|
|
45738
45756
|
readFile: readFile6,
|
|
45739
|
-
readFileSync:
|
|
45757
|
+
readFileSync: readFileSync3,
|
|
45740
45758
|
writeFile: writeFile4,
|
|
45741
45759
|
writeFileSync
|
|
45742
45760
|
};
|
|
@@ -49673,9 +49691,9 @@ var require_is_glob = __commonJS2({
|
|
|
49673
49691
|
}
|
|
49674
49692
|
}
|
|
49675
49693
|
if (str[index] === "\\") {
|
|
49676
|
-
var
|
|
49694
|
+
var open7 = str[index + 1];
|
|
49677
49695
|
index += 2;
|
|
49678
|
-
var close2 = chars2[
|
|
49696
|
+
var close2 = chars2[open7];
|
|
49679
49697
|
if (close2) {
|
|
49680
49698
|
var n = str.indexOf(close2, index);
|
|
49681
49699
|
if (n !== -1) {
|
|
@@ -49701,9 +49719,9 @@ var require_is_glob = __commonJS2({
|
|
|
49701
49719
|
return true;
|
|
49702
49720
|
}
|
|
49703
49721
|
if (str[index] === "\\") {
|
|
49704
|
-
var
|
|
49722
|
+
var open7 = str[index + 1];
|
|
49705
49723
|
index += 2;
|
|
49706
|
-
var close2 = chars2[
|
|
49724
|
+
var close2 = chars2[open7];
|
|
49707
49725
|
if (close2) {
|
|
49708
49726
|
var n = str.indexOf(close2, index);
|
|
49709
49727
|
if (n !== -1) {
|
|
@@ -50691,7 +50709,7 @@ var require_parse2 = __commonJS2({
|
|
|
50691
50709
|
continue;
|
|
50692
50710
|
}
|
|
50693
50711
|
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
50694
|
-
const
|
|
50712
|
+
const open7 = value;
|
|
50695
50713
|
let next;
|
|
50696
50714
|
if (options.keepQuotes !== true) {
|
|
50697
50715
|
value = "";
|
|
@@ -50701,7 +50719,7 @@ var require_parse2 = __commonJS2({
|
|
|
50701
50719
|
value += next + advance();
|
|
50702
50720
|
continue;
|
|
50703
50721
|
}
|
|
50704
|
-
if (next ===
|
|
50722
|
+
if (next === open7) {
|
|
50705
50723
|
if (options.keepQuotes === true)
|
|
50706
50724
|
value += next;
|
|
50707
50725
|
break;
|
|
@@ -50745,8 +50763,8 @@ var require_parse2 = __commonJS2({
|
|
|
50745
50763
|
if (value === CHAR_COMMA2 && depth > 0) {
|
|
50746
50764
|
if (block.ranges > 0) {
|
|
50747
50765
|
block.ranges = 0;
|
|
50748
|
-
const
|
|
50749
|
-
block.nodes = [
|
|
50766
|
+
const open7 = block.nodes.shift();
|
|
50767
|
+
block.nodes = [open7, { type: "text", value: stringify3(block) }];
|
|
50750
50768
|
}
|
|
50751
50769
|
push({ type: "comma", value });
|
|
50752
50770
|
block.commas++;
|
|
@@ -51849,15 +51867,15 @@ var require_parse3 = __commonJS2({
|
|
|
51849
51867
|
}
|
|
51850
51868
|
if (value === "{" && opts.nobrace !== true) {
|
|
51851
51869
|
increment("braces");
|
|
51852
|
-
const
|
|
51870
|
+
const open7 = {
|
|
51853
51871
|
type: "brace",
|
|
51854
51872
|
value,
|
|
51855
51873
|
output: "(",
|
|
51856
51874
|
outputIndex: state.output.length,
|
|
51857
51875
|
tokensIndex: state.tokens.length
|
|
51858
51876
|
};
|
|
51859
|
-
braces.push(
|
|
51860
|
-
push(
|
|
51877
|
+
braces.push(open7);
|
|
51878
|
+
push(open7);
|
|
51861
51879
|
continue;
|
|
51862
51880
|
}
|
|
51863
51881
|
if (value === "}") {
|
|
@@ -100267,8 +100285,8 @@ var init_bisect = __esm({
|
|
|
100267
100285
|
});
|
|
100268
100286
|
}
|
|
100269
100287
|
}
|
|
100270
|
-
trackCliFlagOpen(
|
|
100271
|
-
if (
|
|
100288
|
+
trackCliFlagOpen(open7) {
|
|
100289
|
+
if (open7) {
|
|
100272
100290
|
this.trackCliFlag("open");
|
|
100273
100291
|
}
|
|
100274
100292
|
}
|
|
@@ -100792,6 +100810,12 @@ var init_put = __esm({
|
|
|
100792
100810
|
});
|
|
100793
100811
|
}
|
|
100794
100812
|
}
|
|
100813
|
+
trackCliInputSourceStdin() {
|
|
100814
|
+
this.trackCliArgument({
|
|
100815
|
+
arg: "pathToFile",
|
|
100816
|
+
value: "__vercel_stdin__"
|
|
100817
|
+
});
|
|
100818
|
+
}
|
|
100795
100819
|
trackCliFlagAddRandomSuffix(addRandomSuffix) {
|
|
100796
100820
|
if (addRandomSuffix) {
|
|
100797
100821
|
this.trackCliFlag("add-random-suffix");
|
|
@@ -100850,12 +100874,6 @@ async function put2(client2, argv, rwToken) {
|
|
|
100850
100874
|
printError(err);
|
|
100851
100875
|
return 1;
|
|
100852
100876
|
}
|
|
100853
|
-
if (!parsedArgs.args.length) {
|
|
100854
|
-
printError(
|
|
100855
|
-
`Missing required arguments: ${getCommandName("blob put pathToFile")}`
|
|
100856
|
-
);
|
|
100857
|
-
return 1;
|
|
100858
|
-
}
|
|
100859
100877
|
const {
|
|
100860
100878
|
flags,
|
|
100861
100879
|
args: [filePath]
|
|
@@ -100868,7 +100886,9 @@ async function put2(client2, argv, rwToken) {
|
|
|
100868
100886
|
"--cache-control-max-age": cacheControlMaxAge,
|
|
100869
100887
|
"--force": force
|
|
100870
100888
|
} = flags;
|
|
100871
|
-
|
|
100889
|
+
if (filePath) {
|
|
100890
|
+
telemetryClient.trackCliArgumentPathToFile(filePath);
|
|
100891
|
+
}
|
|
100872
100892
|
telemetryClient.trackCliFlagAddRandomSuffix(addRandomSuffix);
|
|
100873
100893
|
telemetryClient.trackCliOptionPathname(pathnameFlag);
|
|
100874
100894
|
telemetryClient.trackCliFlagMultipart(multipart);
|
|
@@ -100877,29 +100897,54 @@ async function put2(client2, argv, rwToken) {
|
|
|
100877
100897
|
telemetryClient.trackCliFlagForce(force);
|
|
100878
100898
|
let putBody;
|
|
100879
100899
|
let pathname;
|
|
100880
|
-
|
|
100881
|
-
|
|
100882
|
-
|
|
100883
|
-
|
|
100884
|
-
|
|
100885
|
-
|
|
100886
|
-
|
|
100887
|
-
output_manager_default.error("Path to upload is not a file");
|
|
100900
|
+
if (!filePath) {
|
|
100901
|
+
if (client2.stdin.isTTY) {
|
|
100902
|
+
output_manager_default.error(
|
|
100903
|
+
`Missing input. Usage: ${import_chalk35.default.cyan(
|
|
100904
|
+
`${getCommandName("blob put <file>")}`
|
|
100905
|
+
)} or pipe data: ${import_chalk35.default.cyan("cat file.txt | vercel blob put --pathname <pathname>")}`
|
|
100906
|
+
);
|
|
100888
100907
|
return 1;
|
|
100889
100908
|
}
|
|
100890
|
-
|
|
100891
|
-
|
|
100892
|
-
|
|
100893
|
-
|
|
100909
|
+
if (!pathnameFlag) {
|
|
100910
|
+
output_manager_default.error(
|
|
100911
|
+
`Missing pathname. When reading from stdin, you must specify --pathname. Usage: ${import_chalk35.default.cyan(
|
|
100912
|
+
"cat file.txt | vercel blob put --pathname <pathname>"
|
|
100913
|
+
)}`
|
|
100914
|
+
);
|
|
100915
|
+
return 1;
|
|
100916
|
+
}
|
|
100917
|
+
putBody = process.stdin;
|
|
100918
|
+
pathname = pathnameFlag;
|
|
100919
|
+
telemetryClient.trackCliInputSourceStdin();
|
|
100920
|
+
} else {
|
|
100921
|
+
try {
|
|
100922
|
+
const stats = (0, import_node_fs2.statSync)(filePath);
|
|
100923
|
+
const isFile2 = stats.isFile();
|
|
100924
|
+
if (isFile2) {
|
|
100925
|
+
const file = await (0, import_promises2.open)(filePath, "r");
|
|
100926
|
+
putBody = file.createReadStream();
|
|
100927
|
+
pathname = pathnameFlag ?? (0, import_node_path.basename)(filePath);
|
|
100928
|
+
} else {
|
|
100929
|
+
output_manager_default.error("Path to upload is not a file");
|
|
100930
|
+
return 1;
|
|
100931
|
+
}
|
|
100932
|
+
} catch (err) {
|
|
100933
|
+
output_manager_default.debug(`Error reading file: ${err}`);
|
|
100934
|
+
if ((0, import_error_utils12.isErrnoException)(err)) {
|
|
100935
|
+
output_manager_default.error(`File doesn't exist at '${filePath}'`);
|
|
100936
|
+
return 1;
|
|
100937
|
+
}
|
|
100938
|
+
output_manager_default.error("Error while reading file");
|
|
100894
100939
|
return 1;
|
|
100895
100940
|
}
|
|
100896
|
-
output_manager_default.error("Error while reading file");
|
|
100897
|
-
return 1;
|
|
100898
100941
|
}
|
|
100899
100942
|
if (!pathname || !putBody) {
|
|
100900
100943
|
output_manager_default.error(
|
|
100901
|
-
`Missing pathname or
|
|
100902
|
-
`${getCommandName("blob put <file>
|
|
100944
|
+
`Missing pathname or input. Usage: ${import_chalk35.default.cyan(
|
|
100945
|
+
`${getCommandName("blob put <file>")}`
|
|
100946
|
+
)} or ${import_chalk35.default.cyan(
|
|
100947
|
+
`cat file.txt | ${getCommandName("blob put --pathname <pathname>")}`
|
|
100903
100948
|
)}`
|
|
100904
100949
|
);
|
|
100905
100950
|
return 1;
|
|
@@ -100925,7 +100970,7 @@ async function put2(client2, argv, rwToken) {
|
|
|
100925
100970
|
output_manager_default.success(result.url);
|
|
100926
100971
|
return 0;
|
|
100927
100972
|
}
|
|
100928
|
-
var blob2, import_node_fs2, import_error_utils12, import_node_path, import_chalk35;
|
|
100973
|
+
var blob2, import_node_fs2, import_promises2, import_error_utils12, import_node_path, import_chalk35;
|
|
100929
100974
|
var init_put2 = __esm({
|
|
100930
100975
|
"src/commands/blob/put.ts"() {
|
|
100931
100976
|
"use strict";
|
|
@@ -100935,6 +100980,7 @@ var init_put2 = __esm({
|
|
|
100935
100980
|
init_get_flags_specification();
|
|
100936
100981
|
init_command35();
|
|
100937
100982
|
import_node_fs2 = require("fs");
|
|
100983
|
+
import_promises2 = require("fs/promises");
|
|
100938
100984
|
import_error_utils12 = __toESM3(require_dist2());
|
|
100939
100985
|
import_node_path = require("path");
|
|
100940
100986
|
init_pkg_name();
|
|
@@ -116284,7 +116330,7 @@ var require_frameworks = __commonJS2({
|
|
|
116284
116330
|
}
|
|
116285
116331
|
},
|
|
116286
116332
|
dependency: "nitropack",
|
|
116287
|
-
getOutputDirName: () =>
|
|
116333
|
+
getOutputDirName: async () => "public"
|
|
116288
116334
|
},
|
|
116289
116335
|
{
|
|
116290
116336
|
name: "Other",
|
|
@@ -119663,7 +119709,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
|
119663
119709
|
LocalFileSystemDetector: () => LocalFileSystemDetector5
|
|
119664
119710
|
});
|
|
119665
119711
|
module2.exports = __toCommonJS4(local_file_system_detector_exports);
|
|
119666
|
-
var
|
|
119712
|
+
var import_promises5 = __toESM4(require("fs/promises"));
|
|
119667
119713
|
var import_path41 = require("path");
|
|
119668
119714
|
var import_filesystem = require_filesystem();
|
|
119669
119715
|
var import_error_utils39 = require_dist2();
|
|
@@ -119674,7 +119720,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
|
119674
119720
|
}
|
|
119675
119721
|
async _hasPath(name) {
|
|
119676
119722
|
try {
|
|
119677
|
-
await
|
|
119723
|
+
await import_promises5.default.stat(this.getFilePath(name));
|
|
119678
119724
|
return true;
|
|
119679
119725
|
} catch (err) {
|
|
119680
119726
|
if ((0, import_error_utils39.isErrnoException)(err) && err.code === "ENOENT") {
|
|
@@ -119684,15 +119730,15 @@ var require_local_file_system_detector = __commonJS2({
|
|
|
119684
119730
|
}
|
|
119685
119731
|
}
|
|
119686
119732
|
_readFile(name) {
|
|
119687
|
-
return
|
|
119733
|
+
return import_promises5.default.readFile(this.getFilePath(name));
|
|
119688
119734
|
}
|
|
119689
119735
|
async _isFile(name) {
|
|
119690
|
-
const stat2 = await
|
|
119736
|
+
const stat2 = await import_promises5.default.stat(this.getFilePath(name));
|
|
119691
119737
|
return stat2.isFile();
|
|
119692
119738
|
}
|
|
119693
119739
|
async _readdir(dir) {
|
|
119694
119740
|
const dirPath = this.getFilePath(dir);
|
|
119695
|
-
const entries = await
|
|
119741
|
+
const entries = await import_promises5.default.readdir(dirPath, { withFileTypes: true });
|
|
119696
119742
|
const result = [];
|
|
119697
119743
|
for (const entry of entries) {
|
|
119698
119744
|
let type;
|
|
@@ -126861,6 +126907,14 @@ var init_store_add = __esm({
|
|
|
126861
126907
|
});
|
|
126862
126908
|
}
|
|
126863
126909
|
}
|
|
126910
|
+
trackCliOptionRegion(value) {
|
|
126911
|
+
if (value) {
|
|
126912
|
+
this.trackCliOption({
|
|
126913
|
+
option: "region",
|
|
126914
|
+
value: this.redactedValue
|
|
126915
|
+
});
|
|
126916
|
+
}
|
|
126917
|
+
}
|
|
126864
126918
|
};
|
|
126865
126919
|
}
|
|
126866
126920
|
});
|
|
@@ -126880,9 +126934,12 @@ async function addStore(client2, argv) {
|
|
|
126880
126934
|
printError(err);
|
|
126881
126935
|
return 1;
|
|
126882
126936
|
}
|
|
126883
|
-
|
|
126884
|
-
args: [
|
|
126937
|
+
const {
|
|
126938
|
+
args: [nameArg],
|
|
126939
|
+
flags
|
|
126885
126940
|
} = parsedArgs;
|
|
126941
|
+
const region = flags["--region"] || "iad1";
|
|
126942
|
+
let name = nameArg;
|
|
126886
126943
|
if (!name) {
|
|
126887
126944
|
name = await client2.input.text({
|
|
126888
126945
|
message: "Enter a name for your blob store",
|
|
@@ -126895,27 +126952,35 @@ async function addStore(client2, argv) {
|
|
|
126895
126952
|
});
|
|
126896
126953
|
}
|
|
126897
126954
|
telemetryClient.trackCliArgumentName(name);
|
|
126955
|
+
telemetryClient.trackCliOptionRegion(flags["--region"]);
|
|
126898
126956
|
const link4 = await getLinkedProject(client2);
|
|
126899
126957
|
let storeId;
|
|
126958
|
+
let storeRegion;
|
|
126900
126959
|
try {
|
|
126901
126960
|
output_manager_default.debug("Creating new blob store");
|
|
126902
126961
|
output_manager_default.spinner("Creating new blob store");
|
|
126962
|
+
const requestBody = {
|
|
126963
|
+
name,
|
|
126964
|
+
region
|
|
126965
|
+
};
|
|
126903
126966
|
const res = await client2.fetch(
|
|
126904
126967
|
"/v1/storage/stores/blob",
|
|
126905
126968
|
{
|
|
126906
126969
|
method: "POST",
|
|
126907
126970
|
headers: { "Content-Type": "application/json" },
|
|
126908
|
-
body: JSON.stringify(
|
|
126971
|
+
body: JSON.stringify(requestBody),
|
|
126909
126972
|
accountId: link4.status === "linked" ? link4.org.id : void 0
|
|
126910
126973
|
}
|
|
126911
126974
|
);
|
|
126912
126975
|
storeId = res.store.id;
|
|
126976
|
+
storeRegion = res.store.region;
|
|
126913
126977
|
} catch (err) {
|
|
126914
126978
|
printError(err);
|
|
126915
126979
|
return 1;
|
|
126916
126980
|
}
|
|
126917
126981
|
output_manager_default.stopSpinner();
|
|
126918
|
-
|
|
126982
|
+
const regionInfo = storeRegion ? ` in ${storeRegion}` : "";
|
|
126983
|
+
output_manager_default.success(`Blob store created: ${name} (${storeId})${regionInfo}`);
|
|
126919
126984
|
if (link4.status === "linked") {
|
|
126920
126985
|
const res = await client2.input.confirm(
|
|
126921
126986
|
`Would you like to link this blob store to ${link4.project.name}?`,
|
|
@@ -129404,9 +129469,10 @@ async function getStore2(client2, argv, rwToken) {
|
|
|
129404
129469
|
printError(err);
|
|
129405
129470
|
return 1;
|
|
129406
129471
|
}
|
|
129407
|
-
|
|
129408
|
-
args: [
|
|
129472
|
+
const {
|
|
129473
|
+
args: [storeIdArg]
|
|
129409
129474
|
} = parsedArgs;
|
|
129475
|
+
let storeId = storeIdArg;
|
|
129410
129476
|
if (!storeId && rwToken.success) {
|
|
129411
129477
|
const [, , , id] = rwToken.token.split("_");
|
|
129412
129478
|
storeId = `store_${id}`;
|
|
@@ -129432,10 +129498,12 @@ async function getStore2(client2, argv, rwToken) {
|
|
|
129432
129498
|
accountId: link4.status === "linked" ? link4.org.id : void 0
|
|
129433
129499
|
});
|
|
129434
129500
|
const dateTimeFormat3 = "MM/DD/YYYY HH:mm:ss.SS";
|
|
129501
|
+
const regionInfo = store2.store.region ? `
|
|
129502
|
+
Region: ${store2.store.region}` : "";
|
|
129435
129503
|
output_manager_default.print(
|
|
129436
129504
|
`Blob Store: ${import_chalk40.default.bold(store2.store.name)} (${import_chalk40.default.dim(store2.store.id)})
|
|
129437
129505
|
Billing State: ${store2.store.billingState === "active" ? import_chalk40.default.green("Active") : import_chalk40.default.red("Inactive")}
|
|
129438
|
-
Size: ${(0, import_bytes3.default)(store2.store.size)}
|
|
129506
|
+
Size: ${(0, import_bytes3.default)(store2.store.size)}${regionInfo}
|
|
129439
129507
|
Created At: ${(0, import_date_fns.format)(new Date(store2.store.createdAt), dateTimeFormat3)}
|
|
129440
129508
|
Updated At: ${(0, import_date_fns.format)(new Date(store2.store.updatedAt), dateTimeFormat3)}
|
|
129441
129509
|
`
|
|
@@ -130032,8 +130100,8 @@ var require_dist21 = __commonJS2({
|
|
|
130032
130100
|
result.push(path11);
|
|
130033
130101
|
path11 = "";
|
|
130034
130102
|
}
|
|
130035
|
-
var
|
|
130036
|
-
if (
|
|
130103
|
+
var open7 = tryConsume("OPEN");
|
|
130104
|
+
if (open7) {
|
|
130037
130105
|
var prefix = consumeText();
|
|
130038
130106
|
var name_1 = tryConsume("NAME") || "";
|
|
130039
130107
|
var pattern_1 = tryConsume("PATTERN") || "";
|
|
@@ -130420,8 +130488,8 @@ var require_dist22 = __commonJS2({
|
|
|
130420
130488
|
result.push(path11);
|
|
130421
130489
|
path11 = "";
|
|
130422
130490
|
}
|
|
130423
|
-
var
|
|
130424
|
-
if (
|
|
130491
|
+
var open7 = tryConsume("OPEN");
|
|
130492
|
+
if (open7) {
|
|
130425
130493
|
var prefix = consumeText();
|
|
130426
130494
|
var name_1 = tryConsume("NAME") || "";
|
|
130427
130495
|
var pattern_1 = tryConsume("PATTERN") || "";
|
|
@@ -142220,7 +142288,7 @@ var require_yauzl = __commonJS2({
|
|
|
142220
142288
|
var Transform = require("stream").Transform;
|
|
142221
142289
|
var PassThrough = require("stream").PassThrough;
|
|
142222
142290
|
var Writable = require("stream").Writable;
|
|
142223
|
-
exports2.open =
|
|
142291
|
+
exports2.open = open7;
|
|
142224
142292
|
exports2.fromFd = fromFd;
|
|
142225
142293
|
exports2.fromBuffer = fromBuffer;
|
|
142226
142294
|
exports2.fromRandomAccessReader = fromRandomAccessReader;
|
|
@@ -142229,7 +142297,7 @@ var require_yauzl = __commonJS2({
|
|
|
142229
142297
|
exports2.ZipFile = ZipFile;
|
|
142230
142298
|
exports2.Entry = Entry;
|
|
142231
142299
|
exports2.RandomAccessReader = RandomAccessReader;
|
|
142232
|
-
function
|
|
142300
|
+
function open7(path11, options, callback) {
|
|
142233
142301
|
if (typeof options === "function") {
|
|
142234
142302
|
callback = options;
|
|
142235
142303
|
options = null;
|
|
@@ -145574,8 +145642,8 @@ async function main3(client2) {
|
|
|
145574
145642
|
} finally {
|
|
145575
145643
|
try {
|
|
145576
145644
|
const diagnosticsOutputPath = (0, import_path27.join)(outputDir, "diagnostics");
|
|
145577
|
-
await (0,
|
|
145578
|
-
await (0,
|
|
145645
|
+
await (0, import_promises3.mkdir)(diagnosticsOutputPath, { recursive: true });
|
|
145646
|
+
await (0, import_promises3.writeFile)(
|
|
145579
145647
|
(0, import_path27.join)(diagnosticsOutputPath, "cli_traces.json"),
|
|
145580
145648
|
JSON.stringify(reporter.events)
|
|
145581
145649
|
);
|
|
@@ -146071,7 +146139,7 @@ async function getFrameworkRoutes(framework, dirPrefix) {
|
|
|
146071
146139
|
}
|
|
146072
146140
|
return routes2;
|
|
146073
146141
|
}
|
|
146074
|
-
var import_chalk51, import_dotenv, import_fs_extra18, import_minimatch2, import_path27, import_semver3, import_build_utils13, import_client6, import_frameworks5, import_fs_detectors4, import_routing_utils2,
|
|
146142
|
+
var import_chalk51, import_dotenv, import_fs_extra18, import_minimatch2, import_path27, import_semver3, import_build_utils13, import_client6, import_frameworks5, import_fs_detectors4, import_routing_utils2, import_promises3, InMemoryReporter;
|
|
146075
146143
|
var init_build2 = __esm({
|
|
146076
146144
|
"src/commands/build/index.ts"() {
|
|
146077
146145
|
"use strict";
|
|
@@ -146112,7 +146180,7 @@ var init_build2 = __esm({
|
|
|
146112
146180
|
init_help();
|
|
146113
146181
|
init_pull4();
|
|
146114
146182
|
init_command3();
|
|
146115
|
-
|
|
146183
|
+
import_promises3 = require("fs/promises");
|
|
146116
146184
|
InMemoryReporter = class {
|
|
146117
146185
|
constructor() {
|
|
146118
146186
|
this.events = [];
|
|
@@ -168972,7 +169040,7 @@ async function* refreshOidcToken(signal, client2, projectId, envValues, source,
|
|
|
168972
169040
|
`${VERCEL_OIDC_TOKEN} expires in ${expiresAfterSecs}s; refreshing in ${refreshAfterSecs}s`
|
|
168973
169041
|
);
|
|
168974
169042
|
}
|
|
168975
|
-
await (0,
|
|
169043
|
+
await (0, import_promises4.setTimeout)(refreshAfterMillis, void 0, { signal });
|
|
168976
169044
|
const envValuesOrNull = await pullEnvValuesUntilSuccessful(
|
|
168977
169045
|
signal,
|
|
168978
169046
|
client2,
|
|
@@ -168994,7 +169062,7 @@ async function pullEnvValuesUntilSuccessful(signal, client2, projectId, source,
|
|
|
168994
169062
|
output_manager_default.debug(
|
|
168995
169063
|
`Failed to pull environment; trying again in ${Math.round(millisToSecs(millis))}s`
|
|
168996
169064
|
);
|
|
168997
|
-
await (0,
|
|
169065
|
+
await (0, import_promises4.setTimeout)(millis, void 0, { signal });
|
|
168998
169066
|
}
|
|
168999
169067
|
}
|
|
169000
169068
|
return null;
|
|
@@ -169005,11 +169073,11 @@ function clock() {
|
|
|
169005
169073
|
function millisToSecs(millis) {
|
|
169006
169074
|
return millis / 1e3;
|
|
169007
169075
|
}
|
|
169008
|
-
var
|
|
169076
|
+
var import_promises4, import_jose2, import_ms15, import_perf_hooks, REFRESH_BEFORE_EXPIRY_MILLIS, THROTTLE_MILLIS;
|
|
169009
169077
|
var init_refresh_oidc_token = __esm({
|
|
169010
169078
|
"src/util/env/refresh-oidc-token.ts"() {
|
|
169011
169079
|
"use strict";
|
|
169012
|
-
|
|
169080
|
+
import_promises4 = require("timers/promises");
|
|
169013
169081
|
import_jose2 = require("jose");
|
|
169014
169082
|
import_ms15 = __toESM3(require_ms());
|
|
169015
169083
|
import_perf_hooks = require("perf_hooks");
|
|
@@ -178435,7 +178503,7 @@ async function login2(client2) {
|
|
|
178435
178503
|
${import_chalk106.default.grey("Press [ENTER] to open the browser")}
|
|
178436
178504
|
`,
|
|
178437
178505
|
() => {
|
|
178438
|
-
|
|
178506
|
+
open6.default(verification_uri_complete);
|
|
178439
178507
|
output_manager_default.print((0, import_ansi_escapes6.eraseLines)(2));
|
|
178440
178508
|
output_manager_default.spinner("Waiting for authentication...");
|
|
178441
178509
|
rl.close();
|
|
@@ -178526,13 +178594,13 @@ async function login2(client2) {
|
|
|
178526
178594
|
printError(error3);
|
|
178527
178595
|
return 1;
|
|
178528
178596
|
}
|
|
178529
|
-
var import_node_readline, import_chalk106,
|
|
178597
|
+
var import_node_readline, import_chalk106, open6, import_ansi_escapes6;
|
|
178530
178598
|
var init_future = __esm({
|
|
178531
178599
|
"src/commands/login/future.ts"() {
|
|
178532
178600
|
"use strict";
|
|
178533
178601
|
import_node_readline = __toESM3(require("readline"));
|
|
178534
178602
|
import_chalk106 = __toESM3(require_source());
|
|
178535
|
-
|
|
178603
|
+
open6 = __toESM3(require_open());
|
|
178536
178604
|
import_ansi_escapes6 = __toESM3(require_ansi_escapes());
|
|
178537
178605
|
init_error2();
|
|
178538
178606
|
init_update_current_team_after_login();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vercel",
|
|
3
|
-
"version": "44.
|
|
3
|
+
"version": "44.3.0",
|
|
4
4
|
"preferGlobal": true,
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "The command-line interface for Vercel",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"@types/yauzl-promise": "2.1.0",
|
|
82
82
|
"@vercel/client": "15.3.10",
|
|
83
83
|
"@vercel/error-utils": "2.0.3",
|
|
84
|
-
"@vercel/frameworks": "3.7.
|
|
85
|
-
"@vercel/fs-detectors": "5.4.
|
|
84
|
+
"@vercel/frameworks": "3.7.1",
|
|
85
|
+
"@vercel/fs-detectors": "5.4.7",
|
|
86
86
|
"@vercel/routing-utils": "5.1.0",
|
|
87
87
|
"@vitest/expect": "2.1.3",
|
|
88
88
|
"ajv": "6.12.3",
|