adaptive-extender 0.8.0 → 0.8.1

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/CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
+ ## 0.8.1 (28.11.2025)
2
+ - Added [environment](./src/node/environment.ts) module.
3
+
1
4
  ## 0.8.0 (03.11.2025)
2
5
  - Added missing documentation.
3
6
  - Used `ImplementationError` errors for parts where implementation is missing.
4
- - Added [controller](./src/core/controller.ts) module
7
+ - Added [controller](./src/core/controller.ts) module.
5
8
 
6
9
  ## 0.7.3 (20.10.2025)
7
10
  - Added module [archive](./src/web/archive.ts).
@@ -0,0 +1,8 @@
1
+ import "../core/index.js";
2
+ import "dotenv/config";
3
+ declare class Environment {
4
+ static get env(): Environment;
5
+ hasValue(key: string): boolean;
6
+ readValue(key: string): any;
7
+ }
8
+ export { Environment };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ import "../core/index.js";
3
+ import "dotenv/config";
4
+ //#region Environment
5
+ class Environment {
6
+ static get env() {
7
+ return new Environment();
8
+ }
9
+ hasValue(key) {
10
+ const { env } = process;
11
+ return (env[key] !== undefined);
12
+ }
13
+ readValue(key) {
14
+ const { env } = process;
15
+ const text = ReferenceError.suppress(env[key], `Key '${key}' at environment not registered`);
16
+ try {
17
+ return JSON.parse(text);
18
+ }
19
+ catch {
20
+ return text;
21
+ }
22
+ }
23
+ }
24
+ //#endregion
25
+ export { Environment };
26
+ //# sourceMappingURL=environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/node/environment.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AAEvB,qBAAqB;AACrB,MAAM,WAAW;IAChB,MAAM,KAAK,GAAG;QACb,OAAO,IAAI,WAAW,EAAE,CAAC;IAC1B,CAAC;IAED,QAAQ,CAAC,GAAW;QACnB,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,CAAC,GAAW;QACpB,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;QACxB,MAAM,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,iCAAiC,CAAC,CAAC;QAC7F,IAAI,CAAC;YACJ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;QAAC,MAAM,CAAC;YACR,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;CACD;AACD,YAAY;AAEZ,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from "../core/index.js";
2
+ export * from "./environment.js";
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
2
  export * from "../core/index.js";
3
+ export * from "./environment.js";
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adaptive-extender",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Adaptive library for JS/TS development environments",
5
5
  "type": "module",
6
6
  "main": "./dist/core/index.js",
@@ -59,5 +59,8 @@
59
59
  "jsdom": "^27.0.0",
60
60
  "typescript": "^5.9.2",
61
61
  "vitest": "^3.2.4"
62
+ },
63
+ "dependencies": {
64
+ "dotenv": "^17.2.3"
62
65
  }
63
66
  }