@crds_npm/rollup-plugin-vault
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@alepop/stencil-env

This package is used to use env variables from .env file and to load env vars from Vault secrets. Your .env must include the following:

CRDS_ENV=local
VAULT_ROLE_ID=
VAULT_SECRET_ID=

CRDS_ENV should be either local, int, or prod.

First, npm install within the project:

npm install @alepop/stencil-env --save-dev

Next, within the project's stencil.config.js file, import the plugin and add it to the plugins config.

stencil.config.ts

import { Config } from '@stencil/core';
import { env } from 'rollup-plugin-vault';

export const config: Config = {
  plugins: [
      new VaultEnvReplacer({ secrets: ['common', 'components'], vaultUrl: 'https://vault.crossroads.net/', secretFolder: 'kv-client' }).env(),
  ]
};

You can pass other secret folders in the array of strings as well such as components etc.

Add .env file in the root of your project

.env

TEST=test string

After compilation, process.env.TEST will be replaced by it variable from .env file.

Related

Package Sidebar

Install

npm i @crds_npm/rollup-plugin-vault

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

9.29 kB

Total Files

5

Last publish

Collaborators

  • crds_npm_org
  • d3m
  • dillon.courts
  • dan.rye
  • tcmacdonald
  • rdonnelly02
  • candrews_crds