gatsby-attainlabs-cms 1.0.23 → 1.0.25

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/gatsby-node.js +6 -10
  2. package/package.json +2 -3
package/gatsby-node.js CHANGED
@@ -384,21 +384,17 @@ exports.createPages = async ({ actions, store }, pluginOptions) => {
384
384
  );
385
385
  const firebaseJson = await firebaseData.json();
386
386
  for (const page of Object.values(firebaseJson)) {
387
- if (page.template === "visual-editor") {
388
- const {
389
- draft: {
387
+ if (page.template === "visual-editor" && page.published) {
388
+ const {
390
389
  blocks: {
391
390
  content,
392
391
  root: {
393
392
  props: { pageUrl, layout },
394
393
  },
395
- },
396
- },
397
- id,
398
- published,
394
+ },
395
+ id,
399
396
  } = page;
400
-
401
- if (published) {
397
+
402
398
  //Generate page's blocks slices
403
399
  await Promise.all(
404
400
  content.map(async (b) => {
@@ -440,7 +436,7 @@ exports.createPages = async ({ actions, store }, pluginOptions) => {
440
436
  // // Generate the page itself
441
437
  // await fse.outputFile(outPath, pageSource);
442
438
  // console.log(`✅ Wrote page to ${outPath}`);
443
- }
439
+
444
440
  }
445
441
  }
446
442
  };
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "gatsby-attainlabs-cms",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
- "build": "tsc",
10
- "publish": "npm version minor && npm publish"
9
+ "build": "tsc"
11
10
  },
12
11
  "author": "Anthony Barrera",
13
12
  "license": "ISC",