@fluidframework/routerlicious-driver 2.0.0-internal.8.0.0 → 2.0.0-rc.1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +0 -6
  3. package/api-extractor-esm.json +4 -0
  4. package/api-extractor-lint.json +1 -10
  5. package/api-extractor.json +1 -9
  6. package/api-report/routerlicious-driver.api.md +2 -2
  7. package/dist/{cache.cjs → cache.js} +2 -2
  8. package/dist/cache.js.map +1 -0
  9. package/dist/{policies.cjs → contracts.js} +1 -1
  10. package/dist/contracts.js.map +1 -0
  11. package/dist/{createNewUtils.cjs → createNewUtils.js} +1 -1
  12. package/dist/createNewUtils.js.map +1 -0
  13. package/dist/{defaultTokenProvider.cjs → defaultTokenProvider.js} +1 -1
  14. package/dist/defaultTokenProvider.js.map +1 -0
  15. package/dist/{definitions.cjs → definitions.js} +1 -1
  16. package/dist/definitions.js.map +1 -0
  17. package/dist/{deltaStorageService.cjs → deltaStorageService.js} +1 -1
  18. package/dist/deltaStorageService.js.map +1 -0
  19. package/dist/{documentDeltaConnection.cjs → documentDeltaConnection.js} +3 -3
  20. package/dist/documentDeltaConnection.js.map +1 -0
  21. package/dist/{documentService.cjs → documentService.js} +9 -9
  22. package/dist/documentService.js.map +1 -0
  23. package/dist/{documentServiceFactory.cjs → documentServiceFactory.js} +6 -6
  24. package/dist/documentServiceFactory.js.map +1 -0
  25. package/dist/{documentStorageService.cjs → documentStorageService.js} +3 -3
  26. package/dist/documentStorageService.js.map +1 -0
  27. package/dist/errorUtils.d.ts +0 -7
  28. package/dist/errorUtils.d.ts.map +1 -1
  29. package/dist/{errorUtils.cjs → errorUtils.js} +2 -2
  30. package/dist/errorUtils.js.map +1 -0
  31. package/dist/{gitManager.cjs → gitManager.js} +1 -1
  32. package/dist/gitManager.js.map +1 -0
  33. package/dist/{historian.cjs → historian.js} +1 -1
  34. package/dist/historian.js.map +1 -0
  35. package/dist/{index.cjs → index.js} +4 -4
  36. package/dist/index.js.map +1 -0
  37. package/dist/{mapWithExpiration.cjs → mapWithExpiration.js} +1 -1
  38. package/dist/mapWithExpiration.js.map +1 -0
  39. package/dist/{nullBlobStorageService.cjs → nullBlobStorageService.js} +1 -1
  40. package/dist/nullBlobStorageService.js.map +1 -0
  41. package/dist/packageVersion.d.ts +1 -1
  42. package/dist/packageVersion.d.ts.map +1 -1
  43. package/dist/{packageVersion.cjs → packageVersion.js} +2 -2
  44. package/dist/packageVersion.js.map +1 -0
  45. package/dist/{contracts.cjs → policies.js} +1 -1
  46. package/dist/policies.js.map +1 -0
  47. package/dist/{r11sSnapshotParser.cjs → r11sSnapshotParser.js} +1 -1
  48. package/dist/r11sSnapshotParser.js.map +1 -0
  49. package/dist/restWrapper.d.ts.map +1 -1
  50. package/dist/{restWrapper.cjs → restWrapper.js} +4 -4
  51. package/dist/restWrapper.js.map +1 -0
  52. package/dist/{restWrapperBase.cjs → restWrapperBase.js} +1 -1
  53. package/dist/restWrapperBase.js.map +1 -0
  54. package/dist/{retriableGitManager.cjs → retriableGitManager.js} +1 -1
  55. package/dist/retriableGitManager.js.map +1 -0
  56. package/dist/routerlicious-driver-alpha.d.ts +2 -2
  57. package/dist/routerlicious-driver-beta.d.ts +67 -4
  58. package/dist/routerlicious-driver-public.d.ts +67 -4
  59. package/dist/routerlicious-driver-untrimmed.d.ts +2 -9
  60. package/dist/{shreddedSummaryDocumentStorageService.cjs → shreddedSummaryDocumentStorageService.js} +4 -4
  61. package/dist/shreddedSummaryDocumentStorageService.js.map +1 -0
  62. package/dist/storageContracts.js +7 -0
  63. package/dist/storageContracts.js.map +1 -0
  64. package/dist/{summaryTreeUploadManager.cjs → summaryTreeUploadManager.js} +1 -1
  65. package/dist/summaryTreeUploadManager.js.map +1 -0
  66. package/dist/tokens.d.ts +2 -2
  67. package/dist/{tokens.cjs → tokens.js} +1 -1
  68. package/dist/tokens.js.map +1 -0
  69. package/dist/{treeUtils.cjs → treeUtils.js} +1 -1
  70. package/dist/treeUtils.js.map +1 -0
  71. package/dist/{urlUtils.cjs → urlUtils.js} +1 -1
  72. package/dist/urlUtils.js.map +1 -0
  73. package/dist/{wholeSummaryDocumentStorageService.cjs → wholeSummaryDocumentStorageService.js} +5 -5
  74. package/dist/wholeSummaryDocumentStorageService.js.map +1 -0
  75. package/dist/{wholeSummaryUploadManager.cjs → wholeSummaryUploadManager.js} +1 -1
  76. package/dist/wholeSummaryUploadManager.js.map +1 -0
  77. package/lib/{cache.d.ts → cache.d.mts} +1 -1
  78. package/lib/cache.d.mts.map +1 -0
  79. package/lib/{contracts.d.ts → contracts.d.mts} +1 -1
  80. package/lib/contracts.d.mts.map +1 -0
  81. package/lib/{createNewUtils.d.ts → createNewUtils.d.mts} +1 -1
  82. package/lib/createNewUtils.d.mts.map +1 -0
  83. package/lib/{defaultTokenProvider.d.ts → defaultTokenProvider.d.mts} +1 -1
  84. package/lib/defaultTokenProvider.d.mts.map +1 -0
  85. package/lib/{definitions.d.ts → definitions.d.mts} +1 -1
  86. package/lib/definitions.d.mts.map +1 -0
  87. package/lib/{deltaStorageService.d.ts → deltaStorageService.d.mts} +1 -1
  88. package/lib/deltaStorageService.d.mts.map +1 -0
  89. package/lib/{documentDeltaConnection.d.ts → documentDeltaConnection.d.mts} +1 -1
  90. package/lib/documentDeltaConnection.d.mts.map +1 -0
  91. package/lib/{documentService.d.ts → documentService.d.mts} +1 -1
  92. package/lib/documentService.d.mts.map +1 -0
  93. package/lib/{documentServiceFactory.d.ts → documentServiceFactory.d.mts} +1 -1
  94. package/lib/documentServiceFactory.d.mts.map +1 -0
  95. package/lib/{documentStorageService.d.ts → documentStorageService.d.mts} +1 -1
  96. package/lib/documentStorageService.d.mts.map +1 -0
  97. package/lib/{errorUtils.d.ts → errorUtils.d.mts} +1 -8
  98. package/lib/errorUtils.d.mts.map +1 -0
  99. package/lib/{gitManager.d.ts → gitManager.d.mts} +1 -1
  100. package/lib/gitManager.d.mts.map +1 -0
  101. package/lib/{historian.d.ts → historian.d.mts} +1 -1
  102. package/lib/historian.d.mts.map +1 -0
  103. package/lib/{index.d.ts → index.d.mts} +1 -1
  104. package/lib/index.d.mts.map +1 -0
  105. package/lib/{mapWithExpiration.d.ts → mapWithExpiration.d.mts} +1 -1
  106. package/lib/mapWithExpiration.d.mts.map +1 -0
  107. package/lib/{nullBlobStorageService.d.ts → nullBlobStorageService.d.mts} +1 -1
  108. package/lib/nullBlobStorageService.d.mts.map +1 -0
  109. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +2 -2
  110. package/lib/packageVersion.d.mts.map +1 -0
  111. package/lib/packageVersion.mjs +1 -1
  112. package/lib/packageVersion.mjs.map +1 -1
  113. package/lib/{policies.d.ts → policies.d.mts} +1 -1
  114. package/lib/policies.d.mts.map +1 -0
  115. package/lib/{r11sSnapshotParser.d.ts → r11sSnapshotParser.d.mts} +1 -1
  116. package/lib/r11sSnapshotParser.d.mts.map +1 -0
  117. package/lib/{restWrapper.d.ts → restWrapper.d.mts} +1 -1
  118. package/lib/restWrapper.d.mts.map +1 -0
  119. package/lib/restWrapper.mjs.map +1 -1
  120. package/lib/{restWrapperBase.d.ts → restWrapperBase.d.mts} +1 -1
  121. package/lib/restWrapperBase.d.mts.map +1 -0
  122. package/lib/{retriableGitManager.d.ts → retriableGitManager.d.mts} +1 -1
  123. package/lib/retriableGitManager.d.mts.map +1 -0
  124. package/lib/{routerlicious-driver-alpha.d.ts → routerlicious-driver-alpha.d.mts} +2 -2
  125. package/lib/routerlicious-driver-beta.d.mts +98 -0
  126. package/lib/routerlicious-driver-public.d.mts +98 -0
  127. package/lib/{routerlicious-driver-untrimmed.d.ts → routerlicious-driver-untrimmed.d.mts} +2 -9
  128. package/lib/{shreddedSummaryDocumentStorageService.d.ts → shreddedSummaryDocumentStorageService.d.mts} +1 -1
  129. package/lib/shreddedSummaryDocumentStorageService.d.mts.map +1 -0
  130. package/lib/{storageContracts.d.ts → storageContracts.d.mts} +1 -1
  131. package/lib/storageContracts.d.mts.map +1 -0
  132. package/lib/{summaryTreeUploadManager.d.ts → summaryTreeUploadManager.d.mts} +1 -1
  133. package/lib/summaryTreeUploadManager.d.mts.map +1 -0
  134. package/lib/{tokens.d.ts → tokens.d.mts} +3 -3
  135. package/lib/tokens.d.mts.map +1 -0
  136. package/lib/tokens.mjs.map +1 -1
  137. package/lib/{treeUtils.d.ts → treeUtils.d.mts} +1 -1
  138. package/lib/treeUtils.d.mts.map +1 -0
  139. package/lib/{urlUtils.d.ts → urlUtils.d.mts} +1 -1
  140. package/lib/urlUtils.d.mts.map +1 -0
  141. package/lib/{wholeSummaryDocumentStorageService.d.ts → wholeSummaryDocumentStorageService.d.mts} +1 -1
  142. package/lib/wholeSummaryDocumentStorageService.d.mts.map +1 -0
  143. package/lib/{wholeSummaryUploadManager.d.ts → wholeSummaryUploadManager.d.mts} +1 -1
  144. package/lib/wholeSummaryUploadManager.d.mts.map +1 -0
  145. package/package.json +80 -28
  146. package/src/packageVersion.ts +1 -1
  147. package/src/restWrapper.ts +4 -4
  148. package/src/tokens.ts +2 -2
  149. package/dist/cache.cjs.map +0 -1
  150. package/dist/contracts.cjs.map +0 -1
  151. package/dist/createNewUtils.cjs.map +0 -1
  152. package/dist/defaultTokenProvider.cjs.map +0 -1
  153. package/dist/definitions.cjs.map +0 -1
  154. package/dist/deltaStorageService.cjs.map +0 -1
  155. package/dist/documentDeltaConnection.cjs.map +0 -1
  156. package/dist/documentService.cjs.map +0 -1
  157. package/dist/documentServiceFactory.cjs.map +0 -1
  158. package/dist/documentStorageService.cjs.map +0 -1
  159. package/dist/errorUtils.cjs.map +0 -1
  160. package/dist/gitManager.cjs.map +0 -1
  161. package/dist/historian.cjs.map +0 -1
  162. package/dist/index.cjs.map +0 -1
  163. package/dist/mapWithExpiration.cjs.map +0 -1
  164. package/dist/nullBlobStorageService.cjs.map +0 -1
  165. package/dist/packageVersion.cjs.map +0 -1
  166. package/dist/policies.cjs.map +0 -1
  167. package/dist/r11sSnapshotParser.cjs.map +0 -1
  168. package/dist/restWrapper.cjs.map +0 -1
  169. package/dist/restWrapperBase.cjs.map +0 -1
  170. package/dist/retriableGitManager.cjs.map +0 -1
  171. package/dist/shreddedSummaryDocumentStorageService.cjs.map +0 -1
  172. package/dist/storageContracts.cjs +0 -7
  173. package/dist/storageContracts.cjs.map +0 -1
  174. package/dist/summaryTreeUploadManager.cjs.map +0 -1
  175. package/dist/tokens.cjs.map +0 -1
  176. package/dist/treeUtils.cjs.map +0 -1
  177. package/dist/urlUtils.cjs.map +0 -1
  178. package/dist/wholeSummaryDocumentStorageService.cjs.map +0 -1
  179. package/dist/wholeSummaryUploadManager.cjs.map +0 -1
  180. package/lib/cache.d.ts.map +0 -1
  181. package/lib/contracts.d.ts.map +0 -1
  182. package/lib/createNewUtils.d.ts.map +0 -1
  183. package/lib/defaultTokenProvider.d.ts.map +0 -1
  184. package/lib/definitions.d.ts.map +0 -1
  185. package/lib/deltaStorageService.d.ts.map +0 -1
  186. package/lib/documentDeltaConnection.d.ts.map +0 -1
  187. package/lib/documentService.d.ts.map +0 -1
  188. package/lib/documentServiceFactory.d.ts.map +0 -1
  189. package/lib/documentStorageService.d.ts.map +0 -1
  190. package/lib/errorUtils.d.ts.map +0 -1
  191. package/lib/gitManager.d.ts.map +0 -1
  192. package/lib/historian.d.ts.map +0 -1
  193. package/lib/index.d.ts.map +0 -1
  194. package/lib/mapWithExpiration.d.ts.map +0 -1
  195. package/lib/nullBlobStorageService.d.ts.map +0 -1
  196. package/lib/packageVersion.d.ts.map +0 -1
  197. package/lib/policies.d.ts.map +0 -1
  198. package/lib/r11sSnapshotParser.d.ts.map +0 -1
  199. package/lib/restWrapper.d.ts.map +0 -1
  200. package/lib/restWrapperBase.d.ts.map +0 -1
  201. package/lib/retriableGitManager.d.ts.map +0 -1
  202. package/lib/routerlicious-driver-beta.d.ts +0 -35
  203. package/lib/routerlicious-driver-public.d.ts +0 -35
  204. package/lib/shreddedSummaryDocumentStorageService.d.ts.map +0 -1
  205. package/lib/storageContracts.d.ts.map +0 -1
  206. package/lib/summaryTreeUploadManager.d.ts.map +0 -1
  207. package/lib/tokens.d.ts.map +0 -1
  208. package/lib/treeUtils.d.ts.map +0 -1
  209. package/lib/urlUtils.d.ts.map +0 -1
  210. package/lib/wholeSummaryDocumentStorageService.d.ts.map +0 -1
  211. package/lib/wholeSummaryUploadManager.d.ts.map +0 -1
  212. package/tsc-multi.test.json +0 -4
@@ -0,0 +1,98 @@
1
+ import { IDocumentService } from '@fluidframework/driver-definitions';
2
+ import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
3
+ import { IResolvedUrl } from '@fluidframework/driver-definitions';
4
+ import { ISession } from '@fluidframework/server-services-client';
5
+ import { ISummaryTree } from '@fluidframework/protocol-definitions';
6
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
7
+ import { ITokenClaims } from '@fluidframework/protocol-definitions';
8
+
9
+ /* Excluded from this release type: DefaultTokenProvider */
10
+
11
+ /* Excluded from this release type: DocumentPostCreateError */
12
+
13
+ /* Excluded from this release type: IDocumentService */
14
+
15
+ /* Excluded from this release type: IDocumentServiceFactory */
16
+
17
+ /* Excluded from this release type: IResolvedUrl */
18
+
19
+ /* Excluded from this release type: IRouterliciousDriverPolicies */
20
+
21
+ /**
22
+ * Abstracts the token fetching mechanism for a hosting application.
23
+ * The hosting application is responsible for providing an implementation.
24
+ * @public
25
+ */
26
+ export declare interface ITokenProvider {
27
+ /**
28
+ * Fetches the orderer token from host.
29
+ *
30
+ * @param tenantId - Tenant ID.
31
+ * @param documentId - Optional. Document ID is only required for document-scoped requests.
32
+ * @param refresh - Optional flag indicating whether token fetch must bypass local cache.
33
+ * This likely indicates that some previous request failed authorization due to an expired token,
34
+ * and so a fresh token is required.
35
+ *
36
+ * Default: `false`.
37
+ *
38
+ * NOTE: This parameter will be made required in the future.
39
+ */
40
+ fetchOrdererToken(tenantId: string, documentId?: string, refresh?: boolean): Promise<ITokenResponse>;
41
+ /**
42
+ * Fetches the storage token from host.
43
+ *
44
+ * @param tenantId - Tenant ID.
45
+ * @param documentId - Document ID.
46
+ * @param refresh - Optional flag indicating whether token fetch must bypass local cache.
47
+ * This likely indicates that some previous request failed authorization due to an expired token,
48
+ * and so a fresh token is required.
49
+ *
50
+ * Default: `false`.
51
+ *
52
+ * NOTE: This parameter will be made required in the future.
53
+ */
54
+ fetchStorageToken(tenantId: string, documentId: string, refresh?: boolean): Promise<ITokenResponse>;
55
+ /**
56
+ * A callback triggered directly after creating the document. In this callback the client has the opportunity, to
57
+ * verify against an authorization service, if the user who claims to create the document is the same user who
58
+ * created it.
59
+ *
60
+ * @remarks Notes:
61
+ *
62
+ * * Using the callback may have performance impact on the document creation process.
63
+ *
64
+ * * Any exceptions thrown in the callback would fail the creation workflow
65
+ * (see {@link RouterliciousDocumentServiceFactory.createContainer} for more details).
66
+ *
67
+ * @param documentId - Document ID.
68
+ * @param creationToken - A special token that doesn't provide any kind of access, but it has the user's payload
69
+ * and document id. It can be used to validate the identity of the document creator.
70
+ */
71
+ documentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;
72
+ }
73
+
74
+ /**
75
+ * @public
76
+ */
77
+ export declare interface ITokenResponse {
78
+ /**
79
+ * {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} value.
80
+ */
81
+ jwt: string;
82
+ /**
83
+ * A flag indicating whether token was obtained from local cache.
84
+ *
85
+ * @remarks `undefined` indicates that the source of the token could not be determined.
86
+ */
87
+ fromCache?: boolean;
88
+ }
89
+
90
+ /* Excluded from this release type: ITokenService */
91
+
92
+ /* Excluded from this release type: RouterliciousDocumentServiceFactory */
93
+
94
+ /* Excluded from this release type: RouterliciousErrorType */
95
+
96
+ /* Excluded from this release type: RouterliciousErrorTypes */
97
+
98
+ export { }
@@ -0,0 +1,98 @@
1
+ import { IDocumentService } from '@fluidframework/driver-definitions';
2
+ import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
3
+ import { IResolvedUrl } from '@fluidframework/driver-definitions';
4
+ import { ISession } from '@fluidframework/server-services-client';
5
+ import { ISummaryTree } from '@fluidframework/protocol-definitions';
6
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
7
+ import { ITokenClaims } from '@fluidframework/protocol-definitions';
8
+
9
+ /* Excluded from this release type: DefaultTokenProvider */
10
+
11
+ /* Excluded from this release type: DocumentPostCreateError */
12
+
13
+ /* Excluded from this release type: IDocumentService */
14
+
15
+ /* Excluded from this release type: IDocumentServiceFactory */
16
+
17
+ /* Excluded from this release type: IResolvedUrl */
18
+
19
+ /* Excluded from this release type: IRouterliciousDriverPolicies */
20
+
21
+ /**
22
+ * Abstracts the token fetching mechanism for a hosting application.
23
+ * The hosting application is responsible for providing an implementation.
24
+ * @public
25
+ */
26
+ export declare interface ITokenProvider {
27
+ /**
28
+ * Fetches the orderer token from host.
29
+ *
30
+ * @param tenantId - Tenant ID.
31
+ * @param documentId - Optional. Document ID is only required for document-scoped requests.
32
+ * @param refresh - Optional flag indicating whether token fetch must bypass local cache.
33
+ * This likely indicates that some previous request failed authorization due to an expired token,
34
+ * and so a fresh token is required.
35
+ *
36
+ * Default: `false`.
37
+ *
38
+ * NOTE: This parameter will be made required in the future.
39
+ */
40
+ fetchOrdererToken(tenantId: string, documentId?: string, refresh?: boolean): Promise<ITokenResponse>;
41
+ /**
42
+ * Fetches the storage token from host.
43
+ *
44
+ * @param tenantId - Tenant ID.
45
+ * @param documentId - Document ID.
46
+ * @param refresh - Optional flag indicating whether token fetch must bypass local cache.
47
+ * This likely indicates that some previous request failed authorization due to an expired token,
48
+ * and so a fresh token is required.
49
+ *
50
+ * Default: `false`.
51
+ *
52
+ * NOTE: This parameter will be made required in the future.
53
+ */
54
+ fetchStorageToken(tenantId: string, documentId: string, refresh?: boolean): Promise<ITokenResponse>;
55
+ /**
56
+ * A callback triggered directly after creating the document. In this callback the client has the opportunity, to
57
+ * verify against an authorization service, if the user who claims to create the document is the same user who
58
+ * created it.
59
+ *
60
+ * @remarks Notes:
61
+ *
62
+ * * Using the callback may have performance impact on the document creation process.
63
+ *
64
+ * * Any exceptions thrown in the callback would fail the creation workflow
65
+ * (see {@link RouterliciousDocumentServiceFactory.createContainer} for more details).
66
+ *
67
+ * @param documentId - Document ID.
68
+ * @param creationToken - A special token that doesn't provide any kind of access, but it has the user's payload
69
+ * and document id. It can be used to validate the identity of the document creator.
70
+ */
71
+ documentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;
72
+ }
73
+
74
+ /**
75
+ * @public
76
+ */
77
+ export declare interface ITokenResponse {
78
+ /**
79
+ * {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} value.
80
+ */
81
+ jwt: string;
82
+ /**
83
+ * A flag indicating whether token was obtained from local cache.
84
+ *
85
+ * @remarks `undefined` indicates that the source of the token could not be determined.
86
+ */
87
+ fromCache?: boolean;
88
+ }
89
+
90
+ /* Excluded from this release type: ITokenService */
91
+
92
+ /* Excluded from this release type: RouterliciousDocumentServiceFactory */
93
+
94
+ /* Excluded from this release type: RouterliciousErrorType */
95
+
96
+ /* Excluded from this release type: RouterliciousErrorTypes */
97
+
98
+ export { }
@@ -100,7 +100,7 @@ export declare interface IRouterliciousDriverPolicies {
100
100
  /**
101
101
  * Abstracts the token fetching mechanism for a hosting application.
102
102
  * The hosting application is responsible for providing an implementation.
103
- * @alpha
103
+ * @public
104
104
  */
105
105
  export declare interface ITokenProvider {
106
106
  /**
@@ -151,7 +151,7 @@ export declare interface ITokenProvider {
151
151
  }
152
152
 
153
153
  /**
154
- * @alpha
154
+ * @public
155
155
  */
156
156
  export declare interface ITokenResponse {
157
157
  /**
@@ -237,13 +237,6 @@ export declare class RouterliciousDocumentServiceFactory implements IDocumentSer
237
237
  readonly authorizationError: "authorizationError";
238
238
  readonly fileNotFoundOrAccessDeniedError: "fileNotFoundOrAccessDeniedError";
239
239
  readonly offlineError: "offlineError";
240
- /**
241
- * Routerlicious Error types
242
- * Different error types that may be thrown by the routerlicious driver
243
- *
244
- * @deprecated Use {@link (RouterliciousErrorTypes:variable)} instead.
245
- * @internal
246
- */
247
240
  readonly unsupportedClientProtocolVersion: "unsupportedClientProtocolVersion";
248
241
  readonly writeError: "writeError";
249
242
  readonly fetchFailure: "fetchFailure";
@@ -36,4 +36,4 @@ export declare class ShreddedSummaryDocumentStorageService implements IDocumentS
36
36
  private getPreviousFullSnapshot;
37
37
  private getCacheKey;
38
38
  }
39
- //# sourceMappingURL=shreddedSummaryDocumentStorageService.d.ts.map
39
+ //# sourceMappingURL=shreddedSummaryDocumentStorageService.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shreddedSummaryDocumentStorageService.d.mts","sourceRoot":"","sources":["../src/shreddedSummaryDocumentStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EACN,mBAAmB,EAInB,MAAM,iCAAiC;OAEjC,EACN,uBAAuB,EACvB,eAAe,EACf,+BAA+B,EAC/B,MAAM,oCAAoC;OAEpC,EACN,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,MAAM,sCAAsC;OACtC,EAAE,4BAA4B,EAAE;OAChC,EAAE,MAAM,EAAiB;OAEzB,EAAE,oBAAoB,EAAE;OACxB,EAAE,UAAU,EAAE;AAMrB;;;;GAIG;AACH,qBAAa,qCAAsC,YAAW,uBAAuB;IAoBnF,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM;IAC7B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU;IACtC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,mBAAmB;aAC9B,QAAQ,EAAE,+BAA+B;IAIzD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IA1BnC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAoB;IAGvC,SAAS,CAAC,QAAQ,CAAC,aAAa,sBAA6B;IAC7D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsC;IAChE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA2C;IAE7E,SAAgB,aAAa,MAAM;YAErB,uBAAuB;gBAUjB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,+BAA+B,EACzD,cAAc,CAAC,EAAE,4BAA4B,EAC7C,SAAS,CAAC,EAAE,MAAM,CAAC,eAAe,CAAC,EACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAC/B,iBAAiB,GAAE,CACnC,YAAY,CAAC,EAAE,OAAO,KAClB,OAAO,CAAC,UAAU,CAA4B;IAYvC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAqBzE,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAyCpE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IA8BlD,wBAAwB,CACpC,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,eAAe,GACtB,OAAO,CAAC,MAAM,CAAC;IAqBL,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAI9D,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC;YAqB9D,uBAAuB;IAYrC,OAAO,CAAC,WAAW;CAGnB"}
@@ -42,4 +42,4 @@ export interface ISummaryUploadManager {
42
42
  */
43
43
  writeSummaryTree(summaryTree: api.ISummaryTree, parentHandle: string, summaryType: IWholeSummaryPayloadType, sequenceNumber?: number): Promise<string>;
44
44
  }
45
- //# sourceMappingURL=storageContracts.d.ts.map
45
+ //# sourceMappingURL=storageContracts.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageContracts.d.mts","sourceRoot":"","sources":["../src/storageContracts.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,KAAK,GAAG,MAAM,8BAA8B;OAC5C,KAAK,GAAG,MAAM,sCAAsC;OACpD,EACN,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,MAAM,wCAAwC;OACxC,EAAE,aAAa,EAAE;OACjB,EAAE,kBAAkB,EAAE;AAE7B;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACzF,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IACrF,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3E,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5E,aAAa,CACZ,OAAO,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACjD,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,WAAW;IAC3B,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IACrF,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC/F,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,aAAa,CACZ,OAAO,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACjD,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;CACrE;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;;;;;OAOG;IACH,gBAAgB,CACf,WAAW,EAAE,GAAG,CAAC,YAAY,EAC7B,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,wBAAwB,EACrC,cAAc,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,CAAC,CAAC;CACnB"}
@@ -20,4 +20,4 @@ export declare class SummaryTreeUploadManager implements ISummaryUploadManager {
20
20
  private getIdFromPath;
21
21
  private getIdFromPathCore;
22
22
  }
23
- //# sourceMappingURL=summaryTreeUploadManager.d.ts.map
23
+ //# sourceMappingURL=summaryTreeUploadManager.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summaryTreeUploadManager.d.mts","sourceRoot":"","sources":["../src/summaryTreeUploadManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAMI,EACN,eAAe,EACf,YAAY,EAGZ,MAAM,sCAAsC;OACtC,EAAE,wBAAwB,EAAE,MAAM,wCAAwC;OAC1E,EAAE,WAAW,EAAE,qBAAqB,EAAE;AAE7C;;GAEG;AACH,qBAAa,wBAAyB,YAAW,qBAAqB;IAEpE,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,uBAAuB;gBAFvB,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,uBAAuB,EAAE,CACzC,YAAY,EAAE,MAAM,KAChB,OAAO,CAAC,eAAe,GAAG,IAAI,GAAG,SAAS,CAAC;IAGpC,gBAAgB,CAC5B,WAAW,EAAE,YAAY,EACzB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,wBAAwB,EACrC,cAAc,CAAC,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,MAAM,CAAC;YAKJ,oBAAoB;YAsBpB,sBAAsB;YA0BtB,gBAAgB;IAgB9B,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,iBAAiB;CAgCzB"}
@@ -15,7 +15,7 @@ export interface ITokenService {
15
15
  extractClaims(token: string): ITokenClaims;
16
16
  }
17
17
  /**
18
- * @alpha
18
+ * @public
19
19
  */
20
20
  export interface ITokenResponse {
21
21
  /**
@@ -32,7 +32,7 @@ export interface ITokenResponse {
32
32
  /**
33
33
  * Abstracts the token fetching mechanism for a hosting application.
34
34
  * The hosting application is responsible for providing an implementation.
35
- * @alpha
35
+ * @public
36
36
  */
37
37
  export interface ITokenProvider {
38
38
  /**
@@ -81,4 +81,4 @@ export interface ITokenProvider {
81
81
  */
82
82
  documentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;
83
83
  }
84
- //# sourceMappingURL=tokens.d.ts.map
84
+ //# sourceMappingURL=tokens.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.mts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,YAAY,EAAE,MAAM,sCAAsC;AAEnE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,cAAc,CAAC,CAAC;IAE3B;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,cAAc,CAAC,CAAC;IAE3B;;;;;;;;;;;;;;;OAeG;IACH,0BAA0B,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.mjs","sourceRoot":"","sources":["../src/tokens.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 { ITokenClaims } from \"@fluidframework/protocol-definitions\";\n\n/**\n * Abstracts the discovery of claims contained within a token.\n * @internal\n */\nexport interface ITokenService {\n\t/**\n\t * Extracts the {@link @fluidframework/protocol-definitions#ITokenClaims | token claims} from the provided\n\t * {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} string representation.\n\t */\n\textractClaims(token: string): ITokenClaims;\n}\n\n/**\n * @alpha\n */\nexport interface ITokenResponse {\n\t/**\n\t * {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} value.\n\t */\n\tjwt: string;\n\n\t/**\n\t * A flag indicating whether token was obtained from local cache.\n\t *\n\t * @remarks `undefined` indicates that the source of the token could not be determined.\n\t */\n\tfromCache?: boolean;\n}\n\n/**\n * Abstracts the token fetching mechanism for a hosting application.\n * The hosting application is responsible for providing an implementation.\n * @alpha\n */\nexport interface ITokenProvider {\n\t/**\n\t * Fetches the orderer token from host.\n\t *\n\t * @param tenantId - Tenant ID.\n\t * @param documentId - Optional. Document ID is only required for document-scoped requests.\n\t * @param refresh - Optional flag indicating whether token fetch must bypass local cache.\n\t * This likely indicates that some previous request failed authorization due to an expired token,\n\t * and so a fresh token is required.\n\t *\n\t * Default: `false`.\n\t *\n\t * NOTE: This parameter will be made required in the future.\n\t */\n\tfetchOrdererToken(\n\t\ttenantId: string,\n\t\tdocumentId?: string,\n\t\trefresh?: boolean,\n\t): Promise<ITokenResponse>;\n\n\t/**\n\t * Fetches the storage token from host.\n\t *\n\t * @param tenantId - Tenant ID.\n\t * @param documentId - Document ID.\n\t * @param refresh - Optional flag indicating whether token fetch must bypass local cache.\n\t * This likely indicates that some previous request failed authorization due to an expired token,\n\t * and so a fresh token is required.\n\t *\n\t * Default: `false`.\n\t *\n\t * NOTE: This parameter will be made required in the future.\n\t */\n\tfetchStorageToken(\n\t\ttenantId: string,\n\t\tdocumentId: string,\n\t\trefresh?: boolean,\n\t): Promise<ITokenResponse>;\n\n\t/**\n\t * A callback triggered directly after creating the document. In this callback the client has the opportunity, to\n\t * verify against an authorization service, if the user who claims to create the document is the same user who\n\t * created it.\n\t *\n\t * @remarks Notes:\n\t *\n\t * * Using the callback may have performance impact on the document creation process.\n\t *\n\t * * Any exceptions thrown in the callback would fail the creation workflow\n\t * (see {@link RouterliciousDocumentServiceFactory.createContainer} for more details).\n\t *\n\t * @param documentId - Document ID.\n\t * @param creationToken - A special token that doesn't provide any kind of access, but it has the user's payload\n\t * and document id. It can be used to validate the identity of the document creator.\n\t */\n\tdocumentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"tokens.mjs","sourceRoot":"","sources":["../src/tokens.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 { ITokenClaims } from \"@fluidframework/protocol-definitions\";\n\n/**\n * Abstracts the discovery of claims contained within a token.\n * @internal\n */\nexport interface ITokenService {\n\t/**\n\t * Extracts the {@link @fluidframework/protocol-definitions#ITokenClaims | token claims} from the provided\n\t * {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} string representation.\n\t */\n\textractClaims(token: string): ITokenClaims;\n}\n\n/**\n * @public\n */\nexport interface ITokenResponse {\n\t/**\n\t * {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} value.\n\t */\n\tjwt: string;\n\n\t/**\n\t * A flag indicating whether token was obtained from local cache.\n\t *\n\t * @remarks `undefined` indicates that the source of the token could not be determined.\n\t */\n\tfromCache?: boolean;\n}\n\n/**\n * Abstracts the token fetching mechanism for a hosting application.\n * The hosting application is responsible for providing an implementation.\n * @public\n */\nexport interface ITokenProvider {\n\t/**\n\t * Fetches the orderer token from host.\n\t *\n\t * @param tenantId - Tenant ID.\n\t * @param documentId - Optional. Document ID is only required for document-scoped requests.\n\t * @param refresh - Optional flag indicating whether token fetch must bypass local cache.\n\t * This likely indicates that some previous request failed authorization due to an expired token,\n\t * and so a fresh token is required.\n\t *\n\t * Default: `false`.\n\t *\n\t * NOTE: This parameter will be made required in the future.\n\t */\n\tfetchOrdererToken(\n\t\ttenantId: string,\n\t\tdocumentId?: string,\n\t\trefresh?: boolean,\n\t): Promise<ITokenResponse>;\n\n\t/**\n\t * Fetches the storage token from host.\n\t *\n\t * @param tenantId - Tenant ID.\n\t * @param documentId - Document ID.\n\t * @param refresh - Optional flag indicating whether token fetch must bypass local cache.\n\t * This likely indicates that some previous request failed authorization due to an expired token,\n\t * and so a fresh token is required.\n\t *\n\t * Default: `false`.\n\t *\n\t * NOTE: This parameter will be made required in the future.\n\t */\n\tfetchStorageToken(\n\t\ttenantId: string,\n\t\tdocumentId: string,\n\t\trefresh?: boolean,\n\t): Promise<ITokenResponse>;\n\n\t/**\n\t * A callback triggered directly after creating the document. In this callback the client has the opportunity, to\n\t * verify against an authorization service, if the user who claims to create the document is the same user who\n\t * created it.\n\t *\n\t * @remarks Notes:\n\t *\n\t * * Using the callback may have performance impact on the document creation process.\n\t *\n\t * * Any exceptions thrown in the callback would fail the creation workflow\n\t * (see {@link RouterliciousDocumentServiceFactory.createContainer} for more details).\n\t *\n\t * @param documentId - Document ID.\n\t * @param creationToken - A special token that doesn't provide any kind of access, but it has the user's payload\n\t * and document id. It can be used to validate the identity of the document creator.\n\t */\n\tdocumentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;\n}\n"]}
@@ -55,4 +55,4 @@ export declare function evalBlobsAndTrees(snapshot: INormalizedWholeSnapshot): {
55
55
  encodedBlobsSize: number;
56
56
  };
57
57
  export declare function validateBlobsAndTrees(snapshot: ISnapshotTree): void;
58
- //# sourceMappingURL=treeUtils.d.ts.map
58
+ //# sourceMappingURL=treeUtils.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treeUtils.d.mts","sourceRoot":"","sources":["../src/treeUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAII,EACN,WAAW,EACX,aAAa,EACb,YAAY,EAEZ,MAAM,sCAAsC;OACtC,EAAE,wBAAwB,EAAE;AAEnC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,oBAAoB;IAIpB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IAHnC,OAAO,CAAC,iBAAiB,CAAa;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAyC;gBAExC,KAAK,CAAC,wCAA4B;IAE/D;;OAEG;IACH,IAAW,OAAO,IAAI,YAAY,CAMjC;IAED;;OAEG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAO/D;;OAEG;IACI,SAAS,CACf,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,UAAU,EACxE,MAAM,EAAE,MAAM,GACZ,IAAI;IAQP;;OAEG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI;IAIxD;;OAEG;IACI,aAAa,CAAC,EAAE,EAAE,MAAM;CAG/B;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CACnD,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAC7B,YAAY,CAcd;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,wBAAwB;;;;EAQnE;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,QAS5D"}
@@ -14,4 +14,4 @@ export declare const parseFluidUrl: (fluidUrl: string) => URLParse;
14
14
  */
15
15
  export declare const replaceDocumentIdInPath: (urlPath: string, documentId: string) => string;
16
16
  export declare const getDiscoveredFluidResolvedUrl: (resolvedUrl: IResolvedUrl, session: ISession) => IResolvedUrl;
17
- //# sourceMappingURL=urlUtils.d.ts.map
17
+ //# sourceMappingURL=urlUtils.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"urlUtils.d.mts","sourceRoot":"","sources":["../src/urlUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,YAAY,EAAE,MAAM,oCAAoC;OAC1D,QAAQ,MAAM,WAAW;OACzB,EAAE,QAAQ,EAAE,MAAM,wCAAwC;AAEjE,eAAO,MAAM,aAAa,aAAc,MAAM,KAAG,QAEhD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,YAAa,MAAM,cAAc,MAAM,KAAG,MACf,CAAC;AAEhE,eAAO,MAAM,6BAA6B,gBAC5B,YAAY,WAChB,QAAQ,KACf,YAuBF,CAAC"}
@@ -35,4 +35,4 @@ export declare class WholeSummaryDocumentStorageService implements IDocumentStor
35
35
  private updateBlobsCache;
36
36
  private getCacheKey;
37
37
  }
38
- //# sourceMappingURL=wholeSummaryDocumentStorageService.d.ts.map
38
+ //# sourceMappingURL=wholeSummaryDocumentStorageService.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wholeSummaryDocumentStorageService.d.mts","sourceRoot":"","sources":["../src/wholeSummaryDocumentStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EACN,mBAAmB,EAInB,MAAM,iCAAiC;OAIjC,EACN,uBAAuB,EACvB,eAAe,EACf,+BAA+B,EAC/B,MAAM,oCAAoC;OACpC,EACN,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,MAAM,sCAAsC;OACtC,EAAE,MAAM,EAAiB;OACzB,EAAE,4BAA4B,EAAE;OAMhC,EAAE,UAAU,EAAE;OAId,EAAE,wBAAwB,EAAsB;AAKvD,qBAAa,kCAAmC,YAAW,uBAAuB;IAYhF,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM;IAC7B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU;IACtC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,mBAAmB;aAC9B,QAAQ,EAAE,+BAA+B;IACzD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAnBnC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAoB;IACvC,OAAO,CAAC,iBAAiB,CAAiB;IAE1C,SAAgB,aAAa,MAAM;YAErB,uBAAuB;gBAMjB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,+BAA+B,EACxC,cAAc,CAAC,0CAA8B,EAC7C,SAAS,GAAE,MAAM,CAAC,eAAe,CAAuB,EACxD,iBAAiB,GAAE,MAAM,CAAC,wBAAwB,CAAuB,EACzE,iBAAiB,CAAC,wBAAY,EAC9B,iBAAiB,GAAE,CACnC,YAAY,CAAC,EAAE,OAAO,KAClB,OAAO,CAAC,UAAU,CAGP;IAQJ,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IA0FzE,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA+BlE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAgClD,wBAAwB,CACpC,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,eAAe,GACtB,OAAO,CAAC,MAAM,CAAC;IAqBL,eAAe,CAAC,aAAa,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAwBrE,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC;YAqB9D,iBAAiB;YA4CjB,sBAAsB;YAetB,gBAAgB;IAS9B,OAAO,CAAC,WAAW;CAGnB"}
@@ -13,4 +13,4 @@ export declare class WholeSummaryUploadManager implements ISummaryUploadManager
13
13
  writeSummaryTree(summaryTree: ISummaryTree, parentHandle: string | undefined, summaryType: IWholeSummaryPayloadType, sequenceNumber?: number, initial?: boolean): Promise<string>;
14
14
  private writeSummaryTreeCore;
15
15
  }
16
- //# sourceMappingURL=wholeSummaryUploadManager.d.ts.map
16
+ //# sourceMappingURL=wholeSummaryUploadManager.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wholeSummaryUploadManager.d.mts","sourceRoot":"","sources":["../src/wholeSummaryUploadManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EACN,YAAY,EAEZ,wBAAwB,EAExB,MAAM,wCAAwC;OACxC,EAAE,WAAW,EAAE,qBAAqB,EAAE;AAE7C;;GAEG;AACH,qBAAa,yBAA0B,YAAW,qBAAqB;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,WAAW;IAEpC,gBAAgB,CAC5B,WAAW,EAAE,YAAY,EACzB,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,WAAW,EAAE,wBAAwB,EACrC,cAAc,GAAE,MAAU,EAC1B,OAAO,GAAE,OAAe,GACtB,OAAO,CAAC,MAAM,CAAC;YAcJ,oBAAoB;CAwBlC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/routerlicious-driver",
3
- "version": "2.0.0-internal.8.0.0",
3
+ "version": "2.0.0-rc.1.0.0",
4
4
  "description": "Socket.IO + Git implementation of Fluid service API",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,20 +11,72 @@
11
11
  "license": "MIT",
12
12
  "author": "Microsoft and contributors",
13
13
  "sideEffects": false,
14
- "main": "dist/index.cjs",
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./lib/index.d.mts",
18
+ "default": "./lib/index.mjs"
19
+ },
20
+ "require": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.js"
23
+ }
24
+ },
25
+ "./alpha": {
26
+ "import": {
27
+ "types": "./lib/routerlicious-driver-alpha.d.mts",
28
+ "default": "./lib/index.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./dist/routerlicious-driver-alpha.d.ts",
32
+ "default": "./dist/index.js"
33
+ }
34
+ },
35
+ "./beta": {
36
+ "import": {
37
+ "types": "./lib/routerlicious-driver-beta.d.mts",
38
+ "default": "./lib/index.mjs"
39
+ },
40
+ "require": {
41
+ "types": "./dist/routerlicious-driver-beta.d.ts",
42
+ "default": "./dist/index.js"
43
+ }
44
+ },
45
+ "./internal": {
46
+ "import": {
47
+ "types": "./lib/index.d.mts",
48
+ "default": "./lib/index.mjs"
49
+ },
50
+ "require": {
51
+ "types": "./dist/index.d.ts",
52
+ "default": "./dist/index.js"
53
+ }
54
+ },
55
+ "./public": {
56
+ "import": {
57
+ "types": "./lib/routerlicious-driver-public.d.mts",
58
+ "default": "./lib/index.mjs"
59
+ },
60
+ "require": {
61
+ "types": "./dist/routerlicious-driver-public.d.ts",
62
+ "default": "./dist/index.js"
63
+ }
64
+ }
65
+ },
66
+ "main": "dist/index.js",
15
67
  "module": "lib/index.mjs",
16
68
  "types": "dist/index.d.ts",
17
69
  "c8": {
18
70
  "all": true,
19
71
  "cache-dir": "nyc/.cache",
20
72
  "exclude": [
21
- "src/test/**/*.ts",
22
- "dist/test/**/*.js"
73
+ "src/test/**/*.*ts",
74
+ "dist/test/**/*.*js"
23
75
  ],
24
76
  "exclude-after-remap": false,
25
77
  "include": [
26
- "src/**/*.ts",
27
- "dist/**/*.js"
78
+ "src/**/*.*ts",
79
+ "dist/**/*.*js"
28
80
  ],
29
81
  "report-dir": "nyc/report",
30
82
  "reporter": [
@@ -35,17 +87,17 @@
35
87
  "temp-directory": "nyc/.nyc_output"
36
88
  },
37
89
  "dependencies": {
38
- "@fluid-internal/client-utils": ">=2.0.0-internal.8.0.0 <2.0.0-internal.8.1.0",
39
- "@fluidframework/core-interfaces": ">=2.0.0-internal.8.0.0 <2.0.0-internal.8.1.0",
40
- "@fluidframework/core-utils": ">=2.0.0-internal.8.0.0 <2.0.0-internal.8.1.0",
41
- "@fluidframework/driver-base": ">=2.0.0-internal.8.0.0 <2.0.0-internal.8.1.0",
42
- "@fluidframework/driver-definitions": ">=2.0.0-internal.8.0.0 <2.0.0-internal.8.1.0",
43
- "@fluidframework/driver-utils": ">=2.0.0-internal.8.0.0 <2.0.0-internal.8.1.0",
44
- "@fluidframework/gitresources": "^2.0.1",
45
- "@fluidframework/protocol-base": "^2.0.1",
46
- "@fluidframework/protocol-definitions": "^3.0.0",
47
- "@fluidframework/server-services-client": "^2.0.1",
48
- "@fluidframework/telemetry-utils": ">=2.0.0-internal.8.0.0 <2.0.0-internal.8.1.0",
90
+ "@fluid-internal/client-utils": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
91
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
92
+ "@fluidframework/core-utils": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
93
+ "@fluidframework/driver-base": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
94
+ "@fluidframework/driver-definitions": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
95
+ "@fluidframework/driver-utils": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
96
+ "@fluidframework/gitresources": "^3.0.0",
97
+ "@fluidframework/protocol-base": "^3.0.0",
98
+ "@fluidframework/protocol-definitions": "^3.1.0",
99
+ "@fluidframework/server-services-client": "^3.0.0",
100
+ "@fluidframework/telemetry-utils": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
49
101
  "cross-fetch": "^3.1.5",
50
102
  "json-stringify-safe": "5.0.1",
51
103
  "socket.io-client": "^4.6.1",
@@ -54,12 +106,12 @@
54
106
  },
55
107
  "devDependencies": {
56
108
  "@arethetypeswrong/cli": "^0.13.3",
57
- "@fluid-tools/build-cli": "^0.28.0",
109
+ "@fluid-tools/build-cli": "^0.29.0",
58
110
  "@fluidframework/build-common": "^2.0.3",
59
- "@fluidframework/build-tools": "^0.28.0",
60
- "@fluidframework/eslint-config-fluid": "^3.1.0",
61
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.8.0.0 <2.0.0-internal.8.1.0",
62
- "@fluidframework/routerlicious-driver-previous": "npm:@fluidframework/routerlicious-driver@2.0.0-internal.7.2.0",
111
+ "@fluidframework/build-tools": "^0.29.0",
112
+ "@fluidframework/eslint-config-fluid": "^3.2.0",
113
+ "@fluidframework/mocha-test-setup": ">=2.0.0-rc.1.0.0 <2.0.0-rc.1.1.0",
114
+ "@fluidframework/routerlicious-driver-previous": "npm:@fluidframework/routerlicious-driver@2.0.0-internal.8.0.0",
63
115
  "@microsoft/api-extractor": "^7.38.3",
64
116
  "@types/mocha": "^9.1.1",
65
117
  "@types/nock": "^9.3.0",
@@ -67,8 +119,8 @@
67
119
  "@types/sinon": "^7.0.13",
68
120
  "@types/url-parse": "1.4.4",
69
121
  "@types/uuid": "^9.0.2",
70
- "axios": "^0.26.0",
71
- "c8": "^7.7.1",
122
+ "axios": "^1.6.2",
123
+ "c8": "^8.0.1",
72
124
  "copyfiles": "^2.4.1",
73
125
  "cross-env": "^7.0.3",
74
126
  "eslint": "~8.50.0",
@@ -101,15 +153,15 @@
101
153
  "scripts": {
102
154
  "api": "fluid-build . --task api",
103
155
  "api-extractor:commonjs": "api-extractor run --local",
104
- "api-extractor:esnext": "copyfiles -u 1 \"dist/**/*-@(alpha|beta|public|untrimmed).d.ts\" lib",
156
+ "api-extractor:esnext": "api-extractor run --config ./api-extractor-esm.json",
105
157
  "build": "fluid-build . --task build",
106
158
  "build:commonjs": "fluid-build . --task commonjs",
107
159
  "build:compile": "fluid-build . --task compile",
108
160
  "build:docs": "fluid-build . --task api",
109
161
  "build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
110
162
  "build:genver": "gen-version",
111
- "build:test": "tsc-multi --config ./tsc-multi.test.json",
112
- "check:are-the-types-wrong": "attw --pack",
163
+ "build:test": "tsc --project ./src/test/tsconfig.json",
164
+ "check:are-the-types-wrong": "attw --pack . --entrypoints .",
113
165
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
114
166
  "ci:build:docs": "api-extractor run",
115
167
  "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
@@ -124,7 +176,7 @@
124
176
  "test:coverage": "c8 npm test",
125
177
  "test:mocha": "mocha --ignore \"dist/test/types/*\" --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup",
126
178
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
127
- "tsc": "tsc-multi --config ../../../common/build/build-common/tsc-multi.cjs.json",
179
+ "tsc": "tsc",
128
180
  "typetests:gen": "fluid-type-test-generator",
129
181
  "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
130
182
  }
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/routerlicious-driver";
9
- export const pkgVersion = "2.0.0-internal.8.0.0";
9
+ export const pkgVersion = "2.0.0-rc.1.0.0";
@@ -19,7 +19,7 @@ import {
19
19
  RestLessClient,
20
20
  } from "@fluidframework/server-services-client";
21
21
  import fetch from "cross-fetch";
22
- import type { AxiosRequestConfig, AxiosRequestHeaders } from "axios";
22
+ import type { AxiosRequestConfig, RawAxiosRequestHeaders } from "axios";
23
23
  import safeStringify from "json-stringify-safe";
24
24
  import { RouterliciousErrorTypes, throwR11sNetworkError } from "./errorUtils";
25
25
  import { ITokenProvider, ITokenResponse } from "./tokens";
@@ -224,11 +224,11 @@ export class RouterliciousRestWrapper extends RestWrapper {
224
224
  }
225
225
 
226
226
  private async generateHeaders(
227
- requestHeaders?: AxiosRequestHeaders | undefined,
228
- ): Promise<Record<string, string>> {
227
+ requestHeaders?: RawAxiosRequestHeaders | undefined,
228
+ ): Promise<RawAxiosRequestHeaders> {
229
229
  const token = await this.getToken();
230
230
  assert(token !== undefined, 0x679 /* token should be present */);
231
- const headers: Record<string, string> = {
231
+ const headers: RawAxiosRequestHeaders = {
232
232
  ...requestHeaders,
233
233
  [DriverVersionHeaderName]: driverVersion,
234
234
  // NOTE: If this.authorizationHeader is undefined, should "Authorization" be removed entirely?
package/src/tokens.ts CHANGED
@@ -18,7 +18,7 @@ export interface ITokenService {
18
18
  }
19
19
 
20
20
  /**
21
- * @alpha
21
+ * @public
22
22
  */
23
23
  export interface ITokenResponse {
24
24
  /**
@@ -37,7 +37,7 @@ export interface ITokenResponse {
37
37
  /**
38
38
  * Abstracts the token fetching mechanism for a hosting application.
39
39
  * The hosting application is responsible for providing an implementation.
40
- * @alpha
40
+ * @public
41
41
  */
42
42
  export interface ITokenProvider {
43
43
  /**
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.cjs","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAwD;AAOxD,qGAAqG;AACrG,MAAa,aAAa;IAGzB,YAAY,YAAqB;QAChC,IAAI,CAAC,KAAK,GAAG,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,qCAAiB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;IAC3F,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,GAAW;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,GAAW,EAAE,KAAQ;QACrC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAdD,sCAcC;AAED,yEAAyE;AACzE,MAAa,SAAS;IACd,KAAK,CAAC,GAAG,CAAC,GAAW;QAC3B,OAAO,SAAS,CAAC;IAClB,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,GAAW,EAAE,KAAQ,IAAkB,CAAC;CACzD;AAND,8BAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { MapWithExpiration } from \"./mapWithExpiration\";\n\nexport interface ICache<T> {\n\tget(key: string): Promise<T | undefined>;\n\tput(key: string, value: T): Promise<void>;\n}\n\n/** A basic in-memory cache that optionally supports expiring entries after a period of inactivity */\nexport class InMemoryCache<T> implements ICache<T> {\n\tprivate readonly cache: Map<string, T>;\n\n\tconstructor(expirationMs?: number) {\n\t\tthis.cache = expirationMs !== undefined ? new MapWithExpiration(expirationMs) : new Map();\n\t}\n\n\tpublic async get(key: string): Promise<T | undefined> {\n\t\treturn this.cache.get(key);\n\t}\n\n\tpublic async put(key: string, value: T): Promise<void> {\n\t\tthis.cache.set(key, value);\n\t}\n}\n\n/** This \"cache\" does nothing on put, and get always returns undefined */\nexport class NullCache<T> implements ICache<T> {\n\tpublic async get(key: string): Promise<T | undefined> {\n\t\treturn undefined;\n\t}\n\n\tpublic async put(key: string, value: T): Promise<void> {}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"contracts.cjs","sourceRoot":"","sources":["../src/contracts.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 { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\n\n/*\n *\n * Whole Snapshot Download Data Structures\n *\n */\n\nexport interface IWholeFlatSnapshotTreeEntryTree {\n\tpath: string;\n\ttype: \"tree\";\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n}\n\nexport interface IWholeFlatSnapshotTreeEntryBlob {\n\tid: string;\n\tpath: string;\n\ttype: \"blob\";\n}\n\nexport type IWholeFlatSnapshotTreeEntry =\n\t| IWholeFlatSnapshotTreeEntryTree\n\t| IWholeFlatSnapshotTreeEntryBlob;\n\nexport interface IWholeFlatSnapshotTree {\n\tentries: IWholeFlatSnapshotTreeEntry[];\n\tid: string;\n\tsequenceNumber: number;\n}\n\nexport interface IWholeFlatSnapshotBlob {\n\tcontent: string;\n\tencoding: \"base64\" | \"utf-8\";\n\tid: string;\n\tsize: number;\n}\n\nexport interface IWholeFlatSnapshot {\n\t// The same as the id of the first snapshot tree in the trees array.\n\tid: string;\n\t// Receive an array of snapshot trees for future-proofing, however, always length 1 for now.\n\ttrees: IWholeFlatSnapshotTree[];\n\tblobs?: IWholeFlatSnapshotBlob[];\n}\n\n/**\n * Normalized Whole Summary with decoded blobs and unflattened snapshot tree.\n */\nexport interface INormalizedWholeSnapshot {\n\tblobs: Map<string, ArrayBuffer>;\n\tsnapshotTree: ISnapshotTree;\n\tsequenceNumber: number | undefined;\n\tid: string;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createNewUtils.cjs","sourceRoot":"","sources":["../src/createNewUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAkE;AAClE,+EAAiF;AAEjF;;;;GAIG;AACH,SAAgB,gCAAgC,CAAC,OAAqB;IACrE,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACvB,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAExC,QAAQ,aAAa,CAAC,IAAI,EAAE;YAC3B,KAAK,kCAAW,CAAC,IAAI,CAAC,CAAC;gBACtB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,gCAAgC,CAAC,aAAa,CAAC,CAAC;gBACpE,MAAM;aACN;YACD,KAAK,kCAAW,CAAC,IAAI,CAAC,CAAC;gBACtB,aAAa,CAAC,OAAO;oBACpB,OAAO,aAAa,CAAC,OAAO,KAAK,QAAQ;wBACxC,CAAC,CAAC,aAAa,CAAC,OAAO;wBACvB,CAAC,CAAC,IAAA,iCAAkB,EAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBACtD,MAAM;aACN;YACD,KAAK,kCAAW,CAAC,MAAM,CAAC,CAAC;gBACxB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;aACnE;YACD,OAAO,CAAC,CAAC;gBACR,MAAM,IAAI,KAAK,CAAC,qBAAqB,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;aAC3D;SACD;KACD;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AA3BD,4EA2BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Uint8ArrayToString } from \"@fluid-internal/client-utils\";\nimport { ISummaryTree, SummaryType } from \"@fluidframework/protocol-definitions\";\n\n/**\n * Utility api to convert ISummaryTree to a summary tree where blob contents are only utf8 strings.\n * @param summary - Summary supplied by the runtime to upload.\n * @returns Modified summary tree where the blob contents could be utf8 string only.\n */\nexport function convertSummaryToCreateNewSummary(summary: ISummaryTree): ISummaryTree {\n\tconst keys = Object.keys(summary.tree);\n\tfor (const key of keys) {\n\t\tconst summaryObject = summary.tree[key];\n\n\t\tswitch (summaryObject.type) {\n\t\t\tcase SummaryType.Tree: {\n\t\t\t\tsummary.tree[key] = convertSummaryToCreateNewSummary(summaryObject);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SummaryType.Blob: {\n\t\t\t\tsummaryObject.content =\n\t\t\t\t\ttypeof summaryObject.content === \"string\"\n\t\t\t\t\t\t? summaryObject.content\n\t\t\t\t\t\t: Uint8ArrayToString(summaryObject.content, \"utf8\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SummaryType.Handle: {\n\t\t\t\tthrow new Error(\"No handle should be present for first summary!!\");\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tthrow new Error(`Unknown tree type ${summaryObject.type}`);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn summary;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultTokenProvider.cjs","sourceRoot":"","sources":["../src/defaultTokenProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AAEH,MAAa,oBAAoB;IAChC,YAA6B,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;IAAG,CAAC;IAErC,KAAK,CAAC,iBAAiB;QAC7B,OAAO;YACN,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,GAAG;SACb,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,iBAAiB;QAC7B,OAAO;YACN,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,GAAG;SACb,CAAC;IACH,CAAC;CACD;AAhBD,oDAgBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITokenProvider, ITokenResponse } from \"./tokens\";\n\n/**\n * Default token provider in case the host does not provide one. It simply caches the provided jwt and returns it back.\n * @internal\n */\n\nexport class DefaultTokenProvider implements ITokenProvider {\n\tconstructor(private readonly jwt: string) {}\n\n\tpublic async fetchOrdererToken(): Promise<ITokenResponse> {\n\t\treturn {\n\t\t\tfromCache: true,\n\t\t\tjwt: this.jwt,\n\t\t};\n\t}\n\n\tpublic async fetchStorageToken(): Promise<ITokenResponse> {\n\t\treturn {\n\t\t\tfromCache: true,\n\t\t\tjwt: this.jwt,\n\t\t};\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"definitions.cjs","sourceRoot":"","sources":["../src/definitions.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 { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\n\nexport interface ISnapshotTreeVersion {\n\tid: string;\n\tsnapshotTree: ISnapshotTree;\n}\n"]}