@s-hirano-ist/s-scripts 1.15.0 → 1.16.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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import "dotenv/config";
3
+ //# sourceMappingURL=delete-collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-collection.d.ts","sourceRoot":"","sources":["../../src/rag/delete-collection.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC"}
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ import "dotenv/config";
3
+ import { deleteCollection, getQdrantClient, } from "@s-hirano-ist/s-search/qdrant-client";
4
+ async function main() {
5
+ const collectionName = process.argv[2];
6
+ if (!collectionName) {
7
+ console.error("Usage: rag-delete-collection <collection-name>\nExample: rag-delete-collection knowledge_v1");
8
+ process.exit(1);
9
+ }
10
+ if (!process.env.QDRANT_URL) {
11
+ throw new Error("QDRANT_URL environment variable is required.");
12
+ }
13
+ const qdrant = getQdrantClient();
14
+ const collections = await qdrant.getCollections();
15
+ const exists = collections.collections.some((c) => c.name === collectionName);
16
+ if (!exists) {
17
+ console.log(`Collection "${collectionName}" does not exist. Nothing to delete.`);
18
+ return;
19
+ }
20
+ console.log(`Deleting collection "${collectionName}"...`);
21
+ await deleteCollection(collectionName);
22
+ console.log(`Collection "${collectionName}" deleted successfully.`);
23
+ }
24
+ main().catch((error) => {
25
+ console.error("Failed to delete collection:", error);
26
+ process.exit(1);
27
+ });
28
+ //# sourceMappingURL=delete-collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-collection.js","sourceRoot":"","sources":["../../src/rag/delete-collection.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EACN,gBAAgB,EAChB,eAAe,GACf,MAAM,sCAAsC,CAAC;AAE9C,KAAK,UAAU,IAAI;IAClB,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvC,IAAI,CAAC,cAAc,EAAE,CAAC;QACrB,OAAO,CAAC,KAAK,CACZ,6FAA6F,CAC7F,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IACjC,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,cAAc,EAAE,CAAC;IAClD,MAAM,MAAM,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;IAE9E,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CACV,eAAe,cAAc,sCAAsC,CACnE,CAAC;QACF,OAAO;IACR,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,wBAAwB,cAAc,MAAM,CAAC,CAAC;IAC1D,MAAM,gBAAgB,CAAC,cAAc,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,eAAe,cAAc,yBAAyB,CAAC,CAAC;AACrE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACtB,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s-hirano-ist/s-scripts",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "CLI scripts for s-private data operations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,6 +9,7 @@
9
9
  "fetch-images": "./dist/fetch-images.js",
10
10
  "fetch-notes": "./dist/fetch-notes.js",
11
11
  "find-duplicate-json-articles": "./dist/find-duplicate-json-articles.js",
12
+ "rag-delete-collection": "./dist/rag/delete-collection.js",
12
13
  "rag-ingest": "./dist/rag/ingest.js",
13
14
  "rag-search": "./dist/rag/search.js",
14
15
  "reset-articles": "./dist/reset-articles.js",
@@ -42,21 +43,21 @@
42
43
  "access": "public"
43
44
  },
44
45
  "dependencies": {
45
- "dotenv": "16.5.0",
46
- "glob": "13.0.0",
47
- "jsdom": "27.4.0",
48
- "sharp": "0.33.5",
46
+ "dotenv": "17.3.1",
47
+ "glob": "13.0.3",
48
+ "jsdom": "28.0.0",
49
+ "sharp": "0.34.5",
49
50
  "iconv-lite": "0.7.2",
50
51
  "turndown": "7.2.2",
51
- "@s-hirano-ist/s-core": "1.15.0",
52
- "@s-hirano-ist/s-database": "1.15.0",
53
- "@s-hirano-ist/s-notification": "1.15.0",
54
- "@s-hirano-ist/s-search": "1.15.0",
55
- "@s-hirano-ist/s-storage": "1.15.0"
52
+ "@s-hirano-ist/s-core": "1.16.0",
53
+ "@s-hirano-ist/s-database": "1.16.0",
54
+ "@s-hirano-ist/s-search": "1.16.0",
55
+ "@s-hirano-ist/s-notification": "1.16.0",
56
+ "@s-hirano-ist/s-storage": "1.16.0"
56
57
  },
57
58
  "devDependencies": {
58
59
  "@types/jsdom": "27.0.0",
59
- "@types/node": "24.10.9",
60
+ "@types/node": "24.10.13",
60
61
  "@types/turndown": "5.0.6",
61
62
  "tsc-esm-fix": "3.1.2",
62
63
  "tsx": "4.21.0",
@@ -71,6 +72,7 @@
71
72
  "fetch-images": "tsx src/fetch-images.ts",
72
73
  "fetch-notes": "tsx src/fetch-notes.ts",
73
74
  "find-duplicate-json-articles": "tsx src/find-duplicate-json-articles.ts",
75
+ "rag-delete-collection": "tsx src/rag/delete-collection.ts",
74
76
  "rag-ingest": "tsx src/rag/ingest.ts",
75
77
  "rag-search": "tsx src/rag/search.ts",
76
78
  "reset-articles": "tsx src/reset-articles.ts",