lua-cli 2.2.0 → 2.2.2

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/dist/skill.js CHANGED
@@ -2,6 +2,8 @@ import { assertValidToolName } from "./types/index.js";
2
2
  import fs from "fs";
3
3
  import path from "path";
4
4
  import yaml from "js-yaml";
5
+ import dotenv from "dotenv";
6
+ dotenv.config();
5
7
  /**
6
8
  * Safe environment variable access function
7
9
  * Gets injected at runtime with skill-specific environment variables
@@ -21,6 +23,10 @@ export const env = (key) => {
21
23
  // Look for lua.skill.yaml in current directory and parent directories
22
24
  let currentDir = process.cwd();
23
25
  let yamlPath = null;
26
+ //check if in .env file
27
+ if (dotenv.config().parsed?.[key]) {
28
+ return dotenv.config().parsed?.[key];
29
+ }
24
30
  while (currentDir !== path.dirname(currentDir)) {
25
31
  const potentialPath = path.join(currentDir, 'lua.skill.yaml');
26
32
  if (fs.existsSync(potentialPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "Command-line interface for Lua AI platform - develop, test, and deploy LuaSkills with custom tools",
5
5
  "readmeFilename": "README.md",
6
6
  "main": "dist/index.js",
@@ -60,6 +60,7 @@
60
60
  ],
61
61
  "dependencies": {
62
62
  "commander": "^14.0.1",
63
+ "dotenv": "^17.2.3",
63
64
  "esbuild": "^0.25.10",
64
65
  "inquirer": "^12.9.6",
65
66
  "js-yaml": "^4.1.0",
@@ -19,7 +19,7 @@
19
19
  "axios": "^1.6.0",
20
20
  "inquirer": "^12.9.6",
21
21
  "js-yaml": "^4.1.0",
22
- "lua-cli": "2.2.0",
22
+ "lua-cli": "2.2.2",
23
23
  "openai": "^5.23.0",
24
24
  "uuid": "^13.0.0",
25
25
  "zod": "^3.24.1"