@fluid-experimental/dds-interceptions 2.0.0-dev-rc.3.0.0.254513 → 2.0.0-dev-rc.3.0.0.254866

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.
@@ -6,7 +6,7 @@
6
6
 
7
7
  import { IDirectory } from '@fluidframework/map/internal';
8
8
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
9
- import { ISharedMap } from '@fluidframework/map';
9
+ import { ISharedMap } from '@fluidframework/map/internal';
10
10
  import * as MergeTree from '@fluidframework/merge-tree/internal';
11
11
  import { SharedString } from '@fluidframework/sequence/internal';
12
12
 
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/dist/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -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 { ISharedMap } from "@fluidframework/map";
5
+ import { ISharedMap } from "@fluidframework/map/internal";
6
6
  import { IFluidDataStoreContext } from "@fluidframework/runtime-definitions/internal";
7
7
  /**
8
8
  * - Create a new object from the passed SharedMap.
@@ -1 +1 @@
1
- {"version":3,"file":"sharedMapWithInterception.d.ts","sourceRoot":"","sources":["../../src/map/sharedMapWithInterception.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC9C,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,sBAAsB,EAC/B,uBAAuB,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,GAC/E,UAAU,CA6BZ"}
1
+ {"version":3,"file":"sharedMapWithInterception.d.ts","sourceRoot":"","sources":["../../src/map/sharedMapWithInterception.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC9C,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,sBAAsB,EAC/B,uBAAuB,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,GAC/E,UAAU,CA6BZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"sharedMapWithInterception.js","sourceRoot":"","sources":["../../src/map/sharedMapWithInterception.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D;;;;;;;;;;;;;;GAcG;AACH,SAAgB,+BAA+B,CAC9C,SAAqB,EACrB,OAA+B,EAC/B,uBAAiF;IAEjF,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAE3D,uGAAuG;IACvG,IAAI,iBAAiB,GAAY,KAAK,CAAC;IAEvC,yBAAyB,CAAC,GAAG,GAAG,CAAC,GAAW,EAAE,KAAU,EAAE,EAAE;QAC3D,IAAI,GAAG,CAAC;QACR,qGAAqG;QACrG,sBAAsB;QACtB,IAAA,iBAAM,EACL,iBAAiB,KAAK,KAAK,EAC3B,KAAK,CAAC,6DAA6D,CACnE,CAAC;QAEF,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,EAAE;YAC/C,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAChC,iBAAiB,GAAG,IAAI,CAAC;YACzB,IAAI;gBACH,uBAAuB,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;aAC/C;oBAAS;gBACT,iBAAiB,GAAG,KAAK,CAAC;aAC1B;QACF,CAAC,CAAC,CAAC;QACH,+DAA+D;QAC/D,OAAO,GAAG,CAAC;IACZ,CAAC,CAAC;IAEF,OAAO,yBAAuC,CAAC;AAChD,CAAC;AAjCD,0EAiCC","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 { ISharedMap } from \"@fluidframework/map\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * - Create a new object from the passed SharedMap.\n *\n * - Modify the set method to call the setInterceptionCallback before calling set on the underlying SharedMap.\n *\n * - The setInterceptionCallback and the call to the underlying SharedMap are wrapped around an\n * orderSequentially call to batch any operations that might happen in the callback.\n *\n * @param sharedMap - The underlying SharedMap\n * @param context - The IFluidDataStoreContext that will be used to call orderSequentially\n * @param setInterceptionCallback - The interception callback to be called\n *\n * @returns A new SharedMap that intercepts the set method and calls the setInterceptionCallback.\n * @internal\n */\nexport function createSharedMapWithInterception(\n\tsharedMap: ISharedMap,\n\tcontext: IFluidDataStoreContext,\n\tsetInterceptionCallback: (sharedMap: ISharedMap, key: string, value: any) => void,\n): ISharedMap {\n\tconst sharedMapWithInterception = Object.create(sharedMap);\n\n\t// executingCallback keeps track of whether set is called recursively from the setInterceptionCallback.\n\tlet executingCallback: boolean = false;\n\n\tsharedMapWithInterception.set = (key: string, value: any) => {\n\t\tlet map;\n\t\t// Set should not be called on the wrapped object from the interception callback as this will lead to\n\t\t// infinite recursion.\n\t\tassert(\n\t\t\texecutingCallback === false,\n\t\t\t0x0c0 /* \"set called recursively from the interception callback\" */,\n\t\t);\n\n\t\tcontext.containerRuntime.orderSequentially(() => {\n\t\t\tmap = sharedMap.set(key, value);\n\t\t\texecutingCallback = true;\n\t\t\ttry {\n\t\t\t\tsetInterceptionCallback(sharedMap, key, value);\n\t\t\t} finally {\n\t\t\t\texecutingCallback = false;\n\t\t\t}\n\t\t});\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn map;\n\t};\n\n\treturn sharedMapWithInterception as ISharedMap;\n}\n"]}
1
+ {"version":3,"file":"sharedMapWithInterception.js","sourceRoot":"","sources":["../../src/map/sharedMapWithInterception.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D;;;;;;;;;;;;;;GAcG;AACH,SAAgB,+BAA+B,CAC9C,SAAqB,EACrB,OAA+B,EAC/B,uBAAiF;IAEjF,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAE3D,uGAAuG;IACvG,IAAI,iBAAiB,GAAY,KAAK,CAAC;IAEvC,yBAAyB,CAAC,GAAG,GAAG,CAAC,GAAW,EAAE,KAAU,EAAE,EAAE;QAC3D,IAAI,GAAG,CAAC;QACR,qGAAqG;QACrG,sBAAsB;QACtB,IAAA,iBAAM,EACL,iBAAiB,KAAK,KAAK,EAC3B,KAAK,CAAC,6DAA6D,CACnE,CAAC;QAEF,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,EAAE;YAC/C,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAChC,iBAAiB,GAAG,IAAI,CAAC;YACzB,IAAI;gBACH,uBAAuB,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;aAC/C;oBAAS;gBACT,iBAAiB,GAAG,KAAK,CAAC;aAC1B;QACF,CAAC,CAAC,CAAC;QACH,+DAA+D;QAC/D,OAAO,GAAG,CAAC;IACZ,CAAC,CAAC;IAEF,OAAO,yBAAuC,CAAC;AAChD,CAAC;AAjCD,0EAiCC","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 { ISharedMap } from \"@fluidframework/map/internal\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * - Create a new object from the passed SharedMap.\n *\n * - Modify the set method to call the setInterceptionCallback before calling set on the underlying SharedMap.\n *\n * - The setInterceptionCallback and the call to the underlying SharedMap are wrapped around an\n * orderSequentially call to batch any operations that might happen in the callback.\n *\n * @param sharedMap - The underlying SharedMap\n * @param context - The IFluidDataStoreContext that will be used to call orderSequentially\n * @param setInterceptionCallback - The interception callback to be called\n *\n * @returns A new SharedMap that intercepts the set method and calls the setInterceptionCallback.\n * @internal\n */\nexport function createSharedMapWithInterception(\n\tsharedMap: ISharedMap,\n\tcontext: IFluidDataStoreContext,\n\tsetInterceptionCallback: (sharedMap: ISharedMap, key: string, value: any) => void,\n): ISharedMap {\n\tconst sharedMapWithInterception = Object.create(sharedMap);\n\n\t// executingCallback keeps track of whether set is called recursively from the setInterceptionCallback.\n\tlet executingCallback: boolean = false;\n\n\tsharedMapWithInterception.set = (key: string, value: any) => {\n\t\tlet map;\n\t\t// Set should not be called on the wrapped object from the interception callback as this will lead to\n\t\t// infinite recursion.\n\t\tassert(\n\t\t\texecutingCallback === false,\n\t\t\t0x0c0 /* \"set called recursively from the interception callback\" */,\n\t\t);\n\n\t\tcontext.containerRuntime.orderSequentially(() => {\n\t\t\tmap = sharedMap.set(key, value);\n\t\t\texecutingCallback = true;\n\t\t\ttry {\n\t\t\t\tsetInterceptionCallback(sharedMap, key, value);\n\t\t\t} finally {\n\t\t\t\texecutingCallback = false;\n\t\t\t}\n\t\t});\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn map;\n\t};\n\n\treturn sharedMapWithInterception as ISharedMap;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/alpha.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -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 { ISharedMap } from "@fluidframework/map";
5
+ import { ISharedMap } from "@fluidframework/map/internal";
6
6
  import { IFluidDataStoreContext } from "@fluidframework/runtime-definitions/internal";
7
7
  /**
8
8
  * - Create a new object from the passed SharedMap.
@@ -1 +1 @@
1
- {"version":3,"file":"sharedMapWithInterception.d.ts","sourceRoot":"","sources":["../../src/map/sharedMapWithInterception.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC9C,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,sBAAsB,EAC/B,uBAAuB,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,GAC/E,UAAU,CA6BZ"}
1
+ {"version":3,"file":"sharedMapWithInterception.d.ts","sourceRoot":"","sources":["../../src/map/sharedMapWithInterception.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC9C,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,sBAAsB,EAC/B,uBAAuB,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,GAC/E,UAAU,CA6BZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"sharedMapWithInterception.js","sourceRoot":"","sources":["../../src/map/sharedMapWithInterception.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAI7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,+BAA+B,CAC9C,SAAqB,EACrB,OAA+B,EAC/B,uBAAiF;IAEjF,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAE3D,uGAAuG;IACvG,IAAI,iBAAiB,GAAY,KAAK,CAAC;IAEvC,yBAAyB,CAAC,GAAG,GAAG,CAAC,GAAW,EAAE,KAAU,EAAE,EAAE;QAC3D,IAAI,GAAG,CAAC;QACR,qGAAqG;QACrG,sBAAsB;QACtB,MAAM,CACL,iBAAiB,KAAK,KAAK,EAC3B,KAAK,CAAC,6DAA6D,CACnE,CAAC;QAEF,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,EAAE;YAC/C,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAChC,iBAAiB,GAAG,IAAI,CAAC;YACzB,IAAI;gBACH,uBAAuB,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;aAC/C;oBAAS;gBACT,iBAAiB,GAAG,KAAK,CAAC;aAC1B;QACF,CAAC,CAAC,CAAC;QACH,+DAA+D;QAC/D,OAAO,GAAG,CAAC;IACZ,CAAC,CAAC;IAEF,OAAO,yBAAuC,CAAC;AAChD,CAAC","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 { ISharedMap } from \"@fluidframework/map\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * - Create a new object from the passed SharedMap.\n *\n * - Modify the set method to call the setInterceptionCallback before calling set on the underlying SharedMap.\n *\n * - The setInterceptionCallback and the call to the underlying SharedMap are wrapped around an\n * orderSequentially call to batch any operations that might happen in the callback.\n *\n * @param sharedMap - The underlying SharedMap\n * @param context - The IFluidDataStoreContext that will be used to call orderSequentially\n * @param setInterceptionCallback - The interception callback to be called\n *\n * @returns A new SharedMap that intercepts the set method and calls the setInterceptionCallback.\n * @internal\n */\nexport function createSharedMapWithInterception(\n\tsharedMap: ISharedMap,\n\tcontext: IFluidDataStoreContext,\n\tsetInterceptionCallback: (sharedMap: ISharedMap, key: string, value: any) => void,\n): ISharedMap {\n\tconst sharedMapWithInterception = Object.create(sharedMap);\n\n\t// executingCallback keeps track of whether set is called recursively from the setInterceptionCallback.\n\tlet executingCallback: boolean = false;\n\n\tsharedMapWithInterception.set = (key: string, value: any) => {\n\t\tlet map;\n\t\t// Set should not be called on the wrapped object from the interception callback as this will lead to\n\t\t// infinite recursion.\n\t\tassert(\n\t\t\texecutingCallback === false,\n\t\t\t0x0c0 /* \"set called recursively from the interception callback\" */,\n\t\t);\n\n\t\tcontext.containerRuntime.orderSequentially(() => {\n\t\t\tmap = sharedMap.set(key, value);\n\t\t\texecutingCallback = true;\n\t\t\ttry {\n\t\t\t\tsetInterceptionCallback(sharedMap, key, value);\n\t\t\t} finally {\n\t\t\t\texecutingCallback = false;\n\t\t\t}\n\t\t});\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn map;\n\t};\n\n\treturn sharedMapWithInterception as ISharedMap;\n}\n"]}
1
+ {"version":3,"file":"sharedMapWithInterception.js","sourceRoot":"","sources":["../../src/map/sharedMapWithInterception.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAI7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,+BAA+B,CAC9C,SAAqB,EACrB,OAA+B,EAC/B,uBAAiF;IAEjF,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAE3D,uGAAuG;IACvG,IAAI,iBAAiB,GAAY,KAAK,CAAC;IAEvC,yBAAyB,CAAC,GAAG,GAAG,CAAC,GAAW,EAAE,KAAU,EAAE,EAAE;QAC3D,IAAI,GAAG,CAAC;QACR,qGAAqG;QACrG,sBAAsB;QACtB,MAAM,CACL,iBAAiB,KAAK,KAAK,EAC3B,KAAK,CAAC,6DAA6D,CACnE,CAAC;QAEF,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,EAAE;YAC/C,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAChC,iBAAiB,GAAG,IAAI,CAAC;YACzB,IAAI;gBACH,uBAAuB,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;aAC/C;oBAAS;gBACT,iBAAiB,GAAG,KAAK,CAAC;aAC1B;QACF,CAAC,CAAC,CAAC;QACH,+DAA+D;QAC/D,OAAO,GAAG,CAAC;IACZ,CAAC,CAAC;IAEF,OAAO,yBAAuC,CAAC;AAChD,CAAC","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 { ISharedMap } from \"@fluidframework/map/internal\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * - Create a new object from the passed SharedMap.\n *\n * - Modify the set method to call the setInterceptionCallback before calling set on the underlying SharedMap.\n *\n * - The setInterceptionCallback and the call to the underlying SharedMap are wrapped around an\n * orderSequentially call to batch any operations that might happen in the callback.\n *\n * @param sharedMap - The underlying SharedMap\n * @param context - The IFluidDataStoreContext that will be used to call orderSequentially\n * @param setInterceptionCallback - The interception callback to be called\n *\n * @returns A new SharedMap that intercepts the set method and calls the setInterceptionCallback.\n * @internal\n */\nexport function createSharedMapWithInterception(\n\tsharedMap: ISharedMap,\n\tcontext: IFluidDataStoreContext,\n\tsetInterceptionCallback: (sharedMap: ISharedMap, key: string, value: any) => void,\n): ISharedMap {\n\tconst sharedMapWithInterception = Object.create(sharedMap);\n\n\t// executingCallback keeps track of whether set is called recursively from the setInterceptionCallback.\n\tlet executingCallback: boolean = false;\n\n\tsharedMapWithInterception.set = (key: string, value: any) => {\n\t\tlet map;\n\t\t// Set should not be called on the wrapped object from the interception callback as this will lead to\n\t\t// infinite recursion.\n\t\tassert(\n\t\t\texecutingCallback === false,\n\t\t\t0x0c0 /* \"set called recursively from the interception callback\" */,\n\t\t);\n\n\t\tcontext.containerRuntime.orderSequentially(() => {\n\t\t\tmap = sharedMap.set(key, value);\n\t\t\texecutingCallback = true;\n\t\t\ttry {\n\t\t\t\tsetInterceptionCallback(sharedMap, key, value);\n\t\t\t} finally {\n\t\t\t\texecutingCallback = false;\n\t\t\t}\n\t\t});\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn map;\n\t};\n\n\treturn sharedMapWithInterception as ISharedMap;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/dds-interceptions",
3
- "version": "2.0.0-dev-rc.3.0.0.254513",
3
+ "version": "2.0.0-dev-rc.3.0.0.254866",
4
4
  "description": "Distributed Data Structures that support an interception callback",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -25,11 +25,11 @@
25
25
  },
26
26
  "./public": {
27
27
  "import": {
28
- "types": "./lib/dds-interceptions-public.d.ts",
28
+ "types": "./lib/public.d.ts",
29
29
  "default": "./lib/index.js"
30
30
  },
31
31
  "require": {
32
- "types": "./dist/dds-interceptions-public.d.ts",
32
+ "types": "./dist/public.d.ts",
33
33
  "default": "./dist/index.js"
34
34
  }
35
35
  },
@@ -67,21 +67,21 @@
67
67
  "temp-directory": "nyc/.nyc_output"
68
68
  },
69
69
  "dependencies": {
70
- "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254513",
71
- "@fluidframework/map": "2.0.0-dev-rc.3.0.0.254513",
72
- "@fluidframework/merge-tree": "2.0.0-dev-rc.3.0.0.254513",
73
- "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.254513",
74
- "@fluidframework/sequence": "2.0.0-dev-rc.3.0.0.254513"
70
+ "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254866",
71
+ "@fluidframework/map": "2.0.0-dev-rc.3.0.0.254866",
72
+ "@fluidframework/merge-tree": "2.0.0-dev-rc.3.0.0.254866",
73
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.254866",
74
+ "@fluidframework/sequence": "2.0.0-dev-rc.3.0.0.254866"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@arethetypeswrong/cli": "^0.15.2",
78
78
  "@biomejs/biome": "^1.6.2",
79
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254513",
79
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254866",
80
80
  "@fluid-tools/build-cli": "^0.35.0",
81
81
  "@fluidframework/build-common": "^2.0.3",
82
82
  "@fluidframework/build-tools": "^0.35.0",
83
83
  "@fluidframework/eslint-config-fluid": "^5.1.0",
84
- "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.254513",
84
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.254866",
85
85
  "@microsoft/api-extractor": "^7.42.3",
86
86
  "@types/diff": "^3.5.1",
87
87
  "@types/mocha": "^9.1.1",
@@ -99,31 +99,19 @@
99
99
  "rimraf": "^4.4.0",
100
100
  "typescript": "~5.1.6"
101
101
  },
102
- "fluidBuild": {
103
- "tasks": {
104
- "build:docs": {
105
- "dependsOn": [
106
- "...",
107
- "api-extractor:commonjs",
108
- "api-extractor:esnext"
109
- ],
110
- "script": false
111
- }
112
- }
113
- },
114
102
  "typeValidation": {
115
103
  "disabled": true,
116
104
  "broken": {}
117
105
  },
118
106
  "scripts": {
119
107
  "api": "fluid-build . --task api",
120
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
121
- "api-extractor:esnext": "api-extractor run --local",
108
+ "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
109
+ "api-extractor:esnext": "flub generate entrypoints --outDir ./lib",
122
110
  "build": "fluid-build . --task build",
123
111
  "build:commonjs": "fluid-build . --task commonjs",
124
112
  "build:compile": "fluid-build . --task compile",
125
113
  "build:compile:min": "npm run build:compile",
126
- "build:docs": "fluid-build . --task api",
114
+ "build:docs": "api-extractor run --local",
127
115
  "build:esnext": "tsc --project ./tsconfig.json",
128
116
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
129
117
  "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import { assert } from "@fluidframework/core-utils/internal";
7
- import { ISharedMap } from "@fluidframework/map";
7
+ import { ISharedMap } from "@fluidframework/map/internal";
8
8
  import { IFluidDataStoreContext } from "@fluidframework/runtime-definitions/internal";
9
9
 
10
10
  /**
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }
@@ -1,13 +0,0 @@
1
- import { IDirectory } from '@fluidframework/map/internal';
2
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
3
- import { ISharedMap } from '@fluidframework/map';
4
- import * as MergeTree from '@fluidframework/merge-tree/internal';
5
- import { SharedString } from '@fluidframework/sequence/internal';
6
-
7
- /* Excluded from this release type: createDirectoryWithInterception */
8
-
9
- /* Excluded from this release type: createSharedMapWithInterception */
10
-
11
- /* Excluded from this release type: createSharedStringWithInterception */
12
-
13
- export { }
@@ -1,19 +0,0 @@
1
- import { IDirectory } from '@fluidframework/map/internal';
2
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
3
- import { ISharedMap } from '@fluidframework/map';
4
- import * as MergeTree from '@fluidframework/merge-tree/internal';
5
- import { SharedString } from '@fluidframework/sequence/internal';
6
-
7
- /* Excluded from this release type: createDirectoryWithInterception */
8
-
9
- /* Excluded from this release type: createSharedMapWithInterception */
10
-
11
- /* Excluded from this release type: createSharedStringWithInterception */
12
-
13
- /* Excluded from this release type: IDirectory */
14
-
15
- /* Excluded from this release type: IFluidDataStoreContext */
16
-
17
- /* Excluded from this release type: SharedString */
18
-
19
- export { }
@@ -1,19 +0,0 @@
1
- import { IDirectory } from '@fluidframework/map/internal';
2
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
3
- import { ISharedMap } from '@fluidframework/map';
4
- import * as MergeTree from '@fluidframework/merge-tree/internal';
5
- import { SharedString } from '@fluidframework/sequence/internal';
6
-
7
- /* Excluded from this release type: createDirectoryWithInterception */
8
-
9
- /* Excluded from this release type: createSharedMapWithInterception */
10
-
11
- /* Excluded from this release type: createSharedStringWithInterception */
12
-
13
- /* Excluded from this release type: IDirectory */
14
-
15
- /* Excluded from this release type: IFluidDataStoreContext */
16
-
17
- /* Excluded from this release type: SharedString */
18
-
19
- export { }
@@ -1,67 +0,0 @@
1
- import { IDirectory } from '@fluidframework/map/internal';
2
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
3
- import { ISharedMap } from '@fluidframework/map';
4
- import * as MergeTree from '@fluidframework/merge-tree/internal';
5
- import { SharedString } from '@fluidframework/sequence/internal';
6
-
7
- /**
8
- * - Create a new object from the passed IDirectory object.
9
- *
10
- * - Modify the set method to call the setInterceptionCallback before calling set on the underlying object.
11
- *
12
- * - The setInterceptionCallback and the call to the underlying object are wrapped around an orderSequentially
13
- * call to batch any operations that might happen in the callback.
14
- *
15
- * - Modify the sub directory methods to create / return a wrapper object that in turn intercepts the set method and
16
- * calls the setInterceptionCallback.
17
- *
18
- * - When a sub directory is created from this directory, this directory object is passed to it which is passed into
19
- * the interception callback.
20
- *
21
- * @param baseDirectory - The underlying object that is to be intercepted
22
- * @param context - The IFluidDataStoreContext that will be used to call orderSequentially
23
- * @param setInterceptionCallback - The interception callback to be called
24
- *
25
- * @returns A new IDirectory object that intercepts the set method and calls the setInterceptionCallback.
26
- * @internal
27
- */
28
- export declare function createDirectoryWithInterception<T extends IDirectory>(baseDirectory: T, context: IFluidDataStoreContext, setInterceptionCallback: (baseDirectory: IDirectory, subDirectory: IDirectory, key: string, value: any) => void): T;
29
-
30
- /**
31
- * - Create a new object from the passed SharedMap.
32
- *
33
- * - Modify the set method to call the setInterceptionCallback before calling set on the underlying SharedMap.
34
- *
35
- * - The setInterceptionCallback and the call to the underlying SharedMap are wrapped around an
36
- * orderSequentially call to batch any operations that might happen in the callback.
37
- *
38
- * @param sharedMap - The underlying SharedMap
39
- * @param context - The IFluidDataStoreContext that will be used to call orderSequentially
40
- * @param setInterceptionCallback - The interception callback to be called
41
- *
42
- * @returns A new SharedMap that intercepts the set method and calls the setInterceptionCallback.
43
- * @internal
44
- */
45
- export declare function createSharedMapWithInterception(sharedMap: ISharedMap, context: IFluidDataStoreContext, setInterceptionCallback: (sharedMap: ISharedMap, key: string, value: any) => void): ISharedMap;
46
-
47
- /**
48
- * - Create a new object from the passed SharedString.
49
- *
50
- * - Modify the methods that insert / remove / annotate the properties of the SharedString to call
51
- * the propertyInterceptionCallback to get new properties.
52
- *
53
- * - Use these new properties to call the underlying SharedString.
54
- *
55
- * - The propertyInterceptionCallback and the call to the underlying SharedString are wrapped around an
56
- * orderSequentially call to batch any operations that might happen in the callback.
57
- *
58
- * @param sharedString - The underlying SharedString
59
- * @param context - The IFluidDataStoreContext that will be used to call orderSequentially
60
- * @param propertyInterceptionCallback - The interception callback to be called
61
- *
62
- * @returns A new SharedString that intercepts the methods modifying the SharedString properties.
63
- * @internal
64
- */
65
- export declare function createSharedStringWithInterception(sharedString: SharedString, context: IFluidDataStoreContext, propertyInterceptionCallback: (props?: MergeTree.PropertySet) => MergeTree.PropertySet): SharedString;
66
-
67
- export { }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.42.3"
9
- }
10
- ]
11
- }
@@ -1,13 +0,0 @@
1
- import { IDirectory } from '@fluidframework/map/internal';
2
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
3
- import { ISharedMap } from '@fluidframework/map';
4
- import * as MergeTree from '@fluidframework/merge-tree/internal';
5
- import { SharedString } from '@fluidframework/sequence/internal';
6
-
7
- /* Excluded from this release type: createDirectoryWithInterception */
8
-
9
- /* Excluded from this release type: createSharedMapWithInterception */
10
-
11
- /* Excluded from this release type: createSharedStringWithInterception */
12
-
13
- export { }
@@ -1,19 +0,0 @@
1
- import { IDirectory } from '@fluidframework/map/internal';
2
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
3
- import { ISharedMap } from '@fluidframework/map';
4
- import * as MergeTree from '@fluidframework/merge-tree/internal';
5
- import { SharedString } from '@fluidframework/sequence/internal';
6
-
7
- /* Excluded from this release type: createDirectoryWithInterception */
8
-
9
- /* Excluded from this release type: createSharedMapWithInterception */
10
-
11
- /* Excluded from this release type: createSharedStringWithInterception */
12
-
13
- /* Excluded from this release type: IDirectory */
14
-
15
- /* Excluded from this release type: IFluidDataStoreContext */
16
-
17
- /* Excluded from this release type: SharedString */
18
-
19
- export { }
@@ -1,19 +0,0 @@
1
- import { IDirectory } from '@fluidframework/map/internal';
2
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
3
- import { ISharedMap } from '@fluidframework/map';
4
- import * as MergeTree from '@fluidframework/merge-tree/internal';
5
- import { SharedString } from '@fluidframework/sequence/internal';
6
-
7
- /* Excluded from this release type: createDirectoryWithInterception */
8
-
9
- /* Excluded from this release type: createSharedMapWithInterception */
10
-
11
- /* Excluded from this release type: createSharedStringWithInterception */
12
-
13
- /* Excluded from this release type: IDirectory */
14
-
15
- /* Excluded from this release type: IFluidDataStoreContext */
16
-
17
- /* Excluded from this release type: SharedString */
18
-
19
- export { }
@@ -1,67 +0,0 @@
1
- import { IDirectory } from '@fluidframework/map/internal';
2
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
3
- import { ISharedMap } from '@fluidframework/map';
4
- import * as MergeTree from '@fluidframework/merge-tree/internal';
5
- import { SharedString } from '@fluidframework/sequence/internal';
6
-
7
- /**
8
- * - Create a new object from the passed IDirectory object.
9
- *
10
- * - Modify the set method to call the setInterceptionCallback before calling set on the underlying object.
11
- *
12
- * - The setInterceptionCallback and the call to the underlying object are wrapped around an orderSequentially
13
- * call to batch any operations that might happen in the callback.
14
- *
15
- * - Modify the sub directory methods to create / return a wrapper object that in turn intercepts the set method and
16
- * calls the setInterceptionCallback.
17
- *
18
- * - When a sub directory is created from this directory, this directory object is passed to it which is passed into
19
- * the interception callback.
20
- *
21
- * @param baseDirectory - The underlying object that is to be intercepted
22
- * @param context - The IFluidDataStoreContext that will be used to call orderSequentially
23
- * @param setInterceptionCallback - The interception callback to be called
24
- *
25
- * @returns A new IDirectory object that intercepts the set method and calls the setInterceptionCallback.
26
- * @internal
27
- */
28
- export declare function createDirectoryWithInterception<T extends IDirectory>(baseDirectory: T, context: IFluidDataStoreContext, setInterceptionCallback: (baseDirectory: IDirectory, subDirectory: IDirectory, key: string, value: any) => void): T;
29
-
30
- /**
31
- * - Create a new object from the passed SharedMap.
32
- *
33
- * - Modify the set method to call the setInterceptionCallback before calling set on the underlying SharedMap.
34
- *
35
- * - The setInterceptionCallback and the call to the underlying SharedMap are wrapped around an
36
- * orderSequentially call to batch any operations that might happen in the callback.
37
- *
38
- * @param sharedMap - The underlying SharedMap
39
- * @param context - The IFluidDataStoreContext that will be used to call orderSequentially
40
- * @param setInterceptionCallback - The interception callback to be called
41
- *
42
- * @returns A new SharedMap that intercepts the set method and calls the setInterceptionCallback.
43
- * @internal
44
- */
45
- export declare function createSharedMapWithInterception(sharedMap: ISharedMap, context: IFluidDataStoreContext, setInterceptionCallback: (sharedMap: ISharedMap, key: string, value: any) => void): ISharedMap;
46
-
47
- /**
48
- * - Create a new object from the passed SharedString.
49
- *
50
- * - Modify the methods that insert / remove / annotate the properties of the SharedString to call
51
- * the propertyInterceptionCallback to get new properties.
52
- *
53
- * - Use these new properties to call the underlying SharedString.
54
- *
55
- * - The propertyInterceptionCallback and the call to the underlying SharedString are wrapped around an
56
- * orderSequentially call to batch any operations that might happen in the callback.
57
- *
58
- * @param sharedString - The underlying SharedString
59
- * @param context - The IFluidDataStoreContext that will be used to call orderSequentially
60
- * @param propertyInterceptionCallback - The interception callback to be called
61
- *
62
- * @returns A new SharedString that intercepts the methods modifying the SharedString properties.
63
- * @internal
64
- */
65
- export declare function createSharedStringWithInterception(sharedString: SharedString, context: IFluidDataStoreContext, propertyInterceptionCallback: (props?: MergeTree.PropertySet) => MergeTree.PropertySet): SharedString;
66
-
67
- export { }