vercel 32.0.0 → 32.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +292 -91
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -219688,6 +219688,107 @@ const help = () => `
219688
219688
  exports.help = help;
219689
219689
 
219690
219690
 
219691
+ /***/ }),
219692
+
219693
+ /***/ 92455:
219694
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
219695
+
219696
+ "use strict";
219697
+
219698
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
219699
+ exports.aliasCommand = void 0;
219700
+ const pkg_name_1 = __webpack_require__(79000);
219701
+ exports.aliasCommand = {
219702
+ name: 'alias',
219703
+ description: 'Interact with deployment aliases.',
219704
+ arguments: [
219705
+ {
219706
+ name: 'command',
219707
+ required: false,
219708
+ },
219709
+ ],
219710
+ subcommands: [
219711
+ {
219712
+ name: 'ls',
219713
+ description: 'Show all aliases.',
219714
+ arguments: [],
219715
+ options: [],
219716
+ examples: [],
219717
+ },
219718
+ {
219719
+ name: 'set',
219720
+ description: 'Create a new alias',
219721
+ arguments: [
219722
+ {
219723
+ name: 'deployment',
219724
+ required: true,
219725
+ },
219726
+ {
219727
+ name: 'alias',
219728
+ required: true,
219729
+ },
219730
+ ],
219731
+ options: [],
219732
+ examples: [],
219733
+ },
219734
+ {
219735
+ name: 'rm',
219736
+ description: 'Remove an alias using its hostname.',
219737
+ arguments: [
219738
+ {
219739
+ name: 'alias',
219740
+ required: true,
219741
+ },
219742
+ ],
219743
+ options: [],
219744
+ examples: [],
219745
+ },
219746
+ ],
219747
+ options: [
219748
+ {
219749
+ name: 'next',
219750
+ description: 'Show next page of results',
219751
+ argument: 'MS',
219752
+ shorthand: 'n',
219753
+ type: 'string',
219754
+ deprecated: false,
219755
+ multi: false,
219756
+ },
219757
+ {
219758
+ name: 'yes',
219759
+ description: 'Skip the confirmation prompt when removing an alias',
219760
+ shorthand: 'y',
219761
+ type: 'boolean',
219762
+ deprecated: false,
219763
+ multi: false,
219764
+ },
219765
+ {
219766
+ name: 'limit',
219767
+ shorthand: 'n',
219768
+ description: 'Number of results to return per page (default: 20, max: 100)',
219769
+ argument: 'NUMBER',
219770
+ type: 'string',
219771
+ deprecated: false,
219772
+ multi: false,
219773
+ },
219774
+ ],
219775
+ examples: [
219776
+ {
219777
+ name: 'Add a new alias to `my-api.vercel.app`',
219778
+ value: `${pkg_name_1.packageName} alias set api-ownv3nc9f8.vercel.app my-api.vercel.app`,
219779
+ },
219780
+ {
219781
+ name: 'Custom domains work as alias targets',
219782
+ value: `${pkg_name_1.packageName} alias set api-ownv3nc9f8.vercel.app my-api.com`,
219783
+ },
219784
+ {
219785
+ name: 'The subcommand `set` is the default and can be skipped. Protocols in the URLs are unneeded and ignored',
219786
+ value: `${pkg_name_1.packageName} alias api-ownv3nc9f8.vercel.app my-api.com`,
219787
+ },
219788
+ ],
219789
+ };
219790
+
219791
+
219691
219792
  /***/ }),
219692
219793
 
219693
219794
  /***/ 57725:
@@ -219699,58 +219800,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
219699
219800
  return (mod && mod.__esModule) ? mod : { "default": mod };
219700
219801
  };
219701
219802
  Object.defineProperty(exports, "__esModule", ({ value: true }));
219702
- const chalk_1 = __importDefault(__webpack_require__(90877));
219703
219803
  const error_1 = __webpack_require__(4400);
219704
219804
  const get_args_1 = __importDefault(__webpack_require__(2505));
219705
219805
  const get_subcommand_1 = __importDefault(__webpack_require__(66167));
219706
- const pkg_name_1 = __webpack_require__(79000);
219806
+ const help_1 = __webpack_require__(58219);
219707
219807
  const ls_1 = __importDefault(__webpack_require__(74021));
219708
219808
  const rm_1 = __importDefault(__webpack_require__(48863));
219709
219809
  const set_1 = __importDefault(__webpack_require__(80734));
219710
- const help = () => {
219711
- console.log(`
219712
- ${chalk_1.default.bold(`${pkg_name_1.logo} ${pkg_name_1.packageName} alias`)} [options] <command>
219713
-
219714
- ${chalk_1.default.dim('Commands:')}
219715
-
219716
- ls Show all aliases
219717
- set <deployment> <alias> Create a new alias
219718
- rm <alias> Remove an alias using its hostname
219719
-
219720
- ${chalk_1.default.dim('Options:')}
219721
-
219722
- -h, --help Output usage information
219723
- -A ${chalk_1.default.bold.underline('FILE')}, --local-config=${chalk_1.default.bold.underline('FILE')} Path to the local ${'`vercel.json`'} file
219724
- -Q ${chalk_1.default.bold.underline('DIR')}, --global-config=${chalk_1.default.bold.underline('DIR')} Path to the global ${'`.vercel`'} directory
219725
- -d, --debug Debug mode [off]
219726
- --no-color No color mode [off]
219727
- -t ${chalk_1.default.bold.underline('TOKEN')}, --token=${chalk_1.default.bold.underline('TOKEN')} Login token
219728
- -S, --scope Set a custom scope
219729
- -N, --next Show next page of results
219730
- -y, --yes Skip the confirmation prompt when removing an alias
219731
- --limit=${chalk_1.default.bold.underline('VALUE')} Number of results to return per page (default: 20, max: 100)
219732
-
219733
- ${chalk_1.default.dim('Examples:')}
219734
-
219735
- ${chalk_1.default.gray('–')} Add a new alias to ${chalk_1.default.underline('my-api.vercel.app')}
219736
-
219737
- ${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} alias set ${chalk_1.default.underline('api-ownv3nc9f8.vercel.app')} ${chalk_1.default.underline('my-api.vercel.app')}`)}
219738
-
219739
- Custom domains work as alias targets
219740
-
219741
- ${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} alias set ${chalk_1.default.underline('api-ownv3nc9f8.vercel.app')} ${chalk_1.default.underline('my-api.com')}`)}
219742
-
219743
- ${chalk_1.default.dim('–')} The subcommand ${chalk_1.default.dim('`set`')} is the default and can be skipped.
219744
- ${chalk_1.default.dim('–')} ${chalk_1.default.dim('Protocols')} in the URLs are unneeded and ignored.
219745
- `);
219746
- };
219810
+ const command_1 = __webpack_require__(92455);
219747
219811
  const COMMAND_CONFIG = {
219748
219812
  default: ['set'],
219749
219813
  ls: ['ls', 'list'],
219750
219814
  rm: ['rm', 'remove'],
219751
219815
  set: ['set'],
219752
219816
  };
219753
- async function main(client) {
219817
+ async function alias(client) {
219754
219818
  let argv;
219755
219819
  try {
219756
219820
  argv = (0, get_args_1.default)(client.argv.slice(2), {
@@ -219767,7 +219831,7 @@ async function main(client) {
219767
219831
  return 1;
219768
219832
  }
219769
219833
  if (argv['--help']) {
219770
- help();
219834
+ client.output.print((0, help_1.help)(command_1.aliasCommand, { columns: client.stderr.columns }));
219771
219835
  return 2;
219772
219836
  }
219773
219837
  const { subcommand, args } = (0, get_subcommand_1.default)(argv._.slice(1), COMMAND_CONFIG);
@@ -219780,7 +219844,7 @@ async function main(client) {
219780
219844
  return (0, set_1.default)(client, argv, args);
219781
219845
  }
219782
219846
  }
219783
- exports.default = main;
219847
+ exports.default = alias;
219784
219848
 
219785
219849
 
219786
219850
  /***/ }),
@@ -221226,6 +221290,129 @@ async function add(client, opts, args) {
221226
221290
  exports.default = add;
221227
221291
 
221228
221292
 
221293
+ /***/ }),
221294
+
221295
+ /***/ 19219:
221296
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
221297
+
221298
+ "use strict";
221299
+
221300
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
221301
+ exports.certsCommand = void 0;
221302
+ const pkg_name_1 = __webpack_require__(79000);
221303
+ exports.certsCommand = {
221304
+ name: 'certs',
221305
+ description: 'Interact with SSL certificates. This command is intended for advanced use only. By default, Vercel manages your certificates automatically.',
221306
+ arguments: [
221307
+ {
221308
+ name: 'command',
221309
+ required: false,
221310
+ },
221311
+ ],
221312
+ subcommands: [
221313
+ {
221314
+ name: 'ls',
221315
+ description: 'Show all available certificates',
221316
+ arguments: [],
221317
+ options: [],
221318
+ examples: [],
221319
+ },
221320
+ {
221321
+ name: 'issue',
221322
+ description: ' Issue a new certificate for a domain',
221323
+ arguments: [
221324
+ {
221325
+ name: 'cn',
221326
+ required: true,
221327
+ },
221328
+ ],
221329
+ options: [],
221330
+ examples: [],
221331
+ },
221332
+ {
221333
+ name: 'rm',
221334
+ description: 'Remove a certificate by id',
221335
+ arguments: [
221336
+ {
221337
+ name: 'id',
221338
+ required: true,
221339
+ },
221340
+ ],
221341
+ options: [],
221342
+ examples: [],
221343
+ },
221344
+ ],
221345
+ options: [
221346
+ {
221347
+ name: 'challenge-only',
221348
+ description: 'Only show challenges needed to issue a cert',
221349
+ shorthand: null,
221350
+ type: 'string',
221351
+ deprecated: false,
221352
+ multi: false,
221353
+ },
221354
+ {
221355
+ name: 'crt',
221356
+ description: 'Certificate file',
221357
+ argument: 'FILE',
221358
+ shorthand: null,
221359
+ type: 'string',
221360
+ deprecated: false,
221361
+ multi: false,
221362
+ },
221363
+ {
221364
+ name: 'key',
221365
+ description: 'Certificate key file',
221366
+ argument: 'FILE',
221367
+ shorthand: null,
221368
+ type: 'string',
221369
+ deprecated: false,
221370
+ multi: false,
221371
+ },
221372
+ {
221373
+ name: 'ca',
221374
+ description: 'CA certificate chain file',
221375
+ argument: 'FILE',
221376
+ shorthand: null,
221377
+ type: 'string',
221378
+ deprecated: false,
221379
+ multi: false,
221380
+ },
221381
+ {
221382
+ name: 'limit',
221383
+ description: 'Number of results to return per page (default: 20, max: 100)',
221384
+ argument: 'VALUE',
221385
+ shorthand: null,
221386
+ type: 'string',
221387
+ deprecated: false,
221388
+ multi: false,
221389
+ },
221390
+ {
221391
+ name: 'next',
221392
+ description: 'Show next page of results',
221393
+ shorthand: 'n',
221394
+ type: 'string',
221395
+ deprecated: false,
221396
+ multi: false,
221397
+ },
221398
+ ],
221399
+ examples: [
221400
+ {
221401
+ name: 'Generate a certificate with the cnames "acme.com" and "www.acme.com"`',
221402
+ value: `${pkg_name_1.packageName} certs issue acme.com www.acme.com`,
221403
+ },
221404
+ {
221405
+ name: 'Remove a certificate',
221406
+ value: `${pkg_name_1.packageName} certs rm id`,
221407
+ },
221408
+ {
221409
+ name: 'Paginate results, where `1584722256178` is the time in milliseconds since the UNIX epoch.',
221410
+ value: `${pkg_name_1.packageName} certs ls --next 1584722256178`,
221411
+ },
221412
+ ],
221413
+ };
221414
+
221415
+
221229
221416
  /***/ }),
221230
221417
 
221231
221418
  /***/ 1165:
@@ -221237,7 +221424,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
221237
221424
  return (mod && mod.__esModule) ? mod : { "default": mod };
221238
221425
  };
221239
221426
  Object.defineProperty(exports, "__esModule", ({ value: true }));
221240
- const chalk_1 = __importDefault(__webpack_require__(90877));
221241
221427
  // @ts-ignore
221242
221428
  const error_1 = __webpack_require__(4400);
221243
221429
  const get_args_1 = __importDefault(__webpack_require__(2505));
@@ -221246,51 +221432,8 @@ const add_1 = __importDefault(__webpack_require__(30033));
221246
221432
  const issue_1 = __importDefault(__webpack_require__(14008));
221247
221433
  const ls_1 = __importDefault(__webpack_require__(15922));
221248
221434
  const rm_1 = __importDefault(__webpack_require__(55667));
221249
- const pkg_name_1 = __webpack_require__(79000);
221250
- const help = () => {
221251
- console.log(`
221252
- ${chalk_1.default.bold(`${pkg_name_1.logo} ${pkg_name_1.packageName} certs`)} [options] <command>
221253
-
221254
- ${chalk_1.default.yellow('NOTE:')} This command is intended for advanced use only.
221255
- By default, Vercel manages your certificates automatically.
221256
-
221257
- ${chalk_1.default.dim('Commands:')}
221258
-
221259
- ls Show all available certificates
221260
- issue <cn> [<cn>] Issue a new certificate for a domain
221261
- rm <id> Remove a certificate by id
221262
-
221263
- ${chalk_1.default.dim('Options:')}
221264
-
221265
- -h, --help Output usage information
221266
- -A ${chalk_1.default.bold.underline('FILE')}, --local-config=${chalk_1.default.bold.underline('FILE')} Path to the local ${'`vercel.json`'} file
221267
- -Q ${chalk_1.default.bold.underline('DIR')}, --global-config=${chalk_1.default.bold.underline('DIR')} Path to the global ${'`.vercel`'} directory
221268
- -d, --debug Debug mode [off]
221269
- --no-color No color mode [off]
221270
- -t ${chalk_1.default.bold.underline('TOKEN')}, --token=${chalk_1.default.bold.underline('TOKEN')} Login token
221271
- -S, --scope Set a custom scope
221272
- --challenge-only Only show challenges needed to issue a cert
221273
- --crt ${chalk_1.default.bold.underline('FILE')} Certificate file
221274
- --key ${chalk_1.default.bold.underline('FILE')} Certificate key file
221275
- --ca ${chalk_1.default.bold.underline('FILE')} CA certificate chain file
221276
- -N, --next Show next page of results
221277
- --limit=${chalk_1.default.bold.underline('VALUE')} Number of results to return per page (default: 20, max: 100)
221278
-
221279
- ${chalk_1.default.dim('Examples:')}
221280
-
221281
- ${chalk_1.default.gray('–')} Generate a certificate with the cnames "acme.com" and "www.acme.com"
221282
-
221283
- ${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} certs issue acme.com www.acme.com`)}
221284
-
221285
- ${chalk_1.default.gray('–')} Remove a certificate
221286
-
221287
- ${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} certs rm id`)}
221288
-
221289
- ${chalk_1.default.gray('–')} Paginate results, where ${chalk_1.default.dim('`1584722256178`')} is the time in milliseconds since the UNIX epoch.
221290
-
221291
- ${chalk_1.default.cyan(`$ ${pkg_name_1.packageName} certs ls --next 1584722256178`)}
221292
- `);
221293
- };
221435
+ const command_1 = __webpack_require__(19219);
221436
+ const help_1 = __webpack_require__(58219);
221294
221437
  const COMMAND_CONFIG = {
221295
221438
  add: ['add'],
221296
221439
  issue: ['issue'],
@@ -221318,7 +221461,7 @@ async function main(client) {
221318
221461
  return 1;
221319
221462
  }
221320
221463
  if (argv['--help']) {
221321
- help();
221464
+ client.output.print((0, help_1.help)(command_1.certsCommand, { columns: client.stderr.columns }));
221322
221465
  return 2;
221323
221466
  }
221324
221467
  const { output } = client;
@@ -221337,7 +221480,7 @@ async function main(client) {
221337
221480
  return 1;
221338
221481
  default:
221339
221482
  output.error('Please specify a valid subcommand: ls | issue | rm');
221340
- help();
221483
+ client.output.print((0, help_1.help)(command_1.certsCommand, { columns: client.stderr.columns }));
221341
221484
  return 2;
221342
221485
  }
221343
221486
  }
@@ -225068,7 +225211,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
225068
225211
  return (mod && mod.__esModule) ? mod : { "default": mod };
225069
225212
  };
225070
225213
  Object.defineProperty(exports, "__esModule", ({ value: true }));
225071
- exports.help = exports.buildHelpOutput = exports.buildCommandExampleLines = exports.buildCommandOptionLines = exports.buildCommandSynopsisLine = exports.outputArrayToString = exports.lineToString = void 0;
225214
+ exports.help = exports.buildHelpOutput = exports.buildCommandExampleLines = exports.buildSubcommandLines = exports.buildCommandOptionLines = exports.buildCommandSynopsisLine = exports.outputArrayToString = exports.lineToString = void 0;
225072
225215
  const chalk_1 = __importDefault(__webpack_require__(90877));
225073
225216
  const constants_1 = __webpack_require__(98551);
225074
225217
  const cli_table3_1 = __importDefault(__webpack_require__(47579));
@@ -225290,6 +225433,50 @@ function buildCommandOptionLines(commandOptions, options, sectionTitle) {
225290
225433
  ].join('');
225291
225434
  }
225292
225435
  exports.buildCommandOptionLines = buildCommandOptionLines;
225436
+ function buildSubcommandLines(subcommands, options) {
225437
+ if (!subcommands) {
225438
+ return null;
225439
+ }
225440
+ // word wrapping requires the wrapped cell to have a fixed width.
225441
+ // We need to track cell sizes to ensure the final column of cells is
225442
+ // equal to the remainder of unused horizontal space.
225443
+ let maxWidthOfUnwrappedColumns = 0;
225444
+ const rows = [];
225445
+ for (const command of subcommands) {
225446
+ const nameCell = `${INDENT}${command.name}`;
225447
+ let argsCell = INDENT;
225448
+ argsCell += command.arguments
225449
+ .map(arg => {
225450
+ return arg.required ? arg.name : `[${arg.name}]`;
225451
+ })
225452
+ .join(' ');
225453
+ argsCell += INDENT;
225454
+ const widthOfUnwrappedColumns = nameCell.length + argsCell.length;
225455
+ maxWidthOfUnwrappedColumns = Math.max(widthOfUnwrappedColumns, maxWidthOfUnwrappedColumns);
225456
+ rows.push([
225457
+ nameCell,
225458
+ argsCell,
225459
+ {
225460
+ content: command.description,
225461
+ wordWrap: true,
225462
+ },
225463
+ ]);
225464
+ }
225465
+ const finalColumnWidth = options.columns - maxWidthOfUnwrappedColumns;
225466
+ const table = new cli_table3_1.default(Object.assign({}, tableOptions, {
225467
+ colWidths: [null, null, finalColumnWidth],
225468
+ }));
225469
+ table.push(...rows);
225470
+ return [
225471
+ `${INDENT}${chalk_1.default.dim('Commands')}:`,
225472
+ NEWLINE,
225473
+ NEWLINE,
225474
+ table.toString(),
225475
+ NEWLINE,
225476
+ NEWLINE,
225477
+ ].join('');
225478
+ }
225479
+ exports.buildSubcommandLines = buildSubcommandLines;
225293
225480
  function buildCommandExampleLines(command) {
225294
225481
  const outputArray = [`${INDENT}${chalk_1.default.dim('Examples:')}`, ''];
225295
225482
  for (const example of command.examples) {
@@ -225323,6 +225510,7 @@ function buildHelpOutput(command, options) {
225323
225510
  '',
225324
225511
  buildCommandSynopsisLine(command),
225325
225512
  buildDescriptionLine(command, options),
225513
+ buildSubcommandLines(command.subcommands, options),
225326
225514
  buildCommandOptionLines(command.options, options, 'Options'),
225327
225515
  buildCommandOptionLines(globalCommandOptions, options, 'Global Options'),
225328
225516
  buildCommandExampleLines(command),
@@ -227569,6 +227757,15 @@ exports.pullCommand = {
227569
227757
  deprecated: false,
227570
227758
  multi: false,
227571
227759
  },
227760
+ {
227761
+ name: 'git-branch',
227762
+ description: 'Specify the Git branch to pull specific Environment Variables for',
227763
+ argument: 'branch',
227764
+ shorthand: null,
227765
+ type: 'string',
227766
+ deprecated: false,
227767
+ multi: false,
227768
+ },
227572
227769
  {
227573
227770
  name: 'yes',
227574
227771
  description: 'Skip questions when setting up new project using default scope and settings',
@@ -227591,6 +227788,10 @@ exports.pullCommand = {
227591
227788
  name: 'Pull for a specific environment',
227592
227789
  value: `${pkg_name_1.packageName} pull --environment=${(0, env_target_1.getEnvTargetPlaceholder)()}`,
227593
227790
  },
227791
+ {
227792
+ name: 'Pull for a preview feature branch',
227793
+ value: `${pkg_name_1.packageName} pull --environment=preview --git-branch=feature-branch`,
227794
+ },
227594
227795
  {
227595
227796
  name: 'If you want to download environment variables to a specific file, use `vercel env pull` instead',
227596
227797
  value: `${pkg_name_1.packageName} env pull`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "32.0.0",
3
+ "version": "32.0.1",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -26,12 +26,12 @@
26
26
  "@vercel/go": "3.0.0",
27
27
  "@vercel/hydrogen": "1.0.0",
28
28
  "@vercel/next": "4.0.0",
29
- "@vercel/node": "3.0.0",
29
+ "@vercel/node": "3.0.1",
30
30
  "@vercel/python": "4.0.0",
31
31
  "@vercel/redwood": "2.0.0",
32
32
  "@vercel/remix-builder": "2.0.0",
33
33
  "@vercel/ruby": "2.0.0",
34
- "@vercel/static-build": "2.0.0"
34
+ "@vercel/static-build": "2.0.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@alex_neo/jest-expect-message": "1.0.5",
@@ -79,9 +79,9 @@
79
79
  "@vercel-internals/get-package-json": "1.0.0",
80
80
  "@vercel-internals/types": "1.0.7",
81
81
  "@vercel/client": "13.0.0",
82
- "@vercel/error-utils": "2.0.0",
83
- "@vercel/frameworks": "2.0.0",
84
- "@vercel/fs-detectors": "5.0.0",
82
+ "@vercel/error-utils": "2.0.1",
83
+ "@vercel/frameworks": "2.0.1",
84
+ "@vercel/fs-detectors": "5.0.1",
85
85
  "@vercel/fun": "1.0.4",
86
86
  "@vercel/ncc": "0.24.0",
87
87
  "@vercel/routing-utils": "3.0.0",