@fluidframework/replay-driver 1.4.0-121020 → 2.0.0-dev-rc.1.0.0.224419
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/CHANGELOG.md +144 -0
- package/README.md +38 -0
- package/api-extractor-lint.json +4 -0
- package/api-extractor.json +2 -2
- package/api-report/replay-driver.api.md +150 -0
- package/dist/{emptyDeltaStorageService.js → emptyDeltaStorageService.cjs} +1 -1
- package/dist/emptyDeltaStorageService.cjs.map +1 -0
- package/dist/emptyDeltaStorageService.d.ts.map +1 -1
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/replay-driver-alpha.d.ts +34 -0
- package/dist/replay-driver-beta.d.ts +44 -0
- package/dist/replay-driver-public.d.ts +44 -0
- package/dist/replay-driver-untrimmed.d.ts +187 -0
- package/dist/{replayController.js → replayController.cjs} +6 -4
- package/dist/replayController.cjs.map +1 -0
- package/dist/replayController.d.ts +4 -2
- package/dist/replayController.d.ts.map +1 -1
- package/dist/{replayDocumentDeltaConnection.js → replayDocumentDeltaConnection.cjs} +25 -27
- package/dist/replayDocumentDeltaConnection.cjs.map +1 -0
- package/dist/replayDocumentDeltaConnection.d.ts +2 -2
- package/dist/replayDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/{replayDocumentService.js → replayDocumentService.cjs} +9 -7
- package/dist/replayDocumentService.cjs.map +1 -0
- package/dist/replayDocumentService.d.ts +1 -0
- package/dist/replayDocumentService.d.ts.map +1 -1
- package/dist/{replayDocumentServiceFactory.js → replayDocumentServiceFactory.cjs} +13 -8
- package/dist/replayDocumentServiceFactory.cjs.map +1 -0
- package/dist/replayDocumentServiceFactory.d.ts +4 -2
- package/dist/replayDocumentServiceFactory.d.ts.map +1 -1
- package/dist/{storageImplementations.js → storageImplementations.cjs} +21 -12
- package/dist/storageImplementations.cjs.map +1 -0
- package/dist/storageImplementations.d.ts +18 -6
- package/dist/storageImplementations.d.ts.map +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/lib/emptyDeltaStorageService.d.mts.map +1 -0
- package/lib/{emptyDeltaStorageService.js → emptyDeltaStorageService.mjs} +1 -1
- package/lib/emptyDeltaStorageService.mjs.map +1 -0
- package/lib/index.d.mts +9 -0
- package/lib/index.d.mts.map +1 -0
- package/lib/index.mjs +9 -0
- package/lib/index.mjs.map +1 -0
- package/lib/replay-driver-alpha.d.mts +34 -0
- package/lib/replay-driver-beta.d.mts +44 -0
- package/lib/replay-driver-public.d.mts +44 -0
- package/lib/replay-driver-untrimmed.d.mts +187 -0
- package/lib/{replayController.d.ts → replayController.d.mts} +4 -2
- package/lib/replayController.d.mts.map +1 -0
- package/lib/{replayController.js → replayController.mjs} +6 -4
- package/lib/replayController.mjs.map +1 -0
- package/lib/{replayDocumentDeltaConnection.d.ts → replayDocumentDeltaConnection.d.mts} +3 -3
- package/lib/replayDocumentDeltaConnection.d.mts.map +1 -0
- package/lib/{replayDocumentDeltaConnection.js → replayDocumentDeltaConnection.mjs} +23 -25
- package/lib/replayDocumentDeltaConnection.mjs.map +1 -0
- package/lib/{replayDocumentService.d.ts → replayDocumentService.d.mts} +2 -1
- package/lib/replayDocumentService.d.mts.map +1 -0
- package/lib/{replayDocumentService.js → replayDocumentService.mjs} +9 -7
- package/lib/replayDocumentService.mjs.map +1 -0
- package/lib/{replayDocumentServiceFactory.d.ts → replayDocumentServiceFactory.d.mts} +5 -3
- package/lib/replayDocumentServiceFactory.d.mts.map +1 -0
- package/lib/{replayDocumentServiceFactory.js → replayDocumentServiceFactory.mjs} +14 -9
- package/lib/replayDocumentServiceFactory.mjs.map +1 -0
- package/lib/{storageImplementations.d.ts → storageImplementations.d.mts} +19 -7
- package/lib/storageImplementations.d.mts.map +1 -0
- package/lib/{storageImplementations.js → storageImplementations.mjs} +20 -11
- package/lib/storageImplementations.mjs.map +1 -0
- package/lib/test/types/validateReplayDriverPrevious.generated.d.mts +2 -0
- package/lib/test/types/validateReplayDriverPrevious.generated.d.mts.map +1 -0
- package/lib/test/types/{validateReplayDriverPrevious.js → validateReplayDriverPrevious.generated.mjs} +1 -3
- package/lib/test/types/validateReplayDriverPrevious.generated.mjs.map +1 -0
- package/package.json +79 -47
- package/prettier.config.cjs +8 -0
- package/src/emptyDeltaStorageService.ts +14 -13
- package/src/index.ts +10 -4
- package/src/replayController.ts +61 -55
- package/src/replayDocumentDeltaConnection.ts +326 -318
- package/src/replayDocumentService.ts +48 -44
- package/src/replayDocumentServiceFactory.ts +59 -47
- package/src/storageImplementations.ts +168 -153
- package/tsconfig.json +11 -13
- package/dist/emptyDeltaStorageService.js.map +0 -1
- package/dist/index.js +0 -21
- package/dist/index.js.map +0 -1
- package/dist/packageVersion.d.ts +0 -9
- package/dist/packageVersion.d.ts.map +0 -1
- package/dist/packageVersion.js +0 -12
- package/dist/packageVersion.js.map +0 -1
- package/dist/replayController.js.map +0 -1
- package/dist/replayDocumentDeltaConnection.js.map +0 -1
- package/dist/replayDocumentService.js.map +0 -1
- package/dist/replayDocumentServiceFactory.js.map +0 -1
- package/dist/storageImplementations.js.map +0 -1
- package/lib/emptyDeltaStorageService.d.ts.map +0 -1
- package/lib/emptyDeltaStorageService.js.map +0 -1
- package/lib/index.d.ts +0 -9
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -9
- package/lib/index.js.map +0 -1
- package/lib/packageVersion.d.ts +0 -9
- package/lib/packageVersion.d.ts.map +0 -1
- package/lib/packageVersion.js +0 -9
- package/lib/packageVersion.js.map +0 -1
- package/lib/replayController.d.ts.map +0 -1
- package/lib/replayController.js.map +0 -1
- package/lib/replayDocumentDeltaConnection.d.ts.map +0 -1
- package/lib/replayDocumentDeltaConnection.js.map +0 -1
- package/lib/replayDocumentService.d.ts.map +0 -1
- package/lib/replayDocumentService.js.map +0 -1
- package/lib/replayDocumentServiceFactory.d.ts.map +0 -1
- package/lib/replayDocumentServiceFactory.js.map +0 -1
- package/lib/storageImplementations.d.ts.map +0 -1
- package/lib/storageImplementations.js.map +0 -1
- package/lib/test/types/validateReplayDriverPrevious.d.ts +0 -2
- package/lib/test/types/validateReplayDriverPrevious.d.ts.map +0 -1
- package/lib/test/types/validateReplayDriverPrevious.js.map +0 -1
- package/src/packageVersion.ts +0 -9
- package/tsconfig.esnext.json +0 -7
- /package/lib/{emptyDeltaStorageService.d.ts → emptyDeltaStorageService.d.mts} +0 -0
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.StaticStorageDocumentServiceFactory = exports.StaticStorageDocumentService = exports.OpStorage = exports.SnapshotStorage = exports.FileSnapshotReader = void 0;
|
|
8
|
-
const
|
|
8
|
+
const core_utils_1 = require("@fluidframework/core-utils");
|
|
9
9
|
const driver_utils_1 = require("@fluidframework/driver-utils");
|
|
10
|
-
const emptyDeltaStorageService_1 = require("./emptyDeltaStorageService");
|
|
11
|
-
const replayController_1 = require("./replayController");
|
|
10
|
+
const emptyDeltaStorageService_1 = require("./emptyDeltaStorageService.cjs");
|
|
11
|
+
const replayController_1 = require("./replayController.cjs");
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
12
15
|
class FileSnapshotReader extends replayController_1.ReadDocumentStorageServiceBase {
|
|
13
16
|
constructor(json) {
|
|
14
17
|
super();
|
|
@@ -35,6 +38,7 @@ class FileSnapshotReader extends replayController_1.ReadDocumentStorageServiceBa
|
|
|
35
38
|
return this.docTree;
|
|
36
39
|
}
|
|
37
40
|
if (versionRequested.treeId !== FileSnapshotReader.FileStorageVersionTreeId) {
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
38
42
|
throw new Error(`Unknown version id: ${versionRequested}`);
|
|
39
43
|
}
|
|
40
44
|
let snapshotTree = this.trees[versionRequested.id];
|
|
@@ -58,12 +62,15 @@ class FileSnapshotReader extends replayController_1.ReadDocumentStorageServiceBa
|
|
|
58
62
|
exports.FileSnapshotReader = FileSnapshotReader;
|
|
59
63
|
// IVersion.treeId used to communicate between getVersions() & getSnapshotTree() calls to indicate IVersion is ours.
|
|
60
64
|
FileSnapshotReader.FileStorageVersionTreeId = "FileStorageTreeId";
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
61
68
|
class SnapshotStorage extends replayController_1.ReadDocumentStorageServiceBase {
|
|
62
69
|
constructor(storage, docTree) {
|
|
63
70
|
super();
|
|
64
71
|
this.storage = storage;
|
|
65
72
|
this.docTree = docTree;
|
|
66
|
-
(0,
|
|
73
|
+
(0, core_utils_1.assert)(!!this.docTree, 0x0b0 /* "Missing document snapshot tree!" */);
|
|
67
74
|
}
|
|
68
75
|
async getVersions(versionId, count) {
|
|
69
76
|
if (this.docId === undefined || this.docId === versionId || versionId === null) {
|
|
@@ -85,6 +92,9 @@ class SnapshotStorage extends replayController_1.ReadDocumentStorageServiceBase
|
|
|
85
92
|
}
|
|
86
93
|
}
|
|
87
94
|
exports.SnapshotStorage = SnapshotStorage;
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
88
98
|
class OpStorage extends replayController_1.ReadDocumentStorageServiceBase {
|
|
89
99
|
async getVersions(versionId, count) {
|
|
90
100
|
return [];
|
|
@@ -98,14 +108,11 @@ class OpStorage extends replayController_1.ReadDocumentStorageServiceBase {
|
|
|
98
108
|
}
|
|
99
109
|
exports.OpStorage = OpStorage;
|
|
100
110
|
class StaticStorageDocumentService {
|
|
101
|
-
constructor(storage) {
|
|
111
|
+
constructor(resolvedUrl, storage) {
|
|
112
|
+
this.resolvedUrl = resolvedUrl;
|
|
102
113
|
this.storage = storage;
|
|
103
114
|
}
|
|
104
115
|
dispose() { }
|
|
105
|
-
// TODO: Issue-2109 Implement detach container api or put appropriate comment.
|
|
106
|
-
get resolvedUrl() {
|
|
107
|
-
throw new Error("Not implemented");
|
|
108
|
-
}
|
|
109
116
|
async connectToStorage() {
|
|
110
117
|
return this.storage;
|
|
111
118
|
}
|
|
@@ -118,13 +125,15 @@ class StaticStorageDocumentService {
|
|
|
118
125
|
}
|
|
119
126
|
}
|
|
120
127
|
exports.StaticStorageDocumentService = StaticStorageDocumentService;
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
121
131
|
class StaticStorageDocumentServiceFactory {
|
|
122
132
|
constructor(storage) {
|
|
123
133
|
this.storage = storage;
|
|
124
|
-
this.protocolName = "fluid-static-storage:";
|
|
125
134
|
}
|
|
126
135
|
async createDocumentService(fileURL, logger, clientIsSummarizer) {
|
|
127
|
-
return new StaticStorageDocumentService(this.storage);
|
|
136
|
+
return new StaticStorageDocumentService(fileURL, this.storage);
|
|
128
137
|
}
|
|
129
138
|
// TODO: Issue-2109 Implement detach container api or put appropriate comment.
|
|
130
139
|
async createContainer(createNewSummary, resolvedUrl, logger, clientIsSummarizer) {
|
|
@@ -132,4 +141,4 @@ class StaticStorageDocumentServiceFactory {
|
|
|
132
141
|
}
|
|
133
142
|
}
|
|
134
143
|
exports.StaticStorageDocumentServiceFactory = StaticStorageDocumentServiceFactory;
|
|
135
|
-
//# sourceMappingURL=storageImplementations.
|
|
144
|
+
//# sourceMappingURL=storageImplementations.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storageImplementations.cjs","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AASpD,+DAAiE;AASjE,6EAAsE;AACtE,6DAAoE;AAWpE;;GAEG;AACH,MAAa,kBACZ,SAAQ,iDAA8B;IAYtC,YAAmB,IAAmB;QACrC,KAAK,EAAE,CAAC;QAJU,YAAO,GAA6B,EAAE,CAAC;QACvC,UAAK,GAAqC,EAAE,CAAC;QAI/D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE5B,IAAI,CAAC,K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AAI,OAAO,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;CACD;AApBD,oEAoBC;AAED;;GAEG;AACH,MAAa,mCAAmC;IAC/C,YAAsC,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAAG,CAAC;IAEnE,KAAK,CAAC,qBAAqB,CACjC,OAAqB,EACrB,MAA4B,EAC5B,kBAA4B;QAE5B,OAAO,IAAI,4BAA4B,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CAC3B,gBAA8B,EAC9B,WAAyB,EACzB,MAA2B,EAC3B,kBAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AApBD,kFAoBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport {\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceFactory,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport {\n\tIClient,\n\tISnapshotTree,\n\tITree,\n\tIVersion,\n\tISummaryTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport { EmptyDeltaStorageService } from \"./emptyDeltaStorageService\";\nimport { ReadDocumentStorageServiceBase } from \"./replayController\";\n\n/**\n * Structure of snapshot on disk, when we store snapshot as single file\n * @internal\n */\nexport interface IFileSnapshot {\n\ttree: ITree;\n\tcommits: { [key: string]: ITree };\n}\n\n/**\n * @internal\n */\nexport class FileSnapshotReader\n\textends ReadDocumentStorageServiceBase\n\timplements IDocumentStorageService\n{\n\t// IVersion.treeId used to communicate between getVersions() & getSnapshotTree() calls to indicate IVersion is ours.\n\tprotected static readonly FileStorageVersionTreeId = \"FileStorageTreeId\";\n\n\tprotected docId?: string;\n\tprotected docTree: ISnapshotTree;\n\tprotected blobs: Map<string, ArrayBufferLike>;\n\tprotected readonly commits: { [key: string]: ITree } = {};\n\tprotected readonly trees: { [key: string]: ISnapshotTree } = {};\n\n\tpublic constructor(json: IFileSnapshot) {\n\t\tsuper();\n\t\tthis.commits = json.commits;\n\n\t\tthis.blobs = new Map<string, ArrayBufferLike>();\n\t\tthis.docTree = buildSnapshotTree(json.tree.entries, this.blobs);\n\t}\n\n\tpublic async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n\t\tif (this.docId === undefined || this.docId === versionId || versionId === null) {\n\t\t\tif (versionId !== null) {\n\t\t\t\tthis.docId = versionId;\n\t\t\t}\n\t\t\treturn [{ id: \"latest\", treeId: \"\" }];\n\t\t}\n\n\t\tif (this.commits[versionId] !== undefined) {\n\t\t\treturn [{ id: versionId, treeId: FileSnapshotReader.FileStorageVersionTreeId }];\n\t\t}\n\t\tthrow new Error(`Unknown version ID: ${versionId}`);\n\t}\n\n\tpublic async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n\t\tif (!versionRequested || versionRequested.id === \"latest\") {\n\t\t\treturn this.docTree;\n\t\t}\n\t\tif (versionRequested.treeId !== FileSnapshotReader.FileStorageVersionTreeId) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\t\tthrow new Error(`Unknown version id: ${versionRequested}`);\n\t\t}\n\n\t\tlet snapshotTree = this.trees[versionRequested.id];\n\t\tif (snapshotTree === undefined) {\n\t\t\tconst tree = this.commits[versionRequested.id];\n\t\t\tif (tree === undefined) {\n\t\t\t\tthrow new Error(`Can't find version ${versionRequested.id}`);\n\t\t\t}\n\n\t\t\tthis.trees[versionRequested.id] = snapshotTree = buildSnapshotTree(\n\t\t\t\ttree.entries,\n\t\t\t\tthis.blobs,\n\t\t\t);\n\t\t}\n\t\treturn snapshotTree;\n\t}\n\n\tpublic async readBlob(blobId: string): Promise<ArrayBufferLike> {\n\t\tconst blob = this.blobs.get(blobId);\n\t\tif (blob !== undefined) {\n\t\t\treturn blob;\n\t\t}\n\t\tthrow new Error(`Unknown blob ID: ${blobId}`);\n\t}\n}\n\n/**\n * @internal\n */\nexport class SnapshotStorage extends ReadDocumentStorageServiceBase {\n\tprotected docId?: string;\n\n\tconstructor(\n\t\tprotected readonly storage: IDocumentStorageService,\n\t\tprotected readonly docTree: ISnapshotTree | null,\n\t) {\n\t\tsuper();\n\t\tassert(!!this.docTree, 0x0b0 /* \"Missing document snapshot tree!\" */);\n\t}\n\n\tpublic async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n\t\tif (this.docId === undefined || this.docId === versionId || versionId === null) {\n\t\t\tif (versionId !== null) {\n\t\t\t\tthis.docId = versionId;\n\t\t\t}\n\t\t\treturn [{ id: \"latest\", treeId: \"\" }];\n\t\t}\n\t\treturn this.storage.getVersions(versionId, count);\n\t}\n\n\tpublic async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n\t\tif (versionRequested && versionRequested.id !== \"latest\") {\n\t\t\treturn this.storage.getSnapshotTree(versionRequested);\n\t\t}\n\n\t\treturn this.docTree;\n\t}\n\n\tpublic async readBlob(blobId: string): Promise<ArrayBufferLike> {\n\t\treturn this.storage.readBlob(blobId);\n\t}\n}\n\n/**\n * @internal\n */\nexport class OpStorage extends ReadDocumentStorageServiceBase {\n\tpublic async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n\t\treturn [];\n\t}\n\n\tpublic async getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null> {\n\t\tthrow new Error(\"no snapshot tree should be asked when playing ops\");\n\t}\n\n\tpublic async readBlob(blobId: string): Promise<ArrayBufferLike> {\n\t\tthrow new Error(`Unknown blob ID: ${blobId}`);\n\t}\n}\n\nexport class StaticStorageDocumentService implements IDocumentService {\n\tconstructor(\n\t\tpublic readonly resolvedUrl: IResolvedUrl,\n\t\tprivate readonly storage: IDocumentStorageService,\n\t) {}\n\n\tpublic dispose() {}\n\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\treturn this.storage;\n\t}\n\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\treturn new EmptyDeltaStorageService();\n\t}\n\n\tpublic async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n\t\t// We have no delta stream, so make it not return forever...\n\t\treturn new Promise(() => {});\n\t}\n}\n\n/**\n * @internal\n */\nexport class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {\n\tpublic constructor(protected readonly storage: IDocumentStorageService) {}\n\n\tpublic async createDocumentService(\n\t\tfileURL: IResolvedUrl,\n\t\tlogger?: ITelemetryLoggerExt,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\treturn new StaticStorageDocumentService(fileURL, this.storage);\n\t}\n\n\t// TODO: Issue-2109 Implement detach container api or put appropriate comment.\n\tpublic async createContainer(\n\t\tcreateNewSummary: ISummaryTree,\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger: ITelemetryLoggerExt,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\tthrow new Error(\"Not implemented\");\n\t}\n}\n"]}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { IDocumentDeltaConnection, IDocumentDeltaStorageService, IDocumentService, IDocumentServiceFactory, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
6
|
import { IClient, ISnapshotTree, ITree, IVersion, ISummaryTree } from "@fluidframework/protocol-definitions";
|
|
7
|
-
import {
|
|
7
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
8
8
|
import { ReadDocumentStorageServiceBase } from "./replayController";
|
|
9
9
|
/**
|
|
10
10
|
* Structure of snapshot on disk, when we store snapshot as single file
|
|
11
|
+
* @internal
|
|
11
12
|
*/
|
|
12
13
|
export interface IFileSnapshot {
|
|
13
14
|
tree: ITree;
|
|
@@ -15,6 +16,9 @@ export interface IFileSnapshot {
|
|
|
15
16
|
[key: string]: ITree;
|
|
16
17
|
};
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
18
22
|
export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
19
23
|
protected static readonly FileStorageVersionTreeId = "FileStorageTreeId";
|
|
20
24
|
protected docId?: string;
|
|
@@ -31,6 +35,9 @@ export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase i
|
|
|
31
35
|
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
32
36
|
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
33
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
34
41
|
export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
35
42
|
protected readonly storage: IDocumentStorageService;
|
|
36
43
|
protected readonly docTree: ISnapshotTree | null;
|
|
@@ -40,25 +47,30 @@ export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
|
40
47
|
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
41
48
|
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
42
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
43
53
|
export declare class OpStorage extends ReadDocumentStorageServiceBase {
|
|
44
54
|
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
45
55
|
getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null>;
|
|
46
56
|
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
47
57
|
}
|
|
48
58
|
export declare class StaticStorageDocumentService implements IDocumentService {
|
|
59
|
+
readonly resolvedUrl: IResolvedUrl;
|
|
49
60
|
private readonly storage;
|
|
50
|
-
constructor(storage: IDocumentStorageService);
|
|
61
|
+
constructor(resolvedUrl: IResolvedUrl, storage: IDocumentStorageService);
|
|
51
62
|
dispose(): void;
|
|
52
|
-
get resolvedUrl(): IResolvedUrl;
|
|
53
63
|
connectToStorage(): Promise<IDocumentStorageService>;
|
|
54
64
|
connectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;
|
|
55
65
|
connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;
|
|
56
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
57
70
|
export declare class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {
|
|
58
71
|
protected readonly storage: IDocumentStorageService;
|
|
59
|
-
readonly protocolName = "fluid-static-storage:";
|
|
60
72
|
constructor(storage: IDocumentStorageService);
|
|
61
|
-
createDocumentService(fileURL: IResolvedUrl, logger?:
|
|
62
|
-
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger:
|
|
73
|
+
createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
74
|
+
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
63
75
|
}
|
|
64
76
|
//# sourceMappingURL=storageImplementations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageImplementations.d.ts","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"storageImplementations.d.ts","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,MAAM,oCAAoC,CA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AhC,OAAO,EAAE,uBAAuB;IAEzD,qBAAqB,CACjC,OAAO,EAAE,YAAY,EACrB,MAAM,CAAC,EAAE,mBAAmB,EAC5B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;IAKf,eAAe,CAC3B,gBAAgB,EAAE,YAAY,EAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,mBAAmB,EAC3B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;CAG5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.38.3"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emptyDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,oCAAoC;OACnF,EAAE,yBAAyB,EAAE,MAAM,sCAAsC;AAGhF,qBAAa,wBAAyB,YAAW,4BAA4B;IAC5E;;;;;OAKG;IACI,aAAa,CACnB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAGvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emptyDeltaStorageService.mjs","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAII,EAAE,kBAAkB,EAAE,MAAM,8BAA8B;AAEjE,MAAM,OAAO,wBAAwB;IACpC;;;;;OAKG;IACI,aAAa,CACnB,IAAY,EACZ,EAAsB,EACtB,WAAyB,EACzB,UAAoB;QAEpB,OAAO,kBAAkB,CAAC;IAC3B,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDocumentDeltaStorageService, IStream } from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { emptyMessageStream } from \"@fluidframework/driver-utils\";\n\nexport class EmptyDeltaStorageService implements IDocumentDeltaStorageService {\n\t/**\n\t * Returns ops from the list of ops generated till now.\n\t * @param from - Ops are returned from + 1.\n\t * @param to - Op are returned from to - 1.\n\t * @returns Array of ops requested by the user.\n\t */\n\tpublic fetchMessages(\n\t\tfrom: number,\n\t\tto: number | undefined,\n\t\tabortSignal?: AbortSignal,\n\t\tcachedOnly?: boolean,\n\t): IStream<ISequencedDocumentMessage[]> {\n\t\treturn emptyMessageStream;\n\t}\n}\n"]}
|
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
export { ReadDocumentStorageServiceBase, ReplayController } from "./replayController.mjs";
|
|
6
|
+
export { ReplayDocumentService } from "./replayDocumentService.mjs";
|
|
7
|
+
export { ReplayDocumentServiceFactory } from "./replayDocumentServiceFactory.mjs";
|
|
8
|
+
export { FileSnapshotReader, IFileSnapshot, OpStorage, SnapshotStorage, StaticStorageDocumentServiceFactory, } from "./storageImplementations.mjs";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,8BAA8B,EAAE,gBAAgB,EAAE;OACpD,EAAE,qBAAqB,EAAE;OACzB,EAAE,4BAA4B,EAAE;OAChC,EACN,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,eAAe,EACf,mCAAmC,GACnC"}
|
package/lib/index.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
export { ReadDocumentStorageServiceBase, ReplayController } from "./replayController.mjs";
|
|
6
|
+
export { ReplayDocumentService } from "./replayDocumentService.mjs";
|
|
7
|
+
export { ReplayDocumentServiceFactory } from "./replayDocumentServiceFactory.mjs";
|
|
8
|
+
export { FileSnapshotReader, OpStorage, SnapshotStorage, StaticStorageDocumentServiceFactory, } from "./storageImplementations.mjs";
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,8BAA8B,EAAE,gBAAgB,EAAE;OACpD,EAAE,qBAAqB,EAAE;OACzB,EAAE,4BAA4B,EAAE;OAChC,EACN,kBAAkB,EAElB,SAAS,EACT,eAAe,EACf,mCAAmC,GACnC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ReadDocumentStorageServiceBase, ReplayController } from \"./replayController\";\nexport { ReplayDocumentService } from \"./replayDocumentService\";\nexport { ReplayDocumentServiceFactory } from \"./replayDocumentServiceFactory\";\nexport {\n\tFileSnapshotReader,\n\tIFileSnapshot,\n\tOpStorage,\n\tSnapshotStorage,\n\tStaticStorageDocumentServiceFactory,\n} from \"./storageImplementations\";\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as api from '@fluidframework/protocol-definitions';
|
|
2
|
+
import * as api_2 from '@fluidframework/driver-definitions';
|
|
3
|
+
import { IClient } from '@fluidframework/protocol-definitions';
|
|
4
|
+
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
5
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
6
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
7
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
8
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
9
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
11
|
+
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
12
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
13
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
14
|
+
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
15
|
+
|
|
16
|
+
/* Excluded from this release type: FileSnapshotReader */
|
|
17
|
+
|
|
18
|
+
/* Excluded from this release type: IFileSnapshot */
|
|
19
|
+
|
|
20
|
+
/* Excluded from this release type: OpStorage */
|
|
21
|
+
|
|
22
|
+
/* Excluded from this release type: ReadDocumentStorageServiceBase */
|
|
23
|
+
|
|
24
|
+
/* Excluded from this release type: ReplayController */
|
|
25
|
+
|
|
26
|
+
/* Excluded from this release type: ReplayDocumentService */
|
|
27
|
+
|
|
28
|
+
/* Excluded from this release type: ReplayDocumentServiceFactory */
|
|
29
|
+
|
|
30
|
+
/* Excluded from this release type: SnapshotStorage */
|
|
31
|
+
|
|
32
|
+
/* Excluded from this release type: StaticStorageDocumentServiceFactory */
|
|
33
|
+
|
|
34
|
+
export { }
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as api from '@fluidframework/protocol-definitions';
|
|
2
|
+
import * as api_2 from '@fluidframework/driver-definitions';
|
|
3
|
+
import { IClient } from '@fluidframework/protocol-definitions';
|
|
4
|
+
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
5
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
6
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
7
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
8
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
9
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
11
|
+
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
12
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
13
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
14
|
+
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
15
|
+
|
|
16
|
+
/* Excluded from this release type: FileSnapshotReader */
|
|
17
|
+
|
|
18
|
+
/* Excluded from this release type: IDocumentService */
|
|
19
|
+
|
|
20
|
+
/* Excluded from this release type: IDocumentServiceFactory */
|
|
21
|
+
|
|
22
|
+
/* Excluded from this release type: IDocumentStorageService */
|
|
23
|
+
|
|
24
|
+
/* Excluded from this release type: IFileSnapshot */
|
|
25
|
+
|
|
26
|
+
/* Excluded from this release type: IResolvedUrl */
|
|
27
|
+
|
|
28
|
+
/* Excluded from this release type: ISummaryContext */
|
|
29
|
+
|
|
30
|
+
/* Excluded from this release type: OpStorage */
|
|
31
|
+
|
|
32
|
+
/* Excluded from this release type: ReadDocumentStorageServiceBase */
|
|
33
|
+
|
|
34
|
+
/* Excluded from this release type: ReplayController */
|
|
35
|
+
|
|
36
|
+
/* Excluded from this release type: ReplayDocumentService */
|
|
37
|
+
|
|
38
|
+
/* Excluded from this release type: ReplayDocumentServiceFactory */
|
|
39
|
+
|
|
40
|
+
/* Excluded from this release type: SnapshotStorage */
|
|
41
|
+
|
|
42
|
+
/* Excluded from this release type: StaticStorageDocumentServiceFactory */
|
|
43
|
+
|
|
44
|
+
export { }
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as api from '@fluidframework/protocol-definitions';
|
|
2
|
+
import * as api_2 from '@fluidframework/driver-definitions';
|
|
3
|
+
import { IClient } from '@fluidframework/protocol-definitions';
|
|
4
|
+
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
5
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
6
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
7
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
8
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
9
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
11
|
+
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
12
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
13
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
14
|
+
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
15
|
+
|
|
16
|
+
/* Excluded from this release type: FileSnapshotReader */
|
|
17
|
+
|
|
18
|
+
/* Excluded from this release type: IDocumentService */
|
|
19
|
+
|
|
20
|
+
/* Excluded from this release type: IDocumentServiceFactory */
|
|
21
|
+
|
|
22
|
+
/* Excluded from this release type: IDocumentStorageService */
|
|
23
|
+
|
|
24
|
+
/* Excluded from this release type: IFileSnapshot */
|
|
25
|
+
|
|
26
|
+
/* Excluded from this release type: IResolvedUrl */
|
|
27
|
+
|
|
28
|
+
/* Excluded from this release type: ISummaryContext */
|
|
29
|
+
|
|
30
|
+
/* Excluded from this release type: OpStorage */
|
|
31
|
+
|
|
32
|
+
/* Excluded from this release type: ReadDocumentStorageServiceBase */
|
|
33
|
+
|
|
34
|
+
/* Excluded from this release type: ReplayController */
|
|
35
|
+
|
|
36
|
+
/* Excluded from this release type: ReplayDocumentService */
|
|
37
|
+
|
|
38
|
+
/* Excluded from this release type: ReplayDocumentServiceFactory */
|
|
39
|
+
|
|
40
|
+
/* Excluded from this release type: SnapshotStorage */
|
|
41
|
+
|
|
42
|
+
/* Excluded from this release type: StaticStorageDocumentServiceFactory */
|
|
43
|
+
|
|
44
|
+
export { }
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import * as api from '@fluidframework/protocol-definitions';
|
|
2
|
+
import * as api_2 from '@fluidframework/driver-definitions';
|
|
3
|
+
import { IClient } from '@fluidframework/protocol-definitions';
|
|
4
|
+
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
5
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
6
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
7
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
8
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
9
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
10
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
11
|
+
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
12
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
13
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
14
|
+
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
20
|
+
protected static readonly FileStorageVersionTreeId = "FileStorageTreeId";
|
|
21
|
+
protected docId?: string;
|
|
22
|
+
protected docTree: ISnapshotTree;
|
|
23
|
+
protected blobs: Map<string, ArrayBufferLike>;
|
|
24
|
+
protected readonly commits: {
|
|
25
|
+
[key: string]: ITree;
|
|
26
|
+
};
|
|
27
|
+
protected readonly trees: {
|
|
28
|
+
[key: string]: ISnapshotTree;
|
|
29
|
+
};
|
|
30
|
+
constructor(json: IFileSnapshot);
|
|
31
|
+
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
32
|
+
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
33
|
+
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Structure of snapshot on disk, when we store snapshot as single file
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export declare interface IFileSnapshot {
|
|
41
|
+
tree: ITree;
|
|
42
|
+
commits: {
|
|
43
|
+
[key: string]: ITree;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare class OpStorage extends ReadDocumentStorageServiceBase {
|
|
51
|
+
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
52
|
+
getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null>;
|
|
53
|
+
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Partial implementation of IDocumentStorageService
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
61
|
+
abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;
|
|
62
|
+
abstract getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
|
|
63
|
+
abstract readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
64
|
+
uploadSummaryWithContext(summary: api.ISummaryTree, context: ISummaryContext): Promise<string>;
|
|
65
|
+
createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse>;
|
|
66
|
+
downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree>;
|
|
67
|
+
get repositoryUrl(): string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Replay controller object
|
|
72
|
+
* It controls where we start (snapshot, local file, no snapshots)
|
|
73
|
+
* As well as dispatch of ops
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
export declare abstract class ReplayController extends ReadDocumentStorageServiceBase {
|
|
77
|
+
/**
|
|
78
|
+
* Initialize reply controller
|
|
79
|
+
* @param documentService - the real document service
|
|
80
|
+
* @returns Whether or not the controller should be used.
|
|
81
|
+
* If `false` is returned, caller should fallback to original storage.
|
|
82
|
+
*/
|
|
83
|
+
abstract initStorage(documentService: IDocumentService): Promise<boolean>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns sequence number to start processing ops
|
|
86
|
+
* Should be zero if not using snapshot, and snapshot seq# otherwise
|
|
87
|
+
*/
|
|
88
|
+
abstract getStartingOpSequence(): Promise<number>;
|
|
89
|
+
/**
|
|
90
|
+
* Returns last op number to fetch from current op
|
|
91
|
+
* Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
|
|
92
|
+
* @param currentOp - current op
|
|
93
|
+
*/
|
|
94
|
+
abstract fetchTo(currentOp: number): number | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Returns true if no more ops should be processed (or downloaded for future processing).
|
|
97
|
+
* It's called at end of each batch with latest op timestamp.
|
|
98
|
+
* Also it's called when there are no more ops available (lastTimeStamp === undefined).
|
|
99
|
+
* If false is returned and there are no more ops, request for more ops is made every 2 seconds.
|
|
100
|
+
* Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
|
|
101
|
+
* @param currentOp - current op
|
|
102
|
+
* @param lastTimeStamp - timestamp of last op (if more ops are available). Undefined otherwise.
|
|
103
|
+
*/
|
|
104
|
+
abstract isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Replay batch of ops
|
|
107
|
+
* NOTE: new batch of ops is fetched (fetchTo() & isDoneFetch() APIs are called) while this call is in flights
|
|
108
|
+
* @param emitter - callback to emit ops
|
|
109
|
+
* @param fetchedOps - ops to process
|
|
110
|
+
*/
|
|
111
|
+
abstract replay(emitter: (op: api.ISequencedDocumentMessage[]) => void, fetchedOps: api.ISequencedDocumentMessage[]): Promise<void>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The Replay document service dummies out the snapshot and the delta storage.
|
|
116
|
+
* Delta connection simulates the socket by fetching the ops from delta storage
|
|
117
|
+
* and emitting them with a pre determined delay
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
export declare class ReplayDocumentService implements api_2.IDocumentService {
|
|
121
|
+
private readonly controller;
|
|
122
|
+
private readonly deltaStorage;
|
|
123
|
+
static create(documentService: api_2.IDocumentService, controller: ReplayController): Promise<api_2.IDocumentService>;
|
|
124
|
+
constructor(controller: api_2.IDocumentStorageService, deltaStorage: api_2.IDocumentDeltaConnection);
|
|
125
|
+
dispose(): void;
|
|
126
|
+
get resolvedUrl(): api_2.IResolvedUrl;
|
|
127
|
+
/**
|
|
128
|
+
* Connects to a storage endpoint for snapshot service and blobs.
|
|
129
|
+
* @returns returns the dummy document storage service for replay driver.
|
|
130
|
+
*/
|
|
131
|
+
connectToStorage(): Promise<api_2.IDocumentStorageService>;
|
|
132
|
+
/**
|
|
133
|
+
* Connects to a delta storage endpoint for getting ops between a range.
|
|
134
|
+
* @returns returns the dummy document delta storage service for replay driver.
|
|
135
|
+
*/
|
|
136
|
+
connectToDeltaStorage(): Promise<api_2.IDocumentDeltaStorageService>;
|
|
137
|
+
/**
|
|
138
|
+
* Connects to a delta storage endpoint of provided documentService to get ops and then replaying
|
|
139
|
+
* them so as to mimic a delta stream endpoint.
|
|
140
|
+
* @param client - Client that connects to socket.
|
|
141
|
+
* @returns returns the delta stream service which replay ops from --from to --to arguments.
|
|
142
|
+
*/
|
|
143
|
+
connectToDeltaStream(client: IClient): Promise<api_2.IDocumentDeltaConnection>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
export declare class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
|
|
150
|
+
private readonly documentServiceFactory;
|
|
151
|
+
private readonly controller;
|
|
152
|
+
static create(from: number, to: number, documentServiceFactory: IDocumentServiceFactory): ReplayDocumentServiceFactory;
|
|
153
|
+
constructor(documentServiceFactory: IDocumentServiceFactory, controller: ReplayController);
|
|
154
|
+
/**
|
|
155
|
+
* Creates a replay document service which uses the document service of provided
|
|
156
|
+
* documentServiceFactory for connecting to delta stream endpoint.
|
|
157
|
+
* @param resolvedUrl - URL to be used for connecting to endpoints.
|
|
158
|
+
* @returns returns the requested document service
|
|
159
|
+
*/
|
|
160
|
+
createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
161
|
+
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
168
|
+
protected readonly storage: IDocumentStorageService;
|
|
169
|
+
protected readonly docTree: ISnapshotTree | null;
|
|
170
|
+
protected docId?: string;
|
|
171
|
+
constructor(storage: IDocumentStorageService, docTree: ISnapshotTree | null);
|
|
172
|
+
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
173
|
+
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
174
|
+
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @internal
|
|
179
|
+
*/
|
|
180
|
+
export declare class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {
|
|
181
|
+
protected readonly storage: IDocumentStorageService;
|
|
182
|
+
constructor(storage: IDocumentStorageService);
|
|
183
|
+
createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
184
|
+
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export { }
|
|
@@ -6,6 +6,7 @@ import { IDocumentService, IDocumentStorageService, ISummaryContext } from "@flu
|
|
|
6
6
|
import * as api from "@fluidframework/protocol-definitions";
|
|
7
7
|
/**
|
|
8
8
|
* Partial implementation of IDocumentStorageService
|
|
9
|
+
* @internal
|
|
9
10
|
*/
|
|
10
11
|
export declare abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
11
12
|
abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;
|
|
@@ -20,13 +21,14 @@ export declare abstract class ReadDocumentStorageServiceBase implements IDocumen
|
|
|
20
21
|
* Replay controller object
|
|
21
22
|
* It controls where we start (snapshot, local file, no snapshots)
|
|
22
23
|
* As well as dispatch of ops
|
|
24
|
+
* @internal
|
|
23
25
|
*/
|
|
24
26
|
export declare abstract class ReplayController extends ReadDocumentStorageServiceBase {
|
|
25
27
|
/**
|
|
26
28
|
* Initialize reply controller
|
|
27
29
|
* @param documentService - the real document service
|
|
28
|
-
* @returns
|
|
29
|
-
* If false is returned, caller should fallback to original storage.
|
|
30
|
+
* @returns Whether or not the controller should be used.
|
|
31
|
+
* If `false` is returned, caller should fallback to original storage.
|
|
30
32
|
*/
|
|
31
33
|
abstract initStorage(documentService: IDocumentService): Promise<boolean>;
|
|
32
34
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replayController.d.ts","sourceRoot":"","sources":["../src/replayController.ts"],"names":[],"mappings":"AAAA;;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AAE,KAAK,IAAI,EACtD,UAAU,EAAE,GAAG,CAAC,yBAAyB,EAAE,GACzC,OAAO,CAAC,IAAI,CAAC;CAChB"}
|
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Partial implementation of IDocumentStorageService
|
|
7
|
+
* @internal
|
|
7
8
|
*/
|
|
8
9
|
export class ReadDocumentStorageServiceBase {
|
|
9
10
|
async uploadSummaryWithContext(summary, context) {
|
|
10
|
-
|
|
11
|
+
throw new Error("Invalid operation");
|
|
11
12
|
}
|
|
12
13
|
async createBlob(file) {
|
|
13
|
-
|
|
14
|
+
throw new Error("Invalid operation");
|
|
14
15
|
}
|
|
15
16
|
async downloadSummary(handle) {
|
|
16
|
-
|
|
17
|
+
throw new Error("Invalid operation");
|
|
17
18
|
}
|
|
18
19
|
get repositoryUrl() {
|
|
19
20
|
throw new Error("Invalid operation");
|
|
@@ -23,7 +24,8 @@ export class ReadDocumentStorageServiceBase {
|
|
|
23
24
|
* Replay controller object
|
|
24
25
|
* It controls where we start (snapshot, local file, no snapshots)
|
|
25
26
|
* As well as dispatch of ops
|
|
27
|
+
* @internal
|
|
26
28
|
*/
|
|
27
29
|
export class ReplayController extends ReadDocumentStorageServiceBase {
|
|
28
30
|
}
|
|
29
|
-
//# sourceMappingURL=replayController.
|
|
31
|
+
//# sourceMappingURL=replayController.mjs.map
|