@nmshd/app-runtime 2.3.6 → 2.3.8
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/dist/AppConfig.d.ts +2 -0
- package/dist/AppConfig.js.map +1 -1
- package/dist/AppRuntime.d.ts +1 -0
- package/dist/AppRuntime.js +9 -3
- package/dist/AppRuntime.js.map +1 -1
- package/dist/AppRuntimeErrors.js +1 -1
- package/dist/AppRuntimeErrors.js.map +1 -1
- package/dist/AppStringProcessor.d.ts +1 -1
- package/dist/AppStringProcessor.js +1 -1
- package/dist/AppStringProcessor.js.map +1 -1
- package/dist/UserfriendlyApplicationError.js.map +1 -1
- package/dist/buildInformation.js +4 -4
- package/dist/events/AccountSelectedEvent.js +1 -1
- package/dist/events/AccountSelectedEvent.js.map +1 -1
- package/dist/events/DatawalletSynchronizedEvent.js +1 -1
- package/dist/events/DatawalletSynchronizedEvent.js.map +1 -1
- package/dist/events/ExternalEventReceivedEvent.js +1 -1
- package/dist/events/ExternalEventReceivedEvent.js.map +1 -1
- package/dist/events/MailReceivedEvent.js +1 -1
- package/dist/events/MailReceivedEvent.js.map +1 -1
- package/dist/events/OnboardingChangeReceivedEvent.js +1 -1
- package/dist/events/OnboardingChangeReceivedEvent.js.map +1 -1
- package/dist/events/RelationshipSelectedEvent.js +1 -1
- package/dist/events/RelationshipSelectedEvent.js.map +1 -1
- package/dist/modules/pushNotifications/IBackboneEventContent.js +1 -1
- package/dist/modules/pushNotifications/IBackboneEventContent.js.map +1 -1
- package/dist/modules/pushNotifications/PushNotificationModule.js +3 -4
- package/dist/modules/pushNotifications/PushNotificationModule.js.map +1 -1
- package/dist/multiAccount/MultiAccountController.js.map +1 -1
- package/dist/multiAccount/data/LocalAccount.js +2 -3
- package/dist/multiAccount/data/LocalAccount.js.map +1 -1
- package/lib-web/nmshd.app-runtime.js +27 -23
- package/lib-web/nmshd.app-runtime.min.js +1 -1
- package/package.json +15 -15
|
@@ -126,6 +126,9 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
126
126
|
};
|
|
127
127
|
this._stringProcessor = new AppStringProcessor_1.AppStringProcessor(this, this.loggerFactory);
|
|
128
128
|
}
|
|
129
|
+
get config() {
|
|
130
|
+
return this.runtimeConfig;
|
|
131
|
+
}
|
|
129
132
|
async uiBridge() {
|
|
130
133
|
if (this._uiBridge)
|
|
131
134
|
return this._uiBridge;
|
|
@@ -284,13 +287,16 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
284
287
|
throw AppRuntimeErrors_1.AppRuntimeErrors.startup.bootstrapError(result.error);
|
|
285
288
|
}
|
|
286
289
|
}
|
|
290
|
+
const applicationId = nativeBootstrapper.nativeEnvironment.configAccess.get("applicationId").value;
|
|
287
291
|
const transportConfig = nativeBootstrapper.nativeEnvironment.configAccess.get("transport").value;
|
|
288
292
|
const mergedConfig = appConfig
|
|
289
293
|
? (0, AppConfig_1.createAppConfig)({
|
|
290
|
-
transportLibrary: transportConfig
|
|
294
|
+
transportLibrary: transportConfig,
|
|
295
|
+
applicationId: applicationId
|
|
291
296
|
}, appConfig)
|
|
292
297
|
: (0, AppConfig_1.createAppConfig)({
|
|
293
|
-
transportLibrary: transportConfig
|
|
298
|
+
transportLibrary: transportConfig,
|
|
299
|
+
applicationId: applicationId
|
|
294
300
|
});
|
|
295
301
|
const runtime = new AppRuntime(nativeBootstrapper.nativeEnvironment, mergedConfig);
|
|
296
302
|
await runtime.init();
|
|
@@ -337,6 +343,7 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
337
343
|
return await this.translationProvider.translate(key, ...values);
|
|
338
344
|
}
|
|
339
345
|
}
|
|
346
|
+
exports.AppRuntime = AppRuntime;
|
|
340
347
|
AppRuntime.moduleRegistry = {
|
|
341
348
|
appLaunch: modules_1.AppLaunchModule,
|
|
342
349
|
appSync: modules_1.AppSyncModule,
|
|
@@ -347,7 +354,6 @@ AppRuntime.moduleRegistry = {
|
|
|
347
354
|
relationshipChanged: modules_1.RelationshipChangedModule,
|
|
348
355
|
relationshipTemplateProcessed: modules_1.RelationshipTemplateProcessedModule
|
|
349
356
|
};
|
|
350
|
-
exports.AppRuntime = AppRuntime;
|
|
351
357
|
//# sourceMappingURL=AppRuntime.js.map
|
|
352
358
|
|
|
353
359
|
/***/ }),
|
|
@@ -439,11 +445,11 @@ class Modules {
|
|
|
439
445
|
}
|
|
440
446
|
class AppRuntimeErrors {
|
|
441
447
|
}
|
|
448
|
+
exports.AppRuntimeErrors = AppRuntimeErrors;
|
|
442
449
|
AppRuntimeErrors.general = new General();
|
|
443
450
|
AppRuntimeErrors.startup = new Startup();
|
|
444
451
|
AppRuntimeErrors.modules = new Modules();
|
|
445
452
|
AppRuntimeErrors.multiAccount = new MultiAccount();
|
|
446
|
-
exports.AppRuntimeErrors = AppRuntimeErrors;
|
|
447
453
|
//# sourceMappingURL=AppRuntimeErrors.js.map
|
|
448
454
|
|
|
449
455
|
/***/ }),
|
|
@@ -507,7 +513,6 @@ class AppStringProcessor {
|
|
|
507
513
|
}
|
|
508
514
|
return await this._handleTruncatedReference(truncatedReference, result.value);
|
|
509
515
|
}
|
|
510
|
-
const uiBridge = await this.runtime.uiBridge();
|
|
511
516
|
if (!truncatedReference.startsWith(runtime_1.Base64ForIdPrefix.Token)) {
|
|
512
517
|
const error = AppRuntimeErrors_1.AppRuntimeErrors.startup.wrongCode();
|
|
513
518
|
return UserfriendlyResult_1.UserfriendlyResult.fail(error);
|
|
@@ -525,6 +530,7 @@ class AppStringProcessor {
|
|
|
525
530
|
return UserfriendlyResult_1.UserfriendlyResult.fail(error);
|
|
526
531
|
}
|
|
527
532
|
if (tokenContent instanceof transport_1.TokenContentDeviceSharedSecret) {
|
|
533
|
+
const uiBridge = await this.runtime.uiBridge();
|
|
528
534
|
await uiBridge.showDeviceOnboarding(runtime_1.DeviceMapper.toDeviceOnboardingInfoDTO(tokenContent.sharedSecret));
|
|
529
535
|
return UserfriendlyResult_1.UserfriendlyResult.ok(undefined);
|
|
530
536
|
}
|
|
@@ -685,10 +691,10 @@ const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
|
685
691
|
const runtime_1 = __webpack_require__(/*! @nmshd/runtime */ "@nmshd/runtime");
|
|
686
692
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
687
693
|
exports.buildInformation = {
|
|
688
|
-
version: "2.3.
|
|
689
|
-
build: "
|
|
690
|
-
date: "2023-
|
|
691
|
-
commit: "
|
|
694
|
+
version: "2.3.8",
|
|
695
|
+
build: "54",
|
|
696
|
+
date: "2023-08-22T12:50:23+00:00",
|
|
697
|
+
commit: "541f7ecb0a44aaf768c1aaf11909eaea66881fa4",
|
|
692
698
|
dependencies: {"@js-soft/docdb-access-loki":"^1.0.3","@js-soft/native-abstractions":"^1.2.1","lodash":"^4.17.21"},
|
|
693
699
|
libraries: {
|
|
694
700
|
serval: ts_serval_1.buildInformation,
|
|
@@ -723,8 +729,8 @@ class AccountSelectedEvent extends runtime_1.DataEvent {
|
|
|
723
729
|
super(AccountSelectedEvent.namespace, address, { localAccountId, address });
|
|
724
730
|
}
|
|
725
731
|
}
|
|
726
|
-
AccountSelectedEvent.namespace = "runtime.accountSelected";
|
|
727
732
|
exports.AccountSelectedEvent = AccountSelectedEvent;
|
|
733
|
+
AccountSelectedEvent.namespace = "runtime.accountSelected";
|
|
728
734
|
//# sourceMappingURL=AccountSelectedEvent.js.map
|
|
729
735
|
|
|
730
736
|
/***/ }),
|
|
@@ -745,8 +751,8 @@ class DatawalletSynchronizedEvent extends runtime_1.DataEvent {
|
|
|
745
751
|
super(DatawalletSynchronizedEvent.namespace, address, undefined);
|
|
746
752
|
}
|
|
747
753
|
}
|
|
748
|
-
DatawalletSynchronizedEvent.namespace = "app.datawalletSynchronized";
|
|
749
754
|
exports.DatawalletSynchronizedEvent = DatawalletSynchronizedEvent;
|
|
755
|
+
DatawalletSynchronizedEvent.namespace = "app.datawalletSynchronized";
|
|
750
756
|
//# sourceMappingURL=DatawalletSynchronizedEvent.js.map
|
|
751
757
|
|
|
752
758
|
/***/ }),
|
|
@@ -770,8 +776,8 @@ class ExternalEventReceivedEvent extends runtime_1.DataEvent {
|
|
|
770
776
|
});
|
|
771
777
|
}
|
|
772
778
|
}
|
|
773
|
-
ExternalEventReceivedEvent.namespace = "app.datawalletSynchronized";
|
|
774
779
|
exports.ExternalEventReceivedEvent = ExternalEventReceivedEvent;
|
|
780
|
+
ExternalEventReceivedEvent.namespace = "app.datawalletSynchronized";
|
|
775
781
|
//# sourceMappingURL=ExternalEventReceivedEvent.js.map
|
|
776
782
|
|
|
777
783
|
/***/ }),
|
|
@@ -792,8 +798,8 @@ class MailReceivedEvent extends runtime_1.DataEvent {
|
|
|
792
798
|
super(MailReceivedEvent.namespace, address, message);
|
|
793
799
|
}
|
|
794
800
|
}
|
|
795
|
-
MailReceivedEvent.namespace = "app.mailReceived";
|
|
796
801
|
exports.MailReceivedEvent = MailReceivedEvent;
|
|
802
|
+
MailReceivedEvent.namespace = "app.mailReceived";
|
|
797
803
|
//# sourceMappingURL=MailReceivedEvent.js.map
|
|
798
804
|
|
|
799
805
|
/***/ }),
|
|
@@ -818,8 +824,8 @@ class OnboardingChangeReceivedEvent extends runtime_1.DataEvent {
|
|
|
818
824
|
});
|
|
819
825
|
}
|
|
820
826
|
}
|
|
821
|
-
OnboardingChangeReceivedEvent.namespace = "app.onboardingChangeReceived";
|
|
822
827
|
exports.OnboardingChangeReceivedEvent = OnboardingChangeReceivedEvent;
|
|
828
|
+
OnboardingChangeReceivedEvent.namespace = "app.onboardingChangeReceived";
|
|
823
829
|
//# sourceMappingURL=OnboardingChangeReceivedEvent.js.map
|
|
824
830
|
|
|
825
831
|
/***/ }),
|
|
@@ -840,8 +846,8 @@ class RelationshipSelectedEvent extends runtime_1.DataEvent {
|
|
|
840
846
|
super(RelationshipSelectedEvent.namespace, address, data);
|
|
841
847
|
}
|
|
842
848
|
}
|
|
843
|
-
RelationshipSelectedEvent.namespace = "app.relationshipSelected";
|
|
844
849
|
exports.RelationshipSelectedEvent = RelationshipSelectedEvent;
|
|
850
|
+
RelationshipSelectedEvent.namespace = "app.relationshipSelected";
|
|
845
851
|
//# sourceMappingURL=RelationshipSelectedEvent.js.map
|
|
846
852
|
|
|
847
853
|
/***/ }),
|
|
@@ -1545,7 +1551,7 @@ var BackboneEventName;
|
|
|
1545
1551
|
(function (BackboneEventName) {
|
|
1546
1552
|
BackboneEventName["DatawalletModificationsCreated"] = "DatawalletModificationsCreated";
|
|
1547
1553
|
BackboneEventName["ExternalEventCreated"] = "ExternalEventCreated";
|
|
1548
|
-
})(BackboneEventName
|
|
1554
|
+
})(BackboneEventName || (exports.BackboneEventName = BackboneEventName = {}));
|
|
1549
1555
|
//# sourceMappingURL=IBackboneEventContent.js.map
|
|
1550
1556
|
|
|
1551
1557
|
/***/ }),
|
|
@@ -1639,14 +1645,13 @@ class PushNotificationModule extends AppRuntimeModule_1.AppRuntimeModule {
|
|
|
1639
1645
|
.tokenRegistrationNotPossible("No device for this account found", deviceResult.error)
|
|
1640
1646
|
.logWith(this.logger);
|
|
1641
1647
|
}
|
|
1642
|
-
const device = deviceResult.value;
|
|
1643
1648
|
const platform = this.runtime.nativeEnvironment.deviceInfoAccess.deviceInfo.pushService;
|
|
1649
|
+
const appId = this.runtime.config.applicationId;
|
|
1644
1650
|
const handle = token;
|
|
1645
|
-
const installationId = device.id;
|
|
1646
1651
|
const result = await services.transportServices.account.registerPushNotificationToken({
|
|
1647
1652
|
platform,
|
|
1648
1653
|
handle,
|
|
1649
|
-
|
|
1654
|
+
appId
|
|
1650
1655
|
});
|
|
1651
1656
|
if (result.isError) {
|
|
1652
1657
|
throw AppRuntimeErrors_1.AppRuntimeErrors.modules.pushNotificationModule
|
|
@@ -1654,7 +1659,7 @@ class PushNotificationModule extends AppRuntimeModule_1.AppRuntimeModule {
|
|
|
1654
1659
|
.logWith(this.logger);
|
|
1655
1660
|
}
|
|
1656
1661
|
else {
|
|
1657
|
-
this.logger.trace(`PushNotificationModule.registerPushTokenForLocalAccount: Token ${handle} registered for account ${address} on platform ${platform} and
|
|
1662
|
+
this.logger.trace(`PushNotificationModule.registerPushTokenForLocalAccount: Token ${handle} registered for account ${address} on platform ${platform} and appId ${appId}`);
|
|
1658
1663
|
}
|
|
1659
1664
|
}
|
|
1660
1665
|
getNotificationTokenFromConfig() {
|
|
@@ -2075,7 +2080,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2075
2080
|
exports.LocalAccount = void 0;
|
|
2076
2081
|
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
2077
2082
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
2078
|
-
let LocalAccount = class LocalAccount extends transport_1.CoreSerializable {
|
|
2083
|
+
let LocalAccount = exports.LocalAccount = class LocalAccount extends transport_1.CoreSerializable {
|
|
2079
2084
|
static from(value) {
|
|
2080
2085
|
return this.fromAny(value);
|
|
2081
2086
|
}
|
|
@@ -2115,10 +2120,9 @@ __decorate([
|
|
|
2115
2120
|
(0, ts_serval_1.serialize)(),
|
|
2116
2121
|
__metadata("design:type", transport_1.CoreDate)
|
|
2117
2122
|
], LocalAccount.prototype, "lastAccessedAt", void 0);
|
|
2118
|
-
LocalAccount = __decorate([
|
|
2123
|
+
exports.LocalAccount = LocalAccount = __decorate([
|
|
2119
2124
|
(0, ts_serval_1.type)("LocalAccount")
|
|
2120
2125
|
], LocalAccount);
|
|
2121
|
-
exports.LocalAccount = LocalAccount;
|
|
2122
2126
|
//# sourceMappingURL=LocalAccount.js.map
|
|
2123
2127
|
|
|
2124
2128
|
/***/ }),
|