Socket
Socket
Sign inDemoInstall

@commercetools/frontend-netlify-plugin

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools/frontend-netlify-plugin - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

package.json
{
"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) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc