@dotdev/headless-core-node
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -54,4 +54,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
finalRedirects.map(item => createRedirect({ fromPath: item.source, toPath: item.destination, statusCode: item.type })); | ||
const newConfig = Object.assign(Object.assign({}, firebase.hosting.filter(site => site.public.includes("app/public"))[0]), { redirects: finalRedirects }); | ||
yield jsonfile.writeFileSync(file, Object.assign(Object.assign({}, firebase), { hosting: [...firebase.hosting.filter(site => !site.public.includes("app/public")), newConfig] }), { spaces: 2 }); | ||
const newConfig = Array.isArray(firebase.hosting) | ||
? Object.assign(Object.assign({}, firebase.hosting.filter(site => site.public.includes("app/public"))[0]), { redirects: finalRedirects }) : Object.assign(Object.assign({}, firebase.hosting), { redirects: finalRedirects }); | ||
yield jsonfile.writeFileSync(file, Object.assign(Object.assign({}, firebase), { hosting: Array.isArray(firebase.hosting) ? [...firebase.hosting.filter(site => !site.public.includes("app/public")), newConfig] : newConfig }), { spaces: 2 }); | ||
if (gatsbyFile) | ||
@@ -58,0 +59,0 @@ yield jsonfile.writeFileSync(gatsbyFile, { |
{ | ||
"name": "@dotdev/headless-core-node", | ||
"description": "Node package for Headless Core", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"author": "DotDev <info@dotdev.com.au>", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
18817
166