@sap-ux/adp-tooling 0.12.73 → 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
|
-
|
|
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.
|
|
12
|
+
"version": "0.12.74",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|