@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.cjs
CHANGED
|
@@ -263,7 +263,13 @@ function getDefaultYamlConfig(organization) {
|
|
|
263
263
|
}
|
|
264
264
|
async function readYamlConfig(configPath) {
|
|
265
265
|
const content = await fs__namespace.readFile(configPath, "utf-8");
|
|
266
|
-
const
|
|
266
|
+
const rawConfig = yaml__namespace.load(content);
|
|
267
|
+
let config;
|
|
268
|
+
if (rawConfig.codex && typeof rawConfig.codex === "object") {
|
|
269
|
+
config = rawConfig.codex;
|
|
270
|
+
} else {
|
|
271
|
+
config = rawConfig;
|
|
272
|
+
}
|
|
267
273
|
if (!config.organization) {
|
|
268
274
|
throw new Error("Invalid config: organization is required");
|
|
269
275
|
}
|
|
@@ -418,7 +424,7 @@ var init_codex_client = __esm({
|
|
|
418
424
|
const { readYamlConfig: readYamlConfig2 } = await Promise.resolve().then(() => (init_migrate_config(), migrate_config_exports));
|
|
419
425
|
const { resolveEnvVarsInConfig: resolveEnvVarsInConfig2 } = await Promise.resolve().then(() => (init_config_types(), config_types_exports));
|
|
420
426
|
try {
|
|
421
|
-
const configPath = path4__namespace.join(process.cwd(), ".fractary", "
|
|
427
|
+
const configPath = path4__namespace.join(process.cwd(), ".fractary", "config.yaml");
|
|
422
428
|
let config;
|
|
423
429
|
try {
|
|
424
430
|
config = await readYamlConfig2(configPath);
|
|
@@ -1813,7 +1819,7 @@ function syncCommand() {
|
|
|
1813
1819
|
const cmd = new commander.Command("sync");
|
|
1814
1820
|
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) => {
|
|
1815
1821
|
try {
|
|
1816
|
-
const configPath = path4__namespace.join(process.cwd(), ".fractary", "
|
|
1822
|
+
const configPath = path4__namespace.join(process.cwd(), ".fractary", "config.yaml");
|
|
1817
1823
|
let config;
|
|
1818
1824
|
try {
|
|
1819
1825
|
config = await readYamlConfig(configPath);
|
|
@@ -2331,7 +2337,7 @@ function typesAddCommand() {
|
|
|
2331
2337
|
console.log(chalk7__default.default.dim("Examples: 30m, 24h, 7d"));
|
|
2332
2338
|
process.exit(1);
|
|
2333
2339
|
}
|
|
2334
|
-
const configPath = path4__namespace.join(process.cwd(), ".fractary", "
|
|
2340
|
+
const configPath = path4__namespace.join(process.cwd(), ".fractary", "config.yaml");
|
|
2335
2341
|
const config = await readYamlConfig(configPath);
|
|
2336
2342
|
if (!config.types) {
|
|
2337
2343
|
config.types = { custom: {} };
|
|
@@ -2400,7 +2406,7 @@ function typesRemoveCommand() {
|
|
|
2400
2406
|
process.exit(1);
|
|
2401
2407
|
}
|
|
2402
2408
|
const typeInfo = registry.get(name);
|
|
2403
|
-
const configPath = path4__namespace.join(process.cwd(), ".fractary", "
|
|
2409
|
+
const configPath = path4__namespace.join(process.cwd(), ".fractary", "config.yaml");
|
|
2404
2410
|
const config = await readYamlConfig(configPath);
|
|
2405
2411
|
if (!config.types?.custom?.[name]) {
|
|
2406
2412
|
console.error(chalk7__default.default.red("Error:"), `Custom type "${name}" not found in configuration.`);
|