zapier-platform-cli 16.4.0 → 16.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/oclif.manifest.json +182 -130
- package/package.json +1 -1
- package/src/oclif/commands/legacy.js +61 -0
- package/src/oclif/commands/promote.js +0 -5
- package/src/oclif/commands/versions.js +28 -4
- package/src/oclif/oCommands.js +1 -0
package/oclif.manifest.json
CHANGED
|
@@ -649,6 +649,58 @@
|
|
|
649
649
|
"jobs.js"
|
|
650
650
|
]
|
|
651
651
|
},
|
|
652
|
+
"legacy": {
|
|
653
|
+
"aliases": [],
|
|
654
|
+
"args": {
|
|
655
|
+
"version": {
|
|
656
|
+
"description": "The version to mark as legacy.",
|
|
657
|
+
"name": "version",
|
|
658
|
+
"required": true
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"description": "Mark a non-production version of your integration as legacy.\n\nUse this when an integration version is no longer recommended for new users, but you don't want to block existing users from using it.\n\nReasons why you might want to mark a version as legacy:\n- this version may be discontinued in the future\n- this version has bugs\n- a newer version has been released and you want to encourage users to upgrade\n\n",
|
|
662
|
+
"examples": [
|
|
663
|
+
"zapier legacy 1.2.3"
|
|
664
|
+
],
|
|
665
|
+
"flags": {
|
|
666
|
+
"force": {
|
|
667
|
+
"char": "f",
|
|
668
|
+
"description": "Skip confirmation prompt. Use with caution.",
|
|
669
|
+
"name": "force",
|
|
670
|
+
"allowNo": false,
|
|
671
|
+
"type": "boolean"
|
|
672
|
+
},
|
|
673
|
+
"debug": {
|
|
674
|
+
"char": "d",
|
|
675
|
+
"description": "Show extra debugging output.",
|
|
676
|
+
"name": "debug",
|
|
677
|
+
"allowNo": false,
|
|
678
|
+
"type": "boolean"
|
|
679
|
+
},
|
|
680
|
+
"invokedFromAnotherCommand": {
|
|
681
|
+
"hidden": true,
|
|
682
|
+
"name": "invokedFromAnotherCommand",
|
|
683
|
+
"allowNo": false,
|
|
684
|
+
"type": "boolean"
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
"hasDynamicHelp": false,
|
|
688
|
+
"hiddenAliases": [],
|
|
689
|
+
"id": "legacy",
|
|
690
|
+
"pluginAlias": "zapier-platform-cli",
|
|
691
|
+
"pluginName": "zapier-platform-cli",
|
|
692
|
+
"pluginType": "core",
|
|
693
|
+
"strict": true,
|
|
694
|
+
"enableJsonFlag": false,
|
|
695
|
+
"skipValidInstallCheck": true,
|
|
696
|
+
"isESM": false,
|
|
697
|
+
"relativePath": [
|
|
698
|
+
"src",
|
|
699
|
+
"oclif",
|
|
700
|
+
"commands",
|
|
701
|
+
"legacy.js"
|
|
702
|
+
]
|
|
703
|
+
},
|
|
652
704
|
"link": {
|
|
653
705
|
"aliases": [],
|
|
654
706
|
"args": {},
|
|
@@ -1461,7 +1513,7 @@
|
|
|
1461
1513
|
"versions": {
|
|
1462
1514
|
"aliases": [],
|
|
1463
1515
|
"args": {},
|
|
1464
|
-
"description": "List the versions of your integration available for use in
|
|
1516
|
+
"description": "List the versions of your integration available for use in Zapier automations.",
|
|
1465
1517
|
"flags": {
|
|
1466
1518
|
"debug": {
|
|
1467
1519
|
"char": "d",
|
|
@@ -1510,54 +1562,6 @@
|
|
|
1510
1562
|
"versions.js"
|
|
1511
1563
|
]
|
|
1512
1564
|
},
|
|
1513
|
-
"cache:clear": {
|
|
1514
|
-
"aliases": [],
|
|
1515
|
-
"args": {
|
|
1516
|
-
"majorVersion": {
|
|
1517
|
-
"description": "(Optional) The cache data will be deleted for this major version. If not provided, you must pick from a list of major versions for this integration.",
|
|
1518
|
-
"name": "majorVersion",
|
|
1519
|
-
"required": false
|
|
1520
|
-
}
|
|
1521
|
-
},
|
|
1522
|
-
"description": "Clear the cache data for a major version. \n\nThis command clears the cache data for a major version of your integration.\nThe job will be run in the background and may take some time to complete.\nYou can check `zapier history` to see the job status.\n",
|
|
1523
|
-
"examples": [
|
|
1524
|
-
"zapier cache:clear",
|
|
1525
|
-
"zapier cache:clear 2"
|
|
1526
|
-
],
|
|
1527
|
-
"flags": {
|
|
1528
|
-
"debug": {
|
|
1529
|
-
"char": "d",
|
|
1530
|
-
"description": "Show extra debugging output.",
|
|
1531
|
-
"name": "debug",
|
|
1532
|
-
"allowNo": false,
|
|
1533
|
-
"type": "boolean"
|
|
1534
|
-
},
|
|
1535
|
-
"invokedFromAnotherCommand": {
|
|
1536
|
-
"hidden": true,
|
|
1537
|
-
"name": "invokedFromAnotherCommand",
|
|
1538
|
-
"allowNo": false,
|
|
1539
|
-
"type": "boolean"
|
|
1540
|
-
}
|
|
1541
|
-
},
|
|
1542
|
-
"hasDynamicHelp": false,
|
|
1543
|
-
"hiddenAliases": [],
|
|
1544
|
-
"id": "cache:clear",
|
|
1545
|
-
"pluginAlias": "zapier-platform-cli",
|
|
1546
|
-
"pluginName": "zapier-platform-cli",
|
|
1547
|
-
"pluginType": "core",
|
|
1548
|
-
"strict": true,
|
|
1549
|
-
"enableJsonFlag": false,
|
|
1550
|
-
"skipValidInstallCheck": true,
|
|
1551
|
-
"hide": true,
|
|
1552
|
-
"isESM": false,
|
|
1553
|
-
"relativePath": [
|
|
1554
|
-
"src",
|
|
1555
|
-
"oclif",
|
|
1556
|
-
"commands",
|
|
1557
|
-
"cache",
|
|
1558
|
-
"clear.js"
|
|
1559
|
-
]
|
|
1560
|
-
},
|
|
1561
1565
|
"canary:create": {
|
|
1562
1566
|
"aliases": [],
|
|
1563
1567
|
"args": {
|
|
@@ -1721,18 +1725,19 @@
|
|
|
1721
1725
|
"list.js"
|
|
1722
1726
|
]
|
|
1723
1727
|
},
|
|
1724
|
-
"
|
|
1728
|
+
"cache:clear": {
|
|
1725
1729
|
"aliases": [],
|
|
1726
1730
|
"args": {
|
|
1727
|
-
"
|
|
1728
|
-
"description": "The version
|
|
1729
|
-
"name": "
|
|
1730
|
-
"required":
|
|
1731
|
+
"majorVersion": {
|
|
1732
|
+
"description": "(Optional) The cache data will be deleted for this major version. If not provided, you must pick from a list of major versions for this integration.",
|
|
1733
|
+
"name": "majorVersion",
|
|
1734
|
+
"required": false
|
|
1731
1735
|
}
|
|
1732
1736
|
},
|
|
1733
|
-
"description": "
|
|
1737
|
+
"description": "Clear the cache data for a major version. \n\nThis command clears the cache data for a major version of your integration.\nThe job will be run in the background and may take some time to complete.\nYou can check `zapier history` to see the job status.\n",
|
|
1734
1738
|
"examples": [
|
|
1735
|
-
"zapier
|
|
1739
|
+
"zapier cache:clear",
|
|
1740
|
+
"zapier cache:clear 2"
|
|
1736
1741
|
],
|
|
1737
1742
|
"flags": {
|
|
1738
1743
|
"debug": {
|
|
@@ -1742,21 +1747,45 @@
|
|
|
1742
1747
|
"allowNo": false,
|
|
1743
1748
|
"type": "boolean"
|
|
1744
1749
|
},
|
|
1745
|
-
"
|
|
1746
|
-
"
|
|
1747
|
-
"
|
|
1748
|
-
"
|
|
1749
|
-
"
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1750
|
+
"invokedFromAnotherCommand": {
|
|
1751
|
+
"hidden": true,
|
|
1752
|
+
"name": "invokedFromAnotherCommand",
|
|
1753
|
+
"allowNo": false,
|
|
1754
|
+
"type": "boolean"
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
"hasDynamicHelp": false,
|
|
1758
|
+
"hiddenAliases": [],
|
|
1759
|
+
"id": "cache:clear",
|
|
1760
|
+
"pluginAlias": "zapier-platform-cli",
|
|
1761
|
+
"pluginName": "zapier-platform-cli",
|
|
1762
|
+
"pluginType": "core",
|
|
1763
|
+
"strict": true,
|
|
1764
|
+
"enableJsonFlag": false,
|
|
1765
|
+
"skipValidInstallCheck": true,
|
|
1766
|
+
"hide": true,
|
|
1767
|
+
"isESM": false,
|
|
1768
|
+
"relativePath": [
|
|
1769
|
+
"src",
|
|
1770
|
+
"oclif",
|
|
1771
|
+
"commands",
|
|
1772
|
+
"cache",
|
|
1773
|
+
"clear.js"
|
|
1774
|
+
]
|
|
1775
|
+
},
|
|
1776
|
+
"delete:integration": {
|
|
1777
|
+
"aliases": [
|
|
1778
|
+
"delete:app"
|
|
1779
|
+
],
|
|
1780
|
+
"args": {},
|
|
1781
|
+
"description": "Delete your integration (including all versions).\n\nThis only works if there are no active users or Zaps on any version. If you only want to delete certain versions, use the `zapier delete:version` command instead. It's unlikely that you'll be able to run this on an app that you've pushed publicly, since there are usually still users.",
|
|
1782
|
+
"flags": {
|
|
1783
|
+
"debug": {
|
|
1784
|
+
"char": "d",
|
|
1785
|
+
"description": "Show extra debugging output.",
|
|
1786
|
+
"name": "debug",
|
|
1787
|
+
"allowNo": false,
|
|
1788
|
+
"type": "boolean"
|
|
1760
1789
|
},
|
|
1761
1790
|
"invokedFromAnotherCommand": {
|
|
1762
1791
|
"hidden": true,
|
|
@@ -1767,7 +1796,7 @@
|
|
|
1767
1796
|
},
|
|
1768
1797
|
"hasDynamicHelp": false,
|
|
1769
1798
|
"hiddenAliases": [],
|
|
1770
|
-
"id": "
|
|
1799
|
+
"id": "delete:integration",
|
|
1771
1800
|
"pluginAlias": "zapier-platform-cli",
|
|
1772
1801
|
"pluginName": "zapier-platform-cli",
|
|
1773
1802
|
"pluginType": "core",
|
|
@@ -1779,35 +1808,21 @@
|
|
|
1779
1808
|
"src",
|
|
1780
1809
|
"oclif",
|
|
1781
1810
|
"commands",
|
|
1782
|
-
"
|
|
1783
|
-
"
|
|
1811
|
+
"delete",
|
|
1812
|
+
"integration.js"
|
|
1784
1813
|
]
|
|
1785
1814
|
},
|
|
1786
|
-
"
|
|
1815
|
+
"delete:version": {
|
|
1787
1816
|
"aliases": [],
|
|
1788
1817
|
"args": {
|
|
1789
1818
|
"version": {
|
|
1790
|
-
"description": "
|
|
1819
|
+
"description": "Specify the version to delete. It must have no users or Zaps.",
|
|
1791
1820
|
"name": "version",
|
|
1792
1821
|
"required": true
|
|
1793
|
-
},
|
|
1794
|
-
"key-value pairs...": {
|
|
1795
|
-
"description": "The key-value pairs to set. Keys are case-insensitive. Each pair should be space separated and pairs should be separated by an `=`. For example: `A=123 B=456`",
|
|
1796
|
-
"name": "key-value pairs..."
|
|
1797
1822
|
}
|
|
1798
1823
|
},
|
|
1799
|
-
"description": "
|
|
1800
|
-
"examples": [
|
|
1801
|
-
"zapier env:set 1.2.3 SECRET=12345 OTHER=4321"
|
|
1802
|
-
],
|
|
1824
|
+
"description": "Delete a specific version of your integration.\n\nThis only works if there are no users or Zaps on that version. You will probably need to have run `zapier migrate` and `zapier deprecate` before this command will work.",
|
|
1803
1825
|
"flags": {
|
|
1804
|
-
"force": {
|
|
1805
|
-
"char": "f",
|
|
1806
|
-
"description": "Force the update of environment variables regardless if the app version is production or not. Use with caution.",
|
|
1807
|
-
"name": "force",
|
|
1808
|
-
"allowNo": false,
|
|
1809
|
-
"type": "boolean"
|
|
1810
|
-
},
|
|
1811
1826
|
"debug": {
|
|
1812
1827
|
"char": "d",
|
|
1813
1828
|
"description": "Show extra debugging output.",
|
|
@@ -1824,11 +1839,11 @@
|
|
|
1824
1839
|
},
|
|
1825
1840
|
"hasDynamicHelp": false,
|
|
1826
1841
|
"hiddenAliases": [],
|
|
1827
|
-
"id": "
|
|
1842
|
+
"id": "delete:version",
|
|
1828
1843
|
"pluginAlias": "zapier-platform-cli",
|
|
1829
1844
|
"pluginName": "zapier-platform-cli",
|
|
1830
1845
|
"pluginType": "core",
|
|
1831
|
-
"strict":
|
|
1846
|
+
"strict": true,
|
|
1832
1847
|
"enableJsonFlag": false,
|
|
1833
1848
|
"skipValidInstallCheck": true,
|
|
1834
1849
|
"isESM": false,
|
|
@@ -1836,35 +1851,24 @@
|
|
|
1836
1851
|
"src",
|
|
1837
1852
|
"oclif",
|
|
1838
1853
|
"commands",
|
|
1839
|
-
"
|
|
1840
|
-
"
|
|
1854
|
+
"delete",
|
|
1855
|
+
"version.js"
|
|
1841
1856
|
]
|
|
1842
1857
|
},
|
|
1843
|
-
"env:
|
|
1858
|
+
"env:get": {
|
|
1844
1859
|
"aliases": [],
|
|
1845
1860
|
"args": {
|
|
1846
1861
|
"version": {
|
|
1847
|
-
"description": "The version to
|
|
1862
|
+
"description": "The version to get the environment for.",
|
|
1848
1863
|
"name": "version",
|
|
1849
1864
|
"required": true
|
|
1850
|
-
},
|
|
1851
|
-
"keys...": {
|
|
1852
|
-
"description": "The keys to unset. Keys are case-insensitive.",
|
|
1853
|
-
"name": "keys..."
|
|
1854
1865
|
}
|
|
1855
1866
|
},
|
|
1856
|
-
"description": "
|
|
1867
|
+
"description": "Get environment variables for a version.",
|
|
1857
1868
|
"examples": [
|
|
1858
|
-
"zapier env:
|
|
1869
|
+
"zapier env:get 1.2.3"
|
|
1859
1870
|
],
|
|
1860
1871
|
"flags": {
|
|
1861
|
-
"force": {
|
|
1862
|
-
"char": "f",
|
|
1863
|
-
"description": "Force the update of environment variables regardless if the app version is production or not. Use with caution.",
|
|
1864
|
-
"name": "force",
|
|
1865
|
-
"allowNo": false,
|
|
1866
|
-
"type": "boolean"
|
|
1867
|
-
},
|
|
1868
1872
|
"debug": {
|
|
1869
1873
|
"char": "d",
|
|
1870
1874
|
"description": "Show extra debugging output.",
|
|
@@ -1872,6 +1876,22 @@
|
|
|
1872
1876
|
"allowNo": false,
|
|
1873
1877
|
"type": "boolean"
|
|
1874
1878
|
},
|
|
1879
|
+
"format": {
|
|
1880
|
+
"char": "f",
|
|
1881
|
+
"description": "Change the way structured data is presented. If \"json\" or \"raw\", you can pipe the output of the command into other tools, such as jq.",
|
|
1882
|
+
"name": "format",
|
|
1883
|
+
"default": "table",
|
|
1884
|
+
"hasDynamicHelp": false,
|
|
1885
|
+
"multiple": false,
|
|
1886
|
+
"options": [
|
|
1887
|
+
"plain",
|
|
1888
|
+
"json",
|
|
1889
|
+
"raw",
|
|
1890
|
+
"row",
|
|
1891
|
+
"table"
|
|
1892
|
+
],
|
|
1893
|
+
"type": "option"
|
|
1894
|
+
},
|
|
1875
1895
|
"invokedFromAnotherCommand": {
|
|
1876
1896
|
"hidden": true,
|
|
1877
1897
|
"name": "invokedFromAnotherCommand",
|
|
@@ -1881,11 +1901,11 @@
|
|
|
1881
1901
|
},
|
|
1882
1902
|
"hasDynamicHelp": false,
|
|
1883
1903
|
"hiddenAliases": [],
|
|
1884
|
-
"id": "env:
|
|
1904
|
+
"id": "env:get",
|
|
1885
1905
|
"pluginAlias": "zapier-platform-cli",
|
|
1886
1906
|
"pluginName": "zapier-platform-cli",
|
|
1887
1907
|
"pluginType": "core",
|
|
1888
|
-
"strict":
|
|
1908
|
+
"strict": true,
|
|
1889
1909
|
"enableJsonFlag": false,
|
|
1890
1910
|
"skipValidInstallCheck": true,
|
|
1891
1911
|
"isESM": false,
|
|
@@ -1894,16 +1914,34 @@
|
|
|
1894
1914
|
"oclif",
|
|
1895
1915
|
"commands",
|
|
1896
1916
|
"env",
|
|
1897
|
-
"
|
|
1917
|
+
"get.js"
|
|
1898
1918
|
]
|
|
1899
1919
|
},
|
|
1900
|
-
"
|
|
1901
|
-
"aliases": [
|
|
1902
|
-
|
|
1920
|
+
"env:set": {
|
|
1921
|
+
"aliases": [],
|
|
1922
|
+
"args": {
|
|
1923
|
+
"version": {
|
|
1924
|
+
"description": "The version to set the environment for. Values are copied forward when a new version is created, but this command will only ever affect the specified version.",
|
|
1925
|
+
"name": "version",
|
|
1926
|
+
"required": true
|
|
1927
|
+
},
|
|
1928
|
+
"key-value pairs...": {
|
|
1929
|
+
"description": "The key-value pairs to set. Keys are case-insensitive. Each pair should be space separated and pairs should be separated by an `=`. For example: `A=123 B=456`",
|
|
1930
|
+
"name": "key-value pairs..."
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
1933
|
+
"description": "Set environment variables for a version.",
|
|
1934
|
+
"examples": [
|
|
1935
|
+
"zapier env:set 1.2.3 SECRET=12345 OTHER=4321"
|
|
1903
1936
|
],
|
|
1904
|
-
"args": {},
|
|
1905
|
-
"description": "Delete your integration (including all versions).\n\nThis only works if there are no active users or Zaps on any version. If you only want to delete certain versions, use the `zapier delete:version` command instead. It's unlikely that you'll be able to run this on an app that you've pushed publicly, since there are usually still users.",
|
|
1906
1937
|
"flags": {
|
|
1938
|
+
"force": {
|
|
1939
|
+
"char": "f",
|
|
1940
|
+
"description": "Force the update of environment variables regardless if the app version is production or not. Use with caution.",
|
|
1941
|
+
"name": "force",
|
|
1942
|
+
"allowNo": false,
|
|
1943
|
+
"type": "boolean"
|
|
1944
|
+
},
|
|
1907
1945
|
"debug": {
|
|
1908
1946
|
"char": "d",
|
|
1909
1947
|
"description": "Show extra debugging output.",
|
|
@@ -1920,11 +1958,11 @@
|
|
|
1920
1958
|
},
|
|
1921
1959
|
"hasDynamicHelp": false,
|
|
1922
1960
|
"hiddenAliases": [],
|
|
1923
|
-
"id": "
|
|
1961
|
+
"id": "env:set",
|
|
1924
1962
|
"pluginAlias": "zapier-platform-cli",
|
|
1925
1963
|
"pluginName": "zapier-platform-cli",
|
|
1926
1964
|
"pluginType": "core",
|
|
1927
|
-
"strict":
|
|
1965
|
+
"strict": false,
|
|
1928
1966
|
"enableJsonFlag": false,
|
|
1929
1967
|
"skipValidInstallCheck": true,
|
|
1930
1968
|
"isESM": false,
|
|
@@ -1932,21 +1970,35 @@
|
|
|
1932
1970
|
"src",
|
|
1933
1971
|
"oclif",
|
|
1934
1972
|
"commands",
|
|
1935
|
-
"
|
|
1936
|
-
"
|
|
1973
|
+
"env",
|
|
1974
|
+
"set.js"
|
|
1937
1975
|
]
|
|
1938
1976
|
},
|
|
1939
|
-
"
|
|
1977
|
+
"env:unset": {
|
|
1940
1978
|
"aliases": [],
|
|
1941
1979
|
"args": {
|
|
1942
1980
|
"version": {
|
|
1943
|
-
"description": "
|
|
1981
|
+
"description": "The version to set the environment for.",
|
|
1944
1982
|
"name": "version",
|
|
1945
1983
|
"required": true
|
|
1984
|
+
},
|
|
1985
|
+
"keys...": {
|
|
1986
|
+
"description": "The keys to unset. Keys are case-insensitive.",
|
|
1987
|
+
"name": "keys..."
|
|
1946
1988
|
}
|
|
1947
1989
|
},
|
|
1948
|
-
"description": "
|
|
1990
|
+
"description": "Unset environment variables for a version.",
|
|
1991
|
+
"examples": [
|
|
1992
|
+
"zapier env:unset 1.2.3 SECRET OTHER"
|
|
1993
|
+
],
|
|
1949
1994
|
"flags": {
|
|
1995
|
+
"force": {
|
|
1996
|
+
"char": "f",
|
|
1997
|
+
"description": "Force the update of environment variables regardless if the app version is production or not. Use with caution.",
|
|
1998
|
+
"name": "force",
|
|
1999
|
+
"allowNo": false,
|
|
2000
|
+
"type": "boolean"
|
|
2001
|
+
},
|
|
1950
2002
|
"debug": {
|
|
1951
2003
|
"char": "d",
|
|
1952
2004
|
"description": "Show extra debugging output.",
|
|
@@ -1963,11 +2015,11 @@
|
|
|
1963
2015
|
},
|
|
1964
2016
|
"hasDynamicHelp": false,
|
|
1965
2017
|
"hiddenAliases": [],
|
|
1966
|
-
"id": "
|
|
2018
|
+
"id": "env:unset",
|
|
1967
2019
|
"pluginAlias": "zapier-platform-cli",
|
|
1968
2020
|
"pluginName": "zapier-platform-cli",
|
|
1969
2021
|
"pluginType": "core",
|
|
1970
|
-
"strict":
|
|
2022
|
+
"strict": false,
|
|
1971
2023
|
"enableJsonFlag": false,
|
|
1972
2024
|
"skipValidInstallCheck": true,
|
|
1973
2025
|
"isESM": false,
|
|
@@ -1975,8 +2027,8 @@
|
|
|
1975
2027
|
"src",
|
|
1976
2028
|
"oclif",
|
|
1977
2029
|
"commands",
|
|
1978
|
-
"
|
|
1979
|
-
"
|
|
2030
|
+
"env",
|
|
2031
|
+
"unset.js"
|
|
1980
2032
|
]
|
|
1981
2033
|
},
|
|
1982
2034
|
"team:add": {
|
|
@@ -2358,5 +2410,5 @@
|
|
|
2358
2410
|
]
|
|
2359
2411
|
}
|
|
2360
2412
|
},
|
|
2361
|
-
"version": "16.
|
|
2413
|
+
"version": "16.5.0"
|
|
2362
2414
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const BaseCommand = require('../ZapierBaseCommand');
|
|
2
|
+
const { Args, Flags } = require('@oclif/core');
|
|
3
|
+
const { buildFlags } = require('../buildFlags');
|
|
4
|
+
|
|
5
|
+
const { callAPI } = require('../../utils/api');
|
|
6
|
+
|
|
7
|
+
class LegacyCommand extends BaseCommand {
|
|
8
|
+
async perform() {
|
|
9
|
+
const app = await this.getWritableApp();
|
|
10
|
+
const { version } = this.args;
|
|
11
|
+
|
|
12
|
+
if (
|
|
13
|
+
!this.flags.force &&
|
|
14
|
+
!(await this.confirm(
|
|
15
|
+
'Are you sure you want to mark this version as legacy? Existing Zaps and automations will continue to work, but users may not be able to create new Zaps or automations with this version.',
|
|
16
|
+
))
|
|
17
|
+
) {
|
|
18
|
+
this.log('\nCancelled, version is not marked as legacy.');
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
this.log(
|
|
23
|
+
`\nPreparing to mark version ${version} your app "${app.title}" as legacy.\n`,
|
|
24
|
+
);
|
|
25
|
+
const url = `/apps/${app.id}/versions/${version}/legacy`;
|
|
26
|
+
this.startSpinner(`Making ${version} legacy`);
|
|
27
|
+
await callAPI(url, {
|
|
28
|
+
method: 'PUT',
|
|
29
|
+
});
|
|
30
|
+
this.stopSpinner();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
LegacyCommand.flags = buildFlags({
|
|
35
|
+
commandFlags: {
|
|
36
|
+
force: Flags.boolean({
|
|
37
|
+
char: 'f',
|
|
38
|
+
description: 'Skip confirmation prompt. Use with caution.',
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
LegacyCommand.args = {
|
|
43
|
+
version: Args.string({
|
|
44
|
+
description: 'The version to mark as legacy.',
|
|
45
|
+
required: true,
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
48
|
+
LegacyCommand.examples = ['zapier legacy 1.2.3'];
|
|
49
|
+
LegacyCommand.description = `Mark a non-production version of your integration as legacy.
|
|
50
|
+
|
|
51
|
+
Use this when an integration version is no longer recommended for new users, but you don't want to block existing users from using it.
|
|
52
|
+
|
|
53
|
+
Reasons why you might want to mark a version as legacy:
|
|
54
|
+
- this version may be discontinued in the future
|
|
55
|
+
- this version has bugs
|
|
56
|
+
- a newer version has been released and you want to encourage users to upgrade
|
|
57
|
+
|
|
58
|
+
`;
|
|
59
|
+
LegacyCommand.skipValidInstallCheck = true;
|
|
60
|
+
|
|
61
|
+
module.exports = LegacyCommand;
|
|
@@ -258,11 +258,6 @@ ${metadataPromptHelper}`);
|
|
|
258
258
|
|
|
259
259
|
this.stopSpinner();
|
|
260
260
|
this.log(' Promotion successful!');
|
|
261
|
-
if (!this.flags.invokedFromAnotherCommand) {
|
|
262
|
-
this.log(
|
|
263
|
-
'Optionally, run the `zapier migrate` command to move users to this version.',
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
261
|
}
|
|
267
262
|
}
|
|
268
263
|
|
|
@@ -5,19 +5,43 @@ const { buildFlags } = require('../buildFlags');
|
|
|
5
5
|
|
|
6
6
|
const { listVersions } = require('../../utils/api');
|
|
7
7
|
|
|
8
|
+
const deploymentToLifecycleState = (deployment) => {
|
|
9
|
+
switch (deployment) {
|
|
10
|
+
case 'non-production':
|
|
11
|
+
return 'private';
|
|
12
|
+
case 'production':
|
|
13
|
+
return 'promoted';
|
|
14
|
+
case 'demoted':
|
|
15
|
+
return 'available';
|
|
16
|
+
case 'legacy':
|
|
17
|
+
return 'legacy';
|
|
18
|
+
case 'deprecating':
|
|
19
|
+
return 'deprecating';
|
|
20
|
+
case 'deprecated':
|
|
21
|
+
return 'deprecated';
|
|
22
|
+
default:
|
|
23
|
+
return deployment;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
8
27
|
class VersionCommand extends BaseCommand {
|
|
9
28
|
async perform() {
|
|
10
29
|
this.startSpinner('Loading versions');
|
|
11
30
|
const { versions } = await listVersions();
|
|
12
31
|
this.stopSpinner();
|
|
32
|
+
const rows = versions.map((v) => ({
|
|
33
|
+
...v,
|
|
34
|
+
state: deploymentToLifecycleState(v.lifecycle.status),
|
|
35
|
+
}));
|
|
13
36
|
|
|
14
37
|
this.logTable({
|
|
15
|
-
rows
|
|
38
|
+
rows,
|
|
16
39
|
headers: [
|
|
17
40
|
['Version', 'version'],
|
|
18
41
|
['Platform', 'platform_version'],
|
|
19
|
-
['Users', 'user_count'],
|
|
20
|
-
['
|
|
42
|
+
['Zap Users', 'user_count'],
|
|
43
|
+
['State', 'state'],
|
|
44
|
+
['Legacy Date', 'legacy_date'],
|
|
21
45
|
['Deprecation Date', 'deprecation_date'],
|
|
22
46
|
['Timestamp', 'date'],
|
|
23
47
|
],
|
|
@@ -58,6 +82,6 @@ class VersionCommand extends BaseCommand {
|
|
|
58
82
|
|
|
59
83
|
VersionCommand.skipValidInstallCheck = true;
|
|
60
84
|
VersionCommand.flags = buildFlags({ opts: { format: true } });
|
|
61
|
-
VersionCommand.description = `List the versions of your integration available for use in
|
|
85
|
+
VersionCommand.description = `List the versions of your integration available for use in Zapier automations.`;
|
|
62
86
|
|
|
63
87
|
module.exports = VersionCommand;
|
package/src/oclif/oCommands.js
CHANGED
|
@@ -26,6 +26,7 @@ module.exports = {
|
|
|
26
26
|
integrations: require('./commands/integrations'),
|
|
27
27
|
invoke: require('./commands/invoke'),
|
|
28
28
|
link: require('./commands/link'),
|
|
29
|
+
legacy: require('./commands/legacy'),
|
|
29
30
|
login: require('./commands/login'),
|
|
30
31
|
logs: require('./commands/logs'),
|
|
31
32
|
logout: require('./commands/logout'),
|