({
'workspace-folder': workspaceFolderArg,
'docker-path': dockerPath,
config: configArg,
'docker-compose-path': dockerComposePath,
'log-level': inputLogLevel,
'dry-run': dryRun,
feature: feature,
'target-version': targetVersion,
}: FeaturesUpgradeArgs)
| 54 | } |
| 55 | |
| 56 | async function featuresUpgrade({ |
| 57 | 'workspace-folder': workspaceFolderArg, |
| 58 | 'docker-path': dockerPath, |
| 59 | config: configArg, |
| 60 | 'docker-compose-path': dockerComposePath, |
| 61 | 'log-level': inputLogLevel, |
| 62 | 'dry-run': dryRun, |
| 63 | feature: feature, |
| 64 | 'target-version': targetVersion, |
| 65 | }: FeaturesUpgradeArgs) { |
| 66 | const disposables: (() => Promise<unknown> | undefined)[] = []; |
| 67 | const dispose = async () => { |
| 68 | await Promise.all(disposables.map(d => d())); |
| 69 | }; |
| 70 | let output: Log | undefined; |
| 71 | try { |
| 72 | const workspaceFolder = workspaceFolderArg ? path.resolve(process.cwd(), workspaceFolderArg) : process.cwd(); |
| 73 | const configFile = configArg ? URI.file(path.resolve(process.cwd(), configArg)) : undefined; |
| 74 | const cliHost = await getCLIHost(workspaceFolder, loadNativeModule, true); |
| 75 | const extensionPath = path.join(__dirname, '..', '..'); |
| 76 | const sessionStart = new Date(); |
| 77 | const pkg = getPackageConfig(); |
| 78 | const output = createLog({ |
| 79 | logLevel: mapLogLevel(inputLogLevel), |
| 80 | logFormat: 'text', |
| 81 | log: text => process.stderr.write(text), |
| 82 | terminalDimensions: undefined, |
| 83 | }, pkg, sessionStart, disposables); |
| 84 | const dockerComposeCLI = dockerComposeCLIConfig({ |
| 85 | exec: cliHost.exec, |
| 86 | env: cliHost.env, |
| 87 | output, |
| 88 | }, dockerPath, dockerComposePath); |
| 89 | const buildPlatformInfo = { |
| 90 | os: mapNodeOSToGOOS(cliHost.platform), |
| 91 | arch: mapNodeArchitectureToGOARCH(cliHost.arch), |
| 92 | }; |
| 93 | const dockerParams: DockerCLIParameters = { |
| 94 | cliHost, |
| 95 | dockerCLI: dockerPath, |
| 96 | dockerComposeCLI, |
| 97 | env: cliHost.env, |
| 98 | output, |
| 99 | buildPlatformInfo, |
| 100 | targetPlatformInfo: buildPlatformInfo, |
| 101 | }; |
| 102 | |
| 103 | const workspace = workspaceFromPath(cliHost.path, workspaceFolder); |
| 104 | const configPath = configFile ? configFile : await getDevContainerConfigPathIn(cliHost, workspace.configFolderPath); |
| 105 | let config = await getConfig(configPath, cliHost, workspace, output, configFile); |
| 106 | const cacheFolder = await getCacheFolder(cliHost); |
| 107 | const params = { |
| 108 | extensionPath, |
| 109 | cacheFolder, |
| 110 | cwd: cliHost.cwd, |
| 111 | output, |
| 112 | env: cliHost.env, |
| 113 | skipFeatureAutoMapping: false, |
nothing calls this directly
no test coverage detected