Comparing version 0.3.5 to 0.3.7-b
@@ -10,3 +10,3 @@ #!/usr/bin/env node | ||
let hostport = process.env['PIZZLY_HOSTPORT'] || 'http://localhost:3004'; | ||
// Test from the package rool (/packages/cli) with 'node dist/index.js' | ||
// Test from the package root (/packages/cli) with 'node dist/index.js' | ||
program | ||
@@ -21,3 +21,3 @@ .name('pizzly') | ||
await axios | ||
.get(url) | ||
.get(url, { headers: enrichHeaders() }) | ||
.then((res) => { | ||
@@ -38,3 +38,3 @@ console.log('\n\nHere is the list of provider configuraitons:\n\n'); | ||
await axios | ||
.get(url) | ||
.get(url, { headers: enrichHeaders() }) | ||
.then((res) => { | ||
@@ -66,3 +66,3 @@ console.log('\n\nHere is the requested provider configuration:\n\n'); | ||
await axios | ||
.post(url, body) | ||
.post(url, body, { headers: enrichHeaders() }) | ||
.then((_) => { | ||
@@ -93,3 +93,3 @@ console.log('\n\nâ Successfully created a new provider configuration!\n\n'); | ||
await axios | ||
.put(url, body) | ||
.put(url, body, { headers: enrichHeaders() }) | ||
.then((_) => { | ||
@@ -109,3 +109,3 @@ console.log('\n\nâ Successfully edited an existing provider configuration!\n\n'); | ||
await axios | ||
.delete(url) | ||
.delete(url, { headers: enrichHeaders() }) | ||
.then((_) => { | ||
@@ -126,3 +126,3 @@ console.log('\n\nâ Successfully a deleted provider configuration!\n\n'); | ||
await axios | ||
.get(url, { params: { provider_config_key: provider_config_key } }) | ||
.get(url, { params: { provider_config_key: provider_config_key }, headers: enrichHeaders() }) | ||
.then((res) => { | ||
@@ -137,2 +137,8 @@ console.log('\n\nHere is the requested connection with credentials:\n\n'); | ||
program.parseAsync(process.argv); | ||
function enrichHeaders(headers = {}) { | ||
if (process.env['PIZZLY_SECRET_KEY'] != null) { | ||
headers['Authorization'] = 'Basic ' + Buffer.from(process.env['PIZZLY_SECRET_KEY'] + ':').toString('base64'); | ||
} | ||
return headers; | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "pizzly", | ||
"version": "0.3.5", | ||
"version": "0.3.7b", | ||
"description": "Pizzly's CLI tool.", | ||
@@ -22,3 +22,8 @@ "type": "module", | ||
"node": ">=16.7" | ||
} | ||
}, | ||
"files": [ | ||
"dist/**/*", | ||
"!**/*.json", | ||
"README.md" | ||
] | ||
} |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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 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
11835
137
3
2