@fluidframework/shared-object-base 2.51.0-347100 → 2.51.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 (68) hide show
  1. package/.eslintrc.cjs +13 -0
  2. package/CHANGELOG.md +4 -0
  3. package/dist/gcHandleVisitor.d.ts +2 -2
  4. package/dist/gcHandleVisitor.d.ts.map +1 -1
  5. package/dist/gcHandleVisitor.js.map +1 -1
  6. package/dist/handle.d.ts +2 -2
  7. package/dist/handle.d.ts.map +1 -1
  8. package/dist/handle.js.map +1 -1
  9. package/dist/index.d.ts +5 -5
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/packageVersion.d.ts +1 -1
  13. package/dist/packageVersion.d.ts.map +1 -1
  14. package/dist/packageVersion.js +1 -1
  15. package/dist/packageVersion.js.map +1 -1
  16. package/dist/serializer.d.ts +2 -2
  17. package/dist/serializer.d.ts.map +1 -1
  18. package/dist/serializer.js.map +1 -1
  19. package/dist/sharedObject.d.ts +9 -9
  20. package/dist/sharedObject.d.ts.map +1 -1
  21. package/dist/sharedObject.js.map +1 -1
  22. package/dist/sharedObjectKernel.d.ts +4 -4
  23. package/dist/sharedObjectKernel.d.ts.map +1 -1
  24. package/dist/sharedObjectKernel.js.map +1 -1
  25. package/dist/types.d.ts +3 -3
  26. package/dist/types.d.ts.map +1 -1
  27. package/dist/types.js.map +1 -1
  28. package/dist/utils.d.ts +3 -3
  29. package/dist/utils.d.ts.map +1 -1
  30. package/dist/utils.js.map +1 -1
  31. package/lib/gcHandleVisitor.d.ts +2 -2
  32. package/lib/gcHandleVisitor.d.ts.map +1 -1
  33. package/lib/gcHandleVisitor.js.map +1 -1
  34. package/lib/handle.d.ts +2 -2
  35. package/lib/handle.d.ts.map +1 -1
  36. package/lib/handle.js.map +1 -1
  37. package/lib/index.d.ts +5 -5
  38. package/lib/index.d.ts.map +1 -1
  39. package/lib/index.js.map +1 -1
  40. package/lib/packageVersion.d.ts +1 -1
  41. package/lib/packageVersion.d.ts.map +1 -1
  42. package/lib/packageVersion.js +1 -1
  43. package/lib/packageVersion.js.map +1 -1
  44. package/lib/serializer.d.ts +2 -2
  45. package/lib/serializer.d.ts.map +1 -1
  46. package/lib/serializer.js.map +1 -1
  47. package/lib/sharedObject.d.ts +9 -9
  48. package/lib/sharedObject.d.ts.map +1 -1
  49. package/lib/sharedObject.js.map +1 -1
  50. package/lib/sharedObjectKernel.d.ts +4 -4
  51. package/lib/sharedObjectKernel.d.ts.map +1 -1
  52. package/lib/sharedObjectKernel.js.map +1 -1
  53. package/lib/types.d.ts +3 -3
  54. package/lib/types.d.ts.map +1 -1
  55. package/lib/types.js.map +1 -1
  56. package/lib/utils.d.ts +3 -3
  57. package/lib/utils.d.ts.map +1 -1
  58. package/lib/utils.js.map +1 -1
  59. package/package.json +15 -15
  60. package/src/gcHandleVisitor.ts +2 -2
  61. package/src/handle.ts +2 -2
  62. package/src/index.ts +10 -10
  63. package/src/packageVersion.ts +1 -1
  64. package/src/serializer.ts +3 -3
  65. package/src/sharedObject.ts +21 -21
  66. package/src/sharedObjectKernel.ts +11 -11
  67. package/src/types.ts +3 -3
  68. package/src/utils.ts +3 -3
package/.eslintrc.cjs CHANGED
@@ -8,4 +8,17 @@ module.exports = {
8
8
  parserOptions: {
9
9
  project: ["./tsconfig.json", "./src/test/tsconfig.json"],
10
10
  },
11
+ rules: {
12
+ // #region TODO: remove these once eslint-config-fluid has been updated to 5.8.0
13
+ "@typescript-eslint/consistent-type-exports": [
14
+ "error",
15
+ { fixMixedExportsWithInlineTypeSpecifier: true },
16
+ ],
17
+ "@typescript-eslint/consistent-type-imports": [
18
+ "error",
19
+ { fixStyle: "inline-type-imports" },
20
+ ],
21
+ "@typescript-eslint/no-import-type-side-effects": "error",
22
+ // #endregion
23
+ },
11
24
  };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/shared-object-base
2
2
 
3
+ ## 2.51.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.50.0
4
8
 
5
9
  Dependency updates only.
@@ -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 IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
6
- import { type ISerializedHandle } from "@fluidframework/runtime-utils/internal";
5
+ import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
6
+ import type { ISerializedHandle } from "@fluidframework/runtime-utils/internal";
7
7
  import { FluidSerializer } from "./serializer.js";
8
8
  /**
9
9
  * Implementation of IFluidSerializer used by GC to visit all the handles in the DDS to collect its outbound routes
@@ -1 +1 @@
1
- {"version":3,"file":"gcHandleVisitor.d.ts","sourceRoot":"","sources":["../src/gcHandleVisitor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,eAAe;IACnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA0B;IACtD,qBAAqB,IAAI,MAAM,EAAE;IAIxC,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,iBAAiB;CAU9E"}
1
+ {"version":3,"file":"gcHandleVisitor.d.ts","sourceRoot":"","sources":["../src/gcHandleVisitor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,eAAe;IACnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA0B;IACtD,qBAAqB,IAAI,MAAM,EAAE;IAIxC,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,iBAAiB;CAU9E"}
@@ -1 +1 @@
1
- {"version":3,"file":"gcHandleVisitor.js","sourceRoot":"","sources":["../src/gcHandleVisitor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,mDAAkD;AAElD;;;;;GAKG;AACH,MAAa,eAAgB,SAAQ,+BAAe;IAApD;;QACkB,uBAAkB,GAAgB,IAAI,GAAG,EAAE,CAAC;IAe9D,CAAC;IAdO,qBAAqB;QAC3B,OAAO,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACrC,CAAC;IAES,mBAAmB,CAAC,MAA4B;QACzD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAEjD,mEAAmE;QACnE,iGAAiG;QACjG,OAAO;YACN,IAAI,EAAE,kBAAkB;YACxB,GAAG,EAAE,8BAA8B;SACnC,CAAC;IACH,CAAC;CACD;AAhBD,0CAgBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IFluidHandleInternal } from \"@fluidframework/core-interfaces/internal\";\nimport { type ISerializedHandle } from \"@fluidframework/runtime-utils/internal\";\n\nimport { FluidSerializer } from \"./serializer.js\";\n\n/**\n * Implementation of IFluidSerializer used by GC to visit all the handles in the DDS to collect its outbound routes\n *\n * @remarks - This is given to DDS code that typically produces a serialization of the data, which is then ignored.\n * All that is needed is getSerializedRoutes() to get the routes. This strategy could be optimized if needed.\n */\nexport class GCHandleVisitor extends FluidSerializer {\n\tprivate readonly visitedHandlePaths: Set<string> = new Set();\n\tpublic getVisitedHandlePaths(): string[] {\n\t\treturn [...this.visitedHandlePaths];\n\t}\n\n\tprotected bindAndEncodeHandle(handle: IFluidHandleInternal): ISerializedHandle {\n\t\tthis.visitedHandlePaths.add(handle.absolutePath);\n\n\t\t// Just return a dummy value. The serialization itself is not used.\n\t\t// It's especially important we don't bind since that has side effects that are irrelevant to GC.\n\t\treturn {\n\t\t\ttype: \"__fluid_handle__\",\n\t\t\turl: \"UNUSED (see GCHandleVisitor)\",\n\t\t};\n\t}\n}\n"]}
1
+ {"version":3,"file":"gcHandleVisitor.js","sourceRoot":"","sources":["../src/gcHandleVisitor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,mDAAkD;AAElD;;;;;GAKG;AACH,MAAa,eAAgB,SAAQ,+BAAe;IAApD;;QACkB,uBAAkB,GAAgB,IAAI,GAAG,EAAE,CAAC;IAe9D,CAAC;IAdO,qBAAqB;QAC3B,OAAO,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACrC,CAAC;IAES,mBAAmB,CAAC,MAA4B;QACzD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAEjD,mEAAmE;QACnE,iGAAiG;QACjG,OAAO;YACN,IAAI,EAAE,kBAAkB;YACxB,GAAG,EAAE,8BAA8B;SACnC,CAAC;IACH,CAAC;CACD;AAhBD,0CAgBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandleInternal } from \"@fluidframework/core-interfaces/internal\";\nimport type { ISerializedHandle } from \"@fluidframework/runtime-utils/internal\";\n\nimport { FluidSerializer } from \"./serializer.js\";\n\n/**\n * Implementation of IFluidSerializer used by GC to visit all the handles in the DDS to collect its outbound routes\n *\n * @remarks - This is given to DDS code that typically produces a serialization of the data, which is then ignored.\n * All that is needed is getSerializedRoutes() to get the routes. This strategy could be optimized if needed.\n */\nexport class GCHandleVisitor extends FluidSerializer {\n\tprivate readonly visitedHandlePaths: Set<string> = new Set();\n\tpublic getVisitedHandlePaths(): string[] {\n\t\treturn [...this.visitedHandlePaths];\n\t}\n\n\tprotected bindAndEncodeHandle(handle: IFluidHandleInternal): ISerializedHandle {\n\t\tthis.visitedHandlePaths.add(handle.absolutePath);\n\n\t\t// Just return a dummy value. The serialization itself is not used.\n\t\t// It's especially important we don't bind since that has side effects that are irrelevant to GC.\n\t\treturn {\n\t\t\ttype: \"__fluid_handle__\",\n\t\t\turl: \"UNUSED (see GCHandleVisitor)\",\n\t\t};\n\t}\n}\n"]}
package/dist/handle.d.ts CHANGED
@@ -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 IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
5
+ import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
6
6
  import { FluidObjectHandle } from "@fluidframework/datastore/internal";
7
7
  import type { IFluidDataStoreRuntimeExperimental } from "@fluidframework/datastore-definitions/internal";
8
- import { ISharedObject } from "./types.js";
8
+ import type { ISharedObject } from "./types.js";
9
9
  /**
10
10
  * Handle for a shared object. See also `SharedObjectHandle`.
11
11
  * Supports binding other handles to the underlying Shared Object (see {@link ISharedObjectHandle.bind}).
@@ -1 +1 @@
1
- {"version":3,"file":"handle.d.ts","sourceRoot":"","sources":["../src/handle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAGzG,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB,CAAC,aAAa,CAAC;IAC/E;;;;;OAKG;IACH,IAAI,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACzC;AAED;;;GAGG;AACH,wB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,CAAC;QAL7B,UAAK,GAAL,KAAK,CAAe;QAGtB,YAAO,GAAP,OAAO,CAAoC;QAlB7D;;WAEG;QACK,qBAAgB,GAAY,KAAK,CAAC;QAEzB,mBAAc,GAA8B,IAAI,GAAG,EAAE,CAAC;IAgBvE,CAAC;IAED;;;OAGG;IACI,WAAW;QACjB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,OAAO;QACR,CAAC;QAED,yCAAyC;QACzC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YAC1C,MAAM,CAAC,WAAW,EAAE,CAAC;QACtB,CAAC;QACD,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAE5B,yFAAyF;QACzF,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAE3B,8EAA8E;QAC9E,KAAK,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAEM,IAAI,CAAC,MAA4B;QACvC,mFAAmF;QACnF,8GAA8G;QAC9G,wEAAwE;QACxE,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,KAAK,IAAI,EAAE,CAAC;YACzC,OAAO;QACR,CAAC;QAED,8EAA8E;QAC9E,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;QACR,CAAC;QAED,mGAAmG;QACnG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACD;AA7FD,gDA6FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IFluidHandleInternal } from \"@fluidframework/core-interfaces/internal\";\nimport { FluidObjectHandle } from \"@fluidframework/datastore/internal\";\n// eslint-disable-next-line import/no-deprecated\nimport type { IFluidDataStoreRuntimeExperimental } from \"@fluidframework/datastore-definitions/internal\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils\";\n\nimport { ISharedObject } from \"./types.js\";\n\n/**\n * Handle for a shared object. See also `SharedObjectHandle`.\n * Supports binding other handles to the underlying Shared Object (see {@link ISharedObjectHandle.bind}).\n *\n * @internal\n */\nexport interface ISharedObjectHandle extends IFluidHandleInternal<ISharedObject> {\n\t/**\n\t * Binds the given handle to this DDS or attach the given handle if this DDS is attached.\n\t * A bound handle will also be attached once this DDS is attached.\n\t *\n\t * @param handle - The target handle to bind to this DDS\n\t */\n\tbind(handle: IFluidHandleInternal): void;\n}\n\n/**\n * Type guard for {@link ISharedObjectHandle}.\n * @internal\n */\nexport function isISharedObjectHandle(handle: unknown): handle is ISharedObjectHandle {\n\treturn isFluidHandle(handle) && typeof (handle as ISharedObjectHandle).bind === \"function\";\n}\n\n/**\n * Handle for a shared object (DDS).\n *\n * @remarks\n *\n * This object is used for already loaded (in-memory) shared objects.\n *\n * It provides a \"bind\" function that is expected to be invoked on all handles stored in this DDS,\n * ensuring the target object becomes attached along with this DDS.\n */\nexport class SharedObjectHandle\n\textends FluidObjectHandle<ISharedObject>\n\timplements ISharedObjectHandle\n{\n\t/**\n\t * Whether services have been attached for the associated shared object.\n\t */\n\tpublic get isAttached(): boolean {\n\t\treturn this.value.isAttached();\n\t}\n\n\t/**\n\t * Tells whether the object of this handle is visible in the container locally or globally.\n\t */\n\tprivate get isVisible(): boolean {\n\t\t/**\n\t\t * If the object of this handle is attached, it is visible in the container. Ideally, checking local visibility\n\t\t * should be enough for a handle. However, there are scenarios where the object becomes locally visible but the\n\t\t * handle does not know this - This will happen is attachGraph is never called on the handle. Couple of examples\n\t\t * where this can happen:\n\t\t *\n\t\t * 1. Handles to DDS other than the default handle won't know if the DDS becomes visible after the handle was\n\t\t * created.\n\t\t *\n\t\t * 2. Handles to root data stores will never know that it was visible because the handle will not be stores in\n\t\t * another DDS and so, attachGraph will never be called on it.\n\t\t */\n\t\treturn this.isAttached || this.isLocallyVisible;\n\t}\n\n\t/**\n\t * Tracks whether this handle is locally visible in the container.\n\t */\n\tprivate isLocallyVisible: boolean = false;\n\n\tprivate readonly pendingHandles: Set<IFluidHandleInternal> = new Set();\n\n\t/**\n\t * Creates a new SharedObjectHandle.\n\t * @param value - The shared object this handle is for.\n\t * @param path - The id of the shared object. It is also the path to this object relative to the routeContext.\n\t * @param routeContext - The parent {@link @fluidframework/core-interfaces#IFluidHandleContext} that has a route\n\t * to this handle.\n\t */\n\tconstructor(\n\t\tprotected readonly value: ISharedObject,\n\t\tpath: string,\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tprivate readonly runtime: IFluidDataStoreRuntimeExperimental,\n\t) {\n\t\tsuper(value, path, runtime.IFluidHandleContext);\n\t}\n\n\t/**\n\t * Attaches all bound handles first (which may in turn attach further handles), then attaches this handle.\n\t * When attaching the handle, it registers the associated shared object.\n\t */\n\tpublic attachGraph(): void {\n\t\tif (this.isVisible) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Recursively attach all pending handles\n\t\tthis.isLocallyVisible = true;\n\t\tfor (const handle of this.pendingHandles) {\n\t\t\thandle.attachGraph();\n\t\t}\n\t\tthis.pendingHandles.clear();\n\n\t\t// Bind this SharedObject to its context (typically the DataStore) so it attaches with it\n\t\tthis.value.bindToContext();\n\n\t\t// This will trigger the context (typically the DataStore) to attach its graph\n\t\tsuper.attachGraph();\n\t}\n\n\tpublic bind(handle: IFluidHandleInternal): void {\n\t\t// We don't bind handles in staging mode to defer the attachment of any new objects\n\t\t// until we've exited staging mode. This way if we discard changes or a new handle is not present in the final\n\t\t// committed state, we will never end up attaching the discarded object.\n\t\tif (this.runtime.inStagingMode === true) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If this handle is visible, attach the graph of the incoming handle as well.\n\t\tif (this.isVisible) {\n\t\t\thandle.attachGraph();\n\t\t\treturn;\n\t\t}\n\n\t\t// If this handle is not visible, we will attach it later when this handle's attachGraph is called.\n\t\tthis.pendingHandles.add(handle);\n\t}\n}\n"]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aAAa,EAAE,CAAC;QAE3B,8EAA8E;QAC9E,KAAK,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAEM,IAAI,CAAC,MAA4B;QACvC,mFAAmF;QACnF,8GAA8G;QAC9G,wEAAwE;QACxE,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,KAAK,IAAI,EAAE,CAAC;YACzC,OAAO;QACR,CAAC;QAED,8EAA8E;QAC9E,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;QACR,CAAC;QAED,mGAAmG;QACnG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACD;AA7FD,gDA6FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandleInternal } from \"@fluidframework/core-interfaces/internal\";\nimport { FluidObjectHandle } from \"@fluidframework/datastore/internal\";\n// eslint-disable-next-line import/no-deprecated\nimport type { IFluidDataStoreRuntimeExperimental } from \"@fluidframework/datastore-definitions/internal\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils\";\n\nimport type { ISharedObject } from \"./types.js\";\n\n/**\n * Handle for a shared object. See also `SharedObjectHandle`.\n * Supports binding other handles to the underlying Shared Object (see {@link ISharedObjectHandle.bind}).\n *\n * @internal\n */\nexport interface ISharedObjectHandle extends IFluidHandleInternal<ISharedObject> {\n\t/**\n\t * Binds the given handle to this DDS or attach the given handle if this DDS is attached.\n\t * A bound handle will also be attached once this DDS is attached.\n\t *\n\t * @param handle - The target handle to bind to this DDS\n\t */\n\tbind(handle: IFluidHandleInternal): void;\n}\n\n/**\n * Type guard for {@link ISharedObjectHandle}.\n * @internal\n */\nexport function isISharedObjectHandle(handle: unknown): handle is ISharedObjectHandle {\n\treturn isFluidHandle(handle) && typeof (handle as ISharedObjectHandle).bind === \"function\";\n}\n\n/**\n * Handle for a shared object (DDS).\n *\n * @remarks\n *\n * This object is used for already loaded (in-memory) shared objects.\n *\n * It provides a \"bind\" function that is expected to be invoked on all handles stored in this DDS,\n * ensuring the target object becomes attached along with this DDS.\n */\nexport class SharedObjectHandle\n\textends FluidObjectHandle<ISharedObject>\n\timplements ISharedObjectHandle\n{\n\t/**\n\t * Whether services have been attached for the associated shared object.\n\t */\n\tpublic get isAttached(): boolean {\n\t\treturn this.value.isAttached();\n\t}\n\n\t/**\n\t * Tells whether the object of this handle is visible in the container locally or globally.\n\t */\n\tprivate get isVisible(): boolean {\n\t\t/**\n\t\t * If the object of this handle is attached, it is visible in the container. Ideally, checking local visibility\n\t\t * should be enough for a handle. However, there are scenarios where the object becomes locally visible but the\n\t\t * handle does not know this - This will happen is attachGraph is never called on the handle. Couple of examples\n\t\t * where this can happen:\n\t\t *\n\t\t * 1. Handles to DDS other than the default handle won't know if the DDS becomes visible after the handle was\n\t\t * created.\n\t\t *\n\t\t * 2. Handles to root data stores will never know that it was visible because the handle will not be stores in\n\t\t * another DDS and so, attachGraph will never be called on it.\n\t\t */\n\t\treturn this.isAttached || this.isLocallyVisible;\n\t}\n\n\t/**\n\t * Tracks whether this handle is locally visible in the container.\n\t */\n\tprivate isLocallyVisible: boolean = false;\n\n\tprivate readonly pendingHandles: Set<IFluidHandleInternal> = new Set();\n\n\t/**\n\t * Creates a new SharedObjectHandle.\n\t * @param value - The shared object this handle is for.\n\t * @param path - The id of the shared object. It is also the path to this object relative to the routeContext.\n\t * @param routeContext - The parent {@link @fluidframework/core-interfaces#IFluidHandleContext} that has a route\n\t * to this handle.\n\t */\n\tconstructor(\n\t\tprotected readonly value: ISharedObject,\n\t\tpath: string,\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tprivate readonly runtime: IFluidDataStoreRuntimeExperimental,\n\t) {\n\t\tsuper(value, path, runtime.IFluidHandleContext);\n\t}\n\n\t/**\n\t * Attaches all bound handles first (which may in turn attach further handles), then attaches this handle.\n\t * When attaching the handle, it registers the associated shared object.\n\t */\n\tpublic attachGraph(): void {\n\t\tif (this.isVisible) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Recursively attach all pending handles\n\t\tthis.isLocallyVisible = true;\n\t\tfor (const handle of this.pendingHandles) {\n\t\t\thandle.attachGraph();\n\t\t}\n\t\tthis.pendingHandles.clear();\n\n\t\t// Bind this SharedObject to its context (typically the DataStore) so it attaches with it\n\t\tthis.value.bindToContext();\n\n\t\t// This will trigger the context (typically the DataStore) to attach its graph\n\t\tsuper.attachGraph();\n\t}\n\n\tpublic bind(handle: IFluidHandleInternal): void {\n\t\t// We don't bind handles in staging mode to defer the attachment of any new objects\n\t\t// until we've exited staging mode. This way if we discard changes or a new handle is not present in the final\n\t\t// committed state, we will never end up attaching the discarded object.\n\t\tif (this.runtime.inStagingMode === true) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If this handle is visible, attach the graph of the incoming handle as well.\n\t\tif (this.isVisible) {\n\t\t\thandle.attachGraph();\n\t\t\treturn;\n\t\t}\n\n\t\t// If this handle is not visible, we will attach it later when this handle's attachGraph is called.\n\t\tthis.pendingHandles.add(handle);\n\t}\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -2,11 +2,11 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { ISharedObjectHandle, isISharedObjectHandle } from "./handle.js";
6
- export { FluidSerializer, IFluidSerializer } from "./serializer.js";
7
- export { SharedObject, SharedObjectCore, ISharedObjectKind, SharedObjectKind, createSharedObjectKind, } from "./sharedObject.js";
8
- export { ISharedObject, ISharedObjectEvents } from "./types.js";
5
+ export { type ISharedObjectHandle, isISharedObjectHandle } from "./handle.js";
6
+ export { FluidSerializer, type IFluidSerializer } from "./serializer.js";
7
+ export { SharedObject, SharedObjectCore, type ISharedObjectKind, type SharedObjectKind, createSharedObjectKind, } from "./sharedObject.js";
8
+ export type { ISharedObject, ISharedObjectEvents } from "./types.js";
9
9
  export { createSingleBlobSummary, makeHandlesSerializable, parseHandles, serializeHandles, bindHandles, type IChannelView, } from "./utils.js";
10
10
  export { ValueType } from "./valueType.js";
11
- export { SharedKernel, thisWrap, KernelArgs, makeSharedObjectKind, SharedKernelFactory, FactoryOut, SharedObjectOptions, mergeAPIs, } from "./sharedObjectKernel.js";
11
+ export { type SharedKernel, thisWrap, type KernelArgs, makeSharedObjectKind, type SharedKernelFactory, type FactoryOut, type SharedObjectOptions, mergeAPIs, } from "./sharedObjectKernel.js";
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACN,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EACN,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,KAAK,YAAY,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACN,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,SAAS,GACT,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACN,YAAY,EACZ,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EACN,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,KAAK,YAAY,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACN,KAAK,YAAY,EACjB,QAAQ,EACR,KAAK,UAAU,EACf,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,SAAS,GACT,MAAM,yBAAyB,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAAyE;AAA3C,kHAAA,qBAAqB,OAAA;AACnD,iDAAoE;AAA3D,gHAAA,eAAe,OAAA;AACxB,qDAM2B;AAL1B,+GAAA,YAAY,OAAA;AACZ,mHAAA,gBAAgB,OAAA;AAGhB,yHAAA,sBAAsB,OAAA;AAGvB,uCAOoB;AANnB,mHAAA,uBAAuB,OAAA;AACvB,mHAAA,uBAAuB,OAAA;AACvB,wGAAA,YAAY,OAAA;AACZ,4GAAA,gBAAgB,OAAA;AAChB,uGAAA,WAAW,OAAA;AAGZ,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,iEASiC;AAPhC,iHAAA,QAAQ,OAAA;AAER,6HAAA,oBAAoB,OAAA;AAIpB,kHAAA,SAAS,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ISharedObjectHandle, isISharedObjectHandle } from \"./handle.js\";\nexport { FluidSerializer, IFluidSerializer } from \"./serializer.js\";\nexport {\n\tSharedObject,\n\tSharedObjectCore,\n\tISharedObjectKind,\n\tSharedObjectKind,\n\tcreateSharedObjectKind,\n} from \"./sharedObject.js\";\nexport { ISharedObject, ISharedObjectEvents } from \"./types.js\";\nexport {\n\tcreateSingleBlobSummary,\n\tmakeHandlesSerializable,\n\tparseHandles,\n\tserializeHandles,\n\tbindHandles,\n\ttype IChannelView,\n} from \"./utils.js\";\nexport { ValueType } from \"./valueType.js\";\nexport {\n\tSharedKernel,\n\tthisWrap,\n\tKernelArgs,\n\tmakeSharedObjectKind,\n\tSharedKernelFactory,\n\tFactoryOut,\n\tSharedObjectOptions,\n\tmergeAPIs,\n} from \"./sharedObjectKernel.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAA8E;AAA3C,kHAAA,qBAAqB,OAAA;AACxD,iDAAyE;AAAhE,gHAAA,eAAe,OAAA;AACxB,qDAM2B;AAL1B,+GAAA,YAAY,OAAA;AACZ,mHAAA,gBAAgB,OAAA;AAGhB,yHAAA,sBAAsB,OAAA;AAGvB,uCAOoB;AANnB,mHAAA,uBAAuB,OAAA;AACvB,mHAAA,uBAAuB,OAAA;AACvB,wGAAA,YAAY,OAAA;AACZ,4GAAA,gBAAgB,OAAA;AAChB,uGAAA,WAAW,OAAA;AAGZ,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,iEASiC;AAPhC,iHAAA,QAAQ,OAAA;AAER,6HAAA,oBAAoB,OAAA;AAIpB,kHAAA,SAAS,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { type ISharedObjectHandle, isISharedObjectHandle } from \"./handle.js\";\nexport { FluidSerializer, type IFluidSerializer } from \"./serializer.js\";\nexport {\n\tSharedObject,\n\tSharedObjectCore,\n\ttype ISharedObjectKind,\n\ttype SharedObjectKind,\n\tcreateSharedObjectKind,\n} from \"./sharedObject.js\";\nexport type { ISharedObject, ISharedObjectEvents } from \"./types.js\";\nexport {\n\tcreateSingleBlobSummary,\n\tmakeHandlesSerializable,\n\tparseHandles,\n\tserializeHandles,\n\tbindHandles,\n\ttype IChannelView,\n} from \"./utils.js\";\nexport { ValueType } from \"./valueType.js\";\nexport {\n\ttype SharedKernel,\n\tthisWrap,\n\ttype KernelArgs,\n\tmakeSharedObjectKind,\n\ttype SharedKernelFactory,\n\ttype FactoryOut,\n\ttype SharedObjectOptions,\n\tmergeAPIs,\n} from \"./sharedObjectKernel.js\";\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/shared-object-base";
8
- export declare const pkgVersion = "2.51.0-347100";
8
+ export declare const pkgVersion = "2.51.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,uCAAuC,CAAC;AAC5D,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,uCAAuC,CAAC;AAC5D,eAAO,MAAM,UAAU,WAAW,CAAC"}
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/shared-object-base";
11
- exports.pkgVersion = "2.51.0-347100";
11
+ exports.pkgVersion = "2.51.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,oCAAoC,CAAC;AAC/C,QAAA,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/shared-object-base\";\nexport const pkgVersion = \"2.51.0-347100\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,oCAAoC,CAAC;AAC/C,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/shared-object-base\";\nexport const pkgVersion = \"2.51.0\";\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 { IFluidHandle } from "@fluidframework/core-interfaces";
6
- import { IFluidHandleContext, type IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
5
+ import type { IFluidHandle } from "@fluidframework/core-interfaces";
6
+ import type { IFluidHandleContext, IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
7
7
  import { type ISerializedHandle } from "@fluidframework/runtime-utils/internal";
8
8
  import { type ISharedObjectHandle } from "./handle.js";
9
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;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I,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC1C,8FAA8F;gBAC9F,+FAA+F;gBAC/F,8DAA8D;gBAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;gBAEnE,kGAAkG;gBAClG,+FAA+F;gBAC/F,wDAAwD;gBACxD,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;oBACxB,qFAAqF;oBACrF,KAAK,KAAK,IAAA,6BAAkB,EAAC,KAAK,CAAC,CAAC;oBAEpC,+EAA+E;oBAC/E,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;gBACvB,CAAC;YACF,CAAC;QACF,CAAC;QACD,OAAO,KAAK,IAAI,KAAK,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACO,mBAAmB,CAC5B,MAA4B,EAC5B,IAAyB;QAEzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClB,OAAO,IAAA,uCAA4B,EAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;CACD;AAvKD,0CAuKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport {\n\tIFluidHandleContext,\n\ttype IFluidHandleInternal,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { assert, shallowCloneObject } from \"@fluidframework/core-utils/internal\";\nimport {\n\tencodeHandleForSerialization,\n\tgenerateHandleContextPath,\n\tisSerializedHandle,\n\tisFluidHandle,\n\ttoFluidHandleInternal,\n\ttype ISerializedHandle,\n\tRemoteFluidObjectHandle,\n} from \"@fluidframework/runtime-utils/internal\";\n\nimport { isISharedObjectHandle, type ISharedObjectHandle } from \"./handle.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IFluidSerializer {\n\t/**\n\t * Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object\n\t * where any embedded IFluidHandles have been replaced with a serializable form.\n\t *\n\t * The original `input` object is not mutated. This method will shallowly clones all objects in the path from\n\t * the root to any replaced handles. (If no handles are found, returns the original object.)\n\t */\n\tencode(value: unknown, bind: IFluidHandle): unknown;\n\n\t/**\n\t * Given a fully-jsonable object tree that may have encoded handle objects embedded within, will return an\n\t * equivalent object tree where any encoded IFluidHandles have been replaced with their decoded form.\n\t *\n\t * The original `input` object is not mutated. This method will shallowly clone all objects in the path from\n\t * the root to any replaced handles. (If no handles are found, returns the original object.)\n\t *\n\t * The decoded handles are implicitly bound to the handle context of this serializer.\n\t */\n\tdecode(input: unknown): unknown;\n\n\t/**\n\t * Stringifies a given value. Converts any IFluidHandle to its stringified equivalent.\n\t */\n\tstringify(value: unknown, bind: IFluidHandle): string;\n\n\t/**\n\t * Parses the given JSON input string and returns the JavaScript object defined by it. Any Fluid\n\t * handles will be realized as part of the parse\n\t */\n\tparse(value: string): unknown;\n}\n\n/**\n * Data Store serializer implementation\n * @internal\n */\nexport class FluidSerializer implements IFluidSerializer {\n\tprivate readonly root: IFluidHandleContext;\n\n\tpublic constructor(private readonly context: IFluidHandleContext) {\n\t\tthis.root = this.context;\n\t\twhile (this.root.routeContext !== undefined) {\n\t\t\tthis.root = this.root.routeContext;\n\t\t}\n\t}\n\n\tpublic get IFluidSerializer(): IFluidSerializer {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Given a mostly-jsonable object tree that may have handle objects embedded within, will return a\n\t * fully-jsonable object tree where any embedded IFluidHandles have been replaced with a serializable form.\n\t *\n\t * The original `input` object is not mutated. This method will shallowly clone all objects in the path from\n\t * the root to any replaced handles. (If no handles are found, returns the original object.)\n\t *\n\t * Any unbound handles encountered are bound to the provided IFluidHandle.\n\t */\n\tpublic encode(input: unknown, bind: IFluidHandleInternal): unknown {\n\t\tassert(isISharedObjectHandle(bind), 0xb8c /* bind must be an ISharedObjectHandle */);\n\t\t// If the given 'input' cannot contain handles, return it immediately. Otherwise,\n\t\t// return the result of 'recursivelyReplace()'.\n\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\treturn !!input && typeof input === \"object\"\n\t\t\t? this.recursivelyReplace(input, this.encodeValue.bind(this), bind)\n\t\t\t: input;\n\t}\n\n\t/**\n\t * Given a fully-jsonable object tree that may have encoded handle objects embedded within, will return an\n\t * equivalent object tree where any encoded IFluidHandles have been replaced with their decoded form.\n\t *\n\t * The original `input` object is not mutated. This method will shallowly clone all objects in the path from\n\t * the root to any replaced handles. (If no handles are found, returns the original object.)\n\t *\n\t * The decoded handles are implicitly bound to the handle context of this serializer.\n\t */\n\tpublic decode(input: unknown): unknown {\n\t\t// If the given 'input' cannot contain handles, return it immediately. Otherwise,\n\t\t// return the result of 'recursivelyReplace()'.\n\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\treturn !!input && typeof input === \"object\"\n\t\t\t? this.recursivelyReplace(input, this.decodeValue.bind(this))\n\t\t\t: input;\n\t}\n\n\t/**\n\t * Serializes the input object into a JSON string.\n\t * Any IFluidHandles in the object will be replaced with their serialized form before stringify,\n\t * being bound to the given bind context in the process.\n\t */\n\tpublic stringify(input: unknown, bind: IFluidHandle): string {\n\t\tassert(isISharedObjectHandle(bind), 0xb8d /* bind must be an ISharedObjectHandle */);\n\t\treturn JSON.stringify(input, (key, value) => this.encodeValue(value, bind));\n\t}\n\n\t/**\n\t * Parses the serialized data - context must match the context with which the JSON was stringified\n\t */\n\tpublic parse(input: string): unknown {\n\t\treturn JSON.parse(input, (key, value) => this.decodeValue(value));\n\t}\n\n\t/**\n\t * If the given 'value' is an IFluidHandle, returns the encoded IFluidHandle.\n\t * Otherwise returns the original 'value'. Used by 'encode()' and 'stringify()'.\n\t */\n\tprotected encodeValue(value: unknown, bind?: ISharedObjectHandle): unknown {\n\t\t// If 'value' is an IFluidHandle return its encoded form.\n\t\tif (isFluidHandle(value)) {\n\t\t\tassert(bind !== undefined, 0xa93 /* Cannot encode a handle without a bind context */);\n\t\t\treturn this.bindAndEncodeHandle(toFluidHandleInternal(value), bind);\n\t\t}\n\t\treturn value;\n\t}\n\n\t/**\n\t * If the given 'value' is an encoded IFluidHandle, returns the decoded IFluidHandle.\n\t * Otherwise returns the original 'value'. Used by 'decode()' and 'parse()'.\n\t */\n\tprotected decodeValue(value: unknown): unknown {\n\t\t// If 'value' is a serialized IFluidHandle return the deserialized result.\n\t\tif (isSerializedHandle(value)) {\n\t\t\t// Old documents may have handles with relative path in their summaries. Convert these to absolute\n\t\t\t// paths. This will ensure that future summaries will have absolute paths for these handles.\n\t\t\tconst absolutePath = value.url.startsWith(\"/\")\n\t\t\t\t? value.url\n\t\t\t\t: generateHandleContextPath(value.url, this.context);\n\n\t\t\treturn new RemoteFluidObjectHandle(\n\t\t\t\tabsolutePath,\n\t\t\t\tthis.root,\n\t\t\t\tvalue.payloadPending === true,\n\t\t\t);\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t}\n\n\t/**\n\t * Invoked for non-null objects to recursively replace references to IFluidHandles.\n\t * Clones as-needed to avoid mutating the `input` object. If no IFluidHandles are present,\n\t * returns the original `input`.\n\t */\n\tprivate recursivelyReplace<TContext = unknown>(\n\t\tinput: object,\n\t\treplacer: (input: unknown, context?: TContext) => unknown,\n\t\tcontext?: TContext,\n\t): unknown {\n\t\t// Note: Caller is responsible for ensuring that `input` is defined / non-null.\n\t\t// (Required for Object.keys() below.)\n\n\t\t// Execute the `replace` on the current input. Note that Caller is responsible for ensuring that `input`\n\t\t// is a non-null object.\n\t\tconst maybeReplaced = replacer(input, context);\n\n\t\t// If either input or the replaced result is a Fluid Handle, there is no need to descend further.\n\t\t// IFluidHandles are always leaves in the object graph, and the code below cannot deal with IFluidHandle's structure.\n\t\tif (isFluidHandle(input) || isFluidHandle(maybeReplaced)) {\n\t\t\treturn maybeReplaced;\n\t\t}\n\n\t\t// Otherwise descend into the object graph looking for IFluidHandle instances.\n\t\tlet clone: object | undefined;\n\t\tfor (const key of Object.keys(input)) {\n\t\t\tconst value: unknown = input[key];\n\t\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\t\tif (!!value && typeof value === \"object\") {\n\t\t\t\t// Note: Except for IFluidHandle, `input` must not contain circular references (as object must\n\t\t\t\t// be JSON serializable.) Therefore, guarding against infinite recursion here would only\n\t\t\t\t// lead to a later error when attempting to stringify().\n\t\t\t\tconst replaced = this.recursivelyReplace(value, replacer, context);\n\n\t\t\t\t// If the `replaced` object is different than the original `value` then the subgraph contained one\n\t\t\t\t// or more handles. If this happens, we need to return a clone of the `input` object where the\n\t\t\t\t// current property is replaced by the `replaced` value.\n\t\t\t\tif (replaced !== value) {\n\t\t\t\t\t// Lazily create a shallow clone of the `input` object if we haven't done so already.\n\t\t\t\t\tclone ??= shallowCloneObject(input);\n\n\t\t\t\t\t// Overwrite the current property `key` in the clone with the `replaced` value.\n\t\t\t\t\tclone[key] = replaced;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn clone ?? input;\n\t}\n\n\t/**\n\t * Encodes the given IFluidHandle into a JSON-serializable form,\n\t * also binding it to another node to ensure it attaches at the right time.\n\t * @param handle - The IFluidHandle to serialize.\n\t * @param bind - The binding context for the handle (the handle will become attached whenever this context is attached).\n\t * @returns The serialized handle.\n\t */\n\tprotected bindAndEncodeHandle(\n\t\thandle: IFluidHandleInternal,\n\t\tbind: ISharedObjectHandle,\n\t): ISerializedHandle {\n\t\tbind.bind(handle);\n\t\treturn encodeHandleForSerialization(handle);\n\t}\n}\n"]}
1
+ {"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,kEAAiF;AACjF,qEAQgD;AAEhD,2CAA8E;AAuC9E;;;GAGG;AACH,MAAa,eAAe;IAG3B,YAAoC,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;QAC/D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;QACzB,OAAO,IAAI,CAAC,I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C;QAE/C,iGAAiG;QACjG,qHAAqH;QACrH,IAAI,IAAA,wBAAa,EAAC,KAAK,CAAC,IAAI,IAAA,wBAAa,EAAC,aAAa,CAAC,EAAE,CAAC;YAC1D,OAAO,aAAa,CAAC;QACtB,CAAC;QAED,8EAA8E;QAC9E,IAAI,KAAyB,CAAC;QAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACtC,MAAM,KAAK,GAAY,KAAK,CAAC,GAAG,CAAC,CAAC;YAClC,yEAAyE;YACzE,IAAI,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC1C,8FAA8F;gBAC9F,+FAA+F;gBAC/F,8DAA8D;gBAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;gBAEnE,kGAAkG;gBAClG,+FAA+F;gBAC/F,wDAAwD;gBACxD,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;oBACxB,qFAAqF;oBACrF,KAAK,KAAK,IAAA,6BAAkB,EAAC,KAAK,CAAC,CAAC;oBAEpC,+EAA+E;oBAC/E,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;gBACvB,CAAC;YACF,CAAC;QACF,CAAC;QACD,OAAO,KAAK,IAAI,KAAK,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACO,mBAAmB,CAC5B,MAA4B,EAC5B,IAAyB;QAEzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClB,OAAO,IAAA,uCAA4B,EAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;CACD;AAvKD,0CAuKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidHandleContext,\n\tIFluidHandleInternal,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { assert, shallowCloneObject } from \"@fluidframework/core-utils/internal\";\nimport {\n\tencodeHandleForSerialization,\n\tgenerateHandleContextPath,\n\tisSerializedHandle,\n\tisFluidHandle,\n\ttoFluidHandleInternal,\n\ttype ISerializedHandle,\n\tRemoteFluidObjectHandle,\n} from \"@fluidframework/runtime-utils/internal\";\n\nimport { isISharedObjectHandle, type ISharedObjectHandle } from \"./handle.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IFluidSerializer {\n\t/**\n\t * Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object\n\t * where any embedded IFluidHandles have been replaced with a serializable form.\n\t *\n\t * The original `input` object is not mutated. This method will shallowly clones all objects in the path from\n\t * the root to any replaced handles. (If no handles are found, returns the original object.)\n\t */\n\tencode(value: unknown, bind: IFluidHandle): unknown;\n\n\t/**\n\t * Given a fully-jsonable object tree that may have encoded handle objects embedded within, will return an\n\t * equivalent object tree where any encoded IFluidHandles have been replaced with their decoded form.\n\t *\n\t * The original `input` object is not mutated. This method will shallowly clone all objects in the path from\n\t * the root to any replaced handles. (If no handles are found, returns the original object.)\n\t *\n\t * The decoded handles are implicitly bound to the handle context of this serializer.\n\t */\n\tdecode(input: unknown): unknown;\n\n\t/**\n\t * Stringifies a given value. Converts any IFluidHandle to its stringified equivalent.\n\t */\n\tstringify(value: unknown, bind: IFluidHandle): string;\n\n\t/**\n\t * Parses the given JSON input string and returns the JavaScript object defined by it. Any Fluid\n\t * handles will be realized as part of the parse\n\t */\n\tparse(value: string): unknown;\n}\n\n/**\n * Data Store serializer implementation\n * @internal\n */\nexport class FluidSerializer implements IFluidSerializer {\n\tprivate readonly root: IFluidHandleContext;\n\n\tpublic constructor(private readonly context: IFluidHandleContext) {\n\t\tthis.root = this.context;\n\t\twhile (this.root.routeContext !== undefined) {\n\t\t\tthis.root = this.root.routeContext;\n\t\t}\n\t}\n\n\tpublic get IFluidSerializer(): IFluidSerializer {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Given a mostly-jsonable object tree that may have handle objects embedded within, will return a\n\t * fully-jsonable object tree where any embedded IFluidHandles have been replaced with a serializable form.\n\t *\n\t * The original `input` object is not mutated. This method will shallowly clone all objects in the path from\n\t * the root to any replaced handles. (If no handles are found, returns the original object.)\n\t *\n\t * Any unbound handles encountered are bound to the provided IFluidHandle.\n\t */\n\tpublic encode(input: unknown, bind: IFluidHandleInternal): unknown {\n\t\tassert(isISharedObjectHandle(bind), 0xb8c /* bind must be an ISharedObjectHandle */);\n\t\t// If the given 'input' cannot contain handles, return it immediately. Otherwise,\n\t\t// return the result of 'recursivelyReplace()'.\n\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\treturn !!input && typeof input === \"object\"\n\t\t\t? this.recursivelyReplace(input, this.encodeValue.bind(this), bind)\n\t\t\t: input;\n\t}\n\n\t/**\n\t * Given a fully-jsonable object tree that may have encoded handle objects embedded within, will return an\n\t * equivalent object tree where any encoded IFluidHandles have been replaced with their decoded form.\n\t *\n\t * The original `input` object is not mutated. This method will shallowly clone all objects in the path from\n\t * the root to any replaced handles. (If no handles are found, returns the original object.)\n\t *\n\t * The decoded handles are implicitly bound to the handle context of this serializer.\n\t */\n\tpublic decode(input: unknown): unknown {\n\t\t// If the given 'input' cannot contain handles, return it immediately. Otherwise,\n\t\t// return the result of 'recursivelyReplace()'.\n\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\treturn !!input && typeof input === \"object\"\n\t\t\t? this.recursivelyReplace(input, this.decodeValue.bind(this))\n\t\t\t: input;\n\t}\n\n\t/**\n\t * Serializes the input object into a JSON string.\n\t * Any IFluidHandles in the object will be replaced with their serialized form before stringify,\n\t * being bound to the given bind context in the process.\n\t */\n\tpublic stringify(input: unknown, bind: IFluidHandle): string {\n\t\tassert(isISharedObjectHandle(bind), 0xb8d /* bind must be an ISharedObjectHandle */);\n\t\treturn JSON.stringify(input, (key, value) => this.encodeValue(value, bind));\n\t}\n\n\t/**\n\t * Parses the serialized data - context must match the context with which the JSON was stringified\n\t */\n\tpublic parse(input: string): unknown {\n\t\treturn JSON.parse(input, (key, value) => this.decodeValue(value));\n\t}\n\n\t/**\n\t * If the given 'value' is an IFluidHandle, returns the encoded IFluidHandle.\n\t * Otherwise returns the original 'value'. Used by 'encode()' and 'stringify()'.\n\t */\n\tprotected encodeValue(value: unknown, bind?: ISharedObjectHandle): unknown {\n\t\t// If 'value' is an IFluidHandle return its encoded form.\n\t\tif (isFluidHandle(value)) {\n\t\t\tassert(bind !== undefined, 0xa93 /* Cannot encode a handle without a bind context */);\n\t\t\treturn this.bindAndEncodeHandle(toFluidHandleInternal(value), bind);\n\t\t}\n\t\treturn value;\n\t}\n\n\t/**\n\t * If the given 'value' is an encoded IFluidHandle, returns the decoded IFluidHandle.\n\t * Otherwise returns the original 'value'. Used by 'decode()' and 'parse()'.\n\t */\n\tprotected decodeValue(value: unknown): unknown {\n\t\t// If 'value' is a serialized IFluidHandle return the deserialized result.\n\t\tif (isSerializedHandle(value)) {\n\t\t\t// Old documents may have handles with relative path in their summaries. Convert these to absolute\n\t\t\t// paths. This will ensure that future summaries will have absolute paths for these handles.\n\t\t\tconst absolutePath = value.url.startsWith(\"/\")\n\t\t\t\t? value.url\n\t\t\t\t: generateHandleContextPath(value.url, this.context);\n\n\t\t\treturn new RemoteFluidObjectHandle(\n\t\t\t\tabsolutePath,\n\t\t\t\tthis.root,\n\t\t\t\tvalue.payloadPending === true,\n\t\t\t);\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t}\n\n\t/**\n\t * Invoked for non-null objects to recursively replace references to IFluidHandles.\n\t * Clones as-needed to avoid mutating the `input` object. If no IFluidHandles are present,\n\t * returns the original `input`.\n\t */\n\tprivate recursivelyReplace<TContext = unknown>(\n\t\tinput: object,\n\t\treplacer: (input: unknown, context?: TContext) => unknown,\n\t\tcontext?: TContext,\n\t): unknown {\n\t\t// Note: Caller is responsible for ensuring that `input` is defined / non-null.\n\t\t// (Required for Object.keys() below.)\n\n\t\t// Execute the `replace` on the current input. Note that Caller is responsible for ensuring that `input`\n\t\t// is a non-null object.\n\t\tconst maybeReplaced = replacer(input, context);\n\n\t\t// If either input or the replaced result is a Fluid Handle, there is no need to descend further.\n\t\t// IFluidHandles are always leaves in the object graph, and the code below cannot deal with IFluidHandle's structure.\n\t\tif (isFluidHandle(input) || isFluidHandle(maybeReplaced)) {\n\t\t\treturn maybeReplaced;\n\t\t}\n\n\t\t// Otherwise descend into the object graph looking for IFluidHandle instances.\n\t\tlet clone: object | undefined;\n\t\tfor (const key of Object.keys(input)) {\n\t\t\tconst value: unknown = input[key];\n\t\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\t\tif (!!value && typeof value === \"object\") {\n\t\t\t\t// Note: Except for IFluidHandle, `input` must not contain circular references (as object must\n\t\t\t\t// be JSON serializable.) Therefore, guarding against infinite recursion here would only\n\t\t\t\t// lead to a later error when attempting to stringify().\n\t\t\t\tconst replaced = this.recursivelyReplace(value, replacer, context);\n\n\t\t\t\t// If the `replaced` object is different than the original `value` then the subgraph contained one\n\t\t\t\t// or more handles. If this happens, we need to return a clone of the `input` object where the\n\t\t\t\t// current property is replaced by the `replaced` value.\n\t\t\t\tif (replaced !== value) {\n\t\t\t\t\t// Lazily create a shallow clone of the `input` object if we haven't done so already.\n\t\t\t\t\tclone ??= shallowCloneObject(input);\n\n\t\t\t\t\t// Overwrite the current property `key` in the clone with the `replaced` value.\n\t\t\t\t\tclone[key] = replaced;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn clone ?? input;\n\t}\n\n\t/**\n\t * Encodes the given IFluidHandle into a JSON-serializable form,\n\t * also binding it to another node to ensure it attaches at the right time.\n\t * @param handle - The IFluidHandle to serialize.\n\t * @param bind - The binding context for the handle (the handle will become attached whenever this context is attached).\n\t * @returns The serialized handle.\n\t */\n\tprotected bindAndEncodeHandle(\n\t\thandle: IFluidHandleInternal,\n\t\tbind: ISharedObjectHandle,\n\t): ISerializedHandle {\n\t\tbind.bind(handle);\n\t\treturn encodeHandleForSerialization(handle);\n\t}\n}\n"]}
@@ -2,16 +2,16 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { EventEmitterEventType } from "@fluid-internal/client-utils";
5
+ import type { EventEmitterEventType } from "@fluid-internal/client-utils";
6
6
  import type { IDeltaManager } from "@fluidframework/container-definitions/internal";
7
- import { type ErasedType } from "@fluidframework/core-interfaces";
8
- import { type IFluidHandleInternal, type IFluidLoadable } from "@fluidframework/core-interfaces/internal";
9
- import { IChannelServices, IChannelStorageService, IChannelAttributes, type IChannelFactory, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/internal";
10
- import { type IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
11
- import { IExperimentalIncrementalSummaryContext, ISummaryTreeWithStats, ITelemetryContext, IGarbageCollectionData, type IRuntimeMessageCollection } from "@fluidframework/runtime-definitions/internal";
12
- import { ITelemetryLoggerExt, EventEmitterWithErrorHandling } from "@fluidframework/telemetry-utils/internal";
13
- import { IFluidSerializer } from "./serializer.js";
14
- import { ISharedObject, ISharedObjectEvents } from "./types.js";
7
+ import type { ErasedType } from "@fluidframework/core-interfaces";
8
+ import type { IFluidHandleInternal, IFluidLoadable } from "@fluidframework/core-interfaces/internal";
9
+ import type { IChannelServices, IChannelStorageService, IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/internal";
10
+ import type { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
11
+ import { type IExperimentalIncrementalSummaryContext, type ISummaryTreeWithStats, type ITelemetryContext, type IGarbageCollectionData, type IRuntimeMessageCollection } from "@fluidframework/runtime-definitions/internal";
12
+ import { type ITelemetryLoggerExt, EventEmitterWithErrorHandling } from "@fluidframework/telemetry-utils/internal";
13
+ import { type IFluidSerializer } from "./serializer.js";
14
+ import type { ISharedObject, ISharedObjectEvents } from "./types.js";
15
15
  /**
16
16
  * Base class from which all {@link ISharedObject|shared objects} derive.
17
17
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"sharedObject.d.ts","sourceRoot":"","sources":["../src/sharedObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACN,gBAAgB,EAChB,sBAAsB,EAEtB,kBAAkB,EAClB,KAAK,eAAe,EACpB,sBAAsB,EAGtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACN,KAAK,gBAAgB,EACrB,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACN,sCAAsC,EACtC,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EAGtB,KAAK,yBAAyB,EAE9B,MAAM,8CAA8C,CAAC;AAKtD,OAAO,EACN,mBAAmB,EAEnB,6BAA6B,EAS7B,MAAM,0CAA0C,CAAC;AAKlD,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAYhE;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,gBAAgB,CACpC,MAAM,SAAS,mBAAmB,GAAG,mBAAmB,CAEzD,SAAQ,6BAA6B,CAAC,MAAM,CAC5C,YAAW,aAAa,CAAC,MAAM,CAAC;IAoD/B;;OAEG;IACI,EAAE,EAAE,MAAM;IACjB;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,sBAAsB;IACzC;;OAEG;aACa,UAAU,EAAE,kBAAkB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