@fractary/codex-cli 0.10.2 → 0.10.3
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/dist/cli.cjs +11 -5
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +11 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -230,7 +230,13 @@ function getDefaultYamlConfig(organization) {
|
|
|
230
230
|
}
|
|
231
231
|
async function readYamlConfig(configPath) {
|
|
232
232
|
const content = await fs.readFile(configPath, "utf-8");
|
|
233
|
-
const
|
|
233
|
+
const rawConfig = yaml.load(content);
|
|
234
|
+
let config;
|
|
235
|
+
if (rawConfig.codex && typeof rawConfig.codex === "object") {
|
|
236
|
+
config = rawConfig.codex;
|
|
237
|
+
} else {
|
|
238
|
+
config = rawConfig;
|
|
239
|
+
}
|
|
234
240
|
if (!config.organization) {
|
|
235
241
|
throw new Error("Invalid config: organization is required");
|
|
236
242
|
}
|
|
@@ -385,7 +391,7 @@ var init_codex_client = __esm({
|
|
|
385
391
|
const { readYamlConfig: readYamlConfig2 } = await Promise.resolve().then(() => (init_migrate_config(), migrate_config_exports));
|
|
386
392
|
const { resolveEnvVarsInConfig: resolveEnvVarsInConfig2 } = await Promise.resolve().then(() => (init_config_types(), config_types_exports));
|
|
387
393
|
try {
|
|
388
|
-
const configPath = path5.join(process.cwd(), ".fractary", "
|
|
394
|
+
const configPath = path5.join(process.cwd(), ".fractary", "config.yaml");
|
|
389
395
|
let config;
|
|
390
396
|
try {
|
|
391
397
|
config = await readYamlConfig2(configPath);
|
|
@@ -1780,7 +1786,7 @@ function syncCommand() {
|
|
|
1780
1786
|
const cmd = new Command("sync");
|
|
1781
1787
|
cmd.description("Sync single project with codex repository").argument("[name]", "Project name (auto-detected if not provided)").option("--env <env>", "Target environment (dev/test/staging/prod)", "prod").option("--dry-run", "Show what would sync without executing").option("--direction <dir>", "Sync direction (to-codex/from-codex/bidirectional)", "bidirectional").option("--include <pattern>", "Include files matching pattern (can be used multiple times)", (val, prev) => prev.concat([val]), []).option("--exclude <pattern>", "Exclude files matching pattern (can be used multiple times)", (val, prev) => prev.concat([val]), []).option("--force", "Force sync without checking timestamps").option("--json", "Output as JSON").action(async (name, options) => {
|
|
1782
1788
|
try {
|
|
1783
|
-
const configPath = path5.join(process.cwd(), ".fractary", "
|
|
1789
|
+
const configPath = path5.join(process.cwd(), ".fractary", "config.yaml");
|
|
1784
1790
|
let config;
|
|
1785
1791
|
try {
|
|
1786
1792
|
config = await readYamlConfig(configPath);
|
|
@@ -2298,7 +2304,7 @@ function typesAddCommand() {
|
|
|
2298
2304
|
console.log(chalk7.dim("Examples: 30m, 24h, 7d"));
|
|
2299
2305
|
process.exit(1);
|
|
2300
2306
|
}
|
|
2301
|
-
const configPath = path5.join(process.cwd(), ".fractary", "
|
|
2307
|
+
const configPath = path5.join(process.cwd(), ".fractary", "config.yaml");
|
|
2302
2308
|
const config = await readYamlConfig(configPath);
|
|
2303
2309
|
if (!config.types) {
|
|
2304
2310
|
config.types = { custom: {} };
|
|
@@ -2367,7 +2373,7 @@ function typesRemoveCommand() {
|
|
|
2367
2373
|
process.exit(1);
|
|
2368
2374
|
}
|
|
2369
2375
|
const typeInfo = registry.get(name);
|
|
2370
|
-
const configPath = path5.join(process.cwd(), ".fractary", "
|
|
2376
|
+
const configPath = path5.join(process.cwd(), ".fractary", "config.yaml");
|
|
2371
2377
|
const config = await readYamlConfig(configPath);
|
|
2372
2378
|
if (!config.types?.custom?.[name]) {
|
|
2373
2379
|
console.error(chalk7.red("Error:"), `Custom type "${name}" not found in configuration.`);
|