@fluidframework/map 2.0.0-rc.1.0.6 → 2.0.0-rc.2.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/{.eslintrc.js → .eslintrc.cjs} +10 -1
- package/{.mocharc.js → .mocharc.cjs} +1 -1
- package/CHANGELOG.md +11 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/map.api.md +14 -57
- package/dist/directory.d.ts +10 -50
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +76 -164
- package/dist/directory.js.map +1 -1
- package/dist/index.d.ts +45 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -8
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/internalInterfaces.d.ts +2 -2
- package/dist/internalInterfaces.d.ts.map +1 -1
- package/dist/internalInterfaces.js.map +1 -1
- package/dist/localValues.d.ts +3 -5
- package/dist/localValues.d.ts.map +1 -1
- package/dist/localValues.js +9 -8
- package/dist/localValues.js.map +1 -1
- package/dist/map-alpha.d.ts +31 -116
- package/dist/map-beta.d.ts +24 -105
- package/dist/map-public.d.ts +24 -105
- package/dist/map-untrimmed.d.ts +31 -116
- package/dist/map.d.ts +4 -23
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +6 -29
- package/dist/map.js.map +1 -1
- package/dist/mapKernel.d.ts +3 -4
- package/dist/mapKernel.d.ts.map +1 -1
- package/dist/mapKernel.js +30 -35
- package/dist/mapKernel.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/{directory.d.mts → directory.d.ts} +11 -51
- package/lib/directory.d.ts.map +1 -0
- package/lib/{directory.mjs → directory.js} +77 -165
- package/lib/directory.js.map +1 -0
- package/lib/index.d.ts +61 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +55 -0
- package/lib/index.js.map +1 -0
- package/lib/{interfaces.d.mts → interfaces.d.ts} +1 -1
- package/lib/interfaces.d.ts.map +1 -0
- package/lib/{interfaces.mjs → interfaces.js} +1 -1
- package/lib/interfaces.js.map +1 -0
- package/lib/{internalInterfaces.d.mts → internalInterfaces.d.ts} +3 -3
- package/lib/internalInterfaces.d.ts.map +1 -0
- package/lib/{internalInterfaces.mjs → internalInterfaces.js} +1 -1
- package/lib/internalInterfaces.js.map +1 -0
- package/lib/{localValues.d.mts → localValues.d.ts} +4 -6
- package/lib/localValues.d.ts.map +1 -0
- package/lib/{localValues.mjs → localValues.js} +10 -9
- package/lib/localValues.js.map +1 -0
- package/lib/{map-alpha.d.mts → map-alpha.d.ts} +43 -116
- package/lib/{map-beta.d.mts → map-beta.d.ts} +36 -105
- package/lib/{map-public.d.mts → map-public.d.ts} +36 -105
- package/lib/{map-untrimmed.d.mts → map-untrimmed.d.ts} +43 -116
- package/lib/{map.d.mts → map.d.ts} +5 -24
- package/lib/map.d.ts.map +1 -0
- package/lib/{map.mjs → map.js} +5 -28
- package/lib/map.js.map +1 -0
- package/lib/{mapKernel.d.mts → mapKernel.d.ts} +4 -5
- package/lib/mapKernel.d.ts.map +1 -0
- package/lib/{mapKernel.mjs → mapKernel.js} +32 -37
- package/lib/mapKernel.js.map +1 -0
- package/lib/{packageVersion.d.mts → packageVersion.d.ts} +2 -2
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/{packageVersion.mjs → packageVersion.js} +2 -2
- package/lib/packageVersion.js.map +1 -0
- package/lib/test/memory/directory.spec.js +71 -0
- package/lib/test/memory/directory.spec.js.map +1 -0
- package/lib/test/memory/map.spec.js +71 -0
- package/lib/test/memory/map.spec.js.map +1 -0
- package/lib/test/mocha/directory.order.spec.js +422 -0
- package/lib/test/mocha/directory.order.spec.js.map +1 -0
- package/lib/test/mocha/directory.snapshot.spec.js +111 -0
- package/lib/test/mocha/directory.snapshot.spec.js.map +1 -0
- package/lib/test/mocha/directory.spec.js +1406 -0
- package/lib/test/mocha/directory.spec.js.map +1 -0
- package/lib/test/mocha/directoryEquivalenceUtils.js +36 -0
- package/lib/test/mocha/directoryEquivalenceUtils.js.map +1 -0
- package/lib/test/mocha/directoryFuzzTests.spec.js +337 -0
- package/lib/test/mocha/directoryFuzzTests.spec.js.map +1 -0
- package/lib/test/mocha/dirname.cjs +16 -0
- package/lib/test/mocha/dirname.cjs.map +1 -0
- package/lib/test/mocha/map.fuzz.spec.js +114 -0
- package/lib/test/mocha/map.fuzz.spec.js.map +1 -0
- package/lib/test/mocha/map.spec.js +685 -0
- package/lib/test/mocha/map.spec.js.map +1 -0
- package/lib/test/mocha/rebasing.spec.js +158 -0
- package/lib/test/mocha/rebasing.spec.js.map +1 -0
- package/lib/test/mocha/reconnection.spec.js +327 -0
- package/lib/test/mocha/reconnection.spec.js.map +1 -0
- package/lib/test/types/validateMapPrevious.generated.js +66 -0
- package/lib/test/types/validateMapPrevious.generated.js.map +1 -0
- package/package.json +55 -52
- package/src/directory.ts +122 -217
- package/src/index.ts +57 -4
- package/src/interfaces.ts +2 -2
- package/src/internalInterfaces.ts +2 -2
- package/src/localValues.ts +14 -9
- package/src/map.ts +7 -32
- package/src/mapKernel.ts +40 -42
- package/src/packageVersion.ts +1 -1
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/lib/directory.d.mts.map +0 -1
- package/lib/directory.mjs.map +0 -1
- package/lib/index.d.mts +0 -9
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs +0 -8
- package/lib/index.mjs.map +0 -1
- package/lib/interfaces.d.mts.map +0 -1
- package/lib/interfaces.mjs.map +0 -1
- package/lib/internalInterfaces.d.mts.map +0 -1
- package/lib/internalInterfaces.mjs.map +0 -1
- package/lib/localValues.d.mts.map +0 -1
- package/lib/localValues.mjs.map +0 -1
- package/lib/map.d.mts.map +0 -1
- package/lib/map.mjs.map +0 -1
- package/lib/mapKernel.d.mts.map +0 -1
- package/lib/mapKernel.mjs.map +0 -1
- package/lib/packageVersion.d.mts.map +0 -1
- package/lib/packageVersion.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,8 +13,49 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @packageDocumentation
|
|
15
15
|
*/
|
|
16
|
-
export { DirectoryFactory, ICreateInfo, IDirectoryClearOperation, IDirectoryCreateSubDirectoryOperation, IDirectoryDataObject, IDirectoryDeleteOperation, IDirectoryDeleteSubDirectoryOperation, IDirectoryKeyOperation, IDirectoryNewStorageFormat, IDirectoryOperation, IDirectorySetOperation, IDirectoryStorageOperation, IDirectorySubDirectoryOperation, SharedDirectory, } from "./directory";
|
|
17
|
-
export { IDirectory, IDirectoryEvents, IDirectoryValueChanged, ISerializableValue, ISerializedValue, ISharedDirectory, ISharedDirectoryEvents, ISharedMap, ISharedMapEvents, IValueChanged, } from "./interfaces";
|
|
18
|
-
export { LocalValueMaker, ILocalValue } from "./localValues";
|
|
19
|
-
export { MapFactory
|
|
16
|
+
export { DirectoryFactory, ICreateInfo, IDirectoryClearOperation, IDirectoryCreateSubDirectoryOperation, IDirectoryDataObject, IDirectoryDeleteOperation, IDirectoryDeleteSubDirectoryOperation, IDirectoryKeyOperation, IDirectoryNewStorageFormat, IDirectoryOperation, IDirectorySetOperation, IDirectoryStorageOperation, IDirectorySubDirectoryOperation, SharedDirectory, } from "./directory.js";
|
|
17
|
+
export { IDirectory, IDirectoryEvents, IDirectoryValueChanged, ISerializableValue, ISerializedValue, ISharedDirectory, ISharedDirectoryEvents, ISharedMap, ISharedMapEvents, IValueChanged, } from "./interfaces.js";
|
|
18
|
+
export { LocalValueMaker, ILocalValue } from "./localValues.js";
|
|
19
|
+
export { MapFactory } from "./map.js";
|
|
20
|
+
import type { IChannelFactory, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
|
|
21
|
+
import { ISharedMap } from "./interfaces.js";
|
|
22
|
+
/**
|
|
23
|
+
* {@inheritDoc ISharedMap}
|
|
24
|
+
* @public
|
|
25
|
+
* @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SharedMap: {
|
|
28
|
+
/**
|
|
29
|
+
* Get a factory for SharedMap to register with the data store.
|
|
30
|
+
* @returns A factory that creates SharedMaps and loads them from storage.
|
|
31
|
+
*/
|
|
32
|
+
getFactory(): IChannelFactory<ISharedMap>;
|
|
33
|
+
/**
|
|
34
|
+
* Create a new shared map.
|
|
35
|
+
* @param runtime - The data store runtime that the new shared map belongs to.
|
|
36
|
+
* @param id - Optional name of the shared map.
|
|
37
|
+
* @returns Newly created shared map.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* To create a `SharedMap`, call the static create method:
|
|
41
|
+
*
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const myMap = SharedMap.create(this.runtime, id);
|
|
44
|
+
* ```
|
|
45
|
+
* @privateRemarks
|
|
46
|
+
* TODO:
|
|
47
|
+
* Clarify how this differs from `MapFactory.create`.
|
|
48
|
+
* They are different since making this forward to MapFactory.create breaks some things,
|
|
49
|
+
* but the difference is unclear from the documentation.
|
|
50
|
+
*/
|
|
51
|
+
create(runtime: IFluidDataStoreRuntime, id?: string): ISharedMap;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* {@inheritDoc ISharedMap}
|
|
55
|
+
* @public
|
|
56
|
+
* @deprecated Use ISharedMap instead.
|
|
57
|
+
* @privateRemarks
|
|
58
|
+
* This alias is for legacy compat from when the SharedMap class was exported as public.
|
|
59
|
+
*/
|
|
60
|
+
export type SharedMap = ISharedMap;
|
|
20
61
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EACN,gBAAgB,EAChB,WAAW,EACX,wBAAwB,EACxB,qCAAqC,EACrC,oBAAoB,EACpB,yBAAyB,EACzB,qCAAqC,EACrC,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,+BAA+B,EAC/B,eAAe,GACf,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EACN,gBAAgB,EAChB,WAAW,EACX,wBAAwB,EACxB,qCAAqC,EACrC,oBAAoB,EACpB,yBAAyB,EACzB,qCAAqC,EACrC,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,+BAA+B,EAC/B,eAAe,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EACX,eAAe,EACf,sBAAsB,EACtB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,SAAS;IACrB;;;OAGG;kBACW,gBAAgB,UAAU,CAAC;IAIzC;;;;;;;;;;;;;;;;;OAiBG;oBACa,sBAAsB,OAAO,MAAM,GAAG,UAAU;CAGhE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,12 +16,47 @@ exports.SharedMap = exports.MapFactory = exports.LocalValueMaker = exports.Share
|
|
|
16
16
|
*
|
|
17
17
|
* @packageDocumentation
|
|
18
18
|
*/
|
|
19
|
-
var
|
|
20
|
-
Object.defineProperty(exports, "DirectoryFactory", { enumerable: true, get: function () { return
|
|
21
|
-
Object.defineProperty(exports, "SharedDirectory", { enumerable: true, get: function () { return
|
|
22
|
-
var
|
|
23
|
-
Object.defineProperty(exports, "LocalValueMaker", { enumerable: true, get: function () { return
|
|
24
|
-
var
|
|
25
|
-
Object.defineProperty(exports, "MapFactory", { enumerable: true, get: function () { return
|
|
26
|
-
|
|
19
|
+
var directory_js_1 = require("./directory.js");
|
|
20
|
+
Object.defineProperty(exports, "DirectoryFactory", { enumerable: true, get: function () { return directory_js_1.DirectoryFactory; } });
|
|
21
|
+
Object.defineProperty(exports, "SharedDirectory", { enumerable: true, get: function () { return directory_js_1.SharedDirectory; } });
|
|
22
|
+
var localValues_js_1 = require("./localValues.js");
|
|
23
|
+
Object.defineProperty(exports, "LocalValueMaker", { enumerable: true, get: function () { return localValues_js_1.LocalValueMaker; } });
|
|
24
|
+
var map_js_1 = require("./map.js");
|
|
25
|
+
Object.defineProperty(exports, "MapFactory", { enumerable: true, get: function () { return map_js_1.MapFactory; } });
|
|
26
|
+
const map_js_2 = require("./map.js");
|
|
27
|
+
/**
|
|
28
|
+
* {@inheritDoc ISharedMap}
|
|
29
|
+
* @public
|
|
30
|
+
* @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
|
|
31
|
+
*/
|
|
32
|
+
exports.SharedMap = {
|
|
33
|
+
/**
|
|
34
|
+
* Get a factory for SharedMap to register with the data store.
|
|
35
|
+
* @returns A factory that creates SharedMaps and loads them from storage.
|
|
36
|
+
*/
|
|
37
|
+
getFactory() {
|
|
38
|
+
return new map_js_2.MapFactory();
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* Create a new shared map.
|
|
42
|
+
* @param runtime - The data store runtime that the new shared map belongs to.
|
|
43
|
+
* @param id - Optional name of the shared map.
|
|
44
|
+
* @returns Newly created shared map.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* To create a `SharedMap`, call the static create method:
|
|
48
|
+
*
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const myMap = SharedMap.create(this.runtime, id);
|
|
51
|
+
* ```
|
|
52
|
+
* @privateRemarks
|
|
53
|
+
* TODO:
|
|
54
|
+
* Clarify how this differs from `MapFactory.create`.
|
|
55
|
+
* They are different since making this forward to MapFactory.create breaks some things,
|
|
56
|
+
* but the difference is unclear from the documentation.
|
|
57
|
+
*/
|
|
58
|
+
create(runtime, id) {
|
|
59
|
+
return runtime.createChannel(id, map_js_2.MapFactory.Type);
|
|
60
|
+
},
|
|
61
|
+
};
|
|
27
62
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;GAUG;AAEH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;GAUG;AAEH,+CAewB;AAdvB,gHAAA,gBAAgB,OAAA;AAahB,+GAAA,eAAe,OAAA;AAchB,mDAAgE;AAAvD,iHAAA,eAAe,OAAA;AACxB,mCAAsC;AAA7B,oGAAA,UAAU,OAAA;AAMnB,qCAAsC;AAGtC;;;;GAIG;AACU,QAAA,SAAS,GAAG;IACxB;;;OAGG;IACH,UAAU;QACT,OAAO,IAAI,mBAAU,EAAE,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,OAA+B,EAAE,EAAW;QAClD,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,mBAAU,CAAC,IAAI,CAAe,CAAC;IACjE,CAAC;CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The `map` library provides interfaces and implementing classes for map-like distributed data structures.\n *\n * @remarks The following distributed data structures are defined in this library:\n *\n * - {@link SharedMap}\n *\n * - {@link SharedDirectory}\n *\n * @packageDocumentation\n */\n\nexport {\n\tDirectoryFactory,\n\tICreateInfo,\n\tIDirectoryClearOperation,\n\tIDirectoryCreateSubDirectoryOperation,\n\tIDirectoryDataObject,\n\tIDirectoryDeleteOperation,\n\tIDirectoryDeleteSubDirectoryOperation,\n\tIDirectoryKeyOperation,\n\tIDirectoryNewStorageFormat,\n\tIDirectoryOperation,\n\tIDirectorySetOperation,\n\tIDirectoryStorageOperation,\n\tIDirectorySubDirectoryOperation,\n\tSharedDirectory,\n} from \"./directory.js\";\nexport {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISerializableValue,\n\tISerializedValue,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"./interfaces.js\";\nexport { LocalValueMaker, ILocalValue } from \"./localValues.js\";\nexport { MapFactory } from \"./map.js\";\n\nimport type {\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { MapFactory } from \"./map.js\";\nimport { ISharedMap } from \"./interfaces.js\";\n\n/**\n * {@inheritDoc ISharedMap}\n * @public\n * @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.\n */\nexport const SharedMap = {\n\t/**\n\t * Get a factory for SharedMap to register with the data store.\n\t * @returns A factory that creates SharedMaps and loads them from storage.\n\t */\n\tgetFactory(): IChannelFactory<ISharedMap> {\n\t\treturn new MapFactory();\n\t},\n\n\t/**\n\t * Create a new shared map.\n\t * @param runtime - The data store runtime that the new shared map belongs to.\n\t * @param id - Optional name of the shared map.\n\t * @returns Newly created shared map.\n\t *\n\t * @example\n\t * To create a `SharedMap`, call the static create method:\n\t *\n\t * ```typescript\n\t * const myMap = SharedMap.create(this.runtime, id);\n\t * ```\n\t * @privateRemarks\n\t * TODO:\n\t * Clarify how this differs from `MapFactory.create`.\n\t * They are different since making this forward to MapFactory.create breaks some things,\n\t * but the difference is unclear from the documentation.\n\t */\n\tcreate(runtime: IFluidDataStoreRuntime, id?: string): ISharedMap {\n\t\treturn runtime.createChannel(id, MapFactory.Type) as ISharedMap;\n\t},\n};\n\n/**\n * {@inheritDoc ISharedMap}\n * @public\n * @deprecated Use ISharedMap instead.\n * @privateRemarks\n * This alias is for legacy compat from when the SharedMap class was exported as public.\n */\nexport type SharedMap = ISharedMap;\n"]}
|
package/dist/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EACN,WAAW,EACX,MAAM,EACN,cAAc,EACd,qBAAqB,EACrB,MAAM,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IAGH,aAAa,EAAE,GAAG,CAAC;CACnB;AAED;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EACN,WAAW,EACX,MAAM,EACN,cAAc,EACd,qBAAqB,EACrB,MAAM,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAA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;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,KAAK,EAAE,GAAG,CAAC;CACX;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B"}
|
package/dist/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISharedObject, ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport {\n\tIDisposable,\n\tIEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n * @sealed\n * @public\n */\nexport interface IValueChanged {\n\t/**\n\t * The key storing the value that changed.\n\t */\n\tkey: string;\n\n\t/**\n\t * The value that was stored at the key prior to the change.\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tpreviousValue: any;\n}\n\n/**\n * Interface describing actions on a directory.\n *\n * @remarks When used as a Map, operates on its keys.\n * @alpha\n */\n// TODO: Use `unknown` instead (breaking change).\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface IDirectory\n\textends Map<string, any>,\n\t\tIEventProvider<IDirectoryEvents>,\n\t\tPartial<IDisposable> {\n\t/**\n\t * The absolute path of the directory.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * Retrieves the value stored at the given key from the directory.\n\t * @param key - Key to retrieve from\n\t * @returns The stored value, or undefined if the key is not set\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget<T = any>(key: string): T | undefined;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at\n\t * @param value - Value to set\n\t * @returns The IDirectory itself\n\t */\n\tset<T = unknown>(key: string, value: T): this;\n\n\t/**\n\t * Get the number of sub directory within the directory.\n\t * @returns The number of sub directory within a directory.\n\t */\n\tcountSubDirectory?(): number;\n\n\t/**\n\t * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the\n\t * same name already exists.\n\t * @param subdirName - Name of the new child directory to create\n\t * @returns The IDirectory child that was created or retrieved\n\t */\n\tcreateSubDirectory(subdirName: string): IDirectory;\n\n\t/**\n\t * Gets an IDirectory child of this IDirectory, if it exists.\n\t * @param subdirName - Name of the child directory to get\n\t * @returns The requested IDirectory\n\t */\n\tgetSubDirectory(subdirName: string): IDirectory | undefined;\n\n\t/**\n\t * Checks whether this directory has a child directory with the given name.\n\t * @param subdirName - Name of the child directory to check\n\t * @returns True if it exists, false otherwise\n\t */\n\thasSubDirectory(subdirName: string): boolean;\n\n\t/**\n\t * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.\n\t * @param subdirName - Name of the child directory to delete\n\t * @returns True if the IDirectory existed and was deleted, false if it did not exist\n\t */\n\tdeleteSubDirectory(subdirName: string): boolean;\n\n\t/**\n\t * Gets an iterator over the IDirectory children of this IDirectory.\n\t * @returns The IDirectory iterator\n\t */\n\tsubdirectories(): IterableIterator<[string, IDirectory]>;\n\n\t/**\n\t * Get an IDirectory within the directory, in order to use relative paths from that location.\n\t * @param relativePath - Path of the IDirectory to get, relative to this IDirectory\n\t * @returns The requested IDirectory\n\t */\n\tgetWorkingDirectory(relativePath: string): IDirectory | undefined;\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n *\n * @remarks\n * These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories.\n * @alpha\n */\nexport interface ISharedDirectoryEvents extends ISharedObjectEvents {\n\t/**\n\t * Emitted when a key is set or deleted. This is emitted for any key in the {@link ISharedDirectory} or any\n\t * subdirectory.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed, its value prior to the change, and the path to the\n\t * key that changed.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"valueChanged\",\n\t\tlistener: (\n\t\t\tchanged: IDirectoryValueChanged,\n\t\t\tlocal: boolean,\n\t\t\ttarget: IEventThisPlaceHolder,\n\t\t) => void,\n\t);\n\n\t/**\n\t * Emitted when the {@link ISharedDirectory} is cleared.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `local` - Whether the clear originated from this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(event: \"clear\", listener: (local: boolean, target: IEventThisPlaceHolder) => void);\n\n\t/**\n\t * Emitted when a subdirectory is created.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is created.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the create originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryCreated\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is deleted.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the delete originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryDeleted\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n * @alpha\n */\nexport interface IDirectoryEvents extends IEvent {\n\t/**\n\t * Emitted when a key is set or deleted. As opposed to the\n\t * {@link SharedDirectory}'s valueChanged event, this is emitted only on the {@link IDirectory} that directly\n\t * contains the key.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed and its value prior to the change.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(\n\t\tevent: \"containedValueChanged\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is created. Also emitted when a delete\n\t * of a subdirectory is rolled back.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is created.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the creation originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryCreated\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is deleted.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the delete originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryDeleted\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when this sub directory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(event: \"disposed\", listener: (target: IEventThisPlaceHolder) => void);\n\n\t/**\n\t * Emitted when this previously deleted sub directory is restored.\n\t * This event only needs to be handled in the case of rollback. If your application does\n\t * not use the local rollback feature, you can ignore this event.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(event: \"undisposed\", listener: (target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * Provides a hierarchical organization of map-like data structures as SubDirectories.\n * The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.\n * SubDirectories can be retrieved for use as working directories.\n * @alpha\n */\nexport interface ISharedDirectory\n\textends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>,\n\t\tOmit<IDirectory, \"on\" | \"once\" | \"off\"> {\n\t// The Omit type excludes symbols, which we don't want to exclude. Adding them back here manually.\n\t// https://github.com/microsoft/TypeScript/issues/31671\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[Symbol.iterator](): IterableIterator<[string, any]>;\n\treadonly [Symbol.toStringTag]: string;\n}\n\n/**\n * Type of \"valueChanged\" event parameter for {@link ISharedDirectory}.\n * @alpha\n */\nexport interface IDirectoryValueChanged extends IValueChanged {\n\t/**\n\t * The absolute path to the IDirectory storing the key which changed.\n\t */\n\tpath: string;\n}\n\n/**\n * Events emitted in response to changes to the {@link ISharedMap | map} data.\n * @sealed\n * @public\n */\nexport interface ISharedMapEvents extends ISharedObjectEvents {\n\t/**\n\t * Emitted when a key is set or deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed and its value prior to the change.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link ISharedMap} itself.\n\t */\n\t(\n\t\tevent: \"valueChanged\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when the map is cleared.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `local` - Whether the clear originated from this client.\n\t *\n\t * - `target` - The {@link ISharedMap} itself.\n\t */\n\t(event: \"clear\", listener: (local: boolean, target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting\n * and retrieving values that JavaScript developers are accustomed to with the\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.\n * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a\n * {@link @fluidframework/datastore#FluidObjectHandle}.\n *\n * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.\n * @sealed\n * @public\n */\n// TODO: Use `unknown` instead (breaking change).\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {\n\t/**\n\t * Retrieves the given key from the map if it exists.\n\t * @param key - Key to retrieve from\n\t * @returns The stored value, or undefined if the key is not set\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget<T = any>(key: string): T | undefined;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set\n\t * @param value - Value to set\n\t * @returns The {@link ISharedMap} itself\n\t */\n\tset<T = unknown>(key: string, value: T): this;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * {@link ISerializableValue.\"type\"} to understand whether they're storing a Plain JavaScript object,\n * a {@link @fluidframework/shared-object-base#SharedObject}, or a value type.\n *\n * @remarks\n *\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will\n * just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members\n * that are ISerializedHandle (the serialized form of a handle).\n *\n * If type is a value type then it must be amongst the types registered via registerValueType or we won't know how\n * to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.\n * If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a\n * channel ID.\n *\n * @deprecated This type is legacy and deprecated.\n * @alpha\n */\nexport interface ISerializableValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * The JSONable representation of the value.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tvalue: any;\n}\n\n/**\n * Serialized {@link ISerializableValue} counterpart.\n * @alpha\n */\nexport interface ISerializedValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * String representation of the value.\n\t *\n\t * @remarks Will be undefined if the original value was undefined.\n\t */\n\tvalue: string | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISharedObject, ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport {\n\tIDisposable,\n\tIEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n * @sealed\n * @public\n */\nexport interface IValueChanged {\n\t/**\n\t * The key storing the value that changed.\n\t */\n\tkey: string;\n\n\t/**\n\t * The value that was stored at the key prior to the change.\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tpreviousValue: any;\n}\n\n/**\n * Interface describing actions on a directory.\n *\n * @remarks When used as a Map, operates on its keys.\n * @alpha\n */\nexport interface IDirectory\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\textends Map<string, any>,\n\t\tIEventProvider<IDirectoryEvents>,\n\t\tPartial<IDisposable> {\n\t/**\n\t * The absolute path of the directory.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * Retrieves the value stored at the given key from the directory.\n\t * @param key - Key to retrieve from\n\t * @returns The stored value, or undefined if the key is not set\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget<T = any>(key: string): T | undefined;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at\n\t * @param value - Value to set\n\t * @returns The IDirectory itself\n\t */\n\tset<T = unknown>(key: string, value: T): this;\n\n\t/**\n\t * Get the number of sub directory within the directory.\n\t * @returns The number of sub directory within a directory.\n\t */\n\tcountSubDirectory?(): number;\n\n\t/**\n\t * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the\n\t * same name already exists.\n\t * @param subdirName - Name of the new child directory to create\n\t * @returns The IDirectory child that was created or retrieved\n\t */\n\tcreateSubDirectory(subdirName: string): IDirectory;\n\n\t/**\n\t * Gets an IDirectory child of this IDirectory, if it exists.\n\t * @param subdirName - Name of the child directory to get\n\t * @returns The requested IDirectory\n\t */\n\tgetSubDirectory(subdirName: string): IDirectory | undefined;\n\n\t/**\n\t * Checks whether this directory has a child directory with the given name.\n\t * @param subdirName - Name of the child directory to check\n\t * @returns True if it exists, false otherwise\n\t */\n\thasSubDirectory(subdirName: string): boolean;\n\n\t/**\n\t * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.\n\t * @param subdirName - Name of the child directory to delete\n\t * @returns True if the IDirectory existed and was deleted, false if it did not exist\n\t */\n\tdeleteSubDirectory(subdirName: string): boolean;\n\n\t/**\n\t * Gets an iterator over the IDirectory children of this IDirectory.\n\t * @returns The IDirectory iterator\n\t */\n\tsubdirectories(): IterableIterator<[string, IDirectory]>;\n\n\t/**\n\t * Get an IDirectory within the directory, in order to use relative paths from that location.\n\t * @param relativePath - Path of the IDirectory to get, relative to this IDirectory\n\t * @returns The requested IDirectory\n\t */\n\tgetWorkingDirectory(relativePath: string): IDirectory | undefined;\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n *\n * @remarks\n * These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories.\n * @alpha\n */\nexport interface ISharedDirectoryEvents extends ISharedObjectEvents {\n\t/**\n\t * Emitted when a key is set or deleted. This is emitted for any key in the {@link ISharedDirectory} or any\n\t * subdirectory.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed, its value prior to the change, and the path to the\n\t * key that changed.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"valueChanged\",\n\t\tlistener: (\n\t\t\tchanged: IDirectoryValueChanged,\n\t\t\tlocal: boolean,\n\t\t\ttarget: IEventThisPlaceHolder,\n\t\t) => void,\n\t);\n\n\t/**\n\t * Emitted when the {@link ISharedDirectory} is cleared.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `local` - Whether the clear originated from this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(event: \"clear\", listener: (local: boolean, target: IEventThisPlaceHolder) => void);\n\n\t/**\n\t * Emitted when a subdirectory is created.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is created.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the create originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryCreated\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is deleted.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the delete originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryDeleted\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n * @alpha\n */\nexport interface IDirectoryEvents extends IEvent {\n\t/**\n\t * Emitted when a key is set or deleted. As opposed to the\n\t * {@link SharedDirectory}'s valueChanged event, this is emitted only on the {@link IDirectory} that directly\n\t * contains the key.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed and its value prior to the change.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(\n\t\tevent: \"containedValueChanged\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is created. Also emitted when a delete\n\t * of a subdirectory is rolled back.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is created.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the creation originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryCreated\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is deleted.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the delete originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryDeleted\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when this sub directory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(event: \"disposed\", listener: (target: IEventThisPlaceHolder) => void);\n\n\t/**\n\t * Emitted when this previously deleted sub directory is restored.\n\t * This event only needs to be handled in the case of rollback. If your application does\n\t * not use the local rollback feature, you can ignore this event.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(event: \"undisposed\", listener: (target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * Provides a hierarchical organization of map-like data structures as SubDirectories.\n * The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.\n * SubDirectories can be retrieved for use as working directories.\n * @alpha\n */\nexport interface ISharedDirectory\n\textends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>,\n\t\tOmit<IDirectory, \"on\" | \"once\" | \"off\"> {\n\t// The Omit type excludes symbols, which we don't want to exclude. Adding them back here manually.\n\t// https://github.com/microsoft/TypeScript/issues/31671\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[Symbol.iterator](): IterableIterator<[string, any]>;\n\treadonly [Symbol.toStringTag]: string;\n}\n\n/**\n * Type of \"valueChanged\" event parameter for {@link ISharedDirectory}.\n * @alpha\n */\nexport interface IDirectoryValueChanged extends IValueChanged {\n\t/**\n\t * The absolute path to the IDirectory storing the key which changed.\n\t */\n\tpath: string;\n}\n\n/**\n * Events emitted in response to changes to the {@link ISharedMap | map} data.\n * @sealed\n * @public\n */\nexport interface ISharedMapEvents extends ISharedObjectEvents {\n\t/**\n\t * Emitted when a key is set or deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed and its value prior to the change.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link ISharedMap} itself.\n\t */\n\t(\n\t\tevent: \"valueChanged\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when the map is cleared.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `local` - Whether the clear originated from this client.\n\t *\n\t * - `target` - The {@link ISharedMap} itself.\n\t */\n\t(event: \"clear\", listener: (local: boolean, target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting\n * and retrieving values that JavaScript developers are accustomed to with the\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.\n * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a\n * {@link @fluidframework/datastore#FluidObjectHandle}.\n *\n * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.\n * @sealed\n * @public\n */\n// TODO: Use `unknown` instead (breaking change).\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {\n\t/**\n\t * Retrieves the given key from the map if it exists.\n\t * @param key - Key to retrieve from\n\t * @returns The stored value, or undefined if the key is not set\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget<T = any>(key: string): T | undefined;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set\n\t * @param value - Value to set\n\t * @returns The {@link ISharedMap} itself\n\t */\n\tset<T = unknown>(key: string, value: T): this;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * {@link ISerializableValue.\"type\"} to understand whether they're storing a Plain JavaScript object,\n * a {@link @fluidframework/shared-object-base#SharedObject}, or a value type.\n *\n * @remarks\n *\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will\n * just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members\n * that are ISerializedHandle (the serialized form of a handle).\n *\n * If type is a value type then it must be amongst the types registered via registerValueType or we won't know how\n * to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.\n * If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a\n * channel ID.\n *\n * @deprecated This type is legacy and deprecated.\n * @alpha\n */\nexport interface ISerializableValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * The JSONable representation of the value.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tvalue: any;\n}\n\n/**\n * Serialized {@link ISerializableValue} counterpart.\n * @alpha\n */\nexport interface ISerializedValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * String representation of the value.\n\t *\n\t * @remarks Will be undefined if the original value was undefined.\n\t */\n\tvalue: string | undefined;\n}\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ISerializableValue } from "./interfaces";
|
|
6
|
-
import { ILocalValue } from "./localValues";
|
|
5
|
+
import { ISerializableValue } from "./interfaces.js";
|
|
6
|
+
import { ILocalValue } from "./localValues.js";
|
|
7
7
|
/**
|
|
8
8
|
* Operation indicating a value should be set for a key.
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalInterfaces.d.ts","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"internalInterfaces.d.ts","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IAEH,KAAK,EAAE,kBAAkB,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,aAAa,EAAE,WAAW,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,yBAAyB,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalInterfaces.js","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// eslint-disable-next-line import/no-deprecated\nimport { ISerializableValue } from \"./interfaces\";\nimport { ILocalValue } from \"./localValues\";\n\n/**\n * Operation indicating a value should be set for a key.\n */\nexport interface IMapSetOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"set\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n\n\t/**\n\t * Value to be set on the key.\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\tvalue: ISerializableValue;\n}\n\n/**\n * Operation indicating the map should be cleared.\n */\nexport interface IMapClearOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"clear\";\n}\n\n/**\n * Operation indicating a key should be deleted from the map.\n */\nexport interface IMapDeleteOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"delete\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n}\n\n/**\n * Metadata for an local `edit` operation.\n */\nexport interface IMapKeyEditLocalOpMetadata {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"edit\";\n\n\t/**\n\t * Unique identifier for the local operation.\n\t */\n\tpendingMessageId: number;\n\n\t/**\n\t * Local value prior to the edit.\n\t */\n\tpreviousValue: ILocalValue;\n}\n\n/**\n * Metadata for an local `add` operation.\n */\nexport interface IMapKeyAddLocalOpMetadata {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"add\";\n\n\t/**\n\t * Unique identifier for the local operation.\n\t */\n\tpendingMessageId: number;\n}\n\n/**\n * Metadata for an local `clear` operation.\n */\nexport interface IMapClearLocalOpMetadata {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"clear\";\n\n\t/**\n\t * Unique identifier for the local operation.\n\t */\n\tpendingMessageId: number;\n\n\t/**\n\t * Local map contents prior to clearing it.\n\t */\n\tpreviousMap?: Map<string, ILocalValue>;\n}\n\n/**\n * Metadata for a local operation associated with a specific key entry in the map.\n */\nexport type MapKeyLocalOpMetadata = IMapKeyEditLocalOpMetadata | IMapKeyAddLocalOpMetadata;\n\n/**\n * Metadata for a local operation.\n */\nexport type MapLocalOpMetadata = IMapClearLocalOpMetadata | MapKeyLocalOpMetadata;\n"]}
|
|
1
|
+
{"version":3,"file":"internalInterfaces.js","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// eslint-disable-next-line import/no-deprecated\nimport { ISerializableValue } from \"./interfaces.js\";\nimport { ILocalValue } from \"./localValues.js\";\n\n/**\n * Operation indicating a value should be set for a key.\n */\nexport interface IMapSetOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"set\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n\n\t/**\n\t * Value to be set on the key.\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\tvalue: ISerializableValue;\n}\n\n/**\n * Operation indicating the map should be cleared.\n */\nexport interface IMapClearOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"clear\";\n}\n\n/**\n * Operation indicating a key should be deleted from the map.\n */\nexport interface IMapDeleteOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"delete\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n}\n\n/**\n * Metadata for an local `edit` operation.\n */\nexport interface IMapKeyEditLocalOpMetadata {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"edit\";\n\n\t/**\n\t * Unique identifier for the local operation.\n\t */\n\tpendingMessageId: number;\n\n\t/**\n\t * Local value prior to the edit.\n\t */\n\tpreviousValue: ILocalValue;\n}\n\n/**\n * Metadata for an local `add` operation.\n */\nexport interface IMapKeyAddLocalOpMetadata {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"add\";\n\n\t/**\n\t * Unique identifier for the local operation.\n\t */\n\tpendingMessageId: number;\n}\n\n/**\n * Metadata for an local `clear` operation.\n */\nexport interface IMapClearLocalOpMetadata {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"clear\";\n\n\t/**\n\t * Unique identifier for the local operation.\n\t */\n\tpendingMessageId: number;\n\n\t/**\n\t * Local map contents prior to clearing it.\n\t */\n\tpreviousMap?: Map<string, ILocalValue>;\n}\n\n/**\n * Metadata for a local operation associated with a specific key entry in the map.\n */\nexport type MapKeyLocalOpMetadata = IMapKeyEditLocalOpMetadata | IMapKeyAddLocalOpMetadata;\n\n/**\n * Metadata for a local operation.\n */\nexport type MapLocalOpMetadata = IMapClearLocalOpMetadata | MapKeyLocalOpMetadata;\n"]}
|
package/dist/localValues.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
6
6
|
import { IFluidSerializer } from "@fluidframework/shared-object-base";
|
|
7
|
-
import { ISerializableValue, ISerializedValue } from "./interfaces";
|
|
7
|
+
import { ISerializableValue, ISerializedValue } from "./interfaces.js";
|
|
8
8
|
/**
|
|
9
9
|
* A local value to be stored in a container type Distributed Data Store (DDS).
|
|
10
10
|
* @alpha
|
|
@@ -61,17 +61,15 @@ export declare class PlainLocalValue implements ILocalValue {
|
|
|
61
61
|
* @alpha
|
|
62
62
|
*/
|
|
63
63
|
export declare class LocalValueMaker {
|
|
64
|
-
private readonly serializer;
|
|
65
64
|
/**
|
|
66
65
|
* Create a new LocalValueMaker.
|
|
67
|
-
* @param serializer - The serializer to serialize / parse handles.
|
|
68
66
|
*/
|
|
69
|
-
constructor(
|
|
67
|
+
constructor();
|
|
70
68
|
/**
|
|
71
69
|
* Create a new local value from an incoming serialized value.
|
|
72
70
|
* @param serializable - The serializable value to make local
|
|
73
71
|
*/
|
|
74
|
-
fromSerializable(serializable: ISerializableValue): ILocalValue;
|
|
72
|
+
fromSerializable(serializable: ISerializableValue, serializer: IFluidSerializer, bind: IFluidHandle): ILocalValue;
|
|
75
73
|
/**
|
|
76
74
|
* Create a new local value containing a given plain object.
|
|
77
75
|
* @param value - The value to store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localValues.d.ts","sourceRoot":"","sources":["../src/localValues.ts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AgB,EAC5B,IAAI,EAAE,YAAY,GAChB,WAAW;IAkBd;;;;OAIG;IACI,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW;CAGhD"}
|
package/dist/localValues.js
CHANGED
|
@@ -63,17 +63,15 @@ exports.PlainLocalValue = PlainLocalValue;
|
|
|
63
63
|
class LocalValueMaker {
|
|
64
64
|
/**
|
|
65
65
|
* Create a new LocalValueMaker.
|
|
66
|
-
* @param serializer - The serializer to serialize / parse handles.
|
|
67
66
|
*/
|
|
68
|
-
constructor(
|
|
69
|
-
this.serializer = serializer;
|
|
70
|
-
}
|
|
67
|
+
constructor() { }
|
|
71
68
|
/**
|
|
72
69
|
* Create a new local value from an incoming serialized value.
|
|
73
70
|
* @param serializable - The serializable value to make local
|
|
74
71
|
*/
|
|
72
|
+
fromSerializable(
|
|
75
73
|
// eslint-disable-next-line import/no-deprecated
|
|
76
|
-
|
|
74
|
+
serializable, serializer, bind) {
|
|
77
75
|
// Migrate from old shared value to handles
|
|
78
76
|
if (serializable.type === shared_object_base_1.ValueType[shared_object_base_1.ValueType.Shared]) {
|
|
79
77
|
serializable.type = shared_object_base_1.ValueType[shared_object_base_1.ValueType.Plain];
|
|
@@ -81,10 +79,13 @@ class LocalValueMaker {
|
|
|
81
79
|
type: "__fluid_handle__",
|
|
82
80
|
url: serializable.value,
|
|
83
81
|
};
|
|
84
|
-
|
|
82
|
+
// NOTE: here we require the use of `parseHandles` because the roundtrip
|
|
83
|
+
// through a string is necessary to resolve the absolute path of
|
|
84
|
+
// legacy handles (`ValueType.Shared`)
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
86
|
+
serializable.value = serializer.encode((0, shared_object_base_1.parseHandles)(handle, serializer), bind);
|
|
85
87
|
}
|
|
86
|
-
|
|
87
|
-
return new PlainLocalValue(translatedValue);
|
|
88
|
+
return new PlainLocalValue(serializable.value);
|
|
88
89
|
}
|
|
89
90
|
/**
|
|
90
91
|
* Create a new local value containing a given plain object.
|
package/dist/localValues.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localValues.js","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,2EAK4C;AA+B5C;;;;;;;;GAQG;AACH,SAAgB,gBAAgB,CAC/B,UAAuB,EACvB,UAA4B,EAC5B,IAAkB;IAGlB,MAAM,KAAK,GAAG,UAAU,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC1D,OAAO;QACN,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,mEAAmE;QACnE,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;KAC7C,CAAC;AACH,CAAC;AAZD,4CAYC;AAED;;GAEG;AACH,MAAa,eAAe;IAC3B;;;OAGG;IACH,YAAmC,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;IAAG,CAAC;IAErD;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,8BAAS,CAAC,8BAAS,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,cAAc,CAAC,UAA4B,EAAE,IAAkB;QACrE,2FAA2F;QAC3F,oBAAoB;QACpB,MAAM,KAAK,GAAG,IAAA,qCAAgB,EAAC,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QAE7D,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK;SACL,CAAC;IACH,CAAC;CACD;AA3BD,0CA2BC;AAED;;;;GAIG;AACH,MAAa,eAAe;IAC3B
|
|
1
|
+
{"version":3,"file":"localValues.js","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,2EAK4C;AA+B5C;;;;;;;;GAQG;AACH,SAAgB,gBAAgB,CAC/B,UAAuB,EACvB,UAA4B,EAC5B,IAAkB;IAGlB,MAAM,K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C,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,IAAA,iCAAY,EAAC,MAAM,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;SAC/E;QAED,OAAO,IAAI,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACI,YAAY,CAAC,KAAc;QACjC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACD;AAzCD,0CAyCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport {\n\tIFluidSerializer,\n\tparseHandles,\n\tserializeHandles,\n\tValueType,\n} from \"@fluidframework/shared-object-base\";\nimport { ISerializedHandle } from \"@fluidframework/runtime-utils\";\n// eslint-disable-next-line import/no-deprecated\nimport { ISerializableValue, ISerializedValue } from \"./interfaces.js\";\n\n/**\n * A local value to be stored in a container type Distributed Data Store (DDS).\n * @alpha\n */\nexport interface ILocalValue {\n\t/**\n\t * Type indicator of the value stored within.\n\t */\n\treadonly type: string;\n\n\t/**\n\t * The in-memory value stored within.\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly value: any;\n\n\t/**\n\t * Retrieve the serialized form of the value stored within.\n\t * @param serializer - Data store runtime's serializer\n\t * @param bind - Container type's handle\n\t * @returns The serialized form of the contained value\n\t */\n\tmakeSerialized(serializer: IFluidSerializer, bind: IFluidHandle): ISerializedValue;\n}\n\n/**\n * Converts the provided `localValue` to its serialized form.\n *\n * @param localValue - The value to serialize.\n * @param serializer - Data store runtime's serializer.\n * @param bind - Container type's handle.\n *\n * @see {@link ILocalValue.makeSerialized}\n */\nexport function makeSerializable(\n\tlocalValue: ILocalValue,\n\tserializer: IFluidSerializer,\n\tbind: IFluidHandle,\n\t// eslint-disable-next-line import/no-deprecated\n): ISerializableValue {\n\tconst value = localValue.makeSerialized(serializer, bind);\n\treturn {\n\t\ttype: value.type,\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\tvalue: value.value && JSON.parse(value.value),\n\t};\n}\n\n/**\n * Manages a contained plain value. May also contain shared object handles.\n */\nexport class PlainLocalValue implements ILocalValue {\n\t/**\n\t * Create a new PlainLocalValue.\n\t * @param value - The value to store, which may contain shared object handles\n\t */\n\tpublic constructor(public readonly value: unknown) {}\n\n\t/**\n\t * {@inheritDoc ILocalValue.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn ValueType[ValueType.Plain];\n\t}\n\n\t/**\n\t * {@inheritDoc ILocalValue.makeSerialized}\n\t */\n\tpublic makeSerialized(serializer: IFluidSerializer, bind: IFluidHandle): ISerializedValue {\n\t\t// Stringify to convert to the serialized handle values - and then parse in order to create\n\t\t// a POJO for the op\n\t\tconst value = serializeHandles(this.value, serializer, bind);\n\n\t\treturn {\n\t\t\ttype: this.type,\n\t\t\tvalue,\n\t\t};\n\t}\n}\n\n/**\n * Enables a container type {@link https://fluidframework.com/docs/build/dds/ | DDS} to produce and store local\n * values with minimal awareness of how those objects are stored, serialized, and deserialized.\n * @alpha\n */\nexport class LocalValueMaker {\n\t/**\n\t * Create a new LocalValueMaker.\n\t */\n\tpublic constructor() {}\n\n\t/**\n\t * Create a new local value from an incoming serialized value.\n\t * @param serializable - The serializable value to make local\n\t */\n\tpublic fromSerializable(\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tserializable: ISerializableValue,\n\t\tserializer: IFluidSerializer,\n\t\tbind: IFluidHandle,\n\t): ILocalValue {\n\t\t// Migrate from old shared value to handles\n\t\tif (serializable.type === ValueType[ValueType.Shared]) {\n\t\t\tserializable.type = ValueType[ValueType.Plain];\n\t\t\tconst handle: ISerializedHandle = {\n\t\t\t\ttype: \"__fluid_handle__\",\n\t\t\t\turl: serializable.value as string,\n\t\t\t};\n\t\t\t// NOTE: here we require the use of `parseHandles` because the roundtrip\n\t\t\t// through a string is necessary to resolve the absolute path of\n\t\t\t// legacy handles (`ValueType.Shared`)\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tserializable.value = serializer.encode(parseHandles(handle, serializer), bind);\n\t\t}\n\n\t\treturn new PlainLocalValue(serializable.value);\n\t}\n\n\t/**\n\t * Create a new local value containing a given plain object.\n\t * @param value - The value to store\n\t * @returns An ILocalValue containing the value\n\t */\n\tpublic fromInMemory(value: unknown): ILocalValue {\n\t\treturn new PlainLocalValue(value);\n\t}\n}\n"]}
|
package/dist/map-alpha.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ import { SharedObject } from '@fluidframework/shared-object-base';
|
|
|
34
34
|
* @sealed
|
|
35
35
|
* @alpha
|
|
36
36
|
*/
|
|
37
|
-
export declare class DirectoryFactory implements IChannelFactory {
|
|
37
|
+
export declare class DirectoryFactory implements IChannelFactory<ISharedDirectory> {
|
|
38
38
|
/**
|
|
39
39
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
40
40
|
*/
|
|
@@ -597,17 +597,15 @@ export declare interface IValueChanged {
|
|
|
597
597
|
* @alpha
|
|
598
598
|
*/
|
|
599
599
|
export declare class LocalValueMaker {
|
|
600
|
-
private readonly serializer;
|
|
601
600
|
/**
|
|
602
601
|
* Create a new LocalValueMaker.
|
|
603
|
-
* @param serializer - The serializer to serialize / parse handles.
|
|
604
602
|
*/
|
|
605
|
-
constructor(
|
|
603
|
+
constructor();
|
|
606
604
|
/**
|
|
607
605
|
* Create a new local value from an incoming serialized value.
|
|
608
606
|
* @param serializable - The serializable value to make local
|
|
609
607
|
*/
|
|
610
|
-
fromSerializable(serializable: ISerializableValue): ILocalValue;
|
|
608
|
+
fromSerializable(serializable: ISerializableValue, serializer: IFluidSerializer, bind: IFluidHandle): ILocalValue;
|
|
611
609
|
/**
|
|
612
610
|
* Create a new local value containing a given plain object.
|
|
613
611
|
* @param value - The value to store
|
|
@@ -617,12 +615,12 @@ export declare class LocalValueMaker {
|
|
|
617
615
|
}
|
|
618
616
|
|
|
619
617
|
/**
|
|
620
|
-
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link
|
|
618
|
+
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedMap}.
|
|
621
619
|
*
|
|
622
620
|
* @sealed
|
|
623
621
|
* @alpha
|
|
624
622
|
*/
|
|
625
|
-
export declare class MapFactory implements IChannelFactory {
|
|
623
|
+
export declare class MapFactory implements IChannelFactory<ISharedMap> {
|
|
626
624
|
/**
|
|
627
625
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
628
626
|
*/
|
|
@@ -671,13 +669,13 @@ export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents
|
|
|
671
669
|
* @param id - Optional name of the shared directory
|
|
672
670
|
* @returns Newly create shared directory (but not attached yet)
|
|
673
671
|
*/
|
|
674
|
-
static create(runtime: IFluidDataStoreRuntime, id?: string):
|
|
672
|
+
static create(runtime: IFluidDataStoreRuntime, id?: string): ISharedDirectory;
|
|
675
673
|
/**
|
|
676
674
|
* Get a factory for SharedDirectory to register with the data store.
|
|
677
675
|
*
|
|
678
676
|
* @returns A factory that creates and load SharedDirectory
|
|
679
677
|
*/
|
|
680
|
-
static getFactory(): IChannelFactory
|
|
678
|
+
static getFactory(): IChannelFactory<ISharedDirectory>;
|
|
681
679
|
/**
|
|
682
680
|
* String representation for the class.
|
|
683
681
|
*/
|
|
@@ -852,7 +850,7 @@ export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents
|
|
|
852
850
|
/**
|
|
853
851
|
* {@inheritDoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
|
|
854
852
|
*/
|
|
855
|
-
protected applyStashedOp(op: unknown):
|
|
853
|
+
protected applyStashedOp(op: unknown): void;
|
|
856
854
|
private serializeDirectory;
|
|
857
855
|
}
|
|
858
856
|
|
|
@@ -861,7 +859,12 @@ export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents
|
|
|
861
859
|
* @public
|
|
862
860
|
* @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
|
|
863
861
|
*/
|
|
864
|
-
export declare
|
|
862
|
+
export declare const SharedMap: {
|
|
863
|
+
/**
|
|
864
|
+
* Get a factory for SharedMap to register with the data store.
|
|
865
|
+
* @returns A factory that creates SharedMaps and loads them from storage.
|
|
866
|
+
*/
|
|
867
|
+
getFactory(): IChannelFactory<ISharedMap>;
|
|
865
868
|
/**
|
|
866
869
|
* Create a new shared map.
|
|
867
870
|
* @param runtime - The data store runtime that the new shared map belongs to.
|
|
@@ -874,110 +877,22 @@ export declare class SharedMap extends SharedObject<ISharedMapEvents> implements
|
|
|
874
877
|
* ```typescript
|
|
875
878
|
* const myMap = SharedMap.create(this.runtime, id);
|
|
876
879
|
* ```
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
*/
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
*
|
|
895
|
-
* @param id - String identifier.
|
|
896
|
-
* @param runtime - Data store runtime.
|
|
897
|
-
* @param attributes - The attributes for the map.
|
|
898
|
-
*/
|
|
899
|
-
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
900
|
-
/**
|
|
901
|
-
* Get an iterator over the keys in this map.
|
|
902
|
-
* @returns The iterator
|
|
903
|
-
*/
|
|
904
|
-
keys(): IterableIterator<string>;
|
|
905
|
-
/**
|
|
906
|
-
* Get an iterator over the entries in this map.
|
|
907
|
-
* @returns The iterator
|
|
908
|
-
*/
|
|
909
|
-
entries(): IterableIterator<[string, any]>;
|
|
910
|
-
/**
|
|
911
|
-
* Get an iterator over the values in this map.
|
|
912
|
-
* @returns The iterator
|
|
913
|
-
*/
|
|
914
|
-
values(): IterableIterator<any>;
|
|
915
|
-
/**
|
|
916
|
-
* Get an iterator over the entries in this map.
|
|
917
|
-
* @returns The iterator
|
|
918
|
-
*/
|
|
919
|
-
[Symbol.iterator](): IterableIterator<[string, any]>;
|
|
920
|
-
/**
|
|
921
|
-
* The number of key/value pairs stored in the map.
|
|
922
|
-
*/
|
|
923
|
-
get size(): number;
|
|
924
|
-
/**
|
|
925
|
-
* Executes the given callback on each entry in the map.
|
|
926
|
-
* @param callbackFn - Callback function
|
|
927
|
-
*/
|
|
928
|
-
forEach(callbackFn: (value: any, key: string, map: Map<string, any>) => void): void;
|
|
929
|
-
/**
|
|
930
|
-
* {@inheritDoc ISharedMap.get}
|
|
931
|
-
*/
|
|
932
|
-
get<T = any>(key: string): T | undefined;
|
|
933
|
-
/**
|
|
934
|
-
* Check if a key exists in the map.
|
|
935
|
-
* @param key - The key to check
|
|
936
|
-
* @returns True if the key exists, false otherwise
|
|
937
|
-
*/
|
|
938
|
-
has(key: string): boolean;
|
|
939
|
-
/**
|
|
940
|
-
* {@inheritDoc ISharedMap.set}
|
|
941
|
-
*/
|
|
942
|
-
set(key: string, value: unknown): this;
|
|
943
|
-
/**
|
|
944
|
-
* Delete a key from the map.
|
|
945
|
-
* @param key - Key to delete
|
|
946
|
-
* @returns True if the key existed and was deleted, false if it did not exist
|
|
947
|
-
*/
|
|
948
|
-
delete(key: string): boolean;
|
|
949
|
-
/**
|
|
950
|
-
* Clear all data from the map.
|
|
951
|
-
*/
|
|
952
|
-
clear(): void;
|
|
953
|
-
/**
|
|
954
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
|
|
955
|
-
*/
|
|
956
|
-
protected summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
957
|
-
/**
|
|
958
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
|
|
959
|
-
*/
|
|
960
|
-
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
961
|
-
/**
|
|
962
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
|
|
963
|
-
*/
|
|
964
|
-
protected onDisconnect(): void;
|
|
965
|
-
/**
|
|
966
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.reSubmitCore}
|
|
967
|
-
*/
|
|
968
|
-
protected reSubmitCore(content: unknown, localOpMetadata: unknown): void;
|
|
969
|
-
/**
|
|
970
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
|
|
971
|
-
*/
|
|
972
|
-
protected applyStashedOp(content: unknown): unknown;
|
|
973
|
-
/**
|
|
974
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
|
|
975
|
-
*/
|
|
976
|
-
protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
977
|
-
/**
|
|
978
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.rollback}
|
|
979
|
-
*/
|
|
980
|
-
protected rollback(content: unknown, localOpMetadata: unknown): void;
|
|
981
|
-
}
|
|
880
|
+
* @privateRemarks
|
|
881
|
+
* TODO:
|
|
882
|
+
* Clarify how this differs from `MapFactory.create`.
|
|
883
|
+
* They are different since making this forward to MapFactory.create breaks some things,
|
|
884
|
+
* but the difference is unclear from the documentation.
|
|
885
|
+
*/
|
|
886
|
+
create(runtime: IFluidDataStoreRuntime, id?: string): ISharedMap;
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* {@inheritDoc ISharedMap}
|
|
891
|
+
* @public
|
|
892
|
+
* @deprecated Use ISharedMap instead.
|
|
893
|
+
* @privateRemarks
|
|
894
|
+
* This alias is for legacy compat from when the SharedMap class was exported as public.
|
|
895
|
+
*/
|
|
896
|
+
export declare type SharedMap = ISharedMap;
|
|
982
897
|
|
|
983
898
|
export { }
|