@sap-ux/project-access 2.1.3 → 2.1.5
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.
|
@@ -2,8 +2,9 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { mkdir, readdir } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { valid } from 'semver';
|
|
5
|
-
import { deleteModule, getModule,
|
|
5
|
+
import { deleteModule, getModule, loadModuleFromProject } from './module-loader.js';
|
|
6
6
|
import { getWebappPath } from './ui5-config.js';
|
|
7
|
+
import { getNodeModulesPath } from './dependencies.js';
|
|
7
8
|
import { getMinimumUI5Version } from './info.js';
|
|
8
9
|
import { FileName, fioriToolsDirectory, moduleCacheRoot } from '../constants.js';
|
|
9
10
|
import { readJSON, writeFile } from '../file/index.js';
|
|
@@ -196,15 +197,21 @@ export async function getSpecificationPath(root, options) {
|
|
|
196
197
|
const logger = options?.logger;
|
|
197
198
|
const moduleName = '@sap/ux-specification';
|
|
198
199
|
if (await hasSpecificationDevDependency(root)) {
|
|
199
|
-
const
|
|
200
|
+
const nodeModulesParent = getNodeModulesPath(root, moduleName);
|
|
201
|
+
if (!nodeModulesParent) {
|
|
202
|
+
throw new Error(`Module '${moduleName}' not found in node_modules for project '${root}'`);
|
|
203
|
+
}
|
|
200
204
|
logger?.debug(`Specification root found in project '${root}'`);
|
|
201
|
-
return
|
|
205
|
+
return join(nodeModulesParent, 'node_modules', moduleName);
|
|
202
206
|
}
|
|
203
207
|
await getSpecificationModuleFromCache(root, { logger });
|
|
204
208
|
const version = await getSpecificationVersion(root, { logger });
|
|
205
209
|
logger?.debug(`Specification not found in project '${root}', using path from cache with version '${version}'`);
|
|
206
210
|
const moduleRoot = join(moduleCacheRoot, moduleName, version);
|
|
207
|
-
const
|
|
208
|
-
|
|
211
|
+
const nodeModulesParent = getNodeModulesPath(moduleRoot, moduleName);
|
|
212
|
+
if (!nodeModulesParent) {
|
|
213
|
+
throw new Error(`Module '${moduleName}' not found in cache at '${moduleRoot}'`);
|
|
214
|
+
}
|
|
215
|
+
return join(nodeModulesParent, 'node_modules', moduleName);
|
|
209
216
|
}
|
|
210
217
|
//# sourceMappingURL=specification.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/project-access",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "Library to access SAP Fiori tools projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -24,24 +24,24 @@
|
|
|
24
24
|
"node": ">=22.x"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ui5/manifest": "1.
|
|
27
|
+
"@ui5/manifest": "1.88.0",
|
|
28
28
|
"fast-xml-parser": "5.8.0",
|
|
29
29
|
"findit2": "2.2.3",
|
|
30
30
|
"json-parse-even-better-errors": "5.0.0",
|
|
31
31
|
"mem-fs": "2.1.0",
|
|
32
32
|
"mem-fs-editor": "9.4.0",
|
|
33
|
-
"semver": "7.
|
|
34
|
-
"@sap-ux/i18n": "1.0.
|
|
35
|
-
"@sap-ux/ui5-config": "1.0.
|
|
33
|
+
"semver": "7.8.4",
|
|
34
|
+
"@sap-ux/i18n": "1.0.2",
|
|
35
|
+
"@sap-ux/ui5-config": "1.0.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@jest/globals": "30.
|
|
38
|
+
"@jest/globals": "30.4.1",
|
|
39
39
|
"@sap-ux/vocabularies-types": "0.15.0",
|
|
40
40
|
"@types/mem-fs": "1.1.2",
|
|
41
41
|
"@types/mem-fs-editor": "7.0.1",
|
|
42
42
|
"@types/semver": "7.7.1",
|
|
43
43
|
"vscode-uri": "3.1.0",
|
|
44
|
-
"@sap-ux/logger": "1.0.
|
|
44
|
+
"@sap-ux/logger": "1.0.2"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "tsc --build",
|