@sap-ux/create 0.11.57 → 0.11.61
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/cli/convert/preview.js +23 -8
- package/package.json +3 -3
|
@@ -10,14 +10,11 @@ const app_config_writer_1 = require("@sap-ux/app-config-writer");
|
|
|
10
10
|
*/
|
|
11
11
|
function addConvertPreviewCommand(cmd) {
|
|
12
12
|
cmd.command('preview-config [path]')
|
|
13
|
-
.option('-s, --simulate', 'simulate only do not write
|
|
13
|
+
.option('-s, --simulate', 'simulate only do not write')
|
|
14
14
|
.option('-v, --verbose', 'show verbose information')
|
|
15
15
|
.option('-t, --tests', 'also convert test suite and test runners')
|
|
16
16
|
.action(async (path, options) => {
|
|
17
|
-
|
|
18
|
-
(0, tracing_1.setLogLevelVerbose)();
|
|
19
|
-
}
|
|
20
|
-
await convertPreview(path, !!options.simulate, !!options.tests);
|
|
17
|
+
await convertPreview(path, options.simulate, options.tests, options.verbose);
|
|
21
18
|
});
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
@@ -26,13 +23,31 @@ function addConvertPreviewCommand(cmd) {
|
|
|
26
23
|
* @param {string} basePath - The path to the adaptation project.
|
|
27
24
|
* @param {boolean} simulate - If set to true, then no files will be written to the filesystem.
|
|
28
25
|
* @param {boolean} convertTests - If set to true, then test suite and test runners fill be included in the conversion.
|
|
26
|
+
* @param {boolean} verbose - If set to true, then verbose information will be logged.
|
|
29
27
|
*/
|
|
30
|
-
async function convertPreview(basePath, simulate, convertTests) {
|
|
31
|
-
|
|
28
|
+
async function convertPreview(basePath, simulate, convertTests, verbose = false) {
|
|
29
|
+
let logger = (0, tracing_1.getLogger)();
|
|
32
30
|
if (!basePath) {
|
|
33
31
|
basePath = process.cwd();
|
|
34
32
|
}
|
|
35
|
-
|
|
33
|
+
simulate =
|
|
34
|
+
simulate ??
|
|
35
|
+
(await (0, app_config_writer_1.simulatePrompt)().catch((error) => {
|
|
36
|
+
logger.error(error.message);
|
|
37
|
+
return process.exit(1);
|
|
38
|
+
}));
|
|
39
|
+
if (simulate || verbose) {
|
|
40
|
+
(0, tracing_1.setLogLevelVerbose)();
|
|
41
|
+
}
|
|
42
|
+
// Reinitialize logger with verbose log level
|
|
43
|
+
logger = (0, tracing_1.getLogger)();
|
|
44
|
+
convertTests =
|
|
45
|
+
convertTests ??
|
|
46
|
+
(await (0, app_config_writer_1.includeTestRunnersPrompt)().catch((error) => {
|
|
47
|
+
logger.error(error.message);
|
|
48
|
+
return process.exit(1);
|
|
49
|
+
}));
|
|
50
|
+
logger.debug(`Called convert preview-config for path '${basePath}', simulate is '${simulate}', convert tests is '${convertTests}'.`);
|
|
36
51
|
try {
|
|
37
52
|
const fs = await (0, app_config_writer_1.convertToVirtualPreview)(basePath, { convertTests, logger });
|
|
38
53
|
if (!simulate) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/create",
|
|
3
3
|
"description": "SAP Fiori tools module to add or remove features",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.61",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@sap-ux/abap-deploy-config-inquirer": "1.2.9",
|
|
34
34
|
"@sap-ux/abap-deploy-config-writer": "0.0.83",
|
|
35
35
|
"@sap-ux/adp-tooling": "0.12.121",
|
|
36
|
-
"@sap-ux/app-config-writer": "0.5.
|
|
36
|
+
"@sap-ux/app-config-writer": "0.5.25",
|
|
37
37
|
"@sap-ux/cap-config-writer": "0.9.4",
|
|
38
38
|
"@sap-ux/cards-editor-config-writer": "0.4.9",
|
|
39
39
|
"@sap-ux/logger": "0.6.0",
|
|
40
40
|
"@sap-ux/mockserver-config-writer": "0.7.2",
|
|
41
41
|
"@sap-ux/odata-service-writer": "0.25.5",
|
|
42
|
-
"@sap-ux/preview-middleware": "0.17.
|
|
42
|
+
"@sap-ux/preview-middleware": "0.17.16",
|
|
43
43
|
"@sap-ux/project-access": "1.29.4",
|
|
44
44
|
"@sap-ux/system-access": "0.5.29",
|
|
45
45
|
"@sap-ux/ui5-config": "0.26.1",
|