1.2.0 • Published 8 months ago

@fleekxyz/env-guards v1.2.0

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

EnvGuards

This package is solving not direct usage of process.env. Instead create in src of your package where you need secrets file secrets.ts and use it like this:

import { parseEnvs } from '@fleekxyz/env-guards';

export const envGuards = parseEnvs([
  'HERE_LIST', //
  'THE_ENV_VARIABLES',
  'YOU_WANT_TO_USE',
]);

and then everywhere in your package you can use it like this:

import { envGuards } from './envGuards';

console.log(envGuards.HERE_LIST);

Add support of new ENV name

The list of strings (name of envs) that you can pass to parseEnvs function is limited. If you want to extend it and add new env name, feel free to add it in this file: /packages/env-guards/src/lib/availableEnvKeys.ts and build the package before usage.

1.2.0

8 months ago

1.1.0-test.12

8 months ago

1.1.0-test.11

8 months ago

1.1.0-test.2

8 months ago

1.1.0-test.3

8 months ago

1.1.0-test.4

8 months ago

1.1.0-test.5

8 months ago

1.1.0-test.7

8 months ago

1.1.0

8 months ago

1.1.0-test.1

8 months ago

1.1.0-test

8 months ago

1.0.0

8 months ago