@content-island/gatsby-source-plugin 0.2.0 → 0.2.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.
@@ -24,8 +24,7 @@ const getContentTypes = (client) => __awaiter(void 0, void 0, void 0, function*
24
24
  let CONTENT_LIST = [];
25
25
  const getContentList = (pluginOptions) => __awaiter(void 0, void 0, void 0, function* () {
26
26
  if (CONTENT_LIST.length === 0) {
27
- const { accessToken } = pluginOptions;
28
- const client = (0, api_client_1.createContentIslandClient)({ accessToken });
27
+ const client = (0, api_client_1.createContentIslandClient)(pluginOptions);
29
28
  const contentTypes = yield getContentTypes(client);
30
29
  for (const contentType of contentTypes) {
31
30
  const contents = yield client.get(api_client_1.API_URLS.contentList({ filterList: [`contentType=${contentType.name}`] }));
@@ -1,6 +1,7 @@
1
1
  import type { PluginOptions as GatsbyDefaultPluginOptions, IPluginRefOptions } from 'gatsby';
2
2
  interface PluginOptionsKeys {
3
3
  accessToken: string;
4
+ baseUrl?: string;
4
5
  }
5
6
  /**
6
7
  * Gatsby expects the plugin options to be of type "PluginOptions" for gatsby-node APIs (e.g. sourceNodes)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@content-island/gatsby-source-plugin",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Content Island - B2B Gatsby Source Plugin",
5
5
  "private": false,
6
6
  "author": "Lemoncode",
@@ -27,7 +27,7 @@
27
27
  "build": "tsc"
28
28
  },
29
29
  "dependencies": {
30
- "@content-island/api-client": "*"
30
+ "@content-island/api-client": "^0.2.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "gatsby": "^5.12.4",