@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.
- package/api-report/routerlicious-driver.alpha.api.md +36 -0
- package/api-report/routerlicious-driver.beta.api.md +30 -0
- package/api-report/routerlicious-driver.public.api.md +30 -0
- package/dist/contracts.d.ts +1 -1
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/createNewUtils.d.ts +1 -1
- package/dist/createNewUtils.d.ts.map +1 -1
- package/dist/createNewUtils.js +4 -4
- package/dist/createNewUtils.js.map +1 -1
- package/dist/definitions.d.ts +1 -1
- package/dist/definitions.d.ts.map +1 -1
- package/dist/definitions.js.map +1 -1
- package/dist/deltaStorageService.d.ts +1 -1
- package/dist/deltaStorageService.d.ts.map +1 -1
- package/dist/deltaStorageService.js.map +1 -1
- package/dist/documentDeltaConnection.d.ts +1 -1
- package/dist/documentDeltaConnection.d.ts.map +1 -1
- package/dist/documentDeltaConnection.js.map +1 -1
- package/dist/documentService.d.ts +8 -8
- package/dist/documentService.d.ts.map +1 -1
- package/dist/documentService.js.map +1 -1
- package/dist/documentServiceFactory.d.ts +1 -1
- package/dist/documentServiceFactory.d.ts.map +1 -1
- package/dist/documentServiceFactory.js.map +1 -1
- package/dist/documentStorageService.d.ts +1 -2
- package/dist/documentStorageService.d.ts.map +1 -1
- package/dist/documentStorageService.js.map +1 -1
- package/dist/gitManager.d.ts +6 -6
- package/dist/gitManager.d.ts.map +1 -1
- package/dist/gitManager.js.map +1 -1
- package/dist/historian.d.ts +6 -6
- package/dist/historian.d.ts.map +1 -1
- package/dist/historian.js.map +1 -1
- package/dist/nullBlobStorageService.d.ts +7 -7
- package/dist/nullBlobStorageService.d.ts.map +1 -1
- package/dist/nullBlobStorageService.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/r11sSnapshotParser.js.map +1 -1
- package/dist/retriableGitManager.d.ts +6 -6
- package/dist/retriableGitManager.d.ts.map +1 -1
- package/dist/retriableGitManager.js.map +1 -1
- package/dist/shreddedSummaryDocumentStorageService.d.ts +2 -2
- package/dist/shreddedSummaryDocumentStorageService.d.ts.map +1 -1
- package/dist/shreddedSummaryDocumentStorageService.js.map +1 -1
- package/dist/storageContracts.d.ts +13 -13
- package/dist/storageContracts.d.ts.map +1 -1
- package/dist/storageContracts.js.map +1 -1
- package/dist/summaryTreeUploadManager.d.ts +2 -1
- package/dist/summaryTreeUploadManager.d.ts.map +1 -1
- package/dist/summaryTreeUploadManager.js +7 -7
- package/dist/summaryTreeUploadManager.js.map +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js.map +1 -1
- package/dist/treeUtils.d.ts +2 -1
- package/dist/treeUtils.d.ts.map +1 -1
- package/dist/treeUtils.js +5 -5
- package/dist/treeUtils.js.map +1 -1
- package/dist/wholeSummaryDocumentStorageService.d.ts +2 -2
- package/dist/wholeSummaryDocumentStorageService.d.ts.map +1 -1
- package/dist/wholeSummaryDocumentStorageService.js.map +1 -1
- package/lib/contracts.d.ts +1 -1
- package/lib/contracts.d.ts.map +1 -1
- package/lib/contracts.js.map +1 -1
- package/lib/createNewUtils.d.ts +1 -1
- package/lib/createNewUtils.d.ts.map +1 -1
- package/lib/createNewUtils.js +1 -1
- package/lib/createNewUtils.js.map +1 -1
- package/lib/definitions.d.ts +1 -1
- package/lib/definitions.d.ts.map +1 -1
- package/lib/definitions.js.map +1 -1
- package/lib/deltaStorageService.d.ts +1 -1
- package/lib/deltaStorageService.d.ts.map +1 -1
- package/lib/deltaStorageService.js.map +1 -1
- package/lib/documentDeltaConnection.d.ts +1 -1
- package/lib/documentDeltaConnection.d.ts.map +1 -1
- package/lib/documentDeltaConnection.js.map +1 -1
- package/lib/documentService.d.ts +8 -8
- package/lib/documentService.d.ts.map +1 -1
- package/lib/documentService.js.map +1 -1
- package/lib/documentServiceFactory.d.ts +1 -1
- package/lib/documentServiceFactory.d.ts.map +1 -1
- package/lib/documentServiceFactory.js.map +1 -1
- package/lib/documentStorageService.d.ts +1 -2
- package/lib/documentStorageService.d.ts.map +1 -1
- package/lib/documentStorageService.js.map +1 -1
- package/lib/gitManager.d.ts +6 -6
- package/lib/gitManager.d.ts.map +1 -1
- package/lib/gitManager.js.map +1 -1
- package/lib/historian.d.ts +6 -6
- package/lib/historian.d.ts.map +1 -1
- package/lib/historian.js.map +1 -1
- package/lib/nullBlobStorageService.d.ts +7 -7
- package/lib/nullBlobStorageService.d.ts.map +1 -1
- package/lib/nullBlobStorageService.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/r11sSnapshotParser.js.map +1 -1
- package/lib/retriableGitManager.d.ts +6 -6
- package/lib/retriableGitManager.d.ts.map +1 -1
- package/lib/retriableGitManager.js.map +1 -1
- package/lib/shreddedSummaryDocumentStorageService.d.ts +2 -2
- package/lib/shreddedSummaryDocumentStorageService.d.ts.map +1 -1
- package/lib/shreddedSummaryDocumentStorageService.js.map +1 -1
- package/lib/storageContracts.d.ts +13 -13
- package/lib/storageContracts.d.ts.map +1 -1
- package/lib/storageContracts.js.map +1 -1
- package/lib/summaryTreeUploadManager.d.ts +2 -1
- package/lib/summaryTreeUploadManager.d.ts.map +1 -1
- package/lib/summaryTreeUploadManager.js +1 -1
- package/lib/summaryTreeUploadManager.js.map +1 -1
- package/lib/tokens.d.ts +1 -1
- package/lib/tokens.d.ts.map +1 -1
- package/lib/tokens.js.map +1 -1
- package/lib/treeUtils.d.ts +2 -1
- package/lib/treeUtils.d.ts.map +1 -1
- package/lib/treeUtils.js +1 -1
- package/lib/treeUtils.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/wholeSummaryDocumentStorageService.d.ts +2 -2
- package/lib/wholeSummaryDocumentStorageService.d.ts.map +1 -1
- package/lib/wholeSummaryDocumentStorageService.js.map +1 -1
- package/package.json +13 -15
- package/src/contracts.ts +1 -1
- package/src/createNewUtils.ts +1 -1
- package/src/definitions.ts +1 -1
- package/src/deltaStorageService.ts +1 -1
- package/src/documentDeltaConnection.ts +2 -1
- package/src/documentService.ts +18 -10
- package/src/documentServiceFactory.ts +1 -1
- package/src/documentStorageService.ts +2 -1
- package/src/gitManager.ts +14 -9
- package/src/historian.ts +20 -13
- package/src/nullBlobStorageService.ts +9 -6
- package/src/packageVersion.ts +1 -1
- package/src/r11sSnapshotParser.ts +1 -1
- package/src/retriableGitManager.ts +12 -6
- package/src/shreddedSummaryDocumentStorageService.ts +4 -7
- package/src/storageContracts.ts +20 -13
- package/src/summaryTreeUploadManager.ts +4 -8
- package/src/tokens.ts +1 -1
- package/src/treeUtils.ts +2 -6
- package/src/wholeSummaryDocumentStorageService.ts +2 -5
- package/api-report/routerlicious-driver.api.md +0 -105
package/src/storageContracts.ts
CHANGED
|
@@ -3,8 +3,15 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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<
|
|
22
|
-
createBlob(blob:
|
|
23
|
-
getCommits(sha: string, count: number): Promise<IR11sResponse<
|
|
24
|
-
createTree(tree:
|
|
25
|
-
getTree(sha: string, recursive: boolean): Promise<IR11sResponse<
|
|
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<
|
|
35
|
-
getTree(root: string, recursive: boolean): Promise<IR11sResponse<
|
|
36
|
-
getBlob(sha: string): Promise<IR11sResponse<
|
|
37
|
-
createBlob(content: string, encoding: string): Promise<IR11sResponse<
|
|
38
|
-
createGitTree(params:
|
|
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:
|
|
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 {
|
|
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:
|
|
47
|
+
const treeEntry: IGitCreateTreeEntry = {
|
|
52
48
|
mode: getGitMode(entry),
|
|
53
49
|
path: encodeURIComponent(key),
|
|
54
50
|
sha: pathHandle,
|
package/src/tokens.ts
CHANGED
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
|
-
|
|
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/
|
|
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
|
-
```
|