agconf 0.3.0 → 0.3.1

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/index.js CHANGED
@@ -904,7 +904,7 @@ function hashContent(content) {
904
904
  return `sha256:${hash.slice(0, 12)}`;
905
905
  }
906
906
  function getCliVersion() {
907
- return true ? "0.3.0" : "0.0.0";
907
+ return true ? "0.3.1" : "0.0.0";
908
908
  }
909
909
  async function checkCliVersionMismatch(targetDir) {
910
910
  const result = await readLockfile(targetDir);
@@ -3269,8 +3269,10 @@ async function syncCommand(options) {
3269
3269
  process.exit(1);
3270
3270
  }
3271
3271
  const targetDir = await resolveTargetDirectory();
3272
- const targets = await parseAndValidateTargets(options.target);
3273
3272
  const status = await getSyncStatus(targetDir);
3273
+ const targetsFromLockfile = status.lockfile?.content.targets;
3274
+ const effectiveTargetOption = options.target ?? (targetsFromLockfile?.length ? targetsFromLockfile : void 0);
3275
+ const targets = await parseAndValidateTargets(effectiveTargetOption);
3274
3276
  if (status.schemaError) {
3275
3277
  logger.error(status.schemaError);
3276
3278
  process.exit(1);
@@ -3457,7 +3459,7 @@ function createCli() {
3457
3459
  program.command("sync").description("Sync content from canonical repository (fetches latest by default)").option(
3458
3460
  "-s, --source <repo>",
3459
3461
  "Canonical repository in owner/repo format (e.g., acme/standards)"
3460
- ).option("--local [path]", "Use local canonical repository (auto-discover or specify path)").option("-y, --yes", "Non-interactive mode (merge by default)").option("--override", "Override existing AGENTS.md instead of merging").option("--ref <ref>", "GitHub ref/version to sync from").option("--pinned", "Use lockfile version without fetching latest").option("-t, --target <targets...>", "Target platforms (claude, codex)", ["claude"]).option("--summary-file <path>", "Write sync summary to file (markdown, for CI)").option("--expand-changes", "Show all items in output (default: first 5)").action(
3462
+ ).option("--local [path]", "Use local canonical repository (auto-discover or specify path)").option("-y, --yes", "Non-interactive mode (merge by default)").option("--override", "Override existing AGENTS.md instead of merging").option("--ref <ref>", "GitHub ref/version to sync from").option("--pinned", "Use lockfile version without fetching latest").option("-t, --target <targets...>", "Target platforms (claude, codex)").option("--summary-file <path>", "Write sync summary to file (markdown, for CI)").option("--expand-changes", "Show all items in output (default: first 5)").action(
3461
3463
  async (options) => {
3462
3464
  await syncCommand(options);
3463
3465
  }