@genesislcap/build-kit 14.191.0 → 14.191.1-dotenv.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.
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,UAAU,cAAe,GAAG,SAOxC,CAAC;AA0BF,eAAO,MAAM,UAAU,QAAS,YAAY,SAc3C,CAAC;AAGF,eAAO,MAAM,mBAAmB,aACpB,MAAM,EAAE,eACL,MAAM,YACT,SAAS,GAAG,MAAM,KAC3B,OAAO,MAAM,EAAE,MAAM,CAanB,CAAC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,UAAU,cAAe,GAAG,SAOxC,CAAC;AA0BF,eAAO,MAAM,UAAU,QAAS,YAAY,SAgB3C,CAAC;AAGF,eAAO,MAAM,mBAAmB,aACpB,MAAM,EAAE,eACL,MAAM,YACT,SAAS,GAAG,MAAM,KAC3B,OAAO,MAAM,EAAE,MAAM,CAanB,CAAC"}
package/dist/utils/env.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveDefineConfig = exports.setEnvVars = exports.setNodeEnv = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const consola_1 = tslib_1.__importDefault(require("consola"));
6
+ const dotenv_1 = tslib_1.__importDefault(require("dotenv"));
6
7
  const setNodeEnv = (targetEnv) => {
7
8
  const currentEnv = process.env.NODE_ENV;
8
9
  if (currentEnv && currentEnv !== targetEnv) {
@@ -32,6 +33,8 @@ const resolveEnvValue = (ctx, key, value) => {
32
33
  return value;
33
34
  };
34
35
  const setEnvVars = (ctx) => {
36
+ dotenv_1.default.config();
37
+ // TODO: test this prerelase
35
38
  const { env = '' } = ctx.cli.options;
36
39
  const envCombined = Array.isArray(env) ? env.join(',') : env;
37
40
  const vars = envCombined.split(',');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/build-kit",
3
3
  "description": "Build utilities & types",
4
- "version": "14.191.0",
4
+ "version": "14.191.1-dotenv.1",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -20,6 +20,7 @@
20
20
  "change-case": "^4.1.2",
21
21
  "consola": "^3.0.2",
22
22
  "defu": "^6.1.2",
23
+ "dotenv": "^16.4.5",
23
24
  "download-tarball": "2.0.0",
24
25
  "edit-json-file": "^1.7.0",
25
26
  "get-npm-tarball-url": "2.1.0",
@@ -36,7 +37,7 @@
36
37
  },
37
38
  "devDependencies": {
38
39
  "@esbuild-kit/cjs-loader": "2.4.2",
39
- "@genesislcap/foundation-testing": "14.191.0",
40
+ "@genesislcap/foundation-testing": "14.191.1-dotenv.1",
40
41
  "@types/http-proxy": "^1.17.8",
41
42
  "@types/node": "^20.8.7",
42
43
  "tsm": "^2.2.1",
@@ -51,5 +52,5 @@
51
52
  "publishConfig": {
52
53
  "access": "public"
53
54
  },
54
- "gitHead": "6cd41bf74649398b357228b168d779a5f86a55c8"
55
+ "gitHead": "a13b4bce29a8e2c0c79228ca81768988a2201a65"
55
56
  }