vercel 33.6.1 → 33.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 +54 -32
  2. package/package.json +13 -10
package/dist/index.js CHANGED
@@ -62513,7 +62513,7 @@ var require_package = __commonJS2({
62513
62513
  "../client/package.json"(exports2, module2) {
62514
62514
  module2.exports = {
62515
62515
  name: "@vercel/client",
62516
- version: "13.1.7",
62516
+ version: "13.1.8",
62517
62517
  main: "dist/index.js",
62518
62518
  typings: "dist/index.d.ts",
62519
62519
  homepage: "https://vercel.com",
@@ -62550,7 +62550,7 @@ var require_package = __commonJS2({
62550
62550
  typescript: "4.9.5"
62551
62551
  },
62552
62552
  dependencies: {
62553
- "@vercel/build-utils": "7.9.1",
62553
+ "@vercel/build-utils": "7.10.0",
62554
62554
  "@vercel/error-utils": "2.0.2",
62555
62555
  "@vercel/routing-utils": "3.1.0",
62556
62556
  "@zeit/fetch": "5.2.0",
@@ -100576,7 +100576,7 @@ async function list(client2, {
100576
100576
  eraseFinalAnswer = false
100577
100577
  // If true, the line with the final answer that inquirer prints will be erased before returning
100578
100578
  }) {
100579
- init_patch_inquirer();
100579
+ await Promise.resolve().then(() => (init_patch_inquirer(), patch_inquirer_exports));
100580
100580
  let biggestLength = 0;
100581
100581
  let selected;
100582
100582
  for (const choice of _choices) {
@@ -101061,7 +101061,7 @@ var init_saml = __esm({
101061
101061
 
101062
101062
  // src/util/input/confirm.ts
101063
101063
  async function confirm(client2, message2, preferred) {
101064
- init_patch_inquirer();
101064
+ await Promise.resolve().then(() => (init_patch_inquirer(), patch_inquirer_exports));
101065
101065
  const answers = await client2.prompt({
101066
101066
  type: "confirm",
101067
101067
  name: "value",
@@ -143876,7 +143876,8 @@ var require_frameworks = __commonJS2({
143876
143876
  var frameworks_exports = {};
143877
143877
  __export4(frameworks_exports, {
143878
143878
  default: () => frameworks_default,
143879
- frameworks: () => frameworks2
143879
+ frameworkList: () => frameworkList6,
143880
+ frameworks: () => frameworks
143880
143881
  });
143881
143882
  module2.exports = __toCommonJS4(frameworks_exports);
143882
143883
  var import_path44 = require("path");
@@ -143884,7 +143885,7 @@ var require_frameworks = __commonJS2({
143884
143885
  var import_read_config_file = require_read_config_file();
143885
143886
  __reExport(frameworks_exports, require_types5(), module2.exports);
143886
143887
  var { readdir: readdir2, readFile: readFile6, unlink } = import_fs10.promises;
143887
- var frameworks2 = [
143888
+ var frameworks = [
143888
143889
  {
143889
143890
  name: "Blitz.js (Legacy)",
143890
143891
  slug: "blitzjs",
@@ -145810,8 +145811,8 @@ var require_frameworks = __commonJS2({
145810
145811
  getOutputDirName: async () => "public"
145811
145812
  }
145812
145813
  ];
145813
- var def = frameworks2;
145814
- var frameworks_default = def;
145814
+ var frameworkList6 = frameworks;
145815
+ var frameworks_default = frameworkList6;
145815
145816
  }
145816
145817
  });
145817
145818
 
@@ -148112,10 +148113,10 @@ var require_detect_framework = __commonJS2({
148112
148113
  }
148113
148114
  async function detectFramework2({
148114
148115
  fs: fs15,
148115
- frameworkList: frameworkList5
148116
+ frameworkList: frameworkList6
148116
148117
  }) {
148117
148118
  const result = await Promise.all(
148118
- frameworkList5.map(async (frameworkMatch) => {
148119
+ frameworkList6.map(async (frameworkMatch) => {
148119
148120
  if (await matches(fs15, frameworkMatch)) {
148120
148121
  return frameworkMatch;
148121
148122
  }
@@ -148127,10 +148128,10 @@ var require_detect_framework = __commonJS2({
148127
148128
  }
148128
148129
  async function detectFrameworks3({
148129
148130
  fs: fs15,
148130
- frameworkList: frameworkList5
148131
+ frameworkList: frameworkList6
148131
148132
  }) {
148132
148133
  const result = await Promise.all(
148133
- frameworkList5.map(async (frameworkMatch) => {
148134
+ frameworkList6.map(async (frameworkMatch) => {
148134
148135
  if (await matches(fs15, frameworkMatch)) {
148135
148136
  return frameworkMatch;
148136
148137
  }
@@ -148142,10 +148143,10 @@ var require_detect_framework = __commonJS2({
148142
148143
  }
148143
148144
  async function detectFrameworkRecord3({
148144
148145
  fs: fs15,
148145
- frameworkList: frameworkList5
148146
+ frameworkList: frameworkList6
148146
148147
  }) {
148147
148148
  const result = await Promise.all(
148148
- frameworkList5.map(async (frameworkMatch) => {
148149
+ frameworkList6.map(async (frameworkMatch) => {
148149
148150
  const matchResult = await matches(fs15, frameworkMatch);
148150
148151
  if (matchResult) {
148151
148152
  return {
@@ -163618,7 +163619,7 @@ var init_create_git_meta = __esm({
163618
163619
 
163619
163620
  // src/util/input/select-org.ts
163620
163621
  async function selectOrg(client2, question, autoConfirm) {
163621
- init_patch_inquirer();
163622
+ await Promise.resolve().then(() => (init_patch_inquirer(), patch_inquirer_exports));
163622
163623
  const {
163623
163624
  output: output2,
163624
163625
  config: { currentTeam }
@@ -163732,13 +163733,13 @@ async function detectProjects(cwd2) {
163732
163733
  }
163733
163734
  await Promise.all(
163734
163735
  packagePaths.map(async (p) => {
163735
- const frameworks2 = await (0, import_fs_detectors.detectFrameworks)({
163736
+ const frameworks = await (0, import_fs_detectors.detectFrameworks)({
163736
163737
  fs: fs15.chdir((0, import_path13.join)(".", p)),
163737
- frameworkList: import_frameworks.default
163738
+ frameworkList: import_frameworks.frameworkList
163738
163739
  });
163739
- if (frameworks2.length === 0)
163740
+ if (frameworks.length === 0)
163740
163741
  return;
163741
- detectedProjects.set(p.slice(1), frameworks2);
163742
+ detectedProjects.set(p.slice(1), frameworks);
163742
163743
  })
163743
163744
  );
163744
163745
  return detectedProjects;
@@ -164014,7 +164015,7 @@ async function ensureRepoLink(client2, cwd2, { yes, overwrite }) {
164014
164015
  }),
164015
164016
  ...addSeparators ? [new import_inquirer4.default.Separator("----- New Projects to be created -----")] : [],
164016
164017
  ...Array.from(detectedProjects.entries()).flatMap(
164017
- ([rootDirectory, frameworks2]) => frameworks2.map((framework, i) => {
164018
+ ([rootDirectory, frameworks]) => frameworks.map((framework, i) => {
164018
164019
  const name = (0, import_slugify.default)(
164019
164020
  [
164020
164021
  (0, import_path14.basename)(rootPath),
@@ -164778,6 +164779,18 @@ var init_env_target = __esm({
164778
164779
  }
164779
164780
  });
164780
164781
 
164782
+ // src/util/is-zero-config-build.ts
164783
+ function isZeroConfigBuild(builds) {
164784
+ return !builds || builds.length === 0 || // If the zeroConfig property is set on all builds, still consider it as
164785
+ // zero config deployment
164786
+ builds.every((buildConfig) => buildConfig.config?.zeroConfig);
164787
+ }
164788
+ var init_is_zero_config_build = __esm({
164789
+ "src/util/is-zero-config-build.ts"() {
164790
+ "use strict";
164791
+ }
164792
+ });
164793
+
164781
164794
  // src/util/input/input-project.ts
164782
164795
  async function inputProject(client2, org, detectedProjectName, autoConfirm = false) {
164783
164796
  const { output: output2 } = client2;
@@ -165048,7 +165061,7 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
165048
165061
  }
165049
165062
  }
165050
165063
  if (localConfigurationOverrides.framework) {
165051
- const overrideFramework = import_frameworks2.default.find(
165064
+ const overrideFramework = import_frameworks2.frameworkList.find(
165052
165065
  (f) => f.slug === localConfigurationOverrides.framework
165053
165066
  );
165054
165067
  if (overrideFramework) {
@@ -166009,7 +166022,7 @@ async function setupAndLink(client2, path11, {
166009
166022
  return { status: "error", exitCode: 1, reason: "INVALID_ROOT_DIRECTORY" };
166010
166023
  }
166011
166024
  config3.currentTeam = org.type === "team" ? org.id : void 0;
166012
- const isZeroConfig = !localConfig || !localConfig.builds || localConfig.builds.length === 0;
166025
+ const isZeroConfig = !localConfig || isZeroConfigBuild(localConfig.builds);
166013
166026
  try {
166014
166027
  let settings = {};
166015
166028
  if (isZeroConfig) {
@@ -166111,6 +166124,7 @@ var init_setup_and_link = __esm({
166111
166124
  import_path19 = require("path");
166112
166125
  import_chalk43 = __toESM3(require_source());
166113
166126
  import_fs_extra12 = __toESM3(require_lib());
166127
+ init_is_zero_config_build();
166114
166128
  init_link2();
166115
166129
  init_create_project();
166116
166130
  init_handle_error();
@@ -170093,7 +170107,7 @@ var init_corepack = __esm({
170093
170107
  // src/util/build/sort-builders.ts
170094
170108
  function sortBuilders(builds) {
170095
170109
  const frontendRuntimeSet2 = new Set(
170096
- import_frameworks3.default.map((f) => f.useRuntime?.use || "@vercel/static-build")
170110
+ import_frameworks3.frameworkList.map((f) => f.useRuntime?.use || "@vercel/static-build")
170097
170111
  );
170098
170112
  const toNumber = (build2) => frontendRuntimeSet2.has(build2.use) ? 0 : 1;
170099
170113
  return builds.sort((build1, build2) => {
@@ -170851,7 +170865,7 @@ async function doBuild(client2, project, buildsJson, cwd2, outputDir) {
170851
170865
  async function getFramework(cwd2, buildResults) {
170852
170866
  const detectedFramework = await (0, import_fs_detectors4.detectFrameworkRecord)({
170853
170867
  fs: new import_fs_detectors4.LocalFileSystemDetector(cwd2),
170854
- frameworkList: import_frameworks4.default
170868
+ frameworkList: import_frameworks4.frameworkList
170855
170869
  });
170856
170870
  if (!detectedFramework) {
170857
170871
  return;
@@ -172318,6 +172332,7 @@ var init_deploy = __esm({
172318
172332
  "src/commands/deploy/index.ts"() {
172319
172333
  "use strict";
172320
172334
  import_build_utils14 = require("@vercel/build-utils");
172335
+ init_is_zero_config_build();
172321
172336
  import_client10 = __toESM3(require_dist10());
172322
172337
  import_error_utils18 = __toESM3(require_dist2());
172323
172338
  import_bytes5 = __toESM3(require_bytes());
@@ -172718,7 +172733,7 @@ var init_deploy = __esm({
172718
172733
  noWait,
172719
172734
  autoAssignCustomDomains
172720
172735
  };
172721
- if (!localConfig.builds || localConfig.builds.length === 0) {
172736
+ if (isZeroConfigBuild(localConfig.builds)) {
172722
172737
  createArgs.projectSettings = {
172723
172738
  sourceFilesOutsideRootDirectory,
172724
172739
  rootDirectory,
@@ -186604,7 +186619,7 @@ var init_server = __esm({
186604
186619
  init_project_settings();
186605
186620
  init_parse_listen();
186606
186621
  frontendRuntimeSet = new Set(
186607
- import_frameworks5.default.map((f) => f.useRuntime?.use || "@vercel/static-build")
186622
+ import_frameworks5.frameworkList.map((f) => f.useRuntime?.use || "@vercel/static-build")
186608
186623
  );
186609
186624
  DevServer = class {
186610
186625
  constructor(cwd2, options) {
@@ -187549,7 +187564,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
187549
187564
  return this.projectSettings.devCommand;
187550
187565
  } else if (this.projectSettings?.framework) {
187551
187566
  const frameworkSlug = this.projectSettings.framework;
187552
- const framework = import_frameworks5.default.find((f) => f.slug === frameworkSlug);
187567
+ const framework = import_frameworks5.frameworkList.find((f) => f.slug === frameworkSlug);
187553
187568
  if (framework) {
187554
187569
  const defaults = framework.settings.devCommand.value;
187555
187570
  if (defaults) {
@@ -188682,7 +188697,7 @@ function text({
188682
188697
  // Tab
188683
188698
  // Right arrow
188684
188699
  autoCompleteChars = /* @__PURE__ */ new Set([" ", "\x1B[C"]),
188685
- // If true, converts everything the user types to to lowercase
188700
+ // If true, converts everything the user types to lowercase
188686
188701
  forceLowerCase = false
188687
188702
  } = {}) {
188688
188703
  return new Promise((resolve12, reject) => {
@@ -191538,7 +191553,7 @@ var init_known_error = __esm({
191538
191553
 
191539
191554
  // src/commands/env/add.ts
191540
191555
  async function add5(client2, project, opts, args2, output2) {
191541
- init_patch_inquirer();
191556
+ await Promise.resolve().then(() => (init_patch_inquirer(), patch_inquirer_exports));
191542
191557
  const stdInput = await readStandardInput(client2.stdin);
191543
191558
  let [envName, envTargetArg, envGitBranch] = args2;
191544
191559
  if (args2.length > 3) {
@@ -191814,7 +191829,7 @@ var init_remove_env_record = __esm({
191814
191829
 
191815
191830
  // src/commands/env/rm.ts
191816
191831
  async function rm5(client2, project, opts, args2, output2) {
191817
- init_patch_inquirer();
191832
+ await Promise.resolve().then(() => (init_patch_inquirer(), patch_inquirer_exports));
191818
191833
  if (args2.length > 3) {
191819
191834
  output2.error(
191820
191835
  `Invalid number of arguments. Usage: ${getCommandName(
@@ -196943,9 +196958,13 @@ var init_command24 = __esm({
196943
196958
  init_pkg_name();
196944
196959
  secretsCommand = {
196945
196960
  name: "secrets",
196946
- description: `NOTE: The ${getCommandName(
196961
+ description: `WARNING: On May 1st, 2024 secrets will be automatically converted to sensitive Environment Variables for Preview and Production environments. Secrets attached to Development environments will not be migrated.
196962
+ The ${getCommandName(
196963
+ "secrets"
196964
+ )} command will be deprecated at this time, please use the ${getCommandName(
196947
196965
  "env"
196948
- )} command is recommended instead of ${getCommandName("secrets")}`,
196966
+ )} command instead.
196967
+ See https://vercel.com/changelog/legacy-environment-variable-secrets-are-being-sunset for more information.`,
196949
196968
  arguments: [
196950
196969
  {
196951
196970
  name: "command",
@@ -197049,6 +197068,9 @@ async function run({ output: output2, contextName, currentTeam, client: client2
197049
197068
  const start = Date.now();
197050
197069
  const { "--test-warning": testWarningFlag } = argv;
197051
197070
  const commandName = getCommandName("secret " + subcommand);
197071
+ output2.warn(
197072
+ "On May 1st, 2024 secrets will be automatically converted to sensitive Environment Variables for Preview and Production environments.\nSecrets attached to Development environments will not be migrated.See https://vercel.com/changelog/legacy-environment-variable-secrets-are-being-sunset for more information."
197073
+ );
197052
197074
  if (subcommand === "ls" || subcommand === "list") {
197053
197075
  output2.note(
197054
197076
  `The ${getCommandName(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "33.6.1",
3
+ "version": "33.6.2",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -21,17 +21,17 @@
21
21
  "node": ">= 16"
22
22
  },
23
23
  "dependencies": {
24
- "@vercel/build-utils": "7.9.1",
24
+ "@vercel/build-utils": "7.10.0",
25
25
  "@vercel/fun": "1.1.0",
26
26
  "@vercel/go": "3.0.5",
27
27
  "@vercel/hydrogen": "1.0.2",
28
28
  "@vercel/next": "4.1.6",
29
- "@vercel/node": "3.0.24",
29
+ "@vercel/node": "3.0.25",
30
30
  "@vercel/python": "4.1.1",
31
31
  "@vercel/redwood": "2.0.8",
32
- "@vercel/remix-builder": "2.1.4",
32
+ "@vercel/remix-builder": "2.1.5",
33
33
  "@vercel/ruby": "2.0.5",
34
- "@vercel/static-build": "2.4.4",
34
+ "@vercel/static-build": "2.4.5",
35
35
  "chokidar": "3.3.1"
36
36
  },
37
37
  "devDependencies": {
@@ -78,12 +78,13 @@
78
78
  "@types/yauzl-promise": "2.1.0",
79
79
  "@vercel-internals/constants": "1.0.4",
80
80
  "@vercel-internals/get-package-json": "1.0.0",
81
- "@vercel-internals/types": "1.0.27",
82
- "@vercel/client": "13.1.7",
81
+ "@vercel-internals/types": "1.0.28",
82
+ "@vercel/client": "13.1.8",
83
83
  "@vercel/error-utils": "2.0.2",
84
- "@vercel/frameworks": "3.0.0",
85
- "@vercel/fs-detectors": "5.2.1",
84
+ "@vercel/frameworks": "3.0.1",
85
+ "@vercel/fs-detectors": "5.2.2",
86
86
  "@vercel/routing-utils": "3.1.0",
87
+ "@vitest/expect": "1.4.0",
87
88
  "ajv": "6.12.2",
88
89
  "alpha-sort": "2.0.1",
89
90
  "ansi-escapes": "4.3.2",
@@ -155,6 +156,8 @@
155
156
  "ts-node": "10.9.1",
156
157
  "universal-analytics": "0.4.20",
157
158
  "utility-types": "2.1.0",
159
+ "vite": "5.1.6",
160
+ "vitest": "1.3.1",
158
161
  "which": "3.0.0",
159
162
  "write-json-file": "2.2.0",
160
163
  "xdg-app-paths": "5.1.0",
@@ -162,7 +165,7 @@
162
165
  },
163
166
  "scripts": {
164
167
  "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
165
- "test-unit": "pnpm test test/unit/",
168
+ "test-unit": "pnpm vitest test/unit/",
166
169
  "test-e2e": "rimraf test/fixtures/integration && pnpm test test/integration-1.test.ts test/integration-2.test.ts test/integration-3.test.ts",
167
170
  "test-dev": "pnpm test test/dev/",
168
171
  "coverage": "codecov",