vercel 44.5.5 → 44.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +176 -43
  2. package/package.json +9 -8
package/dist/index.js CHANGED
@@ -2533,11 +2533,11 @@ var require_output_json = __commonJS2({
2533
2533
  "use strict";
2534
2534
  var { stringify: stringify3 } = require_utils2();
2535
2535
  var { outputFile: outputFile2 } = require_output();
2536
- async function outputJson(file, data, options = {}) {
2536
+ async function outputJson2(file, data, options = {}) {
2537
2537
  const str = stringify3(data, options);
2538
2538
  await outputFile2(file, str, options);
2539
2539
  }
2540
- module2.exports = outputJson;
2540
+ module2.exports = outputJson2;
2541
2541
  }
2542
2542
  });
2543
2543
 
@@ -33517,6 +33517,13 @@ var init_command24 = __esm({
33517
33517
  arguments: [],
33518
33518
  options: [
33519
33519
  nextOption,
33520
+ {
33521
+ name: "json",
33522
+ shorthand: null,
33523
+ type: Boolean,
33524
+ deprecated: false,
33525
+ description: "Output in JSON format"
33526
+ },
33520
33527
  {
33521
33528
  name: "update-required",
33522
33529
  description: "A list of projects affected by an upcoming deprecation",
@@ -33529,6 +33536,10 @@ var init_command24 = __esm({
33529
33536
  {
33530
33537
  name: "Paginate projects, where `1584722256178` is the time in milliseconds since the UNIX epoch",
33531
33538
  value: `${packageName} project ls --next 1584722256178`
33539
+ },
33540
+ {
33541
+ name: "List projects using a deprecated Node.js version in JSON format",
33542
+ value: `${packageName} project ls --update-required --json`
33532
33543
  }
33533
33544
  ]
33534
33545
  };
@@ -45804,7 +45815,7 @@ var require_output_json2 = __commonJS2({
45804
45815
  var mkdir3 = require_mkdirs3();
45805
45816
  var pathExists = require_path_exists2().pathExists;
45806
45817
  var jsonFile = require_jsonfile4();
45807
- function outputJson(file, data, options, callback) {
45818
+ function outputJson2(file, data, options, callback) {
45808
45819
  if (typeof options === "function") {
45809
45820
  callback = options;
45810
45821
  options = {};
@@ -45822,7 +45833,7 @@ var require_output_json2 = __commonJS2({
45822
45833
  });
45823
45834
  });
45824
45835
  }
45825
- module2.exports = outputJson;
45836
+ module2.exports = outputJson2;
45826
45837
  }
45827
45838
  });
45828
45839
 
@@ -46890,7 +46901,7 @@ var require_package = __commonJS2({
46890
46901
  "../client/package.json"(exports2, module2) {
46891
46902
  module2.exports = {
46892
46903
  name: "@vercel/client",
46893
- version: "15.3.12",
46904
+ version: "15.3.13",
46894
46905
  main: "dist/index.js",
46895
46906
  typings: "dist/index.d.ts",
46896
46907
  homepage: "https://vercel.com",
@@ -46929,7 +46940,7 @@ var require_package = __commonJS2({
46929
46940
  vitest: "2.0.1"
46930
46941
  },
46931
46942
  dependencies: {
46932
- "@vercel/build-utils": "10.6.7",
46943
+ "@vercel/build-utils": "11.0.0",
46933
46944
  "@vercel/error-utils": "2.0.3",
46934
46945
  "@vercel/microfrontends": "1.2.2",
46935
46946
  "@vercel/routing-utils": "5.1.1",
@@ -116359,6 +116370,63 @@ var require_frameworks = __commonJS2({
116359
116370
  dependency: "nitropack",
116360
116371
  getOutputDirName: async () => "public"
116361
116372
  },
116373
+ {
116374
+ name: "Hono",
116375
+ slug: "hono",
116376
+ logo: "https://api-frameworks.vercel.sh/framework-logos/hono.svg",
116377
+ tagline: "Web framework built on Web Standards",
116378
+ description: "Fast, lightweight, built on Web Standards. Support for any JavaScript runtime.",
116379
+ website: "https://hono.dev",
116380
+ useRuntime: { src: "index.js", use: "@vercel/hono" },
116381
+ defaultRoutes: [
116382
+ {
116383
+ handle: "filesystem"
116384
+ },
116385
+ {
116386
+ src: "/(.*)",
116387
+ dest: "/"
116388
+ }
116389
+ ],
116390
+ detectors: {
116391
+ every: [{ matchPackage: "hono" }],
116392
+ some: [
116393
+ {
116394
+ path: "index.ts",
116395
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']hono["']\\s*(?:\\))?`
116396
+ },
116397
+ {
116398
+ path: "index.js",
116399
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']hono["']\\s*(?:\\))?`
116400
+ },
116401
+ {
116402
+ path: "src/index.ts",
116403
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']hono["']\\s*(?:\\))?`
116404
+ },
116405
+ {
116406
+ path: "src/index.js",
116407
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']hono["']\\s*(?:\\))?`
116408
+ }
116409
+ ]
116410
+ },
116411
+ settings: {
116412
+ installCommand: {
116413
+ placeholder: "`yarn install`, `pnpm install`, `npm install`, or `bun install`"
116414
+ },
116415
+ buildCommand: {
116416
+ placeholder: "None",
116417
+ value: null
116418
+ },
116419
+ devCommand: {
116420
+ placeholder: "None",
116421
+ value: null
116422
+ },
116423
+ outputDirectory: {
116424
+ value: "N/A"
116425
+ }
116426
+ },
116427
+ dependency: "hono",
116428
+ getOutputDirName: async () => "public"
116429
+ },
116362
116430
  {
116363
116431
  name: "Other",
116364
116432
  slug: null,
@@ -179411,6 +179479,11 @@ var init_list9 = __esm({
179411
179479
  });
179412
179480
  }
179413
179481
  }
179482
+ trackCliFlagJson(json) {
179483
+ if (json) {
179484
+ this.trackCliFlag("json");
179485
+ }
179486
+ }
179414
179487
  };
179415
179488
  }
179416
179489
  });
@@ -179442,17 +179515,8 @@ async function list6(client2, argv) {
179442
179515
  const start = Date.now();
179443
179516
  const { contextName } = await getScope(client2);
179444
179517
  output_manager_default.spinner(`Fetching projects in ${import_chalk112.default.bold(contextName)}`);
179445
- let projectsUrl = "/v9/projects?limit=20";
179446
- const deprecated = opts["--update-required"] || false;
179447
- telemetryClient.trackCliFlagUpdateRequired(deprecated);
179448
- if (deprecated) {
179449
- projectsUrl += `&deprecated=${deprecated}`;
179450
- }
179451
- const next = opts["--next"];
179452
- telemetryClient.trackCliOptionNext(next);
179453
- if (next) {
179454
- projectsUrl += `&until=${next}`;
179455
- }
179518
+ const flags = processFlags(opts, telemetryClient);
179519
+ const projectsUrl = buildProjectsUrl(flags);
179456
179520
  const {
179457
179521
  projects: projectList,
179458
179522
  pagination
@@ -179461,40 +179525,101 @@ async function list6(client2, argv) {
179461
179525
  });
179462
179526
  output_manager_default.stopSpinner();
179463
179527
  const elapsed2 = (0, import_ms23.default)(Date.now() - start);
179528
+ if (flags.json) {
179529
+ outputJson(client2, projectList, {
179530
+ pagination,
179531
+ contextName,
179532
+ elapsed: elapsed2,
179533
+ deprecated: flags.deprecated
179534
+ });
179535
+ } else {
179536
+ outputTable(projectList, {
179537
+ contextName,
179538
+ elapsed: elapsed2,
179539
+ deprecated: flags.deprecated,
179540
+ opts,
179541
+ pagination
179542
+ });
179543
+ }
179544
+ return 0;
179545
+ }
179546
+ function processFlags(opts, telemetryClient) {
179547
+ const deprecated = opts["--update-required"] || false;
179548
+ const next = opts["--next"];
179549
+ const json = opts["--json"] || false;
179550
+ telemetryClient.trackCliFlagUpdateRequired(deprecated);
179551
+ telemetryClient.trackCliOptionNext(next);
179552
+ telemetryClient.trackCliFlagJson(json);
179553
+ return { deprecated, next, json };
179554
+ }
179555
+ function buildProjectsUrl(flags) {
179556
+ let url3 = BASE_PROJECTS_URL;
179557
+ if (flags.deprecated) {
179558
+ url3 += `&deprecated=${flags.deprecated}`;
179559
+ }
179560
+ if (flags.next) {
179561
+ url3 += `&until=${flags.next}`;
179562
+ }
179563
+ return url3;
179564
+ }
179565
+ function createProjectJson(project, deprecated) {
179566
+ return {
179567
+ name: project.name,
179568
+ id: project.id,
179569
+ latestProductionUrl: getLatestProdUrl(project),
179570
+ updatedAt: project.updatedAt,
179571
+ nodeVersion: project.nodeVersion ?? null,
179572
+ deprecated
179573
+ };
179574
+ }
179575
+ function outputJson(client2, projectList, metadata) {
179576
+ const jsonOutput = {
179577
+ projects: projectList.map(
179578
+ (project) => createProjectJson(project, metadata.deprecated)
179579
+ ),
179580
+ pagination: metadata.pagination,
179581
+ contextName: metadata.contextName,
179582
+ elapsed: metadata.elapsed
179583
+ };
179584
+ client2.stdout.write(`${JSON.stringify(jsonOutput, null, 2)}
179585
+ `);
179586
+ }
179587
+ function outputTable(projectList, options) {
179588
+ const { contextName, elapsed: elapsed2, deprecated, opts, pagination } = options;
179464
179589
  output_manager_default.log(
179465
179590
  `${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk112.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk112.default.gray(`[${elapsed2}]`)}`
179466
179591
  );
179467
179592
  if (projectList.length > 0) {
179468
- const tablePrint = table(
179469
- [
179593
+ printProjectsTable(projectList);
179594
+ printPaginationInstructions(opts, pagination);
179595
+ }
179596
+ }
179597
+ function printProjectsTable(projectList) {
179598
+ const tablePrint = table(
179599
+ [
179600
+ TABLE_HEADERS.map((header) => import_chalk112.default.bold(import_chalk112.default.cyan(header))),
179601
+ ...projectList.flatMap((project) => [
179470
179602
  [
179471
- "Project Name",
179472
- "Latest Production URL",
179473
- "Updated",
179474
- "Node Version"
179475
- ].map((header) => import_chalk112.default.bold(import_chalk112.default.cyan(header))),
179476
- ...projectList.flatMap((project) => [
179477
- [
179478
- import_chalk112.default.bold(project.name),
179479
- getLatestProdUrl(project),
179480
- import_chalk112.default.gray((0, import_ms23.default)(Date.now() - project.updatedAt)),
179481
- project.nodeVersion ?? ""
179482
- ]
179483
- ])
179484
- ],
179485
- { hsep: 3 }
179486
- ).replace(/^/gm, " ");
179487
- output_manager_default.print(`
179603
+ import_chalk112.default.bold(project.name),
179604
+ getLatestProdUrl(project),
179605
+ import_chalk112.default.gray((0, import_ms23.default)(Date.now() - project.updatedAt)),
179606
+ project.nodeVersion ?? ""
179607
+ ]
179608
+ ])
179609
+ ],
179610
+ { hsep: 3 }
179611
+ ).replace(/^/gm, " ");
179612
+ output_manager_default.print(`
179488
179613
  ${tablePrint}
179489
179614
 
179490
179615
  `);
179491
- if (pagination && pagination.count === 20) {
179492
- const flags = getCommandFlags(opts, ["_", "--next", "-N", "-d", "-y"]);
179493
- const nextCmd = `project ls${flags} --next ${pagination.next}`;
179494
- output_manager_default.log(`To display the next page, run ${getCommandName(nextCmd)}`);
179495
- }
179616
+ }
179617
+ function printPaginationInstructions(opts, pagination) {
179618
+ if (pagination && pagination.count === 20) {
179619
+ const flags = getCommandFlags(opts, PAGINATION_FLAGS_TO_EXCLUDE);
179620
+ const nextCmd = `project ls${flags} --next ${pagination.next}`;
179621
+ output_manager_default.log(`To display the next page, run ${getCommandName(nextCmd)}`);
179496
179622
  }
179497
- return 0;
179498
179623
  }
179499
179624
  function getLatestProdUrl(project) {
179500
179625
  const alias2 = project.targets?.production?.alias?.[0];
@@ -179502,7 +179627,7 @@ function getLatestProdUrl(project) {
179502
179627
  return `https://${alias2}`;
179503
179628
  return "--";
179504
179629
  }
179505
- var import_ms23, import_chalk112;
179630
+ var import_ms23, import_chalk112, TABLE_HEADERS, PAGINATION_FLAGS_TO_EXCLUDE, BASE_PROJECTS_URL;
179506
179631
  var init_list10 = __esm({
179507
179632
  "src/commands/project/list.ts"() {
179508
179633
  "use strict";
@@ -179518,6 +179643,14 @@ var init_list10 = __esm({
179518
179643
  init_get_flags_specification();
179519
179644
  init_error2();
179520
179645
  init_get_scope();
179646
+ TABLE_HEADERS = [
179647
+ "Project Name",
179648
+ "Latest Production URL",
179649
+ "Updated",
179650
+ "Node Version"
179651
+ ];
179652
+ PAGINATION_FLAGS_TO_EXCLUDE = ["_", "--next", "-N", "-d", "-y", "--json"];
179653
+ BASE_PROJECTS_URL = "/v9/projects?limit=20";
179521
179654
  }
179522
179655
  });
179523
179656
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "44.5.5",
3
+ "version": "44.6.2",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -22,17 +22,18 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@vercel/blob": "1.0.2",
25
- "@vercel/build-utils": "10.6.7",
25
+ "@vercel/build-utils": "11.0.0",
26
26
  "@vercel/fun": "1.1.6",
27
27
  "@vercel/go": "3.2.2",
28
+ "@vercel/hono": "0.0.3",
28
29
  "@vercel/hydrogen": "1.2.3",
29
- "@vercel/next": "4.10.7",
30
- "@vercel/node": "5.3.6",
30
+ "@vercel/next": "4.10.8",
31
+ "@vercel/node": "5.3.7",
31
32
  "@vercel/python": "4.8.0",
32
33
  "@vercel/redwood": "2.3.4",
33
34
  "@vercel/remix-builder": "5.4.10",
34
35
  "@vercel/ruby": "2.2.1",
35
- "@vercel/static-build": "2.7.16",
36
+ "@vercel/static-build": "2.7.17",
36
37
  "chokidar": "4.0.0",
37
38
  "jose": "5.9.6"
38
39
  },
@@ -79,10 +80,10 @@
79
80
  "@types/which": "3.0.0",
80
81
  "@types/write-json-file": "2.2.1",
81
82
  "@types/yauzl-promise": "2.1.0",
82
- "@vercel/client": "15.3.12",
83
+ "@vercel/client": "15.3.13",
83
84
  "@vercel/error-utils": "2.0.3",
84
- "@vercel/frameworks": "3.7.3",
85
- "@vercel/fs-detectors": "5.4.9",
85
+ "@vercel/frameworks": "3.7.4",
86
+ "@vercel/fs-detectors": "5.4.10",
86
87
  "@vercel/routing-utils": "5.1.1",
87
88
  "@vitest/expect": "2.1.3",
88
89
  "ajv": "6.12.3",