@sap-ux/ui5-library-writer 0.6.20 → 0.6.22
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/index.js +4 -4
- package/dist/options/typescript.js +4 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.generate = generate;
|
|
7
|
-
const
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
8
|
const mem_fs_1 = require("mem-fs");
|
|
9
9
|
const mem_fs_editor_1 = require("mem-fs-editor");
|
|
10
10
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
@@ -25,11 +25,11 @@ async function generate(basePath, ui5LibConfig, fs) {
|
|
|
25
25
|
fs = (0, mem_fs_editor_1.create)((0, mem_fs_1.create)());
|
|
26
26
|
}
|
|
27
27
|
const libInput = (0, data_1.mergeWithDefaults)(ui5LibConfig);
|
|
28
|
-
basePath = (0,
|
|
29
|
-
const tmplPath = (0,
|
|
28
|
+
basePath = (0, node_path_1.join)(basePath, libInput.libraryNamespace);
|
|
29
|
+
const tmplPath = (0, node_path_1.join)(__dirname, '..', 'templates');
|
|
30
30
|
const ignore = [reuseLib.typescript ? '**/*.js' : '**/*.ts'];
|
|
31
31
|
const templateVersionPath = (0, utils_1.getTemplateVersionPath)(reuseLib.frameworkVersion);
|
|
32
|
-
fs.copyTpl((0,
|
|
32
|
+
fs.copyTpl((0, node_path_1.join)(tmplPath, 'common', templateVersionPath, '**/*.*'), basePath, libInput, undefined, {
|
|
33
33
|
globOptions: { dot: true, ignore },
|
|
34
34
|
processDestinationPath: (filePath) => filePath
|
|
35
35
|
.replace('baselibrary', libInput.libraryNamespaceURI)
|
|
@@ -4,7 +4,7 @@ exports.enableTypescript = enableTypescript;
|
|
|
4
4
|
const ejs_1 = require("ejs");
|
|
5
5
|
const project_access_1 = require("@sap-ux/project-access");
|
|
6
6
|
const ui5_config_1 = require("@sap-ux/ui5-config");
|
|
7
|
-
const
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
8
|
const semver_1 = require("semver");
|
|
9
9
|
/**
|
|
10
10
|
* Enable typescript for the given input.
|
|
@@ -15,7 +15,7 @@ const semver_1 = require("semver");
|
|
|
15
15
|
* @param fs - the memfs editor instance
|
|
16
16
|
*/
|
|
17
17
|
async function enableTypescript(libInput, basePath, tmplPath, fs) {
|
|
18
|
-
const tsTmplDirPath = (0,
|
|
18
|
+
const tsTmplDirPath = (0, node_path_1.join)(tmplPath, 'optional', 'typescript');
|
|
19
19
|
const tsTmplFilePaths = await (0, project_access_1.getFilePaths)(tsTmplDirPath);
|
|
20
20
|
const tsLibInput = {
|
|
21
21
|
...libInput,
|
|
@@ -24,7 +24,7 @@ async function enableTypescript(libInput, basePath, tmplPath, fs) {
|
|
|
24
24
|
};
|
|
25
25
|
tsTmplFilePaths.forEach((tsTmplFilePath) => {
|
|
26
26
|
const relPath = tsTmplFilePath.replace(tsTmplDirPath, '');
|
|
27
|
-
const outPath = (0,
|
|
27
|
+
const outPath = (0, node_path_1.join)(basePath, relPath);
|
|
28
28
|
// Extend or add
|
|
29
29
|
if (!fs.exists(outPath)) {
|
|
30
30
|
fs.copyTpl(tsTmplFilePath, outPath, tsLibInput, undefined, {
|
|
@@ -39,7 +39,7 @@ async function enableTypescript(libInput, basePath, tmplPath, fs) {
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
// ui5 yaml
|
|
42
|
-
const ui5ConfigPath = (0,
|
|
42
|
+
const ui5ConfigPath = (0, node_path_1.join)(basePath, 'ui5.yaml');
|
|
43
43
|
const ui5Config = await ui5_config_1.UI5Config.newInstance(fs.read(ui5ConfigPath));
|
|
44
44
|
ui5Config.updateCustomMiddleware({
|
|
45
45
|
name: 'fiori-tools-appreload',
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aui5-library-writer"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.6.
|
|
12
|
+
"version": "0.6.22",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"files": [
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"mem-fs": "2.1.0",
|
|
30
30
|
"mem-fs-editor": "9.4.0",
|
|
31
31
|
"semver": "7.5.4",
|
|
32
|
-
"@sap-ux/project-access": "1.32.
|
|
33
|
-
"@sap-ux/ui5-config": "0.29.
|
|
32
|
+
"@sap-ux/project-access": "1.32.4",
|
|
33
|
+
"@sap-ux/ui5-config": "0.29.8"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/ejs": "3.1.2",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/mem-fs": "1.1.2",
|
|
41
41
|
"fs-extra": "10.0.0",
|
|
42
42
|
"@types/semver": "7.5.2",
|
|
43
|
-
"@sap-ux/eslint-plugin-fiori-tools": "0.6.
|
|
43
|
+
"@sap-ux/eslint-plugin-fiori-tools": "0.6.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsc --build",
|