@content-island/gatsby-source-plugin 0.7.6 → 0.7.8

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ const l = {
9
9
  level: "ERROR",
10
10
  category: "THIRD_PARTY"
11
11
  }
12
- }, E = "ContentIsland", w = {
12
+ }, w = "ContentIsland", E = {
13
13
  markdown: "text/markdown"
14
14
  }, g = (e, t) => e.isArray ? {
15
15
  name: e.name,
@@ -22,7 +22,7 @@ const l = {
22
22
  value: e.value,
23
23
  isArray: e.isArray
24
24
  }, i = (e, t, o) => Array.isArray(e) ? e.filter((n) => n.type === o).map((n) => g(n, t)) : [], c = (e, t, o) => {
25
- const n = `${E}${e.contentType.name}`, s = t ? e.fields.filter((y) => y.language === o) : e.fields, { id: a, ...f } = C.mapContentToModel({ ...e, fields: s });
25
+ const n = `${w}${e.contentType.name}`, s = t ? e.fields.filter((y) => y.language === o) : e.fields, { id: a, ...f } = C.mapContentToModel({ ...e, fields: s });
26
26
  return {
27
27
  gatsbyNodeType: n,
28
28
  gatsbyNode: {
@@ -30,7 +30,7 @@ const l = {
30
30
  _isContentIslandNode: !0,
31
31
  _mediaFields: i(s, n, "media"),
32
32
  _markdownFields: i(s, n, "long-text"),
33
- _lastUpdate: e.lastUpdate,
33
+ _lastUpdate: new Date(e.lastUpdate),
34
34
  _isLocalized: t,
35
35
  _language: o,
36
36
  ...f
@@ -93,7 +93,7 @@ const m = async (e) => {
93
93
  const o = await N(e, t.value);
94
94
  o && T(e, t, o.id);
95
95
  }
96
- }, p = (e) => `${e.gatsbyNodeType}MarkdownRemark`, k = async (e, t) => {
96
+ }, p = (e) => `${e.gatsbyNodeType}MarkdownRemark`, D = async (e, t) => {
97
97
  if (t.isArray)
98
98
  e.reporter.panic(
99
99
  L(l.INCORRECT_FIELD_CONTENT, "Content Island does not support fields with markdown lists.")
@@ -105,7 +105,7 @@ const m = async (e) => {
105
105
  internal: {
106
106
  type: p(t),
107
107
  // mediaType will allow remark plugin to transform plain text into markdown node
108
- mediaType: w.markdown,
108
+ mediaType: E.markdown,
109
109
  content: t.value,
110
110
  contentDigest: e.createContentDigest(t.value)
111
111
  }
@@ -145,7 +145,7 @@ const m = async (e) => {
145
145
  for (const o of t._mediaFields)
146
146
  await h(e, o);
147
147
  for (const o of t._markdownFields)
148
- await k(e, o);
148
+ await D(e, o);
149
149
  }
150
150
  };
151
151
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@content-island/gatsby-source-plugin",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "description": "Content Island - B2B Gatsby Source Plugin",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -30,7 +30,7 @@
30
30
  "build:dev": "vite build --mode development"
31
31
  },
32
32
  "dependencies": {
33
- "@content-island/api-client": "0.12.0"
33
+ "@content-island/api-client": "0.14.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "gatsby": "5.14.1",