zapier-platform-cli 17.2.0 → 17.3.1
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 +88 -90
- package/package.json +3 -5
- package/src/constants.js +3 -10
- package/src/oclif/commands/build.js +13 -5
- package/src/oclif/commands/deprecate.js +3 -3
- package/src/oclif/commands/push.js +9 -1
- package/src/utils/build.js +525 -295
- package/src/utils/files.js +41 -7
- package/src/utils/ignore.js +29 -9
- package/src/utils/itertools.js +39 -0
- package/src/utils/misc.js +5 -4
- package/src/utils/zapierwrapper.js +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -58,14 +58,13 @@
|
|
|
58
58
|
"description": "Build a pushable zip from the current directory.\n\nThis command does the following:\n\n* Creates a temporary folder\n* Copies all code into the temporary folder\n* Adds an entry point: `zapierwrapper.js`\n* Generates and validates app definition.\n* Detects dependencies via esbuild (optional, on by default)\n* Zips up all needed `.js` files. If you want to include more files, add a \"includeInBuild\" property (array with strings of regexp paths) to your `.zapierapprc`.\n* Moves the zip to `build/build.zip` and `build/source.zip` and deletes the temp folder\n\nThis command is typically followed by `zapier upload`.",
|
|
59
59
|
"flags": {
|
|
60
60
|
"disable-dependency-detection": {
|
|
61
|
-
"description": "Disable \"smart\" file inclusion. By default, Zapier only includes files that are required by `index.js
|
|
61
|
+
"description": "Disable \"smart\" file inclusion. By default, Zapier only includes files that are required by your entry point (`index.js` by default). If you (or your dependencies) require files dynamically (such as with `require(someVar)`), then you may see \"Cannot find module\" errors. Disabling this may make your `build.zip` too large. If that's the case, try using the `includeInBuild` option in your `.zapierapprc`. See the docs about `includeInBuild` for more info.",
|
|
62
62
|
"name": "disable-dependency-detection",
|
|
63
63
|
"allowNo": false,
|
|
64
64
|
"type": "boolean"
|
|
65
65
|
},
|
|
66
66
|
"skip-npm-install": {
|
|
67
|
-
"description": "Skips installing a fresh copy of npm dependencies
|
|
68
|
-
"hidden": true,
|
|
67
|
+
"description": "Skips installing a fresh copy of npm dependencies for shorter build time. Helpful for using yarn, pnpm, or local copies of dependencies.",
|
|
69
68
|
"name": "skip-npm-install",
|
|
70
69
|
"allowNo": false,
|
|
71
70
|
"type": "boolean"
|
|
@@ -226,7 +225,7 @@
|
|
|
226
225
|
"required": true
|
|
227
226
|
}
|
|
228
227
|
},
|
|
229
|
-
"description": "Mark a non-production version of your integration as deprecated, with removal by a certain date.\n\nUse this when an integration version will not be supported or start breaking at a known date.\n\nWhen deprecating a version, you must provide a reason for the deprecation. You can either specify the reason using the --reason flag or you will be prompted to select from the following options:\n- API endpoint deprecated\n- Security vulnerability\n- Critical bug\n- Legal requirement\n- Other\n\
|
|
228
|
+
"description": "Mark a non-production version of your integration as deprecated, with removal by a certain date.\n\nUse this when an integration version will not be supported or start breaking at a known date.\n\nWhen deprecating a version, you must provide a reason for the deprecation. You can either specify the reason using the --reason flag or you will be prompted to select from the following options:\n- API endpoint deprecated\n- Security vulnerability\n- Critical bug\n- Legal requirement\n- Other\n\nThe deprecation date must be at least 3 weeks days in the future. Zapier will send emails warning users of the deprecation exactly 14 days before the configured deprecation date. This gives you 1 week to migrate users to a newer version, if possible, before we notify them that they need to do so themselves.\n\nThere are other side effects: they'll start seeing it as \"Deprecated\" in the UI, and once the deprecation date arrives, if the Zaps weren't updated, they'll be paused and the users will be emailed again explaining what happened.\n\nDo not use deprecation if you only have non-breaking changes, such as:\n- Fixing help text\n- Adding new triggers/actions\n- Improving existing functionality\n- other bug fixes that don't break existing automations.",
|
|
230
229
|
"examples": [
|
|
231
230
|
"zapier deprecate 1.2.3 2011-10-01",
|
|
232
231
|
"zapier deprecate 1.2.3 2011-10-01 --reason=security_vulnerability",
|
|
@@ -1178,14 +1177,13 @@
|
|
|
1178
1177
|
"description": "Build and upload the current integration.\n\nThis command is the same as running `zapier build` and `zapier upload` in sequence. See those for more info.",
|
|
1179
1178
|
"flags": {
|
|
1180
1179
|
"disable-dependency-detection": {
|
|
1181
|
-
"description": "Disable \"smart\" file inclusion. By default, Zapier only includes files that are required by `index.js
|
|
1180
|
+
"description": "Disable \"smart\" file inclusion. By default, Zapier only includes files that are required by your entry point (`index.js` by default). If you (or your dependencies) require files dynamically (such as with `require(someVar)`), then you may see \"Cannot find module\" errors. Disabling this may make your `build.zip` too large. If that's the case, try using the `includeInBuild` option in your `.zapierapprc`. See the docs about `includeInBuild` for more info.",
|
|
1182
1181
|
"name": "disable-dependency-detection",
|
|
1183
1182
|
"allowNo": false,
|
|
1184
1183
|
"type": "boolean"
|
|
1185
1184
|
},
|
|
1186
1185
|
"skip-npm-install": {
|
|
1187
|
-
"description": "Skips installing a fresh copy of npm dependencies
|
|
1188
|
-
"hidden": true,
|
|
1186
|
+
"description": "Skips installing a fresh copy of npm dependencies for shorter build time. Helpful for using yarn, pnpm, or local copies of dependencies.",
|
|
1189
1187
|
"name": "skip-npm-install",
|
|
1190
1188
|
"allowNo": false,
|
|
1191
1189
|
"type": "boolean"
|
|
@@ -1695,88 +1693,6 @@
|
|
|
1695
1693
|
"clear.js"
|
|
1696
1694
|
]
|
|
1697
1695
|
},
|
|
1698
|
-
"delete:integration": {
|
|
1699
|
-
"aliases": [
|
|
1700
|
-
"delete:app"
|
|
1701
|
-
],
|
|
1702
|
-
"args": {},
|
|
1703
|
-
"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.",
|
|
1704
|
-
"flags": {
|
|
1705
|
-
"debug": {
|
|
1706
|
-
"char": "d",
|
|
1707
|
-
"description": "Show extra debugging output.",
|
|
1708
|
-
"name": "debug",
|
|
1709
|
-
"allowNo": false,
|
|
1710
|
-
"type": "boolean"
|
|
1711
|
-
},
|
|
1712
|
-
"invokedFromAnotherCommand": {
|
|
1713
|
-
"hidden": true,
|
|
1714
|
-
"name": "invokedFromAnotherCommand",
|
|
1715
|
-
"allowNo": false,
|
|
1716
|
-
"type": "boolean"
|
|
1717
|
-
}
|
|
1718
|
-
},
|
|
1719
|
-
"hasDynamicHelp": false,
|
|
1720
|
-
"hiddenAliases": [],
|
|
1721
|
-
"id": "delete:integration",
|
|
1722
|
-
"pluginAlias": "zapier-platform-cli",
|
|
1723
|
-
"pluginName": "zapier-platform-cli",
|
|
1724
|
-
"pluginType": "core",
|
|
1725
|
-
"strict": true,
|
|
1726
|
-
"enableJsonFlag": false,
|
|
1727
|
-
"skipValidInstallCheck": true,
|
|
1728
|
-
"isESM": false,
|
|
1729
|
-
"relativePath": [
|
|
1730
|
-
"src",
|
|
1731
|
-
"oclif",
|
|
1732
|
-
"commands",
|
|
1733
|
-
"delete",
|
|
1734
|
-
"integration.js"
|
|
1735
|
-
]
|
|
1736
|
-
},
|
|
1737
|
-
"delete:version": {
|
|
1738
|
-
"aliases": [],
|
|
1739
|
-
"args": {
|
|
1740
|
-
"version": {
|
|
1741
|
-
"description": "Specify the version to delete. It must have no users or Zaps.",
|
|
1742
|
-
"name": "version",
|
|
1743
|
-
"required": true
|
|
1744
|
-
}
|
|
1745
|
-
},
|
|
1746
|
-
"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.",
|
|
1747
|
-
"flags": {
|
|
1748
|
-
"debug": {
|
|
1749
|
-
"char": "d",
|
|
1750
|
-
"description": "Show extra debugging output.",
|
|
1751
|
-
"name": "debug",
|
|
1752
|
-
"allowNo": false,
|
|
1753
|
-
"type": "boolean"
|
|
1754
|
-
},
|
|
1755
|
-
"invokedFromAnotherCommand": {
|
|
1756
|
-
"hidden": true,
|
|
1757
|
-
"name": "invokedFromAnotherCommand",
|
|
1758
|
-
"allowNo": false,
|
|
1759
|
-
"type": "boolean"
|
|
1760
|
-
}
|
|
1761
|
-
},
|
|
1762
|
-
"hasDynamicHelp": false,
|
|
1763
|
-
"hiddenAliases": [],
|
|
1764
|
-
"id": "delete:version",
|
|
1765
|
-
"pluginAlias": "zapier-platform-cli",
|
|
1766
|
-
"pluginName": "zapier-platform-cli",
|
|
1767
|
-
"pluginType": "core",
|
|
1768
|
-
"strict": true,
|
|
1769
|
-
"enableJsonFlag": false,
|
|
1770
|
-
"skipValidInstallCheck": true,
|
|
1771
|
-
"isESM": false,
|
|
1772
|
-
"relativePath": [
|
|
1773
|
-
"src",
|
|
1774
|
-
"oclif",
|
|
1775
|
-
"commands",
|
|
1776
|
-
"delete",
|
|
1777
|
-
"version.js"
|
|
1778
|
-
]
|
|
1779
|
-
},
|
|
1780
1696
|
"canary:create": {
|
|
1781
1697
|
"aliases": [],
|
|
1782
1698
|
"args": {
|
|
@@ -1940,6 +1856,88 @@
|
|
|
1940
1856
|
"list.js"
|
|
1941
1857
|
]
|
|
1942
1858
|
},
|
|
1859
|
+
"delete:integration": {
|
|
1860
|
+
"aliases": [
|
|
1861
|
+
"delete:app"
|
|
1862
|
+
],
|
|
1863
|
+
"args": {},
|
|
1864
|
+
"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.",
|
|
1865
|
+
"flags": {
|
|
1866
|
+
"debug": {
|
|
1867
|
+
"char": "d",
|
|
1868
|
+
"description": "Show extra debugging output.",
|
|
1869
|
+
"name": "debug",
|
|
1870
|
+
"allowNo": false,
|
|
1871
|
+
"type": "boolean"
|
|
1872
|
+
},
|
|
1873
|
+
"invokedFromAnotherCommand": {
|
|
1874
|
+
"hidden": true,
|
|
1875
|
+
"name": "invokedFromAnotherCommand",
|
|
1876
|
+
"allowNo": false,
|
|
1877
|
+
"type": "boolean"
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
"hasDynamicHelp": false,
|
|
1881
|
+
"hiddenAliases": [],
|
|
1882
|
+
"id": "delete:integration",
|
|
1883
|
+
"pluginAlias": "zapier-platform-cli",
|
|
1884
|
+
"pluginName": "zapier-platform-cli",
|
|
1885
|
+
"pluginType": "core",
|
|
1886
|
+
"strict": true,
|
|
1887
|
+
"enableJsonFlag": false,
|
|
1888
|
+
"skipValidInstallCheck": true,
|
|
1889
|
+
"isESM": false,
|
|
1890
|
+
"relativePath": [
|
|
1891
|
+
"src",
|
|
1892
|
+
"oclif",
|
|
1893
|
+
"commands",
|
|
1894
|
+
"delete",
|
|
1895
|
+
"integration.js"
|
|
1896
|
+
]
|
|
1897
|
+
},
|
|
1898
|
+
"delete:version": {
|
|
1899
|
+
"aliases": [],
|
|
1900
|
+
"args": {
|
|
1901
|
+
"version": {
|
|
1902
|
+
"description": "Specify the version to delete. It must have no users or Zaps.",
|
|
1903
|
+
"name": "version",
|
|
1904
|
+
"required": true
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
"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.",
|
|
1908
|
+
"flags": {
|
|
1909
|
+
"debug": {
|
|
1910
|
+
"char": "d",
|
|
1911
|
+
"description": "Show extra debugging output.",
|
|
1912
|
+
"name": "debug",
|
|
1913
|
+
"allowNo": false,
|
|
1914
|
+
"type": "boolean"
|
|
1915
|
+
},
|
|
1916
|
+
"invokedFromAnotherCommand": {
|
|
1917
|
+
"hidden": true,
|
|
1918
|
+
"name": "invokedFromAnotherCommand",
|
|
1919
|
+
"allowNo": false,
|
|
1920
|
+
"type": "boolean"
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
"hasDynamicHelp": false,
|
|
1924
|
+
"hiddenAliases": [],
|
|
1925
|
+
"id": "delete:version",
|
|
1926
|
+
"pluginAlias": "zapier-platform-cli",
|
|
1927
|
+
"pluginName": "zapier-platform-cli",
|
|
1928
|
+
"pluginType": "core",
|
|
1929
|
+
"strict": true,
|
|
1930
|
+
"enableJsonFlag": false,
|
|
1931
|
+
"skipValidInstallCheck": true,
|
|
1932
|
+
"isESM": false,
|
|
1933
|
+
"relativePath": [
|
|
1934
|
+
"src",
|
|
1935
|
+
"oclif",
|
|
1936
|
+
"commands",
|
|
1937
|
+
"delete",
|
|
1938
|
+
"version.js"
|
|
1939
|
+
]
|
|
1940
|
+
},
|
|
1943
1941
|
"env:get": {
|
|
1944
1942
|
"aliases": [],
|
|
1945
1943
|
"args": {
|
|
@@ -2495,5 +2493,5 @@
|
|
|
2495
2493
|
]
|
|
2496
2494
|
}
|
|
2497
2495
|
},
|
|
2498
|
-
"version": "17.
|
|
2496
|
+
"version": "17.3.1"
|
|
2499
2497
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zapier-platform-cli",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.3.1",
|
|
4
4
|
"description": "The CLI for managing integrations in Zapier Developer Platform.",
|
|
5
5
|
"repository": "zapier/zapier-platform",
|
|
6
6
|
"homepage": "https://platform.zapier.com/",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"/oclif.manifest.json"
|
|
20
20
|
],
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=18.
|
|
22
|
+
"node": ">=18.20"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"docs": "ZAPIER_BASE_ENDPOINT='' node scripts/docs.js",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"@oclif/plugin-not-found": "3.2.51",
|
|
47
47
|
"@oclif/plugin-version": "2.2.28",
|
|
48
48
|
"adm-zip": "0.5.16",
|
|
49
|
+
"decompress": "4.2.1",
|
|
49
50
|
"archiver": "7.0.1",
|
|
50
51
|
"chrono-node": "2.8.0",
|
|
51
52
|
"cli-table3": "0.6.5",
|
|
@@ -59,12 +60,10 @@
|
|
|
59
60
|
"ignore": "5.2.4",
|
|
60
61
|
"inquirer": "8.2.5",
|
|
61
62
|
"jscodeshift": "^17.3.0",
|
|
62
|
-
"klaw": "4.1.0",
|
|
63
63
|
"lodash": "4.17.21",
|
|
64
64
|
"luxon": "3.6.1",
|
|
65
65
|
"marked": "14.1.4",
|
|
66
66
|
"marked-terminal": "7.2.1",
|
|
67
|
-
"minimatch": "9.0.3",
|
|
68
67
|
"node-fetch": "2.7.0",
|
|
69
68
|
"open": "10.1.2",
|
|
70
69
|
"ora": "5.4.0",
|
|
@@ -85,7 +84,6 @@
|
|
|
85
84
|
"@types/jscodeshift": "^0.12.0",
|
|
86
85
|
"@types/mocha": "^10.0.9",
|
|
87
86
|
"chai": "^4.3.7",
|
|
88
|
-
"decompress": "4.2.1",
|
|
89
87
|
"mock-fs": "^5.5.0",
|
|
90
88
|
"nock": "^14.0.4",
|
|
91
89
|
"oclif": "^4.17.46",
|
package/src/constants.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const os = require('os');
|
|
2
|
-
const path = require('path');
|
|
1
|
+
const os = require('node:os');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
|
|
3
4
|
const versionStore = require('./version-store');
|
|
4
5
|
|
|
5
6
|
const BASE_ENDPOINT = process.env.ZAPIER_BASE_ENDPOINT || 'https://zapier.com';
|
|
@@ -17,13 +18,6 @@ const BUILD_DIR = 'build';
|
|
|
17
18
|
const DEFINITION_PATH = `${BUILD_DIR}/definition.json`;
|
|
18
19
|
const BUILD_PATH = `${BUILD_DIR}/build.zip`;
|
|
19
20
|
const SOURCE_PATH = `${BUILD_DIR}/source.zip`;
|
|
20
|
-
const BLOCKLISTED_PATHS = [
|
|
21
|
-
// Will be excluded from build.zip and source.zip
|
|
22
|
-
'.git',
|
|
23
|
-
'.env',
|
|
24
|
-
'.environment',
|
|
25
|
-
'build',
|
|
26
|
-
];
|
|
27
21
|
const NODE_VERSION = versionStore[versionStore.length - 1].nodeVersion;
|
|
28
22
|
const LAMBDA_VERSION = `v${NODE_VERSION}`;
|
|
29
23
|
const NODE_VERSION_CLI_REQUIRES = '>=18'; // should be the oldest non-ETL version
|
|
@@ -91,7 +85,6 @@ module.exports = {
|
|
|
91
85
|
AUTH_LOCATION,
|
|
92
86
|
AUTH_LOCATION_RAW,
|
|
93
87
|
BASE_ENDPOINT,
|
|
94
|
-
BLOCKLISTED_PATHS,
|
|
95
88
|
BUILD_DIR,
|
|
96
89
|
BUILD_PATH,
|
|
97
90
|
CHECK_REF_DOC_LINK,
|
|
@@ -8,33 +8,41 @@ const {
|
|
|
8
8
|
} = require('../../constants');
|
|
9
9
|
|
|
10
10
|
const { buildAndOrUpload } = require('../../utils/build');
|
|
11
|
+
const colors = require('colors/safe');
|
|
11
12
|
|
|
12
13
|
class BuildCommand extends BaseCommand {
|
|
13
14
|
async perform() {
|
|
15
|
+
const skipNpmInstall = this.flags['skip-npm-install'];
|
|
14
16
|
await buildAndOrUpload(
|
|
15
17
|
{ build: true },
|
|
16
18
|
{
|
|
17
|
-
skipNpmInstall
|
|
19
|
+
skipNpmInstall,
|
|
18
20
|
disableDependencyDetection: this.flags['disable-dependency-detection'],
|
|
19
21
|
skipValidation: this.flags['skip-validation'],
|
|
20
22
|
},
|
|
21
23
|
);
|
|
22
24
|
|
|
23
25
|
this.log(
|
|
24
|
-
`\nBuild complete! Created ${BUILD_PATH} and ${SOURCE_PATH}
|
|
26
|
+
`\nBuild complete! Created ${BUILD_PATH} and ${SOURCE_PATH}.\n` +
|
|
27
|
+
`Now you can upload them with the ${colors.bold.underline('zapier upload')} command.`,
|
|
25
28
|
);
|
|
29
|
+
|
|
30
|
+
if (!skipNpmInstall) {
|
|
31
|
+
this.log(
|
|
32
|
+
`\nTip: Try ${colors.bold.underline('zapier build --skip-npm-install')} for faster builds.`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
26
35
|
}
|
|
27
36
|
}
|
|
28
37
|
|
|
29
38
|
BuildCommand.flags = buildFlags({
|
|
30
39
|
commandFlags: {
|
|
31
40
|
'disable-dependency-detection': Flags.boolean({
|
|
32
|
-
description: `Disable "smart" file inclusion. By default, Zapier only includes files that are required by \`index.js
|
|
41
|
+
description: `Disable "smart" file inclusion. By default, Zapier only includes files that are required by your entry point (\`index.js\` by default). If you (or your dependencies) require files dynamically (such as with \`require(someVar)\`), then you may see "Cannot find module" errors. Disabling this may make your \`build.zip\` too large. If that's the case, try using the \`includeInBuild\` option in your \`${CURRENT_APP_FILE}\`. See the docs about \`includeInBuild\` for more info.`,
|
|
33
42
|
}),
|
|
34
43
|
'skip-npm-install': Flags.boolean({
|
|
35
44
|
description:
|
|
36
|
-
'Skips installing a fresh copy of npm dependencies
|
|
37
|
-
hidden: true,
|
|
45
|
+
'Skips installing a fresh copy of npm dependencies for shorter build time. Helpful for using yarn, pnpm, or local copies of dependencies.',
|
|
38
46
|
}),
|
|
39
47
|
'skip-validation': Flags.boolean({
|
|
40
48
|
description:
|
|
@@ -63,9 +63,9 @@ class DeprecateCommand extends BaseCommand {
|
|
|
63
63
|
if (
|
|
64
64
|
!this.flags.force &&
|
|
65
65
|
!(await this.confirm(
|
|
66
|
-
'Are you sure you want to deprecate this version?
|
|
66
|
+
'Are you sure you want to deprecate this version? Only do so if it would start to fail otherwise. We will notify users that their Zaps or other automations will stop working two weeks before the specified date.' +
|
|
67
67
|
(hasActiveUsers
|
|
68
|
-
? `\n\nThis version has ${versionInfo.user_count} active user(s). Strongly consider migrating users to another version before
|
|
68
|
+
? `\n\nThis version has ${versionInfo.user_count} active user(s) via Zaps. Strongly consider migrating users to another version at least two weeks before the deprecation date!`
|
|
69
69
|
: ''),
|
|
70
70
|
))
|
|
71
71
|
) {
|
|
@@ -129,7 +129,7 @@ Use this when an integration version will not be supported or start breaking at
|
|
|
129
129
|
When deprecating a version, you must provide a reason for the deprecation. You can either specify the reason using the --reason flag or you will be prompted to select from the following options:
|
|
130
130
|
${DEPRECATION_REASONS.map((r) => `- ${r.name}`).join('\n')}
|
|
131
131
|
|
|
132
|
-
Zapier will
|
|
132
|
+
The deprecation date must be at least 3 weeks days in the future. Zapier will send emails warning users of the deprecation exactly 14 days before the configured deprecation date. This gives you 1 week to migrate users to a newer version, if possible, before we notify them that they need to do so themselves.
|
|
133
133
|
|
|
134
134
|
There are other side effects: they'll start seeing it as "Deprecated" in the UI, and once the deprecation date arrives, if the Zaps weren't updated, they'll be paused and the users will be emailed again explaining what happened.
|
|
135
135
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const ZapierBaseCommand = require('../ZapierBaseCommand');
|
|
2
2
|
const { BUILD_PATH, SOURCE_PATH } = require('../../constants');
|
|
3
3
|
const { Flags } = require('@oclif/core');
|
|
4
|
+
const colors = require('colors/safe');
|
|
4
5
|
|
|
5
6
|
const BuildCommand = require('./build');
|
|
6
7
|
|
|
@@ -8,10 +9,11 @@ const { buildAndOrUpload } = require('../../utils/build');
|
|
|
8
9
|
|
|
9
10
|
class PushCommand extends ZapierBaseCommand {
|
|
10
11
|
async perform() {
|
|
12
|
+
const skipNpmInstall = this.flags['skip-npm-install'];
|
|
11
13
|
await buildAndOrUpload(
|
|
12
14
|
{ build: true, upload: true },
|
|
13
15
|
{
|
|
14
|
-
skipNpmInstall
|
|
16
|
+
skipNpmInstall,
|
|
15
17
|
disableDependencyDetection: this.flags['disable-dependency-detection'],
|
|
16
18
|
skipValidation: this.flags['skip-validation'],
|
|
17
19
|
overwritePartnerChanges: this.flags['overwrite-partner-changes'],
|
|
@@ -20,6 +22,12 @@ class PushCommand extends ZapierBaseCommand {
|
|
|
20
22
|
this.log(
|
|
21
23
|
`\nPush complete! Built ${BUILD_PATH} and ${SOURCE_PATH} and uploaded them to Zapier.`,
|
|
22
24
|
);
|
|
25
|
+
|
|
26
|
+
if (!skipNpmInstall) {
|
|
27
|
+
this.log(
|
|
28
|
+
`\nTip: Try ${colors.bold.underline('zapier push --skip-npm-install')} for faster builds.`,
|
|
29
|
+
);
|
|
30
|
+
}
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
|