UNPKG

@aminya/dotenv-vault

Version:

A secrets manager for .env files – from the same people that pioneered dotenv.

44 lines (43 loc) 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); const rotatekey_service_1 = require("../services/rotatekey-service"); class Rotatekey extends core_1.Command { async run() { const { args, flags } = await this.parse(Rotatekey); const environment = args.environment; const dotenvMe = flags.dotenvMe; const yes = flags.yes; await new rotatekey_service_1.RotatekeyService({ cmd: this, environment: environment, dotenvMe: dotenvMe, yes: yes }).run(); } } exports.default = Rotatekey; Rotatekey.description = 'Rotate a DOTENV_KEY'; Rotatekey.examples = [ '<%= config.bin %> <%= command.id %>', ]; Rotatekey.args = [ { name: 'environment', required: true, description: 'Set environment to rotate', hidden: false, }, ]; Rotatekey.flags = { dotenvMe: core_1.Flags.string({ char: 'm', description: 'Pass .env.me (DOTENV_ME) credential directly (rather than reading from .env.me file)', hidden: false, multiple: false, env: 'DOTENV_ME', required: false, }), yes: core_1.Flags.boolean({ char: 'y', description: 'Automatic yes to prompts. Assume yes to all prompts and run non-interactively.', hidden: false, required: false, default: false, }), };