@carllee1983/dbcli 1.44.0 → 1.44.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.
package/dist/core.mjs CHANGED
@@ -21714,6 +21714,7 @@ class ConfigError extends Error {
21714
21714
  }
21715
21715
  }
21716
21716
  // src/agent-core/env-loader.ts
21717
+ import { readFile as readFile3 } from "fs/promises";
21717
21718
  function parseEnvContent(content) {
21718
21719
  const entries = [];
21719
21720
  for (const line of content.split(`
@@ -21734,10 +21735,17 @@ function parseEnvContent(content) {
21734
21735
  return entries;
21735
21736
  }
21736
21737
  async function loadEnvFile(filePath) {
21737
- const file = Bun.file(filePath);
21738
- if (!await file.exists())
21739
- throw new ConfigError(`\u627E\u4E0D\u5230 env \u6A94\u6848\uFF1A${filePath}`);
21740
- for (const [key, value] of parseEnvContent(await file.text())) {
21738
+ let content;
21739
+ try {
21740
+ content = await readFile3(filePath, "utf8");
21741
+ } catch (cause) {
21742
+ const code = cause.code;
21743
+ if (code === "ENOENT" || code === "EISDIR") {
21744
+ throw new ConfigError(`\u627E\u4E0D\u5230 env \u6A94\u6848\uFF1A${filePath}`);
21745
+ }
21746
+ throw cause;
21747
+ }
21748
+ for (const [key, value] of parseEnvContent(content)) {
21741
21749
  if (process.env[key] === undefined)
21742
21750
  process.env[key] = value;
21743
21751
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbcli-agent",
3
- "version": "1.43.0",
3
+ "version": "1.44.1",
4
4
  "description": "Database CLI skill and command reference for AI agents.",
5
5
  "contextFileName": "AGENTS.md"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carllee1983/dbcli",
3
- "version": "1.44.0",
3
+ "version": "1.44.1",
4
4
  "description": "Database CLI for AI agents",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbcli-agent",
3
- "version": "1.43.0",
3
+ "version": "1.44.1",
4
4
  "description": "Database CLI skill and command reference for AI agents",
5
5
  "author": {
6
6
  "name": "Carl Lee",