@soulguard/core 0.1.0 → 0.1.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/package.json +1 -1
- package/src/cli.ts +2 -1
- package/src/glob.ts +4 -1
- package/src/system-ops-mock.ts +1 -0
- package/src/system-ops-node.ts +1 -0
- package/src/system-ops.ts +1 -0
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { resolve } from "node:path";
|
|
8
|
+
import { readFileSync } from "node:fs";
|
|
8
9
|
import { readFile } from "node:fs/promises";
|
|
9
10
|
import { LiveConsoleOutput } from "./console-live.js";
|
|
10
11
|
import { StatusCommand } from "./cli/status-command.js";
|
|
@@ -62,7 +63,7 @@ async function makeOptions(workspace: string): Promise<StatusOptions> {
|
|
|
62
63
|
const program = new Command()
|
|
63
64
|
.name("soulguard")
|
|
64
65
|
.description("Identity protection for AI agents")
|
|
65
|
-
.version("
|
|
66
|
+
.version(JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8")).version);
|
|
66
67
|
|
|
67
68
|
program
|
|
68
69
|
.command("status")
|
package/src/glob.ts
CHANGED
|
@@ -73,7 +73,10 @@ export async function resolvePatterns(
|
|
|
73
73
|
return err(result.error);
|
|
74
74
|
}
|
|
75
75
|
for (const match of result.value) {
|
|
76
|
-
|
|
76
|
+
const statResult = await ops.stat(match);
|
|
77
|
+
if (statResult.ok && !statResult.value.isDirectory) {
|
|
78
|
+
files.add(match);
|
|
79
|
+
}
|
|
77
80
|
}
|
|
78
81
|
} else {
|
|
79
82
|
files.add(pattern);
|
package/src/system-ops-mock.ts
CHANGED
package/src/system-ops-node.ts
CHANGED