@expressms/smartapp-sdk 1.0.9 → 1.1.0
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/build/umd/index.js +13 -6
- package/package.json +2 -2
package/build/umd/index.js
CHANGED
|
@@ -1763,9 +1763,11 @@
|
|
|
1763
1763
|
}
|
|
1764
1764
|
addGlobalListener() {
|
|
1765
1765
|
window.addEventListener("message", (event) => {
|
|
1766
|
+
const isRenameParamsWasEnabled = this.isRenameParamsEnabled;
|
|
1766
1767
|
if (getPlatform() === PLATFORM.WEB &&
|
|
1767
|
-
event.data.handler === HANDLER.EXPRESS
|
|
1768
|
-
this.isRenameParamsEnabled
|
|
1768
|
+
event.data.handler === HANDLER.EXPRESS &&
|
|
1769
|
+
this.isRenameParamsEnabled)
|
|
1770
|
+
this.disableRenameParams();
|
|
1769
1771
|
if (typeof event.data !== "object" ||
|
|
1770
1772
|
typeof event.data.data !== "object" ||
|
|
1771
1773
|
typeof event.data.data.type !== "string")
|
|
@@ -1782,6 +1784,8 @@
|
|
|
1782
1784
|
payload: this.isRenameParamsEnabled ? snakeCaseToCamelCase(payload) : payload,
|
|
1783
1785
|
files: eventFiles,
|
|
1784
1786
|
});
|
|
1787
|
+
if (isRenameParamsWasEnabled)
|
|
1788
|
+
this.enableRenameParams();
|
|
1785
1789
|
});
|
|
1786
1790
|
}
|
|
1787
1791
|
/**
|
|
@@ -1800,9 +1804,11 @@
|
|
|
1800
1804
|
this.eventEmitter.on(EVENT_TYPE.RECEIVE, callback);
|
|
1801
1805
|
}
|
|
1802
1806
|
sendEvent({ handler, method, params, files, timeout = RESPONSE_TIMEOUT, guaranteed_delivery_required = false, }) {
|
|
1807
|
+
const isRenameParamsWasEnabled = this.isRenameParamsEnabled;
|
|
1803
1808
|
if (getPlatform() === PLATFORM.WEB &&
|
|
1804
|
-
handler === HANDLER.EXPRESS
|
|
1805
|
-
this.isRenameParamsEnabled
|
|
1809
|
+
handler === HANDLER.EXPRESS &&
|
|
1810
|
+
this.isRenameParamsEnabled)
|
|
1811
|
+
this.disableRenameParams();
|
|
1806
1812
|
const ref = v4(); // UUID to detect express response.
|
|
1807
1813
|
const payload = {
|
|
1808
1814
|
ref,
|
|
@@ -1821,7 +1827,8 @@
|
|
|
1821
1827
|
type: WEB_COMMAND_TYPE,
|
|
1822
1828
|
payload: event,
|
|
1823
1829
|
}, "*");
|
|
1824
|
-
|
|
1830
|
+
if (isRenameParamsWasEnabled)
|
|
1831
|
+
this.enableRenameParams();
|
|
1825
1832
|
return this.eventEmitter.onceWithTimeout(ref, timeout);
|
|
1826
1833
|
}
|
|
1827
1834
|
/**
|
|
@@ -1938,7 +1945,7 @@
|
|
|
1938
1945
|
}
|
|
1939
1946
|
}
|
|
1940
1947
|
|
|
1941
|
-
const LIB_VERSION = "1.1.
|
|
1948
|
+
const LIB_VERSION = "1.1.4";
|
|
1942
1949
|
|
|
1943
1950
|
const getBridge = () => {
|
|
1944
1951
|
if (process.env.NODE_ENV === 'test')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressms/smartapp-sdk",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Smartapp SDK",
|
|
5
5
|
"main": "build/main/index.js",
|
|
6
6
|
"typings": "build/main/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typescript": "^4.0.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@expressms/smartapp-bridge": "^1.1.
|
|
41
|
+
"@expressms/smartapp-bridge": "^1.1.4",
|
|
42
42
|
"webpack-manifest-plugin": "2.2.0",
|
|
43
43
|
"workbox-cacheable-response": "^6.5.4",
|
|
44
44
|
"workbox-expiration": "^6.5.4",
|