@ns8/ns8-shopify-switches
Advanced tools
Comparing version 1.0.188 to 1.0.189
@@ -110,2 +110,5 @@ "use strict"; | ||
static formatOutput(output) { | ||
if (output instanceof Error) { | ||
return { error: Logger.formatError(output) }; | ||
} | ||
if (output == null) { | ||
@@ -121,3 +124,7 @@ return {}; | ||
try { | ||
return `${JSON.stringify(o, undefined, 2)}\n`; | ||
let output = o; | ||
if (o instanceof Error) { | ||
output = { error: Logger.formatError(o) }; | ||
} | ||
return `${JSON.stringify(output, undefined, 2)}\n`; | ||
} | ||
@@ -128,2 +135,9 @@ catch (err) { | ||
} | ||
static formatError(error) { | ||
return { | ||
message: error.message, | ||
name: error.name, | ||
rawError: error, | ||
}; | ||
} | ||
} | ||
@@ -130,0 +144,0 @@ exports.Logger = Logger; |
{ | ||
"name": "@ns8/ns8-shopify-switches", | ||
"version": "1.0.188", | ||
"version": "1.0.189", | ||
"description": "Custom switches for the shopify integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
95455
1174
20