@mean-weasel/lineage 0.1.9 → 0.1.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.10
4
+
5
+ - Fix `lineage db info` so installed CLI checks use the same stable/dev runtime SQLite defaults as `lineage start`.
6
+
3
7
  ## 0.1.9
4
8
 
5
9
  - Add runtime identity diagnostics in Settings so operators can see the active channel, version, Git SHA when available, SQLite path, and database counts.
@@ -3705,20 +3705,22 @@ function readOptions(args, name) {
3705
3705
  return values;
3706
3706
  }
3707
3707
  function resolveStartOptions(config, args) {
3708
- const runtimeDir = dataRoot(config.displayName);
3709
3708
  const rawPort = readOption(args, "--port") || process.env.PORT || String(config.defaultPort);
3710
3709
  const port = Number(rawPort);
3711
3710
  if (!Number.isInteger(port) || port < 1 || port > 65535) {
3712
3711
  throw new Error(`Invalid port: ${rawPort}`);
3713
3712
  }
3714
3713
  return {
3715
- dbPath: readOption(args, "--db") || process.env.LINEAGE_DB || join7(runtimeDir, `${config.binName}.sqlite`),
3714
+ dbPath: resolveCliDbPath(config, args),
3716
3715
  host: readOption(args, "--host") || process.env.HOST || config.defaultHost,
3717
3716
  json: args.includes("--json"),
3718
3717
  open: args.includes("--open"),
3719
3718
  port
3720
3719
  };
3721
3720
  }
3721
+ function resolveCliDbPath(config, args) {
3722
+ return readOption(args, "--db") || process.env.LINEAGE_DB || join7(dataRoot(config.displayName), `${config.binName}.sqlite`);
3723
+ }
3722
3724
  function formatLineageHelp(config) {
3723
3725
  return `${config.binName} ${packageVersion()}
3724
3726
 
@@ -4028,8 +4030,8 @@ function printDataResult(command, result, json) {
4028
4030
  console.log(String(result));
4029
4031
  }
4030
4032
  function runLineageDbCommand(config, command, args) {
4031
- const dbPath = readOption(args, "--db");
4032
- if (dbPath) process.env.LINEAGE_DB = dbPath;
4033
+ const dbPath = resolveCliDbPath(config, args);
4034
+ process.env.LINEAGE_DB = dbPath;
4033
4035
  if (command === "info") return getLineageRuntimeInfo({ channel: config.channel, dbPath });
4034
4036
  throw new Error(`Unknown db command: ${command}`);
4035
4037
  }