vercel 54.7.1 → 54.9.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/chunks/{add-67QG24DA.js → add-PFVGXHF2.js} +12 -12
- package/dist/chunks/{chunk-IXR7P5OR.js → chunk-27O5ZTLD.js} +9 -9
- package/dist/chunks/{chunk-FQ5AMV7J.js → chunk-2KRTC3Z6.js} +5 -5
- package/dist/chunks/{chunk-ACS2IKKO.js → chunk-2LJ4CNBS.js} +341 -179
- package/dist/chunks/{chunk-KP6S4KU2.js → chunk-3XKN4LMN.js} +34 -37
- package/dist/chunks/{chunk-ZTHVV4KB.js → chunk-4NDOMD3E.js} +1 -1
- package/dist/chunks/{chunk-OAUXTVXM.js → chunk-4XMJHCJ5.js} +2 -2
- package/dist/chunks/{chunk-CJPMAEBA.js → chunk-5QPKXSAQ.js} +4 -4
- package/dist/chunks/{chunk-HTOH3MSD.js → chunk-5SYDEK2N.js} +1 -1
- package/dist/chunks/{chunk-LOQRUMOE.js → chunk-5ZJHY4AC.js} +3 -3
- package/dist/chunks/{chunk-XQUJUKTN.js → chunk-6IQZVQV6.js} +2 -2
- package/dist/chunks/{chunk-PPCVO6KR.js → chunk-AW3VO6AO.js} +3 -3
- package/dist/chunks/{chunk-WWLVPUED.js → chunk-B6C7NMT3.js} +2 -2
- package/dist/chunks/{chunk-N733ZD4W.js → chunk-BBJUIDZF.js} +1 -1
- package/dist/chunks/{chunk-VWXC5XIE.js → chunk-BLSNH6GW.js} +4 -4
- package/dist/chunks/{chunk-GIJMTTDG.js → chunk-CNZVD6AY.js} +195 -243
- package/dist/chunks/{chunk-TJQZGB6S.js → chunk-DAASB6YQ.js} +2 -2
- package/dist/chunks/{chunk-4CIXZOP4.js → chunk-DPXUXH7G.js} +1 -1
- package/dist/chunks/{chunk-3EOZ4ZDJ.js → chunk-FMN3NXRC.js} +2 -2
- package/dist/chunks/{chunk-2SYGBHZU.js → chunk-FRCPMIYP.js} +2 -2
- package/dist/chunks/{chunk-PBX6K5OJ.js → chunk-GHIWUCX4.js} +9 -9
- package/dist/chunks/{chunk-7HAY2TY5.js → chunk-IQQJHYW4.js} +3 -3
- package/dist/chunks/{chunk-ZCMQ43RC.js → chunk-KV23GR7J.js} +1 -1
- package/dist/chunks/{chunk-L6Q2EQPI.js → chunk-LJ5WXXG6.js} +2 -0
- package/dist/chunks/{chunk-LOS7HHU3.js → chunk-LKBI43XK.js} +1 -1
- package/dist/chunks/{chunk-IDFKAJW3.js → chunk-LN6B7ZI3.js} +1 -1
- package/dist/chunks/{chunk-GVL6A2EH.js → chunk-MHQ3YMRD.js} +2 -2
- package/dist/chunks/{chunk-2R5WYHZW.js → chunk-NGRSQRSN.js} +2 -2
- package/dist/chunks/{chunk-7OUZIPHA.js → chunk-NHGCQRK5.js} +2 -2
- package/dist/chunks/{chunk-TIJBJ7EO.js → chunk-O4C4A7HM.js} +2 -2
- package/dist/chunks/{chunk-6ABZRR5D.js → chunk-PQ6FQ427.js} +8 -8
- package/dist/chunks/{chunk-XDU5XSTQ.js → chunk-QED7VSDY.js} +3 -3
- package/dist/chunks/{chunk-CMQXECHW.js → chunk-RM4XGGZO.js} +2 -2
- package/dist/chunks/{chunk-POF76PSB.js → chunk-RM5VGLCD.js} +6 -6
- package/dist/chunks/{chunk-CPWI2SWV.js → chunk-TAHQ6VAS.js} +2 -2
- package/dist/chunks/{chunk-FV5RQPKY.js → chunk-TCF6MGBY.js} +1 -1
- package/dist/chunks/{chunk-AOJHEPS4.js → chunk-WEVQWSBT.js} +1 -1
- package/dist/chunks/{chunk-JWLKJA7N.js → chunk-WHVOX5C7.js} +6 -6
- package/dist/chunks/{chunk-ILYEE673.js → chunk-XK2FJELV.js} +3 -3
- package/dist/chunks/{chunk-ZQKJVHXY.js → chunk-Z5SBJH6L.js} +13 -0
- package/dist/chunks/{chunk-QN7GS5KD.js → chunk-ZBDCE356.js} +3 -3
- package/dist/chunks/{chunk-WGF7XCUT.js → chunk-ZEG75UDS.js} +9 -9
- package/dist/chunks/{chunk-O7SEN4RY.js → chunk-ZTPOJE63.js} +2 -2
- package/dist/chunks/{compile-vercel-config-R5X7XQH3.js → compile-vercel-config-7U2LIW43.js} +6 -6
- package/dist/chunks/{delete-QUCIXBSR.js → delete-DE3UHP2L.js} +9 -9
- package/dist/chunks/{disable-N7JFRNT5.js → disable-B6GG7O7J.js} +9 -9
- package/dist/chunks/{discard-PDT55IX4.js → discard-MGA5ZYKO.js} +9 -9
- package/dist/chunks/{edit-C35BISPR.js → edit-L4Y2YIBV.js} +11 -11
- package/dist/chunks/{enable-AIKCOZPH.js → enable-O7FEPQAF.js} +9 -9
- package/dist/chunks/{exec-5MN7VTSE.js → exec-JSOL4CYJ.js} +2 -2
- package/dist/chunks/{export-SQBM4PT6.js → export-UB7HUJAY.js} +9 -9
- package/dist/chunks/{inspect-FQ6NOVDU.js → inspect-IV2WSOKU.js} +12 -12
- package/dist/chunks/{list-XJIRH6SE.js → list-7S77FPG6.js} +9 -9
- package/dist/chunks/{list-ZJVOBYVT.js → list-IRG73TQ7.js} +13 -13
- package/dist/chunks/{ls-SOTFIBD6.js → ls-FP6I5BJ4.js} +12 -12
- package/dist/chunks/{publish-US2CACSX.js → publish-ZEXEMS6A.js} +9 -9
- package/dist/chunks/{query-DUJSSD3L.js → query-F5RJNYCZ.js} +11 -11
- package/dist/chunks/{reorder-Y5N4VOO7.js → reorder-JJY5X5NU.js} +9 -9
- package/dist/chunks/{restore-TTEF3WC7.js → restore-753XEXA7.js} +9 -9
- package/dist/chunks/{rm-AARNIFI5.js → rm-5DVLPTLD.js} +12 -12
- package/dist/chunks/{routes-IBID4NSZ.js → routes-3OHKNMGT.js} +3 -3
- package/dist/chunks/{rule-inspect-TQBZNJUL.js → rule-inspect-BA25TI3G.js} +12 -12
- package/dist/chunks/{rules-QWOMXETM.js → rules-JL4NLPIC.js} +10 -10
- package/dist/chunks/{schema-CZIQHHUV.js → schema-NL2KEDWL.js} +11 -11
- package/dist/chunks/{types-LU2G5DD3.js → types-P6JKZFEY.js} +5 -5
- package/dist/chunks/{update-A2FXWT7E.js → update-3LTUTJJB.js} +12 -12
- package/dist/commands/build/index.js +25 -26
- package/dist/commands/deploy/index.js +27 -27
- package/dist/commands/dev/index.js +19 -19
- package/dist/commands/env/index.js +22 -22
- package/dist/commands/link/index.js +22 -22
- package/dist/commands/list/index.js +12 -12
- package/dist/commands-bulk.js +3672 -2790
- package/dist/index.js +47 -49
- package/dist/version.mjs +1 -1
- package/package.json +23 -22
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
TelemetryClient,
|
|
9
9
|
require_dist as require_dist2,
|
|
10
10
|
require_graceful_fs
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DPXUXH7G.js";
|
|
12
12
|
import {
|
|
13
13
|
buildCommandWithYes,
|
|
14
14
|
getPreservedArgsForEnvPull,
|
|
15
15
|
outputActionRequired,
|
|
16
16
|
outputAgentError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NHGCQRK5.js";
|
|
18
18
|
import {
|
|
19
19
|
require_ms,
|
|
20
20
|
stamp_default
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
require_string_width,
|
|
35
35
|
require_strip_ansi,
|
|
36
36
|
yesOption
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-6IQZVQV6.js";
|
|
38
38
|
import {
|
|
39
39
|
APIError,
|
|
40
40
|
CantParseJSONFile,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
isAPIError,
|
|
50
50
|
packageName,
|
|
51
51
|
require_lib
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-LN6B7ZI3.js";
|
|
53
53
|
import {
|
|
54
54
|
pkg_default
|
|
55
55
|
} from "./chunk-P4QNYOFB.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
require_cli_spinners,
|
|
64
64
|
require_dist,
|
|
65
65
|
require_escape_string_regexp
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-Z5SBJH6L.js";
|
|
67
67
|
import {
|
|
68
68
|
require_ansi_styles,
|
|
69
69
|
require_source,
|
|
@@ -16011,19 +16011,17 @@ var require_frameworks = __commonJS({
|
|
|
16011
16011
|
experimental: true
|
|
16012
16012
|
},
|
|
16013
16013
|
{
|
|
16014
|
-
name: "Sanity
|
|
16015
|
-
slug: "sanity
|
|
16016
|
-
demo: "https://
|
|
16014
|
+
name: "Sanity",
|
|
16015
|
+
slug: "sanity",
|
|
16016
|
+
demo: "https://template-studio-clean.sanity.dev",
|
|
16017
16017
|
logo: "https://api-frameworks.vercel.sh/framework-logos/sanity.svg",
|
|
16018
|
-
|
|
16018
|
+
darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/sanity-dark.svg",
|
|
16019
|
+
tagline: "The back-end built for AI content operations. Power web, mobile, and agentic applications at scale.",
|
|
16019
16020
|
description: "A Sanity Studio",
|
|
16020
16021
|
website: "https://www.sanity.io",
|
|
16021
16022
|
envPrefix: "SANITY_STUDIO_",
|
|
16022
16023
|
detectors: {
|
|
16023
16024
|
some: [
|
|
16024
|
-
{
|
|
16025
|
-
path: "sanity.json"
|
|
16026
|
-
},
|
|
16027
16025
|
{
|
|
16028
16026
|
path: "sanity.config.js"
|
|
16029
16027
|
},
|
|
@@ -16039,8 +16037,7 @@ var require_frameworks = __commonJS({
|
|
|
16039
16037
|
],
|
|
16040
16038
|
every: [
|
|
16041
16039
|
{
|
|
16042
|
-
|
|
16043
|
-
matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"sanity":\\s*"\\^?3\\..*"[^}]*}'
|
|
16040
|
+
matchPackage: "sanity"
|
|
16044
16041
|
}
|
|
16045
16042
|
]
|
|
16046
16043
|
},
|
|
@@ -16059,6 +16056,7 @@ var require_frameworks = __commonJS({
|
|
|
16059
16056
|
value: "dist"
|
|
16060
16057
|
}
|
|
16061
16058
|
},
|
|
16059
|
+
dependency: "sanity",
|
|
16062
16060
|
getOutputDirName: async () => "dist",
|
|
16063
16061
|
defaultRoutes: [
|
|
16064
16062
|
{
|
|
@@ -16071,10 +16069,10 @@ var require_frameworks = __commonJS({
|
|
|
16071
16069
|
]
|
|
16072
16070
|
},
|
|
16073
16071
|
{
|
|
16074
|
-
name: "Sanity",
|
|
16075
|
-
slug: "sanity",
|
|
16072
|
+
name: "Sanity (v2)",
|
|
16073
|
+
slug: "sanity-v2",
|
|
16076
16074
|
demo: "https://sanity-studio-template.vercel.app",
|
|
16077
|
-
logo: "https://api-frameworks.vercel.sh/framework-logos/sanity.svg",
|
|
16075
|
+
logo: "https://api-frameworks.vercel.sh/framework-logos/sanity-v2.svg",
|
|
16078
16076
|
tagline: "The structured content platform.",
|
|
16079
16077
|
description: "A Sanity Studio",
|
|
16080
16078
|
website: "https://www.sanity.io",
|
|
@@ -16083,18 +16081,12 @@ var require_frameworks = __commonJS({
|
|
|
16083
16081
|
some: [
|
|
16084
16082
|
{
|
|
16085
16083
|
path: "sanity.json"
|
|
16086
|
-
}
|
|
16087
|
-
|
|
16088
|
-
|
|
16089
|
-
},
|
|
16090
|
-
{
|
|
16091
|
-
path: "sanity.config.jsx"
|
|
16092
|
-
},
|
|
16093
|
-
{
|
|
16094
|
-
path: "sanity.config.ts"
|
|
16095
|
-
},
|
|
16084
|
+
}
|
|
16085
|
+
],
|
|
16086
|
+
every: [
|
|
16096
16087
|
{
|
|
16097
|
-
path: "
|
|
16088
|
+
path: "package.json",
|
|
16089
|
+
matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"@sanity/cli":\\s*"\\^?2\\..*"[^}]*}'
|
|
16098
16090
|
}
|
|
16099
16091
|
]
|
|
16100
16092
|
},
|
|
@@ -22687,11 +22679,9 @@ var require_utils3 = __commonJS({
|
|
|
22687
22679
|
inferRuntimeFromFramework: () => inferRuntimeFromFramework,
|
|
22688
22680
|
inferServiceRuntime: () => inferServiceRuntime,
|
|
22689
22681
|
isFrontendFramework: () => isFrontendFramework,
|
|
22690
|
-
isPublicServicesEnabled: () => isPublicServicesEnabled2,
|
|
22691
22682
|
isRouteOwningBuilder: () => isRouteOwningBuilder2,
|
|
22692
22683
|
isStaticBuild: () => isStaticBuild2,
|
|
22693
|
-
readVercelConfig: () => readVercelConfig
|
|
22694
|
-
validateServicesConfigGate: () => validateServicesConfigGate
|
|
22684
|
+
readVercelConfig: () => readVercelConfig
|
|
22695
22685
|
});
|
|
22696
22686
|
module.exports = __toCommonJS2(utils_exports);
|
|
22697
22687
|
var import_framework_helpers = __require("@vercel/build-utils/dist/framework-helpers");
|
|
@@ -22708,18 +22698,6 @@ var require_utils3 = __commonJS({
|
|
|
22708
22698
|
return false;
|
|
22709
22699
|
}
|
|
22710
22700
|
}
|
|
22711
|
-
function isPublicServicesEnabled2() {
|
|
22712
|
-
return process.env.VERCEL_USE_SERVICES === "1" || process.env.VERCEL_USE_SERVICES?.toLowerCase() === "true";
|
|
22713
|
-
}
|
|
22714
|
-
function validateServicesConfigGate(config) {
|
|
22715
|
-
if (config?.services !== void 0 && !isPublicServicesEnabled2()) {
|
|
22716
|
-
return {
|
|
22717
|
-
code: "INVALID_VERCEL_CONFIG",
|
|
22718
|
-
message: "Invalid vercel.json - should NOT have additional property `services`. Please remove it."
|
|
22719
|
-
};
|
|
22720
|
-
}
|
|
22721
|
-
return null;
|
|
22722
|
-
}
|
|
22723
22701
|
var INTERNAL_QUEUES_PREFIX = "/_svc/_queues";
|
|
22724
22702
|
function normalizeInternalServiceEntrypoint(entrypoint) {
|
|
22725
22703
|
const normalized = entrypoint.replace(/\\/g, "/").replace(/^\/+/, "").replace(/\.[^/.]+$/, "");
|
|
@@ -22804,10 +22782,6 @@ var require_utils3 = __commonJS({
|
|
|
22804
22782
|
try {
|
|
22805
22783
|
const content = await fs5.readFile("vercel.json");
|
|
22806
22784
|
const config = JSON.parse(content.toString());
|
|
22807
|
-
const gateError = validateServicesConfigGate(config);
|
|
22808
|
-
if (gateError) {
|
|
22809
|
-
return { config: null, error: gateError };
|
|
22810
|
-
}
|
|
22811
22785
|
return { config, error: null };
|
|
22812
22786
|
} catch {
|
|
22813
22787
|
return {
|
|
@@ -22825,10 +22799,6 @@ var require_utils3 = __commonJS({
|
|
|
22825
22799
|
const { parse: tomlParse3 } = await import("smol-toml");
|
|
22826
22800
|
const content = await fs5.readFile("vercel.toml");
|
|
22827
22801
|
const config = tomlParse3(content.toString());
|
|
22828
|
-
const gateError = validateServicesConfigGate(config);
|
|
22829
|
-
if (gateError) {
|
|
22830
|
-
return { config: null, error: gateError };
|
|
22831
|
-
}
|
|
22832
22802
|
return { config, error: null };
|
|
22833
22803
|
} catch {
|
|
22834
22804
|
return {
|
|
@@ -24101,8 +24071,8 @@ var require_auto_detect = __commonJS({
|
|
|
24101
24071
|
warnings: [],
|
|
24102
24072
|
errors: [
|
|
24103
24073
|
{
|
|
24104
|
-
code: "
|
|
24105
|
-
message: "No services detected. Configure
|
|
24074
|
+
code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
|
|
24075
|
+
message: "No services detected. Configure `experimentalServices` in vercel.json or ensure a framework exists at project root, frontend/, or apps/web/."
|
|
24106
24076
|
}
|
|
24107
24077
|
]
|
|
24108
24078
|
};
|
|
@@ -27963,8 +27933,7 @@ var require_detect_services = __commonJS({
|
|
|
27963
27933
|
fs: fs5,
|
|
27964
27934
|
workPath,
|
|
27965
27935
|
detectEntrypoint,
|
|
27966
|
-
configuredServices: providedConfiguredServices
|
|
27967
|
-
configuredServicesType
|
|
27936
|
+
configuredServices: providedConfiguredServices
|
|
27968
27937
|
} = options;
|
|
27969
27938
|
const scopedFs = workPath ? fs5.chdir(workPath) : fs5;
|
|
27970
27939
|
const { config: vercelConfig, error: configError } = await (0, import_utils4.readVercelConfig)(scopedFs);
|
|
@@ -27979,8 +27948,7 @@ var require_detect_services = __commonJS({
|
|
|
27979
27948
|
});
|
|
27980
27949
|
}
|
|
27981
27950
|
const hasProvidedConfiguredServices = providedConfiguredServices && Object.keys(providedConfiguredServices).length > 0;
|
|
27982
|
-
const
|
|
27983
|
-
const configuredServices = hasProvidedConfiguredServices ? providedConfiguredServices : hasNonEmptyPublicServicesConfig ? vercelConfig?.services : vercelConfig?.experimentalServices;
|
|
27951
|
+
const configuredServices = hasProvidedConfiguredServices ? providedConfiguredServices : vercelConfig?.experimentalServices;
|
|
27984
27952
|
const hasConfiguredServices = configuredServices && Object.keys(configuredServices).length > 0;
|
|
27985
27953
|
if (!hasConfiguredServices) {
|
|
27986
27954
|
const detectors = [
|
|
@@ -28002,8 +27970,8 @@ var require_detect_services = __commonJS({
|
|
|
28002
27970
|
routes: emptyRoutes(),
|
|
28003
27971
|
errors: [
|
|
28004
27972
|
{
|
|
28005
|
-
code: "
|
|
28006
|
-
message: "No services configured. Add `
|
|
27973
|
+
code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
|
|
27974
|
+
message: "No services configured. Add `experimentalServices` to vercel.json."
|
|
28007
27975
|
}
|
|
28008
27976
|
],
|
|
28009
27977
|
warnings: []
|
|
@@ -28012,20 +27980,14 @@ var require_detect_services = __commonJS({
|
|
|
28012
27980
|
const result = await (0, import_resolve.resolveAllConfiguredServices)(
|
|
28013
27981
|
configuredServices,
|
|
28014
27982
|
scopedFs,
|
|
28015
|
-
"configured"
|
|
28016
|
-
{
|
|
28017
|
-
requireFileEntrypointForBackendRuntimes: Boolean(
|
|
28018
|
-
hasNonEmptyPublicServicesConfig
|
|
28019
|
-
)
|
|
28020
|
-
}
|
|
27983
|
+
"configured"
|
|
28021
27984
|
);
|
|
28022
27985
|
const routes = generateServicesRoutes2(result.services);
|
|
28023
27986
|
return withResolvedResult({
|
|
28024
27987
|
services: result.services,
|
|
28025
27988
|
source: "configured",
|
|
28026
|
-
//
|
|
28027
|
-
|
|
28028
|
-
useImplicitEnvInjection: !hasNonEmptyPublicServicesConfig,
|
|
27989
|
+
// experimentalServices uses the legacy `{NAME}_URL` injection.
|
|
27990
|
+
useImplicitEnvInjection: true,
|
|
28029
27991
|
routes,
|
|
28030
27992
|
errors: result.errors,
|
|
28031
27993
|
warnings: []
|
|
@@ -28516,8 +28478,8 @@ var require_get_services_builders = __commonJS({
|
|
|
28516
28478
|
builders: null,
|
|
28517
28479
|
errors: [
|
|
28518
28480
|
{
|
|
28519
|
-
code: "
|
|
28520
|
-
message: "No services configured. Add `
|
|
28481
|
+
code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
|
|
28482
|
+
message: "No services configured. Add `experimentalServices` to vercel.json."
|
|
28521
28483
|
}
|
|
28522
28484
|
],
|
|
28523
28485
|
warnings: warningResponses,
|
|
@@ -28648,10 +28610,10 @@ var require_detect_builders = __commonJS({
|
|
|
28648
28610
|
return publicBuilder ? publicBuilder.src.replace("/**/*", "") : null;
|
|
28649
28611
|
}
|
|
28650
28612
|
async function detectBuilders2(files, pkg, options = {}) {
|
|
28651
|
-
const {
|
|
28613
|
+
const { experimentalServices, projectSettings = {} } = options;
|
|
28652
28614
|
const { framework } = projectSettings;
|
|
28653
|
-
const configuredServices =
|
|
28654
|
-
const configuredServicesType =
|
|
28615
|
+
const configuredServices = experimentalServices;
|
|
28616
|
+
const configuredServicesType = "experimentalServices";
|
|
28655
28617
|
const hasServicesConfig = configuredServices != null && typeof configuredServices === "object";
|
|
28656
28618
|
if (hasServicesConfig || framework === "services") {
|
|
28657
28619
|
return (0, import_get_services_builders.getServicesBuilders)({
|
|
@@ -36958,7 +36920,7 @@ var require_package = __commonJS({
|
|
|
36958
36920
|
"../client/package.json"(exports, module) {
|
|
36959
36921
|
module.exports = {
|
|
36960
36922
|
name: "@vercel/client",
|
|
36961
|
-
version: "17.5.
|
|
36923
|
+
version: "17.5.9",
|
|
36962
36924
|
main: "dist/index.js",
|
|
36963
36925
|
typings: "dist/index.d.ts",
|
|
36964
36926
|
homepage: "https://vercel.com",
|
|
@@ -50427,7 +50389,7 @@ async function fetchUser(client) {
|
|
|
50427
50389
|
if (client.authConfig.userId !== res.user.id) {
|
|
50428
50390
|
client.updateAuthConfig({ userId: res.user.id });
|
|
50429
50391
|
try {
|
|
50430
|
-
client.
|
|
50392
|
+
client.persistAuthConfig();
|
|
50431
50393
|
} catch {
|
|
50432
50394
|
output_manager_default.debug("Failed to persist cached userId to auth config.");
|
|
50433
50395
|
}
|
|
@@ -50442,7 +50404,7 @@ async function fetchUser(client) {
|
|
|
50442
50404
|
if (client.authConfig.userId) {
|
|
50443
50405
|
client.updateAuthConfig({ userId: void 0 });
|
|
50444
50406
|
try {
|
|
50445
|
-
client.
|
|
50407
|
+
client.persistAuthConfig();
|
|
50446
50408
|
} catch {
|
|
50447
50409
|
output_manager_default.debug("Failed to persist cached userId to auth config.");
|
|
50448
50410
|
}
|
|
@@ -54549,7 +54511,7 @@ async function login(client, telemetry) {
|
|
|
54549
54511
|
if (isInitialLogin) {
|
|
54550
54512
|
await updateCurrentTeamAfterLogin(client);
|
|
54551
54513
|
}
|
|
54552
|
-
client.
|
|
54514
|
+
client.persistAuthConfig();
|
|
54553
54515
|
client.writeToConfigFile();
|
|
54554
54516
|
output_manager_default.debug(`Saved credentials in "${humanizePath(client.getGlobalPathConfig())}"`);
|
|
54555
54517
|
output_manager_default.print(`
|
|
@@ -54792,7 +54754,7 @@ async function pullEnvRecordsForEnvPull(client, pullId, source, options) {
|
|
|
54792
54754
|
userId: void 0,
|
|
54793
54755
|
expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in
|
|
54794
54756
|
});
|
|
54795
|
-
client.
|
|
54757
|
+
client.persistAuthConfig();
|
|
54796
54758
|
output_manager_default.spinner("Downloading");
|
|
54797
54759
|
return await pullEnvRecords(client, pullId, source, options);
|
|
54798
54760
|
}
|
|
@@ -55029,34 +54991,13 @@ var experimentalServicesMountSchema = {
|
|
|
55029
54991
|
}
|
|
55030
54992
|
]
|
|
55031
54993
|
};
|
|
55032
|
-
var
|
|
55033
|
-
oneOf: [
|
|
55034
|
-
{
|
|
55035
|
-
type: "string",
|
|
55036
|
-
minLength: 1,
|
|
55037
|
-
maxLength: 512
|
|
55038
|
-
},
|
|
55039
|
-
{
|
|
55040
|
-
type: "object",
|
|
55041
|
-
additionalProperties: false,
|
|
55042
|
-
required: ["path"],
|
|
55043
|
-
properties: {
|
|
55044
|
-
path: {
|
|
55045
|
-
type: "string",
|
|
55046
|
-
minLength: 1,
|
|
55047
|
-
maxLength: 512
|
|
55048
|
-
}
|
|
55049
|
-
}
|
|
55050
|
-
}
|
|
55051
|
-
]
|
|
55052
|
-
};
|
|
55053
|
-
var staticServiceScheduleSchema = {
|
|
54994
|
+
var staticExperimentalServiceScheduleSchema = {
|
|
55054
54995
|
type: "string",
|
|
55055
54996
|
minLength: 9,
|
|
55056
54997
|
maxLength: 256,
|
|
55057
54998
|
not: { const: "<dynamic>" }
|
|
55058
54999
|
};
|
|
55059
|
-
var
|
|
55000
|
+
var experimentalServiceScheduleSchema = {
|
|
55060
55001
|
oneOf: [
|
|
55061
55002
|
{
|
|
55062
55003
|
type: "string",
|
|
@@ -55066,11 +55007,11 @@ var serviceScheduleSchema = {
|
|
|
55066
55007
|
{
|
|
55067
55008
|
type: "array",
|
|
55068
55009
|
minItems: 1,
|
|
55069
|
-
items:
|
|
55010
|
+
items: staticExperimentalServiceScheduleSchema
|
|
55070
55011
|
}
|
|
55071
55012
|
]
|
|
55072
55013
|
};
|
|
55073
|
-
var
|
|
55014
|
+
var experimentalServiceQueueTopicSchema = {
|
|
55074
55015
|
type: "object",
|
|
55075
55016
|
additionalProperties: false,
|
|
55076
55017
|
required: ["topic"],
|
|
@@ -55092,7 +55033,7 @@ var serviceQueueTopicSchema = {
|
|
|
55092
55033
|
}
|
|
55093
55034
|
}
|
|
55094
55035
|
};
|
|
55095
|
-
var
|
|
55036
|
+
var experimentalServiceTopicsSchema = {
|
|
55096
55037
|
oneOf: [
|
|
55097
55038
|
{
|
|
55098
55039
|
type: "array",
|
|
@@ -55106,7 +55047,7 @@ var serviceTopicsSchema = {
|
|
|
55106
55047
|
{
|
|
55107
55048
|
type: "array",
|
|
55108
55049
|
minItems: 1,
|
|
55109
|
-
items:
|
|
55050
|
+
items: experimentalServiceQueueTopicSchema
|
|
55110
55051
|
}
|
|
55111
55052
|
]
|
|
55112
55053
|
};
|
|
@@ -55114,25 +55055,6 @@ var envVarNamesSchema = {
|
|
|
55114
55055
|
pattern: "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
55115
55056
|
maxLength: 256
|
|
55116
55057
|
};
|
|
55117
|
-
var envVarSchema = {
|
|
55118
|
-
type: "object",
|
|
55119
|
-
additionalProperties: false,
|
|
55120
|
-
required: ["type", "service"],
|
|
55121
|
-
properties: {
|
|
55122
|
-
type: { const: "service-ref" },
|
|
55123
|
-
service: {
|
|
55124
|
-
type: "string",
|
|
55125
|
-
minLength: 1,
|
|
55126
|
-
maxLength: 64,
|
|
55127
|
-
pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"
|
|
55128
|
-
}
|
|
55129
|
-
}
|
|
55130
|
-
};
|
|
55131
|
-
var envVarRecordSchema = {
|
|
55132
|
-
type: "object",
|
|
55133
|
-
additionalProperties: envVarSchema,
|
|
55134
|
-
propertyNames: envVarNamesSchema
|
|
55135
|
-
};
|
|
55136
55058
|
var experimentalServicesCommonProperties = {
|
|
55137
55059
|
entrypoint: {
|
|
55138
55060
|
type: "string",
|
|
@@ -55222,23 +55144,6 @@ var experimentalServicesRoutableProperties = {
|
|
|
55222
55144
|
maxLength: 63
|
|
55223
55145
|
}
|
|
55224
55146
|
};
|
|
55225
|
-
var servicesCommonProperties = {
|
|
55226
|
-
entrypoint: experimentalServicesCommonProperties.entrypoint,
|
|
55227
|
-
root: experimentalServicesCommonProperties.root,
|
|
55228
|
-
framework: experimentalServicesCommonProperties.framework,
|
|
55229
|
-
runtime: experimentalServicesCommonProperties.runtime,
|
|
55230
|
-
buildCommand: experimentalServicesCommonProperties.buildCommand,
|
|
55231
|
-
preDeployCommand: experimentalServicesCommonProperties.preDeployCommand,
|
|
55232
|
-
memory: experimentalServicesCommonProperties.memory,
|
|
55233
|
-
maxDuration: experimentalServicesCommonProperties.maxDuration,
|
|
55234
|
-
includeFiles: experimentalServicesCommonProperties.includeFiles,
|
|
55235
|
-
excludeFiles: experimentalServicesCommonProperties.excludeFiles,
|
|
55236
|
-
env: envVarRecordSchema
|
|
55237
|
-
};
|
|
55238
|
-
var servicesRoutableProperties = {
|
|
55239
|
-
mount: servicesMountSchema
|
|
55240
|
-
};
|
|
55241
|
-
var servicesRequiredProperties = ["type", "root"];
|
|
55242
55147
|
var experimentalServicesServiceConfigSchema = {
|
|
55243
55148
|
oneOf: [
|
|
55244
55149
|
{
|
|
@@ -55264,7 +55169,7 @@ var experimentalServicesServiceConfigSchema = {
|
|
|
55264
55169
|
trigger: {
|
|
55265
55170
|
const: "schedule"
|
|
55266
55171
|
},
|
|
55267
|
-
schedule:
|
|
55172
|
+
schedule: experimentalServiceScheduleSchema
|
|
55268
55173
|
}
|
|
55269
55174
|
},
|
|
55270
55175
|
{
|
|
@@ -55279,7 +55184,7 @@ var experimentalServicesServiceConfigSchema = {
|
|
|
55279
55184
|
trigger: {
|
|
55280
55185
|
const: "queue"
|
|
55281
55186
|
},
|
|
55282
|
-
topics:
|
|
55187
|
+
topics: experimentalServiceTopicsSchema,
|
|
55283
55188
|
consumer: {
|
|
55284
55189
|
type: "string",
|
|
55285
55190
|
minLength: 1,
|
|
@@ -55335,79 +55240,11 @@ var experimentalServicesServiceConfigSchema = {
|
|
|
55335
55240
|
type: {
|
|
55336
55241
|
const: "cron"
|
|
55337
55242
|
},
|
|
55338
|
-
schedule:
|
|
55339
|
-
}
|
|
55340
|
-
}
|
|
55341
|
-
]
|
|
55342
|
-
};
|
|
55343
|
-
var servicesServiceConfigSchema = {
|
|
55344
|
-
oneOf: [
|
|
55345
|
-
{
|
|
55346
|
-
type: "object",
|
|
55347
|
-
additionalProperties: false,
|
|
55348
|
-
required: servicesRequiredProperties,
|
|
55349
|
-
properties: {
|
|
55350
|
-
...servicesCommonProperties,
|
|
55351
|
-
...servicesRoutableProperties,
|
|
55352
|
-
type: {
|
|
55353
|
-
enum: ["web"]
|
|
55354
|
-
}
|
|
55355
|
-
}
|
|
55356
|
-
},
|
|
55357
|
-
{
|
|
55358
|
-
type: "object",
|
|
55359
|
-
additionalProperties: false,
|
|
55360
|
-
required: [...servicesRequiredProperties, "trigger", "schedule"],
|
|
55361
|
-
properties: {
|
|
55362
|
-
...servicesCommonProperties,
|
|
55363
|
-
type: {
|
|
55364
|
-
const: "job"
|
|
55365
|
-
},
|
|
55366
|
-
trigger: {
|
|
55367
|
-
const: "schedule"
|
|
55368
|
-
},
|
|
55369
|
-
schedule: serviceScheduleSchema
|
|
55370
|
-
}
|
|
55371
|
-
},
|
|
55372
|
-
{
|
|
55373
|
-
type: "object",
|
|
55374
|
-
additionalProperties: false,
|
|
55375
|
-
required: [...servicesRequiredProperties, "trigger", "topics"],
|
|
55376
|
-
properties: {
|
|
55377
|
-
...servicesCommonProperties,
|
|
55378
|
-
type: {
|
|
55379
|
-
const: "job"
|
|
55380
|
-
},
|
|
55381
|
-
trigger: {
|
|
55382
|
-
const: "queue"
|
|
55383
|
-
},
|
|
55384
|
-
topics: serviceTopicsSchema
|
|
55385
|
-
}
|
|
55386
|
-
},
|
|
55387
|
-
{
|
|
55388
|
-
type: "object",
|
|
55389
|
-
additionalProperties: false,
|
|
55390
|
-
required: [...servicesRequiredProperties, "trigger", "entrypoint"],
|
|
55391
|
-
properties: {
|
|
55392
|
-
...servicesCommonProperties,
|
|
55393
|
-
type: {
|
|
55394
|
-
const: "job"
|
|
55395
|
-
},
|
|
55396
|
-
trigger: {
|
|
55397
|
-
const: "workflow"
|
|
55398
|
-
}
|
|
55243
|
+
schedule: experimentalServiceScheduleSchema
|
|
55399
55244
|
}
|
|
55400
55245
|
}
|
|
55401
55246
|
]
|
|
55402
55247
|
};
|
|
55403
|
-
var servicesSchema = {
|
|
55404
|
-
type: "object",
|
|
55405
|
-
propertyNames: {
|
|
55406
|
-
pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",
|
|
55407
|
-
maxLength: 64
|
|
55408
|
-
},
|
|
55409
|
-
additionalProperties: servicesServiceConfigSchema
|
|
55410
|
-
};
|
|
55411
55248
|
var experimentalServicesSchema = {
|
|
55412
55249
|
type: "object",
|
|
55413
55250
|
propertyNames: {
|
|
@@ -55431,6 +55268,80 @@ var experimentalServiceGroupsSchema = {
|
|
|
55431
55268
|
}
|
|
55432
55269
|
}
|
|
55433
55270
|
};
|
|
55271
|
+
var experimentalServicesV2PathSchema = {
|
|
55272
|
+
type: "string",
|
|
55273
|
+
minLength: 1,
|
|
55274
|
+
maxLength: 512
|
|
55275
|
+
};
|
|
55276
|
+
var experimentalServicesV2CommandSchema = {
|
|
55277
|
+
type: "string",
|
|
55278
|
+
minLength: 1,
|
|
55279
|
+
maxLength: 2048
|
|
55280
|
+
};
|
|
55281
|
+
var experimentalServicesV2BindingSchema = {
|
|
55282
|
+
type: "object",
|
|
55283
|
+
additionalProperties: false,
|
|
55284
|
+
required: ["type", "service", "format", "env"],
|
|
55285
|
+
properties: {
|
|
55286
|
+
type: { const: "service" },
|
|
55287
|
+
service: {
|
|
55288
|
+
type: "string",
|
|
55289
|
+
minLength: 1,
|
|
55290
|
+
maxLength: 64,
|
|
55291
|
+
pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"
|
|
55292
|
+
},
|
|
55293
|
+
format: { const: "url" },
|
|
55294
|
+
env: {
|
|
55295
|
+
type: "string",
|
|
55296
|
+
...envVarNamesSchema
|
|
55297
|
+
}
|
|
55298
|
+
}
|
|
55299
|
+
};
|
|
55300
|
+
var experimentalServicesV2BindingsSchema = {
|
|
55301
|
+
type: "array",
|
|
55302
|
+
maxItems: 100,
|
|
55303
|
+
items: experimentalServicesV2BindingSchema
|
|
55304
|
+
};
|
|
55305
|
+
var experimentalServicesV2ServiceConfigSchema = {
|
|
55306
|
+
type: "object",
|
|
55307
|
+
additionalProperties: false,
|
|
55308
|
+
required: ["root"],
|
|
55309
|
+
properties: {
|
|
55310
|
+
root: experimentalServicesV2PathSchema,
|
|
55311
|
+
framework: {
|
|
55312
|
+
type: "string",
|
|
55313
|
+
minLength: 1,
|
|
55314
|
+
maxLength: 256
|
|
55315
|
+
},
|
|
55316
|
+
runtime: {
|
|
55317
|
+
type: "string",
|
|
55318
|
+
minLength: 1,
|
|
55319
|
+
maxLength: 256
|
|
55320
|
+
},
|
|
55321
|
+
entrypoint: experimentalServicesV2PathSchema,
|
|
55322
|
+
installCommand: experimentalServicesV2CommandSchema,
|
|
55323
|
+
buildCommand: experimentalServicesV2CommandSchema,
|
|
55324
|
+
devCommand: experimentalServicesV2CommandSchema,
|
|
55325
|
+
ignoreCommand: experimentalServicesV2CommandSchema,
|
|
55326
|
+
outputDirectory: experimentalServicesV2PathSchema,
|
|
55327
|
+
bindings: experimentalServicesV2BindingsSchema,
|
|
55328
|
+
functions: functionsSchema,
|
|
55329
|
+
headers: import_routing_utils.headersSchema,
|
|
55330
|
+
redirects: import_routing_utils.redirectsSchema,
|
|
55331
|
+
rewrites: import_routing_utils.rewritesSchema,
|
|
55332
|
+
routes: import_routing_utils.routesSchema,
|
|
55333
|
+
cleanUrls: import_routing_utils.cleanUrlsSchema,
|
|
55334
|
+
trailingSlash: import_routing_utils.trailingSlashSchema
|
|
55335
|
+
}
|
|
55336
|
+
};
|
|
55337
|
+
var experimentalServicesV2Schema = {
|
|
55338
|
+
type: "object",
|
|
55339
|
+
propertyNames: {
|
|
55340
|
+
pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",
|
|
55341
|
+
maxLength: 64
|
|
55342
|
+
},
|
|
55343
|
+
additionalProperties: experimentalServicesV2ServiceConfigSchema
|
|
55344
|
+
};
|
|
55434
55345
|
var vercelConfigSchema = {
|
|
55435
55346
|
type: "object",
|
|
55436
55347
|
// These are not all possibilities because `vc dev`
|
|
@@ -55448,26 +55359,14 @@ var vercelConfigSchema = {
|
|
|
55448
55359
|
images: imagesSchema,
|
|
55449
55360
|
crons: cronsSchema,
|
|
55450
55361
|
bunVersion: { type: "string" },
|
|
55451
|
-
services: servicesSchema,
|
|
55452
55362
|
experimentalServices: experimentalServicesSchema,
|
|
55453
|
-
experimentalServiceGroups: experimentalServiceGroupsSchema
|
|
55363
|
+
experimentalServiceGroups: experimentalServiceGroupsSchema,
|
|
55364
|
+
experimentalServicesV2: experimentalServicesV2Schema
|
|
55454
55365
|
}
|
|
55455
55366
|
};
|
|
55456
55367
|
var ajv = new import_ajv.default();
|
|
55457
55368
|
var validate = ajv.compile(vercelConfigSchema);
|
|
55458
|
-
function isPublicServicesEnabled() {
|
|
55459
|
-
return process.env.VERCEL_USE_SERVICES === "1" || process.env.VERCEL_USE_SERVICES?.toLowerCase() === "true";
|
|
55460
|
-
}
|
|
55461
55369
|
function validateConfig(config) {
|
|
55462
|
-
if (Object.prototype.hasOwnProperty.call(config, "services") && !isPublicServicesEnabled()) {
|
|
55463
|
-
const fileName = config[import_client.fileNameSymbol] || "vercel.json";
|
|
55464
|
-
const niceError = getPrettyError({
|
|
55465
|
-
dataPath: "",
|
|
55466
|
-
params: { additionalProperty: "services" }
|
|
55467
|
-
});
|
|
55468
|
-
niceError.message = `Invalid ${fileName} - ${niceError.message}`;
|
|
55469
|
-
return niceError;
|
|
55470
|
-
}
|
|
55471
55370
|
if (!validate(config)) {
|
|
55472
55371
|
if (validate.errors && validate.errors[0]) {
|
|
55473
55372
|
const error = validate.errors[0];
|
|
@@ -55484,24 +55383,17 @@ function validateConfig(config) {
|
|
|
55484
55383
|
link: "https://vercel.link/functions-and-builds"
|
|
55485
55384
|
});
|
|
55486
55385
|
}
|
|
55487
|
-
const hasServices = Boolean(config.services);
|
|
55488
55386
|
const hasExperimentalServices = Boolean(config.experimentalServices);
|
|
55489
|
-
if (
|
|
55387
|
+
if (hasExperimentalServices && config.builds) {
|
|
55490
55388
|
return new NowBuildError({
|
|
55491
|
-
code: "
|
|
55492
|
-
message: "The `
|
|
55389
|
+
code: "EXPERIMENTAL_SERVICES_AND_BUILDS",
|
|
55390
|
+
message: "The `experimentalServices` property cannot be used in conjunction with the `builds` property. Please remove one of them."
|
|
55493
55391
|
});
|
|
55494
55392
|
}
|
|
55495
|
-
if (
|
|
55393
|
+
if (hasExperimentalServices && config.functions) {
|
|
55496
55394
|
return new NowBuildError({
|
|
55497
|
-
code: "
|
|
55498
|
-
message: "The `
|
|
55499
|
-
});
|
|
55500
|
-
}
|
|
55501
|
-
if ((hasServices || hasExperimentalServices) && config.functions) {
|
|
55502
|
-
return new NowBuildError({
|
|
55503
|
-
code: "SERVICES_AND_FUNCTIONS",
|
|
55504
|
-
message: "The `services` property cannot be used in conjunction with the `functions` property. Please remove one of them."
|
|
55395
|
+
code: "EXPERIMENTAL_SERVICES_AND_FUNCTIONS",
|
|
55396
|
+
message: "The `experimentalServices` property cannot be used in conjunction with the `functions` property. Please remove one of them."
|
|
55505
55397
|
});
|
|
55506
55398
|
}
|
|
55507
55399
|
if (config.experimentalServiceGroups && !config.experimentalServices) {
|
|
@@ -55510,6 +55402,66 @@ function validateConfig(config) {
|
|
|
55510
55402
|
message: "The `experimentalServiceGroups` property requires `experimentalServices` to be defined. Service groups reference services by name."
|
|
55511
55403
|
});
|
|
55512
55404
|
}
|
|
55405
|
+
const hasExperimentalServicesV2 = Boolean(config.experimentalServicesV2);
|
|
55406
|
+
if (hasExperimentalServicesV2 && hasExperimentalServices) {
|
|
55407
|
+
return new NowBuildError({
|
|
55408
|
+
code: "EXPERIMENTAL_SERVICES_V2_AND_EXPERIMENTAL_SERVICES",
|
|
55409
|
+
message: "The `experimentalServicesV2` property cannot be used in conjunction with the `experimentalServices` property. Please use only one services configuration."
|
|
55410
|
+
});
|
|
55411
|
+
}
|
|
55412
|
+
if (hasExperimentalServicesV2 && config.builds) {
|
|
55413
|
+
return new NowBuildError({
|
|
55414
|
+
code: "EXPERIMENTAL_SERVICES_V2_AND_BUILDS",
|
|
55415
|
+
message: "The `experimentalServicesV2` property cannot be used in conjunction with the `builds` property. Please remove one of them."
|
|
55416
|
+
});
|
|
55417
|
+
}
|
|
55418
|
+
if (hasExperimentalServicesV2) {
|
|
55419
|
+
const ambiguousTopLevel = [];
|
|
55420
|
+
if (config.functions != null) {
|
|
55421
|
+
ambiguousTopLevel.push("functions");
|
|
55422
|
+
}
|
|
55423
|
+
if (config.installCommand != null) {
|
|
55424
|
+
ambiguousTopLevel.push("installCommand");
|
|
55425
|
+
}
|
|
55426
|
+
if (config.buildCommand != null) {
|
|
55427
|
+
ambiguousTopLevel.push("buildCommand");
|
|
55428
|
+
}
|
|
55429
|
+
if (config.devCommand != null) {
|
|
55430
|
+
ambiguousTopLevel.push("devCommand");
|
|
55431
|
+
}
|
|
55432
|
+
if (config.ignoreCommand != null) {
|
|
55433
|
+
ambiguousTopLevel.push("ignoreCommand");
|
|
55434
|
+
}
|
|
55435
|
+
if (config.outputDirectory != null) {
|
|
55436
|
+
ambiguousTopLevel.push("outputDirectory");
|
|
55437
|
+
}
|
|
55438
|
+
if (config.framework != null) {
|
|
55439
|
+
ambiguousTopLevel.push("framework");
|
|
55440
|
+
}
|
|
55441
|
+
if (ambiguousTopLevel.length > 0) {
|
|
55442
|
+
const count = ambiguousTopLevel.length;
|
|
55443
|
+
const fields = ambiguousTopLevel.map((field) => `\`${field}\``).join(", ");
|
|
55444
|
+
return new NowBuildError({
|
|
55445
|
+
code: "EXPERIMENTAL_SERVICES_V2_AND_TOP_LEVEL_BUILD_SETTINGS",
|
|
55446
|
+
message: `The top-level ${count > 1 ? "properties" : "property"} ${fields} cannot be used with \`experimentalServicesV2\` because the owning service is ambiguous. Move ${count > 1 ? "them" : "it"} under the relevant service in \`experimentalServicesV2\`.`
|
|
55447
|
+
});
|
|
55448
|
+
}
|
|
55449
|
+
}
|
|
55450
|
+
if (config.experimentalServicesV2) {
|
|
55451
|
+
const serviceNames = new Set(Object.keys(config.experimentalServicesV2));
|
|
55452
|
+
for (const [serviceName, serviceConfig] of Object.entries(
|
|
55453
|
+
config.experimentalServicesV2
|
|
55454
|
+
)) {
|
|
55455
|
+
for (const binding of serviceConfig.bindings ?? []) {
|
|
55456
|
+
if (!serviceNames.has(binding.service)) {
|
|
55457
|
+
return new NowBuildError({
|
|
55458
|
+
code: "EXPERIMENTAL_SERVICES_V2_BINDING_UNKNOWN_SERVICE",
|
|
55459
|
+
message: `Service "${serviceName}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`experimentalServicesV2\` or fix the binding.`
|
|
55460
|
+
});
|
|
55461
|
+
}
|
|
55462
|
+
}
|
|
55463
|
+
}
|
|
55464
|
+
}
|
|
55513
55465
|
return null;
|
|
55514
55466
|
}
|
|
55515
55467
|
|
|
@@ -55560,7 +55512,7 @@ async function hasExperimentalServicesConfig(cwd) {
|
|
|
55560
55512
|
);
|
|
55561
55513
|
if (!config || config instanceof Error)
|
|
55562
55514
|
return false;
|
|
55563
|
-
return config.
|
|
55515
|
+
return config.experimentalServices != null && typeof config.experimentalServices === "object";
|
|
55564
55516
|
} catch {
|
|
55565
55517
|
return false;
|
|
55566
55518
|
}
|
|
@@ -55576,7 +55528,7 @@ async function tryDetectServices(cwd) {
|
|
|
55576
55528
|
detectEntrypoint: createDetectEntrypoint(cwd)
|
|
55577
55529
|
});
|
|
55578
55530
|
const hasNoServicesError = result.errors.some(
|
|
55579
|
-
(e) => e.code === "
|
|
55531
|
+
(e) => e.code === "NO_EXPERIMENTAL_SERVICES_CONFIGURED"
|
|
55580
55532
|
);
|
|
55581
55533
|
if (hasNoServicesError) {
|
|
55582
55534
|
return null;
|
|
@@ -55659,9 +55611,9 @@ async function prepareTomlServicesConfigWrite(configPath, config) {
|
|
|
55659
55611
|
}
|
|
55660
55612
|
function getServicesConfigWriteBlockerFromError(error) {
|
|
55661
55613
|
switch (error?.code) {
|
|
55662
|
-
case "
|
|
55614
|
+
case "EXPERIMENTAL_SERVICES_AND_BUILDS":
|
|
55663
55615
|
return "builds";
|
|
55664
|
-
case "
|
|
55616
|
+
case "EXPERIMENTAL_SERVICES_AND_FUNCTIONS":
|
|
55665
55617
|
return "functions";
|
|
55666
55618
|
default:
|
|
55667
55619
|
return null;
|