zapier-platform-cli 12.2.1 → 13.0.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/README-source.md +39 -39
- package/README.md +61 -65
- package/oclif.manifest.json +1 -1
- package/package.json +25 -25
- package/scaffold/create.template.js +2 -2
- package/scaffold/resource.template.js +2 -2
- package/scaffold/search.template.js +2 -2
- package/scaffold/trigger.template.js +2 -2
- package/src/constants.js +1 -1
- package/src/generators/templates/README.template.md +1 -1
- package/src/generators/templates/callback/README.md +1 -1
- package/src/generators/templates/files/README.md +1 -1
- package/src/oclif/commands/convert.js +27 -64
- package/src/oclif/commands/promote.js +1 -1
- package/src/utils/build.js +1 -0
- package/src/version-store.js +1 -1
package/README-source.md
CHANGED
|
@@ -14,17 +14,17 @@ Zapier is a platform for creating integrations and workflows. This CLI is your g
|
|
|
14
14
|
|
|
15
15
|
You may find docs duplicate or outdated across the Zapier site. The most up-to-date contents are always available on GitHub:
|
|
16
16
|
|
|
17
|
-
- [Latest CLI Docs](https://github.com/zapier/zapier-platform/blob/
|
|
18
|
-
- [Latest CLI Reference](https://github.com/zapier/zapier-platform/blob/
|
|
19
|
-
- [Latest Schema Docs](https://github.com/zapier/zapier-platform/blob/
|
|
17
|
+
- [Latest CLI Docs](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md)
|
|
18
|
+
- [Latest CLI Reference](https://github.com/zapier/zapier-platform/blob/main/packages/cli/docs/cli.md)
|
|
19
|
+
- [Latest Schema Docs](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md)
|
|
20
20
|
|
|
21
|
-
Our code is updated frequently. To see a full list of changes, look no further than [the CHANGELOG](https://github.com/zapier/zapier-platform/blob/
|
|
21
|
+
Our code is updated frequently. To see a full list of changes, look no further than [the CHANGELOG](https://github.com/zapier/zapier-platform/blob/main/CHANGELOG.md).
|
|
22
22
|
|
|
23
23
|
This doc describes the latest CLI version (**PACKAGE_VERSION**), as of this writing. If you're using an older version of the CLI, you may want to check out these historical releases:
|
|
24
24
|
|
|
25
|
-
- CLI Docs: [
|
|
26
|
-
- CLI Reference: [
|
|
27
|
-
- Schema Docs: [
|
|
25
|
+
- CLI Docs: [11.3.3](https://github.com/zapier/zapier-platform/blob/zapier-platform-cli@11.3.3/packages/cli/README.md), [10.2.0](https://github.com/zapier/zapier-platform/blob/zapier-platform-cli@10.2.0/packages/cli/README.md), [9.7.3](https://github.com/zapier/zapier-platform/blob/zapier-platform-cli@9.7.3/packages/cli/README.md)
|
|
26
|
+
- CLI Reference: [11.3.3](https://github.com/zapier/zapier-platform/blob/zapier-platform-cli@11.3.3/packages/cli/docs/cli.md), [10.2.0](https://github.com/zapier/zapier-platform/blob/zapier-platform-cli@10.2.0/packages/cli/docs/cli.md), [9.7.3](https://github.com/zapier/zapier-platform/blob/zapier-platform-cli@9.7.3/packages/cli/docs/cli.md)
|
|
27
|
+
- Schema Docs: [11.3.3](https://github.com/zapier/zapier-platform/blob/zapier-platform-schema@11.3.3/packages/schema/docs/build/schema.md), [10.2.0](https://github.com/zapier/zapier-platform/blob/zapier-platform-schema@10.2.0/packages/schema/docs/build/schema.md), [9.7.3](https://github.com/zapier/zapier-platform/blob/zapier-platform-schema@9.7.3/packages/schema/docs/build/schema.md)
|
|
28
28
|
|
|
29
29
|
## Table of Contents
|
|
30
30
|
|
|
@@ -41,7 +41,7 @@ This doc describes the latest CLI version (**PACKAGE_VERSION**), as of this writ
|
|
|
41
41
|
> Note: this document uses "app" while modern Zapier nomenclature refers instead to "integrations". In both cases, the phrase refers to your code that connects your API with Zapier.
|
|
42
42
|
|
|
43
43
|
A CLI App is an implementation of your app's API. You build a Node.js application
|
|
44
|
-
that exports a single object ([JSON Schema](https://github.com/zapier/zapier-platform/blob/
|
|
44
|
+
that exports a single object ([JSON Schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#appschema)) and upload it to Zapier.
|
|
45
45
|
Zapier introspects that definition to find out what your app is capable of and
|
|
46
46
|
what options to present end users in the Zap Editor.
|
|
47
47
|
|
|
@@ -76,7 +76,7 @@ You can develop using any version of Node you'd like, but your eventual code mus
|
|
|
76
76
|
|
|
77
77
|
To ensure stability for our users, we strongly encourage you run tests on `LAMBDA_VERSION` sometime before your code reaches users. This can be done multiple ways.
|
|
78
78
|
|
|
79
|
-
Firstly, by using a CI tool (like [Travis CI](https://travis-ci.org/) or [Circle CI](https://circleci.com/), which are free for open source projects). We provide a sample [.travis.yml](https://github.com/zapier/zapier-platform/blob/
|
|
79
|
+
Firstly, by using a CI tool (like [Travis CI](https://travis-ci.org/) or [Circle CI](https://circleci.com/), which are free for open source projects). We provide a sample [.travis.yml](https://github.com/zapier/zapier-platform/blob/main/example-apps/trigger/.travis.yml) file in our template apps to get you started.
|
|
80
80
|
|
|
81
81
|
Alternatively, you can change your local node version with tools such as [nvm](https://github.com/nvm-sh/nvm#installation-and-update). Then you can either swap to that version with `nvm use LAMBDA_VERSION`, or do `nvm exec LAMBDA_VERSION zapier test` so you can run tests without having to switch versions while developing.
|
|
82
82
|
|
|
@@ -107,7 +107,7 @@ cd example-app
|
|
|
107
107
|
npm install
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
> Note: When you run `zapier init`, you'll be presented with a list of templates to start with. Pick the one that matches a feature you'll need (such as "dynamic-dropdown" for an integration with [dynamic dropdown fields](#dynamic-dropdowns)), or select "minimal" for an integration with only the essentials. [View more example apps here](https://github.com/zapier/zapier-platform/tree/
|
|
110
|
+
> Note: When you run `zapier init`, you'll be presented with a list of templates to start with. Pick the one that matches a feature you'll need (such as "dynamic-dropdown" for an integration with [dynamic dropdown fields](#dynamic-dropdowns)), or select "minimal" for an integration with only the essentials. [View more example apps here](https://github.com/zapier/zapier-platform/tree/main/example-apps).
|
|
111
111
|
|
|
112
112
|
You should now have a working local app. You can run several local commands to try it out.
|
|
113
113
|
|
|
@@ -310,7 +310,7 @@ When a user authenticates to your application through Zapier, a "connection" is
|
|
|
310
310
|
|
|
311
311
|
Useful if your app requires two pieces of information to authenticate: `username` and `password`, which only the end user can provide. By default, Zapier will do the standard Basic authentication base64 header encoding for you (via an automatically registered middleware).
|
|
312
312
|
|
|
313
|
-
> To create a new integration with basic authentication, run `zapier init [your app name] --template basic-auth`. You can also review an example of that code [here](https://github.com/zapier/zapier-platform/tree/
|
|
313
|
+
> To create a new integration with basic authentication, run `zapier init [your app name] --template basic-auth`. You can also review an example of that code [here](https://github.com/zapier/zapier-platform/tree/main/example-apps/basic-auth).
|
|
314
314
|
|
|
315
315
|
If your app uses Basic auth with an encoded API key rather than a username and password, like `Authorization: Basic APIKEYHERE:x`, consider the [Custom](#custom) authentication method instead.
|
|
316
316
|
|
|
@@ -324,7 +324,7 @@ If your app uses Basic auth with an encoded API key rather than a username and p
|
|
|
324
324
|
|
|
325
325
|
The setup and user experience of Digest Auth is identical to Basic Auth. Users provide Zapier their username and password, and Zapier handles all the nonce and quality of protection details automatically.
|
|
326
326
|
|
|
327
|
-
> To create a new integration with digest authentication, run `zapier init [your app name] --template digest-auth`. You can also review an example of that code [here](https://github.com/zapier/zapier-platform/tree/
|
|
327
|
+
> To create a new integration with digest authentication, run `zapier init [your app name] --template digest-auth`. You can also review an example of that code [here](https://github.com/zapier/zapier-platform/tree/main/example-apps/digest-auth).
|
|
328
328
|
|
|
329
329
|
> Limitation: Currently, MD5-sess and SHA are not implemented. Only the MD5 algorithm is supported. In addition, server nonces are not reused. That means for every `z.request` call, Zapier will send an additional request beforehand to get the server nonce.
|
|
330
330
|
|
|
@@ -336,7 +336,7 @@ The setup and user experience of Digest Auth is identical to Basic Auth. Users p
|
|
|
336
336
|
|
|
337
337
|
Custom auth is most commonly used for apps that authenticate with API keys, although it also provides flexibility for any unusual authentication setup. You'll likely provide some custom `beforeRequest` middleware or a `requestTemplate` (see [Making HTTP Requests](#making-http-requests)) to pass in data returned from the authentication process, most commonly by adding/computing needed headers.
|
|
338
338
|
|
|
339
|
-
> To create a new integration with custom authentication, run `zapier init [your app name] --template custom-auth`. You can also review an example of that code [here](https://github.com/zapier/zapier-platform/tree/
|
|
339
|
+
> To create a new integration with custom authentication, run `zapier init [your app name] --template custom-auth`. You can also review an example of that code [here](https://github.com/zapier/zapier-platform/tree/main/example-apps/custom-auth).
|
|
340
340
|
|
|
341
341
|
```js
|
|
342
342
|
[insert-file:./snippets/custom-auth.js]
|
|
@@ -346,7 +346,7 @@ Custom auth is most commonly used for apps that authenticate with API keys, alth
|
|
|
346
346
|
|
|
347
347
|
Session auth gives you the ability to exchange some user-provided data for some authentication data; for example, username and password for a session key. It can be used to implement almost any authentication method that uses that pattern - for example, alternative OAuth flows.
|
|
348
348
|
|
|
349
|
-
> To create a new integration with session authentication, run `zapier init [your app name] --template session-auth`. You can also review an example of that code [here](https://github.com/zapier/zapier-platform/tree/
|
|
349
|
+
> To create a new integration with session authentication, run `zapier init [your app name] --template session-auth`. You can also review an example of that code [here](https://github.com/zapier/zapier-platform/tree/main/example-apps/session-auth).
|
|
350
350
|
|
|
351
351
|
```js
|
|
352
352
|
[insert-file:./snippets/session-auth.js]
|
|
@@ -360,7 +360,7 @@ For Session auth, the function that fetches the additional authentication data n
|
|
|
360
360
|
|
|
361
361
|
Zapier's OAuth1 implementation matches [Twitter](https://developer.twitter.com/en/docs/tutorials/authenticating-with-twitter-api-for-enterprise/authentication-method-overview#oauth1.0a) and [Trello](https://developer.atlassian.com/cloud/trello/guides/rest-api/authorization/#using-basic-oauth) implementations of the 3-legged OAuth flow.
|
|
362
362
|
|
|
363
|
-
> To create a new integration with OAuth1, run `zapier init [your app name] --template oauth1-trello`. You can also check out [oauth1-trello](https://github.com/zapier/zapier-platform/tree/
|
|
363
|
+
> To create a new integration with OAuth1, run `zapier init [your app name] --template oauth1-trello`. You can also check out [oauth1-trello](https://github.com/zapier/zapier-platform/tree/main/example-apps/oauth1-trello), [oauth1-tumblr](https://github.com/zapier/zapier-platform/tree/main/example-apps/oauth1-tumblr), and [oauth1-twitter](https://github.com/zapier/zapier-platform/tree/main/example-apps/oauth1-twitter) for working example apps with OAuth1.
|
|
364
364
|
|
|
365
365
|
The flow works like this:
|
|
366
366
|
|
|
@@ -401,7 +401,7 @@ Also, `authentication.oauth1Config.getAccessToken` has access to the additional
|
|
|
401
401
|
|
|
402
402
|
Zapier's OAuth2 implementation is based on the `authorization_code` flow, similar to [GitHub](https://developer.github.com/v3/oauth/) and [Facebook](https://developers.facebook.com/docs/authentication/server-side/).
|
|
403
403
|
|
|
404
|
-
> To create a new integration with OAuth2, run `zapier init [your app name] --template oauth2`. You can also check out [our working example app](https://github.com/zapier/zapier-platform/tree/
|
|
404
|
+
> To create a new integration with OAuth2, run `zapier init [your app name] --template oauth2`. You can also check out [our working example app](https://github.com/zapier/zapier-platform/tree/main/example-apps/oauth2).
|
|
405
405
|
|
|
406
406
|
If your app's OAuth2 flow uses a different grant type, such as `client_credentials`, try using [Session auth](#session) instead.
|
|
407
407
|
|
|
@@ -480,10 +480,10 @@ This will generate the resource file and add the necessary statements to the `in
|
|
|
480
480
|
A resource has a few basic properties. The first is the `key`, which allows Zapier to identify the resource on our backend.
|
|
481
481
|
The second is the `noun`, the user-friendly name of the resource that is presented to users throughout the Zapier UI.
|
|
482
482
|
|
|
483
|
-
> Check out [this working example app](https://github.com/zapier/zapier-platform/tree/
|
|
483
|
+
> Check out [this working example app](https://github.com/zapier/zapier-platform/tree/main/example-apps/resource) to see resources in action.
|
|
484
484
|
|
|
485
485
|
After those, there is a set of optional properties that tell Zapier what methods can be performed on the resource.
|
|
486
|
-
The complete list of available methods can be found in the [Resource Schema Docs](https://github.com/zapier/zapier-platform/blob/
|
|
486
|
+
The complete list of available methods can be found in the [Resource Schema Docs](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#resourceschema).
|
|
487
487
|
For now, let's focus on two:
|
|
488
488
|
|
|
489
489
|
* `list` - Tells Zapier how to fetch a set of this resource. This becomes a Trigger in the Zapier Editor.
|
|
@@ -495,7 +495,7 @@ Here is a complete example of what the list method might look like
|
|
|
495
495
|
[insert-file:./snippets/recipe-list.js]
|
|
496
496
|
```
|
|
497
497
|
|
|
498
|
-
The method is made up of two properties, a `display` and an `operation`. The `display` property ([schema](https://github.com/zapier/zapier-platform/blob/
|
|
498
|
+
The method is made up of two properties, a `display` and an `operation`. The `display` property ([schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#basicdisplayschema)) holds the info needed to present the method as an available Trigger in the Zapier Editor. The `operation` ([schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#resourceschema)) provides the implementation to make the API call.
|
|
499
499
|
|
|
500
500
|
Adding a create method looks very similar.
|
|
501
501
|
|
|
@@ -521,10 +521,10 @@ The definition for each of these follows the same structure. Here is an example
|
|
|
521
521
|
[insert-file:./snippets/trigger.js]
|
|
522
522
|
```
|
|
523
523
|
|
|
524
|
-
You can find more details on the definition for each by looking at the [Trigger Schema](https://github.com/zapier/zapier-platform/blob/
|
|
525
|
-
[Search Schema](https://github.com/zapier/zapier-platform/blob/
|
|
524
|
+
You can find more details on the definition for each by looking at the [Trigger Schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#triggerschema),
|
|
525
|
+
[Search Schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#searchschema), and [Create Schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#createschema).
|
|
526
526
|
|
|
527
|
-
> To create a new integration with a premade trigger, search, or create, run `zapier init [your app name]` and select from the list that appears. You can also check out our working example apps [here](https://github.com/zapier/zapier-platform/tree/
|
|
527
|
+
> To create a new integration with a premade trigger, search, or create, run `zapier init [your app name]` and select from the list that appears. You can also check out our working example apps [here](https://github.com/zapier/zapier-platform/tree/main/example-apps).
|
|
528
528
|
|
|
529
529
|
> To add a trigger, search, or create to an existing integration, run `zapier scaffold [trigger|search|create] [noun]` to create the necessary files to your project. For example, `zapier scaffold trigger post` will create a new trigger called "New Post".
|
|
530
530
|
### Return Types
|
|
@@ -578,7 +578,7 @@ Notably, fields come in different types, which may look and act differently in t
|
|
|
578
578
|
| `password` | Displays entered characters as hidden, accepts text input. Does not accept input from previous steps. |
|
|
579
579
|
| `copy` | Does not allow users enter data. Shows the value of the Markdown-formatted Help Text for the field as a rich text note in the Zap editor. Good for important notices to users. |
|
|
580
580
|
|
|
581
|
-
You can find more details on the different field schema options at [our Field Schema](https://github.com/zapier/zapier-platform/blob/
|
|
581
|
+
You can find more details on the different field schema options at [our Field Schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#fieldschema).
|
|
582
582
|
|
|
583
583
|
### Custom/Dynamic Fields
|
|
584
584
|
|
|
@@ -697,7 +697,7 @@ You can see examples of computed fields in the [OAuth2](#oauth2) or [Session Aut
|
|
|
697
697
|
|
|
698
698
|
### Nested & Children (Line Item) Fields
|
|
699
699
|
|
|
700
|
-
When your action needs to accept an array of items, you can include an input field with the `children` attribute. The `children` attribute accepts a list of [fields](https://github.com/zapier/zapier-platform/blob/
|
|
700
|
+
When your action needs to accept an array of items, you can include an input field with the `children` attribute. The `children` attribute accepts a list of [fields](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#fieldschema) that can be input for each item in this array.
|
|
701
701
|
|
|
702
702
|
```js
|
|
703
703
|
[insert-file:./snippets/input-fields-children.js]
|
|
@@ -712,7 +712,7 @@ Output Fields are optional, but can be used to:
|
|
|
712
712
|
- Define friendly labels for the returned fields. By default, we will *humanize* for example `my_key` as *My Key*.
|
|
713
713
|
- Make sure that custom fields that may not be found in every live sample and - since they're custom to the connected account - cannot be defined in the static sample, can still be mapped.
|
|
714
714
|
|
|
715
|
-
The [schema](https://github.com/zapier/zapier-platform/blob/
|
|
715
|
+
The [schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#fieldschema) for `outputFields` is shared with `inputFields` but only the `key` and `required` properties are relevant.
|
|
716
716
|
|
|
717
717
|
Custom/Dynamic Output Fields are defined in the same way as [Custom/Dynamic Input Fields](#customdynamic-fields).
|
|
718
718
|
|
|
@@ -985,7 +985,7 @@ module.exports = {
|
|
|
985
985
|
};
|
|
986
986
|
```
|
|
987
987
|
|
|
988
|
-
Read more in the [REST hook example](https://github.com/zapier/zapier-platform/blob/
|
|
988
|
+
Read more in the [REST hook example](https://github.com/zapier/zapier-platform/blob/main/example-apps/rest-hooks/triggers/recipe.js).
|
|
989
989
|
|
|
990
990
|
### `bundle.subscribeData`
|
|
991
991
|
|
|
@@ -993,7 +993,7 @@ Read more in the [REST hook example](https://github.com/zapier/zapier-platform/b
|
|
|
993
993
|
|
|
994
994
|
This is an object that contains the data you returned from the `performSubscribe` function. It should contain whatever information you need send a `DELETE` request to your server to stop sending webhooks to Zapier.
|
|
995
995
|
|
|
996
|
-
Read more in the [REST hook example](https://github.com/zapier/zapier-platform/blob/
|
|
996
|
+
Read more in the [REST hook example](https://github.com/zapier/zapier-platform/blob/main/example-apps/rest-hooks/triggers/recipe.js).
|
|
997
997
|
|
|
998
998
|
## Environment
|
|
999
999
|
|
|
@@ -1156,7 +1156,7 @@ Here is the full request lifecycle when you call `z.request({...})`:
|
|
|
1156
1156
|
|
|
1157
1157
|
The resulting response object is returned from `z.request()`.
|
|
1158
1158
|
|
|
1159
|
-
> Example App: check out https://github.com/zapier/zapier-platform/tree/
|
|
1159
|
+
> Example App: check out https://github.com/zapier/zapier-platform/tree/main/example-apps/middleware for a working example app using HTTP middleware.
|
|
1160
1160
|
|
|
1161
1161
|
#### Error Response Handling
|
|
1162
1162
|
|
|
@@ -1391,7 +1391,7 @@ See a full example with dehydration/hydration wired in correctly:
|
|
|
1391
1391
|
[insert-file:./snippets/stash-file.js]
|
|
1392
1392
|
```
|
|
1393
1393
|
|
|
1394
|
-
> To create a new integration for handling files, run `zapier init [your app name] --template files`. You can also check out our working example app [here](https://github.com/zapier/zapier-platform/tree/
|
|
1394
|
+
> To create a new integration for handling files, run `zapier init [your app name] --template files`. You can also check out our working example app [here](https://github.com/zapier/zapier-platform/tree/main/example-apps/files).
|
|
1395
1395
|
|
|
1396
1396
|
|
|
1397
1397
|
## Logging
|
|
@@ -1828,17 +1828,17 @@ zapier push
|
|
|
1828
1828
|
|
|
1829
1829
|
There are a lot of details left out - check out the full example app for a working setup.
|
|
1830
1830
|
|
|
1831
|
-
> To create a new integration with Babel, run `zapier init [your app name] --template babel`. You can also check out our working example app [here](https://github.com/zapier/zapier-platform/tree/
|
|
1831
|
+
> To create a new integration with Babel, run `zapier init [your app name] --template babel`. You can also check out our working example app [here](https://github.com/zapier/zapier-platform/tree/main/example-apps/babel).
|
|
1832
1832
|
|
|
1833
1833
|
## FAQs
|
|
1834
1834
|
|
|
1835
1835
|
### Why doesn't Zapier support newer versions of Node.js?
|
|
1836
1836
|
|
|
1837
|
-
We run your code on AWS Lambda, which only supports a few [versions](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) of Node
|
|
1837
|
+
We run your code on AWS Lambda, which only supports a few [versions](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) of Node. Sometimes that doesn't include the latest version. Additionally, with thousands of apps running on the Zapier platform, we have to be sure upgrading to the latest Node version will not have a negative impact.
|
|
1838
1838
|
|
|
1839
1839
|
### How do I manually set the Node.js version to run my app with?
|
|
1840
1840
|
|
|
1841
|
-
Update your `zapier-platform-core` dependency in `package.json`. Each major version ties to a specific version of Node.js. You can find the mapping [here](https://github.com/zapier/zapier-platform/blob/
|
|
1841
|
+
Update your `zapier-platform-core` dependency in `package.json`. Each major version ties to a specific version of Node.js. You can find the mapping [here](https://github.com/zapier/zapier-platform/blob/main/packages/cli/src/version-store.js). We only support the version(s) supported by [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html).
|
|
1842
1842
|
|
|
1843
1843
|
**IMPORTANT CAVEAT**: AWS periodically deprecates Node versions as they reach EOL. They announce this[on their blog](https://aws.amazon.com/blogs/developer/node-js-6-is-approaching-end-of-life-upgrade-your-aws-lambda-functions-to-the-node-js-10-lts/). Similar info and dates are available on [github](https://github.com/nodejs/Release). Well before this date, we'll have a version of `core` that targets the newer Node version.
|
|
1844
1844
|
|
|
@@ -1933,7 +1933,7 @@ If your API uses cursor-based paging instead of an offset, you can use `z.cursor
|
|
|
1933
1933
|
|
|
1934
1934
|
Cursors are stored per-zap and last about an hour. Per the above, make sure to only include the cursor if `bundle.meta.page !== 0`, so you don't accidentally reuse a cursor from a previous poll.
|
|
1935
1935
|
|
|
1936
|
-
Lastly, you need to set `canPaginate` to `true` in your polling definition (per the [schema](https://github.com/zapier/zapier-platform/blob/
|
|
1936
|
+
Lastly, you need to set `canPaginate` to `true` in your polling definition (per the [schema](https://github.com/zapier/zapier-platform/blob/main/packages/schema/docs/build/schema.md#basicpollingoperationschema)) for the `z.cursor` methods to work as expected.
|
|
1937
1937
|
|
|
1938
1938
|
<a id="dedup"></a>
|
|
1939
1939
|
### How does deduplication work?
|
|
@@ -1967,7 +1967,7 @@ InvalidParameterValueException An error occurred (InvalidParameterValueException
|
|
|
1967
1967
|
|
|
1968
1968
|
... then you need to update your `zapier-platform-core` dependency to a non-deprecated version that uses a newer version of Node.js. Complete the following instructions as soon as possible:
|
|
1969
1969
|
|
|
1970
|
-
1. Edit `package.json` to depend on a later major version of `zapier-platform-core`. There's a list of all breaking changes (marked with a :exclamation:) in the [changelog](https://github.com/zapier/zapier-platform/blob/
|
|
1970
|
+
1. Edit `package.json` to depend on a later major version of `zapier-platform-core`. There's a list of all breaking changes (marked with a :exclamation:) in the [changelog](https://github.com/zapier/zapier-platform/blob/main/CHANGELOG.md).
|
|
1971
1971
|
2. Increment the `version` property in `package.json`
|
|
1972
1972
|
3. Ensure you're using version `LAMBDA_VERSION` (or greater) of node locally (`node -v`). Use [nvm](https://github.com/nvm-sh/nvm) to use a different one if need be.
|
|
1973
1973
|
4. Run `rm -rf node_modules && npm i` to get a fresh copy of everything
|
|
@@ -2020,9 +2020,9 @@ Follow those instructions to enable completion for `zapier` commands and flags!
|
|
|
2020
2020
|
|
|
2021
2021
|
The Zapier Platform consists of 3 npm packages that are released simultaneously.
|
|
2022
2022
|
|
|
2023
|
-
- [`zapier-platform-cli`](https://github.com/zapier/zapier-platform/tree/
|
|
2024
|
-
- [`zapier-platform-core`](https://github.com/zapier/zapier-platform/tree/
|
|
2025
|
-
- [`zapier-platform-schema`](https://github.com/zapier/zapier-platform/tree/
|
|
2023
|
+
- [`zapier-platform-cli`](https://github.com/zapier/zapier-platform/tree/main/packages/cli) is the code that powers the `zapier` command. You use it most commonly with the `test`, `scaffold`, and `push` commands. It's installed with `npm install -g zapier-platform-cli` and does not correspond to a particular app.
|
|
2024
|
+
- [`zapier-platform-core`](https://github.com/zapier/zapier-platform/tree/main/packages/core) is what allows your app to interact with Zapier. It holds the `z` object and app tester code. Your app depends on a specific version of `zapier-platform-core` in the `package.json` file. It's installed via `npm install` along with the rest of your app's dependencies.
|
|
2025
|
+
- [`zapier-platform-schema`](https://github.com/zapier/zapier-platform/tree/main/packages/schema) enforces app structure behind the scenes. It's a dependency of `core`, so it will be installed automatically.
|
|
2026
2026
|
|
|
2027
2027
|
To learn more about the structure of the code (especially if you're interested in contributing), check out the `ARCHITECTURE.md` file(s).
|
|
2028
2028
|
|
|
@@ -2030,7 +2030,7 @@ To learn more about the structure of the code (especially if you're interested i
|
|
|
2030
2030
|
|
|
2031
2031
|
The Zapier platform and its tools are under active development. While you don't need to install every release, we release new versions because they are better than the last. We do our best to adhere to [Semantic Versioning](https://semver.org/) wherein we won't break your code unless there's a `major` release. Otherwise, we're just fixing bugs (`patch`) and adding features (`minor`).
|
|
2032
2032
|
|
|
2033
|
-
Broadly speaking, all releases will continue to work indefinitely. While you never *have* to upgrade your app's `zapier-platform-core` dependency, we recommend keeping an eye on the [changelog](https://github.com/zapier/zapier-platform/blob/
|
|
2033
|
+
Broadly speaking, all releases will continue to work indefinitely. While you never *have* to upgrade your app's `zapier-platform-core` dependency, we recommend keeping an eye on the [changelog](https://github.com/zapier/zapier-platform/blob/main/CHANGELOG.md) to see what new features and bug fixes are available.
|
|
2034
2034
|
|
|
2035
2035
|
For more info about which Node versions are supported, see [the faq](#how-do-i-manually-set-the-nodejs-version-to-run-my-app-with).
|
|
2036
2036
|
|
|
@@ -2051,4 +2051,4 @@ You can get help by either emailing `partners@zapier.com` or by [joining our dev
|
|
|
2051
2051
|
|
|
2052
2052
|
## Developing on the CLI
|
|
2053
2053
|
|
|
2054
|
-
See [CONTRIBUTING.md](https://github.com/zapier/zapier-platform/blob/
|
|
2054
|
+
See [CONTRIBUTING.md](https://github.com/zapier/zapier-platform/blob/main/CONTRIBUTING.md).
|