@driveflux/env 1.2.3 → 1.4.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,SAAU,MAAM,iCAYnC,CAAA;AAED,eAAO,MAAM,UAAU,qDAWtB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,SAAU,MAAM,iCAYnC,CAAA;AAED,eAAO,MAAM,UAAU,qDAoBtB,CAAA"}
package/dist/index.js CHANGED
@@ -18,6 +18,10 @@ export const loadAllEnv = (basePath = process.cwd(), overwriteEnv = true)=>{
18
18
  // Load standard env files
19
19
  loadEnv(path.join(basePath, '.env'), overwriteEnv);
20
20
  loadEnv(path.join(basePath, '.env.local'), overwriteEnv);
21
+ // Default USE_ENV is development
22
+ if (!process.env.USE_ENV && (process.env.NODE_ENV === 'development' || !process.env.NODE_ENV)) {
23
+ process.env.USE_ENV = 'development';
24
+ }
21
25
  if (process.env.USE_ENV) {
22
26
  loadEnv(path.join(basePath, `.env.${process.env.USE_ENV}`), overwriteEnv);
23
27
  loadEnv(path.join(basePath, `.env.${process.env.USE_ENV}.local`), overwriteEnv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/env",
3
- "version": "1.2.3",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -15,12 +15,12 @@
15
15
  "dotenv": "^16.4.5"
16
16
  },
17
17
  "devDependencies": {
18
- "@driveflux/fab": "2.2.2",
19
- "@driveflux/tsconfig": "1.2.2",
18
+ "@driveflux/fab": "2.3.3",
19
+ "@driveflux/tsconfig": "1.3.0",
20
20
  "@swc/cli": "0.4.1-nightly.20240914",
21
- "@swc/core": "1.7.36",
21
+ "@swc/core": "1.7.39",
22
22
  "@types/lodash": "^4.17.12",
23
- "@types/node": "^22.7.7",
23
+ "@types/node": "^22.7.8",
24
24
  "del-cli": "^6.0.0",
25
25
  "typescript": "^5.6.3"
26
26
  },