Skip to content

Commit 56639b7

Browse files
chore: remove preview feature in config and docs
1 parent d226501 commit 56639b7

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Provide support for the following features:
2525
- Throttling, debouncing, and adjusting the number of concurrent `optimizely/episerver` API requests
2626
- Add support for `expanded` data on some content blocks: `images`, `dynamicStyles`, `items`, `form` key fields are currently supported with more to come in the future
2727
- Option for opting out of type inference for `optimizely/episerver` API `gatsby` nodes or add custom `gatsby` node schemas for `optimizely/episerver` API `gatsby` nodes
28-
<!-- - **[BETA]** Support for enhanced `preview` mode for testing `optimizely/episerver` webhooks. Currently supports [**Netlify**](https://www.netlify.com/) -->
2928

3029
## Installation and Setup
3130

@@ -92,21 +91,6 @@ module.exports = {
9291

9392
## Configuration Options
9493

95-
<!-- ### [BETA] Preview Mode
96-
97-
To properly enable preview mode, deploy a site instance in the server, get your site URL and add it under the key `siteUrl` and set the `preview` mode to `true` to options as shown. Default is `false`.
98-
99-
```javascript
100-
options: {
101-
// ...
102-
103-
preview: {
104-
enabled: true;
105-
site_url: "https://example.com";
106-
}
107-
}
108-
``` -->
109-
11094
### Additional Headers
11195

11296
Add additional headers to the request as follows:

src/gatsby-node.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,6 @@ exports.pluginOptionsSchema = ({ Joi }) =>
123123
"object.required": "The `auth` object is required."
124124
})
125125
.description("The auth credentials for the Optimizely/Episerver site"),
126-
// preview: Joi.object({
127-
// webhook_url: Joi.string().when("enabled", {
128-
// is: true,
129-
// then: Joi.string()
130-
// .required()
131-
// .messages({
132-
// "string.empty": "The `preview.webhook_url` is empty. Please provide a valid URL.",
133-
// "string.required": "The `preview.webhook_url` is required."
134-
// })
135-
// .description("The webhook URL for the Optimizely/Episerver site")
136-
// })
137-
// }).description("The preview options for the plugin"),
138126
globals: Joi.object()
139127
.when("enabled", {
140128
is: true,
@@ -199,7 +187,6 @@ exports.sourceNodes = async ({ actions: { createNode }, cache, createNodeId, cre
199187
// Prepare plugin options
200188
const {
201189
auth: { site_url = null, username = null, password = null, grant_type = AUTH_GRANT_TYPE, client_id = AUTH_CLIENT_ID, headers = AUTH_HEADERS },
202-
// preview: { webhook_url = null },
203190
endpoints = [],
204191
response_type = REQUEST_RESPONSE_TYPE,
205192
request_timeout = REQUEST_TIMEOUT,
@@ -333,9 +320,6 @@ exports.sourceNodes = async ({ actions: { createNode }, cache, createNodeId, cre
333320

334321
// Reject the promise
335322
return err;
336-
})
337-
.finally(() => {
338-
return;
339323
});
340324
}
341325

0 commit comments

Comments
 (0)