mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 04:22:12 +00:00
[cli] Add Variants to Build Output API (#11098)
Makes adjustments to replace `flags` with `variants`. Also marks the current `flags` implementation as deprecated, as it should get removed soon. Which I'll do in a follow up PR.
This commit is contained in:
@@ -3257,7 +3257,8 @@ export function isApiPage(page: string | undefined) {
|
||||
.match(/(serverless|server)\/pages\/api(\/|\.js$)/);
|
||||
}
|
||||
|
||||
export type VariantsManifest = Record<
|
||||
/** @deprecated */
|
||||
export type VariantsManifestLegacy = Record<
|
||||
string,
|
||||
{
|
||||
defaultValue?: unknown;
|
||||
@@ -3268,7 +3269,7 @@ export type VariantsManifest = Record<
|
||||
export async function getVariantsManifest(
|
||||
entryPath: string,
|
||||
outputDirectory: string
|
||||
): Promise<null | VariantsManifest> {
|
||||
): Promise<null | VariantsManifestLegacy> {
|
||||
const pathVariantsManifest = path.join(
|
||||
entryPath,
|
||||
outputDirectory,
|
||||
@@ -3282,7 +3283,7 @@ export async function getVariantsManifest(
|
||||
|
||||
if (!hasVariantsManifest) return null;
|
||||
|
||||
const variantsManifest: VariantsManifest = await fs.readJSON(
|
||||
const variantsManifest: VariantsManifestLegacy = await fs.readJSON(
|
||||
pathVariantsManifest
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user