@sap-ux/fiori-freestyle-writer 2.5.105 → 2.7.2
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 +2 -1
- package/dist/index.js +18 -0
- package/package.json +10 -10
package/dist/generateOPATests.js
CHANGED
|
@@ -40,7 +40,8 @@ async function generateOPATests(basePath, ffApp, addMock, packageJson, fs, log)
|
|
|
40
40
|
viewName: ffApp.template.settings.viewName,
|
|
41
41
|
ui5Theme: ffApp.ui5?.ui5Theme,
|
|
42
42
|
ui5Version: ffApp.ui5?.version,
|
|
43
|
-
enableTypeScript: ffApp.appOptions?.typescript
|
|
43
|
+
enableTypeScript: ffApp.appOptions?.typescript,
|
|
44
|
+
useVirtualPreviewEndpoints: ffApp.appOptions?.useVirtualPreviewEndpoints
|
|
44
45
|
};
|
|
45
46
|
await (0, ui5_test_writer_1.generateFreestyleOPAFiles)(basePath, config, fs, log);
|
|
46
47
|
}
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
|
18
18
|
const utils_1 = require("./utils");
|
|
19
19
|
const cap_config_writer_1 = require("@sap-ux/cap-config-writer");
|
|
20
20
|
const generateOPATests_1 = require("./generateOPATests");
|
|
21
|
+
const ui5_test_writer_1 = require("@sap-ux/ui5-test-writer");
|
|
21
22
|
/**
|
|
22
23
|
* Generate a UI5 application based on the specified Fiori Freestyle floorplan template.
|
|
23
24
|
*
|
|
@@ -144,6 +145,23 @@ async function generate(basePath, data, fs, log) {
|
|
|
144
145
|
// apply cap updates when service is cap
|
|
145
146
|
await (0, cap_config_writer_1.applyCAPUpdates)(fs, ffApp.service.capService, settings);
|
|
146
147
|
}
|
|
148
|
+
if (isEdmxProjectType && addTests && ffApp.appOptions?.useVirtualPreviewEndpoints) {
|
|
149
|
+
// Explicit patterns are required because the freestyle template uses AllJourneys.js (JS) or *Journey.ts (TS)
|
|
150
|
+
// rather than the preview-middleware default pattern, and unit tests live under controller/ not the default path.
|
|
151
|
+
await (0, ui5_test_writer_1.addVirtualTestConfig)(basePath, [
|
|
152
|
+
{
|
|
153
|
+
framework: 'OPA5',
|
|
154
|
+
path: '/test/integration/opaTests.qunit.html',
|
|
155
|
+
pattern: isTypeScriptEnabled ? '/test/**/*Journey.*' : '/test/**/AllJourneys.*'
|
|
156
|
+
},
|
|
157
|
+
{ framework: 'Testsuite' },
|
|
158
|
+
{
|
|
159
|
+
framework: 'QUnit',
|
|
160
|
+
path: '/test/unit/unitTests.qunit.html',
|
|
161
|
+
pattern: '/test/unit/controller/*.{js,ts}'
|
|
162
|
+
}
|
|
163
|
+
], fs);
|
|
164
|
+
}
|
|
147
165
|
return fs;
|
|
148
166
|
}
|
|
149
167
|
var types_2 = require("./types");
|
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.7.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"mem-fs-editor": "9.4.0",
|
|
28
28
|
"read-pkg-up": "7.0.1",
|
|
29
29
|
"semver": "7.7.4",
|
|
30
|
-
"@sap-ux/odata-service-writer": "0.
|
|
31
|
-
"@sap-ux/ui5-application-writer": "1.
|
|
32
|
-
"@sap-ux/ui5-config": "0.
|
|
33
|
-
"@sap-ux/fiori-generator-shared": "0.
|
|
34
|
-
"@sap-ux/cap-config-writer": "0.
|
|
35
|
-
"@sap-ux/ui5-test-writer": "0.
|
|
36
|
-
"@sap-ux/logger": "0.
|
|
30
|
+
"@sap-ux/odata-service-writer": "0.32.0",
|
|
31
|
+
"@sap-ux/ui5-application-writer": "1.9.0",
|
|
32
|
+
"@sap-ux/ui5-config": "0.31.0",
|
|
33
|
+
"@sap-ux/fiori-generator-shared": "0.15.1",
|
|
34
|
+
"@sap-ux/cap-config-writer": "0.13.1",
|
|
35
|
+
"@sap-ux/ui5-test-writer": "0.9.2",
|
|
36
|
+
"@sap-ux/logger": "0.9.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/ejs": "3.1.5",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@types/mem-fs": "1.1.2",
|
|
44
44
|
"@types/semver": "7.7.1",
|
|
45
45
|
"fs-extra": "11.3.4",
|
|
46
|
-
"@sap-ux/eslint-plugin-fiori-tools": "10.
|
|
46
|
+
"@sap-ux/eslint-plugin-fiori-tools": "10.1.1"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
|
-
"node": ">=
|
|
49
|
+
"node": ">=22.x"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsc --build",
|