zapier-platform-cli 16.0.0 → 16.1.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 +229 -229
- package/package.json +1 -1
- package/src/constants.js +2 -2
- package/src/generators/templates/dynamic-dropdown/README.md +1 -1
- package/src/generators/templates/dynamic-dropdown/triggers/people.js +2 -2
- package/src/generators/templates/dynamic-dropdown/triggers/species.js +2 -2
- package/src/oclif/ZapierBaseCommand.js +1 -1
- package/src/oclif/commands/history.js +1 -0
- package/src/oclif/hooks/renderMarkdownHelp.js +5 -5
- package/src/utils/analytics.js +20 -7
- package/src/utils/api.js +1 -1
- package/src/version-store.js +1 -0
package/oclif.manifest.json
CHANGED
|
@@ -1526,88 +1526,6 @@
|
|
|
1526
1526
|
"clear.js"
|
|
1527
1527
|
]
|
|
1528
1528
|
},
|
|
1529
|
-
"delete:integration": {
|
|
1530
|
-
"aliases": [
|
|
1531
|
-
"delete:app"
|
|
1532
|
-
],
|
|
1533
|
-
"args": {},
|
|
1534
|
-
"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.",
|
|
1535
|
-
"flags": {
|
|
1536
|
-
"debug": {
|
|
1537
|
-
"char": "d",
|
|
1538
|
-
"description": "Show extra debugging output.",
|
|
1539
|
-
"name": "debug",
|
|
1540
|
-
"allowNo": false,
|
|
1541
|
-
"type": "boolean"
|
|
1542
|
-
},
|
|
1543
|
-
"invokedFromAnotherCommand": {
|
|
1544
|
-
"hidden": true,
|
|
1545
|
-
"name": "invokedFromAnotherCommand",
|
|
1546
|
-
"allowNo": false,
|
|
1547
|
-
"type": "boolean"
|
|
1548
|
-
}
|
|
1549
|
-
},
|
|
1550
|
-
"hasDynamicHelp": false,
|
|
1551
|
-
"hiddenAliases": [],
|
|
1552
|
-
"id": "delete:integration",
|
|
1553
|
-
"pluginAlias": "zapier-platform-cli",
|
|
1554
|
-
"pluginName": "zapier-platform-cli",
|
|
1555
|
-
"pluginType": "core",
|
|
1556
|
-
"strict": true,
|
|
1557
|
-
"enableJsonFlag": false,
|
|
1558
|
-
"skipValidInstallCheck": true,
|
|
1559
|
-
"isESM": false,
|
|
1560
|
-
"relativePath": [
|
|
1561
|
-
"src",
|
|
1562
|
-
"oclif",
|
|
1563
|
-
"commands",
|
|
1564
|
-
"delete",
|
|
1565
|
-
"integration.js"
|
|
1566
|
-
]
|
|
1567
|
-
},
|
|
1568
|
-
"delete:version": {
|
|
1569
|
-
"aliases": [],
|
|
1570
|
-
"args": {
|
|
1571
|
-
"version": {
|
|
1572
|
-
"description": "Specify the version to delete. It must have no users or Zaps.",
|
|
1573
|
-
"name": "version",
|
|
1574
|
-
"required": true
|
|
1575
|
-
}
|
|
1576
|
-
},
|
|
1577
|
-
"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.",
|
|
1578
|
-
"flags": {
|
|
1579
|
-
"debug": {
|
|
1580
|
-
"char": "d",
|
|
1581
|
-
"description": "Show extra debugging output.",
|
|
1582
|
-
"name": "debug",
|
|
1583
|
-
"allowNo": false,
|
|
1584
|
-
"type": "boolean"
|
|
1585
|
-
},
|
|
1586
|
-
"invokedFromAnotherCommand": {
|
|
1587
|
-
"hidden": true,
|
|
1588
|
-
"name": "invokedFromAnotherCommand",
|
|
1589
|
-
"allowNo": false,
|
|
1590
|
-
"type": "boolean"
|
|
1591
|
-
}
|
|
1592
|
-
},
|
|
1593
|
-
"hasDynamicHelp": false,
|
|
1594
|
-
"hiddenAliases": [],
|
|
1595
|
-
"id": "delete:version",
|
|
1596
|
-
"pluginAlias": "zapier-platform-cli",
|
|
1597
|
-
"pluginName": "zapier-platform-cli",
|
|
1598
|
-
"pluginType": "core",
|
|
1599
|
-
"strict": true,
|
|
1600
|
-
"enableJsonFlag": false,
|
|
1601
|
-
"skipValidInstallCheck": true,
|
|
1602
|
-
"isESM": false,
|
|
1603
|
-
"relativePath": [
|
|
1604
|
-
"src",
|
|
1605
|
-
"oclif",
|
|
1606
|
-
"commands",
|
|
1607
|
-
"delete",
|
|
1608
|
-
"version.js"
|
|
1609
|
-
]
|
|
1610
|
-
},
|
|
1611
1529
|
"canary:create": {
|
|
1612
1530
|
"aliases": [],
|
|
1613
1531
|
"args": {
|
|
@@ -1771,37 +1689,55 @@
|
|
|
1771
1689
|
"list.js"
|
|
1772
1690
|
]
|
|
1773
1691
|
},
|
|
1774
|
-
"
|
|
1692
|
+
"delete:integration": {
|
|
1775
1693
|
"aliases": [
|
|
1776
|
-
"
|
|
1694
|
+
"delete:app"
|
|
1777
1695
|
],
|
|
1778
|
-
"args": {
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
"
|
|
1696
|
+
"args": {},
|
|
1697
|
+
"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.",
|
|
1698
|
+
"flags": {
|
|
1699
|
+
"debug": {
|
|
1700
|
+
"char": "d",
|
|
1701
|
+
"description": "Show extra debugging output.",
|
|
1702
|
+
"name": "debug",
|
|
1703
|
+
"allowNo": false,
|
|
1704
|
+
"type": "boolean"
|
|
1783
1705
|
},
|
|
1784
|
-
"
|
|
1785
|
-
"
|
|
1786
|
-
"name": "
|
|
1787
|
-
"
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1706
|
+
"invokedFromAnotherCommand": {
|
|
1707
|
+
"hidden": true,
|
|
1708
|
+
"name": "invokedFromAnotherCommand",
|
|
1709
|
+
"allowNo": false,
|
|
1710
|
+
"type": "boolean"
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
"hasDynamicHelp": false,
|
|
1714
|
+
"hiddenAliases": [],
|
|
1715
|
+
"id": "delete:integration",
|
|
1716
|
+
"pluginAlias": "zapier-platform-cli",
|
|
1717
|
+
"pluginName": "zapier-platform-cli",
|
|
1718
|
+
"pluginType": "core",
|
|
1719
|
+
"strict": true,
|
|
1720
|
+
"enableJsonFlag": false,
|
|
1721
|
+
"skipValidInstallCheck": true,
|
|
1722
|
+
"isESM": false,
|
|
1723
|
+
"relativePath": [
|
|
1724
|
+
"src",
|
|
1725
|
+
"oclif",
|
|
1726
|
+
"commands",
|
|
1727
|
+
"delete",
|
|
1728
|
+
"integration.js"
|
|
1729
|
+
]
|
|
1730
|
+
},
|
|
1731
|
+
"delete:version": {
|
|
1732
|
+
"aliases": [],
|
|
1733
|
+
"args": {
|
|
1734
|
+
"version": {
|
|
1735
|
+
"description": "Specify the version to delete. It must have no users or Zaps.",
|
|
1736
|
+
"name": "version",
|
|
1792
1737
|
"required": true
|
|
1793
|
-
},
|
|
1794
|
-
"message": {
|
|
1795
|
-
"description": "A message sent in the email to your team member, if you need to provide context. Wrap the message in quotes to ensure spaces get saved.",
|
|
1796
|
-
"name": "message"
|
|
1797
1738
|
}
|
|
1798
1739
|
},
|
|
1799
|
-
"description": "
|
|
1800
|
-
"examples": [
|
|
1801
|
-
"zapier team:add bruce@wayne.com admin",
|
|
1802
|
-
"zapier team:add robin@wayne.com collaborator \"Hey Robin, check out this app.\"",
|
|
1803
|
-
"zapier team:add alfred@wayne.com subscriber \"Hey Alfred, check out this app.\""
|
|
1804
|
-
],
|
|
1740
|
+
"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.",
|
|
1805
1741
|
"flags": {
|
|
1806
1742
|
"debug": {
|
|
1807
1743
|
"char": "d",
|
|
@@ -1819,7 +1755,7 @@
|
|
|
1819
1755
|
},
|
|
1820
1756
|
"hasDynamicHelp": false,
|
|
1821
1757
|
"hiddenAliases": [],
|
|
1822
|
-
"id": "
|
|
1758
|
+
"id": "delete:version",
|
|
1823
1759
|
"pluginAlias": "zapier-platform-cli",
|
|
1824
1760
|
"pluginName": "zapier-platform-cli",
|
|
1825
1761
|
"pluginType": "core",
|
|
@@ -1831,16 +1767,23 @@
|
|
|
1831
1767
|
"src",
|
|
1832
1768
|
"oclif",
|
|
1833
1769
|
"commands",
|
|
1834
|
-
"
|
|
1835
|
-
"
|
|
1770
|
+
"delete",
|
|
1771
|
+
"version.js"
|
|
1836
1772
|
]
|
|
1837
1773
|
},
|
|
1838
|
-
"
|
|
1839
|
-
"aliases": [
|
|
1840
|
-
|
|
1774
|
+
"env:get": {
|
|
1775
|
+
"aliases": [],
|
|
1776
|
+
"args": {
|
|
1777
|
+
"version": {
|
|
1778
|
+
"description": "The version to get the environment for.",
|
|
1779
|
+
"name": "version",
|
|
1780
|
+
"required": true
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
"description": "Get environment variables for a version.",
|
|
1784
|
+
"examples": [
|
|
1785
|
+
"zapier env:get 1.2.3"
|
|
1841
1786
|
],
|
|
1842
|
-
"args": {},
|
|
1843
|
-
"description": "Get team members involved with your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nUse the `zapier team:add` and `zapier team:remove` commands to modify your team.\n",
|
|
1844
1787
|
"flags": {
|
|
1845
1788
|
"debug": {
|
|
1846
1789
|
"char": "d",
|
|
@@ -1874,7 +1817,7 @@
|
|
|
1874
1817
|
},
|
|
1875
1818
|
"hasDynamicHelp": false,
|
|
1876
1819
|
"hiddenAliases": [],
|
|
1877
|
-
"id": "
|
|
1820
|
+
"id": "env:get",
|
|
1878
1821
|
"pluginAlias": "zapier-platform-cli",
|
|
1879
1822
|
"pluginName": "zapier-platform-cli",
|
|
1880
1823
|
"pluginType": "core",
|
|
@@ -1886,16 +1829,27 @@
|
|
|
1886
1829
|
"src",
|
|
1887
1830
|
"oclif",
|
|
1888
1831
|
"commands",
|
|
1889
|
-
"
|
|
1832
|
+
"env",
|
|
1890
1833
|
"get.js"
|
|
1891
1834
|
]
|
|
1892
1835
|
},
|
|
1893
|
-
"
|
|
1894
|
-
"aliases": [
|
|
1895
|
-
|
|
1836
|
+
"env:set": {
|
|
1837
|
+
"aliases": [],
|
|
1838
|
+
"args": {
|
|
1839
|
+
"version": {
|
|
1840
|
+
"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.",
|
|
1841
|
+
"name": "version",
|
|
1842
|
+
"required": true
|
|
1843
|
+
},
|
|
1844
|
+
"key-value pairs...": {
|
|
1845
|
+
"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`",
|
|
1846
|
+
"name": "key-value pairs..."
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
"description": "Set environment variables for a version.",
|
|
1850
|
+
"examples": [
|
|
1851
|
+
"zapier env:set 1.2.3 SECRET=12345 OTHER=4321"
|
|
1896
1852
|
],
|
|
1897
|
-
"args": {},
|
|
1898
|
-
"description": "Remove a team member from all versions of your integration.\n\nAdmins will immediately lose write access to the integration.\nCollaborators will immediately lose read access to the integration.\nSubscribers won't receive future email updates.",
|
|
1899
1853
|
"flags": {
|
|
1900
1854
|
"debug": {
|
|
1901
1855
|
"char": "d",
|
|
@@ -1913,11 +1867,11 @@
|
|
|
1913
1867
|
},
|
|
1914
1868
|
"hasDynamicHelp": false,
|
|
1915
1869
|
"hiddenAliases": [],
|
|
1916
|
-
"id": "
|
|
1870
|
+
"id": "env:set",
|
|
1917
1871
|
"pluginAlias": "zapier-platform-cli",
|
|
1918
1872
|
"pluginName": "zapier-platform-cli",
|
|
1919
1873
|
"pluginType": "core",
|
|
1920
|
-
"strict":
|
|
1874
|
+
"strict": false,
|
|
1921
1875
|
"enableJsonFlag": false,
|
|
1922
1876
|
"skipValidInstallCheck": true,
|
|
1923
1877
|
"isESM": false,
|
|
@@ -1925,13 +1879,63 @@
|
|
|
1925
1879
|
"src",
|
|
1926
1880
|
"oclif",
|
|
1927
1881
|
"commands",
|
|
1928
|
-
"
|
|
1929
|
-
"
|
|
1882
|
+
"env",
|
|
1883
|
+
"set.js"
|
|
1930
1884
|
]
|
|
1931
1885
|
},
|
|
1932
|
-
"
|
|
1886
|
+
"env:unset": {
|
|
1887
|
+
"aliases": [],
|
|
1888
|
+
"args": {
|
|
1889
|
+
"version": {
|
|
1890
|
+
"description": "The version to set the environment for.",
|
|
1891
|
+
"name": "version",
|
|
1892
|
+
"required": true
|
|
1893
|
+
},
|
|
1894
|
+
"keys...": {
|
|
1895
|
+
"description": "The keys to unset. Keys are case-insensitive.",
|
|
1896
|
+
"name": "keys..."
|
|
1897
|
+
}
|
|
1898
|
+
},
|
|
1899
|
+
"description": "Unset environment variables for a version.",
|
|
1900
|
+
"examples": [
|
|
1901
|
+
"zapier env:unset 1.2.3 SECRET OTHER"
|
|
1902
|
+
],
|
|
1903
|
+
"flags": {
|
|
1904
|
+
"debug": {
|
|
1905
|
+
"char": "d",
|
|
1906
|
+
"description": "Show extra debugging output.",
|
|
1907
|
+
"name": "debug",
|
|
1908
|
+
"allowNo": false,
|
|
1909
|
+
"type": "boolean"
|
|
1910
|
+
},
|
|
1911
|
+
"invokedFromAnotherCommand": {
|
|
1912
|
+
"hidden": true,
|
|
1913
|
+
"name": "invokedFromAnotherCommand",
|
|
1914
|
+
"allowNo": false,
|
|
1915
|
+
"type": "boolean"
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
"hasDynamicHelp": false,
|
|
1919
|
+
"hiddenAliases": [],
|
|
1920
|
+
"id": "env:unset",
|
|
1921
|
+
"pluginAlias": "zapier-platform-cli",
|
|
1922
|
+
"pluginName": "zapier-platform-cli",
|
|
1923
|
+
"pluginType": "core",
|
|
1924
|
+
"strict": false,
|
|
1925
|
+
"enableJsonFlag": false,
|
|
1926
|
+
"skipValidInstallCheck": true,
|
|
1927
|
+
"isESM": false,
|
|
1928
|
+
"relativePath": [
|
|
1929
|
+
"src",
|
|
1930
|
+
"oclif",
|
|
1931
|
+
"commands",
|
|
1932
|
+
"env",
|
|
1933
|
+
"unset.js"
|
|
1934
|
+
]
|
|
1935
|
+
},
|
|
1936
|
+
"team:add": {
|
|
1933
1937
|
"aliases": [
|
|
1934
|
-
"
|
|
1938
|
+
"team:invite"
|
|
1935
1939
|
],
|
|
1936
1940
|
"args": {
|
|
1937
1941
|
"email": {
|
|
@@ -1939,24 +1943,28 @@
|
|
|
1939
1943
|
"name": "email",
|
|
1940
1944
|
"required": true
|
|
1941
1945
|
},
|
|
1942
|
-
"
|
|
1943
|
-
"description": "
|
|
1944
|
-
"name": "
|
|
1946
|
+
"role": {
|
|
1947
|
+
"description": "The level the invited team member should be at. Admins can edit everything and get email updates. Collaborators have read-access to the app and get email updates. Subscribers only get email updates.",
|
|
1948
|
+
"name": "role",
|
|
1949
|
+
"options": [
|
|
1950
|
+
"admin",
|
|
1951
|
+
"collaborator",
|
|
1952
|
+
"subscriber"
|
|
1953
|
+
],
|
|
1954
|
+
"required": true
|
|
1955
|
+
},
|
|
1956
|
+
"message": {
|
|
1957
|
+
"description": "A message sent in the email to your team member, if you need to provide context. Wrap the message in quotes to ensure spaces get saved.",
|
|
1958
|
+
"name": "message"
|
|
1945
1959
|
}
|
|
1946
1960
|
},
|
|
1947
|
-
"description": "Add a
|
|
1961
|
+
"description": "Add a team member to your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nTeam members can be freely added and removed.",
|
|
1948
1962
|
"examples": [
|
|
1949
|
-
"zapier
|
|
1950
|
-
"zapier
|
|
1963
|
+
"zapier team:add bruce@wayne.com admin",
|
|
1964
|
+
"zapier team:add robin@wayne.com collaborator \"Hey Robin, check out this app.\"",
|
|
1965
|
+
"zapier team:add alfred@wayne.com subscriber \"Hey Alfred, check out this app.\""
|
|
1951
1966
|
],
|
|
1952
1967
|
"flags": {
|
|
1953
|
-
"force": {
|
|
1954
|
-
"char": "f",
|
|
1955
|
-
"description": "Skip confirmation. Useful for running programatically.",
|
|
1956
|
-
"name": "force",
|
|
1957
|
-
"allowNo": false,
|
|
1958
|
-
"type": "boolean"
|
|
1959
|
-
},
|
|
1960
1968
|
"debug": {
|
|
1961
1969
|
"char": "d",
|
|
1962
1970
|
"description": "Show extra debugging output.",
|
|
@@ -1973,7 +1981,7 @@
|
|
|
1973
1981
|
},
|
|
1974
1982
|
"hasDynamicHelp": false,
|
|
1975
1983
|
"hiddenAliases": [],
|
|
1976
|
-
"id": "
|
|
1984
|
+
"id": "team:add",
|
|
1977
1985
|
"pluginAlias": "zapier-platform-cli",
|
|
1978
1986
|
"pluginName": "zapier-platform-cli",
|
|
1979
1987
|
"pluginType": "core",
|
|
@@ -1985,16 +1993,16 @@
|
|
|
1985
1993
|
"src",
|
|
1986
1994
|
"oclif",
|
|
1987
1995
|
"commands",
|
|
1988
|
-
"
|
|
1996
|
+
"team",
|
|
1989
1997
|
"add.js"
|
|
1990
1998
|
]
|
|
1991
1999
|
},
|
|
1992
|
-
"
|
|
2000
|
+
"team:get": {
|
|
1993
2001
|
"aliases": [
|
|
1994
|
-
"
|
|
2002
|
+
"team:list"
|
|
1995
2003
|
],
|
|
1996
2004
|
"args": {},
|
|
1997
|
-
"description": "Get
|
|
2005
|
+
"description": "Get team members involved with your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nUse the `zapier team:add` and `zapier team:remove` commands to modify your team.\n",
|
|
1998
2006
|
"flags": {
|
|
1999
2007
|
"debug": {
|
|
2000
2008
|
"char": "d",
|
|
@@ -2028,7 +2036,7 @@
|
|
|
2028
2036
|
},
|
|
2029
2037
|
"hasDynamicHelp": false,
|
|
2030
2038
|
"hiddenAliases": [],
|
|
2031
|
-
"id": "
|
|
2039
|
+
"id": "team:get",
|
|
2032
2040
|
"pluginAlias": "zapier-platform-cli",
|
|
2033
2041
|
"pluginName": "zapier-platform-cli",
|
|
2034
2042
|
"pluginType": "core",
|
|
@@ -2040,14 +2048,16 @@
|
|
|
2040
2048
|
"src",
|
|
2041
2049
|
"oclif",
|
|
2042
2050
|
"commands",
|
|
2043
|
-
"
|
|
2051
|
+
"team",
|
|
2044
2052
|
"get.js"
|
|
2045
2053
|
]
|
|
2046
2054
|
},
|
|
2047
|
-
"
|
|
2048
|
-
"aliases": [
|
|
2055
|
+
"team:remove": {
|
|
2056
|
+
"aliases": [
|
|
2057
|
+
"team:delete"
|
|
2058
|
+
],
|
|
2049
2059
|
"args": {},
|
|
2050
|
-
"description": "
|
|
2060
|
+
"description": "Remove a team member from all versions of your integration.\n\nAdmins will immediately lose write access to the integration.\nCollaborators will immediately lose read access to the integration.\nSubscribers won't receive future email updates.",
|
|
2051
2061
|
"flags": {
|
|
2052
2062
|
"debug": {
|
|
2053
2063
|
"char": "d",
|
|
@@ -2056,22 +2066,6 @@
|
|
|
2056
2066
|
"allowNo": false,
|
|
2057
2067
|
"type": "boolean"
|
|
2058
2068
|
},
|
|
2059
|
-
"format": {
|
|
2060
|
-
"char": "f",
|
|
2061
|
-
"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.",
|
|
2062
|
-
"name": "format",
|
|
2063
|
-
"default": "table",
|
|
2064
|
-
"hasDynamicHelp": false,
|
|
2065
|
-
"multiple": false,
|
|
2066
|
-
"options": [
|
|
2067
|
-
"plain",
|
|
2068
|
-
"json",
|
|
2069
|
-
"raw",
|
|
2070
|
-
"row",
|
|
2071
|
-
"table"
|
|
2072
|
-
],
|
|
2073
|
-
"type": "option"
|
|
2074
|
-
},
|
|
2075
2069
|
"invokedFromAnotherCommand": {
|
|
2076
2070
|
"hidden": true,
|
|
2077
2071
|
"name": "invokedFromAnotherCommand",
|
|
@@ -2081,7 +2075,7 @@
|
|
|
2081
2075
|
},
|
|
2082
2076
|
"hasDynamicHelp": false,
|
|
2083
2077
|
"hiddenAliases": [],
|
|
2084
|
-
"id": "
|
|
2078
|
+
"id": "team:remove",
|
|
2085
2079
|
"pluginAlias": "zapier-platform-cli",
|
|
2086
2080
|
"pluginName": "zapier-platform-cli",
|
|
2087
2081
|
"pluginType": "core",
|
|
@@ -2093,26 +2087,34 @@
|
|
|
2093
2087
|
"src",
|
|
2094
2088
|
"oclif",
|
|
2095
2089
|
"commands",
|
|
2096
|
-
"
|
|
2097
|
-
"
|
|
2090
|
+
"team",
|
|
2091
|
+
"remove.js"
|
|
2098
2092
|
]
|
|
2099
2093
|
},
|
|
2100
|
-
"users:
|
|
2094
|
+
"users:add": {
|
|
2101
2095
|
"aliases": [
|
|
2102
|
-
"users:
|
|
2096
|
+
"users:invite"
|
|
2103
2097
|
],
|
|
2104
2098
|
"args": {
|
|
2105
2099
|
"email": {
|
|
2106
|
-
"description": "The user to be
|
|
2100
|
+
"description": "The user to be invited. If they don't have a Zapier account, they'll be prompted to create one.",
|
|
2107
2101
|
"name": "email",
|
|
2108
2102
|
"required": true
|
|
2103
|
+
},
|
|
2104
|
+
"version": {
|
|
2105
|
+
"description": "A version string (like 1.2.3). Optional, used only if you want to invite a user to a specific version instead of all versions.",
|
|
2106
|
+
"name": "version"
|
|
2109
2107
|
}
|
|
2110
2108
|
},
|
|
2111
|
-
"description": "
|
|
2109
|
+
"description": "Add a user to some or all versions of your integration.\n\nWhen this command is run, we'll send an email to the user inviting them to try your integration. You can track the status of that invite using the `zapier users:get` command.\n\nInvited users will be able to see your integration's name, logo, and description. They'll also be able to create Zaps using any available triggers and actions.",
|
|
2110
|
+
"examples": [
|
|
2111
|
+
"zapier users:add bruce@wayne.com",
|
|
2112
|
+
"zapier users:add alfred@wayne.com 1.2.3"
|
|
2113
|
+
],
|
|
2112
2114
|
"flags": {
|
|
2113
2115
|
"force": {
|
|
2114
2116
|
"char": "f",
|
|
2115
|
-
"description": "
|
|
2117
|
+
"description": "Skip confirmation. Useful for running programatically.",
|
|
2116
2118
|
"name": "force",
|
|
2117
2119
|
"allowNo": false,
|
|
2118
2120
|
"type": "boolean"
|
|
@@ -2133,7 +2135,7 @@
|
|
|
2133
2135
|
},
|
|
2134
2136
|
"hasDynamicHelp": false,
|
|
2135
2137
|
"hiddenAliases": [],
|
|
2136
|
-
"id": "users:
|
|
2138
|
+
"id": "users:add",
|
|
2137
2139
|
"pluginAlias": "zapier-platform-cli",
|
|
2138
2140
|
"pluginName": "zapier-platform-cli",
|
|
2139
2141
|
"pluginType": "core",
|
|
@@ -2146,22 +2148,15 @@
|
|
|
2146
2148
|
"oclif",
|
|
2147
2149
|
"commands",
|
|
2148
2150
|
"users",
|
|
2149
|
-
"
|
|
2151
|
+
"add.js"
|
|
2150
2152
|
]
|
|
2151
2153
|
},
|
|
2152
|
-
"
|
|
2153
|
-
"aliases": [
|
|
2154
|
-
|
|
2155
|
-
"version": {
|
|
2156
|
-
"description": "The version to get the environment for.",
|
|
2157
|
-
"name": "version",
|
|
2158
|
-
"required": true
|
|
2159
|
-
}
|
|
2160
|
-
},
|
|
2161
|
-
"description": "Get environment variables for a version.",
|
|
2162
|
-
"examples": [
|
|
2163
|
-
"zapier env:get 1.2.3"
|
|
2154
|
+
"users:get": {
|
|
2155
|
+
"aliases": [
|
|
2156
|
+
"users:list"
|
|
2164
2157
|
],
|
|
2158
|
+
"args": {},
|
|
2159
|
+
"description": "Get a list of users who have been invited to your integration.\n\nNote that this list of users is NOT a comprehensive list of everyone who is using your integration. It only includes users who were invited directly by email (using the `\u001b[36mzapier users:add\u001b[39m` command or the web UI). Users who joined by clicking links generated using the `\u001b[36mzapier user:links\u001b[39m` command won't show up here.",
|
|
2165
2160
|
"flags": {
|
|
2166
2161
|
"debug": {
|
|
2167
2162
|
"char": "d",
|
|
@@ -2195,7 +2190,7 @@
|
|
|
2195
2190
|
},
|
|
2196
2191
|
"hasDynamicHelp": false,
|
|
2197
2192
|
"hiddenAliases": [],
|
|
2198
|
-
"id": "
|
|
2193
|
+
"id": "users:get",
|
|
2199
2194
|
"pluginAlias": "zapier-platform-cli",
|
|
2200
2195
|
"pluginName": "zapier-platform-cli",
|
|
2201
2196
|
"pluginType": "core",
|
|
@@ -2207,27 +2202,14 @@
|
|
|
2207
2202
|
"src",
|
|
2208
2203
|
"oclif",
|
|
2209
2204
|
"commands",
|
|
2210
|
-
"
|
|
2205
|
+
"users",
|
|
2211
2206
|
"get.js"
|
|
2212
2207
|
]
|
|
2213
2208
|
},
|
|
2214
|
-
"
|
|
2209
|
+
"users:links": {
|
|
2215
2210
|
"aliases": [],
|
|
2216
|
-
"args": {
|
|
2217
|
-
|
|
2218
|
-
"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.",
|
|
2219
|
-
"name": "version",
|
|
2220
|
-
"required": true
|
|
2221
|
-
},
|
|
2222
|
-
"key-value pairs...": {
|
|
2223
|
-
"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`",
|
|
2224
|
-
"name": "key-value pairs..."
|
|
2225
|
-
}
|
|
2226
|
-
},
|
|
2227
|
-
"description": "Set environment variables for a version.",
|
|
2228
|
-
"examples": [
|
|
2229
|
-
"zapier env:set 1.2.3 SECRET=12345 OTHER=4321"
|
|
2230
|
-
],
|
|
2211
|
+
"args": {},
|
|
2212
|
+
"description": "Get a list of links that are used to invite users to your integration.",
|
|
2231
2213
|
"flags": {
|
|
2232
2214
|
"debug": {
|
|
2233
2215
|
"char": "d",
|
|
@@ -2236,6 +2218,22 @@
|
|
|
2236
2218
|
"allowNo": false,
|
|
2237
2219
|
"type": "boolean"
|
|
2238
2220
|
},
|
|
2221
|
+
"format": {
|
|
2222
|
+
"char": "f",
|
|
2223
|
+
"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.",
|
|
2224
|
+
"name": "format",
|
|
2225
|
+
"default": "table",
|
|
2226
|
+
"hasDynamicHelp": false,
|
|
2227
|
+
"multiple": false,
|
|
2228
|
+
"options": [
|
|
2229
|
+
"plain",
|
|
2230
|
+
"json",
|
|
2231
|
+
"raw",
|
|
2232
|
+
"row",
|
|
2233
|
+
"table"
|
|
2234
|
+
],
|
|
2235
|
+
"type": "option"
|
|
2236
|
+
},
|
|
2239
2237
|
"invokedFromAnotherCommand": {
|
|
2240
2238
|
"hidden": true,
|
|
2241
2239
|
"name": "invokedFromAnotherCommand",
|
|
@@ -2245,11 +2243,11 @@
|
|
|
2245
2243
|
},
|
|
2246
2244
|
"hasDynamicHelp": false,
|
|
2247
2245
|
"hiddenAliases": [],
|
|
2248
|
-
"id": "
|
|
2246
|
+
"id": "users:links",
|
|
2249
2247
|
"pluginAlias": "zapier-platform-cli",
|
|
2250
2248
|
"pluginName": "zapier-platform-cli",
|
|
2251
2249
|
"pluginType": "core",
|
|
2252
|
-
"strict":
|
|
2250
|
+
"strict": true,
|
|
2253
2251
|
"enableJsonFlag": false,
|
|
2254
2252
|
"skipValidInstallCheck": true,
|
|
2255
2253
|
"isESM": false,
|
|
@@ -2257,28 +2255,30 @@
|
|
|
2257
2255
|
"src",
|
|
2258
2256
|
"oclif",
|
|
2259
2257
|
"commands",
|
|
2260
|
-
"
|
|
2261
|
-
"
|
|
2258
|
+
"users",
|
|
2259
|
+
"links.js"
|
|
2262
2260
|
]
|
|
2263
2261
|
},
|
|
2264
|
-
"
|
|
2265
|
-
"aliases": [
|
|
2262
|
+
"users:remove": {
|
|
2263
|
+
"aliases": [
|
|
2264
|
+
"users:delete"
|
|
2265
|
+
],
|
|
2266
2266
|
"args": {
|
|
2267
|
-
"
|
|
2268
|
-
"description": "The
|
|
2269
|
-
"name": "
|
|
2267
|
+
"email": {
|
|
2268
|
+
"description": "The user to be removed.",
|
|
2269
|
+
"name": "email",
|
|
2270
2270
|
"required": true
|
|
2271
|
-
},
|
|
2272
|
-
"keys...": {
|
|
2273
|
-
"description": "The keys to unset. Keys are case-insensitive.",
|
|
2274
|
-
"name": "keys..."
|
|
2275
2271
|
}
|
|
2276
2272
|
},
|
|
2277
|
-
"description": "
|
|
2278
|
-
"examples": [
|
|
2279
|
-
"zapier env:unset 1.2.3 SECRET OTHER"
|
|
2280
|
-
],
|
|
2273
|
+
"description": "Remove a user from all versions of your integration.\n\nWhen this command is run, their Zaps will immediately turn off. They won't be able to use your app again until they're re-invited or it has gone public. In practice, this command isn't run often as it's very disruptive to users.",
|
|
2281
2274
|
"flags": {
|
|
2275
|
+
"force": {
|
|
2276
|
+
"char": "f",
|
|
2277
|
+
"description": "Skips confirmation. Useful for running programatically.",
|
|
2278
|
+
"name": "force",
|
|
2279
|
+
"allowNo": false,
|
|
2280
|
+
"type": "boolean"
|
|
2281
|
+
},
|
|
2282
2282
|
"debug": {
|
|
2283
2283
|
"char": "d",
|
|
2284
2284
|
"description": "Show extra debugging output.",
|
|
@@ -2295,11 +2295,11 @@
|
|
|
2295
2295
|
},
|
|
2296
2296
|
"hasDynamicHelp": false,
|
|
2297
2297
|
"hiddenAliases": [],
|
|
2298
|
-
"id": "
|
|
2298
|
+
"id": "users:remove",
|
|
2299
2299
|
"pluginAlias": "zapier-platform-cli",
|
|
2300
2300
|
"pluginName": "zapier-platform-cli",
|
|
2301
2301
|
"pluginType": "core",
|
|
2302
|
-
"strict":
|
|
2302
|
+
"strict": true,
|
|
2303
2303
|
"enableJsonFlag": false,
|
|
2304
2304
|
"skipValidInstallCheck": true,
|
|
2305
2305
|
"isESM": false,
|
|
@@ -2307,10 +2307,10 @@
|
|
|
2307
2307
|
"src",
|
|
2308
2308
|
"oclif",
|
|
2309
2309
|
"commands",
|
|
2310
|
-
"
|
|
2311
|
-
"
|
|
2310
|
+
"users",
|
|
2311
|
+
"remove.js"
|
|
2312
2312
|
]
|
|
2313
2313
|
}
|
|
2314
2314
|
},
|
|
2315
|
-
"version": "16.
|
|
2315
|
+
"version": "16.1.0"
|
|
2316
2316
|
}
|
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -26,7 +26,7 @@ const BLOCKLISTED_PATHS = [
|
|
|
26
26
|
];
|
|
27
27
|
const NODE_VERSION = versionStore[versionStore.length - 1].nodeVersion;
|
|
28
28
|
const LAMBDA_VERSION = `v${NODE_VERSION}`;
|
|
29
|
-
const NODE_VERSION_CLI_REQUIRES = '>=
|
|
29
|
+
const NODE_VERSION_CLI_REQUIRES = '>=18'; // should be the oldest non-ETL version
|
|
30
30
|
const AUTH_KEY = 'deployKey';
|
|
31
31
|
const ANALYTICS_KEY = 'analyticsMode';
|
|
32
32
|
const ANALYTICS_MODES = {
|
|
@@ -42,7 +42,7 @@ const PACKAGE_VERSION = packageJson.version;
|
|
|
42
42
|
const UPDATE_NOTIFICATION_INTERVAL = 1000 * 60 * 60 * 24 * 7; // one week
|
|
43
43
|
|
|
44
44
|
const CHECK_REF_DOC_LINK =
|
|
45
|
-
'https://
|
|
45
|
+
'https://docs.zapier.com/platform/publish/integration-checks-reference#integration-check-reference';
|
|
46
46
|
|
|
47
47
|
const ISSUES_URL =
|
|
48
48
|
'https://github.com/zapier/zapier-platform/issues/new/choose';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# The "dynamic-dropdown" Template
|
|
2
2
|
|
|
3
|
-
This example integration uses the [Star Wars API](https://swapi.
|
|
3
|
+
This example integration uses the [Star Wars API](https://swapi.info/) to provide a dynamic listing of choices for an `inputField` in a trigger.
|
|
4
4
|
|
|
5
5
|

|
|
@@ -5,8 +5,8 @@ const perform = async (z, bundle) => {
|
|
|
5
5
|
// Ideally, we should poll through all the pages of results, but in this
|
|
6
6
|
// example we're going to omit that part. Thus, this trigger only "see" the
|
|
7
7
|
// people in their first page of results.
|
|
8
|
-
const response = await z.request({ url: 'https://swapi.
|
|
9
|
-
let peopleArray = response.data
|
|
8
|
+
const response = await z.request({ url: 'https://swapi.info/api/people/' });
|
|
9
|
+
let peopleArray = response.data;
|
|
10
10
|
|
|
11
11
|
if (bundle.inputData.species_id) {
|
|
12
12
|
// The Zap's setup has requested a specific species of person. Since the
|
|
@@ -3,7 +3,7 @@ const { extractID } = require('../utils');
|
|
|
3
3
|
// Fetches a list of records from the endpoint
|
|
4
4
|
const perform = async (z, bundle) => {
|
|
5
5
|
const request = {
|
|
6
|
-
url: 'https://swapi.
|
|
6
|
+
url: 'https://swapi.info/api/species/',
|
|
7
7
|
params: {},
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ const perform = async (z, bundle) => {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const response = await z.request(request);
|
|
16
|
-
const speciesArray = response.data
|
|
16
|
+
const speciesArray = response.data;
|
|
17
17
|
return speciesArray.map((species) => {
|
|
18
18
|
species.id = extractID(species.url);
|
|
19
19
|
return species;
|
|
@@ -346,7 +346,7 @@ class ZapierBaseCommand extends Command {
|
|
|
346
346
|
if (!this.args) {
|
|
347
347
|
throw new Error('unable to record analytics until args are parsed');
|
|
348
348
|
}
|
|
349
|
-
return recordAnalytics(this.id, true,
|
|
349
|
+
return recordAnalytics(this.id, true, this.args, this.flags);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const { marked } = require('marked');
|
|
3
|
-
const
|
|
3
|
+
const { markedTerminal } = require('marked-terminal');
|
|
4
4
|
|
|
5
|
-
marked.
|
|
6
|
-
|
|
5
|
+
marked.use(
|
|
6
|
+
markedTerminal({
|
|
7
7
|
tab: 2,
|
|
8
8
|
width: process.stdout.getWindowSize()[0] - 2,
|
|
9
9
|
reflowText: true,
|
|
10
10
|
codespan: chalk.underline.bold,
|
|
11
11
|
}),
|
|
12
|
-
|
|
12
|
+
);
|
|
13
13
|
|
|
14
14
|
module.exports = (options) => {
|
|
15
15
|
const cmdId = options.id === 'help' ? options.argv[0] : options.id;
|
|
16
16
|
const cmd = options.config.findCommand(cmdId);
|
|
17
17
|
if (cmd) {
|
|
18
18
|
if (cmd.description) {
|
|
19
|
-
cmd.description = marked(cmd.description).trim();
|
|
19
|
+
cmd.description = marked.parse(cmd.description).trim();
|
|
20
20
|
}
|
|
21
21
|
// TODO: Do the same for flag descriptions?
|
|
22
22
|
}
|
package/src/utils/analytics.js
CHANGED
|
@@ -2,6 +2,7 @@ const { callAPI } = require('./api');
|
|
|
2
2
|
// const { readFile } = require('./files');
|
|
3
3
|
const debug = require('debug')('zapier:analytics');
|
|
4
4
|
const pkg = require('../../package.json');
|
|
5
|
+
const { getLinkedAppConfig } = require('../utils/api');
|
|
5
6
|
const { ANALYTICS_KEY, ANALYTICS_MODES, IS_TESTING } = require('../constants');
|
|
6
7
|
const { readUserConfig, writeUserConfig } = require('./userConfig');
|
|
7
8
|
|
|
@@ -20,25 +21,37 @@ const shouldSkipAnalytics = (mode) =>
|
|
|
20
21
|
process.env.DISABLE_ZAPIER_ANALYTICS ||
|
|
21
22
|
mode === ANALYTICS_MODES.disabled;
|
|
22
23
|
|
|
23
|
-
const recordAnalytics = async (command, isValidCommand,
|
|
24
|
+
const recordAnalytics = async (command, isValidCommand, args, flags) => {
|
|
24
25
|
const analyticsMode = await currentAnalyticsMode();
|
|
25
26
|
|
|
26
27
|
if (shouldSkipAnalytics(analyticsMode)) {
|
|
27
28
|
debug('skipping analytics');
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
const argKeys = Object.keys(args);
|
|
32
|
+
const flagKeys = Object.keys(flags);
|
|
31
33
|
const shouldRecordAnonymously = analyticsMode === ANALYTICS_MODES.anonymous;
|
|
32
34
|
|
|
35
|
+
const integrationIDKey = argKeys.find(
|
|
36
|
+
(key) => key.toLowerCase() === 'integrationid',
|
|
37
|
+
);
|
|
38
|
+
const integrationID = integrationIDKey ? args[integrationIDKey] : undefined;
|
|
39
|
+
|
|
40
|
+
// Some commands ( like "zapier convert" ) won't have an app directory when called.
|
|
41
|
+
// Instead, having the app ID in the arguments.
|
|
42
|
+
// In this case, we fallback to using "integrationid" in arguments ( if it's there )
|
|
43
|
+
// and don't want to "explode" if appID is missing
|
|
44
|
+
const linkedAppId =
|
|
45
|
+
(await getLinkedAppConfig(undefined, false))?.id || integrationID;
|
|
46
|
+
|
|
33
47
|
// to make this more testable, we should split this out into its own function
|
|
34
48
|
const analyticsBody = {
|
|
35
49
|
command,
|
|
36
50
|
isValidCommand,
|
|
37
|
-
numArgs:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
51
|
+
numArgs: argKeys.length,
|
|
52
|
+
appId: linkedAppId,
|
|
53
|
+
argsKeys: argKeys,
|
|
54
|
+
flagKeys: flagKeys,
|
|
42
55
|
cliVersion: pkg.version,
|
|
43
56
|
os: shouldRecordAnonymously ? undefined : process.platform,
|
|
44
57
|
};
|
package/src/utils/api.js
CHANGED
|
@@ -95,7 +95,7 @@ const callAPI = async (
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
debug(`>> ${requestOptions.method} ${requestOptions.url}`);
|
|
98
|
+
debug(`>> ${requestOptions.method} ${requestOptions.url || res.url}`);
|
|
99
99
|
|
|
100
100
|
if (requestOptions.body) {
|
|
101
101
|
const replacementStr = 'raw zip removed in logs';
|
package/src/version-store.js
CHANGED