@fluidframework/replay-driver 2.0.0-internal.3.0.5 → 2.0.0-internal.3.1.1
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/.eslintrc.js +5 -7
- package/api-extractor.json +2 -2
- package/dist/emptyDeltaStorageService.d.ts.map +1 -1
- package/dist/emptyDeltaStorageService.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/replayController.d.ts.map +1 -1
- package/dist/replayController.js.map +1 -1
- package/dist/replayDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/replayDocumentDeltaConnection.js +12 -9
- package/dist/replayDocumentDeltaConnection.js.map +1 -1
- package/dist/replayDocumentService.d.ts.map +1 -1
- package/dist/replayDocumentService.js.map +1 -1
- package/dist/replayDocumentServiceFactory.d.ts.map +1 -1
- package/dist/replayDocumentServiceFactory.js.map +1 -1
- package/dist/storageImplementations.d.ts.map +1 -1
- package/dist/storageImplementations.js.map +1 -1
- package/lib/emptyDeltaStorageService.d.ts.map +1 -1
- package/lib/emptyDeltaStorageService.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/replayController.d.ts.map +1 -1
- package/lib/replayController.js.map +1 -1
- package/lib/replayDocumentDeltaConnection.d.ts.map +1 -1
- package/lib/replayDocumentDeltaConnection.js +12 -9
- package/lib/replayDocumentDeltaConnection.js.map +1 -1
- package/lib/replayDocumentService.d.ts.map +1 -1
- package/lib/replayDocumentService.js.map +1 -1
- package/lib/replayDocumentServiceFactory.d.ts.map +1 -1
- package/lib/replayDocumentServiceFactory.js.map +1 -1
- package/lib/storageImplementations.d.ts.map +1 -1
- package/lib/storageImplementations.js.map +1 -1
- package/package.json +71 -70
- package/prettier.config.cjs +1 -1
- package/src/emptyDeltaStorageService.ts +14 -13
- package/src/packageVersion.ts +1 -1
- package/src/replayController.ts +59 -55
- package/src/replayDocumentDeltaConnection.ts +323 -310
- package/src/replayDocumentService.ts +46 -44
- package/src/replayDocumentServiceFactory.ts +58 -44
- package/src/storageImplementations.ts +154 -150
- package/tsconfig.esnext.json +6 -6
- package/tsconfig.json +8 -13
|
@@ -16,55 +16,57 @@ import { ReplayDocumentDeltaConnection } from "./replayDocumentDeltaConnection";
|
|
|
16
16
|
*/
|
|
17
17
|
// eslint-disable-next-line import/namespace
|
|
18
18
|
export class ReplayDocumentService implements api.IDocumentService {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
public static async create(
|
|
20
|
+
documentService: api.IDocumentService,
|
|
21
|
+
controller: ReplayController,
|
|
22
|
+
): Promise<api.IDocumentService> {
|
|
23
|
+
const useController = await controller.initStorage(documentService);
|
|
24
|
+
if (!useController) {
|
|
25
|
+
return documentService;
|
|
26
|
+
}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const deltaConnection = ReplayDocumentDeltaConnection.create(
|
|
29
|
+
await documentService.connectToDeltaStorage(),
|
|
30
|
+
controller,
|
|
31
|
+
);
|
|
32
|
+
return new ReplayDocumentService(controller, deltaConnection);
|
|
33
|
+
}
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
constructor(
|
|
36
|
+
private readonly controller: api.IDocumentStorageService,
|
|
37
|
+
private readonly deltaStorage: api.IDocumentDeltaConnection,
|
|
38
|
+
) {}
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
public dispose() {}
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
// TODO: Issue-2109 Implement detach container api or put appropriate comment.
|
|
43
|
+
public get resolvedUrl(): api.IResolvedUrl {
|
|
44
|
+
throw new Error("Not implemented");
|
|
45
|
+
}
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Connects to a storage endpoint for snapshot service and blobs.
|
|
49
|
+
* @returns returns the dummy document storage service for replay driver.
|
|
50
|
+
*/
|
|
51
|
+
public async connectToStorage(): Promise<api.IDocumentStorageService> {
|
|
52
|
+
return this.controller;
|
|
53
|
+
}
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Connects to a delta storage endpoint for getting ops between a range.
|
|
57
|
+
* @returns returns the dummy document delta storage service for replay driver.
|
|
58
|
+
*/
|
|
59
|
+
public async connectToDeltaStorage(): Promise<api.IDocumentDeltaStorageService> {
|
|
60
|
+
return new EmptyDeltaStorageService();
|
|
61
|
+
}
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Connects to a delta storage endpoint of provided documentService to get ops and then replaying
|
|
65
|
+
* them so as to mimic a delta stream endpoint.
|
|
66
|
+
* @param client - Client that connects to socket.
|
|
67
|
+
* @returns returns the delta stream service which replay ops from --from to --to arguments.
|
|
68
|
+
*/
|
|
69
|
+
public async connectToDeltaStream(client: IClient): Promise<api.IDocumentDeltaConnection> {
|
|
70
|
+
return this.deltaStorage;
|
|
71
|
+
}
|
|
70
72
|
}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
IDocumentService,
|
|
8
|
+
IDocumentServiceFactory,
|
|
9
|
+
IResolvedUrl,
|
|
10
|
+
} from "@fluidframework/driver-definitions";
|
|
7
11
|
import { ISummaryTree } from "@fluidframework/protocol-definitions";
|
|
8
12
|
import { ITelemetryBaseLogger } from "@fluidframework/common-definitions";
|
|
9
13
|
import { ChildLogger } from "@fluidframework/telemetry-utils";
|
|
@@ -12,52 +16,62 @@ import { ReplayControllerStatic } from "./replayDocumentDeltaConnection";
|
|
|
12
16
|
import { ReplayDocumentService } from "./replayDocumentService";
|
|
13
17
|
|
|
14
18
|
export class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
public static create(
|
|
20
|
+
from: number,
|
|
21
|
+
to: number,
|
|
22
|
+
documentServiceFactory: IDocumentServiceFactory,
|
|
23
|
+
) {
|
|
24
|
+
return new ReplayDocumentServiceFactory(
|
|
25
|
+
documentServiceFactory,
|
|
26
|
+
new ReplayControllerStatic(from, to),
|
|
27
|
+
);
|
|
28
|
+
}
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
public readonly protocolName;
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
public constructor(
|
|
33
|
+
private readonly documentServiceFactory: IDocumentServiceFactory,
|
|
34
|
+
private readonly controller: ReplayController,
|
|
35
|
+
) {
|
|
36
|
+
this.protocolName = documentServiceFactory.protocolName;
|
|
37
|
+
}
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Creates a replay document service which uses the document service of provided
|
|
41
|
+
* documentServiceFactory for connecting to delta stream endpoint.
|
|
42
|
+
* @param resolvedUrl - URL to be used for connecting to endpoints.
|
|
43
|
+
* @returns returns the requested document service
|
|
44
|
+
*/
|
|
45
|
+
public async createDocumentService(
|
|
46
|
+
resolvedUrl: IResolvedUrl,
|
|
47
|
+
logger?: ITelemetryBaseLogger,
|
|
48
|
+
clientIsSummarizer?: boolean,
|
|
49
|
+
): Promise<IDocumentService> {
|
|
50
|
+
// Always include isReplay: true on events for the Replay Driver.
|
|
51
|
+
// It's used in testing/debugging scenarios, so we want to be able to filter these events out sometimes.
|
|
52
|
+
const replayLogger = ChildLogger.create(
|
|
53
|
+
logger,
|
|
54
|
+
undefined /* namespace */,
|
|
55
|
+
{ all: { isReplay: true } } /* properties */,
|
|
56
|
+
);
|
|
48
57
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
58
|
+
return ReplayDocumentService.create(
|
|
59
|
+
await this.documentServiceFactory.createDocumentService(
|
|
60
|
+
resolvedUrl,
|
|
61
|
+
replayLogger,
|
|
62
|
+
clientIsSummarizer,
|
|
63
|
+
),
|
|
64
|
+
this.controller,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
53
67
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
// TODO: Issue-2109 Implement detach container api or put appropriate comment.
|
|
69
|
+
public async createContainer(
|
|
70
|
+
createNewSummary: ISummaryTree,
|
|
71
|
+
resolvedUrl: IResolvedUrl,
|
|
72
|
+
logger?: ITelemetryBaseLogger,
|
|
73
|
+
clientIsSummarizer?: boolean,
|
|
74
|
+
): Promise<IDocumentService> {
|
|
75
|
+
throw new Error("Not implemented");
|
|
76
|
+
}
|
|
63
77
|
}
|
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/common-utils";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
IDocumentDeltaConnection,
|
|
9
|
+
IDocumentDeltaStorageService,
|
|
10
|
+
IDocumentService,
|
|
11
|
+
IDocumentServiceFactory,
|
|
12
|
+
IDocumentStorageService,
|
|
13
|
+
IResolvedUrl,
|
|
14
14
|
} from "@fluidframework/driver-definitions";
|
|
15
15
|
import { buildSnapshotTree } from "@fluidframework/driver-utils";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
IClient,
|
|
18
|
+
ISnapshotTree,
|
|
19
|
+
ITree,
|
|
20
|
+
IVersion,
|
|
21
|
+
ISummaryTree,
|
|
22
22
|
} from "@fluidframework/protocol-definitions";
|
|
23
23
|
import { ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
24
24
|
import { EmptyDeltaStorageService } from "./emptyDeltaStorageService";
|
|
@@ -28,164 +28,168 @@ import { ReadDocumentStorageServiceBase } from "./replayController";
|
|
|
28
28
|
* Structure of snapshot on disk, when we store snapshot as single file
|
|
29
29
|
*/
|
|
30
30
|
export interface IFileSnapshot {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
tree: ITree;
|
|
32
|
+
commits: { [key: string]: ITree };
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export class FileSnapshotReader
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
35
|
+
export class FileSnapshotReader
|
|
36
|
+
extends ReadDocumentStorageServiceBase
|
|
37
|
+
implements IDocumentStorageService
|
|
38
|
+
{
|
|
39
|
+
// IVersion.treeId used to communicate between getVersions() & getSnapshotTree() calls to indicate IVersion is ours.
|
|
40
|
+
protected static readonly FileStorageVersionTreeId = "FileStorageTreeId";
|
|
41
|
+
|
|
42
|
+
protected docId?: string;
|
|
43
|
+
protected docTree: ISnapshotTree;
|
|
44
|
+
protected blobs: Map<string, ArrayBufferLike>;
|
|
45
|
+
protected readonly commits: { [key: string]: ITree } = {};
|
|
46
|
+
protected readonly trees: { [key: string]: ISnapshotTree } = {};
|
|
47
|
+
|
|
48
|
+
public constructor(json: IFileSnapshot) {
|
|
49
|
+
super();
|
|
50
|
+
this.commits = json.commits;
|
|
51
|
+
|
|
52
|
+
this.blobs = new Map<string, ArrayBufferLike>();
|
|
53
|
+
this.docTree = buildSnapshotTree(json.tree.entries, this.blobs);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {
|
|
57
|
+
if (this.docId === undefined || this.docId === versionId || versionId === null) {
|
|
58
|
+
if (versionId !== null) {
|
|
59
|
+
this.docId = versionId;
|
|
60
|
+
}
|
|
61
|
+
return [{ id: "latest", treeId: "" }];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (this.commits[versionId] !== undefined) {
|
|
65
|
+
return [{ id: versionId, treeId: FileSnapshotReader.FileStorageVersionTreeId }];
|
|
66
|
+
}
|
|
67
|
+
throw new Error(`Unknown version ID: ${versionId}`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {
|
|
71
|
+
if (!versionRequested || versionRequested.id === "latest") {
|
|
72
|
+
return this.docTree;
|
|
73
|
+
}
|
|
74
|
+
if (versionRequested.treeId !== FileSnapshotReader.FileStorageVersionTreeId) {
|
|
75
|
+
throw new Error(`Unknown version id: ${versionRequested}`);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
let snapshotTree = this.trees[versionRequested.id];
|
|
79
|
+
if (snapshotTree === undefined) {
|
|
80
|
+
const tree = this.commits[versionRequested.id];
|
|
81
|
+
if (tree === undefined) {
|
|
82
|
+
throw new Error(`Can't find version ${versionRequested.id}`);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
this.trees[versionRequested.id] = snapshotTree = buildSnapshotTree(
|
|
86
|
+
tree.entries,
|
|
87
|
+
this.blobs,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return snapshotTree;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
public async readBlob(blobId: string): Promise<ArrayBufferLike> {
|
|
94
|
+
const blob = this.blobs.get(blobId);
|
|
95
|
+
if (blob !== undefined) {
|
|
96
|
+
return blob;
|
|
97
|
+
}
|
|
98
|
+
throw new Error(`Unknown blob ID: ${blobId}`);
|
|
99
|
+
}
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
export class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
103
|
+
protected docId?: string;
|
|
104
|
+
|
|
105
|
+
constructor(
|
|
106
|
+
protected readonly storage: IDocumentStorageService,
|
|
107
|
+
protected readonly docTree: ISnapshotTree | null,
|
|
108
|
+
) {
|
|
109
|
+
super();
|
|
110
|
+
assert(!!this.docTree, 0x0b0 /* "Missing document snapshot tree!" */);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {
|
|
114
|
+
if (this.docId === undefined || this.docId === versionId || versionId === null) {
|
|
115
|
+
if (versionId !== null) {
|
|
116
|
+
this.docId = versionId;
|
|
117
|
+
}
|
|
118
|
+
return [{ id: "latest", treeId: "" }];
|
|
119
|
+
}
|
|
120
|
+
return this.storage.getVersions(versionId, count);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {
|
|
124
|
+
if (versionRequested && versionRequested.id !== "latest") {
|
|
125
|
+
return this.storage.getSnapshotTree(versionRequested);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return this.docTree;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
public async readBlob(blobId: string): Promise<ArrayBufferLike> {
|
|
132
|
+
return this.storage.readBlob(blobId);
|
|
133
|
+
}
|
|
130
134
|
}
|
|
131
135
|
|
|
132
136
|
export class OpStorage extends ReadDocumentStorageServiceBase {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {
|
|
138
|
+
return [];
|
|
139
|
+
}
|
|
136
140
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
public async getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null> {
|
|
142
|
+
throw new Error("no snapshot tree should be asked when playing ops");
|
|
143
|
+
}
|
|
140
144
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
public async readBlob(blobId: string): Promise<ArrayBufferLike> {
|
|
146
|
+
throw new Error(`Unknown blob ID: ${blobId}`);
|
|
147
|
+
}
|
|
144
148
|
}
|
|
145
149
|
|
|
146
150
|
export class StaticStorageDocumentService implements IDocumentService {
|
|
147
|
-
|
|
151
|
+
constructor(private readonly storage: IDocumentStorageService) {}
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
public dispose() {}
|
|
150
154
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
// TODO: Issue-2109 Implement detach container api or put appropriate comment.
|
|
156
|
+
public get resolvedUrl(): IResolvedUrl {
|
|
157
|
+
throw new Error("Not implemented");
|
|
158
|
+
}
|
|
155
159
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
160
|
+
public async connectToStorage(): Promise<IDocumentStorageService> {
|
|
161
|
+
return this.storage;
|
|
162
|
+
}
|
|
159
163
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
public async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {
|
|
165
|
+
return new EmptyDeltaStorageService();
|
|
166
|
+
}
|
|
163
167
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {
|
|
169
|
+
// We have no delta stream, so make it not return forever...
|
|
170
|
+
return new Promise(() => {});
|
|
171
|
+
}
|
|
168
172
|
}
|
|
169
173
|
|
|
170
174
|
export class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
175
|
+
public readonly protocolName = "fluid-static-storage:";
|
|
176
|
+
public constructor(protected readonly storage: IDocumentStorageService) {}
|
|
177
|
+
|
|
178
|
+
public async createDocumentService(
|
|
179
|
+
fileURL: IResolvedUrl,
|
|
180
|
+
logger?: ITelemetryLogger,
|
|
181
|
+
clientIsSummarizer?: boolean,
|
|
182
|
+
): Promise<IDocumentService> {
|
|
183
|
+
return new StaticStorageDocumentService(this.storage);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// TODO: Issue-2109 Implement detach container api or put appropriate comment.
|
|
187
|
+
public async createContainer(
|
|
188
|
+
createNewSummary: ISummaryTree,
|
|
189
|
+
resolvedUrl: IResolvedUrl,
|
|
190
|
+
logger: ITelemetryLogger,
|
|
191
|
+
clientIsSummarizer?: boolean,
|
|
192
|
+
): Promise<IDocumentService> {
|
|
193
|
+
throw new Error("Not implemented");
|
|
194
|
+
}
|
|
191
195
|
}
|
package/tsconfig.esnext.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./lib",
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
},
|
|
7
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
"include": [
|
|
12
|
-
"src/**/*"
|
|
13
|
-
]
|
|
14
|
-
}
|
|
2
|
+
"extends": "@fluidframework/build-common/ts-common-config.json",
|
|
3
|
+
"exclude": ["dist", "node_modules"],
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
},
|
|
8
|
+
"include": ["src/**/*"],
|
|
9
|
+
}
|