@bastani/atomic 0.5.7-0 → 0.5.8-0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.5.7-0",
3
+ "version": "0.5.8-0",
4
4
  "description": "Configuration management CLI and SDK for coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -25,9 +25,9 @@
25
25
  *
26
26
  * Failures are collected and reported as a summary at the end, but never
27
27
  * abort the run — partial setup matches the production installer's
28
- * "best-effort" semantics. The marker is written after every run (success
29
- * or partial) so we don't re-attempt the whole setup on every subsequent
30
- * launch.
28
+ * "best-effort" semantics. The marker is only written when every step
29
+ * succeeds; on partial failure the next launch re-runs all steps (they
30
+ * are idempotent, so re-running already-succeeded steps is harmless).
31
31
  */
32
32
 
33
33
  import { join } from "node:path";
@@ -109,18 +109,21 @@ export async function autoSyncIfStale(): Promise<void> {
109
109
  ],
110
110
  ]);
111
111
 
112
- // Always write the marker — partial setup is the production-installer
113
- // contract. Re-running the bootstrap installer or `bun update -g
114
- // @bastani/atomic` is the recovery path for a failed setup.
115
- await markSynced();
112
+ const failures = results.filter((r) => !r.ok);
113
+
114
+ // Only write the marker when every step succeeded. On partial failure
115
+ // the next launch will re-run all steps — they're idempotent, so
116
+ // re-running already-succeeded steps is cheap and harmless.
117
+ if (failures.length === 0) {
118
+ await markSynced();
119
+ }
116
120
 
117
121
  displayBlockBanner();
118
122
  printSummary(results);
119
123
 
120
- const failures = results.filter((r) => !r.ok);
121
124
  if (failures.length > 0) {
122
125
  console.log(
123
- `\n ${COLORS.dim}Re-run \`bun install -g @bastani/atomic\` after resolving the issues to retry.${COLORS.reset}\n`,
126
+ `\n ${COLORS.dim}Setup will retry on next launch. To retry now, re-run your command.${COLORS.reset}\n`,
124
127
  );
125
128
  } else {
126
129
  console.log(