@sap-ux/create 1.3.13 → 1.3.15
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.
- package/dist/cli/update/service.js +18 -1
- package/package.json +14 -13
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AbapCloudEnvironment, AbapServiceProvider, createForAbapOnCloud, createForDestination, ODataVersion as CatalogODataVersion, TlsPatch } from '@sap-ux/axios-extension';
|
|
2
|
+
import { SyntaxValidator } from 'fast-xml-validator';
|
|
2
3
|
import { isAppStudio, WebIDEUsage } from '@sap-ux/btp-utils';
|
|
3
4
|
import { getExternalServiceReferences, OdataVersion, ServiceType, update as updateOdataService } from '@sap-ux/odata-service-writer';
|
|
4
5
|
import { createApplicationAccess, FileName } from '@sap-ux/project-access';
|
|
@@ -202,10 +203,26 @@ async function updateService(appPath, fetchExternalServiceMetadata, simulate, se
|
|
|
202
203
|
}
|
|
203
204
|
catch (error) {
|
|
204
205
|
if (isAppStudio() && backendConfig.destination) {
|
|
205
|
-
throw new Error(`The service metadata is returning an error. Please check that the destination '${backendConfig.destination}' exists and the service is accessible.`);
|
|
206
|
+
throw new Error(`The service metadata request is returning an error. Please check that the destination '${backendConfig.destination}' exists and the service is accessible.`);
|
|
206
207
|
}
|
|
207
208
|
throw error;
|
|
208
209
|
}
|
|
210
|
+
try {
|
|
211
|
+
SyntaxValidator.validate(metadataXml);
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
let errorMessage = 'The remote service metadata is not valid XML.';
|
|
215
|
+
try {
|
|
216
|
+
const parsed = JSON.parse(metadataXml);
|
|
217
|
+
if (typeof parsed?.error?.message === 'string') {
|
|
218
|
+
errorMessage = `The service metadata request is returning an error. Error: ${parsed.error.message}`;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
// not valid JSON - use generic message
|
|
223
|
+
}
|
|
224
|
+
throw new Error(errorMessage);
|
|
225
|
+
}
|
|
209
226
|
logger.debug(`Received metadata for service '${serviceName}'`);
|
|
210
227
|
const externalServices = await fetchExternalServicesIfRequested(provider, servicePath, metadataXml, fetchExternalServiceMetadata, logger);
|
|
211
228
|
const annotations = await fetchAnnotations(provider, servicePath, odataVersion, logger);
|
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": "1.3.
|
|
4
|
+
"version": "1.3.15",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -29,30 +29,31 @@
|
|
|
29
29
|
"chalk": "5.6.2",
|
|
30
30
|
"commander": "14.0.3",
|
|
31
31
|
"diff": "8.0.4",
|
|
32
|
+
"fast-xml-validator": "1.4.2",
|
|
32
33
|
"dotenv": "17.4.2",
|
|
33
34
|
"mem-fs": "2.1.0",
|
|
34
35
|
"mem-fs-editor": "9.4.0",
|
|
35
36
|
"prompts": "2.4.2",
|
|
36
|
-
"@sap-ux/abap-deploy-config-inquirer": "2.0.
|
|
37
|
-
"@sap-ux/abap-deploy-config-writer": "1.0.
|
|
38
|
-
"@sap-ux/adp-tooling": "1.0.
|
|
37
|
+
"@sap-ux/abap-deploy-config-inquirer": "2.0.44",
|
|
38
|
+
"@sap-ux/abap-deploy-config-writer": "1.0.25",
|
|
39
|
+
"@sap-ux/adp-tooling": "1.0.52",
|
|
39
40
|
"@sap-ux/btp-utils": "2.0.6",
|
|
40
|
-
"@sap-ux/app-config-writer": "1.1.
|
|
41
|
-
"@sap-ux/cap-config-writer": "1.0.
|
|
42
|
-
"@sap-ux/inquirer-common": "1.0.
|
|
41
|
+
"@sap-ux/app-config-writer": "1.1.20",
|
|
42
|
+
"@sap-ux/cap-config-writer": "1.0.36",
|
|
43
|
+
"@sap-ux/inquirer-common": "1.0.39",
|
|
43
44
|
"@sap-ux/logger": "1.0.3",
|
|
44
45
|
"@sap-ux/mockserver-config-writer": "1.0.18",
|
|
45
46
|
"@sap-ux/odata-service-writer": "1.0.21",
|
|
46
|
-
"@sap-ux/preview-middleware": "1.2.
|
|
47
|
+
"@sap-ux/preview-middleware": "1.2.11",
|
|
47
48
|
"@sap-ux/project-access": "2.1.13",
|
|
48
49
|
"@sap-ux/project-input-validator": "1.0.18",
|
|
49
|
-
"@sap-ux/system-access": "1.0.
|
|
50
|
+
"@sap-ux/system-access": "1.0.13",
|
|
50
51
|
"@sap-ux/store": "2.0.7",
|
|
51
52
|
"@sap-ux/ui5-config": "1.0.9",
|
|
52
|
-
"@sap-ux/ui5-test-writer": "1.10.
|
|
53
|
-
"@sap-ux/flp-config-inquirer": "1.0.
|
|
53
|
+
"@sap-ux/ui5-test-writer": "1.10.2",
|
|
54
|
+
"@sap-ux/flp-config-inquirer": "1.0.52",
|
|
54
55
|
"@sap-ux/nodejs-utils": "1.0.10",
|
|
55
|
-
"@sap-ux/axios-extension": "2.0.
|
|
56
|
+
"@sap-ux/axios-extension": "2.0.10"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
59
|
"@jest/globals": "30.4.1",
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"@types/mem-fs": "1.1.2",
|
|
62
63
|
"@types/mem-fs-editor": "7.0.1",
|
|
63
64
|
"@types/prompts": "2.4.9",
|
|
64
|
-
"@sap-ux/inquirer-common": "1.0.
|
|
65
|
+
"@sap-ux/inquirer-common": "1.0.39",
|
|
65
66
|
"@sap-ux/store": "2.0.7"
|
|
66
67
|
},
|
|
67
68
|
"scripts": {
|