* Get all the directories involved in the generation process.
({ runtimeBase, outputDir }: GenerateClientOptions)
| 338 | * Get all the directories involved in the generation process. |
| 339 | */ |
| 340 | async function getGenerationDirs({ runtimeBase, outputDir }: GenerateClientOptions) { |
| 341 | const normalizedOutputDir = path.normalize(outputDir) |
| 342 | const normalizedRuntimeBase = pathToPosix(runtimeBase) |
| 343 | |
| 344 | const userPackageRoot = await packageUp({ cwd: path.dirname(normalizedOutputDir) }) |
| 345 | const userProjectRoot = userPackageRoot ? path.dirname(userPackageRoot) : process.cwd() |
| 346 | |
| 347 | return { |
| 348 | runtimeBase: normalizedRuntimeBase, |
| 349 | outputDir: normalizedOutputDir, |
| 350 | projectRoot: userProjectRoot, |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | function getRuntimeNameForTarget(target: RuntimeTargetInternal): RuntimeName { |
| 355 | switch (target) { |
no test coverage detected