1.2.0 • Published 2 months ago

@fleekxyz/env-guards v1.2.0

Weekly downloads
-
License
-
Repository
-
Last release
2 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

2 months ago

1.1.0-test.12

2 months ago

1.1.0-test.11

2 months ago

1.1.0-test.2

2 months ago

1.1.0-test.3

2 months ago

1.1.0-test.4

2 months ago

1.1.0-test.5

2 months ago

1.1.0-test.7

2 months ago

1.1.0

2 months ago

1.1.0-test.1

2 months ago

1.1.0-test

2 months ago

1.0.0

2 months ago