@sap-ux/adp-tooling 0.19.3 → 0.19.6
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,5 +1,6 @@
|
|
|
1
1
|
import type { YUIQuestion } from '@sap-ux/inquirer-common';
|
|
2
2
|
import type { UI5FlexLayer } from '@sap-ux/project-access';
|
|
3
|
+
import { type AppWizard } from '@sap-devx/yeoman-ui-types';
|
|
3
4
|
import type { ToolsLogger } from '@sap-ux/logger';
|
|
4
5
|
import { ServiceType, type DescriptorVariant, type NewModelAnswers, type NewModelData } from '../../types';
|
|
5
6
|
/**
|
|
@@ -16,9 +17,10 @@ export declare function getODataVersionFromServiceType(serviceType: ServiceType)
|
|
|
16
17
|
* @param {string} projectPath - The root path of the project.
|
|
17
18
|
* @param {UI5FlexLayer} layer - UI5 Flex layer.
|
|
18
19
|
* @param {ToolsLogger} [logger] - Optional logger.
|
|
20
|
+
* @param {AppWizard} [appWizard] - Optional AppWizard instance for showing notifications.
|
|
19
21
|
* @returns {YUIQuestion<NewModelAnswers>[]} The questions/prompts.
|
|
20
22
|
*/
|
|
21
|
-
export declare function getPrompts(projectPath: string, layer: UI5FlexLayer, logger?: ToolsLogger): Promise<YUIQuestion<NewModelAnswers>[]>;
|
|
23
|
+
export declare function getPrompts(projectPath: string, layer: UI5FlexLayer, logger?: ToolsLogger, appWizard?: AppWizard): Promise<YUIQuestion<NewModelAnswers>[]>;
|
|
22
24
|
/**
|
|
23
25
|
* Builds the NewModelData object from the prompts answers.
|
|
24
26
|
*
|
|
@@ -175,7 +175,7 @@ async function getAbapServiceUrl(projectPath) {
|
|
|
175
175
|
if (!target) {
|
|
176
176
|
return undefined;
|
|
177
177
|
}
|
|
178
|
-
if (
|
|
178
|
+
if (!(0, btp_utils_1.isAppStudio)()) {
|
|
179
179
|
return target.url;
|
|
180
180
|
}
|
|
181
181
|
if (target.destination) {
|
|
@@ -216,9 +216,10 @@ async function getDestinationChoices(projectPath, logger) {
|
|
|
216
216
|
* @param {string} projectPath - The root path of the project.
|
|
217
217
|
* @param {UI5FlexLayer} layer - UI5 Flex layer.
|
|
218
218
|
* @param {ToolsLogger} [logger] - Optional logger.
|
|
219
|
+
* @param {AppWizard} [appWizard] - Optional AppWizard instance for showing notifications.
|
|
219
220
|
* @returns {YUIQuestion<NewModelAnswers>[]} The questions/prompts.
|
|
220
221
|
*/
|
|
221
|
-
async function getPrompts(projectPath, layer, logger) {
|
|
222
|
+
async function getPrompts(projectPath, layer, logger, appWizard) {
|
|
222
223
|
const isCustomerBase = "CUSTOMER_BASE" /* FlexLayer.CUSTOMER_BASE */ === layer;
|
|
223
224
|
const defaultSeviceName = isCustomerBase ? "customer." /* NamespacePrefix.CUSTOMER */ : "" /* NamespacePrefix.EMPTY */;
|
|
224
225
|
const isCFEnv = await (0, cf_1.isCFEnvironment)(projectPath);
|
|
@@ -231,6 +232,9 @@ async function getPrompts(projectPath, layer, logger) {
|
|
|
231
232
|
let destinationChoices;
|
|
232
233
|
if (isCFEnv) {
|
|
233
234
|
({ choices: destinationChoices, error: destinationError } = await getDestinationChoices(projectPath, logger));
|
|
235
|
+
if (destinationError) {
|
|
236
|
+
appWizard?.showError(destinationError, yeoman_ui_types_1.MessageType.notification);
|
|
237
|
+
}
|
|
234
238
|
}
|
|
235
239
|
const buildResultingUrlMessage = (i18nKey, uri, previousAnswers) => {
|
|
236
240
|
const destinationUrl = isCFEnv ? previousAnswers?.destination?.Host : abapServiceUrl;
|
|
@@ -266,7 +270,7 @@ async function getPrompts(projectPath, layer, logger) {
|
|
|
266
270
|
mandatory: true,
|
|
267
271
|
hint: (0, i18n_1.t)('prompts.destinationTooltip')
|
|
268
272
|
},
|
|
269
|
-
validate: (value) =>
|
|
273
|
+
validate: (value) => (0, project_input_validator_1.validateEmptyString)(value?.Name)
|
|
270
274
|
},
|
|
271
275
|
{
|
|
272
276
|
type: 'input',
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"failedToListBtpDestinations": "Failed to list BTP destinations. Error: {{error}}",
|
|
131
131
|
"destinationServiceNotFoundInMtaYaml": "Destination service instance not found in mta.yaml. Ensure a resource with 'service: destination' is declared.",
|
|
132
132
|
"noServiceKeysFoundForDestination": "No service keys found for destination service instance '{{serviceInstanceName}}'. Ensure the service is provisioned and try again.",
|
|
133
|
-
"errorFetchingDestinations": "
|
|
133
|
+
"errorFetchingDestinations": "An error occurred when fetching destinations. For more information, see the logs.",
|
|
134
134
|
"cfPushFailed": "cf push failed for the '{{appName}}' app: {{error}}",
|
|
135
135
|
"cfEnableSshFailed": "cf enable-ssh failed for the '{{appName}}' app: {{error}}",
|
|
136
136
|
"cfRestartFailed": "cf restart failed for the '{{appName}}' app: {{error}}"
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.19.
|
|
12
|
+
"version": "0.19.6",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"@sap-ux/axios-extension": "1.26.0",
|
|
40
40
|
"@sap-ux/btp-utils": "1.2.0",
|
|
41
41
|
"@sap-ux/i18n": "0.4.0",
|
|
42
|
-
"@sap-ux/inquirer-common": "0.13.
|
|
42
|
+
"@sap-ux/inquirer-common": "0.13.2",
|
|
43
43
|
"@sap-ux/logger": "0.9.0",
|
|
44
44
|
"@sap-ux/nodejs-utils": "0.3.0",
|
|
45
|
-
"@sap-ux/odata-service-writer": "0.32.
|
|
46
|
-
"@sap-ux/project-access": "1.38.
|
|
47
|
-
"@sap-ux/project-input-validator": "0.7.
|
|
45
|
+
"@sap-ux/odata-service-writer": "0.32.2",
|
|
46
|
+
"@sap-ux/project-access": "1.38.1",
|
|
47
|
+
"@sap-ux/project-input-validator": "0.7.2",
|
|
48
48
|
"@sap-ux/store": "1.6.0",
|
|
49
49
|
"@sap-ux/system-access": "0.8.0",
|
|
50
|
-
"@sap-ux/ui5-config": "0.31.
|
|
50
|
+
"@sap-ux/ui5-config": "0.31.1",
|
|
51
51
|
"@sap-ux/ui5-info": "0.14.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|