raiton 6.3.0-beta.10 → 6.3.1-beta.11

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,3 +1,9 @@
1
+ ## [6.3.1-beta.11](https://github.com/protorians/raiton/compare/v6.3.0-beta.10...v6.3.1-beta.11) (2026-08-30)
2
+
3
+ ### Bug Fixes
4
+
5
+ * refactor: improve `env` function type handling and ensure consistent value parsing ([f855d1e](https://github.com/protorians/raiton/commit/f855d1effc6c8c81beef73dbbaccbcbe7bcc9cc1))
6
+
1
7
  ## [6.3.0-beta.10](https://github.com/protorians/raiton/compare/v6.1.1-beta.5...v6.3.0-beta.10) (2026-08-29)
2
8
 
3
9
  ### Features
@@ -4819,7 +4819,7 @@ var {
4819
4819
  Help
4820
4820
  } = import__.default;
4821
4821
  // package.json
4822
- var version = "6.3.0-beta.10";
4822
+ var version = "6.3.1-beta.11";
4823
4823
 
4824
4824
  // source/bin/cli.ts
4825
4825
  var CLI = new Command;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "raiton",
3
- "version": "6.3.0-beta.10",
3
+ "version": "6.3.1-beta.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Modular TypeScript Backend Framework with Dependency Injection, Plugins, Controllers, Middleware and Hot Reloading.",
@@ -1,7 +1,7 @@
1
1
  import {GenericValueType} from "../types/generic";
2
2
  import {getType} from "./utilities";
3
3
 
4
- export function env<T>(key: string, defaultValue?: string, type?: GenericValueType): T | undefined {
4
+ export function env<T>(key: string, defaultValue?: T, type?: GenericValueType): T | undefined {
5
5
  const value = process.env[key] || defaultValue;
6
6
  type = type || getType(value) as GenericValueType;
7
7
 
@@ -9,16 +9,16 @@ export function env<T>(key: string, defaultValue?: string, type?: GenericValueTy
9
9
  switch (type) {
10
10
 
11
11
  case "bigInt":
12
- return BigInt(value) as any;
12
+ return BigInt(value.toString()) as any;
13
13
 
14
14
  case 'float':
15
- return parseFloat(value) as any;
15
+ return parseFloat(value.toString()) as any;
16
16
 
17
17
  case 'boolean':
18
18
  return Boolean(value) as any;
19
19
 
20
20
  case "int":
21
- return parseInt(value) as any;
21
+ return parseInt(value.toString()) as any;
22
22
 
23
23
  default:
24
24
  return value as any;