MCPcopy Create free account
hub / github.com/vercel/vercel / getRequestPath

Function getRequestPath

packages/cli/src/util/dev/transforms.ts:270–283  ·  view source on GitHub ↗
(transforms: Transform[])

Source from the content-addressed store, hash-verified

268}
269
270function getRequestPath(transforms: Transform[]): string | undefined {
271 let path: string | undefined;
272 for (const transform of transforms) {
273 if (
274 transform.type === 'request.path' &&
275 transform.op === 'set' &&
276 typeof transform.args === 'string' &&
277 isValidRequestPath(transform.args)
278 ) {
279 path = transform.args;
280 }
281 }
282 return path;
283}
284
285function findMatchingKeys(data: TransformData, keyPattern: KeyRule): string[] {
286 const matched: string[] = [];

Callers 1

applyRequestTransformsFunction · 0.85

Calls 1

isValidRequestPathFunction · 0.85

Tested by

no test coverage detected