@fluidframework/tree 2.100.0 → 2.100.1
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/api-report/tree.alpha.api.md +3 -1
- package/api-report/tree.beta.api.md +3 -1
- package/api-report/tree.legacy.beta.api.md +3 -1
- package/dist/core/change-family/changeFamily.d.ts +23 -0
- package/dist/core/change-family/changeFamily.d.ts.map +1 -1
- package/dist/core/change-family/changeFamily.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.js +2 -0
- package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js +2 -0
- package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +13 -4
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +30 -3
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +27 -0
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +3 -0
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +4 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +2 -0
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +35 -1
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +6 -0
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +1 -0
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +2 -0
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +2 -0
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -0
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +14 -0
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +14 -0
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -0
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -0
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +9 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +20 -5
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +4 -0
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +4 -0
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +4 -0
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +23 -0
- package/lib/core/change-family/changeFamily.d.ts.map +1 -1
- package/lib/core/change-family/changeFamily.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js +2 -0
- package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -0
- package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +13 -4
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +30 -3
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +27 -0
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +3 -0
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +4 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +2 -0
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +35 -1
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +6 -0
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +1 -0
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +2 -0
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +2 -0
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -0
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +14 -0
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +14 -0
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -0
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -0
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +9 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +20 -5
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js +4 -0
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +4 -0
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +4 -0
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/package.json +21 -21
- package/src/core/change-family/changeFamily.ts +25 -0
- package/src/core/tree/detachedFieldIndexCodecV1.ts +2 -0
- package/src/core/tree/detachedFieldIndexCodecV2.ts +2 -0
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +59 -10
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +30 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +4 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +2 -0
- package/src/shared-tree/sharedTree.ts +41 -1
- package/src/shared-tree/sharedTreeChangeCodecs.ts +1 -0
- package/src/shared-tree/treeAlpha.ts +2 -0
- package/src/shared-tree/treeCheckout.ts +2 -0
- package/src/shared-tree-core/editManagerCodecs.ts +3 -0
- package/src/shared-tree-core/editManagerCodecsCommons.ts +29 -0
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +3 -0
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +3 -0
- package/src/shared-tree-core/editManagerSummarizer.ts +17 -5
- package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -0
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +5 -1
- package/src/shared-tree-core/sharedTreeCore.ts +8 -1
|
@@ -28,6 +28,20 @@ import type {
|
|
|
28
28
|
export interface EditManagerEncodingContext {
|
|
29
29
|
idCompressor: IIdCompressor;
|
|
30
30
|
readonly schema?: SchemaAndPolicy;
|
|
31
|
+
/**
|
|
32
|
+
* See {@link ChangeEncodingContext.isSummary}. EditManager codec callers
|
|
33
|
+
* always set this to `true` (the codec is only invoked for summaries),
|
|
34
|
+
* but it is carried explicitly so downstream codecs can read it.
|
|
35
|
+
*/
|
|
36
|
+
readonly isSummary: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* See {@link ChangeEncodingContext.healUnresolvableIdentifiersOnDecode}.
|
|
39
|
+
*/
|
|
40
|
+
readonly healUnresolvableIdentifiersOnDecode?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* See {@link ChangeEncodingContext.sharedObjectId}.
|
|
43
|
+
*/
|
|
44
|
+
readonly sharedObjectId?: string;
|
|
31
45
|
}
|
|
32
46
|
|
|
33
47
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
@@ -53,6 +67,7 @@ function encodeCommit<TChangeset, T extends Commit<TChangeset>>(
|
|
|
53
67
|
originatorId: commit.sessionId,
|
|
54
68
|
idCompressor: context.idCompressor,
|
|
55
69
|
revision: undefined,
|
|
70
|
+
isSummary: context.isSummary,
|
|
56
71
|
}),
|
|
57
72
|
change: changeCodec.encode(commit.change, { ...context, revision: commit.revision }),
|
|
58
73
|
};
|
|
@@ -79,6 +94,7 @@ function decodeCommit<TChangeset, T extends EncodedCommit<JsonCompatibleReadOnly
|
|
|
79
94
|
originatorId: commit.sessionId,
|
|
80
95
|
idCompressor: context.idCompressor,
|
|
81
96
|
revision: undefined,
|
|
97
|
+
isSummary: context.isSummary,
|
|
82
98
|
});
|
|
83
99
|
|
|
84
100
|
return {
|
|
@@ -112,6 +128,7 @@ export function encodeSharedBranch<TChangeset>(
|
|
|
112
128
|
idCompressor: context.idCompressor,
|
|
113
129
|
schema: context.schema,
|
|
114
130
|
revision: undefined,
|
|
131
|
+
isSummary: context.isSummary,
|
|
115
132
|
}),
|
|
116
133
|
),
|
|
117
134
|
peers: Array.from(data.peerLocalBranches.entries(), ([sessionId, branch]) => [
|
|
@@ -121,6 +138,7 @@ export function encodeSharedBranch<TChangeset>(
|
|
|
121
138
|
originatorId: sessionId,
|
|
122
139
|
idCompressor: context.idCompressor,
|
|
123
140
|
revision: undefined,
|
|
141
|
+
isSummary: context.isSummary,
|
|
124
142
|
}),
|
|
125
143
|
commits: branch.commits.map((commit) =>
|
|
126
144
|
encodeCommit(changeCodec, revisionTagCodec, commit, {
|
|
@@ -128,6 +146,7 @@ export function encodeSharedBranch<TChangeset>(
|
|
|
128
146
|
idCompressor: context.idCompressor,
|
|
129
147
|
schema: context.schema,
|
|
130
148
|
revision: undefined,
|
|
149
|
+
isSummary: context.isSummary,
|
|
131
150
|
}),
|
|
132
151
|
),
|
|
133
152
|
},
|
|
@@ -154,6 +173,7 @@ export function encodeSharedBranch<TChangeset>(
|
|
|
154
173
|
originatorId,
|
|
155
174
|
idCompressor: context.idCompressor,
|
|
156
175
|
revision: undefined,
|
|
176
|
+
isSummary: context.isSummary,
|
|
157
177
|
});
|
|
158
178
|
}
|
|
159
179
|
return json;
|
|
@@ -186,6 +206,9 @@ export function decodeSharedBranch<TChangeset>(
|
|
|
186
206
|
originatorId: commit.sessionId,
|
|
187
207
|
idCompressor: context.idCompressor,
|
|
188
208
|
revision: undefined,
|
|
209
|
+
isSummary: context.isSummary,
|
|
210
|
+
healUnresolvableIdentifiersOnDecode: context.healUnresolvableIdentifiersOnDecode,
|
|
211
|
+
sharedObjectId: context.sharedObjectId,
|
|
189
212
|
}),
|
|
190
213
|
),
|
|
191
214
|
peerLocalBranches: new Map(
|
|
@@ -196,6 +219,7 @@ export function decodeSharedBranch<TChangeset>(
|
|
|
196
219
|
originatorId: sessionId,
|
|
197
220
|
idCompressor: context.idCompressor,
|
|
198
221
|
revision: undefined,
|
|
222
|
+
isSummary: context.isSummary,
|
|
199
223
|
}),
|
|
200
224
|
commits: branch.commits.map((commit) =>
|
|
201
225
|
// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.
|
|
@@ -207,6 +231,10 @@ export function decodeSharedBranch<TChangeset>(
|
|
|
207
231
|
originatorId: commit.sessionId,
|
|
208
232
|
idCompressor: context.idCompressor,
|
|
209
233
|
revision: undefined,
|
|
234
|
+
isSummary: context.isSummary,
|
|
235
|
+
healUnresolvableIdentifiersOnDecode:
|
|
236
|
+
context.healUnresolvableIdentifiersOnDecode,
|
|
237
|
+
sharedObjectId: context.sharedObjectId,
|
|
210
238
|
},
|
|
211
239
|
),
|
|
212
240
|
),
|
|
@@ -239,6 +267,7 @@ export function decodeSharedBranch<TChangeset>(
|
|
|
239
267
|
originatorId,
|
|
240
268
|
idCompressor: context.idCompressor,
|
|
241
269
|
revision: undefined,
|
|
270
|
+
isSummary: context.isSummary,
|
|
242
271
|
});
|
|
243
272
|
}
|
|
244
273
|
return data;
|
|
@@ -25,6 +25,9 @@ import { EncodedEditManager } from "./editManagerFormatV1toV4.js";
|
|
|
25
25
|
export interface EditManagerEncodingContext {
|
|
26
26
|
idCompressor: IIdCompressor;
|
|
27
27
|
readonly schema?: SchemaAndPolicy;
|
|
28
|
+
readonly isSummary: boolean;
|
|
29
|
+
readonly healUnresolvableIdentifiersOnDecode?: boolean;
|
|
30
|
+
readonly sharedObjectId?: string;
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
/**
|
|
@@ -29,6 +29,9 @@ import { EncodedEditManager } from "./editManagerFormatVSharedBranches.js";
|
|
|
29
29
|
export interface EditManagerEncodingContext {
|
|
30
30
|
idCompressor: IIdCompressor;
|
|
31
31
|
readonly schema?: SchemaAndPolicy;
|
|
32
|
+
readonly isSummary: boolean;
|
|
33
|
+
readonly healUnresolvableIdentifiersOnDecode?: boolean;
|
|
34
|
+
readonly sharedObjectId?: string;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
export function makeSharedBranchesCodecWithVersion<TChangeset>(
|
|
@@ -85,6 +85,10 @@ export class EditManagerSummarizer<TChangeset>
|
|
|
85
85
|
private readonly idCompressor: IIdCompressor,
|
|
86
86
|
minVersionForCollab: MinimumVersionForCollab,
|
|
87
87
|
private readonly schemaAndPolicy?: SchemaAndPolicy,
|
|
88
|
+
/** See {@link EditManagerEncodingContext.healUnresolvableIdentifiersOnDecode}. */
|
|
89
|
+
private readonly healUnresolvableIdentifiersOnDecode?: boolean,
|
|
90
|
+
/** See {@link EditManagerEncodingContext.sharedObjectId}. */
|
|
91
|
+
private readonly sharedObjectId?: string,
|
|
88
92
|
) {
|
|
89
93
|
super(
|
|
90
94
|
EditManagerSummarizer.key,
|
|
@@ -103,10 +107,13 @@ export class EditManagerSummarizer<TChangeset>
|
|
|
103
107
|
builder: SummaryTreeBuilder;
|
|
104
108
|
}): void {
|
|
105
109
|
const { stringify, builder } = props;
|
|
106
|
-
const context: EditManagerEncodingContext =
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
const context: EditManagerEncodingContext = {
|
|
111
|
+
idCompressor: this.idCompressor,
|
|
112
|
+
schema: this.schemaAndPolicy,
|
|
113
|
+
isSummary: true,
|
|
114
|
+
healUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,
|
|
115
|
+
sharedObjectId: this.sharedObjectId,
|
|
116
|
+
};
|
|
110
117
|
const jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);
|
|
111
118
|
const dataString = stringify(jsonCompatible);
|
|
112
119
|
builder.addBlob(stringKey, dataString);
|
|
@@ -127,7 +134,12 @@ export class EditManagerSummarizer<TChangeset>
|
|
|
127
134
|
);
|
|
128
135
|
|
|
129
136
|
const summary = parse(bufferToString(schemaBuffer, "utf8")) as JsonCompatibleReadOnly;
|
|
130
|
-
const data = this.codec.decode(summary, {
|
|
137
|
+
const data = this.codec.decode(summary, {
|
|
138
|
+
idCompressor: this.idCompressor,
|
|
139
|
+
isSummary: true,
|
|
140
|
+
healUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,
|
|
141
|
+
sharedObjectId: this.sharedObjectId,
|
|
142
|
+
});
|
|
131
143
|
this.editManager.loadSummaryData(data);
|
|
132
144
|
}
|
|
133
145
|
}
|
|
@@ -55,6 +55,7 @@ export function makeV1ToV4CodecWithVersion<TChangeset>(
|
|
|
55
55
|
originatorId,
|
|
56
56
|
idCompressor: context.idCompressor,
|
|
57
57
|
revision: undefined,
|
|
58
|
+
isSummary: false,
|
|
58
59
|
}),
|
|
59
60
|
originatorId,
|
|
60
61
|
changeset: changeCodec.encode(commit.change, {
|
|
@@ -62,6 +63,7 @@ export function makeV1ToV4CodecWithVersion<TChangeset>(
|
|
|
62
63
|
schema: context.schema,
|
|
63
64
|
idCompressor: context.idCompressor,
|
|
64
65
|
revision: commit.revision,
|
|
66
|
+
isSummary: false,
|
|
65
67
|
}),
|
|
66
68
|
version,
|
|
67
69
|
};
|
|
@@ -76,6 +78,7 @@ export function makeV1ToV4CodecWithVersion<TChangeset>(
|
|
|
76
78
|
originatorId,
|
|
77
79
|
revision: undefined,
|
|
78
80
|
idCompressor: context.idCompressor,
|
|
81
|
+
isSummary: false,
|
|
79
82
|
});
|
|
80
83
|
|
|
81
84
|
return {
|
|
@@ -87,6 +90,7 @@ export function makeV1ToV4CodecWithVersion<TChangeset>(
|
|
|
87
90
|
originatorId,
|
|
88
91
|
revision,
|
|
89
92
|
idCompressor: context.idCompressor,
|
|
93
|
+
isSummary: false,
|
|
90
94
|
}),
|
|
91
95
|
},
|
|
92
96
|
sessionId: originatorId,
|
|
@@ -47,6 +47,7 @@ export function makeSharedBranchesCodecWithVersion<TChangeset>(
|
|
|
47
47
|
schema: context.schema,
|
|
48
48
|
idCompressor: context.idCompressor,
|
|
49
49
|
revision: message.commit.revision,
|
|
50
|
+
isSummary: false,
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
return {
|
|
@@ -54,6 +55,7 @@ export function makeSharedBranchesCodecWithVersion<TChangeset>(
|
|
|
54
55
|
originatorId: message.sessionId,
|
|
55
56
|
idCompressor: context.idCompressor,
|
|
56
57
|
revision: undefined,
|
|
58
|
+
isSummary: false,
|
|
57
59
|
}),
|
|
58
60
|
originatorId: message.sessionId,
|
|
59
61
|
changeset: changeCodec.encode(message.commit.change, changeContext),
|
|
@@ -84,10 +86,11 @@ export function makeSharedBranchesCodecWithVersion<TChangeset>(
|
|
|
84
86
|
branchId: encodedBranchId,
|
|
85
87
|
} = encoded;
|
|
86
88
|
|
|
87
|
-
const changeContext = {
|
|
89
|
+
const changeContext: ChangeEncodingContext = {
|
|
88
90
|
originatorId,
|
|
89
91
|
revision: undefined,
|
|
90
92
|
idCompressor: context.idCompressor,
|
|
93
|
+
isSummary: false,
|
|
91
94
|
};
|
|
92
95
|
|
|
93
96
|
const branchId = decodeBranchId(context.idCompressor, encodedBranchId, changeContext);
|
|
@@ -107,6 +110,7 @@ export function makeSharedBranchesCodecWithVersion<TChangeset>(
|
|
|
107
110
|
originatorId,
|
|
108
111
|
revision,
|
|
109
112
|
idCompressor: context.idCompressor,
|
|
113
|
+
isSummary: false,
|
|
110
114
|
}),
|
|
111
115
|
},
|
|
112
116
|
branchId,
|
|
@@ -73,7 +73,12 @@ export interface ClonableSchemaAndPolicy extends SchemaAndPolicy {
|
|
|
73
73
|
schema: TreeStoredSchemaRepository;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
export interface SharedTreeCoreOptionsInternal extends CodecWriteOptions {
|
|
76
|
+
export interface SharedTreeCoreOptionsInternal extends CodecWriteOptions {
|
|
77
|
+
/**
|
|
78
|
+
* See {@link SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode}.
|
|
79
|
+
*/
|
|
80
|
+
readonly healUnresolvableIdentifiersOnDecode?: boolean;
|
|
81
|
+
}
|
|
77
82
|
|
|
78
83
|
export interface EnrichmentConfig<TChange> {
|
|
79
84
|
readonly enricher: ChangeEnricher<TChange>;
|
|
@@ -192,6 +197,8 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
192
197
|
this.idCompressor,
|
|
193
198
|
options.minVersionForCollab,
|
|
194
199
|
this.schemaAndPolicy,
|
|
200
|
+
options.healUnresolvableIdentifiersOnDecode,
|
|
201
|
+
sharedObject.id,
|
|
195
202
|
),
|
|
196
203
|
...summarizables,
|
|
197
204
|
];
|