@sap-ux/adp-tooling 0.12.72 → 0.12.74

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.
@@ -60,7 +60,7 @@ export declare class AdpPreview {
60
60
  init(descriptorVariant: DescriptorVariant): Promise<UI5FlexLayer>;
61
61
  /**
62
62
  * Synchronize local changes with the backend.
63
- *
63
+ * The descriptor is refreshed only if the global flag is set to true.
64
64
  */
65
65
  sync(): Promise<void>;
66
66
  /**
@@ -93,9 +93,12 @@ class AdpPreview {
93
93
  }
94
94
  /**
95
95
  * Synchronize local changes with the backend.
96
- *
96
+ * The descriptor is refreshed only if the global flag is set to true.
97
97
  */
98
98
  async sync() {
99
+ if (!global.__SAP_UX_MANIFEST_SYNC_REQUIRED__ && this.mergedDescriptor) {
100
+ return;
101
+ }
99
102
  if (!this.lrep || !this.descriptorVariantId) {
100
103
  throw new Error('Not initialized');
101
104
  }
@@ -106,6 +109,7 @@ class AdpPreview {
106
109
  }
107
110
  const buffer = zip.toBuffer();
108
111
  this.mergedDescriptor = (await this.lrep.mergeAppDescriptorVariant(buffer, '//'))[this.descriptorVariantId];
112
+ global.__SAP_UX_MANIFEST_SYNC_REQUIRED__ = false;
109
113
  }
110
114
  /**
111
115
  * Proxy for the merged application manifest.json and blocking of preload files.
@@ -116,10 +120,7 @@ class AdpPreview {
116
120
  */
117
121
  async proxy(req, res, next) {
118
122
  if (req.path === '/manifest.json') {
119
- if (global.__SAP_UX_MANIFEST_SYNC_REQUIRED__) {
120
- await this.sync();
121
- global.__SAP_UX_MANIFEST_SYNC_REQUIRED__ = false;
122
- }
123
+ await this.sync();
123
124
  res.status(200);
124
125
  res.send(JSON.stringify(this.descriptor.manifest, undefined, 2));
125
126
  }
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.72",
12
+ "version": "0.12.74",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -32,13 +32,13 @@
32
32
  "prompts": "2.4.2",
33
33
  "sanitize-filename": "1.6.3",
34
34
  "uuid": "10.0.0",
35
- "@sap-ux/axios-extension": "1.17.0",
35
+ "@sap-ux/axios-extension": "1.17.1",
36
36
  "@sap-ux/btp-utils": "0.15.2",
37
37
  "@sap-ux/inquirer-common": "0.4.10",
38
38
  "@sap-ux/logger": "0.6.0",
39
39
  "@sap-ux/project-access": "1.28.6",
40
40
  "@sap-ux/project-input-validator": "0.3.3",
41
- "@sap-ux/system-access": "0.5.15",
41
+ "@sap-ux/system-access": "0.5.16",
42
42
  "@sap-ux/ui5-config": "0.25.1"
43
43
  },
44
44
  "devDependencies": {