@dcl/ecs 7.29.1-35862852104.commit-1f44e80 → 7.29.1-35917671376.commit-046b268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/generated/ExplorerItemPurchaseResult.gen.d.ts +1 -0
- package/dist/components/generated/ExplorerItemPurchaseResult.gen.js +25 -0
- package/dist/components/generated/component-names.gen.js +1 -0
- package/dist/components/generated/global.gen.d.ts +2 -0
- package/dist/components/generated/global.gen.js +1 -0
- package/dist/components/generated/index.gen.d.ts +4 -0
- package/dist/components/generated/index.gen.js +7 -0
- package/dist/components/generated/pb/decentraland/sdk/components/common/explorer_ui.gen.d.ts +4 -2
- package/dist/components/generated/pb/decentraland/sdk/components/common/explorer_ui.gen.js +3 -1
- package/dist/components/generated/pb/decentraland/sdk/components/explorer_item_purchase_result.gen.d.ts +68 -0
- package/dist/components/generated/pb/decentraland/sdk/components/explorer_item_purchase_result.gen.js +184 -0
- package/dist/components/generated/pb/decentraland/sdk/components/explorer_ui_events_result.gen.d.ts +8 -3
- package/dist/components/generated/pb/decentraland/sdk/components/explorer_ui_events_result.gen.js +10 -1
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +2 -5
- package/dist/components/manual/Transform.d.ts +0 -9
- package/dist/components/manual/Transform.js +3 -3
- package/dist/components/types.d.ts +0 -1
- package/dist/engine/component.d.ts +1 -52
- package/dist/engine/grow-only-value-set-component-definition.js +2 -45
- package/dist/engine/lww-element-set-component-definition.d.ts +1 -3
- package/dist/engine/lww-element-set-component-definition.js +13 -68
- package/dist/index.d.ts +1 -2
- package/dist/index.js +0 -1
- package/dist/serialization/crdt/index.d.ts +0 -1
- package/dist/serialization/crdt/index.js +0 -1
- package/dist/serialization/crdt/network/utils.d.ts +9 -0
- package/dist/serialization/crdt/network/utils.js +60 -0
- package/dist/serialization/crdt/types.d.ts +3 -25
- package/dist/serialization/crdt/types.js +1 -3
- package/dist/systems/crdt/index.d.ts +1 -0
- package/dist/systems/crdt/index.js +143 -76
- package/dist/systems/crdt/types.d.ts +0 -10
- package/dist-cjs/components/generated/ExplorerItemPurchaseResult.gen.d.ts +1 -0
- package/dist-cjs/components/generated/ExplorerItemPurchaseResult.gen.js +28 -0
- package/dist-cjs/components/generated/component-names.gen.js +1 -0
- package/dist-cjs/components/generated/global.gen.d.ts +2 -0
- package/dist-cjs/components/generated/global.gen.js +3 -2
- package/dist-cjs/components/generated/index.gen.d.ts +4 -0
- package/dist-cjs/components/generated/index.gen.js +10 -2
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/explorer_ui.gen.d.ts +4 -2
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/explorer_ui.gen.js +3 -1
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/explorer_item_purchase_result.gen.d.ts +68 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/explorer_item_purchase_result.gen.js +190 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/explorer_ui_events_result.gen.d.ts +8 -3
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/explorer_ui_events_result.gen.js +10 -1
- package/dist-cjs/components/index.d.ts +0 -5
- package/dist-cjs/components/index.js +3 -7
- package/dist-cjs/components/manual/Transform.d.ts +0 -9
- package/dist-cjs/components/manual/Transform.js +3 -3
- package/dist-cjs/components/types.d.ts +0 -1
- package/dist-cjs/engine/component.d.ts +1 -52
- package/dist-cjs/engine/grow-only-value-set-component-definition.js +1 -44
- package/dist-cjs/engine/lww-element-set-component-definition.d.ts +1 -3
- package/dist-cjs/engine/lww-element-set-component-definition.js +14 -71
- package/dist-cjs/index.d.ts +1 -2
- package/dist-cjs/index.js +1 -2
- package/dist-cjs/serialization/crdt/index.d.ts +0 -1
- package/dist-cjs/serialization/crdt/index.js +0 -1
- package/dist-cjs/serialization/crdt/network/utils.d.ts +9 -0
- package/dist-cjs/serialization/crdt/network/utils.js +67 -0
- package/dist-cjs/serialization/crdt/types.d.ts +3 -25
- package/dist-cjs/serialization/crdt/types.js +1 -3
- package/dist-cjs/systems/crdt/index.d.ts +1 -0
- package/dist-cjs/systems/crdt/index.js +166 -76
- package/dist-cjs/systems/crdt/types.d.ts +0 -10
- package/package.json +2 -2
- package/dist/components/manual/CreatedBy.d.ts +0 -9
- package/dist/components/manual/CreatedBy.js +0 -8
- package/dist/serialization/crdt/authoritativePutComponent.d.ts +0 -15
- package/dist/serialization/crdt/authoritativePutComponent.js +0 -47
- package/dist-cjs/components/manual/CreatedBy.d.ts +0 -9
- package/dist-cjs/components/manual/CreatedBy.js +0 -10
- package/dist-cjs/serialization/crdt/authoritativePutComponent.d.ts +0 -15
- package/dist-cjs/serialization/crdt/authoritativePutComponent.js +0 -50
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PBExplorerItemPurchaseResult_Failed = exports.PBExplorerItemPurchaseResult_Dismissed = exports.PBExplorerItemPurchaseResult_Purchased = exports.PBExplorerItemPurchaseResult = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
10
|
+
function createBasePBExplorerItemPurchaseResult() {
|
|
11
|
+
return { urn: "", timestamp: 0, requestId: 0, status: undefined };
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
var PBExplorerItemPurchaseResult;
|
|
17
|
+
(function (PBExplorerItemPurchaseResult) {
|
|
18
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
19
|
+
if (message.urn !== "") {
|
|
20
|
+
writer.uint32(10).string(message.urn);
|
|
21
|
+
}
|
|
22
|
+
if (message.timestamp !== 0) {
|
|
23
|
+
writer.uint32(16).uint32(message.timestamp);
|
|
24
|
+
}
|
|
25
|
+
if (message.requestId !== 0) {
|
|
26
|
+
writer.uint32(24).uint32(message.requestId);
|
|
27
|
+
}
|
|
28
|
+
switch (message.status?.$case) {
|
|
29
|
+
case "purchased":
|
|
30
|
+
PBExplorerItemPurchaseResult_Purchased.encode(message.status.purchased, writer.uint32(82).fork()).ldelim();
|
|
31
|
+
break;
|
|
32
|
+
case "dismissed":
|
|
33
|
+
PBExplorerItemPurchaseResult_Dismissed.encode(message.status.dismissed, writer.uint32(90).fork()).ldelim();
|
|
34
|
+
break;
|
|
35
|
+
case "failed":
|
|
36
|
+
PBExplorerItemPurchaseResult_Failed.encode(message.status.failed, writer.uint32(98).fork()).ldelim();
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
return writer;
|
|
40
|
+
}
|
|
41
|
+
PBExplorerItemPurchaseResult.encode = encode;
|
|
42
|
+
function decode(input, length) {
|
|
43
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
44
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
45
|
+
const message = createBasePBExplorerItemPurchaseResult();
|
|
46
|
+
while (reader.pos < end) {
|
|
47
|
+
const tag = reader.uint32();
|
|
48
|
+
switch (tag >>> 3) {
|
|
49
|
+
case 1:
|
|
50
|
+
if (tag !== 10) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
message.urn = reader.string();
|
|
54
|
+
continue;
|
|
55
|
+
case 2:
|
|
56
|
+
if (tag !== 16) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
message.timestamp = reader.uint32();
|
|
60
|
+
continue;
|
|
61
|
+
case 3:
|
|
62
|
+
if (tag !== 24) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
message.requestId = reader.uint32();
|
|
66
|
+
continue;
|
|
67
|
+
case 10:
|
|
68
|
+
if (tag !== 82) {
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
message.status = {
|
|
72
|
+
$case: "purchased",
|
|
73
|
+
purchased: PBExplorerItemPurchaseResult_Purchased.decode(reader, reader.uint32()),
|
|
74
|
+
};
|
|
75
|
+
continue;
|
|
76
|
+
case 11:
|
|
77
|
+
if (tag !== 90) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
message.status = {
|
|
81
|
+
$case: "dismissed",
|
|
82
|
+
dismissed: PBExplorerItemPurchaseResult_Dismissed.decode(reader, reader.uint32()),
|
|
83
|
+
};
|
|
84
|
+
continue;
|
|
85
|
+
case 12:
|
|
86
|
+
if (tag !== 98) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
message.status = {
|
|
90
|
+
$case: "failed",
|
|
91
|
+
failed: PBExplorerItemPurchaseResult_Failed.decode(reader, reader.uint32()),
|
|
92
|
+
};
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
reader.skipType(tag & 7);
|
|
99
|
+
}
|
|
100
|
+
return message;
|
|
101
|
+
}
|
|
102
|
+
PBExplorerItemPurchaseResult.decode = decode;
|
|
103
|
+
})(PBExplorerItemPurchaseResult = exports.PBExplorerItemPurchaseResult || (exports.PBExplorerItemPurchaseResult = {}));
|
|
104
|
+
function createBasePBExplorerItemPurchaseResult_Purchased() {
|
|
105
|
+
return {};
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
110
|
+
var PBExplorerItemPurchaseResult_Purchased;
|
|
111
|
+
(function (PBExplorerItemPurchaseResult_Purchased) {
|
|
112
|
+
function encode(_, writer = minimal_1.default.Writer.create()) {
|
|
113
|
+
return writer;
|
|
114
|
+
}
|
|
115
|
+
PBExplorerItemPurchaseResult_Purchased.encode = encode;
|
|
116
|
+
function decode(input, length) {
|
|
117
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
118
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
119
|
+
const message = createBasePBExplorerItemPurchaseResult_Purchased();
|
|
120
|
+
while (reader.pos < end) {
|
|
121
|
+
const tag = reader.uint32();
|
|
122
|
+
switch (tag >>> 3) {
|
|
123
|
+
}
|
|
124
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
reader.skipType(tag & 7);
|
|
128
|
+
}
|
|
129
|
+
return message;
|
|
130
|
+
}
|
|
131
|
+
PBExplorerItemPurchaseResult_Purchased.decode = decode;
|
|
132
|
+
})(PBExplorerItemPurchaseResult_Purchased = exports.PBExplorerItemPurchaseResult_Purchased || (exports.PBExplorerItemPurchaseResult_Purchased = {}));
|
|
133
|
+
function createBasePBExplorerItemPurchaseResult_Dismissed() {
|
|
134
|
+
return {};
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
var PBExplorerItemPurchaseResult_Dismissed;
|
|
140
|
+
(function (PBExplorerItemPurchaseResult_Dismissed) {
|
|
141
|
+
function encode(_, writer = minimal_1.default.Writer.create()) {
|
|
142
|
+
return writer;
|
|
143
|
+
}
|
|
144
|
+
PBExplorerItemPurchaseResult_Dismissed.encode = encode;
|
|
145
|
+
function decode(input, length) {
|
|
146
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
147
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
148
|
+
const message = createBasePBExplorerItemPurchaseResult_Dismissed();
|
|
149
|
+
while (reader.pos < end) {
|
|
150
|
+
const tag = reader.uint32();
|
|
151
|
+
switch (tag >>> 3) {
|
|
152
|
+
}
|
|
153
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
reader.skipType(tag & 7);
|
|
157
|
+
}
|
|
158
|
+
return message;
|
|
159
|
+
}
|
|
160
|
+
PBExplorerItemPurchaseResult_Dismissed.decode = decode;
|
|
161
|
+
})(PBExplorerItemPurchaseResult_Dismissed = exports.PBExplorerItemPurchaseResult_Dismissed || (exports.PBExplorerItemPurchaseResult_Dismissed = {}));
|
|
162
|
+
function createBasePBExplorerItemPurchaseResult_Failed() {
|
|
163
|
+
return {};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
var PBExplorerItemPurchaseResult_Failed;
|
|
169
|
+
(function (PBExplorerItemPurchaseResult_Failed) {
|
|
170
|
+
function encode(_, writer = minimal_1.default.Writer.create()) {
|
|
171
|
+
return writer;
|
|
172
|
+
}
|
|
173
|
+
PBExplorerItemPurchaseResult_Failed.encode = encode;
|
|
174
|
+
function decode(input, length) {
|
|
175
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
176
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
177
|
+
const message = createBasePBExplorerItemPurchaseResult_Failed();
|
|
178
|
+
while (reader.pos < end) {
|
|
179
|
+
const tag = reader.uint32();
|
|
180
|
+
switch (tag >>> 3) {
|
|
181
|
+
}
|
|
182
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
reader.skipType(tag & 7);
|
|
186
|
+
}
|
|
187
|
+
return message;
|
|
188
|
+
}
|
|
189
|
+
PBExplorerItemPurchaseResult_Failed.decode = decode;
|
|
190
|
+
})(PBExplorerItemPurchaseResult_Failed = exports.PBExplorerItemPurchaseResult_Failed || (exports.PBExplorerItemPurchaseResult_Failed = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
import { ExplorerUi } from "./common/explorer_ui.gen";
|
|
3
3
|
/**
|
|
4
|
-
* PBExplorerUiEventsResult transports the lifecycle events of
|
|
4
|
+
* PBExplorerUiEventsResult transports the lifecycle events of explorer UI panels — a panel was
|
|
5
5
|
* opened, a panel was closed. It is a grow only value set appended to the scene root entity, so every
|
|
6
6
|
* event of a tick is delivered and none overwrites another.
|
|
7
7
|
*/
|
|
@@ -13,6 +13,8 @@ export interface PBExplorerUiEventsResult {
|
|
|
13
13
|
ui: ExplorerUi;
|
|
14
14
|
/** The scene tick when the event occurred */
|
|
15
15
|
timestamp: number;
|
|
16
|
+
/** The OpenExplorerUiRequest.request_id that caused this event; 0 when the request carried none */
|
|
17
|
+
requestId: number;
|
|
16
18
|
event?: {
|
|
17
19
|
$case: "opened";
|
|
18
20
|
opened: PBExplorerUiEventsResult_UiOpened;
|
|
@@ -21,13 +23,16 @@ export interface PBExplorerUiEventsResult {
|
|
|
21
23
|
closed: PBExplorerUiEventsResult_UiClosed;
|
|
22
24
|
} | undefined;
|
|
23
25
|
}
|
|
24
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Emitted when an explorer panel is opened. The OpenExplorerUi response carries the same fact,
|
|
28
|
+
* but it reaches only the caller; this channel is scene wide.
|
|
29
|
+
*/
|
|
25
30
|
/**
|
|
26
31
|
* @public
|
|
27
32
|
*/
|
|
28
33
|
export interface PBExplorerUiEventsResult_UiOpened {
|
|
29
34
|
}
|
|
30
|
-
/** Emitted when
|
|
35
|
+
/** Emitted when an explorer panel is closed. */
|
|
31
36
|
/**
|
|
32
37
|
* @public
|
|
33
38
|
*/
|
|
@@ -8,7 +8,7 @@ exports.PBExplorerUiEventsResult_UiClosed = exports.PBExplorerUiEventsResult_UiO
|
|
|
8
8
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
9
|
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
10
10
|
function createBasePBExplorerUiEventsResult() {
|
|
11
|
-
return { ui: 0, timestamp: 0, event: undefined };
|
|
11
|
+
return { ui: 0, timestamp: 0, requestId: 0, event: undefined };
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* @public
|
|
@@ -22,6 +22,9 @@ var PBExplorerUiEventsResult;
|
|
|
22
22
|
if (message.timestamp !== 0) {
|
|
23
23
|
writer.uint32(16).uint32(message.timestamp);
|
|
24
24
|
}
|
|
25
|
+
if (message.requestId !== 0) {
|
|
26
|
+
writer.uint32(24).uint32(message.requestId);
|
|
27
|
+
}
|
|
25
28
|
switch (message.event?.$case) {
|
|
26
29
|
case "opened":
|
|
27
30
|
PBExplorerUiEventsResult_UiOpened.encode(message.event.opened, writer.uint32(82).fork()).ldelim();
|
|
@@ -52,6 +55,12 @@ var PBExplorerUiEventsResult;
|
|
|
52
55
|
}
|
|
53
56
|
message.timestamp = reader.uint32();
|
|
54
57
|
continue;
|
|
58
|
+
case 3:
|
|
59
|
+
if (tag !== 24) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
message.requestId = reader.uint32();
|
|
63
|
+
continue;
|
|
55
64
|
case 10:
|
|
56
65
|
if (tag !== 82) {
|
|
57
66
|
break;
|
|
@@ -23,7 +23,6 @@ import { TriggerAreaComponentDefinitionExtended } from './extended/TriggerArea';
|
|
|
23
23
|
import { ParticleSystemComponentDefinitionExtended } from './extended/ParticleSystem';
|
|
24
24
|
import { TouchScreenControlsComponentDefinitionExtended } from './extended/TouchScreenControls';
|
|
25
25
|
import { TagsComponentDefinitionExtended } from './manual/Tags';
|
|
26
|
-
import { ICreatedByType } from './manual/CreatedBy';
|
|
27
26
|
export * from './generated/index.gen';
|
|
28
27
|
export type { GrowOnlyValueSetComponentDefinition, LastWriteWinElementSetComponentDefinition, LwwComponentGetter, GSetComponentGetter };
|
|
29
28
|
export declare const Transform: LwwComponentGetter<TransformComponentExtended>;
|
|
@@ -58,9 +57,5 @@ export declare const NetworkEntity: (engine: Pick<IEngine, 'defineComponent'>) =
|
|
|
58
57
|
* @alpha
|
|
59
58
|
*/
|
|
60
59
|
export declare const NetworkParent: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<INetowrkParentType>;
|
|
61
|
-
/**
|
|
62
|
-
* @public
|
|
63
|
-
*/
|
|
64
|
-
export declare const CreatedBy: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
65
60
|
export { MediaState };
|
|
66
61
|
export type { AudioAnalysisView };
|
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.MediaState = exports.
|
|
20
|
+
exports.MediaState = exports.NetworkParent = exports.NetworkEntity = exports.SyncComponents = exports.Tags = exports.Name = exports.TouchScreenControls = exports.ParticleSystem = exports.TriggerArea = exports.LightSource = exports.InputModifier = exports.VirtualCamera = exports.Tween = exports.MeshCollider = exports.MeshRenderer = exports.AudioStream = exports.AudioAnalysis = exports.AudioSource = exports.Animator = exports.Material = exports.Transform = void 0;
|
|
21
21
|
const Animator_1 = require("./extended/Animator");
|
|
22
22
|
const AudioSource_1 = require("./extended/AudioSource");
|
|
23
23
|
const AudioAnalysis_1 = require("./extended/AudioAnalysis");
|
|
@@ -40,7 +40,6 @@ const TriggerArea_1 = require("./extended/TriggerArea");
|
|
|
40
40
|
const ParticleSystem_1 = require("./extended/ParticleSystem");
|
|
41
41
|
const TouchScreenControls_1 = require("./extended/TouchScreenControls");
|
|
42
42
|
const Tags_1 = __importDefault(require("./manual/Tags"));
|
|
43
|
-
const CreatedBy_1 = __importDefault(require("./manual/CreatedBy"));
|
|
44
43
|
__exportStar(require("./generated/index.gen"), exports);
|
|
45
44
|
/* @__PURE__ */
|
|
46
45
|
const Transform = (engine) => (0, Transform_1.defineTransformComponent)(engine);
|
|
@@ -105,15 +104,12 @@ exports.SyncComponents = SyncComponents;
|
|
|
105
104
|
/**
|
|
106
105
|
* @alpha
|
|
107
106
|
*/
|
|
107
|
+
/* @__PURE__ */
|
|
108
108
|
const NetworkEntity = (engine) => (0, NetworkEntity_1.default)(engine);
|
|
109
109
|
exports.NetworkEntity = NetworkEntity;
|
|
110
110
|
/**
|
|
111
111
|
* @alpha
|
|
112
112
|
*/
|
|
113
|
+
/* @__PURE__ */
|
|
113
114
|
const NetworkParent = (engine) => (0, NetworkParent_1.default)(engine);
|
|
114
115
|
exports.NetworkParent = NetworkParent;
|
|
115
|
-
/**
|
|
116
|
-
* @public
|
|
117
|
-
*/
|
|
118
|
-
const CreatedBy = (engine) => (0, CreatedBy_1.default)(engine);
|
|
119
|
-
exports.CreatedBy = CreatedBy;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LastWriteWinElementSetComponentDefinition, IEngine } from '../../engine';
|
|
2
2
|
import { Entity } from '../../engine/entity';
|
|
3
|
-
import type { ISchema } from '../../schemas/ISchema';
|
|
4
3
|
import type { Vector3Type } from '../../schemas/custom/Vector3';
|
|
5
4
|
/**
|
|
6
5
|
* @public
|
|
@@ -25,10 +24,6 @@ export interface TransformComponentExtended extends TransformComponent {
|
|
|
25
24
|
*/
|
|
26
25
|
localToWorldDirection(entity: Entity, localDirection: Vector3Type): Vector3Type;
|
|
27
26
|
}
|
|
28
|
-
/**
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
export declare const COMPONENT_ID = 1;
|
|
32
27
|
/**
|
|
33
28
|
* @public
|
|
34
29
|
*/
|
|
@@ -51,10 +46,6 @@ export type TransformType = {
|
|
|
51
46
|
};
|
|
52
47
|
parent?: Entity;
|
|
53
48
|
};
|
|
54
|
-
/** @public */
|
|
55
|
-
export declare const TRANSFORM_LENGTH = 44;
|
|
56
|
-
/** @public */
|
|
57
|
-
export declare const TransformSchema: ISchema<TransformType>;
|
|
58
49
|
/**
|
|
59
50
|
* @public
|
|
60
51
|
*/
|
|
@@ -29,12 +29,12 @@ exports.defineTransformComponent = exports.TransformSchema = exports.TRANSFORM_L
|
|
|
29
29
|
// getters via __importStar in CJS), so by the time methods are called all exports are available.
|
|
30
30
|
const treeHelpers = __importStar(require("../../runtime/helpers/tree"));
|
|
31
31
|
/**
|
|
32
|
-
* @
|
|
32
|
+
* @internal
|
|
33
33
|
*/
|
|
34
34
|
exports.COMPONENT_ID = 1;
|
|
35
|
-
/** @
|
|
35
|
+
/** @internal */
|
|
36
36
|
exports.TRANSFORM_LENGTH = 44;
|
|
37
|
-
/** @
|
|
37
|
+
/** @internal */
|
|
38
38
|
exports.TransformSchema = {
|
|
39
39
|
serialize(value, builder) {
|
|
40
40
|
const ptr = builder.incrementWriteOffset(exports.TRANSFORM_LENGTH);
|
|
@@ -13,7 +13,6 @@ export type { TagsComponentDefinitionExtended, TagsType } from './manual/Tags';
|
|
|
13
13
|
export type { ISyncComponents, ISyncComponentsType } from './manual/SyncComponents';
|
|
14
14
|
export type { INetowrkEntity, INetowrkEntityType } from './manual/NetworkEntity';
|
|
15
15
|
export type { INetowrkParent, INetowrkParentType } from './manual/NetworkParent';
|
|
16
|
-
export type { ICreatedBy, ICreatedByType } from './manual/CreatedBy';
|
|
17
16
|
export type { InputModifierHelper, InputModifierComponentDefinitionExtended } from './extended/InputModifier';
|
|
18
17
|
export type { LightSourceHelper, LightSourceComponentDefinitionExtended } from './extended/LightSource';
|
|
19
18
|
export type { TriggerAreaComponentDefinitionExtended } from './extended/TriggerArea';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ISchema } from '../schemas';
|
|
2
2
|
import { ByteBuffer } from '../serialization/ByteBuffer';
|
|
3
|
-
import { CrdtMessageBody, DeleteComponentMessageBody,
|
|
3
|
+
import { CrdtMessageBody, DeleteComponentMessageBody, PutComponentMessageBody } from '../serialization/crdt';
|
|
4
4
|
import { Entity } from './entity';
|
|
5
5
|
import { DeepReadonly, DeepReadonlySet } from './readonly';
|
|
6
6
|
/**
|
|
@@ -70,58 +70,7 @@ export interface BaseComponent<T> {
|
|
|
70
70
|
* If the value is undefined, the component was deleted.
|
|
71
71
|
*/
|
|
72
72
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
73
|
-
/**
|
|
74
|
-
* @public
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
78
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
79
|
-
/**
|
|
80
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
81
|
-
* @param entity - Entity to get the CRDT state for
|
|
82
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
83
|
-
* @public
|
|
84
|
-
*/
|
|
85
|
-
getCrdtState(entity: Entity): {
|
|
86
|
-
data: Uint8Array;
|
|
87
|
-
timestamp: number;
|
|
88
|
-
} | null;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
92
|
-
* This is not exposed to users, only for internal SDK operations
|
|
93
|
-
*/
|
|
94
|
-
export interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
95
|
-
/**
|
|
96
|
-
* @public
|
|
97
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
98
|
-
*/
|
|
99
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
100
|
-
/**
|
|
101
|
-
* @public
|
|
102
|
-
* Get the iterator to every entity has the component
|
|
103
|
-
*/
|
|
104
|
-
iterator(): Iterable<[Entity, any]>;
|
|
105
|
-
/**
|
|
106
|
-
* @public
|
|
107
|
-
*/
|
|
108
|
-
dirtyIterator(): Iterable<Entity>;
|
|
109
|
-
/**
|
|
110
|
-
* @public
|
|
111
|
-
*/
|
|
112
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
113
|
-
/**
|
|
114
|
-
* @public
|
|
115
|
-
*/
|
|
116
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
117
73
|
}
|
|
118
|
-
export type ValidateCallback<T> = (value: {
|
|
119
|
-
entity: Entity;
|
|
120
|
-
currentValue: T | undefined;
|
|
121
|
-
newValue: T | undefined;
|
|
122
|
-
senderAddress: string;
|
|
123
|
-
createdBy: string;
|
|
124
|
-
}) => boolean;
|
|
125
74
|
/**
|
|
126
75
|
* @public
|
|
127
76
|
*/
|
|
@@ -5,7 +5,6 @@ const ByteBuffer_1 = require("../serialization/ByteBuffer");
|
|
|
5
5
|
const crdt_1 = require("../serialization/crdt");
|
|
6
6
|
const invariant_1 = require("../runtime/invariant");
|
|
7
7
|
const emptyReadonlySet = freezeSet(new Set());
|
|
8
|
-
const __GLOBAL_ENTITY = '__GLOBAL_ENTITY';
|
|
9
8
|
function frozenError() {
|
|
10
9
|
throw new Error('The set is frozen');
|
|
11
10
|
}
|
|
@@ -26,7 +25,6 @@ function createValueSetComponentDefinitionFromSchema(componentName, componentId,
|
|
|
26
25
|
const dirtyIterator = new Set();
|
|
27
26
|
const queuedCommands = [];
|
|
28
27
|
const onChangeCallbacks = new Map();
|
|
29
|
-
const validateCallbacks = new Map();
|
|
30
28
|
// only sort the array if the latest (N) element has a timestamp <= N-1
|
|
31
29
|
function shouldSort(row) {
|
|
32
30
|
const len = row.raw.length;
|
|
@@ -85,11 +83,8 @@ function createValueSetComponentDefinitionFromSchema(componentName, componentId,
|
|
|
85
83
|
has(entity) {
|
|
86
84
|
return data.has(entity);
|
|
87
85
|
},
|
|
88
|
-
entityDeleted(entity
|
|
86
|
+
entityDeleted(entity) {
|
|
89
87
|
data.delete(entity);
|
|
90
|
-
if (markAsDirty) {
|
|
91
|
-
// For grow-only sets, we don't need to mark as dirty since deletion doesn't generate CRDT messages
|
|
92
|
-
}
|
|
93
88
|
},
|
|
94
89
|
get(entity) {
|
|
95
90
|
const values = data.get(entity);
|
|
@@ -160,44 +155,6 @@ function createValueSetComponentDefinitionFromSchema(componentName, componentId,
|
|
|
160
155
|
for (const cb of cbs) {
|
|
161
156
|
cb(value);
|
|
162
157
|
}
|
|
163
|
-
},
|
|
164
|
-
__dry_run_updateFromCrdt(_body) {
|
|
165
|
-
return crdt_1.ProcessMessageResultType.StateUpdatedData;
|
|
166
|
-
},
|
|
167
|
-
validateBeforeChange(entityOrCb, cb) {
|
|
168
|
-
if (arguments.length === 1) {
|
|
169
|
-
// Second overload: just callback (global validation)
|
|
170
|
-
validateCallbacks.set(__GLOBAL_ENTITY, entityOrCb);
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
if (cb) {
|
|
174
|
-
validateCallbacks.set(entityOrCb, cb);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
__run_validateBeforeChange(entity, newValue, senderAddress, createdBy) {
|
|
179
|
-
const cb = entity && validateCallbacks.get(entity);
|
|
180
|
-
const globalCb = validateCallbacks.get(__GLOBAL_ENTITY);
|
|
181
|
-
const currentValue = [...this.get(entity).values()];
|
|
182
|
-
const value = { entity, currentValue: currentValue, newValue, senderAddress, createdBy };
|
|
183
|
-
const globalResult = globalCb?.(value) ?? true;
|
|
184
|
-
const entityResult = (globalResult && cb?.(value)) ?? true;
|
|
185
|
-
return globalResult && entityResult;
|
|
186
|
-
},
|
|
187
|
-
getCrdtState(entity) {
|
|
188
|
-
const row = data.get(entity);
|
|
189
|
-
if (!row || row.raw.length === 0) {
|
|
190
|
-
return null;
|
|
191
|
-
}
|
|
192
|
-
// For GrowOnlySet, we need to return the complete CRDT messages for all values
|
|
193
|
-
// This is complex because GrowOnlySet uses APPEND messages, not a single PUT
|
|
194
|
-
// For now, return null to indicate this component type doesn't support simple corrections
|
|
195
|
-
return null;
|
|
196
|
-
},
|
|
197
|
-
__forceUpdateFromCrdt(_msg) {
|
|
198
|
-
// GrowOnlySet doesn't support authoritative corrections in the same way as LWW
|
|
199
|
-
// since it uses APPEND_VALUE messages instead of PUT_COMPONENT messages
|
|
200
|
-
return [null, undefined];
|
|
201
158
|
}
|
|
202
159
|
};
|
|
203
160
|
return ret;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ISchema } from '../schemas';
|
|
2
2
|
import { ByteBuffer } from '../serialization/ByteBuffer';
|
|
3
|
-
import { PutComponentMessageBody, DeleteComponentMessageBody,
|
|
3
|
+
import { PutComponentMessageBody, DeleteComponentMessageBody, CrdtMessageBody } from '../serialization/crdt';
|
|
4
4
|
import { Entity } from './entity';
|
|
5
5
|
export declare function incrementTimestamp(entity: Entity, timestamps: Map<Entity, number>): number;
|
|
6
6
|
export declare function createDumpLwwFunctionFromCrdt(componentId: number, timestamps: Map<Entity, number>, schema: Pick<ISchema<any>, 'serialize' | 'deserialize'>, data: Map<Entity, unknown>): (buffer: ByteBuffer, filterEntity?: ((entity: Entity) => boolean) | undefined) => void;
|
|
7
|
-
export declare function createCrdtRuleValidator(timestamps: Map<Entity, number>, schema: Pick<ISchema<any>, 'serialize' | 'deserialize'>, data: Map<Entity, unknown>, lastSentData: Map<Entity, Uint8Array>): (message: PutComponentMessageBody | DeleteComponentMessageBody | PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody) => ProcessMessageResultType;
|
|
8
|
-
export declare function createForceUpdateLwwFromCrdt(componentId: number, timestamps: Map<Entity, number>, schema: Pick<ISchema<any>, 'serialize' | 'deserialize'>, data: Map<Entity, unknown>): (msg: AuthoritativePutComponentMessageBody) => [null, any];
|
|
9
7
|
export declare function createUpdateLwwFromCrdt(componentId: number, timestamps: Map<Entity, number>, schema: Pick<ISchema<any>, 'serialize' | 'deserialize'>, data: Map<Entity, unknown>, lastSentData: Map<Entity, Uint8Array>): (msg: CrdtMessageBody) => [null | PutComponentMessageBody | DeleteComponentMessageBody, any];
|
|
10
8
|
export declare function createGetCrdtMessagesForLww(componentId: number, timestamps: Map<Entity, number>, dirtyIterator: Set<Entity>, schema: Pick<ISchema<any>, 'serialize'>, data: Map<Entity, unknown>, lastSentData: Map<Entity, Uint8Array>): () => Generator<PutComponentMessageBody | DeleteComponentMessageBody, void, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createComponentDefinitionFromSchema = exports.createGetCrdtMessagesForLww = exports.createUpdateLwwFromCrdt = exports.
|
|
3
|
+
exports.createComponentDefinitionFromSchema = exports.createGetCrdtMessagesForLww = exports.createUpdateLwwFromCrdt = exports.createDumpLwwFunctionFromCrdt = exports.incrementTimestamp = void 0;
|
|
4
4
|
const ByteBuffer_1 = require("../serialization/ByteBuffer");
|
|
5
5
|
const crdt_1 = require("../serialization/crdt");
|
|
6
6
|
const utils_1 = require("../systems/crdt/utils");
|
|
@@ -35,12 +35,16 @@ function createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
exports.createDumpLwwFunctionFromCrdt = createDumpLwwFunctionFromCrdt;
|
|
38
|
-
|
|
39
|
-
function createCrdtRuleValidator(timestamps, schema, data, lastSentData) {
|
|
38
|
+
function createUpdateLwwFromCrdt(componentId, timestamps, schema, data, lastSentData) {
|
|
40
39
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
|
|
40
|
+
* Process the received message only if the lamport number recieved is higher
|
|
41
|
+
* than the stored one. If its lower, we spread it to the network to correct the peer.
|
|
42
|
+
* If they are equal, the bigger raw data wins.
|
|
43
|
+
|
|
44
|
+
* Returns the recieved data if the lamport number was bigger than ours.
|
|
45
|
+
* If it was an outdated message, then we return void
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
44
48
|
function crdtRuleForCurrentState(message) {
|
|
45
49
|
const { entityId, timestamp } = message;
|
|
46
50
|
const currentTimestamp = timestamps.get(entityId);
|
|
@@ -50,6 +54,7 @@ function createCrdtRuleValidator(timestamps, schema, data, lastSentData) {
|
|
|
50
54
|
}
|
|
51
55
|
// Outdated Message. Resend our state message through the wire.
|
|
52
56
|
if (currentTimestamp > timestamp) {
|
|
57
|
+
// console.log('2', currentTimestamp, timestamp)
|
|
53
58
|
return crdt_1.ProcessMessageResultType.StateOutdatedTimestamp;
|
|
54
59
|
}
|
|
55
60
|
// Deletes are idempotent
|
|
@@ -66,6 +71,7 @@ function createCrdtRuleValidator(timestamps, schema, data, lastSentData) {
|
|
|
66
71
|
currentDataGreater = (0, utils_1.dataCompare)(null, message.data);
|
|
67
72
|
}
|
|
68
73
|
// Same data, same timestamp. Weirdo echo message.
|
|
74
|
+
// console.log('3', currentDataGreater, writeBuffer.toBinary(), (message as any).data || null)
|
|
69
75
|
if (currentDataGreater === 0) {
|
|
70
76
|
return crdt_1.ProcessMessageResultType.NoChanges;
|
|
71
77
|
}
|
|
@@ -74,37 +80,10 @@ function createCrdtRuleValidator(timestamps, schema, data, lastSentData) {
|
|
|
74
80
|
return crdt_1.ProcessMessageResultType.StateOutdatedData;
|
|
75
81
|
}
|
|
76
82
|
else {
|
|
77
|
-
//
|
|
83
|
+
// Curent data is lower
|
|
78
84
|
return crdt_1.ProcessMessageResultType.StateUpdatedData;
|
|
79
85
|
}
|
|
80
86
|
}
|
|
81
|
-
return crdtRuleForCurrentState;
|
|
82
|
-
}
|
|
83
|
-
exports.createCrdtRuleValidator = createCrdtRuleValidator;
|
|
84
|
-
function createForceUpdateLwwFromCrdt(componentId, timestamps, schema, data) {
|
|
85
|
-
/**
|
|
86
|
-
* Force update component state regardless of timestamp - used for server authoritative messages
|
|
87
|
-
*/
|
|
88
|
-
return (msg) => {
|
|
89
|
-
const buffer = new ByteBuffer_1.ReadWriteByteBuffer(msg.data);
|
|
90
|
-
const deserializedValue = schema.deserialize(buffer);
|
|
91
|
-
data.set(msg.entityId, deserializedValue);
|
|
92
|
-
timestamps.set(msg.entityId, msg.timestamp);
|
|
93
|
-
return [null, deserializedValue];
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
exports.createForceUpdateLwwFromCrdt = createForceUpdateLwwFromCrdt;
|
|
97
|
-
function createUpdateLwwFromCrdt(componentId, timestamps, schema, data, lastSentData) {
|
|
98
|
-
/**
|
|
99
|
-
* Process the received message only if the lamport number recieved is higher
|
|
100
|
-
* than the stored one. If its lower, we spread it to the network to correct the peer.
|
|
101
|
-
* If they are equal, the bigger raw data wins.
|
|
102
|
-
|
|
103
|
-
* Returns the recieved data if the lamport number was bigger than ours.
|
|
104
|
-
* If it was an outdated message, then we return void
|
|
105
|
-
* @public
|
|
106
|
-
*/
|
|
107
|
-
const crdtRuleForCurrentState = createCrdtRuleValidator(timestamps, schema, data, lastSentData);
|
|
108
87
|
return (msg) => {
|
|
109
88
|
/* istanbul ignore next */
|
|
110
89
|
if (msg.type !== crdt_1.CrdtMessageType.PUT_COMPONENT &&
|
|
@@ -122,10 +101,7 @@ function createUpdateLwwFromCrdt(componentId, timestamps, schema, data, lastSent
|
|
|
122
101
|
if (msg.type === crdt_1.CrdtMessageType.PUT_COMPONENT || msg.type === crdt_1.CrdtMessageType.PUT_COMPONENT_NETWORK) {
|
|
123
102
|
const buf = new ByteBuffer_1.ReadWriteByteBuffer(msg.data);
|
|
124
103
|
data.set(entity, schema.deserialize(buf));
|
|
125
|
-
|
|
126
|
-
// seeding it from received bytes makes the engine
|
|
127
|
-
// believe it already sent this state, which kills valid re-broadcasting 🧨
|
|
128
|
-
lastSentData.delete(entity);
|
|
104
|
+
lastSentData.set(entity, new Uint8Array(msg.data));
|
|
129
105
|
}
|
|
130
106
|
else {
|
|
131
107
|
data.delete(entity);
|
|
@@ -216,7 +192,6 @@ function createComponentDefinitionFromSchema(componentName, componentId, schema)
|
|
|
216
192
|
const timestamps = new Map();
|
|
217
193
|
const lastSentData = new Map();
|
|
218
194
|
const onChangeCallbacks = new Map();
|
|
219
|
-
const validateCallbacks = new Map();
|
|
220
195
|
return {
|
|
221
196
|
get componentId() {
|
|
222
197
|
return componentId;
|
|
@@ -317,39 +292,7 @@ function createComponentDefinitionFromSchema(componentName, componentId, schema)
|
|
|
317
292
|
},
|
|
318
293
|
getCrdtUpdates: createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data, lastSentData),
|
|
319
294
|
updateFromCrdt: createUpdateLwwFromCrdt(componentId, timestamps, schema, data, lastSentData),
|
|
320
|
-
__forceUpdateFromCrdt: createForceUpdateLwwFromCrdt(componentId, timestamps, schema, data),
|
|
321
|
-
__dry_run_updateFromCrdt: createCrdtRuleValidator(timestamps, schema, data, lastSentData),
|
|
322
295
|
dumpCrdtStateToBuffer: createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data),
|
|
323
|
-
validateBeforeChange(entityOrCb, cb) {
|
|
324
|
-
if (arguments.length === 1) {
|
|
325
|
-
// Second overload: just callback (global validation)
|
|
326
|
-
validateCallbacks.set(__GLOBAL_ENTITY, entityOrCb);
|
|
327
|
-
}
|
|
328
|
-
else {
|
|
329
|
-
if (cb) {
|
|
330
|
-
validateCallbacks.set(entityOrCb, cb);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
__run_validateBeforeChange(entity, newValue, senderAddress, createdBy) {
|
|
335
|
-
const cb = entity && validateCallbacks.get(entity);
|
|
336
|
-
const globalCb = validateCallbacks.get(__GLOBAL_ENTITY);
|
|
337
|
-
const currentValue = data.get(entity);
|
|
338
|
-
const value = { entity, currentValue, newValue, senderAddress, createdBy };
|
|
339
|
-
const globalResult = globalCb?.(value) ?? true;
|
|
340
|
-
const entityResult = (globalResult && cb?.(value)) ?? true;
|
|
341
|
-
return globalResult && entityResult;
|
|
342
|
-
},
|
|
343
|
-
getCrdtState(entity) {
|
|
344
|
-
const componentData = data.get(entity);
|
|
345
|
-
const timestamp = timestamps.get(entity);
|
|
346
|
-
if (componentData && timestamp !== undefined) {
|
|
347
|
-
const buffer = new ByteBuffer_1.ReadWriteByteBuffer();
|
|
348
|
-
schema.serialize((0, readonly_1.deepReadonly)(componentData), buffer);
|
|
349
|
-
return { data: buffer.toBinary(), timestamp };
|
|
350
|
-
}
|
|
351
|
-
return null;
|
|
352
|
-
},
|
|
353
296
|
onChange(entity, cb) {
|
|
354
297
|
const cbs = onChangeCallbacks.get(entity) ?? [];
|
|
355
298
|
cbs.push(cb);
|