@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.
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "createdAt": "2026-05-21T06:00:19.944Z",
3
+ "createdAt": "2026-06-04T11:06:17.796Z",
4
4
  "model": "Xenova/all-MiniLM-L6-v2",
5
5
  "dimensions": 384,
6
- "totalVectors": 740,
7
- "totalDocuments": 740,
6
+ "totalVectors": 749,
7
+ "totalDocuments": 749,
8
8
  "chunkSize": 2000,
9
9
  "chunkOverlap": 100
10
10
  }
@@ -4,5 +4,5 @@
4
4
  ],
5
5
  "totalTables": 1,
6
6
  "maxVectorsPerTable": 5000,
7
- "totalVectors": 740
7
+ "totalVectors": 749
8
8
  }
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 __filename = fileURLToPath(import.meta.url);
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
- const path = require('path');
6
+ import path from 'path';
7
+ import { stat } from 'fs/promises';
7
8
 
8
- /**
9
- * Get the path to the data directory
10
- * @returns {string} Absolute path to data directory
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 stat = await fs.stat(embeddingsPath);
49
- return stat.isDirectory();
30
+ const stats = await stat(embeddingsPath);
31
+ return stats.isDirectory();
50
32
  } catch {
51
33
  return false;
52
34
  }
53
35
  }
54
36
 
55
- module.exports = {
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.5.1",
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.7.2",
23
+ "fast-xml-parser": "5.8.0",
22
24
  "tsx": "^4.7.0",
23
- "@sap-ux/logger": "0.9.0",
24
- "@sap-ux/create": "0.16.5"
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
  }