@nmshd/transport 1.0.7 → 1.1.2
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/buildInformation.js +5 -5
- package/dist/core/DependencyOverrides.d.ts +4 -0
- package/dist/core/DependencyOverrides.js +3 -0
- package/dist/core/DependencyOverrides.js.map +1 -0
- package/dist/core/Transport.d.ts +2 -3
- package/dist/core/Transport.js +26 -23
- package/dist/core/Transport.js.map +1 -1
- package/dist/core/TransportErrors.d.ts +4 -0
- package/dist/core/TransportErrors.js +12 -0
- package/dist/core/TransportErrors.js.map +1 -1
- package/dist/core/backbone/BackboneIds.d.ts +0 -1
- package/dist/core/backbone/BackboneIds.js +0 -1
- package/dist/core/backbone/BackboneIds.js.map +1 -1
- package/dist/core/backbone/RESTClient.js +1 -1
- package/dist/core/backbone/RESTClient.js.map +1 -1
- package/dist/core/backbone/index.d.ts +1 -0
- package/dist/core/backbone/index.js +1 -0
- package/dist/core/backbone/index.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/modules/accounts/AccountController.d.ts +3 -2
- package/dist/modules/accounts/AccountController.js +9 -11
- package/dist/modules/accounts/AccountController.js.map +1 -1
- package/dist/modules/accounts/IdentityController.d.ts +3 -7
- package/dist/modules/accounts/IdentityController.js +1 -15
- package/dist/modules/accounts/IdentityController.js.map +1 -1
- package/dist/modules/accounts/data/Identity.d.ts +0 -15
- package/dist/modules/accounts/data/Identity.js +0 -21
- package/dist/modules/accounts/data/Identity.js.map +1 -1
- package/dist/modules/devices/DeviceController.d.ts +5 -1
- package/dist/modules/devices/DeviceController.js +9 -4
- package/dist/modules/devices/DeviceController.js.map +1 -1
- package/dist/modules/devices/local/Device.d.ts +2 -0
- package/dist/modules/devices/local/Device.js +7 -1
- package/dist/modules/devices/local/Device.js.map +1 -1
- package/dist/modules/index.d.ts +8 -0
- package/dist/modules/index.js +8 -0
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +2 -2
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationMapper.d.ts +1 -1
- package/dist/modules/sync/DatawalletModificationMapper.js +6 -3
- package/dist/modules/sync/DatawalletModificationMapper.js.map +1 -1
- package/dist/modules/sync/SyncController.d.ts +17 -4
- package/dist/modules/sync/SyncController.js +154 -24
- package/dist/modules/sync/SyncController.js.map +1 -1
- package/dist/modules/sync/SynchronizedCollection.d.ts +2 -1
- package/dist/modules/sync/SynchronizedCollection.js +18 -9
- package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
- package/dist/modules/sync/backbone/BackboneDatawalletModification.d.ts +1 -0
- package/dist/modules/sync/backbone/CreateDatawalletModifications.d.ts +1 -0
- package/dist/modules/sync/backbone/FinalizeSyncRun.d.ts +15 -9
- package/dist/modules/sync/backbone/GetDatawallet.d.ts +3 -0
- package/dist/modules/sync/backbone/GetDatawallet.js +3 -0
- package/dist/modules/sync/backbone/GetDatawallet.js.map +1 -0
- package/dist/modules/sync/backbone/StartSyncRun.d.ts +8 -0
- package/dist/modules/sync/backbone/StartSyncRun.js +6 -1
- package/dist/modules/sync/backbone/StartSyncRun.js.map +1 -1
- package/dist/modules/sync/backbone/SyncClient.d.ts +21 -6
- package/dist/modules/sync/backbone/SyncClient.js +19 -6
- package/dist/modules/sync/backbone/SyncClient.js.map +1 -1
- package/dist/modules/sync/local/DatawalletModification.d.ts +2 -0
- package/dist/modules/sync/local/DatawalletModification.js +5 -0
- package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
- package/dist/modules/sync/migrations/DeviceMigrations.d.ts +6 -0
- package/dist/modules/sync/migrations/DeviceMigrations.js +24 -0
- package/dist/modules/sync/migrations/DeviceMigrations.js.map +1 -0
- package/dist/modules/sync/migrations/IdentityMigrations.d.ts +6 -0
- package/dist/modules/sync/migrations/IdentityMigrations.js +14 -0
- package/dist/modules/sync/migrations/IdentityMigrations.js.map +1 -0
- package/lib-web/nmshd.transport.js +827 -431
- package/lib-web/nmshd.transport.js.map +1 -1
- package/lib-web/nmshd.transport.min.js +1 -1
- package/lib-web/nmshd.transport.min.js.map +1 -1
- package/package.json +29 -29
|
@@ -15,11 +15,11 @@ exports.buildInformation = void 0;
|
|
|
15
15
|
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
16
16
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
17
17
|
exports.buildInformation = {
|
|
18
|
-
version: "1.
|
|
19
|
-
build: "
|
|
20
|
-
date: "2021-
|
|
21
|
-
commit: "
|
|
22
|
-
dependencies: {"@js-soft/docdb-access-abstractions":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/simple-logger":"1.0.0","@js-soft/ts-utils":"1.
|
|
18
|
+
version: "1.1.2",
|
|
19
|
+
build: "14",
|
|
20
|
+
date: "2021-12-27T14:35:00+00:00",
|
|
21
|
+
commit: "08e6e7a9d318eed605afe46dbea5043a964968e3",
|
|
22
|
+
dependencies: {"@js-soft/docdb-access-abstractions":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/simple-logger":"1.0.0","@js-soft/ts-utils":"1.1.1","axios":"^0.24.0","deep-equal":"^2.0.5","fast-json-patch":"^3.1.0","form-data":"^4.0.0","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^2.2.0","qs":"^6.10.2","reflect-metadata":"^0.1.13","ts-simple-nameof":"^1.3.1","uuid":"^8.3.2"},
|
|
23
23
|
libraries: {
|
|
24
24
|
crypto: crypto_1.buildInformation,
|
|
25
25
|
serval: ts_serval_1.buildInformation
|
|
@@ -572,6 +572,19 @@ var DbCollectionName;
|
|
|
572
572
|
|
|
573
573
|
/***/ }),
|
|
574
574
|
|
|
575
|
+
/***/ "./dist/core/DependencyOverrides.js":
|
|
576
|
+
/*!******************************************!*\
|
|
577
|
+
!*** ./dist/core/DependencyOverrides.js ***!
|
|
578
|
+
\******************************************/
|
|
579
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
580
|
+
|
|
581
|
+
"use strict";
|
|
582
|
+
|
|
583
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
584
|
+
//# sourceMappingURL=DependencyOverrides.js.map
|
|
585
|
+
|
|
586
|
+
/***/ }),
|
|
587
|
+
|
|
575
588
|
/***/ "./dist/core/Transport.js":
|
|
576
589
|
/*!********************************!*\
|
|
577
590
|
!*** ./dist/core/Transport.js ***!
|
|
@@ -595,30 +608,8 @@ const TransportLoggerFactory_1 = __webpack_require__(/*! ./TransportLoggerFactor
|
|
|
595
608
|
let log;
|
|
596
609
|
class Transport {
|
|
597
610
|
constructor(databaseConnection, customConfig, loggerFactory = new simple_logger_1.SimpleLoggerFactory()) {
|
|
598
|
-
this.defaultConfig = {
|
|
599
|
-
debug: false,
|
|
600
|
-
platformClientId: "",
|
|
601
|
-
platformClientSecret: "",
|
|
602
|
-
platformTimeout: 60000,
|
|
603
|
-
platformMaxRedirects: 10,
|
|
604
|
-
platformMaxUnencryptedFileSize: 10 * 1024 * 1024,
|
|
605
|
-
baseUrl: "",
|
|
606
|
-
useGateway: true,
|
|
607
|
-
realm: Identity_1.Realm.Prod,
|
|
608
|
-
datawalletEnabled: false,
|
|
609
|
-
httpAgent: {
|
|
610
|
-
keepAlive: true,
|
|
611
|
-
maxSockets: 5,
|
|
612
|
-
maxFreeSockets: 2
|
|
613
|
-
},
|
|
614
|
-
httpsAgent: {
|
|
615
|
-
keepAlive: true,
|
|
616
|
-
maxSockets: 5,
|
|
617
|
-
maxFreeSockets: 2
|
|
618
|
-
}
|
|
619
|
-
};
|
|
620
611
|
this.databaseConnection = databaseConnection;
|
|
621
|
-
this._config = lodash_1.default.defaultsDeep({}, customConfig,
|
|
612
|
+
this._config = lodash_1.default.defaultsDeep({}, customConfig, Transport.defaultConfig);
|
|
622
613
|
TransportLoggerFactory_1.TransportLoggerFactory.init(loggerFactory);
|
|
623
614
|
log = TransportLoggerFactory_1.TransportLoggerFactory.getLogger(Transport);
|
|
624
615
|
if (!this._config.platformClientId) {
|
|
@@ -630,6 +621,9 @@ class Transport {
|
|
|
630
621
|
if (!this._config.baseUrl) {
|
|
631
622
|
throw TransportErrors_1.TransportErrors.general.baseUrlNotSet().logWith(log);
|
|
632
623
|
}
|
|
624
|
+
if (this._config.supportedDatawalletVersion < 1) {
|
|
625
|
+
throw TransportErrors_1.TransportErrors.general.invalidDatawalletVersion().logWith(log);
|
|
626
|
+
}
|
|
633
627
|
}
|
|
634
628
|
get config() {
|
|
635
629
|
return this._config;
|
|
@@ -649,6 +643,28 @@ class Transport {
|
|
|
649
643
|
}
|
|
650
644
|
}
|
|
651
645
|
exports.Transport = Transport;
|
|
646
|
+
Transport.defaultConfig = {
|
|
647
|
+
supportedDatawalletVersion: 1,
|
|
648
|
+
debug: false,
|
|
649
|
+
platformClientId: "",
|
|
650
|
+
platformClientSecret: "",
|
|
651
|
+
platformTimeout: 60000,
|
|
652
|
+
platformMaxRedirects: 10,
|
|
653
|
+
platformMaxUnencryptedFileSize: 10 * 1024 * 1024,
|
|
654
|
+
baseUrl: "",
|
|
655
|
+
realm: Identity_1.Realm.Prod,
|
|
656
|
+
datawalletEnabled: false,
|
|
657
|
+
httpAgent: {
|
|
658
|
+
keepAlive: true,
|
|
659
|
+
maxSockets: 5,
|
|
660
|
+
maxFreeSockets: 2
|
|
661
|
+
},
|
|
662
|
+
httpsAgent: {
|
|
663
|
+
keepAlive: true,
|
|
664
|
+
maxSockets: 5,
|
|
665
|
+
maxFreeSockets: 2
|
|
666
|
+
}
|
|
667
|
+
};
|
|
652
668
|
//# sourceMappingURL=Transport.js.map
|
|
653
669
|
|
|
654
670
|
/***/ }),
|
|
@@ -990,6 +1006,15 @@ class Datawallet {
|
|
|
990
1006
|
throw new Error(`Given type '${type}' is not supported.`);
|
|
991
1007
|
}
|
|
992
1008
|
}
|
|
1009
|
+
insufficientSupportedDatawalletVersion(supportedVersion, requiredVersion) {
|
|
1010
|
+
return new CoreError_1.CoreError("error.transport.datawallet.insufficientSupportedDatawalletVersion", `The SupportedDatawalletVersion '${supportedVersion}' is too low. A minimum version of '${requiredVersion}' is required.`);
|
|
1011
|
+
}
|
|
1012
|
+
currentBiggerThanTarget(current, target) {
|
|
1013
|
+
return new CoreError_1.CoreError("error.transport.datawallet.currentBiggerThanTarget", `The current datawallet version '${current}' is bigger than the target version '${target}'.`);
|
|
1014
|
+
}
|
|
1015
|
+
noMigrationAvailable(version) {
|
|
1016
|
+
return new CoreError_1.CoreError("error.core.datawallet.noMigrationAvailable", `There is no migration available for the datawallet version '${version}'.`);
|
|
1017
|
+
}
|
|
993
1018
|
}
|
|
994
1019
|
class Files {
|
|
995
1020
|
plaintextHashMismatch() {
|
|
@@ -1020,6 +1045,9 @@ class Tokens {
|
|
|
1020
1045
|
}
|
|
1021
1046
|
}
|
|
1022
1047
|
class General {
|
|
1048
|
+
invalidDatawalletVersion() {
|
|
1049
|
+
return new CoreError_1.CoreError("error.transport.general.invalidDatawalletVersion", "The given identity version is invalid. The value must be 0 or higher.");
|
|
1050
|
+
}
|
|
1023
1051
|
baseUrlNotSet() {
|
|
1024
1052
|
return new CoreError_1.CoreError("error.transport.general.baseUrlNotSet", "The baseUrl was not set.");
|
|
1025
1053
|
}
|
|
@@ -1282,7 +1310,6 @@ class BackboneIds {
|
|
|
1282
1310
|
exports.BackboneIds = BackboneIds;
|
|
1283
1311
|
BackboneIds.file = new CoreIdHelper_1.CoreIdHelper("FIL", true);
|
|
1284
1312
|
BackboneIds.relationship = new CoreIdHelper_1.CoreIdHelper("REL", true);
|
|
1285
|
-
BackboneIds.relationshipRequest = new CoreIdHelper_1.CoreIdHelper("RRQ", true);
|
|
1286
1313
|
BackboneIds.message = new CoreIdHelper_1.CoreIdHelper("MSG", true);
|
|
1287
1314
|
BackboneIds.relationshipTemplate = new CoreIdHelper_1.CoreIdHelper("RLT", true);
|
|
1288
1315
|
BackboneIds.token = new CoreIdHelper_1.CoreIdHelper("TOK", true);
|
|
@@ -1479,7 +1506,7 @@ class RESTClient {
|
|
|
1479
1506
|
}
|
|
1480
1507
|
};
|
|
1481
1508
|
if (this.config.platformAdditionalHeaders) {
|
|
1482
|
-
defaults.headers = this.config.platformAdditionalHeaders;
|
|
1509
|
+
defaults.headers = lodash_1.default.defaultsDeep({}, defaults.headers, this.config.platformAdditionalHeaders);
|
|
1483
1510
|
}
|
|
1484
1511
|
if (typeof http_1.Agent !== "undefined" && typeof https_1.Agent !== "undefined") {
|
|
1485
1512
|
defaults.httpAgent = this.createHTTPAgent();
|
|
@@ -2060,6 +2087,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
2060
2087
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2061
2088
|
};
|
|
2062
2089
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2090
|
+
__exportStar(__webpack_require__(/*! ./Authenticator */ "./dist/core/backbone/Authenticator.js"), exports);
|
|
2063
2091
|
__exportStar(__webpack_require__(/*! ./BackboneIds */ "./dist/core/backbone/BackboneIds.js"), exports);
|
|
2064
2092
|
__exportStar(__webpack_require__(/*! ./ClientResult */ "./dist/core/backbone/ClientResult.js"), exports);
|
|
2065
2093
|
__exportStar(__webpack_require__(/*! ./Paginator */ "./dist/core/backbone/Paginator.js"), exports);
|
|
@@ -2097,6 +2125,7 @@ __exportStar(__webpack_require__(/*! ./CoreSerializable */ "./dist/core/CoreSeri
|
|
|
2097
2125
|
__exportStar(__webpack_require__(/*! ./CoreSerializableAsync */ "./dist/core/CoreSerializableAsync.js"), exports);
|
|
2098
2126
|
__exportStar(__webpack_require__(/*! ./CoreSynchronizable */ "./dist/core/CoreSynchronizable.js"), exports);
|
|
2099
2127
|
__exportStar(__webpack_require__(/*! ./CoreUtil */ "./dist/core/CoreUtil.js"), exports);
|
|
2128
|
+
__exportStar(__webpack_require__(/*! ./DependencyOverrides */ "./dist/core/DependencyOverrides.js"), exports);
|
|
2100
2129
|
__exportStar(__webpack_require__(/*! ./Transport */ "./dist/core/Transport.js"), exports);
|
|
2101
2130
|
__exportStar(__webpack_require__(/*! ./TransportContext */ "./dist/core/TransportContext.js"), exports);
|
|
2102
2131
|
__exportStar(__webpack_require__(/*! ./TransportController */ "./dist/core/TransportController.js"), exports);
|
|
@@ -2608,11 +2637,11 @@ const Identity_1 = __webpack_require__(/*! ./data/Identity */ "./dist/modules/ac
|
|
|
2608
2637
|
const IdentityController_1 = __webpack_require__(/*! ./IdentityController */ "./dist/modules/accounts/IdentityController.js");
|
|
2609
2638
|
const IdentityUtil_1 = __webpack_require__(/*! ./IdentityUtil */ "./dist/modules/accounts/IdentityUtil.js");
|
|
2610
2639
|
class AccountController {
|
|
2611
|
-
constructor(_transport,
|
|
2640
|
+
constructor(_transport, _db, _config, dependencyOverrides = {}) {
|
|
2612
2641
|
this._transport = _transport;
|
|
2613
|
-
this._realm = _realm;
|
|
2614
2642
|
this._db = _db;
|
|
2615
2643
|
this._config = _config;
|
|
2644
|
+
this.dependencyOverrides = dependencyOverrides;
|
|
2616
2645
|
this._dbClosed = false;
|
|
2617
2646
|
this.autoSync = true;
|
|
2618
2647
|
this._authenticator = new Authenticator_1.Authenticator(this);
|
|
@@ -2663,7 +2692,7 @@ class AccountController {
|
|
|
2663
2692
|
if (!deviceSharedSecret) {
|
|
2664
2693
|
// Identity creation
|
|
2665
2694
|
this._log.trace("No account information found. Creating new account...");
|
|
2666
|
-
const result = await this.createIdentityAndDevice(this.
|
|
2695
|
+
const result = await this.createIdentityAndDevice(this.config.realm);
|
|
2667
2696
|
identityCreated = true;
|
|
2668
2697
|
device = result.device;
|
|
2669
2698
|
this.deviceAuthClient = new DeviceAuthClient_1.DeviceAuthClient(this.config, this.authenticator);
|
|
@@ -2697,6 +2726,7 @@ class AccountController {
|
|
|
2697
2726
|
await this.initControllers();
|
|
2698
2727
|
if (identityCreated) {
|
|
2699
2728
|
await this.devices.addExistingDevice(device);
|
|
2729
|
+
await this.synchronization.setInititalDatawalletVersion(this._config.supportedDatawalletVersion);
|
|
2700
2730
|
}
|
|
2701
2731
|
else if (deviceUpdated) {
|
|
2702
2732
|
await this.syncDatawallet();
|
|
@@ -2714,7 +2744,6 @@ class AccountController {
|
|
|
2714
2744
|
}
|
|
2715
2745
|
async initControllers() {
|
|
2716
2746
|
this._log.trace("Initializing controllers...");
|
|
2717
|
-
this.synchronization = await new SyncController_1.SyncController(this, this.unpushedDatawalletModifications, this.config.datawalletEnabled).init();
|
|
2718
2747
|
this.relationshipSecrets = await new RelationshipSecretController_1.RelationshipSecretController(this).init();
|
|
2719
2748
|
this.devices = await new DevicesController_1.DevicesController(this).init();
|
|
2720
2749
|
this.certificates = await new CertificateController_1.CertificateController(this).init();
|
|
@@ -2725,6 +2754,7 @@ class AccountController {
|
|
|
2725
2754
|
this.relationshipTemplates = await new RelationshipTemplateController_1.RelationshipTemplateController(this, this.relationshipSecrets).init();
|
|
2726
2755
|
this.messages = await new MessageController_1.MessageController(this).init();
|
|
2727
2756
|
this.tokens = await new TokenController_1.TokenController(this).init();
|
|
2757
|
+
this.synchronization = await new SyncController_1.SyncController(this, this.dependencyOverrides, this.unpushedDatawalletModifications, this.config.datawalletEnabled).init();
|
|
2728
2758
|
this._log.trace("Initialization of controllers finished.");
|
|
2729
2759
|
}
|
|
2730
2760
|
disableAutoSync() {
|
|
@@ -2798,11 +2828,7 @@ class AccountController {
|
|
|
2798
2828
|
}
|
|
2799
2829
|
const identity = await Identity_1.Identity.from({
|
|
2800
2830
|
address: core_1.CoreAddress.from(deviceResponse.address),
|
|
2801
|
-
createdAt: core_1.CoreDate.from(deviceResponse.createdAt),
|
|
2802
|
-
description: "",
|
|
2803
|
-
name: "",
|
|
2804
2831
|
realm: realm,
|
|
2805
|
-
type: "unknown" /* UNKNOWN */,
|
|
2806
2832
|
publicKey: identityKeypair.publicKey
|
|
2807
2833
|
});
|
|
2808
2834
|
const deviceId = core_1.CoreId.from(deviceResponse.device.id);
|
|
@@ -2817,7 +2843,8 @@ class AccountController {
|
|
|
2817
2843
|
publicKey: deviceKeypair.publicKey,
|
|
2818
2844
|
type: deviceInfo.type,
|
|
2819
2845
|
certificate: "",
|
|
2820
|
-
username: deviceResponse.device.username
|
|
2846
|
+
username: deviceResponse.device.username,
|
|
2847
|
+
datawalletVersion: this._config.supportedDatawalletVersion
|
|
2821
2848
|
});
|
|
2822
2849
|
// Initialize required controllers
|
|
2823
2850
|
await Promise.all([this.identity.init(identity), this.activeDevice.init(privBaseDevice, device)]);
|
|
@@ -2903,9 +2930,9 @@ class AccountController {
|
|
|
2903
2930
|
async getSynchronizedCollection(collectionName) {
|
|
2904
2931
|
const collection = await this.db.getCollection(collectionName);
|
|
2905
2932
|
if (!this.config.datawalletEnabled) {
|
|
2906
|
-
return new SynchronizedCollection_1.SynchronizedCollection(collection);
|
|
2933
|
+
return new SynchronizedCollection_1.SynchronizedCollection(collection, this.config.supportedDatawalletVersion);
|
|
2907
2934
|
}
|
|
2908
|
-
return new SynchronizedCollection_1.SynchronizedCollection(collection, this.unpushedDatawalletModifications);
|
|
2935
|
+
return new SynchronizedCollection_1.SynchronizedCollection(collection, this.config.supportedDatawalletVersion, this.unpushedDatawalletModifications);
|
|
2909
2936
|
}
|
|
2910
2937
|
}
|
|
2911
2938
|
exports.AccountController = AccountController;
|
|
@@ -2939,18 +2966,6 @@ class IdentityController extends core_1.TransportController {
|
|
|
2939
2966
|
get realm() {
|
|
2940
2967
|
return this._identity.realm;
|
|
2941
2968
|
}
|
|
2942
|
-
get name() {
|
|
2943
|
-
return this._identity.name;
|
|
2944
|
-
}
|
|
2945
|
-
get description() {
|
|
2946
|
-
return this._identity.description;
|
|
2947
|
-
}
|
|
2948
|
-
get createdAt() {
|
|
2949
|
-
return this._identity.createdAt;
|
|
2950
|
-
}
|
|
2951
|
-
get type() {
|
|
2952
|
-
return this._identity.type;
|
|
2953
|
-
}
|
|
2954
2969
|
get identity() {
|
|
2955
2970
|
return this._identity;
|
|
2956
2971
|
}
|
|
@@ -2965,9 +2980,7 @@ class IdentityController extends core_1.TransportController {
|
|
|
2965
2980
|
isMe(address) {
|
|
2966
2981
|
return this.address.equals(address);
|
|
2967
2982
|
}
|
|
2968
|
-
async update(
|
|
2969
|
-
this.identity.name = name;
|
|
2970
|
-
this.identity.description = description;
|
|
2983
|
+
async update() {
|
|
2971
2984
|
await this.parent.info.set("identity", this.identity);
|
|
2972
2985
|
}
|
|
2973
2986
|
async sign(content) {
|
|
@@ -3105,7 +3118,6 @@ const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-s
|
|
|
3105
3118
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
3106
3119
|
const CoreSerializableAsync_1 = __webpack_require__(/*! ../../../core/CoreSerializableAsync */ "./dist/core/CoreSerializableAsync.js");
|
|
3107
3120
|
const CoreAddress_1 = __webpack_require__(/*! ../../../core/types/CoreAddress */ "./dist/core/types/CoreAddress.js");
|
|
3108
|
-
const CoreDate_1 = __webpack_require__(/*! ../../../core/types/CoreDate */ "./dist/core/types/CoreDate.js");
|
|
3109
3121
|
var Realm;
|
|
3110
3122
|
(function (Realm) {
|
|
3111
3123
|
Realm["Dev"] = "dev";
|
|
@@ -3132,26 +3144,6 @@ __decorate([
|
|
|
3132
3144
|
(0, ts_serval_1.serialize)(),
|
|
3133
3145
|
__metadata("design:type", String)
|
|
3134
3146
|
], Identity.prototype, "realm", void 0);
|
|
3135
|
-
__decorate([
|
|
3136
|
-
(0, ts_serval_1.validate)(),
|
|
3137
|
-
(0, ts_serval_1.serialize)(),
|
|
3138
|
-
__metadata("design:type", String)
|
|
3139
|
-
], Identity.prototype, "name", void 0);
|
|
3140
|
-
__decorate([
|
|
3141
|
-
(0, ts_serval_1.validate)(),
|
|
3142
|
-
(0, ts_serval_1.serialize)(),
|
|
3143
|
-
__metadata("design:type", String)
|
|
3144
|
-
], Identity.prototype, "description", void 0);
|
|
3145
|
-
__decorate([
|
|
3146
|
-
(0, ts_serval_1.validate)(),
|
|
3147
|
-
(0, ts_serval_1.serialize)(),
|
|
3148
|
-
__metadata("design:type", CoreDate_1.CoreDate)
|
|
3149
|
-
], Identity.prototype, "createdAt", void 0);
|
|
3150
|
-
__decorate([
|
|
3151
|
-
(0, ts_serval_1.validate)(),
|
|
3152
|
-
(0, ts_serval_1.serialize)(),
|
|
3153
|
-
__metadata("design:type", String)
|
|
3154
|
-
], Identity.prototype, "type", void 0);
|
|
3155
3147
|
Identity = Identity_1 = __decorate([
|
|
3156
3148
|
(0, ts_serval_1.type)("Identity")
|
|
3157
3149
|
], Identity);
|
|
@@ -4445,10 +4437,15 @@ class DeviceController extends core_1.TransportController {
|
|
|
4445
4437
|
throw e;
|
|
4446
4438
|
}
|
|
4447
4439
|
}
|
|
4448
|
-
async update(
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4440
|
+
async update(update) {
|
|
4441
|
+
if (update.name)
|
|
4442
|
+
this.device.name = update.name;
|
|
4443
|
+
if (update.description)
|
|
4444
|
+
this.device.description = update.description;
|
|
4445
|
+
if (update.datawalletVersion)
|
|
4446
|
+
this.device.datawalletVersion = update.datawalletVersion;
|
|
4447
|
+
await this.parent.devices.update(this.device);
|
|
4448
|
+
await this.parent.info.set("device", this.device.toJSON());
|
|
4452
4449
|
}
|
|
4453
4450
|
async sign(content) {
|
|
4454
4451
|
const privateKeyContainer = await this.secrets.loadSecret(DeviceSecretController_1.DeviceSecretType.DeviceSignature);
|
|
@@ -4886,7 +4883,8 @@ let Device = Device_1 = class Device extends core_1.CoreSynchronizable {
|
|
|
4886
4883
|
(0, ts_simple_nameof_1.nameof)((d) => d.createdByDevice),
|
|
4887
4884
|
(0, ts_simple_nameof_1.nameof)((d) => d.lastLoginAt),
|
|
4888
4885
|
(0, ts_simple_nameof_1.nameof)((d) => d.username),
|
|
4889
|
-
(0, ts_simple_nameof_1.nameof)((d) => d.initialPassword)
|
|
4886
|
+
(0, ts_simple_nameof_1.nameof)((d) => d.initialPassword),
|
|
4887
|
+
(0, ts_simple_nameof_1.nameof)((d) => d.datawalletVersion)
|
|
4890
4888
|
];
|
|
4891
4889
|
this.userdataProperties = [(0, ts_simple_nameof_1.nameof)((d) => d.name), (0, ts_simple_nameof_1.nameof)((d) => d.description)];
|
|
4892
4890
|
}
|
|
@@ -4954,6 +4952,11 @@ __decorate([
|
|
|
4954
4952
|
(0, ts_serval_1.serialize)(),
|
|
4955
4953
|
__metadata("design:type", Boolean)
|
|
4956
4954
|
], Device.prototype, "isAdmin", void 0);
|
|
4955
|
+
__decorate([
|
|
4956
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
4957
|
+
(0, ts_serval_1.serialize)(),
|
|
4958
|
+
__metadata("design:type", Number)
|
|
4959
|
+
], Device.prototype, "datawalletVersion", void 0);
|
|
4957
4960
|
Device = Device_1 = __decorate([
|
|
4958
4961
|
(0, ts_serval_1.type)("Device")
|
|
4959
4962
|
], Device);
|
|
@@ -6034,6 +6037,14 @@ __exportStar(__webpack_require__(/*! ./relationshipTemplates/transmission/Relati
|
|
|
6034
6037
|
__exportStar(__webpack_require__(/*! ./secrets/data/SecretContainerCipher */ "./dist/modules/secrets/data/SecretContainerCipher.js"), exports);
|
|
6035
6038
|
__exportStar(__webpack_require__(/*! ./secrets/data/SecretContainerPlain */ "./dist/modules/secrets/data/SecretContainerPlain.js"), exports);
|
|
6036
6039
|
__exportStar(__webpack_require__(/*! ./secrets/SecretController */ "./dist/modules/secrets/SecretController.js"), exports);
|
|
6040
|
+
__exportStar(__webpack_require__(/*! ./sync/backbone/BackboneDatawalletModification */ "./dist/modules/sync/backbone/BackboneDatawalletModification.js"), exports);
|
|
6041
|
+
__exportStar(__webpack_require__(/*! ./sync/backbone/BackboneExternalEvent */ "./dist/modules/sync/backbone/BackboneExternalEvent.js"), exports);
|
|
6042
|
+
__exportStar(__webpack_require__(/*! ./sync/backbone/CreateDatawalletModifications */ "./dist/modules/sync/backbone/CreateDatawalletModifications.js"), exports);
|
|
6043
|
+
__exportStar(__webpack_require__(/*! ./sync/backbone/FinalizeSyncRun */ "./dist/modules/sync/backbone/FinalizeSyncRun.js"), exports);
|
|
6044
|
+
__exportStar(__webpack_require__(/*! ./sync/backbone/GetDatawallet */ "./dist/modules/sync/backbone/GetDatawallet.js"), exports);
|
|
6045
|
+
__exportStar(__webpack_require__(/*! ./sync/backbone/GetDatawalletModifications */ "./dist/modules/sync/backbone/GetDatawalletModifications.js"), exports);
|
|
6046
|
+
__exportStar(__webpack_require__(/*! ./sync/backbone/StartSyncRun */ "./dist/modules/sync/backbone/StartSyncRun.js"), exports);
|
|
6047
|
+
__exportStar(__webpack_require__(/*! ./sync/backbone/SyncClient */ "./dist/modules/sync/backbone/SyncClient.js"), exports);
|
|
6037
6048
|
__exportStar(__webpack_require__(/*! ./sync/ChangedItems */ "./dist/modules/sync/ChangedItems.js"), exports);
|
|
6038
6049
|
__exportStar(__webpack_require__(/*! ./sync/DatawalletModificationsProcessor */ "./dist/modules/sync/DatawalletModificationsProcessor.js"), exports);
|
|
6039
6050
|
__exportStar(__webpack_require__(/*! ./sync/ExternalEventsProcessor */ "./dist/modules/sync/ExternalEventsProcessor.js"), exports);
|
|
@@ -7044,7 +7055,7 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
7044
7055
|
const templateKey = await this.secrets.createTemplateKey();
|
|
7045
7056
|
const templateContent = await RelationshipTemplateContent_1.RelationshipTemplateContent.from({
|
|
7046
7057
|
content: parameters.content,
|
|
7047
|
-
identity: this.parent.identity,
|
|
7058
|
+
identity: this.parent.identity.identity,
|
|
7048
7059
|
templateKey: templateKey
|
|
7049
7060
|
});
|
|
7050
7061
|
const secretKey = await core_1.CoreCrypto.generateSecretKey();
|
|
@@ -7068,7 +7079,7 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
7068
7079
|
createdBy: this.parent.identity.address,
|
|
7069
7080
|
createdByDevice: this.parent.activeDevice.id,
|
|
7070
7081
|
expiresAt: parameters.expiresAt,
|
|
7071
|
-
identity: this.parent.identity,
|
|
7082
|
+
identity: this.parent.identity.identity,
|
|
7072
7083
|
maxNumberOfRelationships: (_a = parameters.maxNumberOfRelationships) !== null && _a !== void 0 ? _a : undefined,
|
|
7073
7084
|
templateKey: templateKey
|
|
7074
7085
|
});
|
|
@@ -9669,7 +9680,7 @@ exports.DatawalletModificationMapper = void 0;
|
|
|
9669
9680
|
const core_1 = __webpack_require__(/*! ../../core */ "./dist/core/index.js");
|
|
9670
9681
|
const DatawalletModification_1 = __webpack_require__(/*! ./local/DatawalletModification */ "./dist/modules/sync/local/DatawalletModification.js");
|
|
9671
9682
|
class DatawalletModificationMapper {
|
|
9672
|
-
static async fromBackboneDatawalletModification(backboneDatawalletModification, decryptedPayload) {
|
|
9683
|
+
static async fromBackboneDatawalletModification(backboneDatawalletModification, decryptedPayload, datawalletVersion) {
|
|
9673
9684
|
let type;
|
|
9674
9685
|
switch (backboneDatawalletModification.type) {
|
|
9675
9686
|
case "Create":
|
|
@@ -9710,16 +9721,19 @@ class DatawalletModificationMapper {
|
|
|
9710
9721
|
payloadCategory: payloadCategory,
|
|
9711
9722
|
collection: backboneDatawalletModification.collection,
|
|
9712
9723
|
type: type,
|
|
9713
|
-
payload: decryptedPayload
|
|
9724
|
+
payload: decryptedPayload,
|
|
9725
|
+
datawalletVersion: datawalletVersion
|
|
9714
9726
|
});
|
|
9715
9727
|
}
|
|
9716
9728
|
static toCreateDatawalletModificationsRequestItem(datawalletModification, encryptedPayload) {
|
|
9729
|
+
var _a;
|
|
9717
9730
|
return {
|
|
9718
9731
|
objectIdentifier: datawalletModification.objectIdentifier.toString(),
|
|
9719
9732
|
payloadCategory: datawalletModification.payloadCategory,
|
|
9720
9733
|
collection: datawalletModification.collection,
|
|
9721
9734
|
type: datawalletModification.type,
|
|
9722
|
-
encryptedPayload: encryptedPayload
|
|
9735
|
+
encryptedPayload: encryptedPayload,
|
|
9736
|
+
datawalletVersion: (_a = datawalletModification.datawalletVersion) !== null && _a !== void 0 ? _a : 0
|
|
9723
9737
|
};
|
|
9724
9738
|
}
|
|
9725
9739
|
}
|
|
@@ -10034,15 +10048,26 @@ const DatawalletModificationMapper_1 = __webpack_require__(/*! ./DatawalletModif
|
|
|
10034
10048
|
const DatawalletModificationsProcessor_1 = __webpack_require__(/*! ./DatawalletModificationsProcessor */ "./dist/modules/sync/DatawalletModificationsProcessor.js");
|
|
10035
10049
|
const ExternalEventsProcessor_1 = __webpack_require__(/*! ./ExternalEventsProcessor */ "./dist/modules/sync/ExternalEventsProcessor.js");
|
|
10036
10050
|
const DatawalletModification_1 = __webpack_require__(/*! ./local/DatawalletModification */ "./dist/modules/sync/local/DatawalletModification.js");
|
|
10051
|
+
const DeviceMigrations_1 = __webpack_require__(/*! ./migrations/DeviceMigrations */ "./dist/modules/sync/migrations/DeviceMigrations.js");
|
|
10052
|
+
const IdentityMigrations_1 = __webpack_require__(/*! ./migrations/IdentityMigrations */ "./dist/modules/sync/migrations/IdentityMigrations.js");
|
|
10037
10053
|
class SyncController extends core_1.TransportController {
|
|
10038
|
-
constructor(parent, unpushedDatawalletModifications, datawalletEnabled) {
|
|
10054
|
+
constructor(parent, dependencyOverrides, unpushedDatawalletModifications, datawalletEnabled) {
|
|
10055
|
+
var _a;
|
|
10039
10056
|
super(core_1.ControllerName.Sync, parent);
|
|
10040
10057
|
this.unpushedDatawalletModifications = unpushedDatawalletModifications;
|
|
10041
10058
|
this.datawalletEnabled = datawalletEnabled;
|
|
10059
|
+
this.client = (_a = dependencyOverrides.syncClient) !== null && _a !== void 0 ? _a : new SyncClient_1.SyncClient(this.config, this.parent.authenticator);
|
|
10060
|
+
this.identityMigrations = new IdentityMigrations_1.IdentityMigrations(this.parent);
|
|
10061
|
+
this.deviceMigrations = new DeviceMigrations_1.DeviceMigrations(this.parent);
|
|
10062
|
+
}
|
|
10063
|
+
get cacheFetcher() {
|
|
10064
|
+
if (!this._cacheFetcher) {
|
|
10065
|
+
this._cacheFetcher = new DatawalletModificationsProcessor_1.CacheFetcher(this.parent.files, this.parent.messages, this.parent.relationshipTemplates, this.parent.relationships, this.parent.tokens);
|
|
10066
|
+
}
|
|
10067
|
+
return this._cacheFetcher;
|
|
10042
10068
|
}
|
|
10043
10069
|
async init() {
|
|
10044
10070
|
await super.init();
|
|
10045
|
-
this.client = new SyncClient_1.SyncClient(this.config, this.parent.authenticator);
|
|
10046
10071
|
this.syncInfo = await this.db.getMap("SyncInfo");
|
|
10047
10072
|
return this;
|
|
10048
10073
|
}
|
|
@@ -10071,33 +10096,120 @@ class SyncController extends core_1.TransportController {
|
|
|
10071
10096
|
if (whatToSync === "OnlyDatawallet") {
|
|
10072
10097
|
return await this.syncDatawallet();
|
|
10073
10098
|
}
|
|
10074
|
-
const
|
|
10075
|
-
if (!syncRunWasStarted) {
|
|
10076
|
-
await this.syncDatawallet();
|
|
10077
|
-
await this.setLastCompletedSyncTime();
|
|
10078
|
-
return new ChangedItems_1.ChangedItems();
|
|
10079
|
-
}
|
|
10080
|
-
await this.applyIncomingDatawalletModifications();
|
|
10081
|
-
const result = await this.applyIncomingExternalEvents();
|
|
10082
|
-
await this.finalizeSyncRun(result.results);
|
|
10099
|
+
const externalEventSyncResult = await this.syncExternalEvents();
|
|
10083
10100
|
await this.setLastCompletedSyncTime();
|
|
10084
|
-
if (
|
|
10085
|
-
throw new core_1.CoreError("error.transport.errorWhileApplyingExternalEvents",
|
|
10101
|
+
if (externalEventSyncResult.externalEventResults.some((r) => r.errorCode !== undefined)) {
|
|
10102
|
+
throw new core_1.CoreError("error.transport.errorWhileApplyingExternalEvents", externalEventSyncResult.externalEventResults
|
|
10086
10103
|
.filter((r) => r.errorCode !== undefined)
|
|
10087
10104
|
.map((r) => r.errorCode)
|
|
10088
10105
|
.join(" | ")).logWith(this.log);
|
|
10089
10106
|
}
|
|
10090
|
-
return
|
|
10107
|
+
return externalEventSyncResult.changedItems;
|
|
10108
|
+
}
|
|
10109
|
+
async syncExternalEvents() {
|
|
10110
|
+
const syncRunWasStarted = await this.startExternalEventsSyncRun();
|
|
10111
|
+
if (!syncRunWasStarted) {
|
|
10112
|
+
await this.syncDatawallet();
|
|
10113
|
+
return {
|
|
10114
|
+
changedItems: new ChangedItems_1.ChangedItems(),
|
|
10115
|
+
externalEventResults: []
|
|
10116
|
+
};
|
|
10117
|
+
}
|
|
10118
|
+
await this.applyIncomingDatawalletModifications();
|
|
10119
|
+
const result = await this.applyIncomingExternalEvents();
|
|
10120
|
+
await this.finalizeExternalEventsSyncRun(result.externalEventResults);
|
|
10121
|
+
return result;
|
|
10091
10122
|
}
|
|
10092
10123
|
async syncDatawallet() {
|
|
10093
10124
|
if (!this.datawalletEnabled) {
|
|
10094
10125
|
return;
|
|
10095
10126
|
}
|
|
10127
|
+
const identityDatawalletVersion = await this.getIdentityDatawalletVersion();
|
|
10128
|
+
if (this.config.supportedDatawalletVersion < identityDatawalletVersion) {
|
|
10129
|
+
// This means that the datawallet of the identity was upgraded by another device with a higher version.
|
|
10130
|
+
// It is necesssary to update the current device.
|
|
10131
|
+
throw core_1.TransportErrors.datawallet
|
|
10132
|
+
.insufficientSupportedDatawalletVersion(this.config.supportedDatawalletVersion, identityDatawalletVersion)
|
|
10133
|
+
.logWith(this.log);
|
|
10134
|
+
}
|
|
10096
10135
|
this.log.trace("Synchronization of Datawallet events started...");
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10136
|
+
try {
|
|
10137
|
+
await this.applyIncomingDatawalletModifications();
|
|
10138
|
+
await this.pushLocalDatawalletModifications();
|
|
10139
|
+
await this.setLastCompletedDatawalletSyncTime();
|
|
10140
|
+
}
|
|
10141
|
+
catch (e) {
|
|
10142
|
+
const outdatedErrorCode = "error.platform.validation.datawallet.insufficientSupportedDatawalletVersion";
|
|
10143
|
+
if (!(e instanceof core_1.RequestError) || e.code !== outdatedErrorCode)
|
|
10144
|
+
throw e;
|
|
10145
|
+
throw core_1.TransportErrors.datawallet
|
|
10146
|
+
.insufficientSupportedDatawalletVersion(this.config.supportedDatawalletVersion, identityDatawalletVersion)
|
|
10147
|
+
.logWith(this.log);
|
|
10148
|
+
}
|
|
10100
10149
|
this.log.trace("Synchronization of Datawallet events ended...");
|
|
10150
|
+
await this.checkDatawalletVersion(identityDatawalletVersion);
|
|
10151
|
+
}
|
|
10152
|
+
async checkDatawalletVersion(identityDatawalletVersion) {
|
|
10153
|
+
var _a;
|
|
10154
|
+
if (this.config.supportedDatawalletVersion < identityDatawalletVersion) {
|
|
10155
|
+
throw core_1.TransportErrors.datawallet
|
|
10156
|
+
.insufficientSupportedDatawalletVersion(this.config.supportedDatawalletVersion, identityDatawalletVersion)
|
|
10157
|
+
.logWith(this.log);
|
|
10158
|
+
}
|
|
10159
|
+
if (this.config.supportedDatawalletVersion > identityDatawalletVersion) {
|
|
10160
|
+
await this.upgradeIdentityDatawalletVersion(identityDatawalletVersion, this.config.supportedDatawalletVersion);
|
|
10161
|
+
}
|
|
10162
|
+
const deviceDatawalletVersion = (_a = this.parent.activeDevice.device.datawalletVersion) !== null && _a !== void 0 ? _a : 0;
|
|
10163
|
+
if (deviceDatawalletVersion < identityDatawalletVersion) {
|
|
10164
|
+
await this.upgradeDeviceDatawalletVersion(deviceDatawalletVersion, this.config.supportedDatawalletVersion);
|
|
10165
|
+
}
|
|
10166
|
+
}
|
|
10167
|
+
async upgradeIdentityDatawalletVersion(identityDatawalletVersion, targetDatawalletVersion) {
|
|
10168
|
+
if (identityDatawalletVersion === targetDatawalletVersion)
|
|
10169
|
+
return;
|
|
10170
|
+
if (this.config.supportedDatawalletVersion < targetDatawalletVersion) {
|
|
10171
|
+
throw core_1.TransportErrors.datawallet
|
|
10172
|
+
.insufficientSupportedDatawalletVersion(targetDatawalletVersion, identityDatawalletVersion)
|
|
10173
|
+
.logWith(this.log);
|
|
10174
|
+
}
|
|
10175
|
+
if (identityDatawalletVersion > targetDatawalletVersion) {
|
|
10176
|
+
throw core_1.TransportErrors.datawallet
|
|
10177
|
+
.currentBiggerThanTarget(identityDatawalletVersion, targetDatawalletVersion)
|
|
10178
|
+
.logWith(this.log);
|
|
10179
|
+
}
|
|
10180
|
+
while (identityDatawalletVersion < targetDatawalletVersion) {
|
|
10181
|
+
identityDatawalletVersion++;
|
|
10182
|
+
await this.startDatawalletVersionUpgradeSyncRun();
|
|
10183
|
+
const migrationFunction = this.identityMigrations[`v${identityDatawalletVersion}`];
|
|
10184
|
+
if (!migrationFunction) {
|
|
10185
|
+
throw core_1.TransportErrors.datawallet.noMigrationAvailable(identityDatawalletVersion).logWith(this.log);
|
|
10186
|
+
}
|
|
10187
|
+
await migrationFunction.call(this.identityMigrations);
|
|
10188
|
+
await this.finalizeDatawalletVersionUpgradeSyncRun(identityDatawalletVersion);
|
|
10189
|
+
}
|
|
10190
|
+
}
|
|
10191
|
+
async upgradeDeviceDatawalletVersion(deviceDatawalletVersion, targetDatawalletVersion) {
|
|
10192
|
+
if (deviceDatawalletVersion === targetDatawalletVersion)
|
|
10193
|
+
return;
|
|
10194
|
+
if (this.config.supportedDatawalletVersion < targetDatawalletVersion) {
|
|
10195
|
+
throw core_1.TransportErrors.datawallet
|
|
10196
|
+
.insufficientSupportedDatawalletVersion(targetDatawalletVersion, deviceDatawalletVersion)
|
|
10197
|
+
.logWith(this.log);
|
|
10198
|
+
}
|
|
10199
|
+
if (deviceDatawalletVersion > targetDatawalletVersion) {
|
|
10200
|
+
throw core_1.TransportErrors.datawallet
|
|
10201
|
+
.currentBiggerThanTarget(deviceDatawalletVersion, targetDatawalletVersion)
|
|
10202
|
+
.logWith(this.log);
|
|
10203
|
+
}
|
|
10204
|
+
while (deviceDatawalletVersion < targetDatawalletVersion) {
|
|
10205
|
+
deviceDatawalletVersion++;
|
|
10206
|
+
const migrationFunction = this.deviceMigrations[`v${deviceDatawalletVersion}`];
|
|
10207
|
+
if (!migrationFunction) {
|
|
10208
|
+
throw core_1.TransportErrors.datawallet.noMigrationAvailable(deviceDatawalletVersion).logWith(this.log);
|
|
10209
|
+
}
|
|
10210
|
+
await migrationFunction.call(this.deviceMigrations);
|
|
10211
|
+
await this.parent.activeDevice.update({ datawalletVersion: deviceDatawalletVersion });
|
|
10212
|
+
}
|
|
10101
10213
|
}
|
|
10102
10214
|
async applyIncomingDatawalletModifications() {
|
|
10103
10215
|
const getDatawalletModificationsResult = await this.client.getDatawalletModifications({
|
|
@@ -10109,7 +10221,7 @@ class SyncController extends core_1.TransportController {
|
|
|
10109
10221
|
}
|
|
10110
10222
|
const incomingModifications = await this.decryptDatawalletModifications(encryptedIncomingModifications);
|
|
10111
10223
|
this.log.trace(`${incomingModifications.length} incoming modifications found`);
|
|
10112
|
-
const datawalletModificationsProcessor = new DatawalletModificationsProcessor_1.DatawalletModificationsProcessor(incomingModifications,
|
|
10224
|
+
const datawalletModificationsProcessor = new DatawalletModificationsProcessor_1.DatawalletModificationsProcessor(incomingModifications, this.cacheFetcher, this._db, core_1.TransportLoggerFactory.getLogger(DatawalletModificationsProcessor_1.DatawalletModificationsProcessor));
|
|
10113
10225
|
await datawalletModificationsProcessor.execute();
|
|
10114
10226
|
this.log.trace(`${incomingModifications.length} incoming modifications executed`, incomingModifications);
|
|
10115
10227
|
await this.updateLocalDatawalletModificationIndex(encryptedIncomingModifications.sort(descending)[0].index);
|
|
@@ -10118,7 +10230,7 @@ class SyncController extends core_1.TransportController {
|
|
|
10118
10230
|
const decryptedModifications = [];
|
|
10119
10231
|
for (const encryptedModification of encryptedModifications) {
|
|
10120
10232
|
const decryptedPayload = await this.parent.activeDevice.secrets.decryptDatawalletModificationPayload(encryptedModification.encryptedPayload, encryptedModification.index);
|
|
10121
|
-
const decryptedModification = await DatawalletModificationMapper_1.DatawalletModificationMapper.fromBackboneDatawalletModification(encryptedModification, decryptedPayload);
|
|
10233
|
+
const decryptedModification = await DatawalletModificationMapper_1.DatawalletModificationMapper.fromBackboneDatawalletModification(encryptedModification, decryptedPayload, this.config.supportedDatawalletVersion);
|
|
10122
10234
|
decryptedModifications.push(decryptedModification);
|
|
10123
10235
|
}
|
|
10124
10236
|
return decryptedModifications;
|
|
@@ -10157,15 +10269,29 @@ class SyncController extends core_1.TransportController {
|
|
|
10157
10269
|
await this.unpushedDatawalletModifications.delete({ localId: localModificationId.toString() });
|
|
10158
10270
|
}
|
|
10159
10271
|
}
|
|
10160
|
-
async
|
|
10272
|
+
async setInititalDatawalletVersion(version) {
|
|
10273
|
+
await this.startDatawalletVersionUpgradeSyncRun();
|
|
10274
|
+
await this.finalizeDatawalletVersionUpgradeSyncRun(version);
|
|
10275
|
+
}
|
|
10276
|
+
async getIdentityDatawalletVersion() {
|
|
10277
|
+
const datawalletInfo = (await this.client.getDatawallet()).value;
|
|
10278
|
+
return datawalletInfo.version;
|
|
10279
|
+
}
|
|
10280
|
+
async startExternalEventsSyncRun() {
|
|
10161
10281
|
var _a;
|
|
10162
|
-
const result = await this.client.startSyncRun();
|
|
10282
|
+
const result = await this.client.startSyncRun({ type: StartSyncRun_1.SyncRunType.ExternalEventSync });
|
|
10163
10283
|
if (result.value.status === StartSyncRun_1.StartSyncRunStatus.NoNewEvents) {
|
|
10164
10284
|
return false;
|
|
10165
10285
|
}
|
|
10166
10286
|
this.currentSyncRun = (_a = result.value.syncRun) !== null && _a !== void 0 ? _a : undefined;
|
|
10167
10287
|
return this.currentSyncRun !== undefined;
|
|
10168
10288
|
}
|
|
10289
|
+
async startDatawalletVersionUpgradeSyncRun() {
|
|
10290
|
+
var _a;
|
|
10291
|
+
const result = await this.client.startSyncRun({ type: StartSyncRun_1.SyncRunType.DatawalletVersionUpgrade });
|
|
10292
|
+
this.currentSyncRun = (_a = result.value.syncRun) !== null && _a !== void 0 ? _a : undefined;
|
|
10293
|
+
return this.currentSyncRun !== undefined;
|
|
10294
|
+
}
|
|
10169
10295
|
async applyIncomingExternalEvents() {
|
|
10170
10296
|
const getExternalEventsResult = await this.client.getExternalEventsOfSyncRun(this.currentSyncRun.id.toString());
|
|
10171
10297
|
if (getExternalEventsResult.isError) {
|
|
@@ -10174,14 +10300,17 @@ class SyncController extends core_1.TransportController {
|
|
|
10174
10300
|
const externalEvents = await getExternalEventsResult.value.collect();
|
|
10175
10301
|
const externalEventProcessor = new ExternalEventsProcessor_1.ExternalEventsProcessor(this.parent.messages, this.parent.relationships, externalEvents);
|
|
10176
10302
|
await externalEventProcessor.execute();
|
|
10177
|
-
return {
|
|
10303
|
+
return {
|
|
10304
|
+
externalEventResults: externalEventProcessor.results,
|
|
10305
|
+
changedItems: externalEventProcessor.changedItems
|
|
10306
|
+
};
|
|
10178
10307
|
}
|
|
10179
|
-
async
|
|
10308
|
+
async finalizeExternalEventsSyncRun(externalEventResults) {
|
|
10180
10309
|
if (!this.currentSyncRun) {
|
|
10181
10310
|
throw new Error("There is no active sync run to finalize");
|
|
10182
10311
|
}
|
|
10183
10312
|
const { backboneModifications, localModificationIds } = await this.prepareLocalDatawalletModificationsForPush();
|
|
10184
|
-
await this.client.
|
|
10313
|
+
await this.client.finalizeExternalEventSync(this.currentSyncRun.id.toString(), {
|
|
10185
10314
|
datawalletModifications: backboneModifications,
|
|
10186
10315
|
externalEventResults: externalEventResults
|
|
10187
10316
|
});
|
|
@@ -10191,6 +10320,21 @@ class SyncController extends core_1.TransportController {
|
|
|
10191
10320
|
await this.updateLocalDatawalletModificationIndex(newDatawalletModificationIndex);
|
|
10192
10321
|
this.currentSyncRun = undefined;
|
|
10193
10322
|
}
|
|
10323
|
+
async finalizeDatawalletVersionUpgradeSyncRun(newDatawalletVersion) {
|
|
10324
|
+
if (!this.currentSyncRun) {
|
|
10325
|
+
throw new Error("There is no active sync run to finalize");
|
|
10326
|
+
}
|
|
10327
|
+
const { backboneModifications, localModificationIds } = await this.prepareLocalDatawalletModificationsForPush();
|
|
10328
|
+
await this.client.finalizeDatawalletVersionUpgrade(this.currentSyncRun.id.toString(), {
|
|
10329
|
+
newDatawalletVersion,
|
|
10330
|
+
datawalletModifications: backboneModifications
|
|
10331
|
+
});
|
|
10332
|
+
await this.deleteUnpushedDatawalletModifications(localModificationIds);
|
|
10333
|
+
const oldDatawalletModificationIndex = await this.getLocalDatawalletModificationIndex();
|
|
10334
|
+
const newDatawalletModificationIndex = (oldDatawalletModificationIndex || -1) + backboneModifications.length;
|
|
10335
|
+
await this.updateLocalDatawalletModificationIndex(newDatawalletModificationIndex);
|
|
10336
|
+
this.currentSyncRun = undefined;
|
|
10337
|
+
}
|
|
10194
10338
|
async getLocalDatawalletModificationIndex() {
|
|
10195
10339
|
const index = await this.syncInfo.get("localDatawalletModificationIndex");
|
|
10196
10340
|
return index;
|
|
@@ -10260,8 +10404,9 @@ const CoreSerializableAsync_1 = __webpack_require__(/*! ../../core/CoreSerializa
|
|
|
10260
10404
|
const TransportIds_1 = __webpack_require__(/*! ../../core/TransportIds */ "./dist/core/TransportIds.js");
|
|
10261
10405
|
const DatawalletModification_1 = __webpack_require__(/*! ../sync/local/DatawalletModification */ "./dist/modules/sync/local/DatawalletModification.js");
|
|
10262
10406
|
class SynchronizedCollection {
|
|
10263
|
-
constructor(parent, datawalletModifications) {
|
|
10407
|
+
constructor(parent, datawalletVersion, datawalletModifications) {
|
|
10264
10408
|
this.parent = parent;
|
|
10409
|
+
this.datawalletVersion = datawalletVersion;
|
|
10265
10410
|
this.datawalletModifications = datawalletModifications;
|
|
10266
10411
|
this.name = parent.name;
|
|
10267
10412
|
this.databaseType = parent.databaseType;
|
|
@@ -10282,7 +10427,8 @@ class SynchronizedCollection {
|
|
|
10282
10427
|
collection: this.name,
|
|
10283
10428
|
objectIdentifier: objectIdentifier,
|
|
10284
10429
|
payloadCategory: DatawalletModification_1.DatawalletModificationCategory.TechnicalData,
|
|
10285
|
-
payload: technicalModificationPayload
|
|
10430
|
+
payload: technicalModificationPayload,
|
|
10431
|
+
datawalletVersion: this.datawalletVersion
|
|
10286
10432
|
}));
|
|
10287
10433
|
}
|
|
10288
10434
|
if (Object.getOwnPropertyNames(metadataModificationPayload).length !== 0) {
|
|
@@ -10292,7 +10438,8 @@ class SynchronizedCollection {
|
|
|
10292
10438
|
collection: this.name,
|
|
10293
10439
|
objectIdentifier: objectIdentifier,
|
|
10294
10440
|
payloadCategory: DatawalletModification_1.DatawalletModificationCategory.Metadata,
|
|
10295
|
-
payload: metadataModificationPayload
|
|
10441
|
+
payload: metadataModificationPayload,
|
|
10442
|
+
datawalletVersion: this.datawalletVersion
|
|
10296
10443
|
}));
|
|
10297
10444
|
}
|
|
10298
10445
|
if (Object.getOwnPropertyNames(userdataModificationPayload).length !== 0) {
|
|
@@ -10302,7 +10449,8 @@ class SynchronizedCollection {
|
|
|
10302
10449
|
collection: this.name,
|
|
10303
10450
|
objectIdentifier: objectIdentifier,
|
|
10304
10451
|
payloadCategory: DatawalletModification_1.DatawalletModificationCategory.Userdata,
|
|
10305
|
-
payload: userdataModificationPayload
|
|
10452
|
+
payload: userdataModificationPayload,
|
|
10453
|
+
datawalletVersion: this.datawalletVersion
|
|
10306
10454
|
}));
|
|
10307
10455
|
}
|
|
10308
10456
|
await this.parent.create(newObject);
|
|
@@ -10336,7 +10484,8 @@ class SynchronizedCollection {
|
|
|
10336
10484
|
collection: this.name,
|
|
10337
10485
|
objectIdentifier: objectIdentifier,
|
|
10338
10486
|
payloadCategory: DatawalletModification_1.DatawalletModificationCategory.TechnicalData,
|
|
10339
|
-
payload: payload
|
|
10487
|
+
payload: payload,
|
|
10488
|
+
datawalletVersion: this.datawalletVersion
|
|
10340
10489
|
}));
|
|
10341
10490
|
}
|
|
10342
10491
|
if (haveMetadataPropertiesChanged) {
|
|
@@ -10347,7 +10496,8 @@ class SynchronizedCollection {
|
|
|
10347
10496
|
collection: this.name,
|
|
10348
10497
|
objectIdentifier: objectIdentifier,
|
|
10349
10498
|
payloadCategory: DatawalletModification_1.DatawalletModificationCategory.Metadata,
|
|
10350
|
-
payload: payload
|
|
10499
|
+
payload: payload,
|
|
10500
|
+
datawalletVersion: this.datawalletVersion
|
|
10351
10501
|
}));
|
|
10352
10502
|
}
|
|
10353
10503
|
if (haveUserdataPropertiesChanged) {
|
|
@@ -10358,7 +10508,8 @@ class SynchronizedCollection {
|
|
|
10358
10508
|
collection: this.name,
|
|
10359
10509
|
objectIdentifier: objectIdentifier,
|
|
10360
10510
|
payloadCategory: DatawalletModification_1.DatawalletModificationCategory.Userdata,
|
|
10361
|
-
payload: payload
|
|
10511
|
+
payload: payload,
|
|
10512
|
+
datawalletVersion: this.datawalletVersion
|
|
10362
10513
|
}));
|
|
10363
10514
|
}
|
|
10364
10515
|
if (hasCacheChanged) {
|
|
@@ -10366,7 +10517,8 @@ class SynchronizedCollection {
|
|
|
10366
10517
|
localId: await TransportIds_1.TransportIds.datawalletModification.generate(),
|
|
10367
10518
|
type: DatawalletModification_1.DatawalletModificationType.CacheChanged,
|
|
10368
10519
|
collection: this.name,
|
|
10369
|
-
objectIdentifier: objectIdentifier
|
|
10520
|
+
objectIdentifier: objectIdentifier,
|
|
10521
|
+
datawalletVersion: this.datawalletVersion
|
|
10370
10522
|
}));
|
|
10371
10523
|
}
|
|
10372
10524
|
return await this.parent.update(oldDoc, newObject);
|
|
@@ -10379,7 +10531,8 @@ class SynchronizedCollection {
|
|
|
10379
10531
|
localId: await TransportIds_1.TransportIds.datawalletModification.generate(),
|
|
10380
10532
|
type: DatawalletModification_1.DatawalletModificationType.Delete,
|
|
10381
10533
|
collection: this.name,
|
|
10382
|
-
objectIdentifier: object.id
|
|
10534
|
+
objectIdentifier: object.id,
|
|
10535
|
+
datawalletVersion: this.datawalletVersion
|
|
10383
10536
|
}));
|
|
10384
10537
|
return await this.parent.delete({ id: object.id.toString() });
|
|
10385
10538
|
}
|
|
@@ -10404,6 +10557,84 @@ exports.SynchronizedCollection = SynchronizedCollection;
|
|
|
10404
10557
|
|
|
10405
10558
|
/***/ }),
|
|
10406
10559
|
|
|
10560
|
+
/***/ "./dist/modules/sync/backbone/BackboneDatawalletModification.js":
|
|
10561
|
+
/*!**********************************************************************!*\
|
|
10562
|
+
!*** ./dist/modules/sync/backbone/BackboneDatawalletModification.js ***!
|
|
10563
|
+
\**********************************************************************/
|
|
10564
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10565
|
+
|
|
10566
|
+
"use strict";
|
|
10567
|
+
|
|
10568
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10569
|
+
//# sourceMappingURL=BackboneDatawalletModification.js.map
|
|
10570
|
+
|
|
10571
|
+
/***/ }),
|
|
10572
|
+
|
|
10573
|
+
/***/ "./dist/modules/sync/backbone/BackboneExternalEvent.js":
|
|
10574
|
+
/*!*************************************************************!*\
|
|
10575
|
+
!*** ./dist/modules/sync/backbone/BackboneExternalEvent.js ***!
|
|
10576
|
+
\*************************************************************/
|
|
10577
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10578
|
+
|
|
10579
|
+
"use strict";
|
|
10580
|
+
|
|
10581
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10582
|
+
//# sourceMappingURL=BackboneExternalEvent.js.map
|
|
10583
|
+
|
|
10584
|
+
/***/ }),
|
|
10585
|
+
|
|
10586
|
+
/***/ "./dist/modules/sync/backbone/CreateDatawalletModifications.js":
|
|
10587
|
+
/*!*********************************************************************!*\
|
|
10588
|
+
!*** ./dist/modules/sync/backbone/CreateDatawalletModifications.js ***!
|
|
10589
|
+
\*********************************************************************/
|
|
10590
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10591
|
+
|
|
10592
|
+
"use strict";
|
|
10593
|
+
|
|
10594
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10595
|
+
//# sourceMappingURL=CreateDatawalletModifications.js.map
|
|
10596
|
+
|
|
10597
|
+
/***/ }),
|
|
10598
|
+
|
|
10599
|
+
/***/ "./dist/modules/sync/backbone/FinalizeSyncRun.js":
|
|
10600
|
+
/*!*******************************************************!*\
|
|
10601
|
+
!*** ./dist/modules/sync/backbone/FinalizeSyncRun.js ***!
|
|
10602
|
+
\*******************************************************/
|
|
10603
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10604
|
+
|
|
10605
|
+
"use strict";
|
|
10606
|
+
|
|
10607
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10608
|
+
//# sourceMappingURL=FinalizeSyncRun.js.map
|
|
10609
|
+
|
|
10610
|
+
/***/ }),
|
|
10611
|
+
|
|
10612
|
+
/***/ "./dist/modules/sync/backbone/GetDatawallet.js":
|
|
10613
|
+
/*!*****************************************************!*\
|
|
10614
|
+
!*** ./dist/modules/sync/backbone/GetDatawallet.js ***!
|
|
10615
|
+
\*****************************************************/
|
|
10616
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10617
|
+
|
|
10618
|
+
"use strict";
|
|
10619
|
+
|
|
10620
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10621
|
+
//# sourceMappingURL=GetDatawallet.js.map
|
|
10622
|
+
|
|
10623
|
+
/***/ }),
|
|
10624
|
+
|
|
10625
|
+
/***/ "./dist/modules/sync/backbone/GetDatawalletModifications.js":
|
|
10626
|
+
/*!******************************************************************!*\
|
|
10627
|
+
!*** ./dist/modules/sync/backbone/GetDatawalletModifications.js ***!
|
|
10628
|
+
\******************************************************************/
|
|
10629
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10630
|
+
|
|
10631
|
+
"use strict";
|
|
10632
|
+
|
|
10633
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10634
|
+
//# sourceMappingURL=GetDatawalletModifications.js.map
|
|
10635
|
+
|
|
10636
|
+
/***/ }),
|
|
10637
|
+
|
|
10407
10638
|
/***/ "./dist/modules/sync/backbone/StartSyncRun.js":
|
|
10408
10639
|
/*!****************************************************!*\
|
|
10409
10640
|
!*** ./dist/modules/sync/backbone/StartSyncRun.js ***!
|
|
@@ -10413,7 +10644,12 @@ exports.SynchronizedCollection = SynchronizedCollection;
|
|
|
10413
10644
|
"use strict";
|
|
10414
10645
|
|
|
10415
10646
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10416
|
-
exports.StartSyncRunStatus = void 0;
|
|
10647
|
+
exports.StartSyncRunStatus = exports.SyncRunType = void 0;
|
|
10648
|
+
var SyncRunType;
|
|
10649
|
+
(function (SyncRunType) {
|
|
10650
|
+
SyncRunType["ExternalEventSync"] = "ExternalEventSync";
|
|
10651
|
+
SyncRunType["DatawalletVersionUpgrade"] = "DatawalletVersionUpgrade";
|
|
10652
|
+
})(SyncRunType = exports.SyncRunType || (exports.SyncRunType = {}));
|
|
10417
10653
|
var StartSyncRunStatus;
|
|
10418
10654
|
(function (StartSyncRunStatus) {
|
|
10419
10655
|
StartSyncRunStatus["Created"] = "Created";
|
|
@@ -10435,20 +10671,33 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
10435
10671
|
exports.SyncClient = void 0;
|
|
10436
10672
|
const core_1 = __webpack_require__(/*! ../../../core */ "./dist/core/index.js");
|
|
10437
10673
|
class SyncClient extends core_1.RESTClientAuthenticate {
|
|
10438
|
-
|
|
10439
|
-
|
|
10674
|
+
constructor(config, authenticator) {
|
|
10675
|
+
super(config, authenticator, {
|
|
10676
|
+
headers: {
|
|
10677
|
+
"x-supported-datawallet-version": config.supportedDatawalletVersion.toString()
|
|
10678
|
+
}
|
|
10679
|
+
});
|
|
10440
10680
|
}
|
|
10441
|
-
async
|
|
10442
|
-
return await this.
|
|
10681
|
+
async startSyncRun(request) {
|
|
10682
|
+
return await this.post("/api/v1/SyncRuns", request);
|
|
10683
|
+
}
|
|
10684
|
+
async finalizeExternalEventSync(id, request) {
|
|
10685
|
+
return await this.put(`/api/v1/SyncRuns/${id}/FinalizeExternalEventSync`, request);
|
|
10686
|
+
}
|
|
10687
|
+
async finalizeDatawalletVersionUpgrade(id, request) {
|
|
10688
|
+
return await this.put(`/api/v1/SyncRuns/${id}/FinalizeDatawalletVersionUpgrade`, request);
|
|
10443
10689
|
}
|
|
10444
10690
|
async getExternalEventsOfSyncRun(syncRunId) {
|
|
10445
10691
|
return await this.getPaged(`/api/v1/SyncRuns/${syncRunId}/ExternalEvents`, {});
|
|
10446
10692
|
}
|
|
10693
|
+
async getDatawallet() {
|
|
10694
|
+
return await this.get("/api/v1/Datawallet");
|
|
10695
|
+
}
|
|
10447
10696
|
async getDatawalletModifications(request) {
|
|
10448
|
-
return await this.getPaged("/api/v1/
|
|
10697
|
+
return await this.getPaged("/api/v1/Datawallet/Modifications", request);
|
|
10449
10698
|
}
|
|
10450
10699
|
async createDatawalletModifications(request) {
|
|
10451
|
-
return await this.post("/api/v1/
|
|
10700
|
+
return await this.post("/api/v1/Datawallet/Modifications", request);
|
|
10452
10701
|
}
|
|
10453
10702
|
}
|
|
10454
10703
|
exports.SyncClient = SyncClient;
|
|
@@ -10529,6 +10778,11 @@ __decorate([
|
|
|
10529
10778
|
(0, ts_serval_1.serialize)(),
|
|
10530
10779
|
__metadata("design:type", Object)
|
|
10531
10780
|
], DatawalletModification.prototype, "payload", void 0);
|
|
10781
|
+
__decorate([
|
|
10782
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
10783
|
+
(0, ts_serval_1.serialize)(),
|
|
10784
|
+
__metadata("design:type", Number)
|
|
10785
|
+
], DatawalletModification.prototype, "datawalletVersion", void 0);
|
|
10532
10786
|
DatawalletModification = DatawalletModification_1 = __decorate([
|
|
10533
10787
|
(0, ts_serval_1.type)("DatawalletModification")
|
|
10534
10788
|
], DatawalletModification);
|
|
@@ -10537,6 +10791,64 @@ exports.DatawalletModification = DatawalletModification;
|
|
|
10537
10791
|
|
|
10538
10792
|
/***/ }),
|
|
10539
10793
|
|
|
10794
|
+
/***/ "./dist/modules/sync/migrations/DeviceMigrations.js":
|
|
10795
|
+
/*!**********************************************************!*\
|
|
10796
|
+
!*** ./dist/modules/sync/migrations/DeviceMigrations.js ***!
|
|
10797
|
+
\**********************************************************/
|
|
10798
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10799
|
+
|
|
10800
|
+
"use strict";
|
|
10801
|
+
|
|
10802
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10803
|
+
exports.DeviceMigrations = void 0;
|
|
10804
|
+
class DeviceMigrations {
|
|
10805
|
+
constructor(accountController) {
|
|
10806
|
+
this.accountController = accountController;
|
|
10807
|
+
}
|
|
10808
|
+
async v1() {
|
|
10809
|
+
const query = { cache: { $exists: false } };
|
|
10810
|
+
const synchronizableToId = (c) => c.id.toString();
|
|
10811
|
+
const files = await this.accountController.files.getFiles(query);
|
|
10812
|
+
await this.accountController.files.updateCache(files.map(synchronizableToId));
|
|
10813
|
+
const messages = await this.accountController.messages.getMessages(query);
|
|
10814
|
+
await this.accountController.messages.updateCache(messages.map(synchronizableToId));
|
|
10815
|
+
const relationships = await this.accountController.relationships.getRelationships(query);
|
|
10816
|
+
await this.accountController.relationships.updateCache(relationships.map(synchronizableToId));
|
|
10817
|
+
const templates = await this.accountController.relationshipTemplates.getRelationshipTemplates(query);
|
|
10818
|
+
await this.accountController.relationshipTemplates.updateCache(templates.map(synchronizableToId));
|
|
10819
|
+
const tokens = await this.accountController.tokens.getTokens(query);
|
|
10820
|
+
await this.accountController.tokens.updateCache(tokens.map(synchronizableToId));
|
|
10821
|
+
}
|
|
10822
|
+
}
|
|
10823
|
+
exports.DeviceMigrations = DeviceMigrations;
|
|
10824
|
+
//# sourceMappingURL=DeviceMigrations.js.map
|
|
10825
|
+
|
|
10826
|
+
/***/ }),
|
|
10827
|
+
|
|
10828
|
+
/***/ "./dist/modules/sync/migrations/IdentityMigrations.js":
|
|
10829
|
+
/*!************************************************************!*\
|
|
10830
|
+
!*** ./dist/modules/sync/migrations/IdentityMigrations.js ***!
|
|
10831
|
+
\************************************************************/
|
|
10832
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10833
|
+
|
|
10834
|
+
"use strict";
|
|
10835
|
+
|
|
10836
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10837
|
+
exports.IdentityMigrations = void 0;
|
|
10838
|
+
class IdentityMigrations {
|
|
10839
|
+
constructor(accountController) {
|
|
10840
|
+
this.accountController = accountController;
|
|
10841
|
+
}
|
|
10842
|
+
v1() {
|
|
10843
|
+
// no upgrade steps necessary for v1
|
|
10844
|
+
return Promise.resolve();
|
|
10845
|
+
}
|
|
10846
|
+
}
|
|
10847
|
+
exports.IdentityMigrations = IdentityMigrations;
|
|
10848
|
+
//# sourceMappingURL=IdentityMigrations.js.map
|
|
10849
|
+
|
|
10850
|
+
/***/ }),
|
|
10851
|
+
|
|
10540
10852
|
/***/ "./dist/modules/tokens/AnonymousTokenController.js":
|
|
10541
10853
|
/*!*********************************************************!*\
|
|
10542
10854
|
!*** ./dist/modules/tokens/AnonymousTokenController.js ***!
|
|
@@ -11748,95 +12060,33 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
11748
12060
|
/*!******************************************************************!*\
|
|
11749
12061
|
!*** ./node_modules/@js-soft/ts-utils/dist/eventBus/EventBus.js ***!
|
|
11750
12062
|
\******************************************************************/
|
|
11751
|
-
/***/ ((__unused_webpack_module, exports
|
|
12063
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
11752
12064
|
|
|
11753
12065
|
"use strict";
|
|
11754
12066
|
|
|
11755
12067
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11756
|
-
exports.EventBus = void 0;
|
|
11757
|
-
__webpack_require__(/*! reflect-metadata */ "./node_modules/reflect-metadata/Reflect.js");
|
|
11758
|
-
const eventemitter2_1 = __webpack_require__(/*! eventemitter2 */ "./node_modules/eventemitter2/lib/eventemitter2.js");
|
|
11759
|
-
const Reflection_1 = __webpack_require__(/*! ./reflection/Reflection */ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Reflection.js");
|
|
11760
|
-
const SubscriptionTargetInfo_1 = __webpack_require__(/*! ./SubscriptionTargetInfo */ "./node_modules/@js-soft/ts-utils/dist/eventBus/SubscriptionTargetInfo.js");
|
|
12068
|
+
exports.getEventNamespaceFromObject = exports.EventBus = void 0;
|
|
11761
12069
|
class EventBus {
|
|
11762
|
-
emitter;
|
|
11763
|
-
constructor() {
|
|
11764
|
-
this.emitter = new eventemitter2_1.EventEmitter2({ wildcard: true, maxListeners: 50, verboseMemoryLeak: true });
|
|
11765
|
-
}
|
|
11766
|
-
subscribe(subscriptionTarget, handler) {
|
|
11767
|
-
this.registerHandler(subscriptionTarget, handler);
|
|
11768
|
-
}
|
|
11769
|
-
subscribeOnce(subscriptionTarget, handler) {
|
|
11770
|
-
this.registerHandler(subscriptionTarget, handler, true);
|
|
11771
|
-
}
|
|
11772
|
-
registerHandler(subscriptionTarget, handler, isOneTimeHandler = false) {
|
|
11773
|
-
const subscriptionTargetInfo = SubscriptionTargetInfo_1.SubscriptionTargetInfo.from(subscriptionTarget);
|
|
11774
|
-
const handlerWrapper = (event) => {
|
|
11775
|
-
if (!subscriptionTargetInfo.isCompatibleWith(event)) {
|
|
11776
|
-
return;
|
|
11777
|
-
}
|
|
11778
|
-
handler(event);
|
|
11779
|
-
if (isOneTimeHandler) {
|
|
11780
|
-
this.emitter.off(subscriptionTargetInfo.namespace, handlerWrapper);
|
|
11781
|
-
}
|
|
11782
|
-
};
|
|
11783
|
-
this.emitter.on(subscriptionTargetInfo.namespace, handlerWrapper);
|
|
11784
|
-
}
|
|
11785
|
-
async publish(event) {
|
|
11786
|
-
let namespace = getEventNamespaceFromObject(event);
|
|
11787
|
-
if (!namespace) {
|
|
11788
|
-
throw Error("The event needs a namespace. Use the EventNamespaceDecorator in order to define a namespace for a event.");
|
|
11789
|
-
}
|
|
11790
|
-
this.emitter.emit(namespace, event);
|
|
11791
|
-
}
|
|
11792
12070
|
}
|
|
11793
12071
|
exports.EventBus = EventBus;
|
|
11794
12072
|
function getEventNamespaceFromObject(targetObject) {
|
|
11795
|
-
|
|
11796
|
-
if (!namespaceDecorator) {
|
|
11797
|
-
throw new Error("Event Type is not defined");
|
|
11798
|
-
}
|
|
11799
|
-
return namespaceDecorator;
|
|
12073
|
+
return targetObject.namespace;
|
|
11800
12074
|
}
|
|
12075
|
+
exports.getEventNamespaceFromObject = getEventNamespaceFromObject;
|
|
11801
12076
|
//# sourceMappingURL=EventBus.js.map
|
|
11802
12077
|
|
|
11803
12078
|
/***/ }),
|
|
11804
12079
|
|
|
11805
|
-
/***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/EventNamespaceDecorator.js":
|
|
11806
|
-
/*!*********************************************************************************!*\
|
|
11807
|
-
!*** ./node_modules/@js-soft/ts-utils/dist/eventBus/EventNamespaceDecorator.js ***!
|
|
11808
|
-
\*********************************************************************************/
|
|
11809
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11810
|
-
|
|
11811
|
-
"use strict";
|
|
11812
|
-
|
|
11813
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11814
|
-
exports.EventNamespace = void 0;
|
|
11815
|
-
const Constants_1 = __webpack_require__(/*! ./reflection/Constants */ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Constants.js");
|
|
11816
|
-
function EventNamespace(name) {
|
|
11817
|
-
return (target) => {
|
|
11818
|
-
if (!name) {
|
|
11819
|
-
name = target.name;
|
|
11820
|
-
}
|
|
11821
|
-
Reflect.defineMetadata(`${Constants_1.CUSTOM_METADATA_NAMESPACE}:namespace`, name, target);
|
|
11822
|
-
};
|
|
11823
|
-
}
|
|
11824
|
-
exports.EventNamespace = EventNamespace;
|
|
11825
|
-
//# sourceMappingURL=EventNamespaceDecorator.js.map
|
|
11826
|
-
|
|
11827
|
-
/***/ }),
|
|
11828
|
-
|
|
11829
12080
|
/***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/SubscriptionTargetInfo.js":
|
|
11830
12081
|
/*!********************************************************************************!*\
|
|
11831
12082
|
!*** ./node_modules/@js-soft/ts-utils/dist/eventBus/SubscriptionTargetInfo.js ***!
|
|
11832
12083
|
\********************************************************************************/
|
|
11833
|
-
/***/ ((__unused_webpack_module, exports
|
|
12084
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
11834
12085
|
|
|
11835
12086
|
"use strict";
|
|
11836
12087
|
|
|
11837
12088
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11838
12089
|
exports.SubscriptionTargetInfo = void 0;
|
|
11839
|
-
const Reflection_1 = __webpack_require__(/*! ./reflection/Reflection */ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Reflection.js");
|
|
11840
12090
|
class SubscriptionTargetInfo {
|
|
11841
12091
|
namespace;
|
|
11842
12092
|
constructor(namespace) {
|
|
@@ -11846,9 +12096,7 @@ class SubscriptionTargetInfo {
|
|
|
11846
12096
|
if (target instanceof Function) {
|
|
11847
12097
|
return new ConstructorSubscriptionTargetInfo(target);
|
|
11848
12098
|
}
|
|
11849
|
-
|
|
11850
|
-
return new NamespaceSubscriptionTargetInfo(target);
|
|
11851
|
-
}
|
|
12099
|
+
return new NamespaceSubscriptionTargetInfo(target);
|
|
11852
12100
|
}
|
|
11853
12101
|
}
|
|
11854
12102
|
exports.SubscriptionTargetInfo = SubscriptionTargetInfo;
|
|
@@ -11866,21 +12114,86 @@ class NamespaceSubscriptionTargetInfo extends SubscriptionTargetInfo {
|
|
|
11866
12114
|
constructor(namespace) {
|
|
11867
12115
|
super(namespace);
|
|
11868
12116
|
}
|
|
11869
|
-
isCompatibleWith(
|
|
12117
|
+
isCompatibleWith(_event) {
|
|
11870
12118
|
return true;
|
|
11871
12119
|
}
|
|
11872
12120
|
}
|
|
11873
12121
|
function getEventNamespaceFromClass(targetClass) {
|
|
11874
|
-
|
|
11875
|
-
if (!namespaceDecorator) {
|
|
11876
|
-
throw new Error("Event Type is not defined");
|
|
11877
|
-
}
|
|
11878
|
-
return namespaceDecorator;
|
|
12122
|
+
return targetClass.namespace;
|
|
11879
12123
|
}
|
|
11880
12124
|
//# sourceMappingURL=SubscriptionTargetInfo.js.map
|
|
11881
12125
|
|
|
11882
12126
|
/***/ }),
|
|
11883
12127
|
|
|
12128
|
+
/***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/eventEmitter2/EventEmitter2EventBus.js":
|
|
12129
|
+
/*!*********************************************************************************************!*\
|
|
12130
|
+
!*** ./node_modules/@js-soft/ts-utils/dist/eventBus/eventEmitter2/EventEmitter2EventBus.js ***!
|
|
12131
|
+
\*********************************************************************************************/
|
|
12132
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12133
|
+
|
|
12134
|
+
"use strict";
|
|
12135
|
+
|
|
12136
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
12137
|
+
exports.EventEmitter2EventBus = void 0;
|
|
12138
|
+
const eventemitter2_1 = __webpack_require__(/*! eventemitter2 */ "./node_modules/eventemitter2/lib/eventemitter2.js");
|
|
12139
|
+
__webpack_require__(/*! reflect-metadata */ "./node_modules/reflect-metadata/Reflect.js");
|
|
12140
|
+
const EventBus_1 = __webpack_require__(/*! ../EventBus */ "./node_modules/@js-soft/ts-utils/dist/eventBus/EventBus.js");
|
|
12141
|
+
const SubscriptionTargetInfo_1 = __webpack_require__(/*! ../SubscriptionTargetInfo */ "./node_modules/@js-soft/ts-utils/dist/eventBus/SubscriptionTargetInfo.js");
|
|
12142
|
+
class EventEmitter2EventBus {
|
|
12143
|
+
emitter;
|
|
12144
|
+
wrappers = new Map();
|
|
12145
|
+
nextId = 0;
|
|
12146
|
+
constructor() {
|
|
12147
|
+
this.emitter = new eventemitter2_1.EventEmitter2({ wildcard: true, maxListeners: 50, verboseMemoryLeak: true });
|
|
12148
|
+
}
|
|
12149
|
+
subscribe(subscriptionTarget, handler) {
|
|
12150
|
+
return this.registerHandler(subscriptionTarget, handler);
|
|
12151
|
+
}
|
|
12152
|
+
subscribeOnce(subscriptionTarget, handler) {
|
|
12153
|
+
return this.registerHandler(subscriptionTarget, handler, true);
|
|
12154
|
+
}
|
|
12155
|
+
unsubscribe(subscriptionTarget, subscriptionId) {
|
|
12156
|
+
return this.unregisterHandler(subscriptionTarget, subscriptionId);
|
|
12157
|
+
}
|
|
12158
|
+
registerHandler(subscriptionTarget, handler, isOneTimeHandler = false) {
|
|
12159
|
+
const subscriptionTargetInfo = SubscriptionTargetInfo_1.SubscriptionTargetInfo.from(subscriptionTarget);
|
|
12160
|
+
const handlerId = this.nextId++;
|
|
12161
|
+
const handlerWrapper = (event) => {
|
|
12162
|
+
if (!subscriptionTargetInfo.isCompatibleWith(event)) {
|
|
12163
|
+
return;
|
|
12164
|
+
}
|
|
12165
|
+
handler(event);
|
|
12166
|
+
if (isOneTimeHandler) {
|
|
12167
|
+
this.unsubscribe(subscriptionTarget, handlerId);
|
|
12168
|
+
}
|
|
12169
|
+
};
|
|
12170
|
+
this.wrappers.set(handlerId, handlerWrapper);
|
|
12171
|
+
this.emitter.on(subscriptionTargetInfo.namespace, handlerWrapper);
|
|
12172
|
+
return handlerId;
|
|
12173
|
+
}
|
|
12174
|
+
unregisterHandler(subscriptionTarget, handlerId) {
|
|
12175
|
+
const subscriptionTargetInfo = SubscriptionTargetInfo_1.SubscriptionTargetInfo.from(subscriptionTarget);
|
|
12176
|
+
const handlerWrapper = this.wrappers.get(handlerId);
|
|
12177
|
+
if (!handlerWrapper) {
|
|
12178
|
+
return false;
|
|
12179
|
+
}
|
|
12180
|
+
this.emitter.off(subscriptionTargetInfo.namespace, handlerWrapper);
|
|
12181
|
+
this.wrappers.delete(handlerId);
|
|
12182
|
+
return true;
|
|
12183
|
+
}
|
|
12184
|
+
publish(event) {
|
|
12185
|
+
const namespace = (0, EventBus_1.getEventNamespaceFromObject)(event);
|
|
12186
|
+
if (!namespace) {
|
|
12187
|
+
throw Error("The event needs a namespace. Use the EventNamespace-decorator in order to define a namespace for a event.");
|
|
12188
|
+
}
|
|
12189
|
+
this.emitter.emit(namespace, event);
|
|
12190
|
+
}
|
|
12191
|
+
}
|
|
12192
|
+
exports.EventEmitter2EventBus = EventEmitter2EventBus;
|
|
12193
|
+
//# sourceMappingURL=EventEmitter2EventBus.js.map
|
|
12194
|
+
|
|
12195
|
+
/***/ }),
|
|
12196
|
+
|
|
11884
12197
|
/***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/index.js":
|
|
11885
12198
|
/*!***************************************************************!*\
|
|
11886
12199
|
!*** ./node_modules/@js-soft/ts-utils/dist/eventBus/index.js ***!
|
|
@@ -11901,52 +12214,77 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11901
12214
|
};
|
|
11902
12215
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11903
12216
|
__exportStar(__webpack_require__(/*! ./EventBus */ "./node_modules/@js-soft/ts-utils/dist/eventBus/EventBus.js"), exports);
|
|
11904
|
-
__exportStar(__webpack_require__(/*! ./
|
|
12217
|
+
__exportStar(__webpack_require__(/*! ./eventEmitter2/EventEmitter2EventBus */ "./node_modules/@js-soft/ts-utils/dist/eventBus/eventEmitter2/EventEmitter2EventBus.js"), exports);
|
|
11905
12218
|
//# sourceMappingURL=index.js.map
|
|
11906
12219
|
|
|
11907
12220
|
/***/ }),
|
|
11908
12221
|
|
|
11909
|
-
/***/ "./node_modules/@js-soft/ts-utils/dist/
|
|
11910
|
-
|
|
11911
|
-
!*** ./node_modules/@js-soft/ts-utils/dist/
|
|
11912
|
-
|
|
11913
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
12222
|
+
/***/ "./node_modules/@js-soft/ts-utils/dist/events/DataEvent.js":
|
|
12223
|
+
/*!*****************************************************************!*\
|
|
12224
|
+
!*** ./node_modules/@js-soft/ts-utils/dist/events/DataEvent.js ***!
|
|
12225
|
+
\*****************************************************************/
|
|
12226
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11914
12227
|
|
|
11915
12228
|
"use strict";
|
|
11916
12229
|
|
|
11917
12230
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11918
|
-
exports.
|
|
11919
|
-
|
|
11920
|
-
|
|
12231
|
+
exports.DataEvent = void 0;
|
|
12232
|
+
const Event_1 = __webpack_require__(/*! ./Event */ "./node_modules/@js-soft/ts-utils/dist/events/Event.js");
|
|
12233
|
+
class DataEvent extends Event_1.Event {
|
|
12234
|
+
data;
|
|
12235
|
+
constructor(namespace, data) {
|
|
12236
|
+
super(namespace);
|
|
12237
|
+
this.data = data;
|
|
12238
|
+
}
|
|
12239
|
+
}
|
|
12240
|
+
exports.DataEvent = DataEvent;
|
|
12241
|
+
//# sourceMappingURL=DataEvent.js.map
|
|
11921
12242
|
|
|
11922
12243
|
/***/ }),
|
|
11923
12244
|
|
|
11924
|
-
/***/ "./node_modules/@js-soft/ts-utils/dist/
|
|
11925
|
-
|
|
11926
|
-
!*** ./node_modules/@js-soft/ts-utils/dist/
|
|
11927
|
-
|
|
11928
|
-
/***/ ((__unused_webpack_module, exports
|
|
12245
|
+
/***/ "./node_modules/@js-soft/ts-utils/dist/events/Event.js":
|
|
12246
|
+
/*!*************************************************************!*\
|
|
12247
|
+
!*** ./node_modules/@js-soft/ts-utils/dist/events/Event.js ***!
|
|
12248
|
+
\*************************************************************/
|
|
12249
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
11929
12250
|
|
|
11930
12251
|
"use strict";
|
|
11931
12252
|
|
|
11932
12253
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11933
|
-
exports.
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
}
|
|
11940
|
-
exports.getCustomClassDecoratorValue = getCustomClassDecoratorValue;
|
|
11941
|
-
function getCustomClassDecorators(targetClass) {
|
|
11942
|
-
const keys = Reflect.getMetadataKeys(targetClass);
|
|
11943
|
-
let decorators = keys
|
|
11944
|
-
.filter(key => key.toString().startsWith(Constants_1.CUSTOM_METADATA_NAMESPACE))
|
|
11945
|
-
.map(key => { return { key: key, value: Reflect.getMetadata(key, targetClass) }; });
|
|
11946
|
-
return decorators;
|
|
12254
|
+
exports.Event = void 0;
|
|
12255
|
+
class Event {
|
|
12256
|
+
namespace;
|
|
12257
|
+
constructor(namespace) {
|
|
12258
|
+
this.namespace = namespace;
|
|
12259
|
+
}
|
|
11947
12260
|
}
|
|
11948
|
-
exports.
|
|
11949
|
-
//# sourceMappingURL=
|
|
12261
|
+
exports.Event = Event;
|
|
12262
|
+
//# sourceMappingURL=Event.js.map
|
|
12263
|
+
|
|
12264
|
+
/***/ }),
|
|
12265
|
+
|
|
12266
|
+
/***/ "./node_modules/@js-soft/ts-utils/dist/events/index.js":
|
|
12267
|
+
/*!*************************************************************!*\
|
|
12268
|
+
!*** ./node_modules/@js-soft/ts-utils/dist/events/index.js ***!
|
|
12269
|
+
\*************************************************************/
|
|
12270
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
12271
|
+
|
|
12272
|
+
"use strict";
|
|
12273
|
+
|
|
12274
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12275
|
+
if (k2 === undefined) k2 = k;
|
|
12276
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12277
|
+
}) : (function(o, m, k, k2) {
|
|
12278
|
+
if (k2 === undefined) k2 = k;
|
|
12279
|
+
o[k2] = m[k];
|
|
12280
|
+
}));
|
|
12281
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
12282
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
12283
|
+
};
|
|
12284
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
12285
|
+
__exportStar(__webpack_require__(/*! ./DataEvent */ "./node_modules/@js-soft/ts-utils/dist/events/DataEvent.js"), exports);
|
|
12286
|
+
__exportStar(__webpack_require__(/*! ./Event */ "./node_modules/@js-soft/ts-utils/dist/events/Event.js"), exports);
|
|
12287
|
+
//# sourceMappingURL=index.js.map
|
|
11950
12288
|
|
|
11951
12289
|
/***/ }),
|
|
11952
12290
|
|
|
@@ -11970,11 +12308,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11970
12308
|
};
|
|
11971
12309
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11972
12310
|
__exportStar(__webpack_require__(/*! ./eventBus */ "./node_modules/@js-soft/ts-utils/dist/eventBus/index.js"), exports);
|
|
11973
|
-
__exportStar(__webpack_require__(/*! ./
|
|
12311
|
+
__exportStar(__webpack_require__(/*! ./events */ "./node_modules/@js-soft/ts-utils/dist/events/index.js"), exports);
|
|
11974
12312
|
__exportStar(__webpack_require__(/*! ./logDecorator */ "./node_modules/@js-soft/ts-utils/dist/logDecorator.js"), exports);
|
|
11975
12313
|
__exportStar(__webpack_require__(/*! ./measureExcecutionTime */ "./node_modules/@js-soft/ts-utils/dist/measureExcecutionTime.js"), exports);
|
|
11976
12314
|
__exportStar(__webpack_require__(/*! ./randomString */ "./node_modules/@js-soft/ts-utils/dist/randomString.js"), exports);
|
|
11977
12315
|
__exportStar(__webpack_require__(/*! ./Range */ "./node_modules/@js-soft/ts-utils/dist/Range.js"), exports);
|
|
12316
|
+
__exportStar(__webpack_require__(/*! ./result */ "./node_modules/@js-soft/ts-utils/dist/result/index.js"), exports);
|
|
11978
12317
|
__exportStar(__webpack_require__(/*! ./sleep */ "./node_modules/@js-soft/ts-utils/dist/sleep.js"), exports);
|
|
11979
12318
|
//# sourceMappingURL=index.js.map
|
|
11980
12319
|
|
|
@@ -11990,10 +12329,11 @@ __exportStar(__webpack_require__(/*! ./sleep */ "./node_modules/@js-soft/ts-util
|
|
|
11990
12329
|
|
|
11991
12330
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11992
12331
|
exports.log = void 0;
|
|
11993
|
-
|
|
12332
|
+
/* eslint-disable no-console */
|
|
12333
|
+
function log(_target, propertyName, propertyDesciptor) {
|
|
11994
12334
|
const method = propertyDesciptor.value;
|
|
11995
12335
|
propertyDesciptor.value = function (...args) {
|
|
11996
|
-
const params = args.map(a => JSON.stringify(a)).join();
|
|
12336
|
+
const params = args.map((a) => JSON.stringify(a)).join();
|
|
11997
12337
|
try {
|
|
11998
12338
|
const result = method.apply(this, args);
|
|
11999
12339
|
const r = JSON.stringify(result);
|
|
@@ -12008,7 +12348,6 @@ function log(target, propertyName, propertyDesciptor) {
|
|
|
12008
12348
|
return propertyDesciptor;
|
|
12009
12349
|
}
|
|
12010
12350
|
exports.log = log;
|
|
12011
|
-
;
|
|
12012
12351
|
//# sourceMappingURL=logDecorator.js.map
|
|
12013
12352
|
|
|
12014
12353
|
/***/ }),
|
|
@@ -12023,7 +12362,8 @@ exports.log = log;
|
|
|
12023
12362
|
|
|
12024
12363
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
12025
12364
|
exports.measureExcecutionTime = void 0;
|
|
12026
|
-
|
|
12365
|
+
/* eslint-disable no-console */
|
|
12366
|
+
function measureExcecutionTime(_target, _propertyName, propertyDesciptor) {
|
|
12027
12367
|
const method = propertyDesciptor.value;
|
|
12028
12368
|
propertyDesciptor.value = async function (...args) {
|
|
12029
12369
|
const t0 = Date.now();
|
|
@@ -12035,7 +12375,6 @@ function measureExcecutionTime(target, propertyName, propertyDesciptor) {
|
|
|
12035
12375
|
return propertyDesciptor;
|
|
12036
12376
|
}
|
|
12037
12377
|
exports.measureExcecutionTime = measureExcecutionTime;
|
|
12038
|
-
;
|
|
12039
12378
|
//# sourceMappingURL=measureExcecutionTime.js.map
|
|
12040
12379
|
|
|
12041
12380
|
/***/ }),
|
|
@@ -12053,13 +12392,12 @@ exports.randomString = void 0;
|
|
|
12053
12392
|
function randomString(length, characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") {
|
|
12054
12393
|
let result = "";
|
|
12055
12394
|
const charactersLength = characters.length;
|
|
12056
|
-
for (
|
|
12395
|
+
for (let i = 0; i < length; i++) {
|
|
12057
12396
|
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
12058
12397
|
}
|
|
12059
12398
|
return result;
|
|
12060
12399
|
}
|
|
12061
12400
|
exports.randomString = randomString;
|
|
12062
|
-
;
|
|
12063
12401
|
//# sourceMappingURL=randomString.js.map
|
|
12064
12402
|
|
|
12065
12403
|
/***/ }),
|
|
@@ -12332,7 +12670,7 @@ module.exports = function xhrAdapter(config) {
|
|
|
12332
12670
|
|
|
12333
12671
|
// Handle timeout
|
|
12334
12672
|
request.ontimeout = function handleTimeout() {
|
|
12335
|
-
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
|
12673
|
+
var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
12336
12674
|
var transitional = config.transitional || defaults.transitional;
|
|
12337
12675
|
if (config.timeoutErrorMessage) {
|
|
12338
12676
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
@@ -12473,7 +12811,7 @@ axios.Axios = Axios;
|
|
|
12473
12811
|
axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js");
|
|
12474
12812
|
axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/axios/lib/cancel/CancelToken.js");
|
|
12475
12813
|
axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
|
|
12476
|
-
axios.VERSION = __webpack_require__(/*! ./env/data */ "./node_modules/axios/lib/env/data.js").version;
|
|
12814
|
+
axios.VERSION = (__webpack_require__(/*! ./env/data */ "./node_modules/axios/lib/env/data.js").version);
|
|
12477
12815
|
|
|
12478
12816
|
// Expose all/spread
|
|
12479
12817
|
axios.all = function all(promises) {
|
|
@@ -13435,7 +13773,7 @@ module.exports = defaults;
|
|
|
13435
13773
|
/***/ ((module) => {
|
|
13436
13774
|
|
|
13437
13775
|
module.exports = {
|
|
13438
|
-
"version": "0.
|
|
13776
|
+
"version": "0.24.0"
|
|
13439
13777
|
};
|
|
13440
13778
|
|
|
13441
13779
|
/***/ }),
|
|
@@ -13892,7 +14230,7 @@ module.exports = function spread(callback) {
|
|
|
13892
14230
|
"use strict";
|
|
13893
14231
|
|
|
13894
14232
|
|
|
13895
|
-
var VERSION = __webpack_require__(/*! ../env/data */ "./node_modules/axios/lib/env/data.js").version;
|
|
14233
|
+
var VERSION = (__webpack_require__(/*! ../env/data */ "./node_modules/axios/lib/env/data.js").version);
|
|
13896
14234
|
|
|
13897
14235
|
var validators = {};
|
|
13898
14236
|
|
|
@@ -15127,83 +15465,87 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
|
15127
15465
|
var listeners= null, branch, xTree, xxTree, isolatedBranch, endReached, currentType = type[i],
|
|
15128
15466
|
nextType = type[i + 1], branches, _listeners;
|
|
15129
15467
|
|
|
15130
|
-
if (i === typeLength
|
|
15468
|
+
if (i === typeLength) {
|
|
15131
15469
|
//
|
|
15132
15470
|
// If at the end of the event(s) list and the tree has listeners
|
|
15133
15471
|
// invoke those listeners.
|
|
15134
15472
|
//
|
|
15135
|
-
|
|
15136
|
-
|
|
15137
|
-
|
|
15138
|
-
|
|
15139
|
-
|
|
15140
|
-
|
|
15473
|
+
|
|
15474
|
+
if(tree._listeners) {
|
|
15475
|
+
if (typeof tree._listeners === 'function') {
|
|
15476
|
+
handlers && handlers.push(tree._listeners);
|
|
15477
|
+
listeners = [tree];
|
|
15478
|
+
} else {
|
|
15479
|
+
handlers && handlers.push.apply(handlers, tree._listeners);
|
|
15480
|
+
listeners = [tree];
|
|
15481
|
+
}
|
|
15141
15482
|
}
|
|
15142
|
-
}
|
|
15483
|
+
} else {
|
|
15143
15484
|
|
|
15144
|
-
|
|
15145
|
-
|
|
15146
|
-
|
|
15147
|
-
|
|
15148
|
-
|
|
15149
|
-
|
|
15150
|
-
|
|
15151
|
-
|
|
15152
|
-
|
|
15153
|
-
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
|
|
15485
|
+
if (currentType === '*') {
|
|
15486
|
+
//
|
|
15487
|
+
// If the event emitted is '*' at this part
|
|
15488
|
+
// or there is a concrete match at this patch
|
|
15489
|
+
//
|
|
15490
|
+
branches = ownKeys(tree);
|
|
15491
|
+
n = branches.length;
|
|
15492
|
+
while (n-- > 0) {
|
|
15493
|
+
branch = branches[n];
|
|
15494
|
+
if (branch !== '_listeners') {
|
|
15495
|
+
_listeners = searchListenerTree(handlers, type, tree[branch], i + 1, typeLength);
|
|
15496
|
+
if (_listeners) {
|
|
15497
|
+
if (listeners) {
|
|
15498
|
+
listeners.push.apply(listeners, _listeners);
|
|
15499
|
+
} else {
|
|
15500
|
+
listeners = _listeners;
|
|
15501
|
+
}
|
|
15160
15502
|
}
|
|
15161
15503
|
}
|
|
15162
15504
|
}
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
|
|
15167
|
-
|
|
15168
|
-
|
|
15169
|
-
|
|
15170
|
-
|
|
15171
|
-
|
|
15172
|
-
|
|
15173
|
-
|
|
15174
|
-
|
|
15175
|
-
|
|
15176
|
-
|
|
15177
|
-
|
|
15178
|
-
|
|
15179
|
-
|
|
15180
|
-
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
|
|
15184
|
-
|
|
15505
|
+
return listeners;
|
|
15506
|
+
} else if (currentType === '**') {
|
|
15507
|
+
endReached = (i + 1 === typeLength || (i + 2 === typeLength && nextType === '*'));
|
|
15508
|
+
if (endReached && tree._listeners) {
|
|
15509
|
+
// The next element has a _listeners, add it to the handlers.
|
|
15510
|
+
listeners = searchListenerTree(handlers, type, tree, typeLength, typeLength);
|
|
15511
|
+
}
|
|
15512
|
+
|
|
15513
|
+
branches = ownKeys(tree);
|
|
15514
|
+
n = branches.length;
|
|
15515
|
+
while (n-- > 0) {
|
|
15516
|
+
branch = branches[n];
|
|
15517
|
+
if (branch !== '_listeners') {
|
|
15518
|
+
if (branch === '*' || branch === '**') {
|
|
15519
|
+
if (tree[branch]._listeners && !endReached) {
|
|
15520
|
+
_listeners = searchListenerTree(handlers, type, tree[branch], typeLength, typeLength);
|
|
15521
|
+
if (_listeners) {
|
|
15522
|
+
if (listeners) {
|
|
15523
|
+
listeners.push.apply(listeners, _listeners);
|
|
15524
|
+
} else {
|
|
15525
|
+
listeners = _listeners;
|
|
15526
|
+
}
|
|
15185
15527
|
}
|
|
15186
15528
|
}
|
|
15529
|
+
_listeners = searchListenerTree(handlers, type, tree[branch], i, typeLength);
|
|
15530
|
+
} else if (branch === nextType) {
|
|
15531
|
+
_listeners = searchListenerTree(handlers, type, tree[branch], i + 2, typeLength);
|
|
15532
|
+
} else {
|
|
15533
|
+
// No match on this one, shift into the tree but not in the type array.
|
|
15534
|
+
_listeners = searchListenerTree(handlers, type, tree[branch], i, typeLength);
|
|
15187
15535
|
}
|
|
15188
|
-
|
|
15189
|
-
|
|
15190
|
-
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
}
|
|
15195
|
-
if(_listeners){
|
|
15196
|
-
if(listeners){
|
|
15197
|
-
listeners.push.apply(listeners, _listeners);
|
|
15198
|
-
}else{
|
|
15199
|
-
listeners = _listeners;
|
|
15536
|
+
if (_listeners) {
|
|
15537
|
+
if (listeners) {
|
|
15538
|
+
listeners.push.apply(listeners, _listeners);
|
|
15539
|
+
} else {
|
|
15540
|
+
listeners = _listeners;
|
|
15541
|
+
}
|
|
15200
15542
|
}
|
|
15201
15543
|
}
|
|
15202
15544
|
}
|
|
15545
|
+
return listeners;
|
|
15546
|
+
} else if (tree[currentType]) {
|
|
15547
|
+
listeners = searchListenerTree(handlers, type, tree[currentType], i + 1, typeLength);
|
|
15203
15548
|
}
|
|
15204
|
-
return listeners;
|
|
15205
|
-
}else if (tree[currentType]) {
|
|
15206
|
-
listeners= searchListenerTree(handlers, type, tree[currentType], i + 1, typeLength);
|
|
15207
15549
|
}
|
|
15208
15550
|
|
|
15209
15551
|
xTree = tree['*'];
|
|
@@ -34588,6 +34930,13 @@ function parseInteger(string) {
|
|
|
34588
34930
|
return parseInt(string, 10);
|
|
34589
34931
|
}
|
|
34590
34932
|
}
|
|
34933
|
+
function parseFloating(string) {
|
|
34934
|
+
if (isUndefined(string) || string === null || string === "") {
|
|
34935
|
+
return undefined;
|
|
34936
|
+
} else {
|
|
34937
|
+
return parseFloat(string);
|
|
34938
|
+
}
|
|
34939
|
+
}
|
|
34591
34940
|
function parseMillis(fraction) {
|
|
34592
34941
|
// Return undefined (instead of 0) in these cases, where fraction is not set
|
|
34593
34942
|
if (isUndefined(fraction) || fraction === null || fraction === "") {
|
|
@@ -34727,7 +35076,7 @@ function formatOffset(offset, format) {
|
|
|
34727
35076
|
function timeObject(obj) {
|
|
34728
35077
|
return pick(obj, ["hour", "minute", "second", "millisecond"]);
|
|
34729
35078
|
}
|
|
34730
|
-
var ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-
|
|
35079
|
+
var ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/;
|
|
34731
35080
|
|
|
34732
35081
|
/**
|
|
34733
35082
|
* @private
|
|
@@ -35090,6 +35439,13 @@ var Formatter = /*#__PURE__*/function () {
|
|
|
35090
35439
|
|
|
35091
35440
|
case "ss":
|
|
35092
35441
|
return _this.num(dt.second, 2);
|
|
35442
|
+
// fractional seconds
|
|
35443
|
+
|
|
35444
|
+
case "uu":
|
|
35445
|
+
return _this.num(Math.floor(dt.millisecond / 10), 2);
|
|
35446
|
+
|
|
35447
|
+
case "uuu":
|
|
35448
|
+
return _this.num(Math.floor(dt.millisecond / 100));
|
|
35093
35449
|
// minutes
|
|
35094
35450
|
|
|
35095
35451
|
case "m":
|
|
@@ -35605,7 +35961,7 @@ var dtfCache = {};
|
|
|
35605
35961
|
function makeDTF(zone) {
|
|
35606
35962
|
if (!dtfCache[zone]) {
|
|
35607
35963
|
dtfCache[zone] = new Intl.DateTimeFormat("en-US", {
|
|
35608
|
-
|
|
35964
|
+
hour12: false,
|
|
35609
35965
|
timeZone: zone,
|
|
35610
35966
|
year: "numeric",
|
|
35611
35967
|
month: "2-digit",
|
|
@@ -35712,6 +36068,10 @@ var IANAZone = /*#__PURE__*/function (_Zone) {
|
|
|
35712
36068
|
;
|
|
35713
36069
|
|
|
35714
36070
|
IANAZone.isValidZone = function isValidZone(zone) {
|
|
36071
|
+
if (!zone) {
|
|
36072
|
+
return false;
|
|
36073
|
+
}
|
|
36074
|
+
|
|
35715
36075
|
try {
|
|
35716
36076
|
new Intl.DateTimeFormat("en-US", {
|
|
35717
36077
|
timeZone: zone
|
|
@@ -35720,21 +36080,6 @@ var IANAZone = /*#__PURE__*/function (_Zone) {
|
|
|
35720
36080
|
} catch (e) {
|
|
35721
36081
|
return false;
|
|
35722
36082
|
}
|
|
35723
|
-
} // Etc/GMT+8 -> -480
|
|
35724
|
-
|
|
35725
|
-
/** @ignore */
|
|
35726
|
-
;
|
|
35727
|
-
|
|
35728
|
-
IANAZone.parseGMTOffset = function parseGMTOffset(specifier) {
|
|
35729
|
-
if (specifier) {
|
|
35730
|
-
var match = specifier.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);
|
|
35731
|
-
|
|
35732
|
-
if (match) {
|
|
35733
|
-
return -60 * parseInt(match[1]);
|
|
35734
|
-
}
|
|
35735
|
-
}
|
|
35736
|
-
|
|
35737
|
-
return null;
|
|
35738
36083
|
};
|
|
35739
36084
|
|
|
35740
36085
|
function IANAZone(name) {
|
|
@@ -35780,13 +36125,15 @@ var IANAZone = /*#__PURE__*/function (_Zone) {
|
|
|
35780
36125
|
day = _ref2[2],
|
|
35781
36126
|
hour = _ref2[3],
|
|
35782
36127
|
minute = _ref2[4],
|
|
35783
|
-
second = _ref2[5];
|
|
36128
|
+
second = _ref2[5]; // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat
|
|
35784
36129
|
|
|
36130
|
+
|
|
36131
|
+
var adjustedHour = hour === 24 ? 0 : hour;
|
|
35785
36132
|
var asUTC = objToLocalTS({
|
|
35786
36133
|
year: year,
|
|
35787
36134
|
month: month,
|
|
35788
36135
|
day: day,
|
|
35789
|
-
hour:
|
|
36136
|
+
hour: adjustedHour,
|
|
35790
36137
|
minute: minute,
|
|
35791
36138
|
second: second,
|
|
35792
36139
|
millisecond: 0
|
|
@@ -36034,7 +36381,6 @@ var InvalidZone = /*#__PURE__*/function (_Zone) {
|
|
|
36034
36381
|
* @private
|
|
36035
36382
|
*/
|
|
36036
36383
|
function normalizeZone(input, defaultZone) {
|
|
36037
|
-
var offset;
|
|
36038
36384
|
|
|
36039
36385
|
if (isUndefined(input) || input === null) {
|
|
36040
36386
|
return defaultZone;
|
|
@@ -36042,10 +36388,7 @@ function normalizeZone(input, defaultZone) {
|
|
|
36042
36388
|
return input;
|
|
36043
36389
|
} else if (isString(input)) {
|
|
36044
36390
|
var lowered = input.toLowerCase();
|
|
36045
|
-
if (lowered === "local" || lowered === "system") return defaultZone;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else if ((
|
|
36046
|
-
// handle Etc/GMT-4, which V8 chokes on
|
|
36047
|
-
return FixedOffsetZone.instance(offset);
|
|
36048
|
-
} else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);
|
|
36391
|
+
if (lowered === "local" || lowered === "system") return defaultZone;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);
|
|
36049
36392
|
} else if (isNumber(input)) {
|
|
36050
36393
|
return FixedOffsetZone.instance(input);
|
|
36051
36394
|
} else if (typeof input === "object" && input.offset && typeof input.offset === "number") {
|
|
@@ -36413,9 +36756,8 @@ var PolyDateFormatter = /*#__PURE__*/function () {
|
|
|
36413
36756
|
// - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata
|
|
36414
36757
|
var gmtOffset = -1 * (dt.offset / 60);
|
|
36415
36758
|
var offsetZ = gmtOffset >= 0 ? "Etc/GMT+" + gmtOffset : "Etc/GMT" + gmtOffset;
|
|
36416
|
-
var isOffsetZoneSupported = IANAZone.isValidZone(offsetZ);
|
|
36417
36759
|
|
|
36418
|
-
if (dt.offset !== 0 &&
|
|
36760
|
+
if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
|
|
36419
36761
|
z = offsetZ;
|
|
36420
36762
|
this.dt = dt;
|
|
36421
36763
|
} else {
|
|
@@ -36906,7 +37248,7 @@ function extractIANAZone(match, cursor) {
|
|
|
36906
37248
|
|
|
36907
37249
|
var isoTimeOnly = RegExp("^T?" + isoTimeBaseRegex.source + "$"); // ISO duration parsing
|
|
36908
37250
|
|
|
36909
|
-
var isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
|
|
37251
|
+
var isoDuration = /^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
|
|
36910
37252
|
|
|
36911
37253
|
function extractISODuration(match) {
|
|
36912
37254
|
var s = match[0],
|
|
@@ -36930,13 +37272,13 @@ function extractISODuration(match) {
|
|
|
36930
37272
|
};
|
|
36931
37273
|
|
|
36932
37274
|
return [{
|
|
36933
|
-
years: maybeNegate(
|
|
36934
|
-
months: maybeNegate(
|
|
36935
|
-
weeks: maybeNegate(
|
|
36936
|
-
days: maybeNegate(
|
|
36937
|
-
hours: maybeNegate(
|
|
36938
|
-
minutes: maybeNegate(
|
|
36939
|
-
seconds: maybeNegate(
|
|
37275
|
+
years: maybeNegate(parseFloating(yearStr)),
|
|
37276
|
+
months: maybeNegate(parseFloating(monthStr)),
|
|
37277
|
+
weeks: maybeNegate(parseFloating(weekStr)),
|
|
37278
|
+
days: maybeNegate(parseFloating(dayStr)),
|
|
37279
|
+
hours: maybeNegate(parseFloating(hourStr)),
|
|
37280
|
+
minutes: maybeNegate(parseFloating(minuteStr)),
|
|
37281
|
+
seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"),
|
|
36940
37282
|
milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)
|
|
36941
37283
|
}];
|
|
36942
37284
|
} // These are a little braindead. EDT *should* tell us that we're in, say, America/New_York
|
|
@@ -37162,7 +37504,6 @@ var lowOrderMatrix = {
|
|
|
37162
37504
|
}
|
|
37163
37505
|
}, lowOrderMatrix); // units ordered by size
|
|
37164
37506
|
|
|
37165
|
-
|
|
37166
37507
|
var orderedUnits$1 = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"];
|
|
37167
37508
|
var reverseUnits = orderedUnits$1.slice(0).reverse(); // clone really means "create another instance just like this one, but with these changes"
|
|
37168
37509
|
|
|
@@ -37210,11 +37551,11 @@ function normalizeValues(matrix, vals) {
|
|
|
37210
37551
|
}, null);
|
|
37211
37552
|
}
|
|
37212
37553
|
/**
|
|
37213
|
-
* A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime
|
|
37554
|
+
* A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.
|
|
37214
37555
|
*
|
|
37215
37556
|
* Here is a brief overview of commonly used methods and getters in Duration:
|
|
37216
37557
|
*
|
|
37217
|
-
* * **Creation** To create a Duration, use {@link Duration
|
|
37558
|
+
* * **Creation** To create a Duration, use {@link Duration#fromMillis}, {@link Duration#fromObject}, or {@link Duration#fromISO}.
|
|
37218
37559
|
* * **Unit values** See the {@link Duration#years}, {@link Duration.months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.
|
|
37219
37560
|
* * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.
|
|
37220
37561
|
* * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.
|
|
@@ -37313,6 +37654,29 @@ var Duration = /*#__PURE__*/function () {
|
|
|
37313
37654
|
conversionAccuracy: opts.conversionAccuracy
|
|
37314
37655
|
});
|
|
37315
37656
|
}
|
|
37657
|
+
/**
|
|
37658
|
+
* Create a Duration from DurationLike.
|
|
37659
|
+
*
|
|
37660
|
+
* @param {Object | number | Duration} durationLike
|
|
37661
|
+
* One of:
|
|
37662
|
+
* - object with keys like 'years' and 'hours'.
|
|
37663
|
+
* - number representing milliseconds
|
|
37664
|
+
* - Duration instance
|
|
37665
|
+
* @return {Duration}
|
|
37666
|
+
*/
|
|
37667
|
+
;
|
|
37668
|
+
|
|
37669
|
+
Duration.fromDurationLike = function fromDurationLike(durationLike) {
|
|
37670
|
+
if (isNumber(durationLike)) {
|
|
37671
|
+
return Duration.fromMillis(durationLike);
|
|
37672
|
+
} else if (Duration.isDuration(durationLike)) {
|
|
37673
|
+
return durationLike;
|
|
37674
|
+
} else if (typeof durationLike === "object") {
|
|
37675
|
+
return Duration.fromObject(durationLike);
|
|
37676
|
+
} else {
|
|
37677
|
+
throw new InvalidArgumentError("Unknown duration argument " + durationLike + " of type " + typeof durationLike);
|
|
37678
|
+
}
|
|
37679
|
+
}
|
|
37316
37680
|
/**
|
|
37317
37681
|
* Create a Duration from an ISO 8601 duration string.
|
|
37318
37682
|
* @param {string} text - text to parse
|
|
@@ -37450,7 +37814,7 @@ var Duration = /*#__PURE__*/function () {
|
|
|
37450
37814
|
* * `y` for years
|
|
37451
37815
|
* Notes:
|
|
37452
37816
|
* * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits
|
|
37453
|
-
* * The duration will be converted to the set of units in the format string using {@link Duration
|
|
37817
|
+
* * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.
|
|
37454
37818
|
* @param {string} fmt - the format string
|
|
37455
37819
|
* @param {Object} opts - options
|
|
37456
37820
|
* @param {boolean} [opts.floor=true] - floor numerical values
|
|
@@ -37607,7 +37971,7 @@ var Duration = /*#__PURE__*/function () {
|
|
|
37607
37971
|
|
|
37608
37972
|
_proto.plus = function plus(duration) {
|
|
37609
37973
|
if (!this.isValid) return this;
|
|
37610
|
-
var dur =
|
|
37974
|
+
var dur = Duration.fromDurationLike(duration),
|
|
37611
37975
|
result = {};
|
|
37612
37976
|
|
|
37613
37977
|
for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits$1), _step; !(_step = _iterator()).done;) {
|
|
@@ -37631,7 +37995,7 @@ var Duration = /*#__PURE__*/function () {
|
|
|
37631
37995
|
|
|
37632
37996
|
_proto.minus = function minus(duration) {
|
|
37633
37997
|
if (!this.isValid) return this;
|
|
37634
|
-
var dur =
|
|
37998
|
+
var dur = Duration.fromDurationLike(duration);
|
|
37635
37999
|
return this.plus(dur.negate());
|
|
37636
38000
|
}
|
|
37637
38001
|
/**
|
|
@@ -37788,8 +38152,7 @@ var Duration = /*#__PURE__*/function () {
|
|
|
37788
38152
|
|
|
37789
38153
|
var i = Math.trunc(own);
|
|
37790
38154
|
built[k] = i;
|
|
37791
|
-
accumulated[k] = own - i; //
|
|
37792
|
-
// plus anything further down the chain that should be rolled up in to this
|
|
38155
|
+
accumulated[k] = (own * 1000 - i * 1000) / 1000; // plus anything further down the chain that should be rolled up in to this
|
|
37793
38156
|
|
|
37794
38157
|
for (var down in vals) {
|
|
37795
38158
|
if (orderedUnits$1.indexOf(down) > orderedUnits$1.indexOf(k)) {
|
|
@@ -38008,17 +38371,6 @@ var Duration = /*#__PURE__*/function () {
|
|
|
38008
38371
|
|
|
38009
38372
|
return Duration;
|
|
38010
38373
|
}();
|
|
38011
|
-
function friendlyDuration(durationish) {
|
|
38012
|
-
if (isNumber(durationish)) {
|
|
38013
|
-
return Duration.fromMillis(durationish);
|
|
38014
|
-
} else if (Duration.isDuration(durationish)) {
|
|
38015
|
-
return durationish;
|
|
38016
|
-
} else if (typeof durationish === "object") {
|
|
38017
|
-
return Duration.fromObject(durationish);
|
|
38018
|
-
} else {
|
|
38019
|
-
throw new InvalidArgumentError("Unknown duration argument " + durationish + " of type " + typeof durationish);
|
|
38020
|
-
}
|
|
38021
|
-
}
|
|
38022
38374
|
|
|
38023
38375
|
var INVALID$1 = "Invalid Interval"; // checks if the start is equal to or before the end
|
|
38024
38376
|
|
|
@@ -38038,7 +38390,7 @@ function validateStartEnd(start, end) {
|
|
|
38038
38390
|
*
|
|
38039
38391
|
* Here is a brief overview of the most commonly used methods and getters in Interval:
|
|
38040
38392
|
*
|
|
38041
|
-
* * **Creation** To create an Interval, use {@link Interval
|
|
38393
|
+
* * **Creation** To create an Interval, use {@link Interval#fromDateTimes}, {@link Interval#after}, {@link Interval#before}, or {@link Interval#fromISO}.
|
|
38042
38394
|
* * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.
|
|
38043
38395
|
* * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.
|
|
38044
38396
|
* * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval#merge}, {@link Interval#xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.
|
|
@@ -38130,7 +38482,7 @@ var Interval = /*#__PURE__*/function () {
|
|
|
38130
38482
|
;
|
|
38131
38483
|
|
|
38132
38484
|
Interval.after = function after(start, duration) {
|
|
38133
|
-
var dur =
|
|
38485
|
+
var dur = Duration.fromDurationLike(duration),
|
|
38134
38486
|
dt = friendlyDateTime(start);
|
|
38135
38487
|
return Interval.fromDateTimes(dt, dt.plus(dur));
|
|
38136
38488
|
}
|
|
@@ -38143,7 +38495,7 @@ var Interval = /*#__PURE__*/function () {
|
|
|
38143
38495
|
;
|
|
38144
38496
|
|
|
38145
38497
|
Interval.before = function before(end, duration) {
|
|
38146
|
-
var dur =
|
|
38498
|
+
var dur = Duration.fromDurationLike(duration),
|
|
38147
38499
|
dt = friendlyDateTime(end);
|
|
38148
38500
|
return Interval.fromDateTimes(dt.minus(dur), dt);
|
|
38149
38501
|
}
|
|
@@ -38151,7 +38503,7 @@ var Interval = /*#__PURE__*/function () {
|
|
|
38151
38503
|
* Create an Interval from an ISO 8601 string.
|
|
38152
38504
|
* Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.
|
|
38153
38505
|
* @param {string} text - the ISO string to parse
|
|
38154
|
-
* @param {Object} [opts] - options to pass {@link DateTime
|
|
38506
|
+
* @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}
|
|
38155
38507
|
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
|
|
38156
38508
|
* @return {Interval}
|
|
38157
38509
|
*/
|
|
@@ -38362,7 +38714,7 @@ var Interval = /*#__PURE__*/function () {
|
|
|
38362
38714
|
;
|
|
38363
38715
|
|
|
38364
38716
|
_proto.splitBy = function splitBy(duration) {
|
|
38365
|
-
var dur =
|
|
38717
|
+
var dur = Duration.fromDurationLike(duration);
|
|
38366
38718
|
|
|
38367
38719
|
if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) {
|
|
38368
38720
|
return [];
|
|
@@ -38622,7 +38974,7 @@ var Interval = /*#__PURE__*/function () {
|
|
|
38622
38974
|
* Returns an ISO 8601-compliant string representation of time of this Interval.
|
|
38623
38975
|
* The date components are ignored.
|
|
38624
38976
|
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
|
|
38625
|
-
* @param {Object} opts - The same options as {@link DateTime
|
|
38977
|
+
* @param {Object} opts - The same options as {@link DateTime#toISO}
|
|
38626
38978
|
* @return {string}
|
|
38627
38979
|
*/
|
|
38628
38980
|
;
|
|
@@ -38633,7 +38985,7 @@ var Interval = /*#__PURE__*/function () {
|
|
|
38633
38985
|
}
|
|
38634
38986
|
/**
|
|
38635
38987
|
* Returns a string representation of this Interval formatted according to the specified format string.
|
|
38636
|
-
* @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime
|
|
38988
|
+
* @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime#toFormat} for details.
|
|
38637
38989
|
* @param {Object} opts - options
|
|
38638
38990
|
* @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations
|
|
38639
38991
|
* @return {string}
|
|
@@ -38773,7 +39125,7 @@ var Info = /*#__PURE__*/function () {
|
|
|
38773
39125
|
* * If `input` is a string containing a valid time zone name, a Zone instance
|
|
38774
39126
|
* with that name is returned.
|
|
38775
39127
|
* * If `input` is a string that doesn't refer to a known time zone, a Zone
|
|
38776
|
-
* instance with {@link Zone
|
|
39128
|
+
* instance with {@link Zone#isValid} == false is returned.
|
|
38777
39129
|
* * If `input is a number, a Zone instance with the specified fixed offset
|
|
38778
39130
|
* in minutes is returned.
|
|
38779
39131
|
* * If `input` is `null` or `undefined`, the default zone is returned.
|
|
@@ -38955,10 +39307,10 @@ var Info = /*#__PURE__*/function () {
|
|
|
38955
39307
|
}
|
|
38956
39308
|
/**
|
|
38957
39309
|
* Return the set of available features in this environment.
|
|
38958
|
-
* Some features of Luxon are not available in all environments. For example, on older browsers,
|
|
39310
|
+
* Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.
|
|
38959
39311
|
* Keys:
|
|
38960
39312
|
* * `relative`: whether this environment supports relative time formatting
|
|
38961
|
-
* @example Info.features() //=> {
|
|
39313
|
+
* @example Info.features() //=> { relative: false }
|
|
38962
39314
|
* @return {Object}
|
|
38963
39315
|
*/
|
|
38964
39316
|
;
|
|
@@ -39349,6 +39701,12 @@ function unitForToken(token, loc) {
|
|
|
39349
39701
|
|
|
39350
39702
|
case "u":
|
|
39351
39703
|
return simple(oneToNine);
|
|
39704
|
+
|
|
39705
|
+
case "uu":
|
|
39706
|
+
return simple(oneOrTwo);
|
|
39707
|
+
|
|
39708
|
+
case "uuu":
|
|
39709
|
+
return intUnit(one);
|
|
39352
39710
|
// meridiem
|
|
39353
39711
|
|
|
39354
39712
|
case "a":
|
|
@@ -39555,14 +39913,19 @@ function dateTimeFromMatches(matches) {
|
|
|
39555
39913
|
}
|
|
39556
39914
|
};
|
|
39557
39915
|
|
|
39558
|
-
var zone;
|
|
39916
|
+
var zone = null;
|
|
39917
|
+
var specificOffset;
|
|
39559
39918
|
|
|
39560
|
-
if (!isUndefined(matches.
|
|
39561
|
-
zone = new FixedOffsetZone(matches.Z);
|
|
39562
|
-
} else if (!isUndefined(matches.z)) {
|
|
39919
|
+
if (!isUndefined(matches.z)) {
|
|
39563
39920
|
zone = IANAZone.create(matches.z);
|
|
39564
|
-
}
|
|
39565
|
-
|
|
39921
|
+
}
|
|
39922
|
+
|
|
39923
|
+
if (!isUndefined(matches.Z)) {
|
|
39924
|
+
if (!zone) {
|
|
39925
|
+
zone = new FixedOffsetZone(matches.Z);
|
|
39926
|
+
}
|
|
39927
|
+
|
|
39928
|
+
specificOffset = matches.Z;
|
|
39566
39929
|
}
|
|
39567
39930
|
|
|
39568
39931
|
if (!isUndefined(matches.q)) {
|
|
@@ -39594,7 +39957,7 @@ function dateTimeFromMatches(matches) {
|
|
|
39594
39957
|
|
|
39595
39958
|
return r;
|
|
39596
39959
|
}, {});
|
|
39597
|
-
return [vals, zone];
|
|
39960
|
+
return [vals, zone, specificOffset];
|
|
39598
39961
|
}
|
|
39599
39962
|
|
|
39600
39963
|
var dummyDateTimeCache = null;
|
|
@@ -39666,9 +40029,10 @@ function explainFromTokens(locale, input, format) {
|
|
|
39666
40029
|
_match = match(input, regex, handlers),
|
|
39667
40030
|
rawMatches = _match[0],
|
|
39668
40031
|
matches = _match[1],
|
|
39669
|
-
_ref6 = matches ? dateTimeFromMatches(matches) : [null, null],
|
|
40032
|
+
_ref6 = matches ? dateTimeFromMatches(matches) : [null, null, undefined],
|
|
39670
40033
|
result = _ref6[0],
|
|
39671
|
-
zone = _ref6[1]
|
|
40034
|
+
zone = _ref6[1],
|
|
40035
|
+
specificOffset = _ref6[2];
|
|
39672
40036
|
|
|
39673
40037
|
if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
|
|
39674
40038
|
throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");
|
|
@@ -39681,7 +40045,8 @@ function explainFromTokens(locale, input, format) {
|
|
|
39681
40045
|
rawMatches: rawMatches,
|
|
39682
40046
|
matches: matches,
|
|
39683
40047
|
result: result,
|
|
39684
|
-
zone: zone
|
|
40048
|
+
zone: zone,
|
|
40049
|
+
specificOffset: specificOffset
|
|
39685
40050
|
};
|
|
39686
40051
|
}
|
|
39687
40052
|
}
|
|
@@ -39689,9 +40054,10 @@ function parseFromTokens(locale, input, format) {
|
|
|
39689
40054
|
var _explainFromTokens = explainFromTokens(locale, input, format),
|
|
39690
40055
|
result = _explainFromTokens.result,
|
|
39691
40056
|
zone = _explainFromTokens.zone,
|
|
40057
|
+
specificOffset = _explainFromTokens.specificOffset,
|
|
39692
40058
|
invalidReason = _explainFromTokens.invalidReason;
|
|
39693
40059
|
|
|
39694
|
-
return [result, zone, invalidReason];
|
|
40060
|
+
return [result, zone, specificOffset, invalidReason];
|
|
39695
40061
|
}
|
|
39696
40062
|
|
|
39697
40063
|
var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
|
|
@@ -39979,14 +40345,15 @@ function adjustTime(inst, dur) {
|
|
|
39979
40345
|
// by handling the zone options
|
|
39980
40346
|
|
|
39981
40347
|
|
|
39982
|
-
function parseDataToDateTime(parsed, parsedZone, opts, format, text) {
|
|
40348
|
+
function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
|
|
39983
40349
|
var setZone = opts.setZone,
|
|
39984
40350
|
zone = opts.zone;
|
|
39985
40351
|
|
|
39986
40352
|
if (parsed && Object.keys(parsed).length !== 0) {
|
|
39987
40353
|
var interpretationZone = parsedZone || zone,
|
|
39988
40354
|
inst = DateTime.fromObject(parsed, _extends({}, opts, {
|
|
39989
|
-
zone: interpretationZone
|
|
40355
|
+
zone: interpretationZone,
|
|
40356
|
+
specificOffset: specificOffset
|
|
39990
40357
|
}));
|
|
39991
40358
|
return setZone ? inst : inst.setZone(zone);
|
|
39992
40359
|
} else {
|
|
@@ -40213,7 +40580,7 @@ function lastOpts(argList) {
|
|
|
40213
40580
|
*
|
|
40214
40581
|
* Here is a brief overview of the most commonly used functionality it provides:
|
|
40215
40582
|
*
|
|
40216
|
-
* * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime
|
|
40583
|
+
* * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime#local}, {@link DateTime#utc}, and (most flexibly) {@link DateTime#fromObject}. To create one from a standard string format, use {@link DateTime#fromISO}, {@link DateTime#fromHTTP}, and {@link DateTime#fromRFC2822}. To create one from a custom string format, use {@link DateTime#fromFormat}. To create one from a native JS date, use {@link DateTime#fromJSDate}.
|
|
40217
40584
|
* * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},
|
|
40218
40585
|
* {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.
|
|
40219
40586
|
* * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.
|
|
@@ -40531,7 +40898,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
40531
40898
|
}
|
|
40532
40899
|
|
|
40533
40900
|
var tsNow = Settings.now(),
|
|
40534
|
-
offsetProvis = zoneToUse.offset(tsNow),
|
|
40901
|
+
offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow),
|
|
40535
40902
|
normalized = normalizeObject(obj, normalizeUnit),
|
|
40536
40903
|
containsOrdinal = !isUndefined(normalized.ordinal),
|
|
40537
40904
|
containsGregorYear = !isUndefined(normalized.year),
|
|
@@ -40735,12 +41102,13 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
40735
41102
|
_parseFromTokens = parseFromTokens(localeToUse, text, fmt),
|
|
40736
41103
|
vals = _parseFromTokens[0],
|
|
40737
41104
|
parsedZone = _parseFromTokens[1],
|
|
40738
|
-
|
|
41105
|
+
specificOffset = _parseFromTokens[2],
|
|
41106
|
+
invalid = _parseFromTokens[3];
|
|
40739
41107
|
|
|
40740
41108
|
if (invalid) {
|
|
40741
41109
|
return DateTime.invalid(invalid);
|
|
40742
41110
|
} else {
|
|
40743
|
-
return parseDataToDateTime(vals, parsedZone, opts, "format " + fmt, text);
|
|
41111
|
+
return parseDataToDateTime(vals, parsedZone, opts, "format " + fmt, text, specificOffset);
|
|
40744
41112
|
}
|
|
40745
41113
|
}
|
|
40746
41114
|
/**
|
|
@@ -40874,7 +41242,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
40874
41242
|
/**
|
|
40875
41243
|
* "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime.
|
|
40876
41244
|
*
|
|
40877
|
-
* Equivalent to {@link DateTime
|
|
41245
|
+
* Equivalent to {@link DateTime#setZone}('utc')
|
|
40878
41246
|
* @param {number} [offset=0] - optionally, an offset from UTC in minutes
|
|
40879
41247
|
* @param {Object} [opts={}] - options to pass to `setZone()`
|
|
40880
41248
|
* @return {DateTime}
|
|
@@ -40906,8 +41274,8 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
40906
41274
|
/**
|
|
40907
41275
|
* "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
|
|
40908
41276
|
*
|
|
40909
|
-
* By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime
|
|
40910
|
-
* @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime
|
|
41277
|
+
* By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.
|
|
41278
|
+
* @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.
|
|
40911
41279
|
* @param {Object} opts - options
|
|
40912
41280
|
* @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.
|
|
40913
41281
|
* @return {DateTime}
|
|
@@ -40983,7 +41351,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
40983
41351
|
}
|
|
40984
41352
|
/**
|
|
40985
41353
|
* "Set" the values of specified units. Returns a newly-constructed DateTime.
|
|
40986
|
-
* You can only set units with this method; for "setting" metadata, see {@link DateTime
|
|
41354
|
+
* You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.
|
|
40987
41355
|
* @param {Object} values - a mapping of units to numbers
|
|
40988
41356
|
* @example dt.set({ year: 2017 })
|
|
40989
41357
|
* @example dt.set({ hour: 8, minute: 30 })
|
|
@@ -41052,12 +41420,12 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
41052
41420
|
|
|
41053
41421
|
_proto.plus = function plus(duration) {
|
|
41054
41422
|
if (!this.isValid) return this;
|
|
41055
|
-
var dur =
|
|
41423
|
+
var dur = Duration.fromDurationLike(duration);
|
|
41056
41424
|
return clone(this, adjustTime(this, dur));
|
|
41057
41425
|
}
|
|
41058
41426
|
/**
|
|
41059
41427
|
* Subtract a period of time to this DateTime and return the resulting DateTime
|
|
41060
|
-
* See {@link DateTime
|
|
41428
|
+
* See {@link DateTime#plus}
|
|
41061
41429
|
* @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
|
|
41062
41430
|
@return {DateTime}
|
|
41063
41431
|
*/
|
|
@@ -41065,7 +41433,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
41065
41433
|
|
|
41066
41434
|
_proto.minus = function minus(duration) {
|
|
41067
41435
|
if (!this.isValid) return this;
|
|
41068
|
-
var dur =
|
|
41436
|
+
var dur = Duration.fromDurationLike(duration).negate();
|
|
41069
41437
|
return clone(this, adjustTime(this, dur));
|
|
41070
41438
|
}
|
|
41071
41439
|
/**
|
|
@@ -41145,7 +41513,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
41145
41513
|
|
|
41146
41514
|
/**
|
|
41147
41515
|
* Returns a string representation of this DateTime formatted according to the specified format string.
|
|
41148
|
-
* **You may not want this.** See {@link DateTime
|
|
41516
|
+
* **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
|
|
41149
41517
|
* Defaults to en-US if no locale has been specified, regardless of the system's locale.
|
|
41150
41518
|
* @param {string} fmt - the format string
|
|
41151
41519
|
* @param {Object} opts - opts to override the configuration options on this DateTime
|
|
@@ -41408,7 +41776,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
41408
41776
|
return this.isValid ? this.toISO() : INVALID;
|
|
41409
41777
|
}
|
|
41410
41778
|
/**
|
|
41411
|
-
* Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime
|
|
41779
|
+
* Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}
|
|
41412
41780
|
* @return {number}
|
|
41413
41781
|
*/
|
|
41414
41782
|
;
|
|
@@ -41533,7 +41901,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
41533
41901
|
}
|
|
41534
41902
|
/**
|
|
41535
41903
|
* Return the difference between this DateTime and right now.
|
|
41536
|
-
* See {@link DateTime
|
|
41904
|
+
* See {@link DateTime#diff}
|
|
41537
41905
|
* @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration
|
|
41538
41906
|
* @param {Object} opts - options that affect the creation of the Duration
|
|
41539
41907
|
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
|
|
@@ -41565,7 +41933,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
41565
41933
|
/**
|
|
41566
41934
|
* Return whether this DateTime is in the same unit of time as another DateTime.
|
|
41567
41935
|
* Higher-order units must also be identical for this function to return `true`.
|
|
41568
|
-
* Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime
|
|
41936
|
+
* Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.
|
|
41569
41937
|
* @param {DateTime} otherDateTime - the other DateTime
|
|
41570
41938
|
* @param {string} unit - the unit of time to check sameness on
|
|
41571
41939
|
* @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day
|
|
@@ -41747,7 +42115,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
41747
42115
|
} // FORMAT PRESETS
|
|
41748
42116
|
|
|
41749
42117
|
/**
|
|
41750
|
-
* {@link DateTime
|
|
42118
|
+
* {@link DateTime#toLocaleString} format like 10/14/1983
|
|
41751
42119
|
* @type {Object}
|
|
41752
42120
|
*/
|
|
41753
42121
|
;
|
|
@@ -42153,7 +42521,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42153
42521
|
return DATE_SHORT;
|
|
42154
42522
|
}
|
|
42155
42523
|
/**
|
|
42156
|
-
* {@link DateTime
|
|
42524
|
+
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
|
|
42157
42525
|
* @type {Object}
|
|
42158
42526
|
*/
|
|
42159
42527
|
|
|
@@ -42163,7 +42531,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42163
42531
|
return DATE_MED;
|
|
42164
42532
|
}
|
|
42165
42533
|
/**
|
|
42166
|
-
* {@link DateTime
|
|
42534
|
+
* {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
|
|
42167
42535
|
* @type {Object}
|
|
42168
42536
|
*/
|
|
42169
42537
|
|
|
@@ -42173,7 +42541,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42173
42541
|
return DATE_MED_WITH_WEEKDAY;
|
|
42174
42542
|
}
|
|
42175
42543
|
/**
|
|
42176
|
-
* {@link DateTime
|
|
42544
|
+
* {@link DateTime#toLocaleString} format like 'October 14, 1983'
|
|
42177
42545
|
* @type {Object}
|
|
42178
42546
|
*/
|
|
42179
42547
|
|
|
@@ -42183,7 +42551,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42183
42551
|
return DATE_FULL;
|
|
42184
42552
|
}
|
|
42185
42553
|
/**
|
|
42186
|
-
* {@link DateTime
|
|
42554
|
+
* {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
|
|
42187
42555
|
* @type {Object}
|
|
42188
42556
|
*/
|
|
42189
42557
|
|
|
@@ -42193,7 +42561,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42193
42561
|
return DATE_HUGE;
|
|
42194
42562
|
}
|
|
42195
42563
|
/**
|
|
42196
|
-
* {@link DateTime
|
|
42564
|
+
* {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
|
|
42197
42565
|
* @type {Object}
|
|
42198
42566
|
*/
|
|
42199
42567
|
|
|
@@ -42203,7 +42571,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42203
42571
|
return TIME_SIMPLE;
|
|
42204
42572
|
}
|
|
42205
42573
|
/**
|
|
42206
|
-
* {@link DateTime
|
|
42574
|
+
* {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
|
|
42207
42575
|
* @type {Object}
|
|
42208
42576
|
*/
|
|
42209
42577
|
|
|
@@ -42213,7 +42581,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42213
42581
|
return TIME_WITH_SECONDS;
|
|
42214
42582
|
}
|
|
42215
42583
|
/**
|
|
42216
|
-
* {@link DateTime
|
|
42584
|
+
* {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
|
|
42217
42585
|
* @type {Object}
|
|
42218
42586
|
*/
|
|
42219
42587
|
|
|
@@ -42223,7 +42591,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42223
42591
|
return TIME_WITH_SHORT_OFFSET;
|
|
42224
42592
|
}
|
|
42225
42593
|
/**
|
|
42226
|
-
* {@link DateTime
|
|
42594
|
+
* {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
|
42227
42595
|
* @type {Object}
|
|
42228
42596
|
*/
|
|
42229
42597
|
|
|
@@ -42233,7 +42601,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42233
42601
|
return TIME_WITH_LONG_OFFSET;
|
|
42234
42602
|
}
|
|
42235
42603
|
/**
|
|
42236
|
-
* {@link DateTime
|
|
42604
|
+
* {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
|
|
42237
42605
|
* @type {Object}
|
|
42238
42606
|
*/
|
|
42239
42607
|
|
|
@@ -42243,7 +42611,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42243
42611
|
return TIME_24_SIMPLE;
|
|
42244
42612
|
}
|
|
42245
42613
|
/**
|
|
42246
|
-
* {@link DateTime
|
|
42614
|
+
* {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
|
|
42247
42615
|
* @type {Object}
|
|
42248
42616
|
*/
|
|
42249
42617
|
|
|
@@ -42253,7 +42621,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42253
42621
|
return TIME_24_WITH_SECONDS;
|
|
42254
42622
|
}
|
|
42255
42623
|
/**
|
|
42256
|
-
* {@link DateTime
|
|
42624
|
+
* {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
|
|
42257
42625
|
* @type {Object}
|
|
42258
42626
|
*/
|
|
42259
42627
|
|
|
@@ -42263,7 +42631,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42263
42631
|
return TIME_24_WITH_SHORT_OFFSET;
|
|
42264
42632
|
}
|
|
42265
42633
|
/**
|
|
42266
|
-
* {@link DateTime
|
|
42634
|
+
* {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
|
|
42267
42635
|
* @type {Object}
|
|
42268
42636
|
*/
|
|
42269
42637
|
|
|
@@ -42273,7 +42641,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42273
42641
|
return TIME_24_WITH_LONG_OFFSET;
|
|
42274
42642
|
}
|
|
42275
42643
|
/**
|
|
42276
|
-
* {@link DateTime
|
|
42644
|
+
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
42277
42645
|
* @type {Object}
|
|
42278
42646
|
*/
|
|
42279
42647
|
|
|
@@ -42283,7 +42651,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42283
42651
|
return DATETIME_SHORT;
|
|
42284
42652
|
}
|
|
42285
42653
|
/**
|
|
42286
|
-
* {@link DateTime
|
|
42654
|
+
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
|
|
42287
42655
|
* @type {Object}
|
|
42288
42656
|
*/
|
|
42289
42657
|
|
|
@@ -42293,7 +42661,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42293
42661
|
return DATETIME_SHORT_WITH_SECONDS;
|
|
42294
42662
|
}
|
|
42295
42663
|
/**
|
|
42296
|
-
* {@link DateTime
|
|
42664
|
+
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
42297
42665
|
* @type {Object}
|
|
42298
42666
|
*/
|
|
42299
42667
|
|
|
@@ -42303,7 +42671,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42303
42671
|
return DATETIME_MED;
|
|
42304
42672
|
}
|
|
42305
42673
|
/**
|
|
42306
|
-
* {@link DateTime
|
|
42674
|
+
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
|
|
42307
42675
|
* @type {Object}
|
|
42308
42676
|
*/
|
|
42309
42677
|
|
|
@@ -42313,7 +42681,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42313
42681
|
return DATETIME_MED_WITH_SECONDS;
|
|
42314
42682
|
}
|
|
42315
42683
|
/**
|
|
42316
|
-
* {@link DateTime
|
|
42684
|
+
* {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
42317
42685
|
* @type {Object}
|
|
42318
42686
|
*/
|
|
42319
42687
|
|
|
@@ -42323,7 +42691,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42323
42691
|
return DATETIME_MED_WITH_WEEKDAY;
|
|
42324
42692
|
}
|
|
42325
42693
|
/**
|
|
42326
|
-
* {@link DateTime
|
|
42694
|
+
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
|
|
42327
42695
|
* @type {Object}
|
|
42328
42696
|
*/
|
|
42329
42697
|
|
|
@@ -42333,7 +42701,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42333
42701
|
return DATETIME_FULL;
|
|
42334
42702
|
}
|
|
42335
42703
|
/**
|
|
42336
|
-
* {@link DateTime
|
|
42704
|
+
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
|
|
42337
42705
|
* @type {Object}
|
|
42338
42706
|
*/
|
|
42339
42707
|
|
|
@@ -42343,7 +42711,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42343
42711
|
return DATETIME_FULL_WITH_SECONDS;
|
|
42344
42712
|
}
|
|
42345
42713
|
/**
|
|
42346
|
-
* {@link DateTime
|
|
42714
|
+
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
|
42347
42715
|
* @type {Object}
|
|
42348
42716
|
*/
|
|
42349
42717
|
|
|
@@ -42353,7 +42721,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
42353
42721
|
return DATETIME_HUGE;
|
|
42354
42722
|
}
|
|
42355
42723
|
/**
|
|
42356
|
-
* {@link DateTime
|
|
42724
|
+
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
|
42357
42725
|
* @type {Object}
|
|
42358
42726
|
*/
|
|
42359
42727
|
|
|
@@ -42378,7 +42746,7 @@ function friendlyDateTime(dateTimeish) {
|
|
|
42378
42746
|
}
|
|
42379
42747
|
}
|
|
42380
42748
|
|
|
42381
|
-
var VERSION = "2.0
|
|
42749
|
+
var VERSION = "2.2.0";
|
|
42382
42750
|
|
|
42383
42751
|
exports.DateTime = DateTime;
|
|
42384
42752
|
exports.Duration = Duration;
|
|
@@ -42434,7 +42802,7 @@ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPr
|
|
|
42434
42802
|
: null
|
|
42435
42803
|
);
|
|
42436
42804
|
|
|
42437
|
-
var inspectCustom = __webpack_require__(/*! ./util.inspect */ "?4f7e").custom;
|
|
42805
|
+
var inspectCustom = (__webpack_require__(/*! ./util.inspect */ "?4f7e").custom);
|
|
42438
42806
|
var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
|
|
42439
42807
|
var toStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag !== 'undefined' ? Symbol.toStringTag : null;
|
|
42440
42808
|
|
|
@@ -43232,6 +43600,7 @@ var arrayPrefixGenerators = {
|
|
|
43232
43600
|
};
|
|
43233
43601
|
|
|
43234
43602
|
var isArray = Array.isArray;
|
|
43603
|
+
var split = String.prototype.split;
|
|
43235
43604
|
var push = Array.prototype.push;
|
|
43236
43605
|
var pushToArray = function (arr, valueOrArray) {
|
|
43237
43606
|
push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
@@ -43268,6 +43637,8 @@ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
|
43268
43637
|
|| typeof v === 'bigint';
|
|
43269
43638
|
};
|
|
43270
43639
|
|
|
43640
|
+
var sentinel = {};
|
|
43641
|
+
|
|
43271
43642
|
var stringify = function stringify(
|
|
43272
43643
|
object,
|
|
43273
43644
|
prefix,
|
|
@@ -43287,8 +43658,23 @@ var stringify = function stringify(
|
|
|
43287
43658
|
) {
|
|
43288
43659
|
var obj = object;
|
|
43289
43660
|
|
|
43290
|
-
|
|
43291
|
-
|
|
43661
|
+
var tmpSc = sideChannel;
|
|
43662
|
+
var step = 0;
|
|
43663
|
+
var findFlag = false;
|
|
43664
|
+
while ((tmpSc = tmpSc.get(sentinel)) !== undefined && !findFlag) {
|
|
43665
|
+
// Where object last appeared in the ref tree
|
|
43666
|
+
var pos = tmpSc.get(object);
|
|
43667
|
+
step += 1;
|
|
43668
|
+
if (typeof pos !== 'undefined') {
|
|
43669
|
+
if (pos === step) {
|
|
43670
|
+
throw new RangeError('Cyclic object value');
|
|
43671
|
+
} else {
|
|
43672
|
+
findFlag = true; // Break while
|
|
43673
|
+
}
|
|
43674
|
+
}
|
|
43675
|
+
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
43676
|
+
step = 0;
|
|
43677
|
+
}
|
|
43292
43678
|
}
|
|
43293
43679
|
|
|
43294
43680
|
if (typeof filter === 'function') {
|
|
@@ -43315,6 +43701,14 @@ var stringify = function stringify(
|
|
|
43315
43701
|
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
|
43316
43702
|
if (encoder) {
|
|
43317
43703
|
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
|
|
43704
|
+
if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
|
|
43705
|
+
var valuesArray = split.call(String(obj), ',');
|
|
43706
|
+
var valuesJoined = '';
|
|
43707
|
+
for (var i = 0; i < valuesArray.length; ++i) {
|
|
43708
|
+
valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
|
|
43709
|
+
}
|
|
43710
|
+
return [formatter(keyValue) + '=' + valuesJoined];
|
|
43711
|
+
}
|
|
43318
43712
|
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
|
43319
43713
|
}
|
|
43320
43714
|
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
@@ -43337,8 +43731,8 @@ var stringify = function stringify(
|
|
|
43337
43731
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
43338
43732
|
}
|
|
43339
43733
|
|
|
43340
|
-
for (var
|
|
43341
|
-
var key = objKeys[
|
|
43734
|
+
for (var j = 0; j < objKeys.length; ++j) {
|
|
43735
|
+
var key = objKeys[j];
|
|
43342
43736
|
var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
|
|
43343
43737
|
|
|
43344
43738
|
if (skipNulls && value === null) {
|
|
@@ -43349,8 +43743,9 @@ var stringify = function stringify(
|
|
|
43349
43743
|
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
|
|
43350
43744
|
: prefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
43351
43745
|
|
|
43352
|
-
sideChannel.set(object,
|
|
43746
|
+
sideChannel.set(object, step);
|
|
43353
43747
|
var valueSideChannel = getSideChannel();
|
|
43748
|
+
valueSideChannel.set(sentinel, sideChannel);
|
|
43354
43749
|
pushToArray(values, stringify(
|
|
43355
43750
|
value,
|
|
43356
43751
|
keyPrefix,
|
|
@@ -43691,6 +44086,7 @@ var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
|
43691
44086
|
|
|
43692
44087
|
i += 1;
|
|
43693
44088
|
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
44089
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
43694
44090
|
out += hexTable[0xF0 | (c >> 18)]
|
|
43695
44091
|
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
43696
44092
|
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
@@ -46055,9 +46451,9 @@ exports.quickSort = function (ary, comparator) {
|
|
|
46055
46451
|
|
|
46056
46452
|
var util = __webpack_require__(/*! ./util */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/util.js");
|
|
46057
46453
|
var binarySearch = __webpack_require__(/*! ./binary-search */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/binary-search.js");
|
|
46058
|
-
var ArraySet = __webpack_require__(/*! ./array-set */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js").ArraySet;
|
|
46454
|
+
var ArraySet = (__webpack_require__(/*! ./array-set */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js").ArraySet);
|
|
46059
46455
|
var base64VLQ = __webpack_require__(/*! ./base64-vlq */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/base64-vlq.js");
|
|
46060
|
-
var quickSort = __webpack_require__(/*! ./quick-sort */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/quick-sort.js").quickSort;
|
|
46456
|
+
var quickSort = (__webpack_require__(/*! ./quick-sort */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/quick-sort.js").quickSort);
|
|
46061
46457
|
|
|
46062
46458
|
function SourceMapConsumer(aSourceMap) {
|
|
46063
46459
|
var sourceMap = aSourceMap;
|
|
@@ -47147,8 +47543,8 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
|
|
47147
47543
|
|
|
47148
47544
|
var base64VLQ = __webpack_require__(/*! ./base64-vlq */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/base64-vlq.js");
|
|
47149
47545
|
var util = __webpack_require__(/*! ./util */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/util.js");
|
|
47150
|
-
var ArraySet = __webpack_require__(/*! ./array-set */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js").ArraySet;
|
|
47151
|
-
var MappingList = __webpack_require__(/*! ./mapping-list */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/mapping-list.js").MappingList;
|
|
47546
|
+
var ArraySet = (__webpack_require__(/*! ./array-set */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js").ArraySet);
|
|
47547
|
+
var MappingList = (__webpack_require__(/*! ./mapping-list */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/mapping-list.js").MappingList);
|
|
47152
47548
|
|
|
47153
47549
|
/**
|
|
47154
47550
|
* An instance of the SourceMapGenerator represents a source map which is
|
|
@@ -47559,7 +47955,7 @@ exports.SourceMapGenerator = SourceMapGenerator;
|
|
|
47559
47955
|
* http://opensource.org/licenses/BSD-3-Clause
|
|
47560
47956
|
*/
|
|
47561
47957
|
|
|
47562
|
-
var SourceMapGenerator = __webpack_require__(/*! ./source-map-generator */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator;
|
|
47958
|
+
var SourceMapGenerator = (__webpack_require__(/*! ./source-map-generator */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator);
|
|
47563
47959
|
var util = __webpack_require__(/*! ./util */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/util.js");
|
|
47564
47960
|
|
|
47565
47961
|
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
|