@onboardbase/cli
Version:
[](https://www.npmjs.com/package/@onboardbase/cli) [](https://www.npmjs.com/package/@onboardbase/cli) [ • 2.29 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const command_1 = require("@oclif/command");
const base_command_1 = require("../common/base.command");
const run_service_1 = require("../services/run.service");
const RunCommandFlags = {
help: command_1.flags.help({ char: "h" }),
project: command_1.flags.string({
char: "p",
description: "name of project",
}),
environment: command_1.flags.string({
char: "e",
description: "Environment to run by default",
}),
command: command_1.flags.string({
char: "c",
description: "Command to run",
required: false,
}),
password: command_1.flags.string({ description: "Your Build Secure Password" }),
"source-path": command_1.flags.string({
description: "The source you would like to load your secrets from",
required: false,
exclusive: ["sync", "environment", "project"],
}),
sync: command_1.flags.boolean({
description: "Pull the latest secrets before starting the command.",
required: false,
default: false,
}),
secrets: command_1.flags.string({
description: "A JSON string containing key/value pairs of your secrets",
required: false,
}),
prefix: command_1.flags.string({ char: "k", description: "Prefix", required: false }),
passphrase: command_1.flags.string({
char: "s",
description: "Passphrase",
required: false,
}),
"live-reload": command_1.flags.boolean({
description: "Live Reload",
required: false,
}),
"accept-secret-sharing": command_1.flags.boolean({
description: "A flag to accept secret sharing",
required: false,
default: true,
}),
verbose: command_1.flags.boolean({
default: false,
description: "Enable warning/error logs",
}),
};
class Run extends base_command_1.BaseCommand {
getService(configManager) {
return new run_service_1.RunCommandService(configManager);
}
getArgsAndFlags() {
return this.parse(Run);
}
}
exports.default = Run;
Run.description = "Run a command with secrets injected into the environment";
Run.flags = RunCommandFlags;
Run.args = [{ name: "command" }];