@fluidframework/test-utils 2.117.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/CHANGELOG.md +64 -2
  2. package/README.md +53 -50
  3. package/{api-extractor.json → api-extractor/api-extractor-model.json} +1 -1
  4. package/dist/TestConfigs.d.ts.map +1 -1
  5. package/dist/TestSummaryUtils.d.ts.map +1 -1
  6. package/dist/TestSummaryUtils.js +6 -5
  7. package/dist/TestSummaryUtils.js.map +1 -1
  8. package/dist/containerRuntimeFactories.d.ts.map +1 -1
  9. package/dist/containerRuntimeFactories.js +23 -2
  10. package/dist/containerRuntimeFactories.js.map +1 -1
  11. package/dist/containerUtils.js +5 -6
  12. package/dist/containerUtils.js.map +1 -1
  13. package/dist/eventAndErrorLogger.d.ts +2 -2
  14. package/dist/eventAndErrorLogger.d.ts.map +1 -1
  15. package/dist/eventAndErrorLogger.js +20 -19
  16. package/dist/eventAndErrorLogger.js.map +1 -1
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/loaderContainerTracker.js +3 -2
  22. package/dist/loaderContainerTracker.js.map +1 -1
  23. package/dist/localCodeLoader.js +3 -3
  24. package/dist/localCodeLoader.js.map +1 -1
  25. package/dist/localLoader.js +4 -5
  26. package/dist/localLoader.js.map +1 -1
  27. package/dist/nonEmptyArrayType.js +1 -2
  28. package/dist/nonEmptyArrayType.js.map +1 -1
  29. package/dist/packageVersion.d.ts +1 -1
  30. package/dist/packageVersion.d.ts.map +1 -1
  31. package/dist/packageVersion.js +1 -1
  32. package/dist/packageVersion.js.map +1 -1
  33. package/dist/retry.d.ts.map +1 -1
  34. package/dist/testCompatibility.d.ts +12 -0
  35. package/dist/testCompatibility.d.ts.map +1 -0
  36. package/dist/testCompatibility.js +16 -0
  37. package/dist/testCompatibility.js.map +1 -0
  38. package/dist/testContainerRuntimeFactory.d.ts +6 -6
  39. package/dist/testContainerRuntimeFactory.d.ts.map +1 -1
  40. package/dist/testContainerRuntimeFactory.js +7 -1
  41. package/dist/testContainerRuntimeFactory.js.map +1 -1
  42. package/dist/testContainerRuntimeFactoryWithDefaultDataStore.d.ts +17 -4
  43. package/dist/testContainerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
  44. package/dist/testContainerRuntimeFactoryWithDefaultDataStore.js +16 -6
  45. package/dist/testContainerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  46. package/dist/testFluidObject.js +10 -0
  47. package/dist/testFluidObject.js.map +1 -1
  48. package/dist/testFluidObjectInternal.js +6 -0
  49. package/dist/testFluidObjectInternal.js.map +1 -1
  50. package/dist/testObjectProvider.d.ts.map +1 -1
  51. package/dist/testObjectProvider.js +44 -23
  52. package/dist/testObjectProvider.js.map +1 -1
  53. package/dist/timeoutUtils.js +7 -8
  54. package/dist/timeoutUtils.js.map +1 -1
  55. package/lib/TestConfigs.d.ts.map +1 -1
  56. package/lib/TestSummaryUtils.d.ts.map +1 -1
  57. package/lib/TestSummaryUtils.js +2 -0
  58. package/lib/TestSummaryUtils.js.map +1 -1
  59. package/lib/containerRuntimeFactories.d.ts.map +1 -1
  60. package/lib/containerRuntimeFactories.js +23 -2
  61. package/lib/containerRuntimeFactories.js.map +1 -1
  62. package/lib/eventAndErrorLogger.d.ts +2 -2
  63. package/lib/eventAndErrorLogger.d.ts.map +1 -1
  64. package/lib/eventAndErrorLogger.js +18 -17
  65. package/lib/eventAndErrorLogger.js.map +1 -1
  66. package/lib/index.d.ts +1 -0
  67. package/lib/index.d.ts.map +1 -1
  68. package/lib/index.js +1 -0
  69. package/lib/index.js.map +1 -1
  70. package/lib/legacy.d.ts +1 -1
  71. package/lib/loaderContainerTracker.js +3 -2
  72. package/lib/loaderContainerTracker.js.map +1 -1
  73. package/lib/localCodeLoader.js +1 -1
  74. package/lib/localCodeLoader.js.map +1 -1
  75. package/lib/packageVersion.d.ts +1 -1
  76. package/lib/packageVersion.d.ts.map +1 -1
  77. package/lib/packageVersion.js +1 -1
  78. package/lib/packageVersion.js.map +1 -1
  79. package/lib/public.d.ts +1 -1
  80. package/lib/retry.d.ts.map +1 -1
  81. package/lib/testCompatibility.d.ts +12 -0
  82. package/lib/testCompatibility.d.ts.map +1 -0
  83. package/lib/testCompatibility.js +13 -0
  84. package/lib/testCompatibility.js.map +1 -0
  85. package/lib/testContainerRuntimeFactory.d.ts +6 -6
  86. package/lib/testContainerRuntimeFactory.d.ts.map +1 -1
  87. package/lib/testContainerRuntimeFactory.js +7 -1
  88. package/lib/testContainerRuntimeFactory.js.map +1 -1
  89. package/lib/testContainerRuntimeFactoryWithDefaultDataStore.d.ts +17 -4
  90. package/lib/testContainerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
  91. package/lib/testContainerRuntimeFactoryWithDefaultDataStore.js +16 -6
  92. package/lib/testContainerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  93. package/lib/testFluidObject.js +10 -0
  94. package/lib/testFluidObject.js.map +1 -1
  95. package/lib/testFluidObjectInternal.js +6 -0
  96. package/lib/testFluidObjectInternal.js.map +1 -1
  97. package/lib/testObjectProvider.d.ts.map +1 -1
  98. package/lib/testObjectProvider.js +44 -23
  99. package/lib/testObjectProvider.js.map +1 -1
  100. package/lib/timeoutUtils.js +5 -5
  101. package/lib/timeoutUtils.js.map +1 -1
  102. package/package.json +53 -58
  103. package/src/TestSummaryUtils.ts +2 -0
  104. package/src/containerRuntimeFactories.ts +4 -2
  105. package/src/eventAndErrorLogger.ts +3 -2
  106. package/src/index.ts +1 -0
  107. package/src/packageVersion.ts +1 -1
  108. package/src/testCompatibility.ts +16 -0
  109. package/src/testContainerRuntimeFactory.ts +3 -1
  110. package/src/testContainerRuntimeFactoryWithDefaultDataStore.ts +72 -11
  111. package/src/testObjectProvider.ts +17 -10
  112. package/tsconfig.json +1 -1
  113. package/internal.d.ts +0 -11
  114. package/legacy.d.ts +0 -11
  115. /package/api-extractor/{api-extractor.current.json → api-extractor-report.current.json} +0 -0
  116. /package/api-extractor/{api-extractor.legacy.json → api-extractor-report.legacy.json} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"localLoader.js","sourceRoot":"","sources":["../src/localLoader.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,wEAKmD;AAOnD,6DAAwE;AAExE;;;;;;;GAOG;AACH,SAAgB,YAAY,CAC3B,cAA8D,EAC9D,sBAA+C,EAC/C,WAAyB,EACzB,MAA6B,EAC7B,OAAwB;IAExB,MAAM,UAAU,GAAuB,IAAI,oCAAe,CAAC,cAAc,CAAC,CAAC;IAE3E,OAAO,IAAI,iBAAM,CAAC;QACjB,WAAW;QACX,sBAAsB;QACtB,UAAU;QACV,MAAM;QACN,OAAO;KACP,CAAC,CAAC;AACJ,CAAC;AAhBD,oCAgBC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAChC,cAA8D,EAC9D,sBAA+C,EAC/C,WAAyB,EACzB,MAA6B,EAC7B,OAAwB;IAExB,MAAM,UAAU,GAAuB,IAAI,oCAAe,CAAC,cAAc,CAAC,CAAC;IAE3E,OAAO;QACN,WAAW;QACX,sBAAsB;QACtB,UAAU;QACV,MAAM;QACN,OAAO;KACP,CAAC;AACH,CAAC;AAhBD,8CAgBC;AAED;;;;;;GAMG;AAEI,KAAK,UAAU,wBAAwB,CAC7C,MAAyB,EACzB,MAAmB,EACnB,aAAuB;IAEvB,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAEtC,OAAO,SAAS,CAAC;AAClB,CAAC;AATD,4DASC;AAED;;;;;GAKG;AACI,KAAK,UAAU,kCAAkC,CACvD,4BAA2D,EAC3D,aAAuB;IAEvB,MAAM,SAAS,GAAG,MAAM,IAAA,kCAAuB,EAAC,4BAA4B,CAAC,CAAC;IAC9E,MAAM,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAEtC,OAAO,SAAS,CAAC;AAClB,CAAC;AARD,gFAQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tICodeDetailsLoader,\n\tIContainer,\n\tIFluidCodeDetails,\n\tIHostLoader,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions/internal\";\nimport {\n\tcreateDetachedContainer,\n\tLoader,\n\ttype ICreateDetachedContainerProps,\n\ttype ILoaderProps,\n} from \"@fluidframework/container-loader/internal\";\nimport { IRequest, ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport {\n\tIDocumentServiceFactory,\n\tIUrlResolver,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport { LocalCodeLoader, fluidEntryPoint } from \"./localCodeLoader.js\";\n\n/**\n * Creates a loader with the given package entries and driver.\n * @param packageEntries - A list of code details to Fluid entry points.\n * @param documentServiceFactory - the driver factory to use\n * @param urlResolver - the url resolver to use\n * @param options - loader options\n * @internal\n */\nexport function createLoader(\n\tpackageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>,\n\tdocumentServiceFactory: IDocumentServiceFactory,\n\turlResolver: IUrlResolver,\n\tlogger?: ITelemetryBaseLogger,\n\toptions?: ILoaderOptions,\n): IHostLoader {\n\tconst codeLoader: ICodeDetailsLoader = new LocalCodeLoader(packageEntries);\n\n\treturn new Loader({\n\t\turlResolver,\n\t\tdocumentServiceFactory,\n\t\tcodeLoader,\n\t\tlogger,\n\t\toptions,\n\t});\n}\n\n/**\n * Creates a loader with the given package entries and driver.\n * @param packageEntries - A list of code details to Fluid entry points.\n * @param documentServiceFactory - the driver factory to use\n * @param urlResolver - the url resolver to use\n * @param options - loader options\n * @internal\n */\nexport function createLoaderProps(\n\tpackageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>,\n\tdocumentServiceFactory: IDocumentServiceFactory,\n\turlResolver: IUrlResolver,\n\tlogger?: ITelemetryBaseLogger,\n\toptions?: ILoaderOptions,\n): ILoaderProps {\n\tconst codeLoader: ICodeDetailsLoader = new LocalCodeLoader(packageEntries);\n\n\treturn {\n\t\turlResolver,\n\t\tdocumentServiceFactory,\n\t\tcodeLoader,\n\t\tlogger,\n\t\toptions,\n\t};\n}\n\n/**\n * Creates a detached Container and attaches it.\n * @param source - The code details used to create the Container.\n * @param loader - The loader to use to initialize the container.\n * @param attachRequest - The request to create new from.\n * @legacy @beta\n */\n\nexport async function createAndAttachContainer(\n\tsource: IFluidCodeDetails,\n\tloader: IHostLoader,\n\tattachRequest: IRequest,\n): Promise<IContainer> {\n\tconst container = await loader.createDetachedContainer(source);\n\tawait container.attach(attachRequest);\n\n\treturn container;\n}\n\n/**\n * Creates a detached Container and attaches it.\n * @param createDetachedContainerProps - The props to use to initialize the container.\n * @param attachRequest - The request to create new from.\n * @internal\n */\nexport async function createAndAttachContainerUsingProps(\n\tcreateDetachedContainerProps: ICreateDetachedContainerProps,\n\tattachRequest: IRequest,\n): Promise<IContainer> {\n\tconst container = await createDetachedContainer(createDetachedContainerProps);\n\tawait container.attach(attachRequest);\n\n\treturn container;\n}\n"]}
1
+ {"version":3,"file":"localLoader.js","sourceRoot":"","sources":["../src/localLoader.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA+BH,oCAgBC;AAUD,8CAgBC;AAUD,4DASC;AAQD,gFAQC;AAnGD,wEAKmD;AAOnD,6DAAwE;AAExE;;;;;;;GAOG;AACH,SAAgB,YAAY,CAC3B,cAA8D,EAC9D,sBAA+C,EAC/C,WAAyB,EACzB,MAA6B,EAC7B,OAAwB;IAExB,MAAM,UAAU,GAAuB,IAAI,oCAAe,CAAC,cAAc,CAAC,CAAC;IAE3E,OAAO,IAAI,iBAAM,CAAC;QACjB,WAAW;QACX,sBAAsB;QACtB,UAAU;QACV,MAAM;QACN,OAAO;KACP,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAChC,cAA8D,EAC9D,sBAA+C,EAC/C,WAAyB,EACzB,MAA6B,EAC7B,OAAwB;IAExB,MAAM,UAAU,GAAuB,IAAI,oCAAe,CAAC,cAAc,CAAC,CAAC;IAE3E,OAAO;QACN,WAAW;QACX,sBAAsB;QACtB,UAAU;QACV,MAAM;QACN,OAAO;KACP,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AAEI,KAAK,UAAU,wBAAwB,CAC7C,MAAyB,EACzB,MAAmB,EACnB,aAAuB;IAEvB,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAEtC,OAAO,SAAS,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,kCAAkC,CACvD,4BAA2D,EAC3D,aAAuB;IAEvB,MAAM,SAAS,GAAG,MAAM,IAAA,kCAAuB,EAAC,4BAA4B,CAAC,CAAC;IAC9E,MAAM,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAEtC,OAAO,SAAS,CAAC;AAClB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tICodeDetailsLoader,\n\tIContainer,\n\tIFluidCodeDetails,\n\tIHostLoader,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions/internal\";\nimport {\n\tcreateDetachedContainer,\n\tLoader,\n\ttype ICreateDetachedContainerProps,\n\ttype ILoaderProps,\n} from \"@fluidframework/container-loader/internal\";\nimport { IRequest, ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport {\n\tIDocumentServiceFactory,\n\tIUrlResolver,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport { LocalCodeLoader, fluidEntryPoint } from \"./localCodeLoader.js\";\n\n/**\n * Creates a loader with the given package entries and driver.\n * @param packageEntries - A list of code details to Fluid entry points.\n * @param documentServiceFactory - the driver factory to use\n * @param urlResolver - the url resolver to use\n * @param options - loader options\n * @internal\n */\nexport function createLoader(\n\tpackageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>,\n\tdocumentServiceFactory: IDocumentServiceFactory,\n\turlResolver: IUrlResolver,\n\tlogger?: ITelemetryBaseLogger,\n\toptions?: ILoaderOptions,\n): IHostLoader {\n\tconst codeLoader: ICodeDetailsLoader = new LocalCodeLoader(packageEntries);\n\n\treturn new Loader({\n\t\turlResolver,\n\t\tdocumentServiceFactory,\n\t\tcodeLoader,\n\t\tlogger,\n\t\toptions,\n\t});\n}\n\n/**\n * Creates a loader with the given package entries and driver.\n * @param packageEntries - A list of code details to Fluid entry points.\n * @param documentServiceFactory - the driver factory to use\n * @param urlResolver - the url resolver to use\n * @param options - loader options\n * @internal\n */\nexport function createLoaderProps(\n\tpackageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>,\n\tdocumentServiceFactory: IDocumentServiceFactory,\n\turlResolver: IUrlResolver,\n\tlogger?: ITelemetryBaseLogger,\n\toptions?: ILoaderOptions,\n): ILoaderProps {\n\tconst codeLoader: ICodeDetailsLoader = new LocalCodeLoader(packageEntries);\n\n\treturn {\n\t\turlResolver,\n\t\tdocumentServiceFactory,\n\t\tcodeLoader,\n\t\tlogger,\n\t\toptions,\n\t};\n}\n\n/**\n * Creates a detached Container and attaches it.\n * @param source - The code details used to create the Container.\n * @param loader - The loader to use to initialize the container.\n * @param attachRequest - The request to create new from.\n * @legacy @beta\n */\n\nexport async function createAndAttachContainer(\n\tsource: IFluidCodeDetails,\n\tloader: IHostLoader,\n\tattachRequest: IRequest,\n): Promise<IContainer> {\n\tconst container = await loader.createDetachedContainer(source);\n\tawait container.attach(attachRequest);\n\n\treturn container;\n}\n\n/**\n * Creates a detached Container and attaches it.\n * @param createDetachedContainerProps - The props to use to initialize the container.\n * @param attachRequest - The request to create new from.\n * @internal\n */\nexport async function createAndAttachContainerUsingProps(\n\tcreateDetachedContainerProps: ICreateDetachedContainerProps,\n\tattachRequest: IRequest,\n): Promise<IContainer> {\n\tconst container = await createDetachedContainer(createDetachedContainerProps);\n\tawait container.attach(attachRequest);\n\n\treturn container;\n}\n"]}
@@ -4,9 +4,8 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.isNonEmptyArray = void 0;
7
+ exports.isNonEmptyArray = isNonEmptyArray;
8
8
  function isNonEmptyArray(arr) {
9
9
  return arr.length > 0;
10
10
  }
11
- exports.isNonEmptyArray = isNonEmptyArray;
12
11
  //# sourceMappingURL=nonEmptyArrayType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nonEmptyArrayType.js","sourceRoot":"","sources":["../src/nonEmptyArrayType.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,SAAgB,eAAe,CAAI,GAAQ;IAC1C,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AACvB,CAAC;AAFD,0CAEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type NonEmptyArray<T> = [T, ...T[]] | [...T[], T] | [T, ...T[], T];\n\nexport function isNonEmptyArray<T>(arr: T[]): arr is NonEmptyArray<T> {\n\treturn arr.length > 0;\n}\n"]}
1
+ {"version":3,"file":"nonEmptyArrayType.js","sourceRoot":"","sources":["../src/nonEmptyArrayType.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,0CAEC;AAFD,SAAgB,eAAe,CAAI,GAAQ;IAC1C,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AACvB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type NonEmptyArray<T> = [T, ...T[]] | [...T[], T] | [T, ...T[], T];\n\nexport function isNonEmptyArray<T>(arr: T[]): arr is NonEmptyArray<T> {\n\treturn arr.length > 0;\n}\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/test-utils";
8
- export declare const pkgVersion = "2.117.0";
8
+ export declare const pkgVersion = "3.0.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,+BAA+B,CAAC;AACpD,eAAO,MAAM,UAAU,YAAY,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,+BAA+B,CAAC;AACpD,eAAO,MAAM,UAAU,UAAU,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/test-utils";
11
- exports.pkgVersion = "2.117.0";
11
+ exports.pkgVersion = "3.0.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,4BAA4B,CAAC;AACvC,QAAA,UAAU,GAAG,SAAS,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/test-utils\";\nexport const pkgVersion = \"2.117.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,4BAA4B,CAAC;AACvC,QAAA,UAAU,GAAG,OAAO,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/test-utils\";\nexport const pkgVersion = \"3.0.0\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,gBACxB,MAAM,QAAQ,CAAC,CAAC,SACnB,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,gBACd,CAAC,4CAGb,QAAQ,CAAC,CAaV,CAAC"}
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GAAU,CAAC,EAC7C,UAAU,MAAM,OAAO,CAAC,CAAC,CAAC,EAC1B,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,EAC5B,cAAc,CAAC,EACf,iBAAa,EACb,kBAAc,KACZ,OAAO,CAAC,CAAC,CAaV,CAAC"}
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Canonical compatibility setting for generic runtime tests. Tests for a specific feature should
7
+ * instead use that feature's minimum supported client version.
8
+ *
9
+ * @internal
10
+ */
11
+ export declare const defaultTestOldestSupportedClient: "2.0.0";
12
+ //# sourceMappingURL=testCompatibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testCompatibility.d.ts","sourceRoot":"","sources":["../src/testCompatibility.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,SACqB,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.defaultTestOldestSupportedClient = void 0;
8
+ const internal_1 = require("@fluidframework/runtime-utils/internal");
9
+ /**
10
+ * Canonical compatibility setting for generic runtime tests. Tests for a specific feature should
11
+ * instead use that feature's minimum supported client version.
12
+ *
13
+ * @internal
14
+ */
15
+ exports.defaultTestOldestSupportedClient = internal_1.defaultMinVersionForCollab;
16
+ //# sourceMappingURL=testCompatibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testCompatibility.js","sourceRoot":"","sources":["../src/testCompatibility.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qEAAoF;AAEpF;;;;;GAKG;AACU,QAAA,gCAAgC,GAC5C,qCAAiE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { OldestSupportedClientVersion } from \"@fluidframework/runtime-definitions/internal\";\nimport { defaultMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\n\n/**\n * Canonical compatibility setting for generic runtime tests. Tests for a specific feature should\n * instead use that feature's minimum supported client version.\n *\n * @internal\n */\nexport const defaultTestOldestSupportedClient =\n\tdefaultMinVersionForCollab satisfies OldestSupportedClientVersion;\n"]}
@@ -12,16 +12,16 @@ import { IFluidDataStoreFactory, type OldestSupportedClientVersion } from "@flui
12
12
  * @internal
13
13
  */
14
14
  export declare const createTestContainerRuntimeFactory: (containerRuntimeCtor: typeof ContainerRuntime) => {
15
- new (type: string, dataStoreFactory: IFluidDataStoreFactory, runtimeOptions?: IContainerRuntimeOptionsInternal, minVersionForCollab?: OldestSupportedClientVersion | undefined, requestHandlers?: RuntimeRequestHandler[]): {
15
+ new (type: string, dataStoreFactory: IFluidDataStoreFactory, runtimeOptions?: IContainerRuntimeOptionsInternal, minVersionForCollab?: OldestSupportedClientVersion, requestHandlers?: RuntimeRequestHandler[]): {
16
16
  type: string;
17
17
  dataStoreFactory: IFluidDataStoreFactory;
18
18
  runtimeOptions: IContainerRuntimeOptionsInternal;
19
- minVersionForCollab: OldestSupportedClientVersion | undefined;
19
+ minVersionForCollab: OldestSupportedClientVersion;
20
20
  requestHandlers: RuntimeRequestHandler[];
21
21
  instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
22
22
  instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
23
23
  preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & IContainerRuntime>;
24
- readonly IRuntimeFactory: any;
24
+ get IRuntimeFactory(): /*elided*/ any;
25
25
  instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
26
26
  hasInitialized(_runtime: IContainerRuntime): Promise<void>;
27
27
  };
@@ -31,16 +31,16 @@ export declare const createTestContainerRuntimeFactory: (containerRuntimeCtor: t
31
31
  * @internal
32
32
  */
33
33
  export declare const TestContainerRuntimeFactory: {
34
- new (type: string, dataStoreFactory: IFluidDataStoreFactory, runtimeOptions?: IContainerRuntimeOptionsInternal, minVersionForCollab?: OldestSupportedClientVersion | undefined, requestHandlers?: RuntimeRequestHandler[]): {
34
+ new (type: string, dataStoreFactory: IFluidDataStoreFactory, runtimeOptions?: IContainerRuntimeOptionsInternal, minVersionForCollab?: OldestSupportedClientVersion, requestHandlers?: RuntimeRequestHandler[]): {
35
35
  type: string;
36
36
  dataStoreFactory: IFluidDataStoreFactory;
37
37
  runtimeOptions: IContainerRuntimeOptionsInternal;
38
- minVersionForCollab: OldestSupportedClientVersion | undefined;
38
+ minVersionForCollab: OldestSupportedClientVersion;
39
39
  requestHandlers: RuntimeRequestHandler[];
40
40
  instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
41
41
  instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
42
42
  preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & IContainerRuntime>;
43
- readonly IRuntimeFactory: any;
43
+ get IRuntimeFactory(): /*elided*/ any;
44
44
  instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
45
45
  hasInitialized(_runtime: IContainerRuntime): Promise<void>;
46
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"testContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EACN,gBAAgB,EAGhB,KAAK,gCAAgC,EACrC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACN,iBAAiB,EAGjB,MAAM,wDAAwD,CAAC;AAIhE,OAAO,EAEN,qBAAqB,EAGrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACN,sBAAsB,EAEtB,KAAK,4BAA4B,EACjC,MAAM,8CAA8C,CAAC;AAuDtD;;;GAGG;AACH,eAAO,MAAM,iCAAiC,yBACvB,uBAAuB;eAK9B,MAAM,oBACM,sBAAsB,mBACxB,gCAAgC,wBAU3B,4BAA4B,GAAG,SAAS,oBAE5C,qBAAqB,EAAE;cAdlC,MAAM;0BACM,sBAAsB;wBACxB,gCAAgC;6BAU3B,4BAA4B,GAAG,SAAS;yBAE5C,qBAAqB,EAAE;sCAKL,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAkB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAcpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CAyFzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;eApJxB,MAAM,oBACM,sBAAsB,mBACxB,gCAAgC,wBAU3B,4BAA4B,GAAG,SAAS,oBAE5C,qBAAqB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AEhC,qBAAqB,EAAE;cAdlC,MAAM;0BACM,sBAAsB;wBACxB,gCAAgC;6BAU3B,4BAA4B;yBAEhC,qBAAqB,EAAE;sCAKL,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;yCAkB7B,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;+BAcpE,iBAAiB,YAChB,OAAO,GACf,OAAO,CAAC,QAAQ,GAAG,iBAAiB,CAAC;;;;;CA+FoD,CAAC"}
@@ -10,6 +10,7 @@ const internal_1 = require("@fluidframework/container-runtime/internal");
10
10
  const internal_2 = require("@fluidframework/core-utils/internal");
11
11
  const internal_3 = require("@fluidframework/request-handler/internal");
12
12
  const internal_4 = require("@fluidframework/runtime-utils/internal");
13
+ const testCompatibility_js_1 = require("./testCompatibility.js");
13
14
  const backCompat_DefaultRouteRequestHandler = (defaultRootId) => {
14
15
  return async (request, runtime) => {
15
16
  const parser = internal_4.RequestParser.create(request);
@@ -28,6 +29,11 @@ const backCompat_DefaultRouteRequestHandler = (defaultRootId) => {
28
29
  */
29
30
  const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
30
31
  return class extends internal_4.RuntimeFactoryHelper {
32
+ type;
33
+ dataStoreFactory;
34
+ runtimeOptions;
35
+ minVersionForCollab;
36
+ requestHandlers;
31
37
  constructor(type, dataStoreFactory, runtimeOptions = {
32
38
  summaryOptions: {
33
39
  summaryConfigOverrides: {
@@ -37,7 +43,7 @@ const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
37
43
  },
38
44
  },
39
45
  },
40
- }, minVersionForCollab = undefined,
46
+ }, minVersionForCollab = testCompatibility_js_1.defaultTestOldestSupportedClient,
41
47
  // eslint-disable-next-line import-x/no-deprecated
42
48
  requestHandlers = []) {
43
49
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"testContainerRuntimeFactory.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6CAAmC;AAGnC,yEA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MAAM,kBAAkB,GAAG,oBAAoB,CAAC,qBAAqB,IAAI,CAAC,CAAC;YAC3E,QAAQ,kBAAkB,EAAE,CAAC;gBAC5B,KAAK,CAAC;oBACL,6DAA6D;oBAC7D,OACC,oBACA,CAAC,WAAW,CAAC;wBACb,OAAO;wBACP,eAAe;wBACf,cAAc;wBACd,iBAAiB;wBACjB,cAAc,EAAE,IAAI,CAAC,cAAc;wBACnC,cAAc,EAAE,OAAO,CAAC,KAAK;wBAC7B,QAAQ;wBACR,qBAAqB,EAAE,IAAI,CAAC,mBAAmB;wBAC/C,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;qBAC7C,CAAC,CAAC;gBACJ,KAAK,CAAC;oBACL,OAAO,oBAAoB,CAAC,WAAW,CAAC;wBACvC,OAAO;wBACP,QAAQ,EAAE,IAAI,iCAAsB,CAAC,eAAe,CAAC;wBACrD,cAAc;wBACd,iBAAiB;wBACjB,cAAc,EAAE,IAAI,CAAC,cAAc;wBACnC,cAAc,EAAE,OAAO,CAAC,KAAK;wBAC7B,QAAQ;wBACR,qBAAqB,EAAE,IAAI,CAAC,mBAAmB;qBAC/C,CAAC,CAAC;gBACJ;oBACC,IAAA,kBAAI,GAAE,CAAC;YACT,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC,CAAC;AApJW,QAAA,iCAAiC,qCAoJ5C;AAEF;;;GAGG;AACU,QAAA,2BAA2B,GAAG,IAAA,yCAAiC,EAAC,2BAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"node:assert\";\n\nimport { IContainerContext, IRuntime } from \"@fluidframework/container-definitions/internal\";\nimport {\n\tContainerRuntime,\n\tDefaultSummaryConfiguration,\n\tFluidDataStoreRegistry,\n\ttype IContainerRuntimeOptionsInternal,\n} from \"@fluidframework/container-runtime/internal\";\nimport {\n\tIContainerRuntime,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tIContainerRuntimeWithResolveHandle_Deprecated,\n} from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\t// eslint-disable-next-line import-x/no-deprecated\n\tRuntimeRequestHandler,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n\ttype OldestSupportedClientVersion,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RequestParser, RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\ninterface backCompat_IFluidRouter {\n\tIFluidRouter?: backCompat_IFluidRouter;\n\trequest(request: IRequest): Promise<IResponse>;\n}\n\nconst backCompat_DefaultRouteRequestHandler = (defaultRootId: string) => {\n\treturn async (request: IRequest, runtime: IContainerRuntime) => {\n\t\tconst parser = RequestParser.create(request);\n\t\tif (parser.pathParts.length === 0) {\n\t\t\treturn (\n\t\t\t\truntime as any as Required<FluidObject<IFluidHandleContext>>\n\t\t\t).IFluidHandleContext.resolveHandle({\n\t\t\t\turl: `/${defaultRootId}${parser.query}`,\n\t\t\t\theaders: request.headers,\n\t\t\t});\n\t\t}\n\t\treturn undefined; // continue search\n\t};\n};\n\ninterface backCompat_ContainerRuntime {\n\tload(\n\t\tcontext: IContainerContext,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>,\n\t\truntimeOptions?: IContainerRuntimeOptionsInternal,\n\t\tcontainerScope?: FluidObject,\n\t\texisting?: boolean,\n\t\tcontainerRuntimeCtor?: typeof ContainerRuntime,\n\t): Promise<ContainerRuntime>;\n}\n\n/**\n * loadRuntime API before https://github.com/microsoft/FluidFramework/pull/27685 took registryEntries instead of registry.\n */\ninterface backCompat_ContainerRuntime_loadRuntime {\n\tloadRuntime(params: {\n\t\tcontext: IContainerContext;\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t\texisting: boolean;\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;\n\t\tprovideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;\n\t\truntimeOptions?: IContainerRuntimeOptionsInternal;\n\t\tcontainerScope?: FluidObject;\n\t\t// Some versions of this API exist which expect this to be provided under the name `minVersionForCollab` (before https://github.com/microsoft/FluidFramework/pull/27806),\n\t\t// so this fails to actually set minVersionForCollab in some old cases, but it was optional then so does not error.\n\t\t// That predates the versioning of this API, so we mitigate by setting both.\n\t\toldestSupportedClient: OldestSupportedClientVersion | undefined;\n\t\tminVersionForCollab: OldestSupportedClientVersion | undefined;\n\t}): Promise<ContainerRuntime>;\n}\n\n/**\n * Create a container runtime factory class that allows you to set runtime options\n * @internal\n */\nexport const createTestContainerRuntimeFactory = (\n\tcontainerRuntimeCtor: typeof ContainerRuntime,\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Returning anonymous class type\n) => {\n\treturn class extends RuntimeFactoryHelper {\n\t\tconstructor(\n\t\t\tpublic type: string,\n\t\t\tpublic dataStoreFactory: IFluidDataStoreFactory,\n\t\t\tpublic runtimeOptions: IContainerRuntimeOptionsInternal = {\n\t\t\t\tsummaryOptions: {\n\t\t\t\t\tsummaryConfigOverrides: {\n\t\t\t\t\t\t...DefaultSummaryConfiguration,\n\t\t\t\t\t\t...{\n\t\t\t\t\t\t\tinitialSummarizerDelayMs: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tpublic minVersionForCollab: OldestSupportedClientVersion | undefined = undefined,\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\tpublic requestHandlers: RuntimeRequestHandler[] = [],\n\t\t) {\n\t\t\tsuper();\n\t\t}\n\n\t\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!\n\t\t\t// Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.\n\t\t\tconst rootContext =\n\t\t\t\t\"createDetachedRootDataStore\" in runtime\n\t\t\t\t\t? (runtime as any).createDetachedRootDataStore([this.type], \"default\")\n\t\t\t\t\t: runtime.createDetachedDataStore([this.type]);\n\n\t\t\tconst rootRuntime = await this.dataStoreFactory.instantiateDataStore(\n\t\t\t\trootContext,\n\t\t\t\t/* existing */ false,\n\t\t\t);\n\t\t\tconst dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);\n\n\t\t\tconst result = await dataStore?.trySetAlias(\"default\");\n\t\t\tassert(result === \"Success\" || result === undefined, \"success\");\n\t\t}\n\n\t\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Validate we can load root data stores.\n\t\t\t// We should be able to load any data store that was created in initializeFirstTime!\n\t\t\t// Note: We use the deprecated `getRootDataStore` from v1.X here to allow for cross-major version compat\n\t\t\t// testing. Can be removed when we no longer support v1.X.\n\t\t\tawait (runtime.getAliasedDataStoreEntryPoint?.(\"default\") ??\n\t\t\t\t(\n\t\t\t\t\truntime as any as {\n\t\t\t\t\t\tgetRootDataStore(id: string, wait?: boolean): Promise<backCompat_IFluidRouter>;\n\t\t\t\t\t}\n\t\t\t\t).getRootDataStore(\"default\"));\n\t\t}\n\n\t\tasync preInitialize(\n\t\t\tcontext: IContainerContext,\n\t\t\texisting: boolean,\n\t\t): Promise<IRuntime & IContainerRuntime> {\n\t\t\tif (containerRuntimeCtor.loadRuntime === undefined) {\n\t\t\t\t// Note: We use the deprecated `load` from v1.X here to allow for cross-major version compat testing.\n\t\t\t\t// Can be removed when we no longer support v1.X.\n\t\t\t\treturn (containerRuntimeCtor as any as backCompat_ContainerRuntime).load(\n\t\t\t\t\tcontext,\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t],\n\t\t\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\t\t\tbuildRuntimeRequestHandler(\n\t\t\t\t\t\tbackCompat_DefaultRouteRequestHandler(\"default\"),\n\t\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t\t),\n\t\t\t\t\tthis.runtimeOptions,\n\t\t\t\t\tcontext.scope,\n\t\t\t\t\texisting,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst provideEntryPoint = async (runtime: IContainerRuntime): Promise<FluidObject> => {\n\t\t\t\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\t\t\t\tif (entryPoint === undefined) {\n\t\t\t\t\tthrow new Error(\"default dataStore must exist\");\n\t\t\t\t}\n\t\t\t\treturn entryPoint.get();\n\t\t\t};\n\t\t\tconst getDefaultObject = async (\n\t\t\t\trequest: IRequest,\n\t\t\t\truntime: IContainerRuntime,\n\t\t\t): Promise<IResponse | undefined> => {\n\t\t\t\tconst parser = RequestParser.create(request);\n\t\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t\t// This cast is safe as loadContainerRuntime is called below\n\t\t\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\t\t\treturn (runtime as IContainerRuntimeWithResolveHandle_Deprecated).resolveHandle({\n\t\t\t\t\t\turl: `/default${parser.query}`,\n\t\t\t\t\t\theaders: request.headers,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn undefined; // continue search\n\t\t\t};\n\n\t\t\t// This usage of `containerRuntimeCtor.loadRuntime`, an `@internal` API, called on past versions of this package,\n\t\t\t// adds an extra constraint that makes changing that API more difficult than it otherwise would be.\n\t\t\t// Actual customers / apps should not be dependent on stability of this API, but this code is, at least for now.\n\t\t\tconst registryEntries: NamedFluidDataStoreRegistryEntries = [\n\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t];\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\tconst requestHandler = buildRuntimeRequestHandler(\n\t\t\t\tgetDefaultObject,\n\t\t\t\t...this.requestHandlers,\n\t\t\t);\n\n\t\t\tconst loadRuntimeVersion = containerRuntimeCtor.loadRuntimeAPIVersion ?? 1;\n\t\t\tswitch (loadRuntimeVersion) {\n\t\t\t\tcase 1:\n\t\t\t\t\t// Old loadRuntime: took registryEntries instead of registry.\n\t\t\t\t\treturn (\n\t\t\t\t\t\tcontainerRuntimeCtor as unknown as backCompat_ContainerRuntime_loadRuntime\n\t\t\t\t\t).loadRuntime({\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tregistryEntries,\n\t\t\t\t\t\trequestHandler,\n\t\t\t\t\t\tprovideEntryPoint,\n\t\t\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\t\t\tcontainerScope: context.scope,\n\t\t\t\t\t\texisting,\n\t\t\t\t\t\toldestSupportedClient: this.minVersionForCollab,\n\t\t\t\t\t\tminVersionForCollab: this.minVersionForCollab,\n\t\t\t\t\t});\n\t\t\t\tcase 2:\n\t\t\t\t\treturn containerRuntimeCtor.loadRuntime({\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tregistry: new FluidDataStoreRegistry(registryEntries),\n\t\t\t\t\t\trequestHandler,\n\t\t\t\t\t\tprovideEntryPoint,\n\t\t\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\t\t\tcontainerScope: context.scope,\n\t\t\t\t\t\texisting,\n\t\t\t\t\t\toldestSupportedClient: this.minVersionForCollab,\n\t\t\t\t\t});\n\t\t\t\tdefault:\n\t\t\t\t\tfail();\n\t\t\t}\n\t\t}\n\t};\n};\n\n/**\n * A container runtime factory that allows you to set runtime options\n * @internal\n */\nexport const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);\n"]}
1
+ {"version":3,"file":"testContainerRuntimeFactory.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6CAAmC;AAGnC,yEAKoD;AAQpD,kEAA6D;AAC7D,uEAKkD;AAMlD,qEAA6F;AAE7F,iEAA0E;AAO1E,MAAM,qCAAqC,GAAG,CAAC,aAAqB,EAAE,EAAE;IACvE,OAAO,KAAK,EAAE,OAAiB,EAAE,OAA0B,EAAE,EAAE;QAC9D,MAAM,MAAM,GAAG,wBAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,OACC,OACA,CAAC,mBAAmB,CAAC,aAAa,CAAC;gBACnC,GAAG,EAAE,IAAI,aAAa,GAAG,MAAM,CAAC,KAAK,EAAE;gBACvC,OAAO,EAAE,OAAO,CAAC,OAAO;aACxB,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC,CAAC,kBAAkB;IACrC,CAAC,CAAC;AACH,CAAC,CAAC;AAkCF;;;GAGG;AACI,MAAM,iCAAiC,GAAG,CAChD,oBAA6C,EAE5C,EAAE;IACH,OAAO,KAAM,SAAQ,+BAAoB;QAEhC;QACA;QACA;QAUA;QAEA;QAfR,YACQ,IAAY,EACZ,gBAAwC,EACxC,iBAAmD;YACzD,cAAc,EAAE;gBACf,sBAAsB,EAAE;oBACvB,GAAG,sCAA2B;oBAC9B,GAAG;wBACF,wBAAwB,EAAE,CAAC;qBAC3B;iBACD;aACD;SACD,EACM,sBAAoD,uDAAgC;QAC3F,kDAAkD;QAC3C,kBAA2C,EAAE;YAEpD,KAAK,EAAE,CAAC;YAhBD,SAAI,GAAJ,IAAI,CAAQ;YACZ,qBAAgB,GAAhB,gBAAgB,CAAwB;YACxC,mBAAc,GAAd,cAAc,CASpB;YACM,wBAAmB,GAAnB,mBAAmB,CAAiE;YAE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,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACnD,CAAC;YACF,kDAAkD;YAClD,MAAM,cAAc,GAAG,IAAA,qCAA0B,EAChD,gBAAgB,EAChB,GAAG,IAAI,CAAC,eAAe,CACvB,CAAC;YAEF,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,qBAAqB,IAAI,CAAC,CAAC;YAC3E,QAAQ,kBAAkB,EAAE,CAAC;gBAC5B,KAAK,CAAC;oBACL,6DAA6D;oBAC7D,OACC,oBACA,CAAC,WAAW,CAAC;wBACb,OAAO;wBACP,eAAe;wBACf,cAAc;wBACd,iBAAiB;wBACjB,cAAc,EAAE,IAAI,CAAC,cAAc;wBACnC,cAAc,EAAE,OAAO,CAAC,KAAK;wBAC7B,QAAQ;wBACR,qBAAqB,EAAE,IAAI,CAAC,mBAAmB;wBAC/C,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;qBAC7C,CAAC,CAAC;gBACJ,KAAK,CAAC;oBACL,OAAO,oBAAoB,CAAC,WAAW,CAAC;wBACvC,OAAO;wBACP,QAAQ,EAAE,IAAI,iCAAsB,CAAC,eAAe,CAAC;wBACrD,cAAc;wBACd,iBAAiB;wBACjB,cAAc,EAAE,IAAI,CAAC,cAAc;wBACnC,cAAc,EAAE,OAAO,CAAC,KAAK;wBAC7B,QAAQ;wBACR,qBAAqB,EAAE,IAAI,CAAC,mBAAmB;qBAC/C,CAAC,CAAC;gBACJ;oBACC,IAAA,kBAAI,GAAE,CAAC;YACT,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC,CAAC;AApJW,QAAA,iCAAiC,qCAoJ5C;AAEF;;;GAGG;AACU,QAAA,2BAA2B,GAAG,IAAA,yCAAiC,EAAC,2BAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"node:assert\";\n\nimport { IContainerContext, IRuntime } from \"@fluidframework/container-definitions/internal\";\nimport {\n\tContainerRuntime,\n\tDefaultSummaryConfiguration,\n\tFluidDataStoreRegistry,\n\ttype IContainerRuntimeOptionsInternal,\n} from \"@fluidframework/container-runtime/internal\";\nimport {\n\tIContainerRuntime,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tIContainerRuntimeWithResolveHandle_Deprecated,\n} from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\t// eslint-disable-next-line import-x/no-deprecated\n\tRuntimeRequestHandler,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n\ttype OldestSupportedClientVersion,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RequestParser, RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\nimport { defaultTestOldestSupportedClient } from \"./testCompatibility.js\";\n\ninterface backCompat_IFluidRouter {\n\tIFluidRouter?: backCompat_IFluidRouter;\n\trequest(request: IRequest): Promise<IResponse>;\n}\n\nconst backCompat_DefaultRouteRequestHandler = (defaultRootId: string) => {\n\treturn async (request: IRequest, runtime: IContainerRuntime) => {\n\t\tconst parser = RequestParser.create(request);\n\t\tif (parser.pathParts.length === 0) {\n\t\t\treturn (\n\t\t\t\truntime as any as Required<FluidObject<IFluidHandleContext>>\n\t\t\t).IFluidHandleContext.resolveHandle({\n\t\t\t\turl: `/${defaultRootId}${parser.query}`,\n\t\t\t\theaders: request.headers,\n\t\t\t});\n\t\t}\n\t\treturn undefined; // continue search\n\t};\n};\n\ninterface backCompat_ContainerRuntime {\n\tload(\n\t\tcontext: IContainerContext,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>,\n\t\truntimeOptions?: IContainerRuntimeOptionsInternal,\n\t\tcontainerScope?: FluidObject,\n\t\texisting?: boolean,\n\t\tcontainerRuntimeCtor?: typeof ContainerRuntime,\n\t): Promise<ContainerRuntime>;\n}\n\n/**\n * loadRuntime API before https://github.com/microsoft/FluidFramework/pull/27685 took registryEntries instead of registry.\n */\ninterface backCompat_ContainerRuntime_loadRuntime {\n\tloadRuntime(params: {\n\t\tcontext: IContainerContext;\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t\texisting: boolean;\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;\n\t\tprovideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;\n\t\truntimeOptions?: IContainerRuntimeOptionsInternal;\n\t\tcontainerScope?: FluidObject;\n\t\t// Some versions of this API exist which expect this to be provided under the name `minVersionForCollab` (before https://github.com/microsoft/FluidFramework/pull/27806),\n\t\t// so this fails to actually set minVersionForCollab in some old cases, but it was optional then so does not error.\n\t\t// That predates the versioning of this API, so we mitigate by setting both.\n\t\toldestSupportedClient: OldestSupportedClientVersion | undefined;\n\t\tminVersionForCollab: OldestSupportedClientVersion | undefined;\n\t}): Promise<ContainerRuntime>;\n}\n\n/**\n * Create a container runtime factory class that allows you to set runtime options\n * @internal\n */\nexport const createTestContainerRuntimeFactory = (\n\tcontainerRuntimeCtor: typeof ContainerRuntime,\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Returning anonymous class type\n) => {\n\treturn class extends RuntimeFactoryHelper {\n\t\tconstructor(\n\t\t\tpublic type: string,\n\t\t\tpublic dataStoreFactory: IFluidDataStoreFactory,\n\t\t\tpublic runtimeOptions: IContainerRuntimeOptionsInternal = {\n\t\t\t\tsummaryOptions: {\n\t\t\t\t\tsummaryConfigOverrides: {\n\t\t\t\t\t\t...DefaultSummaryConfiguration,\n\t\t\t\t\t\t...{\n\t\t\t\t\t\t\tinitialSummarizerDelayMs: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tpublic minVersionForCollab: OldestSupportedClientVersion = defaultTestOldestSupportedClient,\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\tpublic requestHandlers: RuntimeRequestHandler[] = [],\n\t\t) {\n\t\t\tsuper();\n\t\t}\n\n\t\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!\n\t\t\t// Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.\n\t\t\tconst rootContext =\n\t\t\t\t\"createDetachedRootDataStore\" in runtime\n\t\t\t\t\t? (runtime as any).createDetachedRootDataStore([this.type], \"default\")\n\t\t\t\t\t: runtime.createDetachedDataStore([this.type]);\n\n\t\t\tconst rootRuntime = await this.dataStoreFactory.instantiateDataStore(\n\t\t\t\trootContext,\n\t\t\t\t/* existing */ false,\n\t\t\t);\n\t\t\tconst dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);\n\n\t\t\tconst result = await dataStore?.trySetAlias(\"default\");\n\t\t\tassert(result === \"Success\" || result === undefined, \"success\");\n\t\t}\n\n\t\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Validate we can load root data stores.\n\t\t\t// We should be able to load any data store that was created in initializeFirstTime!\n\t\t\t// Note: We use the deprecated `getRootDataStore` from v1.X here to allow for cross-major version compat\n\t\t\t// testing. Can be removed when we no longer support v1.X.\n\t\t\tawait (runtime.getAliasedDataStoreEntryPoint?.(\"default\") ??\n\t\t\t\t(\n\t\t\t\t\truntime as any as {\n\t\t\t\t\t\tgetRootDataStore(id: string, wait?: boolean): Promise<backCompat_IFluidRouter>;\n\t\t\t\t\t}\n\t\t\t\t).getRootDataStore(\"default\"));\n\t\t}\n\n\t\tasync preInitialize(\n\t\t\tcontext: IContainerContext,\n\t\t\texisting: boolean,\n\t\t): Promise<IRuntime & IContainerRuntime> {\n\t\t\tif (containerRuntimeCtor.loadRuntime === undefined) {\n\t\t\t\t// Note: We use the deprecated `load` from v1.X here to allow for cross-major version compat testing.\n\t\t\t\t// Can be removed when we no longer support v1.X.\n\t\t\t\treturn (containerRuntimeCtor as any as backCompat_ContainerRuntime).load(\n\t\t\t\t\tcontext,\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t],\n\t\t\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\t\t\tbuildRuntimeRequestHandler(\n\t\t\t\t\t\tbackCompat_DefaultRouteRequestHandler(\"default\"),\n\t\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t\t),\n\t\t\t\t\tthis.runtimeOptions,\n\t\t\t\t\tcontext.scope,\n\t\t\t\t\texisting,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst provideEntryPoint = async (runtime: IContainerRuntime): Promise<FluidObject> => {\n\t\t\t\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\t\t\t\tif (entryPoint === undefined) {\n\t\t\t\t\tthrow new Error(\"default dataStore must exist\");\n\t\t\t\t}\n\t\t\t\treturn entryPoint.get();\n\t\t\t};\n\t\t\tconst getDefaultObject = async (\n\t\t\t\trequest: IRequest,\n\t\t\t\truntime: IContainerRuntime,\n\t\t\t): Promise<IResponse | undefined> => {\n\t\t\t\tconst parser = RequestParser.create(request);\n\t\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t\t// This cast is safe as loadContainerRuntime is called below\n\t\t\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\t\t\treturn (runtime as IContainerRuntimeWithResolveHandle_Deprecated).resolveHandle({\n\t\t\t\t\t\turl: `/default${parser.query}`,\n\t\t\t\t\t\theaders: request.headers,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn undefined; // continue search\n\t\t\t};\n\n\t\t\t// This usage of `containerRuntimeCtor.loadRuntime`, an `@internal` API, called on past versions of this package,\n\t\t\t// adds an extra constraint that makes changing that API more difficult than it otherwise would be.\n\t\t\t// Actual customers / apps should not be dependent on stability of this API, but this code is, at least for now.\n\t\t\tconst registryEntries: NamedFluidDataStoreRegistryEntries = [\n\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t];\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\tconst requestHandler = buildRuntimeRequestHandler(\n\t\t\t\tgetDefaultObject,\n\t\t\t\t...this.requestHandlers,\n\t\t\t);\n\n\t\t\tconst loadRuntimeVersion = containerRuntimeCtor.loadRuntimeAPIVersion ?? 1;\n\t\t\tswitch (loadRuntimeVersion) {\n\t\t\t\tcase 1:\n\t\t\t\t\t// Old loadRuntime: took registryEntries instead of registry.\n\t\t\t\t\treturn (\n\t\t\t\t\t\tcontainerRuntimeCtor as unknown as backCompat_ContainerRuntime_loadRuntime\n\t\t\t\t\t).loadRuntime({\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tregistryEntries,\n\t\t\t\t\t\trequestHandler,\n\t\t\t\t\t\tprovideEntryPoint,\n\t\t\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\t\t\tcontainerScope: context.scope,\n\t\t\t\t\t\texisting,\n\t\t\t\t\t\toldestSupportedClient: this.minVersionForCollab,\n\t\t\t\t\t\tminVersionForCollab: this.minVersionForCollab,\n\t\t\t\t\t});\n\t\t\t\tcase 2:\n\t\t\t\t\treturn containerRuntimeCtor.loadRuntime({\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tregistry: new FluidDataStoreRegistry(registryEntries),\n\t\t\t\t\t\trequestHandler,\n\t\t\t\t\t\tprovideEntryPoint,\n\t\t\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\t\t\tcontainerScope: context.scope,\n\t\t\t\t\t\texisting,\n\t\t\t\t\t\toldestSupportedClient: this.minVersionForCollab,\n\t\t\t\t\t});\n\t\t\t\tdefault:\n\t\t\t\t\tfail();\n\t\t\t}\n\t\t}\n\t};\n};\n\n/**\n * A container runtime factory that allows you to set runtime options\n * @internal\n */\nexport const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);\n"]}
@@ -7,7 +7,8 @@ import { IContainerRuntimeOptions } from "@fluidframework/container-runtime/inte
7
7
  import { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
8
8
  import { FluidObject } from "@fluidframework/core-interfaces";
9
9
  import { RuntimeRequestHandler } from "@fluidframework/request-handler/internal";
10
- import { IFluidDataStoreFactory, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions/internal";
10
+ import type { IFluidDataStoreFactory, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions/internal";
11
+ import type { defaultTestOldestSupportedClient } from "./testCompatibility.js";
11
12
  /**
12
13
  * {@link ContainerRuntimeFactoryWithDefaultDataStoreConstructor} input properties.
13
14
  *
@@ -15,6 +16,14 @@ import { IFluidDataStoreFactory, NamedFluidDataStoreRegistryEntries } from "@flu
15
16
  */
16
17
  export interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
17
18
  readonly defaultFactory: IFluidDataStoreFactory;
19
+ /**
20
+ * Compatibility setting used by all constructor shapes supported by this helper.
21
+ *
22
+ * @remarks
23
+ * Object-shaped constructors receive this setting explicitly. Positional constructors predate
24
+ * the setting and continue to use the historical package's own implicit default.
25
+ */
26
+ readonly oldestSupportedClient: typeof defaultTestOldestSupportedClient;
18
27
  /**
19
28
  * The data store registry for containers produced.
20
29
  */
@@ -43,13 +52,17 @@ export interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
43
52
  *
44
53
  * @internal
45
54
  */
46
- export type ContainerRuntimeFactoryWithDefaultDataStoreConstructor = new (props: ContainerRuntimeFactoryWithDefaultDataStoreProps) => IRuntimeFactory;
55
+ export type ContainerRuntimeFactoryWithDefaultDataStoreConstructor = ((new (props: ContainerRuntimeFactoryWithDefaultDataStoreProps) => IRuntimeFactory) | (new (defaultFactory: IFluidDataStoreFactory, registryEntries: NamedFluidDataStoreRegistryEntries, dependencyContainer?: never, requestHandlers?: RuntimeRequestHandler[], runtimeOptions?: IContainerRuntimeOptions, provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>) => IRuntimeFactory)) & {
56
+ readonly length: number;
57
+ };
47
58
  /**
48
59
  * Creates a container runtime factory with default data store for backward compatibility.
49
60
  *
50
61
  * @remarks
51
- * This function is purely needed for back-compat as the constructor argument structure of
52
- * `ContainerRuntimeFactoryWithDefaultDataStore` was changed.
62
+ * Exact constructors loaded by compatibility tests use the positional shape through
63
+ * `2.0.0-internal.5.4.2` and the object shape beginning with `2.0.0-internal.7.0.0`.
64
+ * JavaScript constructor length counts parameters before the first default-valued parameter, so
65
+ * these shapes have arity 3 and 1 respectively. Unknown arities are rejected rather than guessed.
53
66
  *
54
67
  * @internal
55
68
  */
@@ -1 +1 @@
1
- {"version":3,"file":"testContainerRuntimeFactoryWithDefaultDataStore.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EACN,sBAAsB,EACtB,kCAAkC,EAClC,MAAM,8CAA8C,CAAC;AAUtD;;;;GAIG;AACH,MAAM,WAAW,gDAAgD;IAChE,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAChD;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,kCAAkC,CAAC;IAE7D;;OAEG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAErC;;;OAGG;IAEH,QAAQ,CAAC,eAAe,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAEnD;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CAClF;AAED;;;;GAIG;AACH,MAAM,MAAM,sDAAsD,GAAG,KACpE,KAAK,EAAE,gDAAgD,KACnD,eAAe,CAAC;AAErB;;;;;;;;GAQG;AACH,eAAO,MAAM,iDAAiD,SACvD,sDAAsD,aACjD,gDAAgD,KACzD,eAuBF,CAAC"}
1
+ {"version":3,"file":"testContainerRuntimeFactoryWithDefaultDataStore.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,KAAK,EACX,sBAAsB,EACtB,kCAAkC,EAClC,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAU/E;;;;GAIG;AACH,MAAM,WAAW,gDAAgD;IAChE,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAEhD;;;;;;OAMG;IACH,QAAQ,CAAC,qBAAqB,EAAE,OAAO,gCAAgC,CAAC;IAExE;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,kCAAkC,CAAC;IAE7D;;OAEG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAErC;;;OAGG;IAEH,QAAQ,CAAC,eAAe,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAEnD;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CAClF;AAED;;;;GAIG;AACH,MAAM,MAAM,sDAAsD,GAAG,CAClE,CAAC,KACD,KAAK,EAAE,gDAAgD,KAClD,eAAe,CAAC,GACrB,CAAC,KACD,cAAc,EAAE,sBAAsB,EACtC,eAAe,EAAE,kCAAkC,EACnD,mBAAmB,CAAC,EAAE,KAAK,EAE3B,eAAe,CAAC,EAAE,qBAAqB,EAAE,EACzC,cAAc,CAAC,EAAE,wBAAwB,EACzC,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,KACnE,eAAe,CAAC,CACvB,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAiChC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iDAAiD,GAC7D,MAAM,sDAAsD,EAC5D,WAAW,gDAAgD,KACzD,eA4BF,CAAC"}
@@ -12,25 +12,35 @@ const getDefaultFluidObject = async (runtime) => {
12
12
  }
13
13
  return entryPoint.get();
14
14
  };
15
+ const objectConstructorArity = 1;
16
+ const positionalConstructorArity = 3;
17
+ function isObjectConstructor(ctor) {
18
+ return ctor.length === objectConstructorArity;
19
+ }
20
+ function isPositionalConstructor(ctor) {
21
+ return ctor.length === positionalConstructorArity;
22
+ }
15
23
  /**
16
24
  * Creates a container runtime factory with default data store for backward compatibility.
17
25
  *
18
26
  * @remarks
19
- * This function is purely needed for back-compat as the constructor argument structure of
20
- * `ContainerRuntimeFactoryWithDefaultDataStore` was changed.
27
+ * Exact constructors loaded by compatibility tests use the positional shape through
28
+ * `2.0.0-internal.5.4.2` and the object shape beginning with `2.0.0-internal.7.0.0`.
29
+ * JavaScript constructor length counts parameters before the first default-valued parameter, so
30
+ * these shapes have arity 3 and 1 respectively. Unknown arities are rejected rather than guessed.
21
31
  *
22
32
  * @internal
23
33
  */
24
34
  const createContainerRuntimeFactoryWithDefaultDataStore = (ctor, ctorProps) => {
25
- try {
35
+ const constructorArity = ctor.length;
36
+ if (isObjectConstructor(ctor)) {
26
37
  return new ctor(ctorProps);
27
38
  }
28
- catch (err) {
29
- // IMPORTANT: The constructor argument structure changed, so this is needed for dynamically using older `ContainerRuntimeFactoryWithDefaultDataStore`s
39
+ if (isPositionalConstructor(ctor)) {
30
40
  const { defaultFactory, registryEntries, dependencyContainer, requestHandlers, runtimeOptions, provideEntryPoint, } = ctorProps;
31
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
32
41
  return new ctor(defaultFactory, registryEntries, dependencyContainer, requestHandlers, runtimeOptions, provideEntryPoint ?? getDefaultFluidObject);
33
42
  }
43
+ throw new Error(`Unsupported ContainerRuntimeFactoryWithDefaultDataStore constructor arity: ${constructorArity}`);
34
44
  };
35
45
  exports.createContainerRuntimeFactoryWithDefaultDataStore = createContainerRuntimeFactoryWithDefaultDataStore;
36
46
  //# sourceMappingURL=testContainerRuntimeFactoryWithDefaultDataStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"testContainerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAaH,MAAM,qBAAqB,GAAG,KAAK,EAAE,OAA0B,EAAwB,EAAE;IACxF,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;IAC1E,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC,CAAC;AA+CF;;;;;;;;GAQG;AACI,MAAM,iDAAiD,GAAG,CAChE,IAA4D,EAC5D,SAA2D,EACzC,EAAE;IACpB,IAAI,CAAC;QACJ,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,sJAAsJ;QACtJ,MAAM,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,iBAAiB,GACjB,GAAG,SAAS,CAAC;QACd,+DAA+D;QAC/D,OAAO,IAAK,IAAY,CACvB,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,iBAAiB,IAAI,qBAAqB,CAC1C,CAAC;IACH,CAAC;AACF,CAAC,CAAC;AA1BW,QAAA,iDAAiD,qDA0B5D","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IRuntimeFactory } from \"@fluidframework/container-definitions/internal\";\nimport { IContainerRuntimeOptions } from \"@fluidframework/container-runtime/internal\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n// eslint-disable-next-line import-x/no-deprecated\nimport { RuntimeRequestHandler } from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nconst getDefaultFluidObject = async (runtime: IContainerRuntime): Promise<FluidObject> => {\n\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\tif (entryPoint === undefined) {\n\t\tthrow new Error(\"default dataStore must exist\");\n\t}\n\treturn entryPoint.get();\n};\n\n/**\n * {@link ContainerRuntimeFactoryWithDefaultDataStoreConstructor} input properties.\n *\n * @internal\n */\nexport interface ContainerRuntimeFactoryWithDefaultDataStoreProps {\n\treadonly defaultFactory: IFluidDataStoreFactory;\n\t/**\n\t * The data store registry for containers produced.\n\t */\n\treadonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\n\t/**\n\t * @deprecated Do not use. This strictly exists for backwards compatibility.\n\t */\n\treadonly dependencyContainer?: never;\n\n\t/**\n\t * Request handlers for containers produced.\n\t * @deprecated Will be removed once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import-x/no-deprecated\n\treadonly requestHandlers?: RuntimeRequestHandler[];\n\n\t/**\n\t * The runtime options passed to the IContainerRuntime when instantiating it\n\t */\n\treadonly runtimeOptions?: IContainerRuntimeOptions;\n\n\t/**\n\t * Function that will initialize the entryPoint of the IContainerRuntime instances\n\t * created with this factory\n\t */\n\treadonly provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;\n}\n\n/**\n * {@link @fluidframework/container-definitions#IRuntimeFactory} construct signature.\n *\n * @internal\n */\nexport type ContainerRuntimeFactoryWithDefaultDataStoreConstructor = new (\n\tprops: ContainerRuntimeFactoryWithDefaultDataStoreProps,\n) => IRuntimeFactory;\n\n/**\n * Creates a container runtime factory with default data store for backward compatibility.\n *\n * @remarks\n * This function is purely needed for back-compat as the constructor argument structure of\n * `ContainerRuntimeFactoryWithDefaultDataStore` was changed.\n *\n * @internal\n */\nexport const createContainerRuntimeFactoryWithDefaultDataStore = (\n\tctor: ContainerRuntimeFactoryWithDefaultDataStoreConstructor,\n\tctorProps: ContainerRuntimeFactoryWithDefaultDataStoreProps,\n): IRuntimeFactory => {\n\ttry {\n\t\treturn new ctor(ctorProps);\n\t} catch (err) {\n\t\t// IMPORTANT: The constructor argument structure changed, so this is needed for dynamically using older `ContainerRuntimeFactoryWithDefaultDataStore`s\n\t\tconst {\n\t\t\tdefaultFactory,\n\t\t\tregistryEntries,\n\t\t\tdependencyContainer,\n\t\t\trequestHandlers,\n\t\t\truntimeOptions,\n\t\t\tprovideEntryPoint,\n\t\t} = ctorProps;\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn new (ctor as any)(\n\t\t\tdefaultFactory,\n\t\t\tregistryEntries,\n\t\t\tdependencyContainer,\n\t\t\trequestHandlers,\n\t\t\truntimeOptions,\n\t\t\tprovideEntryPoint ?? getDefaultFluidObject,\n\t\t);\n\t}\n};\n"]}
1
+ {"version":3,"file":"testContainerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH,MAAM,qBAAqB,GAAG,KAAK,EAAE,OAA0B,EAAwB,EAAE;IACxF,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;IAC1E,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC,CAAC;AAgFF,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAErC,SAAS,mBAAmB,CAC3B,IAA4D;IAI5D,OAAO,IAAI,CAAC,MAAM,KAAK,sBAAsB,CAAC;AAC/C,CAAC;AAED,SAAS,uBAAuB,CAC/B,IAA4D;IAI5D,OAAO,IAAI,CAAC,MAAM,KAAK,0BAA0B,CAAC;AACnD,CAAC;AAED;;;;;;;;;;GAUG;AACI,MAAM,iDAAiD,GAAG,CAChE,IAA4D,EAC5D,SAA2D,EACzC,EAAE;IACpB,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC;IACrC,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,uBAAuB,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,MAAM,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,iBAAiB,GACjB,GAAG,SAAS,CAAC;QACd,OAAO,IAAI,IAAI,CACd,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,iBAAiB,IAAI,qBAAqB,CAC1C,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CACd,8EAA8E,gBAAgB,EAAE,CAChG,CAAC;AACH,CAAC,CAAC;AA/BW,QAAA,iDAAiD,qDA+B5D","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IRuntimeFactory } from \"@fluidframework/container-definitions/internal\";\nimport { IContainerRuntimeOptions } from \"@fluidframework/container-runtime/internal\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n// eslint-disable-next-line import-x/no-deprecated\nimport { RuntimeRequestHandler } from \"@fluidframework/request-handler/internal\";\nimport type {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport type { defaultTestOldestSupportedClient } from \"./testCompatibility.js\";\n\nconst getDefaultFluidObject = async (runtime: IContainerRuntime): Promise<FluidObject> => {\n\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\tif (entryPoint === undefined) {\n\t\tthrow new Error(\"default dataStore must exist\");\n\t}\n\treturn entryPoint.get();\n};\n\n/**\n * {@link ContainerRuntimeFactoryWithDefaultDataStoreConstructor} input properties.\n *\n * @internal\n */\nexport interface ContainerRuntimeFactoryWithDefaultDataStoreProps {\n\treadonly defaultFactory: IFluidDataStoreFactory;\n\n\t/**\n\t * Compatibility setting used by all constructor shapes supported by this helper.\n\t *\n\t * @remarks\n\t * Object-shaped constructors receive this setting explicitly. Positional constructors predate\n\t * the setting and continue to use the historical package's own implicit default.\n\t */\n\treadonly oldestSupportedClient: typeof defaultTestOldestSupportedClient;\n\n\t/**\n\t * The data store registry for containers produced.\n\t */\n\treadonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\n\t/**\n\t * @deprecated Do not use. This strictly exists for backwards compatibility.\n\t */\n\treadonly dependencyContainer?: never;\n\n\t/**\n\t * Request handlers for containers produced.\n\t * @deprecated Will be removed once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import-x/no-deprecated\n\treadonly requestHandlers?: RuntimeRequestHandler[];\n\n\t/**\n\t * The runtime options passed to the IContainerRuntime when instantiating it\n\t */\n\treadonly runtimeOptions?: IContainerRuntimeOptions;\n\n\t/**\n\t * Function that will initialize the entryPoint of the IContainerRuntime instances\n\t * created with this factory\n\t */\n\treadonly provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;\n}\n\n/**\n * {@link @fluidframework/container-definitions#IRuntimeFactory} construct signature.\n *\n * @internal\n */\nexport type ContainerRuntimeFactoryWithDefaultDataStoreConstructor = (\n\t| (new (\n\t\t\tprops: ContainerRuntimeFactoryWithDefaultDataStoreProps,\n\t ) => IRuntimeFactory)\n\t| (new (\n\t\t\tdefaultFactory: IFluidDataStoreFactory,\n\t\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\t\tdependencyContainer?: never,\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\trequestHandlers?: RuntimeRequestHandler[],\n\t\t\truntimeOptions?: IContainerRuntimeOptions,\n\t\t\tprovideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>,\n\t ) => IRuntimeFactory)\n) & { readonly length: number };\n\ntype ObjectContainerRuntimeFactoryWithDefaultDataStoreConstructor = Extract<\n\tContainerRuntimeFactoryWithDefaultDataStoreConstructor,\n\tnew (\n\t\tprops: ContainerRuntimeFactoryWithDefaultDataStoreProps,\n\t) => IRuntimeFactory\n>;\n\ntype PositionalContainerRuntimeFactoryWithDefaultDataStoreConstructor = Exclude<\n\tContainerRuntimeFactoryWithDefaultDataStoreConstructor,\n\tObjectContainerRuntimeFactoryWithDefaultDataStoreConstructor\n>;\n\nconst objectConstructorArity = 1;\nconst positionalConstructorArity = 3;\n\nfunction isObjectConstructor(\n\tctor: ContainerRuntimeFactoryWithDefaultDataStoreConstructor,\n): ctor is ObjectContainerRuntimeFactoryWithDefaultDataStoreConstructor & {\n\treadonly length: typeof objectConstructorArity;\n} {\n\treturn ctor.length === objectConstructorArity;\n}\n\nfunction isPositionalConstructor(\n\tctor: ContainerRuntimeFactoryWithDefaultDataStoreConstructor,\n): ctor is PositionalContainerRuntimeFactoryWithDefaultDataStoreConstructor & {\n\treadonly length: typeof positionalConstructorArity;\n} {\n\treturn ctor.length === positionalConstructorArity;\n}\n\n/**\n * Creates a container runtime factory with default data store for backward compatibility.\n *\n * @remarks\n * Exact constructors loaded by compatibility tests use the positional shape through\n * `2.0.0-internal.5.4.2` and the object shape beginning with `2.0.0-internal.7.0.0`.\n * JavaScript constructor length counts parameters before the first default-valued parameter, so\n * these shapes have arity 3 and 1 respectively. Unknown arities are rejected rather than guessed.\n *\n * @internal\n */\nexport const createContainerRuntimeFactoryWithDefaultDataStore = (\n\tctor: ContainerRuntimeFactoryWithDefaultDataStoreConstructor,\n\tctorProps: ContainerRuntimeFactoryWithDefaultDataStoreProps,\n): IRuntimeFactory => {\n\tconst constructorArity = ctor.length;\n\tif (isObjectConstructor(ctor)) {\n\t\treturn new ctor(ctorProps);\n\t}\n\n\tif (isPositionalConstructor(ctor)) {\n\t\tconst {\n\t\t\tdefaultFactory,\n\t\t\tregistryEntries,\n\t\t\tdependencyContainer,\n\t\t\trequestHandlers,\n\t\t\truntimeOptions,\n\t\t\tprovideEntryPoint,\n\t\t} = ctorProps;\n\t\treturn new ctor(\n\t\t\tdefaultFactory,\n\t\t\tregistryEntries,\n\t\t\tdependencyContainer,\n\t\t\trequestHandlers,\n\t\t\truntimeOptions,\n\t\t\tprovideEntryPoint ?? getDefaultFluidObject,\n\t\t);\n\t}\n\n\tthrow new Error(\n\t\t`Unsupported ContainerRuntimeFactoryWithDefaultDataStore constructor arity: ${constructorArity}`,\n\t);\n};\n"]}
@@ -20,12 +20,19 @@ const internal_4 = require("@fluidframework/runtime-utils/internal");
20
20
  * @internal
21
21
  */
22
22
  class TestFluidObject {
23
+ runtime;
24
+ channel;
25
+ context;
26
+ initialSharedObjectsFactories;
23
27
  get ITestFluidObject() {
24
28
  return this;
25
29
  }
26
30
  get IFluidLoadable() {
27
31
  return this;
28
32
  }
33
+ handle;
34
+ root;
35
+ initializationPromise;
29
36
  /**
30
37
  * Creates a new TestFluidObject.
31
38
  * @param runtime - The data store runtime.
@@ -111,6 +118,9 @@ exports.TestFluidObject = TestFluidObject;
111
118
  * @internal
112
119
  */
113
120
  class TestFluidObjectFactory {
121
+ initialSharedObjectsFactories;
122
+ type;
123
+ dataObjectKind;
114
124
  get IFluidDataStoreFactory() {
115
125
  return this;
116
126
  }
@@ -1 +1 @@
1
- {"version":3,"file":"testFluidObject.js","sourceRoot":"","sources":["../src/testFluidObject.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,kEAA6D;AAC7D,iEAI4C;AAK5C,2DAAqE;AAMrE,qEAA2E;AAK3E;;;;;;;;;GASG;AACH,MAAa,eAAe;IAC3B,IAAW,gBAAgB;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IAOD;;;;;;OAMG;IACH,YACiB,OAA+B,EAC/B,OA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OAAO,EAAE,UAAU;QACnB,OAAO,EACP,0BAA0B,CAC1B,CAAC;QAEF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,OAAO,CAAC;IAChB,CAAC;CACD;AA7ED,wDA6EC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\ttype IFluidLoadable,\n} from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tFluidDataStoreRuntime,\n\tFluidObjectHandle,\n\tmixinRequestHandler,\n} from \"@fluidframework/datastore/internal\";\nimport {\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { ISharedMap, SharedMap } from \"@fluidframework/map/internal\";\nimport {\n\tIFluidDataStoreChannel,\n\tIFluidDataStoreContext,\n\tIFluidDataStoreFactory,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { create404Response } from \"@fluidframework/runtime-utils/internal\";\nimport type { ISharedObject } from \"@fluidframework/shared-object-base/internal\";\n\nimport { ITestFluidObject } from \"./interfaces.js\";\n\n/**\n * A test Fluid object that will create a shared object for each key-value pair in the initialSharedObjectsFactories passed to load.\n * The shared objects can be retrieved by passing the key of the entry to getSharedObject.\n * It exposes the IFluidDataStoreContext and IFluidDataStoreRuntime.\n * @privateRemarks\n * TODO:\n * Usage of this outside this repo (via ITestFluidObject) should probably be phased out.\n * Once thats done, ITestFluidObject can be made internal and this class can be replaced with the simplified TestFluidObjectInternal.\n * @internal\n */\nexport class TestFluidObject implements ITestFluidObject {\n\tpublic get ITestFluidObject(): ITestFluidObject {\n\t\treturn this;\n\t}\n\n\tpublic get IFluidLoadable(): IFluidLoadable {\n\t\treturn this;\n\t}\n\n\tpublic readonly handle: IFluidHandle<this>;\n\n\tpublic root!: ISharedMap;\n\tprivate initializationPromise: Promise<void> | undefined;\n\n\t/**\n\t * Creates a new TestFluidObject.\n\t * @param runtime - The data store runtime.\n\t * @param context - The data store context.\n\t * @param initialSharedObjectsFactories - A list of id to IChannelFactory mapping. For each item in the list,\n\t * a shared object is created which can be retrieved by calling getSharedObject() with the id;\n\t */\n\tconstructor(\n\t\tpublic readonly runtime: IFluidDataStoreRuntime,\n\t\tpublic readonly channel: IFluidDataStoreChannel,\n\t\tpublic readonly context: IFluidDataStoreContext,\n\t\tprivate readonly initialSharedObjectsFactories: ReadonlyMap<\n\t\t\tstring,\n\t\t\tIChannelFactory<ISharedObject>\n\t\t>,\n\t) {\n\t\tthis.handle = new FluidObjectHandle(this, \"\", runtime.objectsRoutingContext);\n\t}\n\n\t/**\n\t * Retrieves a shared object with the given id.\n\t * @param id - The id of the shared object to retrieve.\n\t */\n\tpublic async getSharedObject<T = any>(id: string): Promise<T> {\n\t\tif (this.initialSharedObjectsFactories === undefined) {\n\t\t\tthrow new Error(\"Shared objects were not provided during creation.\");\n\t\t}\n\n\t\tif (this.initialSharedObjectsFactories.has(id)) {\n\t\t\tconst handle = this.root.get<IFluidHandle<T>>(id);\n\t\t\tif (handle === undefined) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Shared object with id '${id}' is in initialSharedObjectsFactories but not found under root.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn handle.get();\n\t\t}\n\n\t\tthrow new Error(`Shared object with id ${id} not found.`);\n\t}\n\n\tpublic async request(request: IRequest): Promise<IResponse> {\n\t\treturn request.url === \"\" || request.url === \"/\" || request.url.startsWith(\"/?\")\n\t\t\t? { mimeType: \"fluid/object\", status: 200, value: this }\n\t\t\t: create404Response(request);\n\t}\n\n\tpublic async initialize(existing: boolean): Promise<void> {\n\t\tconst doInitialization = async (): Promise<void> => {\n\t\t\tif (!existing) {\n\t\t\t\tthis.root = SharedMap.create(this.runtime, \"root\");\n\n\t\t\t\tthis.initialSharedObjectsFactories.forEach(\n\t\t\t\t\t(sharedObjectFactory: IChannelFactory, key: string) => {\n\t\t\t\t\t\tconst sharedObject = this.runtime.createChannel(key, sharedObjectFactory.type);\n\t\t\t\t\t\tthis.root.set(key, sharedObject.handle);\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tthis.root.bindToContext();\n\t\t\t}\n\n\t\t\tthis.root = (await this.runtime.getChannel(\"root\")) as ISharedMap;\n\t\t};\n\n\t\tthis.initializationPromise ??= doInitialization();\n\t\treturn this.initializationPromise;\n\t}\n}\n\n/**\n * Iterable\\<[ChannelId, IChannelFactory]\\>.\n * @internal\n */\nexport type ChannelFactoryRegistry = Iterable<[string | undefined, IChannelFactory]>;\n\n/**\n * Kind of test data object which {@link TestFluidObjectFactory} can create.\n * @internal\n */\nexport type TestDataObjectKind = new (\n\truntime: IFluidDataStoreRuntime,\n\tchannel: IFluidDataStoreChannel,\n\tcontext: IFluidDataStoreContext,\n\tinitialSharedObjectsFactories: ReadonlyMap<string, IChannelFactory<ISharedObject>>,\n) => IFluidLoadable & {\n\trequest(request: IRequest): Promise<IResponse>;\n\tinitialize(existing: boolean): Promise<void>;\n};\n\n/**\n * Creates a factory for a TestFluidObject with the given object factory entries. It creates a data store runtime\n * with the object factories in the entry list. All the entries with an id other than undefined are passed to the\n * Fluid object so that it can create a shared object for each.\n *\n * @example\n *\n * The following will create a Fluid object that creates and loads a SharedString and SharedDirectory.\n * It will add SparseMatrix to the data store's factory so that it can be created later.\n *\n * ```typescript\n * new TestFluidObjectFactory([\n * [ \"sharedString\", SharedString.getFactory() ],\n * [ \"sharedDirectory\", SharedDirectory.getFactory() ],\n * [ undefined, SparseMatrix.getFactory() ],\n * ]);\n * ```\n *\n * The SharedString and SharedDirectory can be retrieved via getSharedObject() on the TestFluidObject as follows:\n *\n * ```typescript\n * sharedString = testFluidObject.getSharedObject<SharedString>(\"sharedString\");\n * sharedDir = testFluidObject.getSharedObject<SharedDirectory>(\"sharedDirectory\");\n * ```\n *\n * @privateRemarks Beware that using this class generally forfeits some compatibility coverage\n * `describeCompat` aims to provide:\n * `SharedMap`s always reference the current version of SharedMap.\n * AB#4670 tracks improving this situation.\n * @internal\n */\nexport class TestFluidObjectFactory implements IFluidDataStoreFactory {\n\tpublic get IFluidDataStoreFactory(): IFluidDataStoreFactory {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a new TestFluidObjectFactory.\n\t * @param initialSharedObjectsFactories - A list of id to IChannelFactory mapping. It creates a data store runtime with each\n\t * IChannelFactory. Entries with string ids are passed to the Fluid object so that it can create a shared object\n\t * for it.\n\t */\n\tconstructor(\n\t\tprivate readonly initialSharedObjectsFactories: ChannelFactoryRegistry,\n\t\tpublic readonly type = \"TestFluidObjectFactory\",\n\t\tprivate readonly dataObjectKind: TestDataObjectKind = TestFluidObject,\n\t) {}\n\n\tpublic async instantiateDataStore(\n\t\tcontext: IFluidDataStoreContext,\n\t\texisting: boolean,\n\t): Promise<FluidDataStoreRuntime> {\n\t\tconst dataTypes = new Map<string, IChannelFactory>();\n\n\t\t// Add SharedMap's factory which will be used to create the root map.\n\t\tconst sharedMapFactory = SharedMap.getFactory();\n\t\tdataTypes.set(sharedMapFactory.type, sharedMapFactory);\n\n\t\t// Add the object factories to the list to be sent to data store runtime.\n\t\tfor (const [, factory] of this.initialSharedObjectsFactories) {\n\t\t\tdataTypes.set(factory.type, factory);\n\t\t}\n\n\t\t// Create a map from the factory entries with entries that don't have the id as undefined. This will be\n\t\t// passed to the Fluid object.\n\t\tconst factoryEntriesMapForObject = new Map<string, IChannelFactory<ISharedObject>>();\n\t\tfor (const [id, factory] of this.initialSharedObjectsFactories) {\n\t\t\tif (id !== undefined) {\n\t\t\t\t// Here we assume the factory produces an ISharedObject.\n\t\t\t\tfactoryEntriesMapForObject.set(id, factory as IChannelFactory<ISharedObject>);\n\t\t\t}\n\t\t}\n\n\t\tconst runtimeClass = mixinRequestHandler(\n\t\t\tasync (request: IRequest, rt: FluidDataStoreRuntime) => {\n\t\t\t\t// The provideEntryPoint callback below always returns TestFluidObject.\n\t\t\t\tconst dataObject = await rt.entryPoint.get();\n\t\t\t\tassert(\n\t\t\t\t\tdataObject instanceof this.dataObjectKind,\n\t\t\t\t\t\"entryPoint should have been initialized by now\",\n\t\t\t\t);\n\t\t\t\treturn dataObject.request(request);\n\t\t\t},\n\t\t);\n\n\t\tconst runtime: FluidDataStoreRuntime = new runtimeClass(\n\t\t\tcontext,\n\t\t\tdataTypes,\n\t\t\texisting,\n\t\t\tasync () => {\n\t\t\t\tawait instance.initialize(true);\n\t\t\t\treturn instance;\n\t\t\t},\n\t\t);\n\n\t\tconst instance = new this.dataObjectKind(\n\t\t\truntime, // runtime\n\t\t\truntime, // channel\n\t\t\tcontext,\n\t\t\tfactoryEntriesMapForObject,\n\t\t);\n\n\t\tif (!existing) {\n\t\t\tawait instance.initialize(false);\n\t\t}\n\n\t\treturn runtime;\n\t}\n}\n"]}
1
+ {"version":3,"file":"testFluidObject.js","sourceRoot":"","sources":["../src/testFluidObject.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,kEAA6D;AAC7D,iEAI4C;AAK5C,2DAAqE;AAMrE,qEAA2E;AAK3E;;;;;;;;;GASG;AACH,MAAa,eAAe;IAsBV;IACA;IACA;IACC;IAxBlB,IAAW,gBAAgB;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IAEe,MAAM,CAAqB;IAEpC,IAAI,CAAc;IACjB,qBAAqB,CAA4B;IAEzD;;;;;;OAMG;IACH,YACiB,OAA+B,EAC/B,OAA+B,EAC/B,OAA+B,EAC9B,6BAGhB;QANe,YAAO,GAAP,OAAO,CAAwB;QAC/B,YAAO,GAAP,OAAO,CAAwB;QAC/B,YAAO,GAAP,OAAO,CAAwB;QAC9B,kCAA6B,GAA7B,6BAA6B,CAG7C;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,4BAAi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C;CACD;AA7ED,wDA6EC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\ttype IFluidLoadable,\n} from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tFluidDataStoreRuntime,\n\tFluidObjectHandle,\n\tmixinRequestHandler,\n} from \"@fluidframework/datastore/internal\";\nimport {\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { ISharedMap, SharedMap } from \"@fluidframework/map/internal\";\nimport {\n\tIFluidDataStoreChannel,\n\tIFluidDataStoreContext,\n\tIFluidDataStoreFactory,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { create404Response } from \"@fluidframework/runtime-utils/internal\";\nimport type { ISharedObject } from \"@fluidframework/shared-object-base/internal\";\n\nimport { ITestFluidObject } from \"./interfaces.js\";\n\n/**\n * A test Fluid object that will create a shared object for each key-value pair in the initialSharedObjectsFactories passed to load.\n * The shared objects can be retrieved by passing the key of the entry to getSharedObject.\n * It exposes the IFluidDataStoreContext and IFluidDataStoreRuntime.\n * @privateRemarks\n * TODO:\n * Usage of this outside this repo (via ITestFluidObject) should probably be phased out.\n * Once thats done, ITestFluidObject can be made internal and this class can be replaced with the simplified TestFluidObjectInternal.\n * @internal\n */\nexport class TestFluidObject implements ITestFluidObject {\n\tpublic get ITestFluidObject(): ITestFluidObject {\n\t\treturn this;\n\t}\n\n\tpublic get IFluidLoadable(): IFluidLoadable {\n\t\treturn this;\n\t}\n\n\tpublic readonly handle: IFluidHandle<this>;\n\n\tpublic root!: ISharedMap;\n\tprivate initializationPromise: Promise<void> | undefined;\n\n\t/**\n\t * Creates a new TestFluidObject.\n\t * @param runtime - The data store runtime.\n\t * @param context - The data store context.\n\t * @param initialSharedObjectsFactories - A list of id to IChannelFactory mapping. For each item in the list,\n\t * a shared object is created which can be retrieved by calling getSharedObject() with the id;\n\t */\n\tconstructor(\n\t\tpublic readonly runtime: IFluidDataStoreRuntime,\n\t\tpublic readonly channel: IFluidDataStoreChannel,\n\t\tpublic readonly context: IFluidDataStoreContext,\n\t\tprivate readonly initialSharedObjectsFactories: ReadonlyMap<\n\t\t\tstring,\n\t\t\tIChannelFactory<ISharedObject>\n\t\t>,\n\t) {\n\t\tthis.handle = new FluidObjectHandle(this, \"\", runtime.objectsRoutingContext);\n\t}\n\n\t/**\n\t * Retrieves a shared object with the given id.\n\t * @param id - The id of the shared object to retrieve.\n\t */\n\tpublic async getSharedObject<T = any>(id: string): Promise<T> {\n\t\tif (this.initialSharedObjectsFactories === undefined) {\n\t\t\tthrow new Error(\"Shared objects were not provided during creation.\");\n\t\t}\n\n\t\tif (this.initialSharedObjectsFactories.has(id)) {\n\t\t\tconst handle = this.root.get<IFluidHandle<T>>(id);\n\t\t\tif (handle === undefined) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Shared object with id '${id}' is in initialSharedObjectsFactories but not found under root.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn handle.get();\n\t\t}\n\n\t\tthrow new Error(`Shared object with id ${id} not found.`);\n\t}\n\n\tpublic async request(request: IRequest): Promise<IResponse> {\n\t\treturn request.url === \"\" || request.url === \"/\" || request.url.startsWith(\"/?\")\n\t\t\t? { mimeType: \"fluid/object\", status: 200, value: this }\n\t\t\t: create404Response(request);\n\t}\n\n\tpublic async initialize(existing: boolean): Promise<void> {\n\t\tconst doInitialization = async (): Promise<void> => {\n\t\t\tif (!existing) {\n\t\t\t\tthis.root = SharedMap.create(this.runtime, \"root\");\n\n\t\t\t\tthis.initialSharedObjectsFactories.forEach(\n\t\t\t\t\t(sharedObjectFactory: IChannelFactory, key: string) => {\n\t\t\t\t\t\tconst sharedObject = this.runtime.createChannel(key, sharedObjectFactory.type);\n\t\t\t\t\t\tthis.root.set(key, sharedObject.handle);\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tthis.root.bindToContext();\n\t\t\t}\n\n\t\t\tthis.root = (await this.runtime.getChannel(\"root\")) as ISharedMap;\n\t\t};\n\n\t\tthis.initializationPromise ??= doInitialization();\n\t\treturn this.initializationPromise;\n\t}\n}\n\n/**\n * Iterable\\<[ChannelId, IChannelFactory]\\>.\n * @internal\n */\nexport type ChannelFactoryRegistry = Iterable<[string | undefined, IChannelFactory]>;\n\n/**\n * Kind of test data object which {@link TestFluidObjectFactory} can create.\n * @internal\n */\nexport type TestDataObjectKind = new (\n\truntime: IFluidDataStoreRuntime,\n\tchannel: IFluidDataStoreChannel,\n\tcontext: IFluidDataStoreContext,\n\tinitialSharedObjectsFactories: ReadonlyMap<string, IChannelFactory<ISharedObject>>,\n) => IFluidLoadable & {\n\trequest(request: IRequest): Promise<IResponse>;\n\tinitialize(existing: boolean): Promise<void>;\n};\n\n/**\n * Creates a factory for a TestFluidObject with the given object factory entries. It creates a data store runtime\n * with the object factories in the entry list. All the entries with an id other than undefined are passed to the\n * Fluid object so that it can create a shared object for each.\n *\n * @example\n *\n * The following will create a Fluid object that creates and loads a SharedString and SharedDirectory.\n * It will add SparseMatrix to the data store's factory so that it can be created later.\n *\n * ```typescript\n * new TestFluidObjectFactory([\n * [ \"sharedString\", SharedString.getFactory() ],\n * [ \"sharedDirectory\", SharedDirectory.getFactory() ],\n * [ undefined, SparseMatrix.getFactory() ],\n * ]);\n * ```\n *\n * The SharedString and SharedDirectory can be retrieved via getSharedObject() on the TestFluidObject as follows:\n *\n * ```typescript\n * sharedString = testFluidObject.getSharedObject<SharedString>(\"sharedString\");\n * sharedDir = testFluidObject.getSharedObject<SharedDirectory>(\"sharedDirectory\");\n * ```\n *\n * @privateRemarks Beware that using this class generally forfeits some compatibility coverage\n * `describeCompat` aims to provide:\n * `SharedMap`s always reference the current version of SharedMap.\n * AB#4670 tracks improving this situation.\n * @internal\n */\nexport class TestFluidObjectFactory implements IFluidDataStoreFactory {\n\tpublic get IFluidDataStoreFactory(): IFluidDataStoreFactory {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a new TestFluidObjectFactory.\n\t * @param initialSharedObjectsFactories - A list of id to IChannelFactory mapping. It creates a data store runtime with each\n\t * IChannelFactory. Entries with string ids are passed to the Fluid object so that it can create a shared object\n\t * for it.\n\t */\n\tconstructor(\n\t\tprivate readonly initialSharedObjectsFactories: ChannelFactoryRegistry,\n\t\tpublic readonly type = \"TestFluidObjectFactory\",\n\t\tprivate readonly dataObjectKind: TestDataObjectKind = TestFluidObject,\n\t) {}\n\n\tpublic async instantiateDataStore(\n\t\tcontext: IFluidDataStoreContext,\n\t\texisting: boolean,\n\t): Promise<FluidDataStoreRuntime> {\n\t\tconst dataTypes = new Map<string, IChannelFactory>();\n\n\t\t// Add SharedMap's factory which will be used to create the root map.\n\t\tconst sharedMapFactory = SharedMap.getFactory();\n\t\tdataTypes.set(sharedMapFactory.type, sharedMapFactory);\n\n\t\t// Add the object factories to the list to be sent to data store runtime.\n\t\tfor (const [, factory] of this.initialSharedObjectsFactories) {\n\t\t\tdataTypes.set(factory.type, factory);\n\t\t}\n\n\t\t// Create a map from the factory entries with entries that don't have the id as undefined. This will be\n\t\t// passed to the Fluid object.\n\t\tconst factoryEntriesMapForObject = new Map<string, IChannelFactory<ISharedObject>>();\n\t\tfor (const [id, factory] of this.initialSharedObjectsFactories) {\n\t\t\tif (id !== undefined) {\n\t\t\t\t// Here we assume the factory produces an ISharedObject.\n\t\t\t\tfactoryEntriesMapForObject.set(id, factory as IChannelFactory<ISharedObject>);\n\t\t\t}\n\t\t}\n\n\t\tconst runtimeClass = mixinRequestHandler(\n\t\t\tasync (request: IRequest, rt: FluidDataStoreRuntime) => {\n\t\t\t\t// The provideEntryPoint callback below always returns TestFluidObject.\n\t\t\t\tconst dataObject = await rt.entryPoint.get();\n\t\t\t\tassert(\n\t\t\t\t\tdataObject instanceof this.dataObjectKind,\n\t\t\t\t\t\"entryPoint should have been initialized by now\",\n\t\t\t\t);\n\t\t\t\treturn dataObject.request(request);\n\t\t\t},\n\t\t);\n\n\t\tconst runtime: FluidDataStoreRuntime = new runtimeClass(\n\t\t\tcontext,\n\t\t\tdataTypes,\n\t\t\texisting,\n\t\t\tasync () => {\n\t\t\t\tawait instance.initialize(true);\n\t\t\t\treturn instance;\n\t\t\t},\n\t\t);\n\n\t\tconst instance = new this.dataObjectKind(\n\t\t\truntime, // runtime\n\t\t\truntime, // channel\n\t\t\tcontext,\n\t\t\tfactoryEntriesMapForObject,\n\t\t);\n\n\t\tif (!existing) {\n\t\t\tawait instance.initialize(false);\n\t\t}\n\n\t\treturn runtime;\n\t}\n}\n"]}
@@ -17,9 +17,15 @@ const internal_3 = require("@fluidframework/runtime-utils/internal");
17
17
  * @internal
18
18
  */
19
19
  class TestFluidObjectInternal {
20
+ runtime;
21
+ channel;
22
+ context;
23
+ initialSharedObjectsFactories;
20
24
  get IFluidLoadable() {
21
25
  return this;
22
26
  }
27
+ handle;
28
+ initializationPromise;
23
29
  /**
24
30
  * Creates a new TestFluidObjectInternal.
25
31
  * @param runtime - The data store runtime.
@@ -1 +1 @@
1
- {"version":3,"file":"testFluidObjectInternal.js","sourceRoot":"","sources":["../src/testFluidObjectInternal.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,kEAA2D;AAC3D,iEAAuE;AAUvE,qEAA2E;AAM3E;;;;;;;GAOG;AACH,MAAa,uBAAuB;IACnC,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IAKD;;;;;;;;OAQG;IACH,YACiB,OAA+B,EAC/B,OAA+B,EAC/B,OAA+B,EAC9B,6BAGhB;QANe,YAAO,GAAP,OAAO,CAAwB;QAC/B,YAAO,GAAP,OAAO,CAAwB;QAC/B,YAAO,GAAP,OAAO,CAAwB;QAC9B,kCAA6B,GAA7B,6BAA6B,CAG7C;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,4BAAiB,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,qBAAq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zE,OAAyB,CAAC,aAAa,EAAE,CAAC;gBAC5C,CAAC;YACF,CAAC;QACF,CAAC,CAAC;QAEF,IAAI,CAAC,qBAAqB,KAAK,gBAAgB,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACnC,CAAC;CACD;AAzED,0DAyEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\ttype IFluidLoadable,\n} from \"@fluidframework/core-interfaces\";\nimport { fail } from \"@fluidframework/core-utils/internal\";\nimport { FluidObjectHandle } from \"@fluidframework/datastore/internal\";\nimport {\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\ttype IChannel,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport {\n\tIFluidDataStoreChannel,\n\tIFluidDataStoreContext,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { create404Response } from \"@fluidframework/runtime-utils/internal\";\nimport type {\n\tISharedObject,\n\tSharedObjectKind,\n} from \"@fluidframework/shared-object-base/internal\";\n\n/**\n * A test Fluid object that will create a shared object for each key-value pair in the factoryEntries passed to load.\n * The shared objects can be retrieved by passing the key of the entry to {@link TestFluidObjectInternal.getInitialSharedObject}.\n * It exposes the IFluidDataStoreContext and IFluidDataStoreRuntime.\n * @remarks\n * This is a simplified (does not use SharedMap) alternative to {@link TestFluidObject} which does not implement the external facing {@link ITestFluidObject} interface.\n * @internal\n */\nexport class TestFluidObjectInternal implements IFluidLoadable {\n\tpublic get IFluidLoadable(): IFluidLoadable {\n\t\treturn this;\n\t}\n\n\tpublic readonly handle: IFluidHandle<this>;\n\tprivate initializationPromise: Promise<void> | undefined;\n\n\t/**\n\t * Creates a new TestFluidObjectInternal.\n\t * @param runtime - The data store runtime.\n\t * @param context - The data store context.\n\t * @param factoryEntries - A list of id to IChannelFactory mapping. For each item in the list,\n\t * a shared object is created which can be retrieved by calling {@link TestFluidObjectInternal.getInitialSharedObject} with the id;\n\t * @param initialSharedObjectsFactories - A collection of ids (which can be passed to {@link TestFluidObjectInternal.getInitialSharedObject})\n\t * and the corresponding factories to use to create the shared objects during initialization.\n\t */\n\tconstructor(\n\t\tpublic readonly runtime: IFluidDataStoreRuntime,\n\t\tpublic readonly channel: IFluidDataStoreChannel,\n\t\tpublic readonly context: IFluidDataStoreContext,\n\t\tprivate readonly initialSharedObjectsFactories: ReadonlyMap<\n\t\t\tstring,\n\t\t\tIChannelFactory<ISharedObject>\n\t\t>,\n\t) {\n\t\tthis.handle = new FluidObjectHandle(this, \"\", runtime.objectsRoutingContext);\n\t}\n\n\t/**\n\t * Retrieves the shared object with the given id:\n\t * this id must have been a key included in the initialSharedObjectsFactories map passed to the constructor.\n\t * @param id - The id of the shared object to retrieve.\n\t */\n\tpublic async getInitialSharedObject(id: string): Promise<IChannel> {\n\t\treturn (await this.runtime.getChannel(id)) ?? fail(\"Shared object not found\");\n\t}\n\n\t/**\n\t * Retrieves a shared object with the given id.\n\t * @param kind - The kind of object to retrieve.\n\t * @param id - The id of the shared object to retrieve.\n\t */\n\tpublic async getInitialSharedObjectTyped<T>(\n\t\tkind: SharedObjectKind<T>,\n\t\tid: string,\n\t): Promise<IChannel & T> {\n\t\tconst result = (await this.runtime.getChannel(id)) ?? fail(\"Shared object not found\");\n\t\tif (kind.is(result)) {\n\t\t\treturn result;\n\t\t}\n\t\treturn fail(\"Wrong kind of shared object\");\n\t}\n\n\tpublic async request(request: IRequest): Promise<IResponse> {\n\t\treturn request.url === \"\" || request.url === \"/\" || request.url.startsWith(\"/?\")\n\t\t\t? { mimeType: \"fluid/object\", status: 200, value: this }\n\t\t\t: create404Response(request);\n\t}\n\n\tpublic async initialize(existing: boolean): Promise<void> {\n\t\tconst doInitialization = async (): Promise<void> => {\n\t\t\tif (!existing) {\n\t\t\t\tfor (const [key, sharedObjectFactory] of this.initialSharedObjectsFactories) {\n\t\t\t\t\tconst channel = this.runtime.createChannel(key, sharedObjectFactory.type);\n\t\t\t\t\t(channel as ISharedObject).bindToContext();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.initializationPromise ??= doInitialization();\n\t\treturn this.initializationPromise;\n\t}\n}\n"]}
1
+ {"version":3,"file":"testFluidObjectInternal.js","sourceRoot":"","sources":["../src/testFluidObjectInternal.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,kEAA2D;AAC3D,iEAAuE;AAUvE,qEAA2E;AAM3E;;;;;;;GAOG;AACH,MAAa,uBAAuB;IAkBlB;IACA;IACA;IACC;IApBlB,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IAEe,MAAM,CAAqB;IACnC,qBAAqB,CAA4B;IAEzD;;;;;;;;OAQG;IACH,YACiB,OAA+B,EAC/B,OAA+B,EAC/B,OAA+B,EAC9B,6BAGhB;QANe,YAAO,GAAP,OAAO,CAAwB;QAC/B,YAAO,GAAP,OAAO,CAAwB;QAC/B,YAAO,GAAP,OAAO,CAAwB;QAC9B,kCAA6B,GAA7B,6BAA6B,CAG7C;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,4BAAiB,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC9E,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,sBAAsB,CAAC,EAAU;QAC7C,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,IAAA,eAAI,EAAC,yBAAyB,CAAC,CAAC;IAC/E,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,2BAA2B,CACvC,IAAyB,EACzB,EAAU;QAEV,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,IAAA,eAAI,EAAC,yBAAyB,CAAC,CAAC;QACtF,IAAI,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;YACrB,OAAO,MAAM,CAAC;QACf,CAAC;QACD,OAAO,IAAA,eAAI,EAAC,6BAA6B,CAAC,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,OAAiB;QACrC,OAAO,OAAO,CAAC,GAAG,KAAK,EAAE,IAAI,OAAO,CAAC,GAAG,KAAK,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC;YAC/E,CAAC,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE;YACxD,CAAC,CAAC,IAAA,4BAAiB,EAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,QAAiB;QACxC,MAAM,gBAAgB,GAAG,KAAK,IAAmB,EAAE;YAClD,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,KAAK,MAAM,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,IAAI,CAAC,6BAA6B,EAAE,CAAC;oBAC7E,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC;oBACzE,OAAyB,CAAC,aAAa,EAAE,CAAC;gBAC5C,CAAC;YACF,CAAC;QACF,CAAC,CAAC;QAEF,IAAI,CAAC,qBAAqB,KAAK,gBAAgB,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACnC,CAAC;CACD;AAzED,0DAyEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\ttype IFluidLoadable,\n} from \"@fluidframework/core-interfaces\";\nimport { fail } from \"@fluidframework/core-utils/internal\";\nimport { FluidObjectHandle } from \"@fluidframework/datastore/internal\";\nimport {\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\ttype IChannel,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport {\n\tIFluidDataStoreChannel,\n\tIFluidDataStoreContext,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { create404Response } from \"@fluidframework/runtime-utils/internal\";\nimport type {\n\tISharedObject,\n\tSharedObjectKind,\n} from \"@fluidframework/shared-object-base/internal\";\n\n/**\n * A test Fluid object that will create a shared object for each key-value pair in the factoryEntries passed to load.\n * The shared objects can be retrieved by passing the key of the entry to {@link TestFluidObjectInternal.getInitialSharedObject}.\n * It exposes the IFluidDataStoreContext and IFluidDataStoreRuntime.\n * @remarks\n * This is a simplified (does not use SharedMap) alternative to {@link TestFluidObject} which does not implement the external facing {@link ITestFluidObject} interface.\n * @internal\n */\nexport class TestFluidObjectInternal implements IFluidLoadable {\n\tpublic get IFluidLoadable(): IFluidLoadable {\n\t\treturn this;\n\t}\n\n\tpublic readonly handle: IFluidHandle<this>;\n\tprivate initializationPromise: Promise<void> | undefined;\n\n\t/**\n\t * Creates a new TestFluidObjectInternal.\n\t * @param runtime - The data store runtime.\n\t * @param context - The data store context.\n\t * @param factoryEntries - A list of id to IChannelFactory mapping. For each item in the list,\n\t * a shared object is created which can be retrieved by calling {@link TestFluidObjectInternal.getInitialSharedObject} with the id;\n\t * @param initialSharedObjectsFactories - A collection of ids (which can be passed to {@link TestFluidObjectInternal.getInitialSharedObject})\n\t * and the corresponding factories to use to create the shared objects during initialization.\n\t */\n\tconstructor(\n\t\tpublic readonly runtime: IFluidDataStoreRuntime,\n\t\tpublic readonly channel: IFluidDataStoreChannel,\n\t\tpublic readonly context: IFluidDataStoreContext,\n\t\tprivate readonly initialSharedObjectsFactories: ReadonlyMap<\n\t\t\tstring,\n\t\t\tIChannelFactory<ISharedObject>\n\t\t>,\n\t) {\n\t\tthis.handle = new FluidObjectHandle(this, \"\", runtime.objectsRoutingContext);\n\t}\n\n\t/**\n\t * Retrieves the shared object with the given id:\n\t * this id must have been a key included in the initialSharedObjectsFactories map passed to the constructor.\n\t * @param id - The id of the shared object to retrieve.\n\t */\n\tpublic async getInitialSharedObject(id: string): Promise<IChannel> {\n\t\treturn (await this.runtime.getChannel(id)) ?? fail(\"Shared object not found\");\n\t}\n\n\t/**\n\t * Retrieves a shared object with the given id.\n\t * @param kind - The kind of object to retrieve.\n\t * @param id - The id of the shared object to retrieve.\n\t */\n\tpublic async getInitialSharedObjectTyped<T>(\n\t\tkind: SharedObjectKind<T>,\n\t\tid: string,\n\t): Promise<IChannel & T> {\n\t\tconst result = (await this.runtime.getChannel(id)) ?? fail(\"Shared object not found\");\n\t\tif (kind.is(result)) {\n\t\t\treturn result;\n\t\t}\n\t\treturn fail(\"Wrong kind of shared object\");\n\t}\n\n\tpublic async request(request: IRequest): Promise<IResponse> {\n\t\treturn request.url === \"\" || request.url === \"/\" || request.url.startsWith(\"/?\")\n\t\t\t? { mimeType: \"fluid/object\", status: 200, value: this }\n\t\t\t: create404Response(request);\n\t}\n\n\tpublic async initialize(existing: boolean): Promise<void> {\n\t\tconst doInitialization = async (): Promise<void> => {\n\t\t\tif (!existing) {\n\t\t\t\tfor (const [key, sharedObjectFactory] of this.initialSharedObjectsFactories) {\n\t\t\t\t\tconst channel = this.runtime.createChannel(key, sharedObjectFactory.type);\n\t\t\t\t\t(channel as ISharedObject).bindToContext();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.initializationPromise ??= doInitialization();\n\t\treturn this.initializationPromise;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"testObjectProvider.d.ts","sourceRoot":"","sources":["../src/testObjectProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAmB,MAAM,yCAAyC,CAAC;AACvF,OAAO,EACN,UAAU,EACV,iBAAiB,EACjB,WAAW,EAEX,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACN,YAAY,EACZ,MAAM,EAEN,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAA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