@fluidframework/map 2.0.0-internal.8.0.0 → 2.0.0-rc.1.0.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +0 -11
  3. package/api-extractor-esm.json +4 -0
  4. package/api-extractor-lint.json +1 -10
  5. package/api-extractor.json +1 -9
  6. package/api-report/map.api.md +4 -4
  7. package/dist/{directory.cjs → directory.js} +7 -27
  8. package/dist/directory.js.map +1 -0
  9. package/dist/{index.cjs → index.js} +4 -4
  10. package/dist/index.js.map +1 -0
  11. package/dist/interfaces.d.ts +6 -3
  12. package/dist/interfaces.d.ts.map +1 -1
  13. package/dist/{interfaces.cjs → interfaces.js} +1 -1
  14. package/dist/interfaces.js.map +1 -0
  15. package/dist/{internalInterfaces.cjs → internalInterfaces.js} +1 -1
  16. package/dist/internalInterfaces.js.map +1 -0
  17. package/dist/localValues.d.ts.map +1 -1
  18. package/dist/{localValues.cjs → localValues.js} +1 -1
  19. package/dist/localValues.js.map +1 -0
  20. package/dist/map-alpha.d.ts +8 -4
  21. package/dist/map-beta.d.ts +193 -36
  22. package/dist/map-public.d.ts +193 -36
  23. package/dist/map-untrimmed.d.ts +8 -4
  24. package/dist/map.d.ts +2 -1
  25. package/dist/map.d.ts.map +1 -1
  26. package/dist/{map.cjs → map.js} +5 -4
  27. package/dist/map.js.map +1 -0
  28. package/dist/{mapKernel.cjs → mapKernel.js} +2 -2
  29. package/dist/mapKernel.js.map +1 -0
  30. package/dist/packageVersion.d.ts +1 -1
  31. package/dist/packageVersion.d.ts.map +1 -1
  32. package/dist/{packageVersion.cjs → packageVersion.js} +2 -2
  33. package/dist/packageVersion.js.map +1 -0
  34. package/lib/{directory.d.ts → directory.d.mts} +1 -1
  35. package/lib/directory.d.mts.map +1 -0
  36. package/lib/directory.mjs +1 -1
  37. package/lib/directory.mjs.map +1 -1
  38. package/lib/{index.d.ts → index.d.mts} +1 -1
  39. package/lib/index.d.mts.map +1 -0
  40. package/lib/{interfaces.d.ts → interfaces.d.mts} +7 -4
  41. package/lib/interfaces.d.mts.map +1 -0
  42. package/lib/interfaces.mjs.map +1 -1
  43. package/lib/{internalInterfaces.d.ts → internalInterfaces.d.mts} +1 -1
  44. package/lib/internalInterfaces.d.mts.map +1 -0
  45. package/lib/{localValues.d.ts → localValues.d.mts} +1 -1
  46. package/lib/localValues.d.mts.map +1 -0
  47. package/lib/localValues.mjs.map +1 -1
  48. package/lib/{map-alpha.d.ts → map-alpha.d.mts} +8 -16
  49. package/lib/map-beta.d.mts +264 -0
  50. package/lib/map-public.d.mts +264 -0
  51. package/lib/{map-untrimmed.d.ts → map-untrimmed.d.mts} +8 -16
  52. package/lib/{map.d.ts → map.d.mts} +3 -2
  53. package/lib/map.d.mts.map +1 -0
  54. package/lib/map.mjs +2 -1
  55. package/lib/map.mjs.map +1 -1
  56. package/lib/{mapKernel.d.ts → mapKernel.d.mts} +1 -1
  57. package/lib/mapKernel.d.mts.map +1 -0
  58. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +2 -2
  59. package/lib/packageVersion.d.mts.map +1 -0
  60. package/lib/packageVersion.mjs +1 -1
  61. package/lib/packageVersion.mjs.map +1 -1
  62. package/package.json +84 -31
  63. package/src/directory.ts +1 -1
  64. package/src/interfaces.ts +6 -3
  65. package/src/localValues.ts +1 -1
  66. package/src/map.ts +2 -1
  67. package/src/packageVersion.ts +1 -1
  68. package/dist/directory.cjs.map +0 -1
  69. package/dist/index.cjs.map +0 -1
  70. package/dist/interfaces.cjs.map +0 -1
  71. package/dist/internalInterfaces.cjs.map +0 -1
  72. package/dist/localValues.cjs.map +0 -1
  73. package/dist/map.cjs.map +0 -1
  74. package/dist/mapKernel.cjs.map +0 -1
  75. package/dist/packageVersion.cjs.map +0 -1
  76. package/lib/directory.d.ts.map +0 -1
  77. package/lib/index.d.ts.map +0 -1
  78. package/lib/interfaces.d.ts.map +0 -1
  79. package/lib/internalInterfaces.d.ts.map +0 -1
  80. package/lib/localValues.d.ts.map +0 -1
  81. package/lib/map-beta.d.ts +0 -119
  82. package/lib/map-public.d.ts +0 -119
  83. package/lib/map.d.ts.map +0 -1
  84. package/lib/mapKernel.d.ts.map +0 -1
  85. package/lib/packageVersion.d.ts.map +0 -1
  86. package/map.test-files.tar +0 -0
  87. package/tsc-multi.test.json +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @fluidframework/map
2
2
 
3
+ ## 2.0.0-rc.1.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Updated server dependencies ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
8
+
9
+ The following Fluid server dependencies have been updated to the latest version, 3.0.0. [See the full changelog.](https://github.com/microsoft/FluidFramework/releases/tag/server_v3.0.0)
10
+
11
+ - @fluidframework/gitresources
12
+ - @fluidframework/server-kafka-orderer
13
+ - @fluidframework/server-lambdas
14
+ - @fluidframework/server-lambdas-driver
15
+ - @fluidframework/server-local-server
16
+ - @fluidframework/server-memory-orderer
17
+ - @fluidframework/protocol-base
18
+ - @fluidframework/server-routerlicious
19
+ - @fluidframework/server-routerlicious-base
20
+ - @fluidframework/server-services
21
+ - @fluidframework/server-services-client
22
+ - @fluidframework/server-services-core
23
+ - @fluidframework/server-services-ordering-kafkanode
24
+ - @fluidframework/server-services-ordering-rdkafka
25
+ - @fluidframework/server-services-ordering-zookeeper
26
+ - @fluidframework/server-services-shared
27
+ - @fluidframework/server-services-telemetry
28
+ - @fluidframework/server-services-utils
29
+ - @fluidframework/server-test-utils
30
+ - tinylicious
31
+
32
+ - Updated @fluidframework/protocol-definitions ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
33
+
34
+ The @fluidframework/protocol-definitions dependency has been upgraded to v3.1.0. [See the full
35
+ changelog.](https://github.com/microsoft/FluidFramework/blob/main/common/lib/protocol-definitions/CHANGELOG.md#310)
36
+
3
37
  ## 2.0.0-internal.8.0.0
4
38
 
5
39
  ### Major Changes
package/README.md CHANGED
@@ -11,12 +11,6 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
11
11
  While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
12
12
  library consumers should always prefer `^`.
13
13
 
14
- Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
15
- you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
16
- Standard `^` and `~` ranges will not work as expected.
17
- See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
18
- package for more information including tools to convert between version schemes.
19
-
20
14
  <!-- prettier-ignore-end -->
21
15
 
22
16
  <!-- AUTO-GENERATED-CONTENT:END -->
@@ -41,11 +35,6 @@ Unlike the JavaScript `Map`, a `SharedMap`'s keys must be strings. The value mus
41
35
 
42
36
  In collaborative scenarios, the value is settled with a policy of _last write wins_.
43
37
 
44
- #### `.wait()`
45
-
46
- `SharedMap` has a `wait` method in addition to the normal `get`, which returns a `Promise` that resolves to the value
47
- when the key becomes available.
48
-
49
38
  ### Eventing
50
39
 
51
40
  `SharedMap` is an `EventEmitter`, and will emit events when other clients make modifications. You should register for these events and respond appropriately as the data is modified. `valueChanged` will be emitted in response to a `set` or `delete`, and provide the key and previous value that was stored at that key. `clear` will be emitted in response to a `clear`.
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-base-esm.json"
4
+ }
@@ -1,13 +1,4 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-lint.json",
4
- "messages": {
5
- "extractorMessageReporting": {
6
- // TODO: remove once base config has this enabled as an error
7
- "ae-incompatible-release-tags": {
8
- "logLevel": "error",
9
- "addToApiReportFile": false
10
- }
11
- }
12
- }
3
+ "extends": "../../../common/build/build-common/api-extractor-lint.json"
13
4
  }
@@ -1,12 +1,4 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.json",
4
- "messages": {
5
- "extractorMessageReporting": {
6
- // TODO: Add missing documentation and remove this rule override
7
- "ae-undocumented": {
8
- "logLevel": "none"
9
- }
10
- }
11
- }
3
+ "extends": "../../../common/build/build-common/api-extractor-base.json"
12
4
  }
@@ -171,19 +171,19 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
171
171
  (event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
172
172
  }
173
173
 
174
- // @alpha
174
+ // @public @sealed
175
175
  export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
176
176
  get<T = any>(key: string): T | undefined;
177
177
  set<T = unknown>(key: string, value: T): this;
178
178
  }
179
179
 
180
- // @alpha
180
+ // @public @sealed
181
181
  export interface ISharedMapEvents extends ISharedObjectEvents {
182
182
  (event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
183
183
  (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
184
184
  }
185
185
 
186
- // @alpha
186
+ // @public @sealed
187
187
  export interface IValueChanged {
188
188
  key: string;
189
189
  previousValue: any;
@@ -261,7 +261,7 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
261
261
  values(): IterableIterator<any>;
262
262
  }
263
263
 
264
- // @alpha
264
+ // @public @deprecated
265
265
  export class SharedMap extends SharedObject<ISharedMapEvents> implements ISharedMap {
266
266
  [Symbol.iterator](): IterableIterator<[string, any]>;
267
267
  readonly [Symbol.toStringTag]: string;
@@ -3,28 +3,8 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || function (mod) {
23
- if (mod && mod.__esModule) return mod;
24
- var result = {};
25
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
- __setModuleDefault(result, mod);
27
- return result;
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
28
8
  };
29
9
  var _a, _b;
30
10
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -36,13 +16,13 @@ const driver_utils_1 = require("@fluidframework/driver-utils");
36
16
  const protocol_definitions_1 = require("@fluidframework/protocol-definitions");
37
17
  const shared_object_base_1 = require("@fluidframework/shared-object-base");
38
18
  const runtime_utils_1 = require("@fluidframework/runtime-utils");
39
- const path = __importStar(require("path-browserify"));
19
+ const path_browserify_1 = __importDefault(require("path-browserify"));
40
20
  const merge_tree_1 = require("@fluidframework/merge-tree");
41
- const localValues_1 = require("./localValues.cjs");
42
- const packageVersion_1 = require("./packageVersion.cjs");
21
+ const localValues_1 = require("./localValues");
22
+ const packageVersion_1 = require("./packageVersion");
43
23
  // We use path-browserify since this code can run safely on the server or the browser.
44
24
  // We standardize on using posix slashes everywhere.
45
- const posix = path.posix;
25
+ const posix = path_browserify_1.default.posix;
46
26
  const snapshotFileName = "header";
47
27
  /**
48
28
  * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedDirectory}.
@@ -1949,4 +1929,4 @@ class SubDirectory extends client_utils_1.TypedEventEmitter {
1949
1929
  }
1950
1930
  }
1951
1931
  }
1952
- //# sourceMappingURL=directory.cjs.map
1932
+ //# sourceMappingURL=directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory.js","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;AAEH,2DAAoD;AACpD,+DAAiE;AACjE,qEAA6D;AAC7D,+DAA4D;AAC5D,+EAA8F;AAS9F,2EAA+F;AAC/F,iEAAmE;AACnE,sEAAmC;AACnC,2DAA0D;AAY1D,+CAA+E;AAC/E,qDAA8C;AAE9C,sFAAsF;AACtF,oDAAoD;AACpD,MAAM,KAAK,GAAG,yBAAI,CAAC,KAAK,CAAC;AAEzB,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAmOlC;;;;;GAKG;AACH,MAAa,gBAAgB;IAe5B;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,gBAAgB,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACpC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,SAAS,GAAG,IAAI,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC/D,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE/B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B,EAAE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AAC,CAAC,EAAE,YAAY,CAAC,IAAI,cAAc,EAAE;YAC/C,IAAI,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC;SAC3C;QACD,IAAI,OAAO,SAAS,CAAC,OAAO,KAAK,UAAU,EAAE;YAC5C,SAAS,CAAC,OAAO,EAAE,CAAC;SACpB;IACF,CAAC;IAEO,wBAAwB,CAAC,SAAuB;QACvD,qHAAqH;QACrH,yEAAyE;QACzE,SAAS,CAAC,SAAS,EAAE,CAAC;QACtB,KAAK,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,IAAI,SAAS,CAAC,cAAc,EAAE,EAAE;YAC3D,IAAI,CAAC,wBAAwB,CAAC,YAA4B,CAAC,CAAC;SAC5D;IACF,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { UsageError } from \"@fluidframework/telemetry-utils\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport { ISequencedDocumentMessage, MessageType } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n\tIChannelServices,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats, ITelemetryContext } from \"@fluidframework/runtime-definitions\";\nimport { IFluidSerializer, SharedObject, ValueType } from \"@fluidframework/shared-object-base\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils\";\nimport path from \"path-browserify\";\nimport { RedBlackTree } from \"@fluidframework/merge-tree\";\nimport {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\t// eslint-disable-next-line import/no-deprecated\n\tISerializableValue,\n\tISerializedValue,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tIValueChanged,\n} from \"./interfaces\";\nimport { ILocalValue, LocalValueMaker, makeSerializable } from \"./localValues\";\nimport { pkgVersion } from \"./packageVersion\";\n\n// We use path-browserify since this code can run safely on the server or the browser.\n// We standardize on using posix slashes everywhere.\nconst posix = path.posix;\n\nconst snapshotFileName = \"header\";\n\n/**\n * Defines the means to process and submit a given op on a directory.\n */\ninterface IDirectoryMessageHandler {\n\t/**\n\t * Apply the given operation.\n\t * @param msg - The message from the server to apply.\n\t * @param op - The directory operation to apply\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t */\n\tprocess(\n\t\tmsg: ISequencedDocumentMessage,\n\t\top: IDirectoryOperation,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void;\n\n\t/**\n\t * Communicate the operation to remote clients.\n\t * @param op - The directory operation to submit\n\t * @param localOpMetadata - The metadata to be submitted with the message.\n\t */\n\tsubmit(op: IDirectoryOperation, localOpMetadata: unknown): void;\n\n\tapplyStashedOp(op: IDirectoryOperation): unknown;\n}\n\n/**\n * Operation indicating a value should be set for a key.\n * @alpha\n */\nexport interface IDirectorySetOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"set\";\n\n\t/**\n\t * Directory key being modified.\n\t */\n\tkey: string;\n\n\t/**\n\t * Absolute path of the directory where the modified key is located.\n\t */\n\tpath: 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 a key should be deleted from the directory.\n * @alpha\n */\nexport interface IDirectoryDeleteOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"delete\";\n\n\t/**\n\t * Directory key being modified.\n\t */\n\tkey: string;\n\n\t/**\n\t * Absolute path of the directory where the modified key is located.\n\t */\n\tpath: string;\n}\n\n/**\n * An operation on a specific key within a directory.\n * @alpha\n */\nexport type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;\n\n/**\n * Operation indicating the directory should be cleared.\n * @alpha\n */\nexport interface IDirectoryClearOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"clear\";\n\n\t/**\n\t * Absolute path of the directory being cleared.\n\t */\n\tpath: string;\n}\n\n/**\n * An operation on one or more of the keys within a directory.\n * @alpha\n */\nexport type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;\n\n/**\n * Operation indicating a subdirectory should be created.\n * @alpha\n */\nexport interface IDirectoryCreateSubDirectoryOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"createSubDirectory\";\n\n\t/**\n\t * Absolute path of the directory that will contain the new subdirectory.\n\t */\n\tpath: string;\n\n\t/**\n\t * Name of the new subdirectory.\n\t */\n\tsubdirName: string;\n}\n\n/**\n * Operation indicating a subdirectory should be deleted.\n * @alpha\n */\nexport interface IDirectoryDeleteSubDirectoryOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"deleteSubDirectory\";\n\n\t/**\n\t * Absolute path of the directory that contains the directory to be deleted.\n\t */\n\tpath: string;\n\n\t/**\n\t * Name of the subdirectory to be deleted.\n\t */\n\tsubdirName: string;\n}\n\n/**\n * An operation on the subdirectories within a directory.\n * @alpha\n */\nexport type IDirectorySubDirectoryOperation =\n\t| IDirectoryCreateSubDirectoryOperation\n\t| IDirectoryDeleteSubDirectoryOperation;\n\n/**\n * Any operation on a directory.\n * @alpha\n */\nexport type IDirectoryOperation = IDirectoryStorageOperation | IDirectorySubDirectoryOperation;\n\n/**\n * Create info for the subdirectory.\n * @alpha\n */\nexport interface ICreateInfo {\n\t/**\n\t * Sequence number at which this subdirectory was created.\n\t */\n\tcsn: number;\n\n\t/**\n\t * clientids of the clients which created this sub directory.\n\t */\n\tccIds: string[];\n}\n\n/**\n * Defines the in-memory object structure to be used for the conversion to/from serialized.\n *\n * @remarks Directly used in\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\n * | JSON.stringify}, direct result from\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse}.\n * @alpha\n */\nexport interface IDirectoryDataObject {\n\t/**\n\t * Key/value date set by the user.\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\tstorage?: { [key: string]: ISerializableValue };\n\n\t/**\n\t * Recursive sub-directories {@link IDirectoryDataObject | objects}.\n\t */\n\tsubdirectories?: { [subdirName: string]: IDirectoryDataObject };\n\n\t/**\n\t * Create info for the sub directory. Since directories with same name can get deleted/created by multiple clients\n\t * asynchronously, this info helps us to determine whether the ops where for the current instance of sub directory\n\t * or not and whether to process them or not based on that. Summaries which were not produced which this change\n\t * will not have this info and in that case we can still run in eventual consistency issues but that is no worse\n\t * than the state before this change.\n\t */\n\tci?: ICreateInfo;\n}\n\n/**\n * {@link IDirectory} storage format.\n *\n * @internal\n */\nexport interface IDirectoryNewStorageFormat {\n\t/**\n\t * Blob IDs representing larger directory data that was serialized.\n\t */\n\tblobs: string[];\n\n\t/**\n\t * Storage content representing directory data that was not serialized.\n\t */\n\tcontent: IDirectoryDataObject;\n}\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedDirectory}.\n *\n * @sealed\n * @alpha\n */\nexport class DirectoryFactory implements IChannelFactory {\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 SharedDirectory(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 SharedDirectory(id, runtime, DirectoryFactory.Attributes);\n\t\tdirectory.initializeLocal();\n\n\t\treturn directory;\n\t}\n}\n\n/**\n * The comparator essentially performs the following procedure to determine the order of subdirectory creation:\n * 1. If subdirectory A has a non-negative 'seq' and subdirectory B has a negative 'seq', subdirectory A is always placed first due to\n * the policy that acknowledged subdirectories precede locally created ones that have not been committed yet.\n *\n * 2. When both subdirectories A and B have a non-negative 'seq', they are compared as follows:\n * - If A and B have different 'seq', they are ordered based on 'seq', and the one with the lower 'seq' will be positioned ahead. Notably this rule\n * should not be applied in the directory ordering, since the lowest 'seq' is -1, when the directory is created locally but not acknowledged yet.\n * - In the case where A and B have equal 'seq', the one with the lower 'clientSeq' will be positioned ahead. This scenario occurs when grouped\n * batching is enabled, and a lower 'clientSeq' indicates that it was processed earlier after the batch was ungrouped.\n *\n * 3. When both subdirectories A and B have a negative 'seq', they are compared as follows:\n * - If A and B have different 'seq', the one with lower 'seq' will be positioned ahead, which indicates the corresponding creation message was\n * acknowledged by the server earlier.\n * - If A and B have equal 'seq', the one with lower 'clientSeq' will be placed at the front. This scenario suggests that both subdirectories A\n * and B were created locally and not acknowledged yet, with the one possessing the lower 'clientSeq' being created earlier.\n *\n * 4. A 'seq' value of zero indicates that the subdirectory was created in detached state, and it is considered acknowledged for the\n * purpose of ordering.\n */\nconst seqDataComparator = (a: SequenceData, b: SequenceData) => {\n\tif (isAcknowledgedOrDetached(a)) {\n\t\tif (isAcknowledgedOrDetached(b)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\treturn a.seq !== b.seq ? a.seq - b.seq : a.clientSeq! - b.clientSeq!;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t} else {\n\t\tif (!isAcknowledgedOrDetached(b)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\treturn a.seq !== b.seq ? a.seq - b.seq : a.clientSeq! - b.clientSeq!;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t}\n};\n\nfunction isAcknowledgedOrDetached(seqData: SequenceData) {\n\treturn seqData.seq >= 0;\n}\n\n/**\n * The combination of sequence numebr and client sequence number of a subdirectory\n */\ninterface SequenceData {\n\tseq: number;\n\tclientSeq?: number;\n}\n\n/**\n * A utility class for tracking associations between keys and their creation indices.\n * This is relevant to support map iteration in insertion order, see\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator/%40%40iterator\n *\n * TODO: It can be combined with the creation tracker utilized in SharedMap\n */\nclass DirectoryCreationTracker {\n\treadonly indexToKey: RedBlackTree<SequenceData, string>;\n\n\treadonly keyToIndex: Map<string, SequenceData>;\n\n\tconstructor() {\n\t\tthis.indexToKey = new RedBlackTree<SequenceData, string>(seqDataComparator);\n\t\tthis.keyToIndex = new Map<string, SequenceData>();\n\t}\n\n\tset(key: string, seqData: SequenceData): void {\n\t\tthis.indexToKey.put(seqData, key);\n\t\tthis.keyToIndex.set(key, seqData);\n\t}\n\n\thas(keyOrSeqData: string | SequenceData): boolean {\n\t\treturn typeof keyOrSeqData === \"string\"\n\t\t\t? this.keyToIndex.has(keyOrSeqData)\n\t\t\t: this.indexToKey.get(keyOrSeqData) !== undefined;\n\t}\n\n\tdelete(keyOrSeqData: string | SequenceData): void {\n\t\tif (this.has(keyOrSeqData)) {\n\t\t\tif (typeof keyOrSeqData === \"string\") {\n\t\t\t\tconst seqData = this.keyToIndex.get(keyOrSeqData) as SequenceData;\n\t\t\t\tthis.keyToIndex.delete(keyOrSeqData);\n\t\t\t\tthis.indexToKey.remove(seqData);\n\t\t\t} else {\n\t\t\t\tconst key = this.indexToKey.get(keyOrSeqData)?.data as string;\n\t\t\t\tthis.indexToKey.remove(keyOrSeqData);\n\t\t\t\tthis.keyToIndex.delete(key);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Retrieves all subdirectories with creation order that satisfy an optional constraint function.\n\t * @param constraint - An optional constraint function that filters keys.\n\t * @returns An array of keys that satisfy the constraint (or all keys if no constraint is provided).\n\t */\n\tkeys(constraint?: (key: string) => boolean): string[] {\n\t\tconst keys: string[] = [];\n\t\tthis.indexToKey.mapRange((node) => {\n\t\t\tif (!constraint || constraint(node.data)) {\n\t\t\t\tkeys.push(node.data);\n\t\t\t}\n\t\t\treturn true;\n\t\t}, keys);\n\t\treturn keys;\n\t}\n}\n\n/**\n * {@inheritDoc ISharedDirectory}\n *\n * @example\n *\n * ```typescript\n * mySharedDirectory.createSubDirectory(\"a\").createSubDirectory(\"b\").createSubDirectory(\"c\").set(\"foo\", val1);\n * const mySubDir = mySharedDirectory.getWorkingDirectory(\"/a/b/c\");\n * mySubDir.get(\"foo\"); // returns val1\n * ```\n *\n * @sealed\n * @alpha\n */\nexport class SharedDirectory\n\textends SharedObject<ISharedDirectoryEvents>\n\timplements ISharedDirectory\n{\n\t/**\n\t * Create a new shared directory\n\t *\n\t * @param runtime - Data store runtime the new shared directory belongs to\n\t * @param id - Optional name of the shared directory\n\t * @returns Newly create shared directory (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string): SharedDirectory {\n\t\treturn runtime.createChannel(id, DirectoryFactory.Type) as SharedDirectory;\n\t}\n\n\t/**\n\t * Get a factory for SharedDirectory to register with the data store.\n\t *\n\t * @returns A factory that creates and load SharedDirectory\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new DirectoryFactory();\n\t}\n\n\t/**\n\t * String representation for the class.\n\t */\n\tpublic [Symbol.toStringTag]: string = \"SharedDirectory\";\n\n\t/**\n\t * {@inheritDoc IDirectory.absolutePath}\n\t */\n\tpublic get absolutePath(): string {\n\t\treturn this.root.absolutePath;\n\t}\n\n\t/***/\n\tpublic readonly localValueMaker: LocalValueMaker;\n\n\t/**\n\t * Root of the SharedDirectory, most operations on the SharedDirectory itself act on the root.\n\t */\n\tprivate readonly root: SubDirectory = new SubDirectory(\n\t\t{ seq: 0, clientSeq: 0 },\n\t\tnew Set(),\n\t\tthis,\n\t\tthis.runtime,\n\t\tthis.serializer,\n\t\tposix.sep,\n\t);\n\n\t/**\n\t * Mapping of op types to message handlers.\n\t */\n\tprivate readonly messageHandlers: Map<string, IDirectoryMessageHandler> = new Map();\n\n\t/**\n\t * Constructs a new shared directory. If the object is non-local an id and service interfaces will\n\t * be provided.\n\t * @param id - String identifier for the SharedDirectory\n\t * @param runtime - Data store runtime\n\t * @param type - Type identifier\n\t */\n\tpublic constructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_directory_\");\n\t\tthis.localValueMaker = new LocalValueMaker(this.serializer);\n\t\tthis.setMessageHandlers();\n\t\t// Mirror the containedValueChanged op on the SharedDirectory\n\t\tthis.root.on(\"containedValueChanged\", (changed: IValueChanged, local: boolean) => {\n\t\t\tthis.emit(\"containedValueChanged\", changed, local, this);\n\t\t});\n\t\tthis.root.on(\"subDirectoryCreated\", (relativePath: string, local: boolean) => {\n\t\t\tthis.emit(\"subDirectoryCreated\", relativePath, local, this);\n\t\t});\n\t\tthis.root.on(\"subDirectoryDeleted\", (relativePath: string, local: boolean) => {\n\t\t\tthis.emit(\"subDirectoryDeleted\", relativePath, local, this);\n\t\t});\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.get}\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tpublic get<T = any>(key: string): T | undefined {\n\t\treturn this.root.get<T>(key);\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.set}\n\t */\n\tpublic set<T = unknown>(key: string, value: T): this {\n\t\tthis.root.set(key, value);\n\t\treturn this;\n\t}\n\n\tpublic dispose(error?: Error): void {\n\t\tthis.root.dispose(error);\n\t}\n\n\tpublic get disposed(): boolean {\n\t\treturn this.root.disposed;\n\t}\n\n\t/**\n\t * Deletes the given key from within this IDirectory.\n\t * @param key - The key to delete\n\t * @returns True if the key existed and was deleted, false if it did not exist\n\t */\n\tpublic delete(key: string): boolean {\n\t\treturn this.root.delete(key);\n\t}\n\n\t/**\n\t * Deletes all keys from within this IDirectory.\n\t */\n\tpublic clear(): void {\n\t\tthis.root.clear();\n\t}\n\n\t/**\n\t * Checks whether the given key exists in this IDirectory.\n\t * @param key - The key to check\n\t * @returns True if the key exists, false otherwise\n\t */\n\tpublic has(key: string): boolean {\n\t\treturn this.root.has(key);\n\t}\n\n\t/**\n\t * The number of entries under this IDirectory.\n\t */\n\tpublic get size(): number {\n\t\treturn this.root.size;\n\t}\n\n\t/**\n\t * Issue a callback on each entry under this IDirectory.\n\t * @param callback - Callback to issue\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tpublic forEach(callback: (value: any, key: string, map: Map<string, any>) => void): void {\n\t\t// eslint-disable-next-line unicorn/no-array-for-each, unicorn/no-array-callback-reference\n\t\tthis.root.forEach(callback);\n\t}\n\n\t/**\n\t * Get an iterator over the entries under this IDirectory.\n\t * @returns The iterator\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tpublic [Symbol.iterator](): IterableIterator<[string, any]> {\n\t\treturn this.root[Symbol.iterator]();\n\t}\n\n\t/**\n\t * Get an iterator over the entries under this IDirectory.\n\t * @returns The iterator\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tpublic entries(): IterableIterator<[string, any]> {\n\t\treturn this.root.entries();\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.countSubDirectory}\n\t */\n\tpublic countSubDirectory(): number {\n\t\treturn this.root.countSubDirectory();\n\t}\n\n\t/**\n\t * Get an iterator over the keys under this IDirectory.\n\t * @returns The iterator\n\t */\n\tpublic keys(): IterableIterator<string> {\n\t\treturn this.root.keys();\n\t}\n\n\t/**\n\t * Get an iterator over the values under this IDirectory.\n\t * @returns The iterator\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tpublic values(): IterableIterator<any> {\n\t\treturn this.root.values();\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.createSubDirectory}\n\t */\n\tpublic createSubDirectory(subdirName: string): IDirectory {\n\t\treturn this.root.createSubDirectory(subdirName);\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.getSubDirectory}\n\t */\n\tpublic getSubDirectory(subdirName: string): IDirectory | undefined {\n\t\treturn this.root.getSubDirectory(subdirName);\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.hasSubDirectory}\n\t */\n\tpublic hasSubDirectory(subdirName: string): boolean {\n\t\treturn this.root.hasSubDirectory(subdirName);\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.deleteSubDirectory}\n\t */\n\tpublic deleteSubDirectory(subdirName: string): boolean {\n\t\treturn this.root.deleteSubDirectory(subdirName);\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.subdirectories}\n\t */\n\tpublic subdirectories(): IterableIterator<[string, IDirectory]> {\n\t\treturn this.root.subdirectories();\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.getWorkingDirectory}\n\t */\n\tpublic getWorkingDirectory(relativePath: string): IDirectory | undefined {\n\t\tconst absolutePath = this.makeAbsolute(relativePath);\n\t\tif (absolutePath === posix.sep) {\n\t\t\treturn this.root;\n\t\t}\n\n\t\tlet currentSubDir = this.root;\n\t\tconst subdirs = absolutePath.slice(1).split(posix.sep);\n\t\tfor (const subdir of subdirs) {\n\t\t\tcurrentSubDir = currentSubDir.getSubDirectory(subdir) as SubDirectory;\n\t\t\tif (!currentSubDir) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\t\treturn currentSubDir;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}\n\t */\n\tprotected summarizeCore(\n\t\tserializer: IFluidSerializer,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): ISummaryTreeWithStats {\n\t\treturn this.serializeDirectory(this.root, serializer);\n\t}\n\n\t/**\n\t * Submits an operation\n\t * @param op - Op to submit\n\t * @param localOpMetadata - The local metadata associated with the op. We send a unique id that is used to track\n\t * this op while it has not been ack'd. This will be sent when we receive this op back from the server.\n\t */\n\tpublic submitDirectoryMessage(op: IDirectoryOperation, localOpMetadata: unknown): void {\n\t\tthis.submitLocalMessage(op, localOpMetadata);\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}\n\t */\n\tprotected onDisconnect(): void {}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.reSubmitCore}\n\t */\n\tprotected reSubmitCore(content: unknown, localOpMetadata: unknown): void {\n\t\tconst message = content as IDirectoryOperation;\n\t\tconst handler = this.messageHandlers.get(message.type);\n\t\tassert(handler !== undefined, 0x00d /* Missing message handler for message type */);\n\t\thandler.submit(message, localOpMetadata);\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}\n\t */\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst data = await readAndParse(storage, snapshotFileName);\n\t\tconst newFormat = data as IDirectoryNewStorageFormat;\n\t\tif (Array.isArray(newFormat.blobs)) {\n\t\t\t// New storage format\n\t\t\tthis.populate(newFormat.content);\n\t\t\tawait Promise.all(\n\t\t\t\tnewFormat.blobs.map(async (value) => {\n\t\t\t\t\tconst dataExtra = await readAndParse(storage, value);\n\t\t\t\t\tthis.populate(dataExtra as IDirectoryDataObject);\n\t\t\t\t}),\n\t\t\t);\n\t\t} else {\n\t\t\t// Old storage format\n\t\t\tthis.populate(data as IDirectoryDataObject);\n\t\t}\n\t}\n\n\t/**\n\t * Populate the directory with the given directory data.\n\t * @param data - A JSON string containing serialized directory data\n\t */\n\tprotected populate(data: IDirectoryDataObject): void {\n\t\tconst stack: [SubDirectory, IDirectoryDataObject][] = [];\n\t\tstack.push([this.root, data]);\n\n\t\twhile (stack.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tconst [currentSubDir, currentSubDirObject] = stack.pop()!;\n\t\t\tif (currentSubDirObject.subdirectories) {\n\t\t\t\t// Utilize a map to store the seq -> clientSeq for the newly created subdirectory\n\t\t\t\tconst tempSeqNums = new Map<number, number>();\n\t\t\t\tfor (const [subdirName, subdirObject] of Object.entries(\n\t\t\t\t\tcurrentSubDirObject.subdirectories,\n\t\t\t\t)) {\n\t\t\t\t\tlet newSubDir = currentSubDir.getSubDirectory(subdirName) as SubDirectory;\n\t\t\t\t\tlet seqData: SequenceData;\n\t\t\t\t\tif (!newSubDir) {\n\t\t\t\t\t\tconst createInfo = subdirObject.ci;\n\t\t\t\t\t\t// We do not store the client sequence number in the storage because the order has already been\n\t\t\t\t\t\t// guaranteed during the serialization process. As a result, it is only essential to utilize the\n\t\t\t\t\t\t// \"fake\" client sequence number to signify the loading order, and there is no need to retain\n\t\t\t\t\t\t// the actual client sequence number at this point.\n\t\t\t\t\t\tif (createInfo !== undefined && createInfo.csn > -1) {\n\t\t\t\t\t\t\t// If csn is -1, then initialize it with 0, otherwise we will never process ops for this\n\t\t\t\t\t\t\t// sub directory. This could be done at serialization time too, but we need to maintain\n\t\t\t\t\t\t\t// back compat too and also we will actually know the state when it was serialized.\n\t\t\t\t\t\t\tif (!tempSeqNums.has(createInfo.csn)) {\n\t\t\t\t\t\t\t\ttempSeqNums.set(createInfo.csn, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlet fakeClientSeq = tempSeqNums.get(createInfo.csn) as number;\n\t\t\t\t\t\t\tseqData = { seq: createInfo.csn, clientSeq: fakeClientSeq };\n\t\t\t\t\t\t\ttempSeqNums.set(createInfo.csn, ++fakeClientSeq);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tseqData = {\n\t\t\t\t\t\t\t\tseq: 0,\n\t\t\t\t\t\t\t\tclientSeq: ++currentSubDir.localCreationSeq,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewSubDir = new SubDirectory(\n\t\t\t\t\t\t\tseqData,\n\t\t\t\t\t\t\tcreateInfo !== undefined\n\t\t\t\t\t\t\t\t? new Set<string>(createInfo.ccIds)\n\t\t\t\t\t\t\t\t: new Set(),\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\tthis.runtime,\n\t\t\t\t\t\t\tthis.serializer,\n\t\t\t\t\t\t\tposix.join(currentSubDir.absolutePath, subdirName),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcurrentSubDir.populateSubDirectory(subdirName, newSubDir);\n\t\t\t\t\t\t// Record the newly inserted subdirectory to the creation tracker\n\t\t\t\t\t\tcurrentSubDir.ackedCreationSeqTracker.set(subdirName, {\n\t\t\t\t\t\t\t...seqData,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tstack.push([newSubDir, subdirObject]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (currentSubDirObject.storage) {\n\t\t\t\tfor (const [key, serializable] of Object.entries(currentSubDirObject.storage)) {\n\t\t\t\t\tconst localValue = this.makeLocal(\n\t\t\t\t\t\tkey,\n\t\t\t\t\t\tcurrentSubDir.absolutePath,\n\t\t\t\t\t\tserializable,\n\t\t\t\t\t);\n\t\t\t\t\tcurrentSubDir.populateStorage(key, localValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}\n\t */\n\tprotected processCore(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tif (message.type === MessageType.Operation) {\n\t\t\tconst op: IDirectoryOperation = message.contents as IDirectoryOperation;\n\t\t\tconst handler = this.messageHandlers.get(op.type);\n\t\t\tassert(handler !== undefined, 0x00e /* Missing message handler for message type */);\n\t\t\thandler.process(message, op, local, localOpMetadata);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.rollback}\n\t */\n\tprotected rollback(content: unknown, localOpMetadata: unknown): void {\n\t\tconst op: IDirectoryOperation = content as IDirectoryOperation;\n\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\tif (subdir) {\n\t\t\tsubdir.rollback(op, localOpMetadata);\n\t\t}\n\t}\n\n\t/**\n\t * Converts the given relative path to absolute against the root.\n\t * @param relativePath - The path to convert\n\t */\n\tprivate makeAbsolute(relativePath: string): string {\n\t\treturn posix.resolve(posix.sep, relativePath);\n\t}\n\n\t/**\n\t * The remote ISerializableValue we're receiving (either as a result of a snapshot load or an incoming set op)\n\t * will have the information we need to create a real object, but will not be the real object yet. For example,\n\t * we might know it's a map and the ID but not have the actual map or its data yet. makeLocal's job\n\t * is to convert that information into a real object for local usage.\n\t * @param key - Key of element being converted\n\t * @param absolutePath - Path of element being converted\n\t * @param serializable - The remote information that we can convert into a real object\n\t * @returns The local value that was produced\n\t */\n\tprivate makeLocal(\n\t\tkey: string,\n\t\tabsolutePath: string,\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tserializable: ISerializableValue,\n\t): ILocalValue {\n\t\tassert(\n\t\t\tserializable.type === ValueType[ValueType.Plain] ||\n\t\t\t\tserializable.type === ValueType[ValueType.Shared],\n\t\t\t0x1e4 /* \"Unexpected serializable type\" */,\n\t\t);\n\t\treturn this.localValueMaker.fromSerializable(serializable);\n\t}\n\n\t/**\n\t * This checks if there is pending delete op for local delete for a any subdir in the relative path.\n\t * @param relativePath - path of sub directory.\n\t * @returns `true` if there is pending delete, `false` otherwise.\n\t */\n\tprivate isSubDirectoryDeletePending(relativePath: string): boolean {\n\t\tconst absolutePath = this.makeAbsolute(relativePath);\n\t\tif (absolutePath === posix.sep) {\n\t\t\treturn false;\n\t\t}\n\t\tlet currentParent = this.root;\n\t\tconst nodeList = absolutePath.split(posix.sep);\n\t\tlet start = 1;\n\t\twhile (start < nodeList.length) {\n\t\t\tconst subDirName = nodeList[start];\n\t\t\tif (currentParent.isSubDirectoryDeletePending(subDirName)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcurrentParent = currentParent.getSubDirectory(subDirName) as SubDirectory;\n\t\t\tif (currentParent === undefined) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tstart += 1;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Set the message handlers for the directory.\n\t */\n\tprivate setMessageHandlers(): void {\n\t\tthis.messageHandlers.set(\"clear\", {\n\t\t\tprocess: (\n\t\t\t\tmsg: ISequencedDocumentMessage,\n\t\t\t\top: IDirectoryClearOperation,\n\t\t\t\tlocal,\n\t\t\t\tlocalOpMetadata,\n\t\t\t) => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\t// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op\n\t\t\t\t// as we are going to delete this subDirectory.\n\t\t\t\tif (subdir && !this.isSubDirectoryDeletePending(op.path)) {\n\t\t\t\t\tsubdir.processClearMessage(msg, op, local, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tsubmit: (op: IDirectoryClearOperation, localOpMetadata: unknown) => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (subdir) {\n\t\t\t\t\tsubdir.resubmitClearMessage(op, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tapplyStashedOp: (op: IDirectoryClearOperation): IClearLocalOpMetadata | undefined => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (subdir) {\n\t\t\t\t\treturn subdir.applyStashedClearMessage(op);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t\tthis.messageHandlers.set(\"delete\", {\n\t\t\tprocess: (\n\t\t\t\tmsg: ISequencedDocumentMessage,\n\t\t\t\top: IDirectoryDeleteOperation,\n\t\t\t\tlocal,\n\t\t\t\tlocalOpMetadata,\n\t\t\t) => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\t// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op\n\t\t\t\t// as we are going to delete this subDirectory.\n\t\t\t\tif (subdir && !this.isSubDirectoryDeletePending(op.path)) {\n\t\t\t\t\tsubdir.processDeleteMessage(msg, op, local, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tsubmit: (op: IDirectoryDeleteOperation, localOpMetadata: unknown) => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (subdir) {\n\t\t\t\t\tsubdir.resubmitKeyMessage(op, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tapplyStashedOp: (\n\t\t\t\top: IDirectoryDeleteOperation,\n\t\t\t): IKeyEditLocalOpMetadata | undefined => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (subdir) {\n\t\t\t\t\treturn subdir.applyStashedDeleteMessage(op);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t\tthis.messageHandlers.set(\"set\", {\n\t\t\tprocess: (\n\t\t\t\tmsg: ISequencedDocumentMessage,\n\t\t\t\top: IDirectorySetOperation,\n\t\t\t\tlocal,\n\t\t\t\tlocalOpMetadata,\n\t\t\t) => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\t// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op\n\t\t\t\t// as we are going to delete this subDirectory.\n\t\t\t\tif (subdir && !this.isSubDirectoryDeletePending(op.path)) {\n\t\t\t\t\tconst context = local ? undefined : this.makeLocal(op.key, op.path, op.value);\n\t\t\t\t\tsubdir.processSetMessage(msg, op, context, local, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tsubmit: (op: IDirectorySetOperation, localOpMetadata: unknown) => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (subdir) {\n\t\t\t\t\tsubdir.resubmitKeyMessage(op, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tapplyStashedOp: (op: IDirectorySetOperation): IKeyEditLocalOpMetadata | undefined => {\n\t\t\t\tconst subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (subdir) {\n\t\t\t\t\tconst context = this.makeLocal(op.key, op.path, op.value);\n\t\t\t\t\treturn subdir.applyStashedSetMessage(op, context);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\n\t\tthis.messageHandlers.set(\"createSubDirectory\", {\n\t\t\tprocess: (\n\t\t\t\tmsg: ISequencedDocumentMessage,\n\t\t\t\top: IDirectoryCreateSubDirectoryOperation,\n\t\t\t\tlocal,\n\t\t\t\tlocalOpMetadata,\n\t\t\t) => {\n\t\t\t\tconst parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\t// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op\n\t\t\t\t// as we are going to delete this subDirectory.\n\t\t\t\tif (parentSubdir && !this.isSubDirectoryDeletePending(op.path)) {\n\t\t\t\t\tparentSubdir.processCreateSubDirectoryMessage(msg, op, local, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tsubmit: (op: IDirectoryCreateSubDirectoryOperation, localOpMetadata: unknown) => {\n\t\t\t\tconst parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (parentSubdir) {\n\t\t\t\t\t// We don't reuse the metadata but send a new one on each submit.\n\t\t\t\t\tparentSubdir.resubmitSubDirectoryMessage(op, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tapplyStashedOp: (\n\t\t\t\top: IDirectoryCreateSubDirectoryOperation,\n\t\t\t): ICreateSubDirLocalOpMetadata | undefined => {\n\t\t\t\tconst parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (parentSubdir) {\n\t\t\t\t\treturn parentSubdir.applyStashedCreateSubDirMessage(op);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\n\t\tthis.messageHandlers.set(\"deleteSubDirectory\", {\n\t\t\tprocess: (\n\t\t\t\tmsg: ISequencedDocumentMessage,\n\t\t\t\top: IDirectoryDeleteSubDirectoryOperation,\n\t\t\t\tlocal,\n\t\t\t\tlocalOpMetadata,\n\t\t\t) => {\n\t\t\t\tconst parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\t// If there is pending delete op for any subDirectory in the op.path, then don't apply the this op\n\t\t\t\t// as we are going to delete this subDirectory.\n\t\t\t\tif (parentSubdir && !this.isSubDirectoryDeletePending(op.path)) {\n\t\t\t\t\tparentSubdir.processDeleteSubDirectoryMessage(msg, op, local, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tsubmit: (op: IDirectoryDeleteSubDirectoryOperation, localOpMetadata: unknown) => {\n\t\t\t\tconst parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (parentSubdir) {\n\t\t\t\t\t// We don't reuse the metadata but send a new one on each submit.\n\t\t\t\t\tparentSubdir.resubmitSubDirectoryMessage(op, localOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tapplyStashedOp: (\n\t\t\t\top: IDirectoryDeleteSubDirectoryOperation,\n\t\t\t): IDeleteSubDirLocalOpMetadata | undefined => {\n\t\t\t\tconst parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;\n\t\t\t\tif (parentSubdir) {\n\t\t\t\t\treturn parentSubdir.applyStashedDeleteSubDirMessage(op);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}\n\t */\n\tprotected applyStashedOp(op: unknown): unknown {\n\t\tconst handler = this.messageHandlers.get((op as IDirectoryOperation).type);\n\t\tif (handler === undefined) {\n\t\t\tthrow new Error(\"no apply stashed op handler\");\n\t\t}\n\t\treturn handler.applyStashedOp(op as IDirectoryOperation);\n\t}\n\n\tprivate serializeDirectory(\n\t\troot: SubDirectory,\n\t\tserializer: IFluidSerializer,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): ISummaryTreeWithStats {\n\t\tconst MinValueSizeSeparateSnapshotBlob = 8 * 1024;\n\n\t\tconst builder = new SummaryTreeBuilder();\n\t\tlet counter = 0;\n\t\tconst blobs: string[] = [];\n\n\t\tconst stack: [SubDirectory, IDirectoryDataObject][] = [];\n\t\tconst content: IDirectoryDataObject = {};\n\t\tstack.push([root, content]);\n\n\t\twhile (stack.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tconst [currentSubDir, currentSubDirObject] = stack.pop()!;\n\t\t\tcurrentSubDirObject.ci = currentSubDir.getSerializableCreateInfo();\n\t\t\tfor (const [key, value] of currentSubDir.getSerializedStorage(serializer)) {\n\t\t\t\tif (!currentSubDirObject.storage) {\n\t\t\t\t\tcurrentSubDirObject.storage = {};\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\tconst result: ISerializableValue = {\n\t\t\t\t\ttype: value.type,\n\t\t\t\t\tvalue: value.value && (JSON.parse(value.value) as object),\n\t\t\t\t};\n\t\t\t\tif (value.value && value.value.length >= MinValueSizeSeparateSnapshotBlob) {\n\t\t\t\t\tconst extraContent: IDirectoryDataObject = {};\n\t\t\t\t\tlet largeContent = extraContent;\n\t\t\t\t\tif (currentSubDir.absolutePath !== posix.sep) {\n\t\t\t\t\t\tfor (const dir of currentSubDir.absolutePath.slice(1).split(posix.sep)) {\n\t\t\t\t\t\t\tconst subDataObject: IDirectoryDataObject = {};\n\t\t\t\t\t\t\tlargeContent.subdirectories = { [dir]: subDataObject };\n\t\t\t\t\t\t\tlargeContent = subDataObject;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlargeContent.storage = { [key]: result };\n\t\t\t\t\tconst blobName = `blob${counter}`;\n\t\t\t\t\tcounter++;\n\t\t\t\t\tblobs.push(blobName);\n\t\t\t\t\tbuilder.addBlob(blobName, JSON.stringify(extraContent));\n\t\t\t\t} else {\n\t\t\t\t\tcurrentSubDirObject.storage[key] = result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const [subdirName, subdir] of currentSubDir.subdirectories()) {\n\t\t\t\tif (!currentSubDirObject.subdirectories) {\n\t\t\t\t\tcurrentSubDirObject.subdirectories = {};\n\t\t\t\t}\n\t\t\t\tconst subDataObject: IDirectoryDataObject = {};\n\t\t\t\tcurrentSubDirObject.subdirectories[subdirName] = subDataObject;\n\t\t\t\tstack.push([subdir as SubDirectory, subDataObject]);\n\t\t\t}\n\t\t}\n\n\t\tconst newFormat: IDirectoryNewStorageFormat = {\n\t\t\tblobs,\n\t\t\tcontent,\n\t\t};\n\t\tbuilder.addBlob(snapshotFileName, JSON.stringify(newFormat));\n\n\t\treturn builder.getSummaryTree();\n\t}\n}\n\ninterface IKeyEditLocalOpMetadata {\n\ttype: \"edit\";\n\tpendingMessageId: number;\n\tpreviousValue: ILocalValue | undefined;\n}\n\ninterface IClearLocalOpMetadata {\n\ttype: \"clear\";\n\tpendingMessageId: number;\n\tpreviousStorage: Map<string, ILocalValue>;\n}\n\ninterface ICreateSubDirLocalOpMetadata {\n\ttype: \"createSubDir\";\n}\n\ninterface IDeleteSubDirLocalOpMetadata {\n\ttype: \"deleteSubDir\";\n\tsubDirectory: SubDirectory | undefined;\n}\n\ntype SubDirLocalOpMetadata = ICreateSubDirLocalOpMetadata | IDeleteSubDirLocalOpMetadata;\nexport type DirectoryLocalOpMetadata =\n\t| IClearLocalOpMetadata\n\t| IKeyEditLocalOpMetadata\n\t| SubDirLocalOpMetadata;\n\n/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n\nfunction isKeyEditLocalOpMetadata(metadata: any): metadata is IKeyEditLocalOpMetadata {\n\treturn (\n\t\tmetadata !== undefined &&\n\t\ttypeof metadata.pendingMessageId === \"number\" &&\n\t\tmetadata.type === \"edit\"\n\t);\n}\n\nfunction isClearLocalOpMetadata(metadata: any): metadata is IClearLocalOpMetadata {\n\treturn (\n\t\tmetadata !== undefined &&\n\t\tmetadata.type === \"clear\" &&\n\t\ttypeof metadata.pendingMessageId === \"number\" &&\n\t\ttypeof metadata.previousStorage === \"object\"\n\t);\n}\n\nfunction isSubDirLocalOpMetadata(metadata: any): metadata is SubDirLocalOpMetadata {\n\treturn (\n\t\tmetadata !== undefined &&\n\t\t(metadata.type === \"createSubDir\" || metadata.type === \"deleteSubDir\")\n\t);\n}\n\nfunction isDirectoryLocalOpMetadata(metadata: any): metadata is DirectoryLocalOpMetadata {\n\treturn (\n\t\tisKeyEditLocalOpMetadata(metadata) ||\n\t\tisClearLocalOpMetadata(metadata) ||\n\t\tisSubDirLocalOpMetadata(metadata)\n\t);\n}\n\n/* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n\nfunction assertNonNullClientId(clientId: string | null): asserts clientId is string {\n\tassert(clientId !== null, 0x6af /* client id should never be null */);\n}\n\n/**\n * Node of the directory tree.\n * @sealed\n */\nclass SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirectory {\n\t/**\n\t * Tells if the sub directory is deleted or not.\n\t */\n\tprivate _deleted = false;\n\n\t/**\n\t * String representation for the class.\n\t */\n\tpublic [Symbol.toStringTag]: string = \"SubDirectory\";\n\n\t/**\n\t * The in-memory data the directory is storing.\n\t */\n\tprivate readonly _storage: Map<string, ILocalValue> = new Map();\n\n\t/**\n\t * The subdirectories the directory is holding.\n\t */\n\tprivate readonly _subdirectories: Map<string, SubDirectory> = new Map();\n\n\t/**\n\t * Keys that have been modified locally but not yet ack'd from the server. This is for operations on keys like\n\t * set/delete operations on keys. The value of this map is list of pendingMessageIds at which that key\n\t * was modified. We don't store the type of ops, and behaviour of key ops are different from behaviour of sub\n\t * directory ops, so we have separate map from subDirectories tracker.\n\t */\n\tprivate readonly pendingKeys: Map<string, number[]> = new Map();\n\n\t/**\n\t * Subdirectories that have been deleted locally but not yet ack'd from the server. This maintains the record\n\t * of delete op that are pending or yet to be acked from server. This is maintained just to track the locally\n\t * deleted sub directory.\n\t */\n\tprivate readonly pendingDeleteSubDirectoriesTracker: Map<string, number> = new Map();\n\n\t/**\n\t * Subdirectories that have been created locally but not yet ack'd from the server. This maintains the record\n\t * of create op that are pending or yet to be acked from server. This is maintained just to track the locally\n\t * created sub directory.\n\t */\n\tprivate readonly pendingCreateSubDirectoriesTracker: Map<string, number> = new Map();\n\n\t/**\n\t * This is used to assign a unique id to every outgoing operation and helps in tracking unack'd ops.\n\t */\n\tprivate pendingMessageId: number = -1;\n\n\t/**\n\t * The pending ids of any clears that have been performed locally but not yet ack'd from the server\n\t */\n\tprivate readonly pendingClearMessageIds: number[] = [];\n\n\t/**\n\t * Assigns a unique ID to each subdirectory created locally but pending for acknowledgement, facilitating the tracking\n\t * of the creation order.\n\t */\n\tpublic localCreationSeq: number = 0;\n\n\t/**\n\t * Maintains a bidirectional association between ack'd subdirectories and their seqData.\n\t * This helps to ensure iteration order which is consistent with the JS map spec.\n\t */\n\tpublic readonly ackedCreationSeqTracker: DirectoryCreationTracker;\n\n\t/**\n\t * Similar to {@link ackedCreationSeqTracker}, but for local (unacked) entries.\n\t */\n\tpublic readonly localCreationSeqTracker: DirectoryCreationTracker;\n\n\t/**\n\t * Constructor.\n\t * @param sequenceNumber - Message seq number at which this was created.\n\t * @param clientIds - Ids of client which created this directory.\n\t * @param directory - Reference back to the SharedDirectory to perform operations\n\t * @param runtime - The data store runtime this directory is associated with\n\t * @param serializer - The serializer to serialize / parse handles\n\t * @param absolutePath - The absolute path of this IDirectory\n\t */\n\tpublic constructor(\n\t\tprivate readonly seqData: SequenceData,\n\t\tprivate readonly clientIds: Set<string>,\n\t\tprivate readonly directory: SharedDirectory,\n\t\tprivate readonly runtime: IFluidDataStoreRuntime,\n\t\tprivate readonly serializer: IFluidSerializer,\n\t\tpublic readonly absolutePath: string,\n\t) {\n\t\tsuper();\n\t\tthis.localCreationSeqTracker = new DirectoryCreationTracker();\n\t\tthis.ackedCreationSeqTracker = new DirectoryCreationTracker();\n\t}\n\n\tpublic dispose(error?: Error): void {\n\t\tthis._deleted = true;\n\t\tthis.emit(\"disposed\", this);\n\t}\n\n\t/**\n\t * Unmark the deleted property only when rolling back delete.\n\t */\n\tprivate undispose(): void {\n\t\tthis._deleted = false;\n\t\tthis.emit(\"undisposed\", this);\n\t}\n\n\tpublic get disposed(): boolean {\n\t\treturn this._deleted;\n\t}\n\n\tprivate throwIfDisposed(): void {\n\t\tif (this._deleted) {\n\t\t\tthrow new UsageError(\"Cannot access Disposed subDirectory\");\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether the given key exists in this IDirectory.\n\t * @param key - The key to check\n\t * @returns True if the key exists, false otherwise\n\t */\n\tpublic has(key: string): boolean {\n\t\tthis.throwIfDisposed();\n\t\treturn this._storage.has(key);\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.get}\n\t */\n\tpublic get<T = unknown>(key: string): T | undefined {\n\t\tthis.throwIfDisposed();\n\t\treturn this._storage.get(key)?.value as T | undefined;\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.set}\n\t */\n\tpublic set<T = unknown>(key: string, value: T): this {\n\t\tthis.throwIfDisposed();\n\t\t// Undefined/null keys can't be serialized to JSON in the manner we currently snapshot.\n\t\tif (key === undefined || key === null) {\n\t\t\tthrow new Error(\"Undefined and null keys are not supported\");\n\t\t}\n\n\t\t// Create a local value and serialize it.\n\t\tconst localValue = this.directory.localValueMaker.fromInMemory(value);\n\t\tconst serializableValue = makeSerializable(\n\t\t\tlocalValue,\n\t\t\tthis.serializer,\n\t\t\tthis.directory.handle,\n\t\t);\n\n\t\t// Set the value locally.\n\t\tconst previousValue = this.setCore(key, localValue, true);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.directory.isAttached()) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst op: IDirectorySetOperation = {\n\t\t\tkey,\n\t\t\tpath: this.absolutePath,\n\t\t\ttype: \"set\",\n\t\t\tvalue: serializableValue,\n\t\t};\n\t\tthis.submitKeyMessage(op, previousValue);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.countSubDirectory}\n\t */\n\tpublic countSubDirectory(): number {\n\t\treturn this._subdirectories.size;\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.createSubDirectory}\n\t */\n\tpublic createSubDirectory(subdirName: string): IDirectory {\n\t\tthis.throwIfDisposed();\n\t\t// Undefined/null subdirectory names can't be serialized to JSON in the manner we currently snapshot.\n\t\tif (subdirName === undefined || subdirName === null) {\n\t\t\tthrow new Error(\"SubDirectory name may not be undefined or null\");\n\t\t}\n\n\t\tif (subdirName.includes(posix.sep)) {\n\t\t\tthrow new Error(`SubDirectory name may not contain ${posix.sep}`);\n\t\t}\n\n\t\t// Create the sub directory locally first.\n\t\tconst isNew = this.createSubDirectoryCore(\n\t\t\tsubdirName,\n\t\t\ttrue,\n\t\t\tthis.getLocalSeq(),\n\t\t\tthis.runtime.clientId ?? \"detached\",\n\t\t);\n\t\tconst subDir = this._subdirectories.get(subdirName);\n\t\tassert(subDir !== undefined, 0x5aa /* subdirectory should exist after creation */);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.directory.isAttached()) {\n\t\t\treturn subDir;\n\t\t}\n\n\t\t// Only submit the op, if it is newly created.\n\t\tif (isNew) {\n\t\t\tconst op: IDirectoryCreateSubDirectoryOperation = {\n\t\t\t\tpath: this.absolutePath,\n\t\t\t\tsubdirName,\n\t\t\t\ttype: \"createSubDirectory\",\n\t\t\t};\n\t\t\tthis.submitCreateSubDirectoryMessage(op);\n\t\t}\n\n\t\treturn subDir;\n\t}\n\n\t/**\n\t * @returns The Sequence Data which should be used for local changes.\n\t * @remarks While detached, 0 is used rather than -1 to represent a change which should be universally known (as opposed to known\n\t * only by the local client). This ensures that if the directory is later attached, none of its data needs to be updated (the values\n\t * last set while detached will now be known to any new client, until they are changed).\n\t *\n\t * The client sequence number is incremented by 1 for maintaining the internal order of locally created subdirectories\n\t * TODO: Convert these conventions to named constants. The semantics used here match those for merge-tree.\n\t */\n\tprivate getLocalSeq(): SequenceData {\n\t\treturn this.directory.isAttached()\n\t\t\t? { seq: -1, clientSeq: ++this.localCreationSeq }\n\t\t\t: { seq: 0, clientSeq: ++this.localCreationSeq };\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.getSubDirectory}\n\t */\n\tpublic getSubDirectory(subdirName: string): IDirectory | undefined {\n\t\tthis.throwIfDisposed();\n\t\treturn this._subdirectories.get(subdirName);\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.hasSubDirectory}\n\t */\n\tpublic hasSubDirectory(subdirName: string): boolean {\n\t\tthis.throwIfDisposed();\n\t\treturn this._subdirectories.has(subdirName);\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.deleteSubDirectory}\n\t */\n\tpublic deleteSubDirectory(subdirName: string): boolean {\n\t\tthis.throwIfDisposed();\n\t\t// Delete the sub directory locally first.\n\t\tconst subDir = this.deleteSubDirectoryCore(subdirName, true);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.directory.isAttached()) {\n\t\t\treturn subDir !== undefined;\n\t\t}\n\n\t\t// Only submit the op, if the directory existed and we deleted it.\n\t\tif (subDir !== undefined) {\n\t\t\tconst op: IDirectoryDeleteSubDirectoryOperation = {\n\t\t\t\tpath: this.absolutePath,\n\t\t\t\tsubdirName,\n\t\t\t\ttype: \"deleteSubDirectory\",\n\t\t\t};\n\n\t\t\tthis.submitDeleteSubDirectoryMessage(op, subDir);\n\t\t}\n\t\treturn subDir !== undefined;\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.subdirectories}\n\t */\n\tpublic subdirectories(): IterableIterator<[string, IDirectory]> {\n\t\tthis.throwIfDisposed();\n\t\tconst ackedSubdirsInOrder = this.ackedCreationSeqTracker.keys();\n\t\tconst localSubdirsInOrder = this.localCreationSeqTracker.keys(\n\t\t\t(key) => !this.ackedCreationSeqTracker.has(key),\n\t\t);\n\n\t\tconst subdirNames = [...ackedSubdirsInOrder, ...localSubdirsInOrder];\n\n\t\tassert(\n\t\t\tsubdirNames.length === this._subdirectories.size,\n\t\t\t0x85c /* The count of keys for iteration should be consistent with the size of actual data */,\n\t\t);\n\n\t\tconst entriesIterator = {\n\t\t\tindex: 0,\n\t\t\tdirs: this._subdirectories,\n\t\t\tnext(): IteratorResult<[string, any]> {\n\t\t\t\tif (this.index < subdirNames.length) {\n\t\t\t\t\tconst subdirName = subdirNames[this.index++];\n\t\t\t\t\tconst subdir = this.dirs.get(subdirName);\n\t\t\t\t\treturn { value: [subdirName, subdir], done: false };\n\t\t\t\t}\n\t\t\t\treturn { value: undefined, done: true };\n\t\t\t},\n\t\t\t[Symbol.iterator](): IterableIterator<[string, any]> {\n\t\t\t\treturn this;\n\t\t\t},\n\t\t};\n\n\t\treturn entriesIterator;\n\t}\n\n\t/**\n\t * {@inheritDoc IDirectory.getWorkingDirectory}\n\t */\n\tpublic getWorkingDirectory(relativePath: string): IDirectory | undefined {\n\t\tthis.throwIfDisposed();\n\t\treturn this.directory.getWorkingDirectory(this.makeAbsolute(relativePath));\n\t}\n\n\t/**\n\t * This checks if there is pending delete op for local delete for a given child subdirectory.\n\t * @param subDirName - directory name.\n\t * @returns true if there is pending delete.\n\t */\n\tpublic isSubDirectoryDeletePending(subDirName: string): boolean {\n\t\tif (this.pendingDeleteSubDirectoriesTracker.has(subDirName)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Deletes the given key from within this IDirectory.\n\t * @param key - The key to delete\n\t * @returns True if the key existed and was deleted, false if it did not exist\n\t */\n\tpublic delete(key: string): boolean {\n\t\tthis.throwIfDisposed();\n\t\t// Delete the key locally first.\n\t\tconst previousValue = this.deleteCore(key, true);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.directory.isAttached()) {\n\t\t\treturn previousValue !== undefined;\n\t\t}\n\n\t\tconst op: IDirectoryDeleteOperation = {\n\t\t\tkey,\n\t\t\tpath: this.absolutePath,\n\t\t\ttype: \"delete\",\n\t\t};\n\n\t\tthis.submitKeyMessage(op, previousValue);\n\t\treturn previousValue !== undefined;\n\t}\n\n\t/**\n\t * Deletes all keys from within this IDirectory.\n\t */\n\tpublic clear(): void {\n\t\tthis.throwIfDisposed();\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.directory.isAttached()) {\n\t\t\tthis.clearCore(true);\n\t\t\treturn;\n\t\t}\n\n\t\tconst copy = new Map<string, ILocalValue>(this._storage);\n\t\tthis.clearCore(true);\n\t\tconst op: IDirectoryClearOperation = {\n\t\t\tpath: this.absolutePath,\n\t\t\ttype: \"clear\",\n\t\t};\n\t\tthis.submitClearMessage(op, copy);\n\t}\n\n\t/**\n\t * Issue a callback on each entry under this IDirectory.\n\t * @param callback - Callback to issue\n\t */\n\tpublic forEach(\n\t\tcallback: (value: unknown, key: string, map: Map<string, unknown>) => void,\n\t): void {\n\t\tthis.throwIfDisposed();\n\t\t// eslint-disable-next-line unicorn/no-array-for-each\n\t\tthis._storage.forEach((localValue, key, map) => {\n\t\t\tcallback(localValue.value, key, map);\n\t\t});\n\t}\n\n\t/**\n\t * The number of entries under this IDirectory.\n\t */\n\tpublic get size(): number {\n\t\tthis.throwIfDisposed();\n\t\treturn this._storage.size;\n\t}\n\n\t/**\n\t * Get an iterator over the entries under this IDirectory.\n\t * @returns The iterator\n\t */\n\tpublic entries(): IterableIterator<[string, unknown]> {\n\t\tthis.throwIfDisposed();\n\t\tconst localEntriesIterator = this._storage.entries();\n\t\tconst iterator = {\n\t\t\tnext(): IteratorResult<[string, unknown]> {\n\t\t\t\tconst nextVal = localEntriesIterator.next();\n\t\t\t\treturn nextVal.done\n\t\t\t\t\t? { value: undefined, done: true }\n\t\t\t\t\t: { value: [nextVal.value[0], nextVal.value[1].value], done: false };\n\t\t\t},\n\t\t\t[Symbol.iterator](): IterableIterator<[string, unknown]> {\n\t\t\t\treturn this;\n\t\t\t},\n\t\t};\n\t\treturn iterator;\n\t}\n\n\t/**\n\t * Get an iterator over the keys under this IDirectory.\n\t * @returns The iterator\n\t */\n\tpublic keys(): IterableIterator<string> {\n\t\tthis.throwIfDisposed();\n\t\treturn this._storage.keys();\n\t}\n\n\t/**\n\t * Get an iterator over the values under this IDirectory.\n\t * @returns The iterator\n\t */\n\tpublic values(): IterableIterator<unknown> {\n\t\tthis.throwIfDisposed();\n\t\tconst localValuesIterator = this._storage.values();\n\t\tconst iterator = {\n\t\t\tnext(): IteratorResult<unknown> {\n\t\t\t\tconst nextVal = localValuesIterator.next();\n\t\t\t\treturn nextVal.done\n\t\t\t\t\t? { value: undefined, done: true }\n\t\t\t\t\t: { value: nextVal.value.value, done: false };\n\t\t\t},\n\t\t\t[Symbol.iterator](): IterableIterator<unknown> {\n\t\t\t\treturn this;\n\t\t\t},\n\t\t};\n\t\treturn iterator;\n\t}\n\n\t/**\n\t * Get an iterator over the entries under this IDirectory.\n\t * @returns The iterator\n\t */\n\tpublic [Symbol.iterator](): IterableIterator<[string, unknown]> {\n\t\tthis.throwIfDisposed();\n\t\treturn this.entries();\n\t}\n\n\t/**\n\t * Process a clear operation.\n\t * @param msg - The message from the server to apply.\n\t * @param op - The op to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t * @internal\n\t */\n\tpublic processClearMessage(\n\t\tmsg: ISequencedDocumentMessage,\n\t\top: IDirectoryClearOperation,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tthis.throwIfDisposed();\n\t\tif (!this.isMessageForCurrentInstanceOfSubDirectory(msg)) {\n\t\t\treturn;\n\t\t}\n\t\tif (local) {\n\t\t\tassert(\n\t\t\t\tisClearLocalOpMetadata(localOpMetadata),\n\t\t\t\t0x00f /* pendingMessageId is missing from the local client's operation */,\n\t\t\t);\n\t\t\tconst pendingClearMessageId = this.pendingClearMessageIds.shift();\n\t\t\tassert(\n\t\t\t\tpendingClearMessageId === localOpMetadata.pendingMessageId,\n\t\t\t\t0x32a /* pendingMessageId does not match */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tthis.clearExceptPendingKeys(false);\n\t}\n\n\t/**\n\t * Apply clear operation locally and generate metadata\n\t * @param op - Op to apply\n\t * @returns metadata generated for stahed op\n\t */\n\tpublic applyStashedClearMessage(op: IDirectoryClearOperation): IClearLocalOpMetadata {\n\t\tthis.throwIfDisposed();\n\t\tconst previousValue = new Map<string, ILocalValue>(this._storage);\n\t\tthis.clearExceptPendingKeys(true);\n\t\tconst pendingMsgId = ++this.pendingMessageId;\n\t\tthis.pendingClearMessageIds.push(pendingMsgId);\n\t\tconst metadata: IClearLocalOpMetadata = {\n\t\t\ttype: \"clear\",\n\t\t\tpendingMessageId: pendingMsgId,\n\t\t\tpreviousStorage: previousValue,\n\t\t};\n\t\treturn metadata;\n\t}\n\n\t/**\n\t * Process a delete operation.\n\t * @param msg - The message from the server to apply.\n\t * @param op - The op to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t * @internal\n\t */\n\tpublic processDeleteMessage(\n\t\tmsg: ISequencedDocumentMessage,\n\t\top: IDirectoryDeleteOperation,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tthis.throwIfDisposed();\n\t\tif (\n\t\t\t!(\n\t\t\t\tthis.isMessageForCurrentInstanceOfSubDirectory(msg) &&\n\t\t\t\tthis.needProcessStorageOperation(op, local, localOpMetadata)\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tthis.deleteCore(op.key, local);\n\t}\n\n\t/**\n\t * Apply delete operation locally and generate metadata\n\t * @param op - Op to apply\n\t * @returns metadata generated for stahed op\n\t */\n\tpublic applyStashedDeleteMessage(op: IDirectoryDeleteOperation): IKeyEditLocalOpMetadata {\n\t\tthis.throwIfDisposed();\n\t\tconst previousValue = this.deleteCore(op.key, true);\n\t\tconst pendingMessageId = this.getKeyMessageId(op);\n\t\tconst localMetadata: IKeyEditLocalOpMetadata = {\n\t\t\ttype: \"edit\",\n\t\t\tpendingMessageId,\n\t\t\tpreviousValue,\n\t\t};\n\t\treturn localMetadata;\n\t}\n\n\t/**\n\t * Process a set operation.\n\t * @param msg - The message from the server to apply.\n\t * @param op - The op to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t * @internal\n\t */\n\tpublic processSetMessage(\n\t\tmsg: ISequencedDocumentMessage,\n\t\top: IDirectorySetOperation,\n\t\tcontext: ILocalValue | undefined,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tthis.throwIfDisposed();\n\t\tif (\n\t\t\t!(\n\t\t\t\tthis.isMessageForCurrentInstanceOfSubDirectory(msg) &&\n\t\t\t\tthis.needProcessStorageOperation(op, local, localOpMetadata)\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// needProcessStorageOperation should have returned false if local is true\n\t\t// so we can assume context is not undefined\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\tthis.setCore(op.key, context!, local);\n\t}\n\n\t/**\n\t * Apply set operation locally and generate metadata\n\t * @param op - Op to apply\n\t * @returns metadata generated for stahed op\n\t */\n\tpublic applyStashedSetMessage(\n\t\top: IDirectorySetOperation,\n\t\tcontext: ILocalValue,\n\t): IKeyEditLocalOpMetadata {\n\t\tthis.throwIfDisposed();\n\t\t// Set the value locally.\n\t\tconst previousValue = this.setCore(op.key, context, true);\n\n\t\t// Create metadata\n\t\tconst pendingMessageId = this.getKeyMessageId(op);\n\t\tconst localMetadata: IKeyEditLocalOpMetadata = {\n\t\t\ttype: \"edit\",\n\t\t\tpendingMessageId,\n\t\t\tpreviousValue,\n\t\t};\n\t\treturn localMetadata;\n\t}\n\t/**\n\t * Process a create subdirectory operation.\n\t * @param msg - The message from the server to apply.\n\t * @param op - The op to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t * @internal\n\t */\n\tpublic processCreateSubDirectoryMessage(\n\t\tmsg: ISequencedDocumentMessage,\n\t\top: IDirectoryCreateSubDirectoryOperation,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tthis.throwIfDisposed();\n\t\tif (\n\t\t\t!(\n\t\t\t\tthis.isMessageForCurrentInstanceOfSubDirectory(msg) &&\n\t\t\t\tthis.needProcessSubDirectoryOperation(msg, op, local, localOpMetadata)\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tassertNonNullClientId(msg.clientId);\n\t\tthis.createSubDirectoryCore(\n\t\t\top.subdirName,\n\t\t\tlocal,\n\t\t\t{ seq: msg.sequenceNumber, clientSeq: msg.clientSequenceNumber },\n\t\t\tmsg.clientId,\n\t\t);\n\t}\n\n\t/**\n\t * Apply createSubDirectory operation locally and generate metadata\n\t * @param op - Op to apply\n\t * @returns metadata generated for stahed op\n\t */\n\tpublic applyStashedCreateSubDirMessage(\n\t\top: IDirectoryCreateSubDirectoryOperation,\n\t): ICreateSubDirLocalOpMetadata {\n\t\tthis.throwIfDisposed();\n\t\t// Create the sub directory locally first.\n\t\tthis.createSubDirectoryCore(\n\t\t\top.subdirName,\n\t\t\ttrue,\n\t\t\tthis.getLocalSeq(),\n\t\t\tthis.runtime.clientId ?? \"detached\",\n\t\t);\n\t\tthis.updatePendingSubDirMessageCount(op);\n\n\t\tconst localOpMetadata: ICreateSubDirLocalOpMetadata = {\n\t\t\ttype: \"createSubDir\",\n\t\t};\n\t\treturn localOpMetadata;\n\t}\n\n\t/**\n\t * Process a delete subdirectory operation.\n\t * @param msg - The message from the server to apply.\n\t * @param op - The op to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t * @internal\n\t */\n\tpublic processDeleteSubDirectoryMessage(\n\t\tmsg: ISequencedDocumentMessage,\n\t\top: IDirectoryDeleteSubDirectoryOperation,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tthis.throwIfDisposed();\n\t\tif (\n\t\t\t!(\n\t\t\t\tthis.isMessageForCurrentInstanceOfSubDirectory(msg) &&\n\t\t\t\tthis.needProcessSubDirectoryOperation(msg, op, local, localOpMetadata)\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tthis.deleteSubDirectoryCore(op.subdirName, local);\n\t}\n\n\t/**\n\t * Apply deleteSubDirectory operation locally and generate metadata\n\t * @param op - Op to apply\n\t * @returns metadata generated for stahed op\n\t */\n\tpublic applyStashedDeleteSubDirMessage(\n\t\top: IDirectoryDeleteSubDirectoryOperation,\n\t): IDeleteSubDirLocalOpMetadata {\n\t\tthis.throwIfDisposed();\n\t\tconst subDir = this.deleteSubDirectoryCore(op.subdirName, true);\n\t\tthis.updatePendingSubDirMessageCount(op);\n\t\tconst metadata: IDeleteSubDirLocalOpMetadata = {\n\t\t\ttype: \"deleteSubDir\",\n\t\t\tsubDirectory: subDir,\n\t\t};\n\t\treturn metadata;\n\t}\n\n\t/**\n\t * Submit a clear operation.\n\t * @param op - The operation\n\t */\n\tprivate submitClearMessage(\n\t\top: IDirectoryClearOperation,\n\t\tpreviousValue: Map<string, ILocalValue>,\n\t): void {\n\t\tthis.throwIfDisposed();\n\t\tconst pendingMsgId = ++this.pendingMessageId;\n\t\tthis.pendingClearMessageIds.push(pendingMsgId);\n\t\tconst metadata: IClearLocalOpMetadata = {\n\t\t\ttype: \"clear\",\n\t\t\tpendingMessageId: pendingMsgId,\n\t\t\tpreviousStorage: previousValue,\n\t\t};\n\t\tthis.directory.submitDirectoryMessage(op, metadata);\n\t}\n\n\t/**\n\t * Resubmit a clear operation.\n\t * @param op - The operation\n\t * @internal\n\t */\n\tpublic resubmitClearMessage(op: IDirectoryClearOperation, localOpMetadata: unknown): void {\n\t\tassert(\n\t\t\tisClearLocalOpMetadata(localOpMetadata),\n\t\t\t0x32b /* Invalid localOpMetadata for clear */,\n\t\t);\n\t\t// We don't reuse the metadata pendingMessageId but send a new one on each submit.\n\t\tconst pendingClearMessageId = this.pendingClearMessageIds.shift();\n\t\t// Only submit the op, if we have record for it, otherwise it is possible that the older instance\n\t\t// is already deleted, in which case we don't need to submit the op.\n\t\tif (pendingClearMessageId === localOpMetadata.pendingMessageId) {\n\t\t\tthis.submitClearMessage(op, localOpMetadata.previousStorage);\n\t\t}\n\t}\n\n\t/**\n\t * Get a new pending message id for the op and cache it to track the pending op\n\t */\n\tprivate getKeyMessageId(op: IDirectoryKeyOperation): number {\n\t\t// We don't reuse the metadata pendingMessageId but send a new one on each submit.\n\t\tconst pendingMessageId = ++this.pendingMessageId;\n\t\tconst pendingMessageIds = this.pendingKeys.get(op.key);\n\t\tif (pendingMessageIds !== undefined) {\n\t\t\tpendingMessageIds.push(pendingMessageId);\n\t\t} else {\n\t\t\tthis.pendingKeys.set(op.key, [pendingMessageId]);\n\t\t}\n\t\treturn pendingMessageId;\n\t}\n\n\t/**\n\t * Submit a key operation.\n\t * @param op - The operation\n\t * @param previousValue - The value of the key before this op\n\t */\n\tprivate submitKeyMessage(op: IDirectoryKeyOperation, previousValue?: ILocalValue): void {\n\t\tthis.throwIfDisposed();\n\t\tconst pendingMessageId = this.getKeyMessageId(op);\n\t\tconst localMetadata = { type: \"edit\", pendingMessageId, previousValue };\n\t\tthis.directory.submitDirectoryMessage(op, localMetadata);\n\t}\n\n\t/**\n\t * Submit a key message to remote clients based on a previous submit.\n\t * @param op - The map key message\n\t * @param localOpMetadata - Metadata from the previous submit\n\t * @internal\n\t */\n\tpublic resubmitKeyMessage(op: IDirectoryKeyOperation, localOpMetadata: unknown): void {\n\t\tassert(\n\t\t\tisKeyEditLocalOpMetadata(localOpMetadata),\n\t\t\t0x32d /* Invalid localOpMetadata in submit */,\n\t\t);\n\n\t\t// clear the old pending message id\n\t\tconst pendingMessageIds = this.pendingKeys.get(op.key);\n\t\t// Only submit the op, if we have record for it, otherwise it is possible that the older instance\n\t\t// is already deleted, in which case we don't need to submit the op.\n\t\tif (pendingMessageIds !== undefined) {\n\t\t\tconst index = pendingMessageIds.findIndex(\n\t\t\t\t(id) => id === localOpMetadata.pendingMessageId,\n\t\t\t);\n\t\t\tif (index === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpendingMessageIds.splice(index, 1);\n\t\t\tif (pendingMessageIds.length === 0) {\n\t\t\t\tthis.pendingKeys.delete(op.key);\n\t\t\t}\n\t\t\tthis.submitKeyMessage(op, localOpMetadata.previousValue);\n\t\t}\n\t}\n\n\tprivate incrementPendingSubDirCount(map: Map<string, number>, subDirName: string) {\n\t\tconst count = map.get(subDirName) ?? 0;\n\t\tmap.set(subDirName, count + 1);\n\t}\n\n\tprivate decrementPendingSubDirCount(map: Map<string, number>, subDirName: string) {\n\t\tconst count = map.get(subDirName) ?? 0;\n\t\tmap.set(subDirName, count - 1);\n\t\tif (count <= 1) {\n\t\t\tmap.delete(subDirName);\n\t\t}\n\t}\n\n\t/**\n\t * Update the count for pending create/delete of the sub directory so that it can be validated on receiving op\n\t * or while resubmitting the op.\n\t */\n\tprivate updatePendingSubDirMessageCount(op: IDirectorySubDirectoryOperation) {\n\t\tif (op.type === \"deleteSubDirectory\") {\n\t\t\tthis.incrementPendingSubDirCount(\n\t\t\t\tthis.pendingDeleteSubDirectoriesTracker,\n\t\t\t\top.subdirName,\n\t\t\t);\n\t\t} else if (op.type === \"createSubDirectory\") {\n\t\t\tthis.incrementPendingSubDirCount(\n\t\t\t\tthis.pendingCreateSubDirectoriesTracker,\n\t\t\t\top.subdirName,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Submit a create subdirectory operation.\n\t * @param op - The operation\n\t */\n\tprivate submitCreateSubDirectoryMessage(op: IDirectorySubDirectoryOperation): void {\n\t\tthis.throwIfDisposed();\n\t\tthis.updatePendingSubDirMessageCount(op);\n\n\t\tconst localOpMetadata: ICreateSubDirLocalOpMetadata = {\n\t\t\ttype: \"createSubDir\",\n\t\t};\n\t\tthis.directory.submitDirectoryMessage(op, localOpMetadata);\n\t}\n\n\t/**\n\t * Submit a delete subdirectory operation.\n\t * @param op - The operation\n\t * @param subDir - Any subdirectory deleted by the op\n\t */\n\tprivate submitDeleteSubDirectoryMessage(\n\t\top: IDirectorySubDirectoryOperation,\n\t\tsubDir: SubDirectory | undefined,\n\t): void {\n\t\tthis.throwIfDisposed();\n\t\tthis.updatePendingSubDirMessageCount(op);\n\n\t\tconst localOpMetadata: IDeleteSubDirLocalOpMetadata = {\n\t\t\ttype: \"deleteSubDir\",\n\t\t\tsubDirectory: subDir,\n\t\t};\n\t\tthis.directory.submitDirectoryMessage(op, localOpMetadata);\n\t}\n\n\t/**\n\t * Submit a subdirectory operation again\n\t * @param op - The operation\n\t * @param localOpMetadata - metadata submitted with the op originally\n\t * @internal\n\t */\n\tpublic resubmitSubDirectoryMessage(\n\t\top: IDirectorySubDirectoryOperation,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tassert(\n\t\t\tisSubDirLocalOpMetadata(localOpMetadata),\n\t\t\t0x32f /* Invalid localOpMetadata for sub directory op */,\n\t\t);\n\n\t\t// Only submit the op, if we have record for it, otherwise it is possible that the older instance\n\t\t// is already deleted, in which case we don't need to submit the op.\n\t\tif (\n\t\t\tlocalOpMetadata.type === \"createSubDir\" &&\n\t\t\t!this.pendingCreateSubDirectoriesTracker.has(op.subdirName)\n\t\t) {\n\t\t\treturn;\n\t\t} else if (\n\t\t\tlocalOpMetadata.type === \"deleteSubDir\" &&\n\t\t\t!this.pendingDeleteSubDirectoriesTracker.has(op.subdirName)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (localOpMetadata.type === \"createSubDir\") {\n\t\t\tthis.decrementPendingSubDirCount(\n\t\t\t\tthis.pendingCreateSubDirectoriesTracker,\n\t\t\t\top.subdirName,\n\t\t\t);\n\t\t\tthis.submitCreateSubDirectoryMessage(op);\n\t\t} else {\n\t\t\tthis.decrementPendingSubDirCount(\n\t\t\t\tthis.pendingDeleteSubDirectoriesTracker,\n\t\t\t\top.subdirName,\n\t\t\t);\n\t\t\tthis.submitDeleteSubDirectoryMessage(op, localOpMetadata.subDirectory);\n\t\t}\n\t}\n\n\t/**\n\t * Get the storage of this subdirectory in a serializable format, to be used in snapshotting.\n\t * @param serializer - The serializer to use to serialize handles in its values.\n\t * @returns The JSONable string representing the storage of this subdirectory\n\t * @internal\n\t */\n\tpublic *getSerializedStorage(\n\t\tserializer: IFluidSerializer,\n\t): Generator<[string, ISerializedValue], void> {\n\t\tthis.throwIfDisposed();\n\t\tfor (const [key, localValue] of this._storage) {\n\t\t\tconst value = localValue.makeSerialized(serializer, this.directory.handle);\n\t\t\tconst res: [string, ISerializedValue] = [key, value];\n\t\t\tyield res;\n\t\t}\n\t}\n\n\tpublic getSerializableCreateInfo() {\n\t\tthis.throwIfDisposed();\n\t\tconst createInfo: ICreateInfo = {\n\t\t\tcsn: this.seqData.seq,\n\t\t\tccIds: Array.from(this.clientIds),\n\t\t};\n\t\treturn createInfo;\n\t}\n\n\t/**\n\t * Populate a key value in this subdirectory's storage, to be used when loading from snapshot.\n\t * @param key - The key to populate\n\t * @param localValue - The local value to populate into it\n\t * @internal\n\t */\n\tpublic populateStorage(key: string, localValue: ILocalValue): void {\n\t\tthis.throwIfDisposed();\n\t\tthis._storage.set(key, localValue);\n\t}\n\n\t/**\n\t * Populate a subdirectory into this subdirectory, to be used when loading from snapshot.\n\t * @param subdirName - The name of the subdirectory to add\n\t * @param newSubDir - The new subdirectory to add\n\t * @internal\n\t */\n\tpublic populateSubDirectory(subdirName: string, newSubDir: SubDirectory): void {\n\t\tthis.throwIfDisposed();\n\t\tthis._subdirectories.set(subdirName, newSubDir);\n\t}\n\n\t/**\n\t * Retrieve the local value at the given key. This is used to get value type information stashed on the local\n\t * value so op handlers can be retrieved\n\t * @param key - The key to retrieve from\n\t * @returns The local value\n\t * @internal\n\t */\n\tpublic getLocalValue<T extends ILocalValue = ILocalValue>(key: string): T {\n\t\tthis.throwIfDisposed();\n\t\treturn this._storage.get(key) as T;\n\t}\n\n\t/**\n\t * Remove the pendingMessageId from the map tracking it on rollback\n\t * @param map - map tracking the pending messages\n\t * @param key - key of the edit in the op\n\t */\n\tprivate rollbackPendingMessageId(\n\t\tmap: Map<string, number[]>,\n\t\tkey: string,\n\t\tpendingMessageId,\n\t): void {\n\t\tconst pendingMessageIds = map.get(key);\n\t\tconst lastPendingMessageId = pendingMessageIds?.pop();\n\t\tif (!pendingMessageIds || lastPendingMessageId !== pendingMessageId) {\n\t\t\tthrow new Error(\"Rollback op does not match last pending\");\n\t\t}\n\t\tif (pendingMessageIds.length === 0) {\n\t\t\tmap.delete(key);\n\t\t}\n\t}\n\n\t/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n\t/**\n\t * Rollback a local op\n\t * @param op - The operation to rollback\n\t * @param localOpMetadata - The local metadata associated with the op.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tpublic rollback(op: any, localOpMetadata: unknown): void {\n\t\tif (!isDirectoryLocalOpMetadata(localOpMetadata)) {\n\t\t\tthrow new Error(\"Invalid localOpMetadata\");\n\t\t}\n\n\t\tif (op.type === \"clear\" && localOpMetadata.type === \"clear\") {\n\t\t\tfor (const [key, localValue] of localOpMetadata.previousStorage.entries()) {\n\t\t\t\tthis.setCore(key, localValue, true);\n\t\t\t}\n\n\t\t\tconst lastPendingClearId = this.pendingClearMessageIds.pop();\n\t\t\tif (\n\t\t\t\tlastPendingClearId === undefined ||\n\t\t\t\tlastPendingClearId !== localOpMetadata.pendingMessageId\n\t\t\t) {\n\t\t\t\tthrow new Error(\"Rollback op does match last clear\");\n\t\t\t}\n\t\t} else if ((op.type === \"delete\" || op.type === \"set\") && localOpMetadata.type === \"edit\") {\n\t\t\tif (localOpMetadata.previousValue === undefined) {\n\t\t\t\tthis.deleteCore(op.key as string, true);\n\t\t\t} else {\n\t\t\t\tthis.setCore(op.key as string, localOpMetadata.previousValue, true);\n\t\t\t}\n\n\t\t\tthis.rollbackPendingMessageId(\n\t\t\t\tthis.pendingKeys,\n\t\t\t\top.key as string,\n\t\t\t\tlocalOpMetadata.pendingMessageId,\n\t\t\t);\n\t\t} else if (op.type === \"createSubDirectory\" && localOpMetadata.type === \"createSubDir\") {\n\t\t\tthis.deleteSubDirectoryCore(op.subdirName as string, true);\n\n\t\t\tthis.decrementPendingSubDirCount(\n\t\t\t\tthis.pendingCreateSubDirectoriesTracker,\n\t\t\t\top.subdirName as string,\n\t\t\t);\n\t\t} else if (op.type === \"deleteSubDirectory\" && localOpMetadata.type === \"deleteSubDir\") {\n\t\t\tif (localOpMetadata.subDirectory !== undefined) {\n\t\t\t\tthis.undeleteSubDirectoryTree(localOpMetadata.subDirectory);\n\t\t\t\t// don't need to register events because deleting never unregistered\n\t\t\t\tthis._subdirectories.set(op.subdirName as string, localOpMetadata.subDirectory);\n\t\t\t\t// Restore the record in creation tracker\n\t\t\t\tif (isAcknowledgedOrDetached(localOpMetadata.subDirectory.seqData)) {\n\t\t\t\t\tthis.ackedCreationSeqTracker.set(op.subdirName, {\n\t\t\t\t\t\t...localOpMetadata.subDirectory.seqData,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.localCreationSeqTracker.set(op.subdirName, {\n\t\t\t\t\t\t...localOpMetadata.subDirectory.seqData,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis.emit(\"subDirectoryCreated\", op.subdirName, true, this);\n\t\t\t}\n\n\t\t\tthis.decrementPendingSubDirCount(\n\t\t\t\tthis.pendingDeleteSubDirectoriesTracker,\n\t\t\t\top.subDirName as string,\n\t\t\t);\n\t\t} else {\n\t\t\tthrow new Error(\"Unsupported op for rollback\");\n\t\t}\n\t}\n\n\t/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n\t/**\n\t * Converts the given relative path into an absolute path.\n\t * @param path - Relative path to convert\n\t * @returns The equivalent absolute path\n\t */\n\tprivate makeAbsolute(relativePath: string): string {\n\t\treturn posix.resolve(this.absolutePath, relativePath);\n\t}\n\n\t/**\n\t * If our local operations that have not yet been ack'd will eventually overwrite an incoming operation, we should\n\t * not process the incoming operation.\n\t * @param op - Operation to check\n\t * @param local - Whether the operation originated from the local client\n\t * @param localOpMetadata - For local client ops, this is the metadata that was submitted with the op.\n\t * For ops from a remote client, this will be undefined.\n\t * @returns True if the operation should be processed, false otherwise\n\t */\n\tprivate needProcessStorageOperation(\n\t\top: IDirectoryKeyOperation,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): boolean {\n\t\tif (this.pendingClearMessageIds.length > 0) {\n\t\t\tif (local) {\n\t\t\t\tassert(\n\t\t\t\t\tlocalOpMetadata !== undefined &&\n\t\t\t\t\t\tisKeyEditLocalOpMetadata(localOpMetadata) &&\n\t\t\t\t\t\tlocalOpMetadata.pendingMessageId < this.pendingClearMessageIds[0],\n\t\t\t\t\t0x010 /* \"Received out of order storage op when there is an unackd clear message\" */,\n\t\t\t\t);\n\t\t\t\t// Remove all pendingMessageIds lower than first pendingClearMessageId.\n\t\t\t\tconst lowestPendingClearMessageId = this.pendingClearMessageIds[0];\n\t\t\t\tconst pendingKeyMessageIdArray = this.pendingKeys.get(op.key);\n\t\t\t\tif (pendingKeyMessageIdArray !== undefined) {\n\t\t\t\t\tlet index = 0;\n\t\t\t\t\twhile (pendingKeyMessageIdArray[index] < lowestPendingClearMessageId) {\n\t\t\t\t\t\tindex += 1;\n\t\t\t\t\t}\n\t\t\t\t\tconst newPendingKeyMessageId = pendingKeyMessageIdArray.splice(index);\n\t\t\t\t\tif (newPendingKeyMessageId.length === 0) {\n\t\t\t\t\t\tthis.pendingKeys.delete(op.key);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.pendingKeys.set(op.key, newPendingKeyMessageId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If I have a NACK clear, we can ignore all ops.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst pendingKeyMessageIds = this.pendingKeys.get(op.key);\n\t\tif (pendingKeyMessageIds !== undefined) {\n\t\t\t// Found an NACK op, clear it from the directory if the latest sequence number in the directory\n\t\t\t// match the message's and don't process the op.\n\t\t\tif (local) {\n\t\t\t\tassert(\n\t\t\t\t\tlocalOpMetadata !== undefined && isKeyEditLocalOpMetadata(localOpMetadata),\n\t\t\t\t\t0x011 /* pendingMessageId is missing from the local client's operation */,\n\t\t\t\t);\n\t\t\t\tassert(\n\t\t\t\t\tpendingKeyMessageIds[0] === localOpMetadata.pendingMessageId,\n\t\t\t\t\t0x331 /* Unexpected pending message received */,\n\t\t\t\t);\n\t\t\t\tpendingKeyMessageIds.shift();\n\t\t\t\tif (pendingKeyMessageIds.length === 0) {\n\t\t\t\t\tthis.pendingKeys.delete(op.key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we don't have a NACK op on the key, we need to process the remote ops.\n\t\treturn !local;\n\t}\n\n\t/**\n\t * This return true if the message is for the current instance of this sub directory. As the sub directory\n\t * can be deleted and created again, then this finds if the message is for current instance of directory or not.\n\t * @param msg - message for the directory\n\t */\n\tprivate isMessageForCurrentInstanceOfSubDirectory(msg: ISequencedDocumentMessage) {\n\t\t// If the message is either from the creator of directory or this directory was created when\n\t\t// container was detached or in case this directory is already live(known to other clients)\n\t\t// and the op was created after the directory was created then apply this op.\n\t\treturn (\n\t\t\t(msg.clientId !== null && this.clientIds.has(msg.clientId)) ||\n\t\t\tthis.clientIds.has(\"detached\") ||\n\t\t\t(this.seqData.seq !== -1 && this.seqData.seq <= msg.referenceSequenceNumber)\n\t\t);\n\t}\n\n\t/**\n\t * If our local operations that have not yet been ack'd will eventually overwrite an incoming operation, we should\n\t * not process the incoming operation.\n\t * @param op - Operation to check\n\t * @param local - Whether the message originated from the local client\n\t * @param message - The message\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t * @returns True if the operation should be processed, false otherwise\n\t */\n\tprivate needProcessSubDirectoryOperation(\n\t\tmsg: ISequencedDocumentMessage,\n\t\top: IDirectorySubDirectoryOperation,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): boolean {\n\t\tassertNonNullClientId(msg.clientId);\n\t\tconst pendingDeleteCount = this.pendingDeleteSubDirectoriesTracker.get(op.subdirName);\n\t\tconst pendingCreateCount = this.pendingCreateSubDirectoriesTracker.get(op.subdirName);\n\t\tif (\n\t\t\t(pendingDeleteCount !== undefined && pendingDeleteCount > 0) ||\n\t\t\t(pendingCreateCount !== undefined && pendingCreateCount > 0)\n\t\t) {\n\t\t\tif (local) {\n\t\t\t\tassert(\n\t\t\t\t\tisSubDirLocalOpMetadata(localOpMetadata),\n\t\t\t\t\t0x012 /* pendingMessageId is missing from the local client's operation */,\n\t\t\t\t);\n\t\t\t\tif (localOpMetadata.type === \"deleteSubDir\") {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tpendingDeleteCount !== undefined && pendingDeleteCount > 0,\n\t\t\t\t\t\t0x6c2 /* pendingDeleteCount should exist */,\n\t\t\t\t\t);\n\t\t\t\t\tthis.decrementPendingSubDirCount(\n\t\t\t\t\t\tthis.pendingDeleteSubDirectoriesTracker,\n\t\t\t\t\t\top.subdirName,\n\t\t\t\t\t);\n\t\t\t\t} else if (localOpMetadata.type === \"createSubDir\") {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tpendingCreateCount !== undefined && pendingCreateCount > 0,\n\t\t\t\t\t\t0x6c3 /* pendingCreateCount should exist */,\n\t\t\t\t\t);\n\t\t\t\t\tthis.decrementPendingSubDirCount(\n\t\t\t\t\t\tthis.pendingCreateSubDirectoriesTracker,\n\t\t\t\t\t\top.subdirName,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (op.type === \"deleteSubDirectory\") {\n\t\t\t\tconst resetSubDirectoryTree = (directory: SubDirectory | undefined): void => {\n\t\t\t\t\tif (!directory) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// If this is delete op and we have keys in this subDirectory, then we need to delete these\n\t\t\t\t\t// keys except the pending ones as they will be sequenced after this delete.\n\t\t\t\t\tdirectory.clearExceptPendingKeys(local);\n\t\t\t\t\t// In case of delete op, we need to reset the creation seqNum, clientSeqNum and client ids of\n\t\t\t\t\t// creators as the previous directory is getting deleted and we will initialize again when\n\t\t\t\t\t// we will receive op for the create again.\n\t\t\t\t\tdirectory.seqData.seq = -1;\n\t\t\t\t\tdirectory.seqData.clientSeq = -1;\n\t\t\t\t\tdirectory.clientIds.clear();\n\t\t\t\t\t// Do the same thing for the subtree of the directory. If create is not pending for a child, then just\n\t\t\t\t\t// delete it.\n\t\t\t\t\tconst subDirectories = directory.subdirectories();\n\t\t\t\t\tfor (const [subDirName, subDir] of subDirectories) {\n\t\t\t\t\t\tif (directory.pendingCreateSubDirectoriesTracker.has(subDirName)) {\n\t\t\t\t\t\t\tresetSubDirectoryTree(subDir as SubDirectory);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdirectory.deleteSubDirectoryCore(subDirName, false);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst subDirectory = this._subdirectories.get(op.subdirName);\n\t\t\t\t// Clear the creation tracker record\n\t\t\t\tthis.ackedCreationSeqTracker.delete(op.subdirName);\n\t\t\t\tresetSubDirectoryTree(subDirectory);\n\t\t\t}\n\t\t\tif (op.type === \"createSubDirectory\") {\n\t\t\t\tconst dir = this._subdirectories.get(op.subdirName);\n\t\t\t\t// Child sub directory create seq number can't be lower than the parent subdirectory.\n\t\t\t\t// The sequence number for multiple ops can be the same when multiple createSubDirectory occurs with grouped batching enabled, thus <= and not just <.\n\t\t\t\tif (this.seqData.seq !== -1 && this.seqData.seq <= msg.sequenceNumber) {\n\t\t\t\t\tif (dir?.seqData.seq === -1) {\n\t\t\t\t\t\t// Only set the sequence data based on the first message\n\t\t\t\t\t\tdir.seqData.seq = msg.sequenceNumber;\n\t\t\t\t\t\tdir.seqData.clientSeq = msg.clientSequenceNumber;\n\n\t\t\t\t\t\t// set the creation seq in tracker\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!this.ackedCreationSeqTracker.has(op.subdirName) &&\n\t\t\t\t\t\t\t!this.pendingDeleteSubDirectoriesTracker.has(op.subdirName)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthis.ackedCreationSeqTracker.set(op.subdirName, {\n\t\t\t\t\t\t\t\tseq: msg.sequenceNumber,\n\t\t\t\t\t\t\t\tclientSeq: msg.clientSequenceNumber,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (local) {\n\t\t\t\t\t\t\t\tthis.localCreationSeqTracker.delete(op.subdirName);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// The client created the dir at or after the dirs seq, so list its client id as a creator.\n\t\t\t\t\tif (\n\t\t\t\t\t\tdir !== undefined &&\n\t\t\t\t\t\t!dir.clientIds.has(msg.clientId) &&\n\t\t\t\t\t\tdir.seqData.seq <= msg.sequenceNumber\n\t\t\t\t\t) {\n\t\t\t\t\t\tdir.clientIds.add(msg.clientId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !local;\n\t}\n\n\t/**\n\t * Clear all keys in memory in response to a remote clear, but retain keys we have modified but not yet been ack'd.\n\t */\n\tprivate clearExceptPendingKeys(local: boolean): void {\n\t\t// Assuming the pendingKeys is small and the map is large\n\t\t// we will get the value for the pendingKeys and clear the map\n\t\tconst temp = new Map<string, ILocalValue>();\n\n\t\tfor (const [key] of this.pendingKeys) {\n\t\t\tconst value = this._storage.get(key);\n\t\t\t// If this key is already deleted, then we don't need to add it again.\n\t\t\tif (value !== undefined) {\n\t\t\t\ttemp.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\tthis.clearCore(local);\n\n\t\tfor (const [key, value] of temp.entries()) {\n\t\t\tthis.setCore(key, value, true);\n\t\t}\n\t}\n\n\t/**\n\t * Clear implementation used for both locally sourced clears as well as incoming remote clears.\n\t * @param local - Whether the message originated from the local client\n\t */\n\tprivate clearCore(local: boolean): void {\n\t\tthis._storage.clear();\n\t\tthis.directory.emit(\"clear\", local, this.directory);\n\t}\n\n\t/**\n\t * Delete implementation used for both locally sourced deletes as well as incoming remote deletes.\n\t * @param key - The key being deleted\n\t * @param local - Whether the message originated from the local client\n\t * @returns Previous local value of the key if it existed, undefined if it did not exist\n\t */\n\tprivate deleteCore(key: string, local: boolean): ILocalValue | undefined {\n\t\tconst previousLocalValue = this._storage.get(key);\n\t\tconst previousValue: unknown = previousLocalValue?.value;\n\t\tconst successfullyRemoved = this._storage.delete(key);\n\t\tif (successfullyRemoved) {\n\t\t\tconst event: IDirectoryValueChanged = { key, path: this.absolutePath, previousValue };\n\t\t\tthis.directory.emit(\"valueChanged\", event, local, this.directory);\n\t\t\tconst containedEvent: IValueChanged = { key, previousValue };\n\t\t\tthis.emit(\"containedValueChanged\", containedEvent, local, this);\n\t\t}\n\t\treturn previousLocalValue;\n\t}\n\n\t/**\n\t * Set implementation used for both locally sourced sets as well as incoming remote sets.\n\t * @param key - The key being set\n\t * @param value - The value being set\n\t * @param local - Whether the message originated from the local client\n\t * @returns Previous local value of the key, if any\n\t */\n\tprivate setCore(key: string, value: ILocalValue, local: boolean): ILocalValue | undefined {\n\t\tconst previousLocalValue = this._storage.get(key);\n\t\tconst previousValue: unknown = previousLocalValue?.value;\n\t\tthis._storage.set(key, value);\n\t\tconst event: IDirectoryValueChanged = { key, path: this.absolutePath, previousValue };\n\t\tthis.directory.emit(\"valueChanged\", event, local, this.directory);\n\t\tconst containedEvent: IValueChanged = { key, previousValue };\n\t\tthis.emit(\"containedValueChanged\", containedEvent, local, this);\n\t\treturn previousLocalValue;\n\t}\n\n\t/**\n\t * Create subdirectory implementation used for both locally sourced creation as well as incoming remote creation.\n\t * @param subdirName - The name of the subdirectory being created\n\t * @param local - Whether the message originated from the local client\n\t * @param seqData - Sequence number and client sequence number at which this directory is created\n\t * @param clientId - Id of client which created this directory.\n\t * @returns True if is newly created, false if it already existed.\n\t */\n\tprivate createSubDirectoryCore(\n\t\tsubdirName: string,\n\t\tlocal: boolean,\n\t\tseqData: SequenceData,\n\t\tclientId: string,\n\t): boolean {\n\t\tconst subdir = this._subdirectories.get(subdirName);\n\t\tif (subdir === undefined) {\n\t\t\tconst absolutePath = posix.join(this.absolutePath, subdirName);\n\t\t\tconst subDir = new SubDirectory(\n\t\t\t\t{ ...seqData },\n\t\t\t\tnew Set([clientId]),\n\t\t\t\tthis.directory,\n\t\t\t\tthis.runtime,\n\t\t\t\tthis.serializer,\n\t\t\t\tabsolutePath,\n\t\t\t);\n\t\t\t/**\n\t\t\t * Store the sequnce numbers of newly created subdirectory to the proper creation tracker, based\n\t\t\t * on whether the creation behavior has been ack'd or not\n\t\t\t */\n\t\t\tif (!isAcknowledgedOrDetached(seqData)) {\n\t\t\t\tthis.localCreationSeqTracker.set(subdirName, { ...seqData });\n\t\t\t} else {\n\t\t\t\tthis.ackedCreationSeqTracker.set(subdirName, { ...seqData });\n\t\t\t}\n\n\t\t\tthis.registerEventsOnSubDirectory(subDir, subdirName);\n\t\t\tthis._subdirectories.set(subdirName, subDir);\n\t\t\tthis.emit(\"subDirectoryCreated\", subdirName, local, this);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tsubdir.clientIds.add(clientId);\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate registerEventsOnSubDirectory(subDirectory: SubDirectory, subDirName: string): void {\n\t\tsubDirectory.on(\"subDirectoryCreated\", (relativePath: string, local: boolean) => {\n\t\t\tthis.emit(\"subDirectoryCreated\", posix.join(subDirName, relativePath), local, this);\n\t\t});\n\t\tsubDirectory.on(\"subDirectoryDeleted\", (relativePath: string, local: boolean) => {\n\t\t\tthis.emit(\"subDirectoryDeleted\", posix.join(subDirName, relativePath), local, this);\n\t\t});\n\t}\n\n\t/**\n\t * Delete subdirectory implementation used for both locally sourced creation as well as incoming remote creation.\n\t * @param subdirName - The name of the subdirectory being deleted\n\t * @param local - Whether the message originated from the local client\n\t */\n\tprivate deleteSubDirectoryCore(subdirName: string, local: boolean): SubDirectory | undefined {\n\t\tconst previousValue = this._subdirectories.get(subdirName);\n\t\t// This should make the subdirectory structure unreachable so it can be GC'd and won't appear in snapshots\n\t\t// Might want to consider cleaning out the structure more exhaustively though? But not when rollback.\n\t\tif (previousValue !== undefined) {\n\t\t\tthis._subdirectories.delete(subdirName);\n\t\t\t/**\n\t\t\t * Remove the corresponding record from the proper creation tracker, based on whether the subdirectory has been\n\t\t\t * ack'd already or still not committed yet (could be both).\n\t\t\t */\n\t\t\tif (this.ackedCreationSeqTracker.has(subdirName)) {\n\t\t\t\tthis.ackedCreationSeqTracker.delete(subdirName);\n\t\t\t}\n\t\t\tif (this.localCreationSeqTracker.has(subdirName)) {\n\t\t\t\tthis.localCreationSeqTracker.delete(subdirName);\n\t\t\t}\n\t\t\tthis.disposeSubDirectoryTree(previousValue);\n\t\t\tthis.emit(\"subDirectoryDeleted\", subdirName, local, this);\n\t\t}\n\t\treturn previousValue;\n\t}\n\n\tprivate disposeSubDirectoryTree(directory: IDirectory | undefined): void {\n\t\tif (!directory) {\n\t\t\treturn;\n\t\t}\n\t\t// Dispose the subdirectory tree. This will dispose the subdirectories from bottom to top.\n\t\tconst subDirectories = directory.subdirectories();\n\t\tfor (const [_, subDirectory] of subDirectories) {\n\t\t\tthis.disposeSubDirectoryTree(subDirectory);\n\t\t}\n\t\tif (typeof directory.dispose === \"function\") {\n\t\t\tdirectory.dispose();\n\t\t}\n\t}\n\n\tprivate undeleteSubDirectoryTree(directory: SubDirectory): void {\n\t\t// Restore deleted subdirectory tree. Need to undispose the current directory first, then get access to the iterator.\n\t\t// This will unmark \"deleted\" from the subdirectories from top to bottom.\n\t\tdirectory.undispose();\n\t\tfor (const [_, subDirectory] of directory.subdirectories()) {\n\t\t\tthis.undeleteSubDirectoryTree(subDirectory as SubDirectory);\n\t\t}\n\t}\n}\n"]}
@@ -16,12 +16,12 @@ exports.SharedMap = exports.MapFactory = exports.LocalValueMaker = exports.Share
16
16
  *
17
17
  * @packageDocumentation
18
18
  */
19
- var directory_1 = require("./directory.cjs");
19
+ var directory_1 = require("./directory");
20
20
  Object.defineProperty(exports, "DirectoryFactory", { enumerable: true, get: function () { return directory_1.DirectoryFactory; } });
21
21
  Object.defineProperty(exports, "SharedDirectory", { enumerable: true, get: function () { return directory_1.SharedDirectory; } });
22
- var localValues_1 = require("./localValues.cjs");
22
+ var localValues_1 = require("./localValues");
23
23
  Object.defineProperty(exports, "LocalValueMaker", { enumerable: true, get: function () { return localValues_1.LocalValueMaker; } });
24
- var map_1 = require("./map.cjs");
24
+ var map_1 = require("./map");
25
25
  Object.defineProperty(exports, "MapFactory", { enumerable: true, get: function () { return map_1.MapFactory; } });
26
26
  Object.defineProperty(exports, "SharedMap", { enumerable: true, get: function () { return map_1.SharedMap; } });
27
- //# sourceMappingURL=index.cjs.map
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;GAUG;AAEH,yCAeqB;AAdpB,6GAAA,gBAAgB,OAAA;AAahB,4GAAA,eAAe,OAAA;AAchB,6CAA6D;AAApD,8GAAA,eAAe,OAAA;AACxB,6BAA8C;AAArC,iGAAA,UAAU,OAAA;AAAE,gGAAA,SAAS,OAAA","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\";\nexport {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISerializableValue,\n\tISerializedValue,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"./interfaces\";\nexport { LocalValueMaker, ILocalValue } from \"./localValues\";\nexport { MapFactory, SharedMap } from \"./map\";\n"]}
@@ -6,7 +6,8 @@ import { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-objec
6
6
  import { IDisposable, IEvent, IEventProvider, IEventThisPlaceHolder } from "@fluidframework/core-interfaces";
7
7
  /**
8
8
  * Type of "valueChanged" event parameter.
9
- * @alpha
9
+ * @sealed
10
+ * @public
10
11
  */
11
12
  export interface IValueChanged {
12
13
  /**
@@ -230,7 +231,8 @@ export interface IDirectoryValueChanged extends IValueChanged {
230
231
  }
231
232
  /**
232
233
  * Events emitted in response to changes to the {@link ISharedMap | map} data.
233
- * @alpha
234
+ * @sealed
235
+ * @public
234
236
  */
235
237
  export interface ISharedMapEvents extends ISharedObjectEvents {
236
238
  /**
@@ -264,7 +266,8 @@ export interface ISharedMapEvents extends ISharedObjectEvents {
264
266
  * {@link @fluidframework/datastore#FluidObjectHandle}.
265
267
  *
266
268
  * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.
267
- * @alpha
269
+ * @sealed
270
+ * @public
268
271
  */
269
272
  export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
270
273
  /**
@@ -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;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IAGH,aAAa,EAAE,GAAG,CAAC;CACnB;AAED;;;;;GAKG;AAGH,MAAM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Q,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,KAAK,IAAI,OAAE;CACpF;AAED;;;;;;;;;;GAUG;AAGH,MAAM,WAAW,UAAW,SAAQ,aAAa,CAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IACpF;;;;OAIG;IAGH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAEzC;;;;;OAKG;IACH,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CAC9C;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"}
@@ -4,4 +4,4 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=interfaces.cjs.map
7
+ //# sourceMappingURL=interfaces.js.map