@blaxel/core 0.2.0-dev19 → 0.2.0-dev20

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.
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.env = void 0;
7
7
  /* eslint-disable */
8
+ const dotenv_1 = __importDefault(require("dotenv"));
8
9
  const toml_1 = __importDefault(require("toml"));
9
10
  const node_js_1 = require("./node.js");
10
11
  const secretEnv = {};
@@ -20,13 +21,8 @@ if (node_js_1.fs !== null) {
20
21
  catch (error) { }
21
22
  try {
22
23
  const secretFile = node_js_1.fs.readFileSync(".env", "utf8");
23
- secretFile.split("\n").forEach((line) => {
24
- if (line.startsWith("#")) {
25
- return;
26
- }
27
- const [key, value] = line.split("=");
28
- secretEnv[key] = value;
29
- });
24
+ const parsed = dotenv_1.default.parse(secretFile);
25
+ Object.assign(secretEnv, parsed);
30
26
  }
31
27
  catch (error) { }
32
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.2.0-dev19",
3
+ "version": "0.2.0-dev20",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",
@@ -56,6 +56,7 @@
56
56
  "@hey-api/client-fetch": "^0.10.0",
57
57
  "@modelcontextprotocol/sdk": "^1.11.0",
58
58
  "crypto": "^1.0.1",
59
+ "dotenv": "^16.5.0",
59
60
  "jwt-decode": "^4.0.0",
60
61
  "toml": "^3.0.0",
61
62
  "uuid": "^11.1.0",
@@ -71,6 +72,7 @@
71
72
  },
72
73
  "scripts": {
73
74
  "lint": "eslint src/",
75
+ "dev": "tsc --watch",
74
76
  "build": "tsc"
75
77
  }
76
78
  }