@fractary/codex-cli 0.10.8 → 0.10.10
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 +14 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +14 -8
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1958,7 +1958,7 @@ function syncCommand() {
|
|
|
1958
1958
|
syncOptions
|
|
1959
1959
|
);
|
|
1960
1960
|
plan.source = sourceDir;
|
|
1961
|
-
plan.target = path5.join(codexRepoPath,
|
|
1961
|
+
plan.target = path5.join(codexRepoPath, "projects", projectName);
|
|
1962
1962
|
}
|
|
1963
1963
|
if (plan.totalFiles === 0) {
|
|
1964
1964
|
if (options.json) {
|
|
@@ -2083,13 +2083,19 @@ Total: ${plan.totalFiles} files (${formatBytes(plan.totalBytes)})`));
|
|
|
2083
2083
|
}
|
|
2084
2084
|
const { RepoManager } = await import('@fractary/core/repo');
|
|
2085
2085
|
const repoManager = new RepoManager({ platform: "github" }, codexRepoPath);
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2086
|
+
repoManager.stageAll();
|
|
2087
|
+
if (repoManager.isClean()) {
|
|
2088
|
+
if (!options.json) {
|
|
2089
|
+
console.log(chalk7.dim(" No changes to push - codex is already up to date"));
|
|
2090
|
+
}
|
|
2091
|
+
} else {
|
|
2092
|
+
repoManager.commit({
|
|
2093
|
+
message: `Sync ${result.synced} files from ${projectName}`
|
|
2094
|
+
});
|
|
2095
|
+
repoManager.push({});
|
|
2096
|
+
if (!options.json) {
|
|
2097
|
+
console.log(chalk7.dim(" Changes pushed to codex repository"));
|
|
2098
|
+
}
|
|
2093
2099
|
}
|
|
2094
2100
|
} catch (error) {
|
|
2095
2101
|
console.error(chalk7.red("Error pushing to codex:"), error.message);
|