@commercetools/frontend-netlify-plugin
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "@commercetools/frontend-netlify-plugin", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Netlify Build plugin - Commercetools Frontend build extension", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -7,3 +7,6 @@ import fetch from "node-fetch"; | ||
*/ | ||
export const checkBackend = async (version, path) => { | ||
export const checkBackend = async (version) => { | ||
const path = | ||
process.env.NEXT_PUBLIC_FRONTASTIC_HOST + '/status/extensionrunner' | ||
console.log('Calling ' + path, 'Version ' + version) | ||
@@ -37,10 +40,9 @@ const actualInit = { | ||
* @param maxTries the max number of attempts | ||
* @param path the path to be tested | ||
* @returns {Promise<void>} | ||
*/ | ||
export const waitForBackend = async (shortCommitHash, maxTries, path) => { | ||
export const waitForBackend = async (shortCommitHash, maxTries) => { | ||
for (let i = 0; i < maxTries; i++) { | ||
const attempt = i + 1 | ||
console.log('Checking if extension is up, attempt: ', attempt) | ||
const { up } = await checkBackend(shortCommitHash, path) | ||
const { up } = await checkBackend(shortCommitHash) | ||
if (!up) { | ||
@@ -47,0 +49,0 @@ console.error( |
@@ -33,5 +33,3 @@ import * as dotenv from 'dotenv' | ||
if (process.env.NETLIFY_PLUGIN_COMMERCETOOLS_FRONTEND_WAIT_DISABLE !== "1") { | ||
const path = | ||
process.env.NEXT_PUBLIC_FRONTASTIC_HOST + '/status/extensionrunner' | ||
await waitForBackend(shortCommitHash, 35, path) | ||
await waitForBackend(shortCommitHash, 35) | ||
} | ||
@@ -38,0 +36,0 @@ } catch (error) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5245
99