{"_id":"@aevum/tenv","_rev":"3-3463ef703d7b833a851dfbbd1af51494","name":"@aevum/tenv","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@aevum/tenv","version":"0.1.0","keywords":["env","validation","schema","config"],"author":{"name":"Aevum"},"license":"MIT","_id":"@aevum/tenv@0.1.0","maintainers":[{"name":"aevum","email":"levi.schad@icloud.com"}],"homepage":"https://github.com/ae-vum/tenv#readme","bugs":{"url":"https://github.com/ae-vum/tenv/issues"},"dist":{"shasum":"34b110b32f7ac358af40402acbb7beee79823056","tarball":"https://registry.npmjs.org/@aevum/tenv/-/tenv-0.1.0.tgz","fileCount":8,"integrity":"sha512-g+Q3eJ+SZ3R31UCPqJYWAH0f1rWiquS92tlfSy6Kp7v1vTgqaf2a6wbGmmq/fnQDvBmjkab9RD435+4YjrI2rQ==","signatures":[{"sig":"MEUCIQCHTZftnJ1GUEpsdVLoGivrf5CSZxjOKP4tH8ah4Npr8AIgHhW57YkvLKm51Womvurhizz0VaOyg1O1ba3QJTazY2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24697},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.esm.js","scripts":{"dev":"bunx tsup --watch","build":"bunx tsup","prepublishOnly":"bun run build"},"_npmUser":{"name":"aevum","email":"levi.schad@icloud.com"},"repository":{"url":"git+https://github.com/ae-vum/tenv.git","type":"git"},"_npmVersion":"10.9.0","description":"A TypeScript library for loading and validating environment variables with schema support.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"dotenv":"^16.4.7"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.24.1","tsup":"^8.3.5","@types/bun":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tenv_0.1.0_1737306247884_0.17739274767805857","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aevum/tenv","version":"0.1.1","keywords":["env","validation","schema","config"],"author":{"name":"Aevum"},"license":"MIT","_id":"@aevum/tenv@0.1.1","maintainers":[{"name":"aevum","email":"levi.schad@icloud.com"}],"homepage":"https://github.com/ae-vum/tenv#readme","bugs":{"url":"https://github.com/ae-vum/tenv/issues"},"dist":{"shasum":"21614db2965b79859500caba7653614ea5dc0298","tarball":"https://registry.npmjs.org/@aevum/tenv/-/tenv-0.1.1.tgz","fileCount":8,"integrity":"sha512-+RdJm4G7J08wvRCOm70ouBkVhx12WUwuxPZTUIWaWdpWF2pkkIwT7Gc1KiYyHzv7O5s6T6iRMWmDsrfymOdUjQ==","signatures":[{"sig":"MEQCIA5jvx+i2x9tb2gud8lYxQb04TaTucKlnVAVn5F7RmxtAiAbKF8VeYrMPP5MbxUZiolTeXxqpSD6IgMMO7l/44Rvsg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11379},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"c1c8862ea30cff90bc61b4bc766521937330fd76","scripts":{"dev":"bunx tsup --watch","test":"jest","build":"bunx tsup","prepublishOnly":"bun run build"},"_npmUser":{"name":"aevum","email":"levi.schad@icloud.com"},"repository":{"url":"git+https://github.com/ae-vum/tenv.git","type":"git"},"_npmVersion":"10.9.0","description":"A TypeScript library for loading and validating environment variables with schema support.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"dotenv":"^16.4.7"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.24.1","jest":"^29.7.0","tsup":"^8.3.5","ts-jest":"^29.2.5","ts-node":"^10.9.2","@types/bun":"latest","@types/jest":"^29.5.14"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tenv_0.1.1_1737334891029_0.27424674546647965","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aevum/tenv","version":"0.1.3","keywords":["env","validation","schema","config"],"author":{"name":"Aevum"},"license":"MIT","_id":"@aevum/tenv@0.1.3","maintainers":[{"name":"aevum","email":"levi.schad@icloud.com"}],"homepage":"https://github.com/ae-vum/tenv#readme","bugs":{"url":"https://github.com/ae-vum/tenv/issues"},"dist":{"shasum":"59eae7e4ad8d9eea2f5a6112d55505a69c1a9122","tarball":"https://registry.npmjs.org/@aevum/tenv/-/tenv-0.1.3.tgz","fileCount":8,"integrity":"sha512-suuUd04Nu+jvDaNO4Dn16VGsRW081BG1qr6VZHIJe3K2A3iKaydGAk2WpPsc6jEXJYj5aWbamhUNu7/mjumaPA==","signatures":[{"sig":"MEUCIHr9Bsk/wsGaBT8SGC3uLHYrevAWw4dRNZ1RMxIQM7zpAiEA741xgiZQ8XdTP/poTtEg3VDOSinrS5zpqU1ZqpBP4WY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11379},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"645d4005475ca092e8a77ccc4c0971b3b85dbf3c","scripts":{"dev":"bunx tsup --watch","test":"jest","build":"bunx tsup","prepublishOnly":"bun run build"},"_npmUser":{"name":"aevum","email":"levi.schad@icloud.com"},"repository":{"url":"git+https://github.com/ae-vum/tenv.git","type":"git"},"_npmVersion":"10.9.0","description":"A TypeScript library for loading and validating environment variables with schema support.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"dotenv":"^16.4.7"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.24.1","jest":"^29.7.0","tsup":"^8.3.5","ts-jest":"^29.2.5","ts-node":"^10.9.2","@types/bun":"latest","@types/jest":"^29.5.14"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tenv_0.1.3_1737334928572_0.1960765095763426","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@aevum/tenv","version":"0.1.4","description":"A TypeScript library for loading and validating environment variables with schema support.","main":"dist/index.cjs","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"test":"jest","build":"bunx tsup","dev":"bunx tsup --watch","prepublishOnly":"bun run build"},"keywords":["env","validation","schema","config"],"author":{"name":"Aevum"},"license":"MIT","devDependencies":{"@types/bun":"latest","@types/jest":"^29.5.14","jest":"^29.7.0","ts-jest":"^29.2.5","ts-node":"^10.9.2","tsup":"^8.3.5","zod":"^3.24.1"},"peerDependencies":{"typescript":"^5.0.0"},"dependencies":{"dotenv":"^16.4.7"},"repository":{"type":"git","url":"git+https://github.com/ae-vum/tenv.git"},"_id":"@aevum/tenv@0.1.4","gitHead":"8ca2d04602ef2cbddfd0c3c3249d6fa361108c9b","bugs":{"url":"https://github.com/ae-vum/tenv/issues"},"homepage":"https://github.com/ae-vum/tenv#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-Wb4ZLB0LsrsVLP6SXPa7IdcIorJsLuzozUdLlIZlBv/HDCO/H9Uxj9/iQFvUUEfCwLHhfxz6ShIF1sB0jJQSfg==","shasum":"5651bcbc6c1c128837e4dce38680960752c85ce8","tarball":"https://registry.npmjs.org/@aevum/tenv/-/tenv-0.1.4.tgz","fileCount":8,"unpackedSize":10774,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFf5kkq4bTlDw1Is/zkM/f1TQh5IrL1N5x0jEQYnzjnPAiEA6Q6DkdomcSY2V1ywxc08w/4GRxFUuqw19ibLdM695YY="}]},"_npmUser":{"name":"aevum","email":"levi.schad@icloud.com"},"directories":{},"maintainers":[{"name":"aevum","email":"levi.schad@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tenv_0.1.4_1737380897601_0.9523580654839601"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-19T17:04:07.820Z","modified":"2025-01-20T13:48:17.917Z","0.1.0":"2025-01-19T17:04:08.052Z","0.1.1":"2025-01-20T01:01:31.212Z","0.1.3":"2025-01-20T01:02:08.755Z","0.1.4":"2025-01-20T13:48:17.762Z"},"bugs":{"url":"https://github.com/ae-vum/tenv/issues"},"author":{"name":"Aevum"},"license":"MIT","homepage":"https://github.com/ae-vum/tenv#readme","keywords":["env","validation","schema","config"],"repository":{"type":"git","url":"git+https://github.com/ae-vum/tenv.git"},"description":"A TypeScript library for loading and validating environment variables with schema support.","maintainers":[{"name":"aevum","email":"levi.schad@icloud.com"}],"readme":"# tenv\n\nA TypeScript library for loading and validating environment variables using Zod schemas.\n\n## Installation\n\n```bash\nnpm install @aevum/tenv\n```\n\n## Features\n\n- Type-safe environment variable loading\n- Zod schema validation\n- Flexible error handling strategies\n- .env file support\n- Process.env fallback\n\n## Usage\n\n```typescript\nimport { loadEnv } from '@aevum/tenv';\nimport { z } from 'zod';\n\nconst envSchema = z.object({\n  PORT: z.string().transform(Number),\n  API_KEY: z.string(),\n  DEBUG: z.string().transform(val => val === 'true'),\n  ALLOWED_ORIGINS: z.string().transform(val => val.split(','))\n});\n\nconst env = loadEnv({\n  schema: envSchema,\n  dotEnvPath: '.env',\n  errorStrategy: 'throw'\n});\n\nconsole.log(env.PORT); // number\nconsole.log(env.API_KEY); // string\nconsole.log(env.DEBUG); // boolean\nconsole.log(env.ALLOWED_ORIGINS); // string[]\n```\n\n## Configuration Options\n\n```typescript\ntype LoadEnvOptions<T extends z.ZodTypeAny> = {\n    schema: T;\n    dotEnvPath?: string;\n    errorStrategy?: 'throw' | 'log' | 'silent';\n};\n```\n\n## Error Handling\n\nThree strategies available:\n- `throw`: Throws an error (default)\n- `log`: Logs errors to console\n- `silent`: Continues silently\n\n```typescript\nloadEnv({\n  schema: envSchema,\n  errorStrategy: 'throw' | 'log' | 'silent'\n});\n```\n\n## Type Safety\n\nFull TypeScript support with Zod schema inference:\n\n```typescript\nconst envSchema = z.object({\n  PORT: z.number()\n});\n\nconst env = loadEnv({ schema: envSchema });\nenv.PORT // TypeScript knows this is a number\n```\n\n## License\n\nMIT","readmeFilename":"README.md"}