vercel-cli 47.0.4__py3-none-any.whl → 47.0.7__py3-none-any.whl

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.

Potentially problematic release.


This version of vercel-cli might be problematic. Click here for more details.

@@ -61278,7 +61278,8 @@ function isOAuthAuth(authConfig) {
61278
61278
  return authConfig.type === "oauth";
61279
61279
  }
61280
61280
  function isValidAccessToken(authConfig) {
61281
- return "token" in authConfig && (authConfig.expiresAt ?? 0) >= Date.now();
61281
+ const nowInSeconds = Math.floor(Date.now() / 1e3);
61282
+ return "token" in authConfig && (authConfig.expiresAt ?? 0) >= nowInSeconds;
61282
61283
  }
61283
61284
  function hasRefreshToken(authConfig) {
61284
61285
  return "refreshToken" in authConfig;
@@ -94419,6 +94420,15 @@ var init_telemetry = __esm({
94419
94420
  value: this.redactedValue
94420
94421
  });
94421
94422
  }
94423
+ trackLoginState(state) {
94424
+ if (state === "started")
94425
+ this.loginAttempt = (0, import_node_crypto.randomUUID)();
94426
+ if (this.loginAttempt) {
94427
+ this.track({ key: `login:attempt:${this.loginAttempt}`, value: state });
94428
+ }
94429
+ if (state !== "started")
94430
+ this.loginAttempt = void 0;
94431
+ }
94422
94432
  trackCliFlagHelp(command, subcommands) {
94423
94433
  let subcommand;
94424
94434
  if (subcommands) {
@@ -115762,14 +115772,14 @@ var require_frameworks = __commonJS2({
115762
115772
  ]
115763
115773
  },
115764
115774
  {
115765
- name: "Nuxt.js",
115775
+ name: "Nuxt",
115766
115776
  slug: "nuxtjs",
115767
115777
  demo: "https://nuxtjs-template.vercel.app",
115768
115778
  logo: "https://api-frameworks.vercel.sh/framework-logos/nuxt.svg",
115769
115779
  screenshot: "https://assets.vercel.com/image/upload/v1647366075/front/import/nuxtjs.png",
115770
- tagline: "Nuxt.js is the web comprehensive framework that lets you dream big with Vue.js.",
115771
- description: "A Nuxt.js app, bootstrapped with create-nuxt-app.",
115772
- website: "https://nuxtjs.org",
115780
+ tagline: "Nuxt is the open source framework that makes full-stack development with Vue.js intuitive.",
115781
+ description: "A Nuxt app, bootstrapped with create-nuxt-app.",
115782
+ website: "https://nuxt.com",
115773
115783
  sort: 2,
115774
115784
  envPrefix: "NUXT_ENV_",
115775
115785
  supersedes: ["nitro"],
@@ -115783,6 +115793,9 @@ var require_frameworks = __commonJS2({
115783
115793
  },
115784
115794
  {
115785
115795
  matchPackage: "nuxt-edge"
115796
+ },
115797
+ {
115798
+ matchPackage: "nuxt-nightly"
115786
115799
  }
115787
115800
  ]
115788
115801
  },
@@ -115795,7 +115808,7 @@ var require_frameworks = __commonJS2({
115795
115808
  value: "nuxt build"
115796
115809
  },
115797
115810
  devCommand: {
115798
- value: "nuxt"
115811
+ value: "nuxt dev"
115799
115812
  },
115800
115813
  outputDirectory: {
115801
115814
  value: "dist"
@@ -116241,6 +116254,49 @@ var require_frameworks = __commonJS2({
116241
116254
  }
116242
116255
  ]
116243
116256
  },
116257
+ {
116258
+ name: "FastAPI (Experimental)",
116259
+ slug: "fastapi",
116260
+ logo: "https://api-frameworks.vercel.sh/framework-logos/fastapi.svg",
116261
+ darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/fastapi.svg",
116262
+ tagline: "FastAPI framework, high performance, easy to learn, fast to code, ready for production",
116263
+ description: "FastAPI framework, high performance, easy to learn, fast to code, ready for production",
116264
+ website: "https://fastapi.tiangolo.com",
116265
+ useRuntime: { src: "main.py", use: "@vercel/python" },
116266
+ detectors: {
116267
+ every: [
116268
+ {
116269
+ path: "requirements.txt",
116270
+ matchContent: "fastapi"
116271
+ }
116272
+ ]
116273
+ },
116274
+ settings: {
116275
+ installCommand: {
116276
+ placeholder: "`pip install -r requirements.txt`"
116277
+ },
116278
+ buildCommand: {
116279
+ placeholder: "None",
116280
+ value: null
116281
+ },
116282
+ devCommand: {
116283
+ value: "uvicorn main:app --reload --port $PORT"
116284
+ },
116285
+ outputDirectory: {
116286
+ value: "N/A"
116287
+ }
116288
+ },
116289
+ getOutputDirName: async () => "",
116290
+ defaultRoutes: [
116291
+ {
116292
+ handle: "filesystem"
116293
+ },
116294
+ {
116295
+ src: "/(.*)",
116296
+ dest: "/main"
116297
+ }
116298
+ ]
116299
+ },
116244
116300
  {
116245
116301
  name: "FastHTML (Experimental)",
116246
116302
  slug: "fasthtml",
@@ -119088,6 +119144,16 @@ var require_detect_builders = __commonJS2({
119088
119144
  builders.push(...apiBuilders);
119089
119145
  }
119090
119146
  if (frontendBuilder) {
119147
+ if (frontendBuilder?.use === "@vercel/express") {
119148
+ builders.push({
119149
+ src: "public/**/*",
119150
+ use: "@vercel/static",
119151
+ config: {
119152
+ zeroConfig: true,
119153
+ outputDirectory: "public"
119154
+ }
119155
+ });
119156
+ }
119091
119157
  builders.push(frontendBuilder);
119092
119158
  if (hasNextApiFiles && apiBuilders.some((b) => (0, import_is_official_runtime.isOfficialRuntime)("node", b.use))) {
119093
119159
  warnings.push({
@@ -148387,6 +148453,25 @@ function displayBuildLogs(client2, deployment, follow = true) {
148387
148453
  );
148388
148454
  return { promise, abortController };
148389
148455
  }
148456
+ async function displayBuildLogsUntilFinalError(client2, deployment, error3) {
148457
+ const abortController = new AbortController();
148458
+ return events_default(
148459
+ client2,
148460
+ deployment.id,
148461
+ {
148462
+ mode: "logs",
148463
+ onEvent: (event) => {
148464
+ printBuildLog(event, output_manager_default.print);
148465
+ if (event.level === "error" && event.text?.includes(error3)) {
148466
+ abortController.abort();
148467
+ }
148468
+ },
148469
+ quiet: false,
148470
+ findOpts: { direction: "forward", follow: true }
148471
+ },
148472
+ abortController
148473
+ );
148474
+ }
148390
148475
  async function displayRuntimeLogs(client2, options, abortController) {
148391
148476
  const { log: log2, debug: debug2, print, spinner, stopSpinner, warn } = output_manager_default;
148392
148477
  const { projectId, deploymentId, parse: parse11 } = options;
@@ -150104,8 +150189,6 @@ ${err.stack}`);
150104
150189
  return 1;
150105
150190
  }
150106
150191
  if (err instanceof BuildError) {
150107
- output_manager_default.error(err.message || "Build failed");
150108
- output_manager_default.print("\n");
150109
150192
  if (withLogs === false) {
150110
150193
  try {
150111
150194
  if (now.url) {
@@ -150114,12 +150197,11 @@ ${err.stack}`);
150114
150197
  contextName,
150115
150198
  now.url
150116
150199
  );
150117
- const { promise } = displayBuildLogs(
150200
+ await displayBuildLogsUntilFinalError(
150118
150201
  client2,
150119
150202
  failedDeployment,
150120
- false
150203
+ err.message
150121
150204
  );
150122
- await promise;
150123
150205
  }
150124
150206
  } catch (_) {
150125
150207
  output_manager_default.log(
@@ -179456,12 +179538,22 @@ var init_login2 = __esm({
179456
179538
  "use strict";
179457
179539
  init_telemetry();
179458
179540
  LoginTelemetryClient = class extends TelemetryClient {
179541
+ /**
179542
+ * Tracks the state of the login process.
179543
+ * - `started` when the user initiates the login process.
179544
+ * - `canceled` when the user cancels the login process.
179545
+ * - `error` when the user encounters an error during the login process.
179546
+ * - `success` when the user successfully logs in.
179547
+ */
179548
+ trackState(...args2) {
179549
+ this.trackLoginState(...args2);
179550
+ }
179459
179551
  };
179460
179552
  }
179461
179553
  });
179462
179554
 
179463
179555
  // src/commands/login/future.ts
179464
- async function login2(client2) {
179556
+ async function login2(client2, telemetry2) {
179465
179557
  const deviceAuthorizationResponse = await deviceAuthorizationRequest();
179466
179558
  output_manager_default.debug(
179467
179559
  `'Device Authorization response:', ${await deviceAuthorizationResponse.clone().text()}`
@@ -179469,6 +179561,7 @@ async function login2(client2) {
179469
179561
  const [deviceAuthorizationError, deviceAuthorization] = await processDeviceAuthorizationResponse(deviceAuthorizationResponse);
179470
179562
  if (deviceAuthorizationError) {
179471
179563
  printError(deviceAuthorizationError);
179564
+ telemetry2.trackState("error");
179472
179565
  return 1;
179473
179566
  }
179474
179567
  const {
@@ -179482,7 +179575,10 @@ async function login2(client2) {
179482
179575
  const rl = import_node_readline.default.createInterface({
179483
179576
  input: process.stdin,
179484
179577
  output: process.stdout
179485
- }).on("SIGINT", () => process.exit(0));
179578
+ }).on("SIGINT", () => {
179579
+ telemetry2.trackState("canceled");
179580
+ process.exit(0);
179581
+ });
179486
179582
  rl.question(
179487
179583
  `
179488
179584
  Visit ${import_chalk107.default.bold(
@@ -179571,9 +179667,12 @@ async function login2(client2) {
179571
179667
  error3 = await pollForToken();
179572
179668
  output_manager_default.stopSpinner();
179573
179669
  rl.close();
179574
- if (!error3)
179670
+ if (!error3) {
179671
+ telemetry2.trackState("success");
179575
179672
  return 0;
179673
+ }
179576
179674
  printError(error3);
179675
+ telemetry2.trackState("error");
179577
179676
  return 1;
179578
179677
  }
179579
179678
  var import_node_readline, import_chalk107, open6, import_ansi_escapes6;
@@ -179617,7 +179716,8 @@ async function login3(client2) {
179617
179716
  }
179618
179717
  if (parsedArgs.flags["--future"]) {
179619
179718
  telemetry2.trackCliFlagFuture("login");
179620
- return await login2(client2);
179719
+ telemetry2.trackState("started");
179720
+ return await login2(client2, telemetry2);
179621
179721
  }
179622
179722
  if (parsedArgs.flags["--help"]) {
179623
179723
  telemetry2.trackCliFlagHelp("login");
@@ -37,5 +37,5 @@
37
37
  "vitest-run": "vitest --config ./vitest.config.mts",
38
38
  "vitest-unit": "jest test/unit/ --listTests"
39
39
  },
40
- "version": "47.0.4"
40
+ "version": "47.0.7"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vercel-cli
3
- Version: 47.0.4
3
+ Version: 47.0.7
4
4
  Summary: Vercel CLI packaged for Python (bundled Node.js, vendored npm)
5
5
  Project-URL: Homepage, https://github.com/nuage-studio/vercel-cli-python
6
6
  Project-URL: Repository, https://github.com/nuage-studio/vercel-cli-python
@@ -1,10 +1,10 @@
1
1
  vercel_cli/vendor/LICENSE,sha256=sHDXe_ssUqHdaZbeDOX2TEmgylXIibFjqWPd9csAHuI,11343
2
2
  vercel_cli/vendor/README.md,sha256=2ZrJzd7x21xlpsOZ9QKG6478zbXb8-3YN8cPyzPxZNk,1799
3
- vercel_cli/vendor/package.json,sha256=ftECdh0ZRQnkXVJDJphktUpapuA6xQ7LRl8suR_cQpU,1261
3
+ vercel_cli/vendor/package.json,sha256=6Yr4hKJlssuq7KxhUQ7PN9a18-vK2TBOp7YIyEKANiI,1261
4
4
  vercel_cli/vendor/dist/VERCEL_DIR_README.txt,sha256=9dHtD1AyrhKJMfRkWbX6oa9jGfwt-z56X-VKhL-T29Y,520
5
5
  vercel_cli/vendor/dist/builder-worker.js,sha256=RgutTXJcurRisV2NtlruuPDtCBOi8eHSGCo3n4GcCIM,1969
6
6
  vercel_cli/vendor/dist/get-latest-worker.js,sha256=w7nK8nQtlYad_SKuFQGw_sg7_bb-p0uHOf1MYiwrUNs,7964
7
- vercel_cli/vendor/dist/index.js,sha256=0Iy8VTmzCGhFVTVrQzXW1xA4wVPi6llfJ7E3rYyvV3E,8852396
7
+ vercel_cli/vendor/dist/index.js,sha256=8Q4SpiqIMc_sBRi3ymigZHNTBqeL3YG8FvdIDQfUNyE,8855523
8
8
  vercel_cli/vendor/dist/vc.js,sha256=AAC4u6uwjpO0KfFVuLRs5YWXjW4aMCkgSj_45hR3W8k,340
9
9
  vercel_cli/vendor/node_modules/.package-lock.json,sha256=WW2AxnyFnHx0CyUeIx_d85tcf1RqMlg6zpQ0Fgan8fY,1002
10
10
  vercel_cli/vendor/node_modules/@vercel/build-utils/CHANGELOG.md,sha256=ji-V7NgIUH1Fj-lmUh0LmIxhS6bq_0TW7xFH0e9yiF8,18051
@@ -97,7 +97,7 @@ vercel_cli/vendor/node_modules/@vercel/python/LICENSE,sha256=sHDXe_ssUqHdaZbeDOX
97
97
  vercel_cli/vendor/node_modules/@vercel/python/package.json,sha256=tIyyNkdzUM3UhxWNM9JNiKyPnwCXLSx3nYKMQq24UTw,1044
98
98
  vercel_cli/vendor/node_modules/@vercel/python/vc_init.py,sha256=lNNCD5t4cXG6Xc0_HQvnCUblXrp47VZIC3fFiHi2_hE,27477
99
99
  vercel_cli/vendor/node_modules/@vercel/python/dist/index.js,sha256=0cjK0Hujjgpb4dwryWKVbf1s6q_wfDi1TOQYn8UYtLw,102883
100
- vercel_cli-47.0.4.dist-info/METADATA,sha256=y3Ul4COgowINaRLW7IJaRBUnEaK1F8oP5HadVw3X4Js,7085
101
- vercel_cli-47.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
102
- vercel_cli-47.0.4.dist-info/entry_points.txt,sha256=3iHkg20gi2BZorK1g5UlyZY3tN5E1vJX6PX5-ibn9fI,83
103
- vercel_cli-47.0.4.dist-info/RECORD,,
100
+ vercel_cli-47.0.7.dist-info/METADATA,sha256=4rxevbpwUBfOiUglpgGGhwW9p20pGpiKO1dql7B84no,7085
101
+ vercel_cli-47.0.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
102
+ vercel_cli-47.0.7.dist-info/entry_points.txt,sha256=3iHkg20gi2BZorK1g5UlyZY3tN5E1vJX6PX5-ibn9fI,83
103
+ vercel_cli-47.0.7.dist-info/RECORD,,