@sap-ux/fiori-docs-embeddings 0.5.1 → 1.0.1
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/data/embeddings/documents_000.lance/_transactions/{0-1a880984-d967-45d5-8a78-bd7b5b72099a.txn → 0-6825d769-a2cc-4ac7-8564-832013613cc0.txn} +0 -0
- package/data/embeddings/documents_000.lance/_versions/1.manifest +0 -0
- package/data/embeddings/documents_000.lance/data/{5fe65291-14f7-495b-9cd3-1529d1daee70.lance → a288f3e6-3af0-4671-b4a9-1552dca642b7.lance} +0 -0
- package/data/embeddings/metadata.json +3 -3
- package/data/embeddings/table_index.json +1 -1
- package/data/index.js +1 -4
- package/index.js +12 -38
- package/package.json +7 -5
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"createdAt": "2026-
|
|
3
|
+
"createdAt": "2026-06-04T11:06:17.796Z",
|
|
4
4
|
"model": "Xenova/all-MiniLM-L6-v2",
|
|
5
5
|
"dimensions": 384,
|
|
6
|
-
"totalVectors":
|
|
7
|
-
"totalDocuments":
|
|
6
|
+
"totalVectors": 749,
|
|
7
|
+
"totalDocuments": 749,
|
|
8
8
|
"chunkSize": 2000,
|
|
9
9
|
"chunkOverlap": 100
|
|
10
10
|
}
|
package/data/index.js
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
* Data directory access point for @sap-ux/fiori-docs-embeddings
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
import { dirname } from 'path';
|
|
7
5
|
|
|
8
|
-
const
|
|
9
|
-
const __dirname = dirname(__filename);
|
|
6
|
+
const __dirname = import.meta.dirname;
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* Export the current directory path (data directory)
|
package/index.js
CHANGED
|
@@ -3,61 +3,35 @@
|
|
|
3
3
|
* Provides access to SAP Fiori documentation embeddings and related data
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { stat } from 'fs/promises';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
function getDataPath() {
|
|
9
|
+
const __dirname = import.meta.dirname;
|
|
10
|
+
|
|
11
|
+
export function getDataPath() {
|
|
13
12
|
return path.join(__dirname, 'data');
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
* Get the path to the embeddings directory
|
|
18
|
-
* @returns {string} Absolute path to embeddings directory
|
|
19
|
-
*/
|
|
20
|
-
function getEmbeddingsPath() {
|
|
15
|
+
export function getEmbeddingsPath() {
|
|
21
16
|
return path.join(__dirname, 'data', 'embeddings');
|
|
22
17
|
}
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
* Get the path to the search data directory
|
|
26
|
-
* @returns {string} Absolute path to search directory
|
|
27
|
-
*/
|
|
28
|
-
function getSearchPath() {
|
|
19
|
+
export function getSearchPath() {
|
|
29
20
|
return path.join(__dirname, 'data', 'search');
|
|
30
21
|
}
|
|
31
22
|
|
|
32
|
-
|
|
33
|
-
* Get the path to the documentation data directory
|
|
34
|
-
* @returns {string} Absolute path to docs directory
|
|
35
|
-
*/
|
|
36
|
-
function getDocsPath() {
|
|
23
|
+
export function getDocsPath() {
|
|
37
24
|
return path.join(__dirname, 'data', 'docs');
|
|
38
25
|
}
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
* Check if embeddings data is available
|
|
42
|
-
* @returns {Promise<boolean>} True if embeddings are available
|
|
43
|
-
*/
|
|
44
|
-
async function hasEmbeddings() {
|
|
27
|
+
export async function hasEmbeddings() {
|
|
45
28
|
try {
|
|
46
|
-
const fs = require('fs/promises');
|
|
47
29
|
const embeddingsPath = getEmbeddingsPath();
|
|
48
|
-
const
|
|
49
|
-
return
|
|
30
|
+
const stats = await stat(embeddingsPath);
|
|
31
|
+
return stats.isDirectory();
|
|
50
32
|
} catch {
|
|
51
33
|
return false;
|
|
52
34
|
}
|
|
53
35
|
}
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
getDataPath,
|
|
57
|
-
getEmbeddingsPath,
|
|
58
|
-
getSearchPath,
|
|
59
|
-
getDocsPath,
|
|
60
|
-
hasEmbeddings
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
module.exports.default = getDataPath;
|
|
37
|
+
export default getDataPath;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-docs-embeddings",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "SAP Fiori documentation indexing",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -10,6 +11,7 @@
|
|
|
10
11
|
"private": false,
|
|
11
12
|
"dependencies": {},
|
|
12
13
|
"devDependencies": {
|
|
14
|
+
"@jest/globals": "30.3.0",
|
|
13
15
|
"@npm/types": "2.1.0",
|
|
14
16
|
"@types/node": "22.13.14",
|
|
15
17
|
"@lancedb/lancedb": "0.22.0",
|
|
@@ -18,10 +20,10 @@
|
|
|
18
20
|
"node-fetch": "^3.3.2",
|
|
19
21
|
"marked": "^12.0.0",
|
|
20
22
|
"gray-matter": "^4.0.3",
|
|
21
|
-
"fast-xml-parser": "5.
|
|
23
|
+
"fast-xml-parser": "5.8.0",
|
|
22
24
|
"tsx": "^4.7.0",
|
|
23
|
-
"@sap-ux/logger": "0.
|
|
24
|
-
"@sap-ux/create": "0.
|
|
25
|
+
"@sap-ux/logger": "1.0.1",
|
|
26
|
+
"@sap-ux/create": "1.0.9"
|
|
25
27
|
},
|
|
26
28
|
"keywords": [
|
|
27
29
|
"mcp",
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
"clean-embeddings": "rm -rf dist data/embeddings",
|
|
59
61
|
"clean-data": "rm -rf dist data/docs data/search",
|
|
60
62
|
"clean": "npm-run-all -l -s clean-data clean-embeddings",
|
|
61
|
-
"test": "jest --passWithNoTests --silent",
|
|
63
|
+
"test": "cross-env \"NODE_OPTIONS=--experimental-vm-modules --max-old-space-size=8192\" jest --passWithNoTests --silent",
|
|
62
64
|
"lint": "eslint",
|
|
63
65
|
"lint:fix": "eslint --fix"
|
|
64
66
|
}
|