@sap-ux/flp-config-sub-generator 0.1.38 → 0.1.40
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Generator from 'yeoman-generator';
|
|
2
|
+
import { promptNames } from '@sap-ux/flp-config-inquirer';
|
|
2
3
|
import type { FlpConfigOptions } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* FLP config generator adds an inbound navigation config to an existing manifest.json.
|
|
@@ -14,6 +15,7 @@ export default class extends Generator {
|
|
|
14
15
|
private abort;
|
|
15
16
|
private manifest;
|
|
16
17
|
private manifestPath;
|
|
18
|
+
private extensionPromptOpts?;
|
|
17
19
|
options: FlpConfigOptions;
|
|
18
20
|
setPromptsCallback: (fn: object) => void;
|
|
19
21
|
/**
|
|
@@ -52,5 +54,6 @@ export default class extends Generator {
|
|
|
52
54
|
private _updateI18n;
|
|
53
55
|
end(): Promise<void>;
|
|
54
56
|
}
|
|
57
|
+
export { promptNames };
|
|
55
58
|
export type { FlpConfigOptions };
|
|
56
59
|
//# sourceMappingURL=index.d.ts.map
|
package/generators/app/index.js
CHANGED
|
@@ -3,12 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.promptNames = void 0;
|
|
6
7
|
const path_1 = require("path");
|
|
7
8
|
const yeoman_generator_1 = __importDefault(require("yeoman-generator"));
|
|
8
9
|
const logger_1 = __importDefault(require("../utils/logger"));
|
|
9
10
|
const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
|
|
10
11
|
const deploy_config_generator_shared_1 = require("@sap-ux/deploy-config-generator-shared");
|
|
11
12
|
const flp_config_inquirer_1 = require("@sap-ux/flp-config-inquirer");
|
|
13
|
+
Object.defineProperty(exports, "promptNames", { enumerable: true, get: function () { return flp_config_inquirer_1.promptNames; } });
|
|
12
14
|
const app_config_writer_1 = require("@sap-ux/app-config-writer");
|
|
13
15
|
const project_access_1 = require("@sap-ux/project-access");
|
|
14
16
|
const i18n_1 = require("@sap-ux/i18n");
|
|
@@ -33,6 +35,7 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
33
35
|
abort = false;
|
|
34
36
|
manifest;
|
|
35
37
|
manifestPath;
|
|
38
|
+
extensionPromptOpts;
|
|
36
39
|
options;
|
|
37
40
|
setPromptsCallback;
|
|
38
41
|
/**
|
|
@@ -65,6 +68,7 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
65
68
|
if (this.env.conflicter) {
|
|
66
69
|
this.env.conflicter.force = this.options.force ?? true;
|
|
67
70
|
}
|
|
71
|
+
this.extensionPromptOpts = await (0, deploy_config_generator_shared_1.getExtensionGenPromptOpts)(this.env.create.bind(this.env), this.rootGeneratorName(), this.vscode);
|
|
68
72
|
await fiori_generator_shared_1.TelemetryHelper.initTelemetrySettings({
|
|
69
73
|
consumerModule: {
|
|
70
74
|
name: '@sap-ux/flp-config-sub-generator',
|
|
@@ -113,12 +117,8 @@ class default_1 extends yeoman_generator_1.default {
|
|
|
113
117
|
additionalParameters: { hide: true },
|
|
114
118
|
createAnotherInbound: { hide: true }
|
|
115
119
|
}));
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this.options.data?.additionalPrompts?.confirmConfigUpdate?.show) {
|
|
119
|
-
const confirmConfigUpdatePrompts = (0, deploy_config_generator_shared_1.getConfirmConfigUpdatePrompt)(this.options.data.additionalPrompts.confirmConfigUpdate.configType);
|
|
120
|
-
questions = (0, inquirer_common_1.withCondition)(questions, (answers) => answers.confirmConfigUpdate);
|
|
121
|
-
questions.unshift(...confirmConfigUpdatePrompts);
|
|
120
|
+
if (this.extensionPromptOpts && !this.launchFlpConfigAsSubGenerator) {
|
|
121
|
+
questions = (0, inquirer_common_1.extendWithOptions)(questions, this.extensionPromptOpts);
|
|
122
122
|
}
|
|
123
123
|
this.answers = {};
|
|
124
124
|
const answers = await this.prompt(questions);
|
|
@@ -47,24 +47,6 @@ export interface FlpConfigOptions extends Generator.GeneratorOptions {
|
|
|
47
47
|
* Path to the application root where the Fiori launchpad configuration will be added.
|
|
48
48
|
*/
|
|
49
49
|
appRootPath?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Config for additional prompts
|
|
52
|
-
*/
|
|
53
|
-
additionalPrompts?: {
|
|
54
|
-
/**
|
|
55
|
-
* Prompt to confirm the the update of non-productive configurations as they are centrally managed as part of the CI pipeline.
|
|
56
|
-
*/
|
|
57
|
-
confirmConfigUpdate?: {
|
|
58
|
-
/**
|
|
59
|
-
* Whether the prompt should be shown.
|
|
60
|
-
*/
|
|
61
|
-
show?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* The type of configuration being updated. This will be added to the start of the prompt message.
|
|
64
|
-
*/
|
|
65
|
-
configType?: string;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
50
|
};
|
|
69
51
|
/**
|
|
70
52
|
* Logger instance
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/flp-config-sub-generator",
|
|
3
3
|
"description": "Generator for creating Fiori Launcpad configuration",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.40",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"i18next": "23.5.1",
|
|
24
24
|
"inquirer": "8.2.6",
|
|
25
25
|
"yeoman-generator": "5.10.0",
|
|
26
|
-
"@sap-ux/app-config-writer": "0.5.
|
|
27
|
-
"@sap-ux/deploy-config-generator-shared": "0.0.
|
|
26
|
+
"@sap-ux/app-config-writer": "0.5.40",
|
|
27
|
+
"@sap-ux/deploy-config-generator-shared": "0.0.36",
|
|
28
28
|
"@sap-ux/feature-toggle": "0.2.3",
|
|
29
|
-
"@sap-ux/fiori-generator-shared": "0.9.
|
|
30
|
-
"@sap-ux/flp-config-inquirer": "0.2.
|
|
29
|
+
"@sap-ux/fiori-generator-shared": "0.9.8",
|
|
30
|
+
"@sap-ux/flp-config-inquirer": "0.2.58",
|
|
31
31
|
"@sap-ux/i18n": "0.2.3",
|
|
32
|
-
"@sap-ux/inquirer-common": "0.6.
|
|
33
|
-
"@sap-ux/project-access": "1.29.
|
|
32
|
+
"@sap-ux/inquirer-common": "0.6.28",
|
|
33
|
+
"@sap-ux/project-access": "1.29.15"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@jest/types": "29.6.3",
|