@sap-ux/generator-adp 1.0.64 → 1.0.66

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.
@@ -624,7 +624,7 @@ class default_1 extends yeoman_generator_1.default {
624
624
  if (this.jsonInput.id) {
625
625
  this.jsonInputFile = await (0, json_input_file_js_1.readJsonInputFile)(this.jsonInput.id);
626
626
  }
627
- const { system, client, username = '', password = '', projectType, application: baseApplicationName, applicationTitle, targetFolder = '/home/user/projects', projectName = (0, default_values_js_1.getDefaultProjectName)(targetFolder, `${baseApplicationName}.variant`), namespace = (0, default_values_js_1.getDefaultNamespace)(projectName, this.isCustomerBase) } = this.jsonInput;
627
+ const { system, client, username = '', password = '', projectType, application: baseApplicationName, applicationTitle, targetFolder = '/home/user/projects', projectName = (0, adp_tooling_1.getDefaultProjectName)(targetFolder, `${baseApplicationName}.variant`), namespace = (0, default_values_js_1.getDefaultNamespace)(projectName, this.isCustomerBase) } = this.jsonInput;
628
628
  await (0, validators_js_1.validateJsonInput)(this.systemLookup, this.isCustomerBase, {
629
629
  projectName,
630
630
  targetFolder,
@@ -57,7 +57,7 @@ function getProjectNamePrompt(path, isCustomerBase, isCfEnv, _) {
57
57
  type: 'input',
58
58
  name: types_js_1.attributePromptNames.projectName,
59
59
  message: (0, i18n_js_1.t)('prompts.projectNameLabel'),
60
- default: (answers) => (0, default_values_js_1.getDefaultProjectName)(answers.targetFolder || path),
60
+ default: (answers) => (0, adp_tooling_1.getDefaultProjectName)(answers.targetFolder || path),
61
61
  guiOptions: {
62
62
  mandatory: true,
63
63
  breadcrumb: true,
@@ -6,14 +6,6 @@
6
6
  * @returns {string} The namespace string, prefixed appropriately if it's a customer base project.
7
7
  */
8
8
  export declare function getDefaultNamespace(projectName: string, isCustomerBase: boolean): string;
9
- /**
10
- * Generates a default project name based on the existing projects in the specified directory.
11
- *
12
- * @param {string} basePath - Base path of the project.
13
- * @param {string} dirName - Directory name to search for.
14
- * @returns {string} A default project name with an incremented index if similar projects exist.
15
- */
16
- export declare function getDefaultProjectName(basePath: string, dirName?: string): string;
17
9
  /**
18
10
  * Gets the default UI5 version from the system versions list by validating the first available version.
19
11
  * If the first version is valid according to the UI5 service, it returns that version; otherwise, returns an empty string.
@@ -1,12 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getDefaultNamespace = getDefaultNamespace;
4
- exports.getDefaultProjectName = getDefaultProjectName;
5
4
  exports.getDefaultVersion = getDefaultVersion;
6
- const node_path_1 = require("node:path");
7
- const node_fs_1 = require("node:fs");
8
5
  const adp_tooling_1 = require("@sap-ux/adp-tooling");
9
- const DEFAULT_PREFIX = 'app.variant';
10
6
  /**
11
7
  * Generates a namespace for a project based on its layer.
12
8
  *
@@ -17,22 +13,6 @@ const DEFAULT_PREFIX = 'app.variant';
17
13
  function getDefaultNamespace(projectName, isCustomerBase) {
18
14
  return isCustomerBase ? `customer.${projectName}` : projectName;
19
15
  }
20
- /**
21
- * Generates a default project name based on the existing projects in the specified directory.
22
- *
23
- * @param {string} basePath - Base path of the project.
24
- * @param {string} dirName - Directory name to search for.
25
- * @returns {string} A default project name with an incremented index if similar projects exist.
26
- */
27
- function getDefaultProjectName(basePath, dirName = DEFAULT_PREFIX) {
28
- let newDir = dirName;
29
- let index = 1;
30
- while ((0, node_fs_1.existsSync)((0, node_path_1.join)(basePath, newDir))) {
31
- index++;
32
- newDir = `${dirName}${index}`;
33
- }
34
- return newDir;
35
- }
36
16
  /**
37
17
  * Gets the default UI5 version from the system versions list by validating the first available version.
38
18
  * If the first version is valid according to the UI5 service, it returns that version; otherwise, returns an empty string.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "SAPUI5 Adaptation Project",
4
4
  "homepage": "https://help.sap.com/viewer/584e0bcbfd4a4aff91c815cefa0bce2d/Cloud/en-US/ada9567b767941aba8d49fdb4fdedea7.html",
5
5
  "description": "Adaptation project allows you to create an app variant for an existing SAP Fiori elements-based or SAPUI5 freestyle application, without changing the original application.",
6
- "version": "1.0.64",
6
+ "version": "1.0.66",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,8 +30,8 @@
30
30
  "i18next": "26.3.6",
31
31
  "yeoman-generator": "5.10.0",
32
32
  "uuid": "11.1.1",
33
- "@sap-ux/adp-tooling": "1.0.58",
34
33
  "@sap-ux/axios-extension": "2.1.0",
34
+ "@sap-ux/adp-tooling": "1.0.60",
35
35
  "@sap-ux/btp-utils": "2.0.6",
36
36
  "@sap-ux/feature-toggle": "1.0.5",
37
37
  "@sap-ux/inquirer-common": "1.0.44",
@@ -39,7 +39,7 @@
39
39
  "@sap-ux/project-access": "2.2.1",
40
40
  "@sap-ux/store": "2.0.7",
41
41
  "@sap-ux/system-access": "1.0.14",
42
- "@sap-ux/project-input-validator": "1.0.20",
42
+ "@sap-ux/project-input-validator": "1.0.21",
43
43
  "@sap-ux/fiori-generator-shared": "1.2.18",
44
44
  "@sap-ux/odata-service-writer": "1.0.23",
45
45
  "@sap-ux/telemetry": "2.0.8"
@@ -58,7 +58,7 @@
58
58
  "fs-extra": "11.3.6",
59
59
  "rimraf": "6.1.3",
60
60
  "yeoman-test": "6.3.0",
61
- "@sap-ux/deploy-config-sub-generator": "1.0.73"
61
+ "@sap-ux/deploy-config-sub-generator": "1.0.75"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=22.x"