@swarmvaultai/cli 0.2.2 → 0.3.0
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/index.js +13 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getWatchStatus,
|
|
20
20
|
importInbox,
|
|
21
21
|
ingestDirectory,
|
|
22
|
-
|
|
22
|
+
ingestInputDetailed,
|
|
23
23
|
initVault,
|
|
24
24
|
installAgent,
|
|
25
25
|
installGitHooks,
|
|
@@ -221,9 +221,9 @@ program.name("swarmvault").description("SwarmVault is a local-first knowledge co
|
|
|
221
221
|
function readCliVersion() {
|
|
222
222
|
try {
|
|
223
223
|
const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
224
|
-
return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "0.
|
|
224
|
+
return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "0.3.0";
|
|
225
225
|
} catch {
|
|
226
|
-
return "0.
|
|
226
|
+
return "0.3.0";
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
function parsePositiveInt(value, fallback) {
|
|
@@ -314,11 +314,18 @@ program.command("ingest").description("Ingest a local file path, directory path,
|
|
|
314
314
|
}
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
|
-
const
|
|
317
|
+
const ingest = await ingestInputDetailed(process2.cwd(), input, commonOptions);
|
|
318
318
|
if (isJson()) {
|
|
319
|
-
emitJson(
|
|
319
|
+
emitJson(ingest);
|
|
320
320
|
} else {
|
|
321
|
-
|
|
321
|
+
const primary = [...ingest.created, ...ingest.updated, ...ingest.unchanged][0];
|
|
322
|
+
if (ingest.created.length + ingest.updated.length + ingest.removed.length <= 1 && primary) {
|
|
323
|
+
log(primary.sourceId);
|
|
324
|
+
} else {
|
|
325
|
+
log(
|
|
326
|
+
`Created ${ingest.created.length}, updated ${ingest.updated.length}, unchanged ${ingest.unchanged.length}, removed ${ingest.removed.length}.`
|
|
327
|
+
);
|
|
328
|
+
}
|
|
322
329
|
}
|
|
323
330
|
}
|
|
324
331
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swarmvaultai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Global CLI for SwarmVault.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"node": ">=24.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@swarmvaultai/engine": "0.
|
|
41
|
+
"@swarmvaultai/engine": "0.3.0",
|
|
42
42
|
"commander": "^14.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|