@cat-factory/app 0.200.3 → 0.200.4

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.
@@ -15,6 +15,7 @@
15
15
  // and browses to a path; otherwise the manual owner/name fields are the fallback.
16
16
  import { computed, reactive, ref, watch } from 'vue'
17
17
  import type {
18
+ FolderScanCoverage,
18
19
  FoundationalServiceOwnerKind,
19
20
  FoundationalServiceSourceMode,
20
21
  GitHubAvailableRepo,
@@ -95,6 +96,19 @@ const modeHints = computed<Record<FoundationalServiceSourceMode, string>>(() =>
95
96
  files: t('foundational.sources.mode.filesHint'),
96
97
  }))
97
98
 
99
+ /**
100
+ * What a folder scan's coverage adds to the sync toast, or null when there is nothing to say.
101
+ *
102
+ * An exhaustive Record over the union rather than an `if` per state: `complete` having no note
103
+ * is then a written-down decision, and a fourth coverage value fails to compile until someone
104
+ * decides whether it needs one.
105
+ */
106
+ const folderScanNotes = computed<Record<FolderScanCoverage, string | null>>(() => ({
107
+ complete: null,
108
+ truncated: t('foundational.toast.syncTruncated'),
109
+ missing: t('foundational.toast.syncFolderMissing'),
110
+ }))
111
+
98
112
  /** Both single-service modes name their service on the link; only `files` enumerates paths. */
99
113
  const namesService = computed(() => mode.value === 'folder' || mode.value === 'files')
100
114
 
@@ -185,7 +199,8 @@ async function sync(id: string) {
185
199
  notes.push(
186
200
  t('foundational.toast.syncSkipped', { count: result.skippedFiles }, result.skippedFiles),
187
201
  )
188
- if (result.truncated) notes.push(t('foundational.toast.syncTruncated'))
202
+ const coverage = result.folderScan ? folderScanNotes.value[result.folderScan] : null
203
+ if (coverage) notes.push(coverage)
189
204
  toast.add({
190
205
  title: t('foundational.toast.synced', {
191
206
  updated: result.upserted,
@@ -193,7 +208,9 @@ async function sync(id: string) {
193
208
  }),
194
209
  ...(notes.length ? { description: notes.join(' ') } : {}),
195
210
  icon: 'i-lucide-refresh-cw',
196
- color: result.truncated ? 'warning' : 'info',
211
+ // A folder we could not fully see, or could not find at all, is the one sync outcome a
212
+ // human has to act on — the counts alone would read as an ordinary quiet success.
213
+ color: coverage ? 'warning' : 'info',
197
214
  })
198
215
  } catch (e) {
199
216
  notifyError(t('foundational.toast.syncFailed'), e)
@@ -16,6 +16,7 @@ export type {
16
16
  ApiContractFormat,
17
17
  ApiContractSummary,
18
18
  CreateFoundationalServiceInput,
19
+ FolderScanCoverage,
19
20
  FoundationalService,
20
21
  FoundationalServiceOwnerKind,
21
22
  FoundationalServiceSelection,
@@ -4346,6 +4346,7 @@
4346
4346
  "synced": "Synchronisiert: {updated} aktualisiert, {removed} entfernt",
4347
4347
  "syncSkipped": "{count} Datei sah wie ein Vertrag aus, war aber nicht verwendbar. | {count} Dateien sahen wie Verträge aus, waren aber nicht verwendbar.",
4348
4348
  "syncTruncated": "Der Ordner enthält mehr, als eine Synchronisierung aufnehmen kann; es wurde nur ein Teil gelesen.",
4349
+ "syncFolderMissing": "Der verknüpfte Ordner ist nicht im Repository vorhanden. Prüfe den Pfad oder verknüpfe die Quelle neu, falls er verschoben wurde.",
4349
4350
  "syncFailed": "Repo konnte nicht synchronisiert werden",
4350
4351
  "changesAvailable": "Stromaufwärts liegen Änderungen vor",
4351
4352
  "upToDate": "Bereits aktuell",
@@ -5554,6 +5554,7 @@
5554
5554
  "synced": "Synced: {updated} updated, {removed} removed",
5555
5555
  "syncSkipped": "{count} file looked like a contract but could not be used. | {count} files looked like contracts but could not be used.",
5556
5556
  "syncTruncated": "The folder holds more than one sync can take, so only part of it was read.",
5557
+ "syncFolderMissing": "The linked folder is not in the repository. Check the path, or relink the source if it moved.",
5557
5558
  "syncFailed": "Could not sync the repo",
5558
5559
  "changesAvailable": "Changes available upstream",
5559
5560
  "upToDate": "Already up to date",
@@ -5305,6 +5305,7 @@
5305
5305
  "synced": "Sincronizado: {updated} actualizados, {removed} eliminados",
5306
5306
  "syncSkipped": "{count} archivo parecía un contrato pero no se pudo usar. | {count} archivos parecían contratos pero no se pudieron usar.",
5307
5307
  "syncTruncated": "La carpeta contiene más de lo que cabe en una sincronización, así que solo se leyó una parte.",
5308
+ "syncFolderMissing": "La carpeta enlazada no está en el repositorio. Revisa la ruta o vuelve a enlazar la fuente si se movió.",
5308
5309
  "syncFailed": "No se pudo sincronizar el repositorio",
5309
5310
  "changesAvailable": "Hay cambios en el origen",
5310
5311
  "upToDate": "Ya está actualizado",
@@ -5305,6 +5305,7 @@
5305
5305
  "synced": "Synchronisé : {updated} mis à jour, {removed} retirés",
5306
5306
  "syncSkipped": "{count} fichier ressemblait à un contrat mais n'a pas pu être utilisé. | {count} fichiers ressemblaient à des contrats mais n'ont pas pu être utilisés.",
5307
5307
  "syncTruncated": "Le dossier contient plus que ce qu'une synchronisation peut prendre : seule une partie a été lue.",
5308
+ "syncFolderMissing": "Le dossier lié n'existe pas dans le dépôt. Vérifiez le chemin, ou reliez la source si elle a été déplacée.",
5308
5309
  "syncFailed": "Impossible de synchroniser le dépôt",
5309
5310
  "changesAvailable": "Des changements sont disponibles en amont",
5310
5311
  "upToDate": "Déjà à jour",
@@ -5316,6 +5316,7 @@
5316
5316
  "synced": "סונכרן: {updated} עודכנו, {removed} הוסרו",
5317
5317
  "syncSkipped": "קובץ אחד נראה כמו חוזה אך לא ניתן היה להשתמש בו. | {count} קבצים נראו כמו חוזים אך לא ניתן היה להשתמש בהם.",
5318
5318
  "syncTruncated": "התיקייה מכילה יותר ממה שסנכרון אחד יכול לקלוט, ולכן נקרא רק חלק ממנה.",
5319
+ "syncFolderMissing": "התיקייה המקושרת אינה נמצאת במאגר. בדקו את הנתיב, או קשרו מחדש את המקור אם הוא הועבר.",
5319
5320
  "syncFailed": "לא ניתן היה לסנכרן את המאגר",
5320
5321
  "changesAvailable": "יש שינויים במקור",
5321
5322
  "upToDate": "כבר מעודכן",
@@ -4346,6 +4346,7 @@
4346
4346
  "synced": "Sincronizzato: {updated} aggiornati, {removed} rimossi",
4347
4347
  "syncSkipped": "{count} file sembrava un contratto ma non è stato utilizzabile. | {count} file sembravano contratti ma non sono stati utilizzabili.",
4348
4348
  "syncTruncated": "La cartella contiene più di quanto una sincronizzazione possa prendere, quindi ne è stata letta solo una parte.",
4349
+ "syncFolderMissing": "La cartella collegata non è presente nel repository. Controlla il percorso oppure ricollega la sorgente se è stata spostata.",
4349
4350
  "syncFailed": "Impossibile sincronizzare il repository",
4350
4351
  "changesAvailable": "Sono disponibili modifiche a monte",
4351
4352
  "upToDate": "Già aggiornato",
@@ -5317,6 +5317,7 @@
5317
5317
  "synced": "同期完了: {updated} 件更新、{removed} 件削除",
5318
5318
  "syncSkipped": "コントラクトらしき {count} 件のファイルを利用できませんでした。 | コントラクトらしき {count} 件のファイルを利用できませんでした。",
5319
5319
  "syncTruncated": "フォルダの内容が 1 回の同期で扱える量を超えているため、一部のみ読み込みました。",
5320
+ "syncFolderMissing": "連携したフォルダがリポジトリに存在しません。パスを確認するか、移動した場合はソースを連携し直してください。",
5320
5321
  "syncFailed": "リポジトリを同期できませんでした",
5321
5322
  "changesAvailable": "上流に変更があります",
5322
5323
  "upToDate": "すでに最新です",
@@ -5305,6 +5305,7 @@
5305
5305
  "synced": "Zsynchronizowano: {updated} zaktualizowanych, {removed} usuniętych",
5306
5306
  "syncSkipped": "{count} plik wyglądał jak kontrakt, ale nie dało się go użyć. | {count} pliki wyglądały jak kontrakty, ale nie dało się ich użyć. | {count} plików wyglądało jak kontrakty, ale nie dało się ich użyć.",
5307
5307
  "syncTruncated": "Folder zawiera więcej, niż mieści jedna synchronizacja, więc odczytano tylko jego część.",
5308
+ "syncFolderMissing": "Połączony folder nie istnieje w repozytorium. Sprawdź ścieżkę lub połącz źródło ponownie, jeśli zostało przeniesione.",
5308
5309
  "syncFailed": "Nie udało się zsynchronizować repozytorium",
5309
5310
  "changesAvailable": "W źródle są zmiany",
5310
5311
  "upToDate": "Już aktualne",
@@ -5317,6 +5317,7 @@
5317
5317
  "synced": "Eşitlendi: {updated} güncellendi, {removed} kaldırıldı",
5318
5318
  "syncSkipped": "{count} dosya sözleşmeye benziyordu ama kullanılamadı. | {count} dosya sözleşmeye benziyordu ama kullanılamadı.",
5319
5319
  "syncTruncated": "Klasör tek bir eşitlemenin alabileceğinden fazlasını içeriyor, bu yüzden yalnızca bir kısmı okundu.",
5320
+ "syncFolderMissing": "Bağlanan klasör depoda yok. Yolu kontrol edin veya taşındıysa kaynağı yeniden bağlayın.",
5320
5321
  "syncFailed": "Depo eşitlenemedi",
5321
5322
  "changesAvailable": "Kaynakta değişiklikler var",
5322
5323
  "upToDate": "Zaten güncel",
@@ -5305,6 +5305,7 @@
5305
5305
  "synced": "Синхронізовано: {updated} оновлено, {removed} вилучено",
5306
5306
  "syncSkipped": "{count} файл був схожий на контракт, але його не вдалося використати. | {count} файли були схожі на контракти, але їх не вдалося використати. | {count} файлів були схожі на контракти, але їх не вдалося використати.",
5307
5307
  "syncTruncated": "Тека містить більше, ніж вміщає одна синхронізація, тому прочитано лише її частину.",
5308
+ "syncFolderMissing": "Приєднаної теки немає в репозиторії. Перевірте шлях або приєднайте джерело заново, якщо його перенесено.",
5308
5309
  "syncFailed": "Не вдалося синхронізувати репозиторій",
5309
5310
  "changesAvailable": "У джерелі є зміни",
5310
5311
  "upToDate": "Уже актуально",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/app",
3
- "version": "0.200.3",
3
+ "version": "0.200.4",
4
4
  "description": "Reusable Nuxt layer for the Agent Architecture Board SPA (components, stores, composables, pages). Consume it from a thin deployment app via `extends: ['@cat-factory/app']` and point it at your backend with NUXT_PUBLIC_API_BASE. See deploy/frontend for an example.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,7 +40,7 @@
40
40
  "valibot": "^1.4.2",
41
41
  "vue": "3.5.40",
42
42
  "wretch": "^3.0.9",
43
- "@cat-factory/contracts": "0.208.0"
43
+ "@cat-factory/contracts": "0.209.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@toad-contracts/testing": "0.3.2",