@eventcatalog/cli 0.3.1 → 0.3.3

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
@@ -1591,7 +1591,12 @@ var cliFunctions = [
1591
1591
  description: "Include referenced resources (messages, channels, owners)"
1592
1592
  },
1593
1593
  { name: "stdout", type: "boolean", required: false, description: "Print to stdout instead of writing a file" },
1594
- { name: "playground", type: "boolean", required: false, description: "Open the exported DSL in the playground" },
1594
+ {
1595
+ name: "playground",
1596
+ type: "boolean",
1597
+ required: false,
1598
+ description: "Open the exported DSL in EventCatalog Modelling"
1599
+ },
1595
1600
  { name: "output", type: "string", required: false, description: "Output file path (defaults to <id>.ec or catalog.ec)" }
1596
1601
  ],
1597
1602
  examples: [
@@ -1620,10 +1625,56 @@ var cliFunctions = [
1620
1625
  command: "npx @eventcatalog/cli export --all --hydrate -o my-catalog.ec"
1621
1626
  },
1622
1627
  {
1623
- description: "Export and open in playground",
1628
+ description: "Export and open in EventCatalog Modelling",
1624
1629
  command: "npx @eventcatalog/cli export --resource services --hydrate --playground"
1625
1630
  }
1626
1631
  ]
1632
+ },
1633
+ // ================================
1634
+ // Import
1635
+ // ================================
1636
+ {
1637
+ name: "import",
1638
+ description: "Import EventCatalog DSL (.ec) files into catalog markdown files. Existing resources with the same version are overridden. Importing a newer version automatically moves the old version into the versioned/ folder.",
1639
+ category: "Import",
1640
+ args: [
1641
+ { name: "files", type: "string", required: false, description: "One or more .ec file paths to import" },
1642
+ { name: "stdin", type: "boolean", required: false, description: "Read DSL from stdin" },
1643
+ { name: "dry-run", type: "boolean", required: false, description: "Preview resources without writing" },
1644
+ {
1645
+ name: "flat",
1646
+ type: "boolean",
1647
+ required: false,
1648
+ description: "Write resources in a flat structure (no nesting under domains/services)"
1649
+ },
1650
+ { name: "no-init", type: "boolean", required: false, description: "Skip catalog initialization prompt" }
1651
+ ],
1652
+ examples: [
1653
+ {
1654
+ description: "Import a single .ec file",
1655
+ command: "npx @eventcatalog/cli import catalog.ec"
1656
+ },
1657
+ {
1658
+ description: "Import multiple .ec files",
1659
+ command: "npx @eventcatalog/cli import services.ec events.ec"
1660
+ },
1661
+ {
1662
+ description: "Import from stdin (pipe from export)",
1663
+ command: "npx @eventcatalog/cli export --all --stdout | npx @eventcatalog/cli import --stdin -d ./new-catalog"
1664
+ },
1665
+ {
1666
+ description: "Preview what would be written or merged",
1667
+ command: "npx @eventcatalog/cli import catalog.ec --dry-run"
1668
+ },
1669
+ {
1670
+ description: "Import without nested folders",
1671
+ command: "npx @eventcatalog/cli import catalog.ec --flat"
1672
+ },
1673
+ {
1674
+ description: "Import into an existing catalog directory without init prompts",
1675
+ command: "npx @eventcatalog/cli import catalog.ec --no-init -d ./existing-catalog"
1676
+ }
1677
+ ]
1627
1678
  }
1628
1679
  ];
1629
1680
  function getCategories() {