[build-utils] Add EdgeFunction output type (#7510)

Co-authored-by: Steven <steven@ceriously.com>
This commit is contained in:
Gal Schlezinger
2022-03-08 18:58:26 +02:00
committed by GitHub
parent 6b2a1c3866
commit f19690dc32
7 changed files with 64 additions and 9 deletions

View File

@@ -153,9 +153,8 @@ export const routesSchema = {
},
},
},
middleware: {
type: 'number',
},
middleware: { type: 'number' },
middlewarePath: { type: 'string' },
has: hasSchema,
missing: hasSchema,
},

View File

@@ -38,6 +38,14 @@ export type Source = {
redirect?: Record<string, string>;
cookie?: string;
};
/**
* A middleware key within the `output` key under the build result.
* Overrides a `middleware` definition.
*/
middlewarePath?: string;
/**
* A middleware index in the `middleware` key under the build result
*/
middleware?: number;
};