@pitininja/envious 1.0.1 → 1.0.2
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.envious = void 0;
|
|
7
7
|
require("dotenv/config");
|
|
8
|
-
const value_1 = require("@sinclair/typebox/value");
|
|
9
8
|
const os_1 = __importDefault(require("os"));
|
|
9
|
+
const value_1 = require("@sinclair/typebox/value");
|
|
10
10
|
const envious = (schema) => {
|
|
11
11
|
const parsed = value_1.Value.Convert(schema, process.env);
|
|
12
12
|
const errors = [...value_1.Value.Errors(schema, parsed)];
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,yBAAuB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,yBAAuB;AACvB,4CAAoB;AAEpB,mDAAgD;AAEzC,MAAM,OAAO,GAAG,CAAoB,MAAS,EAAa,EAAE;IAC/D,MAAM,MAAM,GAAG,aAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,CAAC,GAAG,aAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,IAAI,MAAM,CAAC,MAAM,EAAE;QACf,MAAM,qBAAqB,GAA6B,EAAE,CAAC;QAC3D,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;YACjC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC3C,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE;gBACpC,qBAAqB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;aAC1C;YACD,qBAAqB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;QACH,MAAM,cAAc,GAAa;YAC7B,+BAA+B;YAC/B,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,GAAG,CACxC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACnE;SACJ,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,YAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAChD;IACD,OAAO,aAAK,CAAC,IAAI,CACb;QACI,GAAG,MAAM;QACT,oBAAoB,EAAE,KAAK;KAC9B,EACD,MAAM,CACT,CAAC;AACN,CAAC,CAAC;AA3BW,QAAA,OAAO,WA2BlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pitininja/envious",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"homepage": "https://github.com/pitininja/envious",
|
|
6
6
|
"repository": {
|
|
@@ -16,21 +16,21 @@
|
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"main": "./dist/index.js",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@sinclair/typebox": "^0.
|
|
19
|
+
"@sinclair/typebox": "^0.30.2",
|
|
20
20
|
"dotenv": "^16.3.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@tsconfig/recommended": "^1.0.2",
|
|
24
|
-
"@types/node": "^20.4.
|
|
25
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
26
|
-
"@typescript-eslint/parser": "^6.
|
|
27
|
-
"eslint": "^8.
|
|
24
|
+
"@types/node": "^20.4.6",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
|
26
|
+
"@typescript-eslint/parser": "^6.2.1",
|
|
27
|
+
"eslint": "^8.46.0",
|
|
28
28
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
29
29
|
"eslint-config-airbnb-typescript": "^17.1.0",
|
|
30
|
-
"eslint-config-prettier": "^8.
|
|
31
|
-
"eslint-plugin-import": "^2.
|
|
30
|
+
"eslint-config-prettier": "^8.10.0",
|
|
31
|
+
"eslint-plugin-import": "^2.28.0",
|
|
32
32
|
"husky": "^8.0.3",
|
|
33
|
-
"prettier": "^3.0.
|
|
33
|
+
"prettier": "^3.0.1",
|
|
34
34
|
"typescript": "^5.1.6"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'dotenv/config';
|
|
2
|
+
import Os from 'os';
|
|
2
3
|
import { Static, TSchema } from '@sinclair/typebox';
|
|
3
4
|
import { Value } from '@sinclair/typebox/value';
|
|
4
|
-
import Os from 'os';
|
|
5
5
|
|
|
6
6
|
export const envious = <T extends TSchema>(schema: T): Static<T> => {
|
|
7
7
|
const parsed = Value.Convert(schema, process.env);
|