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