@fluidframework/container-loader 2.0.0-dev-rc.3.0.0.250606 → 2.0.0-dev-rc.3.0.0.254274

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 (220) hide show
  1. package/api-report/container-loader.api.md +11 -11
  2. package/dist/attachment.d.ts +2 -2
  3. package/dist/attachment.d.ts.map +1 -1
  4. package/dist/attachment.js +3 -3
  5. package/dist/attachment.js.map +1 -1
  6. package/dist/audience.d.ts +1 -1
  7. package/dist/audience.d.ts.map +1 -1
  8. package/dist/audience.js +2 -2
  9. package/dist/audience.js.map +1 -1
  10. package/dist/catchUpMonitor.js +2 -2
  11. package/dist/catchUpMonitor.js.map +1 -1
  12. package/dist/connectionManager.d.ts +1 -1
  13. package/dist/connectionManager.d.ts.map +1 -1
  14. package/dist/connectionManager.js +41 -41
  15. package/dist/connectionManager.js.map +1 -1
  16. package/dist/connectionStateHandler.d.ts.map +1 -1
  17. package/dist/connectionStateHandler.js +27 -27
  18. package/dist/connectionStateHandler.js.map +1 -1
  19. package/dist/container-loader-alpha.d.ts +11 -11
  20. package/dist/container-loader-beta.d.ts +11 -11
  21. package/dist/container-loader-public.d.ts +11 -11
  22. package/dist/container-loader-untrimmed.d.ts +11 -11
  23. package/dist/container.d.ts +5 -3
  24. package/dist/container.d.ts.map +1 -1
  25. package/dist/container.js +83 -81
  26. package/dist/container.js.map +1 -1
  27. package/dist/containerContext.d.ts +5 -3
  28. package/dist/containerContext.d.ts.map +1 -1
  29. package/dist/containerContext.js.map +1 -1
  30. package/dist/containerStorageAdapter.d.ts +2 -2
  31. package/dist/containerStorageAdapter.d.ts.map +1 -1
  32. package/dist/containerStorageAdapter.js +6 -6
  33. package/dist/containerStorageAdapter.js.map +1 -1
  34. package/dist/contracts.d.ts +3 -2
  35. package/dist/contracts.d.ts.map +1 -1
  36. package/dist/contracts.js +2 -2
  37. package/dist/contracts.js.map +1 -1
  38. package/dist/debugLogger.d.ts +2 -1
  39. package/dist/debugLogger.d.ts.map +1 -1
  40. package/dist/debugLogger.js +4 -4
  41. package/dist/debugLogger.js.map +1 -1
  42. package/dist/deltaManager.d.ts +7 -3
  43. package/dist/deltaManager.d.ts.map +1 -1
  44. package/dist/deltaManager.js +52 -49
  45. package/dist/deltaManager.js.map +1 -1
  46. package/dist/deltaQueue.js +5 -5
  47. package/dist/deltaQueue.js.map +1 -1
  48. package/dist/error.d.ts +3 -2
  49. package/dist/error.d.ts.map +1 -1
  50. package/dist/error.js +5 -5
  51. package/dist/error.js.map +1 -1
  52. package/dist/loader.d.ts +2 -2
  53. package/dist/loader.d.ts.map +1 -1
  54. package/dist/loader.js +21 -21
  55. package/dist/loader.js.map +1 -1
  56. package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts +1 -1
  57. package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
  58. package/dist/location-redirection-utilities/resolveWithLocationRedirection.js +2 -2
  59. package/dist/location-redirection-utilities/resolveWithLocationRedirection.js.map +1 -1
  60. package/dist/noopHeuristic.js +6 -6
  61. package/dist/noopHeuristic.js.map +1 -1
  62. package/dist/packageVersion.d.ts +1 -1
  63. package/dist/packageVersion.js +1 -1
  64. package/dist/packageVersion.js.map +1 -1
  65. package/dist/protocol.d.ts +1 -1
  66. package/dist/protocol.d.ts.map +1 -1
  67. package/dist/protocol.js +2 -2
  68. package/dist/protocol.js.map +1 -1
  69. package/dist/protocolTreeDocumentStorageService.d.ts +4 -4
  70. package/dist/protocolTreeDocumentStorageService.d.ts.map +1 -1
  71. package/dist/protocolTreeDocumentStorageService.js.map +1 -1
  72. package/dist/quorum.d.ts +1 -1
  73. package/dist/quorum.d.ts.map +1 -1
  74. package/dist/quorum.js.map +1 -1
  75. package/dist/retriableDocumentStorageService.d.ts +1 -1
  76. package/dist/retriableDocumentStorageService.d.ts.map +1 -1
  77. package/dist/retriableDocumentStorageService.js +7 -7
  78. package/dist/retriableDocumentStorageService.js.map +1 -1
  79. package/dist/serializedStateManager.d.ts +40 -9
  80. package/dist/serializedStateManager.d.ts.map +1 -1
  81. package/dist/serializedStateManager.js +133 -24
  82. package/dist/serializedStateManager.js.map +1 -1
  83. package/dist/utils.d.ts +19 -3
  84. package/dist/utils.d.ts.map +1 -1
  85. package/dist/utils.js +57 -15
  86. package/dist/utils.js.map +1 -1
  87. package/lib/attachment.d.ts +2 -2
  88. package/lib/attachment.d.ts.map +1 -1
  89. package/lib/attachment.js +1 -1
  90. package/lib/attachment.js.map +1 -1
  91. package/lib/audience.d.ts +1 -1
  92. package/lib/audience.d.ts.map +1 -1
  93. package/lib/audience.js +1 -1
  94. package/lib/audience.js.map +1 -1
  95. package/lib/catchUpMonitor.js +1 -1
  96. package/lib/catchUpMonitor.js.map +1 -1
  97. package/lib/connectionManager.d.ts +1 -1
  98. package/lib/connectionManager.d.ts.map +1 -1
  99. package/lib/connectionManager.js +4 -4
  100. package/lib/connectionManager.js.map +1 -1
  101. package/lib/connectionStateHandler.d.ts.map +1 -1
  102. package/lib/connectionStateHandler.js +2 -2
  103. package/lib/connectionStateHandler.js.map +1 -1
  104. package/lib/container-loader-alpha.d.ts +11 -11
  105. package/lib/container-loader-beta.d.ts +11 -11
  106. package/lib/container-loader-public.d.ts +11 -11
  107. package/lib/container-loader-untrimmed.d.ts +11 -11
  108. package/lib/container.d.ts +5 -3
  109. package/lib/container.d.ts.map +1 -1
  110. package/lib/container.js +14 -12
  111. package/lib/container.js.map +1 -1
  112. package/lib/containerContext.d.ts +5 -3
  113. package/lib/containerContext.d.ts.map +1 -1
  114. package/lib/containerContext.js.map +1 -1
  115. package/lib/containerStorageAdapter.d.ts +2 -2
  116. package/lib/containerStorageAdapter.d.ts.map +1 -1
  117. package/lib/containerStorageAdapter.js +2 -2
  118. package/lib/containerStorageAdapter.js.map +1 -1
  119. package/lib/contracts.d.ts +3 -2
  120. package/lib/contracts.d.ts.map +1 -1
  121. package/lib/contracts.js +1 -1
  122. package/lib/contracts.js.map +1 -1
  123. package/lib/debugLogger.d.ts +2 -1
  124. package/lib/debugLogger.d.ts.map +1 -1
  125. package/lib/debugLogger.js +1 -1
  126. package/lib/debugLogger.js.map +1 -1
  127. package/lib/deltaManager.d.ts +7 -3
  128. package/lib/deltaManager.d.ts.map +1 -1
  129. package/lib/deltaManager.js +12 -9
  130. package/lib/deltaManager.js.map +1 -1
  131. package/lib/deltaQueue.js +1 -1
  132. package/lib/deltaQueue.js.map +1 -1
  133. package/lib/error.d.ts +3 -2
  134. package/lib/error.d.ts.map +1 -1
  135. package/lib/error.js +2 -2
  136. package/lib/error.js.map +1 -1
  137. package/lib/loader.d.ts +2 -2
  138. package/lib/loader.d.ts.map +1 -1
  139. package/lib/loader.js +2 -2
  140. package/lib/loader.js.map +1 -1
  141. package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts +1 -1
  142. package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
  143. package/lib/location-redirection-utilities/resolveWithLocationRedirection.js +2 -2
  144. package/lib/location-redirection-utilities/resolveWithLocationRedirection.js.map +1 -1
  145. package/lib/noopHeuristic.js +2 -2
  146. package/lib/noopHeuristic.js.map +1 -1
  147. package/lib/packageVersion.d.ts +1 -1
  148. package/lib/packageVersion.js +1 -1
  149. package/lib/packageVersion.js.map +1 -1
  150. package/lib/protocol.d.ts +1 -1
  151. package/lib/protocol.d.ts.map +1 -1
  152. package/lib/protocol.js +1 -1
  153. package/lib/protocol.js.map +1 -1
  154. package/lib/protocolTreeDocumentStorageService.d.ts +4 -4
  155. package/lib/protocolTreeDocumentStorageService.d.ts.map +1 -1
  156. package/lib/protocolTreeDocumentStorageService.js.map +1 -1
  157. package/lib/quorum.d.ts +1 -1
  158. package/lib/quorum.d.ts.map +1 -1
  159. package/lib/quorum.js.map +1 -1
  160. package/lib/retriableDocumentStorageService.d.ts +1 -1
  161. package/lib/retriableDocumentStorageService.d.ts.map +1 -1
  162. package/lib/retriableDocumentStorageService.js +3 -3
  163. package/lib/retriableDocumentStorageService.js.map +1 -1
  164. package/lib/serializedStateManager.d.ts +40 -9
  165. package/lib/serializedStateManager.d.ts.map +1 -1
  166. package/lib/serializedStateManager.js +127 -19
  167. package/lib/serializedStateManager.js.map +1 -1
  168. package/lib/tsdoc-metadata.json +11 -0
  169. package/lib/utils.d.ts +19 -3
  170. package/lib/utils.d.ts.map +1 -1
  171. package/lib/utils.js +44 -4
  172. package/lib/utils.js.map +1 -1
  173. package/package.json +19 -31
  174. package/src/attachment.ts +4 -3
  175. package/src/audience.ts +2 -2
  176. package/src/catchUpMonitor.ts +1 -1
  177. package/src/connectionManager.ts +7 -7
  178. package/src/connectionStateHandler.ts +4 -4
  179. package/src/container.ts +26 -22
  180. package/src/containerContext.ts +8 -5
  181. package/src/containerStorageAdapter.ts +5 -4
  182. package/src/contracts.ts +2 -3
  183. package/src/debugLogger.ts +2 -3
  184. package/src/deltaManager.ts +23 -13
  185. package/src/deltaQueue.ts +1 -1
  186. package/src/error.ts +5 -4
  187. package/src/loader.ts +5 -4
  188. package/src/location-redirection-utilities/resolveWithLocationRedirection.ts +3 -3
  189. package/src/noopHeuristic.ts +2 -2
  190. package/src/packageVersion.ts +1 -1
  191. package/src/protocol.ts +2 -2
  192. package/src/protocolTreeDocumentStorageService.ts +4 -1
  193. package/src/quorum.ts +1 -1
  194. package/src/retriableDocumentStorageService.ts +5 -4
  195. package/src/serializedStateManager.ts +188 -23
  196. package/src/utils.ts +56 -5
  197. package/lib/test/attachment.spec.js +0 -380
  198. package/lib/test/attachment.spec.js.map +0 -1
  199. package/lib/test/catchUpMonitor.spec.js +0 -88
  200. package/lib/test/catchUpMonitor.spec.js.map +0 -1
  201. package/lib/test/connectionManager.spec.js +0 -201
  202. package/lib/test/connectionManager.spec.js.map +0 -1
  203. package/lib/test/connectionStateHandler.spec.js +0 -555
  204. package/lib/test/connectionStateHandler.spec.js.map +0 -1
  205. package/lib/test/container.spec.js +0 -64
  206. package/lib/test/container.spec.js.map +0 -1
  207. package/lib/test/deltaManager.spec.js +0 -405
  208. package/lib/test/deltaManager.spec.js.map +0 -1
  209. package/lib/test/loader.spec.js +0 -212
  210. package/lib/test/loader.spec.js.map +0 -1
  211. package/lib/test/locationRedirectionTests.spec.js +0 -44
  212. package/lib/test/locationRedirectionTests.spec.js.map +0 -1
  213. package/lib/test/serializedStateManager.spec.js +0 -151
  214. package/lib/test/serializedStateManager.spec.js.map +0 -1
  215. package/lib/test/snapshotConversionTest.spec.js +0 -79
  216. package/lib/test/snapshotConversionTest.spec.js.map +0 -1
  217. package/lib/test/types/validateContainerLoaderPrevious.generated.js +0 -38
  218. package/lib/test/types/validateContainerLoaderPrevious.generated.js.map +0 -1
  219. package/lib/test/utils.spec.js +0 -96
  220. package/lib/test/utils.spec.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-loader",
3
- "version": "2.0.0-dev-rc.3.0.0.250606",
3
+ "version": "2.0.0-dev-rc.3.0.0.254274",
4
4
  "description": "Fluid container loader",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,15 +15,15 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": {
18
- "types": "./lib/index.d.ts",
18
+ "types": "./lib/container-loader-public.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
21
  "require": {
22
- "types": "./dist/index.d.ts",
22
+ "types": "./dist/container-loader-public.d.ts",
23
23
  "default": "./dist/index.js"
24
24
  }
25
25
  },
26
- "./test/container": {
26
+ "./internal/test/container": {
27
27
  "import": {
28
28
  "types": "./lib/container.d.ts",
29
29
  "default": "./lib/container.js"
@@ -33,7 +33,7 @@
33
33
  "default": "./dist/container.js"
34
34
  }
35
35
  },
36
- "./test/contracts": {
36
+ "./internal/test/contracts": {
37
37
  "import": {
38
38
  "types": "./lib/contracts.d.ts",
39
39
  "default": "./lib/contracts.js"
@@ -43,7 +43,7 @@
43
43
  "default": "./dist/contracts.js"
44
44
  }
45
45
  },
46
- "./test/connectionManager": {
46
+ "./internal/test/connectionManager": {
47
47
  "import": {
48
48
  "types": "./lib/connectionManager.d.ts",
49
49
  "default": "./lib/connectionManager.js"
@@ -53,7 +53,7 @@
53
53
  "default": "./dist/connectionManager.js"
54
54
  }
55
55
  },
56
- "./test/deltaManager": {
56
+ "./internal/test/deltaManager": {
57
57
  "import": {
58
58
  "types": "./lib/deltaManager.d.ts",
59
59
  "default": "./lib/deltaManager.js"
@@ -63,7 +63,7 @@
63
63
  "default": "./dist/deltaManager.js"
64
64
  }
65
65
  },
66
- "./test/utils": {
66
+ "./internal/test/utils": {
67
67
  "import": {
68
68
  "types": "./lib/utils.d.ts",
69
69
  "default": "./lib/utils.js"
@@ -73,16 +73,6 @@
73
73
  "default": "./dist/utils.js"
74
74
  }
75
75
  },
76
- "./public": {
77
- "import": {
78
- "types": "./lib/container-loader-public.d.ts",
79
- "default": "./lib/index.js"
80
- },
81
- "require": {
82
- "types": "./dist/container-loader-public.d.ts",
83
- "default": "./dist/index.js"
84
- }
85
- },
86
76
  "./alpha": {
87
77
  "import": {
88
78
  "types": "./lib/container-loader-alpha.d.ts",
@@ -105,7 +95,7 @@
105
95
  }
106
96
  },
107
97
  "main": "dist/index.js",
108
- "types": "dist/index.d.ts",
98
+ "types": "./dist/container-loader-public.d.ts",
109
99
  "c8": {
110
100
  "all": true,
111
101
  "cache-dir": "nyc/.cache",
@@ -127,25 +117,25 @@
127
117
  "temp-directory": "nyc/.nyc_output"
128
118
  },
129
119
  "dependencies": {
130
- "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.250606",
131
- "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.250606",
132
- "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.250606",
133
- "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.250606",
134
- "@fluidframework/driver-definitions": "2.0.0-dev-rc.3.0.0.250606",
135
- "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.250606",
120
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254274",
121
+ "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.254274",
122
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254274",
123
+ "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254274",
124
+ "@fluidframework/driver-definitions": "2.0.0-dev-rc.3.0.0.254274",
125
+ "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254274",
136
126
  "@fluidframework/protocol-base": "^4.0.0",
137
127
  "@fluidframework/protocol-definitions": "^3.2.0",
138
- "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.250606",
128
+ "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.254274",
139
129
  "@ungap/structured-clone": "^1.2.0",
140
130
  "debug": "^4.3.4",
141
131
  "double-ended-queue": "^2.1.0-0",
142
132
  "uuid": "^9.0.0"
143
133
  },
144
134
  "devDependencies": {
145
- "@arethetypeswrong/cli": "^0.13.3",
135
+ "@arethetypeswrong/cli": "^0.15.2",
146
136
  "@biomejs/biome": "^1.6.2",
147
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.250606",
148
- "@fluid-private/test-loader-utils": "2.0.0-dev-rc.3.0.0.250606",
137
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254274",
138
+ "@fluid-private/test-loader-utils": "2.0.0-dev-rc.3.0.0.254274",
149
139
  "@fluid-tools/build-cli": "^0.34.0",
150
140
  "@fluidframework/build-common": "^2.0.3",
151
141
  "@fluidframework/build-tools": "^0.34.0",
@@ -208,7 +198,6 @@
208
198
  "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
209
199
  "build:test:esm": "tsc --project ./src/test/tsconfig.json",
210
200
  "check:are-the-types-wrong": "attw --pack . --entrypoints .",
211
- "check:biome": "biome check .",
212
201
  "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
213
202
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
214
203
  "ci:build:docs": "api-extractor run",
@@ -216,7 +205,6 @@
216
205
  "eslint": "eslint --format stylish src",
217
206
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
218
207
  "format": "fluid-build --task format .",
219
- "format:biome": "biome check --apply .",
220
208
  "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
221
209
  "lint": "fluid-build . --task lint",
222
210
  "lint:fix": "fluid-build . --task eslint:fix --task format",
package/src/attachment.ts CHANGED
@@ -4,10 +4,11 @@
4
4
  */
5
5
 
6
6
  import { AttachState } from "@fluidframework/container-definitions";
7
- import { assert } from "@fluidframework/core-utils";
8
- import { IDocumentStorageService } from "@fluidframework/driver-definitions";
9
- import { CombinedAppAndProtocolSummary } from "@fluidframework/driver-utils";
7
+ import { assert } from "@fluidframework/core-utils/internal";
8
+ import { IDocumentStorageService } from "@fluidframework/driver-definitions/internal";
9
+ import { CombinedAppAndProtocolSummary } from "@fluidframework/driver-utils/internal";
10
10
  import { ISummaryTree } from "@fluidframework/protocol-definitions";
11
+
11
12
  import { IDetachedBlobStorage } from "./loader.js";
12
13
  import type { SnapshotWithBlobs } from "./serializedStateManager.js";
13
14
  import { getSnapshotTreeAndBlobsFromSerializedContainer } from "./utils.js";
package/src/audience.ts CHANGED
@@ -4,8 +4,8 @@
4
4
  */
5
5
 
6
6
  import { EventEmitter } from "@fluid-internal/client-utils";
7
- import { IAudienceOwner } from "@fluidframework/container-definitions";
8
- import { assert } from "@fluidframework/core-utils";
7
+ import { IAudienceOwner } from "@fluidframework/container-definitions/internal";
8
+ import { assert } from "@fluidframework/core-utils/internal";
9
9
  import { IClient } from "@fluidframework/protocol-definitions";
10
10
 
11
11
  /**
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { IDeltaManager } from "@fluidframework/container-definitions";
7
7
  import { IDisposable } from "@fluidframework/core-interfaces";
8
- import { assert } from "@fluidframework/core-utils";
8
+ import { assert } from "@fluidframework/core-utils/internal";
9
9
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
10
10
 
11
11
  /** @see CatchUpMonitor for usage */
@@ -10,14 +10,13 @@ import {
10
10
  ReadOnlyInfo,
11
11
  } from "@fluidframework/container-definitions";
12
12
  import { IDisposable, ITelemetryBaseProperties, LogLevel } from "@fluidframework/core-interfaces";
13
- import { assert } from "@fluidframework/core-utils";
13
+ import { assert } from "@fluidframework/core-utils/internal";
14
+ import { DriverErrorTypes, IAnyDriverError } from "@fluidframework/driver-definitions";
14
15
  import {
15
- DriverErrorTypes,
16
- IAnyDriverError,
17
16
  IDocumentDeltaConnection,
18
17
  IDocumentDeltaConnectionEvents,
19
18
  IDocumentService,
20
- } from "@fluidframework/driver-definitions";
19
+ } from "@fluidframework/driver-definitions/internal";
21
20
  import {
22
21
  calculateMaxWaitTime,
23
22
  canRetryOnError,
@@ -26,7 +25,7 @@ import {
26
25
  getRetryDelayFromError,
27
26
  isRuntimeMessage,
28
27
  logNetworkFailure,
29
- } from "@fluidframework/driver-utils";
28
+ } from "@fluidframework/driver-utils/internal";
30
29
  import {
31
30
  ConnectionMode,
32
31
  IClient,
@@ -43,14 +42,15 @@ import {
43
42
  MessageType,
44
43
  ScopeType,
45
44
  } from "@fluidframework/protocol-definitions";
45
+ import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
46
46
  import {
47
47
  GenericError,
48
- ITelemetryLoggerExt,
49
48
  UsageError,
50
49
  formatTick,
51
50
  isFluidError,
52
51
  normalizeError,
53
- } from "@fluidframework/telemetry-utils";
52
+ } from "@fluidframework/telemetry-utils/internal";
53
+
54
54
  import {
55
55
  IConnectionDetailsInternal,
56
56
  IConnectionManager,
@@ -5,15 +5,15 @@
5
5
 
6
6
  import { IDeltaManager } from "@fluidframework/container-definitions";
7
7
  import { ITelemetryBaseProperties } from "@fluidframework/core-interfaces";
8
- import { assert, Timer } from "@fluidframework/core-utils";
8
+ import { assert, Timer } from "@fluidframework/core-utils/internal";
9
9
  import { IAnyDriverError } from "@fluidframework/driver-definitions";
10
10
  import { IClient, ISequencedClient } from "@fluidframework/protocol-definitions";
11
+ import { ITelemetryLoggerExt, type TelemetryEventCategory } from "@fluidframework/telemetry-utils";
11
12
  import {
12
- ITelemetryLoggerExt,
13
13
  PerformanceEvent,
14
- type TelemetryEventCategory,
15
14
  loggerToMonitoringContext,
16
- } from "@fluidframework/telemetry-utils";
15
+ } from "@fluidframework/telemetry-utils/internal";
16
+
17
17
  import { CatchUpMonitor, ICatchUpMonitor } from "./catchUpMonitor.js";
18
18
  import { ConnectionState } from "./connectionState.js";
19
19
  import { IConnectionDetailsInternal, IConnectionStateChangeReason } from "./contracts.js";
package/src/container.ts CHANGED
@@ -6,15 +6,18 @@
6
6
  import { TypedEventEmitter, performance } from "@fluid-internal/client-utils";
7
7
  import {
8
8
  AttachState,
9
- ContainerWarning,
10
9
  IAudience,
10
+ ICriticalContainerError,
11
+ IDeltaManager,
12
+ ReadOnlyInfo,
13
+ } from "@fluidframework/container-definitions";
14
+ import {
15
+ ContainerWarning,
11
16
  IBatchMessage,
12
17
  ICodeDetailsLoader,
13
18
  IContainer,
14
19
  IContainerEvents,
15
20
  IContainerLoadMode,
16
- ICriticalContainerError,
17
- IDeltaManager,
18
21
  IFluidCodeDetails,
19
22
  IFluidCodeDetailsComparer,
20
23
  IFluidModuleWithDetails,
@@ -23,18 +26,17 @@ import {
23
26
  IProvideFluidCodeDetailsComparer,
24
27
  IProvideRuntimeFactory,
25
28
  IRuntime,
26
- ReadOnlyInfo,
27
29
  isFluidCodeDetails,
28
- } from "@fluidframework/container-definitions";
30
+ } from "@fluidframework/container-definitions/internal";
29
31
  import {
30
32
  FluidObject,
31
33
  IEvent,
32
34
  IRequest,
33
- type ISignalEnvelope,
34
35
  ITelemetryBaseProperties,
35
36
  LogLevel,
36
37
  } from "@fluidframework/core-interfaces";
37
- import { assert, isPromiseLike, unreachableCase } from "@fluidframework/core-utils";
38
+ import { type ISignalEnvelope } from "@fluidframework/core-interfaces/internal";
39
+ import { assert, isPromiseLike, unreachableCase } from "@fluidframework/core-utils/internal";
38
40
  import {
39
41
  IDocumentService,
40
42
  IDocumentServiceFactory,
@@ -43,7 +45,7 @@ import {
43
45
  ISnapshot,
44
46
  IThrottlingWarning,
45
47
  IUrlResolver,
46
- } from "@fluidframework/driver-definitions";
48
+ } from "@fluidframework/driver-definitions/internal";
47
49
  import {
48
50
  MessageType2,
49
51
  OnlineStatus,
@@ -52,7 +54,7 @@ import {
52
54
  isOnline,
53
55
  readAndParse,
54
56
  runWithRetry,
55
- } from "@fluidframework/driver-utils";
57
+ } from "@fluidframework/driver-utils/internal";
56
58
  import { IQuorumSnapshot } from "@fluidframework/protocol-base";
57
59
  import {
58
60
  IClient,
@@ -73,14 +75,13 @@ import {
73
75
  MessageType,
74
76
  SummaryType,
75
77
  } from "@fluidframework/protocol-definitions";
78
+ import { ITelemetryLoggerExt, type TelemetryEventCategory } from "@fluidframework/telemetry-utils";
76
79
  import {
77
80
  EventEmitterWithErrorHandling,
78
81
  GenericError,
79
82
  IFluidErrorBase,
80
- ITelemetryLoggerExt,
81
83
  MonitoringContext,
82
84
  PerformanceEvent,
83
- type TelemetryEventCategory,
84
85
  UsageError,
85
86
  connectedEventName,
86
87
  createChildLogger,
@@ -89,9 +90,10 @@ import {
89
90
  normalizeError,
90
91
  raiseConnectedEvent,
91
92
  wrapError,
92
- } from "@fluidframework/telemetry-utils";
93
+ } from "@fluidframework/telemetry-utils/internal";
93
94
  import structuredClone from "@ungap/structured-clone";
94
95
  import { v4 as uuid } from "uuid";
96
+
95
97
  import { AttachProcessProps, AttachmentData, runRetriableAttachProcess } from "./attachment.js";
96
98
  import { Audience } from "./audience.js";
97
99
  import { ConnectionManager } from "./connectionManager.js";
@@ -1279,8 +1281,8 @@ export class Container
1279
1281
  throw normalizeErrorAndClose(error);
1280
1282
  });
1281
1283
  }
1282
-
1283
- this.serializedStateManager.setSnapshot(await attachP);
1284
+ const snapshotWithBlobs = await attachP;
1285
+ this.serializedStateManager.setInitialSnapshot(snapshotWithBlobs);
1284
1286
  if (!this.closed) {
1285
1287
  this.handleDeltaConnectionArg(
1286
1288
  {
@@ -1559,11 +1561,9 @@ export class Container
1559
1561
  );
1560
1562
 
1561
1563
  // If we saved ops, we will replay them and don't need DeltaManager to fetch them
1562
- const sequenceNumber =
1563
- pendingLocalState?.savedOps[pendingLocalState.savedOps.length - 1]?.sequenceNumber;
1564
- const dmAttributes =
1565
- sequenceNumber !== undefined ? { ...attributes, sequenceNumber } : attributes;
1566
-
1564
+ const lastProcessedSequenceNumber =
1565
+ pendingLocalState?.savedOps[pendingLocalState.savedOps.length - 1]?.sequenceNumber ??
1566
+ attributes.sequenceNumber;
1567
1567
  let opsBeforeReturnP: Promise<void> | undefined;
1568
1568
 
1569
1569
  if (loadMode.pauseAfterLoad === true) {
@@ -1576,7 +1576,7 @@ export class Container
1576
1576
  // Note: It is possible that we think the latest snapshot is newer than the specified sequence number
1577
1577
  // due to saved ops that may be replayed after the snapshot.
1578
1578
  // https://dev.azure.com/fluidframework/internal/_workitems/edit/5055
1579
- if (dmAttributes.sequenceNumber > loadToSequenceNumber) {
1579
+ if (lastProcessedSequenceNumber > loadToSequenceNumber) {
1580
1580
  throw new Error(
1581
1581
  "Cannot satisfy request to pause the container at the specified sequence number. Most recent snapshot is newer than the specified sequence number.",
1582
1582
  );
@@ -1624,16 +1624,18 @@ export class Container
1624
1624
  // Start prefetch, but not set opsBeforeReturnP - boot is not blocked by it!
1625
1625
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
1626
1626
  this.attachDeltaManagerOpHandler(
1627
- dmAttributes,
1627
+ attributes,
1628
1628
  loadMode.deltaConnection !== "none" ? "all" : "none",
1629
+ lastProcessedSequenceNumber,
1629
1630
  );
1630
1631
  break;
1631
1632
  case "sequenceNumber":
1632
1633
  case "cached":
1633
1634
  case "all":
1634
1635
  opsBeforeReturnP = this.attachDeltaManagerOpHandler(
1635
- dmAttributes,
1636
+ attributes,
1636
1637
  loadMode.opsBeforeReturn,
1638
+ lastProcessedSequenceNumber,
1637
1639
  );
1638
1640
  break;
1639
1641
  default:
@@ -2054,6 +2056,7 @@ export class Container
2054
2056
  private async attachDeltaManagerOpHandler(
2055
2057
  attributes: IDocumentAttributes,
2056
2058
  prefetchType?: "sequenceNumber" | "cached" | "all" | "none",
2059
+ lastProcessedSequenceNumber?: number,
2057
2060
  ) {
2058
2061
  return this._deltaManager.attachOpHandler(
2059
2062
  attributes.minimumSequenceNumber,
@@ -2065,6 +2068,7 @@ export class Container
2065
2068
  },
2066
2069
  },
2067
2070
  prefetchType,
2071
+ lastProcessedSequenceNumber,
2068
2072
  );
2069
2073
  }
2070
2074
 
@@ -6,15 +6,18 @@
6
6
  import {
7
7
  AttachState,
8
8
  IAudience,
9
- IBatchMessage,
10
- IContainerContext,
11
9
  ICriticalContainerError,
12
10
  IDeltaManager,
11
+ } from "@fluidframework/container-definitions";
12
+ import {
13
+ IBatchMessage,
14
+ IContainerContext,
13
15
  ILoader,
14
16
  ILoaderOptions,
15
- } from "@fluidframework/container-definitions";
16
- import { type FluidObject, type ISignalEnvelope } from "@fluidframework/core-interfaces";
17
- import { IDocumentStorageService, ISnapshot } from "@fluidframework/driver-definitions";
17
+ } from "@fluidframework/container-definitions/internal";
18
+ import { type FluidObject } from "@fluidframework/core-interfaces";
19
+ import { type ISignalEnvelope } from "@fluidframework/core-interfaces/internal";
20
+ import { IDocumentStorageService, ISnapshot } from "@fluidframework/driver-definitions/internal";
18
21
  import {
19
22
  IClientDetails,
20
23
  IDocumentMessage,
@@ -4,9 +4,9 @@
4
4
  */
5
5
 
6
6
  import { bufferToString, stringToBuffer } from "@fluid-internal/client-utils";
7
- import { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions";
7
+ import { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions/internal";
8
8
  import { IDisposable } from "@fluidframework/core-interfaces";
9
- import { assert } from "@fluidframework/core-utils";
9
+ import { assert } from "@fluidframework/core-utils/internal";
10
10
  import {
11
11
  FetchSource,
12
12
  IDocumentService,
@@ -15,8 +15,8 @@ import {
15
15
  ISnapshot,
16
16
  ISnapshotFetchOptions,
17
17
  ISummaryContext,
18
- } from "@fluidframework/driver-definitions";
19
- import { UsageError } from "@fluidframework/driver-utils";
18
+ } from "@fluidframework/driver-definitions/internal";
19
+ import { UsageError } from "@fluidframework/driver-utils/internal";
20
20
  import {
21
21
  ICreateBlobResponse,
22
22
  ISnapshotTree,
@@ -25,6 +25,7 @@ import {
25
25
  IVersion,
26
26
  } from "@fluidframework/protocol-definitions";
27
27
  import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
28
+
28
29
  import { IDetachedBlobStorage } from "./loader.js";
29
30
  import { ProtocolTreeStorageService } from "./protocolTreeDocumentStorageService.js";
30
31
  import { RetriableDocumentStorageService } from "./retriableDocumentStorageService.js";
package/src/contracts.ts CHANGED
@@ -7,12 +7,11 @@ import {
7
7
  IConnectionDetails,
8
8
  ICriticalContainerError,
9
9
  IDeltaQueue,
10
- IFluidCodeDetails,
11
10
  ReadOnlyInfo,
12
- isFluidPackage,
13
11
  } from "@fluidframework/container-definitions";
12
+ import { IFluidCodeDetails, isFluidPackage } from "@fluidframework/container-definitions/internal";
14
13
  import { IErrorBase, ITelemetryBaseProperties } from "@fluidframework/core-interfaces";
15
- import { IContainerPackageInfo } from "@fluidframework/driver-definitions";
14
+ import { IContainerPackageInfo } from "@fluidframework/driver-definitions/internal";
16
15
  import {
17
16
  ConnectionMode,
18
17
  IClientConfiguration,
@@ -9,14 +9,13 @@ import {
9
9
  ITelemetryBaseLogger,
10
10
  ITelemetryBaseProperties,
11
11
  } from "@fluidframework/core-interfaces";
12
-
12
+ import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
13
13
  import {
14
- ITelemetryLoggerExt,
15
14
  ITelemetryLoggerPropertyBags,
16
15
  createMultiSinkLogger,
17
16
  eventNamespaceSeparator,
18
17
  formatTick,
19
- } from "@fluidframework/telemetry-utils";
18
+ } from "@fluidframework/telemetry-utils/internal";
20
19
 
21
20
  // This import style is necessary to ensure the emitted JS code works in both CJS and ESM.
22
21
  import debugPkg from "debug";
@@ -14,15 +14,19 @@ import {
14
14
  IEventProvider,
15
15
  type ITelemetryBaseEvent,
16
16
  ITelemetryBaseProperties,
17
- IThrottlingWarning,
18
17
  } from "@fluidframework/core-interfaces";
19
- import { assert } from "@fluidframework/core-utils";
18
+ import { IThrottlingWarning } from "@fluidframework/core-interfaces/internal";
19
+ import { assert } from "@fluidframework/core-utils/internal";
20
+ import { DriverErrorTypes } from "@fluidframework/driver-definitions";
20
21
  import {
21
- DriverErrorTypes,
22
22
  IDocumentDeltaStorageService,
23
23
  IDocumentService,
24
- } from "@fluidframework/driver-definitions";
25
- import { MessageType2, NonRetryableError, isRuntimeMessage } from "@fluidframework/driver-utils";
24
+ } from "@fluidframework/driver-definitions/internal";
25
+ import {
26
+ MessageType2,
27
+ NonRetryableError,
28
+ isRuntimeMessage,
29
+ } from "@fluidframework/driver-utils/internal";
26
30
  import {
27
31
  ConnectionMode,
28
32
  IDocumentMessage,
@@ -31,17 +35,19 @@ import {
31
35
  MessageType,
32
36
  } from "@fluidframework/protocol-definitions";
33
37
  import {
34
- DataCorruptionError,
35
- DataProcessingError,
36
38
  type ITelemetryErrorEventExt,
37
39
  type ITelemetryGenericEventExt,
38
40
  ITelemetryLoggerExt,
41
+ } from "@fluidframework/telemetry-utils";
42
+ import {
43
+ DataCorruptionError,
44
+ DataProcessingError,
39
45
  UsageError,
40
46
  extractSafePropertiesFromMessage,
41
47
  isFluidError,
42
48
  normalizeError,
43
49
  safeRaiseEvent,
44
- } from "@fluidframework/telemetry-utils";
50
+ } from "@fluidframework/telemetry-utils/internal";
45
51
  import { v4 as uuid } from "uuid";
46
52
 
47
53
  import {
@@ -536,18 +542,22 @@ export class DeltaManager<TConnectionManager extends IConnectionManager>
536
542
 
537
543
  /**
538
544
  * Sets the sequence number from which inbound messages should be returned
545
+ * @param snapshotSequenceNumber - The sequence number of the snapshot at which the document loaded from.
546
+ * @param lastProcessedSequenceNumber - The last processed sequence number, for offline, it should be greater than the sequence number.
547
+ * Setting lastProcessedSequenceNumber allows the DeltaManager to skip downloading and processing ops that have already been processed.
539
548
  */
540
549
  public async attachOpHandler(
541
550
  minSequenceNumber: number,
542
- sequenceNumber: number,
551
+ snapshotSequenceNumber: number,
543
552
  handler: IDeltaHandlerStrategy,
544
553
  prefetchType: "sequenceNumber" | "cached" | "all" | "none" = "none",
554
+ lastProcessedSequenceNumber: number = snapshotSequenceNumber,
545
555
  ) {
546
- this.initSequenceNumber = sequenceNumber;
547
- this.lastProcessedSequenceNumber = sequenceNumber;
556
+ this.initSequenceNumber = snapshotSequenceNumber;
557
+ this.lastProcessedSequenceNumber = lastProcessedSequenceNumber;
548
558
  this.minSequenceNumber = minSequenceNumber;
549
- this.lastQueuedSequenceNumber = sequenceNumber;
550
- this.lastObservedSeqNumber = sequenceNumber;
559
+ this.lastQueuedSequenceNumber = lastProcessedSequenceNumber;
560
+ this.lastObservedSeqNumber = lastProcessedSequenceNumber;
551
561
 
552
562
  // We will use same check in other places to make sure all the seq number above are set properly.
553
563
  assert(
package/src/deltaQueue.ts CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { TypedEventEmitter, performance } from "@fluid-internal/client-utils";
7
7
  import { IDeltaQueue, IDeltaQueueEvents } from "@fluidframework/container-definitions";
8
- import { assert } from "@fluidframework/core-utils";
8
+ import { assert } from "@fluidframework/core-utils/internal";
9
9
  import Deque from "double-ended-queue";
10
10
 
11
11
  export interface IDeltaQueueWriter<T> {
package/src/error.ts CHANGED
@@ -3,14 +3,15 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { ContainerErrorTypes } from "@fluidframework/container-definitions";
7
- import { ITelemetryBaseProperties, IThrottlingWarning } from "@fluidframework/core-interfaces";
6
+ import { ContainerErrorTypes } from "@fluidframework/container-definitions/internal";
7
+ import { ITelemetryBaseProperties } from "@fluidframework/core-interfaces";
8
+ import { IThrottlingWarning } from "@fluidframework/core-interfaces/internal";
9
+ import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
8
10
  import {
9
11
  IFluidErrorBase,
10
- ITelemetryLoggerExt,
11
12
  LoggingError,
12
13
  wrapErrorAndLog,
13
- } from "@fluidframework/telemetry-utils";
14
+ } from "@fluidframework/telemetry-utils/internal";
14
15
 
15
16
  /**
16
17
  * Warning emitted when requests to storage are being throttled.
package/src/loader.ts CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  ILoaderOptions as ILoaderOptions1,
13
13
  IProvideFluidCodeDetailsComparer,
14
14
  LoaderHeader,
15
- } from "@fluidframework/container-definitions";
15
+ } from "@fluidframework/container-definitions/internal";
16
16
  import {
17
17
  FluidObject,
18
18
  IConfigProviderBase,
@@ -24,18 +24,19 @@ import {
24
24
  IDocumentStorageService,
25
25
  IResolvedUrl,
26
26
  IUrlResolver,
27
- } from "@fluidframework/driver-definitions";
27
+ } from "@fluidframework/driver-definitions/internal";
28
28
  import { IClientDetails } from "@fluidframework/protocol-definitions";
29
+ import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
29
30
  import {
30
- ITelemetryLoggerExt,
31
31
  MonitoringContext,
32
32
  PerformanceEvent,
33
33
  UsageError,
34
34
  createChildMonitoringContext,
35
35
  mixinMonitoringContext,
36
36
  sessionStorageConfigProvider,
37
- } from "@fluidframework/telemetry-utils";
37
+ } from "@fluidframework/telemetry-utils/internal";
38
38
  import { v4 as uuid } from "uuid";
39
+
39
40
  import { Container } from "./container.js";
40
41
  import { DebugLogger } from "./debugLogger.js";
41
42
  import { pkgVersion } from "./packageVersion.js";
@@ -4,12 +4,12 @@
4
4
  */
5
5
 
6
6
  import { IRequest, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
7
+ import { DriverErrorTypes } from "@fluidframework/driver-definitions";
7
8
  import {
8
- DriverErrorTypes,
9
9
  ILocationRedirectionError,
10
10
  IUrlResolver,
11
- } from "@fluidframework/driver-definitions";
12
- import { createChildLogger } from "@fluidframework/telemetry-utils";
11
+ } from "@fluidframework/driver-definitions/internal";
12
+ import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
13
13
 
14
14
  /**
15
15
  * Checks if the error is location redirection error.
@@ -5,8 +5,8 @@
5
5
 
6
6
  import { TypedEventEmitter } from "@fluid-internal/client-utils";
7
7
  import { IEvent } from "@fluidframework/core-interfaces";
8
- import { assert, Timer } from "@fluidframework/core-utils";
9
- import { isRuntimeMessage } from "@fluidframework/driver-utils";
8
+ import { assert, Timer } from "@fluidframework/core-utils/internal";
9
+ import { isRuntimeMessage } from "@fluidframework/driver-utils/internal";
10
10
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
11
11
 
12
12
  const defaultNoopTimeFrequency = 2000;
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-loader";
9
- export const pkgVersion = "2.0.0-dev-rc.3.0.0.250606";
9
+ export const pkgVersion = "2.0.0-dev-rc.3.0.0.254274";