UNPKG

@aminya/dotenv-vault

Version:

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

51 lines (50 loc) 1.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); const pull_service_1 = require("../services/pull-service"); class Pull extends core_1.Command { async run() { const { args, flags } = await this.parse(Pull); const environment = args.environment; const filename = args.filename; const dotenvMe = flags.dotenvMe; const yes = flags.yes; await new pull_service_1.PullService({ cmd: this, environment: environment, filename: filename, dotenvMe: dotenvMe, yes: yes }).run(true); } } exports.default = Pull; Pull.description = 'Pull .env securely'; Pull.examples = [ '<%= config.bin %> <%= command.id %>', ]; Pull.args = [ { name: 'environment', required: false, description: 'Set environment to pull from. Defaults to development (writing to .env)', hidden: false, }, { name: 'filename', required: false, description: 'Set output filename. Defaults to .env for development and .env.{environment} for other environments', hidden: false, }, ]; Pull.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, }), };