datocms-listen
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "datocms-listen", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/index.js", | ||
"files": [ | ||
@@ -10,2 +9,6 @@ "dist", | ||
], | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/esm/index.js", | ||
"typings": "dist/types/index.d.ts", | ||
"sideEffects": false, | ||
"repository": { | ||
@@ -34,3 +37,3 @@ "type": "git", | ||
"scripts": { | ||
"build": "rimraf dist && tsc", | ||
"build": "rimraf dist && tsc && tsc --project ./tsconfig.esnext.json", | ||
"watch": "rimraf dist && tsc --watch", | ||
@@ -61,6 +64,3 @@ "prepare": "npm run test && npm run build", | ||
], | ||
"testRegex": "/__tests__/.*\\.(ts|tsx|js)$", | ||
"setupFilesAfterEnv": [ | ||
"./src/setupTests.ts" | ||
] | ||
"testRegex": "/__tests__/.*\\.(ts|tsx|js)$" | ||
}, | ||
@@ -67,0 +67,0 @@ "dependencies": { |
<!--datocms-autoinclude-header start--> | ||
<a href="https://www.datocms.com/"><img src="https://www.datocms.com/images/full_logo.svg" height="60"></a> | ||
👉 [Visit the DatoCMS homepage](https://www.datocms.com) or see [What is DatoCMS?](#what-is-datocms) | ||
--- | ||
<!--datocms-autoinclude-header end--> | ||
@@ -37,3 +41,3 @@ | ||
token: "YOUR_TOKEN", | ||
preview: true, | ||
includeDrafts: true, | ||
onUpdate: (update) => { | ||
@@ -84,18 +88,22 @@ // response is the GraphQL response | ||
| prop | type | required | description | default | | ||
| ------------------ | ------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------------------------ | ------------------------------------ | | ||
| query | string \| [`TypedDocumentNode`](https://github.com/dotansimha/graphql-typed-document-node) | :white_check_mark: | The GraphQL query to subscribe | | | ||
| token | string | :white_check_mark: | DatoCMS API token to use | | | ||
| onUpdate | function | :white_check_mark: | Callback function to receive query update events | | | ||
| onChannelError | function | :x: | Callback function to receive channelError events | | | ||
| onStatusChange | function | :x: | Callback function to receive status change events | | | ||
| onError | function | :x: | Callback function to receive error events | | | ||
| onEvent | function | :x: | Callback function to receive other events | | | ||
| variables | Object | :x: | GraphQL variables for the query | | | ||
| preview | boolean | :x: | If true, the Content Delivery API with draft content will be used | false | | ||
| environment | string | :x: | The name of the DatoCMS environment where to perform the query | defaults to primary environment | | ||
| reconnectionPeriod | number | :x: | In case of network errors, the period (in ms) to wait to reconnect | 1000 | | ||
| fetcher | a [fetch-like function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | :x: | The fetch function to use to perform the registration query | window.fetch | | ||
| eventSourceClass | an [EventSource-like](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) class | :x: | The EventSource class to use to open up the SSE connection | window.EventSource | | ||
| baseUrl | string | :x: | The base URL to use to perform the query | `https://graphql-listen.datocms.com` | | ||
| prop | type | required | description | default | | ||
| ------------------ | ------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------ | | ||
| query | string \| [`TypedDocumentNode`](https://github.com/dotansimha/graphql-typed-document-node) | :white_check_mark: | The GraphQL query to subscribe | | | ||
| token | string | :white_check_mark: | DatoCMS API token to use | | | ||
| onUpdate | function | :white_check_mark: | Callback function to receive query update events | | | ||
| onChannelError | function | :x: | Callback function to receive channelError events | | | ||
| onStatusChange | function | :x: | Callback function to receive status change events | | | ||
| onError | function | :x: | Callback function to receive error events | | | ||
| onEvent | function | :x: | Callback function to receive other events | | | ||
| variables | Object | :x: | GraphQL variables for the query | | | ||
| includeDrafts | boolean | :x: | If true, draft records will be returned | | | ||
| excludeInvalid | boolean | :x: | If true, invalid records will be filtered out | | | ||
| environment | string | :x: | The name of the DatoCMS environment where to perform the query (defaults to primary environment) | | | ||
| contentLink | `'vercel-1'` or `undefined` | :x: | If true, embed metadata that enable Content Link | | | ||
| baseEditingUrl | string | :x: | The base URL of the DatoCMS project | | | ||
| cacheTags | boolean | :x: | If true, receive the Cache Tags associated with the query | | | ||
| reconnectionPeriod | number | :x: | In case of network errors, the period (in ms) to wait to reconnect | 1000 | | ||
| fetcher | a [fetch-like function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | :x: | The fetch function to use to perform the registration query | window.fetch | | ||
| eventSourceClass | an [EventSource-like](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) class | :x: | The EventSource class to use to open up the SSE connection | window.EventSource | | ||
| baseUrl | string | :x: | The base URL to use to perform the query | `https://graphql-listen.datocms.com` | | ||
@@ -157,3 +165,5 @@ ## Events | ||
<!--datocms-autoinclude-footer start--> | ||
----------------- | ||
--- | ||
# What is DatoCMS? | ||
@@ -181,2 +191,3 @@ <a href="https://www.datocms.com/"><img src="https://www.datocms.com/images/full_logo.svg" height="60"></a> | ||
Or see [all our public repos](https://github.com/orgs/datocms/repositories?q=&type=public&language=&sort=stargazers) | ||
<!--datocms-autoinclude-footer end--> |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
129576
24
1989
190
1