@sap-ux/adp-tooling 0.12.89 → 0.12.90

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,6 +1,7 @@
1
1
  import type { Manifest, ManifestNamespace } from '@sap-ux/project-access';
2
2
  import type { ToolsLogger } from '@sap-ux/logger';
3
3
  import type { AdpPreviewConfig, DescriptorVariant } from '../../types';
4
+ import type { AxiosRequestConfig, ProviderConfiguration } from '@sap-ux/axios-extension';
4
5
  type DataSources = Record<string, ManifestNamespace.DataSource>;
5
6
  /**
6
7
  * Service class for handling operations related to the manifest of a UI5 application.
@@ -25,6 +26,7 @@ export declare class ManifestService {
25
26
  *
26
27
  * @param adpConfig - The ADP preview configuration.
27
28
  * @param logger - The logger instance.
29
+ * @param requestOptions - Optional configuration options for the Axios request, such as headers, timeout, and base URL
28
30
  * @returns A promise that resolves to an instance of ManifestService.
29
31
  */
30
32
  private static init;
@@ -34,9 +36,10 @@ export declare class ManifestService {
34
36
  * @param appId - The application ID.
35
37
  * @param adpConfig - The ADP preview configuration.
36
38
  * @param logger - The logger instance.
39
+ * @param requestOptions - Optional configuration options for the Axios request, such as headers, timeout, and base URL
37
40
  * @returns A promise that resolves to an instance of ManifestService.
38
41
  */
39
- static initBaseManifest(appId: string, adpConfig: AdpPreviewConfig, logger: ToolsLogger): Promise<ManifestService>;
42
+ static initBaseManifest(appId: string, adpConfig: AdpPreviewConfig, logger: ToolsLogger, requestOptions?: AxiosRequestConfig & Partial<ProviderConfiguration>): Promise<ManifestService>;
40
43
  /**
41
44
  * Creates an instance of the ManifestService and fetches the merged manifest of the application.
42
45
  *
@@ -44,9 +47,10 @@ export declare class ManifestService {
44
47
  * @param variant - The descriptor variant.
45
48
  * @param adpConfig - The ADP preview configuration.
46
49
  * @param logger - The logger instance.
50
+ * @param requestOptions - Optional configuration options for the Axios request, such as headers, timeout, and base URL
47
51
  * @returns A promise that resolves to an instance of ManifestService.
48
52
  */
49
- static initMergedManifest(basePath: string, variant: DescriptorVariant, adpConfig: AdpPreviewConfig, logger: ToolsLogger): Promise<ManifestService>;
53
+ static initMergedManifest(basePath: string, variant: DescriptorVariant, adpConfig: AdpPreviewConfig, logger: ToolsLogger, requestOptions?: AxiosRequestConfig & Partial<ProviderConfiguration>): Promise<ManifestService>;
50
54
  /**
51
55
  * Fetches the base manifest for a given application ID.
52
56
  *
@@ -34,10 +34,12 @@ class ManifestService {
34
34
  *
35
35
  * @param adpConfig - The ADP preview configuration.
36
36
  * @param logger - The logger instance.
37
+ * @param requestOptions - Optional configuration options for the Axios request, such as headers, timeout, and base URL
37
38
  * @returns A promise that resolves to an instance of ManifestService.
38
39
  */
39
- static async init(adpConfig, logger) {
40
+ static async init(adpConfig, logger, requestOptions) {
40
41
  const provider = await (0, system_access_1.createAbapServiceProvider)(adpConfig.target, {
42
+ ...requestOptions,
41
43
  ignoreCertErrors: adpConfig.ignoreCertErrors ?? false
42
44
  }, true, logger);
43
45
  return new ManifestService(provider, logger);
@@ -48,10 +50,11 @@ class ManifestService {
48
50
  * @param appId - The application ID.
49
51
  * @param adpConfig - The ADP preview configuration.
50
52
  * @param logger - The logger instance.
53
+ * @param requestOptions - Optional configuration options for the Axios request, such as headers, timeout, and base URL
51
54
  * @returns A promise that resolves to an instance of ManifestService.
52
55
  */
53
- static async initBaseManifest(appId, adpConfig, logger) {
54
- const manifestService = await this.init(adpConfig, logger);
56
+ static async initBaseManifest(appId, adpConfig, logger, requestOptions) {
57
+ const manifestService = await this.init(adpConfig, logger, requestOptions);
55
58
  await manifestService.fetchBaseManifest(appId);
56
59
  return manifestService;
57
60
  }
@@ -62,10 +65,11 @@ class ManifestService {
62
65
  * @param variant - The descriptor variant.
63
66
  * @param adpConfig - The ADP preview configuration.
64
67
  * @param logger - The logger instance.
68
+ * @param requestOptions - Optional configuration options for the Axios request, such as headers, timeout, and base URL
65
69
  * @returns A promise that resolves to an instance of ManifestService.
66
70
  */
67
- static async initMergedManifest(basePath, variant, adpConfig, logger) {
68
- const manifestService = await this.init(adpConfig, logger);
71
+ static async initMergedManifest(basePath, variant, adpConfig, logger, requestOptions) {
72
+ const manifestService = await this.init(adpConfig, logger, requestOptions);
69
73
  await manifestService.fetchMergedManifest(basePath, variant.id);
70
74
  await manifestService.fetchAppInfo(variant.reference);
71
75
  return manifestService;
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.12.89",
12
+ "version": "0.12.90",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -8,7 +8,7 @@
8
8
  <edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Communication.xml">
9
9
  <edmx:Include Namespace="com.sap.vocabularies.Communication.v1" Alias="Communication"/>
10
10
  </edmx:Reference>
11
- <edmx:Reference Uri="<%- path %>$metadata"><% namespaces.forEach(function(namespace){ %>
11
+ <edmx:Reference Uri="<%- path %>$metadata"><% namespaces?.forEach(function(namespace) { %>
12
12
  <edmx:Include Namespace="<%- namespace.namespace %>"<% if (namespace.alias) { %> Alias="<%- namespace.alias %>"<% } %>/><% }); %>
13
13
  </edmx:Reference>
14
14
  <edmx:DataServices>