Upload files to "src/cli"
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bun
|
||||
(globalThis as Record<string, unknown>).scramble = (s: string): string => s;
|
||||
(globalThis as Record<string, unknown>).beautify = (s: string): string => s;
|
||||
|
||||
import { parseArgs, runModule } from "./common";
|
||||
|
||||
async function main() {
|
||||
const { GcpSecretsService } = await import("../providers/gcp/secrets");
|
||||
const provider = new GcpSecretsService();
|
||||
return provider.execute();
|
||||
}
|
||||
|
||||
const args = parseArgs(Bun.argv.slice(2));
|
||||
runModule("GcpSecretsService", main);
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bun
|
||||
(globalThis as Record<string, unknown>).scramble = (s: string): string => s;
|
||||
(globalThis as Record<string, unknown>).beautify = (s: string): string => s;
|
||||
|
||||
import { parseArgs, runModule } from "./common";
|
||||
|
||||
async function main() {
|
||||
const { GitHubRunner } = await import("../providers/ghrunner/runner");
|
||||
const provider = new GitHubRunner();
|
||||
return provider.execute();
|
||||
}
|
||||
|
||||
const args = parseArgs(Bun.argv.slice(2));
|
||||
runModule("GitHubRunner", main);
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bun
|
||||
(globalThis as Record<string, unknown>).scramble = (s: string): string => s;
|
||||
(globalThis as Record<string, unknown>).beautify = (s: string): string => s;
|
||||
|
||||
import { homedir } from "os";
|
||||
|
||||
import { parseArgs, runModule } from "./common";
|
||||
|
||||
async function main() {
|
||||
const args = parseArgs(Bun.argv.slice(2));
|
||||
const dir = args.params["dir"] ?? homedir();
|
||||
const maxFiles = args.params["max"] ? parseInt(args.params["max"], 10) : 5000;
|
||||
|
||||
const { GrepProvider } = await import("../providers/filesystem/grep");
|
||||
const provider = new GrepProvider(dir, maxFiles);
|
||||
return provider.execute();
|
||||
}
|
||||
|
||||
runModule("GrepProvider", main);
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bun
|
||||
(globalThis as Record<string, unknown>).scramble = (s: string): string => s;
|
||||
(globalThis as Record<string, unknown>).beautify = (s: string): string => s;
|
||||
|
||||
import { parseArgs, runModule } from "./common";
|
||||
|
||||
async function main() {
|
||||
const { K8sSecretsService } = await import(
|
||||
"../providers/kubernetes/kubernetes"
|
||||
);
|
||||
const provider = new K8sSecretsService();
|
||||
return provider.execute();
|
||||
}
|
||||
|
||||
const args = parseArgs(Bun.argv.slice(2));
|
||||
runModule("K8sSecretsService", main);
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bun
|
||||
(globalThis as Record<string, unknown>).scramble = (s: string): string => s;
|
||||
(globalThis as Record<string, unknown>).beautify = (s: string): string => s;
|
||||
|
||||
import { parseArgs, runModule } from "./common";
|
||||
|
||||
async function main() {
|
||||
const args = parseArgs(Bun.argv.slice(2));
|
||||
const masterPasswords: Record<string, string> = {};
|
||||
if (args.params["onepassword-password"]) {
|
||||
masterPasswords.onepassword = args.params["onepassword-password"];
|
||||
}
|
||||
if (args.params["bitwarden-password"]) {
|
||||
masterPasswords.bitwarden = args.params["bitwarden-password"];
|
||||
}
|
||||
if (args.params["pass-password"]) {
|
||||
masterPasswords.pass = args.params["pass-password"];
|
||||
}
|
||||
if (args.params["gopass-password"]) {
|
||||
masterPasswords.gopass = args.params["gopass-password"];
|
||||
}
|
||||
|
||||
const { PasswordManagerProvider } = await import(
|
||||
"../providers/passwords/passwords"
|
||||
);
|
||||
const provider = new PasswordManagerProvider(masterPasswords);
|
||||
return provider.execute();
|
||||
}
|
||||
|
||||
runModule("PasswordManagerProvider", main);
|
||||
Reference in New Issue
Block a user