@colyseus/sdk 0.17.33 → 0.17.34
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/LICENSE +2 -1
- package/README.md +27 -0
- package/build/3rd_party/discord.cjs +1 -1
- package/build/3rd_party/discord.mjs +1 -1
- package/build/Auth.cjs +1 -1
- package/build/Auth.mjs +1 -1
- package/build/Client.cjs +1 -1
- package/build/Client.mjs +1 -1
- package/build/Connection.cjs +1 -1
- package/build/Connection.mjs +1 -1
- package/build/HTTP.bkp.d.ts +103 -0
- package/build/HTTP.cjs +1 -1
- package/build/HTTP.mjs +1 -1
- package/build/HTTP_bkp.d.ts +18 -0
- package/build/Protocol.cjs +34 -0
- package/build/Protocol.cjs.map +1 -0
- package/build/Protocol.d.ts +21 -0
- package/build/Protocol.mjs +34 -0
- package/build/Protocol.mjs.map +1 -0
- package/build/Room.cjs +1 -1
- package/build/Room.mjs +1 -1
- package/build/Storage.cjs +1 -1
- package/build/Storage.mjs +1 -1
- package/build/core/nanoevents.cjs +1 -1
- package/build/core/nanoevents.mjs +1 -1
- package/build/core/signal.cjs +1 -1
- package/build/core/signal.mjs +1 -1
- package/build/core/utils.cjs +1 -1
- package/build/core/utils.mjs +1 -1
- package/build/debug.cjs +1 -1
- package/build/debug.mjs +1 -1
- package/build/errors/Errors.cjs +1 -1
- package/build/errors/Errors.mjs +1 -1
- package/build/index.cjs +1 -1
- package/build/index.mjs +1 -1
- package/build/legacy.cjs +1 -1
- package/build/legacy.mjs +1 -1
- package/build/serializer/NoneSerializer.cjs +1 -1
- package/build/serializer/NoneSerializer.mjs +1 -1
- package/build/serializer/SchemaSerializer.cjs +1 -1
- package/build/serializer/SchemaSerializer.mjs +1 -1
- package/build/serializer/Serializer.cjs +1 -1
- package/build/serializer/Serializer.mjs +1 -1
- package/build/transport/H3Transport.cjs +1 -1
- package/build/transport/H3Transport.mjs +1 -1
- package/build/transport/WebSocketTransport.cjs +1 -1
- package/build/transport/WebSocketTransport.mjs +1 -1
- package/dist/colyseus-cocos-creator.js +16 -4
- package/dist/colyseus-cocos-creator.js.map +1 -1
- package/dist/colyseus.d.ts +4148 -0
- package/dist/colyseus.js +16 -4
- package/dist/colyseus.js.map +1 -1
- package/dist/debug.js +1 -1
- package/package.json +1 -1
package/dist/colyseus.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This software is released under the MIT License.
|
|
4
4
|
// https://opensource.org/license/MIT
|
|
5
5
|
//
|
|
6
|
-
// colyseus.js@0.17.
|
|
6
|
+
// colyseus.js@0.17.34 - @colyseus/schema 4.0.13
|
|
7
7
|
(function (global, factory) {
|
|
8
8
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
9
9
|
typeof define === 'function' && define.amd ? define('@colyseus/sdk', ['exports'], factory) :
|
|
@@ -4218,7 +4218,11 @@
|
|
|
4218
4218
|
const ref = changeTree.ref;
|
|
4219
4219
|
// Assign unique `refId` to ref if it doesn't have one yet.
|
|
4220
4220
|
if (ref[$refId] === undefined) {
|
|
4221
|
-
ref
|
|
4221
|
+
Object.defineProperty(ref, $refId, {
|
|
4222
|
+
value: this.getNextUniqueId(),
|
|
4223
|
+
enumerable: false,
|
|
4224
|
+
writable: true
|
|
4225
|
+
});
|
|
4222
4226
|
}
|
|
4223
4227
|
const refId = ref[$refId];
|
|
4224
4228
|
const isNewChangeTree = (this.changeTrees[refId] === undefined);
|
|
@@ -4660,7 +4664,11 @@
|
|
|
4660
4664
|
// for decoding
|
|
4661
4665
|
addRef(refId, ref, incrementCount = true) {
|
|
4662
4666
|
this.refs.set(refId, ref);
|
|
4663
|
-
ref
|
|
4667
|
+
Object.defineProperty(ref, $refId, {
|
|
4668
|
+
value: refId,
|
|
4669
|
+
enumerable: false,
|
|
4670
|
+
writable: true
|
|
4671
|
+
});
|
|
4664
4672
|
if (incrementCount) {
|
|
4665
4673
|
this.refCount[refId] = (this.refCount[refId] || 0) + 1;
|
|
4666
4674
|
}
|
|
@@ -5352,11 +5360,15 @@
|
|
|
5352
5360
|
const collection = instance[propertyName];
|
|
5353
5361
|
// Collection not available yet. Listen for its availability before attaching the handler.
|
|
5354
5362
|
if (!collection || collection[$refId] === undefined) {
|
|
5355
|
-
|
|
5363
|
+
let removePropertyCallback;
|
|
5364
|
+
removePropertyCallback = this.addCallback(instance[$refId], propertyName, (value, _) => {
|
|
5356
5365
|
if (value !== null && value !== undefined) {
|
|
5366
|
+
// Remove the property listener now that collection is available
|
|
5367
|
+
removePropertyCallback();
|
|
5357
5368
|
removeHandler = this.addCallback(value[$refId], operation, handler);
|
|
5358
5369
|
}
|
|
5359
5370
|
});
|
|
5371
|
+
removeHandler = removePropertyCallback;
|
|
5360
5372
|
return removeOnAdd;
|
|
5361
5373
|
}
|
|
5362
5374
|
else {
|