@fluidframework/local-driver 2.0.0-dev.2.3.0.115467 → 2.0.0-dev.4.1.0.148229
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 +19 -22
- package/.mocharc.js +2 -2
- package/api-extractor.json +4 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +2 -2
- package/dist/auth.js.map +1 -1
- package/dist/localCreateDocument.d.ts +8 -0
- package/dist/localCreateDocument.d.ts.map +1 -0
- package/dist/localCreateDocument.js +29 -0
- package/dist/localCreateDocument.js.map +1 -0
- package/dist/localDeltaStorageService.d.ts.map +1 -1
- package/dist/localDeltaStorageService.js.map +1 -1
- package/dist/localDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/localDocumentDeltaConnection.js.map +1 -1
- package/dist/localDocumentService.d.ts.map +1 -1
- package/dist/localDocumentService.js +4 -1
- package/dist/localDocumentService.js.map +1 -1
- package/dist/localDocumentServiceFactory.d.ts +0 -1
- package/dist/localDocumentServiceFactory.d.ts.map +1 -1
- package/dist/localDocumentServiceFactory.js +4 -20
- package/dist/localDocumentServiceFactory.js.map +1 -1
- package/dist/localDocumentStorageService.d.ts +5 -2
- package/dist/localDocumentStorageService.d.ts.map +1 -1
- package/dist/localDocumentStorageService.js +18 -4
- package/dist/localDocumentStorageService.js.map +1 -1
- package/dist/localResolver.d.ts.map +1 -1
- package/dist/localResolver.js.map +1 -1
- package/dist/localSessionStorageDb.d.ts.map +1 -1
- package/dist/localSessionStorageDb.js +3 -2
- package/dist/localSessionStorageDb.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/lib/auth.d.ts +12 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +38 -0
- package/lib/auth.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +12 -0
- package/lib/index.js.map +1 -0
- package/lib/localCreateDocument.d.ts +8 -0
- package/lib/localCreateDocument.d.ts.map +1 -0
- package/lib/localCreateDocument.js +25 -0
- package/lib/localCreateDocument.js.map +1 -0
- package/lib/localDeltaStorageService.d.ts +19 -0
- package/lib/localDeltaStorageService.d.ts.map +1 -0
- package/lib/localDeltaStorageService.js +31 -0
- package/lib/localDeltaStorageService.js.map +1 -0
- package/lib/localDocumentDeltaConnection.d.ts +47 -0
- package/lib/localDocumentDeltaConnection.d.ts.map +1 -0
- package/lib/localDocumentDeltaConnection.js +88 -0
- package/lib/localDocumentDeltaConnection.js.map +1 -0
- package/lib/localDocumentService.d.ts +52 -0
- package/lib/localDocumentService.d.ts.map +1 -0
- package/lib/localDocumentService.js +80 -0
- package/lib/localDocumentService.js.map +1 -0
- package/lib/localDocumentServiceFactory.d.ts +43 -0
- package/lib/localDocumentServiceFactory.d.ts.map +1 -0
- package/lib/localDocumentServiceFactory.js +81 -0
- package/lib/localDocumentServiceFactory.js.map +1 -0
- package/lib/localDocumentStorageService.d.ts +27 -0
- package/lib/localDocumentStorageService.d.ts.map +1 -0
- package/lib/localDocumentStorageService.js +85 -0
- package/lib/localDocumentStorageService.js.map +1 -0
- package/lib/localResolver.d.ts +26 -0
- package/lib/localResolver.d.ts.map +1 -0
- package/lib/localResolver.js +70 -0
- package/lib/localResolver.js.map +1 -0
- package/lib/localSessionStorageDb.d.ts +10 -0
- package/lib/localSessionStorageDb.d.ts.map +1 -0
- package/lib/localSessionStorageDb.js +295 -0
- package/lib/localSessionStorageDb.js.map +1 -0
- package/lib/packageVersion.d.ts +9 -0
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/packageVersion.js +9 -0
- package/lib/packageVersion.js.map +1 -0
- package/package.json +59 -49
- package/prettier.config.cjs +1 -1
- package/src/auth.ts +35 -29
- package/src/localCreateDocument.ts +48 -0
- package/src/localDeltaStorageService.ts +26 -29
- package/src/localDocumentDeltaConnection.ts +89 -85
- package/src/localDocumentService.ts +108 -95
- package/src/localDocumentServiceFactory.ts +94 -122
- package/src/localDocumentStorageService.ts +35 -11
- package/src/localResolver.ts +55 -55
- package/src/localSessionStorageDb.ts +270 -263
- package/src/packageVersion.ts +1 -1
- package/tsconfig.esnext.json +7 -0
- package/tsconfig.json +9 -13
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
IDocumentDeltaStorageService,
|
|
8
|
-
IStream,
|
|
9
|
-
} from "@fluidframework/driver-definitions";
|
|
6
|
+
import { IDocumentDeltaStorageService, IStream } from "@fluidframework/driver-definitions";
|
|
10
7
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
11
8
|
import { IDatabaseManager } from "@fluidframework/server-services-core";
|
|
12
9
|
import { streamFromMessages } from "@fluidframework/driver-utils";
|
|
@@ -15,33 +12,33 @@ import { streamFromMessages } from "@fluidframework/driver-utils";
|
|
|
15
12
|
* Provides access to the underlying delta storage on the server for local driver.
|
|
16
13
|
*/
|
|
17
14
|
export class LocalDeltaStorageService implements IDocumentDeltaStorageService {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
constructor(
|
|
16
|
+
private readonly tenantId: string,
|
|
17
|
+
private readonly id: string,
|
|
18
|
+
private readonly databaseManager: IDatabaseManager,
|
|
19
|
+
) {}
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
public fetchMessages(
|
|
22
|
+
from: number,
|
|
23
|
+
to: number | undefined,
|
|
24
|
+
abortSignal?: AbortSignal,
|
|
25
|
+
cachedOnly?: boolean,
|
|
26
|
+
): IStream<ISequencedDocumentMessage[]> {
|
|
27
|
+
return streamFromMessages(this.getCore(from, to));
|
|
28
|
+
}
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
private async getCore(from: number, to?: number) {
|
|
31
|
+
const query = { documentId: this.id, tenantId: this.tenantId };
|
|
32
|
+
query["operation.sequenceNumber"] = {};
|
|
33
|
+
query["operation.sequenceNumber"].$gt = from - 1; // from is inclusive
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
// This looks like a bug. It used to work without setting $lt key. Now it does not
|
|
36
|
+
// Need follow up
|
|
37
|
+
query["operation.sequenceNumber"].$lt = to ?? Number.MAX_SAFE_INTEGER;
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
const allDeltas = await this.databaseManager.getDeltaCollection(this.tenantId, this.id);
|
|
40
|
+
const dbDeltas = await allDeltas.find(query, { "operation.sequenceNumber": 1 });
|
|
41
|
+
const messages = dbDeltas.map((delta) => delta.operation);
|
|
42
|
+
return messages;
|
|
43
|
+
}
|
|
47
44
|
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import { DocumentDeltaConnection } from "@fluidframework/driver-base";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
IClient,
|
|
9
|
+
IConnect,
|
|
10
|
+
IDocumentMessage,
|
|
11
|
+
NackErrorType,
|
|
12
12
|
} from "@fluidframework/protocol-definitions";
|
|
13
13
|
import { TelemetryNullLogger } from "@fluidframework/telemetry-utils";
|
|
14
14
|
import { LocalWebSocketServer } from "@fluidframework/server-local-server";
|
|
@@ -21,94 +21,98 @@ const testProtocolVersions = ["^0.3.0", "^0.2.0", "^0.1.0"];
|
|
|
21
21
|
* Represents a connection to a stream of delta updates
|
|
22
22
|
*/
|
|
23
23
|
export class LocalDocumentDeltaConnection extends DocumentDeltaConnection {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Create a LocalDocumentDeltaConnection
|
|
26
|
+
* Handle initial messages, contents or signals if they were in queue
|
|
27
|
+
*
|
|
28
|
+
* @param tenantId - the ID of the tenant
|
|
29
|
+
* @param id - document ID
|
|
30
|
+
* @param token - authorization token for storage service
|
|
31
|
+
* @param client - information about the client
|
|
32
|
+
* @param webSocketServer - web socket server to create connection
|
|
33
|
+
*/
|
|
34
|
+
public static async create(
|
|
35
|
+
tenantId: string,
|
|
36
|
+
id: string,
|
|
37
|
+
token: string,
|
|
38
|
+
client: IClient,
|
|
39
|
+
webSocketServer: IWebSocketServer,
|
|
40
|
+
timeoutMs = 60000,
|
|
41
|
+
): Promise<LocalDocumentDeltaConnection> {
|
|
42
|
+
const socket = (webSocketServer as LocalWebSocketServer).createConnection();
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
// Cast LocalWebSocket to SocketIOClient.Socket which is the socket that the base class needs. This is hacky
|
|
45
|
+
// but should be fine because this delta connection is for local use only.
|
|
46
|
+
const socketWithListener = socket as unknown as Socket;
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
const deltaConnection = new LocalDocumentDeltaConnection(socketWithListener, id);
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
const connectMessage: IConnect = {
|
|
51
|
+
client,
|
|
52
|
+
id,
|
|
53
|
+
mode: client.mode,
|
|
54
|
+
tenantId,
|
|
55
|
+
token, // Token is going to indicate tenant level information, etc...
|
|
56
|
+
versions: testProtocolVersions,
|
|
57
|
+
};
|
|
58
|
+
await deltaConnection.initialize(connectMessage, timeoutMs);
|
|
59
|
+
return deltaConnection;
|
|
60
|
+
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
constructor(socket: Socket, documentId: string) {
|
|
63
|
+
super(socket, documentId, new TelemetryNullLogger());
|
|
64
|
+
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
protected submitCore(type: string, messages: IDocumentMessage[]) {
|
|
67
|
+
this.emitMessages(type, [messages]);
|
|
68
|
+
}
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Submits a new delta operation to the server
|
|
72
|
+
*/
|
|
73
|
+
public submit(messages: IDocumentMessage[]): void {
|
|
74
|
+
// We use a promise resolve to force a turn break given message processing is sync
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
76
|
+
Promise.resolve().then(() => {
|
|
77
|
+
this.submitCore("submitOp", messages);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
/**
|
|
82
|
+
* Submits a new signal to the server
|
|
83
|
+
*/
|
|
84
|
+
public submitSignal(message: any): void {
|
|
85
|
+
this.submitCore("submitSignal", [message]);
|
|
86
|
+
}
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Send a "disconnect" message on the socket.
|
|
90
|
+
* @param disconnectReason - The reason of the disconnection.
|
|
91
|
+
*/
|
|
92
|
+
public disconnectClient(disconnectReason: string) {
|
|
93
|
+
this.socket.emit("disconnect", disconnectReason);
|
|
94
|
+
}
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
96
|
+
/**
|
|
97
|
+
* * Sends a "nack" message on the socket.
|
|
98
|
+
* @param code - An error code number that represents the error. It will be a valid HTTP error code.
|
|
99
|
+
* @param type - Type of the Nack.
|
|
100
|
+
* @param message - A message about the nack for debugging/logging/telemetry purposes.
|
|
101
|
+
*/
|
|
102
|
+
public nackClient(
|
|
103
|
+
code: number = 400,
|
|
104
|
+
type: NackErrorType = NackErrorType.ThrottlingError,
|
|
105
|
+
message: any,
|
|
106
|
+
) {
|
|
107
|
+
const nackMessage = {
|
|
108
|
+
operation: undefined,
|
|
109
|
+
sequenceNumber: -1,
|
|
110
|
+
content: {
|
|
111
|
+
code,
|
|
112
|
+
type,
|
|
113
|
+
message,
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
this.socket.emit("nack", "", [nackMessage]);
|
|
117
|
+
}
|
|
114
118
|
}
|
|
@@ -4,100 +4,112 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
IDocumentDeltaConnection,
|
|
8
|
+
IDocumentDeltaStorageService,
|
|
9
|
+
IDocumentService,
|
|
10
|
+
IDocumentServicePolicies,
|
|
11
|
+
IDocumentStorageService,
|
|
12
|
+
IResolvedUrl,
|
|
13
13
|
} from "@fluidframework/driver-definitions";
|
|
14
14
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
15
15
|
import { ITokenProvider } from "@fluidframework/routerlicious-driver";
|
|
16
16
|
import { GitManager } from "@fluidframework/server-services-client";
|
|
17
17
|
import { TestHistorian } from "@fluidframework/server-test-utils";
|
|
18
18
|
import { ILocalDeltaConnectionServer } from "@fluidframework/server-local-server";
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
LocalDeltaStorageService,
|
|
21
|
+
LocalDocumentDeltaConnection,
|
|
22
|
+
LocalDocumentStorageService,
|
|
23
|
+
} from ".";
|
|
20
24
|
/**
|
|
21
25
|
* Basic implementation of a document service for local use.
|
|
22
26
|
*/
|
|
23
27
|
export class LocalDocumentService implements IDocumentService {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @param localDeltaConnectionServer - delta connection server for ops
|
|
30
|
+
* @param tokenProvider - token provider
|
|
31
|
+
* @param tenantId - ID of tenant
|
|
32
|
+
* @param documentId - ID of document
|
|
33
|
+
*/
|
|
34
|
+
constructor(
|
|
35
|
+
public readonly resolvedUrl: IResolvedUrl,
|
|
36
|
+
private readonly localDeltaConnectionServer: ILocalDeltaConnectionServer,
|
|
37
|
+
private readonly tokenProvider: ITokenProvider,
|
|
38
|
+
private readonly tenantId: string,
|
|
39
|
+
private readonly documentId: string,
|
|
40
|
+
private readonly documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,
|
|
41
|
+
public readonly policies: IDocumentServicePolicies = {},
|
|
42
|
+
private readonly innerDocumentService?: IDocumentService,
|
|
43
|
+
) {}
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
public dispose() {}
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Creates and returns a document storage service for local use.
|
|
49
|
+
*/
|
|
50
|
+
public async connectToStorage(): Promise<IDocumentStorageService> {
|
|
51
|
+
return new LocalDocumentStorageService(
|
|
52
|
+
this.documentId,
|
|
53
|
+
new GitManager(
|
|
54
|
+
new TestHistorian(this.localDeltaConnectionServer.testDbFactory.testDatabase),
|
|
55
|
+
),
|
|
56
|
+
{
|
|
57
|
+
minBlobSize: 2048, // Test blob aggregation
|
|
58
|
+
maximumCacheDurationMs: 432_000_000, // 5 days in ms. Not actually enforced but shouldn't matter for any local driver scenario
|
|
59
|
+
},
|
|
60
|
+
this.localDeltaConnectionServer,
|
|
61
|
+
this.resolvedUrl,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
53
64
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Creates and returns a delta storage service for local use.
|
|
67
|
+
*/
|
|
68
|
+
public async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {
|
|
69
|
+
if (this.innerDocumentService) {
|
|
70
|
+
return this.innerDocumentService.connectToDeltaStorage();
|
|
71
|
+
}
|
|
72
|
+
return new LocalDeltaStorageService(
|
|
73
|
+
this.tenantId,
|
|
74
|
+
this.documentId,
|
|
75
|
+
this.localDeltaConnectionServer.databaseManager,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
66
78
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Creates and returns a delta stream for local use.
|
|
81
|
+
* @param client - client data
|
|
82
|
+
*/
|
|
83
|
+
public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {
|
|
84
|
+
if (this.policies.storageOnly === true) {
|
|
85
|
+
throw new Error("can't connect to delta stream in storage-only mode");
|
|
86
|
+
}
|
|
87
|
+
if (this.innerDocumentService) {
|
|
88
|
+
return this.innerDocumentService.connectToDeltaStream(client);
|
|
89
|
+
}
|
|
90
|
+
const ordererToken = await this.tokenProvider.fetchOrdererToken(
|
|
91
|
+
this.tenantId,
|
|
92
|
+
this.documentId,
|
|
93
|
+
);
|
|
94
|
+
const documentDeltaConnection = await LocalDocumentDeltaConnection.create(
|
|
95
|
+
this.tenantId,
|
|
96
|
+
this.documentId,
|
|
97
|
+
ordererToken.jwt,
|
|
98
|
+
client,
|
|
99
|
+
this.localDeltaConnectionServer.webSocketServer,
|
|
100
|
+
);
|
|
101
|
+
const clientId = documentDeltaConnection.clientId;
|
|
90
102
|
|
|
91
|
-
|
|
92
|
-
|
|
103
|
+
// Add this document service for the clientId in the document service factory.
|
|
104
|
+
this.documentDeltaConnectionsMap.set(clientId, documentDeltaConnection);
|
|
93
105
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
// Add a listener to remove this document service when the client is disconnected.
|
|
107
|
+
documentDeltaConnection.on("disconnect", () => {
|
|
108
|
+
this.documentDeltaConnectionsMap.delete(clientId);
|
|
109
|
+
});
|
|
98
110
|
|
|
99
|
-
|
|
100
|
-
|
|
111
|
+
return documentDeltaConnection;
|
|
112
|
+
}
|
|
101
113
|
}
|
|
102
114
|
|
|
103
115
|
/**
|
|
@@ -108,22 +120,23 @@ export class LocalDocumentService implements IDocumentService {
|
|
|
108
120
|
* @param documentId - ID of document
|
|
109
121
|
*/
|
|
110
122
|
export function createLocalDocumentService(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
resolvedUrl: IResolvedUrl,
|
|
124
|
+
localDeltaConnectionServer: ILocalDeltaConnectionServer,
|
|
125
|
+
tokenProvider: ITokenProvider,
|
|
126
|
+
tenantId: string,
|
|
127
|
+
documentId: string,
|
|
128
|
+
documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,
|
|
129
|
+
policies?: IDocumentServicePolicies,
|
|
130
|
+
innerDocumentService?: IDocumentService,
|
|
131
|
+
): IDocumentService {
|
|
132
|
+
return new LocalDocumentService(
|
|
133
|
+
resolvedUrl,
|
|
134
|
+
localDeltaConnectionServer,
|
|
135
|
+
tokenProvider,
|
|
136
|
+
tenantId,
|
|
137
|
+
documentId,
|
|
138
|
+
documentDeltaConnectionsMap,
|
|
139
|
+
policies,
|
|
140
|
+
innerDocumentService,
|
|
141
|
+
);
|
|
129
142
|
}
|