@vercel/python 13.0.4 → 14.1.0
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.
- package/dist/index.js +1883 -248
- package/package.json +4 -4
- package/templates/vc_fastapi_static.py +14 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@vercel/python-analysis": "0.14.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@vercel/build-utils": "14.
|
|
20
|
+
"@vercel/build-utils": "14.10.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@renovatebot/pep440": "4.2.1",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"smol-toml": "1.5.2",
|
|
39
39
|
"vitest": "4.1.10",
|
|
40
40
|
"which": "3.0.0",
|
|
41
|
-
"@vercel/build-utils": "14.9.3",
|
|
42
41
|
"@vercel/error-utils": "2.2.1",
|
|
43
|
-
"@vercel/python-runtime": "0.
|
|
42
|
+
"@vercel/python-runtime": "0.23.0",
|
|
43
|
+
"@vercel/build-utils": "14.10.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "node ../../utils/build-builder.mjs",
|
|
@@ -527,6 +527,9 @@ def collect(
|
|
|
527
527
|
# app.include_router() with a frontend build.
|
|
528
528
|
for ctx in _effective_low_priority_routes(route):
|
|
529
529
|
if suppress_middleware_mounts and (_frontend_has_dependencies(ctx) or has_middleware):
|
|
530
|
+
shadow_prefix = prefix + ctx.frontend_prefix
|
|
531
|
+
sub_mounts = [s for s in mounts if s.urlPath.startswith(shadow_prefix.rstrip("/") + "/")]
|
|
532
|
+
shadow_routes.append(_subtree_shadow_route(shadow_prefix, sub_mounts))
|
|
530
533
|
continue
|
|
531
534
|
for r in ctx.original_route.routes:
|
|
532
535
|
if m := StaticMount.from_route(
|
|
@@ -534,13 +537,22 @@ def collect(
|
|
|
534
537
|
):
|
|
535
538
|
frontends.append(m)
|
|
536
539
|
|
|
537
|
-
# app.frontend() builds.
|
|
540
|
+
# app.frontend() builds. Prepend so own frontends sort before included ones,
|
|
541
|
+
# matching _iter_low_priority_routes. Own wins any same-prefix tie.
|
|
542
|
+
own_frontends: list[StaticMount] = []
|
|
538
543
|
for group in _frontend_groups(router):
|
|
539
544
|
if suppress_middleware_mounts and (_frontend_has_dependencies(group) or has_middleware):
|
|
545
|
+
for route in group.routes:
|
|
546
|
+
if m := StaticMount.from_route(route, prefix, frontend=True):
|
|
547
|
+
shadow_prefix = m.urlPath.rstrip("/")
|
|
548
|
+
sub_mounts = [s for s in mounts if s.urlPath.startswith(shadow_prefix.rstrip("/") + "/")]
|
|
549
|
+
shadow_routes.append(_subtree_shadow_route(shadow_prefix, sub_mounts))
|
|
550
|
+
break
|
|
540
551
|
continue
|
|
541
552
|
for route in group.routes:
|
|
542
553
|
if m := StaticMount.from_route(route, prefix, frontend=True):
|
|
543
|
-
|
|
554
|
+
own_frontends.append(m)
|
|
555
|
+
frontends = own_frontends + frontends
|
|
544
556
|
|
|
545
557
|
# A frontend is low-priority: every route shadows it, and one whose prefix
|
|
546
558
|
# an earlier mount owns is unreachable (Starlette dispatches to the mount
|