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

Function resolveString

packages/cli/src/util/dev/transforms.ts:112–122  ·  view source on GitHub ↗
(
  value: string,
  transform: Transform,
  ctx: TransformContext
)

Source from the content-addressed store, hash-verified

110}
111
112function resolveString(
113 value: string,
114 transform: Transform,
115 ctx: TransformContext
116): string {
117 let resolved = expandCaptureGroups(value, ctx.match, ctx.keys);
118 if (transform.env && transform.env.length > 0 && ctx.env) {
119 resolved = expandEnvVars(resolved, transform.env, ctx.env);
120 }
121 return resolved;
122}
123
124// similar to router.ts:resolveRouteParameters,
125// but replaces only known groups and leaves the rest in place

Callers 2

resolveTransformsFunction · 0.85
resolveArgsFunction · 0.85

Calls 2

expandCaptureGroupsFunction · 0.85
expandEnvVarsFunction · 0.85

Tested by

no test coverage detected