@sap-ux/create 0.12.24 → 0.12.26

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.
@@ -62,7 +62,14 @@ async function getTarget(target) {
62
62
  async function addDeployConfig(basePath, target, simulate = false, baseFile, deployFile) {
63
63
  const logger = (0, tracing_1.getLogger)();
64
64
  try {
65
- target = await getTarget(target);
65
+ const appType = await (0, project_access_1.getAppType)(basePath);
66
+ const isAdp = isAdpProject(appType);
67
+ if (!isAdp) {
68
+ target = await getTarget(target);
69
+ }
70
+ else {
71
+ target = 'abap';
72
+ }
66
73
  if (target === 'cf') {
67
74
  logger.info('Cloud Foundry deployment is not yet implemented.');
68
75
  return;
@@ -70,7 +77,25 @@ async function addDeployConfig(basePath, target, simulate = false, baseFile, dep
70
77
  else if (target === 'abap') {
71
78
  logger.debug(`Called add deploy-config for path '${basePath}', simulate is '${simulate}'`);
72
79
  await (0, validation_1.validateBasePath)(basePath);
73
- const { prompts: abapPrompts, answers: abapAnswers } = await (0, abap_deploy_config_inquirer_1.getPrompts)({ packageAutocomplete: { useAutocomplete: true } }, logger, false);
80
+ const promptOptions = {
81
+ ui5AbapRepo: { hideIfOnPremise: isAdp },
82
+ packageAutocomplete: {
83
+ useAutocomplete: true,
84
+ additionalValidation: {
85
+ shouldValidatePackageType: isAdp,
86
+ shouldValidatePackageForStartingPrefix: isAdp
87
+ }
88
+ },
89
+ packageManual: {
90
+ additionalValidation: {
91
+ shouldValidatePackageType: isAdp,
92
+ shouldValidatePackageForStartingPrefix: isAdp
93
+ }
94
+ },
95
+ transportInputChoice: { hideIfOnPremise: isAdp },
96
+ targetSystem: { additionalValidation: { shouldRestrictDifferentSystemType: isAdp } }
97
+ };
98
+ const { prompts: abapPrompts, answers: abapAnswers } = await (0, abap_deploy_config_inquirer_1.getPrompts)(promptOptions, logger, false);
74
99
  const answers = (0, abap_deploy_config_inquirer_1.reconcileAnswers)(await (0, common_1.promptYUIQuestions)(abapPrompts, false), abapAnswers);
75
100
  const config = {
76
101
  target: {
@@ -105,4 +130,13 @@ async function addDeployConfig(basePath, target, simulate = false, baseFile, dep
105
130
  logger.debug(error);
106
131
  }
107
132
  }
133
+ /**
134
+ * Checks if the given application type is a Fiori Adaptation project.
135
+ *
136
+ * @param {AppType} [appType] - The application type to check.
137
+ * @returns {boolean} `true` if the app type is 'Fiori Adaptation', otherwise `false`.
138
+ */
139
+ function isAdpProject(appType) {
140
+ return appType === 'Fiori Adaptation';
141
+ }
108
142
  //# sourceMappingURL=deploy-config.js.map
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.12.24",
4
+ "version": "0.12.26",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,7 +30,7 @@
30
30
  "mem-fs": "2.1.0",
31
31
  "mem-fs-editor": "9.4.0",
32
32
  "prompts": "2.4.2",
33
- "@sap-ux/abap-deploy-config-inquirer": "1.2.33",
33
+ "@sap-ux/abap-deploy-config-inquirer": "1.2.34",
34
34
  "@sap-ux/abap-deploy-config-writer": "0.0.100",
35
35
  "@sap-ux/adp-tooling": "0.13.17",
36
36
  "@sap-ux/app-config-writer": "0.5.43",
@@ -39,7 +39,7 @@
39
39
  "@sap-ux/logger": "0.6.0",
40
40
  "@sap-ux/mockserver-config-writer": "0.8.11",
41
41
  "@sap-ux/odata-service-writer": "0.26.13",
42
- "@sap-ux/preview-middleware": "0.18.22",
42
+ "@sap-ux/preview-middleware": "0.18.23",
43
43
  "@sap-ux/project-access": "1.29.18",
44
44
  "@sap-ux/system-access": "0.5.33",
45
45
  "@sap-ux/ui5-config": "0.26.5",