@sap-ux/fiori-freestyle-writer 2.1.9 → 2.2.0
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/generateOPATests.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateOPATests = generateOPATests;
|
|
4
4
|
const ui5_test_writer_1 = require("@sap-ux/ui5-test-writer");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const i18n_1 = require("./i18n");
|
|
5
7
|
/**
|
|
6
8
|
* Adds test scripts to the package.json object.
|
|
7
9
|
*
|
|
@@ -29,16 +31,21 @@ function addTestScripts(packageJson, addMock) {
|
|
|
29
31
|
* @returns {Promise<Editor>} - The modified file system editor.
|
|
30
32
|
*/
|
|
31
33
|
async function generateOPATests(basePath, ffApp, addMock, packageJson, fs, log) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
if (ffApp.template.type === types_1.TemplateType.Basic) {
|
|
35
|
+
addTestScripts(packageJson, addMock);
|
|
36
|
+
const config = {
|
|
37
|
+
appId: ffApp.app.id,
|
|
38
|
+
applicationDescription: ffApp.app.description,
|
|
39
|
+
applicationTitle: ffApp.app.title,
|
|
40
|
+
viewName: ffApp.template.settings.viewName,
|
|
41
|
+
ui5Theme: ffApp.ui5?.ui5Theme,
|
|
42
|
+
ui5Version: ffApp.ui5?.version,
|
|
43
|
+
enableTypeScript: ffApp.appOptions?.typescript
|
|
44
|
+
};
|
|
45
|
+
await (0, ui5_test_writer_1.generateFreestyleOPAFiles)(basePath, config, fs, log);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
log?.info((0, i18n_1.t)('info.unsupportedTestTemplateMessage', { templateType: ffApp.template.type }));
|
|
49
|
+
}
|
|
43
50
|
}
|
|
44
51
|
//# sourceMappingURL=generateOPATests.js.map
|
package/dist/index.js
CHANGED
|
@@ -98,7 +98,7 @@ async function generate(basePath, data, fs, log) {
|
|
|
98
98
|
startFile: data?.app?.startFile,
|
|
99
99
|
localStartFile: data?.app?.localStartFile,
|
|
100
100
|
generateIndex: ffApp.appOptions?.generateIndex,
|
|
101
|
-
addTest: addTests
|
|
101
|
+
addTest: addTests && ffApp.template.type === types_1.TemplateType.Basic
|
|
102
102
|
})
|
|
103
103
|
};
|
|
104
104
|
if (addTests) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"info": {
|
|
3
|
-
"mockOnlyWarning": "This application was generated with a local metadata file and does not reference a live server. Please add the required server configuration or start this application with mock data using the target: npm run start-mock"
|
|
3
|
+
"mockOnlyWarning": "This application was generated with a local metadata file and does not reference a live server. Please add the required server configuration or start this application with mock data using the target: npm run start-mock",
|
|
4
|
+
"unsupportedTestTemplateMessage": "The specified template '{{ templateType }}' is not supported for test generation. Generation will continue but the test files will not be generated."
|
|
4
5
|
}
|
|
5
6
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-freestyle-writer",
|
|
3
3
|
"description": "SAP Fiori freestyle application writer",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"mem-fs-editor": "9.4.0",
|
|
28
28
|
"read-pkg-up": "7.0.1",
|
|
29
29
|
"semver": "7.5.4",
|
|
30
|
-
"@sap-ux/odata-service-writer": "0.26.
|
|
30
|
+
"@sap-ux/odata-service-writer": "0.26.9",
|
|
31
31
|
"@sap-ux/ui5-application-writer": "1.3.1",
|
|
32
32
|
"@sap-ux/ui5-config": "0.26.3",
|
|
33
|
-
"@sap-ux/fiori-generator-shared": "0.9.
|
|
34
|
-
"@sap-ux/cap-config-writer": "0.9.
|
|
33
|
+
"@sap-ux/fiori-generator-shared": "0.9.7",
|
|
34
|
+
"@sap-ux/cap-config-writer": "0.9.18",
|
|
35
35
|
"@sap-ux/ui5-test-writer": "0.6.1",
|
|
36
36
|
"@sap-ux/logger": "0.6.0"
|
|
37
37
|
},
|