@fluidframework/ordered-collection 2.0.0-internal.8.0.1 → 2.0.0-rc.1.0.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/CHANGELOG.md +34 -0
- package/README.md +0 -6
- package/api-extractor-esm.json +4 -0
- package/api-extractor-lint.json +1 -10
- package/api-extractor.json +1 -9
- package/api-report/ordered-collection.api.md +8 -8
- package/dist/consensusOrderedCollection.d.ts +1 -1
- package/dist/{consensusOrderedCollection.cjs → consensusOrderedCollection.js} +3 -3
- package/dist/consensusOrderedCollection.js.map +1 -0
- package/dist/{consensusOrderedCollectionFactory.cjs → consensusOrderedCollectionFactory.js} +3 -3
- package/dist/consensusOrderedCollectionFactory.js.map +1 -0
- package/dist/consensusQueue.d.ts +1 -1
- package/dist/{consensusQueue.cjs → consensusQueue.js} +5 -5
- package/dist/consensusQueue.js.map +1 -0
- package/dist/{index.cjs → index.js} +5 -5
- package/dist/index.js.map +1 -0
- package/dist/interfaces.d.ts +6 -6
- package/dist/{interfaces.cjs → interfaces.js} +2 -2
- package/dist/interfaces.js.map +1 -0
- package/dist/ordered-collection-alpha.d.ts +199 -8
- package/dist/ordered-collection-beta.d.ts +0 -20
- package/dist/ordered-collection-public.d.ts +0 -20
- package/dist/ordered-collection-untrimmed.d.ts +8 -8
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/{packageVersion.cjs → packageVersion.js} +2 -2
- package/dist/packageVersion.js.map +1 -0
- package/dist/{snapshotableArray.cjs → snapshotableArray.js} +1 -1
- package/dist/snapshotableArray.js.map +1 -0
- package/dist/{testUtils.cjs → testUtils.js} +2 -2
- package/dist/testUtils.js.map +1 -0
- package/lib/{consensusOrderedCollection.d.ts → consensusOrderedCollection.d.mts} +2 -2
- package/lib/consensusOrderedCollection.d.mts.map +1 -0
- package/lib/consensusOrderedCollection.mjs +1 -1
- package/lib/consensusOrderedCollection.mjs.map +1 -1
- package/lib/{consensusOrderedCollectionFactory.d.ts → consensusOrderedCollectionFactory.d.mts} +1 -1
- package/lib/consensusOrderedCollectionFactory.d.mts.map +1 -0
- package/lib/{consensusQueue.d.ts → consensusQueue.d.mts} +2 -2
- package/lib/consensusQueue.d.mts.map +1 -0
- package/lib/consensusQueue.mjs +1 -1
- package/lib/consensusQueue.mjs.map +1 -1
- package/lib/{index.d.ts → index.d.mts} +1 -1
- package/lib/index.d.mts.map +1 -0
- package/lib/{interfaces.d.ts → interfaces.d.mts} +7 -7
- package/lib/interfaces.d.mts.map +1 -0
- package/lib/interfaces.mjs +1 -1
- package/lib/interfaces.mjs.map +1 -1
- package/lib/ordered-collection-alpha.d.mts +226 -0
- package/lib/{ordered-collection-beta.d.ts → ordered-collection-public.d.mts} +0 -20
- package/lib/{ordered-collection-untrimmed.d.ts → ordered-collection-untrimmed.d.mts} +8 -8
- package/lib/{packageVersion.d.ts → packageVersion.d.mts} +2 -2
- package/lib/packageVersion.d.mts.map +1 -0
- package/lib/packageVersion.mjs +1 -1
- package/lib/packageVersion.mjs.map +1 -1
- package/lib/{snapshotableArray.d.ts → snapshotableArray.d.mts} +1 -1
- package/lib/snapshotableArray.d.mts.map +1 -0
- package/lib/{testUtils.d.ts → testUtils.d.mts} +1 -1
- package/lib/testUtils.d.mts.map +1 -0
- package/package.json +79 -26
- package/src/consensusOrderedCollection.ts +1 -1
- package/src/consensusQueue.ts +1 -1
- package/src/interfaces.ts +6 -6
- package/src/packageVersion.ts +1 -1
- package/dist/consensusOrderedCollection.cjs.map +0 -1
- package/dist/consensusOrderedCollectionFactory.cjs.map +0 -1
- package/dist/consensusQueue.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/interfaces.cjs.map +0 -1
- package/dist/packageVersion.cjs.map +0 -1
- package/dist/snapshotableArray.cjs.map +0 -1
- package/dist/testUtils.cjs.map +0 -1
- package/lib/consensusOrderedCollection.d.ts.map +0 -1
- package/lib/consensusOrderedCollectionFactory.d.ts.map +0 -1
- package/lib/consensusQueue.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/interfaces.d.ts.map +0 -1
- package/lib/ordered-collection-public.d.ts +0 -55
- package/lib/packageVersion.d.ts.map +0 -1
- package/lib/snapshotableArray.d.ts.map +0 -1
- package/lib/testUtils.d.ts.map +0 -1
- package/tsc-multi.test.json +0 -4
- /package/lib/{ordered-collection-alpha.d.ts → ordered-collection-beta.d.mts} +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { IFluidDataStoreRuntime, IChannelServices, IChannelAttributes, IChannelFactory } from "@fluidframework/datastore-definitions";
|
|
6
6
|
import { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-object-base";
|
|
7
7
|
/**
|
|
8
|
-
* @
|
|
8
|
+
* @alpha
|
|
9
9
|
*/
|
|
10
10
|
export declare enum ConsensusResult {
|
|
11
11
|
Release = 0,
|
|
@@ -14,7 +14,7 @@ export declare enum ConsensusResult {
|
|
|
14
14
|
/**
|
|
15
15
|
* Callback provided to acquire() and waitAndAcquire() methods.
|
|
16
16
|
* @returns ConsensusResult indicating whether item was completed, or releases back to the queue.
|
|
17
|
-
* @
|
|
17
|
+
* @alpha
|
|
18
18
|
*/
|
|
19
19
|
export type ConsensusCallback<T> = (value: T) => Promise<ConsensusResult>;
|
|
20
20
|
/**
|
|
@@ -30,7 +30,7 @@ export interface IConsensusOrderedCollectionFactory extends IChannelFactory {
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Events notifying about addition, acquisition, release and completion of items
|
|
33
|
-
* @
|
|
33
|
+
* @alpha
|
|
34
34
|
*/
|
|
35
35
|
export interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvents {
|
|
36
36
|
/**
|
|
@@ -80,7 +80,7 @@ export interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvent
|
|
|
80
80
|
* All objects added to the collection will be cloned (via JSON).
|
|
81
81
|
* They will not be references to the original input object. Thus changed to
|
|
82
82
|
* the input object will not reflect the object in the collection.
|
|
83
|
-
* @
|
|
83
|
+
* @alpha
|
|
84
84
|
*/
|
|
85
85
|
export interface IConsensusOrderedCollection<T = any> extends ISharedObject<IConsensusOrderedCollectionEvents<T>> {
|
|
86
86
|
/**
|
|
@@ -104,7 +104,7 @@ export interface IConsensusOrderedCollection<T = any> extends ISharedObject<ICon
|
|
|
104
104
|
*
|
|
105
105
|
* TODO: move this to be use in other place
|
|
106
106
|
* TODO: currently input and output is not symmetrical, can they become symmetrical?
|
|
107
|
-
* @
|
|
107
|
+
* @alpha
|
|
108
108
|
*/
|
|
109
109
|
export interface ISnapshotable<T> {
|
|
110
110
|
asArray(): T[];
|
|
@@ -116,7 +116,7 @@ export interface ISnapshotable<T> {
|
|
|
116
116
|
* Collection of objects that has deterministic add and remove ordering.
|
|
117
117
|
* Object implementing this interface can be used as the data backing
|
|
118
118
|
* for the ConsensusOrderedCollection
|
|
119
|
-
* @
|
|
119
|
+
* @alpha
|
|
120
120
|
*/
|
|
121
121
|
export interface IOrderedCollection<T = any> extends ISnapshotable<T> {
|
|
122
122
|
/**
|
|
@@ -132,4 +132,4 @@ export interface IOrderedCollection<T = any> extends ISnapshotable<T> {
|
|
|
132
132
|
*/
|
|
133
133
|
size(): number;
|
|
134
134
|
}
|
|
135
|
-
//# sourceMappingURL=interfaces.d.
|
|
135
|
+
//# sourceMappingURL=interfaces.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.mts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EACN,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,MAAM,uCAAuC;OACvC,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oCAAoC;AAEvF;;GAEG;AACH,oBAAY,eAAe;IAC1B,OAAO,IAAA;IACP,QAAQ,IAAA;CACR;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,WAAW,kCAAmC,SAAQ,eAAe;IAC1E,IAAI,CACH,QAAQ,EAAE,sBAAsB,EAChC,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAExC,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,2BAA2B,CAAC;CAClF;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC,CAAC,CAAC,CAAE,SAAQ,mBAAmB;IAChF;;;;OAIG;IACH,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAC;IACxE;;;OAGG;IACH,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IAE1E;;OAEG;IACH,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC;IAExD;;;;;;OAMG;IACH,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAC;CAClF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,2BAA2B,CAAC,CAAC,GAAG,GAAG,CACnD,SAAQ,aAAa,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC;IAC3D;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7B;;;;OAIG;IACH,OAAO,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1D;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC/B,OAAO,IAAI,CAAC,EAAE,CAAC;IAEf,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,CAAC,OAAE;IAEd;;OAEG;IACH,MAAM,IAAI,CAAC,CAAC;IAEZ;;OAEG;IACH,IAAI,IAAI,MAAM,CAAC;CACf"}
|
package/lib/interfaces.mjs
CHANGED
package/lib/interfaces.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.mjs","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;GAEG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,2DAAO,CAAA;IACP,6DAAQ,CAAA;AACT,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelAttributes,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject, ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\n\n/**\n * @
|
|
1
|
+
{"version":3,"file":"interfaces.mjs","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;GAEG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,2DAAO,CAAA;IACP,6DAAQ,CAAA;AACT,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelAttributes,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject, ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\n\n/**\n * @alpha\n */\nexport enum ConsensusResult {\n\tRelease,\n\tComplete,\n}\n\n/**\n * Callback provided to acquire() and waitAndAcquire() methods.\n * @returns ConsensusResult indicating whether item was completed, or releases back to the queue.\n * @alpha\n */\nexport type ConsensusCallback<T> = (value: T) => Promise<ConsensusResult>;\n\n/**\n * Consensus Ordered Collection channel factory interface\n *\n * Extends the base IChannelFactory to return a more definite type of IConsensusOrderedCollection\n * Use for the runtime to create and load distributed data structure by type name of each channel\n * @internal\n */\nexport interface IConsensusOrderedCollectionFactory extends IChannelFactory {\n\tload(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<IConsensusOrderedCollection>;\n\n\tcreate(document: IFluidDataStoreRuntime, id: string): IConsensusOrderedCollection;\n}\n\n/**\n * Events notifying about addition, acquisition, release and completion of items\n * @alpha\n */\nexport interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvents {\n\t/**\n\t * Event fires when new item is added to the queue or\n\t * an item previously acquired is returned back to a queue (including client loosing connection)\n\t * @param newlyAdded - indicates if it's newly added item of previously acquired item\n\t */\n\t(event: \"add\", listener: (value: T, newlyAdded: boolean) => void): this;\n\t/**\n\t * Event fires when a client acquired an item\n\t * Fires both for locally acquired items, as well as items acquired by remote clients\n\t */\n\t(event: \"acquire\", listener: (value: T, clientId?: string) => void): this;\n\n\t/**\n\t * \"Complete event fires when a client completes an item.\n\t */\n\t(event: \"complete\", listener: (value: T) => void): this;\n\n\t/**\n\t * Event fires when locally acquired item is being released back to the queue.\n\t * Please note that release process is asynchronous, so it takes a while for it to happen\n\t * (\"add\" event will be fired as result of it)\n\t * @param intentional - indicates whether release was intentional (result of returning\n\t * ConsensusResult.Release from callback) or it happened as result of lost connection.\n\t */\n\t(event: \"localRelease\", listener: (value: T, intentional: boolean) => void): this;\n}\n\n/**\n * Consensus Ordered Collection interface\n *\n * An consensus ordered collection is a distributed data structure, which\n * holds a collection of JSON-able or handles, and has a\n * deterministic add/remove order.\n *\n * @remarks\n * The order the server receive the add/remove operation determines the\n * order those operation are applied to the collection. Different clients\n * issuing `add` or `acquire` operations at the same time will be sequenced.\n * The order dictates which `add` is done first, thus determining the order\n * in which it appears in the collection. It also determines which client\n * will get the first removed item, etc. All operations are asynchronous.\n * A function `waitAndAcquire` is provided to wait for and remove an entry in the collection.\n *\n * As a client acquires an item, it processes it and then returns a value (via callback)\n * indicating whether it has completed processing the item, or whether the item should be\n * released back to the collection for another client to process.\n *\n * All objects added to the collection will be cloned (via JSON).\n * They will not be references to the original input object. Thus changed to\n * the input object will not reflect the object in the collection.\n * @alpha\n */\nexport interface IConsensusOrderedCollection<T = any>\n\textends ISharedObject<IConsensusOrderedCollectionEvents<T>> {\n\t/**\n\t * Adds a value to the collection\n\t */\n\tadd(value: T): Promise<void>;\n\n\t/**\n\t * Retrieves a value from the collection.\n\t * @returns Returns true (and calls callback with acquired value) if collection was not empty.\n\t * Otherwise returns false.\n\t */\n\tacquire(callback: ConsensusCallback<T>): Promise<boolean>;\n\n\t/**\n\t * Wait for a value to be available and remove it from the consensus collection\n\t * Calls callback with retrieved value.\n\t */\n\twaitAndAcquire(callback: ConsensusCallback<T>): Promise<void>;\n}\n\n/**\n * Interface for object that can be snapshoted\n *\n * TODO: move this to be use in other place\n * TODO: currently input and output is not symmetrical, can they become symmetrical?\n * @alpha\n */\nexport interface ISnapshotable<T> {\n\tasArray(): T[];\n\n\tloadFrom(values: T[]): void;\n}\n\n/**\n * Ordered Collection interface\n *\n * Collection of objects that has deterministic add and remove ordering.\n * Object implementing this interface can be used as the data backing\n * for the ConsensusOrderedCollection\n * @alpha\n */\nexport interface IOrderedCollection<T = any> extends ISnapshotable<T> {\n\t/**\n\t * Adds a value to the collection\n\t */\n\tadd(value: T);\n\n\t/**\n\t * Retrieves a value from the collection.\n\t */\n\tremove(): T;\n\n\t/**\n\t * Return the size of the collection\n\t */\n\tsize(): number;\n}\n"]}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
2
|
+
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
3
|
+
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
4
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
5
|
+
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
6
|
+
import { IFluidSerializer } from '@fluidframework/shared-object-base';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
import { ISharedObject } from '@fluidframework/shared-object-base';
|
|
9
|
+
import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
|
|
10
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
11
|
+
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: acquireAndComplete */
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Callback provided to acquire() and waitAndAcquire() methods.
|
|
17
|
+
* @returns ConsensusResult indicating whether item was completed, or releases back to the queue.
|
|
18
|
+
* @alpha
|
|
19
|
+
*/
|
|
20
|
+
export declare type ConsensusCallback<T> = (value: T) => Promise<ConsensusResult>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Implementation of a consensus collection shared object
|
|
24
|
+
*
|
|
25
|
+
* Implements the shared object's communication, and the semantics around the
|
|
26
|
+
* release/complete mechanism following acquire.
|
|
27
|
+
*
|
|
28
|
+
* Generally not used directly. A derived type will pass in a backing data type
|
|
29
|
+
* IOrderedCollection that will define the deterministic add/acquire order and snapshot ability.
|
|
30
|
+
* @alpha
|
|
31
|
+
*/
|
|
32
|
+
export declare class ConsensusOrderedCollection<T = any> extends SharedObject<IConsensusOrderedCollectionEvents<T>> implements IConsensusOrderedCollection<T> {
|
|
33
|
+
private readonly data;
|
|
34
|
+
/**
|
|
35
|
+
* The set of values that have been acquired but not yet completed or released
|
|
36
|
+
*/
|
|
37
|
+
private jobTracking;
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new consensus collection. If the object is non-local an id and service interfaces will
|
|
40
|
+
* be provided
|
|
41
|
+
*/
|
|
42
|
+
protected constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes, data: IOrderedCollection<T>);
|
|
43
|
+
/**
|
|
44
|
+
* Add a value to the consensus collection.
|
|
45
|
+
*/
|
|
46
|
+
add(value: T): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Remove a value from the consensus collection. If the collection is empty, returns false.
|
|
49
|
+
* Otherwise calls callback with the value
|
|
50
|
+
*/
|
|
51
|
+
acquire(callback: ConsensusCallback<T>): Promise<boolean>;
|
|
52
|
+
/**
|
|
53
|
+
* Wait for a value to be available and acquire it from the consensus collection
|
|
54
|
+
*/
|
|
55
|
+
waitAndAcquire(callback: ConsensusCallback<T>): Promise<void>;
|
|
56
|
+
protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
|
|
57
|
+
protected isActive(): boolean;
|
|
58
|
+
protected complete(acquireId: string): Promise<void>;
|
|
59
|
+
protected completeCore(acquireId: string): void;
|
|
60
|
+
protected release(acquireId: string): void;
|
|
61
|
+
protected releaseCore(acquireId: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
|
|
64
|
+
*/
|
|
65
|
+
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
66
|
+
protected onDisconnect(): void;
|
|
67
|
+
protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
68
|
+
private submit;
|
|
69
|
+
private addCore;
|
|
70
|
+
private acquireCore;
|
|
71
|
+
private acquireInternal;
|
|
72
|
+
private removeClient;
|
|
73
|
+
private serializeValue;
|
|
74
|
+
private deserializeValue;
|
|
75
|
+
protected applyStashedOp(): void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Implementation of a consensus stack
|
|
80
|
+
*
|
|
81
|
+
* An derived type of ConsensusOrderedCollection with a queue as the backing data and order.
|
|
82
|
+
* @alpha
|
|
83
|
+
*/
|
|
84
|
+
export declare class ConsensusQueue<T = any> extends ConsensusOrderedCollection<T> {
|
|
85
|
+
/**
|
|
86
|
+
* Create a new consensus queue
|
|
87
|
+
*
|
|
88
|
+
* @param runtime - data store runtime the new consensus queue belongs to
|
|
89
|
+
* @param id - optional name of theconsensus queue
|
|
90
|
+
* @returns newly create consensus queue (but not attached yet)
|
|
91
|
+
*/
|
|
92
|
+
static create<T = any>(runtime: IFluidDataStoreRuntime, id?: string): ConsensusQueue<T>;
|
|
93
|
+
/**
|
|
94
|
+
* Get a factory for ConsensusQueue to register with the data store.
|
|
95
|
+
*
|
|
96
|
+
* @returns a factory that creates and load ConsensusQueue
|
|
97
|
+
*/
|
|
98
|
+
static getFactory(): IChannelFactory;
|
|
99
|
+
/**
|
|
100
|
+
* Constructs a new consensus queue. If the object is non-local an id and service interfaces will
|
|
101
|
+
* be provided
|
|
102
|
+
*/
|
|
103
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @alpha
|
|
108
|
+
*/
|
|
109
|
+
export declare enum ConsensusResult {
|
|
110
|
+
Release = 0,
|
|
111
|
+
Complete = 1
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Consensus Ordered Collection interface
|
|
116
|
+
*
|
|
117
|
+
* An consensus ordered collection is a distributed data structure, which
|
|
118
|
+
* holds a collection of JSON-able or handles, and has a
|
|
119
|
+
* deterministic add/remove order.
|
|
120
|
+
*
|
|
121
|
+
* @remarks
|
|
122
|
+
* The order the server receive the add/remove operation determines the
|
|
123
|
+
* order those operation are applied to the collection. Different clients
|
|
124
|
+
* issuing `add` or `acquire` operations at the same time will be sequenced.
|
|
125
|
+
* The order dictates which `add` is done first, thus determining the order
|
|
126
|
+
* in which it appears in the collection. It also determines which client
|
|
127
|
+
* will get the first removed item, etc. All operations are asynchronous.
|
|
128
|
+
* A function `waitAndAcquire` is provided to wait for and remove an entry in the collection.
|
|
129
|
+
*
|
|
130
|
+
* As a client acquires an item, it processes it and then returns a value (via callback)
|
|
131
|
+
* indicating whether it has completed processing the item, or whether the item should be
|
|
132
|
+
* released back to the collection for another client to process.
|
|
133
|
+
*
|
|
134
|
+
* All objects added to the collection will be cloned (via JSON).
|
|
135
|
+
* They will not be references to the original input object. Thus changed to
|
|
136
|
+
* the input object will not reflect the object in the collection.
|
|
137
|
+
* @alpha
|
|
138
|
+
*/
|
|
139
|
+
export declare interface IConsensusOrderedCollection<T = any> extends ISharedObject<IConsensusOrderedCollectionEvents<T>> {
|
|
140
|
+
/**
|
|
141
|
+
* Adds a value to the collection
|
|
142
|
+
*/
|
|
143
|
+
add(value: T): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Retrieves a value from the collection.
|
|
146
|
+
* @returns Returns true (and calls callback with acquired value) if collection was not empty.
|
|
147
|
+
* Otherwise returns false.
|
|
148
|
+
*/
|
|
149
|
+
acquire(callback: ConsensusCallback<T>): Promise<boolean>;
|
|
150
|
+
/**
|
|
151
|
+
* Wait for a value to be available and remove it from the consensus collection
|
|
152
|
+
* Calls callback with retrieved value.
|
|
153
|
+
*/
|
|
154
|
+
waitAndAcquire(callback: ConsensusCallback<T>): Promise<void>;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Events notifying about addition, acquisition, release and completion of items
|
|
159
|
+
* @alpha
|
|
160
|
+
*/
|
|
161
|
+
export declare interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvents {
|
|
162
|
+
/**
|
|
163
|
+
* Event fires when new item is added to the queue or
|
|
164
|
+
* an item previously acquired is returned back to a queue (including client loosing connection)
|
|
165
|
+
* @param newlyAdded - indicates if it's newly added item of previously acquired item
|
|
166
|
+
*/
|
|
167
|
+
(event: "add", listener: (value: T, newlyAdded: boolean) => void): this;
|
|
168
|
+
/**
|
|
169
|
+
* Event fires when a client acquired an item
|
|
170
|
+
* Fires both for locally acquired items, as well as items acquired by remote clients
|
|
171
|
+
*/
|
|
172
|
+
(event: "acquire", listener: (value: T, clientId?: string) => void): this;
|
|
173
|
+
/**
|
|
174
|
+
* "Complete event fires when a client completes an item.
|
|
175
|
+
*/
|
|
176
|
+
(event: "complete", listener: (value: T) => void): this;
|
|
177
|
+
/**
|
|
178
|
+
* Event fires when locally acquired item is being released back to the queue.
|
|
179
|
+
* Please note that release process is asynchronous, so it takes a while for it to happen
|
|
180
|
+
* ("add" event will be fired as result of it)
|
|
181
|
+
* @param intentional - indicates whether release was intentional (result of returning
|
|
182
|
+
* ConsensusResult.Release from callback) or it happened as result of lost connection.
|
|
183
|
+
*/
|
|
184
|
+
(event: "localRelease", listener: (value: T, intentional: boolean) => void): this;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Excluded from this release type: IConsensusOrderedCollectionFactory */
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Ordered Collection interface
|
|
191
|
+
*
|
|
192
|
+
* Collection of objects that has deterministic add and remove ordering.
|
|
193
|
+
* Object implementing this interface can be used as the data backing
|
|
194
|
+
* for the ConsensusOrderedCollection
|
|
195
|
+
* @alpha
|
|
196
|
+
*/
|
|
197
|
+
export declare interface IOrderedCollection<T = any> extends ISnapshotable<T> {
|
|
198
|
+
/**
|
|
199
|
+
* Adds a value to the collection
|
|
200
|
+
*/
|
|
201
|
+
add(value: T): any;
|
|
202
|
+
/**
|
|
203
|
+
* Retrieves a value from the collection.
|
|
204
|
+
*/
|
|
205
|
+
remove(): T;
|
|
206
|
+
/**
|
|
207
|
+
* Return the size of the collection
|
|
208
|
+
*/
|
|
209
|
+
size(): number;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Interface for object that can be snapshoted
|
|
214
|
+
*
|
|
215
|
+
* TODO: move this to be use in other place
|
|
216
|
+
* TODO: currently input and output is not symmetrical, can they become symmetrical?
|
|
217
|
+
* @alpha
|
|
218
|
+
*/
|
|
219
|
+
export declare interface ISnapshotable<T> {
|
|
220
|
+
asArray(): T[];
|
|
221
|
+
loadFrom(values: T[]): void;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Excluded from this release type: waitAcquireAndComplete */
|
|
225
|
+
|
|
226
|
+
export { }
|
|
@@ -20,36 +20,16 @@ import { SharedObject } from '@fluidframework/shared-object-base';
|
|
|
20
20
|
|
|
21
21
|
/* Excluded from this release type: ConsensusResult */
|
|
22
22
|
|
|
23
|
-
/* Excluded from this release type: IChannelAttributes */
|
|
24
|
-
|
|
25
|
-
/* Excluded from this release type: IChannelFactory */
|
|
26
|
-
|
|
27
|
-
/* Excluded from this release type: IChannelServices */
|
|
28
|
-
|
|
29
|
-
/* Excluded from this release type: IChannelStorageService */
|
|
30
|
-
|
|
31
23
|
/* Excluded from this release type: IConsensusOrderedCollection */
|
|
32
24
|
|
|
33
25
|
/* Excluded from this release type: IConsensusOrderedCollectionEvents */
|
|
34
26
|
|
|
35
27
|
/* Excluded from this release type: IConsensusOrderedCollectionFactory */
|
|
36
28
|
|
|
37
|
-
/* Excluded from this release type: IFluidDataStoreRuntime */
|
|
38
|
-
|
|
39
|
-
/* Excluded from this release type: IFluidSerializer */
|
|
40
|
-
|
|
41
29
|
/* Excluded from this release type: IOrderedCollection */
|
|
42
30
|
|
|
43
|
-
/* Excluded from this release type: ISharedObject */
|
|
44
|
-
|
|
45
|
-
/* Excluded from this release type: ISharedObjectEvents */
|
|
46
|
-
|
|
47
31
|
/* Excluded from this release type: ISnapshotable */
|
|
48
32
|
|
|
49
|
-
/* Excluded from this release type: ISummaryTreeWithStats */
|
|
50
|
-
|
|
51
|
-
/* Excluded from this release type: SharedObject */
|
|
52
|
-
|
|
53
33
|
/* Excluded from this release type: waitAcquireAndComplete */
|
|
54
34
|
|
|
55
35
|
export { }
|
|
@@ -20,7 +20,7 @@ export declare function acquireAndComplete<T>(collection: IConsensusOrderedColle
|
|
|
20
20
|
/**
|
|
21
21
|
* Callback provided to acquire() and waitAndAcquire() methods.
|
|
22
22
|
* @returns ConsensusResult indicating whether item was completed, or releases back to the queue.
|
|
23
|
-
* @
|
|
23
|
+
* @alpha
|
|
24
24
|
*/
|
|
25
25
|
export declare type ConsensusCallback<T> = (value: T) => Promise<ConsensusResult>;
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ export declare type ConsensusCallback<T> = (value: T) => Promise<ConsensusResult
|
|
|
32
32
|
*
|
|
33
33
|
* Generally not used directly. A derived type will pass in a backing data type
|
|
34
34
|
* IOrderedCollection that will define the deterministic add/acquire order and snapshot ability.
|
|
35
|
-
* @
|
|
35
|
+
* @alpha
|
|
36
36
|
*/
|
|
37
37
|
export declare class ConsensusOrderedCollection<T = any> extends SharedObject<IConsensusOrderedCollectionEvents<T>> implements IConsensusOrderedCollection<T> {
|
|
38
38
|
private readonly data;
|
|
@@ -84,7 +84,7 @@ export declare class ConsensusOrderedCollection<T = any> extends SharedObject<IC
|
|
|
84
84
|
* Implementation of a consensus stack
|
|
85
85
|
*
|
|
86
86
|
* An derived type of ConsensusOrderedCollection with a queue as the backing data and order.
|
|
87
|
-
* @
|
|
87
|
+
* @alpha
|
|
88
88
|
*/
|
|
89
89
|
export declare class ConsensusQueue<T = any> extends ConsensusOrderedCollection<T> {
|
|
90
90
|
/**
|
|
@@ -109,7 +109,7 @@ export declare class ConsensusQueue<T = any> extends ConsensusOrderedCollection<
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
|
-
* @
|
|
112
|
+
* @alpha
|
|
113
113
|
*/
|
|
114
114
|
export declare enum ConsensusResult {
|
|
115
115
|
Release = 0,
|
|
@@ -139,7 +139,7 @@ export declare enum ConsensusResult {
|
|
|
139
139
|
* All objects added to the collection will be cloned (via JSON).
|
|
140
140
|
* They will not be references to the original input object. Thus changed to
|
|
141
141
|
* the input object will not reflect the object in the collection.
|
|
142
|
-
* @
|
|
142
|
+
* @alpha
|
|
143
143
|
*/
|
|
144
144
|
export declare interface IConsensusOrderedCollection<T = any> extends ISharedObject<IConsensusOrderedCollectionEvents<T>> {
|
|
145
145
|
/**
|
|
@@ -161,7 +161,7 @@ export declare interface IConsensusOrderedCollection<T = any> extends ISharedObj
|
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* Events notifying about addition, acquisition, release and completion of items
|
|
164
|
-
* @
|
|
164
|
+
* @alpha
|
|
165
165
|
*/
|
|
166
166
|
export declare interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvents {
|
|
167
167
|
/**
|
|
@@ -207,7 +207,7 @@ export declare interface IConsensusOrderedCollectionFactory extends IChannelFact
|
|
|
207
207
|
* Collection of objects that has deterministic add and remove ordering.
|
|
208
208
|
* Object implementing this interface can be used as the data backing
|
|
209
209
|
* for the ConsensusOrderedCollection
|
|
210
|
-
* @
|
|
210
|
+
* @alpha
|
|
211
211
|
*/
|
|
212
212
|
export declare interface IOrderedCollection<T = any> extends ISnapshotable<T> {
|
|
213
213
|
/**
|
|
@@ -229,7 +229,7 @@ export declare interface IOrderedCollection<T = any> extends ISnapshotable<T> {
|
|
|
229
229
|
*
|
|
230
230
|
* TODO: move this to be use in other place
|
|
231
231
|
* TODO: currently input and output is not symmetrical, can they become symmetrical?
|
|
232
|
-
* @
|
|
232
|
+
* @alpha
|
|
233
233
|
*/
|
|
234
234
|
export declare interface ISnapshotable<T> {
|
|
235
235
|
asArray(): T[];
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/ordered-collection";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-
|
|
9
|
-
//# sourceMappingURL=packageVersion.d.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-rc.1.0.1";
|
|
9
|
+
//# sourceMappingURL=packageVersion.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageVersion.d.mts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,uCAAuC,CAAC;AAC5D,eAAO,MAAM,UAAU,mBAAmB,CAAC"}
|
package/lib/packageVersion.mjs
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export const pkgName = "@fluidframework/ordered-collection";
|
|
8
|
-
export const pkgVersion = "2.0.0-
|
|
8
|
+
export const pkgVersion = "2.0.0-rc.1.0.1";
|
|
9
9
|
//# sourceMappingURL=packageVersion.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.mjs","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,oCAAoC,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.mjs","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,oCAAoC,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/ordered-collection\";\nexport const pkgVersion = \"2.0.0-rc.1.0.1\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshotableArray.d.mts","sourceRoot":"","sources":["../src/snapshotableArray.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,qBAAa,iBAAiB,CAAC,CAAC,CAAE,SAAQ,KAAK;IAC9C,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,CAAM;IAElB,OAAO;IAID,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC,IAAI,IAAI,MAAM;CAGrB"}
|
|
@@ -15,4 +15,4 @@ export declare function acquireAndComplete<T>(collection: IConsensusOrderedColle
|
|
|
15
15
|
* @internal
|
|
16
16
|
*/
|
|
17
17
|
export declare function waitAcquireAndComplete<T>(collection: IConsensusOrderedCollection<T>): Promise<T>;
|
|
18
|
-
//# sourceMappingURL=testUtils.d.
|
|
18
|
+
//# sourceMappingURL=testUtils.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testUtils.d.mts","sourceRoot":"","sources":["../src/testUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAmB,2BAA2B,EAAE;AAEvD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EACzC,UAAU,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACxC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAOxB;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,EAC7C,UAAU,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACxC,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/ordered-collection",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc.1.0.1",
|
|
4
4
|
"description": "Consensus Collection",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -11,20 +11,72 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Microsoft and contributors",
|
|
13
13
|
"sideEffects": false,
|
|
14
|
-
"
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": {
|
|
17
|
+
"types": "./lib/index.d.mts",
|
|
18
|
+
"default": "./lib/index.mjs"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"./alpha": {
|
|
26
|
+
"import": {
|
|
27
|
+
"types": "./lib/ordered-collection-alpha.d.mts",
|
|
28
|
+
"default": "./lib/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./dist/ordered-collection-alpha.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"./beta": {
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./lib/ordered-collection-beta.d.mts",
|
|
38
|
+
"default": "./lib/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"require": {
|
|
41
|
+
"types": "./dist/ordered-collection-beta.d.ts",
|
|
42
|
+
"default": "./dist/index.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"./internal": {
|
|
46
|
+
"import": {
|
|
47
|
+
"types": "./lib/index.d.mts",
|
|
48
|
+
"default": "./lib/index.mjs"
|
|
49
|
+
},
|
|
50
|
+
"require": {
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"default": "./dist/index.js"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"./public": {
|
|
56
|
+
"import": {
|
|
57
|
+
"types": "./lib/ordered-collection-public.d.mts",
|
|
58
|
+
"default": "./lib/index.mjs"
|
|
59
|
+
},
|
|
60
|
+
"require": {
|
|
61
|
+
"types": "./dist/ordered-collection-public.d.ts",
|
|
62
|
+
"default": "./dist/index.js"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"main": "dist/index.js",
|
|
15
67
|
"module": "lib/index.mjs",
|
|
16
68
|
"types": "dist/index.d.ts",
|
|
17
69
|
"c8": {
|
|
18
70
|
"all": true,
|
|
19
71
|
"cache-dir": "nyc/.cache",
|
|
20
72
|
"exclude": [
|
|
21
|
-
"src/test
|
|
22
|
-
"dist/test
|
|
73
|
+
"src/test/**/*.*ts",
|
|
74
|
+
"dist/test/**/*.*js"
|
|
23
75
|
],
|
|
24
76
|
"exclude-after-remap": false,
|
|
25
77
|
"include": [
|
|
26
|
-
"src
|
|
27
|
-
"dist
|
|
78
|
+
"src/**/*.*ts",
|
|
79
|
+
"dist/**/*.*js"
|
|
28
80
|
],
|
|
29
81
|
"report-dir": "nyc/report",
|
|
30
82
|
"reporter": [
|
|
@@ -35,30 +87,30 @@
|
|
|
35
87
|
"temp-directory": "nyc/.nyc_output"
|
|
36
88
|
},
|
|
37
89
|
"dependencies": {
|
|
38
|
-
"@fluid-internal/client-utils": ">=2.0.0-
|
|
39
|
-
"@fluidframework/core-interfaces": ">=2.0.0-
|
|
40
|
-
"@fluidframework/core-utils": ">=2.0.0-
|
|
41
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-
|
|
42
|
-
"@fluidframework/protocol-definitions": "^3.
|
|
43
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-
|
|
44
|
-
"@fluidframework/runtime-utils": ">=2.0.0-
|
|
45
|
-
"@fluidframework/shared-object-base": ">=2.0.0-
|
|
90
|
+
"@fluid-internal/client-utils": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
91
|
+
"@fluidframework/core-interfaces": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
92
|
+
"@fluidframework/core-utils": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
93
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
94
|
+
"@fluidframework/protocol-definitions": "^3.1.0",
|
|
95
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
96
|
+
"@fluidframework/runtime-utils": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
97
|
+
"@fluidframework/shared-object-base": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
46
98
|
"uuid": "^9.0.0"
|
|
47
99
|
},
|
|
48
100
|
"devDependencies": {
|
|
49
101
|
"@arethetypeswrong/cli": "^0.13.3",
|
|
50
|
-
"@fluid-private/test-dds-utils": ">=2.0.0-
|
|
51
|
-
"@fluid-tools/build-cli": "^0.
|
|
102
|
+
"@fluid-private/test-dds-utils": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
103
|
+
"@fluid-tools/build-cli": "^0.29.0",
|
|
52
104
|
"@fluidframework/build-common": "^2.0.3",
|
|
53
|
-
"@fluidframework/build-tools": "^0.
|
|
54
|
-
"@fluidframework/eslint-config-fluid": "^3.
|
|
55
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-
|
|
56
|
-
"@fluidframework/ordered-collection-previous": "npm:@fluidframework/ordered-collection@2.0.0-internal.
|
|
57
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-
|
|
105
|
+
"@fluidframework/build-tools": "^0.29.0",
|
|
106
|
+
"@fluidframework/eslint-config-fluid": "^3.2.0",
|
|
107
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
108
|
+
"@fluidframework/ordered-collection-previous": "npm:@fluidframework/ordered-collection@2.0.0-internal.8.0.0",
|
|
109
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-rc.1.0.1 <2.0.0-rc.1.1.0",
|
|
58
110
|
"@microsoft/api-extractor": "^7.38.3",
|
|
59
111
|
"@types/mocha": "^9.1.1",
|
|
60
112
|
"@types/node": "^18.19.0",
|
|
61
|
-
"c8": "^
|
|
113
|
+
"c8": "^8.0.1",
|
|
62
114
|
"copyfiles": "^2.4.1",
|
|
63
115
|
"cross-env": "^7.0.3",
|
|
64
116
|
"eslint": "~8.50.0",
|
|
@@ -67,6 +119,7 @@
|
|
|
67
119
|
"mocha-multi-reporters": "^1.5.1",
|
|
68
120
|
"moment": "^2.21.0",
|
|
69
121
|
"prettier": "~3.0.3",
|
|
122
|
+
"replace-in-file": "^6.3.5",
|
|
70
123
|
"rimraf": "^4.4.0",
|
|
71
124
|
"tsc-multi": "^1.1.0",
|
|
72
125
|
"typescript": "~5.1.6"
|
|
@@ -89,15 +142,15 @@
|
|
|
89
142
|
"scripts": {
|
|
90
143
|
"api": "fluid-build . --task api",
|
|
91
144
|
"api-extractor:commonjs": "api-extractor run --local",
|
|
92
|
-
"api-extractor:esnext": "
|
|
145
|
+
"api-extractor:esnext": "api-extractor run --config ./api-extractor-esm.json",
|
|
93
146
|
"build": "fluid-build . --task build",
|
|
94
147
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
95
148
|
"build:compile": "fluid-build . --task compile",
|
|
96
149
|
"build:docs": "fluid-build . --task api",
|
|
97
150
|
"build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
|
|
98
151
|
"build:genver": "gen-version",
|
|
99
|
-
"build:test": "tsc
|
|
100
|
-
"check:are-the-types-wrong": "attw --pack",
|
|
152
|
+
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
153
|
+
"check:are-the-types-wrong": "attw --pack . --entrypoints .",
|
|
101
154
|
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
102
155
|
"ci:build:docs": "api-extractor run",
|
|
103
156
|
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
@@ -112,7 +165,7 @@
|
|
|
112
165
|
"test:coverage": "c8 npm test",
|
|
113
166
|
"test:mocha": "mocha --ignore \"dist/test/types/*\" --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup",
|
|
114
167
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
115
|
-
"tsc": "tsc
|
|
168
|
+
"tsc": "tsc",
|
|
116
169
|
"typetests:gen": "fluid-type-test-generator",
|
|
117
170
|
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
118
171
|
}
|