@nmshd/app-runtime 2.3.4 → 2.3.6
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/AppRuntime.d.ts +7 -6
- package/dist/AppRuntime.js +4 -3
- package/dist/AppRuntime.js.map +1 -1
- package/dist/AppRuntimeErrors.js +1 -1
- package/dist/AppRuntimeErrors.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/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/multiAccount/MultiAccountController.d.ts +1 -0
- package/dist/multiAccount/MultiAccountController.js +9 -0
- package/dist/multiAccount/MultiAccountController.js.map +1 -1
- package/dist/multiAccount/data/LocalAccount.d.ts +3 -1
- package/dist/multiAccount/data/LocalAccount.js +5 -0
- package/dist/multiAccount/data/LocalAccount.js.map +1 -1
- package/dist/multiAccount/data/LocalAccountDTO.d.ts +1 -0
- package/dist/multiAccount/data/LocalAccountMapper.js +3 -2
- package/dist/multiAccount/data/LocalAccountMapper.js.map +1 -1
- package/dist/runtimeNatives.d.ts +16 -0
- package/dist/runtimeNatives.js +3 -0
- package/dist/runtimeNatives.js.map +1 -0
- package/lib-web/nmshd.app-runtime.js +48 -18
- package/lib-web/nmshd.app-runtime.min.js +1 -1
- package/package.json +11 -11
|
@@ -110,12 +110,12 @@ const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transpor
|
|
|
110
110
|
const AppConfig_1 = __webpack_require__(/*! ./AppConfig */ "./dist/AppConfig.js");
|
|
111
111
|
const AppRuntimeErrors_1 = __webpack_require__(/*! ./AppRuntimeErrors */ "./dist/AppRuntimeErrors.js");
|
|
112
112
|
const AppStringProcessor_1 = __webpack_require__(/*! ./AppStringProcessor */ "./dist/AppStringProcessor.js");
|
|
113
|
+
const SessionStorage_1 = __webpack_require__(/*! ./SessionStorage */ "./dist/SessionStorage.js");
|
|
114
|
+
const UserfriendlyResult_1 = __webpack_require__(/*! ./UserfriendlyResult */ "./dist/UserfriendlyResult.js");
|
|
113
115
|
const events_1 = __webpack_require__(/*! ./events */ "./dist/events/index.js");
|
|
114
116
|
const extensibility_1 = __webpack_require__(/*! ./extensibility */ "./dist/extensibility/index.js");
|
|
115
117
|
const modules_1 = __webpack_require__(/*! ./modules */ "./dist/modules/index.js");
|
|
116
118
|
const multiAccount_1 = __webpack_require__(/*! ./multiAccount */ "./dist/multiAccount/index.js");
|
|
117
|
-
const SessionStorage_1 = __webpack_require__(/*! ./SessionStorage */ "./dist/SessionStorage.js");
|
|
118
|
-
const UserfriendlyResult_1 = __webpack_require__(/*! ./UserfriendlyResult */ "./dist/UserfriendlyResult.js");
|
|
119
119
|
class AppRuntime extends runtime_1.Runtime {
|
|
120
120
|
constructor(_nativeEnvironment, appConfig) {
|
|
121
121
|
super(appConfig, _nativeEnvironment.loggerFactory);
|
|
@@ -188,6 +188,7 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
188
188
|
const session = await this.getOrCreateSession(accountReference);
|
|
189
189
|
this.sessionStorage.currentSession = session;
|
|
190
190
|
this.eventBus.publish(new events_1.AccountSelectedEvent(session.address, session.account.id));
|
|
191
|
+
await this.multiAccountController.updateLastAccessedAt(session.account.id);
|
|
191
192
|
return session;
|
|
192
193
|
}
|
|
193
194
|
async getOrCreateSession(accountReference) {
|
|
@@ -336,7 +337,6 @@ class AppRuntime extends runtime_1.Runtime {
|
|
|
336
337
|
return await this.translationProvider.translate(key, ...values);
|
|
337
338
|
}
|
|
338
339
|
}
|
|
339
|
-
exports.AppRuntime = AppRuntime;
|
|
340
340
|
AppRuntime.moduleRegistry = {
|
|
341
341
|
appLaunch: modules_1.AppLaunchModule,
|
|
342
342
|
appSync: modules_1.AppSyncModule,
|
|
@@ -347,6 +347,7 @@ AppRuntime.moduleRegistry = {
|
|
|
347
347
|
relationshipChanged: modules_1.RelationshipChangedModule,
|
|
348
348
|
relationshipTemplateProcessed: modules_1.RelationshipTemplateProcessedModule
|
|
349
349
|
};
|
|
350
|
+
exports.AppRuntime = AppRuntime;
|
|
350
351
|
//# sourceMappingURL=AppRuntime.js.map
|
|
351
352
|
|
|
352
353
|
/***/ }),
|
|
@@ -438,11 +439,11 @@ class Modules {
|
|
|
438
439
|
}
|
|
439
440
|
class AppRuntimeErrors {
|
|
440
441
|
}
|
|
441
|
-
exports.AppRuntimeErrors = AppRuntimeErrors;
|
|
442
442
|
AppRuntimeErrors.general = new General();
|
|
443
443
|
AppRuntimeErrors.startup = new Startup();
|
|
444
444
|
AppRuntimeErrors.modules = new Modules();
|
|
445
445
|
AppRuntimeErrors.multiAccount = new MultiAccount();
|
|
446
|
+
exports.AppRuntimeErrors = AppRuntimeErrors;
|
|
446
447
|
//# sourceMappingURL=AppRuntimeErrors.js.map
|
|
447
448
|
|
|
448
449
|
/***/ }),
|
|
@@ -684,10 +685,10 @@ const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
|
684
685
|
const runtime_1 = __webpack_require__(/*! @nmshd/runtime */ "@nmshd/runtime");
|
|
685
686
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
686
687
|
exports.buildInformation = {
|
|
687
|
-
version: "2.3.
|
|
688
|
-
build: "
|
|
689
|
-
date: "2023-
|
|
690
|
-
commit: "
|
|
688
|
+
version: "2.3.6",
|
|
689
|
+
build: "51",
|
|
690
|
+
date: "2023-05-02T10:29:00+00:00",
|
|
691
|
+
commit: "62c929d9ffa69f90ca569ef26732c0a9adcec2ba",
|
|
691
692
|
dependencies: {"@js-soft/docdb-access-loki":"^1.0.3","@js-soft/native-abstractions":"^1.2.1","lodash":"^4.17.21"},
|
|
692
693
|
libraries: {
|
|
693
694
|
serval: ts_serval_1.buildInformation,
|
|
@@ -722,8 +723,8 @@ class AccountSelectedEvent extends runtime_1.DataEvent {
|
|
|
722
723
|
super(AccountSelectedEvent.namespace, address, { localAccountId, address });
|
|
723
724
|
}
|
|
724
725
|
}
|
|
725
|
-
exports.AccountSelectedEvent = AccountSelectedEvent;
|
|
726
726
|
AccountSelectedEvent.namespace = "runtime.accountSelected";
|
|
727
|
+
exports.AccountSelectedEvent = AccountSelectedEvent;
|
|
727
728
|
//# sourceMappingURL=AccountSelectedEvent.js.map
|
|
728
729
|
|
|
729
730
|
/***/ }),
|
|
@@ -744,8 +745,8 @@ class DatawalletSynchronizedEvent extends runtime_1.DataEvent {
|
|
|
744
745
|
super(DatawalletSynchronizedEvent.namespace, address, undefined);
|
|
745
746
|
}
|
|
746
747
|
}
|
|
747
|
-
exports.DatawalletSynchronizedEvent = DatawalletSynchronizedEvent;
|
|
748
748
|
DatawalletSynchronizedEvent.namespace = "app.datawalletSynchronized";
|
|
749
|
+
exports.DatawalletSynchronizedEvent = DatawalletSynchronizedEvent;
|
|
749
750
|
//# sourceMappingURL=DatawalletSynchronizedEvent.js.map
|
|
750
751
|
|
|
751
752
|
/***/ }),
|
|
@@ -769,8 +770,8 @@ class ExternalEventReceivedEvent extends runtime_1.DataEvent {
|
|
|
769
770
|
});
|
|
770
771
|
}
|
|
771
772
|
}
|
|
772
|
-
exports.ExternalEventReceivedEvent = ExternalEventReceivedEvent;
|
|
773
773
|
ExternalEventReceivedEvent.namespace = "app.datawalletSynchronized";
|
|
774
|
+
exports.ExternalEventReceivedEvent = ExternalEventReceivedEvent;
|
|
774
775
|
//# sourceMappingURL=ExternalEventReceivedEvent.js.map
|
|
775
776
|
|
|
776
777
|
/***/ }),
|
|
@@ -791,8 +792,8 @@ class MailReceivedEvent extends runtime_1.DataEvent {
|
|
|
791
792
|
super(MailReceivedEvent.namespace, address, message);
|
|
792
793
|
}
|
|
793
794
|
}
|
|
794
|
-
exports.MailReceivedEvent = MailReceivedEvent;
|
|
795
795
|
MailReceivedEvent.namespace = "app.mailReceived";
|
|
796
|
+
exports.MailReceivedEvent = MailReceivedEvent;
|
|
796
797
|
//# sourceMappingURL=MailReceivedEvent.js.map
|
|
797
798
|
|
|
798
799
|
/***/ }),
|
|
@@ -817,8 +818,8 @@ class OnboardingChangeReceivedEvent extends runtime_1.DataEvent {
|
|
|
817
818
|
});
|
|
818
819
|
}
|
|
819
820
|
}
|
|
820
|
-
exports.OnboardingChangeReceivedEvent = OnboardingChangeReceivedEvent;
|
|
821
821
|
OnboardingChangeReceivedEvent.namespace = "app.onboardingChangeReceived";
|
|
822
|
+
exports.OnboardingChangeReceivedEvent = OnboardingChangeReceivedEvent;
|
|
822
823
|
//# sourceMappingURL=OnboardingChangeReceivedEvent.js.map
|
|
823
824
|
|
|
824
825
|
/***/ }),
|
|
@@ -839,8 +840,8 @@ class RelationshipSelectedEvent extends runtime_1.DataEvent {
|
|
|
839
840
|
super(RelationshipSelectedEvent.namespace, address, data);
|
|
840
841
|
}
|
|
841
842
|
}
|
|
842
|
-
exports.RelationshipSelectedEvent = RelationshipSelectedEvent;
|
|
843
843
|
RelationshipSelectedEvent.namespace = "app.relationshipSelected";
|
|
844
|
+
exports.RelationshipSelectedEvent = RelationshipSelectedEvent;
|
|
844
845
|
//# sourceMappingURL=RelationshipSelectedEvent.js.map
|
|
845
846
|
|
|
846
847
|
/***/ }),
|
|
@@ -1130,13 +1131,14 @@ __exportStar(__webpack_require__(/*! ./AppRuntime */ "./dist/AppRuntime.js"), ex
|
|
|
1130
1131
|
__exportStar(__webpack_require__(/*! ./AppRuntimeError */ "./dist/AppRuntimeError.js"), exports);
|
|
1131
1132
|
__exportStar(__webpack_require__(/*! ./AppRuntimeErrors */ "./dist/AppRuntimeErrors.js"), exports);
|
|
1132
1133
|
__exportStar(__webpack_require__(/*! ./AppRuntimeServices */ "./dist/AppRuntimeServices.js"), exports);
|
|
1134
|
+
__exportStar(__webpack_require__(/*! ./UserfriendlyApplicationError */ "./dist/UserfriendlyApplicationError.js"), exports);
|
|
1135
|
+
__exportStar(__webpack_require__(/*! ./UserfriendlyResult */ "./dist/UserfriendlyResult.js"), exports);
|
|
1133
1136
|
__exportStar(__webpack_require__(/*! ./buildInformation */ "./dist/buildInformation.js"), exports);
|
|
1134
1137
|
__exportStar(__webpack_require__(/*! ./events */ "./dist/events/index.js"), exports);
|
|
1135
1138
|
__exportStar(__webpack_require__(/*! ./extensibility */ "./dist/extensibility/index.js"), exports);
|
|
1136
1139
|
__exportStar(__webpack_require__(/*! ./modules */ "./dist/modules/index.js"), exports);
|
|
1137
1140
|
__exportStar(__webpack_require__(/*! ./multiAccount */ "./dist/multiAccount/index.js"), exports);
|
|
1138
|
-
__exportStar(__webpack_require__(/*! ./
|
|
1139
|
-
__exportStar(__webpack_require__(/*! ./UserfriendlyResult */ "./dist/UserfriendlyResult.js"), exports);
|
|
1141
|
+
__exportStar(__webpack_require__(/*! ./runtimeNatives */ "./dist/runtimeNatives.js"), exports);
|
|
1140
1142
|
//# sourceMappingURL=index.js.map
|
|
1141
1143
|
|
|
1142
1144
|
/***/ }),
|
|
@@ -2037,6 +2039,15 @@ class MultiAccountController {
|
|
|
2037
2039
|
renamedAccount.name = name;
|
|
2038
2040
|
await this._localAccounts.update(oldAccount, renamedAccount);
|
|
2039
2041
|
}
|
|
2042
|
+
async updateLastAccessedAt(accountId) {
|
|
2043
|
+
const document = await this._localAccounts.read(accountId);
|
|
2044
|
+
if (!document) {
|
|
2045
|
+
throw transport_1.CoreErrors.general.recordNotFound(LocalAccount_1.LocalAccount, accountId).logWith(this._log);
|
|
2046
|
+
}
|
|
2047
|
+
const localAccount = LocalAccount_1.LocalAccount.from(document);
|
|
2048
|
+
localAccount.lastAccessedAt = transport_1.CoreDate.utc();
|
|
2049
|
+
await this._localAccounts.update(document, localAccount);
|
|
2050
|
+
}
|
|
2040
2051
|
}
|
|
2041
2052
|
exports.MultiAccountController = MultiAccountController;
|
|
2042
2053
|
//# sourceMappingURL=MultiAccountController.js.map
|
|
@@ -2099,6 +2110,11 @@ __decorate([
|
|
|
2099
2110
|
(0, ts_serval_1.serialize)(),
|
|
2100
2111
|
__metadata("design:type", Number)
|
|
2101
2112
|
], LocalAccount.prototype, "order", void 0);
|
|
2113
|
+
__decorate([
|
|
2114
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
2115
|
+
(0, ts_serval_1.serialize)(),
|
|
2116
|
+
__metadata("design:type", transport_1.CoreDate)
|
|
2117
|
+
], LocalAccount.prototype, "lastAccessedAt", void 0);
|
|
2102
2118
|
LocalAccount = __decorate([
|
|
2103
2119
|
(0, ts_serval_1.type)("LocalAccount")
|
|
2104
2120
|
], LocalAccount);
|
|
@@ -2132,14 +2148,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2132
2148
|
exports.LocalAccountMapper = void 0;
|
|
2133
2149
|
class LocalAccountMapper {
|
|
2134
2150
|
static toLocalAccountDTO(localAccount) {
|
|
2135
|
-
var _a;
|
|
2151
|
+
var _a, _b;
|
|
2136
2152
|
return {
|
|
2137
2153
|
id: localAccount.id.toString(),
|
|
2138
2154
|
address: (_a = localAccount.address) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
2139
2155
|
name: localAccount.name,
|
|
2140
2156
|
realm: localAccount.realm,
|
|
2141
2157
|
directory: localAccount.directory.toString(),
|
|
2142
|
-
order: localAccount.order
|
|
2158
|
+
order: localAccount.order,
|
|
2159
|
+
lastAccessedAt: (_b = localAccount.lastAccessedAt) === null || _b === void 0 ? void 0 : _b.toString()
|
|
2143
2160
|
};
|
|
2144
2161
|
}
|
|
2145
2162
|
}
|
|
@@ -2194,6 +2211,19 @@ __exportStar(__webpack_require__(/*! ./MultiAccountController */ "./dist/multiAc
|
|
|
2194
2211
|
|
|
2195
2212
|
/***/ }),
|
|
2196
2213
|
|
|
2214
|
+
/***/ "./dist/runtimeNatives.js":
|
|
2215
|
+
/*!********************************!*\
|
|
2216
|
+
!*** ./dist/runtimeNatives.js ***!
|
|
2217
|
+
\********************************/
|
|
2218
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
2219
|
+
|
|
2220
|
+
"use strict";
|
|
2221
|
+
|
|
2222
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2223
|
+
//# sourceMappingURL=runtimeNatives.js.map
|
|
2224
|
+
|
|
2225
|
+
/***/ }),
|
|
2226
|
+
|
|
2197
2227
|
/***/ "./node_modules/@js-soft/docdb-access-abstractions/dist/DatabaseType.js":
|
|
2198
2228
|
/*!******************************************************************************!*\
|
|
2199
2229
|
!*** ./node_modules/@js-soft/docdb-access-abstractions/dist/DatabaseType.js ***!
|