@blocofy/cli 0.1.8 → 0.1.9

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/bin/blocofy.mjs CHANGED
@@ -15,12 +15,12 @@ import { createInterface } from "node:readline/promises";
15
15
  import { credentialsPath, loadCredentials, saveCredentials } from "../lib/credentials.mjs";
16
16
  import { startDevServer } from "../lib/dev-server.mjs";
17
17
  import { readLocalTemplates } from "../lib/local-theme.mjs";
18
- import { githubNote } from "../lib/messages.mjs";
18
+ import { githubNote, statusLine, syncScopeNote } from "../lib/messages.mjs";
19
19
  import { fetchDevSession, pullTheme, pushTheme } from "../lib/theme-sync.mjs";
20
20
  import { hyperlink, openUrl } from "../lib/term.mjs";
21
21
  import { isValidToken, isValidUrl, normalizeUrl } from "../lib/validate.mjs";
22
22
 
23
- const VERSION = "0.1.8";
23
+ const VERSION = "0.1.9";
24
24
  const args = process.argv.slice(2);
25
25
 
26
26
  /** Parse `--key value` and `--flag` (boolean) arguments. */
@@ -215,12 +215,22 @@ async function themeDev(rest) {
215
215
  console.log(` (l) Local ${hyperlink(localUrl)}`);
216
216
  if (previewUrl) console.log(` (p) Preview ${hyperlink(previewUrl)}`);
217
217
  if (editorUrl) console.log(` (e) Editor ${hyperlink(editorUrl)}`);
218
+
219
+ // Kalıcı durum satırı (#119 CLI bulgu #3): yerel hangi taslağa gidiyor + canlı tema.
220
+ const status = statusLine(session);
221
+ if (status) console.log(`\n ${status}`);
222
+
218
223
  const keys = ["l local", previewUrl && "p preview", editorUrl && "e editor", "q quit"]
219
224
  .filter(Boolean)
220
225
  .join(" ");
221
226
  console.log(`\n Press: ${keys}`);
222
227
  console.log(` Edit a theme file and save — every open view reloads automatically.\n`);
223
228
 
229
+ // Senkron kapsamı (#119 CLI bulgu #2): hangi dizinler taşınıyor / taşınmıyor —
230
+ // "config/pages senkronlanıyor sandım" karışıklığını açıkça önler.
231
+ for (const line of syncScopeNote()) console.log(` ${line}`);
232
+ console.log("");
233
+
224
234
  // Düzlem uyarısı: CLI yalnız tema KODUNU taşır; editörde yapılan içerik/ayar
225
235
  // bulutta yaşar (githubNote → lib/messages.mjs, oturum durumuna göre uyarlanır).
226
236
  const note = githubNote(session);
package/lib/messages.mjs CHANGED
@@ -3,6 +3,34 @@
3
3
  * CLI yalnız tema KODUNU taşır; editörde yapılan içerik/ayar bulutta yaşar.
4
4
  */
5
5
 
6
+ import { THEME_DIRS } from "./local-theme.mjs";
7
+
8
+ /**
9
+ * Senkron kapsamı (#119 CLI bulgu #2) — geliştiriciye AÇIKÇA hangi dizinlerin
10
+ * platforma taşındığını (tema kodu) ve hangilerinin taşınMADIĞINI (editör/bulut
11
+ * içeriği) söyler; "config/pages senkronlanıyor sandım" kafa karışıklığını önler.
12
+ * 2 satırlık dizi döner (saf → test edilebilir).
13
+ */
14
+ export function syncScopeNote() {
15
+ const synced = [...THEME_DIRS].sort().map((d) => `${d}/`).join(" ");
16
+ return [
17
+ `Synced (theme code): ${synced}`,
18
+ `Not synced (cloud): config/ pages/ — edit these in the admin editor`,
19
+ ];
20
+ }
21
+
22
+ /**
23
+ * Kalıcı durum satırı (#119 CLI bulgu #3) — yerel dosyaların hangi taslak temaya
24
+ * gittiğini ve canlı temanın hangi instance olduğunu gösterir. Oturum yoksa null
25
+ * (local-only mod). `liveThemeId` yoksa "(none)".
26
+ */
27
+ export function statusLine(session) {
28
+ if (!session) return null;
29
+ const draft = session.draftInstanceId != null ? `#${session.draftInstanceId}` : "—";
30
+ const live = session.liveThemeId != null ? `#${session.liveThemeId}` : "(none)";
31
+ return `Local files → Draft theme ${draft} · Live theme → ${live}`;
32
+ }
33
+
6
34
  /**
7
35
  * Dev oturumuna göre "düzlem" uyarısı döndürür (string), oturum yoksa null.
8
36
  * - GitHub bağlı → repo@branch + `git pull` ipucu.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocofy/cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Develop your Blocofy theme locally against live data with instant preview — login, theme dev, pull, push.",
5
5
  "type": "module",
6
6
  "license": "MIT",