@fluidframework/driver-base 2.0.0-dev-rc.3.0.0.254274 → 2.0.0-dev-rc.3.0.0.254674

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.
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/dist/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/driver-base";
8
- export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254274";
8
+ export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/driver-base";
11
- exports.pkgVersion = "2.0.0-dev-rc.3.0.0.254274";
11
+ exports.pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,6BAA6B,CAAC;AACxC,QAAA,UAAU,GAAG,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/driver-base\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254274\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,6BAA6B,CAAC;AACxC,QAAA,UAAU,GAAG,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/driver-base\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254674\";\n"]}
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/alpha.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/driver-base";
8
- export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254274";
8
+ export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/driver-base";
8
- export const pkgVersion = "2.0.0-dev-rc.3.0.0.254274";
8
+ export const pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,6BAA6B,CAAC;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/driver-base\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254274\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,6BAA6B,CAAC;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/driver-base\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254674\";\n"]}
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/driver-base",
3
- "version": "2.0.0-dev-rc.3.0.0.254274",
3
+ "version": "2.0.0-dev-rc.3.0.0.254674",
4
4
  "description": "Shared driver code for Fluid driver implementations",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,11 +15,11 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": {
18
- "types": "./lib/driver-base-public.d.ts",
18
+ "types": "./lib/public.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
21
  "require": {
22
- "types": "./dist/driver-base-public.d.ts",
22
+ "types": "./dist/public.d.ts",
23
23
  "default": "./dist/index.js"
24
24
  }
25
25
  },
@@ -35,7 +35,7 @@
35
35
  }
36
36
  },
37
37
  "main": "dist/index.js",
38
- "types": "./dist/driver-base-public.d.ts",
38
+ "types": "./dist/public.d.ts",
39
39
  "c8": {
40
40
  "all": true,
41
41
  "cache-dir": "nyc/.cache",
@@ -57,21 +57,21 @@
57
57
  "temp-directory": "nyc/.nyc_output"
58
58
  },
59
59
  "dependencies": {
60
- "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254274",
61
- "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254274",
62
- "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254274",
63
- "@fluidframework/driver-definitions": "2.0.0-dev-rc.3.0.0.254274",
64
- "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254274",
60
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254674",
61
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254674",
62
+ "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254674",
63
+ "@fluidframework/driver-definitions": "2.0.0-dev-rc.3.0.0.254674",
64
+ "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254674",
65
65
  "@fluidframework/protocol-definitions": "^3.2.0",
66
- "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.254274"
66
+ "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.254674"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@arethetypeswrong/cli": "^0.15.2",
70
70
  "@biomejs/biome": "^1.6.2",
71
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254274",
72
- "@fluid-tools/build-cli": "^0.34.0",
71
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254674",
72
+ "@fluid-tools/build-cli": "^0.35.0",
73
73
  "@fluidframework/build-common": "^2.0.3",
74
- "@fluidframework/build-tools": "^0.34.0",
74
+ "@fluidframework/build-tools": "^0.35.0",
75
75
  "@fluidframework/driver-base-previous": "npm:@fluidframework/driver-base@2.0.0-internal.8.0.0",
76
76
  "@fluidframework/eslint-config-fluid": "^5.1.0",
77
77
  "@microsoft/api-extractor": "^7.42.3",
@@ -90,29 +90,17 @@
90
90
  "socket.io-client": "^4.7.3",
91
91
  "typescript": "~5.1.6"
92
92
  },
93
- "fluidBuild": {
94
- "tasks": {
95
- "build:docs": {
96
- "dependsOn": [
97
- "...",
98
- "api-extractor:commonjs",
99
- "api-extractor:esnext"
100
- ],
101
- "script": false
102
- }
103
- }
104
- },
105
93
  "typeValidation": {
106
94
  "broken": {}
107
95
  },
108
96
  "scripts": {
109
97
  "api": "fluid-build . --task api",
110
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
111
- "api-extractor:esnext": "api-extractor run --local",
98
+ "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
99
+ "api-extractor:esnext": "flub generate entrypoints --outDir ./lib",
112
100
  "build": "fluid-build . --task build",
113
101
  "build:commonjs": "fluid-build . --task commonjs",
114
102
  "build:compile": "fluid-build . --task compile",
115
- "build:docs": "fluid-build . --task api",
103
+ "build:docs": "api-extractor run --local",
116
104
  "build:esnext": "tsc --project ./tsconfig.json",
117
105
  "build:genver": "gen-version",
118
106
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/driver-base";
9
- export const pkgVersion = "2.0.0-dev-rc.3.0.0.254274";
9
+ export const pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }
@@ -1,26 +0,0 @@
1
- import { ConnectionMode } from '@fluidframework/protocol-definitions';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
3
- import { IAnyDriverError } from '@fluidframework/driver-definitions';
4
- import { IClientConfiguration } from '@fluidframework/protocol-definitions';
5
- import { IConnect } from '@fluidframework/protocol-definitions';
6
- import { IConnected } from '@fluidframework/protocol-definitions';
7
- import { IDisposable } from '@fluidframework/core-interfaces';
8
- import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
9
- import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
10
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
11
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
12
- import { ISignalClient } from '@fluidframework/protocol-definitions';
13
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
14
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import type { Socket } from 'socket.io-client';
17
-
18
- /* Excluded from this release type: DocumentDeltaConnection */
19
-
20
- /* Excluded from this release type: getW3CData */
21
-
22
- /* Excluded from this release type: promiseRaceWithWinner */
23
-
24
- /* Excluded from this release type: validateMessages */
25
-
26
- export { }
@@ -1,32 +0,0 @@
1
- import { ConnectionMode } from '@fluidframework/protocol-definitions';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
3
- import { IAnyDriverError } from '@fluidframework/driver-definitions';
4
- import { IClientConfiguration } from '@fluidframework/protocol-definitions';
5
- import { IConnect } from '@fluidframework/protocol-definitions';
6
- import { IConnected } from '@fluidframework/protocol-definitions';
7
- import { IDisposable } from '@fluidframework/core-interfaces';
8
- import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
9
- import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
10
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
11
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
12
- import { ISignalClient } from '@fluidframework/protocol-definitions';
13
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
14
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import type { Socket } from 'socket.io-client';
17
-
18
- /* Excluded from this release type: DocumentDeltaConnection */
19
-
20
- /* Excluded from this release type: EventEmitterWithErrorHandling */
21
-
22
- /* Excluded from this release type: getW3CData */
23
-
24
- /* Excluded from this release type: IDocumentDeltaConnection */
25
-
26
- /* Excluded from this release type: IDocumentDeltaConnectionEvents */
27
-
28
- /* Excluded from this release type: promiseRaceWithWinner */
29
-
30
- /* Excluded from this release type: validateMessages */
31
-
32
- export { }
@@ -1,32 +0,0 @@
1
- import { ConnectionMode } from '@fluidframework/protocol-definitions';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
3
- import { IAnyDriverError } from '@fluidframework/driver-definitions';
4
- import { IClientConfiguration } from '@fluidframework/protocol-definitions';
5
- import { IConnect } from '@fluidframework/protocol-definitions';
6
- import { IConnected } from '@fluidframework/protocol-definitions';
7
- import { IDisposable } from '@fluidframework/core-interfaces';
8
- import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
9
- import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
10
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
11
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
12
- import { ISignalClient } from '@fluidframework/protocol-definitions';
13
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
14
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import type { Socket } from 'socket.io-client';
17
-
18
- /* Excluded from this release type: DocumentDeltaConnection */
19
-
20
- /* Excluded from this release type: EventEmitterWithErrorHandling */
21
-
22
- /* Excluded from this release type: getW3CData */
23
-
24
- /* Excluded from this release type: IDocumentDeltaConnection */
25
-
26
- /* Excluded from this release type: IDocumentDeltaConnectionEvents */
27
-
28
- /* Excluded from this release type: promiseRaceWithWinner */
29
-
30
- /* Excluded from this release type: validateMessages */
31
-
32
- export { }
@@ -1,214 +0,0 @@
1
- import { ConnectionMode } from '@fluidframework/protocol-definitions';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
3
- import { IAnyDriverError } from '@fluidframework/driver-definitions';
4
- import { IClientConfiguration } from '@fluidframework/protocol-definitions';
5
- import { IConnect } from '@fluidframework/protocol-definitions';
6
- import { IConnected } from '@fluidframework/protocol-definitions';
7
- import { IDisposable } from '@fluidframework/core-interfaces';
8
- import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
9
- import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
10
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
11
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
12
- import { ISignalClient } from '@fluidframework/protocol-definitions';
13
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
14
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import type { Socket } from 'socket.io-client';
17
-
18
- /**
19
- * Represents a connection to a stream of delta updates.
20
- * @internal
21
- */
22
- export declare class DocumentDeltaConnection extends EventEmitterWithErrorHandling<IDocumentDeltaConnectionEvents> implements IDocumentDeltaConnection, IDisposable {
23
- protected readonly socket: Socket;
24
- documentId: string;
25
- private readonly enableLongPollingDowngrades;
26
- protected readonly connectionId?: string | undefined;
27
- static readonly eventsToForward: string[];
28
- static readonly eventsAlwaysForwarded: string[];
29
- /**
30
- * Last known sequence number to ordering service at the time of connection
31
- * It may lap actual last sequence number (quite a bit, if container is very active).
32
- * But it's best information for client to figure out how far it is behind, at least
33
- * for "read" connections. "write" connections may use own "join" op to similar information,
34
- * that is likely to be more up-to-date.
35
- */
36
- checkpointSequenceNumber: number | undefined;
37
- protected readonly queuedMessages: ISequencedDocumentMessage[];
38
- protected readonly queuedSignals: ISignalMessage[];
39
- /**
40
- * A flag to indicate whether we have our handler attached. If it's attached, we're queueing incoming ops
41
- * to later be retrieved via initialMessages.
42
- */
43
- private earlyOpHandlerAttached;
44
- private socketConnectionTimeout;
45
- private _details;
46
- private trackLatencyTimeout;
47
- private readonly connectionListeners;
48
- private readonly trackedListeners;
49
- protected get hasDetails(): boolean;
50
- get disposed(): boolean;
51
- /**
52
- * Flag to indicate whether the DocumentDeltaConnection is expected to still be capable of sending messages.
53
- * After disconnection, we flip this to prevent any stale messages from being emitted.
54
- */
55
- protected _disposed: boolean;
56
- private readonly mc;
57
- /**
58
- * @deprecated Implementors should manage their own logger or monitoring context
59
- */
60
- protected get logger(): ITelemetryLoggerExt;
61
- get details(): IConnected;
62
- /**
63
- * @param socket - websocket to be used
64
- * @param documentId - ID of the document
65
- * @param logger - for reporting telemetry events
66
- * @param enableLongPollingDowngrades - allow connection to be downgraded to long-polling on websocket failure
67
- */
68
- protected constructor(socket: Socket, documentId: string, logger: ITelemetryLoggerExt, enableLongPollingDowngrades?: boolean, connectionId?: string | undefined);
69
- /**
70
- * Get the ID of the client who is sending the message
71
- *
72
- * @returns the client ID
73
- */
74
- get clientId(): string;
75
- /**
76
- * Get the mode of the client
77
- *
78
- * @returns the client mode
79
- */
80
- get mode(): ConnectionMode;
81
- /**
82
- * Get the claims of the client who is sending the message
83
- *
84
- * @returns client claims
85
- */
86
- get claims(): ITokenClaims;
87
- /**
88
- * Get whether or not this is an existing document
89
- *
90
- * @returns true if the document exists
91
- */
92
- get existing(): boolean;
93
- /**
94
- * Get the maximum size of a message before chunking is required
95
- *
96
- * @returns the maximum size of a message before chunking is required
97
- */
98
- get maxMessageSize(): number;
99
- /**
100
- * Semver of protocol being used with the service
101
- */
102
- get version(): string;
103
- /**
104
- * Configuration details provided by the service
105
- */
106
- get serviceConfiguration(): IClientConfiguration;
107
- private checkNotDisposed;
108
- /**
109
- * Get messages sent during the connection
110
- *
111
- * @returns messages sent during the connection
112
- */
113
- get initialMessages(): ISequencedDocumentMessage[];
114
- /**
115
- * Get signals sent during the connection
116
- *
117
- * @returns signals sent during the connection
118
- */
119
- get initialSignals(): ISignalMessage[];
120
- /**
121
- * Get initial client list
122
- *
123
- * @returns initial client list sent during the connection
124
- */
125
- get initialClients(): ISignalClient[];
126
- protected emitMessages(type: "submitOp", messages: IDocumentMessage[][]): void;
127
- protected emitMessages(type: "submitSignal", messages: string[][]): void;
128
- /**
129
- * Submits a new delta operation to the server
130
- *
131
- * @param message - delta operation to submit
132
- */
133
- submit(messages: IDocumentMessage[]): void;
134
- /**
135
- * Submits a new signal to the server
136
- *
137
- * @param content - Content of the signal.
138
- * @param targetClientId - When specified, the signal is only sent to the provided client id.
139
- */
140
- submitSignal(content: string, targetClientId?: string): void;
141
- /**
142
- * Disconnect from the websocket and close the websocket too.
143
- */
144
- private closeSocket;
145
- protected closeSocketCore(error: IAnyDriverError): void;
146
- /**
147
- * Disconnect from the websocket, and permanently disable this DocumentDeltaConnection and close the socket.
148
- * However the OdspDocumentDeltaConnection differ in dispose as in there we don't close the socket. There is no
149
- * multiplexing here, so we need to close the socket here.
150
- */
151
- dispose(): void;
152
- protected disconnect(err: IAnyDriverError): void;
153
- /**
154
- * Disconnect from the websocket.
155
- * @param reason - reason for disconnect
156
- */
157
- protected disconnectCore(): void;
158
- protected initialize(connectMessage: IConnect, timeout: number): Promise<void>;
159
- private addPropsToError;
160
- protected getConnectionDetailsProps(): {
161
- disposed: boolean;
162
- socketConnected: boolean;
163
- clientId: string | undefined;
164
- connectionId: string | undefined;
165
- };
166
- protected earlyOpHandler: (documentId: string, msgs: ISequencedDocumentMessage[]) => void;
167
- protected earlySignalHandler: (msg: ISignalMessage | ISignalMessage[]) => void;
168
- private removeEarlyOpHandler;
169
- private removeEarlySignalHandler;
170
- private addConnectionListener;
171
- protected addTrackedListener(event: string, listener: (...args: any[]) => void): void;
172
- private removeTrackedListeners;
173
- private removeConnectionListeners;
174
- private getErrorMessage;
175
- private createErrorObjectWithProps;
176
- /**
177
- * Error raising for socket.io issues
178
- */
179
- protected createErrorObject(handler: string, error?: any, canRetry?: boolean): IAnyDriverError;
180
- }
181
-
182
- /**
183
- * Extract and return the w3c data.
184
- * @param url - request url for which w3c data needs to be reported.
185
- * @param initiatorType - type of the network call
186
- * @internal
187
- */
188
- export declare function getW3CData(url: string, initiatorType: string): {
189
- dnsLookupTime: number | undefined;
190
- w3cStartTime: number | undefined;
191
- redirectTime: number | undefined;
192
- tcpHandshakeTime: number | undefined;
193
- secureConnectionTime: number | undefined;
194
- responseNetworkTime: number | undefined;
195
- fetchStartToResponseEndTime: number | undefined;
196
- reqStartToResponseEndTime: number | undefined;
197
- };
198
-
199
- /**
200
- * An implementation of Promise.race that gives you the winner of the promise race.
201
- * If one of the promises is rejected before any other is resolved, this method will return the error/reason from that rejection.
202
- * @internal
203
- */
204
- export declare function promiseRaceWithWinner<T>(promises: Promise<T>[]): Promise<{
205
- index: number;
206
- value: T;
207
- }>;
208
-
209
- /**
210
- * @internal
211
- */
212
- export declare function validateMessages(reason: string, messages: ISequencedDocumentMessage[], from: number, logger: ITelemetryLoggerExt, strict?: boolean): void;
213
-
214
- export { }
@@ -1,11 +0,0 @@
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.42.3"
9
- }
10
- ]
11
- }
@@ -1,26 +0,0 @@
1
- import { ConnectionMode } from '@fluidframework/protocol-definitions';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
3
- import { IAnyDriverError } from '@fluidframework/driver-definitions';
4
- import { IClientConfiguration } from '@fluidframework/protocol-definitions';
5
- import { IConnect } from '@fluidframework/protocol-definitions';
6
- import { IConnected } from '@fluidframework/protocol-definitions';
7
- import { IDisposable } from '@fluidframework/core-interfaces';
8
- import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
9
- import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
10
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
11
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
12
- import { ISignalClient } from '@fluidframework/protocol-definitions';
13
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
14
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import type { Socket } from 'socket.io-client';
17
-
18
- /* Excluded from this release type: DocumentDeltaConnection */
19
-
20
- /* Excluded from this release type: getW3CData */
21
-
22
- /* Excluded from this release type: promiseRaceWithWinner */
23
-
24
- /* Excluded from this release type: validateMessages */
25
-
26
- export { }
@@ -1,32 +0,0 @@
1
- import { ConnectionMode } from '@fluidframework/protocol-definitions';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
3
- import { IAnyDriverError } from '@fluidframework/driver-definitions';
4
- import { IClientConfiguration } from '@fluidframework/protocol-definitions';
5
- import { IConnect } from '@fluidframework/protocol-definitions';
6
- import { IConnected } from '@fluidframework/protocol-definitions';
7
- import { IDisposable } from '@fluidframework/core-interfaces';
8
- import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
9
- import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
10
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
11
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
12
- import { ISignalClient } from '@fluidframework/protocol-definitions';
13
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
14
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import type { Socket } from 'socket.io-client';
17
-
18
- /* Excluded from this release type: DocumentDeltaConnection */
19
-
20
- /* Excluded from this release type: EventEmitterWithErrorHandling */
21
-
22
- /* Excluded from this release type: getW3CData */
23
-
24
- /* Excluded from this release type: IDocumentDeltaConnection */
25
-
26
- /* Excluded from this release type: IDocumentDeltaConnectionEvents */
27
-
28
- /* Excluded from this release type: promiseRaceWithWinner */
29
-
30
- /* Excluded from this release type: validateMessages */
31
-
32
- export { }
@@ -1,32 +0,0 @@
1
- import { ConnectionMode } from '@fluidframework/protocol-definitions';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
3
- import { IAnyDriverError } from '@fluidframework/driver-definitions';
4
- import { IClientConfiguration } from '@fluidframework/protocol-definitions';
5
- import { IConnect } from '@fluidframework/protocol-definitions';
6
- import { IConnected } from '@fluidframework/protocol-definitions';
7
- import { IDisposable } from '@fluidframework/core-interfaces';
8
- import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
9
- import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
10
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
11
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
12
- import { ISignalClient } from '@fluidframework/protocol-definitions';
13
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
14
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import type { Socket } from 'socket.io-client';
17
-
18
- /* Excluded from this release type: DocumentDeltaConnection */
19
-
20
- /* Excluded from this release type: EventEmitterWithErrorHandling */
21
-
22
- /* Excluded from this release type: getW3CData */
23
-
24
- /* Excluded from this release type: IDocumentDeltaConnection */
25
-
26
- /* Excluded from this release type: IDocumentDeltaConnectionEvents */
27
-
28
- /* Excluded from this release type: promiseRaceWithWinner */
29
-
30
- /* Excluded from this release type: validateMessages */
31
-
32
- export { }
@@ -1,214 +0,0 @@
1
- import { ConnectionMode } from '@fluidframework/protocol-definitions';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
3
- import { IAnyDriverError } from '@fluidframework/driver-definitions';
4
- import { IClientConfiguration } from '@fluidframework/protocol-definitions';
5
- import { IConnect } from '@fluidframework/protocol-definitions';
6
- import { IConnected } from '@fluidframework/protocol-definitions';
7
- import { IDisposable } from '@fluidframework/core-interfaces';
8
- import { IDocumentDeltaConnection } from '@fluidframework/driver-definitions/internal';
9
- import { IDocumentDeltaConnectionEvents } from '@fluidframework/driver-definitions/internal';
10
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
11
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
12
- import { ISignalClient } from '@fluidframework/protocol-definitions';
13
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
14
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
- import type { Socket } from 'socket.io-client';
17
-
18
- /**
19
- * Represents a connection to a stream of delta updates.
20
- * @internal
21
- */
22
- export declare class DocumentDeltaConnection extends EventEmitterWithErrorHandling<IDocumentDeltaConnectionEvents> implements IDocumentDeltaConnection, IDisposable {
23
- protected readonly socket: Socket;
24
- documentId: string;
25
- private readonly enableLongPollingDowngrades;
26
- protected readonly connectionId?: string | undefined;
27
- static readonly eventsToForward: string[];
28
- static readonly eventsAlwaysForwarded: string[];
29
- /**
30
- * Last known sequence number to ordering service at the time of connection
31
- * It may lap actual last sequence number (quite a bit, if container is very active).
32
- * But it's best information for client to figure out how far it is behind, at least
33
- * for "read" connections. "write" connections may use own "join" op to similar information,
34
- * that is likely to be more up-to-date.
35
- */
36
- checkpointSequenceNumber: number | undefined;
37
- protected readonly queuedMessages: ISequencedDocumentMessage[];
38
- protected readonly queuedSignals: ISignalMessage[];
39
- /**
40
- * A flag to indicate whether we have our handler attached. If it's attached, we're queueing incoming ops
41
- * to later be retrieved via initialMessages.
42
- */
43
- private earlyOpHandlerAttached;
44
- private socketConnectionTimeout;
45
- private _details;
46
- private trackLatencyTimeout;
47
- private readonly connectionListeners;
48
- private readonly trackedListeners;
49
- protected get hasDetails(): boolean;
50
- get disposed(): boolean;
51
- /**
52
- * Flag to indicate whether the DocumentDeltaConnection is expected to still be capable of sending messages.
53
- * After disconnection, we flip this to prevent any stale messages from being emitted.
54
- */
55
- protected _disposed: boolean;
56
- private readonly mc;
57
- /**
58
- * @deprecated Implementors should manage their own logger or monitoring context
59
- */
60
- protected get logger(): ITelemetryLoggerExt;
61
- get details(): IConnected;
62
- /**
63
- * @param socket - websocket to be used
64
- * @param documentId - ID of the document
65
- * @param logger - for reporting telemetry events
66
- * @param enableLongPollingDowngrades - allow connection to be downgraded to long-polling on websocket failure
67
- */
68
- protected constructor(socket: Socket, documentId: string, logger: ITelemetryLoggerExt, enableLongPollingDowngrades?: boolean, connectionId?: string | undefined);
69
- /**
70
- * Get the ID of the client who is sending the message
71
- *
72
- * @returns the client ID
73
- */
74
- get clientId(): string;
75
- /**
76
- * Get the mode of the client
77
- *
78
- * @returns the client mode
79
- */
80
- get mode(): ConnectionMode;
81
- /**
82
- * Get the claims of the client who is sending the message
83
- *
84
- * @returns client claims
85
- */
86
- get claims(): ITokenClaims;
87
- /**
88
- * Get whether or not this is an existing document
89
- *
90
- * @returns true if the document exists
91
- */
92
- get existing(): boolean;
93
- /**
94
- * Get the maximum size of a message before chunking is required
95
- *
96
- * @returns the maximum size of a message before chunking is required
97
- */
98
- get maxMessageSize(): number;
99
- /**
100
- * Semver of protocol being used with the service
101
- */
102
- get version(): string;
103
- /**
104
- * Configuration details provided by the service
105
- */
106
- get serviceConfiguration(): IClientConfiguration;
107
- private checkNotDisposed;
108
- /**
109
- * Get messages sent during the connection
110
- *
111
- * @returns messages sent during the connection
112
- */
113
- get initialMessages(): ISequencedDocumentMessage[];
114
- /**
115
- * Get signals sent during the connection
116
- *
117
- * @returns signals sent during the connection
118
- */
119
- get initialSignals(): ISignalMessage[];
120
- /**
121
- * Get initial client list
122
- *
123
- * @returns initial client list sent during the connection
124
- */
125
- get initialClients(): ISignalClient[];
126
- protected emitMessages(type: "submitOp", messages: IDocumentMessage[][]): void;
127
- protected emitMessages(type: "submitSignal", messages: string[][]): void;
128
- /**
129
- * Submits a new delta operation to the server
130
- *
131
- * @param message - delta operation to submit
132
- */
133
- submit(messages: IDocumentMessage[]): void;
134
- /**
135
- * Submits a new signal to the server
136
- *
137
- * @param content - Content of the signal.
138
- * @param targetClientId - When specified, the signal is only sent to the provided client id.
139
- */
140
- submitSignal(content: string, targetClientId?: string): void;
141
- /**
142
- * Disconnect from the websocket and close the websocket too.
143
- */
144
- private closeSocket;
145
- protected closeSocketCore(error: IAnyDriverError): void;
146
- /**
147
- * Disconnect from the websocket, and permanently disable this DocumentDeltaConnection and close the socket.
148
- * However the OdspDocumentDeltaConnection differ in dispose as in there we don't close the socket. There is no
149
- * multiplexing here, so we need to close the socket here.
150
- */
151
- dispose(): void;
152
- protected disconnect(err: IAnyDriverError): void;
153
- /**
154
- * Disconnect from the websocket.
155
- * @param reason - reason for disconnect
156
- */
157
- protected disconnectCore(): void;
158
- protected initialize(connectMessage: IConnect, timeout: number): Promise<void>;
159
- private addPropsToError;
160
- protected getConnectionDetailsProps(): {
161
- disposed: boolean;
162
- socketConnected: boolean;
163
- clientId: string | undefined;
164
- connectionId: string | undefined;
165
- };
166
- protected earlyOpHandler: (documentId: string, msgs: ISequencedDocumentMessage[]) => void;
167
- protected earlySignalHandler: (msg: ISignalMessage | ISignalMessage[]) => void;
168
- private removeEarlyOpHandler;
169
- private removeEarlySignalHandler;
170
- private addConnectionListener;
171
- protected addTrackedListener(event: string, listener: (...args: any[]) => void): void;
172
- private removeTrackedListeners;
173
- private removeConnectionListeners;
174
- private getErrorMessage;
175
- private createErrorObjectWithProps;
176
- /**
177
- * Error raising for socket.io issues
178
- */
179
- protected createErrorObject(handler: string, error?: any, canRetry?: boolean): IAnyDriverError;
180
- }
181
-
182
- /**
183
- * Extract and return the w3c data.
184
- * @param url - request url for which w3c data needs to be reported.
185
- * @param initiatorType - type of the network call
186
- * @internal
187
- */
188
- export declare function getW3CData(url: string, initiatorType: string): {
189
- dnsLookupTime: number | undefined;
190
- w3cStartTime: number | undefined;
191
- redirectTime: number | undefined;
192
- tcpHandshakeTime: number | undefined;
193
- secureConnectionTime: number | undefined;
194
- responseNetworkTime: number | undefined;
195
- fetchStartToResponseEndTime: number | undefined;
196
- reqStartToResponseEndTime: number | undefined;
197
- };
198
-
199
- /**
200
- * An implementation of Promise.race that gives you the winner of the promise race.
201
- * If one of the promises is rejected before any other is resolved, this method will return the error/reason from that rejection.
202
- * @internal
203
- */
204
- export declare function promiseRaceWithWinner<T>(promises: Promise<T>[]): Promise<{
205
- index: number;
206
- value: T;
207
- }>;
208
-
209
- /**
210
- * @internal
211
- */
212
- export declare function validateMessages(reason: string, messages: ISequencedDocumentMessage[], from: number, logger: ITelemetryLoggerExt, strict?: boolean): void;
213
-
214
- export { }