semantic-atlas 0.1.3 → 0.1.4

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/cli/bin.js CHANGED
@@ -1,29 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn } from "node:child_process";
3
3
  import { fileURLToPath } from "node:url";
4
+ import { createSqliteCompatibilityArguments, requiresSqliteCompatibilityProcess, } from "../runtime/sqlite-compatibility-process.js";
4
5
  const arguments_ = process.argv.slice(2);
5
- if (requiresSqliteCompatibilityProcess()) {
6
+ if (requiresSqliteCompatibilityProcess({
7
+ nodeVersion: process.versions.node,
8
+ execArguments: process.execArgv,
9
+ sqliteAvailable: process.getBuiltinModule("node:sqlite") !== undefined,
10
+ })) {
6
11
  process.exitCode = await runWithExperimentalSqlite(arguments_);
7
12
  }
8
13
  else {
9
14
  const { runCli } = await import("./main.js");
10
15
  process.exitCode = await runCli(arguments_, { stdin: process.stdin, stdout: process.stdout, stderr: process.stderr }, process.cwd());
11
16
  }
12
- function requiresSqliteCompatibilityProcess() {
13
- const nodeMajor = Number.parseInt(process.versions.node, 10);
14
- const warningAlreadyDisabled = process.execArgv.some((argument) => (argument === "--no-warnings"
15
- || argument === "--disable-warning=ExperimentalWarning"));
16
- if (nodeMajor < 24 && !warningAlreadyDisabled)
17
- return true;
18
- return process.getBuiltinModule("node:sqlite") === undefined;
19
- }
20
17
  async function runWithExperimentalSqlite(arguments_) {
21
- const child = spawn(process.execPath, [
22
- "--experimental-sqlite",
23
- "--disable-warning=ExperimentalWarning",
24
- fileURLToPath(import.meta.url),
25
- ...arguments_,
26
- ], { stdio: "inherit" });
18
+ const child = spawn(process.execPath, createSqliteCompatibilityArguments(fileURLToPath(import.meta.url), arguments_), { stdio: "inherit" });
27
19
  return new Promise((resolve, reject) => {
28
20
  child.once("error", reject);
29
21
  child.once("close", (code) => resolve(code ?? 1));
@@ -0,0 +1,8 @@
1
+ export interface SqliteRuntimeState {
2
+ readonly nodeVersion: string;
3
+ readonly execArguments: readonly string[];
4
+ readonly sqliteAvailable: boolean;
5
+ }
6
+ export declare function requiresSqliteCompatibilityProcess(runtime: SqliteRuntimeState): boolean;
7
+ export declare function createSqliteCompatibilityArguments(entryPoint: string, applicationArguments: readonly string[], inheritedExecArguments?: readonly string[]): readonly string[];
8
+ //# sourceMappingURL=sqlite-compatibility-process.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-compatibility-process.d.ts","sourceRoot":"","sources":["../../src/runtime/sqlite-compatibility-process.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAWvF;AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,EAClB,oBAAoB,EAAE,SAAS,MAAM,EAAE,EACvC,sBAAsB,GAAE,SAAS,MAAM,EAAO,GAC7C,SAAS,MAAM,EAAE,CAYnB"}
@@ -0,0 +1,20 @@
1
+ export function requiresSqliteCompatibilityProcess(runtime) {
2
+ const nodeMajor = Number.parseInt(runtime.nodeVersion, 10);
3
+ const warningAlreadyDisabled = runtime.execArguments.some((argument) => (argument === "--no-warnings"
4
+ || argument === "--disable-warning=ExperimentalWarning"));
5
+ if (nodeMajor < 24 && !warningAlreadyDisabled) {
6
+ return true;
7
+ }
8
+ return !runtime.sqliteAvailable;
9
+ }
10
+ export function createSqliteCompatibilityArguments(entryPoint, applicationArguments, inheritedExecArguments = []) {
11
+ const loaderArguments = inheritedExecArguments.filter((argument) => (argument !== "--experimental-sqlite"
12
+ && argument !== "--no-experimental-sqlite"));
13
+ return [
14
+ "--experimental-sqlite",
15
+ "--disable-warning=ExperimentalWarning",
16
+ ...loaderArguments,
17
+ entryPoint,
18
+ ...applicationArguments,
19
+ ];
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-atlas",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "A local, revision-aware project world model for AI coding agents.",
5
5
  "keywords": [
6
6
  "ai-agents",