vercel 50.38.0 → 50.38.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.
- package/dist/chunks/{chunk-WXIJNP7E.js → chunk-66OS3DPX.js} +1 -1
- package/dist/chunks/{chunk-PACCQENF.js → chunk-BPMH4DIG.js} +1 -1
- package/dist/chunks/{chunk-ABLVAG7C.js → chunk-JST46NST.js} +12 -1
- package/dist/commands/deploy/index.js +2 -2
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands-bulk.js +97 -14
- package/dist/index.js +2 -2
- package/dist/version.mjs +1 -1
- package/package.json +9 -9
|
@@ -3328,6 +3328,17 @@ var createGroupSubcommand = {
|
|
|
3328
3328
|
type: String,
|
|
3329
3329
|
deprecated: false,
|
|
3330
3330
|
description: "Default route for the default application"
|
|
3331
|
+
},
|
|
3332
|
+
{
|
|
3333
|
+
name: "project-default-route",
|
|
3334
|
+
shorthand: null,
|
|
3335
|
+
type: [String],
|
|
3336
|
+
deprecated: false,
|
|
3337
|
+
description: 'Default route for a non-default project in the form "<project>=<route>" (repeatable)'
|
|
3338
|
+
},
|
|
3339
|
+
{
|
|
3340
|
+
...yesOption,
|
|
3341
|
+
description: "Skip creation confirmation prompt"
|
|
3331
3342
|
}
|
|
3332
3343
|
],
|
|
3333
3344
|
examples: [
|
|
@@ -3337,7 +3348,7 @@ var createGroupSubcommand = {
|
|
|
3337
3348
|
},
|
|
3338
3349
|
{
|
|
3339
3350
|
name: "Create a microfrontends group with flags",
|
|
3340
|
-
value: `${packageName} mf create-group --name="My Group" --project=web --project=docs --default-app=web`
|
|
3351
|
+
value: `${packageName} mf create-group --name="My Group" --project=web --project=docs --default-app=web --project-default-route=docs=/docs --yes`
|
|
3341
3352
|
}
|
|
3342
3353
|
]
|
|
3343
3354
|
};
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
purchaseDomainIfAvailable,
|
|
14
14
|
require_cjs,
|
|
15
15
|
setupDomain
|
|
16
|
-
} from "../../chunks/chunk-
|
|
16
|
+
} from "../../chunks/chunk-BPMH4DIG.js";
|
|
17
17
|
import {
|
|
18
18
|
readLocalConfig
|
|
19
19
|
} from "../../chunks/chunk-CZQS3AXN.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
deprecatedArchiveSplitTgz,
|
|
43
43
|
getCommandAliases,
|
|
44
44
|
initSubcommand
|
|
45
|
-
} from "../../chunks/chunk-
|
|
45
|
+
} from "../../chunks/chunk-JST46NST.js";
|
|
46
46
|
import "../../chunks/chunk-SV3GZCMS.js";
|
|
47
47
|
import "../../chunks/chunk-ZFRYHXOW.js";
|
|
48
48
|
import "../../chunks/chunk-3KZHRNXR.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
29
29
|
import {
|
|
30
30
|
getCommandAliases
|
|
31
|
-
} from "../../chunks/chunk-
|
|
31
|
+
} from "../../chunks/chunk-JST46NST.js";
|
|
32
32
|
import "../../chunks/chunk-SV3GZCMS.js";
|
|
33
33
|
import "../../chunks/chunk-ZFRYHXOW.js";
|
|
34
34
|
import "../../chunks/chunk-3KZHRNXR.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
addSubcommand6 as addSubcommand,
|
|
15
15
|
getCommandAliases,
|
|
16
16
|
linkCommand
|
|
17
|
-
} from "../../chunks/chunk-
|
|
17
|
+
} from "../../chunks/chunk-JST46NST.js";
|
|
18
18
|
import "../../chunks/chunk-SV3GZCMS.js";
|
|
19
19
|
import "../../chunks/chunk-ZFRYHXOW.js";
|
|
20
20
|
import "../../chunks/chunk-3KZHRNXR.js";
|
package/dist/commands-bulk.js
CHANGED
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
did_you_mean_default,
|
|
55
55
|
executeUpgrade,
|
|
56
56
|
login
|
|
57
|
-
} from "./chunks/chunk-
|
|
57
|
+
} from "./chunks/chunk-66OS3DPX.js";
|
|
58
58
|
import {
|
|
59
59
|
getUpdateCommand,
|
|
60
60
|
isGlobal
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
require_format,
|
|
81
81
|
require_jsonlines,
|
|
82
82
|
setupDomain
|
|
83
|
-
} from "./chunks/chunk-
|
|
83
|
+
} from "./chunks/chunk-BPMH4DIG.js";
|
|
84
84
|
import {
|
|
85
85
|
processRevocationResponse,
|
|
86
86
|
readLocalConfig,
|
|
@@ -286,7 +286,7 @@ import {
|
|
|
286
286
|
v0Subcommand,
|
|
287
287
|
webhooksCommand,
|
|
288
288
|
whoamiCommand
|
|
289
|
-
} from "./chunks/chunk-
|
|
289
|
+
} from "./chunks/chunk-JST46NST.js";
|
|
290
290
|
import {
|
|
291
291
|
addSubcommand as addSubcommand8,
|
|
292
292
|
deleteSubcommand,
|
|
@@ -21738,9 +21738,33 @@ async function createGroup(client) {
|
|
|
21738
21738
|
const projectFlags = parsedArgs.flags["--project"];
|
|
21739
21739
|
const defaultAppFlag = parsedArgs.flags["--default-app"];
|
|
21740
21740
|
const defaultRouteFlag = parsedArgs.flags["--default-route"];
|
|
21741
|
-
const
|
|
21741
|
+
const projectDefaultRouteFlags = parsedArgs.flags["--project-default-route"];
|
|
21742
|
+
const autoConfirm = !!parsedArgs.flags["--yes"];
|
|
21743
|
+
const isNonInteractive = client.nonInteractive || client.argv.includes("--non-interactive");
|
|
21744
|
+
if (isNonInteractive) {
|
|
21745
|
+
if (!nameFlag) {
|
|
21746
|
+
output_manager_default.error(
|
|
21747
|
+
"Missing required flag --name. Use --name in non-interactive mode."
|
|
21748
|
+
);
|
|
21749
|
+
return 1;
|
|
21750
|
+
}
|
|
21751
|
+
if (!projectFlags || projectFlags.length === 0) {
|
|
21752
|
+
output_manager_default.error(
|
|
21753
|
+
"Missing required flag --project. Use --project in non-interactive mode."
|
|
21754
|
+
);
|
|
21755
|
+
return 1;
|
|
21756
|
+
}
|
|
21757
|
+
if (projectFlags.length > 1 && !defaultAppFlag) {
|
|
21758
|
+
output_manager_default.error(
|
|
21759
|
+
"Missing required flag --default-app when using multiple --project values in non-interactive mode."
|
|
21760
|
+
);
|
|
21761
|
+
return 1;
|
|
21762
|
+
}
|
|
21763
|
+
}
|
|
21764
|
+
const projectsToAddCount = projectFlags?.length ?? 1;
|
|
21765
|
+
const wouldAffectBilling = existingMfeProjectCount + projectsToAddCount > freeProjects;
|
|
21742
21766
|
if (wouldAffectBilling) {
|
|
21743
|
-
if (
|
|
21767
|
+
if (isNonInteractive) {
|
|
21744
21768
|
const flags = getGlobalFlagsOnlyFromArgs(client.argv.slice(2));
|
|
21745
21769
|
const interactiveCmd = getCommandNamePlain(
|
|
21746
21770
|
`microfrontends create-group ${flags.filter((f) => f !== "--non-interactive").join(" ")}`.trim()
|
|
@@ -21760,6 +21784,7 @@ async function createGroup(client) {
|
|
|
21760
21784
|
},
|
|
21761
21785
|
1
|
|
21762
21786
|
);
|
|
21787
|
+
return 1;
|
|
21763
21788
|
}
|
|
21764
21789
|
if (!client.stdin.isTTY) {
|
|
21765
21790
|
output_manager_default.error(
|
|
@@ -21901,12 +21926,32 @@ async function createGroup(client) {
|
|
|
21901
21926
|
defaultRoute = "/";
|
|
21902
21927
|
}
|
|
21903
21928
|
const otherProjects = selectedProjects.filter((p) => p.id !== defaultApp.id);
|
|
21929
|
+
const parsedProjectDefaultRoutes = parseProjectDefaultRouteFlags(
|
|
21930
|
+
projectDefaultRouteFlags,
|
|
21931
|
+
selectedProjects,
|
|
21932
|
+
defaultApp
|
|
21933
|
+
);
|
|
21934
|
+
if (typeof parsedProjectDefaultRoutes === "string") {
|
|
21935
|
+
output_manager_default.error(parsedProjectDefaultRoutes);
|
|
21936
|
+
return 1;
|
|
21937
|
+
}
|
|
21904
21938
|
const otherApplications = [];
|
|
21905
21939
|
for (const project of otherProjects) {
|
|
21906
|
-
const
|
|
21907
|
-
|
|
21908
|
-
|
|
21909
|
-
|
|
21940
|
+
const routeFromFlag = parsedProjectDefaultRoutes.get(project.id);
|
|
21941
|
+
let route;
|
|
21942
|
+
if (routeFromFlag) {
|
|
21943
|
+
route = routeFromFlag;
|
|
21944
|
+
} else if (isNonInteractive) {
|
|
21945
|
+
output_manager_default.error(
|
|
21946
|
+
`Missing required flag --project-default-route for "${project.name}". Use --project-default-route=${project.name}=/<path> in non-interactive mode.`
|
|
21947
|
+
);
|
|
21948
|
+
return 1;
|
|
21949
|
+
} else {
|
|
21950
|
+
route = await client.input.text({
|
|
21951
|
+
message: `Default route for "${project.name}":`,
|
|
21952
|
+
validate: validateDefaultRoute
|
|
21953
|
+
});
|
|
21954
|
+
}
|
|
21910
21955
|
otherApplications.push({ projectId: project.id, defaultRoute: route });
|
|
21911
21956
|
}
|
|
21912
21957
|
const newProjectCount = selectedProjects.length;
|
|
@@ -21946,10 +21991,13 @@ async function createGroup(client) {
|
|
|
21946
21991
|
);
|
|
21947
21992
|
}
|
|
21948
21993
|
output_manager_default.log("");
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
21952
|
-
|
|
21994
|
+
if (!autoConfirm && !client.stdin.isTTY) {
|
|
21995
|
+
output_manager_default.error(
|
|
21996
|
+
"Confirmation required. Use --yes to confirm group creation in non-interactive mode."
|
|
21997
|
+
);
|
|
21998
|
+
return 1;
|
|
21999
|
+
}
|
|
22000
|
+
const confirmed = autoConfirm || await client.input.confirm("Create microfrontends group?", true);
|
|
21953
22001
|
if (!confirmed) {
|
|
21954
22002
|
output_manager_default.log("Aborted.");
|
|
21955
22003
|
return 0;
|
|
@@ -21998,7 +22046,7 @@ async function createGroup(client) {
|
|
|
21998
22046
|
output_manager_default.log(
|
|
21999
22047
|
`No changes to production traffic will take effect until a ${import_chalk89.default.bold("microfrontends.json")} is added to the default app. This configuration file specifies the path routing for the microfrontends group.`
|
|
22000
22048
|
);
|
|
22001
|
-
const shouldCreate = client.stdin.isTTY && await client.input.confirm("Create a microfrontends.json now?", true);
|
|
22049
|
+
const shouldCreate = client.stdin.isTTY && !isNonInteractive && await client.input.confirm("Create a microfrontends.json now?", true);
|
|
22002
22050
|
if (shouldCreate) {
|
|
22003
22051
|
const routingPaths = {};
|
|
22004
22052
|
for (const project of otherProjects) {
|
|
@@ -22078,6 +22126,41 @@ function validateGroupName(name, existingGroups) {
|
|
|
22078
22126
|
function isProjectInMicrofrontendsGroup(project, groups) {
|
|
22079
22127
|
return groups.some((g) => g.projects.some((p) => p.id === project.id));
|
|
22080
22128
|
}
|
|
22129
|
+
function parseProjectDefaultRouteFlags(projectDefaultRouteFlags, selectedProjects, defaultApp) {
|
|
22130
|
+
const routeByProjectId = /* @__PURE__ */ new Map();
|
|
22131
|
+
if (!projectDefaultRouteFlags || projectDefaultRouteFlags.length === 0) {
|
|
22132
|
+
return routeByProjectId;
|
|
22133
|
+
}
|
|
22134
|
+
for (const entry of projectDefaultRouteFlags) {
|
|
22135
|
+
const separatorIndex = entry.indexOf("=");
|
|
22136
|
+
if (separatorIndex <= 0 || separatorIndex === entry.length - 1) {
|
|
22137
|
+
return `Invalid --project-default-route value "${entry}". Use "<project>=<route>", for example "docs=/docs".`;
|
|
22138
|
+
}
|
|
22139
|
+
const projectIdentifier = entry.slice(0, separatorIndex).trim();
|
|
22140
|
+
const route = entry.slice(separatorIndex + 1).trim();
|
|
22141
|
+
if (!projectIdentifier || !route) {
|
|
22142
|
+
return `Invalid --project-default-route value "${entry}". Use "<project>=<route>", for example "docs=/docs".`;
|
|
22143
|
+
}
|
|
22144
|
+
const project = selectedProjects.find(
|
|
22145
|
+
(p) => p.name === projectIdentifier || p.id === projectIdentifier
|
|
22146
|
+
);
|
|
22147
|
+
if (!project) {
|
|
22148
|
+
return `Invalid --project-default-route value "${entry}". Project "${projectIdentifier}" is not one of the selected projects.`;
|
|
22149
|
+
}
|
|
22150
|
+
if (project.id === defaultApp.id) {
|
|
22151
|
+
return `Invalid --project-default-route value "${entry}". Use --default-route for the default app "${defaultApp.name}".`;
|
|
22152
|
+
}
|
|
22153
|
+
const routeValidation = validateDefaultRoute(route);
|
|
22154
|
+
if (routeValidation !== true) {
|
|
22155
|
+
return `Invalid --project-default-route value "${entry}": ${routeValidation}`;
|
|
22156
|
+
}
|
|
22157
|
+
if (routeByProjectId.has(project.id)) {
|
|
22158
|
+
return `Duplicate --project-default-route for project "${project.name}".`;
|
|
22159
|
+
}
|
|
22160
|
+
routeByProjectId.set(project.id, route);
|
|
22161
|
+
}
|
|
22162
|
+
return routeByProjectId;
|
|
22163
|
+
}
|
|
22081
22164
|
|
|
22082
22165
|
// src/commands/microfrontends/add-to-group.ts
|
|
22083
22166
|
var import_chalk90 = __toESM(require_source(), 1);
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
did_you_mean_default,
|
|
16
16
|
executeUpgrade,
|
|
17
17
|
login
|
|
18
|
-
} from "./chunks/chunk-
|
|
18
|
+
} from "./chunks/chunk-66OS3DPX.js";
|
|
19
19
|
import {
|
|
20
20
|
getUpdateCommand
|
|
21
21
|
} from "./chunks/chunk-WBLCBWFU.js";
|
|
@@ -38,7 +38,7 @@ import "./chunks/chunk-V3ICMZ2S.js";
|
|
|
38
38
|
import {
|
|
39
39
|
commandNames,
|
|
40
40
|
commands
|
|
41
|
-
} from "./chunks/chunk-
|
|
41
|
+
} from "./chunks/chunk-JST46NST.js";
|
|
42
42
|
import "./chunks/chunk-SV3GZCMS.js";
|
|
43
43
|
import "./chunks/chunk-ZFRYHXOW.js";
|
|
44
44
|
import "./chunks/chunk-3KZHRNXR.js";
|
package/dist/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "50.38.
|
|
1
|
+
export const version = "50.38.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vercel",
|
|
3
|
-
"version": "50.38.
|
|
3
|
+
"version": "50.38.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"proxy-agent": "6.4.0",
|
|
33
33
|
"@vercel/prepare-flags-definitions": "0.2.1",
|
|
34
34
|
"@vercel/build-utils": "13.12.1",
|
|
35
|
-
"@vercel/backends": "0.0.54",
|
|
36
35
|
"@vercel/detect-agent": "1.2.1",
|
|
37
|
-
"@vercel/
|
|
38
|
-
"@vercel/elysia": "0.1.56",
|
|
36
|
+
"@vercel/backends": "0.0.54",
|
|
39
37
|
"@vercel/express": "0.1.66",
|
|
40
38
|
"@vercel/go": "3.4.7",
|
|
41
|
-
"@vercel/
|
|
42
|
-
"@vercel/
|
|
39
|
+
"@vercel/elysia": "0.1.56",
|
|
40
|
+
"@vercel/fastify": "0.1.59",
|
|
43
41
|
"@vercel/hono": "0.2.59",
|
|
42
|
+
"@vercel/hydrogen": "1.3.6",
|
|
43
|
+
"@vercel/h3": "0.1.65",
|
|
44
44
|
"@vercel/koa": "0.1.39",
|
|
45
45
|
"@vercel/nestjs": "0.2.60",
|
|
46
46
|
"@vercel/next": "4.16.4",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@vercel/python": "6.29.0",
|
|
49
49
|
"@vercel/redwood": "2.4.12",
|
|
50
50
|
"@vercel/ruby": "2.3.2",
|
|
51
|
-
"@vercel/static-build": "2.9.7",
|
|
52
51
|
"@vercel/remix-builder": "5.7.2",
|
|
53
|
-
"@vercel/rust": "1.0.6"
|
|
52
|
+
"@vercel/rust": "1.0.6",
|
|
53
|
+
"@vercel/static-build": "2.9.7"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@alex_neo/jest-expect-message": "1.0.5",
|
|
@@ -181,9 +181,9 @@
|
|
|
181
181
|
"@vercel-internals/constants": "1.0.4",
|
|
182
182
|
"@vercel-internals/get-package-json": "1.0.0",
|
|
183
183
|
"@vercel-internals/types": "3.0.6",
|
|
184
|
-
"@vercel/client": "17.2.66",
|
|
185
184
|
"@vercel/error-utils": "2.0.3",
|
|
186
185
|
"@vercel/frameworks": "3.22.0",
|
|
186
|
+
"@vercel/client": "17.2.66",
|
|
187
187
|
"@vercel/fs-detectors": "5.13.0",
|
|
188
188
|
"@vercel/routing-utils": "6.1.1"
|
|
189
189
|
},
|