From ef4b912ef15be03b262f5537bdf0fdcca2d57cbd Mon Sep 17 00:00:00 2001 From: Konstantin Tarkus Date: Mon, 23 Oct 2023 01:02:27 +0200 Subject: [PATCH] build: 1.0.1 --- .npmignore | 9 ++++++--- README.md | 4 ++-- index.d.ts | 2 +- index.js | 2 +- package.json | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.npmignore b/.npmignore index 1639299..7a5a247 100644 --- a/.npmignore +++ b/.npmignore @@ -1,7 +1,10 @@ +.github/ .vscode/ .yarn/ -.prettierignore -test.js .env .env.* -env.ts \ No newline at end of file +.pnp.* +.prettierignore +.yarnrc.yml +env.ts +test.js \ No newline at end of file diff --git a/README.md b/README.md index 9c45ea6..6a3edae 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ export default cleanEnv(process.env, { ```ts import { loadEnv } from "envars"; -const env = await loadEnv("production", { +const [env] = await loadEnv("production", { root: ".", schema: "./core/env.ts", mergeTo: process.env, @@ -145,7 +145,7 @@ import { defineConfig } from "vite"; import { loadEnv } from "envars"; export default defineConfig(async ({ mode }) => { - const env = await loadEnv(mode, { + const [env] = await loadEnv(mode, { root: "../", schema: "./core/env.ts", mergeTo: process.env, diff --git a/index.d.ts b/index.d.ts index 000bbaf..7509000 100644 --- a/index.d.ts +++ b/index.d.ts @@ -10,7 +10,7 @@ export type SecretSource = "google" | "aws" | "azure"; * * @see https://cloud.google.com/secret-manager * @example - * const env = await loadEnv("development", { + * const [env, secrets] = await loadEnv("development", { * root: "..", * schema: "./core/env.ts", * mergeTo: process.env, diff --git a/index.js b/index.js index 3aca4f0..9aed406 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ const secretRegExp = /^secret:\/\/(\w+)\/(.*)$/; * * @see https://cloud.google.com/secret-manager * @example - * const env = await loadEnv("development", { + * const [env, secrets] = await loadEnv("development", { * root: "..", * schema: "./core/env.ts", * mergeTo: process.env, diff --git a/package.json b/package.json index 1b77e6d..87ff073 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "envars", - "version": "1.0.0", + "version": "1.0.1", "packageManager": "yarn@4.0.0-rc.53", "description": "Load environment variables from .env files. Decode secret values from AWS Secrets Manager, Google Secret Manager, and other sources.", "keywords": [