@fluidframework/sequence 0.52.1 → 0.54.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/README.md +8 -25
- package/dist/intervalCollection.d.ts +0 -12
- package/dist/intervalCollection.d.ts.map +1 -1
- package/dist/intervalCollection.js +0 -42
- package/dist/intervalCollection.js.map +1 -1
- package/dist/mapKernelInterfaces.d.ts +2 -2
- package/dist/mapKernelInterfaces.d.ts.map +1 -1
- package/dist/mapKernelInterfaces.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/sequence.d.ts.map +1 -1
- package/dist/sequence.js +1 -1
- package/dist/sequence.js.map +1 -1
- package/dist/sequenceFactory.d.ts +62 -0
- package/dist/sequenceFactory.d.ts.map +1 -1
- package/dist/sequenceFactory.js +62 -0
- package/dist/sequenceFactory.js.map +1 -1
- package/dist/sharedNumberSequence.d.ts +17 -0
- package/dist/sharedNumberSequence.d.ts.map +1 -1
- package/dist/sharedNumberSequence.js +17 -0
- package/dist/sharedNumberSequence.js.map +1 -1
- package/dist/sharedObjectSequence.d.ts +17 -0
- package/dist/sharedObjectSequence.d.ts.map +1 -1
- package/dist/sharedObjectSequence.js +17 -0
- package/dist/sharedObjectSequence.js.map +1 -1
- package/lib/intervalCollection.d.ts +0 -12
- package/lib/intervalCollection.d.ts.map +1 -1
- package/lib/intervalCollection.js +0 -42
- package/lib/intervalCollection.js.map +1 -1
- package/lib/mapKernelInterfaces.d.ts +2 -2
- package/lib/mapKernelInterfaces.d.ts.map +1 -1
- package/lib/mapKernelInterfaces.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/sequence.d.ts.map +1 -1
- package/lib/sequence.js +1 -1
- package/lib/sequence.js.map +1 -1
- package/lib/sequenceFactory.d.ts +62 -0
- package/lib/sequenceFactory.d.ts.map +1 -1
- package/lib/sequenceFactory.js +62 -0
- package/lib/sequenceFactory.js.map +1 -1
- package/lib/sharedNumberSequence.d.ts +17 -0
- package/lib/sharedNumberSequence.d.ts.map +1 -1
- package/lib/sharedNumberSequence.js +17 -0
- package/lib/sharedNumberSequence.js.map +1 -1
- package/lib/sharedObjectSequence.d.ts +17 -0
- package/lib/sharedObjectSequence.d.ts.map +1 -1
- package/lib/sharedObjectSequence.js +17 -0
- package/lib/sharedObjectSequence.js.map +1 -1
- package/package.json +11 -11
- package/src/intervalCollection.ts +0 -58
- package/src/mapKernelInterfaces.ts +0 -2
- package/src/packageVersion.ts +1 -1
- package/src/sequence.ts +5 -2
- package/src/sequenceFactory.ts +62 -0
- package/src/sharedNumberSequence.ts +17 -0
- package/src/sharedObjectSequence.ts +17 -0
|
@@ -10,6 +10,9 @@ import { SharedSequence } from "./sharedSequence";
|
|
|
10
10
|
* at a position within the sequence. See the
|
|
11
11
|
* {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}
|
|
12
12
|
* for details on working with sequences.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
15
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
13
16
|
*/
|
|
14
17
|
export declare class SharedObjectSequence<T> extends SharedSequence<T> {
|
|
15
18
|
id: string;
|
|
@@ -19,15 +22,29 @@ export declare class SharedObjectSequence<T> extends SharedSequence<T> {
|
|
|
19
22
|
* @param runtime - data store runtime the new shared object sequence belongs to
|
|
20
23
|
* @param id - optional name of the shared object sequence
|
|
21
24
|
* @returns newly create shared object sequence (but not attached yet)
|
|
25
|
+
*
|
|
26
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
27
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
22
28
|
*/
|
|
23
29
|
static create<T>(runtime: IFluidDataStoreRuntime, id?: string): SharedObjectSequence<T>;
|
|
24
30
|
/**
|
|
25
31
|
* Get a factory for SharedObjectSequence to register with the data store.
|
|
26
32
|
*
|
|
27
33
|
* @returns a factory that creates and load SharedObjectSequence
|
|
34
|
+
*
|
|
35
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
36
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
28
37
|
*/
|
|
29
38
|
static getFactory(): SharedObjectSequenceFactory;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
41
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
42
|
+
*/
|
|
30
43
|
constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
46
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
47
|
+
*/
|
|
31
48
|
getRange(start: number, end?: number): Serializable<T>[];
|
|
32
49
|
}
|
|
33
50
|
//# sourceMappingURL=sharedObjectSequence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,qBAAa,oBAAoB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAgCL,EAAE,EAAE,MAAM;IA/B/D;;;;;;;;;OASG;WAEW,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAIpE;;;;;;;OAOG;WACW,UAAU;IAIxB;;;OAGG;gBACS,QAAQ,EAAE,sBAAsB,EAAS,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB;IAI/F;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE;CAGlE"}
|
|
@@ -9,8 +9,15 @@ import { SharedSequence } from "./sharedSequence";
|
|
|
9
9
|
* at a position within the sequence. See the
|
|
10
10
|
* {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}
|
|
11
11
|
* for details on working with sequences.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
14
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
12
15
|
*/
|
|
13
16
|
export class SharedObjectSequence extends SharedSequence {
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
19
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
20
|
+
*/
|
|
14
21
|
constructor(document, id, attributes) {
|
|
15
22
|
super(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec);
|
|
16
23
|
this.id = id;
|
|
@@ -21,6 +28,9 @@ export class SharedObjectSequence extends SharedSequence {
|
|
|
21
28
|
* @param runtime - data store runtime the new shared object sequence belongs to
|
|
22
29
|
* @param id - optional name of the shared object sequence
|
|
23
30
|
* @returns newly create shared object sequence (but not attached yet)
|
|
31
|
+
*
|
|
32
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
33
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
24
34
|
*/
|
|
25
35
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
26
36
|
static create(runtime, id) {
|
|
@@ -30,10 +40,17 @@ export class SharedObjectSequence extends SharedSequence {
|
|
|
30
40
|
* Get a factory for SharedObjectSequence to register with the data store.
|
|
31
41
|
*
|
|
32
42
|
* @returns a factory that creates and load SharedObjectSequence
|
|
43
|
+
*
|
|
44
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
45
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
33
46
|
*/
|
|
34
47
|
static getFactory() {
|
|
35
48
|
return new SharedObjectSequenceFactory();
|
|
36
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
52
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
53
|
+
*/
|
|
37
54
|
getRange(start, end) {
|
|
38
55
|
return this.getItems(start, end);
|
|
39
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAwB,SAAQ,cAAiB;IA4B1D;;;OAGG;IACH,YAAY,QAAgC,EAAS,EAAU,EAAE,UAA8B;QAC3F,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,2BAA2B,CAAC,eAAe,CAAC,CAAC;QAD5B,OAAE,GAAF,EAAE,CAAQ;IAE/D,CAAC;IAjCD;;;;;;;;;OASG;IACH,wDAAwD;IACjD,MAAM,CAAC,MAAM,CAAI,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,2BAA2B,CAAC,IAAI,CAA4B,CAAC;IAClG,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACpB,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC7C,CAAC;IAUD;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACrC,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime, IChannelAttributes, Serializable } from \"@fluidframework/datastore-definitions\";\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedObjectSequence<T> extends SharedSequence<T> {\n /**\n * Create a new shared object sequence\n *\n * @param runtime - data store runtime the new shared object sequence belongs to\n * @param id - optional name of the shared object sequence\n * @returns newly create shared object sequence (but not attached yet)\n *\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\n // eslint-disable-next-line @typescript-eslint/no-shadow\n public static create<T>(runtime: IFluidDataStoreRuntime, id?: string) {\n return runtime.createChannel(id, SharedObjectSequenceFactory.Type) as SharedObjectSequence<T>;\n }\n\n /**\n * Get a factory for SharedObjectSequence to register with the data store.\n *\n * @returns a factory that creates and load SharedObjectSequence\n *\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\n public static getFactory() {\n return new SharedObjectSequenceFactory();\n }\n\n /**\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\n constructor(document: IFluidDataStoreRuntime, public id: string, attributes: IChannelAttributes) {\n super(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec);\n }\n\n /**\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\n public getRange(start: number, end?: number): Serializable<T>[] {\n return this.getItems(start, end);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/sequence",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "Distributed sequence",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": "https://github.com/microsoft/FluidFramework",
|
|
@@ -60,27 +60,27 @@
|
|
|
60
60
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
61
61
|
"@fluidframework/common-utils": "^0.32.1",
|
|
62
62
|
"@fluidframework/core-interfaces": "^0.41.0",
|
|
63
|
-
"@fluidframework/datastore-definitions": "^0.
|
|
64
|
-
"@fluidframework/merge-tree": "^0.
|
|
63
|
+
"@fluidframework/datastore-definitions": "^0.54.0",
|
|
64
|
+
"@fluidframework/merge-tree": "^0.54.0",
|
|
65
65
|
"@fluidframework/protocol-definitions": "^0.1026.0",
|
|
66
|
-
"@fluidframework/runtime-definitions": "^0.
|
|
67
|
-
"@fluidframework/runtime-utils": "^0.
|
|
68
|
-
"@fluidframework/shared-object-base": "^0.
|
|
69
|
-
"@fluidframework/telemetry-utils": "^0.
|
|
66
|
+
"@fluidframework/runtime-definitions": "^0.54.0",
|
|
67
|
+
"@fluidframework/runtime-utils": "^0.54.0",
|
|
68
|
+
"@fluidframework/shared-object-base": "^0.54.0",
|
|
69
|
+
"@fluidframework/telemetry-utils": "^0.54.0",
|
|
70
70
|
"uuid": "^8.3.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@fluid-internal/test-dds-utils": "^0.
|
|
73
|
+
"@fluid-internal/test-dds-utils": "^0.54.0",
|
|
74
74
|
"@fluidframework/build-common": "^0.23.0",
|
|
75
75
|
"@fluidframework/eslint-config-fluid": "^0.24.0",
|
|
76
76
|
"@fluidframework/gitresources": "^0.1034.0",
|
|
77
|
-
"@fluidframework/mocha-test-setup": "^0.
|
|
77
|
+
"@fluidframework/mocha-test-setup": "^0.54.0",
|
|
78
78
|
"@fluidframework/server-services-client": "^0.1034.0",
|
|
79
|
-
"@fluidframework/test-runtime-utils": "^0.
|
|
79
|
+
"@fluidframework/test-runtime-utils": "^0.54.0",
|
|
80
80
|
"@microsoft/api-extractor": "^7.16.1",
|
|
81
81
|
"@types/diff": "^3.5.1",
|
|
82
82
|
"@types/mocha": "^8.2.2",
|
|
83
|
-
"@types/node": "^
|
|
83
|
+
"@types/node": "^14.18.0",
|
|
84
84
|
"@types/random-js": "^1.0.31",
|
|
85
85
|
"@typescript-eslint/eslint-plugin": "~4.14.0",
|
|
86
86
|
"@typescript-eslint/parser": "~4.14.0",
|
|
@@ -653,31 +653,6 @@ export class LocalIntervalCollection<TInterval extends ISerializableInterval> {
|
|
|
653
653
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
654
654
|
return intervals.map((interval) => interval.serialize(client));
|
|
655
655
|
}
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* @deprecated This method only exists to support the deprecated IntervalCollection.delete(start, end).
|
|
659
|
-
*/
|
|
660
|
-
public getLegacyInterval(start: number, end: number): TInterval | undefined {
|
|
661
|
-
const transientInterval: TInterval = this.helpers.create(
|
|
662
|
-
"transient",
|
|
663
|
-
start,
|
|
664
|
-
end,
|
|
665
|
-
this.client,
|
|
666
|
-
IntervalType.Transient,
|
|
667
|
-
);
|
|
668
|
-
|
|
669
|
-
let result: TInterval;
|
|
670
|
-
this.mapUntil((interval: TInterval): boolean => {
|
|
671
|
-
if (interval.compareStart(transientInterval) === 0 &&
|
|
672
|
-
interval.compareEnd(transientInterval) === 0 &&
|
|
673
|
-
interval.getIntervalId()?.startsWith(LocalIntervalCollection.legacyIdPrefix)) {
|
|
674
|
-
result = interval;
|
|
675
|
-
return false;
|
|
676
|
-
}
|
|
677
|
-
return true;
|
|
678
|
-
});
|
|
679
|
-
return result;
|
|
680
|
-
}
|
|
681
656
|
}
|
|
682
657
|
|
|
683
658
|
const compareSequenceIntervalEnds = (a: SequenceInterval, b: SequenceInterval): number => a.end.compare(b.end);
|
|
@@ -960,23 +935,6 @@ export class IntervalCollection<TInterval extends ISerializableInterval>
|
|
|
960
935
|
return interval;
|
|
961
936
|
}
|
|
962
937
|
|
|
963
|
-
/**
|
|
964
|
-
* @deprecated delete by start/end position is deprecated. Use removeIntervalById.
|
|
965
|
-
*/
|
|
966
|
-
public delete(
|
|
967
|
-
start: number,
|
|
968
|
-
end: number,
|
|
969
|
-
) {
|
|
970
|
-
if (!this.attached) {
|
|
971
|
-
throw new Error("attach must be called prior to deleting intervals");
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
const interval = this.localCollection.getLegacyInterval(start, end);
|
|
975
|
-
if (interval) {
|
|
976
|
-
this.deleteExistingInterval(interval, true, undefined);
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
|
|
980
938
|
private deleteExistingInterval(interval: TInterval, local: boolean, op: ISequencedDocumentMessage) {
|
|
981
939
|
// The given interval is known to exist in the collection.
|
|
982
940
|
this.localCollection.removeExistingInterval(interval);
|
|
@@ -1194,22 +1152,6 @@ export class IntervalCollection<TInterval extends ISerializableInterval>
|
|
|
1194
1152
|
});
|
|
1195
1153
|
}
|
|
1196
1154
|
|
|
1197
|
-
/**
|
|
1198
|
-
* @deprecated IntervalCollectionView has been removed. Refer to IntervalCollection directly.
|
|
1199
|
-
*/
|
|
1200
|
-
public async getView(onDeserialize?: DeserializeCallback): Promise<IntervalCollection<TInterval>> {
|
|
1201
|
-
if (!this.attached) {
|
|
1202
|
-
return Promise.reject(new Error("attachSequence must be called prior to retrieving the view"));
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
// Attach custom deserializers if specified
|
|
1206
|
-
if (onDeserialize) {
|
|
1207
|
-
this.attachDeserializer(onDeserialize);
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
return this;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
1155
|
public addInternal(
|
|
1214
1156
|
serializedInterval: ISerializedInterval,
|
|
1215
1157
|
local: boolean,
|
|
@@ -118,11 +118,9 @@ export interface ISharedMapEvents extends ISharedObjectEvents {
|
|
|
118
118
|
(event: "valueChanged", listener: (
|
|
119
119
|
changed: IValueChanged,
|
|
120
120
|
local: boolean,
|
|
121
|
-
op: ISequencedDocumentMessage | null,
|
|
122
121
|
target: IEventThisPlaceHolder) => void);
|
|
123
122
|
(event: "clear", listener: (
|
|
124
123
|
local: boolean,
|
|
125
|
-
op: ISequencedDocumentMessage | null,
|
|
126
124
|
target: IEventThisPlaceHolder
|
|
127
125
|
) => void);
|
|
128
126
|
}
|
package/src/packageVersion.ts
CHANGED
package/src/sequence.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { Deferred, bufferToString, assert } from "@fluidframework/common-utils";
|
|
6
|
-
import { IFluidSerializer } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { IFluidHandle, IFluidSerializer } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { ChildLogger } from "@fluidframework/telemetry-utils";
|
|
8
8
|
import {
|
|
9
9
|
FileMode,
|
|
@@ -461,7 +461,10 @@ export abstract class SharedSegmentSequence<T extends ISegment>
|
|
|
461
461
|
protected getGCDataCore(): IGarbageCollectionData {
|
|
462
462
|
// Create a SummarySerializer and use it to serialize all the cells. It keeps track of all IFluidHandles that it
|
|
463
463
|
// serializes.
|
|
464
|
-
const serializer = new SummarySerializer(
|
|
464
|
+
const serializer = new SummarySerializer(
|
|
465
|
+
this.runtime.channelsRoutingContext,
|
|
466
|
+
(handle: IFluidHandle) => this.handleDecoded(handle),
|
|
467
|
+
);
|
|
465
468
|
|
|
466
469
|
if (this.intervalMapKernel.size > 0) {
|
|
467
470
|
this.intervalMapKernel.serialize(serializer);
|
package/src/sequenceFactory.ts
CHANGED
|
@@ -68,15 +68,31 @@ export class SharedStringFactory implements IChannelFactory {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
73
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
74
|
+
*/
|
|
71
75
|
export class SharedObjectSequenceFactory implements IChannelFactory {
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
78
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
79
|
+
*/
|
|
72
80
|
public static Type = "https://graph.microsoft.com/types/mergeTree/object-sequence";
|
|
73
81
|
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
84
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
85
|
+
*/
|
|
74
86
|
public static readonly Attributes: IChannelAttributes = {
|
|
75
87
|
type: SharedObjectSequenceFactory.Type,
|
|
76
88
|
snapshotFormatVersion: "0.1",
|
|
77
89
|
packageVersion: pkgVersion,
|
|
78
90
|
};
|
|
79
91
|
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
94
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
95
|
+
*/
|
|
80
96
|
public static segmentFromSpec(segSpec: IJSONSegment) {
|
|
81
97
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
82
98
|
const runSegment = segSpec as IJSONRunSegment<object>;
|
|
@@ -90,16 +106,27 @@ export class SharedObjectSequenceFactory implements IChannelFactory {
|
|
|
90
106
|
}
|
|
91
107
|
}
|
|
92
108
|
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
111
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
112
|
+
*/
|
|
93
113
|
public get type() {
|
|
94
114
|
return SharedObjectSequenceFactory.Type;
|
|
95
115
|
}
|
|
96
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
119
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
120
|
+
*/
|
|
97
121
|
public get attributes() {
|
|
98
122
|
return SharedObjectSequenceFactory.Attributes;
|
|
99
123
|
}
|
|
100
124
|
|
|
101
125
|
/**
|
|
102
126
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
127
|
+
*
|
|
128
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
129
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
103
130
|
*/
|
|
104
131
|
public async load(
|
|
105
132
|
runtime: IFluidDataStoreRuntime,
|
|
@@ -112,6 +139,10 @@ export class SharedObjectSequenceFactory implements IChannelFactory {
|
|
|
112
139
|
return sharedSeq;
|
|
113
140
|
}
|
|
114
141
|
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
144
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
145
|
+
*/
|
|
115
146
|
public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {
|
|
116
147
|
const sharedString = new SharedObjectSequence(document, id, this.attributes);
|
|
117
148
|
sharedString.initializeLocal();
|
|
@@ -119,15 +150,31 @@ export class SharedObjectSequenceFactory implements IChannelFactory {
|
|
|
119
150
|
}
|
|
120
151
|
}
|
|
121
152
|
|
|
153
|
+
/**
|
|
154
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
155
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
156
|
+
*/
|
|
122
157
|
export class SharedNumberSequenceFactory implements IChannelFactory {
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
160
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
161
|
+
*/
|
|
123
162
|
public static Type = "https://graph.microsoft.com/types/mergeTree/number-sequence";
|
|
124
163
|
|
|
164
|
+
/**
|
|
165
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
166
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
167
|
+
*/
|
|
125
168
|
public static readonly Attributes: IChannelAttributes = {
|
|
126
169
|
type: SharedNumberSequenceFactory.Type,
|
|
127
170
|
snapshotFormatVersion: "0.1",
|
|
128
171
|
packageVersion: pkgVersion,
|
|
129
172
|
};
|
|
130
173
|
|
|
174
|
+
/**
|
|
175
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
176
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
177
|
+
*/
|
|
131
178
|
public static segmentFromSpec(segSpec: IJSONSegment) {
|
|
132
179
|
const runSegment = segSpec as IJSONRunSegment<number>;
|
|
133
180
|
if (runSegment.items) {
|
|
@@ -139,16 +186,27 @@ export class SharedNumberSequenceFactory implements IChannelFactory {
|
|
|
139
186
|
}
|
|
140
187
|
}
|
|
141
188
|
|
|
189
|
+
/**
|
|
190
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
191
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
192
|
+
*/
|
|
142
193
|
public get type() {
|
|
143
194
|
return SharedNumberSequenceFactory.Type;
|
|
144
195
|
}
|
|
145
196
|
|
|
197
|
+
/**
|
|
198
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
199
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
200
|
+
*/
|
|
146
201
|
public get attributes() {
|
|
147
202
|
return SharedNumberSequenceFactory.Attributes;
|
|
148
203
|
}
|
|
149
204
|
|
|
150
205
|
/**
|
|
151
206
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
207
|
+
*
|
|
208
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
209
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
152
210
|
*/
|
|
153
211
|
public async load(
|
|
154
212
|
runtime: IFluidDataStoreRuntime,
|
|
@@ -160,6 +218,10 @@ export class SharedNumberSequenceFactory implements IChannelFactory {
|
|
|
160
218
|
return sharedSeq;
|
|
161
219
|
}
|
|
162
220
|
|
|
221
|
+
/**
|
|
222
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
223
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
224
|
+
*/
|
|
163
225
|
public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {
|
|
164
226
|
const sharedString = new SharedNumberSequence(document, id, this.attributes);
|
|
165
227
|
sharedString.initializeLocal();
|
|
@@ -12,6 +12,9 @@ import { SharedSequence } from "./sharedSequence";
|
|
|
12
12
|
* at a position within the sequence. See the
|
|
13
13
|
* {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}
|
|
14
14
|
* for details on working with sequences.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
17
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
15
18
|
*/
|
|
16
19
|
export class SharedNumberSequence extends SharedSequence<number> {
|
|
17
20
|
/**
|
|
@@ -20,6 +23,9 @@ export class SharedNumberSequence extends SharedSequence<number> {
|
|
|
20
23
|
* @param runtime - data store runtime the new shared number sequence belongs to
|
|
21
24
|
* @param id - optional name of the shared number sequence
|
|
22
25
|
* @returns newly create shared number sequence (but not attached yet)
|
|
26
|
+
*
|
|
27
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
28
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
23
29
|
*/
|
|
24
30
|
public static create(runtime: IFluidDataStoreRuntime, id?: string) {
|
|
25
31
|
return runtime.createChannel(id,
|
|
@@ -30,15 +36,26 @@ export class SharedNumberSequence extends SharedSequence<number> {
|
|
|
30
36
|
* Get a factory for SharedNumberSequence to register with the data store.
|
|
31
37
|
*
|
|
32
38
|
* @returns a factory that creates and load SharedNumberSequence
|
|
39
|
+
*
|
|
40
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
41
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
33
42
|
*/
|
|
34
43
|
public static getFactory() {
|
|
35
44
|
return new SharedNumberSequenceFactory();
|
|
36
45
|
}
|
|
37
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
49
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
50
|
+
*/
|
|
38
51
|
constructor(document: IFluidDataStoreRuntime, public id: string, attributes: IChannelAttributes) {
|
|
39
52
|
super(document, id, attributes, SharedNumberSequenceFactory.segmentFromSpec);
|
|
40
53
|
}
|
|
41
54
|
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
57
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
58
|
+
*/
|
|
42
59
|
public getRange(start: number, end?: number) {
|
|
43
60
|
return this.getItems(start, end);
|
|
44
61
|
}
|
|
@@ -12,6 +12,9 @@ import { SharedSequence } from "./sharedSequence";
|
|
|
12
12
|
* at a position within the sequence. See the
|
|
13
13
|
* {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}
|
|
14
14
|
* for details on working with sequences.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
17
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
15
18
|
*/
|
|
16
19
|
export class SharedObjectSequence<T> extends SharedSequence<T> {
|
|
17
20
|
/**
|
|
@@ -20,6 +23,9 @@ export class SharedObjectSequence<T> extends SharedSequence<T> {
|
|
|
20
23
|
* @param runtime - data store runtime the new shared object sequence belongs to
|
|
21
24
|
* @param id - optional name of the shared object sequence
|
|
22
25
|
* @returns newly create shared object sequence (but not attached yet)
|
|
26
|
+
*
|
|
27
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
28
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
23
29
|
*/
|
|
24
30
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
25
31
|
public static create<T>(runtime: IFluidDataStoreRuntime, id?: string) {
|
|
@@ -30,15 +36,26 @@ export class SharedObjectSequence<T> extends SharedSequence<T> {
|
|
|
30
36
|
* Get a factory for SharedObjectSequence to register with the data store.
|
|
31
37
|
*
|
|
32
38
|
* @returns a factory that creates and load SharedObjectSequence
|
|
39
|
+
*
|
|
40
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
41
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
33
42
|
*/
|
|
34
43
|
public static getFactory() {
|
|
35
44
|
return new SharedObjectSequenceFactory();
|
|
36
45
|
}
|
|
37
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
49
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
50
|
+
*/
|
|
38
51
|
constructor(document: IFluidDataStoreRuntime, public id: string, attributes: IChannelAttributes) {
|
|
39
52
|
super(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec);
|
|
40
53
|
}
|
|
41
54
|
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
57
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
58
|
+
*/
|
|
42
59
|
public getRange(start: number, end?: number): Serializable<T>[] {
|
|
43
60
|
return this.getItems(start, end);
|
|
44
61
|
}
|