@fluidframework/test-utils 2.0.0-dev-rc.3.0.0.250606 → 2.0.0-dev-rc.3.0.0.253463

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 (132) hide show
  1. package/api-report/test-utils.api.md +35 -35
  2. package/dist/DriverWrappers.d.ts +1 -1
  3. package/dist/DriverWrappers.d.ts.map +1 -1
  4. package/dist/DriverWrappers.js.map +1 -1
  5. package/dist/TestSummaryUtils.d.ts +4 -4
  6. package/dist/TestSummaryUtils.d.ts.map +1 -1
  7. package/dist/TestSummaryUtils.js +12 -12
  8. package/dist/TestSummaryUtils.js.map +1 -1
  9. package/dist/containerUtils.d.ts +2 -2
  10. package/dist/containerUtils.d.ts.map +1 -1
  11. package/dist/containerUtils.js +3 -3
  12. package/dist/containerUtils.js.map +1 -1
  13. package/dist/debug.d.ts.map +1 -1
  14. package/dist/debug.js.map +1 -1
  15. package/dist/interfaces.d.ts +1 -1
  16. package/dist/interfaces.d.ts.map +1 -1
  17. package/dist/interfaces.js.map +1 -1
  18. package/dist/loaderContainerTracker.d.ts +1 -1
  19. package/dist/loaderContainerTracker.d.ts.map +1 -1
  20. package/dist/loaderContainerTracker.js +13 -13
  21. package/dist/loaderContainerTracker.js.map +1 -1
  22. package/dist/localCodeLoader.d.ts +3 -3
  23. package/dist/localCodeLoader.d.ts.map +1 -1
  24. package/dist/localCodeLoader.js +4 -4
  25. package/dist/localCodeLoader.js.map +1 -1
  26. package/dist/localLoader.d.ts +2 -2
  27. package/dist/localLoader.d.ts.map +1 -1
  28. package/dist/localLoader.js +2 -2
  29. package/dist/localLoader.js.map +1 -1
  30. package/dist/packageVersion.d.ts +1 -1
  31. package/dist/packageVersion.js +1 -1
  32. package/dist/packageVersion.js.map +1 -1
  33. package/dist/retry.js +2 -2
  34. package/dist/retry.js.map +1 -1
  35. package/dist/test-utils-alpha.d.ts +35 -37
  36. package/dist/test-utils-beta.d.ts +35 -37
  37. package/dist/test-utils-public.d.ts +35 -37
  38. package/dist/test-utils-untrimmed.d.ts +35 -35
  39. package/dist/testContainerRuntimeFactory.d.ts +5 -5
  40. package/dist/testContainerRuntimeFactory.d.ts.map +1 -1
  41. package/dist/testContainerRuntimeFactory.js +15 -13
  42. package/dist/testContainerRuntimeFactory.js.map +1 -1
  43. package/dist/testContainerRuntimeFactoryWithDefaultDataStore.d.ts +5 -5
  44. package/dist/testContainerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
  45. package/dist/testContainerRuntimeFactoryWithDefaultDataStore.js +2 -2
  46. package/dist/testContainerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  47. package/dist/testFluidObject.d.ts +2 -2
  48. package/dist/testFluidObject.d.ts.map +1 -1
  49. package/dist/testFluidObject.js +7 -7
  50. package/dist/testFluidObject.js.map +1 -1
  51. package/dist/testObjectProvider.d.ts +5 -5
  52. package/dist/testObjectProvider.d.ts.map +1 -1
  53. package/dist/testObjectProvider.js +9 -9
  54. package/dist/testObjectProvider.js.map +1 -1
  55. package/dist/timeoutUtils.js +4 -4
  56. package/dist/timeoutUtils.js.map +1 -1
  57. package/lib/DriverWrappers.d.ts +1 -1
  58. package/lib/DriverWrappers.d.ts.map +1 -1
  59. package/lib/DriverWrappers.js.map +1 -1
  60. package/lib/TestSummaryUtils.d.ts +4 -4
  61. package/lib/TestSummaryUtils.d.ts.map +1 -1
  62. package/lib/TestSummaryUtils.js +4 -4
  63. package/lib/TestSummaryUtils.js.map +1 -1
  64. package/lib/containerUtils.d.ts +2 -2
  65. package/lib/containerUtils.d.ts.map +1 -1
  66. package/lib/containerUtils.js +1 -1
  67. package/lib/containerUtils.js.map +1 -1
  68. package/lib/debug.d.ts.map +1 -1
  69. package/lib/debug.js.map +1 -1
  70. package/lib/interfaces.d.ts +1 -1
  71. package/lib/interfaces.d.ts.map +1 -1
  72. package/lib/interfaces.js.map +1 -1
  73. package/lib/loaderContainerTracker.d.ts +1 -1
  74. package/lib/loaderContainerTracker.d.ts.map +1 -1
  75. package/lib/loaderContainerTracker.js +2 -2
  76. package/lib/loaderContainerTracker.js.map +1 -1
  77. package/lib/localCodeLoader.d.ts +3 -3
  78. package/lib/localCodeLoader.d.ts.map +1 -1
  79. package/lib/localCodeLoader.js +2 -2
  80. package/lib/localCodeLoader.js.map +1 -1
  81. package/lib/localLoader.d.ts +2 -2
  82. package/lib/localLoader.d.ts.map +1 -1
  83. package/lib/localLoader.js +1 -1
  84. package/lib/localLoader.js.map +1 -1
  85. package/lib/packageVersion.d.ts +1 -1
  86. package/lib/packageVersion.js +1 -1
  87. package/lib/packageVersion.js.map +1 -1
  88. package/lib/retry.js +1 -1
  89. package/lib/retry.js.map +1 -1
  90. package/lib/test-utils-alpha.d.ts +35 -37
  91. package/lib/test-utils-beta.d.ts +35 -37
  92. package/lib/test-utils-public.d.ts +35 -37
  93. package/lib/test-utils-untrimmed.d.ts +35 -35
  94. package/lib/testContainerRuntimeFactory.d.ts +5 -5
  95. package/lib/testContainerRuntimeFactory.d.ts.map +1 -1
  96. package/lib/testContainerRuntimeFactory.js +9 -5
  97. package/lib/testContainerRuntimeFactory.js.map +1 -1
  98. package/lib/testContainerRuntimeFactoryWithDefaultDataStore.d.ts +5 -5
  99. package/lib/testContainerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
  100. package/lib/testContainerRuntimeFactoryWithDefaultDataStore.js +1 -1
  101. package/lib/testContainerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  102. package/lib/testFluidObject.d.ts +2 -2
  103. package/lib/testFluidObject.d.ts.map +1 -1
  104. package/lib/testFluidObject.js +3 -3
  105. package/lib/testFluidObject.js.map +1 -1
  106. package/lib/testObjectProvider.d.ts +5 -5
  107. package/lib/testObjectProvider.d.ts.map +1 -1
  108. package/lib/testObjectProvider.js +2 -2
  109. package/lib/testObjectProvider.js.map +1 -1
  110. package/lib/timeoutUtils.js +1 -1
  111. package/lib/timeoutUtils.js.map +1 -1
  112. package/lib/tsdoc-metadata.json +11 -0
  113. package/package.json +22 -34
  114. package/src/DriverWrappers.ts +1 -1
  115. package/src/TestSummaryUtils.ts +11 -6
  116. package/src/containerUtils.ts +4 -3
  117. package/src/debug.ts +1 -0
  118. package/src/interfaces.ts +1 -1
  119. package/src/loaderContainerTracker.ts +5 -3
  120. package/src/localCodeLoader.ts +6 -5
  121. package/src/localLoader.ts +4 -3
  122. package/src/packageVersion.ts +1 -1
  123. package/src/retry.ts +1 -1
  124. package/src/testContainerRuntimeFactory.ts +13 -8
  125. package/src/testContainerRuntimeFactoryWithDefaultDataStore.ts +5 -5
  126. package/src/testFluidObject.ts +5 -4
  127. package/src/testObjectProvider.ts +8 -10
  128. package/src/timeoutUtils.ts +1 -1
  129. package/lib/test/timeoutUtils.spec.js +0 -165
  130. package/lib/test/timeoutUtils.spec.js.map +0 -1
  131. package/lib/test/types/validateTestUtilsPrevious.generated.js +0 -90
  132. package/lib/test/types/validateTestUtilsPrevious.generated.js.map +0 -1
@@ -5,55 +5,55 @@
5
5
  ```ts
6
6
 
7
7
  import { ConfigTypes } from '@fluidframework/core-interfaces';
8
- import { ContainerRuntime } from '@fluidframework/container-runtime';
9
- import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct';
10
- import { FluidDataStoreRuntime } from '@fluidframework/datastore';
8
+ import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
9
+ import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct/internal';
10
+ import { FluidDataStoreRuntime } from '@fluidframework/datastore/internal';
11
11
  import { FluidObject } from '@fluidframework/core-interfaces';
12
12
  import { IChannelFactory } from '@fluidframework/datastore-definitions';
13
- import { ICodeDetailsLoader } from '@fluidframework/container-definitions';
13
+ import { ICodeDetailsLoader } from '@fluidframework/container-definitions/internal';
14
14
  import { IConfigProviderBase } from '@fluidframework/core-interfaces';
15
- import { IContainer } from '@fluidframework/container-definitions';
16
- import { IContainerContext } from '@fluidframework/container-definitions';
17
- import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
18
- import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
19
- import { IDataStore } from '@fluidframework/runtime-definitions';
20
- import { IDocumentService } from '@fluidframework/driver-definitions';
21
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
22
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
23
- import { IFluidCodeDetails } from '@fluidframework/container-definitions';
24
- import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
25
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
26
- import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
15
+ import { IContainer } from '@fluidframework/container-definitions/internal';
16
+ import { IContainerContext } from '@fluidframework/container-definitions/internal';
17
+ import { IContainerRuntime } from '@fluidframework/container-runtime-definitions/internal';
18
+ import { IContainerRuntimeOptions } from '@fluidframework/container-runtime/internal';
19
+ import { IDataStore } from '@fluidframework/runtime-definitions/internal';
20
+ import { IDocumentService } from '@fluidframework/driver-definitions/internal';
21
+ import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
22
+ import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
23
+ import { IFluidCodeDetails } from '@fluidframework/container-definitions/internal';
24
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions/internal';
25
+ import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
26
+ import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
27
27
  import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
28
28
  import { IFluidHandle } from '@fluidframework/core-interfaces';
29
29
  import { IFluidLoadable } from '@fluidframework/core-interfaces';
30
- import { IFluidModule } from '@fluidframework/container-definitions';
31
- import { IFluidModuleWithDetails } from '@fluidframework/container-definitions';
32
- import { IHostLoader } from '@fluidframework/container-definitions';
33
- import { ILoaderOptions } from '@fluidframework/container-definitions';
34
- import { ILoaderProps } from '@fluidframework/container-loader';
35
- import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime';
36
- import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
37
- import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
38
- import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
39
- import { IProvideRuntimeFactory } from '@fluidframework/container-definitions';
30
+ import { IFluidModule } from '@fluidframework/container-definitions/internal';
31
+ import { IFluidModuleWithDetails } from '@fluidframework/container-definitions/internal';
32
+ import { IHostLoader } from '@fluidframework/container-definitions/internal';
33
+ import { ILoaderOptions } from '@fluidframework/container-definitions/internal';
34
+ import { ILoaderProps } from '@fluidframework/container-loader/internal';
35
+ import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime/internal';
36
+ import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions/internal';
37
+ import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
38
+ import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions/internal';
39
+ import { IProvideRuntimeFactory } from '@fluidframework/container-definitions/internal';
40
40
  import { IRequest } from '@fluidframework/core-interfaces';
41
41
  import { IRequestHeader } from '@fluidframework/core-interfaces';
42
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
42
+ import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
43
43
  import { IResponse } from '@fluidframework/core-interfaces';
44
- import { IRuntime } from '@fluidframework/container-definitions';
44
+ import { IRuntime } from '@fluidframework/container-definitions/internal';
45
45
  import { ISharedMap } from '@fluidframework/map';
46
- import { ISummarizer } from '@fluidframework/container-runtime';
47
- import { ISummaryContext } from '@fluidframework/driver-definitions';
46
+ import { ISummarizer } from '@fluidframework/container-runtime/internal';
47
+ import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
48
48
  import { ISummaryTree } from '@fluidframework/protocol-definitions';
49
49
  import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
50
50
  import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
51
51
  import { ITelemetryGenericEventExt } from '@fluidframework/telemetry-utils';
52
- import { ITestDriver } from '@fluidframework/test-driver-definitions';
53
- import { IUrlResolver } from '@fluidframework/driver-definitions';
54
- import { Loader } from '@fluidframework/container-loader';
55
- import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
56
- import { RuntimeRequestHandler } from '@fluidframework/request-handler';
52
+ import { ITestDriver } from '@fluid-internal/test-driver-definitions';
53
+ import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
54
+ import { Loader } from '@fluidframework/container-loader/internal';
55
+ import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions/internal';
56
+ import { RuntimeRequestHandler } from '@fluidframework/request-handler/internal';
57
57
 
58
58
  // @internal (undocumented)
59
59
  export type ChannelFactoryRegistry = Iterable<[string | undefined, IChannelFactory]>;
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IDocumentService, IDocumentServiceFactory, IDocumentStorageService, ISummaryContext } from "@fluidframework/driver-definitions";
5
+ import { IDocumentService, IDocumentServiceFactory, IDocumentStorageService, ISummaryContext } from "@fluidframework/driver-definitions/internal";
6
6
  import { ISummaryTree } from "@fluidframework/protocol-definitions";
7
7
  /**
8
8
  * @deprecated - unused
@@ -1 +1 @@
1
- {"version":3,"file":"DriverWrappers.d.ts","sourceRoot":"","sources":["../src/DriverWrappers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EAEvB,eAAe,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACzC,sBAAsB,EAAE,uBAAuB,EAC/C,eAAe,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,KAAK,eAAe,2BAWzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAClC,eAAe,EAAE,gBAAgB,EACjC,eAAe,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,KAAK,eAAe,oBAQzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACzC,sBAAsB,EAAE,uBAAuB,EAC/C,eAAe,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,KAAK,eAAe,2BAgBzF"}
1
+ {"version":3,"file":"DriverWrappers.d.ts","sourceRoot":"","sources":["../src/DriverWrappers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EAEvB,eAAe,EACf,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACzC,sBAAsB,EAAE,uBAAuB,EAC/C,eAAe,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,KAAK,eAAe,2BAWzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAClC,eAAe,EAAE,gBAAgB,EACjC,eAAe,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,KAAK,eAAe,oBAQzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACzC,sBAAsB,EAAE,uBAAuB,EAC/C,eAAe,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,KAAK,eAAe,2BAgBzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"DriverWrappers.js","sourceRoot":"","sources":["../src/DriverWrappers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACzC,sBAA+C,EAC/C,eAAyF;IAEzF,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAA4B,CAAC;IAChG,sBAAsB,CAAC,wBAAwB,GAAG,KAAK,EACtD,OAAqB,EACrB,OAAwB,EACN,EAAE;QACpB,MAAM,UAAU,GAAG,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,sBAAsB,CAAC,wBAAwB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7E,CAAC,CAAC;IACF,OAAO,sBAAsB,CAAC;AAC/B,CAAC;AAbD,gEAaC;AAED;;;;;;;;GAQG;AACH,SAAgB,mBAAmB,CAClC,eAAiC,EACjC,eAAyF;IAEzF,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAqB,CAAC;IAC3E,eAAe,CAAC,gBAAgB,GAAG,KAAK,IAAsC,EAAE;QAC/E,MAAM,cAAc,GAAG,MAAM,eAAe,CAAC,gBAAgB,EAAE,CAAC;QAChE,OAAO,0BAA0B,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IACpE,CAAC,CAAC;IACF,OAAO,eAAe,CAAC;AACxB,CAAC;AAVD,kDAUC;AAED;;;;;;;;GAQG;AACH,SAAgB,0BAA0B,CACzC,sBAA+C,EAC/C,eAAyF;IAEzF,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAA4B,CAAC;IAChG,sBAAsB,CAAC,qBAAqB,GAAG,KAAK,EACnD,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B,EACA,EAAE;QAC9B,MAAM,eAAe,GAAG,MAAM,sBAAsB,CAAC,qBAAqB,CACzE,WAAW,EACX,MAAM,EACN,kBAAkB,CAClB,CAAC;QACF,OAAO,mBAAmB,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC,CAAC;IACF,OAAO,sBAAsB,CAAC;AAC/B,CAAC;AAlBD,gEAkBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport {\n\tIDocumentService,\n\tIDocumentServiceFactory,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n\tISummaryContext,\n} from \"@fluidframework/driver-definitions\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\n\n/**\n * @deprecated - unused\n * Wraps the given IDocumentStorageService to override the `uploadSummaryWithContext` method. It calls the\n * `uploadSummaryCb` whenever a summary is uploaded by the client. The summary context can be updated in the\n * callback before it is uploaded to the server.\n * @internal\n */\nexport function wrapDocumentStorageService(\n\tinnerDocStorageService: IDocumentStorageService,\n\tuploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext,\n) {\n\tconst outerDocStorageService = Object.create(innerDocStorageService) as IDocumentStorageService;\n\touterDocStorageService.uploadSummaryWithContext = async (\n\t\tsummary: ISummaryTree,\n\t\tcontext: ISummaryContext,\n\t): Promise<string> => {\n\t\tconst newContext = uploadSummaryCb(summary, context);\n\t\treturn innerDocStorageService.uploadSummaryWithContext(summary, newContext);\n\t};\n\treturn outerDocStorageService;\n}\n\n/**\n * @deprecated - unused\n * Wraps the given IDocumentService to override the `connectToStorage` method. The intent is to plumb the\n * `uploadSummaryCb` to the IDocumentStorageService so that it is called whenever a summary is uploaded by\n * the client.\n * The document storage service that is created in `connectToStorage` is wrapped by calling `wrapDocumentStorageService`\n * to pass in the `uploadSummaryCb`.\n * @internal\n */\nexport function wrapDocumentService(\n\tinnerDocService: IDocumentService,\n\tuploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext,\n) {\n\tconst outerDocService = Object.create(innerDocService) as IDocumentService;\n\touterDocService.connectToStorage = async (): Promise<IDocumentStorageService> => {\n\t\tconst storageService = await innerDocService.connectToStorage();\n\t\treturn wrapDocumentStorageService(storageService, uploadSummaryCb);\n\t};\n\treturn outerDocService;\n}\n\n/**\n * @deprecated - unused\n * Wraps the given IDocumentServiceFactory to override the `createDocumentService` method. The intent is to plumb\n * the `uploadSummaryCb` all the way to the IDocumentStorageService so that it is called whenever a summary is\n * uploaded by the client.\n * The document service that is created in `createDocumentService` is wrapped by calling `wrapDocumentService` to\n * pass in the `uploadSummaryCb`.\n * @internal\n */\nexport function wrapDocumentServiceFactory(\n\tinnerDocServiceFactory: IDocumentServiceFactory,\n\tuploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext,\n) {\n\tconst outerDocServiceFactory = Object.create(innerDocServiceFactory) as IDocumentServiceFactory;\n\touterDocServiceFactory.createDocumentService = async (\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> => {\n\t\tconst documentService = await innerDocServiceFactory.createDocumentService(\n\t\t\tresolvedUrl,\n\t\t\tlogger,\n\t\t\tclientIsSummarizer,\n\t\t);\n\t\treturn wrapDocumentService(documentService, uploadSummaryCb);\n\t};\n\treturn outerDocServiceFactory;\n}\n"]}
1
+ {"version":3,"file":"DriverWrappers.js","sourceRoot":"","sources":["../src/DriverWrappers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACzC,sBAA+C,EAC/C,eAAyF;IAEzF,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAA4B,CAAC;IAChG,sBAAsB,CAAC,wBAAwB,GAAG,KAAK,EACtD,OAAqB,EACrB,OAAwB,EACN,EAAE;QACpB,MAAM,UAAU,GAAG,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,sBAAsB,CAAC,wBAAwB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7E,CAAC,CAAC;IACF,OAAO,sBAAsB,CAAC;AAC/B,CAAC;AAbD,gEAaC;AAED;;;;;;;;GAQG;AACH,SAAgB,mBAAmB,CAClC,eAAiC,EACjC,eAAyF;IAEzF,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAqB,CAAC;IAC3E,eAAe,CAAC,gBAAgB,GAAG,KAAK,IAAsC,EAAE;QAC/E,MAAM,cAAc,GAAG,MAAM,eAAe,CAAC,gBAAgB,EAAE,CAAC;QAChE,OAAO,0BAA0B,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IACpE,CAAC,CAAC;IACF,OAAO,eAAe,CAAC;AACxB,CAAC;AAVD,kDAUC;AAED;;;;;;;;GAQG;AACH,SAAgB,0BAA0B,CACzC,sBAA+C,EAC/C,eAAyF;IAEzF,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAA4B,CAAC;IAChG,sBAAsB,CAAC,qBAAqB,GAAG,KAAK,EACnD,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B,EACA,EAAE;QAC9B,MAAM,eAAe,GAAG,MAAM,sBAAsB,CAAC,qBAAqB,CACzE,WAAW,EACX,MAAM,EACN,kBAAkB,CAClB,CAAC;QACF,OAAO,mBAAmB,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC,CAAC;IACF,OAAO,sBAAsB,CAAC;AAC/B,CAAC;AAlBD,gEAkBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport {\n\tIDocumentService,\n\tIDocumentServiceFactory,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n\tISummaryContext,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\n\n/**\n * @deprecated - unused\n * Wraps the given IDocumentStorageService to override the `uploadSummaryWithContext` method. It calls the\n * `uploadSummaryCb` whenever a summary is uploaded by the client. The summary context can be updated in the\n * callback before it is uploaded to the server.\n * @internal\n */\nexport function wrapDocumentStorageService(\n\tinnerDocStorageService: IDocumentStorageService,\n\tuploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext,\n) {\n\tconst outerDocStorageService = Object.create(innerDocStorageService) as IDocumentStorageService;\n\touterDocStorageService.uploadSummaryWithContext = async (\n\t\tsummary: ISummaryTree,\n\t\tcontext: ISummaryContext,\n\t): Promise<string> => {\n\t\tconst newContext = uploadSummaryCb(summary, context);\n\t\treturn innerDocStorageService.uploadSummaryWithContext(summary, newContext);\n\t};\n\treturn outerDocStorageService;\n}\n\n/**\n * @deprecated - unused\n * Wraps the given IDocumentService to override the `connectToStorage` method. The intent is to plumb the\n * `uploadSummaryCb` to the IDocumentStorageService so that it is called whenever a summary is uploaded by\n * the client.\n * The document storage service that is created in `connectToStorage` is wrapped by calling `wrapDocumentStorageService`\n * to pass in the `uploadSummaryCb`.\n * @internal\n */\nexport function wrapDocumentService(\n\tinnerDocService: IDocumentService,\n\tuploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext,\n) {\n\tconst outerDocService = Object.create(innerDocService) as IDocumentService;\n\touterDocService.connectToStorage = async (): Promise<IDocumentStorageService> => {\n\t\tconst storageService = await innerDocService.connectToStorage();\n\t\treturn wrapDocumentStorageService(storageService, uploadSummaryCb);\n\t};\n\treturn outerDocService;\n}\n\n/**\n * @deprecated - unused\n * Wraps the given IDocumentServiceFactory to override the `createDocumentService` method. The intent is to plumb\n * the `uploadSummaryCb` all the way to the IDocumentStorageService so that it is called whenever a summary is\n * uploaded by the client.\n * The document service that is created in `createDocumentService` is wrapped by calling `wrapDocumentService` to\n * pass in the `uploadSummaryCb`.\n * @internal\n */\nexport function wrapDocumentServiceFactory(\n\tinnerDocServiceFactory: IDocumentServiceFactory,\n\tuploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext,\n) {\n\tconst outerDocServiceFactory = Object.create(innerDocServiceFactory) as IDocumentServiceFactory;\n\touterDocServiceFactory.createDocumentService = async (\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> => {\n\t\tconst documentService = await innerDocServiceFactory.createDocumentService(\n\t\t\tresolvedUrl,\n\t\t\tlogger,\n\t\t\tclientIsSummarizer,\n\t\t);\n\t\treturn wrapDocumentService(documentService, uploadSummaryCb);\n\t};\n\treturn outerDocServiceFactory;\n}\n"]}
@@ -2,12 +2,12 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ContainerRuntimeFactoryWithDefaultDataStore } from "@fluidframework/aqueduct";
6
- import { IContainer, IHostLoader } from "@fluidframework/container-definitions";
7
- import { IOnDemandSummarizeOptions, ISummarizer } from "@fluidframework/container-runtime";
5
+ import { ContainerRuntimeFactoryWithDefaultDataStore } from "@fluidframework/aqueduct/internal";
6
+ import { IContainer, IHostLoader } from "@fluidframework/container-definitions/internal";
7
+ import { IOnDemandSummarizeOptions, ISummarizer } from "@fluidframework/container-runtime/internal";
8
8
  import { IConfigProviderBase, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
9
9
  import { ISummaryTree } from "@fluidframework/protocol-definitions";
10
- import { IFluidDataStoreFactory, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions";
10
+ import { IFluidDataStoreFactory, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions/internal";
11
11
  import { ITestContainerConfig, ITestObjectProvider } from "./testObjectProvider.js";
12
12
  /** @internal */
13
13
  export declare function createSummarizerCore(container: IContainer, loader: IHostLoader, summaryVersion?: string): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"TestSummaryUtils.d.ts","sourceRoot":"","sources":["../src/TestSummaryUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,2CAA2C,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAgB,MAAM,uCAAuC,CAAC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AAsB,gBAAgB,CACrC,QAAQ,EAAE,mBAAmB,EAC7B,SAAS,EAAE,UAAU,EACrB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,cAAc,CAAC,EAAE,MAAM,EACvB,MAAM,CAAC,EAAE,oBAAoB,GAC3B,OAAO,CAAC;IAAE,SAAS,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,WAAW,CAAA;CAAE,CAAC,CAe7D;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CACjC,UAAU,EAAE,WAAW,EACvB,MAAM,GAAE,MAAM,GAAG,yBAA6C,GAC5D,OAAO,CAAC,WAAW,CAAC,CAmCtB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACtB"}
@@ -5,10 +5,10 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.summarizeNow = exports.createSummarizer = exports.createSummarizerFromFactory = exports.createSummarizerCore = void 0;
8
- const aqueduct_1 = require("@fluidframework/aqueduct");
9
- const container_definitions_1 = require("@fluidframework/container-definitions");
10
- const core_utils_1 = require("@fluidframework/core-utils");
11
- const driver_definitions_1 = require("@fluidframework/driver-definitions");
8
+ const internal_1 = require("@fluidframework/aqueduct/internal");
9
+ const internal_2 = require("@fluidframework/container-definitions/internal");
10
+ const internal_3 = require("@fluidframework/core-utils/internal");
11
+ const internal_4 = require("@fluidframework/driver-definitions/internal");
12
12
  const TestConfigs_js_1 = require("./TestConfigs.js");
13
13
  const containerUtils_js_1 = require("./containerUtils.js");
14
14
  const testContainerRuntimeFactoryWithDefaultDataStore_js_1 = require("./testContainerRuntimeFactoryWithDefaultDataStore.js");
@@ -32,7 +32,7 @@ async function getSummarizerBackCompat(container) {
32
32
  }
33
33
  }
34
34
  const response = await container.request({ url: "_summarizer" });
35
- (0, core_utils_1.assert)(response.status === 200, "requesting '/' should return default data object");
35
+ (0, internal_3.assert)(response.status === 200, "requesting '/' should return default data object");
36
36
  return response.value;
37
37
  }
38
38
  /** @internal */
@@ -43,13 +43,13 @@ async function createSummarizerCore(container, loader, summaryVersion) {
43
43
  }
44
44
  const request = {
45
45
  headers: {
46
- [container_definitions_1.LoaderHeader.cache]: false,
47
- [container_definitions_1.LoaderHeader.clientDetails]: {
46
+ [internal_2.LoaderHeader.cache]: false,
47
+ [internal_2.LoaderHeader.clientDetails]: {
48
48
  capabilities: { interactive: false },
49
49
  type: summarizerClientType,
50
50
  },
51
- [driver_definitions_1.DriverHeader.summarizingClient]: true,
52
- [container_definitions_1.LoaderHeader.version]: summaryVersion,
51
+ [internal_4.DriverHeader.summarizingClient]: true,
52
+ [internal_2.LoaderHeader.version]: summaryVersion,
53
53
  },
54
54
  url: absoluteUrl,
55
55
  };
@@ -81,7 +81,7 @@ const defaultSummaryOptions = {
81
81
  * The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.
82
82
  * @internal
83
83
  */
84
- async function createSummarizerFromFactory(provider, container, dataStoreFactory, summaryVersion, containerRuntimeFactoryType = aqueduct_1.ContainerRuntimeFactoryWithDefaultDataStore, registryEntries, logger, configProvider = (0, TestConfigs_js_1.createTestConfigProvider)()) {
84
+ async function createSummarizerFromFactory(provider, container, dataStoreFactory, summaryVersion, containerRuntimeFactoryType = internal_1.ContainerRuntimeFactoryWithDefaultDataStore, registryEntries, logger, configProvider = (0, TestConfigs_js_1.createTestConfigProvider)()) {
85
85
  const runtimeFactory = (0, testContainerRuntimeFactoryWithDefaultDataStore_js_1.createContainerRuntimeFactoryWithDefaultDataStore)(containerRuntimeFactoryType, {
86
86
  defaultFactory: dataStoreFactory,
87
87
  registryEntries: registryEntries ?? [
@@ -139,8 +139,8 @@ async function summarizeNow(summarizer, inputs = "end-to-end test") {
139
139
  }
140
140
  throw submitResult.error;
141
141
  }
142
- (0, core_utils_1.assert)(submitResult.data.stage === "submit", "on-demand summary submitted data stage should be submit");
143
- (0, core_utils_1.assert)(submitResult.data.summaryTree !== undefined, "summary tree should exist");
142
+ (0, internal_3.assert)(submitResult.data.stage === "submit", "on-demand summary submitted data stage should be submit");
143
+ (0, internal_3.assert)(submitResult.data.summaryTree !== undefined, "summary tree should exist");
144
144
  const broadcastResult = await (0, timeoutUtils_js_1.timeoutAwait)(result.summaryOpBroadcasted);
145
145
  if (!broadcastResult.success) {
146
146
  throw broadcastResult.error;
@@ -1 +1 @@
1
- {"version":3,"file":"TestSummaryUtils.js","sourceRoot":"","sources":["../src/TestSummaryUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAAuF;AACvF,iFAA8F;AAY9F,2DAAoD;AACpD,2EAAkE;AAMlE,qDAA4D;AAC5D,2DAAiE;AACjE,6HAAyH;AAEzH,uDAAiD;AAEjD,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAE1C;;;;;GAKG;AACH,KAAK,UAAU,uBAAuB,CAAC,SAAqB;IAC3D,IAAI,SAAS,CAAC,aAAa,KAAK,SAAS,EAAE;QAC1C,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QACnD,0GAA0G;QAC1G,qGAAqG;QACrG,gHAAgH;QAChH,oGAAoG;QACpG,IAAI,UAAU,KAAK,SAAS,EAAE;YAC7B,OAAO,UAAyB,CAAC;SACjC;KACD;IACD,MAAM,QAAQ,GAAc,MAAO,SAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC,CAAC;IACrF,IAAA,mBAAM,EAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,kDAAkD,CAAC,CAAC;IACpF,OAAO,QAAQ,CAAC,KAAoB,CAAC;AACtC,CAAC;AAED,gBAAgB;AACT,KAAK,UAAU,oBAAoB,CACzC,SAAqB,EACrB,MAAmB,EACnB,cAAuB;IAEvB,MAAM,WAAW,GAAG,MAAM,SA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,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM;QAC/D,aAAa,EAAE,YAAY,CAAC,IAAI,CAAC,uBAAuB;KACxD,CAAC;AACH,CAAC;AAtCD,oCAsCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ContainerRuntimeFactoryWithDefaultDataStore } from \"@fluidframework/aqueduct\";\nimport { IContainer, IHostLoader, LoaderHeader } from \"@fluidframework/container-definitions\";\nimport {\n\tIOnDemandSummarizeOptions,\n\tISummarizer,\n\tISummaryRuntimeOptions,\n} from \"@fluidframework/container-runtime\";\nimport {\n\tIConfigProviderBase,\n\tIRequest,\n\tIResponse,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport { DriverHeader } from \"@fluidframework/driver-definitions\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport { createTestConfigProvider } from \"./TestConfigs.js\";\nimport { waitForContainerConnection } from \"./containerUtils.js\";\nimport { createContainerRuntimeFactoryWithDefaultDataStore } from \"./testContainerRuntimeFactoryWithDefaultDataStore.js\";\nimport { ITestContainerConfig, ITestObjectProvider } from \"./testObjectProvider.js\";\nimport { timeoutAwait } from \"./timeoutUtils.js\";\n\nconst summarizerClientType = \"summarizer\";\n\n/**\n * This function should ONLY be used for back compat purposes\n * LTS versions of the Loader/Container will not have the \"getEntryPoint\" method, so we need to fallback to \"request\"\n * This function can be removed once LTS version of Loader moves to 2.0.0-internal.7.0.0\n * @internal\n */\nasync function getSummarizerBackCompat(container: IContainer): Promise<ISummarizer> {\n\tif (container.getEntryPoint !== undefined) {\n\t\tconst entryPoint = await container.getEntryPoint();\n\t\t// Note: We need to also check if the result of `getEntryPoint()` is defined. This is because when running\n\t\t// cross version compat testing scenarios, if we create with 1.X container and load with 2.X then the\n\t\t// function container.getEntryPoint will be defined for the 2.X container. However, it will not return undefined\n\t\t// since the container's runtime will be on version 1.X, which does not have an entry point defined.\n\t\tif (entryPoint !== undefined) {\n\t\t\treturn entryPoint as ISummarizer;\n\t\t}\n\t}\n\tconst response: IResponse = await (container as any).request({ url: \"_summarizer\" });\n\tassert(response.status === 200, \"requesting '/' should return default data object\");\n\treturn response.value as ISummarizer;\n}\n\n/** @internal */\nexport async function createSummarizerCore(\n\tcontainer: IContainer,\n\tloader: IHostLoader,\n\tsummaryVersion?: string,\n) {\n\tconst absoluteUrl = await container.getAbsoluteUrl(\"\");\n\tif (absoluteUrl === undefined) {\n\t\tthrow new Error(\"URL could not be resolved\");\n\t}\n\n\tconst request: IRequest = {\n\t\theaders: {\n\t\t\t[LoaderHeader.cache]: false,\n\t\t\t[LoaderHeader.clientDetails]: {\n\t\t\t\tcapabilities: { interactive: false },\n\t\t\t\ttype: summarizerClientType,\n\t\t\t},\n\t\t\t[DriverHeader.summarizingClient]: true,\n\t\t\t[LoaderHeader.version]: summaryVersion,\n\t\t},\n\t\turl: absoluteUrl,\n\t};\n\tconst summarizerContainer = await loader.resolve(request);\n\tawait waitForContainerConnection(summarizerContainer);\n\n\t// Old loaders will not have getEntryPoint API on the container. So, use getSummarizerBackCompat which\n\t// will use request pattern to get the summarizer in these old loaders.\n\tconst fluidObject = await getSummarizerBackCompat(summarizerContainer);\n\tif (fluidObject.ISummarizer === undefined) {\n\t\tthrow new Error(\"Fluid object does not implement ISummarizer\");\n\t}\n\n\treturn {\n\t\tcontainer: summarizerContainer,\n\t\tsummarizer: fluidObject.ISummarizer,\n\t};\n}\n\nconst defaultSummaryOptions: ISummaryRuntimeOptions = {\n\tsummaryConfigOverrides: {\n\t\tstate: \"disableHeuristics\",\n\t\tmaxAckWaitTime: 20000, // Some of the AFR tests take a long time to ack.\n\t\tmaxOpsSinceLastSummary: 7000,\n\t\tinitialSummarizerDelayMs: 0,\n\t},\n};\n\n/**\n * Creates a summarizer client from the given container and data store factory, and returns the summarizer client's\n * IContainer and ISummarizer.\n * The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.\n * @internal\n */\nexport async function createSummarizerFromFactory(\n\tprovider: ITestObjectProvider,\n\tcontainer: IContainer,\n\tdataStoreFactory: IFluidDataStoreFactory,\n\tsummaryVersion?: string,\n\tcontainerRuntimeFactoryType = ContainerRuntimeFactoryWithDefaultDataStore,\n\tregistryEntries?: NamedFluidDataStoreRegistryEntries,\n\tlogger?: ITelemetryBaseLogger,\n\tconfigProvider: IConfigProviderBase = createTestConfigProvider(),\n): Promise<{ container: IContainer; summarizer: ISummarizer }> {\n\tconst runtimeFactory = createContainerRuntimeFactoryWithDefaultDataStore(\n\t\tcontainerRuntimeFactoryType,\n\t\t{\n\t\t\tdefaultFactory: dataStoreFactory,\n\t\t\tregistryEntries: registryEntries ?? [\n\t\t\t\t[dataStoreFactory.type, Promise.resolve(dataStoreFactory)],\n\t\t\t],\n\t\t\truntimeOptions: { summaryOptions: defaultSummaryOptions },\n\t\t},\n\t);\n\n\tconst loader = provider.createLoader([[provider.defaultCodeDetails, runtimeFactory]], {\n\t\tconfigProvider,\n\t\tlogger,\n\t});\n\treturn createSummarizerCore(container, loader, summaryVersion);\n}\n\n/**\n * Creates a summarizer client from the given container and returns the summarizer client's IContainer and ISummarizer.\n * The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.\n *\n * Can pass in a test config provider to enable/disable features.\n * @internal\n */\nexport async function createSummarizer(\n\tprovider: ITestObjectProvider,\n\tcontainer: IContainer,\n\tconfig?: ITestContainerConfig,\n\tsummaryVersion?: string,\n\tlogger?: ITelemetryBaseLogger,\n): Promise<{ container: IContainer; summarizer: ISummarizer }> {\n\tconst testContainerConfig: ITestContainerConfig = {\n\t\t...config,\n\t\truntimeOptions: {\n\t\t\t...config?.runtimeOptions,\n\t\t\tsummaryOptions: config?.runtimeOptions?.summaryOptions ?? defaultSummaryOptions,\n\t\t},\n\t\tloaderProps: {\n\t\t\t...config?.loaderProps,\n\t\t\tconfigProvider: config?.loaderProps?.configProvider ?? createTestConfigProvider(),\n\t\t\tlogger,\n\t\t},\n\t};\n\tconst loader = provider.makeTestLoader(testContainerConfig);\n\treturn createSummarizerCore(container, loader, summaryVersion);\n}\n\n/**\n * Summarizes on demand and returns the summary tree, the version number and the reference sequence number of the\n * submitted summary.\n *\n * @param summarizer - The ISummarizer to use to summarize on demand\n * @param inputs - Either the reason string or the full IOnDemandSummarizeOptions.\n * Defaults to the reason \"end-to-end test\".\n * @internal\n */\nexport async function summarizeNow(\n\tsummarizer: ISummarizer,\n\tinputs: string | IOnDemandSummarizeOptions = \"end-to-end test\",\n): Promise<SummaryInfo> {\n\tconst options: IOnDemandSummarizeOptions =\n\t\ttypeof inputs === \"string\" ? { reason: inputs } : inputs;\n\tconst result = summarizer.summarizeOnDemand(options);\n\n\tconst submitResult = await timeoutAwait(result.summarySubmitted);\n\tif (!submitResult.success) {\n\t\tif (typeof submitResult.error !== \"string\") {\n\t\t\tsubmitResult.error.data = submitResult.data;\n\t\t}\n\t\tthrow submitResult.error;\n\t}\n\tassert(\n\t\tsubmitResult.data.stage === \"submit\",\n\t\t\"on-demand summary submitted data stage should be submit\",\n\t);\n\tassert(submitResult.data.summaryTree !== undefined, \"summary tree should exist\");\n\n\tconst broadcastResult = await timeoutAwait(result.summaryOpBroadcasted);\n\tif (!broadcastResult.success) {\n\t\tthrow broadcastResult.error;\n\t}\n\n\tconst ackNackResult = await timeoutAwait(result.receivedSummaryAckOrNack);\n\tif (!ackNackResult.success) {\n\t\tthrow ackNackResult.error;\n\t}\n\n\tawait new Promise((resolve) => process.nextTick(resolve));\n\n\treturn {\n\t\tsummaryTree: submitResult.data.summaryTree,\n\t\tsummaryVersion: ackNackResult.data.summaryAckOp.contents.handle,\n\t\tsummaryRefSeq: submitResult.data.referenceSequenceNumber,\n\t};\n}\n\n/**\n * Summary information containing the summary tree, summary version, and summary sequence number.\n * @internal\n */\nexport interface SummaryInfo {\n\t/**\n\t * The summary tree generated\n\t */\n\tsummaryTree: ISummaryTree;\n\t/**\n\t * Handle of the completed summary\n\t */\n\tsummaryVersion: string;\n\t/**\n\t * Reference sequence number of the current summary generation\n\t */\n\tsummaryRefSeq: number;\n}\n"]}
1
+ {"version":3,"file":"TestSummaryUtils.js","sourceRoot":"","sources":["../src/TestSummaryUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,gEAAgG;AAChG,6EAIwD;AAYxD,kEAA6D;AAC7D,0EAA2E;AAO3E,qDAA4D;AAC5D,2DAAiE;AACjE,6HAAyH;AAEzH,uDAAiD;AAEjD,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAE1C;;;;;GAKG;AACH,KAAK,UAAU,uBAAuB,CAAC,SAAqB;IAC3D,IAAI,SAAS,CAAC,aAAa,KAAK,SAAS,EAAE;QAC1C,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QACnD,0GAA0G;QAC1G,qGAAqG;QACrG,gHAAgH;QAChH,oGAAoG;QACpG,IAAI,UAAU,KAAK,SAAS,EAAE;YAC7B,OAAO,UAAyB,CAAC;SACjC;KACD;IACD,MAAM,QAAQ,GAAc,MAAO,SAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC,CAAC;IACrF,IAAA,iBAAM,EAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,kDAAkD,CAAC,CAAC;IACpF,OAAO,QAAQ,CAAC,KAAoB,CAAC;AACtC,CAAC;AAED,gBAAgB;AACT,KAAK,UAAU,oBAAoB,CACzC,SAAqB,EACrB,MAAmB,EACnB,cAAuB;IAEvB,MAAM,WAAW,GAAG,MAAM,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACvD,IAAI,WAAW,KAAK,SAAS,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;KAC7C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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ContainerRuntimeFactoryWithDefaultDataStore } from \"@fluidframework/aqueduct/internal\";\nimport {\n\tIContainer,\n\tIHostLoader,\n\tLoaderHeader,\n} from \"@fluidframework/container-definitions/internal\";\nimport {\n\tIOnDemandSummarizeOptions,\n\tISummarizer,\n\tISummaryRuntimeOptions,\n} from \"@fluidframework/container-runtime/internal\";\nimport {\n\tIConfigProviderBase,\n\tIRequest,\n\tIResponse,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { DriverHeader } from \"@fluidframework/driver-definitions/internal\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport { createTestConfigProvider } from \"./TestConfigs.js\";\nimport { waitForContainerConnection } from \"./containerUtils.js\";\nimport { createContainerRuntimeFactoryWithDefaultDataStore } from \"./testContainerRuntimeFactoryWithDefaultDataStore.js\";\nimport { ITestContainerConfig, ITestObjectProvider } from \"./testObjectProvider.js\";\nimport { timeoutAwait } from \"./timeoutUtils.js\";\n\nconst summarizerClientType = \"summarizer\";\n\n/**\n * This function should ONLY be used for back compat purposes\n * LTS versions of the Loader/Container will not have the \"getEntryPoint\" method, so we need to fallback to \"request\"\n * This function can be removed once LTS version of Loader moves to 2.0.0-internal.7.0.0\n * @internal\n */\nasync function getSummarizerBackCompat(container: IContainer): Promise<ISummarizer> {\n\tif (container.getEntryPoint !== undefined) {\n\t\tconst entryPoint = await container.getEntryPoint();\n\t\t// Note: We need to also check if the result of `getEntryPoint()` is defined. This is because when running\n\t\t// cross version compat testing scenarios, if we create with 1.X container and load with 2.X then the\n\t\t// function container.getEntryPoint will be defined for the 2.X container. However, it will not return undefined\n\t\t// since the container's runtime will be on version 1.X, which does not have an entry point defined.\n\t\tif (entryPoint !== undefined) {\n\t\t\treturn entryPoint as ISummarizer;\n\t\t}\n\t}\n\tconst response: IResponse = await (container as any).request({ url: \"_summarizer\" });\n\tassert(response.status === 200, \"requesting '/' should return default data object\");\n\treturn response.value as ISummarizer;\n}\n\n/** @internal */\nexport async function createSummarizerCore(\n\tcontainer: IContainer,\n\tloader: IHostLoader,\n\tsummaryVersion?: string,\n) {\n\tconst absoluteUrl = await container.getAbsoluteUrl(\"\");\n\tif (absoluteUrl === undefined) {\n\t\tthrow new Error(\"URL could not be resolved\");\n\t}\n\n\tconst request: IRequest = {\n\t\theaders: {\n\t\t\t[LoaderHeader.cache]: false,\n\t\t\t[LoaderHeader.clientDetails]: {\n\t\t\t\tcapabilities: { interactive: false },\n\t\t\t\ttype: summarizerClientType,\n\t\t\t},\n\t\t\t[DriverHeader.summarizingClient]: true,\n\t\t\t[LoaderHeader.version]: summaryVersion,\n\t\t},\n\t\turl: absoluteUrl,\n\t};\n\tconst summarizerContainer = await loader.resolve(request);\n\tawait waitForContainerConnection(summarizerContainer);\n\n\t// Old loaders will not have getEntryPoint API on the container. So, use getSummarizerBackCompat which\n\t// will use request pattern to get the summarizer in these old loaders.\n\tconst fluidObject = await getSummarizerBackCompat(summarizerContainer);\n\tif (fluidObject.ISummarizer === undefined) {\n\t\tthrow new Error(\"Fluid object does not implement ISummarizer\");\n\t}\n\n\treturn {\n\t\tcontainer: summarizerContainer,\n\t\tsummarizer: fluidObject.ISummarizer,\n\t};\n}\n\nconst defaultSummaryOptions: ISummaryRuntimeOptions = {\n\tsummaryConfigOverrides: {\n\t\tstate: \"disableHeuristics\",\n\t\tmaxAckWaitTime: 20000, // Some of the AFR tests take a long time to ack.\n\t\tmaxOpsSinceLastSummary: 7000,\n\t\tinitialSummarizerDelayMs: 0,\n\t},\n};\n\n/**\n * Creates a summarizer client from the given container and data store factory, and returns the summarizer client's\n * IContainer and ISummarizer.\n * The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.\n * @internal\n */\nexport async function createSummarizerFromFactory(\n\tprovider: ITestObjectProvider,\n\tcontainer: IContainer,\n\tdataStoreFactory: IFluidDataStoreFactory,\n\tsummaryVersion?: string,\n\tcontainerRuntimeFactoryType = ContainerRuntimeFactoryWithDefaultDataStore,\n\tregistryEntries?: NamedFluidDataStoreRegistryEntries,\n\tlogger?: ITelemetryBaseLogger,\n\tconfigProvider: IConfigProviderBase = createTestConfigProvider(),\n): Promise<{ container: IContainer; summarizer: ISummarizer }> {\n\tconst runtimeFactory = createContainerRuntimeFactoryWithDefaultDataStore(\n\t\tcontainerRuntimeFactoryType,\n\t\t{\n\t\t\tdefaultFactory: dataStoreFactory,\n\t\t\tregistryEntries: registryEntries ?? [\n\t\t\t\t[dataStoreFactory.type, Promise.resolve(dataStoreFactory)],\n\t\t\t],\n\t\t\truntimeOptions: { summaryOptions: defaultSummaryOptions },\n\t\t},\n\t);\n\n\tconst loader = provider.createLoader([[provider.defaultCodeDetails, runtimeFactory]], {\n\t\tconfigProvider,\n\t\tlogger,\n\t});\n\treturn createSummarizerCore(container, loader, summaryVersion);\n}\n\n/**\n * Creates a summarizer client from the given container and returns the summarizer client's IContainer and ISummarizer.\n * The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.\n *\n * Can pass in a test config provider to enable/disable features.\n * @internal\n */\nexport async function createSummarizer(\n\tprovider: ITestObjectProvider,\n\tcontainer: IContainer,\n\tconfig?: ITestContainerConfig,\n\tsummaryVersion?: string,\n\tlogger?: ITelemetryBaseLogger,\n): Promise<{ container: IContainer; summarizer: ISummarizer }> {\n\tconst testContainerConfig: ITestContainerConfig = {\n\t\t...config,\n\t\truntimeOptions: {\n\t\t\t...config?.runtimeOptions,\n\t\t\tsummaryOptions: config?.runtimeOptions?.summaryOptions ?? defaultSummaryOptions,\n\t\t},\n\t\tloaderProps: {\n\t\t\t...config?.loaderProps,\n\t\t\tconfigProvider: config?.loaderProps?.configProvider ?? createTestConfigProvider(),\n\t\t\tlogger,\n\t\t},\n\t};\n\tconst loader = provider.makeTestLoader(testContainerConfig);\n\treturn createSummarizerCore(container, loader, summaryVersion);\n}\n\n/**\n * Summarizes on demand and returns the summary tree, the version number and the reference sequence number of the\n * submitted summary.\n *\n * @param summarizer - The ISummarizer to use to summarize on demand\n * @param inputs - Either the reason string or the full IOnDemandSummarizeOptions.\n * Defaults to the reason \"end-to-end test\".\n * @internal\n */\nexport async function summarizeNow(\n\tsummarizer: ISummarizer,\n\tinputs: string | IOnDemandSummarizeOptions = \"end-to-end test\",\n): Promise<SummaryInfo> {\n\tconst options: IOnDemandSummarizeOptions =\n\t\ttypeof inputs === \"string\" ? { reason: inputs } : inputs;\n\tconst result = summarizer.summarizeOnDemand(options);\n\n\tconst submitResult = await timeoutAwait(result.summarySubmitted);\n\tif (!submitResult.success) {\n\t\tif (typeof submitResult.error !== \"string\") {\n\t\t\tsubmitResult.error.data = submitResult.data;\n\t\t}\n\t\tthrow submitResult.error;\n\t}\n\tassert(\n\t\tsubmitResult.data.stage === \"submit\",\n\t\t\"on-demand summary submitted data stage should be submit\",\n\t);\n\tassert(submitResult.data.summaryTree !== undefined, \"summary tree should exist\");\n\n\tconst broadcastResult = await timeoutAwait(result.summaryOpBroadcasted);\n\tif (!broadcastResult.success) {\n\t\tthrow broadcastResult.error;\n\t}\n\n\tconst ackNackResult = await timeoutAwait(result.receivedSummaryAckOrNack);\n\tif (!ackNackResult.success) {\n\t\tthrow ackNackResult.error;\n\t}\n\n\tawait new Promise((resolve) => process.nextTick(resolve));\n\n\treturn {\n\t\tsummaryTree: submitResult.data.summaryTree,\n\t\tsummaryVersion: ackNackResult.data.summaryAckOp.contents.handle,\n\t\tsummaryRefSeq: submitResult.data.referenceSequenceNumber,\n\t};\n}\n\n/**\n * Summary information containing the summary tree, summary version, and summary sequence number.\n * @internal\n */\nexport interface SummaryInfo {\n\t/**\n\t * The summary tree generated\n\t */\n\tsummaryTree: ISummaryTree;\n\t/**\n\t * Handle of the completed summary\n\t */\n\tsummaryVersion: string;\n\t/**\n\t * Reference sequence number of the current summary generation\n\t */\n\tsummaryRefSeq: number;\n}\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IContainer } from "@fluidframework/container-definitions";
6
- import { IDataStore } from "@fluidframework/runtime-definitions";
5
+ import { IContainer } from "@fluidframework/container-definitions/internal";
6
+ import { IDataStore } from "@fluidframework/runtime-definitions/internal";
7
7
  import { TimeoutWithError } from "./timeoutUtils.js";
8
8
  /**
9
9
  * Utility function to wait for the specified Container to be in Connected state.
@@ -1 +1 @@
1
- {"version":3,"file":"containerUtils.d.ts","sourceRoot":"","sources":["../src/containerUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAInE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAmB,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,0BAA0B,CAC/C,SAAS,EAAE,UAAU,EACrB,oBAAoB,GAAE,OAAc,EACpC,cAAc,CAAC,EAAE,gBAAgB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;;;;GAKG;AACH,wBAAsB,gCAAgC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAc3F;AAED;;;;;;GAMG;AACH,wBAAsB,gCAAgC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAO3F"}
1
+ {"version":3,"file":"containerUtils.d.ts","sourceRoot":"","sources":["../src/containerUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAI5E,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAE1E,OAAO,EAAmB,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,0BAA0B,CAC/C,SAAS,EAAE,UAAU,EACrB,oBAAoB,GAAE,OAAc,EACpC,cAAc,CAAC,EAAE,gBAAgB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;;;;GAKG;AACH,wBAAsB,gCAAgC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAc3F;AAED;;;;;;GAMG;AACH,wBAAsB,gCAAgC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAO3F"}
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.getDataStoreEntryPointBackCompat = exports.getContainerEntryPointBackCompat = exports.waitForContainerConnection = void 0;
8
8
  const container_loader_1 = require("@fluidframework/container-loader");
9
- const core_utils_1 = require("@fluidframework/core-utils");
9
+ const internal_1 = require("@fluidframework/core-utils/internal");
10
10
  const timeoutUtils_js_1 = require("./timeoutUtils.js");
11
11
  /**
12
12
  * Utility function to wait for the specified Container to be in Connected state.
@@ -62,7 +62,7 @@ async function getContainerEntryPointBackCompat(container) {
62
62
  }
63
63
  }
64
64
  const response = await container.request({ url: "/" });
65
- (0, core_utils_1.assert)(response.status === 200, "requesting '/' should return default data object");
65
+ (0, internal_1.assert)(response.status === 200, "requesting '/' should return default data object");
66
66
  return response.value;
67
67
  }
68
68
  exports.getContainerEntryPointBackCompat = getContainerEntryPointBackCompat;
@@ -78,7 +78,7 @@ async function getDataStoreEntryPointBackCompat(dataStore) {
78
78
  return dataStore.entryPoint.get();
79
79
  }
80
80
  const response = await dataStore.request({ url: "" });
81
- (0, core_utils_1.assert)(response.status === 200, "empty request should return data object");
81
+ (0, internal_1.assert)(response.status === 200, "empty request should return data object");
82
82
  return response.value;
83
83
  }
84
84
  exports.getDataStoreEntryPointBackCompat = getDataStoreEntryPointBackCompat;
@@ -1 +1 @@
1
- {"version":3,"file":"containerUtils.js","sourceRoot":"","sources":["../src/containerUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uEAAmE;AAEnE,2DAAoD;AAEpD,uDAAsF;AAEtF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACI,KAAK,UAAU,0BAA0B,CAC/C,SAAqB,EACrB,uBAAgC,IAAI,EACpC,cAAiC;IAEjC,IAAI,SAAS,CAAC,eAAe,KAAK,kCAAe,CAAC,SAAS,EAAE;QAC5D,MAAM,QAAQ,GAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrD,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YAC7C,IAAI,oBAAoB,EAAE;gBACzB,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;aACnD;QACF,CAAC,CAAC;QAEF,OAAO,cAAc,KAAK,SAAS;YAClC,CAAC,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC;YACvB,CAAC,CAAC,IAAA,gCAAc,EAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;KAC5C;AACF,CAAC;AAjBD,gEAiBC;AAED;;;;;GAKG;AACI,KAAK,UAAU,gCAAgC,CAAI,SAAqB;IAC9E,IAAI,SAAS,CAAC,aAAa,KAAK,SAAS,EAAE;QAC1C,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QACnD,0GAA0G;QAC1G,qGAAqG;QACrG,gHAAgH;QAChH,oGAAoG;QACpG,IAAI,UAAU,KAAK,SAAS,EAAE;YAC7B,OAAO,UAAe,CAAC;SACvB;KACD;IACD,MAAM,QAAQ,GAAc,MAAO,SAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3E,IAAA,mBAAM,EAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,kDAAkD,CAAC,CAAC;IACpF,OAAO,QAAQ,CAAC,KAAU,CAAC;AAC5B,CAAC;AAdD,4EAcC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,gCAAgC,CAAI,SAAqB;IAC9E,IAAI,SAAS,CAAC,UAAU,KAAK,SAAS,EAAE;QACvC,OAAO,SAAS,CAAC,UAAU,CAAC,GAAG,EAAgB,CAAC;KAChD;IACD,MAAM,QAAQ,GAAc,MAAO,SAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1E,IAAA,mBAAM,EAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,yCAAyC,CAAC,CAAC;IAC3E,OAAO,QAAQ,CAAC,KAAU,CAAC;AAC5B,CAAC;AAPD,4EAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainer } from \"@fluidframework/container-definitions\";\nimport { ConnectionState } from \"@fluidframework/container-loader\";\nimport { IResponse } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IDataStore } from \"@fluidframework/runtime-definitions\";\nimport { PromiseExecutor, TimeoutWithError, timeoutPromise } from \"./timeoutUtils.js\";\n\n/**\n * Utility function to wait for the specified Container to be in Connected state.\n * If the Container is already connected, the Promise returns immediately; otherwise it resolves when the Container emits\n * its 'connected' event.\n * If failOnContainerClose === true, the returned Promise will be rejected if the container emits a 'closed' event\n * before a 'connected' event.\n * @param container - The container to wait for.\n * @param failOnContainerClose - If true, the returned Promise will be rejected if the container emits a 'closed' event\n * before a 'connected' event.\n * Defaults to true.\n * @param timeoutOptions - Options related to the behavior of the timeout.\n * If provided, the returned Promise will reject if the container hasn't emitted relevant events in timeoutOptions.durationMs.\n * If not provided, the Promise will wait indefinitely for the Container to emit its 'connected' (or 'closed', if\n * failOnContainerClose === true) event.\n *\n * @returns A Promise that either:\n * - Resolves when the specified container emits a 'connected' event (or immediately if the Container is already connected).\n * - Rejects if failOnContainerClose === true and the container emits a 'closed' event before a 'connected' event.\n * - Rejects after timeoutOptions.durationMs if timeoutOptions !== undefined and the container does not emit relevant\n * events, within that timeframe.\n * @internal\n */\nexport async function waitForContainerConnection(\n\tcontainer: IContainer,\n\tfailOnContainerClose: boolean = true,\n\ttimeoutOptions?: TimeoutWithError,\n): Promise<void> {\n\tif (container.connectionState !== ConnectionState.Connected) {\n\t\tconst executor: PromiseExecutor = (resolve, reject) => {\n\t\t\tcontainer.once(\"connected\", () => resolve());\n\t\t\tif (failOnContainerClose) {\n\t\t\t\tcontainer.once(\"closed\", (error) => reject(error));\n\t\t\t}\n\t\t};\n\n\t\treturn timeoutOptions === undefined\n\t\t\t? new Promise(executor)\n\t\t\t: timeoutPromise(executor, timeoutOptions);\n\t}\n}\n\n/**\n * This function should ONLY be used for back compat purposes\n * LTS versions of the Loader/Container will not have the \"getEntryPoint\" method, so we need to fallback to \"request\"\n * This function can be removed once LTS version of Loader moves to 2.0.0-internal.7.0.0\n * @internal\n */\nexport async function getContainerEntryPointBackCompat<T>(container: IContainer): Promise<T> {\n\tif (container.getEntryPoint !== undefined) {\n\t\tconst entryPoint = await container.getEntryPoint();\n\t\t// Note: We need to also check if the result of `getEntryPoint()` is defined. This is because when running\n\t\t// cross version compat testing scenarios, if we create with 1.X container and load with 2.X then the\n\t\t// function container.getEntryPoint will be defined for the 2.X container. However, it will not return undefined\n\t\t// since the container's runtime will be on version 1.X, which does not have an entry point defined.\n\t\tif (entryPoint !== undefined) {\n\t\t\treturn entryPoint as T;\n\t\t}\n\t}\n\tconst response: IResponse = await (container as any).request({ url: \"/\" });\n\tassert(response.status === 200, \"requesting '/' should return default data object\");\n\treturn response.value as T;\n}\n\n/**\n * This function should ONLY be used for back compat purposes\n * Older supported versions of IDataStore do not have the \"entryPoint\" property, so we need to fallback to \"request\"\n * This function can be removed once back-compat support for IDataStore moves to 2.0.0-internal.7.0.0\n *\n * @internal\n */\nexport async function getDataStoreEntryPointBackCompat<T>(dataStore: IDataStore): Promise<T> {\n\tif (dataStore.entryPoint !== undefined) {\n\t\treturn dataStore.entryPoint.get() as Promise<T>;\n\t}\n\tconst response: IResponse = await (dataStore as any).request({ url: \"\" });\n\tassert(response.status === 200, \"empty request should return data object\");\n\treturn response.value as T;\n}\n"]}
1
+ {"version":3,"file":"containerUtils.js","sourceRoot":"","sources":["../src/containerUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uEAAmE;AAEnE,kEAA6D;AAG7D,uDAAsF;AAEtF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACI,KAAK,UAAU,0BAA0B,CAC/C,SAAqB,EACrB,uBAAgC,IAAI,EACpC,cAAiC;IAEjC,IAAI,SAAS,CAAC,eAAe,KAAK,kCAAe,CAAC,SAAS,EAAE;QAC5D,MAAM,QAAQ,GAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrD,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YAC7C,IAAI,oBAAoB,EAAE;gBACzB,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;aACnD;QACF,CAAC,CAAC;QAEF,OAAO,cAAc,KAAK,SAAS;YAClC,CAAC,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC;YACvB,CAAC,CAAC,IAAA,gCAAc,EAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;KAC5C;AACF,CAAC;AAjBD,gEAiBC;AAED;;;;;GAKG;AACI,KAAK,UAAU,gCAAgC,CAAI,SAAqB;IAC9E,IAAI,SAAS,CAAC,aAAa,KAAK,SAAS,EAAE;QAC1C,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QACnD,0GAA0G;QAC1G,qGAAqG;QACrG,gHAAgH;QAChH,oGAAoG;QACpG,IAAI,UAAU,KAAK,SAAS,EAAE;YAC7B,OAAO,UAAe,CAAC;SACvB;KACD;IACD,MAAM,QAAQ,GAAc,MAAO,SAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3E,IAAA,iBAAM,EAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,kDAAkD,CAAC,CAAC;IACpF,OAAO,QAAQ,CAAC,KAAU,CAAC;AAC5B,CAAC;AAdD,4EAcC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,gCAAgC,CAAI,SAAqB;IAC9E,IAAI,SAAS,CAAC,UAAU,KAAK,SAAS,EAAE;QACvC,OAAO,SAAS,CAAC,UAAU,CAAC,GAAG,EAAgB,CAAC;KAChD;IACD,MAAM,QAAQ,GAAc,MAAO,SAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1E,IAAA,iBAAM,EAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,yCAAyC,CAAC,CAAC;IAC3E,OAAO,QAAQ,CAAC,KAAU,CAAC;AAC5B,CAAC;AAPD,4EAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainer } from \"@fluidframework/container-definitions/internal\";\nimport { ConnectionState } from \"@fluidframework/container-loader\";\nimport { IResponse } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { IDataStore } from \"@fluidframework/runtime-definitions/internal\";\n\nimport { PromiseExecutor, TimeoutWithError, timeoutPromise } from \"./timeoutUtils.js\";\n\n/**\n * Utility function to wait for the specified Container to be in Connected state.\n * If the Container is already connected, the Promise returns immediately; otherwise it resolves when the Container emits\n * its 'connected' event.\n * If failOnContainerClose === true, the returned Promise will be rejected if the container emits a 'closed' event\n * before a 'connected' event.\n * @param container - The container to wait for.\n * @param failOnContainerClose - If true, the returned Promise will be rejected if the container emits a 'closed' event\n * before a 'connected' event.\n * Defaults to true.\n * @param timeoutOptions - Options related to the behavior of the timeout.\n * If provided, the returned Promise will reject if the container hasn't emitted relevant events in timeoutOptions.durationMs.\n * If not provided, the Promise will wait indefinitely for the Container to emit its 'connected' (or 'closed', if\n * failOnContainerClose === true) event.\n *\n * @returns A Promise that either:\n * - Resolves when the specified container emits a 'connected' event (or immediately if the Container is already connected).\n * - Rejects if failOnContainerClose === true and the container emits a 'closed' event before a 'connected' event.\n * - Rejects after timeoutOptions.durationMs if timeoutOptions !== undefined and the container does not emit relevant\n * events, within that timeframe.\n * @internal\n */\nexport async function waitForContainerConnection(\n\tcontainer: IContainer,\n\tfailOnContainerClose: boolean = true,\n\ttimeoutOptions?: TimeoutWithError,\n): Promise<void> {\n\tif (container.connectionState !== ConnectionState.Connected) {\n\t\tconst executor: PromiseExecutor = (resolve, reject) => {\n\t\t\tcontainer.once(\"connected\", () => resolve());\n\t\t\tif (failOnContainerClose) {\n\t\t\t\tcontainer.once(\"closed\", (error) => reject(error));\n\t\t\t}\n\t\t};\n\n\t\treturn timeoutOptions === undefined\n\t\t\t? new Promise(executor)\n\t\t\t: timeoutPromise(executor, timeoutOptions);\n\t}\n}\n\n/**\n * This function should ONLY be used for back compat purposes\n * LTS versions of the Loader/Container will not have the \"getEntryPoint\" method, so we need to fallback to \"request\"\n * This function can be removed once LTS version of Loader moves to 2.0.0-internal.7.0.0\n * @internal\n */\nexport async function getContainerEntryPointBackCompat<T>(container: IContainer): Promise<T> {\n\tif (container.getEntryPoint !== undefined) {\n\t\tconst entryPoint = await container.getEntryPoint();\n\t\t// Note: We need to also check if the result of `getEntryPoint()` is defined. This is because when running\n\t\t// cross version compat testing scenarios, if we create with 1.X container and load with 2.X then the\n\t\t// function container.getEntryPoint will be defined for the 2.X container. However, it will not return undefined\n\t\t// since the container's runtime will be on version 1.X, which does not have an entry point defined.\n\t\tif (entryPoint !== undefined) {\n\t\t\treturn entryPoint as T;\n\t\t}\n\t}\n\tconst response: IResponse = await (container as any).request({ url: \"/\" });\n\tassert(response.status === 200, \"requesting '/' should return default data object\");\n\treturn response.value as T;\n}\n\n/**\n * This function should ONLY be used for back compat purposes\n * Older supported versions of IDataStore do not have the \"entryPoint\" property, so we need to fallback to \"request\"\n * This function can be removed once back-compat support for IDataStore moves to 2.0.0-internal.7.0.0\n *\n * @internal\n */\nexport async function getDataStoreEntryPointBackCompat<T>(dataStore: IDataStore): Promise<T> {\n\tif (dataStore.entryPoint !== undefined) {\n\t\treturn dataStore.entryPoint.get() as Promise<T>;\n\t}\n\tconst response: IResponse = await (dataStore as any).request({ url: \"\" });\n\tassert(response.status === 200, \"empty request should return data object\");\n\treturn response.value as T;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,aAAa,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,KAAK,wBAAoC,CAAC"}
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,aAAa,MAAM,OAAO,CAAC;AAIlC,eAAO,MAAM,KAAK,wBAAoC,CAAC"}
package/dist/debug.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,kDAAkC;AAClC,2DAA0D;AAE7C,QAAA,KAAK,GAAG,IAAA,eAAa,EAAC,kBAAkB,CAAC,CAAC;AACvD,IAAA,aAAK,EAAC,YAAY,2BAAO,eAAe,8BAAU,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport registerDebug from \"debug\";\nimport { pkgName, pkgVersion } from \"./packageVersion.js\";\n\nexport const debug = registerDebug(\"fluid:test-utils\");\ndebug(`Package: ${pkgName} - Version: ${pkgVersion}`);\n"]}
1
+ {"version":3,"file":"debug.js","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,kDAAkC;AAElC,2DAA0D;AAE7C,QAAA,KAAK,GAAG,IAAA,eAAa,EAAC,kBAAkB,CAAC,CAAC;AACvD,IAAA,aAAK,EAAC,YAAY,2BAAO,eAAe,8BAAU,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport registerDebug from \"debug\";\n\nimport { pkgName, pkgVersion } from \"./packageVersion.js\";\n\nexport const debug = registerDebug(\"fluid:test-utils\");\ndebug(`Package: ${pkgName} - Version: ${pkgVersion}`);\n"]}
@@ -5,7 +5,7 @@
5
5
  import { IFluidLoadable } from "@fluidframework/core-interfaces";
6
6
  import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
7
7
  import { ISharedMap } from "@fluidframework/map";
8
- import { IFluidDataStoreChannel, IFluidDataStoreContext } from "@fluidframework/runtime-definitions";
8
+ import { IFluidDataStoreChannel, IFluidDataStoreContext } from "@fluidframework/runtime-definitions/internal";
9
9
  /**
10
10
  * @alpha
11
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACN,sBAAsB,EACtB,sBAAsB,EACtB,MAAM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ot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { ISharedMap } from \"@fluidframework/map\";\nimport {\n\tIFluidDataStoreChannel,\n\tIFluidDataStoreContext,\n} from \"@fluidframework/runtime-definitions\";\n\n/**\n * @alpha\n */\nexport interface IProvideTestFluidObject {\n\treadonly ITestFluidObject: ITestFluidObject;\n}\n\n/**\n * @alpha\n */\nexport interface ITestFluidObject extends IProvideTestFluidObject, IFluidLoadable {\n\troot: ISharedMap;\n\treadonly runtime: IFluidDataStoreRuntime;\n\treadonly channel: IFluidDataStoreChannel;\n\treadonly context: IFluidDataStoreContext;\n\tgetSharedObject<T = any>(id: string): Promise<T>;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { ISharedMap } from \"@fluidframework/map\";\nimport {\n\tIFluidDataStoreChannel,\n\tIFluidDataStoreContext,\n} from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * @alpha\n */\nexport interface IProvideTestFluidObject {\n\treadonly ITestFluidObject: ITestFluidObject;\n}\n\n/**\n * @alpha\n */\nexport interface ITestFluidObject extends IProvideTestFluidObject, IFluidLoadable {\n\troot: ISharedMap;\n\treadonly runtime: IFluidDataStoreRuntime;\n\treadonly channel: IFluidDataStoreChannel;\n\treadonly context: IFluidDataStoreContext;\n\tgetSharedObject<T = any>(id: string): Promise<T>;\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IContainer, IHostLoader } from "@fluidframework/container-definitions";
5
+ import { IContainer, IHostLoader } from "@fluidframework/container-definitions/internal";
6
6
  import { IOpProcessingController } from "./testObjectProvider.js";
7
7
  /**
8
8
  * @alpha
@@ -1 +1 @@
1
- {"version":3,"file":"loaderContainerTracker.d.ts","sourceRoot":"","sources":["../src/loaderContainerTracker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAe,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAgB7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAuBlE;;GAEG;AACH,qBAAa,sBAAuB,YAAW,uBAAuB;IAIzD,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IAHlD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0C;IACrE,OAAO,CAAC,kBAAkB,CAAa;gBAEV,qBAAqB,GAAE,OAAe;IAEnE;;;OAGG;IACI,GAAG,CAAC,UAAU,SAAS,WAAW,EAAE,MAAM,EAAE,UAAU;IAmB7D;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAoDpB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAuC1B,OAAO,CAAC,iBAAiB;IAQzB;;OAEG;IACI,KAAK;IAUZ;;;;;;;;;;;;;;;OAeG;IACU,kBAAkB,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA2E3E;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA8BzB;;;;;OAKG;IACH,OAAO,CAAC,6BAA6B;IAmErC,OAAO,CAAC,qBAAqB;IAO7B;;;;;;;OAOG;YACW,qBAAqB;IAoCnC;;;OAGG;YACW,oBAAoB;IAclC;;OAEG;IACI,gBAAgB,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE;IAoBnD;;;;;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qB;IAO7B;;;;;;;OAOG;YACW,qBAAqB;IAoCnC;;;OAGG;YACW,oBAAoB;IAclC;;OAEG;IACI,gBAAgB,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE;IAoBnD;;;;;;;;OAQG;IACU,eAAe,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE;IAexD;;;;;;;;OAQG;YACW,cAAc;IAwD5B;;;;;;OAMG;IACU,eAAe,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE;IAIxD;;;;;;OAMG;IACU,eAAe,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE;IAIxD;;OAEG;YACW,YAAY;IAgD1B;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IA2BzB;;OAEG;IACH,OAAO,CAAC,UAAU;IAwElB;;;;OAIG;IACH,OAAO,CAAC,aAAa;CAKrB"}
@@ -6,8 +6,8 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.LoaderContainerTracker = void 0;
8
8
  const container_loader_1 = require("@fluidframework/container-loader");
9
- const core_utils_1 = require("@fluidframework/core-utils");
10
- const driver_utils_1 = require("@fluidframework/driver-utils");
9
+ const internal_1 = require("@fluidframework/core-utils/internal");
10
+ const internal_2 = require("@fluidframework/driver-utils/internal");
11
11
  const protocol_definitions_1 = require("@fluidframework/protocol-definitions");
12
12
  const containerUtils_js_1 = require("./containerUtils.js");
13
13
  const debug_js_1 = require("./debug.js");
@@ -93,7 +93,7 @@ class LoaderContainerTracker {
93
93
  trackTrailingNoOps(container, record) {
94
94
  container.deltaManager.outbound.on("op", (messages) => {
95
95
  for (const msg of messages) {
96
- if ((0, driver_utils_1.canBeCoalescedByService)(msg)) {
96
+ if ((0, internal_2.canBeCoalescedByService)(msg)) {
97
97
  // Track the NoOp that was sent.
98
98
  if (record.trailingNoOps === 0) {
99
99
  // record the starting sequence number of the trailing no ops if we haven't been tracking yet.
@@ -109,7 +109,7 @@ class LoaderContainerTracker {
109
109
  });
110
110
  container.deltaManager.inbound.on("push", (message) => {
111
111
  // Received the no op back, update the record if we are tracking
112
- if ((0, driver_utils_1.canBeCoalescedByService)(message) &&
112
+ if ((0, internal_2.canBeCoalescedByService)(message) &&
113
113
  message.clientId === container.clientId &&
114
114
  record.trailingNoOps !== 0 &&
115
115
  record.startTrailingNoOps <= message.clientSequenceNumber) {
@@ -289,8 +289,8 @@ class LoaderContainerTracker {
289
289
  if (!("clientSequenceNumber" in deltaManager)) {
290
290
  deltaManager = deltaManager.connectionManager;
291
291
  }
292
- (0, core_utils_1.assert)("clientSequenceNumber" in deltaManager, "no clientSequenceNumber");
293
- (0, core_utils_1.assert)("clientSequenceNumberObserved" in deltaManager, "no clientSequenceNumber");
292
+ (0, internal_1.assert)("clientSequenceNumber" in deltaManager, "no clientSequenceNumber");
293
+ (0, internal_1.assert)("clientSequenceNumberObserved" in deltaManager, "no clientSequenceNumber");
294
294
  // If last submittedClientId isn't the current clientId, then we haven't send any ops
295
295
  return (deltaManager.lastSubmittedClientId === container.clientId &&
296
296
  deltaManager.clientSequenceNumber !==
@@ -378,7 +378,7 @@ class LoaderContainerTracker {
378
378
  const containersToApply = this.getContainers(containers);
379
379
  for (const container of containersToApply) {
380
380
  const record = this.containers.get(container);
381
- (0, core_utils_1.assert)(record?.pauseP === undefined, "Cannot resume container while pausing is in progress");
381
+ (0, internal_1.assert)(record?.pauseP === undefined, "Cannot resume container while pausing is in progress");
382
382
  if (record?.paused === true) {
383
383
  debugWait(`${record.index}: container resumed`);
384
384
  container.deltaManager.inbound.resume();
@@ -423,8 +423,8 @@ class LoaderContainerTracker {
423
423
  */
424
424
  async pauseContainer(container, record) {
425
425
  debugWait(`${record.index}: pausing container`);
426
- (0, core_utils_1.assert)(!container.deltaManager.outbound.paused, "Container should not be paused yet");
427
- (0, core_utils_1.assert)(!container.deltaManager.inbound.paused, "Container should not be paused yet");
426
+ (0, internal_1.assert)(!container.deltaManager.outbound.paused, "Container should not be paused yet");
427
+ (0, internal_1.assert)(!container.deltaManager.inbound.paused, "Container should not be paused yet");
428
428
  // Pause outbound
429
429
  debugWait(`${record.index}: pausing container outbound queues`);
430
430
  await container.deltaManager.outbound.pause();
@@ -451,7 +451,7 @@ class LoaderContainerTracker {
451
451
  container.deltaManager.outbound.resume();
452
452
  await new Promise((resolve) => container.once("disconnected", resolve));
453
453
  const accepted = proposalP ? await proposalP : false;
454
- (0, core_utils_1.assert)(!accepted, "A proposal in read mode should be rejected");
454
+ (0, internal_1.assert)(!accepted, "A proposal in read mode should be rejected");
455
455
  await container.deltaManager.outbound.pause();
456
456
  // Ensure the container is reconnect.
457
457
  if (container.connectionState !== container_loader_1.ConnectionState.Connected) {
@@ -496,7 +496,7 @@ class LoaderContainerTracker {
496
496
  const inflightTracker = new Map();
497
497
  const cleanup = [];
498
498
  for (const container of containersToApply) {
499
- (0, core_utils_1.assert)(container.deltaManager.active, "Container should be connected in write mode already");
499
+ (0, internal_1.assert)(container.deltaManager.active, "Container should be connected in write mode already");
500
500
  const queue = getQueue(container);
501
501
  // track the outgoing ops (if any) to make sure they make the round trip to at least to the same client
502
502
  // to make sure they are sequenced.
@@ -532,13 +532,13 @@ class LoaderContainerTracker {
532
532
  setupInOutTracker(container, inflightTracker) {
533
533
  const outHandler = (messages) => {
534
534
  for (const message of messages) {
535
- if (!(0, driver_utils_1.canBeCoalescedByService)(message)) {
535
+ if (!(0, internal_2.canBeCoalescedByService)(message)) {
536
536
  inflightTracker.set(container, message.clientSequenceNumber);
537
537
  }
538
538
  }
539
539
  };
540
540
  const inHandler = (message) => {
541
- if (!(0, driver_utils_1.canBeCoalescedByService)(message) &&
541
+ if (!(0, internal_2.canBeCoalescedByService)(message) &&
542
542
  message.clientId === container.clientId &&
543
543
  inflightTracker.get(container) === message.clientSequenceNumber) {
544
544
  inflightTracker.delete(container);