Versions 45 to 318
Lines 2–9 at 318 (were 2–8 at 45)
22
5−import { type Api, ApiError, type Collision, type Settled } from "./api.ts";
89import { collisionsHeading, collisionText, mergedLinesText, mergedText } from "./collision-text.ts";
Lines 13–19 at 318 (were 12–17 at 45)
Lines 66–85 at 318 (were 64–69 at 45)
6668
70+ * After "Pushed version N.": whether CI will check it, where the server says (its `ciWhere`). Nothing for the server's own
76+ `CI is off for this project, so version ${version} isn't checked. Connect a Cloudflare account in the project's settings on the website to run it there.`,
79+ return [`CI checks it in the project's Cloudflare account: abso ci ${version} shows the result.`];
82+
Lines 89–95 at 318 (were 73–79 at 45)
76− `--wait is how many seconds to wait for a queued publish to land, like 100 (got ${JSON.stringify(rawWait)})`,
92+ `--wait is how many seconds to wait for a queued push to land, like 100 (got ${JSON.stringify(rawWait)})`,
7894 const waitSeconds = bool(args, "no-wait") ? 0 : rawWait === undefined ? WAIT_SECONDS : Number(rawWait);
Lines 119–143 at 318 (were 103–127 at 45)
104120 // two changes that each passed alone turned shared red twice. Sync first, then run it in the box.
106− // Known to have no prep: refuse before syncing and running (#37, Artist 1). Unknown: the run below tells.
122+ // Known to have no prep: refuse before syncing and running (#37). Unknown: the run below tells.
108− "your box has no prep, so a check would run without node_modules and its result couldn't be trusted. Run abso prep 'npm ci --ignore-scripts' once (every fresh box then starts from it), then publish --check again.";
124+ "your box has no prep, so a check would run without node_modules and its result couldn't be trusted. Run abso prep 'npm ci --ignore-scripts' once (every fresh box then starts from it), then push --check again.";
109125 if (knownPrep(root, boxOf(args, env)) === null && existsSync(join(root, "package-lock.json"))) {
112− text: `Not published: ${noPrep} (Nothing was run: this folder's last run in that box said it had no prep.)`,
128+ text: `Not pushed: ${noPrep} (Nothing was run: this folder's last run in that box said it had no prep.)`,
118− "Nothing was published, and the check didn't run.",
124− text: `${synced.text}\nNot published: the sync before the check left collisions. Settle them, then publish --check again.`,
140+ text: `${synced.text}\nNot pushed: the pull before the check left collisions. Settle them, then push --check again.`,
Lines 145–151 at 318 (were 129–135 at 45)
132− `abso: the sync didn't write these: ${sj.refused!.map((r) => r.path).join(", ")}; the check runs without them.\n`,
148+ `abso: the pull didn't write these: ${sj.refused!.map((r) => r.path).join(", ")}; the check runs without them.\n`,
Lines 157–163 at 318 (were 141–147 at 45)
141157 if ((ran.json as { prep?: string | null }).prep === null && existsSync(join(root, "package-lock.json"))) {
144− text: "Not published: your box has no prep, so the check ran without node_modules and its result can't be trusted. Run abso prep 'npm ci --ignore-scripts' once (every fresh box then starts from it), then publish --check again.",
160+ text: "Not pushed: your box has no prep, so the check ran without node_modules and its result can't be trusted. Run abso prep 'npm ci --ignore-scripts' once (every fresh box then starts from it), then push --check again.",
Lines 191–197 at 318 (were 175–181 at 45)
178− `Not published: the check failed (exit ${ran.exit}) on your draft with newest shared. Its output is above.`,
194+ `Not pushed: the check failed (exit ${ran.exit}) on your draft with newest shared. Its output is above.`,
Lines 203–209 at 318 (were 187–193 at 45)
190− say("abso: the check passed; publishing.\n");
Lines 211–231 at 318 (were 195–211 at 45)
195211 // Say how far it got when the server can't be reached (#37, GAME - UI/UX: did the check run? did the draft go up?).
198− checked
199− ? "The check passed, but the publish never reached the server: nothing was published."
200− : "Nothing was published.",
201− `${checked ? "The check passed; " : ""}the publish may have reached the server before its answer was lost: abso status shows whether your draft was published.`,
214+ checked ? "The check passed, but the push never reached the server: nothing was pushed." : "Nothing was pushed.",
215+ `${checked ? "The check passed; " : ""}the push may have reached the server before its answer was lost: abso status shows whether your draft was pushed.`,
204− // --done: this publish finishes the work the start note named (#44): take the note back once it's published or queued.
205− const went =
206− (out.json as { version?: unknown; queued?: unknown }).version !== undefined ||
207− (out.json as { queued?: unknown }).queued !== undefined;
208− if (!bool(args, "done") || !went) return out;
218+ // --done: this publish finishes the work the start note named (#44): take the note back once it's published.
219+ // A publish still in the merge queue may yet be pulled, so its note and issue stay as they are until it lands.
221+ const { version, queued, outcome } = out.json as { version?: unknown; queued?: unknown; outcome?: unknown };
226+ text: `${out.text}\nYour start note stays (--done): push ${queued} hasn't landed yet. Once it has, abso start --done takes the note back and abso issue <N> --done closes the issue it names.`,
Lines 258–264 at 318 (were 238–244 at 45)
241− text: `Published version ${landed.version}. The server's answer was lost (${why}), but shared's log shows your publish landed.`,
261+ text: `Pushed version ${landed.version}. The server's answer was lost (${why}), but shared's log shows your push landed.`,
Lines 268–280 at 318 (were 248–260 at 45)
251− text: `Queued as publish ${queued.id}. The server's answer was lost (${why}), but the merge queue holds your publish; the outcome comes as news on your next edit, and abso status shows the queue.`,
271+ text: `Queued as push ${queued.id}. The server's answer was lost (${why}), but the merge queue holds your push; the outcome comes as news on your next edit, and abso status shows the queue.`,
257− text: `Not published: ${why}. Shared's newest versions and the merge queue don't have it, so it's safe to publish again.`,
277+ text: `Not pushed: ${why}. Shared's newest versions and the merge queue don't have it, so it's safe to push again.`,
Lines 309–315 at 318 (were 289–294 at 45)
Lines 318–324 at 318 (were 297–303 at 45)
297318 // Publishing now would leave the others on the file's old text without anyone noticing (#25).
300− text: [...pre, ...turnedBinaryText(recorded.turnedBinary), "Not published."].join("\n"),
Lines 346–352 at 318 (were 325–331 at 45)
328− const head = `Queued as publish ${answer.queued}${answer.ahead === 0 ? "" : `, ${answer.ahead} ${answer.ahead === 1 ? "publish" : "publishes"} ahead of it`}: it lands once the project's check passes on it in the merge queue.`;
349+ const head = `Queued as push ${answer.queued}${answer.ahead === 0 ? "" : `, ${answer.ahead} ${answer.ahead === 1 ? "push" : "pushes"} ahead of it`}: it lands once the project's check passes on it in the merge queue.`;
Lines 380–386 at 318 (were 359–367 at 45)
362− text: [...notes, `Published version ${out.version}: it passed the project's check in the merge queue.`].join(
363− "\n",
364− ),
383+ text: [...notes, `Pushed version ${out.version}: it passed the project's check in the merge queue.`].join("\n"),
Lines 394–400 at 318 (were 375–381 at 45)
378− `Publish ${answer.queued} left the merge queue, but nothing said whether it landed: abso log -n 3 shows it if it did.`,
397+ `Push ${answer.queued} left the merge queue, but nothing said whether it landed: abso log -n 3 shows it if it did.`,
Lines 404–410 at 318 (were 385–393 at 45)
388− text: [...notes, `Still queued after ${waitSeconds} s: publish ${answer.queued} is ${where}. ${later}`].join(
389− "\n",
390− ),
407+ text: [...notes, `Still queued after ${waitSeconds} s: push ${answer.queued} is ${where}. ${later}`].join("\n"),
Lines 413–419 at 318 (were 396–402 at 45)
399− : `Published version ${answer.version}.${merged.length > 0 ? ` ${mergedText(merged)}` : ""}`;
Lines 433–443 at 318 (were 416–424 at 45)
Lines 453–461 at 318 (were 434–442 at 45)
437− `Not published: ${files.join(", ")} still ${files.length === 1 ? "has" : "have"} collision markers (${plural(collisions.length, "block")}).`,
456+ `Not pushed: ${files.join(", ")} still ${files.length === 1 ? "has" : "have"} collision markers (${plural(collisions.length, "block")}).`,
439− `Settle each: keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours|--theirs|--both. Then publish again. abso publish --as-is keeps both sides everywhere; the other authors hear it.`,
458+ `Settle each: keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours|--theirs|--both. Then push again. abso push --as-is keeps both sides everywhere; the other authors hear it.`,
Lines 466–474 at 318 (were 447–455 at 45)
450− `Not published: ${plural(collisions.length, "collision")} you synced into and haven't edited since. Both sides' lines are still in the file, so publishing now would put them in shared twice.`,
469+ `Not pushed: ${plural(collisions.length, "collision")} you pulled into and haven't edited since. Both sides' lines are still in the file, so pushing now would put them in shared twice.`,
452− "Edit each to what it should be (keep yours, theirs, or a mix), then publish again. If both really belong, abso publish --as-is keeps both.",
471+ "Edit each to what it should be (keep yours, theirs, or a mix), then push again. If both really belong, abso push --as-is keeps both.",
Lines 477–629 at 318 (were 458–494 at 45)
482+ // When the server says to settle (its AUTOSETTLE=act) and to keep a side of every collision, settle them here and
492+ text === null || text === undefined ? null : settleText(text, a.pick as "yours" | "theirs" | "both");
499+ // No marker block: the pull merged the lines itself. That counts when the file already holds the
508+ const wanted = sides.flatMap((t) => t.split(/\r?\n/).map((l) => l.trim())).filter((l) => l !== "");
518+ `Not pushed: the server advised settling ${left.join(", ")}, but the pull left no marker block there. Settle as the pull says, then push again.`,
539+ `Held: ${plural(collisions.length, "collision")} with work pushed since your last pull. Settled automatically, as the server advised:`,
542+ "Check what was kept with abso show <version>:<file>; to change it, edit the file and push. ABSO_AUTOSETTLE=off settles nothing by itself.",
466− `Not published: ${plural(collisions.length, "collision")}${newer.length > 0 ? " with work published since your last sync" : ""}.${answer.reason ? ` (${answer.reason})` : ""}`,
552+ `Not pushed: ${plural(collisions.length, "collision")}${newer.length > 0 ? " with work pushed since your last pull" : ""}.${answer.reason ? ` (${answer.reason})` : ""}`,
557+ ...collisions.flatMap((c, i) => (advice[i] ? [` ${c.file}: ${adviceWords(advice[i]!)}`] : [])),
470− ` ${local.map((c) => c.file).join(", ")}: local files that should never have been shared. abso sync drops them from your draft and leaves your copy on disk.`,
562+ ` ${local.map((c) => c.file).join(", ")}: local files that should never have been shared. abso pull drops them from your draft and leaves your copy on disk.`,
475− "Some of theirs are still in the merge queue, not in shared: once they land (abso status shows the queue), abso sync brings them in to settle; if they're pulled, publish again as you are.",
567+ "Some of theirs are still in the merge queue, not in shared: once they land (abso status shows the queue), abso pull brings them in to settle; if they're turned back, push again as you are.",
479− ? `Run abso sync: each of those files comes back holding both sides' lines, with no markers. Edit it to what it should be${twice.length > 0 ? ", keep one definition of each name defined twice" : ""}, then publish again.`
571+ ? `Run abso pull: each of those files comes back holding both sides' lines, in a marker block where you both changed the same lines. Settle each as the pull says${twice.length > 0 ? ", keep one definition of each name defined twice" : ""}, then push again.`
481− ? "Keep one definition of each name defined twice (delete yours, or theirs), then publish again."
482− : "Run abso sync, then publish again.",
484− json: { collisions, recorded: recorded.sent, ...(answer.reason ? { reason: answer.reason } : {}) },
487584
597+
599+ * What to settle by itself (#19), file by file, or null to leave it to the agent: every collision a lines collision
600+ * the server advised keeping a side of (it advises a side only at or above its threshold), each file's advice the
612+ if ((c.kind ?? "lines") !== "lines" || c.untouched || c.marked || c.theirs.queued !== undefined) return null;
620+
625+ // A pull here that never wrote its answer (abso-core 26): this one asks for every file to catch up.
Lines 633–649 at 318 (were 498–511 at 45)
501− `Synced to version ${s.version}: ${changes === 0 ? "no files changed" : `${plural(updated.length, "file")} updated, ${removed.length} deleted${s.renamed.length > 0 ? `, ${s.renamed.length} renamed` : ""}`}.`,
502− ...changedFilesText("sync", updated, removed, s.renamed, bool(args, "verbose")),
636+ `Pulled to version ${s.version}: ${changes === 0 ? "no files changed" : `${plural(updated.length, "file")} updated, ${removed.length} deleted${s.renamed.length > 0 ? `, ${s.renamed.length} renamed` : ""}`}.`,
639+ ? ["The last pull here didn't finish, so this one asked for every file and wrote the ones that differed."]
508− ? [`Left alone because they changed while syncing (run abso sync again): ${s.kept.join(", ")}`]
646+ ? [`Left alone because they changed while pulling (run abso pull again): ${s.kept.join(", ")}`]
Lines 688–694 at 318 (were 550–556 at 45)
551689
553− * What an empty publish says (#37, Artist 1: "Nothing to publish: your draft
Lines 701–707 at 318 (were 563–569 at 45)
566− const empty = `Nothing to publish: your draft is empty. Shared is at version ${version}.`;
Lines 720–726 at 318 (were 582–588 at 45)
585− return `Nothing published: shared already has ${found.length === 1 ? "the file you changed" : "the files you changed"} as you have ${found.length === 1 ? "it" : "them"}, so nothing of yours is lost. Last changed in ${found.join("; ")}. Shared is at version ${version}.`;
723+ return `Nothing pushed: shared already has ${found.length === 1 ? "the file you changed" : "the files you changed"} as you have ${found.length === 1 ? "it" : "them"}, so nothing of yours is lost. Last changed in ${found.join("; ")}. Shared is at version ${version}.`;
587725
- MCP
- compare on this site's /mcp
- CLI
- abso diff 45 318 client/src/publish-commands.ts --json
- JSON
- /christopher/abso-core/compare/45..318?file=client%2Fsrc%2Fpublish-commands.ts&format=json