@sap-ux/fiori-app-sub-generator 0.5.1 → 0.5.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.
@@ -26,7 +26,9 @@ import type { ApiHubConfig } from '../types';
26
26
  * @param logger - the logger
27
27
  * @param vscode - the vscode instance
28
28
  * @param appWizard - the app wizard instance
29
- * @param followUpCommand - the follow up command
29
+ * @param followUpCommand - post generation command (with optional params) which will be ran instead of the default
30
+ * @param followUpCommand.cmdName - name of the command
31
+ * @param followUpCommand.cmdParams - options params for the command
30
32
  * @returns {Promise<void>}
31
33
  */
32
34
  export declare function runPostGenerationTasks({ service, project }: {
@@ -45,5 +47,10 @@ export declare function runPostGenerationTasks({ service, project }: {
45
47
  name: string;
46
48
  flpAppId?: string;
47
49
  };
48
- }, fs: Editor, logger: Logger & ILogWrapper, vscode?: unknown, appWizard?: AppWizard, followUpCommand?: string): Promise<void>;
50
+ }, fs: Editor, logger: Logger & ILogWrapper, vscode?: unknown, appWizard?: AppWizard, followUpCommand?: {
51
+ cmdName: string;
52
+ cmdParams?: {
53
+ [key: string]: string | boolean;
54
+ };
55
+ }): Promise<void>;
49
56
  //# sourceMappingURL=end.d.ts.map
@@ -29,16 +29,18 @@ async function saveApiHubApiKey(apiKey, logger) {
29
29
  /**
30
30
  * Run post generation hooks: delegates to `runHooks` with `'app-generated'` as the event name.
31
31
  *
32
- * @param projectPath
33
- * @param logger
34
- * @param vscode
35
- * @param followUpCommand
32
+ * @param projectPath - path to the project
33
+ * @param logger - logger instance
34
+ * @param vscode - vscode instance
35
+ * @param followUpCommand - post generation command (with optional params) which will be ran instead of the default
36
+ * @param followUpCommand.cmdName - name of the command
37
+ * @param followUpCommand.cmdParams - options params for the command
36
38
  */
37
39
  async function runPostGenHooks(projectPath, logger, vscode, followUpCommand) {
38
40
  await (0, utils_1.runHooks)('app-generated', {
39
- hookParameters: { fsPath: projectPath },
41
+ hookParameters: { fsPath: projectPath, ...followUpCommand?.cmdParams },
40
42
  vscodeInstance: vscode,
41
- options: { followUpCommand }
43
+ options: { command: followUpCommand?.cmdName }
42
44
  }, logger);
43
45
  }
44
46
  /**
@@ -60,7 +62,9 @@ async function runPostGenHooks(projectPath, logger, vscode, followUpCommand) {
60
62
  * @param logger - the logger
61
63
  * @param vscode - the vscode instance
62
64
  * @param appWizard - the app wizard instance
63
- * @param followUpCommand - the follow up command
65
+ * @param followUpCommand - post generation command (with optional params) which will be ran instead of the default
66
+ * @param followUpCommand.cmdName - name of the command
67
+ * @param followUpCommand.cmdParams - options params for the command
64
68
  * @returns {Promise<void>}
65
69
  */
66
70
  async function runPostGenerationTasks({ service, project }, fs, logger, vscode, appWizard, followUpCommand) {
@@ -12,7 +12,7 @@ export interface GeneratorContext {
12
12
  hookParameters: HookParameters;
13
13
  vscodeInstance?: VSCodeInstance;
14
14
  options?: {
15
- followUpCommand?: string;
15
+ command?: string;
16
16
  [key: string]: unknown;
17
17
  };
18
18
  }
@@ -29,7 +29,7 @@ async function runHooks(event, context, logger) {
29
29
  async function postGenerationHook(context, logger) {
30
30
  if (context.vscodeInstance) {
31
31
  try {
32
- const command = context.options?.followUpCommand ?? exports.DEFAULT_POST_APP_GEN_COMMAND;
32
+ const command = context.options?.command ?? exports.DEFAULT_POST_APP_GEN_COMMAND;
33
33
  logger?.info((0, i18n_1.t)('logMessages.attemptingToExecutePostGenerationCommand', { command }));
34
34
  await context.vscodeInstance.commands?.executeCommand?.(command, context.hookParameters);
35
35
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/fiori-app-sub-generator",
3
3
  "description": "A yeoman (sub) generator that can generate Fiori applications. Not for standalone use.",
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -32,13 +32,13 @@
32
32
  "@sap-ux/annotation-generator": "0.3.40",
33
33
  "@sap-ux/axios-extension": "1.21.4",
34
34
  "@sap-ux/btp-utils": "1.1.0",
35
- "@sap-ux/cap-config-writer": "0.10.9",
36
35
  "@sap-ux/feature-toggle": "0.3.0",
36
+ "@sap-ux/cap-config-writer": "0.10.9",
37
37
  "@sap-ux/fiori-elements-writer": "2.5.1",
38
38
  "@sap-ux/fiori-freestyle-writer": "2.4.12",
39
39
  "@sap-ux/fiori-generator-shared": "0.12.8",
40
- "@sap-ux/fiori-tools-settings": "0.2.0",
41
40
  "@sap-ux/launch-config": "0.10.4",
41
+ "@sap-ux/fiori-tools-settings": "0.2.0",
42
42
  "@sap-ux/odata-service-inquirer": "2.5.0",
43
43
  "@sap-ux/odata-service-writer": "0.27.5",
44
44
  "@sap-ux/project-access": "1.30.2",