@sap-ux/ui5-library-reference-writer 0.2.18 → 0.2.19
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/helpers.js +5 -5
- package/package.json +3 -3
package/dist/helpers.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.updateManifest = updateManifest;
|
|
|
4
4
|
exports.updateYaml = updateYaml;
|
|
5
5
|
const ui5_config_1 = require("@sap-ux/ui5-config");
|
|
6
6
|
const project_access_1 = require("@sap-ux/project-access");
|
|
7
|
-
const
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
8
|
const constants_1 = require("./constants");
|
|
9
9
|
/**
|
|
10
10
|
* Updates manifest with references for the chosen reuse libs.
|
|
@@ -15,7 +15,7 @@ const constants_1 = require("./constants");
|
|
|
15
15
|
*/
|
|
16
16
|
async function updateManifest(projectPath, reuseLibs, fs) {
|
|
17
17
|
const webapp = await (0, project_access_1.getWebappPath)(projectPath);
|
|
18
|
-
const manifestPath = (0,
|
|
18
|
+
const manifestPath = (0, node_path_1.join)(webapp, 'manifest.json');
|
|
19
19
|
const manifest = fs.readJSON(manifestPath);
|
|
20
20
|
reuseLibs.forEach((lib) => {
|
|
21
21
|
const reuseType = lib.type === 'library' ? constants_1.ManifestReuseType.Library : constants_1.ManifestReuseType.Component;
|
|
@@ -37,7 +37,7 @@ async function updateManifest(projectPath, reuseLibs, fs) {
|
|
|
37
37
|
*/
|
|
38
38
|
function updateYaml(projectPath, reuseLibs, fs) {
|
|
39
39
|
constants_1.yamlFiles.forEach(async (yaml) => {
|
|
40
|
-
const yamlPath = (0,
|
|
40
|
+
const yamlPath = (0, node_path_1.join)(projectPath, yaml);
|
|
41
41
|
if (fs.exists(yamlPath)) {
|
|
42
42
|
const ui5Config = await ui5_config_1.UI5Config.newInstance(fs.read(yamlPath));
|
|
43
43
|
const serveStaticPaths = getServeStaticPaths(reuseLibs, projectPath);
|
|
@@ -59,14 +59,14 @@ function getServeStaticPaths(reuseLibs, projectPath) {
|
|
|
59
59
|
const reuseLibRefs = [
|
|
60
60
|
{
|
|
61
61
|
path: `/resources/${lib.name.replace(/\./g, '/')}`,
|
|
62
|
-
src: (0,
|
|
62
|
+
src: (0, node_path_1.relative)(projectPath, lib.path),
|
|
63
63
|
fallthrough: false
|
|
64
64
|
}
|
|
65
65
|
];
|
|
66
66
|
if (lib.uri) {
|
|
67
67
|
reuseLibRefs.push({
|
|
68
68
|
path: `${lib.uri.replace(/\/bsp\//g, '/ui5_ui5/')}`,
|
|
69
|
-
src: (0,
|
|
69
|
+
src: (0, node_path_1.relative)(projectPath, lib.path),
|
|
70
70
|
fallthrough: false
|
|
71
71
|
});
|
|
72
72
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
7
7
|
"directory": "packages/ui5-library-reference-writer"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.19",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"mem-fs": "2.1.0",
|
|
23
23
|
"mem-fs-editor": "9.4.0",
|
|
24
|
-
"@sap-ux/project-access": "1.32.
|
|
25
|
-
"@sap-ux/ui5-config": "0.29.
|
|
24
|
+
"@sap-ux/project-access": "1.32.3",
|
|
25
|
+
"@sap-ux/ui5-config": "0.29.7"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/fs-extra": "9.0.13",
|