Skip to content

Commit

Permalink
fix manifest-util
Browse files Browse the repository at this point in the history
  • Loading branch information
frontendphil committed Jan 16, 2025
1 parent 6fdd5bb commit 4ca2ef3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions deployables/extension/manifest-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ config()
//
// node manifest-util.js ./public/manifest.json

const getIframeUrl = () => {
const iframeUrl = process.env.CONNECT_IFRAME_URL

invariant(iframeUrl != null, 'CONNECT_IFRAME_URL is missing')

if (iframeUrl.endsWith('/')) {
return iframeUrl
}

return `${iframeUrl}/`
}

const updateManifest = (templateFileName, outFileName, version) => {
try {
console.log(chalk.white.bold('Manifest template file:'))
Expand Down Expand Up @@ -61,15 +73,3 @@ invariant(template != null, 'Path to template file missing')
invariant(outFile != null, 'Path to output file missing')

updateManifest(template, outFile, version)

const getIframeUrl = () => {
const iframeUrl = process.env.CONNECT_IFRAME_URL

invariant(iframeUrl != null, 'CONNECT_IFRAME_URL is missing')

if (iframeUrl.endsWith('/')) {
return iframeUrl
}

return `${iframeUrl}/`
}

0 comments on commit 4ca2ef3

Please sign in to comment.