New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

lsctl

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lsctl - npm Package Compare versions

Comparing version
0.0.19
to
0.0.20
+1
-1
package.json

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "0.0.19",
"version": "0.0.20",
"files": [

@@ -8,0 +8,0 @@ "src",

@@ -9,2 +9,4 @@ import { createCommand } from "commander";

from: string;
overwrite?: boolean;
exclude?: string[];
};

@@ -24,2 +26,4 @@

)
.option("-o, --overwrite", "Overwrite existing secrets")
.option("-e, --exclude <secrets...>", "Secrets to exclude from the copy")
.action(async () => {

@@ -37,17 +41,21 @@ const options = command.opts<Options>();

await Promise.all(
parameters.secrets.map(async ({ name, value }) => {
console.log(
`Copying secret ${name} from ${options.from} to ${options.to}`,
);
const result = await Promise.allSettled(
parameters.secrets
.filter(({ name }) => !options.exclude?.includes(name))
.map(async ({ name, value }) => {
console.log(
`Copying secret ${name} from ${options.from} to ${options.to}`,
);
await putSecret(
{
...prefixOptions,
overwrite: true,
},
name,
value,
);
}),
await putSecret(
{
...prefixOptions,
overwrite: options.overwrite,
},
name,
value,
);
return name;
}),
);

@@ -57,2 +65,12 @@

const successful = result
.map((res) => (res.status === "fulfilled" ? res.value : undefined))
.filter(Boolean);
parameters.secrets
.filter(({ name }) => !successful.includes(name))
.forEach(({ name }) => {
console.warn(`Failed to copy secret ${name}`);
});
if (parameters.invalidParameters?.length) {

@@ -59,0 +77,0 @@ console.warn("Some secrets could not be found:");