@fluid-experimental/tree 2.74.0 → 2.81.0-374083

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 (116) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/assertTagging.config.mjs +14 -0
  3. package/dist/Checkout.js.map +1 -1
  4. package/dist/Common.d.ts.map +1 -1
  5. package/dist/Common.js.map +1 -1
  6. package/dist/MergeHealth.d.ts.map +1 -1
  7. package/dist/MergeHealth.js.map +1 -1
  8. package/dist/SharedTree.js.map +1 -1
  9. package/dist/SharedTreeEncoder.d.ts.map +1 -1
  10. package/dist/SharedTreeEncoder.js.map +1 -1
  11. package/dist/UndoRedoHandler.d.ts.map +1 -1
  12. package/dist/UndoRedoHandler.js.map +1 -1
  13. package/dist/id-compressor/IdCompressor.js.map +1 -1
  14. package/dist/id-compressor/SessionIdNormalizer.js.map +1 -1
  15. package/dist/migration-shim/migrationDeltaHandler.d.ts +2 -2
  16. package/dist/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
  17. package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
  18. package/dist/migration-shim/migrationShim.d.ts +5 -5
  19. package/dist/migration-shim/migrationShim.d.ts.map +1 -1
  20. package/dist/migration-shim/migrationShim.js +1 -0
  21. package/dist/migration-shim/migrationShim.js.map +1 -1
  22. package/dist/migration-shim/migrationShimFactory.d.ts +3 -3
  23. package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
  24. package/dist/migration-shim/migrationShimFactory.js.map +1 -1
  25. package/dist/migration-shim/sharedTreeDeltaHandler.d.ts +2 -2
  26. package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
  27. package/dist/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
  28. package/dist/migration-shim/sharedTreeShim.d.ts +5 -5
  29. package/dist/migration-shim/sharedTreeShim.d.ts.map +1 -1
  30. package/dist/migration-shim/sharedTreeShim.js.map +1 -1
  31. package/dist/migration-shim/sharedTreeShimFactory.d.ts +1 -1
  32. package/dist/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
  33. package/dist/migration-shim/sharedTreeShimFactory.js.map +1 -1
  34. package/dist/migration-shim/shimChannelServices.d.ts +1 -1
  35. package/dist/migration-shim/shimChannelServices.d.ts.map +1 -1
  36. package/dist/migration-shim/shimChannelServices.js.map +1 -1
  37. package/dist/migration-shim/shimDeltaConnection.d.ts +2 -2
  38. package/dist/migration-shim/shimDeltaConnection.d.ts.map +1 -1
  39. package/dist/migration-shim/shimDeltaConnection.js.map +1 -1
  40. package/dist/migration-shim/shimHandle.d.ts +1 -1
  41. package/dist/migration-shim/shimHandle.d.ts.map +1 -1
  42. package/dist/migration-shim/shimHandle.js.map +1 -1
  43. package/dist/migration-shim/types.d.ts +4 -4
  44. package/dist/migration-shim/types.d.ts.map +1 -1
  45. package/dist/migration-shim/types.js.map +1 -1
  46. package/dist/migration-shim/utils.d.ts +3 -3
  47. package/dist/migration-shim/utils.d.ts.map +1 -1
  48. package/dist/migration-shim/utils.js.map +1 -1
  49. package/eslint.config.mts +5 -4
  50. package/lib/Checkout.js.map +1 -1
  51. package/lib/Common.d.ts.map +1 -1
  52. package/lib/Common.js.map +1 -1
  53. package/lib/MergeHealth.d.ts.map +1 -1
  54. package/lib/MergeHealth.js.map +1 -1
  55. package/lib/SharedTree.js.map +1 -1
  56. package/lib/SharedTreeEncoder.d.ts.map +1 -1
  57. package/lib/SharedTreeEncoder.js.map +1 -1
  58. package/lib/UndoRedoHandler.d.ts.map +1 -1
  59. package/lib/UndoRedoHandler.js.map +1 -1
  60. package/lib/id-compressor/IdCompressor.js.map +1 -1
  61. package/lib/id-compressor/SessionIdNormalizer.js.map +1 -1
  62. package/lib/migration-shim/migrationDeltaHandler.d.ts +2 -2
  63. package/lib/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
  64. package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
  65. package/lib/migration-shim/migrationShim.d.ts +5 -5
  66. package/lib/migration-shim/migrationShim.d.ts.map +1 -1
  67. package/lib/migration-shim/migrationShim.js +1 -0
  68. package/lib/migration-shim/migrationShim.js.map +1 -1
  69. package/lib/migration-shim/migrationShimFactory.d.ts +3 -3
  70. package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
  71. package/lib/migration-shim/migrationShimFactory.js.map +1 -1
  72. package/lib/migration-shim/sharedTreeDeltaHandler.d.ts +2 -2
  73. package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
  74. package/lib/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
  75. package/lib/migration-shim/sharedTreeShim.d.ts +5 -5
  76. package/lib/migration-shim/sharedTreeShim.d.ts.map +1 -1
  77. package/lib/migration-shim/sharedTreeShim.js.map +1 -1
  78. package/lib/migration-shim/sharedTreeShimFactory.d.ts +1 -1
  79. package/lib/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
  80. package/lib/migration-shim/sharedTreeShimFactory.js.map +1 -1
  81. package/lib/migration-shim/shimChannelServices.d.ts +1 -1
  82. package/lib/migration-shim/shimChannelServices.d.ts.map +1 -1
  83. package/lib/migration-shim/shimChannelServices.js.map +1 -1
  84. package/lib/migration-shim/shimDeltaConnection.d.ts +2 -2
  85. package/lib/migration-shim/shimDeltaConnection.d.ts.map +1 -1
  86. package/lib/migration-shim/shimDeltaConnection.js.map +1 -1
  87. package/lib/migration-shim/shimHandle.d.ts +1 -1
  88. package/lib/migration-shim/shimHandle.d.ts.map +1 -1
  89. package/lib/migration-shim/shimHandle.js.map +1 -1
  90. package/lib/migration-shim/types.d.ts +4 -4
  91. package/lib/migration-shim/types.d.ts.map +1 -1
  92. package/lib/migration-shim/types.js.map +1 -1
  93. package/lib/migration-shim/utils.d.ts +3 -3
  94. package/lib/migration-shim/utils.d.ts.map +1 -1
  95. package/lib/migration-shim/utils.js.map +1 -1
  96. package/package.json +32 -32
  97. package/src/Checkout.ts +1 -1
  98. package/src/Common.ts +5 -1
  99. package/src/MergeHealth.ts +5 -5
  100. package/src/SharedTree.ts +2 -2
  101. package/src/SharedTreeEncoder.ts +9 -2
  102. package/src/UndoRedoHandler.ts +5 -5
  103. package/src/id-compressor/IdCompressor.ts +1 -1
  104. package/src/id-compressor/SessionIdNormalizer.ts +1 -1
  105. package/src/migration-shim/migrationDeltaHandler.ts +2 -2
  106. package/src/migration-shim/migrationShim.ts +11 -13
  107. package/src/migration-shim/migrationShimFactory.ts +7 -10
  108. package/src/migration-shim/sharedTreeDeltaHandler.ts +2 -2
  109. package/src/migration-shim/sharedTreeShim.ts +14 -14
  110. package/src/migration-shim/sharedTreeShimFactory.ts +5 -5
  111. package/src/migration-shim/shimChannelServices.ts +4 -4
  112. package/src/migration-shim/shimDeltaConnection.ts +5 -5
  113. package/src/migration-shim/shimHandle.ts +1 -1
  114. package/src/migration-shim/types.ts +8 -8
  115. package/src/migration-shim/utils.ts +3 -3
  116. package/.eslintrc.cjs +0 -45
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTreeShimFactory.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC;IAEnE;;;;;OAKG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;;OAKG;IACH,IAAW,UAAU,IAAI,kBAAkB,CAE1C;IAED;;;;OAIG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,cAAc,CAAC;IAQ1B;;;;;OAKG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc;CAK1E"}
1
+ {"version":3,"file":"sharedTreeShimFactory.d.ts","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC;IAEnE;;;;;OAKG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;;OAKG;IACH,IAAW,UAAU,IAAI,kBAAkB,CAE1C;IAED;;;;OAIG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,cAAc,CAAC;IAQ1B;;;;;OAKG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc;CAK1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTreeShimFactory.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,qBAAqB;IACjC,YAAoC,OAA+B;QAA/B,YAAO,GAAP,OAAO,CAAwB;IAAG,CAAC;IAEvE;;;;;OAKG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,oKAAoK;QACpK,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAClG,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,cAAc,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACrE,cAAc,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,cAAc,CAAC;IACvB,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/internal';\nimport {\n\ttype IChannelAttributes,\n\ttype IChannelFactory,\n\ttype IFluidDataStoreRuntime,\n\ttype IChannelServices,\n} from '@fluidframework/datastore-definitions/internal';\nimport type { ITree } from '@fluidframework/tree';\n\nimport { SharedTreeShim } from './sharedTreeShim.js';\nimport { attributesMatch } from './utils.js';\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedTreeShim}.\n *\n * Creates the migration shim that allows a migration from legacy shared tree to shared tree.\n * Note: There may be a need for 3 different factories for different parts of the migration.\n * That or three different shims. Potentially we can just do 2 as 2 and 3 can be combined.\n * 1. pre-migration\n * 2. after a summary has been generated but there may still be potential v1 ops\n * 3. post-migration after a summary has been generated and the msn has moved far enough forward for only v2 ops\n *\n * @sealed\n * @internal\n */\nexport class SharedTreeShimFactory implements IChannelFactory {\n\tpublic constructor(private readonly factory: IChannelFactory<ITree>) {}\n\n\t/**\n\t * Can only load the new SharedTree - this allows our snapshots to be simple. We do not have to consider any new\n\t * unique snapshot formats and how to load from them.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn this.factory.type;\n\t}\n\n\t/**\n\t * Should be the new SharedTree attributes - this should indicate what type of tree snapshot we are expecting or\n\t * are capable of loading from.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn this.factory.attributes;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.load}\n\t *\n\t * Should be loading the SharedTreeShim from a new SharedTree snapshot only.\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<SharedTreeShim> {\n\t\t// TODO: remove attributes check and move it to an automated test that constructing a SharedTreeShimFactory and checking its attributes/type matches the oldFactory.\n\t\tassert(attributesMatch(attributes, this.factory.attributes), 0x7ef /* Attributes do not match */);\n\t\tconst sharedTreeShim = new SharedTreeShim(id, runtime, this.factory);\n\t\tawait sharedTreeShim.load(services);\n\t\treturn sharedTreeShim;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.create}\n\t *\n\t * Should be only creating the SharedTreeShim, which will only generate a new SharedTree snapshot. That way we do\n\t * not have the capability of accidentally creating a LegacySharedTree snapshot.\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): SharedTreeShim {\n\t\tconst sharedTreeShim = new SharedTreeShim(id, runtime, this.factory);\n\t\tsharedTreeShim.create();\n\t\treturn sharedTreeShim;\n\t}\n}\n"]}
1
+ {"version":3,"file":"sharedTreeShimFactory.js","sourceRoot":"","sources":["../../src/migration-shim/sharedTreeShimFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,qBAAqB;IACjC,YAAoC,OAA+B;QAA/B,YAAO,GAAP,OAAO,CAAwB;IAAG,CAAC;IAEvE;;;;;OAKG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,oKAAoK;QACpK,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAClG,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,cAAc,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACrE,cAAc,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,cAAc,CAAC;IACvB,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/internal';\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from '@fluidframework/datastore-definitions/internal';\nimport type { ITree } from '@fluidframework/tree';\n\nimport { SharedTreeShim } from './sharedTreeShim.js';\nimport { attributesMatch } from './utils.js';\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedTreeShim}.\n *\n * Creates the migration shim that allows a migration from legacy shared tree to shared tree.\n * Note: There may be a need for 3 different factories for different parts of the migration.\n * That or three different shims. Potentially we can just do 2 as 2 and 3 can be combined.\n * 1. pre-migration\n * 2. after a summary has been generated but there may still be potential v1 ops\n * 3. post-migration after a summary has been generated and the msn has moved far enough forward for only v2 ops\n *\n * @sealed\n * @internal\n */\nexport class SharedTreeShimFactory implements IChannelFactory {\n\tpublic constructor(private readonly factory: IChannelFactory<ITree>) {}\n\n\t/**\n\t * Can only load the new SharedTree - this allows our snapshots to be simple. We do not have to consider any new\n\t * unique snapshot formats and how to load from them.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn this.factory.type;\n\t}\n\n\t/**\n\t * Should be the new SharedTree attributes - this should indicate what type of tree snapshot we are expecting or\n\t * are capable of loading from.\n\t *\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn this.factory.attributes;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.load}\n\t *\n\t * Should be loading the SharedTreeShim from a new SharedTree snapshot only.\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<SharedTreeShim> {\n\t\t// TODO: remove attributes check and move it to an automated test that constructing a SharedTreeShimFactory and checking its attributes/type matches the oldFactory.\n\t\tassert(attributesMatch(attributes, this.factory.attributes), 0x7ef /* Attributes do not match */);\n\t\tconst sharedTreeShim = new SharedTreeShim(id, runtime, this.factory);\n\t\tawait sharedTreeShim.load(services);\n\t\treturn sharedTreeShim;\n\t}\n\n\t/**\n\t * {@link @fluidframework/datastore-definitions#IChannelFactory.create}\n\t *\n\t * Should be only creating the SharedTreeShim, which will only generate a new SharedTree snapshot. That way we do\n\t * not have the capability of accidentally creating a LegacySharedTree snapshot.\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): SharedTreeShim {\n\t\tconst sharedTreeShim = new SharedTreeShim(id, runtime, this.factory);\n\t\tsharedTreeShim.create();\n\t\treturn sharedTreeShim;\n\t}\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type IChannelServices, type IChannelStorageService, type IDeltaConnection } from '@fluidframework/datastore-definitions/internal';
5
+ import type { IChannelServices, IChannelStorageService, IDeltaConnection } from '@fluidframework/datastore-definitions/internal';
6
6
  /**
7
7
  * ShimChannelServices wraps an existing IChannelServices object and provides a new ShimDeltaConnection
8
8
  * object in place of the original deltaConnection object.
@@ -1 +1 @@
1
- {"version":3,"file":"shimChannelServices.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimChannelServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,MAAM,gDAAgD,CAAC;AAExD;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC7D,QAAQ,CAAC,aAAa,EAAE,sBAAsB,CAAC;IAC/C,QAAQ,CAAC,eAAe,EAAE,gBAAgB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,uBAAwB,YAAW,gBAAgB;gBAC5C,eAAe,EAAE,gBAAgB;IAIpD,IAAW,eAAe,IAAI,gBAAgB,CAE7C;IACD,SAAgB,aAAa,EAAE,sBAAsB,CAAC;CACtD"}
1
+ {"version":3,"file":"shimChannelServices.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimChannelServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAExD;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC7D,QAAQ,CAAC,aAAa,EAAE,sBAAsB,CAAC;IAC/C,QAAQ,CAAC,eAAe,EAAE,gBAAgB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,uBAAwB,YAAW,gBAAgB;gBAC5C,eAAe,EAAE,gBAAgB;IAIpD,IAAW,eAAe,IAAI,gBAAgB,CAE7C;IACD,SAAgB,aAAa,EAAE,sBAAsB,CAAC;CACtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"shimChannelServices.js","sourceRoot":"","sources":["../../src/migration-shim/shimChannelServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,uBAAuB;IACnC,YAAmB,eAAiC;QACnD,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,CAAC;IACpD,CAAC;IAED,IAAW,eAAe;QACzB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACjD,CAAC;CAED","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype IChannelServices,\n\ttype IChannelStorageService,\n\ttype IDeltaConnection,\n} from '@fluidframework/datastore-definitions/internal';\n\n/**\n * ShimChannelServices wraps an existing IChannelServices object and provides a new ShimDeltaConnection\n * object in place of the original deltaConnection object.\n *\n * ShimChannelServices allows us to encapsulate all the wrapping logic without having to modify the original services.\n *\n * At some point, in the SharedObject code we call this.services.deltaConnection.attach(this.handler). Therefore before\n * we call attach, we need to swap out the deltaConnection object for the ShimDeltaConnection object. This makes\n * it consistent as we will always be passing this shim\n */\nexport interface IShimChannelServices extends IChannelServices {\n\treadonly objectStorage: IChannelStorageService;\n\treadonly deltaConnection: IDeltaConnection;\n}\n\n/**\n * NoDeltasChannelServices wraps an existing IChannelServices object. During rehydration of a container, loading in a\n * detached state, we only want to connect to the deltaConnection once on attached. We also only want to set the\n * channel services once. This enables us to allow deltaHandler attach only once, even though there are flows that\n * call only load, only connect, and load and then connect.\n *\n * Steps:\n * 1. Rehydrate/load SharedObject in detached container runtime state\n * 2. Attach detached container runtime\n * 3. Connect SharedObject.\n *\n * Refer to SharedObject.load for the scenario.\n *\n * This potentially can be baked into the ShimChannelServices.\n *\n * TODO: convert this to a test and remove usage of this class\n */\nexport class NoDeltasChannelServices implements IChannelServices {\n\tpublic constructor(channelServices: IChannelServices) {\n\t\tthis.objectStorage = channelServices.objectStorage;\n\t}\n\n\tpublic get deltaConnection(): IDeltaConnection {\n\t\tthrow new Error('No deltaConnection available');\n\t}\n\tpublic readonly objectStorage: IChannelStorageService;\n}\n"]}
1
+ {"version":3,"file":"shimChannelServices.js","sourceRoot":"","sources":["../../src/migration-shim/shimChannelServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,uBAAuB;IACnC,YAAmB,eAAiC;QACnD,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,CAAC;IACpD,CAAC;IAED,IAAW,eAAe;QACzB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACjD,CAAC;CAED","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelServices,\n\tIChannelStorageService,\n\tIDeltaConnection,\n} from '@fluidframework/datastore-definitions/internal';\n\n/**\n * ShimChannelServices wraps an existing IChannelServices object and provides a new ShimDeltaConnection\n * object in place of the original deltaConnection object.\n *\n * ShimChannelServices allows us to encapsulate all the wrapping logic without having to modify the original services.\n *\n * At some point, in the SharedObject code we call this.services.deltaConnection.attach(this.handler). Therefore before\n * we call attach, we need to swap out the deltaConnection object for the ShimDeltaConnection object. This makes\n * it consistent as we will always be passing this shim\n */\nexport interface IShimChannelServices extends IChannelServices {\n\treadonly objectStorage: IChannelStorageService;\n\treadonly deltaConnection: IDeltaConnection;\n}\n\n/**\n * NoDeltasChannelServices wraps an existing IChannelServices object. During rehydration of a container, loading in a\n * detached state, we only want to connect to the deltaConnection once on attached. We also only want to set the\n * channel services once. This enables us to allow deltaHandler attach only once, even though there are flows that\n * call only load, only connect, and load and then connect.\n *\n * Steps:\n * 1. Rehydrate/load SharedObject in detached container runtime state\n * 2. Attach detached container runtime\n * 3. Connect SharedObject.\n *\n * Refer to SharedObject.load for the scenario.\n *\n * This potentially can be baked into the ShimChannelServices.\n *\n * TODO: convert this to a test and remove usage of this class\n */\nexport class NoDeltasChannelServices implements IChannelServices {\n\tpublic constructor(channelServices: IChannelServices) {\n\t\tthis.objectStorage = channelServices.objectStorage;\n\t}\n\n\tpublic get deltaConnection(): IDeltaConnection {\n\t\tthrow new Error('No deltaConnection available');\n\t}\n\tpublic readonly objectStorage: IChannelStorageService;\n}\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type IChannelAttributes, type IDeltaConnection, type IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
6
- import { type IShimDeltaHandler, type IUnstampedContents } from './types.js';
5
+ import type { IChannelAttributes, IDeltaConnection, IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
6
+ import type { IShimDeltaHandler, IUnstampedContents } from './types.js';
7
7
  /**
8
8
  * Represents a connection to a Shim data store that can receive and submit deltas.
9
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"shimDeltaConnection.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE7E;;;;;;;;;GASG;AACH,qBAAa,2BAA4B,YAAW,gBAAgB;IAElE,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBADhB,eAAe,EAAE,gBAAgB,EACjC,gBAAgB,EAAE,iBAAiB;IAGrD,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED,OAAO,CAAC,SAAS,CAAQ;IAClB,aAAa,IAAI,IAAI;IAKrB,MAAM,CAAC,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAS/D,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAUpC,KAAK,IAAI,IAAI;CAGpB;AAED;;GAEG;AACH,qBAAa,oBAAqB,YAAW,gBAAgB;IAE3D,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAFV,eAAe,EAAE,gBAAgB,EACjC,gBAAgB,EAAE,iBAAiB,EACnC,UAAU,EAAE,kBAAkB;IAGhD,IAAW,SAAS,IAAI,OAAO,CAE9B;IAGM,MAAM,CAAC,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAQjF;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IASpC,KAAK,IAAI,IAAI;CAGpB"}
1
+ {"version":3,"file":"shimDeltaConnection.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACX,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,MAAM,gDAAgD,CAAC;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAExE;;;;;;;;;GASG;AACH,qBAAa,2BAA4B,YAAW,gBAAgB;IAElE,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBADhB,eAAe,EAAE,gBAAgB,EACjC,gBAAgB,EAAE,iBAAiB;IAGrD,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED,OAAO,CAAC,SAAS,CAAQ;IAClB,aAAa,IAAI,IAAI;IAKrB,MAAM,CAAC,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAS/D,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAUpC,KAAK,IAAI,IAAI;CAGpB;AAED;;GAEG;AACH,qBAAa,oBAAqB,YAAW,gBAAgB;IAE3D,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAFV,eAAe,EAAE,gBAAgB,EACjC,gBAAgB,EAAE,iBAAiB,EACnC,UAAU,EAAE,kBAAkB;IAGhD,IAAW,SAAS,IAAI,OAAO,CAE9B;IAGM,MAAM,CAAC,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAQjF;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IASpC,KAAK,IAAI,IAAI;CAGpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"shimDeltaConnection.js","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D;;;;;;;;;GASG;AACH,MAAM,OAAO,2BAA2B;IACvC,YACkB,eAAiC,EACjC,gBAAmC;QADnC,oBAAe,GAAf,eAAe,CAAkB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAmB;QAO7C,cAAS,GAAG,IAAI,CAAC;IANtB,CAAC;IAEJ,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;IACvC,CAAC;IAGM,aAAa;QACnB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,gCAAgC;IACzB,MAAM,CAAC,cAAuB,EAAE,eAAwB;QAC9D,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAC9D,CAAC;QACD,gFAAgF;IACjF,CAAC;IAED,mHAAmH;IACnH,uEAAuE;IAChE,MAAM,CAAC,OAAsB;QACnC,wGAAwG;QACxG,6GAA6G;QAC7G,+EAA+E;QAC/E,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnD,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACtC,CAAC;IACF,CAAC;IACM,KAAK;QACX,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD;AAED;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAChC,YACkB,eAAiC,EACjC,gBAAmC,EACnC,UAA8B;QAF9B,oBAAe,GAAf,eAAe,CAAkB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAmB;QACnC,eAAU,GAAV,UAAU,CAAoB;IAC7C,CAAC;IAEJ,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;IACvC,CAAC;IAED,gCAAgC;IACzB,MAAM,CAAC,cAAkC,EAAE,eAAwB;QACzE,MAAM,CAAC,cAAc,CAAC,mBAAmB,KAAK,SAAS,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACxG,cAAc,CAAC,mBAAmB,GAAG;YACpC,GAAG,IAAI,CAAC,UAAU;SAClB,CAAC;QACF,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAsB;QACnC,qDAAqD;QACrD,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnD,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACtC,CAAC;IACF,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,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/internal';\nimport {\n\ttype IChannelAttributes,\n\ttype IDeltaConnection,\n\ttype IDeltaHandler,\n} from '@fluidframework/datastore-definitions/internal';\n\nimport { type IShimDeltaHandler, type IUnstampedContents } from './types.js';\n\n/**\n * Represents a connection to a Shim data store that can receive and submit deltas.\n *\n * This allows the Shim class to swap out the delta handler on the fly.\n *\n * The PreMigrationDeltaConnection does not stamp ops so that those ops can be considered v1 ops.\n *\n * This special logic allows for connect to be called for the underlying new SharedObject without the need for\n * modifications on the current ChannelDeltaConnection.\n */\nexport class PreMigrationDeltaConnection implements IDeltaConnection {\n\tpublic constructor(\n\t\tprivate readonly deltaConnection: IDeltaConnection,\n\t\tprivate readonly shimDeltaHandler: IShimDeltaHandler\n\t) {}\n\n\tpublic get connected(): boolean {\n\t\treturn this.deltaConnection.connected;\n\t}\n\n\tprivate canSubmit = true;\n\tpublic disableSubmit(): void {\n\t\tthis.canSubmit = false;\n\t}\n\n\t// This is for submitting v1 ops\n\tpublic submit(messageContent: unknown, localOpMetadata: unknown): void {\n\t\tif (this.canSubmit) {\n\t\t\tthis.deltaConnection.submit(messageContent, localOpMetadata);\n\t\t}\n\t\t// We don't want to throw so we can revert local changes on the LegacySharedTree\n\t}\n\n\t// We only want to call attach on the underlying delta connection once, as we'll hit an assert if we call it twice.\n\t// Note: SharedObject.load calls attach as well as SharedObject.connect\n\tpublic attach(handler: IDeltaHandler): void {\n\t\t// There are essentially two delta handlers that process ops, the shim delta handler to process shim ops\n\t\t// preventing them from being processed by the tree delta handler, and the tree delta handler to process tree\n\t\t// ops. Post migration v1 ops can be considered \"shim\" ops as they are dropped.\n\t\tthis.shimDeltaHandler.attachTreeDeltaHandler(handler);\n\t\tif (!this.shimDeltaHandler.attached) {\n\t\t\tthis.deltaConnection.attach(this.shimDeltaHandler);\n\t\t\tthis.shimDeltaHandler.markAttached();\n\t\t}\n\t}\n\tpublic dirty(): void {\n\t\tthis.deltaConnection.dirty();\n\t}\n}\n\n/**\n * A delta connection that stamps ops with a particular channel attributes so that those ops won't get dropped\n */\nexport class StampDeltaConnection implements IDeltaConnection {\n\tpublic constructor(\n\t\tprivate readonly deltaConnection: IDeltaConnection,\n\t\tprivate readonly shimDeltaHandler: IShimDeltaHandler,\n\t\tprivate readonly attributes: IChannelAttributes\n\t) {}\n\n\tpublic get connected(): boolean {\n\t\treturn this.deltaConnection.connected;\n\t}\n\n\t// This is for submitting v2 ops\n\tpublic submit(messageContent: IUnstampedContents, localOpMetadata: unknown): void {\n\t\tassert(messageContent.fluidMigrationStamp === undefined, 0x835 /* Should not be stamping ops twice! */);\n\t\tmessageContent.fluidMigrationStamp = {\n\t\t\t...this.attributes,\n\t\t};\n\t\tthis.deltaConnection.submit(messageContent, localOpMetadata);\n\t}\n\n\t/**\n\t * For the MigrationShim because we only attach once to the actual delta connection, we store state in the\n\t * migrationDeltaHandler to know if we've already attached. We will call attach once on the\n\t * PreMigrationDeltaConnection and once on the StampDeltaConnection.\n\t *\n\t * The SharedTreeShim should not be swapping delta connections and thus the if statement should always be executed.\n\t *\n\t * @param handler - this delta handler can only connect once.\n\t */\n\tpublic attach(handler: IDeltaHandler): void {\n\t\t// Maybe put an assert here to only call attach once?\n\t\tthis.shimDeltaHandler.attachTreeDeltaHandler(handler);\n\t\tif (!this.shimDeltaHandler.attached) {\n\t\t\tthis.deltaConnection.attach(this.shimDeltaHandler);\n\t\t\tthis.shimDeltaHandler.markAttached();\n\t\t}\n\t}\n\n\tpublic dirty(): void {\n\t\tthis.deltaConnection.dirty();\n\t}\n}\n"]}
1
+ {"version":3,"file":"shimDeltaConnection.js","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D;;;;;;;;;GASG;AACH,MAAM,OAAO,2BAA2B;IACvC,YACkB,eAAiC,EACjC,gBAAmC;QADnC,oBAAe,GAAf,eAAe,CAAkB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAmB;QAO7C,cAAS,GAAG,IAAI,CAAC;IANtB,CAAC;IAEJ,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;IACvC,CAAC;IAGM,aAAa;QACnB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,gCAAgC;IACzB,MAAM,CAAC,cAAuB,EAAE,eAAwB;QAC9D,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAC9D,CAAC;QACD,gFAAgF;IACjF,CAAC;IAED,mHAAmH;IACnH,uEAAuE;IAChE,MAAM,CAAC,OAAsB;QACnC,wGAAwG;QACxG,6GAA6G;QAC7G,+EAA+E;QAC/E,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnD,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACtC,CAAC;IACF,CAAC;IACM,KAAK;QACX,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD;AAED;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAChC,YACkB,eAAiC,EACjC,gBAAmC,EACnC,UAA8B;QAF9B,oBAAe,GAAf,eAAe,CAAkB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAmB;QACnC,eAAU,GAAV,UAAU,CAAoB;IAC7C,CAAC;IAEJ,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;IACvC,CAAC;IAED,gCAAgC;IACzB,MAAM,CAAC,cAAkC,EAAE,eAAwB;QACzE,MAAM,CAAC,cAAc,CAAC,mBAAmB,KAAK,SAAS,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACxG,cAAc,CAAC,mBAAmB,GAAG;YACpC,GAAG,IAAI,CAAC,UAAU;SAClB,CAAC;QACF,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAsB;QACnC,qDAAqD;QACrD,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnD,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACtC,CAAC;IACF,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,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/internal';\nimport type {\n\tIChannelAttributes,\n\tIDeltaConnection,\n\tIDeltaHandler,\n} from '@fluidframework/datastore-definitions/internal';\n\nimport type { IShimDeltaHandler, IUnstampedContents } from './types.js';\n\n/**\n * Represents a connection to a Shim data store that can receive and submit deltas.\n *\n * This allows the Shim class to swap out the delta handler on the fly.\n *\n * The PreMigrationDeltaConnection does not stamp ops so that those ops can be considered v1 ops.\n *\n * This special logic allows for connect to be called for the underlying new SharedObject without the need for\n * modifications on the current ChannelDeltaConnection.\n */\nexport class PreMigrationDeltaConnection implements IDeltaConnection {\n\tpublic constructor(\n\t\tprivate readonly deltaConnection: IDeltaConnection,\n\t\tprivate readonly shimDeltaHandler: IShimDeltaHandler\n\t) {}\n\n\tpublic get connected(): boolean {\n\t\treturn this.deltaConnection.connected;\n\t}\n\n\tprivate canSubmit = true;\n\tpublic disableSubmit(): void {\n\t\tthis.canSubmit = false;\n\t}\n\n\t// This is for submitting v1 ops\n\tpublic submit(messageContent: unknown, localOpMetadata: unknown): void {\n\t\tif (this.canSubmit) {\n\t\t\tthis.deltaConnection.submit(messageContent, localOpMetadata);\n\t\t}\n\t\t// We don't want to throw so we can revert local changes on the LegacySharedTree\n\t}\n\n\t// We only want to call attach on the underlying delta connection once, as we'll hit an assert if we call it twice.\n\t// Note: SharedObject.load calls attach as well as SharedObject.connect\n\tpublic attach(handler: IDeltaHandler): void {\n\t\t// There are essentially two delta handlers that process ops, the shim delta handler to process shim ops\n\t\t// preventing them from being processed by the tree delta handler, and the tree delta handler to process tree\n\t\t// ops. Post migration v1 ops can be considered \"shim\" ops as they are dropped.\n\t\tthis.shimDeltaHandler.attachTreeDeltaHandler(handler);\n\t\tif (!this.shimDeltaHandler.attached) {\n\t\t\tthis.deltaConnection.attach(this.shimDeltaHandler);\n\t\t\tthis.shimDeltaHandler.markAttached();\n\t\t}\n\t}\n\tpublic dirty(): void {\n\t\tthis.deltaConnection.dirty();\n\t}\n}\n\n/**\n * A delta connection that stamps ops with a particular channel attributes so that those ops won't get dropped\n */\nexport class StampDeltaConnection implements IDeltaConnection {\n\tpublic constructor(\n\t\tprivate readonly deltaConnection: IDeltaConnection,\n\t\tprivate readonly shimDeltaHandler: IShimDeltaHandler,\n\t\tprivate readonly attributes: IChannelAttributes\n\t) {}\n\n\tpublic get connected(): boolean {\n\t\treturn this.deltaConnection.connected;\n\t}\n\n\t// This is for submitting v2 ops\n\tpublic submit(messageContent: IUnstampedContents, localOpMetadata: unknown): void {\n\t\tassert(messageContent.fluidMigrationStamp === undefined, 0x835 /* Should not be stamping ops twice! */);\n\t\tmessageContent.fluidMigrationStamp = {\n\t\t\t...this.attributes,\n\t\t};\n\t\tthis.deltaConnection.submit(messageContent, localOpMetadata);\n\t}\n\n\t/**\n\t * For the MigrationShim because we only attach once to the actual delta connection, we store state in the\n\t * migrationDeltaHandler to know if we've already attached. We will call attach once on the\n\t * PreMigrationDeltaConnection and once on the StampDeltaConnection.\n\t *\n\t * The SharedTreeShim should not be swapping delta connections and thus the if statement should always be executed.\n\t *\n\t * @param handler - this delta handler can only connect once.\n\t */\n\tpublic attach(handler: IDeltaHandler): void {\n\t\t// Maybe put an assert here to only call attach once?\n\t\tthis.shimDeltaHandler.attachTreeDeltaHandler(handler);\n\t\tif (!this.shimDeltaHandler.attached) {\n\t\t\tthis.deltaConnection.attach(this.shimDeltaHandler);\n\t\t\tthis.shimDeltaHandler.markAttached();\n\t\t}\n\t}\n\n\tpublic dirty(): void {\n\t\tthis.deltaConnection.dirty();\n\t}\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { FluidHandleBase } from '@fluidframework/runtime-utils/internal';
6
- import { type IShim } from './types.js';
6
+ import type { IShim } from './types.js';
7
7
  /**
8
8
  * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.
9
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"shimHandle.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAyB,MAAM,wCAAwC,CAAC;AAEhG,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,KAAK,SAAS,KAAK,CAAE,SAAQ,eAAe,CAAC,KAAK,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,KAAK;IAI/C,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,IAAW,UAAU,IAAI,OAAO,CAE/B;IACM,WAAW,IAAI,IAAI;IAGb,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;CAGlC"}
1
+ {"version":3,"file":"shimHandle.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAyB,MAAM,wCAAwC,CAAC;AAEhG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,KAAK,SAAS,KAAK,CAAE,SAAQ,eAAe,CAAC,KAAK,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,KAAK;IAI/C,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,IAAW,UAAU,IAAI,OAAO,CAE/B;IACM,WAAW,IAAI,IAAI;IAGb,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;CAGlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"shimHandle.js","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAIhG;;;;;;;GAOG;AACH,MAAM,OAAO,UAAgC,SAAQ,eAAsB;IAC1E,YAAoC,IAAW;QAC9C,KAAK,EAAE,CAAC;QAD2B,SAAI,GAAJ,IAAI,CAAO;IAE/C,CAAC;IAED,IAAW,YAAY;QACtB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC;IACzE,CAAC;IACD,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;IAChD,CAAC;IACM,WAAW;QACjB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1E,CAAC;IACM,KAAK,CAAC,GAAG;QACf,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';\n\nimport { type IShim } from './types.js';\n\n/**\n * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.\n *\n * ShimHandle is designed for MigrationShim and SharedTreeShim.\n *\n * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the\n * Shim's underlying DDS.\n */\nexport class ShimHandle<TShim extends IShim> extends FluidHandleBase<TShim> {\n\tpublic constructor(private readonly shim: TShim) {\n\t\tsuper();\n\t}\n\n\tpublic get absolutePath(): string {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).absolutePath;\n\t}\n\tpublic get isAttached(): boolean {\n\t\treturn this.shim.currentTree.handle.isAttached;\n\t}\n\tpublic attachGraph(): void {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).attachGraph();\n\t}\n\tpublic async get(): Promise<TShim> {\n\t\treturn this.shim;\n\t}\n}\n"]}
1
+ {"version":3,"file":"shimHandle.js","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAIhG;;;;;;;GAOG;AACH,MAAM,OAAO,UAAgC,SAAQ,eAAsB;IAC1E,YAAoC,IAAW;QAC9C,KAAK,EAAE,CAAC;QAD2B,SAAI,GAAJ,IAAI,CAAO;IAE/C,CAAC;IAED,IAAW,YAAY;QACtB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC;IACzE,CAAC;IACD,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;IAChD,CAAC;IACM,WAAW;QACjB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1E,CAAC;IACM,KAAK,CAAC,GAAG;QACf,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';\n\nimport type { IShim } from './types.js';\n\n/**\n * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.\n *\n * ShimHandle is designed for MigrationShim and SharedTreeShim.\n *\n * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the\n * Shim's underlying DDS.\n */\nexport class ShimHandle<TShim extends IShim> extends FluidHandleBase<TShim> {\n\tpublic constructor(private readonly shim: TShim) {\n\t\tsuper();\n\t}\n\n\tpublic get absolutePath(): string {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).absolutePath;\n\t}\n\tpublic get isAttached(): boolean {\n\t\treturn this.shim.currentTree.handle.isAttached;\n\t}\n\tpublic attachGraph(): void {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).attachGraph();\n\t}\n\tpublic async get(): Promise<TShim> {\n\t\treturn this.shim;\n\t}\n}\n"]}
@@ -2,10 +2,10 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type IChannel, type IChannelAttributes, type IChannelServices, type IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
6
- import { type ITree } from '@fluidframework/tree';
7
- import { type SharedTree as LegacySharedTree } from '../SharedTree.js';
8
- import { type IMigrationOp } from './migrationShim.js';
5
+ import type { IChannel, IChannelAttributes, IChannelServices, IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
6
+ import type { ITree } from '@fluidframework/tree';
7
+ import type { SharedTree as LegacySharedTree } from '../SharedTree.js';
8
+ import type { IMigrationOp } from './migrationShim.js';
9
9
  /**
10
10
  * An interface for a shim delta handler intercepts another delta handler.
11
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,KAAK,UAAU,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACvD;;;OAGG;IACH,sBAAsB,CAAC,gBAAgB,EAAE,aAAa,GAAG,IAAI,CAAC;IAE9D;;;OAGG;IACH,mBAAmB,IAAI,OAAO,CAAC;IAE/B,QAAQ,EAAE,OAAO,CAAC;IAElB,YAAY,IAAI,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,mBAAmB,CAAC,EAAE,kBAAkB,CAAC;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,mBAAmB,EAAE,kBAAkB,CAAC;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,KAAM,SAAQ,QAAQ;IACtC,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,WAAW,EAAE,KAAK,GAAG,gBAAgB,CAAC;CACtC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACvD;;;OAGG;IACH,sBAAsB,CAAC,gBAAgB,EAAE,aAAa,GAAG,IAAI,CAAC;IAE9D;;;OAGG;IACH,mBAAmB,IAAI,OAAO,CAAC;IAE/B,QAAQ,EAAE,OAAO,CAAC;IAElB,YAAY,IAAI,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,mBAAmB,CAAC,EAAE,kBAAkB,CAAC;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,mBAAmB,EAAE,kBAAkB,CAAC;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,KAAM,SAAQ,QAAQ;IACtC,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,WAAW,EAAE,KAAK,GAAG,gBAAgB,CAAC;CACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype IChannel,\n\ttype IChannelAttributes,\n\ttype IChannelServices,\n\ttype IDeltaHandler,\n} from '@fluidframework/datastore-definitions/internal';\nimport { type ITree } from '@fluidframework/tree';\n\nimport { type SharedTree as LegacySharedTree } from '../SharedTree.js';\n\nimport { type IMigrationOp } from './migrationShim.js';\n\n/**\n * An interface for a shim delta handler intercepts another delta handler.\n *\n * @internal\n */\nexport interface IShimDeltaHandler extends IDeltaHandler {\n\t/**\n\t * Provide the real tree delta handler (either legacy or new) to the shim that will be used to process the tree ops.\n\t * @param treeDeltaHandler - The appropriate tree delta handler.\n\t */\n\tattachTreeDeltaHandler(treeDeltaHandler: IDeltaHandler): void;\n\n\t/**\n\t * The delta handler needs to be attached to the IShimDeltaHandler before attaching it to the delta connection.\n\t * Otherwise the IShimDeltaHandler will not be able to process ops.\n\t */\n\thasTreeDeltaHandler(): boolean;\n\n\tattached: boolean;\n\n\tmarkAttached(): void;\n}\n\n/**\n * A v1 op or a v2 unstamped op\n */\nexport interface IUnstampedContents {\n\tfluidMigrationStamp?: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A v2 op will have a `fluidMigrationStamp` property. This is a type guard to check if the op is a v2 op.\n */\nexport interface IStampedContents {\n\tfluidMigrationStamp: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A type for interrogating ops to see if they are v2 stamped ops or migrate ops. Otherwise, we try not to care\n * what the contents of the op are. The contents could be of type `any` or `unknown`.\n *\n * If `type` specifically === \"barrier\", then we know we are dealing with a barrier op\n *\n * If `fluidMigrationStamp` is present, then we know we are dealing with a v2 op\n *\n * @internal\n */\nexport type IOpContents = IStampedContents | IUnstampedContents | IMigrationOp;\n\n/**\n * An interface for a shim channel that intercepts a LegacySharedTree or new SharedTree DDS.\n *\n * @internal\n */\nexport interface IShim extends IChannel {\n\tcreate(): void;\n\tload(channelServices: IChannelServices): Promise<void>;\n\tcurrentTree: ITree | LegacySharedTree;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannel,\n\tIChannelAttributes,\n\tIChannelServices,\n\tIDeltaHandler,\n} from '@fluidframework/datastore-definitions/internal';\nimport type { ITree } from '@fluidframework/tree';\n\nimport type { SharedTree as LegacySharedTree } from '../SharedTree.js';\n\nimport type { IMigrationOp } from './migrationShim.js';\n\n/**\n * An interface for a shim delta handler intercepts another delta handler.\n *\n * @internal\n */\nexport interface IShimDeltaHandler extends IDeltaHandler {\n\t/**\n\t * Provide the real tree delta handler (either legacy or new) to the shim that will be used to process the tree ops.\n\t * @param treeDeltaHandler - The appropriate tree delta handler.\n\t */\n\tattachTreeDeltaHandler(treeDeltaHandler: IDeltaHandler): void;\n\n\t/**\n\t * The delta handler needs to be attached to the IShimDeltaHandler before attaching it to the delta connection.\n\t * Otherwise the IShimDeltaHandler will not be able to process ops.\n\t */\n\thasTreeDeltaHandler(): boolean;\n\n\tattached: boolean;\n\n\tmarkAttached(): void;\n}\n\n/**\n * A v1 op or a v2 unstamped op\n */\nexport interface IUnstampedContents {\n\tfluidMigrationStamp?: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A v2 op will have a `fluidMigrationStamp` property. This is a type guard to check if the op is a v2 op.\n */\nexport interface IStampedContents {\n\tfluidMigrationStamp: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A type for interrogating ops to see if they are v2 stamped ops or migrate ops. Otherwise, we try not to care\n * what the contents of the op are. The contents could be of type `any` or `unknown`.\n *\n * If `type` specifically === \"barrier\", then we know we are dealing with a barrier op\n *\n * If `fluidMigrationStamp` is present, then we know we are dealing with a v2 op\n *\n * @internal\n */\nexport type IOpContents = IStampedContents | IUnstampedContents | IMigrationOp;\n\n/**\n * An interface for a shim channel that intercepts a LegacySharedTree or new SharedTree DDS.\n *\n * @internal\n */\nexport interface IShim extends IChannel {\n\tcreate(): void;\n\tload(channelServices: IChannelServices): Promise<void>;\n\tcurrentTree: ITree | LegacySharedTree;\n}\n"]}
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type IChannelAttributes } from '@fluidframework/datastore-definitions/internal';
6
- import { type IMigrationOp } from './migrationShim.js';
7
- import { type IOpContents, type IStampedContents } from './types.js';
5
+ import type { IChannelAttributes } from '@fluidframework/datastore-definitions/internal';
6
+ import type { IMigrationOp } from './migrationShim.js';
7
+ import type { IOpContents, IStampedContents } from './types.js';
8
8
  /**
9
9
  * Checks if two channel attributes objects match.
10
10
  * @param attributes1 - The first channel attributes object to compare.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAMzG;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,YAAY,CAE3E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,gBAAgB,CAE/E"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAMzG;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,YAAY,CAE3E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,gBAAgB,CAE/E"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,WAA+B,EAAE,WAA+B;IAC/F,OAAO,CACN,WAAW,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI;QACrC,WAAW,CAAC,cAAc,KAAK,WAAW,CAAC,cAAc;QACzD,WAAW,CAAC,qBAAqB,KAAK,WAAW,CAAC,qBAAqB,CACvE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,qBAAqB,IAAI,QAAQ,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IChannelAttributes } from '@fluidframework/datastore-definitions/internal';\n\nimport { type IMigrationOp } from './migrationShim.js';\nimport { type IOpContents, type IStampedContents } from './types.js';\n\n/**\n * Checks if two channel attributes objects match.\n * @param attributes1 - The first channel attributes object to compare.\n * @param attributes2 - The second channel attributes object to compare.\n * @returns True if the two channel attributes objects match, false otherwise.\n */\nexport function attributesMatch(attributes1: IChannelAttributes, attributes2: IChannelAttributes): boolean {\n\treturn (\n\t\tattributes1.type === attributes2.type &&\n\t\tattributes1.packageVersion === attributes2.packageVersion &&\n\t\tattributes1.snapshotFormatVersion === attributes2.snapshotFormatVersion\n\t);\n}\n\n/**\n * Checks if the given op is a barrier op.\n * @param contents - The op to check.\n * @returns True if the op is a barrier op, false otherwise.\n */\nexport function isBarrierOp(contents: IOpContents): contents is IMigrationOp {\n\treturn contents.type === 'barrier';\n}\n\n/**\n * Checks if the given op is a barrier op.\n * @param contents - The op to check.\n * @returns True if the op is a barrier op, false otherwise.\n */\nexport function isStampedOp(contents: IOpContents): contents is IStampedContents {\n\treturn 'fluidMigrationStamp' in contents;\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,WAA+B,EAAE,WAA+B;IAC/F,OAAO,CACN,WAAW,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI;QACrC,WAAW,CAAC,cAAc,KAAK,WAAW,CAAC,cAAc;QACzD,WAAW,CAAC,qBAAqB,KAAK,WAAW,CAAC,qBAAqB,CACvE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,qBAAqB,IAAI,QAAQ,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IChannelAttributes } from '@fluidframework/datastore-definitions/internal';\n\nimport type { IMigrationOp } from './migrationShim.js';\nimport type { IOpContents, IStampedContents } from './types.js';\n\n/**\n * Checks if two channel attributes objects match.\n * @param attributes1 - The first channel attributes object to compare.\n * @param attributes2 - The second channel attributes object to compare.\n * @returns True if the two channel attributes objects match, false otherwise.\n */\nexport function attributesMatch(attributes1: IChannelAttributes, attributes2: IChannelAttributes): boolean {\n\treturn (\n\t\tattributes1.type === attributes2.type &&\n\t\tattributes1.packageVersion === attributes2.packageVersion &&\n\t\tattributes1.snapshotFormatVersion === attributes2.snapshotFormatVersion\n\t);\n}\n\n/**\n * Checks if the given op is a barrier op.\n * @param contents - The op to check.\n * @returns True if the op is a barrier op, false otherwise.\n */\nexport function isBarrierOp(contents: IOpContents): contents is IMigrationOp {\n\treturn contents.type === 'barrier';\n}\n\n/**\n * Checks if the given op is a barrier op.\n * @param contents - The op to check.\n * @returns True if the op is a barrier op, false otherwise.\n */\nexport function isStampedOp(contents: IOpContents): contents is IStampedContents {\n\treturn 'fluidMigrationStamp' in contents;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/tree",
3
- "version": "2.74.0",
3
+ "version": "2.81.0-374083",
4
4
  "description": "Distributed tree",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -27,18 +27,18 @@
27
27
  "main": "lib/index.js",
28
28
  "types": "lib/index.d.ts",
29
29
  "dependencies": {
30
- "@fluid-internal/client-utils": "~2.74.0",
31
- "@fluidframework/container-definitions": "~2.74.0",
32
- "@fluidframework/core-interfaces": "~2.74.0",
33
- "@fluidframework/core-utils": "~2.74.0",
34
- "@fluidframework/datastore-definitions": "~2.74.0",
35
- "@fluidframework/driver-definitions": "~2.74.0",
36
- "@fluidframework/id-compressor": "~2.74.0",
37
- "@fluidframework/runtime-definitions": "~2.74.0",
38
- "@fluidframework/runtime-utils": "~2.74.0",
39
- "@fluidframework/shared-object-base": "~2.74.0",
40
- "@fluidframework/telemetry-utils": "~2.74.0",
41
- "@fluidframework/tree": "~2.74.0",
30
+ "@fluid-internal/client-utils": "2.81.0-374083",
31
+ "@fluidframework/container-definitions": "2.81.0-374083",
32
+ "@fluidframework/core-interfaces": "2.81.0-374083",
33
+ "@fluidframework/core-utils": "2.81.0-374083",
34
+ "@fluidframework/datastore-definitions": "2.81.0-374083",
35
+ "@fluidframework/driver-definitions": "2.81.0-374083",
36
+ "@fluidframework/id-compressor": "2.81.0-374083",
37
+ "@fluidframework/runtime-definitions": "2.81.0-374083",
38
+ "@fluidframework/runtime-utils": "2.81.0-374083",
39
+ "@fluidframework/shared-object-base": "2.81.0-374083",
40
+ "@fluidframework/telemetry-utils": "2.81.0-374083",
41
+ "@fluidframework/tree": "2.81.0-374083",
42
42
  "@tylerbu/sorted-btree-es6": "^1.8.0",
43
43
  "buffer": "^6.0.3",
44
44
  "denque": "^1.5.1",
@@ -46,39 +46,39 @@
46
46
  "uuid": "^11.1.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@arethetypeswrong/cli": "^0.17.1",
49
+ "@arethetypeswrong/cli": "^0.18.2",
50
50
  "@biomejs/biome": "~1.9.3",
51
- "@fluid-internal/mocha-test-setup": "~2.74.0",
52
- "@fluid-private/stochastic-test-utils": "~2.74.0",
53
- "@fluid-private/test-drivers": "~2.74.0",
54
- "@fluid-tools/benchmark": "^0.51.0",
51
+ "@fluid-internal/mocha-test-setup": "2.81.0-374083",
52
+ "@fluid-private/stochastic-test-utils": "2.81.0-374083",
53
+ "@fluid-private/test-drivers": "2.81.0-374083",
54
+ "@fluid-tools/benchmark": "^0.52.0",
55
55
  "@fluidframework/build-common": "^2.0.3",
56
- "@fluidframework/build-tools": "^0.61.0",
57
- "@fluidframework/container-definitions": "~2.74.0",
58
- "@fluidframework/container-loader": "~2.74.0",
59
- "@fluidframework/container-runtime": "~2.74.0",
60
- "@fluidframework/eslint-config-fluid": "~2.74.0",
61
- "@fluidframework/runtime-utils": "~2.74.0",
62
- "@fluidframework/test-runtime-utils": "~2.74.0",
63
- "@fluidframework/test-utils": "~2.74.0",
64
- "@fluidframework/undo-redo": "~2.74.0",
56
+ "@fluidframework/build-tools": "^0.63.0",
57
+ "@fluidframework/container-definitions": "2.81.0-374083",
58
+ "@fluidframework/container-loader": "2.81.0-374083",
59
+ "@fluidframework/container-runtime": "2.81.0-374083",
60
+ "@fluidframework/eslint-config-fluid": "2.81.0-374083",
61
+ "@fluidframework/runtime-utils": "2.81.0-374083",
62
+ "@fluidframework/test-runtime-utils": "2.81.0-374083",
63
+ "@fluidframework/test-utils": "2.81.0-374083",
64
+ "@fluidframework/undo-redo": "2.81.0-374083",
65
65
  "@microsoft/api-extractor": "7.52.11",
66
66
  "@types/chai": "^4.0.0",
67
67
  "@types/lru-cache": "^5.1.0",
68
68
  "@types/mocha": "^10.0.10",
69
69
  "c8": "^10.1.3",
70
70
  "chai": "^4.2.0",
71
- "concurrently": "^8.2.1",
71
+ "concurrently": "^9.2.1",
72
72
  "copyfiles": "^2.4.1",
73
- "cross-env": "^7.0.3",
74
- "easy-table": "^1.1.1",
73
+ "cross-env": "^10.1.0",
74
+ "easy-table": "^1.2.0",
75
75
  "env-cmd": "^10.1.0",
76
- "eslint": "~8.57.1",
76
+ "eslint": "~9.39.1",
77
77
  "eslint-config-prettier": "~10.1.8",
78
78
  "jiti": "^2.6.1",
79
79
  "mocha": "^10.8.2",
80
80
  "mocha-multi-reporters": "^1.5.1",
81
- "rimraf": "^4.4.0",
81
+ "rimraf": "^6.1.2",
82
82
  "typescript": "~5.4.5"
83
83
  },
84
84
  "typeValidation": {
package/src/Checkout.ts CHANGED
@@ -196,7 +196,7 @@ export abstract class Checkout extends EventEmitterWithErrorHandling<ICheckoutEv
196
196
  }): asserts result is { status: EditStatus.Applied; failure: undefined };
197
197
  private validateChangesApplied(
198
198
  result: EditingResult | { status: EditStatus; failure: TransactionInternal.Failure | undefined }
199
- ) {
199
+ ): void {
200
200
  if (result.status === EditStatus.Applied) {
201
201
  return;
202
202
  }
package/src/Common.ts CHANGED
@@ -375,7 +375,11 @@ function breakOnDifference(): { break: boolean } {
375
375
  * Helper that returns whether two b-trees are equal.
376
376
  * Accelerated when large portions of the tree are shared between the two.
377
377
  */
378
- export function compareBtrees<K, V>(treeA: BTree<K, V>, treeB: BTree<K, V>, compare: (valA: V, valB: V) => boolean) {
378
+ export function compareBtrees<K, V>(
379
+ treeA: BTree<K, V>,
380
+ treeB: BTree<K, V>,
381
+ compare: (valA: V, valB: V) => boolean
382
+ ): boolean {
379
383
  const diff = treeA.diffAgainst(treeB, breakOnDifference, breakOnDifference, (_, valA, valB) => {
380
384
  if (!compare(valA, valB)) {
381
385
  return { break: true };
@@ -217,7 +217,7 @@ export class SharedTreeMergeHealthTelemetryHeartbeat {
217
217
  * Noop if such a tree was already in the set.
218
218
  * @param tree - The tree to log merge health telemetry for.
219
219
  */
220
- public attachTree(tree: SharedTree) {
220
+ public attachTree(tree: SharedTree): void {
221
221
  if (this.treeData.has(tree) === false) {
222
222
  this.resetTreeData(tree);
223
223
  tree.on(SharedTreeEvent.SequencedEditApplied, this.sequencedEditHandler);
@@ -229,7 +229,7 @@ export class SharedTreeMergeHealthTelemetryHeartbeat {
229
229
  * Noop if such a tree was never in the set.
230
230
  * @param tree - The tree to stop logging merge health telemetry for.
231
231
  */
232
- public detachTree(tree: SharedTree) {
232
+ public detachTree(tree: SharedTree): void {
233
233
  if (this.treeData.has(tree)) {
234
234
  tree.off(SharedTreeEvent.SequencedEditApplied, this.sequencedEditHandler);
235
235
  this.treeData.delete(tree);
@@ -248,7 +248,7 @@ export class SharedTreeMergeHealthTelemetryHeartbeat {
248
248
  /**
249
249
  * Removes all trees from the set of tree to log merge health telemetry for.
250
250
  */
251
- public detachAllTrees() {
251
+ public detachAllTrees(): void {
252
252
  for (const tree of this.treeData.keys()) {
253
253
  this.detachTree(tree);
254
254
  }
@@ -332,7 +332,7 @@ export class SharedTreeMergeHealthTelemetryHeartbeat {
332
332
  /**
333
333
  * Receives SequencedEditApplied events from trees.
334
334
  */
335
- private readonly sequencedEditHandler = (params: SequencedEditAppliedEventArguments) => {
335
+ private readonly sequencedEditHandler = (params: SequencedEditAppliedEventArguments): void => {
336
336
  const { edit, tree, wasLocal, logger, outcome, reconciliationPath } = params;
337
337
  if (wasLocal) {
338
338
  const tallyAndLogger = this.treeData.get(tree) ?? fail('Should only receive events for registered trees');
@@ -429,7 +429,7 @@ export class SharedTreeMergeHealthTelemetryHeartbeat {
429
429
  /**
430
430
  * Logs the accumulated merge health data to each tree's designated logger.
431
431
  */
432
- private readonly logHeartbeat = () => {
432
+ private readonly logHeartbeat = (): void => {
433
433
  for (const [tree, { tally, logger }] of this.treeData) {
434
434
  if (logger && tally.editCount > 0) {
435
435
  // Note: all this data is for sequenced edits that were originally produced by the local client.
package/src/SharedTree.ts CHANGED
@@ -1106,7 +1106,7 @@ export class SharedTree extends SharedObject<ISharedTreeEvents> implements NodeI
1106
1106
  * Updates SharedTree to the provided version if the version is a valid write version newer than the current version.
1107
1107
  * @param version - The version to update to.
1108
1108
  */
1109
- private processVersionUpdate(version: WriteFormat) {
1109
+ private processVersionUpdate(version: WriteFormat): void {
1110
1110
  if (isUpdateRequired(this.writeFormat, version)) {
1111
1111
  PerformanceEvent.timedExec(
1112
1112
  this.logger,
@@ -1219,7 +1219,7 @@ export class SharedTree extends SharedObject<ISharedTreeEvents> implements NodeI
1219
1219
  edits: Iterable<Edit<InternalizedChange>>,
1220
1220
  stableIdRemapper?: (id: StableNodeId) => StableNodeId
1221
1221
  ): EditId[] {
1222
- const idConverter = (id: NodeId) => {
1222
+ const idConverter = (id: NodeId): NodeId => {
1223
1223
  const stableId = other.convertToStableNodeId(id);
1224
1224
  const convertedStableId = stableIdRemapper?.(stableId) ?? stableId;
1225
1225
  return this.generateNodeId(convertedStableId);
@@ -11,7 +11,14 @@ import { assertWithMessage, fail } from './Common.js';
11
11
  import { EditLog } from './EditLog.js';
12
12
  import { convertTreeNodes, newEdit } from './EditUtilities.js';
13
13
  import { convertEditIds, convertNodeDataIds } from './IdConversion.js';
14
- import { AttributionId, DetachedSequenceId, FinalNodeId, OpSpaceNodeId, TraitLabel } from './Identifiers.js';
14
+ import {
15
+ AttributionId,
16
+ DetachedSequenceId,
17
+ FinalNodeId,
18
+ OpSpaceNodeId,
19
+ TraitLabel,
20
+ type NodeId,
21
+ } from './Identifiers.js';
15
22
  import { initialTree } from './InitialTree.js';
16
23
  import {
17
24
  ContextualizedNodeIdNormalizer,
@@ -363,7 +370,7 @@ export class SharedTreeEncoder_0_0_2 {
363
370
  assert(sequencedEdits !== undefined, 0x636 /* 0.0.2 summary encountered with missing sequencedEdits field. */);
364
371
  const idCompressor = new IdCompressor(createSessionId(), reservedIdCount, attributionId);
365
372
  const idGenerator = getNodeIdContext(idCompressor);
366
- const generateId = (id) => idGenerator.generateNodeId(id);
373
+ const generateId = (id): NodeId => idGenerator.generateNodeId(id);
367
374
 
368
375
  // This saves all of the edits in the summary as part of the first chunk.
369
376
  const temporaryLog = new EditLog<ChangeInternal>();
@@ -56,7 +56,7 @@ export class SharedTreeUndoRedoHandler {
56
56
  * Attach a shared tree to this handler. Each edit from the tree will invoke `this.stackManager`'s
57
57
  * {@link IUndoConsumer.pushToCurrentOperation} method with an associated {@link IRevertible}.
58
58
  */
59
- public attachTree(tree: SharedTree) {
59
+ public attachTree(tree: SharedTree): void {
60
60
  tree.on(SharedTreeEvent.EditCommitted, this.treeDeltaHandler);
61
61
  }
62
62
 
@@ -64,11 +64,11 @@ export class SharedTreeUndoRedoHandler {
64
64
  * Detach a shared tree from this handler. Edits from the tree will no longer cause `this.stackManager`'s
65
65
  * {@link IUndoConsumer.pushToCurrentOperation} to be called.
66
66
  */
67
- public detachTree(tree: SharedTree) {
67
+ public detachTree(tree: SharedTree): void {
68
68
  tree.off(SharedTreeEvent.EditCommitted, this.treeDeltaHandler);
69
69
  }
70
70
 
71
- private readonly treeDeltaHandler = (eventArguments: EditCommittedEventArguments) => {
71
+ private readonly treeDeltaHandler = (eventArguments: EditCommittedEventArguments): void => {
72
72
  const { editId, local, tree } = eventArguments;
73
73
 
74
74
  if (local) {
@@ -94,11 +94,11 @@ export class SharedTreeRevertible implements IRevertible {
94
94
  private readonly tree: SharedTree
95
95
  ) {}
96
96
 
97
- public revert() {
97
+ public revert(): void {
98
98
  this.tree.revert(this.editId);
99
99
  }
100
100
 
101
- public discard() {
101
+ public discard(): void {
102
102
  return;
103
103
  }
104
104
  }
@@ -1385,7 +1385,7 @@ export class IdCompressor {
1385
1385
  return { break: true };
1386
1386
  };
1387
1387
 
1388
- const compareCompressionMappings = (a, b) => {
1388
+ const compareCompressionMappings = (a, b): boolean => {
1389
1389
  const unfinalizedA = IdCompressor.isUnfinalizedOverride(a);
1390
1390
  const unfinalizedB = IdCompressor.isUnfinalizedOverride(b);
1391
1391
  if (unfinalizedA) {
@@ -443,7 +443,7 @@ export class SessionIdNormalizer<TRangeObject> {
443
443
  return finalRangesA === finalRangesB;
444
444
  }
445
445
 
446
- const rangeEquals = (finalRangeA: FinalRange<TRangeObject>, finalRangeB: FinalRange<TRangeObject>) => {
446
+ const rangeEquals = (finalRangeA: FinalRange<TRangeObject>, finalRangeB: FinalRange<TRangeObject>): boolean => {
447
447
  const [firstFinalA, lastFinalA, rangeObjectA] = finalRangeA;
448
448
  const [firstFinalB, lastFinalB, rangeObjectB] = finalRangeB;
449
449
  return (
@@ -4,11 +4,11 @@
4
4
  */
5
5
 
6
6
  import { assert } from '@fluidframework/core-utils/internal';
7
- import { type IChannelAttributes, type IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
7
+ import type { IChannelAttributes, IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
8
8
  import { MessageType, type ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
9
9
  import type { IRuntimeMessageCollection, IRuntimeMessagesContent } from '@fluidframework/runtime-definitions/internal';
10
10
 
11
- import { type IOpContents, type IShimDeltaHandler } from './types.js';
11
+ import type { IOpContents, IShimDeltaHandler } from './types.js';
12
12
  import { attributesMatch, isBarrierOp, isStampedOp } from './utils.js';
13
13
 
14
14
  /**
@@ -3,9 +3,9 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { type EventEmitterEventType } from '@fluid-internal/client-utils';
6
+ import type { EventEmitterEventType } from '@fluid-internal/client-utils';
7
7
  import { AttachState } from '@fluidframework/container-definitions';
8
- import { type IEvent, type IFluidHandle, type IFluidLoadable } from '@fluidframework/core-interfaces';
8
+ import type { IEvent, IFluidHandle, IFluidLoadable } from '@fluidframework/core-interfaces';
9
9
  import { assert } from '@fluidframework/core-utils/internal';
10
10
  import {
11
11
  type IChannelAttributes,
@@ -17,25 +17,22 @@ import {
17
17
  import { MessageType, type ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
18
18
  import type { SessionId } from '@fluidframework/id-compressor';
19
19
  import type { IIdCompressorCore } from '@fluidframework/id-compressor/internal';
20
- import {
21
- type IExperimentalIncrementalSummaryContext,
22
- type IGarbageCollectionData,
23
- type ISummaryTreeWithStats,
24
- type ITelemetryContext,
20
+ import type {
21
+ IExperimentalIncrementalSummaryContext,
22
+ IGarbageCollectionData,
23
+ ISummaryTreeWithStats,
24
+ ITelemetryContext,
25
25
  } from '@fluidframework/runtime-definitions/internal';
26
26
  import { DataProcessingError, EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
27
- import { type ITree } from '@fluidframework/tree';
27
+ import type { ITree } from '@fluidframework/tree';
28
28
 
29
- import {
30
- type SharedTree as LegacySharedTree,
31
- type SharedTreeFactory as LegacySharedTreeFactory,
32
- } from '../SharedTree.js';
29
+ import type { SharedTree as LegacySharedTree, SharedTreeFactory as LegacySharedTreeFactory } from '../SharedTree.js';
33
30
 
34
31
  import { MigrationShimDeltaHandler } from './migrationDeltaHandler.js';
35
32
  import { type IShimChannelServices, NoDeltasChannelServices } from './shimChannelServices.js';
36
33
  import { PreMigrationDeltaConnection, StampDeltaConnection } from './shimDeltaConnection.js';
37
34
  import { ShimHandle } from './shimHandle.js';
38
- import { type IOpContents, type IShim } from './types.js';
35
+ import type { IOpContents, IShim } from './types.js';
39
36
 
40
37
  /**
41
38
  * Interface for migration events to indicate the stage of the migration. There really is two stages: before, and after.
@@ -158,6 +155,7 @@ export class MigrationShim extends EventEmitterWithErrorHandling<IMigrationEvent
158
155
  * {@inheritDoc @fluidframework/shared-object-base#SharedObject.closeWithError}
159
156
  */
160
157
  private closeWithError(error: ReturnType<typeof DataProcessingError.wrapIfUnrecognized>): void {
158
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing -- intentional behavior
161
159
  if (this.closeError === undefined) {
162
160
  this.closeError = error;
163
161
  }
@@ -4,18 +4,15 @@
4
4
  */
5
5
 
6
6
  import { assert } from '@fluidframework/core-utils/internal';
7
- import {
8
- type IChannelAttributes,
9
- type IChannelFactory,
10
- type IFluidDataStoreRuntime,
11
- type IChannelServices,
7
+ import type {
8
+ IChannelAttributes,
9
+ IChannelFactory,
10
+ IFluidDataStoreRuntime,
11
+ IChannelServices,
12
12
  } from '@fluidframework/datastore-definitions/internal';
13
- import { type ITree } from '@fluidframework/tree';
13
+ import type { ITree } from '@fluidframework/tree';
14
14
 
15
- import {
16
- type SharedTree as LegacySharedTree,
17
- type SharedTreeFactory as LegacySharedTreeFactory,
18
- } from '../SharedTree.js';
15
+ import type { SharedTree as LegacySharedTree, SharedTreeFactory as LegacySharedTreeFactory } from '../SharedTree.js';
19
16
 
20
17
  import { MigrationShim } from './migrationShim.js';
21
18
  import { attributesMatch } from './utils.js';
@@ -4,11 +4,11 @@
4
4
  */
5
5
 
6
6
  import { assert } from '@fluidframework/core-utils/internal';
7
- import { type IChannelAttributes, type IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
7
+ import type { IChannelAttributes, IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
8
8
  import { MessageType, type ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
9
9
  import type { IRuntimeMessageCollection, IRuntimeMessagesContent } from '@fluidframework/runtime-definitions/internal';
10
10
 
11
- import { type IOpContents, type IShimDeltaHandler } from './types.js';
11
+ import type { IOpContents, IShimDeltaHandler } from './types.js';
12
12
  import { attributesMatch, isStampedOp } from './utils.js';
13
13
 
14
14
  /**