@xwiki/cristal-realtime 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +159 -73
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -18303,9 +18303,9 @@ var require_text = __commonJS({
|
|
|
18303
18303
|
}
|
|
18304
18304
|
});
|
|
18305
18305
|
|
|
18306
|
-
// ../node_modules/.pnpm/es-object-atoms@1.
|
|
18306
|
+
// ../node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js
|
|
18307
18307
|
var require_es_object_atoms = __commonJS({
|
|
18308
|
-
"../node_modules/.pnpm/es-object-atoms@1.
|
|
18308
|
+
"../node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(exports3, module3) {
|
|
18309
18309
|
"use strict";
|
|
18310
18310
|
module3.exports = Object;
|
|
18311
18311
|
}
|
|
@@ -18367,46 +18367,78 @@ var require_uri = __commonJS({
|
|
|
18367
18367
|
}
|
|
18368
18368
|
});
|
|
18369
18369
|
|
|
18370
|
-
// ../node_modules/.pnpm/math-intrinsics@1.
|
|
18370
|
+
// ../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js
|
|
18371
18371
|
var require_abs = __commonJS({
|
|
18372
|
-
"../node_modules/.pnpm/math-intrinsics@1.
|
|
18372
|
+
"../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(exports3, module3) {
|
|
18373
18373
|
"use strict";
|
|
18374
18374
|
module3.exports = Math.abs;
|
|
18375
18375
|
}
|
|
18376
18376
|
});
|
|
18377
18377
|
|
|
18378
|
-
// ../node_modules/.pnpm/math-intrinsics@1.
|
|
18378
|
+
// ../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js
|
|
18379
18379
|
var require_floor = __commonJS({
|
|
18380
|
-
"../node_modules/.pnpm/math-intrinsics@1.
|
|
18380
|
+
"../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(exports3, module3) {
|
|
18381
18381
|
"use strict";
|
|
18382
18382
|
module3.exports = Math.floor;
|
|
18383
18383
|
}
|
|
18384
18384
|
});
|
|
18385
18385
|
|
|
18386
|
-
// ../node_modules/.pnpm/math-intrinsics@1.
|
|
18386
|
+
// ../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js
|
|
18387
18387
|
var require_max = __commonJS({
|
|
18388
|
-
"../node_modules/.pnpm/math-intrinsics@1.
|
|
18388
|
+
"../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(exports3, module3) {
|
|
18389
18389
|
"use strict";
|
|
18390
18390
|
module3.exports = Math.max;
|
|
18391
18391
|
}
|
|
18392
18392
|
});
|
|
18393
18393
|
|
|
18394
|
-
// ../node_modules/.pnpm/math-intrinsics@1.
|
|
18394
|
+
// ../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js
|
|
18395
18395
|
var require_min = __commonJS({
|
|
18396
|
-
"../node_modules/.pnpm/math-intrinsics@1.
|
|
18396
|
+
"../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(exports3, module3) {
|
|
18397
18397
|
"use strict";
|
|
18398
18398
|
module3.exports = Math.min;
|
|
18399
18399
|
}
|
|
18400
18400
|
});
|
|
18401
18401
|
|
|
18402
|
-
// ../node_modules/.pnpm/math-intrinsics@1.
|
|
18402
|
+
// ../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js
|
|
18403
18403
|
var require_pow = __commonJS({
|
|
18404
|
-
"../node_modules/.pnpm/math-intrinsics@1.
|
|
18404
|
+
"../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(exports3, module3) {
|
|
18405
18405
|
"use strict";
|
|
18406
18406
|
module3.exports = Math.pow;
|
|
18407
18407
|
}
|
|
18408
18408
|
});
|
|
18409
18409
|
|
|
18410
|
+
// ../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js
|
|
18411
|
+
var require_round = __commonJS({
|
|
18412
|
+
"../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(exports3, module3) {
|
|
18413
|
+
"use strict";
|
|
18414
|
+
module3.exports = Math.round;
|
|
18415
|
+
}
|
|
18416
|
+
});
|
|
18417
|
+
|
|
18418
|
+
// ../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js
|
|
18419
|
+
var require_isNaN = __commonJS({
|
|
18420
|
+
"../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(exports3, module3) {
|
|
18421
|
+
"use strict";
|
|
18422
|
+
module3.exports = Number.isNaN || function isNaN4(a) {
|
|
18423
|
+
return a !== a;
|
|
18424
|
+
};
|
|
18425
|
+
}
|
|
18426
|
+
});
|
|
18427
|
+
|
|
18428
|
+
// ../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js
|
|
18429
|
+
var require_sign = __commonJS({
|
|
18430
|
+
"../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(exports3, module3) {
|
|
18431
|
+
"use strict";
|
|
18432
|
+
var $isNaN = require_isNaN();
|
|
18433
|
+
module3.exports = function sign(number) {
|
|
18434
|
+
if ($isNaN(number) || number === 0) {
|
|
18435
|
+
return number;
|
|
18436
|
+
}
|
|
18437
|
+
return number < 0 ? -1 : 1;
|
|
18438
|
+
};
|
|
18439
|
+
}
|
|
18440
|
+
});
|
|
18441
|
+
|
|
18410
18442
|
// ../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js
|
|
18411
18443
|
var require_gOPD = __commonJS({
|
|
18412
18444
|
"../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(exports3, module3) {
|
|
@@ -18526,6 +18558,23 @@ var require_has_symbols = __commonJS({
|
|
|
18526
18558
|
}
|
|
18527
18559
|
});
|
|
18528
18560
|
|
|
18561
|
+
// ../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js
|
|
18562
|
+
var require_Reflect_getPrototypeOf = __commonJS({
|
|
18563
|
+
"../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports3, module3) {
|
|
18564
|
+
"use strict";
|
|
18565
|
+
module3.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
18566
|
+
}
|
|
18567
|
+
});
|
|
18568
|
+
|
|
18569
|
+
// ../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js
|
|
18570
|
+
var require_Object_getPrototypeOf = __commonJS({
|
|
18571
|
+
"../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(exports3, module3) {
|
|
18572
|
+
"use strict";
|
|
18573
|
+
var $Object = require_es_object_atoms();
|
|
18574
|
+
module3.exports = $Object.getPrototypeOf || null;
|
|
18575
|
+
}
|
|
18576
|
+
});
|
|
18577
|
+
|
|
18529
18578
|
// ../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js
|
|
18530
18579
|
var require_implementation = __commonJS({
|
|
18531
18580
|
"../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports3, module3) {
|
|
@@ -18664,17 +18713,22 @@ var require_call_bind_apply_helpers = __commonJS({
|
|
|
18664
18713
|
}
|
|
18665
18714
|
});
|
|
18666
18715
|
|
|
18667
|
-
// ../node_modules/.pnpm/dunder-proto@1.0.
|
|
18716
|
+
// ../node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js
|
|
18668
18717
|
var require_get = __commonJS({
|
|
18669
|
-
"../node_modules/.pnpm/dunder-proto@1.0.
|
|
18718
|
+
"../node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(exports3, module3) {
|
|
18670
18719
|
"use strict";
|
|
18671
18720
|
var callBind = require_call_bind_apply_helpers();
|
|
18672
18721
|
var gOPD = require_gopd();
|
|
18673
|
-
var hasProtoAccessor
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18722
|
+
var hasProtoAccessor;
|
|
18723
|
+
try {
|
|
18724
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
18725
|
+
[].__proto__ === Array.prototype;
|
|
18726
|
+
} catch (e) {
|
|
18727
|
+
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
|
|
18728
|
+
throw e;
|
|
18729
|
+
}
|
|
18730
|
+
}
|
|
18731
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(
|
|
18678
18732
|
Object.prototype,
|
|
18679
18733
|
/** @type {keyof typeof Object.prototype} */
|
|
18680
18734
|
"__proto__"
|
|
@@ -18690,6 +18744,26 @@ var require_get = __commonJS({
|
|
|
18690
18744
|
}
|
|
18691
18745
|
});
|
|
18692
18746
|
|
|
18747
|
+
// ../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js
|
|
18748
|
+
var require_get_proto = __commonJS({
|
|
18749
|
+
"../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(exports3, module3) {
|
|
18750
|
+
"use strict";
|
|
18751
|
+
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
18752
|
+
var originalGetProto = require_Object_getPrototypeOf();
|
|
18753
|
+
var getDunderProto = require_get();
|
|
18754
|
+
module3.exports = reflectGetProto ? function getProto(O) {
|
|
18755
|
+
return reflectGetProto(O);
|
|
18756
|
+
} : originalGetProto ? function getProto(O) {
|
|
18757
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
18758
|
+
throw new TypeError("getProto: not an object");
|
|
18759
|
+
}
|
|
18760
|
+
return originalGetProto(O);
|
|
18761
|
+
} : getDunderProto ? function getProto(O) {
|
|
18762
|
+
return getDunderProto(O);
|
|
18763
|
+
} : null;
|
|
18764
|
+
}
|
|
18765
|
+
});
|
|
18766
|
+
|
|
18693
18767
|
// ../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
|
|
18694
18768
|
var require_hasown = __commonJS({
|
|
18695
18769
|
"../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports3, module3) {
|
|
@@ -18701,9 +18775,9 @@ var require_hasown = __commonJS({
|
|
|
18701
18775
|
}
|
|
18702
18776
|
});
|
|
18703
18777
|
|
|
18704
|
-
// ../node_modules/.pnpm/get-intrinsic@1.2.
|
|
18778
|
+
// ../node_modules/.pnpm/get-intrinsic@1.2.7/node_modules/get-intrinsic/index.js
|
|
18705
18779
|
var require_get_intrinsic = __commonJS({
|
|
18706
|
-
"../node_modules/.pnpm/get-intrinsic@1.2.
|
|
18780
|
+
"../node_modules/.pnpm/get-intrinsic@1.2.7/node_modules/get-intrinsic/index.js"(exports3, module3) {
|
|
18707
18781
|
"use strict";
|
|
18708
18782
|
var undefined2;
|
|
18709
18783
|
var $Object = require_es_object_atoms();
|
|
@@ -18719,6 +18793,8 @@ var require_get_intrinsic = __commonJS({
|
|
|
18719
18793
|
var max4 = require_max();
|
|
18720
18794
|
var min4 = require_min();
|
|
18721
18795
|
var pow = require_pow();
|
|
18796
|
+
var round = require_round();
|
|
18797
|
+
var sign = require_sign();
|
|
18722
18798
|
var $Function = Function;
|
|
18723
18799
|
var getEvalledConstructor = function(expressionSyntax) {
|
|
18724
18800
|
try {
|
|
@@ -18744,8 +18820,9 @@ var require_get_intrinsic = __commonJS({
|
|
|
18744
18820
|
}
|
|
18745
18821
|
}() : throwTypeError;
|
|
18746
18822
|
var hasSymbols = require_has_symbols()();
|
|
18747
|
-
var
|
|
18748
|
-
var
|
|
18823
|
+
var getProto = require_get_proto();
|
|
18824
|
+
var $ObjectGPO = require_Object_getPrototypeOf();
|
|
18825
|
+
var $ReflectGPO = require_Reflect_getPrototypeOf();
|
|
18749
18826
|
var $apply = require_functionApply();
|
|
18750
18827
|
var $call = require_functionCall();
|
|
18751
18828
|
var needsEval = {};
|
|
@@ -18823,11 +18900,15 @@ var require_get_intrinsic = __commonJS({
|
|
|
18823
18900
|
"%Function.prototype.call%": $call,
|
|
18824
18901
|
"%Function.prototype.apply%": $apply,
|
|
18825
18902
|
"%Object.defineProperty%": $defineProperty,
|
|
18903
|
+
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
18826
18904
|
"%Math.abs%": abs2,
|
|
18827
18905
|
"%Math.floor%": floor4,
|
|
18828
18906
|
"%Math.max%": max4,
|
|
18829
18907
|
"%Math.min%": min4,
|
|
18830
|
-
"%Math.pow%": pow
|
|
18908
|
+
"%Math.pow%": pow,
|
|
18909
|
+
"%Math.round%": round,
|
|
18910
|
+
"%Math.sign%": sign,
|
|
18911
|
+
"%Reflect.getPrototypeOf%": $ReflectGPO
|
|
18831
18912
|
};
|
|
18832
18913
|
if (getProto) {
|
|
18833
18914
|
try {
|
|
@@ -29513,10 +29594,10 @@ var require_express_ws = __commonJS({
|
|
|
29513
29594
|
}
|
|
29514
29595
|
});
|
|
29515
29596
|
|
|
29516
|
-
// ../node_modules/.pnpm/@hocuspocus+server@2.15.
|
|
29597
|
+
// ../node_modules/.pnpm/@hocuspocus+server@2.15.2_y-protocols@1.0.6_yjs@13.6.23__yjs@13.6.23/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js
|
|
29517
29598
|
var import_async_lock = __toESM(require_async_lock(), 1);
|
|
29518
29599
|
|
|
29519
|
-
// ../node_modules/.pnpm/@hocuspocus+common@2.15.
|
|
29600
|
+
// ../node_modules/.pnpm/@hocuspocus+common@2.15.2/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js
|
|
29520
29601
|
var floor = Math.floor;
|
|
29521
29602
|
var min = (a, b) => a < b ? a : b;
|
|
29522
29603
|
var max = (a, b) => a > b ? a : b;
|
|
@@ -29653,7 +29734,7 @@ var WsReadyStates;
|
|
|
29653
29734
|
WsReadyStates2[WsReadyStates2["Closed"] = 3] = "Closed";
|
|
29654
29735
|
})(WsReadyStates || (WsReadyStates = {}));
|
|
29655
29736
|
|
|
29656
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29737
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/map.js
|
|
29657
29738
|
var create2 = () => /* @__PURE__ */ new Map();
|
|
29658
29739
|
var copy = (m) => {
|
|
29659
29740
|
const r = create2();
|
|
@@ -29678,10 +29759,10 @@ var any = (m, f) => {
|
|
|
29678
29759
|
return false;
|
|
29679
29760
|
};
|
|
29680
29761
|
|
|
29681
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29762
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/set.js
|
|
29682
29763
|
var create3 = () => /* @__PURE__ */ new Set();
|
|
29683
29764
|
|
|
29684
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29765
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/array.js
|
|
29685
29766
|
var last = (arr) => arr[arr.length - 1];
|
|
29686
29767
|
var appendTo = (dest, src) => {
|
|
29687
29768
|
for (let i = 0; i < src.length; i++) {
|
|
@@ -29691,7 +29772,7 @@ var appendTo = (dest, src) => {
|
|
|
29691
29772
|
var from = Array.from;
|
|
29692
29773
|
var isArray = Array.isArray;
|
|
29693
29774
|
|
|
29694
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29775
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/observable.js
|
|
29695
29776
|
var ObservableV2 = class {
|
|
29696
29777
|
constructor() {
|
|
29697
29778
|
this._observers = create2();
|
|
@@ -29762,7 +29843,7 @@ var ObservableV2 = class {
|
|
|
29762
29843
|
}
|
|
29763
29844
|
};
|
|
29764
29845
|
|
|
29765
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29846
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/math.js
|
|
29766
29847
|
var floor2 = Math.floor;
|
|
29767
29848
|
var abs = Math.abs;
|
|
29768
29849
|
var min2 = (a, b) => a < b ? a : b;
|
|
@@ -29770,7 +29851,7 @@ var max2 = (a, b) => a > b ? a : b;
|
|
|
29770
29851
|
var isNaN2 = Number.isNaN;
|
|
29771
29852
|
var isNegativeZero = (n) => n !== 0 ? n < 0 : 1 / n < 0;
|
|
29772
29853
|
|
|
29773
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29854
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/binary.js
|
|
29774
29855
|
var BIT1 = 1;
|
|
29775
29856
|
var BIT2 = 2;
|
|
29776
29857
|
var BIT3 = 4;
|
|
@@ -29812,7 +29893,7 @@ var BITS29 = BIT30 - 1;
|
|
|
29812
29893
|
var BITS30 = BIT31 - 1;
|
|
29813
29894
|
var BITS31 = 2147483647;
|
|
29814
29895
|
|
|
29815
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29896
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/number.js
|
|
29816
29897
|
var MAX_SAFE_INTEGER2 = Number.MAX_SAFE_INTEGER;
|
|
29817
29898
|
var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER;
|
|
29818
29899
|
var LOWEST_INT32 = 1 << 31;
|
|
@@ -29820,7 +29901,7 @@ var isInteger = Number.isInteger || ((num) => typeof num === "number" && isFinit
|
|
|
29820
29901
|
var isNaN3 = Number.isNaN;
|
|
29821
29902
|
var parseInt2 = Number.parseInt;
|
|
29822
29903
|
|
|
29823
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29904
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/string.js
|
|
29824
29905
|
var fromCharCode = String.fromCharCode;
|
|
29825
29906
|
var fromCodePoint = String.fromCodePoint;
|
|
29826
29907
|
var MAX_UTF16_CHARACTER = fromCharCode(65535);
|
|
@@ -29850,7 +29931,7 @@ if (utf8TextDecoder2 && utf8TextDecoder2.decode(new Uint8Array()).length === 1)
|
|
|
29850
29931
|
utf8TextDecoder2 = null;
|
|
29851
29932
|
}
|
|
29852
29933
|
|
|
29853
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
29934
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/encoding.js
|
|
29854
29935
|
var Encoder = class {
|
|
29855
29936
|
constructor() {
|
|
29856
29937
|
this.cpos = 0;
|
|
@@ -30157,7 +30238,7 @@ var StringEncoder = class {
|
|
|
30157
30238
|
}
|
|
30158
30239
|
};
|
|
30159
30240
|
|
|
30160
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30241
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/error.js
|
|
30161
30242
|
var create4 = (s) => new Error(s);
|
|
30162
30243
|
var methodUnimplemented = () => {
|
|
30163
30244
|
throw create4("Method unimplemented");
|
|
@@ -30166,7 +30247,7 @@ var unexpectedCase = () => {
|
|
|
30166
30247
|
throw create4("Unexpected case");
|
|
30167
30248
|
};
|
|
30168
30249
|
|
|
30169
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30250
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/decoding.js
|
|
30170
30251
|
var errorUnexpectedEndOfArray2 = create4("Unexpected end of array");
|
|
30171
30252
|
var errorIntegerOutOfRange2 = create4("Integer out of Range");
|
|
30172
30253
|
var Decoder = class {
|
|
@@ -30409,7 +30490,7 @@ var StringDecoder = class {
|
|
|
30409
30490
|
}
|
|
30410
30491
|
};
|
|
30411
30492
|
|
|
30412
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30493
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/webcrypto.node.js
|
|
30413
30494
|
var import_node_crypto = require("node:crypto");
|
|
30414
30495
|
var subtle = (
|
|
30415
30496
|
/** @type {any} */
|
|
@@ -30420,7 +30501,7 @@ var getRandomValues = (
|
|
|
30420
30501
|
import_node_crypto.webcrypto.getRandomValues.bind(import_node_crypto.webcrypto)
|
|
30421
30502
|
);
|
|
30422
30503
|
|
|
30423
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30504
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/random.js
|
|
30424
30505
|
var uint32 = () => getRandomValues(new Uint32Array(1))[0];
|
|
30425
30506
|
var uuidv4Template = "10000000-1000-4000-8000" + -1e11;
|
|
30426
30507
|
var uuidv4 = () => uuidv4Template.replace(
|
|
@@ -30429,20 +30510,20 @@ var uuidv4 = () => uuidv4Template.replace(
|
|
|
30429
30510
|
(c) => (c ^ uint32() & 15 >> c / 4).toString(16)
|
|
30430
30511
|
);
|
|
30431
30512
|
|
|
30432
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30513
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/time.js
|
|
30433
30514
|
var getUnixTime = Date.now;
|
|
30434
30515
|
|
|
30435
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30516
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/promise.js
|
|
30436
30517
|
var create5 = (f) => (
|
|
30437
30518
|
/** @type {Promise<T>} */
|
|
30438
30519
|
new Promise(f)
|
|
30439
30520
|
);
|
|
30440
30521
|
var all = Promise.all.bind(Promise);
|
|
30441
30522
|
|
|
30442
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30523
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/conditions.js
|
|
30443
30524
|
var undefinedToNull = (v) => v === void 0 ? null : v;
|
|
30444
30525
|
|
|
30445
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30526
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/storage.js
|
|
30446
30527
|
var VarStoragePolyfill = class {
|
|
30447
30528
|
constructor() {
|
|
30448
30529
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -30472,7 +30553,7 @@ try {
|
|
|
30472
30553
|
}
|
|
30473
30554
|
var varStorage = _localStorage;
|
|
30474
30555
|
|
|
30475
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30556
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/object.js
|
|
30476
30557
|
var assign = Object.assign;
|
|
30477
30558
|
var keys = Object.keys;
|
|
30478
30559
|
var forEach = (obj, f) => {
|
|
@@ -30508,7 +30589,7 @@ var deepFreeze = (o) => {
|
|
|
30508
30589
|
return freeze(o);
|
|
30509
30590
|
};
|
|
30510
30591
|
|
|
30511
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30592
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/function.js
|
|
30512
30593
|
var callAll = (fs, args2, i = 0) => {
|
|
30513
30594
|
try {
|
|
30514
30595
|
for (; i < fs.length; i++) {
|
|
@@ -30523,7 +30604,7 @@ var callAll = (fs, args2, i = 0) => {
|
|
|
30523
30604
|
var id = (a) => a;
|
|
30524
30605
|
var isOneOf = (value, options) => options.includes(value);
|
|
30525
30606
|
|
|
30526
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30607
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/environment.js
|
|
30527
30608
|
var isNode = typeof process !== "undefined" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
|
|
30528
30609
|
var isMac = typeof navigator !== "undefined" ? /Mac/.test(navigator.platform) : false;
|
|
30529
30610
|
var params;
|
|
@@ -30576,7 +30657,7 @@ var forceColor = isNode && isOneOf(process.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
|
30576
30657
|
var supportsColor = forceColor || !hasParam("--no-colors") && // @todo deprecate --no-colors
|
|
30577
30658
|
!hasConf("no-color") && (!isNode || process.stdout.isTTY) && (!isNode || hasParam("--color") || getVariable("COLORTERM") !== null || (getVariable("TERM") || "").includes("color"));
|
|
30578
30659
|
|
|
30579
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30660
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/buffer.js
|
|
30580
30661
|
var createUint8ArrayFromLen = (len) => new Uint8Array(len);
|
|
30581
30662
|
var copyUint8Array = (uint8Array) => {
|
|
30582
30663
|
const newBuf = createUint8ArrayFromLen(uint8Array.byteLength);
|
|
@@ -30584,10 +30665,10 @@ var copyUint8Array = (uint8Array) => {
|
|
|
30584
30665
|
return newBuf;
|
|
30585
30666
|
};
|
|
30586
30667
|
|
|
30587
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30668
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/symbol.js
|
|
30588
30669
|
var create6 = Symbol;
|
|
30589
30670
|
|
|
30590
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30671
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/logging.common.js
|
|
30591
30672
|
var BOLD = create6();
|
|
30592
30673
|
var UNBOLD = create6();
|
|
30593
30674
|
var BLUE = create6();
|
|
@@ -30629,7 +30710,7 @@ var computeNoColorLoggingArgs = (args2) => {
|
|
|
30629
30710
|
};
|
|
30630
30711
|
var lastLoggingTime = getUnixTime();
|
|
30631
30712
|
|
|
30632
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30713
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/logging.node.js
|
|
30633
30714
|
var _nodeStyleMap = {
|
|
30634
30715
|
[BOLD]: "\x1B[1m",
|
|
30635
30716
|
[UNBOLD]: "\x1B[2m",
|
|
@@ -30685,7 +30766,7 @@ var warn = (...args2) => {
|
|
|
30685
30766
|
console.warn(...computeLoggingArgs(args2));
|
|
30686
30767
|
};
|
|
30687
30768
|
|
|
30688
|
-
// ../node_modules/.pnpm/lib0@0.2.
|
|
30769
|
+
// ../node_modules/.pnpm/lib0@0.2.99/node_modules/lib0/iterator.js
|
|
30689
30770
|
var createIterator = (next) => ({
|
|
30690
30771
|
/**
|
|
30691
30772
|
* @return {IterableIterator<T>}
|
|
@@ -30708,7 +30789,7 @@ var iteratorMap = (iterator, fmap) => createIterator(() => {
|
|
|
30708
30789
|
return { done, value: done ? void 0 : fmap(value) };
|
|
30709
30790
|
});
|
|
30710
30791
|
|
|
30711
|
-
// ../node_modules/.pnpm/yjs@13.6.
|
|
30792
|
+
// ../node_modules/.pnpm/yjs@13.6.23/node_modules/yjs/dist/yjs.mjs
|
|
30712
30793
|
var DeleteItem = class {
|
|
30713
30794
|
/**
|
|
30714
30795
|
* @param {number} clock
|
|
@@ -31811,13 +31892,13 @@ var integrateStructs = (transaction, store, clientsStructRefs) => {
|
|
|
31811
31892
|
const addStackToRestSS = () => {
|
|
31812
31893
|
for (const item of stack) {
|
|
31813
31894
|
const client = item.id.client;
|
|
31814
|
-
const
|
|
31815
|
-
if (
|
|
31816
|
-
|
|
31817
|
-
restStructs.clients.set(client,
|
|
31895
|
+
const inapplicableItems = clientsStructRefs.get(client);
|
|
31896
|
+
if (inapplicableItems) {
|
|
31897
|
+
inapplicableItems.i--;
|
|
31898
|
+
restStructs.clients.set(client, inapplicableItems.refs.slice(inapplicableItems.i));
|
|
31818
31899
|
clientsStructRefs.delete(client);
|
|
31819
|
-
|
|
31820
|
-
|
|
31900
|
+
inapplicableItems.i = 0;
|
|
31901
|
+
inapplicableItems.refs = [];
|
|
31821
31902
|
} else {
|
|
31822
31903
|
restStructs.clients.set(client, [item]);
|
|
31823
31904
|
}
|
|
@@ -34704,7 +34785,7 @@ var YText = class _YText extends AbstractType {
|
|
|
34704
34785
|
/**
|
|
34705
34786
|
* Apply a {@link Delta} on this shared YText type.
|
|
34706
34787
|
*
|
|
34707
|
-
* @param {any} delta The changes to apply on this element.
|
|
34788
|
+
* @param {Array<any>} delta The changes to apply on this element.
|
|
34708
34789
|
* @param {object} opts
|
|
34709
34790
|
* @param {boolean} [opts.sanitize] Sanitize input delta. Removes ending newlines if set to true.
|
|
34710
34791
|
*
|
|
@@ -35592,7 +35673,7 @@ var YXmlEvent = class extends YEvent {
|
|
|
35592
35673
|
* @param {YXmlElement|YXmlText|YXmlFragment} target The target on which the event is created.
|
|
35593
35674
|
* @param {Set<string|null>} subs The set of changed attributes. `null` is included if the
|
|
35594
35675
|
* child list changed.
|
|
35595
|
-
* @param {Transaction} transaction The transaction instance with
|
|
35676
|
+
* @param {Transaction} transaction The transaction instance with which the
|
|
35596
35677
|
* change was created.
|
|
35597
35678
|
*/
|
|
35598
35679
|
constructor(target, subs, transaction) {
|
|
@@ -35802,7 +35883,7 @@ var AbstractStruct = class {
|
|
|
35802
35883
|
* This method is already assuming that `this.id.clock + this.length === this.id.clock`.
|
|
35803
35884
|
* Also this method does *not* remove right from StructStore!
|
|
35804
35885
|
* @param {AbstractStruct} right
|
|
35805
|
-
* @return {boolean}
|
|
35886
|
+
* @return {boolean} whether this merged with right
|
|
35806
35887
|
*/
|
|
35807
35888
|
mergeWith(right) {
|
|
35808
35889
|
return false;
|
|
@@ -37308,7 +37389,7 @@ function v4(options, buf, offset) {
|
|
|
37308
37389
|
}
|
|
37309
37390
|
var v4_default = v4;
|
|
37310
37391
|
|
|
37311
|
-
// ../node_modules/.pnpm/@hocuspocus+server@2.15.
|
|
37392
|
+
// ../node_modules/.pnpm/@hocuspocus+server@2.15.2_y-protocols@1.0.6_yjs@13.6.23__yjs@13.6.23/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js
|
|
37312
37393
|
var import_http = require("http");
|
|
37313
37394
|
|
|
37314
37395
|
// ../node_modules/.pnpm/ws@8.18.0/node_modules/ws/wrapper.mjs
|
|
@@ -37318,7 +37399,7 @@ var import_sender = __toESM(require_sender(), 1);
|
|
|
37318
37399
|
var import_websocket = __toESM(require_websocket(), 1);
|
|
37319
37400
|
var import_websocket_server = __toESM(require_websocket_server(), 1);
|
|
37320
37401
|
|
|
37321
|
-
// ../node_modules/.pnpm/@hocuspocus+server@2.15.
|
|
37402
|
+
// ../node_modules/.pnpm/@hocuspocus+server@2.15.2_y-protocols@1.0.6_yjs@13.6.23__yjs@13.6.23/node_modules/@hocuspocus/server/dist/hocuspocus-server.esm.js
|
|
37322
37403
|
var import_url = require("url");
|
|
37323
37404
|
var BIT83 = 128;
|
|
37324
37405
|
var BITS73 = 127;
|
|
@@ -38019,7 +38100,7 @@ var MessageReceiver = class {
|
|
|
38019
38100
|
type: MessageType.Awareness,
|
|
38020
38101
|
category: "Update"
|
|
38021
38102
|
});
|
|
38022
|
-
applyAwarenessUpdate(document2.awareness, message.readVarUint8Array(), connection);
|
|
38103
|
+
applyAwarenessUpdate(document2.awareness, message.readVarUint8Array(), connection === null || connection === void 0 ? void 0 : connection.webSocket);
|
|
38023
38104
|
break;
|
|
38024
38105
|
}
|
|
38025
38106
|
case MessageType.QueryAwareness: {
|
|
@@ -38531,7 +38612,7 @@ var Document = class extends Doc {
|
|
|
38531
38612
|
};
|
|
38532
38613
|
var name = "@hocuspocus/server";
|
|
38533
38614
|
var description = "plug & play collaboration backend";
|
|
38534
|
-
var version = "2.15.
|
|
38615
|
+
var version = "2.15.2";
|
|
38535
38616
|
var homepage = "https://hocuspocus.dev";
|
|
38536
38617
|
var keywords = [
|
|
38537
38618
|
"hocuspocus",
|
|
@@ -38559,7 +38640,7 @@ var files = [
|
|
|
38559
38640
|
"dist"
|
|
38560
38641
|
];
|
|
38561
38642
|
var dependencies = {
|
|
38562
|
-
"@hocuspocus/common": "^2.15.
|
|
38643
|
+
"@hocuspocus/common": "^2.15.2",
|
|
38563
38644
|
"async-lock": "^1.3.1",
|
|
38564
38645
|
kleur: "^4.1.4",
|
|
38565
38646
|
lib0: "^0.2.47",
|
|
@@ -39157,10 +39238,14 @@ var Hocuspocus = class {
|
|
|
39157
39238
|
* Get the total number of active connections
|
|
39158
39239
|
*/
|
|
39159
39240
|
getConnectionsCount() {
|
|
39160
|
-
|
|
39161
|
-
|
|
39162
|
-
|
|
39241
|
+
const uniqueSocketIds = /* @__PURE__ */ new Set();
|
|
39242
|
+
const totalDirectConnections = Array.from(this.documents.values()).reduce((acc, document2) => {
|
|
39243
|
+
document2.getConnections().forEach(({ socketId }) => {
|
|
39244
|
+
uniqueSocketIds.add(socketId);
|
|
39245
|
+
});
|
|
39246
|
+
return acc + document2.directConnectionsCount;
|
|
39163
39247
|
}, 0);
|
|
39248
|
+
return uniqueSocketIds.size + totalDirectConnections;
|
|
39164
39249
|
}
|
|
39165
39250
|
/**
|
|
39166
39251
|
* Force close one or more connections
|
|
@@ -39344,11 +39429,11 @@ var Hocuspocus = class {
|
|
|
39344
39429
|
storeDocumentHooks(document2, hookPayload, immediately) {
|
|
39345
39430
|
return this.debouncer.debounce(`onStoreDocument-${document2.name}`, () => {
|
|
39346
39431
|
return this.hooks("onStoreDocument", hookPayload).then(() => {
|
|
39347
|
-
this.hooks("afterStoreDocument", hookPayload).then(() => {
|
|
39432
|
+
this.hooks("afterStoreDocument", hookPayload).then(async () => {
|
|
39348
39433
|
if (document2.getConnectionsCount() > 0) {
|
|
39349
39434
|
return;
|
|
39350
39435
|
}
|
|
39351
|
-
this.unloadDocument(document2);
|
|
39436
|
+
await this.unloadDocument(document2);
|
|
39352
39437
|
});
|
|
39353
39438
|
}).catch((error) => {
|
|
39354
39439
|
console.error("Caught error during storeDocumentHooks", error);
|
|
@@ -39381,13 +39466,14 @@ var Hocuspocus = class {
|
|
|
39381
39466
|
});
|
|
39382
39467
|
return chain2;
|
|
39383
39468
|
}
|
|
39384
|
-
unloadDocument(document2) {
|
|
39469
|
+
async unloadDocument(document2) {
|
|
39385
39470
|
const documentName = document2.name;
|
|
39386
39471
|
if (!this.documents.has(documentName))
|
|
39387
39472
|
return;
|
|
39473
|
+
await this.hooks("beforeUnloadDocument", { instance: this, documentName });
|
|
39388
39474
|
this.documents.delete(documentName);
|
|
39389
39475
|
document2.destroy();
|
|
39390
|
-
this.hooks("afterUnloadDocument", { instance: this, documentName });
|
|
39476
|
+
await this.hooks("afterUnloadDocument", { instance: this, documentName });
|
|
39391
39477
|
}
|
|
39392
39478
|
enableDebugging() {
|
|
39393
39479
|
this.debugger.enable();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-realtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"license": "LGPL 2.1",
|
|
5
5
|
"author": "XWiki Org Community <contact@xwiki.org>",
|
|
6
6
|
"homepage": "https://cristal.xwiki.org/",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
},
|
|
15
15
|
"type": "module",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@hocuspocus/server": "2.15.
|
|
17
|
+
"@hocuspocus/server": "2.15.2",
|
|
18
18
|
"express": "4.21.2",
|
|
19
19
|
"express-ws": "5.0.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/express": "5.0.0",
|
|
23
23
|
"@types/express-ws": "3.0.5",
|
|
24
|
-
"esbuild": "0.24.
|
|
24
|
+
"esbuild": "0.24.2",
|
|
25
25
|
"tsx": "4.19.2",
|
|
26
|
-
"typescript": "5.
|
|
27
|
-
"vite": "6.0
|
|
26
|
+
"typescript": "5.7.3",
|
|
27
|
+
"vite": "6.1.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsc --project tsconfig.json && esbuild ./src/index.ts --bundle --outfile=dist/index.js --platform=node",
|