@interopio/browser 3.4.3 → 3.4.5
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/changelog.md +4 -0
- package/dist/browser.es.js +7 -4
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.umd.js +7 -4
- package/dist/browser.umd.js.map +1 -1
- package/dist/browser.umd.min.js +1 -1
- package/package.json +4 -3
package/dist/browser.umd.js
CHANGED
|
@@ -2764,6 +2764,7 @@
|
|
|
2764
2764
|
platform: object$1({
|
|
2765
2765
|
app: nonEmptyStringDecoder,
|
|
2766
2766
|
}),
|
|
2767
|
+
validNonExistentApps: optional$1(array$1(nonEmptyStringDecoder)),
|
|
2767
2768
|
});
|
|
2768
2769
|
const clientErrorDataDecoder = object$1({
|
|
2769
2770
|
message: nonEmptyStringDecoder
|
|
@@ -6013,6 +6014,7 @@
|
|
|
6013
6014
|
appManagerController;
|
|
6014
6015
|
platformAppName;
|
|
6015
6016
|
registry = CallbackRegistryFactory$1();
|
|
6017
|
+
validNonExistentApps;
|
|
6016
6018
|
handlePlatformShutdown() {
|
|
6017
6019
|
this.registry.clear();
|
|
6018
6020
|
}
|
|
@@ -6026,6 +6028,7 @@
|
|
|
6026
6028
|
try {
|
|
6027
6029
|
const prefsHelloSuccess = await this.bridge.send("prefs", operations.prefsHello, undefined, undefined, { includeOperationCheck: true });
|
|
6028
6030
|
this.platformAppName = prefsHelloSuccess.platform.app;
|
|
6031
|
+
this.validNonExistentApps = prefsHelloSuccess.validNonExistentApps ?? [];
|
|
6029
6032
|
}
|
|
6030
6033
|
catch (error) {
|
|
6031
6034
|
this.logger.warn("The platform of this client is outdated and does not support Prefs API.");
|
|
@@ -6048,12 +6051,12 @@
|
|
|
6048
6051
|
return await operation.execute(operationData);
|
|
6049
6052
|
}
|
|
6050
6053
|
async get(app) {
|
|
6051
|
-
const verifiedApp = app === undefined || app === null ? this.getMyAppName() : nonEmptyStringDecoder
|
|
6054
|
+
const verifiedApp = app === undefined || app === null ? this.getMyAppName() : runDecoderWithIOError(nonEmptyStringDecoder, app);
|
|
6052
6055
|
const { prefs } = await this.bridge.send("prefs", operations.get, { app: verifiedApp }, undefined, { includeOperationCheck: true });
|
|
6053
6056
|
return prefs;
|
|
6054
6057
|
}
|
|
6055
6058
|
async update(data, options) {
|
|
6056
|
-
const verifiedOptions = optional$1(basePrefsConfigDecoder)
|
|
6059
|
+
const verifiedOptions = runDecoderWithIOError(optional$1(basePrefsConfigDecoder), options);
|
|
6057
6060
|
const app = verifiedOptions?.app ?? this.getMyAppName();
|
|
6058
6061
|
await this.updateFor(app, data);
|
|
6059
6062
|
}
|
|
@@ -6108,7 +6111,7 @@
|
|
|
6108
6111
|
subscribeFor(app, callback) {
|
|
6109
6112
|
const verifiedApp = runDecoderWithIOError(nonEmptyStringDecoder, app);
|
|
6110
6113
|
const applications = this.appManagerController.getApplications();
|
|
6111
|
-
const isValidApp = verifiedApp === this.platformAppName || applications.some((application) => application.name === verifiedApp);
|
|
6114
|
+
const isValidApp = verifiedApp === this.platformAppName || applications.some((application) => application.name === verifiedApp) || this.validNonExistentApps.includes(verifiedApp);
|
|
6112
6115
|
if (!isValidApp) {
|
|
6113
6116
|
return ioError.raiseError(`The provided app name "${app}" is not valid.`);
|
|
6114
6117
|
}
|
|
@@ -6299,7 +6302,7 @@
|
|
|
6299
6302
|
}
|
|
6300
6303
|
}
|
|
6301
6304
|
|
|
6302
|
-
var version$1 = "3.4.
|
|
6305
|
+
var version$1 = "3.4.5";
|
|
6303
6306
|
|
|
6304
6307
|
const createFactoryFunction = (coreFactoryFunction) => {
|
|
6305
6308
|
return async (userConfig) => {
|