@powersync/web 0.0.0-dev-20251209082930 → 0.0.0-dev-20260112083235
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/README.md +1 -1
- package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapp-89f0ba.index.umd.js +1875 -0
- package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapp-89f0ba.index.umd.js.map +1 -0
- package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-685f6c0.index.umd.js +567 -0
- package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-685f6c0.index.umd.js.map +1 -0
- package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-685f6c1.index.umd.js +567 -0
- package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-685f6c1.index.umd.js.map +1 -0
- package/dist/index.umd.js +6938 -1827
- package/dist/index.umd.js.map +1 -1
- package/dist/worker/SharedSyncImplementation.umd.js +222 -196
- package/dist/worker/SharedSyncImplementation.umd.js.map +1 -1
- package/dist/worker/WASQLiteDB.umd.js +159 -119
- package/dist/worker/WASQLiteDB.umd.js.map +1 -1
- package/dist/worker/node_modules_bson_lib_bson_mjs.umd.js +3 -3
- package/dist/worker/node_modules_bson_lib_bson_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite-async_mjs.umd.js +6 -6
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite-async_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite_mjs.umd.js +6 -6
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite-async_mjs.umd.js +6 -6
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite-async_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite_mjs.umd.js +6 -6
- package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite_mjs.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js.umd.js +9 -9
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js.umd.js +12 -12
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js.umd.js.map +1 -1
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_OPFSCoopSyncVFS_js.umd.js +9 -9
- package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_OPFSCoopSyncVFS_js.umd.js.map +1 -1
- package/lib/package.json +18 -13
- package/lib/src/db/PowerSyncDatabase.d.ts +3 -1
- package/lib/src/db/PowerSyncDatabase.js +19 -7
- package/lib/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.d.ts +1 -1
- package/lib/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.js +1 -1
- package/lib/src/db/adapters/AbstractWebSQLOpenFactory.d.ts +2 -2
- package/lib/src/db/adapters/AbstractWebSQLOpenFactory.js +2 -2
- package/lib/src/db/adapters/AsyncDatabaseConnection.d.ts +1 -9
- package/lib/src/db/adapters/AsyncDatabaseConnection.js +1 -11
- package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.d.ts +3 -3
- package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.js +13 -7
- package/lib/src/db/adapters/WebDBAdapter.d.ts +1 -1
- package/lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.d.ts +2 -2
- package/lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js +1 -2
- package/lib/src/db/adapters/wa-sqlite/WASQLiteConnection.d.ts +2 -2
- package/lib/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.d.ts +3 -3
- package/lib/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.js +5 -5
- package/lib/src/db/adapters/wa-sqlite/WASQLiteOpenFactory.d.ts +4 -4
- package/lib/src/db/adapters/wa-sqlite/WASQLiteOpenFactory.js +6 -6
- package/lib/src/db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory.d.ts +1 -1
- package/lib/src/db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory.js +3 -3
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.d.ts +4 -4
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.js +5 -5
- package/lib/src/db/sync/WebRemote.js +1 -1
- package/lib/src/db/sync/WebStreamingSyncImplementation.d.ts +1 -1
- package/lib/src/db/sync/WebStreamingSyncImplementation.js +1 -1
- package/lib/src/index.d.ts +12 -12
- package/lib/src/index.js +12 -12
- package/lib/src/worker/db/SharedWASQLiteConnection.d.ts +2 -2
- package/lib/src/worker/db/WASQLiteDB.worker.js +3 -3
- package/lib/src/worker/db/WorkerWASQLiteConnection.d.ts +2 -2
- package/lib/src/worker/db/WorkerWASQLiteConnection.js +1 -1
- package/lib/src/worker/db/open-worker-database.d.ts +2 -2
- package/lib/src/worker/db/open-worker-database.js +1 -1
- package/lib/src/worker/sync/BroadcastLogger.d.ts +1 -1
- package/lib/src/worker/sync/SharedSyncImplementation.d.ts +4 -4
- package/lib/src/worker/sync/SharedSyncImplementation.js +13 -5
- package/lib/src/worker/sync/SharedSyncImplementation.worker.js +2 -2
- package/lib/src/worker/sync/WorkerClient.d.ts +1 -1
- package/lib/src/worker/sync/WorkerClient.js +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -14
- package/src/db/PowerSyncDatabase.ts +23 -8
- package/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.ts +1 -1
- package/src/db/adapters/AbstractWebSQLOpenFactory.ts +3 -3
- package/src/db/adapters/AsyncDatabaseConnection.ts +1 -13
- package/src/db/adapters/LockedAsyncDatabaseAdapter.ts +17 -9
- package/src/db/adapters/WebDBAdapter.ts +1 -1
- package/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.ts +3 -4
- package/src/db/adapters/wa-sqlite/WASQLiteConnection.ts +2 -2
- package/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.ts +7 -7
- package/src/db/adapters/wa-sqlite/WASQLiteOpenFactory.ts +7 -7
- package/src/db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory.ts +3 -3
- package/src/db/sync/SharedWebStreamingSyncImplementation.ts +7 -7
- package/src/db/sync/WebRemote.ts +1 -1
- package/src/db/sync/WebStreamingSyncImplementation.ts +2 -2
- package/src/index.ts +12 -12
- package/src/worker/db/SharedWASQLiteConnection.ts +2 -2
- package/src/worker/db/WASQLiteDB.worker.ts +5 -5
- package/src/worker/db/WorkerWASQLiteConnection.ts +2 -2
- package/src/worker/db/open-worker-database.ts +2 -2
- package/src/worker/sync/BroadcastLogger.ts +1 -1
- package/src/worker/sync/SharedSyncImplementation.ts +17 -8
- package/src/worker/sync/SharedSyncImplementation.worker.ts +2 -2
- package/src/worker/sync/WorkerClient.ts +2 -2
- /package/bin/{powersync.js → powersync.cjs} +0 -0
|
@@ -3,11 +3,11 @@ var sdk_web;
|
|
|
3
3
|
/******/ "use strict";
|
|
4
4
|
/******/ var __webpack_modules__ = ({
|
|
5
5
|
|
|
6
|
-
/***/ "../../node_modules/@journeyapps/wa-sqlite/src/sqlite-api.js"
|
|
6
|
+
/***/ "../../node_modules/@journeyapps/wa-sqlite/src/sqlite-api.js"
|
|
7
7
|
/*!*******************************************************************!*\
|
|
8
8
|
!*** ../../node_modules/@journeyapps/wa-sqlite/src/sqlite-api.js ***!
|
|
9
9
|
\*******************************************************************/
|
|
10
|
-
|
|
10
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11
11
|
|
|
12
12
|
__webpack_require__.r(__webpack_exports__);
|
|
13
13
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -1196,13 +1196,13 @@ function decl(s) {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
|
|
1198
1198
|
|
|
1199
|
-
/***/ }
|
|
1199
|
+
/***/ },
|
|
1200
1200
|
|
|
1201
|
-
/***/ "../../node_modules/@journeyapps/wa-sqlite/src/sqlite-constants.js"
|
|
1201
|
+
/***/ "../../node_modules/@journeyapps/wa-sqlite/src/sqlite-constants.js"
|
|
1202
1202
|
/*!*************************************************************************!*\
|
|
1203
1203
|
!*** ../../node_modules/@journeyapps/wa-sqlite/src/sqlite-constants.js ***!
|
|
1204
1204
|
\*************************************************************************/
|
|
1205
|
-
|
|
1205
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1206
1206
|
|
|
1207
1207
|
__webpack_require__.r(__webpack_exports__);
|
|
1208
1208
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -1715,13 +1715,13 @@ const SQLITE_PREPARE_PERSISTENT = 0x01;
|
|
|
1715
1715
|
const SQLITE_PREPARE_NORMALIZED = 0x02;
|
|
1716
1716
|
const SQLITE_PREPARE_NO_VTAB = 0x04;
|
|
1717
1717
|
|
|
1718
|
-
/***/ }
|
|
1718
|
+
/***/ },
|
|
1719
1719
|
|
|
1720
|
-
/***/ "../../node_modules/async-mutex/index.mjs"
|
|
1720
|
+
/***/ "../../node_modules/async-mutex/index.mjs"
|
|
1721
1721
|
/*!************************************************!*\
|
|
1722
1722
|
!*** ../../node_modules/async-mutex/index.mjs ***!
|
|
1723
1723
|
\************************************************/
|
|
1724
|
-
|
|
1724
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1725
1725
|
|
|
1726
1726
|
__webpack_require__.r(__webpack_exports__);
|
|
1727
1727
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -2026,13 +2026,13 @@ function tryAcquire(sync, alreadyAcquiredError = E_ALREADY_LOCKED) {
|
|
|
2026
2026
|
|
|
2027
2027
|
|
|
2028
2028
|
|
|
2029
|
-
/***/ }
|
|
2029
|
+
/***/ },
|
|
2030
2030
|
|
|
2031
|
-
/***/ "../../node_modules/comlink/dist/esm/comlink.mjs"
|
|
2031
|
+
/***/ "../../node_modules/comlink/dist/esm/comlink.mjs"
|
|
2032
2032
|
/*!*******************************************************!*\
|
|
2033
2033
|
!*** ../../node_modules/comlink/dist/esm/comlink.mjs ***!
|
|
2034
2034
|
\*******************************************************/
|
|
2035
|
-
|
|
2035
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2036
2036
|
|
|
2037
2037
|
__webpack_require__.r(__webpack_exports__);
|
|
2038
2038
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -2407,13 +2407,13 @@ function generateUUID() {
|
|
|
2407
2407
|
//# sourceMappingURL=comlink.mjs.map
|
|
2408
2408
|
|
|
2409
2409
|
|
|
2410
|
-
/***/ }
|
|
2410
|
+
/***/ },
|
|
2411
2411
|
|
|
2412
|
-
/***/ "../common/dist/bundle.mjs"
|
|
2412
|
+
/***/ "../common/dist/bundle.mjs"
|
|
2413
2413
|
/*!*********************************!*\
|
|
2414
2414
|
!*** ../common/dist/bundle.mjs ***!
|
|
2415
2415
|
\*********************************/
|
|
2416
|
-
|
|
2416
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2417
2417
|
|
|
2418
2418
|
__webpack_require__.r(__webpack_exports__);
|
|
2419
2419
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -2427,6 +2427,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2427
2427
|
/* harmony export */ BaseObserver: () => (/* binding */ BaseObserver),
|
|
2428
2428
|
/* harmony export */ Column: () => (/* binding */ Column),
|
|
2429
2429
|
/* harmony export */ ColumnType: () => (/* binding */ ColumnType),
|
|
2430
|
+
/* harmony export */ ConnectionClosedError: () => (/* binding */ ConnectionClosedError),
|
|
2430
2431
|
/* harmony export */ ConnectionManager: () => (/* binding */ ConnectionManager),
|
|
2431
2432
|
/* harmony export */ ControlledExecutor: () => (/* binding */ ControlledExecutor),
|
|
2432
2433
|
/* harmony export */ CrudBatch: () => (/* binding */ CrudBatch),
|
|
@@ -3241,6 +3242,10 @@ class SyncStatus {
|
|
|
3241
3242
|
priorityStatusEntries: this.priorityStatusEntries
|
|
3242
3243
|
};
|
|
3243
3244
|
}
|
|
3245
|
+
/**
|
|
3246
|
+
* Not all errors are serializable over a MessagePort. E.g. some `DomExceptions` fail to be passed across workers.
|
|
3247
|
+
* This explicitly serializes errors in the SyncStatus.
|
|
3248
|
+
*/
|
|
3244
3249
|
serializeError(error) {
|
|
3245
3250
|
if (typeof error == 'undefined') {
|
|
3246
3251
|
return undefined;
|
|
@@ -4863,7 +4868,7 @@ var hasRequiredBuffer$1;
|
|
|
4863
4868
|
function requireBuffer$1 () {
|
|
4864
4869
|
if (hasRequiredBuffer$1) return buffer$1;
|
|
4865
4870
|
hasRequiredBuffer$1 = 1;
|
|
4866
|
-
(function (exports) {
|
|
4871
|
+
(function (exports$1) {
|
|
4867
4872
|
|
|
4868
4873
|
const base64 = requireBase64Js();
|
|
4869
4874
|
const ieee754 = requireIeee754();
|
|
@@ -4872,12 +4877,12 @@ function requireBuffer$1 () {
|
|
|
4872
4877
|
? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
|
|
4873
4878
|
: null;
|
|
4874
4879
|
|
|
4875
|
-
exports.Buffer = Buffer;
|
|
4876
|
-
exports.SlowBuffer = SlowBuffer;
|
|
4877
|
-
exports.INSPECT_MAX_BYTES = 50;
|
|
4880
|
+
exports$1.Buffer = Buffer;
|
|
4881
|
+
exports$1.SlowBuffer = SlowBuffer;
|
|
4882
|
+
exports$1.INSPECT_MAX_BYTES = 50;
|
|
4878
4883
|
|
|
4879
4884
|
const K_MAX_LENGTH = 0x7fffffff;
|
|
4880
|
-
exports.kMaxLength = K_MAX_LENGTH;
|
|
4885
|
+
exports$1.kMaxLength = K_MAX_LENGTH;
|
|
4881
4886
|
|
|
4882
4887
|
/**
|
|
4883
4888
|
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
|
@@ -5473,7 +5478,7 @@ function requireBuffer$1 () {
|
|
|
5473
5478
|
|
|
5474
5479
|
Buffer.prototype.inspect = function inspect () {
|
|
5475
5480
|
let str = '';
|
|
5476
|
-
const max = exports.INSPECT_MAX_BYTES;
|
|
5481
|
+
const max = exports$1.INSPECT_MAX_BYTES;
|
|
5477
5482
|
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
|
|
5478
5483
|
if (this.length > max) str += ' ... ';
|
|
5479
5484
|
return '<Buffer ' + str + '>'
|
|
@@ -6981,7 +6986,7 @@ var hasRequiredBuffer;
|
|
|
6981
6986
|
function requireBuffer () {
|
|
6982
6987
|
if (hasRequiredBuffer) return buffer;
|
|
6983
6988
|
hasRequiredBuffer = 1;
|
|
6984
|
-
(function (exports) {
|
|
6989
|
+
(function (exports$1) {
|
|
6985
6990
|
|
|
6986
6991
|
var base64 = requireBase64Js();
|
|
6987
6992
|
var ieee754 = requireIeee754();
|
|
@@ -6990,12 +6995,12 @@ function requireBuffer () {
|
|
|
6990
6995
|
? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
|
|
6991
6996
|
: null;
|
|
6992
6997
|
|
|
6993
|
-
exports.Buffer = Buffer;
|
|
6994
|
-
exports.SlowBuffer = SlowBuffer;
|
|
6995
|
-
exports.INSPECT_MAX_BYTES = 50;
|
|
6998
|
+
exports$1.Buffer = Buffer;
|
|
6999
|
+
exports$1.SlowBuffer = SlowBuffer;
|
|
7000
|
+
exports$1.INSPECT_MAX_BYTES = 50;
|
|
6996
7001
|
|
|
6997
7002
|
var K_MAX_LENGTH = 0x7fffffff;
|
|
6998
|
-
exports.kMaxLength = K_MAX_LENGTH;
|
|
7003
|
+
exports$1.kMaxLength = K_MAX_LENGTH;
|
|
6999
7004
|
|
|
7000
7005
|
/**
|
|
7001
7006
|
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
|
@@ -7592,7 +7597,7 @@ function requireBuffer () {
|
|
|
7592
7597
|
|
|
7593
7598
|
Buffer.prototype.inspect = function inspect () {
|
|
7594
7599
|
var str = '';
|
|
7595
|
-
var max = exports.INSPECT_MAX_BYTES;
|
|
7600
|
+
var max = exports$1.INSPECT_MAX_BYTES;
|
|
7596
7601
|
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
|
|
7597
7602
|
if (this.length > max) str += ' ... ';
|
|
7598
7603
|
return '<Buffer ' + str + '>'
|
|
@@ -8805,7 +8810,7 @@ var hasRequiredFrames;
|
|
|
8805
8810
|
function requireFrames () {
|
|
8806
8811
|
if (hasRequiredFrames) return Frames;
|
|
8807
8812
|
hasRequiredFrames = 1;
|
|
8808
|
-
(function (exports) {
|
|
8813
|
+
(function (exports$1) {
|
|
8809
8814
|
/*
|
|
8810
8815
|
* Copyright 2021-2022 the original author or authors.
|
|
8811
8816
|
*
|
|
@@ -8821,8 +8826,8 @@ function requireFrames () {
|
|
|
8821
8826
|
* See the License for the specific language governing permissions and
|
|
8822
8827
|
* limitations under the License.
|
|
8823
8828
|
*/
|
|
8824
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8825
|
-
exports.Frame = exports.Lengths = exports.Flags = exports.FrameTypes = void 0;
|
|
8829
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
8830
|
+
exports$1.Frame = exports$1.Lengths = exports$1.Flags = exports$1.FrameTypes = void 0;
|
|
8826
8831
|
var FrameTypes;
|
|
8827
8832
|
(function (FrameTypes) {
|
|
8828
8833
|
FrameTypes[FrameTypes["RESERVED"] = 0] = "RESERVED";
|
|
@@ -8841,7 +8846,7 @@ function requireFrames () {
|
|
|
8841
8846
|
FrameTypes[FrameTypes["RESUME"] = 13] = "RESUME";
|
|
8842
8847
|
FrameTypes[FrameTypes["RESUME_OK"] = 14] = "RESUME_OK";
|
|
8843
8848
|
FrameTypes[FrameTypes["EXT"] = 63] = "EXT";
|
|
8844
|
-
})(FrameTypes = exports.FrameTypes || (exports.FrameTypes = {}));
|
|
8849
|
+
})(FrameTypes = exports$1.FrameTypes || (exports$1.FrameTypes = {}));
|
|
8845
8850
|
(function (Flags) {
|
|
8846
8851
|
Flags[Flags["NONE"] = 0] = "NONE";
|
|
8847
8852
|
Flags[Flags["COMPLETE"] = 64] = "COMPLETE";
|
|
@@ -8852,7 +8857,7 @@ function requireFrames () {
|
|
|
8852
8857
|
Flags[Flags["NEXT"] = 32] = "NEXT";
|
|
8853
8858
|
Flags[Flags["RESPOND"] = 128] = "RESPOND";
|
|
8854
8859
|
Flags[Flags["RESUME_ENABLE"] = 128] = "RESUME_ENABLE";
|
|
8855
|
-
})(exports.Flags || (exports.Flags = {}));
|
|
8860
|
+
})(exports$1.Flags || (exports$1.Flags = {}));
|
|
8856
8861
|
(function (Flags) {
|
|
8857
8862
|
function hasMetadata(flags) {
|
|
8858
8863
|
return (flags & Flags.METADATA) === Flags.METADATA;
|
|
@@ -8886,13 +8891,13 @@ function requireFrames () {
|
|
|
8886
8891
|
return (flags & Flags.RESUME_ENABLE) === Flags.RESUME_ENABLE;
|
|
8887
8892
|
}
|
|
8888
8893
|
Flags.hasResume = hasResume;
|
|
8889
|
-
})(exports.Flags || (exports.Flags = {}));
|
|
8894
|
+
})(exports$1.Flags || (exports$1.Flags = {}));
|
|
8890
8895
|
(function (Lengths) {
|
|
8891
8896
|
Lengths[Lengths["FRAME"] = 3] = "FRAME";
|
|
8892
8897
|
Lengths[Lengths["HEADER"] = 6] = "HEADER";
|
|
8893
8898
|
Lengths[Lengths["METADATA"] = 3] = "METADATA";
|
|
8894
8899
|
Lengths[Lengths["REQUEST"] = 3] = "REQUEST";
|
|
8895
|
-
})(exports.Lengths || (exports.Lengths = {}));
|
|
8900
|
+
})(exports$1.Lengths || (exports$1.Lengths = {}));
|
|
8896
8901
|
(function (Frame) {
|
|
8897
8902
|
function isConnection(frame) {
|
|
8898
8903
|
return frame.streamId === 0;
|
|
@@ -8903,7 +8908,7 @@ function requireFrames () {
|
|
|
8903
8908
|
frame.type <= FrameTypes.REQUEST_CHANNEL);
|
|
8904
8909
|
}
|
|
8905
8910
|
Frame.isRequest = isRequest;
|
|
8906
|
-
})(exports.Frame || (exports.Frame = {}));
|
|
8911
|
+
})(exports$1.Frame || (exports$1.Frame = {}));
|
|
8907
8912
|
|
|
8908
8913
|
} (Frames));
|
|
8909
8914
|
return Frames;
|
|
@@ -8914,7 +8919,7 @@ var hasRequiredCodecs;
|
|
|
8914
8919
|
function requireCodecs () {
|
|
8915
8920
|
if (hasRequiredCodecs) return Codecs;
|
|
8916
8921
|
hasRequiredCodecs = 1;
|
|
8917
|
-
(function (exports) {
|
|
8922
|
+
(function (exports$1) {
|
|
8918
8923
|
var __generator = (Codecs && Codecs.__generator) || function (thisArg, body) {
|
|
8919
8924
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
8920
8925
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
@@ -8942,22 +8947,22 @@ function requireCodecs () {
|
|
|
8942
8947
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
8943
8948
|
}
|
|
8944
8949
|
};
|
|
8945
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8946
|
-
exports.Deserializer = exports.sizeOfFrame = exports.serializeFrame = exports.deserializeFrame = exports.serializeFrameWithLength = exports.deserializeFrames = exports.deserializeFrameWithLength = exports.writeUInt64BE = exports.readUInt64BE = exports.writeUInt24BE = exports.readUInt24BE = exports.MAX_VERSION = exports.MAX_TTL = exports.MAX_STREAM_ID = exports.MAX_RESUME_LENGTH = exports.MAX_REQUEST_N = exports.MAX_REQUEST_COUNT = exports.MAX_MIME_LENGTH = exports.MAX_METADATA_LENGTH = exports.MAX_LIFETIME = exports.MAX_KEEPALIVE = exports.MAX_CODE = exports.FRAME_TYPE_OFFFSET = exports.FLAGS_MASK = void 0;
|
|
8950
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
8951
|
+
exports$1.Deserializer = exports$1.sizeOfFrame = exports$1.serializeFrame = exports$1.deserializeFrame = exports$1.serializeFrameWithLength = exports$1.deserializeFrames = exports$1.deserializeFrameWithLength = exports$1.writeUInt64BE = exports$1.readUInt64BE = exports$1.writeUInt24BE = exports$1.readUInt24BE = exports$1.MAX_VERSION = exports$1.MAX_TTL = exports$1.MAX_STREAM_ID = exports$1.MAX_RESUME_LENGTH = exports$1.MAX_REQUEST_N = exports$1.MAX_REQUEST_COUNT = exports$1.MAX_MIME_LENGTH = exports$1.MAX_METADATA_LENGTH = exports$1.MAX_LIFETIME = exports$1.MAX_KEEPALIVE = exports$1.MAX_CODE = exports$1.FRAME_TYPE_OFFFSET = exports$1.FLAGS_MASK = void 0;
|
|
8947
8952
|
var Frames_1 = requireFrames();
|
|
8948
|
-
exports.FLAGS_MASK = 0x3ff; // low 10 bits
|
|
8949
|
-
exports.FRAME_TYPE_OFFFSET = 10; // frame type is offset 10 bytes within the uint16 containing type + flags
|
|
8950
|
-
exports.MAX_CODE = 0x7fffffff; // uint31
|
|
8951
|
-
exports.MAX_KEEPALIVE = 0x7fffffff; // uint31
|
|
8952
|
-
exports.MAX_LIFETIME = 0x7fffffff; // uint31
|
|
8953
|
-
exports.MAX_METADATA_LENGTH = 0xffffff; // uint24
|
|
8954
|
-
exports.MAX_MIME_LENGTH = 0xff; // int8
|
|
8955
|
-
exports.MAX_REQUEST_COUNT = 0x7fffffff; // uint31
|
|
8956
|
-
exports.MAX_REQUEST_N = 0x7fffffff; // uint31
|
|
8957
|
-
exports.MAX_RESUME_LENGTH = 0xffff; // uint16
|
|
8958
|
-
exports.MAX_STREAM_ID = 0x7fffffff; // uint31
|
|
8959
|
-
exports.MAX_TTL = 0x7fffffff; // uint31
|
|
8960
|
-
exports.MAX_VERSION = 0xffff; // uint16
|
|
8953
|
+
exports$1.FLAGS_MASK = 0x3ff; // low 10 bits
|
|
8954
|
+
exports$1.FRAME_TYPE_OFFFSET = 10; // frame type is offset 10 bytes within the uint16 containing type + flags
|
|
8955
|
+
exports$1.MAX_CODE = 0x7fffffff; // uint31
|
|
8956
|
+
exports$1.MAX_KEEPALIVE = 0x7fffffff; // uint31
|
|
8957
|
+
exports$1.MAX_LIFETIME = 0x7fffffff; // uint31
|
|
8958
|
+
exports$1.MAX_METADATA_LENGTH = 0xffffff; // uint24
|
|
8959
|
+
exports$1.MAX_MIME_LENGTH = 0xff; // int8
|
|
8960
|
+
exports$1.MAX_REQUEST_COUNT = 0x7fffffff; // uint31
|
|
8961
|
+
exports$1.MAX_REQUEST_N = 0x7fffffff; // uint31
|
|
8962
|
+
exports$1.MAX_RESUME_LENGTH = 0xffff; // uint16
|
|
8963
|
+
exports$1.MAX_STREAM_ID = 0x7fffffff; // uint31
|
|
8964
|
+
exports$1.MAX_TTL = 0x7fffffff; // uint31
|
|
8965
|
+
exports$1.MAX_VERSION = 0xffff; // uint16
|
|
8961
8966
|
/**
|
|
8962
8967
|
* Mimimum value that would overflow bitwise operators (2^32).
|
|
8963
8968
|
*/
|
|
@@ -8971,7 +8976,7 @@ function requireCodecs () {
|
|
|
8971
8976
|
var val3 = buffer.readUInt8(offset + 2);
|
|
8972
8977
|
return val1 | val2 | val3;
|
|
8973
8978
|
}
|
|
8974
|
-
exports.readUInt24BE = readUInt24BE;
|
|
8979
|
+
exports$1.readUInt24BE = readUInt24BE;
|
|
8975
8980
|
/**
|
|
8976
8981
|
* Writes a uint24 to a buffer starting at the given offset, returning the
|
|
8977
8982
|
* offset of the next byte.
|
|
@@ -8981,7 +8986,7 @@ function requireCodecs () {
|
|
|
8981
8986
|
offset = buffer.writeUInt8((value >>> 8) & 0xff, offset); // 2nd byte
|
|
8982
8987
|
return buffer.writeUInt8(value & 0xff, offset); // 1st byte
|
|
8983
8988
|
}
|
|
8984
|
-
exports.writeUInt24BE = writeUInt24BE;
|
|
8989
|
+
exports$1.writeUInt24BE = writeUInt24BE;
|
|
8985
8990
|
/**
|
|
8986
8991
|
* Read a uint64 (technically supports up to 53 bits per JS number
|
|
8987
8992
|
* representation).
|
|
@@ -8991,7 +8996,7 @@ function requireCodecs () {
|
|
|
8991
8996
|
var low = buffer.readUInt32BE(offset + 4);
|
|
8992
8997
|
return high * BITWISE_OVERFLOW + low;
|
|
8993
8998
|
}
|
|
8994
|
-
exports.readUInt64BE = readUInt64BE;
|
|
8999
|
+
exports$1.readUInt64BE = readUInt64BE;
|
|
8995
9000
|
/**
|
|
8996
9001
|
* Write a uint64 (technically supports up to 53 bits per JS number
|
|
8997
9002
|
* representation).
|
|
@@ -9002,7 +9007,7 @@ function requireCodecs () {
|
|
|
9002
9007
|
offset = buffer.writeUInt32BE(high, offset); // first half of uint64
|
|
9003
9008
|
return buffer.writeUInt32BE(low, offset); // second half of uint64
|
|
9004
9009
|
}
|
|
9005
|
-
exports.writeUInt64BE = writeUInt64BE;
|
|
9010
|
+
exports$1.writeUInt64BE = writeUInt64BE;
|
|
9006
9011
|
/**
|
|
9007
9012
|
* Frame header is:
|
|
9008
9013
|
* - stream id (uint32 = 4)
|
|
@@ -9020,7 +9025,7 @@ function requireCodecs () {
|
|
|
9020
9025
|
var frameLength = readUInt24BE(buffer, 0);
|
|
9021
9026
|
return deserializeFrame(buffer.slice(UINT24_SIZE, UINT24_SIZE + frameLength));
|
|
9022
9027
|
}
|
|
9023
|
-
exports.deserializeFrameWithLength = deserializeFrameWithLength;
|
|
9028
|
+
exports$1.deserializeFrameWithLength = deserializeFrameWithLength;
|
|
9024
9029
|
/**
|
|
9025
9030
|
* Given a buffer that may contain zero or more length-prefixed frames followed
|
|
9026
9031
|
* by zero or more bytes of a (partial) subsequent frame, returns an array of
|
|
@@ -9053,7 +9058,7 @@ function requireCodecs () {
|
|
|
9053
9058
|
}
|
|
9054
9059
|
});
|
|
9055
9060
|
}
|
|
9056
|
-
exports.deserializeFrames = deserializeFrames;
|
|
9061
|
+
exports$1.deserializeFrames = deserializeFrames;
|
|
9057
9062
|
/**
|
|
9058
9063
|
* Writes a frame to a buffer with a length prefix.
|
|
9059
9064
|
*/
|
|
@@ -9064,7 +9069,7 @@ function requireCodecs () {
|
|
|
9064
9069
|
buffer.copy(lengthPrefixed, UINT24_SIZE);
|
|
9065
9070
|
return lengthPrefixed;
|
|
9066
9071
|
}
|
|
9067
|
-
exports.serializeFrameWithLength = serializeFrameWithLength;
|
|
9072
|
+
exports$1.serializeFrameWithLength = serializeFrameWithLength;
|
|
9068
9073
|
/**
|
|
9069
9074
|
* Read a frame from the buffer.
|
|
9070
9075
|
*/
|
|
@@ -9079,8 +9084,8 @@ function requireCodecs () {
|
|
|
9079
9084
|
// );
|
|
9080
9085
|
var typeAndFlags = buffer.readUInt16BE(offset);
|
|
9081
9086
|
offset += 2;
|
|
9082
|
-
var type = typeAndFlags >>> exports.FRAME_TYPE_OFFFSET; // keep highest 6 bits
|
|
9083
|
-
var flags = typeAndFlags & exports.FLAGS_MASK; // keep lowest 10 bits
|
|
9087
|
+
var type = typeAndFlags >>> exports$1.FRAME_TYPE_OFFFSET; // keep highest 6 bits
|
|
9088
|
+
var flags = typeAndFlags & exports$1.FLAGS_MASK; // keep lowest 10 bits
|
|
9084
9089
|
switch (type) {
|
|
9085
9090
|
case Frames_1.FrameTypes.SETUP:
|
|
9086
9091
|
return deserializeSetupFrame(buffer, streamId, flags);
|
|
@@ -9117,7 +9122,7 @@ function requireCodecs () {
|
|
|
9117
9122
|
// );
|
|
9118
9123
|
}
|
|
9119
9124
|
}
|
|
9120
|
-
exports.deserializeFrame = deserializeFrame;
|
|
9125
|
+
exports$1.deserializeFrame = deserializeFrame;
|
|
9121
9126
|
/**
|
|
9122
9127
|
* Convert the frame to a (binary) buffer.
|
|
9123
9128
|
*/
|
|
@@ -9156,7 +9161,7 @@ function requireCodecs () {
|
|
|
9156
9161
|
// );
|
|
9157
9162
|
}
|
|
9158
9163
|
}
|
|
9159
|
-
exports.serializeFrame = serializeFrame;
|
|
9164
|
+
exports$1.serializeFrame = serializeFrame;
|
|
9160
9165
|
/**
|
|
9161
9166
|
* Byte size of frame without size prefix
|
|
9162
9167
|
*/
|
|
@@ -9195,7 +9200,7 @@ function requireCodecs () {
|
|
|
9195
9200
|
// );
|
|
9196
9201
|
}
|
|
9197
9202
|
}
|
|
9198
|
-
exports.sizeOfFrame = sizeOfFrame;
|
|
9203
|
+
exports$1.sizeOfFrame = sizeOfFrame;
|
|
9199
9204
|
/**
|
|
9200
9205
|
* Writes a SETUP frame into a new buffer and returns it.
|
|
9201
9206
|
*
|
|
@@ -9830,7 +9835,7 @@ function requireCodecs () {
|
|
|
9830
9835
|
function writeHeader(frame, buffer) {
|
|
9831
9836
|
var offset = buffer.writeInt32BE(frame.streamId, 0);
|
|
9832
9837
|
// shift frame to high 6 bits, extract lowest 10 bits from flags
|
|
9833
|
-
return buffer.writeUInt16BE((frame.type << exports.FRAME_TYPE_OFFFSET) | (frame.flags & exports.FLAGS_MASK), offset);
|
|
9838
|
+
return buffer.writeUInt16BE((frame.type << exports$1.FRAME_TYPE_OFFFSET) | (frame.flags & exports$1.FLAGS_MASK), offset);
|
|
9834
9839
|
}
|
|
9835
9840
|
/**
|
|
9836
9841
|
* Determine the length of the payload section of a frame. Only applies to
|
|
@@ -9911,7 +9916,7 @@ function requireCodecs () {
|
|
|
9911
9916
|
};
|
|
9912
9917
|
return Deserializer;
|
|
9913
9918
|
}());
|
|
9914
|
-
exports.Deserializer = Deserializer;
|
|
9919
|
+
exports$1.Deserializer = Deserializer;
|
|
9915
9920
|
|
|
9916
9921
|
} (Codecs));
|
|
9917
9922
|
return Codecs;
|
|
@@ -10057,7 +10062,7 @@ var hasRequiredErrors;
|
|
|
10057
10062
|
function requireErrors () {
|
|
10058
10063
|
if (hasRequiredErrors) return Errors;
|
|
10059
10064
|
hasRequiredErrors = 1;
|
|
10060
|
-
(function (exports) {
|
|
10065
|
+
(function (exports$1) {
|
|
10061
10066
|
/*
|
|
10062
10067
|
* Copyright 2021-2022 the original author or authors.
|
|
10063
10068
|
*
|
|
@@ -10088,8 +10093,8 @@ function requireErrors () {
|
|
|
10088
10093
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10089
10094
|
};
|
|
10090
10095
|
})();
|
|
10091
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10092
|
-
exports.ErrorCodes = exports.RSocketError = void 0;
|
|
10096
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
10097
|
+
exports$1.ErrorCodes = exports$1.RSocketError = void 0;
|
|
10093
10098
|
var RSocketError = /** @class */ (function (_super) {
|
|
10094
10099
|
__extends(RSocketError, _super);
|
|
10095
10100
|
function RSocketError(code, message) {
|
|
@@ -10099,7 +10104,7 @@ function requireErrors () {
|
|
|
10099
10104
|
}
|
|
10100
10105
|
return RSocketError;
|
|
10101
10106
|
}(Error));
|
|
10102
|
-
exports.RSocketError = RSocketError;
|
|
10107
|
+
exports$1.RSocketError = RSocketError;
|
|
10103
10108
|
(function (ErrorCodes) {
|
|
10104
10109
|
ErrorCodes[ErrorCodes["RESERVED"] = 0] = "RESERVED";
|
|
10105
10110
|
ErrorCodes[ErrorCodes["INVALID_SETUP"] = 1] = "INVALID_SETUP";
|
|
@@ -10113,7 +10118,7 @@ function requireErrors () {
|
|
|
10113
10118
|
ErrorCodes[ErrorCodes["CANCELED"] = 515] = "CANCELED";
|
|
10114
10119
|
ErrorCodes[ErrorCodes["INVALID"] = 516] = "INVALID";
|
|
10115
10120
|
ErrorCodes[ErrorCodes["RESERVED_EXTENSION"] = 4294967295] = "RESERVED_EXTENSION";
|
|
10116
|
-
})(exports.ErrorCodes || (exports.ErrorCodes = {}));
|
|
10121
|
+
})(exports$1.ErrorCodes || (exports$1.ErrorCodes = {}));
|
|
10117
10122
|
|
|
10118
10123
|
} (Errors));
|
|
10119
10124
|
return Errors;
|
|
@@ -10155,7 +10160,7 @@ var hasRequiredClientServerMultiplexerDemultiplexer;
|
|
|
10155
10160
|
function requireClientServerMultiplexerDemultiplexer () {
|
|
10156
10161
|
if (hasRequiredClientServerMultiplexerDemultiplexer) return ClientServerMultiplexerDemultiplexer;
|
|
10157
10162
|
hasRequiredClientServerMultiplexerDemultiplexer = 1;
|
|
10158
|
-
(function (exports) {
|
|
10163
|
+
(function (exports$1) {
|
|
10159
10164
|
/*
|
|
10160
10165
|
* Copyright 2021-2022 the original author or authors.
|
|
10161
10166
|
*
|
|
@@ -10222,8 +10227,8 @@ function requireClientServerMultiplexerDemultiplexer () {
|
|
|
10222
10227
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
10223
10228
|
}
|
|
10224
10229
|
};
|
|
10225
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10226
|
-
exports.ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer = exports.ResumableClientServerInputMultiplexerDemultiplexer = exports.ClientServerInputMultiplexerDemultiplexer = exports.StreamIdGenerator = void 0;
|
|
10230
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
10231
|
+
exports$1.ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer = exports$1.ResumableClientServerInputMultiplexerDemultiplexer = exports$1.ClientServerInputMultiplexerDemultiplexer = exports$1.StreamIdGenerator = void 0;
|
|
10227
10232
|
var _1 = requireDist();
|
|
10228
10233
|
var Deferred_1 = requireDeferred();
|
|
10229
10234
|
var Errors_1 = requireErrors();
|
|
@@ -10246,7 +10251,7 @@ function requireClientServerMultiplexerDemultiplexer () {
|
|
|
10246
10251
|
};
|
|
10247
10252
|
return StreamIdGeneratorImpl;
|
|
10248
10253
|
}());
|
|
10249
|
-
})(exports.StreamIdGenerator || (exports.StreamIdGenerator = {}));
|
|
10254
|
+
})(exports$1.StreamIdGenerator || (exports$1.StreamIdGenerator = {}));
|
|
10250
10255
|
var ClientServerInputMultiplexerDemultiplexer = /** @class */ (function (_super) {
|
|
10251
10256
|
__extends(ClientServerInputMultiplexerDemultiplexer, _super);
|
|
10252
10257
|
function ClientServerInputMultiplexerDemultiplexer(streamIdSupplier, outbound, closeable) {
|
|
@@ -10335,7 +10340,7 @@ function requireClientServerMultiplexerDemultiplexer () {
|
|
|
10335
10340
|
};
|
|
10336
10341
|
return ClientServerInputMultiplexerDemultiplexer;
|
|
10337
10342
|
}(Deferred_1.Deferred));
|
|
10338
|
-
exports.ClientServerInputMultiplexerDemultiplexer = ClientServerInputMultiplexerDemultiplexer;
|
|
10343
|
+
exports$1.ClientServerInputMultiplexerDemultiplexer = ClientServerInputMultiplexerDemultiplexer;
|
|
10339
10344
|
var ResumableClientServerInputMultiplexerDemultiplexer = /** @class */ (function (_super) {
|
|
10340
10345
|
__extends(ResumableClientServerInputMultiplexerDemultiplexer, _super);
|
|
10341
10346
|
function ResumableClientServerInputMultiplexerDemultiplexer(streamIdSupplier, outbound, closeable, frameStore, token, sessionStoreOrReconnector, sessionTimeout) {
|
|
@@ -10492,7 +10497,7 @@ function requireClientServerMultiplexerDemultiplexer () {
|
|
|
10492
10497
|
};
|
|
10493
10498
|
return ResumableClientServerInputMultiplexerDemultiplexer;
|
|
10494
10499
|
}(ClientServerInputMultiplexerDemultiplexer));
|
|
10495
|
-
exports.ResumableClientServerInputMultiplexerDemultiplexer = ResumableClientServerInputMultiplexerDemultiplexer;
|
|
10500
|
+
exports$1.ResumableClientServerInputMultiplexerDemultiplexer = ResumableClientServerInputMultiplexerDemultiplexer;
|
|
10496
10501
|
var ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer = /** @class */ (function () {
|
|
10497
10502
|
function ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer(outbound, closeable, delegate) {
|
|
10498
10503
|
this.outbound = outbound;
|
|
@@ -10549,7 +10554,7 @@ function requireClientServerMultiplexerDemultiplexer () {
|
|
|
10549
10554
|
};
|
|
10550
10555
|
return ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer;
|
|
10551
10556
|
}());
|
|
10552
|
-
exports.ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer = ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer;
|
|
10557
|
+
exports$1.ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer = ResumeOkAwaitingResumableClientServerInputMultiplexerDemultiplexer;
|
|
10553
10558
|
|
|
10554
10559
|
} (ClientServerMultiplexerDemultiplexer));
|
|
10555
10560
|
return ClientServerMultiplexerDemultiplexer;
|
|
@@ -13535,7 +13540,7 @@ var hasRequiredDist;
|
|
|
13535
13540
|
function requireDist () {
|
|
13536
13541
|
if (hasRequiredDist) return dist;
|
|
13537
13542
|
hasRequiredDist = 1;
|
|
13538
|
-
(function (exports) {
|
|
13543
|
+
(function (exports$1) {
|
|
13539
13544
|
/*
|
|
13540
13545
|
* Copyright 2021-2022 the original author or authors.
|
|
13541
13546
|
*
|
|
@@ -13558,19 +13563,19 @@ function requireDist () {
|
|
|
13558
13563
|
if (k2 === undefined) k2 = k;
|
|
13559
13564
|
o[k2] = m[k];
|
|
13560
13565
|
}));
|
|
13561
|
-
var __exportStar = (dist && dist.__exportStar) || function(m, exports) {
|
|
13562
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
13566
|
+
var __exportStar = (dist && dist.__exportStar) || function(m, exports$1) {
|
|
13567
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
13563
13568
|
};
|
|
13564
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13565
|
-
__exportStar(requireCodecs(), exports);
|
|
13566
|
-
__exportStar(requireCommon(), exports);
|
|
13567
|
-
__exportStar(requireDeferred(), exports);
|
|
13568
|
-
__exportStar(requireErrors(), exports);
|
|
13569
|
-
__exportStar(requireFrames(), exports);
|
|
13570
|
-
__exportStar(requireRSocket(), exports);
|
|
13571
|
-
__exportStar(requireRSocketConnector(), exports);
|
|
13572
|
-
__exportStar(requireRSocketServer(), exports);
|
|
13573
|
-
__exportStar(requireTransport(), exports);
|
|
13569
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
13570
|
+
__exportStar(requireCodecs(), exports$1);
|
|
13571
|
+
__exportStar(requireCommon(), exports$1);
|
|
13572
|
+
__exportStar(requireDeferred(), exports$1);
|
|
13573
|
+
__exportStar(requireErrors(), exports$1);
|
|
13574
|
+
__exportStar(requireFrames(), exports$1);
|
|
13575
|
+
__exportStar(requireRSocket(), exports$1);
|
|
13576
|
+
__exportStar(requireRSocketConnector(), exports$1);
|
|
13577
|
+
__exportStar(requireRSocketServer(), exports$1);
|
|
13578
|
+
__exportStar(requireTransport(), exports$1);
|
|
13574
13579
|
|
|
13575
13580
|
} (dist));
|
|
13576
13581
|
return dist;
|
|
@@ -13578,7 +13583,7 @@ function requireDist () {
|
|
|
13578
13583
|
|
|
13579
13584
|
var distExports = requireDist();
|
|
13580
13585
|
|
|
13581
|
-
var version = "1.
|
|
13586
|
+
var version = "1.45.0";
|
|
13582
13587
|
var PACKAGE = {
|
|
13583
13588
|
version: version};
|
|
13584
13589
|
|
|
@@ -14505,6 +14510,7 @@ const DEFAULT_STREAMING_SYNC_OPTIONS = {
|
|
|
14505
14510
|
crudUploadThrottleMs: DEFAULT_CRUD_UPLOAD_THROTTLE_MS
|
|
14506
14511
|
};
|
|
14507
14512
|
const DEFAULT_STREAM_CONNECTION_OPTIONS = {
|
|
14513
|
+
appMetadata: {},
|
|
14508
14514
|
connectionMethod: SyncStreamConnectionMethod.WEB_SOCKET,
|
|
14509
14515
|
clientImplementation: DEFAULT_SYNC_CLIENT_IMPLEMENTATION,
|
|
14510
14516
|
fetchStrategy: FetchStrategy.Buffered,
|
|
@@ -14883,6 +14889,11 @@ The next upload iteration will be delayed.`);
|
|
|
14883
14889
|
...DEFAULT_STREAM_CONNECTION_OPTIONS,
|
|
14884
14890
|
...(options ?? {})
|
|
14885
14891
|
};
|
|
14892
|
+
// Validate app metadata
|
|
14893
|
+
const invalidMetadata = Object.entries(resolvedOptions.appMetadata).filter(([_, value]) => typeof value != 'string');
|
|
14894
|
+
if (invalidMetadata.length > 0) {
|
|
14895
|
+
throw new Error(`Invalid appMetadata provided. Only string values are allowed. Invalid values: ${invalidMetadata.map(([key, value]) => `${key}: ${value}`).join(', ')}`);
|
|
14896
|
+
}
|
|
14886
14897
|
const clientImplementation = resolvedOptions.clientImplementation;
|
|
14887
14898
|
this.updateSyncStatus({ clientImplementation });
|
|
14888
14899
|
if (clientImplementation == SyncClientImplementation.JAVASCRIPT) {
|
|
@@ -14918,6 +14929,7 @@ The next upload iteration will be delayed.`);
|
|
|
14918
14929
|
include_checksum: true,
|
|
14919
14930
|
raw_data: true,
|
|
14920
14931
|
parameters: resolvedOptions.params,
|
|
14932
|
+
app_metadata: resolvedOptions.appMetadata,
|
|
14921
14933
|
client_id: clientId
|
|
14922
14934
|
}
|
|
14923
14935
|
};
|
|
@@ -15277,6 +15289,7 @@ The next upload iteration will be delayed.`);
|
|
|
15277
15289
|
try {
|
|
15278
15290
|
const options = {
|
|
15279
15291
|
parameters: resolvedOptions.params,
|
|
15292
|
+
app_metadata: resolvedOptions.appMetadata,
|
|
15280
15293
|
active_streams: this.activeStreams,
|
|
15281
15294
|
include_defaults: resolvedOptions.includeDefaultStreams
|
|
15282
15295
|
};
|
|
@@ -15913,14 +15926,14 @@ class AbstractPowerSyncDatabase extends BaseObserver {
|
|
|
15913
15926
|
async initialize() {
|
|
15914
15927
|
await this._initialize();
|
|
15915
15928
|
await this.bucketStorageAdapter.init();
|
|
15916
|
-
await this.
|
|
15929
|
+
await this.loadVersion();
|
|
15917
15930
|
await this.updateSchema(this.options.schema);
|
|
15918
15931
|
await this.resolveOfflineSyncStatus();
|
|
15919
15932
|
await this.database.execute('PRAGMA RECURSIVE_TRIGGERS=TRUE');
|
|
15920
15933
|
this.ready = true;
|
|
15921
15934
|
this.iterateListeners((cb) => cb.initialized?.());
|
|
15922
15935
|
}
|
|
15923
|
-
async
|
|
15936
|
+
async loadVersion() {
|
|
15924
15937
|
try {
|
|
15925
15938
|
const { version } = await this.database.get('SELECT powersync_rs_version() as version');
|
|
15926
15939
|
this.sdkVersion = version;
|
|
@@ -17059,6 +17072,27 @@ class SyncDataBatch {
|
|
|
17059
17072
|
}
|
|
17060
17073
|
}
|
|
17061
17074
|
|
|
17075
|
+
/**
|
|
17076
|
+
* Thrown when an underlying database connection is closed.
|
|
17077
|
+
* This is particularly relevant when worker connections are marked as closed while
|
|
17078
|
+
* operations are still in progress.
|
|
17079
|
+
*/
|
|
17080
|
+
class ConnectionClosedError extends Error {
|
|
17081
|
+
static NAME = 'ConnectionClosedError';
|
|
17082
|
+
static MATCHES(input) {
|
|
17083
|
+
/**
|
|
17084
|
+
* If there are weird package issues which cause multiple versions of classes to be present, the instanceof
|
|
17085
|
+
* check might fail. This also performs a failsafe check.
|
|
17086
|
+
* This might also happen if the Error is serialized and parsed over a bridging channel like a MessagePort.
|
|
17087
|
+
*/
|
|
17088
|
+
return (input instanceof ConnectionClosedError || (input instanceof Error && input.name == ConnectionClosedError.NAME));
|
|
17089
|
+
}
|
|
17090
|
+
constructor(message) {
|
|
17091
|
+
super(message);
|
|
17092
|
+
this.name = ConnectionClosedError.NAME;
|
|
17093
|
+
}
|
|
17094
|
+
}
|
|
17095
|
+
|
|
17062
17096
|
// https://www.sqlite.org/lang_expr.html#castexpr
|
|
17063
17097
|
var ColumnType;
|
|
17064
17098
|
(function (ColumnType) {
|
|
@@ -17617,49 +17651,22 @@ const parseQuery = (query, parameters) => {
|
|
|
17617
17651
|
//# sourceMappingURL=bundle.mjs.map
|
|
17618
17652
|
|
|
17619
17653
|
|
|
17620
|
-
/***/ }
|
|
17621
|
-
|
|
17622
|
-
/***/ "./lib/src/db/adapters/AsyncDatabaseConnection.js":
|
|
17623
|
-
/*!********************************************************!*\
|
|
17624
|
-
!*** ./lib/src/db/adapters/AsyncDatabaseConnection.js ***!
|
|
17625
|
-
\********************************************************/
|
|
17626
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17627
|
-
|
|
17628
|
-
__webpack_require__.r(__webpack_exports__);
|
|
17629
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17630
|
-
/* harmony export */ ConnectionClosedError: () => (/* binding */ ConnectionClosedError)
|
|
17631
|
-
/* harmony export */ });
|
|
17632
|
-
/**
|
|
17633
|
-
* Thrown when an underlying database connection is closed.
|
|
17634
|
-
* This is particularly relevant when worker connections are marked as closed while
|
|
17635
|
-
* operations are still in progress.
|
|
17636
|
-
*/
|
|
17637
|
-
class ConnectionClosedError extends Error {
|
|
17638
|
-
constructor(message) {
|
|
17639
|
-
super(message);
|
|
17640
|
-
this.name = 'ConnectionClosedError';
|
|
17641
|
-
}
|
|
17642
|
-
}
|
|
17643
|
-
|
|
17644
|
-
|
|
17645
|
-
/***/ }),
|
|
17654
|
+
/***/ },
|
|
17646
17655
|
|
|
17647
|
-
/***/ "./lib/src/db/adapters/LockedAsyncDatabaseAdapter.js"
|
|
17656
|
+
/***/ "./lib/src/db/adapters/LockedAsyncDatabaseAdapter.js"
|
|
17648
17657
|
/*!***********************************************************!*\
|
|
17649
17658
|
!*** ./lib/src/db/adapters/LockedAsyncDatabaseAdapter.js ***!
|
|
17650
17659
|
\***********************************************************/
|
|
17651
|
-
|
|
17660
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
17652
17661
|
|
|
17653
17662
|
__webpack_require__.r(__webpack_exports__);
|
|
17654
17663
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17655
17664
|
/* harmony export */ LockedAsyncDatabaseAdapter: () => (/* binding */ LockedAsyncDatabaseAdapter)
|
|
17656
17665
|
/* harmony export */ });
|
|
17657
17666
|
/* harmony import */ var _powersync_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @powersync/common */ "../common/dist/bundle.mjs");
|
|
17658
|
-
/* harmony import */ var
|
|
17659
|
-
/* harmony import */ var
|
|
17660
|
-
/* harmony import */ var
|
|
17661
|
-
/* harmony import */ var _wa_sqlite_WASQLiteConnection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./wa-sqlite/WASQLiteConnection */ "./lib/src/db/adapters/wa-sqlite/WASQLiteConnection.js");
|
|
17662
|
-
|
|
17667
|
+
/* harmony import */ var _shared_navigator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/navigator.js */ "./lib/src/shared/navigator.js");
|
|
17668
|
+
/* harmony import */ var _WorkerWrappedAsyncDatabaseConnection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./WorkerWrappedAsyncDatabaseConnection.js */ "./lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js");
|
|
17669
|
+
/* harmony import */ var _wa_sqlite_WASQLiteConnection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./wa-sqlite/WASQLiteConnection.js */ "./lib/src/db/adapters/wa-sqlite/WASQLiteConnection.js");
|
|
17663
17670
|
|
|
17664
17671
|
|
|
17665
17672
|
|
|
@@ -17752,7 +17759,7 @@ class LockedAsyncDatabaseAdapter extends _powersync_common__WEBPACK_IMPORTED_MOD
|
|
|
17752
17759
|
/**
|
|
17753
17760
|
* This is only required for the long-lived shared IndexedDB connections.
|
|
17754
17761
|
*/
|
|
17755
|
-
this.requiresHolds = this._config.vfs ==
|
|
17762
|
+
this.requiresHolds = this._config.vfs == _wa_sqlite_WASQLiteConnection_js__WEBPACK_IMPORTED_MODULE_3__.WASQLiteVFS.IDBBatchAtomicVFS;
|
|
17756
17763
|
});
|
|
17757
17764
|
}
|
|
17758
17765
|
_reOpen() {
|
|
@@ -17806,7 +17813,7 @@ class LockedAsyncDatabaseAdapter extends _powersync_common__WEBPACK_IMPORTED_MOD
|
|
|
17806
17813
|
await this.initPromise;
|
|
17807
17814
|
}
|
|
17808
17815
|
async shareConnection() {
|
|
17809
|
-
if (false == this._db instanceof
|
|
17816
|
+
if (false == this._db instanceof _WorkerWrappedAsyncDatabaseConnection_js__WEBPACK_IMPORTED_MODULE_2__.WorkerWrappedAsyncDatabaseConnection) {
|
|
17810
17817
|
throw new Error(`Only worker connections can be shared`);
|
|
17811
17818
|
}
|
|
17812
17819
|
return this._db.shareConnection();
|
|
@@ -17840,7 +17847,14 @@ class LockedAsyncDatabaseAdapter extends _powersync_common__WEBPACK_IMPORTED_MOD
|
|
|
17840
17847
|
*/
|
|
17841
17848
|
async close() {
|
|
17842
17849
|
this.closing = true;
|
|
17843
|
-
|
|
17850
|
+
/**
|
|
17851
|
+
* Note that we obtain a reference to the callback to avoid calling the callback with `this` as the context.
|
|
17852
|
+
* This is to avoid Comlink attempting to clone `this` when calling the method.
|
|
17853
|
+
*/
|
|
17854
|
+
const dispose = this._disposeTableChangeListener;
|
|
17855
|
+
if (dispose) {
|
|
17856
|
+
dispose();
|
|
17857
|
+
}
|
|
17844
17858
|
this.pendingAbortControllers.forEach((controller) => controller.abort('Closed'));
|
|
17845
17859
|
await this.baseDB?.close?.();
|
|
17846
17860
|
this.closed = true;
|
|
@@ -17882,7 +17896,7 @@ class LockedAsyncDatabaseAdapter extends _powersync_common__WEBPACK_IMPORTED_MOD
|
|
|
17882
17896
|
this.pendingAbortControllers.delete(abortController);
|
|
17883
17897
|
}, timeoutMs)
|
|
17884
17898
|
: null;
|
|
17885
|
-
return (0,
|
|
17899
|
+
return (0,_shared_navigator_js__WEBPACK_IMPORTED_MODULE_1__.getNavigatorLocks)().request(`db-lock-${this._dbIdentifier}`, { signal: abortController.signal }, async () => {
|
|
17886
17900
|
this.pendingAbortControllers.delete(abortController);
|
|
17887
17901
|
if (timeoutId) {
|
|
17888
17902
|
clearTimeout(timeoutId);
|
|
@@ -17906,13 +17920,13 @@ class LockedAsyncDatabaseAdapter extends _powersync_common__WEBPACK_IMPORTED_MOD
|
|
|
17906
17920
|
* might have failed. We need to re-open the database.
|
|
17907
17921
|
*/
|
|
17908
17922
|
if (this.databaseOpenPromise || !this._db) {
|
|
17909
|
-
throw new
|
|
17923
|
+
throw new _powersync_common__WEBPACK_IMPORTED_MODULE_0__.ConnectionClosedError('Connection is busy re-opening');
|
|
17910
17924
|
}
|
|
17911
17925
|
holdId = this.requiresHolds ? await this.baseDB.markHold() : null;
|
|
17912
17926
|
return await callback();
|
|
17913
17927
|
}
|
|
17914
17928
|
catch (ex) {
|
|
17915
|
-
if (
|
|
17929
|
+
if (_powersync_common__WEBPACK_IMPORTED_MODULE_0__.ConnectionClosedError.MATCHES(ex)) {
|
|
17916
17930
|
if (this.options.reOpenOnConnectionClosed && !this.databaseOpenPromise && !this.closing) {
|
|
17917
17931
|
// Immediately re-open the database. We need to miss as little table updates as possible.
|
|
17918
17932
|
// Note, don't await this since it uses the same lock as we're in now.
|
|
@@ -18041,22 +18055,20 @@ class LockedAsyncDatabaseAdapter extends _powersync_common__WEBPACK_IMPORTED_MOD
|
|
|
18041
18055
|
}
|
|
18042
18056
|
|
|
18043
18057
|
|
|
18044
|
-
/***/ }
|
|
18058
|
+
/***/ },
|
|
18045
18059
|
|
|
18046
|
-
/***/ "./lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js"
|
|
18060
|
+
/***/ "./lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js"
|
|
18047
18061
|
/*!*********************************************************************!*\
|
|
18048
18062
|
!*** ./lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js ***!
|
|
18049
18063
|
\*********************************************************************/
|
|
18050
|
-
|
|
18064
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
18051
18065
|
|
|
18052
18066
|
__webpack_require__.r(__webpack_exports__);
|
|
18053
18067
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18054
18068
|
/* harmony export */ WorkerWrappedAsyncDatabaseConnection: () => (/* binding */ WorkerWrappedAsyncDatabaseConnection)
|
|
18055
18069
|
/* harmony export */ });
|
|
18056
18070
|
/* harmony import */ var _powersync_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @powersync/common */ "../common/dist/bundle.mjs");
|
|
18057
|
-
/* harmony import */ var
|
|
18058
|
-
/* harmony import */ var _AsyncDatabaseConnection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncDatabaseConnection */ "./lib/src/db/adapters/AsyncDatabaseConnection.js");
|
|
18059
|
-
|
|
18071
|
+
/* harmony import */ var comlink__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! comlink */ "../../node_modules/comlink/dist/esm/comlink.mjs");
|
|
18060
18072
|
|
|
18061
18073
|
|
|
18062
18074
|
/**
|
|
@@ -18106,7 +18118,7 @@ class WorkerWrappedAsyncDatabaseConnection extends _powersync_common__WEBPACK_IM
|
|
|
18106
18118
|
if (controller) {
|
|
18107
18119
|
return new Promise((resolve, reject) => {
|
|
18108
18120
|
if (controller.signal.aborted) {
|
|
18109
|
-
reject(new
|
|
18121
|
+
reject(new _powersync_common__WEBPACK_IMPORTED_MODULE_0__.ConnectionClosedError('Called operation on closed remote'));
|
|
18110
18122
|
if (!fireActionOnAbort) {
|
|
18111
18123
|
// Don't run the operation if we're going to reject
|
|
18112
18124
|
// We might want to fire-and-forget the operation in some cases (like a close operation)
|
|
@@ -18114,7 +18126,7 @@ class WorkerWrappedAsyncDatabaseConnection extends _powersync_common__WEBPACK_IM
|
|
|
18114
18126
|
}
|
|
18115
18127
|
}
|
|
18116
18128
|
function handleAbort() {
|
|
18117
|
-
reject(new
|
|
18129
|
+
reject(new _powersync_common__WEBPACK_IMPORTED_MODULE_0__.ConnectionClosedError('Remote peer closed with request in flight'));
|
|
18118
18130
|
}
|
|
18119
18131
|
function completePromise(action) {
|
|
18120
18132
|
controller.signal.removeEventListener('abort', handleAbort);
|
|
@@ -18168,7 +18180,7 @@ class WorkerWrappedAsyncDatabaseConnection extends _powersync_common__WEBPACK_IM
|
|
|
18168
18180
|
reject(ex);
|
|
18169
18181
|
}
|
|
18170
18182
|
}));
|
|
18171
|
-
const newPort = await remote[
|
|
18183
|
+
const newPort = await remote[comlink__WEBPACK_IMPORTED_MODULE_1__.createEndpoint]();
|
|
18172
18184
|
return { port: newPort, identifier };
|
|
18173
18185
|
}
|
|
18174
18186
|
/**
|
|
@@ -18176,7 +18188,7 @@ class WorkerWrappedAsyncDatabaseConnection extends _powersync_common__WEBPACK_IM
|
|
|
18176
18188
|
* This can be extended by custom implementations in order to handle proxy events.
|
|
18177
18189
|
*/
|
|
18178
18190
|
async registerOnTableChange(callback) {
|
|
18179
|
-
return this.baseConnection.registerOnTableChange(
|
|
18191
|
+
return this.baseConnection.registerOnTableChange(comlink__WEBPACK_IMPORTED_MODULE_1__.proxy(callback));
|
|
18180
18192
|
}
|
|
18181
18193
|
async close() {
|
|
18182
18194
|
// Abort any pending lock requests.
|
|
@@ -18186,7 +18198,7 @@ class WorkerWrappedAsyncDatabaseConnection extends _powersync_common__WEBPACK_IM
|
|
|
18186
18198
|
await this.withRemote(() => this.baseConnection.close(), true);
|
|
18187
18199
|
}
|
|
18188
18200
|
finally {
|
|
18189
|
-
this.options.remote[
|
|
18201
|
+
this.options.remote[comlink__WEBPACK_IMPORTED_MODULE_1__.releaseProxy]();
|
|
18190
18202
|
this.options.onClose?.();
|
|
18191
18203
|
this.iterateListeners((l) => l.closing?.());
|
|
18192
18204
|
}
|
|
@@ -18206,13 +18218,13 @@ class WorkerWrappedAsyncDatabaseConnection extends _powersync_common__WEBPACK_IM
|
|
|
18206
18218
|
}
|
|
18207
18219
|
|
|
18208
18220
|
|
|
18209
|
-
/***/ }
|
|
18221
|
+
/***/ },
|
|
18210
18222
|
|
|
18211
|
-
/***/ "./lib/src/db/adapters/wa-sqlite/WASQLiteConnection.js"
|
|
18223
|
+
/***/ "./lib/src/db/adapters/wa-sqlite/WASQLiteConnection.js"
|
|
18212
18224
|
/*!*************************************************************!*\
|
|
18213
18225
|
!*** ./lib/src/db/adapters/wa-sqlite/WASQLiteConnection.js ***!
|
|
18214
18226
|
\*************************************************************/
|
|
18215
|
-
|
|
18227
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
18216
18228
|
|
|
18217
18229
|
__webpack_require__.r(__webpack_exports__);
|
|
18218
18230
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -18630,20 +18642,20 @@ class WASqliteConnection extends _powersync_common__WEBPACK_IMPORTED_MODULE_1__.
|
|
|
18630
18642
|
}
|
|
18631
18643
|
|
|
18632
18644
|
|
|
18633
|
-
/***/ }
|
|
18645
|
+
/***/ },
|
|
18634
18646
|
|
|
18635
|
-
/***/ "./lib/src/db/sync/WebRemote.js"
|
|
18647
|
+
/***/ "./lib/src/db/sync/WebRemote.js"
|
|
18636
18648
|
/*!**************************************!*\
|
|
18637
18649
|
!*** ./lib/src/db/sync/WebRemote.js ***!
|
|
18638
18650
|
\**************************************/
|
|
18639
|
-
|
|
18651
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
18640
18652
|
|
|
18641
18653
|
__webpack_require__.r(__webpack_exports__);
|
|
18642
18654
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18643
18655
|
/* harmony export */ WebRemote: () => (/* binding */ WebRemote)
|
|
18644
18656
|
/* harmony export */ });
|
|
18645
18657
|
/* harmony import */ var _powersync_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @powersync/common */ "../common/dist/bundle.mjs");
|
|
18646
|
-
/* harmony import */ var
|
|
18658
|
+
/* harmony import */ var _userAgent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./userAgent.js */ "./lib/src/db/sync/userAgent.js");
|
|
18647
18659
|
|
|
18648
18660
|
|
|
18649
18661
|
/*
|
|
@@ -18669,7 +18681,7 @@ class WebRemote extends _powersync_common__WEBPACK_IMPORTED_MODULE_0__.AbstractR
|
|
|
18669
18681
|
getUserAgent() {
|
|
18670
18682
|
let ua = [super.getUserAgent(), `powersync-web`];
|
|
18671
18683
|
try {
|
|
18672
|
-
ua.push(...(0,
|
|
18684
|
+
ua.push(...(0,_userAgent_js__WEBPACK_IMPORTED_MODULE_1__.getUserAgentInfo)());
|
|
18673
18685
|
}
|
|
18674
18686
|
catch (e) {
|
|
18675
18687
|
this.logger.warn('Failed to get user agent info', e);
|
|
@@ -18690,20 +18702,20 @@ class WebRemote extends _powersync_common__WEBPACK_IMPORTED_MODULE_0__.AbstractR
|
|
|
18690
18702
|
}
|
|
18691
18703
|
|
|
18692
18704
|
|
|
18693
|
-
/***/ }
|
|
18705
|
+
/***/ },
|
|
18694
18706
|
|
|
18695
|
-
/***/ "./lib/src/db/sync/WebStreamingSyncImplementation.js"
|
|
18707
|
+
/***/ "./lib/src/db/sync/WebStreamingSyncImplementation.js"
|
|
18696
18708
|
/*!***********************************************************!*\
|
|
18697
18709
|
!*** ./lib/src/db/sync/WebStreamingSyncImplementation.js ***!
|
|
18698
18710
|
\***********************************************************/
|
|
18699
|
-
|
|
18711
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
18700
18712
|
|
|
18701
18713
|
__webpack_require__.r(__webpack_exports__);
|
|
18702
18714
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18703
18715
|
/* harmony export */ WebStreamingSyncImplementation: () => (/* binding */ WebStreamingSyncImplementation)
|
|
18704
18716
|
/* harmony export */ });
|
|
18705
18717
|
/* harmony import */ var _powersync_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @powersync/common */ "../common/dist/bundle.mjs");
|
|
18706
|
-
/* harmony import */ var
|
|
18718
|
+
/* harmony import */ var _shared_navigator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/navigator.js */ "./lib/src/shared/navigator.js");
|
|
18707
18719
|
|
|
18708
18720
|
|
|
18709
18721
|
class WebStreamingSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODULE_0__.AbstractStreamingSyncImplementation {
|
|
@@ -18719,18 +18731,18 @@ class WebStreamingSyncImplementation extends _powersync_common__WEBPACK_IMPORTED
|
|
|
18719
18731
|
if (lockOptions.type == _powersync_common__WEBPACK_IMPORTED_MODULE_0__.LockType.SYNC) {
|
|
18720
18732
|
this.logger.debug('requesting lock for ', identifier);
|
|
18721
18733
|
}
|
|
18722
|
-
return (0,
|
|
18734
|
+
return (0,_shared_navigator_js__WEBPACK_IMPORTED_MODULE_1__.getNavigatorLocks)().request(identifier, { signal: lockOptions.signal }, lockOptions.callback);
|
|
18723
18735
|
}
|
|
18724
18736
|
}
|
|
18725
18737
|
|
|
18726
18738
|
|
|
18727
|
-
/***/ }
|
|
18739
|
+
/***/ },
|
|
18728
18740
|
|
|
18729
|
-
/***/ "./lib/src/db/sync/userAgent.js"
|
|
18741
|
+
/***/ "./lib/src/db/sync/userAgent.js"
|
|
18730
18742
|
/*!**************************************!*\
|
|
18731
18743
|
!*** ./lib/src/db/sync/userAgent.js ***!
|
|
18732
18744
|
\**************************************/
|
|
18733
|
-
|
|
18745
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
18734
18746
|
|
|
18735
18747
|
__webpack_require__.r(__webpack_exports__);
|
|
18736
18748
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -18802,13 +18814,13 @@ function getOsInfo(nav) {
|
|
|
18802
18814
|
}
|
|
18803
18815
|
|
|
18804
18816
|
|
|
18805
|
-
/***/ }
|
|
18817
|
+
/***/ },
|
|
18806
18818
|
|
|
18807
|
-
/***/ "./lib/src/shared/navigator.js"
|
|
18819
|
+
/***/ "./lib/src/shared/navigator.js"
|
|
18808
18820
|
/*!*************************************!*\
|
|
18809
18821
|
!*** ./lib/src/shared/navigator.js ***!
|
|
18810
18822
|
\*************************************/
|
|
18811
|
-
|
|
18823
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
18812
18824
|
|
|
18813
18825
|
__webpack_require__.r(__webpack_exports__);
|
|
18814
18826
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -18822,13 +18834,13 @@ const getNavigatorLocks = () => {
|
|
|
18822
18834
|
};
|
|
18823
18835
|
|
|
18824
18836
|
|
|
18825
|
-
/***/ }
|
|
18837
|
+
/***/ },
|
|
18826
18838
|
|
|
18827
|
-
/***/ "./lib/src/worker/sync/BroadcastLogger.js"
|
|
18839
|
+
/***/ "./lib/src/worker/sync/BroadcastLogger.js"
|
|
18828
18840
|
/*!************************************************!*\
|
|
18829
18841
|
!*** ./lib/src/worker/sync/BroadcastLogger.js ***!
|
|
18830
18842
|
\************************************************/
|
|
18831
|
-
|
|
18843
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
18832
18844
|
|
|
18833
18845
|
__webpack_require__.r(__webpack_exports__);
|
|
18834
18846
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -18965,13 +18977,13 @@ class BroadcastLogger {
|
|
|
18965
18977
|
}
|
|
18966
18978
|
|
|
18967
18979
|
|
|
18968
|
-
/***/ }
|
|
18980
|
+
/***/ },
|
|
18969
18981
|
|
|
18970
|
-
/***/ "./lib/src/worker/sync/SharedSyncImplementation.js"
|
|
18982
|
+
/***/ "./lib/src/worker/sync/SharedSyncImplementation.js"
|
|
18971
18983
|
/*!*********************************************************!*\
|
|
18972
18984
|
!*** ./lib/src/worker/sync/SharedSyncImplementation.js ***!
|
|
18973
18985
|
\*********************************************************/
|
|
18974
|
-
|
|
18986
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
18975
18987
|
|
|
18976
18988
|
__webpack_require__.r(__webpack_exports__);
|
|
18977
18989
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -18980,12 +18992,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18980
18992
|
/* harmony export */ });
|
|
18981
18993
|
/* harmony import */ var _powersync_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @powersync/common */ "../common/dist/bundle.mjs");
|
|
18982
18994
|
/* harmony import */ var async_mutex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! async-mutex */ "../../node_modules/async-mutex/index.mjs");
|
|
18983
|
-
/* harmony import */ var
|
|
18984
|
-
/* harmony import */ var
|
|
18985
|
-
/* harmony import */ var
|
|
18986
|
-
/* harmony import */ var
|
|
18987
|
-
/* harmony import */ var
|
|
18988
|
-
/* harmony import */ var
|
|
18995
|
+
/* harmony import */ var comlink__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! comlink */ "../../node_modules/comlink/dist/esm/comlink.mjs");
|
|
18996
|
+
/* harmony import */ var _db_sync_WebRemote_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../db/sync/WebRemote.js */ "./lib/src/db/sync/WebRemote.js");
|
|
18997
|
+
/* harmony import */ var _db_sync_WebStreamingSyncImplementation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../db/sync/WebStreamingSyncImplementation.js */ "./lib/src/db/sync/WebStreamingSyncImplementation.js");
|
|
18998
|
+
/* harmony import */ var _db_adapters_LockedAsyncDatabaseAdapter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../db/adapters/LockedAsyncDatabaseAdapter.js */ "./lib/src/db/adapters/LockedAsyncDatabaseAdapter.js");
|
|
18999
|
+
/* harmony import */ var _db_adapters_WorkerWrappedAsyncDatabaseConnection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../db/adapters/WorkerWrappedAsyncDatabaseConnection.js */ "./lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js");
|
|
19000
|
+
/* harmony import */ var _BroadcastLogger_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BroadcastLogger.js */ "./lib/src/worker/sync/BroadcastLogger.js");
|
|
18989
19001
|
|
|
18990
19002
|
|
|
18991
19003
|
|
|
@@ -19050,7 +19062,7 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
19050
19062
|
// Should be configured once we get params
|
|
19051
19063
|
this.distributedDB = null;
|
|
19052
19064
|
this.syncStatus = new _powersync_common__WEBPACK_IMPORTED_MODULE_0__.SyncStatus({});
|
|
19053
|
-
this.broadCastLogger = new
|
|
19065
|
+
this.broadCastLogger = new _BroadcastLogger_js__WEBPACK_IMPORTED_MODULE_7__.BroadcastLogger(this.ports);
|
|
19054
19066
|
this.connectionManager = new _powersync_common__WEBPACK_IMPORTED_MODULE_0__.ConnectionManager({
|
|
19055
19067
|
createSyncImplementation: async () => {
|
|
19056
19068
|
await this.waitForReady();
|
|
@@ -19148,7 +19160,7 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
19148
19160
|
if (params.streamOptions?.flags?.broadcastLogs) {
|
|
19149
19161
|
this.logger = this.broadCastLogger;
|
|
19150
19162
|
}
|
|
19151
|
-
const lockedAdapter = new
|
|
19163
|
+
const lockedAdapter = new _db_adapters_LockedAsyncDatabaseAdapter_js__WEBPACK_IMPORTED_MODULE_5__.LockedAsyncDatabaseAdapter({
|
|
19152
19164
|
name: params.dbParams.dbFilename,
|
|
19153
19165
|
openConnection: async () => {
|
|
19154
19166
|
// Gets a connection from the clients when a new connection is requested.
|
|
@@ -19170,6 +19182,14 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
19170
19182
|
// We may have missed some table updates while the database was closed.
|
|
19171
19183
|
// We can poke the crud in case we missed any updates.
|
|
19172
19184
|
this.connectionManager.syncStreamImplementation?.triggerCrudUpload();
|
|
19185
|
+
/**
|
|
19186
|
+
* FIXME or IMPROVE ME
|
|
19187
|
+
* The Rust client implementation stores sync state on the connection level.
|
|
19188
|
+
* Reopening the database causes a state machine error which should cause the
|
|
19189
|
+
* StreamingSyncImplementation to reconnect. It would be nicer if we could trigger
|
|
19190
|
+
* this reconnect earlier.
|
|
19191
|
+
* This reconnect is not required for IndexedDB.
|
|
19192
|
+
*/
|
|
19173
19193
|
}
|
|
19174
19194
|
});
|
|
19175
19195
|
self.onerror = (event) => {
|
|
@@ -19203,7 +19223,7 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
19203
19223
|
return await this.portMutex.runExclusive(() => {
|
|
19204
19224
|
const portProvider = {
|
|
19205
19225
|
port,
|
|
19206
|
-
clientProvider:
|
|
19226
|
+
clientProvider: comlink__WEBPACK_IMPORTED_MODULE_2__.wrap(port),
|
|
19207
19227
|
currentSubscriptions: [],
|
|
19208
19228
|
closeListeners: [],
|
|
19209
19229
|
isClosing: false
|
|
@@ -19250,7 +19270,7 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
19250
19270
|
await closeListener();
|
|
19251
19271
|
}
|
|
19252
19272
|
this.collectActiveSubscriptions();
|
|
19253
|
-
return () => trackedPort.clientProvider[
|
|
19273
|
+
return () => trackedPort.clientProvider[comlink__WEBPACK_IMPORTED_MODULE_2__.releaseProxy]();
|
|
19254
19274
|
});
|
|
19255
19275
|
}
|
|
19256
19276
|
triggerCrudUpload() {
|
|
@@ -19287,9 +19307,9 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
19287
19307
|
// This should only be called after initialization has completed
|
|
19288
19308
|
const syncParams = this.syncParams;
|
|
19289
19309
|
// Create a new StreamingSyncImplementation for each connect call. This is usually done is all SDKs.
|
|
19290
|
-
return new
|
|
19310
|
+
return new _db_sync_WebStreamingSyncImplementation_js__WEBPACK_IMPORTED_MODULE_4__.WebStreamingSyncImplementation({
|
|
19291
19311
|
adapter: new _powersync_common__WEBPACK_IMPORTED_MODULE_0__.SqliteBucketStorage(this.distributedDB, this.logger),
|
|
19292
|
-
remote: new
|
|
19312
|
+
remote: new _db_sync_WebRemote_js__WEBPACK_IMPORTED_MODULE_3__.WebRemote({
|
|
19293
19313
|
invalidateCredentials: async () => {
|
|
19294
19314
|
const lastPort = await this.getLastWrappedPort();
|
|
19295
19315
|
if (!lastPort) {
|
|
@@ -19395,7 +19415,7 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
19395
19415
|
removeCloseListener();
|
|
19396
19416
|
throw ex;
|
|
19397
19417
|
});
|
|
19398
|
-
const remote =
|
|
19418
|
+
const remote = comlink__WEBPACK_IMPORTED_MODULE_2__.wrap(workerPort);
|
|
19399
19419
|
const identifier = this.syncParams.dbParams.dbFilename;
|
|
19400
19420
|
/**
|
|
19401
19421
|
* The open could fail if the tab is closed while we're busy opening the database.
|
|
@@ -19414,7 +19434,7 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
19414
19434
|
removeCloseListener();
|
|
19415
19435
|
});
|
|
19416
19436
|
clearTimeout(timeout);
|
|
19417
|
-
const wrapped = new
|
|
19437
|
+
const wrapped = new _db_adapters_WorkerWrappedAsyncDatabaseConnection_js__WEBPACK_IMPORTED_MODULE_6__.WorkerWrappedAsyncDatabaseConnection({
|
|
19418
19438
|
remote,
|
|
19419
19439
|
baseConnection: db,
|
|
19420
19440
|
identifier,
|
|
@@ -19475,21 +19495,21 @@ function withAbort(options) {
|
|
|
19475
19495
|
}
|
|
19476
19496
|
|
|
19477
19497
|
|
|
19478
|
-
/***/ }
|
|
19498
|
+
/***/ },
|
|
19479
19499
|
|
|
19480
|
-
/***/ "./lib/src/worker/sync/WorkerClient.js"
|
|
19500
|
+
/***/ "./lib/src/worker/sync/WorkerClient.js"
|
|
19481
19501
|
/*!*********************************************!*\
|
|
19482
19502
|
!*** ./lib/src/worker/sync/WorkerClient.js ***!
|
|
19483
19503
|
\*********************************************/
|
|
19484
|
-
|
|
19504
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
19485
19505
|
|
|
19486
19506
|
__webpack_require__.r(__webpack_exports__);
|
|
19487
19507
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19488
19508
|
/* harmony export */ WorkerClient: () => (/* binding */ WorkerClient)
|
|
19489
19509
|
/* harmony export */ });
|
|
19490
|
-
/* harmony import */ var
|
|
19491
|
-
/* harmony import */ var
|
|
19492
|
-
/* harmony import */ var
|
|
19510
|
+
/* harmony import */ var comlink__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! comlink */ "../../node_modules/comlink/dist/esm/comlink.mjs");
|
|
19511
|
+
/* harmony import */ var _shared_navigator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/navigator.js */ "./lib/src/shared/navigator.js");
|
|
19512
|
+
/* harmony import */ var _SharedSyncImplementation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SharedSyncImplementation.js */ "./lib/src/worker/sync/SharedSyncImplementation.js");
|
|
19493
19513
|
|
|
19494
19514
|
|
|
19495
19515
|
|
|
@@ -19507,14 +19527,14 @@ class WorkerClient {
|
|
|
19507
19527
|
constructor(sync, port) {
|
|
19508
19528
|
this.sync = sync;
|
|
19509
19529
|
this.port = port;
|
|
19510
|
-
|
|
19530
|
+
comlink__WEBPACK_IMPORTED_MODULE_0__.expose(this, this.port);
|
|
19511
19531
|
/**
|
|
19512
19532
|
* Adds an extra listener which can remove this port
|
|
19513
19533
|
* from the list of monitored ports.
|
|
19514
19534
|
*/
|
|
19515
19535
|
this.port.addEventListener('message', async (event) => {
|
|
19516
19536
|
const payload = event.data;
|
|
19517
|
-
if (payload?.event ==
|
|
19537
|
+
if (payload?.event == _SharedSyncImplementation_js__WEBPACK_IMPORTED_MODULE_2__.SharedSyncClientEvent.CLOSE_CLIENT) {
|
|
19518
19538
|
await this.removePort();
|
|
19519
19539
|
}
|
|
19520
19540
|
});
|
|
@@ -19526,7 +19546,7 @@ class WorkerClient {
|
|
|
19526
19546
|
const release = await this.sync.removePort(resolved);
|
|
19527
19547
|
this.resolvedPort = null;
|
|
19528
19548
|
this.port.postMessage({
|
|
19529
|
-
event:
|
|
19549
|
+
event: _SharedSyncImplementation_js__WEBPACK_IMPORTED_MODULE_2__.SharedSyncClientEvent.CLOSE_ACK,
|
|
19530
19550
|
data: {}
|
|
19531
19551
|
});
|
|
19532
19552
|
release?.();
|
|
@@ -19542,7 +19562,7 @@ class WorkerClient {
|
|
|
19542
19562
|
// Only add the port once the lock has been obtained on the client.
|
|
19543
19563
|
this.resolvedPort = await this.sync.addPort(this.port);
|
|
19544
19564
|
// Don't await this lock request
|
|
19545
|
-
(0,
|
|
19565
|
+
(0,_shared_navigator_js__WEBPACK_IMPORTED_MODULE_1__.getNavigatorLocks)().request(name, async () => {
|
|
19546
19566
|
await this.removePort();
|
|
19547
19567
|
});
|
|
19548
19568
|
}
|
|
@@ -19576,7 +19596,7 @@ class WorkerClient {
|
|
|
19576
19596
|
}
|
|
19577
19597
|
|
|
19578
19598
|
|
|
19579
|
-
/***/ }
|
|
19599
|
+
/***/ }
|
|
19580
19600
|
|
|
19581
19601
|
/******/ });
|
|
19582
19602
|
/************************************************************************/
|
|
@@ -19590,6 +19610,12 @@ class WorkerClient {
|
|
|
19590
19610
|
/******/ if (cachedModule !== undefined) {
|
|
19591
19611
|
/******/ return cachedModule.exports;
|
|
19592
19612
|
/******/ }
|
|
19613
|
+
/******/ // Check if module exists (development only)
|
|
19614
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
19615
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
19616
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
19617
|
+
/******/ throw e;
|
|
19618
|
+
/******/ }
|
|
19593
19619
|
/******/ // Create a new module (and put it into the cache)
|
|
19594
19620
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
19595
19621
|
/******/ // no module.id needed
|
|
@@ -19743,18 +19769,18 @@ var __webpack_exports__ = {};
|
|
|
19743
19769
|
\****************************************************************/
|
|
19744
19770
|
__webpack_require__.r(__webpack_exports__);
|
|
19745
19771
|
/* harmony import */ var _powersync_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @powersync/common */ "../common/dist/bundle.mjs");
|
|
19746
|
-
/* harmony import */ var
|
|
19747
|
-
/* harmony import */ var
|
|
19772
|
+
/* harmony import */ var _SharedSyncImplementation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SharedSyncImplementation.js */ "./lib/src/worker/sync/SharedSyncImplementation.js");
|
|
19773
|
+
/* harmony import */ var _WorkerClient_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./WorkerClient.js */ "./lib/src/worker/sync/WorkerClient.js");
|
|
19748
19774
|
|
|
19749
19775
|
|
|
19750
19776
|
|
|
19751
19777
|
const _self = self;
|
|
19752
19778
|
const logger = (0,_powersync_common__WEBPACK_IMPORTED_MODULE_0__.createBaseLogger)();
|
|
19753
19779
|
logger.useDefaults();
|
|
19754
|
-
const sharedSyncImplementation = new
|
|
19780
|
+
const sharedSyncImplementation = new _SharedSyncImplementation_js__WEBPACK_IMPORTED_MODULE_1__.SharedSyncImplementation();
|
|
19755
19781
|
_self.onconnect = async function (event) {
|
|
19756
19782
|
const port = event.ports[0];
|
|
19757
|
-
new
|
|
19783
|
+
new _WorkerClient_js__WEBPACK_IMPORTED_MODULE_2__.WorkerClient(sharedSyncImplementation, port);
|
|
19758
19784
|
};
|
|
19759
19785
|
|
|
19760
19786
|
})();
|