@blocofy/cli 0.16.0 → 0.17.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/README.md +12 -1
- package/bin/blocofy.mjs +26 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -623,7 +623,18 @@ Each retry prints a notice on stderr.
|
|
|
623
623
|
|
|
624
624
|
## Changelog
|
|
625
625
|
|
|
626
|
-
- **0.
|
|
626
|
+
- **0.17.0** (2026-10-31) — `theme publish` tells you when the live site is not serving the files
|
|
627
|
+
you published.
|
|
628
|
+
- **`theme publish` reports an unrefreshed live site.** When the platform answers
|
|
629
|
+
`live_sealed: false`, the CLI prints the reason and the fix (`blocofy theme push --live --yes`)
|
|
630
|
+
and exits 4 (not complete) instead of reporting success. Platforms that do not send the field
|
|
631
|
+
behave as before.
|
|
632
|
+
- **`blocofy status` shows live file freshness** ("Live files: up to date", or which files are
|
|
633
|
+
stale, missing or extra on the live site).
|
|
634
|
+
- `theme publish` accepts `--yes` / `--confirm` (no prompt to skip; accepted so scripts that pass
|
|
635
|
+
it to every live command do not fail).
|
|
636
|
+
- `theme dev` no longer prints a preview URL containing `undefined&hr=` for a session without one.
|
|
637
|
+
- **0.16.0** (2026-10-06) — Browser login, `blocofy init`, honest `logout` (ADR-0014 wave P4).
|
|
627
638
|
Pairs with the platform release of the credential profiles (draft-only "Tema geliştirme" by
|
|
628
639
|
default). **Minimum platform:** the browser login needs a platform that publishes the CLI client
|
|
629
640
|
(`blocofy-cli`), RFC 9207 `iss`, `/revoke` and the `profile` / `audience` / `dev_endpoint` fields of
|
package/bin/blocofy.mjs
CHANGED
|
@@ -100,7 +100,8 @@ const KNOWN = {
|
|
|
100
100
|
themePull: ["draft", "instance"],
|
|
101
101
|
themePush: ["diff", "draft", "instance", "name", "live", "yes", "confirm", "dry-run", "validate", "idempotency-key", "prune", "work"],
|
|
102
102
|
themeDev: ["port", "dry", "no-sync", "name", "instance"],
|
|
103
|
-
|
|
103
|
+
// `yes`/`confirm` are accepted (no-op: publish never prompts) so `--yes` works the same as on `theme push --live`.
|
|
104
|
+
themePublish: ["instance", "yes", "confirm"],
|
|
104
105
|
themeRename: ["name", "dir"],
|
|
105
106
|
themeWorkStart: ["intent", "idempotency-key"],
|
|
106
107
|
themeWorkStatus: ["dir"],
|
|
@@ -2596,8 +2597,9 @@ async function themeDev(rest) {
|
|
|
2596
2597
|
}
|
|
2597
2598
|
|
|
2598
2599
|
const localUrl = `http://localhost:${port}`;
|
|
2599
|
-
|
|
2600
|
-
const
|
|
2600
|
+
// A session without a URL (an older platform answer) must not become "undefined&hr=…".
|
|
2601
|
+
const previewUrl = session?.previewUrl ? `${session.previewUrl}&hr=${port}` : null;
|
|
2602
|
+
const editorUrl = session?.editorUrl ? `${session.editorUrl}&hr=${port}` : null;
|
|
2601
2603
|
|
|
2602
2604
|
// Çözülen site'ı göster (session TOKEN'dan çözer) → hangi tenant'ı düzenlediğin belli olsun.
|
|
2603
2605
|
const siteLine = session?.site ? `${siteLabel(session.site)} · ` : "";
|
|
@@ -2778,6 +2780,16 @@ async function themePublish(rest) {
|
|
|
2778
2780
|
console.log(
|
|
2779
2781
|
`✓ Theme ${result.published} is now LIVE${result.cloned ? " (pages cloned from the previous live theme)" : ""}.`,
|
|
2780
2782
|
);
|
|
2783
|
+
// The platform seals the new live theme's current files on publish and says whether it did. Not sealed = the
|
|
2784
|
+
// live site may still serve the files this theme had at its last seal (an older app.js): exit 4 so scripts
|
|
2785
|
+
// notice, and say how to seal again. An older platform sends no `live_sealed`: nothing changes.
|
|
2786
|
+
if (result.live_sealed === false) {
|
|
2787
|
+
console.error(
|
|
2788
|
+
`Warning: the live site may still serve this theme's previous files (live files not refreshed: ${result.live_seal_reason ?? "unknown"}).\n` +
|
|
2789
|
+
`Refresh them with: blocofy theme push --live --yes`,
|
|
2790
|
+
);
|
|
2791
|
+
process.exitCode = 4;
|
|
2792
|
+
}
|
|
2781
2793
|
}
|
|
2782
2794
|
|
|
2783
2795
|
// ── theme work ("çalışma"): a safe, private copy of the live theme, continued by its exact handle ──────────────
|
|
@@ -3242,6 +3254,17 @@ async function status(rest) {
|
|
|
3242
3254
|
: `Live theme: none`,
|
|
3243
3255
|
);
|
|
3244
3256
|
console.log(`Health: ${s.health}`);
|
|
3257
|
+
// What live actually serves vs. the stored theme files (platforms that report it).
|
|
3258
|
+
const ls = s.live_source;
|
|
3259
|
+
if (ls?.pinned === true && ls.in_sync === false) {
|
|
3260
|
+
const paths = [...(ls.stale ?? []), ...(ls.missing ?? []), ...(ls.extra ?? [])];
|
|
3261
|
+
console.error(`Live files: OUT OF DATE — the live site does not serve ${paths.length} stored file(s): ${paths.slice(0, 5).join(", ")}${paths.length > 5 ? ", …" : ""}`);
|
|
3262
|
+
console.error(" Refresh them with: blocofy theme push --live --yes");
|
|
3263
|
+
} else if (ls?.pinned === true) {
|
|
3264
|
+
console.log("Live files: up to date");
|
|
3265
|
+
} else if (ls?.pinned === null) {
|
|
3266
|
+
console.error("Live files: could not be checked right now");
|
|
3267
|
+
}
|
|
3245
3268
|
// CF-T9: no imperative one-line fix — which theme holds the pages, why, and safe (preview-first) next steps.
|
|
3246
3269
|
for (const line of healthAdvice(s)) console.error(line);
|
|
3247
3270
|
if (Array.isArray(s.drafts) && s.drafts.length > 0) {
|
package/package.json
CHANGED