@loopress/cli 0.26.0 → 0.28.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 (87) hide show
  1. package/README.md +275 -177
  2. package/dist/commands/app/pull.js +17 -4
  3. package/dist/commands/app/push.d.ts +3 -0
  4. package/dist/commands/app/push.js +29 -5
  5. package/dist/commands/composer/push.js +1 -19
  6. package/dist/commands/diff.js +1 -1
  7. package/dist/commands/init.js +7 -1
  8. package/dist/commands/page/push.js +2 -2
  9. package/dist/commands/plugin/add.d.ts +8 -1
  10. package/dist/commands/plugin/add.js +10 -5
  11. package/dist/commands/plugin/audit.js +4 -5
  12. package/dist/commands/plugin/pull.d.ts +3 -1
  13. package/dist/commands/plugin/pull.js +17 -9
  14. package/dist/commands/plugin/push.d.ts +5 -1
  15. package/dist/commands/plugin/push.js +90 -37
  16. package/dist/commands/plugin/status.d.ts +1 -0
  17. package/dist/commands/plugin/status.js +21 -2
  18. package/dist/commands/project/config.js +12 -8
  19. package/dist/commands/promote.d.ts +2 -0
  20. package/dist/commands/promote.js +70 -8
  21. package/dist/commands/pull.js +8 -4
  22. package/dist/commands/push.d.ts +1 -0
  23. package/dist/commands/push.js +42 -4
  24. package/dist/commands/template/diff.d.ts +10 -0
  25. package/dist/commands/template/diff.js +13 -0
  26. package/dist/commands/template/list.d.ts +13 -0
  27. package/dist/commands/template/list.js +23 -0
  28. package/dist/commands/template/push.d.ts +20 -0
  29. package/dist/commands/template/push.js +42 -0
  30. package/dist/commands/theme/add.d.ts +8 -1
  31. package/dist/commands/theme/add.js +4 -2
  32. package/dist/commands/theme/pull.d.ts +3 -1
  33. package/dist/commands/theme/pull.js +10 -4
  34. package/dist/commands/theme/style/diff.d.ts +2 -0
  35. package/dist/commands/{theme-styles → theme/style}/diff.js +2 -1
  36. package/dist/commands/{theme-styles → theme/style}/pull.d.ts +1 -1
  37. package/dist/commands/{theme-styles → theme/style}/pull.js +3 -3
  38. package/dist/commands/{theme-styles → theme/style}/push.d.ts +1 -1
  39. package/dist/commands/{theme-styles → theme/style}/push.js +5 -5
  40. package/dist/commands/theme/style/rollback.d.ts +2 -0
  41. package/dist/commands/theme/style/rollback.js +6 -0
  42. package/dist/lib/api-client.js +26 -1
  43. package/dist/lib/app-build.d.ts +5 -0
  44. package/dist/lib/app-build.js +69 -0
  45. package/dist/lib/app-manifest.d.ts +4 -0
  46. package/dist/lib/app-manifest.js +8 -0
  47. package/dist/lib/base.js +11 -2
  48. package/dist/lib/bootstrap-full-install.js +45 -14
  49. package/dist/lib/dev-watch.d.ts +1 -1
  50. package/dist/lib/dev-watch.js +4 -1
  51. package/dist/lib/diff-command.d.ts +1 -0
  52. package/dist/lib/diff-command.js +6 -4
  53. package/dist/lib/json-delegation.d.ts +1 -0
  54. package/dist/lib/json-delegation.js +18 -0
  55. package/dist/lib/load-snippets.js +1 -1
  56. package/dist/lib/php-files-command.js +4 -3
  57. package/dist/lib/readdir-tolerant.js +15 -5
  58. package/dist/lib/resource-state.js +43 -1
  59. package/dist/lib/rollback-command.d.ts +1 -0
  60. package/dist/lib/rollback-command.js +8 -6
  61. package/dist/lib/rotate-app-password.js +2 -2
  62. package/dist/lib/snapshot-store.js +14 -0
  63. package/dist/lib/validate-local.js +34 -7
  64. package/dist/lib/wp-client.d.ts +4 -1
  65. package/dist/lib/wp-client.js +56 -3
  66. package/dist/types/plugin.d.ts +8 -1
  67. package/dist/types/plugin.js +4 -1
  68. package/dist/types/project-config.generated.d.ts +19 -2
  69. package/dist/utils/composer.d.ts +14 -0
  70. package/dist/utils/composer.js +136 -0
  71. package/dist/utils/loopress-config.d.ts +1 -0
  72. package/dist/utils/loopress-config.js +14 -0
  73. package/dist/utils/page-format.d.ts +12 -0
  74. package/dist/utils/page-format.js +41 -26
  75. package/dist/utils/plugins.d.ts +9 -4
  76. package/dist/utils/plugins.js +16 -7
  77. package/dist/utils/resource-dirs.d.ts +2 -0
  78. package/dist/utils/resource-dirs.js +4 -0
  79. package/dist/utils/seo-format.d.ts +2 -2
  80. package/dist/utils/template-format.d.ts +30 -0
  81. package/dist/utils/template-format.js +36 -0
  82. package/oclif.manifest.json +536 -320
  83. package/package.json +7 -4
  84. package/schemas/project-config.schema.json +25 -4
  85. package/dist/commands/theme-styles/diff.d.ts +0 -2
  86. package/dist/commands/theme-styles/rollback.d.ts +0 -2
  87. package/dist/commands/theme-styles/rollback.js +0 -5
@@ -11,14 +11,14 @@
11
11
  ],
12
12
  "flags": {
13
13
  "only": {
14
- "description": "Only watch these resource types (comma-separated): snippets, pages, api, plugins",
14
+ "description": "Only watch these resource types (comma-separated): snippets, templates, parts, pages, api, hooks, plugins",
15
15
  "name": "only",
16
16
  "hasDynamicHelp": false,
17
17
  "multiple": false,
18
18
  "type": "option"
19
19
  },
20
20
  "skip": {
21
- "description": "Skip these resource types (comma-separated): snippets, pages, api, plugins",
21
+ "description": "Skip these resource types (comma-separated): snippets, templates, parts, pages, api, hooks, plugins",
22
22
  "name": "skip",
23
23
  "hasDynamicHelp": false,
24
24
  "multiple": false,
@@ -43,7 +43,7 @@
43
43
  "diff": {
44
44
  "aliases": [],
45
45
  "args": {},
46
- "description": "Show what differs between your local tracked files and a WordPress environment, or between two environments. Covers snippets, forms, ACF, API routes, Hooks, pages, SEO, Options, Menus, Theme styles, and Composer. Plugins and themes have their own `lps plugin status` / `lps theme status`. Exit code: 0 in sync, 1 on drift, 2 when a resource could not be compared, so it doubles as a CI drift gate.",
46
+ "description": "Show what differs between your local tracked files and a WordPress environment, or between two environments. Covers snippets, forms, ACF, API routes, Hooks, templates, template parts, pages, SEO, Options, Menus, Theme styles, and Composer. Plugins and themes have their own `lps plugin status` / `lps theme status`. Exit code: 0 in sync, 1 on drift, 2 when a resource could not be compared, so it doubles as a CI drift gate.",
47
47
  "examples": [
48
48
  "$ lps diff",
49
49
  "$ lps diff --env staging",
@@ -84,6 +84,8 @@
84
84
  "acf",
85
85
  "api",
86
86
  "hook",
87
+ "template",
88
+ "part",
87
89
  "page",
88
90
  "seo",
89
91
  "menu",
@@ -104,6 +106,8 @@
104
106
  "acf",
105
107
  "api",
106
108
  "hook",
109
+ "template",
110
+ "part",
107
111
  "page",
108
112
  "seo",
109
113
  "menu",
@@ -291,7 +295,7 @@
291
295
  "required": true
292
296
  }
293
297
  },
294
- "description": "Copy every tracked resource from one environment to another by pulling from <from> then pushing to <to>. Local tracked files are overwritten with <from> in the process.",
298
+ "description": "Copy every tracked resource from one environment to another by pulling from <from> then pushing to <to>. Local tracked files are overwritten with <from> in the process. With --dry-run, <from> is pulled into a throwaway copy of the project instead, and the push is only previewed.",
295
299
  "examples": [
296
300
  "$ lps promote staging production",
297
301
  "$ lps promote production staging --dry-run"
@@ -407,7 +411,7 @@
407
411
  "push": {
408
412
  "aliases": [],
409
413
  "args": {},
410
- "description": "Push all local content, plugins, composer dependencies, ACF, API routes, hooks, forms, pages, SEO, menus, options, and snippets, to WordPress",
414
+ "description": "Push all local content, plugins, composer dependencies, ACF, API routes, hooks, forms, templates, pages, SEO, menus, options, and snippets, to WordPress",
411
415
  "examples": [
412
416
  "$ lps push",
413
417
  "$ lps push --env staging",
@@ -1415,38 +1419,37 @@
1415
1419
  "rollback.js"
1416
1420
  ]
1417
1421
  },
1418
- "composer:init": {
1422
+ "app:list": {
1419
1423
  "aliases": [],
1420
1424
  "args": {},
1421
- "description": "Create a composer.json wired to WPackagist for installing WordPress.org plugins and themes",
1425
+ "description": "List single-page apps deployed to WordPress",
1422
1426
  "examples": [
1423
- "$ lps composer init",
1424
- "$ lps composer init --dry-run"
1427
+ "$ lps app list"
1425
1428
  ],
1426
1429
  "flags": {
1430
+ "json": {
1431
+ "description": "Format output as json.",
1432
+ "helpGroup": "GLOBAL",
1433
+ "name": "json",
1434
+ "allowNo": false,
1435
+ "type": "boolean"
1436
+ },
1427
1437
  "env": {
1428
1438
  "description": "Target environment by name, overriding the globally active one (lps project switch)",
1429
1439
  "name": "env",
1430
1440
  "hasDynamicHelp": false,
1431
1441
  "multiple": false,
1432
1442
  "type": "option"
1433
- },
1434
- "dry-run": {
1435
- "char": "d",
1436
- "description": "Show what would change without making changes",
1437
- "name": "dry-run",
1438
- "allowNo": false,
1439
- "type": "boolean"
1440
1443
  }
1441
1444
  },
1442
1445
  "hasDynamicHelp": false,
1443
1446
  "hiddenAliases": [],
1444
- "id": "composer:init",
1447
+ "id": "app:list",
1445
1448
  "pluginAlias": "@loopress/cli",
1446
1449
  "pluginName": "@loopress/cli",
1447
1450
  "pluginType": "core",
1448
1451
  "strict": true,
1449
- "enableJsonFlag": false,
1452
+ "enableJsonFlag": true,
1450
1453
  "dryRunFlag": {
1451
1454
  "dry-run": {
1452
1455
  "char": "d",
@@ -1467,17 +1470,21 @@
1467
1470
  "relativePath": [
1468
1471
  "dist",
1469
1472
  "commands",
1470
- "composer",
1471
- "init.js"
1473
+ "app",
1474
+ "list.js"
1472
1475
  ]
1473
1476
  },
1474
- "composer:pull": {
1477
+ "app:pull": {
1475
1478
  "aliases": [],
1476
- "args": {},
1477
- "description": "Pull composer.json and composer.lock from WordPress",
1479
+ "args": {
1480
+ "path": {
1481
+ "description": "Path to apps directory (overrides project config)",
1482
+ "name": "path"
1483
+ }
1484
+ },
1485
+ "description": "Pull single-page app bundles from WordPress into local files",
1478
1486
  "examples": [
1479
- "$ lps composer pull",
1480
- "$ lps composer pull --dry-run"
1487
+ "$ lps app pull"
1481
1488
  ],
1482
1489
  "flags": {
1483
1490
  "json": {
@@ -1500,11 +1507,18 @@
1500
1507
  "name": "dry-run",
1501
1508
  "allowNo": false,
1502
1509
  "type": "boolean"
1510
+ },
1511
+ "yes": {
1512
+ "char": "y",
1513
+ "description": "Answer yes to confirmation prompts",
1514
+ "name": "yes",
1515
+ "allowNo": false,
1516
+ "type": "boolean"
1503
1517
  }
1504
1518
  },
1505
1519
  "hasDynamicHelp": false,
1506
1520
  "hiddenAliases": [],
1507
- "id": "composer:pull",
1521
+ "id": "app:pull",
1508
1522
  "pluginAlias": "@loopress/cli",
1509
1523
  "pluginName": "@loopress/cli",
1510
1524
  "pluginType": "core",
@@ -1530,17 +1544,23 @@
1530
1544
  "relativePath": [
1531
1545
  "dist",
1532
1546
  "commands",
1533
- "composer",
1547
+ "app",
1534
1548
  "pull.js"
1535
1549
  ]
1536
1550
  },
1537
- "composer:push": {
1551
+ "app:push": {
1538
1552
  "aliases": [],
1539
- "args": {},
1540
- "description": "Push composer.json to WordPress and run Composer to resolve and install dependencies",
1553
+ "args": {
1554
+ "name": {
1555
+ "description": "Push only this app (defaults to every app in the directory)",
1556
+ "name": "name"
1557
+ }
1558
+ },
1559
+ "description": "Build and push single-page app bundles to WordPress. Each app is an `apps/<name>/` directory holding a loopress.app.json and a dist/ folder. When the app has a package.json with a `build` script, it runs first (use --no-build to skip it). Only files whose content changed are uploaded.",
1541
1560
  "examples": [
1542
- "$ lps composer push",
1543
- "$ lps composer push --dry-run"
1561
+ "$ lps app push",
1562
+ "$ lps app push search",
1563
+ "$ lps app push --no-build"
1544
1564
  ],
1545
1565
  "flags": {
1546
1566
  "json": {
@@ -1557,6 +1577,12 @@
1557
1577
  "multiple": false,
1558
1578
  "type": "option"
1559
1579
  },
1580
+ "build": {
1581
+ "description": "Run the app's package.json build script before pushing",
1582
+ "name": "build",
1583
+ "allowNo": true,
1584
+ "type": "boolean"
1585
+ },
1560
1586
  "dry-run": {
1561
1587
  "char": "d",
1562
1588
  "description": "Show what would change without making changes",
@@ -1570,17 +1596,11 @@
1570
1596
  "name": "yes",
1571
1597
  "allowNo": false,
1572
1598
  "type": "boolean"
1573
- },
1574
- "force": {
1575
- "description": "Allow downgrades and take over plugins/themes installed outside Loopress",
1576
- "name": "force",
1577
- "allowNo": false,
1578
- "type": "boolean"
1579
1599
  }
1580
1600
  },
1581
1601
  "hasDynamicHelp": false,
1582
1602
  "hiddenAliases": [],
1583
- "id": "composer:push",
1603
+ "id": "app:push",
1584
1604
  "pluginAlias": "@loopress/cli",
1585
1605
  "pluginName": "@loopress/cli",
1586
1606
  "pluginType": "core",
@@ -1590,16 +1610,22 @@
1590
1610
  "relativePath": [
1591
1611
  "dist",
1592
1612
  "commands",
1593
- "composer",
1613
+ "app",
1594
1614
  "push.js"
1595
1615
  ]
1596
1616
  },
1597
- "app:list": {
1617
+ "app:remove": {
1598
1618
  "aliases": [],
1599
- "args": {},
1600
- "description": "List single-page apps deployed to WordPress",
1619
+ "args": {
1620
+ "name": {
1621
+ "description": "App to remove from WordPress",
1622
+ "name": "name",
1623
+ "required": true
1624
+ }
1625
+ },
1626
+ "description": "Remove a single-page app from WordPress: deletes its bundle from wp-content/loopress/apps/ and unregisters the shortcode. Local files are left untouched.",
1601
1627
  "examples": [
1602
- "$ lps app list"
1628
+ "$ lps app remove search"
1603
1629
  ],
1604
1630
  "flags": {
1605
1631
  "json": {
@@ -1615,11 +1641,25 @@
1615
1641
  "hasDynamicHelp": false,
1616
1642
  "multiple": false,
1617
1643
  "type": "option"
1644
+ },
1645
+ "dry-run": {
1646
+ "char": "d",
1647
+ "description": "Show what would change without making changes",
1648
+ "name": "dry-run",
1649
+ "allowNo": false,
1650
+ "type": "boolean"
1651
+ },
1652
+ "yes": {
1653
+ "char": "y",
1654
+ "description": "Answer yes to confirmation prompts",
1655
+ "name": "yes",
1656
+ "allowNo": false,
1657
+ "type": "boolean"
1618
1658
  }
1619
1659
  },
1620
1660
  "hasDynamicHelp": false,
1621
1661
  "hiddenAliases": [],
1622
- "id": "app:list",
1662
+ "id": "app:remove",
1623
1663
  "pluginAlias": "@loopress/cli",
1624
1664
  "pluginName": "@loopress/cli",
1625
1665
  "pluginType": "core",
@@ -1646,29 +1686,18 @@
1646
1686
  "dist",
1647
1687
  "commands",
1648
1688
  "app",
1649
- "list.js"
1689
+ "remove.js"
1650
1690
  ]
1651
1691
  },
1652
- "app:pull": {
1692
+ "composer:init": {
1653
1693
  "aliases": [],
1654
- "args": {
1655
- "path": {
1656
- "description": "Path to apps directory (overrides project config)",
1657
- "name": "path"
1658
- }
1659
- },
1660
- "description": "Pull single-page app bundles from WordPress into local files",
1694
+ "args": {},
1695
+ "description": "Create a composer.json wired to WPackagist for installing WordPress.org plugins and themes",
1661
1696
  "examples": [
1662
- "$ lps app pull"
1697
+ "$ lps composer init",
1698
+ "$ lps composer init --dry-run"
1663
1699
  ],
1664
1700
  "flags": {
1665
- "json": {
1666
- "description": "Format output as json.",
1667
- "helpGroup": "GLOBAL",
1668
- "name": "json",
1669
- "allowNo": false,
1670
- "type": "boolean"
1671
- },
1672
1701
  "env": {
1673
1702
  "description": "Target environment by name, overriding the globally active one (lps project switch)",
1674
1703
  "name": "env",
@@ -1682,23 +1711,16 @@
1682
1711
  "name": "dry-run",
1683
1712
  "allowNo": false,
1684
1713
  "type": "boolean"
1685
- },
1686
- "yes": {
1687
- "char": "y",
1688
- "description": "Answer yes to confirmation prompts",
1689
- "name": "yes",
1690
- "allowNo": false,
1691
- "type": "boolean"
1692
1714
  }
1693
1715
  },
1694
1716
  "hasDynamicHelp": false,
1695
1717
  "hiddenAliases": [],
1696
- "id": "app:pull",
1718
+ "id": "composer:init",
1697
1719
  "pluginAlias": "@loopress/cli",
1698
1720
  "pluginName": "@loopress/cli",
1699
1721
  "pluginType": "core",
1700
1722
  "strict": true,
1701
- "enableJsonFlag": true,
1723
+ "enableJsonFlag": false,
1702
1724
  "dryRunFlag": {
1703
1725
  "dry-run": {
1704
1726
  "char": "d",
@@ -1719,22 +1741,17 @@
1719
1741
  "relativePath": [
1720
1742
  "dist",
1721
1743
  "commands",
1722
- "app",
1723
- "pull.js"
1744
+ "composer",
1745
+ "init.js"
1724
1746
  ]
1725
1747
  },
1726
- "app:push": {
1748
+ "composer:pull": {
1727
1749
  "aliases": [],
1728
- "args": {
1729
- "name": {
1730
- "description": "Push only this app (defaults to every app in the directory)",
1731
- "name": "name"
1732
- }
1733
- },
1734
- "description": "Push built single-page app bundles to WordPress. Each app is an `apps/<name>/` directory holding a loopress.app.json and a built dist/ folder. Only files whose content changed are uploaded.",
1750
+ "args": {},
1751
+ "description": "Pull composer.json and composer.lock from WordPress",
1735
1752
  "examples": [
1736
- "$ lps app push",
1737
- "$ lps app push search"
1753
+ "$ lps composer pull",
1754
+ "$ lps composer pull --dry-run"
1738
1755
  ],
1739
1756
  "flags": {
1740
1757
  "json": {
@@ -1757,43 +1774,47 @@
1757
1774
  "name": "dry-run",
1758
1775
  "allowNo": false,
1759
1776
  "type": "boolean"
1760
- },
1761
- "yes": {
1762
- "char": "y",
1763
- "description": "Answer yes to confirmation prompts",
1764
- "name": "yes",
1765
- "allowNo": false,
1766
- "type": "boolean"
1767
1777
  }
1768
1778
  },
1769
1779
  "hasDynamicHelp": false,
1770
1780
  "hiddenAliases": [],
1771
- "id": "app:push",
1781
+ "id": "composer:pull",
1772
1782
  "pluginAlias": "@loopress/cli",
1773
1783
  "pluginName": "@loopress/cli",
1774
1784
  "pluginType": "core",
1775
1785
  "strict": true,
1776
1786
  "enableJsonFlag": true,
1787
+ "dryRunFlag": {
1788
+ "dry-run": {
1789
+ "char": "d",
1790
+ "description": "Show what would change without making changes",
1791
+ "allowNo": false,
1792
+ "type": "boolean"
1793
+ }
1794
+ },
1795
+ "yesFlag": {
1796
+ "yes": {
1797
+ "char": "y",
1798
+ "description": "Answer yes to confirmation prompts",
1799
+ "allowNo": false,
1800
+ "type": "boolean"
1801
+ }
1802
+ },
1777
1803
  "isESM": true,
1778
1804
  "relativePath": [
1779
1805
  "dist",
1780
1806
  "commands",
1781
- "app",
1782
- "push.js"
1807
+ "composer",
1808
+ "pull.js"
1783
1809
  ]
1784
1810
  },
1785
- "app:remove": {
1811
+ "composer:push": {
1786
1812
  "aliases": [],
1787
- "args": {
1788
- "name": {
1789
- "description": "App to remove from WordPress",
1790
- "name": "name",
1791
- "required": true
1792
- }
1793
- },
1794
- "description": "Remove a single-page app from WordPress: deletes its bundle from wp-content/loopress/apps/ and unregisters the shortcode. Local files are left untouched.",
1813
+ "args": {},
1814
+ "description": "Push composer.json to WordPress and run Composer to resolve and install dependencies",
1795
1815
  "examples": [
1796
- "$ lps app remove search"
1816
+ "$ lps composer push",
1817
+ "$ lps composer push --dry-run"
1797
1818
  ],
1798
1819
  "flags": {
1799
1820
  "json": {
@@ -1823,38 +1844,28 @@
1823
1844
  "name": "yes",
1824
1845
  "allowNo": false,
1825
1846
  "type": "boolean"
1847
+ },
1848
+ "force": {
1849
+ "description": "Allow downgrades and take over plugins/themes installed outside Loopress",
1850
+ "name": "force",
1851
+ "allowNo": false,
1852
+ "type": "boolean"
1826
1853
  }
1827
1854
  },
1828
1855
  "hasDynamicHelp": false,
1829
1856
  "hiddenAliases": [],
1830
- "id": "app:remove",
1857
+ "id": "composer:push",
1831
1858
  "pluginAlias": "@loopress/cli",
1832
1859
  "pluginName": "@loopress/cli",
1833
1860
  "pluginType": "core",
1834
1861
  "strict": true,
1835
1862
  "enableJsonFlag": true,
1836
- "dryRunFlag": {
1837
- "dry-run": {
1838
- "char": "d",
1839
- "description": "Show what would change without making changes",
1840
- "allowNo": false,
1841
- "type": "boolean"
1842
- }
1843
- },
1844
- "yesFlag": {
1845
- "yes": {
1846
- "char": "y",
1847
- "description": "Answer yes to confirmation prompts",
1848
- "allowNo": false,
1849
- "type": "boolean"
1850
- }
1851
- },
1852
1863
  "isESM": true,
1853
1864
  "relativePath": [
1854
1865
  "dist",
1855
1866
  "commands",
1856
- "app",
1857
- "remove.js"
1867
+ "composer",
1868
+ "push.js"
1858
1869
  ]
1859
1870
  },
1860
1871
  "form:diff": {
@@ -2203,19 +2214,19 @@
2203
2214
  "rollback.js"
2204
2215
  ]
2205
2216
  },
2206
- "hook:diff": {
2217
+ "menu:diff": {
2207
2218
  "aliases": [],
2208
2219
  "args": {
2209
2220
  "path": {
2210
- "description": "Path to hooks directory (overrides project config)",
2221
+ "description": "Path to menus directory (overrides project config)",
2211
2222
  "name": "path"
2212
2223
  }
2213
2224
  },
2214
- "description": "Show what differs in hook files between your local files and a WordPress environment, or between two environments",
2225
+ "description": "Show what differs in nav menus and the active theme menu locations between your local files and a WordPress environment, or between two environments",
2215
2226
  "examples": [
2216
- "$ lps hook diff",
2217
- "$ lps hook diff --env staging",
2218
- "$ lps hook diff --env staging --against production"
2227
+ "$ lps menu diff",
2228
+ "$ lps menu diff --env staging",
2229
+ "$ lps menu diff --env staging --against production"
2219
2230
  ],
2220
2231
  "flags": {
2221
2232
  "json": {
@@ -2242,7 +2253,7 @@
2242
2253
  },
2243
2254
  "hasDynamicHelp": false,
2244
2255
  "hiddenAliases": [],
2245
- "id": "hook:diff",
2256
+ "id": "menu:diff",
2246
2257
  "pluginAlias": "@loopress/cli",
2247
2258
  "pluginName": "@loopress/cli",
2248
2259
  "pluginType": "core",
@@ -2276,16 +2287,16 @@
2276
2287
  "relativePath": [
2277
2288
  "dist",
2278
2289
  "commands",
2279
- "hook",
2290
+ "menu",
2280
2291
  "diff.js"
2281
2292
  ]
2282
2293
  },
2283
- "hook:list": {
2294
+ "menu:list": {
2284
2295
  "aliases": [],
2285
2296
  "args": {},
2286
- "description": "List hook files (actions, filters, cron) from WordPress",
2297
+ "description": "List nav menus and the active theme menu locations on WordPress",
2287
2298
  "examples": [
2288
- "$ lps hook list"
2299
+ "$ lps menu list"
2289
2300
  ],
2290
2301
  "flags": {
2291
2302
  "json": {
@@ -2305,7 +2316,7 @@
2305
2316
  },
2306
2317
  "hasDynamicHelp": false,
2307
2318
  "hiddenAliases": [],
2308
- "id": "hook:list",
2319
+ "id": "menu:list",
2309
2320
  "pluginAlias": "@loopress/cli",
2310
2321
  "pluginName": "@loopress/cli",
2311
2322
  "pluginType": "core",
@@ -2331,31 +2342,23 @@
2331
2342
  "relativePath": [
2332
2343
  "dist",
2333
2344
  "commands",
2334
- "hook",
2345
+ "menu",
2335
2346
  "list.js"
2336
2347
  ]
2337
2348
  },
2338
- "hook:pull": {
2349
+ "menu:pull": {
2339
2350
  "aliases": [],
2340
2351
  "args": {
2341
2352
  "path": {
2342
- "description": "Path to hooks directory (overrides project config)",
2353
+ "description": "Path to menus directory (overrides project config)",
2343
2354
  "name": "path"
2344
2355
  }
2345
2356
  },
2346
- "description": "Pull hook files (actions, filters, cron) from WordPress",
2357
+ "description": "Pull nav menus and the active theme menu locations from WordPress",
2347
2358
  "examples": [
2348
- "$ lps hook pull",
2349
- "$ lps hook pull --path ./hooks"
2359
+ "$ lps menu pull"
2350
2360
  ],
2351
2361
  "flags": {
2352
- "json": {
2353
- "description": "Format output as json.",
2354
- "helpGroup": "GLOBAL",
2355
- "name": "json",
2356
- "allowNo": false,
2357
- "type": "boolean"
2358
- },
2359
2362
  "env": {
2360
2363
  "description": "Target environment by name, overriding the globally active one (lps project switch)",
2361
2364
  "name": "env",
@@ -2380,12 +2383,12 @@
2380
2383
  },
2381
2384
  "hasDynamicHelp": false,
2382
2385
  "hiddenAliases": [],
2383
- "id": "hook:pull",
2386
+ "id": "menu:pull",
2384
2387
  "pluginAlias": "@loopress/cli",
2385
2388
  "pluginName": "@loopress/cli",
2386
2389
  "pluginType": "core",
2387
2390
  "strict": true,
2388
- "enableJsonFlag": true,
2391
+ "enableJsonFlag": false,
2389
2392
  "dryRunFlag": {
2390
2393
  "dry-run": {
2391
2394
  "char": "d",
@@ -2406,32 +2409,23 @@
2406
2409
  "relativePath": [
2407
2410
  "dist",
2408
2411
  "commands",
2409
- "hook",
2412
+ "menu",
2410
2413
  "pull.js"
2411
2414
  ]
2412
2415
  },
2413
- "hook:push": {
2416
+ "menu:push": {
2414
2417
  "aliases": [],
2415
2418
  "args": {
2416
2419
  "path": {
2417
- "description": "Path to hooks directory (overrides project config)",
2420
+ "description": "Path to menus directory (overrides project config)",
2418
2421
  "name": "path"
2419
2422
  }
2420
2423
  },
2421
- "description": "Push hook files (actions, filters, cron) to WordPress",
2424
+ "description": "Push local nav menus and the active theme menu locations to WordPress. Each menu's post_type/taxonomy items are resolved by slug on the target environment, never by a raw id; an item whose target does not exist there fails the whole menu rather than guessing.",
2422
2425
  "examples": [
2423
- "$ lps hook push",
2424
- "$ lps hook push --path ./hooks",
2425
- "$ lps hook push --prune"
2426
+ "$ lps menu push"
2426
2427
  ],
2427
2428
  "flags": {
2428
- "json": {
2429
- "description": "Format output as json.",
2430
- "helpGroup": "GLOBAL",
2431
- "name": "json",
2432
- "allowNo": false,
2433
- "type": "boolean"
2434
- },
2435
2429
  "env": {
2436
2430
  "description": "Target environment by name, overriding the globally active one (lps project switch)",
2437
2431
  "name": "env",
@@ -2452,43 +2446,37 @@
2452
2446
  "name": "yes",
2453
2447
  "allowNo": false,
2454
2448
  "type": "boolean"
2455
- },
2456
- "prune": {
2457
- "description": "Delete server-side hook files not present locally after pushing",
2458
- "name": "prune",
2459
- "allowNo": false,
2460
- "type": "boolean"
2461
2449
  }
2462
2450
  },
2463
2451
  "hasDynamicHelp": false,
2464
2452
  "hiddenAliases": [],
2465
- "id": "hook:push",
2453
+ "id": "menu:push",
2466
2454
  "pluginAlias": "@loopress/cli",
2467
2455
  "pluginName": "@loopress/cli",
2468
2456
  "pluginType": "core",
2469
2457
  "strict": true,
2470
- "enableJsonFlag": true,
2471
2458
  "isESM": true,
2472
2459
  "relativePath": [
2473
2460
  "dist",
2474
2461
  "commands",
2475
- "hook",
2462
+ "menu",
2476
2463
  "push.js"
2477
2464
  ]
2478
2465
  },
2479
- "hook:rm": {
2466
+ "menu:rollback": {
2480
2467
  "aliases": [],
2481
2468
  "args": {
2482
- "filename": {
2483
- "description": "The hook file to remove, its slug without the .php extension (e.g. \"hello\" or \"invoice-pdf/[order_id]\")",
2484
- "name": "filename",
2485
- "required": true
2469
+ "path": {
2470
+ "description": "Path to menus directory (overrides project config)",
2471
+ "name": "path"
2486
2472
  }
2487
2473
  },
2488
- "description": "Remove a hook file (action, filter, cron) from WordPress",
2474
+ "description": "Restore nav menus and menu locations to a snapshot taken automatically before an earlier `lps menu push`",
2489
2475
  "examples": [
2490
- "$ lps hook rm hello",
2491
- "$ lps hook rm hello --yes"
2476
+ "$ lps menu rollback",
2477
+ "$ lps menu rollback --list",
2478
+ "$ lps menu rollback --to 1732000000000",
2479
+ "$ lps menu rollback --dry-run"
2492
2480
  ],
2493
2481
  "flags": {
2494
2482
  "json": {
@@ -2518,11 +2506,24 @@
2518
2506
  "name": "yes",
2519
2507
  "allowNo": false,
2520
2508
  "type": "boolean"
2509
+ },
2510
+ "list": {
2511
+ "description": "List available snapshots instead of rolling back",
2512
+ "name": "list",
2513
+ "allowNo": false,
2514
+ "type": "boolean"
2515
+ },
2516
+ "to": {
2517
+ "description": "Roll back to this snapshot id instead of the most recent one",
2518
+ "name": "to",
2519
+ "hasDynamicHelp": false,
2520
+ "multiple": false,
2521
+ "type": "option"
2521
2522
  }
2522
2523
  },
2523
2524
  "hasDynamicHelp": false,
2524
2525
  "hiddenAliases": [],
2525
- "id": "hook:rm",
2526
+ "id": "menu:rollback",
2526
2527
  "pluginAlias": "@loopress/cli",
2527
2528
  "pluginName": "@loopress/cli",
2528
2529
  "pluginType": "core",
@@ -2548,11 +2549,11 @@
2548
2549
  "relativePath": [
2549
2550
  "dist",
2550
2551
  "commands",
2551
- "hook",
2552
- "rm.js"
2552
+ "menu",
2553
+ "rollback.js"
2553
2554
  ]
2554
2555
  },
2555
- "hook:rollback": {
2556
+ "hook:diff": {
2556
2557
  "aliases": [],
2557
2558
  "args": {
2558
2559
  "path": {
@@ -2560,12 +2561,11 @@
2560
2561
  "name": "path"
2561
2562
  }
2562
2563
  },
2563
- "description": "Restore hook files to a snapshot taken automatically before an earlier `lps hook push`",
2564
+ "description": "Show what differs in hook files between your local files and a WordPress environment, or between two environments",
2564
2565
  "examples": [
2565
- "$ lps hook rollback",
2566
- "$ lps hook rollback --list",
2567
- "$ lps hook rollback --to 1732000000000",
2568
- "$ lps hook rollback --dry-run"
2566
+ "$ lps hook diff",
2567
+ "$ lps hook diff --env staging",
2568
+ "$ lps hook diff --env staging --against production"
2569
2569
  ],
2570
2570
  "flags": {
2571
2571
  "json": {
@@ -2582,29 +2582,9 @@
2582
2582
  "multiple": false,
2583
2583
  "type": "option"
2584
2584
  },
2585
- "dry-run": {
2586
- "char": "d",
2587
- "description": "Show what would change without making changes",
2588
- "name": "dry-run",
2589
- "allowNo": false,
2590
- "type": "boolean"
2591
- },
2592
- "yes": {
2593
- "char": "y",
2594
- "description": "Answer yes to confirmation prompts",
2595
- "name": "yes",
2596
- "allowNo": false,
2597
- "type": "boolean"
2598
- },
2599
- "list": {
2600
- "description": "List available snapshots instead of rolling back",
2601
- "name": "list",
2602
- "allowNo": false,
2603
- "type": "boolean"
2604
- },
2605
- "to": {
2606
- "description": "Roll back to this snapshot id instead of the most recent one",
2607
- "name": "to",
2585
+ "against": {
2586
+ "description": "Compare the primary environment against this second environment instead of against local files",
2587
+ "name": "against",
2608
2588
  "hasDynamicHelp": false,
2609
2589
  "multiple": false,
2610
2590
  "type": "option"
@@ -2612,7 +2592,7 @@
2612
2592
  },
2613
2593
  "hasDynamicHelp": false,
2614
2594
  "hiddenAliases": [],
2615
- "id": "hook:rollback",
2595
+ "id": "hook:diff",
2616
2596
  "pluginAlias": "@loopress/cli",
2617
2597
  "pluginName": "@loopress/cli",
2618
2598
  "pluginType": "core",
@@ -2634,27 +2614,28 @@
2634
2614
  "type": "boolean"
2635
2615
  }
2636
2616
  },
2617
+ "againstFlag": {
2618
+ "against": {
2619
+ "description": "Compare the primary environment against this second environment instead of against local files",
2620
+ "input": [],
2621
+ "multiple": false,
2622
+ "type": "option"
2623
+ }
2624
+ },
2637
2625
  "isESM": true,
2638
2626
  "relativePath": [
2639
2627
  "dist",
2640
2628
  "commands",
2641
2629
  "hook",
2642
- "rollback.js"
2630
+ "diff.js"
2643
2631
  ]
2644
2632
  },
2645
- "menu:diff": {
2633
+ "hook:list": {
2646
2634
  "aliases": [],
2647
- "args": {
2648
- "path": {
2649
- "description": "Path to menus directory (overrides project config)",
2650
- "name": "path"
2651
- }
2652
- },
2653
- "description": "Show what differs in nav menus and the active theme menu locations between your local files and a WordPress environment, or between two environments",
2635
+ "args": {},
2636
+ "description": "List hook files (actions, filters, cron) from WordPress",
2654
2637
  "examples": [
2655
- "$ lps menu diff",
2656
- "$ lps menu diff --env staging",
2657
- "$ lps menu diff --env staging --against production"
2638
+ "$ lps hook list"
2658
2639
  ],
2659
2640
  "flags": {
2660
2641
  "json": {
@@ -2670,18 +2651,11 @@
2670
2651
  "hasDynamicHelp": false,
2671
2652
  "multiple": false,
2672
2653
  "type": "option"
2673
- },
2674
- "against": {
2675
- "description": "Compare the primary environment against this second environment instead of against local files",
2676
- "name": "against",
2677
- "hasDynamicHelp": false,
2678
- "multiple": false,
2679
- "type": "option"
2680
2654
  }
2681
2655
  },
2682
2656
  "hasDynamicHelp": false,
2683
2657
  "hiddenAliases": [],
2684
- "id": "menu:diff",
2658
+ "id": "hook:list",
2685
2659
  "pluginAlias": "@loopress/cli",
2686
2660
  "pluginName": "@loopress/cli",
2687
2661
  "pluginType": "core",
@@ -2703,28 +2677,26 @@
2703
2677
  "type": "boolean"
2704
2678
  }
2705
2679
  },
2706
- "againstFlag": {
2707
- "against": {
2708
- "description": "Compare the primary environment against this second environment instead of against local files",
2709
- "input": [],
2710
- "multiple": false,
2711
- "type": "option"
2712
- }
2713
- },
2714
2680
  "isESM": true,
2715
2681
  "relativePath": [
2716
2682
  "dist",
2717
2683
  "commands",
2718
- "menu",
2719
- "diff.js"
2684
+ "hook",
2685
+ "list.js"
2720
2686
  ]
2721
2687
  },
2722
- "menu:list": {
2688
+ "hook:pull": {
2723
2689
  "aliases": [],
2724
- "args": {},
2725
- "description": "List nav menus and the active theme menu locations on WordPress",
2690
+ "args": {
2691
+ "path": {
2692
+ "description": "Path to hooks directory (overrides project config)",
2693
+ "name": "path"
2694
+ }
2695
+ },
2696
+ "description": "Pull hook files (actions, filters, cron) from WordPress",
2726
2697
  "examples": [
2727
- "$ lps menu list"
2698
+ "$ lps hook pull",
2699
+ "$ lps hook pull --path ./hooks"
2728
2700
  ],
2729
2701
  "flags": {
2730
2702
  "json": {
@@ -2740,11 +2712,25 @@
2740
2712
  "hasDynamicHelp": false,
2741
2713
  "multiple": false,
2742
2714
  "type": "option"
2715
+ },
2716
+ "dry-run": {
2717
+ "char": "d",
2718
+ "description": "Show what would change without making changes",
2719
+ "name": "dry-run",
2720
+ "allowNo": false,
2721
+ "type": "boolean"
2722
+ },
2723
+ "yes": {
2724
+ "char": "y",
2725
+ "description": "Answer yes to confirmation prompts",
2726
+ "name": "yes",
2727
+ "allowNo": false,
2728
+ "type": "boolean"
2743
2729
  }
2744
2730
  },
2745
2731
  "hasDynamicHelp": false,
2746
2732
  "hiddenAliases": [],
2747
- "id": "menu:list",
2733
+ "id": "hook:pull",
2748
2734
  "pluginAlias": "@loopress/cli",
2749
2735
  "pluginName": "@loopress/cli",
2750
2736
  "pluginType": "core",
@@ -2770,23 +2756,32 @@
2770
2756
  "relativePath": [
2771
2757
  "dist",
2772
2758
  "commands",
2773
- "menu",
2774
- "list.js"
2759
+ "hook",
2760
+ "pull.js"
2775
2761
  ]
2776
2762
  },
2777
- "menu:pull": {
2763
+ "hook:push": {
2778
2764
  "aliases": [],
2779
2765
  "args": {
2780
2766
  "path": {
2781
- "description": "Path to menus directory (overrides project config)",
2767
+ "description": "Path to hooks directory (overrides project config)",
2782
2768
  "name": "path"
2783
2769
  }
2784
2770
  },
2785
- "description": "Pull nav menus and the active theme menu locations from WordPress",
2771
+ "description": "Push hook files (actions, filters, cron) to WordPress",
2786
2772
  "examples": [
2787
- "$ lps menu pull"
2773
+ "$ lps hook push",
2774
+ "$ lps hook push --path ./hooks",
2775
+ "$ lps hook push --prune"
2788
2776
  ],
2789
2777
  "flags": {
2778
+ "json": {
2779
+ "description": "Format output as json.",
2780
+ "helpGroup": "GLOBAL",
2781
+ "name": "json",
2782
+ "allowNo": false,
2783
+ "type": "boolean"
2784
+ },
2790
2785
  "env": {
2791
2786
  "description": "Target environment by name, overriding the globally active one (lps project switch)",
2792
2787
  "name": "env",
@@ -2807,53 +2802,52 @@
2807
2802
  "name": "yes",
2808
2803
  "allowNo": false,
2809
2804
  "type": "boolean"
2805
+ },
2806
+ "prune": {
2807
+ "description": "Delete server-side hook files not present locally after pushing",
2808
+ "name": "prune",
2809
+ "allowNo": false,
2810
+ "type": "boolean"
2810
2811
  }
2811
2812
  },
2812
2813
  "hasDynamicHelp": false,
2813
2814
  "hiddenAliases": [],
2814
- "id": "menu:pull",
2815
+ "id": "hook:push",
2815
2816
  "pluginAlias": "@loopress/cli",
2816
2817
  "pluginName": "@loopress/cli",
2817
2818
  "pluginType": "core",
2818
- "strict": true,
2819
- "enableJsonFlag": false,
2820
- "dryRunFlag": {
2821
- "dry-run": {
2822
- "char": "d",
2823
- "description": "Show what would change without making changes",
2824
- "allowNo": false,
2825
- "type": "boolean"
2826
- }
2827
- },
2828
- "yesFlag": {
2829
- "yes": {
2830
- "char": "y",
2831
- "description": "Answer yes to confirmation prompts",
2832
- "allowNo": false,
2833
- "type": "boolean"
2834
- }
2835
- },
2819
+ "strict": true,
2820
+ "enableJsonFlag": true,
2836
2821
  "isESM": true,
2837
2822
  "relativePath": [
2838
2823
  "dist",
2839
2824
  "commands",
2840
- "menu",
2841
- "pull.js"
2825
+ "hook",
2826
+ "push.js"
2842
2827
  ]
2843
2828
  },
2844
- "menu:push": {
2829
+ "hook:rm": {
2845
2830
  "aliases": [],
2846
2831
  "args": {
2847
- "path": {
2848
- "description": "Path to menus directory (overrides project config)",
2849
- "name": "path"
2832
+ "filename": {
2833
+ "description": "The hook file to remove, its slug without the .php extension (e.g. \"hello\" or \"invoice-pdf/[order_id]\")",
2834
+ "name": "filename",
2835
+ "required": true
2850
2836
  }
2851
2837
  },
2852
- "description": "Push local nav menus and the active theme menu locations to WordPress. Each menu's post_type/taxonomy items are resolved by slug on the target environment, never by a raw id; an item whose target does not exist there fails the whole menu rather than guessing.",
2838
+ "description": "Remove a hook file (action, filter, cron) from WordPress",
2853
2839
  "examples": [
2854
- "$ lps menu push"
2840
+ "$ lps hook rm hello",
2841
+ "$ lps hook rm hello --yes"
2855
2842
  ],
2856
2843
  "flags": {
2844
+ "json": {
2845
+ "description": "Format output as json.",
2846
+ "helpGroup": "GLOBAL",
2847
+ "name": "json",
2848
+ "allowNo": false,
2849
+ "type": "boolean"
2850
+ },
2857
2851
  "env": {
2858
2852
  "description": "Target environment by name, overriding the globally active one (lps project switch)",
2859
2853
  "name": "env",
@@ -2878,33 +2872,50 @@
2878
2872
  },
2879
2873
  "hasDynamicHelp": false,
2880
2874
  "hiddenAliases": [],
2881
- "id": "menu:push",
2875
+ "id": "hook:rm",
2882
2876
  "pluginAlias": "@loopress/cli",
2883
2877
  "pluginName": "@loopress/cli",
2884
2878
  "pluginType": "core",
2885
2879
  "strict": true,
2880
+ "enableJsonFlag": true,
2881
+ "dryRunFlag": {
2882
+ "dry-run": {
2883
+ "char": "d",
2884
+ "description": "Show what would change without making changes",
2885
+ "allowNo": false,
2886
+ "type": "boolean"
2887
+ }
2888
+ },
2889
+ "yesFlag": {
2890
+ "yes": {
2891
+ "char": "y",
2892
+ "description": "Answer yes to confirmation prompts",
2893
+ "allowNo": false,
2894
+ "type": "boolean"
2895
+ }
2896
+ },
2886
2897
  "isESM": true,
2887
2898
  "relativePath": [
2888
2899
  "dist",
2889
2900
  "commands",
2890
- "menu",
2891
- "push.js"
2901
+ "hook",
2902
+ "rm.js"
2892
2903
  ]
2893
2904
  },
2894
- "menu:rollback": {
2905
+ "hook:rollback": {
2895
2906
  "aliases": [],
2896
2907
  "args": {
2897
2908
  "path": {
2898
- "description": "Path to menus directory (overrides project config)",
2909
+ "description": "Path to hooks directory (overrides project config)",
2899
2910
  "name": "path"
2900
2911
  }
2901
2912
  },
2902
- "description": "Restore nav menus and menu locations to a snapshot taken automatically before an earlier `lps menu push`",
2913
+ "description": "Restore hook files to a snapshot taken automatically before an earlier `lps hook push`",
2903
2914
  "examples": [
2904
- "$ lps menu rollback",
2905
- "$ lps menu rollback --list",
2906
- "$ lps menu rollback --to 1732000000000",
2907
- "$ lps menu rollback --dry-run"
2915
+ "$ lps hook rollback",
2916
+ "$ lps hook rollback --list",
2917
+ "$ lps hook rollback --to 1732000000000",
2918
+ "$ lps hook rollback --dry-run"
2908
2919
  ],
2909
2920
  "flags": {
2910
2921
  "json": {
@@ -2951,7 +2962,7 @@
2951
2962
  },
2952
2963
  "hasDynamicHelp": false,
2953
2964
  "hiddenAliases": [],
2954
- "id": "menu:rollback",
2965
+ "id": "hook:rollback",
2955
2966
  "pluginAlias": "@loopress/cli",
2956
2967
  "pluginName": "@loopress/cli",
2957
2968
  "pluginType": "core",
@@ -2977,7 +2988,7 @@
2977
2988
  "relativePath": [
2978
2989
  "dist",
2979
2990
  "commands",
2980
- "menu",
2991
+ "hook",
2981
2992
  "rollback.js"
2982
2993
  ]
2983
2994
  },
@@ -3715,6 +3726,13 @@
3715
3726
  "$ lps plugin add contact-form-7 --dry-run"
3716
3727
  ],
3717
3728
  "flags": {
3729
+ "json": {
3730
+ "description": "Format output as json.",
3731
+ "helpGroup": "GLOBAL",
3732
+ "name": "json",
3733
+ "allowNo": false,
3734
+ "type": "boolean"
3735
+ },
3718
3736
  "env": {
3719
3737
  "description": "Target environment by name, overriding the globally active one (lps project switch)",
3720
3738
  "name": "env",
@@ -3744,7 +3762,7 @@
3744
3762
  "pluginName": "@loopress/cli",
3745
3763
  "pluginType": "core",
3746
3764
  "strict": true,
3747
- "enableJsonFlag": false,
3765
+ "enableJsonFlag": true,
3748
3766
  "dryRunFlag": {
3749
3767
  "dry-run": {
3750
3768
  "char": "d",
@@ -3890,7 +3908,7 @@
3890
3908
  "plugin:push": {
3891
3909
  "aliases": [],
3892
3910
  "args": {},
3893
- "description": "Install plugins on WordPress to match loopress.json, pinned via Composer + WPackagist",
3911
+ "description": "Install plugins on WordPress to match loopress.json (or composer.json), via Composer + WPackagist",
3894
3912
  "examples": [
3895
3913
  "$ lps plugin push",
3896
3914
  "$ lps plugin push --dry-run",
@@ -3925,6 +3943,12 @@
3925
3943
  "allowNo": false,
3926
3944
  "type": "boolean"
3927
3945
  },
3946
+ "activate": {
3947
+ "description": "composer.json projects only: activate every plugin it declares. Without it, plugins keep their current state and new ones stay inactive",
3948
+ "name": "activate",
3949
+ "allowNo": false,
3950
+ "type": "boolean"
3951
+ },
3928
3952
  "force": {
3929
3953
  "description": "Allow downgrades and let Loopress take over plugins installed outside it (replaces their files)",
3930
3954
  "name": "force",
@@ -3932,7 +3956,7 @@
3932
3956
  "type": "boolean"
3933
3957
  },
3934
3958
  "prune": {
3935
- "description": "Deactivate plugins that are active on the site but absent from loopress.json",
3959
+ "description": "Deactivate plugins that are active on the site but absent from loopress.json (or composer.json)",
3936
3960
  "name": "prune",
3937
3961
  "allowNo": false,
3938
3962
  "type": "boolean"
@@ -5014,6 +5038,187 @@
5014
5038
  "enable.js"
5015
5039
  ]
5016
5040
  },
5041
+ "template:diff": {
5042
+ "aliases": [],
5043
+ "args": {},
5044
+ "description": "Show what differs in block templates and parts between your local files and a WordPress environment, or between two environments. Templates and parts edited in the Site Editor show up too.",
5045
+ "examples": [
5046
+ "$ lps template diff",
5047
+ "$ lps template diff --env staging",
5048
+ "$ lps template diff --env staging --against production"
5049
+ ],
5050
+ "flags": {
5051
+ "json": {
5052
+ "description": "Format output as json.",
5053
+ "helpGroup": "GLOBAL",
5054
+ "name": "json",
5055
+ "allowNo": false,
5056
+ "type": "boolean"
5057
+ },
5058
+ "env": {
5059
+ "description": "Target environment by name, overriding the globally active one (lps project switch)",
5060
+ "name": "env",
5061
+ "hasDynamicHelp": false,
5062
+ "multiple": false,
5063
+ "type": "option"
5064
+ },
5065
+ "against": {
5066
+ "description": "Compare the primary environment against this second environment instead of against local files",
5067
+ "name": "against",
5068
+ "hasDynamicHelp": false,
5069
+ "multiple": false,
5070
+ "type": "option"
5071
+ }
5072
+ },
5073
+ "hasDynamicHelp": false,
5074
+ "hiddenAliases": [],
5075
+ "id": "template:diff",
5076
+ "pluginAlias": "@loopress/cli",
5077
+ "pluginName": "@loopress/cli",
5078
+ "pluginType": "core",
5079
+ "strict": true,
5080
+ "enableJsonFlag": true,
5081
+ "dryRunFlag": {
5082
+ "dry-run": {
5083
+ "char": "d",
5084
+ "description": "Show what would change without making changes",
5085
+ "allowNo": false,
5086
+ "type": "boolean"
5087
+ }
5088
+ },
5089
+ "yesFlag": {
5090
+ "yes": {
5091
+ "char": "y",
5092
+ "description": "Answer yes to confirmation prompts",
5093
+ "allowNo": false,
5094
+ "type": "boolean"
5095
+ }
5096
+ },
5097
+ "againstFlag": {
5098
+ "against": {
5099
+ "description": "Compare the primary environment against this second environment instead of against local files",
5100
+ "input": [],
5101
+ "multiple": false,
5102
+ "type": "option"
5103
+ }
5104
+ },
5105
+ "isESM": true,
5106
+ "relativePath": [
5107
+ "dist",
5108
+ "commands",
5109
+ "template",
5110
+ "diff.js"
5111
+ ]
5112
+ },
5113
+ "template:list": {
5114
+ "aliases": [],
5115
+ "args": {},
5116
+ "description": "Show the Loopress child theme of the active block theme: its templates, parts, and those edited in the Site Editor",
5117
+ "examples": [
5118
+ "$ lps template list"
5119
+ ],
5120
+ "flags": {
5121
+ "json": {
5122
+ "description": "Format output as json.",
5123
+ "helpGroup": "GLOBAL",
5124
+ "name": "json",
5125
+ "allowNo": false,
5126
+ "type": "boolean"
5127
+ },
5128
+ "env": {
5129
+ "description": "Target environment by name, overriding the globally active one (lps project switch)",
5130
+ "name": "env",
5131
+ "hasDynamicHelp": false,
5132
+ "multiple": false,
5133
+ "type": "option"
5134
+ }
5135
+ },
5136
+ "hasDynamicHelp": false,
5137
+ "hiddenAliases": [],
5138
+ "id": "template:list",
5139
+ "pluginAlias": "@loopress/cli",
5140
+ "pluginName": "@loopress/cli",
5141
+ "pluginType": "core",
5142
+ "strict": true,
5143
+ "enableJsonFlag": true,
5144
+ "dryRunFlag": {
5145
+ "dry-run": {
5146
+ "char": "d",
5147
+ "description": "Show what would change without making changes",
5148
+ "allowNo": false,
5149
+ "type": "boolean"
5150
+ }
5151
+ },
5152
+ "yesFlag": {
5153
+ "yes": {
5154
+ "char": "y",
5155
+ "description": "Answer yes to confirmation prompts",
5156
+ "allowNo": false,
5157
+ "type": "boolean"
5158
+ }
5159
+ },
5160
+ "isESM": true,
5161
+ "relativePath": [
5162
+ "dist",
5163
+ "commands",
5164
+ "template",
5165
+ "list.js"
5166
+ ]
5167
+ },
5168
+ "template:push": {
5169
+ "aliases": [],
5170
+ "args": {},
5171
+ "description": "Push block templates (templates/<slug>.html) and template parts (parts/<slug>.html) as the files of a child theme of the active block theme, <parent>-loopress. The child mirrors the project: files removed locally are removed from it. It is never activated for you.",
5172
+ "examples": [
5173
+ "$ lps template push",
5174
+ "$ lps template push --dry-run"
5175
+ ],
5176
+ "flags": {
5177
+ "json": {
5178
+ "description": "Format output as json.",
5179
+ "helpGroup": "GLOBAL",
5180
+ "name": "json",
5181
+ "allowNo": false,
5182
+ "type": "boolean"
5183
+ },
5184
+ "env": {
5185
+ "description": "Target environment by name, overriding the globally active one (lps project switch)",
5186
+ "name": "env",
5187
+ "hasDynamicHelp": false,
5188
+ "multiple": false,
5189
+ "type": "option"
5190
+ },
5191
+ "dry-run": {
5192
+ "char": "d",
5193
+ "description": "Show what would change without making changes",
5194
+ "name": "dry-run",
5195
+ "allowNo": false,
5196
+ "type": "boolean"
5197
+ },
5198
+ "yes": {
5199
+ "char": "y",
5200
+ "description": "Answer yes to confirmation prompts",
5201
+ "name": "yes",
5202
+ "allowNo": false,
5203
+ "type": "boolean"
5204
+ }
5205
+ },
5206
+ "hasDynamicHelp": false,
5207
+ "hiddenAliases": [],
5208
+ "id": "template:push",
5209
+ "pluginAlias": "@loopress/cli",
5210
+ "pluginName": "@loopress/cli",
5211
+ "pluginType": "core",
5212
+ "strict": true,
5213
+ "enableJsonFlag": true,
5214
+ "isESM": true,
5215
+ "relativePath": [
5216
+ "dist",
5217
+ "commands",
5218
+ "template",
5219
+ "push.js"
5220
+ ]
5221
+ },
5017
5222
  "theme:add": {
5018
5223
  "aliases": [],
5019
5224
  "args": {
@@ -5029,6 +5234,13 @@
5029
5234
  "$ lps theme add generatepress --version 3.4.0"
5030
5235
  ],
5031
5236
  "flags": {
5237
+ "json": {
5238
+ "description": "Format output as json.",
5239
+ "helpGroup": "GLOBAL",
5240
+ "name": "json",
5241
+ "allowNo": false,
5242
+ "type": "boolean"
5243
+ },
5032
5244
  "env": {
5033
5245
  "description": "Target environment by name, overriding the globally active one (lps project switch)",
5034
5246
  "name": "env",
@@ -5058,7 +5270,7 @@
5058
5270
  "pluginName": "@loopress/cli",
5059
5271
  "pluginType": "core",
5060
5272
  "strict": true,
5061
- "enableJsonFlag": false,
5273
+ "enableJsonFlag": true,
5062
5274
  "dryRunFlag": {
5063
5275
  "dry-run": {
5064
5276
  "char": "d",
@@ -5260,7 +5472,7 @@
5260
5472
  "status.js"
5261
5473
  ]
5262
5474
  },
5263
- "theme-styles:diff": {
5475
+ "theme:style:diff": {
5264
5476
  "aliases": [],
5265
5477
  "args": {
5266
5478
  "path": {
@@ -5270,9 +5482,9 @@
5270
5482
  },
5271
5483
  "description": "Show what differs in the active block theme's Global Styles (Site Editor > Styles) between your local file and a WordPress environment, or between two environments",
5272
5484
  "examples": [
5273
- "$ lps theme-styles diff",
5274
- "$ lps theme-styles diff --env staging",
5275
- "$ lps theme-styles diff --env staging --against production"
5485
+ "$ lps theme style diff",
5486
+ "$ lps theme style diff --env staging",
5487
+ "$ lps theme style diff --env staging --against production"
5276
5488
  ],
5277
5489
  "flags": {
5278
5490
  "json": {
@@ -5299,7 +5511,7 @@
5299
5511
  },
5300
5512
  "hasDynamicHelp": false,
5301
5513
  "hiddenAliases": [],
5302
- "id": "theme-styles:diff",
5514
+ "id": "theme:style:diff",
5303
5515
  "pluginAlias": "@loopress/cli",
5304
5516
  "pluginName": "@loopress/cli",
5305
5517
  "pluginType": "core",
@@ -5333,11 +5545,12 @@
5333
5545
  "relativePath": [
5334
5546
  "dist",
5335
5547
  "commands",
5336
- "theme-styles",
5548
+ "theme",
5549
+ "style",
5337
5550
  "diff.js"
5338
5551
  ]
5339
5552
  },
5340
- "theme-styles:pull": {
5553
+ "theme:style:pull": {
5341
5554
  "aliases": [],
5342
5555
  "args": {
5343
5556
  "path": {
@@ -5347,7 +5560,7 @@
5347
5560
  },
5348
5561
  "description": "Pull the active block theme's Global Styles customizations (Site Editor > Styles) from WordPress into a local file",
5349
5562
  "examples": [
5350
- "$ lps theme-styles pull"
5563
+ "$ lps theme style pull"
5351
5564
  ],
5352
5565
  "flags": {
5353
5566
  "env": {
@@ -5367,7 +5580,7 @@
5367
5580
  },
5368
5581
  "hasDynamicHelp": false,
5369
5582
  "hiddenAliases": [],
5370
- "id": "theme-styles:pull",
5583
+ "id": "theme:style:pull",
5371
5584
  "pluginAlias": "@loopress/cli",
5372
5585
  "pluginName": "@loopress/cli",
5373
5586
  "pluginType": "core",
@@ -5393,11 +5606,12 @@
5393
5606
  "relativePath": [
5394
5607
  "dist",
5395
5608
  "commands",
5396
- "theme-styles",
5609
+ "theme",
5610
+ "style",
5397
5611
  "pull.js"
5398
5612
  ]
5399
5613
  },
5400
- "theme-styles:push": {
5614
+ "theme:style:push": {
5401
5615
  "aliases": [],
5402
5616
  "args": {
5403
5617
  "path": {
@@ -5407,7 +5621,7 @@
5407
5621
  },
5408
5622
  "description": "Push the local Global Styles file to the active block theme's Site Editor > Styles on WordPress",
5409
5623
  "examples": [
5410
- "$ lps theme-styles push"
5624
+ "$ lps theme style push"
5411
5625
  ],
5412
5626
  "flags": {
5413
5627
  "env": {
@@ -5427,7 +5641,7 @@
5427
5641
  },
5428
5642
  "hasDynamicHelp": false,
5429
5643
  "hiddenAliases": [],
5430
- "id": "theme-styles:push",
5644
+ "id": "theme:style:push",
5431
5645
  "pluginAlias": "@loopress/cli",
5432
5646
  "pluginName": "@loopress/cli",
5433
5647
  "pluginType": "core",
@@ -5436,11 +5650,12 @@
5436
5650
  "relativePath": [
5437
5651
  "dist",
5438
5652
  "commands",
5439
- "theme-styles",
5653
+ "theme",
5654
+ "style",
5440
5655
  "push.js"
5441
5656
  ]
5442
5657
  },
5443
- "theme-styles:rollback": {
5658
+ "theme:style:rollback": {
5444
5659
  "aliases": [],
5445
5660
  "args": {
5446
5661
  "path": {
@@ -5448,12 +5663,12 @@
5448
5663
  "name": "path"
5449
5664
  }
5450
5665
  },
5451
- "description": "Restore the active theme’s Global Styles to a snapshot taken automatically before an earlier `lps theme-styles push`",
5666
+ "description": "Restore the active theme's Global Styles to a snapshot taken automatically before an earlier `lps theme style push`",
5452
5667
  "examples": [
5453
- "$ lps theme-styles rollback",
5454
- "$ lps theme-styles rollback --list",
5455
- "$ lps theme-styles rollback --to 1732000000000",
5456
- "$ lps theme-styles rollback --dry-run"
5668
+ "$ lps theme style rollback",
5669
+ "$ lps theme style rollback --list",
5670
+ "$ lps theme style rollback --to 1732000000000",
5671
+ "$ lps theme style rollback --dry-run"
5457
5672
  ],
5458
5673
  "flags": {
5459
5674
  "json": {
@@ -5500,7 +5715,7 @@
5500
5715
  },
5501
5716
  "hasDynamicHelp": false,
5502
5717
  "hiddenAliases": [],
5503
- "id": "theme-styles:rollback",
5718
+ "id": "theme:style:rollback",
5504
5719
  "pluginAlias": "@loopress/cli",
5505
5720
  "pluginName": "@loopress/cli",
5506
5721
  "pluginType": "core",
@@ -5526,10 +5741,11 @@
5526
5741
  "relativePath": [
5527
5742
  "dist",
5528
5743
  "commands",
5529
- "theme-styles",
5744
+ "theme",
5745
+ "style",
5530
5746
  "rollback.js"
5531
5747
  ]
5532
5748
  }
5533
5749
  },
5534
- "version": "0.26.0"
5750
+ "version": "0.28.0"
5535
5751
  }