MCPcopy Index your code
hub / github.com/devcontainers/cli / resolve

Function resolve

src/spec-node/configContainer.ts:26–36  ·  view source on GitHub ↗
(params: DockerResolverParameters, configFile: URI | undefined, overrideConfigFile: URI | undefined, providedIdLabels: string[] | undefined, additionalFeatures: Record<string, string | boolean | Record<string, string | boolean>>)

Source from the content-addressed store, hash-verified

24
25
26export async function resolve(params: DockerResolverParameters, configFile: URI | undefined, overrideConfigFile: URI | undefined, providedIdLabels: string[] | undefined, additionalFeatures: Record<string, string | boolean | Record<string, string | boolean>>): Promise<ResolverResult> {
27 if (configFile && !/\/\.?devcontainer\.json$/.test(configFile.path)) {
28 throw new Error(`Filename must be devcontainer.json or .devcontainer.json (${uriToFsPath(configFile, params.common.cliHost.platform)}).`);
29 }
30 const parsedAuthority = params.parsedAuthority;
31 if (!parsedAuthority || isDevContainerAuthority(parsedAuthority)) {
32 return resolveWithLocalFolder(params, parsedAuthority, configFile, overrideConfigFile, providedIdLabels, additionalFeatures);
33 } else {
34 throw new Error(`Unexpected authority: ${JSON.stringify(parsedAuthority)}`);
35 }
36}
37
38async function resolveWithLocalFolder(params: DockerResolverParameters, parsedAuthority: DevContainerAuthority | undefined, configFile: URI | undefined, overrideConfigFile: URI | undefined, providedIdLabels: string[] | undefined, additionalFeatures: Record<string, string | boolean | Record<string, string | boolean>>): Promise<ResolverResult> {
39 const { common, workspaceMountConsistencyDefault } = params;

Callers 15

launchFunction · 0.90
launchFunction · 0.85
runCommandNoPtyFunction · 0.85
runCommandFunction · 0.85
plainExecFunction · 0.85
plainPtyExecFunction · 0.85
removeContainerFunction · 0.85
startEventSeenFunction · 0.85
pollFunction · 0.85
provisionFunction · 0.85
setUpFunction · 0.85
buildFunction · 0.85

Calls 3

isDevContainerAuthorityFunction · 0.90
uriToFsPathFunction · 0.85
resolveWithLocalFolderFunction · 0.85

Tested by

no test coverage detected