@razvan11/paladin 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -20876,10 +20876,15 @@ function validator() {
20876
20876
  };
20877
20877
  }
20878
20878
  // src/functions/env.ts
20879
+ var getContainer7 = () => globalThis.container;
20879
20880
  function env2() {
20880
20881
  return (target, propertyKey) => {
20881
20882
  const envVar = String(propertyKey).toUpperCase();
20882
20883
  const value = Bun.env[envVar];
20884
+ if (value) {
20885
+ const container3 = getContainer7();
20886
+ container3.bind(propertyKey).toConstantValue(value);
20887
+ }
20883
20888
  Object.defineProperty(target, propertyKey, {
20884
20889
  value,
20885
20890
  writable: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razvan11/paladin",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "A Bun-based backend framework with decorators, dependency injection, and controller registration",
5
5
  "keywords": [
6
6
  "bun",
@@ -63,4 +63,4 @@
63
63
  "reflect-metadata": "^0.2.2",
64
64
  "zod": "^4.2.1"
65
65
  }
66
- }
66
+ }