@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 CHANGED
@@ -1991,7 +1991,7 @@ function syncCommand() {
1991
1991
  syncOptions
1992
1992
  );
1993
1993
  plan.source = sourceDir;
1994
- plan.target = path4__namespace.join(codexRepoPath, config.organization, projectName);
1994
+ plan.target = path4__namespace.join(codexRepoPath, "projects", projectName);
1995
1995
  }
1996
1996
  if (plan.totalFiles === 0) {
1997
1997
  if (options.json) {
@@ -2116,13 +2116,19 @@ Total: ${plan.totalFiles} files (${formatBytes(plan.totalBytes)})`));
2116
2116
  }
2117
2117
  const { RepoManager } = await import('@fractary/core/repo');
2118
2118
  const repoManager = new RepoManager({ platform: "github" }, codexRepoPath);
2119
- await repoManager.stageAll();
2120
- await repoManager.commit({
2121
- message: `Sync ${result.synced} files from ${projectName}`
2122
- });
2123
- await repoManager.push({});
2124
- if (!options.json) {
2125
- console.log(chalk7__default.default.dim(" Changes pushed to codex repository"));
2119
+ repoManager.stageAll();
2120
+ if (repoManager.isClean()) {
2121
+ if (!options.json) {
2122
+ console.log(chalk7__default.default.dim(" No changes to push - codex is already up to date"));
2123
+ }
2124
+ } else {
2125
+ repoManager.commit({
2126
+ message: `Sync ${result.synced} files from ${projectName}`
2127
+ });
2128
+ repoManager.push({});
2129
+ if (!options.json) {
2130
+ console.log(chalk7__default.default.dim(" Changes pushed to codex repository"));
2131
+ }
2126
2132
  }
2127
2133
  } catch (error) {
2128
2134
  console.error(chalk7__default.default.red("Error pushing to codex:"), error.message);