@fluidframework/map 2.31.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/directory.d.ts +0 -20
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +0 -2
- package/dist/directory.js.map +1 -1
- package/dist/directoryFactory.d.ts +2 -1
- package/dist/directoryFactory.d.ts.map +1 -1
- package/dist/directoryFactory.js +2 -1
- package/dist/directoryFactory.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/internalInterfaces.d.ts +0 -2
- package/dist/internalInterfaces.d.ts.map +1 -1
- package/dist/internalInterfaces.js.map +1 -1
- package/dist/localValues.d.ts +0 -4
- package/dist/localValues.d.ts.map +1 -1
- package/dist/localValues.js +0 -2
- package/dist/localValues.js.map +1 -1
- package/dist/mapFactory.d.ts +2 -1
- package/dist/mapFactory.d.ts.map +1 -1
- package/dist/mapFactory.js +2 -1
- package/dist/mapFactory.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/directory.d.ts +0 -20
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.js +0 -2
- package/lib/directory.js.map +1 -1
- package/lib/directoryFactory.d.ts +2 -1
- package/lib/directoryFactory.d.ts.map +1 -1
- package/lib/directoryFactory.js +2 -1
- package/lib/directoryFactory.js.map +1 -1
- package/lib/index.d.ts +5 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/internalInterfaces.d.ts +0 -2
- package/lib/internalInterfaces.d.ts.map +1 -1
- package/lib/internalInterfaces.js.map +1 -1
- package/lib/localValues.d.ts +0 -4
- package/lib/localValues.d.ts.map +1 -1
- package/lib/localValues.js +0 -2
- package/lib/localValues.js.map +1 -1
- package/lib/mapFactory.d.ts +2 -1
- package/lib/mapFactory.d.ts.map +1 -1
- package/lib/mapFactory.js +2 -1
- package/lib/mapFactory.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +21 -20
- package/src/directory.ts +0 -20
- package/src/directoryFactory.ts +2 -1
- package/src/index.ts +7 -3
- package/src/internalInterfaces.ts +0 -2
- package/src/localValues.ts +0 -4
- package/src/mapFactory.ts +2 -1
- package/src/packageVersion.ts +1 -1
|
@@ -6,7 +6,8 @@ import type { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChan
|
|
|
6
6
|
import type { ISharedDirectory } from "./interfaces.js";
|
|
7
7
|
/**
|
|
8
8
|
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedDirectory}.
|
|
9
|
-
*
|
|
9
|
+
* @privateRemarks
|
|
10
|
+
* TODO: AB#35245: Deprecate and stop exporting this class.
|
|
10
11
|
* @sealed
|
|
11
12
|
* @legacy
|
|
12
13
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directoryFactory.d.ts","sourceRoot":"","sources":["../src/directoryFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGxD
|
|
1
|
+
{"version":3,"file":"directoryFactory.d.ts","sourceRoot":"","sources":["../src/directoryFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGxD;;;;;;;GAOG;AACH,qBAAa,gBAAiB,YAAW,eAAe,CAAC,gBAAgB,CAAC;IACzE;;OAEG;IACH,gBAAuB,IAAI,iDAAiD;IAE5E;;OAEG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,kBAAkB,CAE1C;IAED;;OAEG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,gBAAgB,CAAC;IAO5B;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,gBAAgB;CAM5E;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,sLAA6D,CAAC;AAE1F;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC"}
|
package/lib/directoryFactory.js
CHANGED
|
@@ -7,7 +7,8 @@ import { SharedDirectory as SharedDirectoryInternal } from "./directory.js";
|
|
|
7
7
|
import { pkgVersion } from "./packageVersion.js";
|
|
8
8
|
/**
|
|
9
9
|
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedDirectory}.
|
|
10
|
-
*
|
|
10
|
+
* @privateRemarks
|
|
11
|
+
* TODO: AB#35245: Deprecate and stop exporting this class.
|
|
11
12
|
* @sealed
|
|
12
13
|
* @legacy
|
|
13
14
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directoryFactory.js","sourceRoot":"","sources":["../src/directoryFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAErF,OAAO,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAE,UAAU,E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AG,sBAAsB,CAAmB,gBAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport { SharedDirectory as SharedDirectoryInternal } from \"./directory.js\";\nimport type { ISharedDirectory } from \"./interfaces.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedDirectory}.\n * @privateRemarks\n * TODO: AB#35245: Deprecate and stop exporting this class.\n * @sealed\n * @legacy\n * @alpha\n */\nexport class DirectoryFactory implements IChannelFactory<ISharedDirectory> {\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/directory\";\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: DirectoryFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn DirectoryFactory.Type;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn DirectoryFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedDirectory> {\n\t\tconst directory = new SharedDirectoryInternal(id, runtime, attributes);\n\t\tawait directory.load(services);\n\n\t\treturn directory;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory {\n\t\tconst directory = new SharedDirectoryInternal(id, runtime, DirectoryFactory.Attributes);\n\t\tdirectory.initializeLocal();\n\n\t\treturn directory;\n\t}\n}\n\n/**\n * Entrypoint for {@link ISharedDirectory} creation.\n * @legacy\n * @alpha\n */\nexport const SharedDirectory = createSharedObjectKind<ISharedDirectory>(DirectoryFactory);\n\n/**\n * Entrypoint for {@link ISharedDirectory} creation.\n * @legacy\n * @alpha\n * @privateRemarks\n * This alias is for legacy compat from when the SharedDirectory class was exported as public.\n */\nexport type SharedDirectory = ISharedDirectory;\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
* @packageDocumentation
|
|
15
15
|
*/
|
|
16
16
|
export type { IDirectory, IDirectoryEvents, IDirectoryValueChanged, ISharedDirectory, ISharedDirectoryEvents, ISharedMap, ISharedMapEvents, IValueChanged, } from "./interfaces.js";
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export type { ICreateInfo, IDirectoryNewStorageFormat, IDirectoryDataObject, } from "./directory.js";
|
|
17
|
+
export { SharedMap } from "./mapFactory.js";
|
|
18
|
+
export { SharedDirectory } from "./directoryFactory.js";
|
|
20
19
|
export type { ISerializableValue } from "./internalInterfaces.js";
|
|
20
|
+
export { MapFactory } from "./mapFactory.js";
|
|
21
|
+
export { DirectoryFactory } from "./directoryFactory.js";
|
|
22
|
+
export type { ICreateInfo, IDirectoryNewStorageFormat, IDirectoryDataObject, } from "./directory.js";
|
|
21
23
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/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,YAAY,EACX,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,YAAY,EACX,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EACX,WAAW,EACX,0BAA0B,EAC1B,oBAAoB,GACpB,MAAM,gBAAgB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
5
|
+
export { SharedMap } from "./mapFactory.js";
|
|
6
|
+
export { SharedDirectory } from "./directoryFactory.js";
|
|
7
|
+
export { MapFactory } from "./mapFactory.js";
|
|
8
|
+
export { DirectoryFactory } from "./directoryFactory.js";
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwBH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwBH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,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 type {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"./interfaces.js\";\nexport { SharedMap } from \"./mapFactory.js\";\nexport { SharedDirectory } from \"./directoryFactory.js\";\n\n// Legacy exports that should be deprecated and removed as part of AB#8004 or AB#35245\nexport type { ISerializableValue } from \"./internalInterfaces.js\";\nexport { MapFactory } from \"./mapFactory.js\";\nexport { DirectoryFactory } from \"./directoryFactory.js\";\nexport type {\n\tICreateInfo,\n\tIDirectoryNewStorageFormat,\n\tIDirectoryDataObject,\n} from \"./directory.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalInterfaces.d.ts","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AACH,MAAM,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kB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,KAAK,EAAE,GAAG,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B"}
|
|
@@ -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\nimport type { 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\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\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(AB#8004).\n * @legacy\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
|
|
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\nimport type { 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\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\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(AB#8004).\n * @legacy\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 */\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"]}
|
package/lib/localValues.d.ts
CHANGED
|
@@ -7,8 +7,6 @@ import type { IFluidSerializer } from "@fluidframework/shared-object-base/intern
|
|
|
7
7
|
import type { ISerializableValue, ISerializedValue } from "./internalInterfaces.js";
|
|
8
8
|
/**
|
|
9
9
|
* A local value to be stored in a container type Distributed Data Store (DDS).
|
|
10
|
-
* @legacy
|
|
11
|
-
* @alpha
|
|
12
10
|
*/
|
|
13
11
|
export interface ILocalValue {
|
|
14
12
|
/**
|
|
@@ -59,8 +57,6 @@ export declare class PlainLocalValue implements ILocalValue {
|
|
|
59
57
|
/**
|
|
60
58
|
* Enables a container type {@link https://fluidframework.com/docs/build/dds/ | DDS} to produce and store local
|
|
61
59
|
* values with minimal awareness of how those objects are stored, serialized, and deserialized.
|
|
62
|
-
* @legacy
|
|
63
|
-
* @alpha
|
|
64
60
|
*/
|
|
65
61
|
export declare class LocalValueMaker {
|
|
66
62
|
/**
|
package/lib/localValues.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localValues.d.ts","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAQpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEpF
|
|
1
|
+
{"version":3,"file":"localValues.d.ts","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAQpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAGH,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC;IAEpB;;;;;OAKG;IACH,cAAc,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAAC;CACnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC/B,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,GAEhB,kBAAkB,CAOpB;AAED;;GAEG;AACH,qBAAa,eAAgB,YAAW,WAAW;aAKf,KAAK,EAAE,OAAO;IAJjD;;;OAGG;gBACgC,KAAK,EAAE,OAAO;IAEjD;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;OAEG;IACI,cAAc,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,GAAG,gBAAgB;CAUzF;AAED;;;GAGG;AACH,qBAAa,eAAe;IAC3B;;OAEG;;IAGH;;;OAGG;IACI,gBAAgB,CAEtB,YAAY,EAAE,kBAAkB,EAChC,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,GAChB,WAAW;IAkBd;;;;OAIG;IACI,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW;CAGhD"}
|
package/lib/localValues.js
CHANGED
|
@@ -53,8 +53,6 @@ export class PlainLocalValue {
|
|
|
53
53
|
/**
|
|
54
54
|
* Enables a container type {@link https://fluidframework.com/docs/build/dds/ | DDS} to produce and store local
|
|
55
55
|
* values with minimal awareness of how those objects are stored, serialized, and deserialized.
|
|
56
|
-
* @legacy
|
|
57
|
-
* @alpha
|
|
58
56
|
*/
|
|
59
57
|
export class LocalValueMaker {
|
|
60
58
|
/**
|
package/lib/localValues.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localValues.js","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,SAAS,EACT,YAAY,EACZ,gBAAgB,GAChB,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"localValues.js","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,SAAS,EACT,YAAY,EACZ,gBAAgB,GAChB,MAAM,6CAA6C,CAAC;AA8BrD;;;;;;;;GAQG;AACH,MAAM,UAAU,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;AAED;;GAEG;AACH,MAAM,OAAO,eAAe;IAC3B;;;OAGG;IACH,YAAmC,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;IAAG,CAAC;IAErD;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,cAAc,CAAC,UAA4B,EAAE,IAAkB;QACrE,2FAA2F;QAC3F,oBAAoB;QACpB,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QAE7D,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK;SACL,CAAC;IACH,CAAC;CACD;AAED;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC3B;;OAEG;IACH,gBAAsB,CAAC;IAEvB;;;OAGG;IACI,gBAAgB;IACtB,gDAAgD;IAChD,YAAgC,EAChC,UAA4B,EAC5B,IAAkB;QAElB,2CAA2C;QAC3C,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;YACvD,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC/C,MAAM,MAAM,GAAsB;gBACjC,IAAI,EAAE,kBAAkB;gBACxB,GAAG,EAAE,YAAY,CAAC,KAAe;aACjC,CAAC;YACF,wEAAwE;YACxE,gEAAgE;YAChE,sCAAsC;YACtC,mEAAmE;YACnE,YAAY,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;QAChF,CAAC;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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport type { ISerializedHandle } from \"@fluidframework/runtime-utils/internal\";\nimport type { IFluidSerializer } from \"@fluidframework/shared-object-base/internal\";\nimport {\n\tValueType,\n\tparseHandles,\n\tserializeHandles,\n} from \"@fluidframework/shared-object-base/internal\";\n\n// eslint-disable-next-line import/no-deprecated\nimport type { ISerializableValue, ISerializedValue } from \"./internalInterfaces.js\";\n\n/**\n * A local value to be stored in a container type Distributed Data Store (DDS).\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 */\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/lib/mapFactory.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import type { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChan
|
|
|
6
6
|
import type { ISharedMap } from "./interfaces.js";
|
|
7
7
|
/**
|
|
8
8
|
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedMap}.
|
|
9
|
-
*
|
|
9
|
+
* @privateRemarks
|
|
10
|
+
* TODO: AB#35245: Deprecate and stop exporting this class.
|
|
10
11
|
* @sealed
|
|
11
12
|
* @legacy
|
|
12
13
|
* @alpha
|
package/lib/mapFactory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapFactory.d.ts","sourceRoot":"","sources":["../src/mapFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD
|
|
1
|
+
{"version":3,"file":"mapFactory.d.ts","sourceRoot":"","sources":["../src/mapFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD;;;;;;;GAOG;AACH,qBAAa,UAAW,YAAW,eAAe,CAAC,UAAU,CAAC;IAC7D;;OAEG;IACH,gBAAuB,IAAI,2CAA2C;IAEtE;;OAEG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,kBAAkB,CAE1C;IAED;;OAEG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,UAAU,CAAC;IAOtB;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU;CAMtE;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,0KAAiD,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC"}
|
package/lib/mapFactory.js
CHANGED
|
@@ -7,7 +7,8 @@ import { SharedMap as SharedMapInternal } from "./map.js";
|
|
|
7
7
|
import { pkgVersion } from "./packageVersion.js";
|
|
8
8
|
/**
|
|
9
9
|
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedMap}.
|
|
10
|
-
*
|
|
10
|
+
* @privateRemarks
|
|
11
|
+
* TODO: AB#35245: Deprecate and stop exporting this class.
|
|
11
12
|
* @sealed
|
|
12
13
|
* @legacy
|
|
13
14
|
* @alpha
|
package/lib/mapFactory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapFactory.js","sourceRoot":"","sources":["../src/mapFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAGrF,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD
|
|
1
|
+
{"version":3,"file":"mapFactory.js","sourceRoot":"","sources":["../src/mapFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAGrF,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,OAAO,UAAU;IAetB;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,UAAU,CAAC,IAAI,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,UAAU,CAAC,UAAU,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,GAAG,GAAG,IAAI,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3D,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEzB,OAAO,GAAG,CAAC;IACZ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,GAAG,GAAG,IAAI,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;QACtE,GAAG,CAAC,eAAe,EAAE,CAAC;QAEtB,OAAO,GAAG,CAAC;IACZ,CAAC;;AAnDD;;GAEG;AACoB,eAAI,GAAG,uCAAuC,CAAC;AAEtE;;GAEG;AACoB,qBAAU,GAAuB;IACvD,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,UAAU;CAC1B,CAAC;AA0CH;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,sBAAsB,CAAa,UAAU,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport type { ISharedMap } from \"./interfaces.js\";\nimport { SharedMap as SharedMapInternal } from \"./map.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedMap}.\n * @privateRemarks\n * TODO: AB#35245: Deprecate and stop exporting this class.\n * @sealed\n * @legacy\n * @alpha\n */\nexport class MapFactory implements IChannelFactory<ISharedMap> {\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/map\";\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: MapFactory.Type,\n\t\tsnapshotFormatVersion: \"0.2\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn MapFactory.Type;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn MapFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedMap> {\n\t\tconst map = new SharedMapInternal(id, runtime, attributes);\n\t\tawait map.load(services);\n\n\t\treturn map;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): ISharedMap {\n\t\tconst map = new SharedMapInternal(id, runtime, MapFactory.Attributes);\n\t\tmap.initializeLocal();\n\n\t\treturn map;\n\t}\n}\n\n/**\n * Entrypoint for {@link ISharedMap} creation.\n * @legacy\n * @alpha\n */\nexport const SharedMap = createSharedObjectKind<ISharedMap>(MapFactory);\n\n/**\n * Entrypoint for {@link ISharedMap} creation.\n * @legacy\n * @alpha\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/lib/packageVersion.d.ts
CHANGED
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,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/map\";\nexport const pkgVersion = \"2.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,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/map\";\nexport const pkgVersion = \"2.32.0\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/map",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"description": "Distributed map",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -81,33 +81,33 @@
|
|
|
81
81
|
"temp-directory": "nyc/.nyc_output"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@fluid-internal/client-utils": "~2.
|
|
85
|
-
"@fluidframework/core-interfaces": "~2.
|
|
86
|
-
"@fluidframework/core-utils": "~2.
|
|
87
|
-
"@fluidframework/datastore-definitions": "~2.
|
|
88
|
-
"@fluidframework/driver-definitions": "~2.
|
|
89
|
-
"@fluidframework/driver-utils": "~2.
|
|
90
|
-
"@fluidframework/merge-tree": "~2.
|
|
91
|
-
"@fluidframework/runtime-definitions": "~2.
|
|
92
|
-
"@fluidframework/runtime-utils": "~2.
|
|
93
|
-
"@fluidframework/shared-object-base": "~2.
|
|
94
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
84
|
+
"@fluid-internal/client-utils": "~2.32.0",
|
|
85
|
+
"@fluidframework/core-interfaces": "~2.32.0",
|
|
86
|
+
"@fluidframework/core-utils": "~2.32.0",
|
|
87
|
+
"@fluidframework/datastore-definitions": "~2.32.0",
|
|
88
|
+
"@fluidframework/driver-definitions": "~2.32.0",
|
|
89
|
+
"@fluidframework/driver-utils": "~2.32.0",
|
|
90
|
+
"@fluidframework/merge-tree": "~2.32.0",
|
|
91
|
+
"@fluidframework/runtime-definitions": "~2.32.0",
|
|
92
|
+
"@fluidframework/runtime-utils": "~2.32.0",
|
|
93
|
+
"@fluidframework/shared-object-base": "~2.32.0",
|
|
94
|
+
"@fluidframework/telemetry-utils": "~2.32.0",
|
|
95
95
|
"path-browserify": "^1.0.1"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
99
99
|
"@biomejs/biome": "~1.9.3",
|
|
100
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
101
|
-
"@fluid-private/stochastic-test-utils": "~2.
|
|
102
|
-
"@fluid-private/test-dds-utils": "~2.
|
|
100
|
+
"@fluid-internal/mocha-test-setup": "~2.32.0",
|
|
101
|
+
"@fluid-private/stochastic-test-utils": "~2.32.0",
|
|
102
|
+
"@fluid-private/test-dds-utils": "~2.32.0",
|
|
103
103
|
"@fluid-tools/benchmark": "^0.50.0",
|
|
104
|
-
"@fluid-tools/build-cli": "^0.
|
|
104
|
+
"@fluid-tools/build-cli": "^0.55.0",
|
|
105
105
|
"@fluidframework/build-common": "^2.0.3",
|
|
106
|
-
"@fluidframework/build-tools": "^0.
|
|
107
|
-
"@fluidframework/container-definitions": "~2.
|
|
106
|
+
"@fluidframework/build-tools": "^0.55.0",
|
|
107
|
+
"@fluidframework/container-definitions": "~2.32.0",
|
|
108
108
|
"@fluidframework/eslint-config-fluid": "^5.7.3",
|
|
109
|
-
"@fluidframework/map-previous": "npm:@fluidframework/map@2.
|
|
110
|
-
"@fluidframework/test-runtime-utils": "~2.
|
|
109
|
+
"@fluidframework/map-previous": "npm:@fluidframework/map@2.31.0",
|
|
110
|
+
"@fluidframework/test-runtime-utils": "~2.32.0",
|
|
111
111
|
"@microsoft/api-extractor": "7.50.1",
|
|
112
112
|
"@types/mocha": "^10.0.10",
|
|
113
113
|
"@types/node": "^18.19.0",
|
|
@@ -164,6 +164,7 @@
|
|
|
164
164
|
"format:biome": "biome check . --write",
|
|
165
165
|
"lint": "fluid-build . --task lint",
|
|
166
166
|
"lint:fix": "fluid-build . --task eslint:fix --task format",
|
|
167
|
+
"pack:tests": "tar -cf ./map.test-files.tar ./src/test ./dist/test ./lib/test",
|
|
167
168
|
"test": "npm run test:mocha",
|
|
168
169
|
"test:coverage": "c8 npm test",
|
|
169
170
|
"test:memory": "mocha --config ./src/test/memory/.mocharc.cjs",
|
package/src/directory.ts
CHANGED
|
@@ -85,8 +85,6 @@ interface IDirectoryMessageHandler {
|
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* Operation indicating a value should be set for a key.
|
|
88
|
-
* @legacy
|
|
89
|
-
* @alpha
|
|
90
88
|
*/
|
|
91
89
|
export interface IDirectorySetOperation {
|
|
92
90
|
/**
|
|
@@ -113,8 +111,6 @@ export interface IDirectorySetOperation {
|
|
|
113
111
|
|
|
114
112
|
/**
|
|
115
113
|
* Operation indicating a key should be deleted from the directory.
|
|
116
|
-
* @legacy
|
|
117
|
-
* @alpha
|
|
118
114
|
*/
|
|
119
115
|
export interface IDirectoryDeleteOperation {
|
|
120
116
|
/**
|
|
@@ -135,15 +131,11 @@ export interface IDirectoryDeleteOperation {
|
|
|
135
131
|
|
|
136
132
|
/**
|
|
137
133
|
* An operation on a specific key within a directory.
|
|
138
|
-
* @legacy
|
|
139
|
-
* @alpha
|
|
140
134
|
*/
|
|
141
135
|
export type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;
|
|
142
136
|
|
|
143
137
|
/**
|
|
144
138
|
* Operation indicating the directory should be cleared.
|
|
145
|
-
* @legacy
|
|
146
|
-
* @alpha
|
|
147
139
|
*/
|
|
148
140
|
export interface IDirectoryClearOperation {
|
|
149
141
|
/**
|
|
@@ -159,15 +151,11 @@ export interface IDirectoryClearOperation {
|
|
|
159
151
|
|
|
160
152
|
/**
|
|
161
153
|
* An operation on one or more of the keys within a directory.
|
|
162
|
-
* @legacy
|
|
163
|
-
* @alpha
|
|
164
154
|
*/
|
|
165
155
|
export type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;
|
|
166
156
|
|
|
167
157
|
/**
|
|
168
158
|
* Operation indicating a subdirectory should be created.
|
|
169
|
-
* @legacy
|
|
170
|
-
* @alpha
|
|
171
159
|
*/
|
|
172
160
|
export interface IDirectoryCreateSubDirectoryOperation {
|
|
173
161
|
/**
|
|
@@ -188,8 +176,6 @@ export interface IDirectoryCreateSubDirectoryOperation {
|
|
|
188
176
|
|
|
189
177
|
/**
|
|
190
178
|
* Operation indicating a subdirectory should be deleted.
|
|
191
|
-
* @legacy
|
|
192
|
-
* @alpha
|
|
193
179
|
*/
|
|
194
180
|
export interface IDirectoryDeleteSubDirectoryOperation {
|
|
195
181
|
/**
|
|
@@ -210,8 +196,6 @@ export interface IDirectoryDeleteSubDirectoryOperation {
|
|
|
210
196
|
|
|
211
197
|
/**
|
|
212
198
|
* An operation on the subdirectories within a directory.
|
|
213
|
-
* @legacy
|
|
214
|
-
* @alpha
|
|
215
199
|
*/
|
|
216
200
|
export type IDirectorySubDirectoryOperation =
|
|
217
201
|
| IDirectoryCreateSubDirectoryOperation
|
|
@@ -219,8 +203,6 @@ export type IDirectorySubDirectoryOperation =
|
|
|
219
203
|
|
|
220
204
|
/**
|
|
221
205
|
* Any operation on a directory.
|
|
222
|
-
* @legacy
|
|
223
|
-
* @alpha
|
|
224
206
|
*/
|
|
225
207
|
export type IDirectoryOperation = IDirectoryStorageOperation | IDirectorySubDirectoryOperation;
|
|
226
208
|
|
|
@@ -424,8 +406,6 @@ class DirectoryCreationTracker {
|
|
|
424
406
|
* ```
|
|
425
407
|
*
|
|
426
408
|
* @sealed
|
|
427
|
-
* @legacy
|
|
428
|
-
* @alpha
|
|
429
409
|
*/
|
|
430
410
|
export class SharedDirectory
|
|
431
411
|
extends SharedObject<ISharedDirectoryEvents>
|
package/src/directoryFactory.ts
CHANGED
|
@@ -17,7 +17,8 @@ import { pkgVersion } from "./packageVersion.js";
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedDirectory}.
|
|
20
|
-
*
|
|
20
|
+
* @privateRemarks
|
|
21
|
+
* TODO: AB#35245: Deprecate and stop exporting this class.
|
|
21
22
|
* @sealed
|
|
22
23
|
* @legacy
|
|
23
24
|
* @alpha
|
package/src/index.ts
CHANGED
|
@@ -25,11 +25,15 @@ export type {
|
|
|
25
25
|
ISharedMapEvents,
|
|
26
26
|
IValueChanged,
|
|
27
27
|
} from "./interfaces.js";
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
28
|
+
export { SharedMap } from "./mapFactory.js";
|
|
29
|
+
export { SharedDirectory } from "./directoryFactory.js";
|
|
30
|
+
|
|
31
|
+
// Legacy exports that should be deprecated and removed as part of AB#8004 or AB#35245
|
|
32
|
+
export type { ISerializableValue } from "./internalInterfaces.js";
|
|
33
|
+
export { MapFactory } from "./mapFactory.js";
|
|
34
|
+
export { DirectoryFactory } from "./directoryFactory.js";
|
|
30
35
|
export type {
|
|
31
36
|
ICreateInfo,
|
|
32
37
|
IDirectoryNewStorageFormat,
|
|
33
38
|
IDirectoryDataObject,
|
|
34
39
|
} from "./directory.js";
|
|
35
|
-
export type { ISerializableValue } from "./internalInterfaces.js";
|
package/src/localValues.ts
CHANGED
|
@@ -17,8 +17,6 @@ import type { ISerializableValue, ISerializedValue } from "./internalInterfaces.
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* A local value to be stored in a container type Distributed Data Store (DDS).
|
|
20
|
-
* @legacy
|
|
21
|
-
* @alpha
|
|
22
20
|
*/
|
|
23
21
|
export interface ILocalValue {
|
|
24
22
|
/**
|
|
@@ -100,8 +98,6 @@ export class PlainLocalValue implements ILocalValue {
|
|
|
100
98
|
/**
|
|
101
99
|
* Enables a container type {@link https://fluidframework.com/docs/build/dds/ | DDS} to produce and store local
|
|
102
100
|
* values with minimal awareness of how those objects are stored, serialized, and deserialized.
|
|
103
|
-
* @legacy
|
|
104
|
-
* @alpha
|
|
105
101
|
*/
|
|
106
102
|
export class LocalValueMaker {
|
|
107
103
|
/**
|
package/src/mapFactory.ts
CHANGED
|
@@ -17,7 +17,8 @@ import { pkgVersion } from "./packageVersion.js";
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedMap}.
|
|
20
|
-
*
|
|
20
|
+
* @privateRemarks
|
|
21
|
+
* TODO: AB#35245: Deprecate and stop exporting this class.
|
|
21
22
|
* @sealed
|
|
22
23
|
* @legacy
|
|
23
24
|
* @alpha
|
package/src/packageVersion.ts
CHANGED