vercel-cli 41.1.0__py3-none-any.whl → 46.1.0__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.

Files changed (30) hide show
  1. vercel_cli/vendor/README.md +1 -1
  2. vercel_cli/vendor/dist/index.js +72500 -59234
  3. vercel_cli/vendor/node_modules/.package-lock.json +12 -6
  4. vercel_cli/vendor/node_modules/@vercel/build-utils/CHANGELOG.md +168 -0
  5. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/node-version.d.ts +1 -0
  6. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/node-version.js +7 -1
  7. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/run-user-scripts.d.ts +11 -12
  8. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/run-user-scripts.js +220 -87
  9. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/get-prefixed-env-vars.js +4 -1
  10. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/index.js +393 -155
  11. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/lambda.d.ts +44 -4
  12. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/lambda.js +91 -3
  13. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/prerender.d.ts +12 -1
  14. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/prerender.js +3 -2
  15. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/schemas.d.ts +41 -0
  16. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/schemas.js +43 -1
  17. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/types.d.ts +41 -10
  18. vercel_cli/vendor/node_modules/@vercel/build-utils/package.json +3 -2
  19. vercel_cli/vendor/node_modules/@vercel/detect-agent/LICENSE +202 -0
  20. vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.d.ts +1 -0
  21. vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.js +66 -0
  22. vercel_cli/vendor/node_modules/@vercel/detect-agent/package.json +31 -0
  23. vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +29 -37
  24. vercel_cli/vendor/node_modules/@vercel/python/package.json +2 -2
  25. vercel_cli/vendor/node_modules/@vercel/python/vc_init.py +8 -7
  26. vercel_cli/vendor/package.json +4 -3
  27. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/METADATA +1 -1
  28. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/RECORD +30 -26
  29. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/WHEEL +0 -0
  30. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2017 Vercel, Inc.
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1 @@
1
+ export declare function determineAgent(): Promise<string | false>;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var src_exports = {};
20
+ __export(src_exports, {
21
+ determineAgent: () => determineAgent
22
+ });
23
+ module.exports = __toCommonJS(src_exports);
24
+ var import_promises = require("node:fs/promises");
25
+ var import_node_fs = require("node:fs");
26
+ const devinLocalPath = "/opt/.devin";
27
+ const CURSOR = "cursor";
28
+ const CURSOR_CLI = "cursor-cli";
29
+ const CLAUDE = "claude";
30
+ const DEVIN = "devin";
31
+ const REPLIT = "replit";
32
+ const GEMINI = "gemini";
33
+ const CODEX = "codex";
34
+ async function determineAgent() {
35
+ if (process.env.AI_AGENT) {
36
+ return process.env.AI_AGENT;
37
+ }
38
+ if (process.env.CURSOR_TRACE_ID) {
39
+ return CURSOR;
40
+ }
41
+ if (process.env.CURSOR_AGENT) {
42
+ return CURSOR_CLI;
43
+ }
44
+ if (process.env.GEMINI_CLI) {
45
+ return GEMINI;
46
+ }
47
+ if (process.env.CODEX_SANDBOX) {
48
+ return CODEX;
49
+ }
50
+ if (process.env.CLAUDECODE || process.env.CLAUDE_CODE) {
51
+ return CLAUDE;
52
+ }
53
+ if (process.env.REPL_ID) {
54
+ return REPLIT;
55
+ }
56
+ try {
57
+ await (0, import_promises.access)(devinLocalPath, import_node_fs.constants.F_OK);
58
+ return DEVIN;
59
+ } catch (error) {
60
+ return false;
61
+ }
62
+ }
63
+ // Annotate the CommonJS export names for ESM import in node:
64
+ 0 && (module.exports = {
65
+ determineAgent
66
+ });
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@vercel/detect-agent",
3
+ "version": "0.2.0",
4
+ "license": "Apache-2.0",
5
+ "main": "./dist/index.js",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "homepage": "https://vercel.com/docs",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/vercel/vercel.git",
13
+ "directory": "packages/detect-agent"
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "dependencies": {},
19
+ "devDependencies": {
20
+ "vite": "^5.1.6",
21
+ "vitest": "^2.0.1",
22
+ "mock-fs": "5.5.0",
23
+ "@types/mock-fs": "4.13.4"
24
+ },
25
+ "scripts": {
26
+ "build": "node ../../utils/build.mjs",
27
+ "vitest-run": "vitest -c ../../vitest.config.mts",
28
+ "vitest-unit": "glob --absolute 'test/unit/**/*.test.ts' 'test/unit/**/*.test.mts'",
29
+ "type-check": "tsc --noEmit"
30
+ }
31
+ }
@@ -302,9 +302,9 @@ var require_path_key = __commonJS({
302
302
  }
303
303
  });
304
304
 
305
- // ../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
305
+ // ../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/resolveCommand.js
306
306
  var require_resolveCommand = __commonJS({
307
- "../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) {
307
+ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) {
308
308
  "use strict";
309
309
  var path = require("path");
310
310
  var which2 = require_which();
@@ -312,8 +312,7 @@ var require_resolveCommand = __commonJS({
312
312
  function resolveCommandAttempt(parsed, withoutPathExt) {
313
313
  const cwd = process.cwd();
314
314
  const hasCustomCwd = parsed.options.cwd != null;
315
- const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0;
316
- if (shouldSwitchCwd) {
315
+ if (hasCustomCwd) {
317
316
  try {
318
317
  process.chdir(parsed.options.cwd);
319
318
  } catch (err) {
@@ -327,9 +326,7 @@ var require_resolveCommand = __commonJS({
327
326
  });
328
327
  } catch (e) {
329
328
  } finally {
330
- if (shouldSwitchCwd) {
331
- process.chdir(cwd);
332
- }
329
+ process.chdir(cwd);
333
330
  }
334
331
  if (resolved) {
335
332
  resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
@@ -343,9 +340,9 @@ var require_resolveCommand = __commonJS({
343
340
  }
344
341
  });
345
342
 
346
- // ../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/util/escape.js
343
+ // ../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/escape.js
347
344
  var require_escape = __commonJS({
348
- "../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module2) {
345
+ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/escape.js"(exports, module2) {
349
346
  "use strict";
350
347
  var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
351
348
  function escapeCommand(arg) {
@@ -354,8 +351,8 @@ var require_escape = __commonJS({
354
351
  }
355
352
  function escapeArgument(arg, doubleEscapeMetaChars) {
356
353
  arg = `${arg}`;
357
- arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
358
- arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
354
+ arg = arg.replace(/(\\*)"/g, '$1$1\\"');
355
+ arg = arg.replace(/(\\*)$/, "$1$1");
359
356
  arg = `"${arg}"`;
360
357
  arg = arg.replace(metaCharsRegExp, "^$1");
361
358
  if (doubleEscapeMetaChars) {
@@ -394,9 +391,9 @@ var require_shebang_command = __commonJS({
394
391
  }
395
392
  });
396
393
 
397
- // ../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/util/readShebang.js
394
+ // ../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/readShebang.js
398
395
  var require_readShebang = __commonJS({
399
- "../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
396
+ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
400
397
  "use strict";
401
398
  var fs2 = require("fs");
402
399
  var shebangCommand = require_shebang_command();
@@ -1491,9 +1488,9 @@ var require_semver = __commonJS({
1491
1488
  }
1492
1489
  });
1493
1490
 
1494
- // ../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/parse.js
1491
+ // ../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/parse.js
1495
1492
  var require_parse = __commonJS({
1496
- "../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module2) {
1493
+ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/parse.js"(exports, module2) {
1497
1494
  "use strict";
1498
1495
  var path = require("path");
1499
1496
  var niceTry = require_src();
@@ -1577,9 +1574,9 @@ var require_parse = __commonJS({
1577
1574
  }
1578
1575
  });
1579
1576
 
1580
- // ../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/enoent.js
1577
+ // ../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/enoent.js
1581
1578
  var require_enoent = __commonJS({
1582
- "../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module2) {
1579
+ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/enoent.js"(exports, module2) {
1583
1580
  "use strict";
1584
1581
  var isWin = process.platform === "win32";
1585
1582
  function notFoundError(original, syscall) {
@@ -1627,9 +1624,9 @@ var require_enoent = __commonJS({
1627
1624
  }
1628
1625
  });
1629
1626
 
1630
- // ../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/index.js
1627
+ // ../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/index.js
1631
1628
  var require_cross_spawn = __commonJS({
1632
- "../../node_modules/.pnpm/cross-spawn@6.0.6/node_modules/cross-spawn/index.js"(exports, module2) {
1629
+ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/index.js"(exports, module2) {
1633
1630
  "use strict";
1634
1631
  var cp = require("child_process");
1635
1632
  var parse = require_parse();
@@ -1805,9 +1802,9 @@ var require_once = __commonJS({
1805
1802
  }
1806
1803
  });
1807
1804
 
1808
- // ../../node_modules/.pnpm/end-of-stream@1.4.4/node_modules/end-of-stream/index.js
1805
+ // ../../node_modules/.pnpm/end-of-stream@1.4.1/node_modules/end-of-stream/index.js
1809
1806
  var require_end_of_stream = __commonJS({
1810
- "../../node_modules/.pnpm/end-of-stream@1.4.4/node_modules/end-of-stream/index.js"(exports, module2) {
1807
+ "../../node_modules/.pnpm/end-of-stream@1.4.1/node_modules/end-of-stream/index.js"(exports, module2) {
1811
1808
  var once = require_once();
1812
1809
  var noop = function() {
1813
1810
  };
@@ -1827,7 +1824,6 @@ var require_end_of_stream = __commonJS({
1827
1824
  var rs = stream._readableState;
1828
1825
  var readable = opts.readable || opts.readable !== false && stream.readable;
1829
1826
  var writable = opts.writable || opts.writable !== false && stream.writable;
1830
- var cancelled = false;
1831
1827
  var onlegacyfinish = function() {
1832
1828
  if (!stream.writable)
1833
1829
  onfinish();
@@ -1849,14 +1845,9 @@ var require_end_of_stream = __commonJS({
1849
1845
  callback.call(stream, err);
1850
1846
  };
1851
1847
  var onclose = function() {
1852
- process.nextTick(onclosenexttick);
1853
- };
1854
- var onclosenexttick = function() {
1855
- if (cancelled)
1856
- return;
1857
- if (readable && !(rs && (rs.ended && !rs.destroyed)))
1848
+ if (readable && !(rs && rs.ended))
1858
1849
  return callback.call(stream, new Error("premature close"));
1859
- if (writable && !(ws && (ws.ended && !ws.destroyed)))
1850
+ if (writable && !(ws && ws.ended))
1860
1851
  return callback.call(stream, new Error("premature close"));
1861
1852
  };
1862
1853
  var onrequest = function() {
@@ -1881,7 +1872,6 @@ var require_end_of_stream = __commonJS({
1881
1872
  stream.on("error", onerror);
1882
1873
  stream.on("close", onclose);
1883
1874
  return function() {
1884
- cancelled = true;
1885
1875
  stream.removeListener("complete", onfinish);
1886
1876
  stream.removeListener("abort", onclose);
1887
1877
  stream.removeListener("request", onrequest);
@@ -3095,15 +3085,17 @@ var build = async ({
3095
3085
  const entrypointWithSuffix = `${entrypoint}${suffix}`;
3096
3086
  (0, import_build_utils3.debug)("Entrypoint with suffix is", entrypointWithSuffix);
3097
3087
  const handlerPyContents = originalHandlerPyContents.replace(/__VC_HANDLER_MODULE_NAME/g, moduleName).replace(/__VC_HANDLER_ENTRYPOINT/g, entrypointWithSuffix);
3088
+ const predefinedExcludes = [
3089
+ ".git/**",
3090
+ ".vercel/**",
3091
+ ".pnpm-store/**",
3092
+ "**/node_modules/**",
3093
+ "**/.next/**",
3094
+ "**/.nuxt/**"
3095
+ ];
3098
3096
  const globOptions = {
3099
3097
  cwd: workPath,
3100
- ignore: config && typeof config.excludeFiles === "string" ? config.excludeFiles : [
3101
- ".git/**",
3102
- ".vercel/**",
3103
- "**/node_modules/**",
3104
- "**/.next/**",
3105
- "**/.nuxt/**"
3106
- ]
3098
+ ignore: config && typeof config.excludeFiles === "string" ? [...predefinedExcludes, config.excludeFiles] : predefinedExcludes
3107
3099
  };
3108
3100
  const files = await (0, import_build_utils3.glob)("**", globOptions);
3109
3101
  const handlerPyFilename = "vc__handler__python";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "4.7.1",
3
+ "version": "5.0.0",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -19,7 +19,7 @@
19
19
  "@types/jest": "27.4.1",
20
20
  "@types/node": "14.18.33",
21
21
  "@types/which": "3.0.0",
22
- "@vercel/build-utils": "9.1.0",
22
+ "@vercel/build-utils": "11.0.0",
23
23
  "cross-env": "7.0.3",
24
24
  "execa": "^1.0.0",
25
25
  "fs-extra": "11.1.1",
@@ -171,6 +171,11 @@ if 'VERCEL_IPC_PATH' in os.environ:
171
171
  if not self.parse_request():
172
172
  return
173
173
 
174
+ if self.path == '/_vercel/ping':
175
+ self.send_response(200)
176
+ self.end_headers()
177
+ return
178
+
174
179
  invocationId = self.headers.get('x-vercel-internal-invocation-id')
175
180
  requestId = int(self.headers.get('x-vercel-internal-request-id'))
176
181
  del self.headers['x-vercel-internal-invocation-id']
@@ -274,28 +279,24 @@ if 'VERCEL_IPC_PATH' in os.environ:
274
279
  env[key] = wsgi_encoding_dance(value)
275
280
  for k, v in self.headers.items():
276
281
  env['HTTP_' + k.replace('-', '_').upper()] = v
277
- # Response body
278
- body = BytesIO()
279
282
 
280
283
  def start_response(status, headers, exc_info=None):
281
284
  self.send_response(int(status.split(' ')[0]))
282
285
  for name, value in headers:
283
286
  self.send_header(name, value)
284
287
  self.end_headers()
285
- return body.write
288
+ return self.wfile.write
286
289
 
287
290
  # Call the application
288
291
  response = app(env, start_response)
289
292
  try:
290
293
  for data in response:
291
294
  if data:
292
- body.write(data)
295
+ self.wfile.write(data)
296
+ self.wfile.flush()
293
297
  finally:
294
298
  if hasattr(response, 'close'):
295
299
  response.close()
296
- body = body.getvalue()
297
- self.wfile.write(body)
298
- self.wfile.flush()
299
300
  else:
300
301
  from urllib.parse import urlparse
301
302
  from io import BytesIO
@@ -4,8 +4,9 @@
4
4
  "vercel": "./dist/vc.js"
5
5
  },
6
6
  "dependencies": {
7
- "@vercel/build-utils": "9.3.0",
8
- "@vercel/python": "4.7.1"
7
+ "@vercel/build-utils": "11.0.2",
8
+ "@vercel/detect-agent": "0.2.0",
9
+ "@vercel/python": "5.0.0"
9
10
  },
10
11
  "description": "The command-line interface for Vercel",
11
12
  "engines": {
@@ -36,5 +37,5 @@
36
37
  "vitest-run": "vitest --config ./vitest.config.mts",
37
38
  "vitest-unit": "jest test/unit/ --listTests"
38
39
  },
39
- "version": "41.1.0"
40
+ "version": "46.1.0"
40
41
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vercel-cli
3
- Version: 41.1.0
3
+ Version: 46.1.0
4
4
  Summary: Vercel CLI packaged for Python (bundled Node.js, vendored npm)
5
5
  Requires-Python: >=3.8
6
6
  Requires-Dist: nodejs-wheel-binaries==22.16.0