@fluidframework/routerlicious-driver 2.0.0-dev-rc.5.0.0.265721 → 2.0.0-dev-rc.5.0.0.268409

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 (148) hide show
  1. package/api-report/routerlicious-driver.alpha.api.md +36 -0
  2. package/api-report/routerlicious-driver.beta.api.md +30 -0
  3. package/api-report/routerlicious-driver.public.api.md +30 -0
  4. package/dist/contracts.d.ts +1 -1
  5. package/dist/contracts.d.ts.map +1 -1
  6. package/dist/contracts.js.map +1 -1
  7. package/dist/createNewUtils.d.ts +1 -1
  8. package/dist/createNewUtils.d.ts.map +1 -1
  9. package/dist/createNewUtils.js +4 -4
  10. package/dist/createNewUtils.js.map +1 -1
  11. package/dist/definitions.d.ts +1 -1
  12. package/dist/definitions.d.ts.map +1 -1
  13. package/dist/definitions.js.map +1 -1
  14. package/dist/deltaStorageService.d.ts +1 -1
  15. package/dist/deltaStorageService.d.ts.map +1 -1
  16. package/dist/deltaStorageService.js.map +1 -1
  17. package/dist/documentDeltaConnection.d.ts +1 -1
  18. package/dist/documentDeltaConnection.d.ts.map +1 -1
  19. package/dist/documentDeltaConnection.js.map +1 -1
  20. package/dist/documentService.d.ts +8 -8
  21. package/dist/documentService.d.ts.map +1 -1
  22. package/dist/documentService.js.map +1 -1
  23. package/dist/documentServiceFactory.d.ts +1 -1
  24. package/dist/documentServiceFactory.d.ts.map +1 -1
  25. package/dist/documentServiceFactory.js.map +1 -1
  26. package/dist/documentStorageService.d.ts +1 -2
  27. package/dist/documentStorageService.d.ts.map +1 -1
  28. package/dist/documentStorageService.js.map +1 -1
  29. package/dist/gitManager.d.ts +6 -6
  30. package/dist/gitManager.d.ts.map +1 -1
  31. package/dist/gitManager.js.map +1 -1
  32. package/dist/historian.d.ts +6 -6
  33. package/dist/historian.d.ts.map +1 -1
  34. package/dist/historian.js.map +1 -1
  35. package/dist/nullBlobStorageService.d.ts +7 -7
  36. package/dist/nullBlobStorageService.d.ts.map +1 -1
  37. package/dist/nullBlobStorageService.js.map +1 -1
  38. package/dist/packageVersion.d.ts +1 -1
  39. package/dist/packageVersion.js +1 -1
  40. package/dist/packageVersion.js.map +1 -1
  41. package/dist/r11sSnapshotParser.js.map +1 -1
  42. package/dist/retriableGitManager.d.ts +6 -6
  43. package/dist/retriableGitManager.d.ts.map +1 -1
  44. package/dist/retriableGitManager.js.map +1 -1
  45. package/dist/shreddedSummaryDocumentStorageService.d.ts +2 -2
  46. package/dist/shreddedSummaryDocumentStorageService.d.ts.map +1 -1
  47. package/dist/shreddedSummaryDocumentStorageService.js.map +1 -1
  48. package/dist/storageContracts.d.ts +13 -13
  49. package/dist/storageContracts.d.ts.map +1 -1
  50. package/dist/storageContracts.js.map +1 -1
  51. package/dist/summaryTreeUploadManager.d.ts +2 -1
  52. package/dist/summaryTreeUploadManager.d.ts.map +1 -1
  53. package/dist/summaryTreeUploadManager.js +7 -7
  54. package/dist/summaryTreeUploadManager.js.map +1 -1
  55. package/dist/tokens.d.ts +1 -1
  56. package/dist/tokens.d.ts.map +1 -1
  57. package/dist/tokens.js.map +1 -1
  58. package/dist/treeUtils.d.ts +2 -1
  59. package/dist/treeUtils.d.ts.map +1 -1
  60. package/dist/treeUtils.js +5 -5
  61. package/dist/treeUtils.js.map +1 -1
  62. package/dist/wholeSummaryDocumentStorageService.d.ts +2 -2
  63. package/dist/wholeSummaryDocumentStorageService.d.ts.map +1 -1
  64. package/dist/wholeSummaryDocumentStorageService.js.map +1 -1
  65. package/lib/contracts.d.ts +1 -1
  66. package/lib/contracts.d.ts.map +1 -1
  67. package/lib/contracts.js.map +1 -1
  68. package/lib/createNewUtils.d.ts +1 -1
  69. package/lib/createNewUtils.d.ts.map +1 -1
  70. package/lib/createNewUtils.js +1 -1
  71. package/lib/createNewUtils.js.map +1 -1
  72. package/lib/definitions.d.ts +1 -1
  73. package/lib/definitions.d.ts.map +1 -1
  74. package/lib/definitions.js.map +1 -1
  75. package/lib/deltaStorageService.d.ts +1 -1
  76. package/lib/deltaStorageService.d.ts.map +1 -1
  77. package/lib/deltaStorageService.js.map +1 -1
  78. package/lib/documentDeltaConnection.d.ts +1 -1
  79. package/lib/documentDeltaConnection.d.ts.map +1 -1
  80. package/lib/documentDeltaConnection.js.map +1 -1
  81. package/lib/documentService.d.ts +8 -8
  82. package/lib/documentService.d.ts.map +1 -1
  83. package/lib/documentService.js.map +1 -1
  84. package/lib/documentServiceFactory.d.ts +1 -1
  85. package/lib/documentServiceFactory.d.ts.map +1 -1
  86. package/lib/documentServiceFactory.js.map +1 -1
  87. package/lib/documentStorageService.d.ts +1 -2
  88. package/lib/documentStorageService.d.ts.map +1 -1
  89. package/lib/documentStorageService.js.map +1 -1
  90. package/lib/gitManager.d.ts +6 -6
  91. package/lib/gitManager.d.ts.map +1 -1
  92. package/lib/gitManager.js.map +1 -1
  93. package/lib/historian.d.ts +6 -6
  94. package/lib/historian.d.ts.map +1 -1
  95. package/lib/historian.js.map +1 -1
  96. package/lib/nullBlobStorageService.d.ts +7 -7
  97. package/lib/nullBlobStorageService.d.ts.map +1 -1
  98. package/lib/nullBlobStorageService.js.map +1 -1
  99. package/lib/packageVersion.d.ts +1 -1
  100. package/lib/packageVersion.js +1 -1
  101. package/lib/packageVersion.js.map +1 -1
  102. package/lib/r11sSnapshotParser.js.map +1 -1
  103. package/lib/retriableGitManager.d.ts +6 -6
  104. package/lib/retriableGitManager.d.ts.map +1 -1
  105. package/lib/retriableGitManager.js.map +1 -1
  106. package/lib/shreddedSummaryDocumentStorageService.d.ts +2 -2
  107. package/lib/shreddedSummaryDocumentStorageService.d.ts.map +1 -1
  108. package/lib/shreddedSummaryDocumentStorageService.js.map +1 -1
  109. package/lib/storageContracts.d.ts +13 -13
  110. package/lib/storageContracts.d.ts.map +1 -1
  111. package/lib/storageContracts.js.map +1 -1
  112. package/lib/summaryTreeUploadManager.d.ts +2 -1
  113. package/lib/summaryTreeUploadManager.d.ts.map +1 -1
  114. package/lib/summaryTreeUploadManager.js +1 -1
  115. package/lib/summaryTreeUploadManager.js.map +1 -1
  116. package/lib/tokens.d.ts +1 -1
  117. package/lib/tokens.d.ts.map +1 -1
  118. package/lib/tokens.js.map +1 -1
  119. package/lib/treeUtils.d.ts +2 -1
  120. package/lib/treeUtils.d.ts.map +1 -1
  121. package/lib/treeUtils.js +1 -1
  122. package/lib/treeUtils.js.map +1 -1
  123. package/lib/tsdoc-metadata.json +1 -1
  124. package/lib/wholeSummaryDocumentStorageService.d.ts +2 -2
  125. package/lib/wholeSummaryDocumentStorageService.d.ts.map +1 -1
  126. package/lib/wholeSummaryDocumentStorageService.js.map +1 -1
  127. package/package.json +13 -15
  128. package/src/contracts.ts +1 -1
  129. package/src/createNewUtils.ts +1 -1
  130. package/src/definitions.ts +1 -1
  131. package/src/deltaStorageService.ts +1 -1
  132. package/src/documentDeltaConnection.ts +2 -1
  133. package/src/documentService.ts +18 -10
  134. package/src/documentServiceFactory.ts +1 -1
  135. package/src/documentStorageService.ts +2 -1
  136. package/src/gitManager.ts +14 -9
  137. package/src/historian.ts +20 -13
  138. package/src/nullBlobStorageService.ts +9 -6
  139. package/src/packageVersion.ts +1 -1
  140. package/src/r11sSnapshotParser.ts +1 -1
  141. package/src/retriableGitManager.ts +12 -6
  142. package/src/shreddedSummaryDocumentStorageService.ts +4 -7
  143. package/src/storageContracts.ts +20 -13
  144. package/src/summaryTreeUploadManager.ts +4 -8
  145. package/src/tokens.ts +1 -1
  146. package/src/treeUtils.ts +2 -6
  147. package/src/wholeSummaryDocumentStorageService.ts +2 -5
  148. package/api-report/routerlicious-driver.api.md +0 -105
@@ -3,8 +3,15 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import * as git from "@fluidframework/gitresources";
7
- import * as api from "@fluidframework/protocol-definitions";
6
+ import { ISummaryTree } from "@fluidframework/driver-definitions";
7
+ import type {
8
+ IGitBlob,
9
+ IGitCommitDetails,
10
+ IGitCreateBlobParams,
11
+ IGitCreateBlobResponse,
12
+ IGitCreateTreeParams,
13
+ IGitTree,
14
+ } from "@fluidframework/driver-definitions/internal";
8
15
  import {
9
16
  IWholeSummaryPayload,
10
17
  IWholeSummaryPayloadType,
@@ -18,11 +25,11 @@ import { IR11sResponse } from "./restWrapper.js";
18
25
  * Interface to a generic Git provider
19
26
  */
20
27
  export interface IHistorian {
21
- getBlob(sha: string): Promise<IR11sResponse<git.IBlob>>;
22
- createBlob(blob: git.ICreateBlobParams): Promise<IR11sResponse<git.ICreateBlobResponse>>;
23
- getCommits(sha: string, count: number): Promise<IR11sResponse<git.ICommitDetails[]>>;
24
- createTree(tree: git.ICreateTreeParams): Promise<IR11sResponse<git.ITree>>;
25
- getTree(sha: string, recursive: boolean): Promise<IR11sResponse<git.ITree>>;
28
+ getBlob(sha: string): Promise<IR11sResponse<IGitBlob>>;
29
+ createBlob(blob: IGitCreateBlobParams): Promise<IR11sResponse<IGitCreateBlobResponse>>;
30
+ getCommits(sha: string, count: number): Promise<IR11sResponse<IGitCommitDetails[]>>;
31
+ createTree(tree: IGitCreateTreeParams): Promise<IR11sResponse<IGitTree>>;
32
+ getTree(sha: string, recursive: boolean): Promise<IR11sResponse<IGitTree>>;
26
33
  createSummary(
27
34
  summary: IWholeSummaryPayload,
28
35
  initial?: boolean,
@@ -31,11 +38,11 @@ export interface IHistorian {
31
38
  }
32
39
 
33
40
  export interface IGitManager {
34
- getCommits(sha: string, count: number): Promise<IR11sResponse<git.ICommitDetails[]>>;
35
- getTree(root: string, recursive: boolean): Promise<IR11sResponse<git.ITree>>;
36
- getBlob(sha: string): Promise<IR11sResponse<git.IBlob>>;
37
- createBlob(content: string, encoding: string): Promise<IR11sResponse<git.ICreateBlobResponse>>;
38
- createGitTree(params: git.ICreateTreeParams): Promise<IR11sResponse<git.ITree>>;
41
+ getCommits(sha: string, count: number): Promise<IR11sResponse<IGitCommitDetails[]>>;
42
+ getTree(root: string, recursive: boolean): Promise<IR11sResponse<IGitTree>>;
43
+ getBlob(sha: string): Promise<IR11sResponse<IGitBlob>>;
44
+ createBlob(content: string, encoding: string): Promise<IR11sResponse<IGitCreateBlobResponse>>;
45
+ createGitTree(params: IGitCreateTreeParams): Promise<IR11sResponse<IGitTree>>;
39
46
  createSummary(
40
47
  summary: IWholeSummaryPayload,
41
48
  initial?: boolean,
@@ -56,7 +63,7 @@ export interface ISummaryUploadManager {
56
63
  * @returns Id of created tree as a string.
57
64
  */
58
65
  writeSummaryTree(
59
- summaryTree: api.ISummaryTree,
66
+ summaryTree: ISummaryTree,
60
67
  parentHandle: string,
61
68
  summaryType: IWholeSummaryPayloadType,
62
69
  sequenceNumber?: number,
@@ -5,14 +5,10 @@
5
5
 
6
6
  import { IsoBuffer, Uint8ArrayToString, gitHashFile } from "@fluid-internal/client-utils";
7
7
  import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
8
- import { ICreateTreeEntry } from "@fluidframework/gitresources";
8
+ import { ISummaryTree, SummaryObject, SummaryType } from "@fluidframework/driver-definitions";
9
+ import type { IGitCreateTreeEntry } from "@fluidframework/driver-definitions/internal";
10
+ import { ISnapshotTreeEx } from "@fluidframework/driver-definitions/internal";
9
11
  import { getGitMode, getGitType } from "@fluidframework/protocol-base";
10
- import {
11
- ISnapshotTreeEx,
12
- ISummaryTree,
13
- SummaryObject,
14
- SummaryType,
15
- } from "@fluidframework/protocol-definitions";
16
12
  import { IWholeSummaryPayloadType } from "@fluidframework/server-services-client";
17
13
 
18
14
  import { IGitManager, ISummaryUploadManager } from "./storageContracts.js";
@@ -48,7 +44,7 @@ export class SummaryTreeUploadManager implements ISummaryUploadManager {
48
44
  Object.keys(summaryTree.tree).map(async (key) => {
49
45
  const entry = summaryTree.tree[key];
50
46
  const pathHandle = await this.writeSummaryTreeObject(entry, previousFullSnapshot);
51
- const treeEntry: ICreateTreeEntry = {
47
+ const treeEntry: IGitCreateTreeEntry = {
52
48
  mode: getGitMode(entry),
53
49
  path: encodeURIComponent(key),
54
50
  sha: pathHandle,
package/src/tokens.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { ITokenClaims } from "@fluidframework/protocol-definitions";
6
+ import { ITokenClaims } from "@fluidframework/driver-definitions/internal";
7
7
 
8
8
  /**
9
9
  * Abstracts the discovery of claims contained within a token.
package/src/treeUtils.ts CHANGED
@@ -5,12 +5,8 @@
5
5
 
6
6
  import { IsoBuffer } from "@fluid-internal/client-utils";
7
7
  import { assert } from "@fluidframework/core-utils/internal";
8
- import {
9
- ISnapshotTree,
10
- ISummaryTree,
11
- SummaryObject,
12
- SummaryType,
13
- } from "@fluidframework/protocol-definitions";
8
+ import { ISummaryTree, SummaryObject, SummaryType } from "@fluidframework/driver-definitions";
9
+ import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
14
10
 
15
11
  import { INormalizedWholeSnapshot } from "./contracts.js";
16
12
 
@@ -6,18 +6,15 @@
6
6
  import { Uint8ArrayToString, performance, stringToBuffer } from "@fluid-internal/client-utils";
7
7
  import { assert } from "@fluidframework/core-utils/internal";
8
8
  import { getW3CData, promiseRaceWithWinner } from "@fluidframework/driver-base/internal";
9
+ import { ISummaryHandle, ISummaryTree } from "@fluidframework/driver-definitions";
9
10
  import {
10
11
  IDocumentStorageService,
11
12
  IDocumentStorageServicePolicies,
12
13
  ISummaryContext,
13
- } from "@fluidframework/driver-definitions/internal";
14
- import {
15
14
  ICreateBlobResponse,
16
15
  ISnapshotTree,
17
- ISummaryHandle,
18
- ISummaryTree,
19
16
  IVersion,
20
- } from "@fluidframework/protocol-definitions";
17
+ } from "@fluidframework/driver-definitions/internal";
21
18
  import {
22
19
  ITelemetryLoggerExt,
23
20
  MonitoringContext,
@@ -1,105 +0,0 @@
1
- ## API Report File for "@fluidframework/routerlicious-driver"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
8
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
9
- import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
10
- import { ISession } from '@fluidframework/server-services-client';
11
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
12
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
13
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
14
-
15
- // @internal
16
- export class DefaultTokenProvider implements ITokenProvider {
17
- constructor(jwt: string);
18
- // (undocumented)
19
- fetchOrdererToken(): Promise<ITokenResponse>;
20
- // (undocumented)
21
- fetchStorageToken(): Promise<ITokenResponse>;
22
- }
23
-
24
- // @internal
25
- export class DocumentPostCreateError extends Error {
26
- constructor(
27
- innerError: Error);
28
- // (undocumented)
29
- readonly name = "DocumentPostCreateError";
30
- // (undocumented)
31
- get stack(): string | undefined;
32
- }
33
-
34
- // @internal (undocumented)
35
- export interface IRouterliciousDriverPolicies {
36
- enableDiscovery: boolean;
37
- enableInternalSummaryCaching: boolean;
38
- enableLongPollingDowngrade: boolean;
39
- enablePrefetch: boolean;
40
- enableRestLess: boolean;
41
- enableWholeSummaryUpload: boolean;
42
- maxConcurrentOrdererRequests: number;
43
- maxConcurrentStorageRequests: number;
44
- }
45
-
46
- // @alpha
47
- export interface IRouterliciousResolvedUrl extends IResolvedUrl {
48
- createAsEphemeral?: boolean;
49
- routerliciousResolvedUrl: true;
50
- }
51
-
52
- // @public
53
- export interface ITokenProvider {
54
- documentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;
55
- fetchOrdererToken(tenantId: string, documentId?: string, refresh?: boolean): Promise<ITokenResponse>;
56
- fetchStorageToken(tenantId: string, documentId: string, refresh?: boolean): Promise<ITokenResponse>;
57
- }
58
-
59
- // @public (undocumented)
60
- export interface ITokenResponse {
61
- fromCache?: boolean;
62
- jwt: string;
63
- }
64
-
65
- // @internal
66
- export interface ITokenService {
67
- extractClaims(token: string): ITokenClaims;
68
- }
69
-
70
- // @internal
71
- export class RouterliciousDocumentServiceFactory implements IDocumentServiceFactory {
72
- constructor(tokenProvider: ITokenProvider, driverPolicies?: Partial<IRouterliciousDriverPolicies>);
73
- createContainer(createNewSummary: ISummaryTree | undefined, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
74
- createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean, session?: ISession): Promise<IDocumentService>;
75
- }
76
-
77
- // @internal
78
- export const RouterliciousErrorTypes: {
79
- readonly sslCertError: "sslCertError";
80
- readonly genericNetworkError: "genericNetworkError";
81
- readonly authorizationError: "authorizationError";
82
- readonly fileNotFoundOrAccessDeniedError: "fileNotFoundOrAccessDeniedError";
83
- readonly offlineError: "offlineError";
84
- readonly unsupportedClientProtocolVersion: "unsupportedClientProtocolVersion";
85
- readonly writeError: "writeError";
86
- readonly fetchFailure: "fetchFailure";
87
- readonly fetchTokenError: "fetchTokenError";
88
- readonly incorrectServerResponse: "incorrectServerResponse";
89
- readonly fileOverwrittenInStorage: "fileOverwrittenInStorage";
90
- readonly deltaStreamConnectionForbidden: "deltaStreamConnectionForbidden";
91
- readonly locationRedirection: "locationRedirection";
92
- readonly fluidInvalidSchema: "fluidInvalidSchema";
93
- readonly fileIsLocked: "fileIsLocked";
94
- readonly outOfStorageError: "outOfStorageError";
95
- readonly genericError: "genericError";
96
- readonly throttlingError: "throttlingError";
97
- readonly usageError: "usageError";
98
- };
99
-
100
- // @internal (undocumented)
101
- export type RouterliciousErrorTypes = (typeof RouterliciousErrorTypes)[keyof typeof RouterliciousErrorTypes];
102
-
103
- // (No @packageDocumentation comment for this package)
104
-
105
- ```