@lowerdeck/env 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,9 +1,15 @@
1
1
  {
2
2
  "name": "@lowerdeck/env",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
+ "files": [
8
+ "src/**",
9
+ "dist/**",
10
+ "README.md",
11
+ "package.json"
12
+ ],
7
13
  "author": "Tobias Herber",
8
14
  "license": "Apache 2",
9
15
  "type": "module",
@@ -21,14 +27,14 @@
21
27
  "scripts": {
22
28
  "test": "vitest run --passWithNoTests",
23
29
  "lint": "prettier src/**/*.ts --check",
24
- "build": "microbundle"
30
+ "build": "rm -rf ./dist && microbundle"
25
31
  },
26
32
  "dependencies": {
27
- "@lowerdeck/validation": "^1.0.3"
33
+ "@lowerdeck/validation": "^1.0.8"
28
34
  },
29
35
  "devDependencies": {
30
36
  "microbundle": "^0.15.1",
31
- "@lowerdeck/tsconfig": "^1.0.0",
37
+ "@lowerdeck/tsconfig": "^1.0.1",
32
38
  "typescript": "5.8.2",
33
39
  "vitest": "^3.1.2"
34
40
  }
@@ -1,11 +0,0 @@
1
-
2
- $ microbundle
3
- Build "@lowerdeck/env" to dist:
4
- 218 B: index.cjs.gz
5
- 164 B: index.cjs.br
6
- 212 B: index.module.js.gz
7
- 170 B: index.module.js.br
8
- 225 B: index.module.js.gz
9
- 175 B: index.module.js.br
10
- 304 B: index.umd.js.gz
11
- 267 B: index.umd.js.br
@@ -1,28 +0,0 @@
1
-
2
- $ vitest run --passWithNoTests
3
- [?25l
4
-  RUN  v3.2.4 /Users/tobias/code/metorial/metorial-enterprise/oss/src/packages/backend/env
5
-
6
- [?2026h
7
-  ❯ src/env.test.ts [queued]
8
-
9
-  Test Files 0 passed (1)
10
-  Tests 0 passed (0)
11
-  Start at 10:23:43
12
-  Duration 102ms
13
- [?2026l[?2026h
14
-  ❯ src/env.test.ts 0/1
15
-
16
-  Test Files 0 passed (1)
17
-  Tests 0 passed (1)
18
-  Start at 10:23:43
19
-  Duration 303ms
20
- [?2026l ✓ src/env.test.ts (1 test) 2ms
21
- ✓ createValidatedEnv > validates env 1ms
22
-
23
-  Test Files  1 passed (1)
24
-  Tests  1 passed (1)
25
-  Start at  10:23:43
26
-  Duration  335ms (transform 97ms, setup 0ms, collect 128ms, tests 2ms, environment 0ms, prepare 37ms)
27
-
28
- [?25h
package/CHANGELOG.md DELETED
@@ -1,25 +0,0 @@
1
- # @lowerdeck/env
2
-
3
- ## 1.0.3
4
-
5
- ### Patch Changes
6
-
7
- - Fix default entry point
8
- - Updated dependencies
9
- - @lowerdeck/validation@1.0.3
10
-
11
- ## 1.0.2
12
-
13
- ### Patch Changes
14
-
15
- - update versions
16
- - Updated dependencies
17
- - @lowerdeck/validation@1.0.2
18
-
19
- ## 1.0.1
20
-
21
- ### Patch Changes
22
-
23
- - Fix exports
24
- - Updated dependencies
25
- - @lowerdeck/validation@1.0.1
@@ -1,2 +0,0 @@
1
- let e=e=>Object.fromEntries(Object.entries(e).map(([e,r])=>[e,Object.fromEntries(Object.entries(r).map(([e,r])=>{let t=r.validate(process.env[e]);if(!t.success)throw new Error(`ENV VALIDATION: ${e} - ${t.errors[0].message}`);return[e,t.value]}))]));export{e as createValidatedEnv};
2
- //# sourceMappingURL=index.modern.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.modern.js","sources":["../src/env.ts"],"sourcesContent":["import { ValidationType, ValidationTypeValue } from '@lowerdeck/validation';\n\nexport let createValidatedEnv = <\n Env extends Record<string, Record<string, ValidationType<any>>>\n>(\n env: Env\n): {\n [K in keyof Env]: {\n [P in keyof Env[K]]: ValidationTypeValue<Env[K][P]>;\n };\n} => {\n return Object.fromEntries(\n Object.entries(env).map(([key, value]) => [\n key,\n Object.fromEntries(\n Object.entries(value).map(([key, value]) => {\n let res = value.validate(process.env[key]);\n if (!res.success)\n throw new Error(`ENV VALIDATION: ${key} - ${res.errors[0].message}`);\n\n return [key, res.value];\n })\n )\n ])\n ) as any;\n};\n"],"names":["createValidatedEnv","env","Object","fromEntries","entries","map","key","value","res","validate","process","success","Error","errors","message"],"mappings":"AAEW,IAAAA,EAGTC,GAMOC,OAAOC,YACZD,OAAOE,QAAQH,GAAKI,IAAI,EAAEC,EAAKC,KAAW,CACxCD,EACAJ,OAAOC,YACLD,OAAOE,QAAQG,GAAOF,IAAI,EAAEC,EAAKC,MAC/B,IAAIC,EAAMD,EAAME,SAASC,QAAQT,IAAIK,IACrC,IAAKE,EAAIG,QACP,MAAU,IAAAC,MAAM,mBAAmBN,OAASE,EAAIK,OAAO,GAAGC,WAE5D,MAAO,CAACR,EAAKE,EAAID"}
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "extends": "@lowerdeck/tsconfig/base.json",
4
- "exclude": ["dist"],
5
- "include": ["src"],
6
- "compilerOptions": {
7
- "outDir": "dist",
8
- "lib": ["es2021"],
9
- "target": "ES2019"
10
- }
11
- }