@eventcatalog/cli 0.4.10 → 0.5.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/dist/cli-docs.mjs CHANGED
@@ -1675,6 +1675,115 @@ var cliFunctions = [
1675
1675
  command: "npx @eventcatalog/cli import catalog.ec --no-init -d ./existing-catalog"
1676
1676
  }
1677
1677
  ]
1678
+ },
1679
+ // Snapshots
1680
+ {
1681
+ name: "createSnapshot",
1682
+ description: "Take a point-in-time snapshot of the entire catalog, capturing all resources and their metadata as a JSON file",
1683
+ category: "Snapshots",
1684
+ args: [
1685
+ {
1686
+ name: "label",
1687
+ type: "string",
1688
+ required: false,
1689
+ description: "Human-readable label for the snapshot (defaults to ISO timestamp)"
1690
+ },
1691
+ {
1692
+ name: "outputDir",
1693
+ type: "string",
1694
+ required: false,
1695
+ description: "Output directory for the snapshot file (defaults to .snapshots/)"
1696
+ }
1697
+ ],
1698
+ examples: [
1699
+ {
1700
+ description: "Create a snapshot with default settings",
1701
+ command: "npx @eventcatalog/cli snapshot create"
1702
+ },
1703
+ {
1704
+ description: "Create a snapshot with a custom label",
1705
+ command: "npx @eventcatalog/cli snapshot create --label pre-release-v2"
1706
+ },
1707
+ {
1708
+ description: "Create a snapshot and print JSON to stdout",
1709
+ command: "npx @eventcatalog/cli snapshot create --stdout"
1710
+ }
1711
+ ]
1712
+ },
1713
+ {
1714
+ name: "diffSnapshots",
1715
+ description: "Compare two snapshot files and output a structured diff showing added, removed, modified, and versioned resources plus relationship changes",
1716
+ category: "Snapshots",
1717
+ args: [
1718
+ { name: "fileA", type: "string", required: true, description: "Path to the first (older) snapshot file" },
1719
+ { name: "fileB", type: "string", required: true, description: "Path to the second (newer) snapshot file" }
1720
+ ],
1721
+ examples: [
1722
+ {
1723
+ description: "Diff two snapshot files as text",
1724
+ command: "npx @eventcatalog/cli snapshot diff .snapshots/before.snapshot.json .snapshots/after.snapshot.json"
1725
+ },
1726
+ {
1727
+ description: "Diff two snapshot files as JSON",
1728
+ command: "npx @eventcatalog/cli snapshot diff .snapshots/before.snapshot.json .snapshots/after.snapshot.json --format json"
1729
+ }
1730
+ ]
1731
+ },
1732
+ {
1733
+ name: "listSnapshots",
1734
+ description: "List all snapshots in the catalog .snapshots directory with their labels, timestamps, and git info",
1735
+ category: "Snapshots",
1736
+ args: [],
1737
+ examples: [
1738
+ {
1739
+ description: "List all snapshots",
1740
+ command: "npx @eventcatalog/cli snapshot list"
1741
+ },
1742
+ {
1743
+ description: "List all snapshots as JSON",
1744
+ command: "npx @eventcatalog/cli snapshot list --format json"
1745
+ }
1746
+ ]
1747
+ },
1748
+ // Governance
1749
+ {
1750
+ name: "governanceCheck",
1751
+ description: "Compare the current catalog (or a target branch) against a base branch and evaluate governance rules defined in governance.yaml",
1752
+ category: "Governance",
1753
+ args: [
1754
+ { name: "--base", type: "string", required: false, description: "Base branch to compare against (default: main)" },
1755
+ {
1756
+ name: "--target",
1757
+ type: "string",
1758
+ required: false,
1759
+ description: "Target branch to compare (default: current working directory)"
1760
+ },
1761
+ { name: "--format", type: "string", required: false, description: "Output format: text or json (default: text)" },
1762
+ {
1763
+ name: "--status",
1764
+ type: "string",
1765
+ required: false,
1766
+ description: "Status label to include in webhook payloads (e.g. proposed, approved)"
1767
+ }
1768
+ ],
1769
+ examples: [
1770
+ {
1771
+ description: "Check governance rules against main branch",
1772
+ command: "npx @eventcatalog/cli governance check"
1773
+ },
1774
+ {
1775
+ description: "Check against a specific base branch",
1776
+ command: "npx @eventcatalog/cli governance check --base develop"
1777
+ },
1778
+ {
1779
+ description: "Compare two branches directly",
1780
+ command: "npx @eventcatalog/cli governance check --base main --target feat/new-service"
1781
+ },
1782
+ {
1783
+ description: "Output results as JSON",
1784
+ command: "npx @eventcatalog/cli governance check --format json"
1785
+ }
1786
+ ]
1678
1787
  }
1679
1788
  ];
1680
1789
  function getCategories() {