cronus-ui 0.6.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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/dist/commands/add-page.d.ts +108 -0
  4. package/dist/commands/add-page.js +642 -0
  5. package/dist/commands/add.d.ts +9 -0
  6. package/dist/commands/add.js +114 -0
  7. package/dist/commands/ai.d.ts +14 -0
  8. package/dist/commands/ai.js +69 -0
  9. package/dist/commands/compose.d.ts +82 -0
  10. package/dist/commands/compose.js +403 -0
  11. package/dist/commands/diff.d.ts +8 -0
  12. package/dist/commands/diff.js +55 -0
  13. package/dist/commands/init.d.ts +9 -0
  14. package/dist/commands/init.js +53 -0
  15. package/dist/commands/list.d.ts +7 -0
  16. package/dist/commands/list.js +28 -0
  17. package/dist/commands/theme.d.ts +23 -0
  18. package/dist/commands/theme.js +735 -0
  19. package/dist/commands/upgrade.d.ts +51 -0
  20. package/dist/commands/upgrade.js +840 -0
  21. package/dist/compose/data-slots.d.ts +71 -0
  22. package/dist/compose/data-slots.js +104 -0
  23. package/dist/compose/manifest.d.ts +90 -0
  24. package/dist/compose/manifest.js +224 -0
  25. package/dist/compose/plan.d.ts +164 -0
  26. package/dist/compose/plan.js +506 -0
  27. package/dist/compose/preview.d.ts +10 -0
  28. package/dist/compose/preview.js +48 -0
  29. package/dist/compose/reload.d.ts +56 -0
  30. package/dist/compose/reload.js +138 -0
  31. package/dist/compose/render.d.ts +123 -0
  32. package/dist/compose/render.js +404 -0
  33. package/dist/compose/templates.d.ts +22 -0
  34. package/dist/compose/templates.js +76 -0
  35. package/dist/compose.d.ts +10 -0
  36. package/dist/compose.js +8 -0
  37. package/dist/config.d.ts +94 -0
  38. package/dist/config.js +38 -0
  39. package/dist/index.d.ts +3 -0
  40. package/dist/index.js +184 -0
  41. package/dist/registry.d.ts +59 -0
  42. package/dist/registry.js +96 -0
  43. package/dist/utils.d.ts +72 -0
  44. package/dist/utils.js +186 -0
  45. package/package.json +68 -0
  46. package/templates/apps/chat.json +44 -0
  47. package/templates/apps/finance.json +44 -0
  48. package/templates/apps/landing-agency.json +31 -0
  49. package/templates/apps/landing-agents.json +32 -0
  50. package/templates/apps/landing-broadcast.json +29 -0
  51. package/templates/apps/landing-care.json +28 -0
  52. package/templates/apps/landing-coverage.json +23 -0
  53. package/templates/apps/landing-docs.json +29 -0
  54. package/templates/apps/landing-glass.json +28 -0
  55. package/templates/apps/landing-ops.json +29 -0
  56. package/templates/apps/landing-premium.json +31 -0
  57. package/templates/apps/landing-secure.json +31 -0
  58. package/templates/apps/landing-shop.json +27 -0
  59. package/templates/apps/landing-studio.json +30 -0
  60. package/templates/apps/landing.json +23 -0
  61. package/templates/apps/mail.json +44 -0
  62. package/templates/apps/saas.json +64 -0
  63. package/templates/apps/store.json +75 -0
@@ -0,0 +1,51 @@
1
+ /** Where the human/agent-readable conflict report is written (project root). */
2
+ export declare const REPORT_FILE = "CRONUS-UPGRADE.md";
3
+ export interface UpgradeOptions {
4
+ cwd: string;
5
+ registry?: string;
6
+ /** Upgrade every item recorded in the install manifest. */
7
+ all?: boolean;
8
+ /** Print the per-file plan without writing anything (not even the report). */
9
+ dryRun?: boolean;
10
+ /** Assume "yes" for every confirmation (conflict markers, overwrites). */
11
+ yes?: boolean;
12
+ /** Legacy items (no manifest entry): allow replacing local files with upstream. */
13
+ overwrite?: boolean;
14
+ /** Reload composed apps from this manifest file (same flag as add-page/compose). */
15
+ manifestPath?: string;
16
+ /** Test seam — replaces the interactive stdin confirmation when provided. */
17
+ confirm?: (question: string) => Promise<boolean>;
18
+ }
19
+ /** Outcome of planning one file of one item. */
20
+ export type FileStatus = "up-to-date" | "fast-forward" | "new-file" | "local-edits" | "merged" | "conflict" | "manual" | "removed-upstream" | "locally-deleted" | "legacy-match" | "legacy-differs";
21
+ export type MergeResult = {
22
+ status: "clean" | "conflict";
23
+ content: string;
24
+ } | {
25
+ status: "unavailable";
26
+ };
27
+ /**
28
+ * 3-way merge via `git merge-file -p --diff3`. Exit code 0 = clean merge,
29
+ * 1..127 = that many conflicts (stdout still holds the marked-up result),
30
+ * anything else (or no git at all) = unavailable → caller falls back to a
31
+ * whole-file "manual merge needed" report.
32
+ */
33
+ export declare function mergeThreeWay(base: string, local: string, target: string, labels: {
34
+ base: string;
35
+ target: string;
36
+ }): Promise<MergeResult>;
37
+ /**
38
+ * Unified diff (a→b) via `git diff --no-index`, with the temp-file headers
39
+ * replaced by the given labels. Returns undefined when git is unavailable or
40
+ * errors (exit 1 just means "files differ" and is expected).
41
+ */
42
+ export declare function unifiedDiff(a: string, b: string, labelA: string, labelB: string): Promise<string | undefined>;
43
+ /**
44
+ * `cronus-ui upgrade` — pull upstream component (and, with `--all`, composed
45
+ * page) updates WITHOUT losing local edits. For every target it 3-way merges
46
+ * base, local, and upstream via `git merge-file --diff3`. Conflicts are never
47
+ * silently clobbered: markers are only written with consent, and
48
+ * CRONUS-UPGRADE.md gets a ready-to-paste agent prompt per unresolved file.
49
+ */
50
+ export declare function upgrade(names: string[], options: UpgradeOptions): Promise<void>;
51
+ //# sourceMappingURL=upgrade.d.ts.map