go-duck-cli 1.1.1 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/devops.js +1 -1
- package/index.js +13 -1
- package/package.json +1 -1
package/generators/devops.js
CHANGED
package/index.js
CHANGED
|
@@ -474,6 +474,15 @@ program
|
|
|
474
474
|
const config = await loadConfig(path.resolve(process.cwd(), configPath));
|
|
475
475
|
console.log(chalk.green(`✅ Config loaded for app: ${config.name}`));
|
|
476
476
|
|
|
477
|
+
// Copy configuration file to the generated project .go-duck folder
|
|
478
|
+
const sourceConfigResolved = path.resolve(process.cwd(), configPath);
|
|
479
|
+
const targetConfigResolved = path.resolve(absoluteOutputDir, '.go-duck/config.yaml');
|
|
480
|
+
if (sourceConfigResolved !== targetConfigResolved) {
|
|
481
|
+
await fs.ensureDir(path.dirname(targetConfigResolved));
|
|
482
|
+
await fs.copy(sourceConfigResolved, targetConfigResolved);
|
|
483
|
+
console.log(chalk.green(`📝 Config file copied to: ${path.relative(process.cwd(), targetConfigResolved)}`));
|
|
484
|
+
}
|
|
485
|
+
|
|
477
486
|
// Cleanup legacy files if they exist in the root
|
|
478
487
|
const legacyFiles = ['Dockerfile', 'docker-compose.yml'];
|
|
479
488
|
const legacyDirs = ['k8s', 'realm-config'];
|
|
@@ -605,7 +614,10 @@ program
|
|
|
605
614
|
const absoluteOutputDir = path.resolve(process.cwd(), options.output);
|
|
606
615
|
console.log(chalk.blue(`📥 Importing GDL from ${gdlPath}...`));
|
|
607
616
|
|
|
608
|
-
let configPath = path.resolve(process.cwd(), '
|
|
617
|
+
let configPath = path.resolve(process.cwd(), './.go-duck/config.yaml');
|
|
618
|
+
if (!await fs.pathExists(configPath)) {
|
|
619
|
+
configPath = path.resolve(process.cwd(), './CONFIG/config.yaml');
|
|
620
|
+
}
|
|
609
621
|
if (!await fs.pathExists(configPath)) {
|
|
610
622
|
configPath = path.resolve(process.cwd(), '../CONFIG/config.yaml');
|
|
611
623
|
}
|