@fluidframework/datastore 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.0
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/CHANGELOG.md +23 -0
- package/api-report/datastore.api.md +7 -5
- package/dist/channelContext.d.ts +5 -4
- package/dist/channelContext.d.ts.map +1 -1
- package/dist/channelContext.js +10 -10
- package/dist/channelContext.js.map +1 -1
- package/dist/channelDeltaConnection.d.ts +2 -2
- package/dist/channelDeltaConnection.d.ts.map +1 -1
- package/dist/channelDeltaConnection.js +5 -5
- package/dist/channelDeltaConnection.js.map +1 -1
- package/dist/channelStorageService.d.ts +2 -2
- package/dist/channelStorageService.d.ts.map +1 -1
- package/dist/channelStorageService.js +2 -2
- package/dist/channelStorageService.js.map +1 -1
- package/dist/dataStoreRuntime.d.ts +11 -8
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js +129 -104
- package/dist/dataStoreRuntime.js.map +1 -1
- package/dist/fluidHandle.d.ts +1 -1
- package/dist/fluidHandle.d.ts.map +1 -1
- package/dist/fluidHandle.js +2 -2
- package/dist/fluidHandle.js.map +1 -1
- package/dist/legacy.d.ts +19 -0
- package/dist/localChannelContext.d.ts +8 -7
- package/dist/localChannelContext.d.ts.map +1 -1
- package/dist/localChannelContext.js +35 -25
- package/dist/localChannelContext.js.map +1 -1
- package/dist/localChannelStorageService.d.ts.map +1 -1
- package/dist/localChannelStorageService.js +2 -2
- package/dist/localChannelStorageService.js.map +1 -1
- package/dist/packageVersion.d.ts +9 -0
- package/dist/packageVersion.d.ts.map +1 -0
- package/dist/packageVersion.js +12 -0
- package/dist/packageVersion.js.map +1 -0
- package/dist/public.d.ts +12 -0
- package/dist/remoteChannelContext.d.ts +3 -2
- package/dist/remoteChannelContext.d.ts.map +1 -1
- package/dist/remoteChannelContext.js +12 -12
- package/dist/remoteChannelContext.js.map +1 -1
- package/internal.d.ts +11 -0
- package/legacy.d.ts +11 -0
- package/lib/channelContext.d.ts +5 -4
- package/lib/channelContext.d.ts.map +1 -1
- package/lib/channelContext.js +4 -4
- package/lib/channelContext.js.map +1 -1
- package/lib/channelDeltaConnection.d.ts +2 -2
- package/lib/channelDeltaConnection.d.ts.map +1 -1
- package/lib/channelDeltaConnection.js +2 -2
- package/lib/channelDeltaConnection.js.map +1 -1
- package/lib/channelStorageService.d.ts +2 -2
- package/lib/channelStorageService.d.ts.map +1 -1
- package/lib/channelStorageService.js +1 -1
- package/lib/channelStorageService.js.map +1 -1
- package/lib/dataStoreRuntime.d.ts +11 -8
- package/lib/dataStoreRuntime.d.ts.map +1 -1
- package/lib/dataStoreRuntime.js +68 -43
- package/lib/dataStoreRuntime.js.map +1 -1
- package/lib/fluidHandle.d.ts +1 -1
- package/lib/fluidHandle.d.ts.map +1 -1
- package/lib/fluidHandle.js +1 -1
- package/lib/fluidHandle.js.map +1 -1
- package/lib/legacy.d.ts +19 -0
- package/lib/localChannelContext.d.ts +8 -7
- package/lib/localChannelContext.d.ts.map +1 -1
- package/lib/localChannelContext.js +21 -8
- package/lib/localChannelContext.js.map +1 -1
- package/lib/localChannelStorageService.d.ts.map +1 -1
- package/lib/localChannelStorageService.js +1 -1
- package/lib/localChannelStorageService.js.map +1 -1
- 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/lib/public.d.ts +12 -0
- package/lib/remoteChannelContext.d.ts +3 -2
- package/lib/remoteChannelContext.d.ts.map +1 -1
- package/lib/remoteChannelContext.js +2 -2
- package/lib/remoteChannelContext.js.map +1 -1
- package/package.json +37 -58
- package/src/channelContext.ts +12 -12
- package/src/channelDeltaConnection.ts +4 -4
- package/src/channelStorageService.ts +3 -3
- package/src/dataStoreRuntime.ts +143 -96
- package/src/fluidHandle.ts +2 -2
- package/src/localChannelContext.ts +33 -16
- package/src/localChannelStorageService.ts +2 -2
- package/src/packageVersion.ts +9 -0
- package/src/remoteChannelContext.ts +13 -13
- package/api-extractor-cjs.json +0 -8
- package/dist/datastore-alpha.d.ts +0 -333
- package/dist/datastore-beta.d.ts +0 -46
- package/dist/datastore-public.d.ts +0 -46
- package/dist/datastore-untrimmed.d.ts +0 -340
- package/lib/datastore-alpha.d.ts +0 -333
- package/lib/datastore-beta.d.ts +0 -46
- package/lib/datastore-public.d.ts +0 -46
- package/lib/datastore-untrimmed.d.ts +0 -340
- package/lib/test/channelStorageService.spec.js +0 -70
- package/lib/test/channelStorageService.spec.js.map +0 -1
- package/lib/test/dataStoreRuntime.spec.js +0 -121
- package/lib/test/dataStoreRuntime.spec.js.map +0 -1
- package/lib/test/localChannelContext.spec.js +0 -41
- package/lib/test/localChannelContext.spec.js.map +0 -1
- package/lib/test/localChannelStorageService.spec.js +0 -72
- package/lib/test/localChannelStorageService.spec.js.map +0 -1
- package/lib/test/remoteChannelContext.spec.js +0 -33
- package/lib/test/remoteChannelContext.spec.js.map +0 -1
- package/lib/test/types/validateDatastorePrevious.generated.js +0 -16
- package/lib/test/types/validateDatastorePrevious.generated.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @fluidframework/datastore
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Packages now use package.json "exports" and require modern module resolution [97d68aa06b](https://github.com/microsoft/FluidFramework/commit/97d68aa06bd5c022ecb026655814aea222a062ae)
|
|
8
|
+
|
|
9
|
+
Fluid Framework packages have been updated to use the [package.json "exports"
|
|
10
|
+
field](https://nodejs.org/docs/latest-v18.x/api/packages.html#exports) to define explicit entry points for both
|
|
11
|
+
TypeScript types and implementation code.
|
|
12
|
+
|
|
13
|
+
This means that using Fluid Framework packages require the following TypeScript settings in tsconfig.json:
|
|
14
|
+
|
|
15
|
+
- `"moduleResolution": "Node16"` with `"module": "Node16"`
|
|
16
|
+
- `"moduleResolution": "Bundler"` with `"module": "ESNext"`
|
|
17
|
+
|
|
18
|
+
We recommend using Node16/Node16 unless absolutely necessary. That will produce transpiled JavaScript that is suitable
|
|
19
|
+
for use with modern versions of Node.js _and_ Bundlers.
|
|
20
|
+
[See the TypeScript documentation](https://www.typescriptlang.org/tsconfig#moduleResolution) for more information
|
|
21
|
+
regarding the module and moduleResolution options.
|
|
22
|
+
|
|
23
|
+
**Node10 moduleResolution is not supported; it does not support Fluid Framework's API structuring pattern that is used
|
|
24
|
+
to distinguish stable APIs from those that are in development.**
|
|
25
|
+
|
|
3
26
|
## 2.0.0-rc.2.0.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -12,8 +12,8 @@ import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
|
12
12
|
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
13
13
|
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
14
14
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
15
|
-
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
|
|
16
|
-
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
15
|
+
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions/internal';
|
|
16
|
+
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
|
|
17
17
|
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
18
18
|
import { IFluidDataStoreRuntimeEvents } from '@fluidframework/datastore-definitions';
|
|
19
19
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
@@ -29,7 +29,7 @@ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
|
29
29
|
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
30
30
|
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
31
31
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
32
|
-
import { VisibilityState } from '@fluidframework/runtime-definitions';
|
|
32
|
+
import { VisibilityState } from '@fluidframework/runtime-definitions/internal';
|
|
33
33
|
|
|
34
34
|
// @alpha (undocumented)
|
|
35
35
|
export enum DataStoreMessageType {
|
|
@@ -111,10 +111,12 @@ export class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataStoreRunt
|
|
|
111
111
|
// (undocumented)
|
|
112
112
|
get routeContext(): IFluidHandleContext;
|
|
113
113
|
// (undocumented)
|
|
114
|
+
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
|
|
115
|
+
// (undocumented)
|
|
114
116
|
setConnectionState(connected: boolean, clientId?: string): void;
|
|
115
117
|
// (undocumented)
|
|
116
118
|
submitMessage(type: DataStoreMessageType, content: any, localOpMetadata: unknown): void;
|
|
117
|
-
submitSignal(type: string, content:
|
|
119
|
+
submitSignal(type: string, content: unknown, targetClientId?: string): void;
|
|
118
120
|
summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
|
|
119
121
|
updateUsedRoutes(usedRoutes: string[]): void;
|
|
120
122
|
// (undocumented)
|
|
@@ -148,7 +150,7 @@ export interface ISharedObjectRegistry {
|
|
|
148
150
|
get(name: string): IChannelFactory | undefined;
|
|
149
151
|
}
|
|
150
152
|
|
|
151
|
-
// @
|
|
153
|
+
// @alpha
|
|
152
154
|
export const mixinRequestHandler: (requestHandler: (request: IRequest, runtime: FluidDataStoreRuntime) => Promise<IResponse>, Base?: typeof FluidDataStoreRuntime) => typeof FluidDataStoreRuntime;
|
|
153
155
|
|
|
154
156
|
// @alpha
|
package/dist/channelContext.d.ts
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
6
5
|
import { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
7
6
|
import { IChannel, IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
|
|
8
|
-
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
7
|
+
import { IDocumentStorageService } from "@fluidframework/driver-definitions/internal";
|
|
9
8
|
import { ISequencedDocumentMessage, ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { IExperimentalIncrementalSummaryContext, IGarbageCollectionData, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
10
|
+
import { IFluidDataStoreContext, ISummarizeResult } from "@fluidframework/runtime-definitions/internal";
|
|
11
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
12
12
|
import { ChannelDeltaConnection } from "./channelDeltaConnection.js";
|
|
13
|
+
import { ChannelStorageService } from "./channelStorageService.js";
|
|
13
14
|
import { ISharedObjectRegistry } from "./dataStoreRuntime.js";
|
|
14
15
|
export declare const attributesBlobKey = ".attributes";
|
|
15
16
|
export interface IChannelContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelContext.d.ts","sourceRoot":"","sources":["../src/channelContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"channelContext.d.ts","sourceRoot":"","sources":["../src/channelContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAEtF,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAChG,OAAO,EACN,sCAA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B,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,uBAAuB,EACjC,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,QAAQ,CAAC,CAiBnB"}
|
package/dist/channelContext.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.loadChannel = exports.loadChannelFactoryAndAttributes = exports.summarizeChannelAsync = exports.summarizeChannel = exports.createChannelServiceEndpoints = exports.attributesBlobKey = void 0;
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const channelStorageService_js_1 = require("./channelStorageService.js");
|
|
8
|
+
const internal_1 = require("@fluidframework/driver-utils/internal");
|
|
9
|
+
const internal_2 = require("@fluidframework/runtime-utils/internal");
|
|
10
|
+
const internal_3 = require("@fluidframework/telemetry-utils/internal");
|
|
12
11
|
const channelDeltaConnection_js_1 = require("./channelDeltaConnection.js");
|
|
12
|
+
const channelStorageService_js_1 = require("./channelStorageService.js");
|
|
13
13
|
exports.attributesBlobKey = ".attributes";
|
|
14
14
|
function createChannelServiceEndpoints(connected, submitFn, dirtyFn, addedGCOutboundReferenceFn, isAttachedAndVisible, storageService, logger, tree, extraBlobs) {
|
|
15
15
|
const deltaConnection = new channelDeltaConnection_js_1.ChannelDeltaConnection(connected, (message, localOpMetadata) => submitFn(message, localOpMetadata), dirtyFn, addedGCOutboundReferenceFn, isAttachedAndVisible);
|
|
@@ -24,21 +24,21 @@ exports.createChannelServiceEndpoints = createChannelServiceEndpoints;
|
|
|
24
24
|
function summarizeChannel(channel, fullTree = false, trackState = false, telemetryContext) {
|
|
25
25
|
const summarizeResult = channel.getAttachSummary(fullTree, trackState, telemetryContext);
|
|
26
26
|
// Add the channel attributes to the returned result.
|
|
27
|
-
(0,
|
|
27
|
+
(0, internal_2.addBlobToSummary)(summarizeResult, exports.attributesBlobKey, JSON.stringify(channel.attributes));
|
|
28
28
|
return summarizeResult;
|
|
29
29
|
}
|
|
30
30
|
exports.summarizeChannel = summarizeChannel;
|
|
31
31
|
async function summarizeChannelAsync(channel, fullTree = false, trackState = false, telemetryContext, incrementalSummaryContext) {
|
|
32
32
|
const summarizeResult = await channel.summarize(fullTree, trackState, telemetryContext, incrementalSummaryContext);
|
|
33
33
|
// Add the channel attributes to the returned result.
|
|
34
|
-
(0,
|
|
34
|
+
(0, internal_2.addBlobToSummary)(summarizeResult, exports.attributesBlobKey, JSON.stringify(channel.attributes));
|
|
35
35
|
return summarizeResult;
|
|
36
36
|
}
|
|
37
37
|
exports.summarizeChannelAsync = summarizeChannelAsync;
|
|
38
38
|
async function loadChannelFactoryAndAttributes(dataStoreContext, services, channelId, registry, attachMessageType) {
|
|
39
39
|
let attributes;
|
|
40
40
|
if (await services.objectStorage.contains(exports.attributesBlobKey)) {
|
|
41
|
-
attributes = await (0,
|
|
41
|
+
attributes = await (0, internal_1.readAndParse)(services.objectStorage, exports.attributesBlobKey);
|
|
42
42
|
}
|
|
43
43
|
// This is a backward compatibility case where the attach message doesn't include attributes. They must
|
|
44
44
|
// include attach message type.
|
|
@@ -46,7 +46,7 @@ async function loadChannelFactoryAndAttributes(dataStoreContext, services, chann
|
|
|
46
46
|
// messages.
|
|
47
47
|
const channelFactoryType = attributes ? attributes.type : attachMessageType;
|
|
48
48
|
if (channelFactoryType === undefined) {
|
|
49
|
-
throw new
|
|
49
|
+
throw new internal_3.DataCorruptionError("channelTypeNotAvailable", (0, internal_3.tagCodeArtifacts)({
|
|
50
50
|
channelId,
|
|
51
51
|
dataStoreId: dataStoreContext.id,
|
|
52
52
|
dataStorePackagePath: dataStoreContext.packagePath.join("/"),
|
|
@@ -55,7 +55,7 @@ async function loadChannelFactoryAndAttributes(dataStoreContext, services, chann
|
|
|
55
55
|
}
|
|
56
56
|
const factory = registry.get(channelFactoryType);
|
|
57
57
|
if (factory === undefined) {
|
|
58
|
-
throw new
|
|
58
|
+
throw new internal_3.DataCorruptionError("channelFactoryNotRegisteredForGivenType", (0, internal_3.tagCodeArtifacts)({
|
|
59
59
|
channelId,
|
|
60
60
|
dataStoreId: dataStoreContext.id,
|
|
61
61
|
dataStorePackagePath: dataStoreContext.packagePath.join("/"),
|
|
@@ -74,7 +74,7 @@ async function loadChannel(dataStoreRuntime, attributes, factory, services, logg
|
|
|
74
74
|
attributes.snapshotFormatVersion !== factory.attributes.snapshotFormatVersion) {
|
|
75
75
|
logger.sendTelemetryEvent({
|
|
76
76
|
eventName: "ChannelAttributesVersionMismatch",
|
|
77
|
-
...(0,
|
|
77
|
+
...(0, internal_3.tagCodeArtifacts)({
|
|
78
78
|
channelType: attributes.type,
|
|
79
79
|
channelSnapshotVersion: `${attributes.snapshotFormatVersion}@${attributes.packageVersion}`,
|
|
80
80
|
channelCodeVersion: `${factory.attributes.snapshotFormatVersion}@${factory.attributes.packageVersion}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelContext.js","sourceRoot":"","sources":["../src/channelContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qEAIyC;AAkBzC,iEAAiE;AACjE,+DAA4D;AAC5D,yEAAmE;AACnE,2EAAqE;AAGxD,QAAA,iBAAiB,GAAG,aAAa,CAAC;AA0C/C,SAAgB,6BAA6B,CAC5C,SAAkB,EAClB,QAA0D,EAC1D,OAAmB,EACnB,0BAA2F,EAC3F,oBAAmC,EACnC,cAAuC,EACvC,MAA2B,EAC3B,IAAoB,EACpB,UAAyC;IAEzC,MAAM,eAAe,GAAG,IAAI,kDAAsB,CACjD,SAAS,EACT,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,EAChE,OAAO,EACP,0BAA0B,EAC1B,oBAAoB,CACpB,CAAC;IACF,MAAM,aAAa,GAAG,IAAI,gDAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;I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AAE,GAAG,UAAU,CAAC,qBAAqB,IAAI,UAAU,CAAC,cAAc,EAAE;gBAC1F,kBAAkB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,qBAAqB,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE;aACtG,CAAC;SACF,CAAC,CAAC;KACH;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AACxE,CAAC;AAxBD,kCAwBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tDataCorruptionError,\n\tITelemetryLoggerExt,\n\ttagCodeArtifacts,\n} from \"@fluidframework/telemetry-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport {\n\tIChannel,\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage, ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIGarbageCollectionData,\n\tIExperimentalIncrementalSummaryContext,\n\tISummarizeResult,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tIFluidDataStoreContext,\n} from \"@fluidframework/runtime-definitions\";\nimport { addBlobToSummary } from \"@fluidframework/runtime-utils\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport { ChannelStorageService } from \"./channelStorageService.js\";\nimport { ChannelDeltaConnection } from \"./channelDeltaConnection.js\";\nimport { ISharedObjectRegistry } from \"./dataStoreRuntime.js\";\n\nexport const attributesBlobKey = \".attributes\";\n\nexport interface IChannelContext {\n\tgetChannel(): Promise<IChannel>;\n\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\tprocessOp(message: ISequencedDocumentMessage, local: boolean, localOpMetadata?: unknown): void;\n\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\n\treSubmit(content: any, localOpMetadata: unknown): void;\n\n\tapplyStashedOp(content: any): unknown;\n\n\trollback(message: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * After GC has run, called to notify this context of routes that are used in it. These are used for the following:\n\t * 1. To identify if this context is being referenced in the document or not.\n\t * 2. To identify if this context or any of its children's used routes changed since last summary.\n\t * 3. They are added to the summary generated by this context.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\nexport interface ChannelServiceEndpoints {\n\tdeltaConnection: ChannelDeltaConnection;\n\tobjectStorage: ChannelStorageService;\n}\n\nexport function createChannelServiceEndpoints(\n\tconnected: boolean,\n\tsubmitFn: (content: any, localOpMetadata: unknown) => void,\n\tdirtyFn: () => void,\n\taddedGCOutboundReferenceFn: (srcHandle: IFluidHandle, outboundHandle: IFluidHandle) => void,\n\tisAttachedAndVisible: () => boolean,\n\tstorageService: IDocumentStorageService,\n\tlogger: ITelemetryLoggerExt,\n\ttree?: ISnapshotTree,\n\textraBlobs?: Map<string, ArrayBufferLike>,\n): ChannelServiceEndpoints {\n\tconst deltaConnection = new ChannelDeltaConnection(\n\t\tconnected,\n\t\t(message, localOpMetadata) => submitFn(message, localOpMetadata),\n\t\tdirtyFn,\n\t\taddedGCOutboundReferenceFn,\n\t\tisAttachedAndVisible,\n\t);\n\tconst objectStorage = new ChannelStorageService(tree, storageService, logger, extraBlobs);\n\n\treturn {\n\t\tdeltaConnection,\n\t\tobjectStorage,\n\t};\n}\n\n/** Used to get the channel's summary for the DDS or DataStore attach op */\nexport function summarizeChannel(\n\tchannel: IChannel,\n\tfullTree: boolean = false,\n\ttrackState: boolean = false,\n\ttelemetryContext?: ITelemetryContext,\n): ISummaryTreeWithStats {\n\tconst summarizeResult = channel.getAttachSummary(fullTree, trackState, telemetryContext);\n\n\t// Add the channel attributes to the returned result.\n\taddBlobToSummary(summarizeResult, attributesBlobKey, JSON.stringify(channel.attributes));\n\treturn summarizeResult;\n}\n\nexport async function summarizeChannelAsync(\n\tchannel: IChannel,\n\tfullTree: boolean = false,\n\ttrackState: boolean = false,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n): Promise<ISummaryTreeWithStats> {\n\tconst summarizeResult = await channel.summarize(\n\t\tfullTree,\n\t\ttrackState,\n\t\ttelemetryContext,\n\t\tincrementalSummaryContext,\n\t);\n\n\t// Add the channel attributes to the returned result.\n\taddBlobToSummary(summarizeResult, attributesBlobKey, JSON.stringify(channel.attributes));\n\treturn summarizeResult;\n}\n\nexport async function loadChannelFactoryAndAttributes(\n\tdataStoreContext: IFluidDataStoreContext,\n\tservices: ChannelServiceEndpoints,\n\tchannelId: string,\n\tregistry: ISharedObjectRegistry,\n\tattachMessageType?: string,\n): Promise<{ factory: IChannelFactory; attributes: IChannelAttributes }> {\n\tlet attributes: IChannelAttributes | undefined;\n\tif (await services.objectStorage.contains(attributesBlobKey)) {\n\t\tattributes = await readAndParse<IChannelAttributes | undefined>(\n\t\t\tservices.objectStorage,\n\t\t\tattributesBlobKey,\n\t\t);\n\t}\n\n\t// This is a backward compatibility case where the attach message doesn't include attributes. They must\n\t// include attach message type.\n\t// Since old attach messages will not have attributes, we need to keep this as long as we support old attach\n\t// messages.\n\tconst channelFactoryType = attributes ? attributes.type : attachMessageType;\n\tif (channelFactoryType === undefined) {\n\t\tthrow new DataCorruptionError(\n\t\t\t\"channelTypeNotAvailable\",\n\t\t\ttagCodeArtifacts({\n\t\t\t\tchannelId,\n\t\t\t\tdataStoreId: dataStoreContext.id,\n\t\t\t\tdataStorePackagePath: dataStoreContext.packagePath.join(\"/\"),\n\t\t\t\tchannelFactoryType,\n\t\t\t}),\n\t\t);\n\t}\n\tconst factory = registry.get(channelFactoryType);\n\tif (factory === undefined) {\n\t\tthrow new DataCorruptionError(\n\t\t\t\"channelFactoryNotRegisteredForGivenType\",\n\t\t\ttagCodeArtifacts({\n\t\t\t\tchannelId,\n\t\t\t\tdataStoreId: dataStoreContext.id,\n\t\t\t\tdataStorePackagePath: dataStoreContext.packagePath.join(\"/\"),\n\t\t\t\tchannelFactoryType,\n\t\t\t}),\n\t\t);\n\t}\n\t// This is a backward compatibility case where the attach message doesn't include attributes. Get the attributes\n\t// from the factory.\n\tattributes = attributes ?? factory.attributes;\n\treturn { factory, attributes };\n}\n\nexport async function loadChannel(\n\tdataStoreRuntime: IFluidDataStoreRuntime,\n\tattributes: IChannelAttributes,\n\tfactory: IChannelFactory,\n\tservices: ChannelServiceEndpoints,\n\tlogger: ITelemetryLoggerExt,\n\tchannelId: string,\n): Promise<IChannel> {\n\t// Compare snapshot version to collaborative object version\n\tif (\n\t\tattributes.snapshotFormatVersion !== undefined &&\n\t\tattributes.snapshotFormatVersion !== factory.attributes.snapshotFormatVersion\n\t) {\n\t\tlogger.sendTelemetryEvent({\n\t\t\teventName: \"ChannelAttributesVersionMismatch\",\n\t\t\t...tagCodeArtifacts({\n\t\t\t\tchannelType: attributes.type,\n\t\t\t\tchannelSnapshotVersion: `${attributes.snapshotFormatVersion}@${attributes.packageVersion}`,\n\t\t\t\tchannelCodeVersion: `${factory.attributes.snapshotFormatVersion}@${factory.attributes.packageVersion}`,\n\t\t\t}),\n\t\t});\n\t}\n\n\treturn factory.load(dataStoreRuntime, channelId, services, attributes);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"channelContext.js","sourceRoot":"","sources":["../src/channelContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAUH,oEAAqE;AAYrE,qEAA0E;AAE1E,uEAAiG;AAEjG,2EAAqE;AACrE,yEAAmE;AAGtD,QAA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C;IAC9C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAChC,CAAC;AA/CD,0EA+CC;AAEM,KAAK,UAAU,WAAW,CAChC,gBAAwC,EACxC,UAA8B,EAC9B,OAAwB,EACxB,QAAiC,EACjC,MAA2B,EAC3B,SAAiB;IAEjB,2DAA2D;IAC3D,IACC,UAAU,CAAC,qBAAqB,KAAK,SAAS;QAC9C,UAAU,CAAC,qBAAqB,KAAK,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAC5E;QACD,MAAM,CAAC,kBAAkB,CAAC;YACzB,SAAS,EAAE,kCAAkC;YAC7C,GAAG,IAAA,2BAAgB,EAAC;gBACnB,WAAW,EAAE,UAAU,CAAC,IAAI;gBAC5B,sBAAsB,EAAE,GAAG,UAAU,CAAC,qBAAqB,IAAI,UAAU,CAAC,cAAc,EAAE;gBAC1F,kBAAkB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,qBAAqB,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE;aACtG,CAAC;SACF,CAAC,CAAC;KACH;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AACxE,CAAC;AAxBD,kCAwBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport {\n\tIChannel,\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions/internal\";\nimport { readAndParse } from \"@fluidframework/driver-utils/internal\";\nimport { ISequencedDocumentMessage, ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIExperimentalIncrementalSummaryContext,\n\tIGarbageCollectionData,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tIFluidDataStoreContext,\n\tISummarizeResult,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { addBlobToSummary } from \"@fluidframework/runtime-utils/internal\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport { DataCorruptionError, tagCodeArtifacts } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { ChannelDeltaConnection } from \"./channelDeltaConnection.js\";\nimport { ChannelStorageService } from \"./channelStorageService.js\";\nimport { ISharedObjectRegistry } from \"./dataStoreRuntime.js\";\n\nexport const attributesBlobKey = \".attributes\";\n\nexport interface IChannelContext {\n\tgetChannel(): Promise<IChannel>;\n\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\tprocessOp(message: ISequencedDocumentMessage, local: boolean, localOpMetadata?: unknown): void;\n\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\n\treSubmit(content: any, localOpMetadata: unknown): void;\n\n\tapplyStashedOp(content: any): unknown;\n\n\trollback(message: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * After GC has run, called to notify this context of routes that are used in it. These are used for the following:\n\t * 1. To identify if this context is being referenced in the document or not.\n\t * 2. To identify if this context or any of its children's used routes changed since last summary.\n\t * 3. They are added to the summary generated by this context.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\nexport interface ChannelServiceEndpoints {\n\tdeltaConnection: ChannelDeltaConnection;\n\tobjectStorage: ChannelStorageService;\n}\n\nexport function createChannelServiceEndpoints(\n\tconnected: boolean,\n\tsubmitFn: (content: any, localOpMetadata: unknown) => void,\n\tdirtyFn: () => void,\n\taddedGCOutboundReferenceFn: (srcHandle: IFluidHandle, outboundHandle: IFluidHandle) => void,\n\tisAttachedAndVisible: () => boolean,\n\tstorageService: IDocumentStorageService,\n\tlogger: ITelemetryLoggerExt,\n\ttree?: ISnapshotTree,\n\textraBlobs?: Map<string, ArrayBufferLike>,\n): ChannelServiceEndpoints {\n\tconst deltaConnection = new ChannelDeltaConnection(\n\t\tconnected,\n\t\t(message, localOpMetadata) => submitFn(message, localOpMetadata),\n\t\tdirtyFn,\n\t\taddedGCOutboundReferenceFn,\n\t\tisAttachedAndVisible,\n\t);\n\tconst objectStorage = new ChannelStorageService(tree, storageService, logger, extraBlobs);\n\n\treturn {\n\t\tdeltaConnection,\n\t\tobjectStorage,\n\t};\n}\n\n/** Used to get the channel's summary for the DDS or DataStore attach op */\nexport function summarizeChannel(\n\tchannel: IChannel,\n\tfullTree: boolean = false,\n\ttrackState: boolean = false,\n\ttelemetryContext?: ITelemetryContext,\n): ISummaryTreeWithStats {\n\tconst summarizeResult = channel.getAttachSummary(fullTree, trackState, telemetryContext);\n\n\t// Add the channel attributes to the returned result.\n\taddBlobToSummary(summarizeResult, attributesBlobKey, JSON.stringify(channel.attributes));\n\treturn summarizeResult;\n}\n\nexport async function summarizeChannelAsync(\n\tchannel: IChannel,\n\tfullTree: boolean = false,\n\ttrackState: boolean = false,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n): Promise<ISummaryTreeWithStats> {\n\tconst summarizeResult = await channel.summarize(\n\t\tfullTree,\n\t\ttrackState,\n\t\ttelemetryContext,\n\t\tincrementalSummaryContext,\n\t);\n\n\t// Add the channel attributes to the returned result.\n\taddBlobToSummary(summarizeResult, attributesBlobKey, JSON.stringify(channel.attributes));\n\treturn summarizeResult;\n}\n\nexport async function loadChannelFactoryAndAttributes(\n\tdataStoreContext: IFluidDataStoreContext,\n\tservices: ChannelServiceEndpoints,\n\tchannelId: string,\n\tregistry: ISharedObjectRegistry,\n\tattachMessageType?: string,\n): Promise<{ factory: IChannelFactory; attributes: IChannelAttributes }> {\n\tlet attributes: IChannelAttributes | undefined;\n\tif (await services.objectStorage.contains(attributesBlobKey)) {\n\t\tattributes = await readAndParse<IChannelAttributes | undefined>(\n\t\t\tservices.objectStorage,\n\t\t\tattributesBlobKey,\n\t\t);\n\t}\n\n\t// This is a backward compatibility case where the attach message doesn't include attributes. They must\n\t// include attach message type.\n\t// Since old attach messages will not have attributes, we need to keep this as long as we support old attach\n\t// messages.\n\tconst channelFactoryType = attributes ? attributes.type : attachMessageType;\n\tif (channelFactoryType === undefined) {\n\t\tthrow new DataCorruptionError(\n\t\t\t\"channelTypeNotAvailable\",\n\t\t\ttagCodeArtifacts({\n\t\t\t\tchannelId,\n\t\t\t\tdataStoreId: dataStoreContext.id,\n\t\t\t\tdataStorePackagePath: dataStoreContext.packagePath.join(\"/\"),\n\t\t\t\tchannelFactoryType,\n\t\t\t}),\n\t\t);\n\t}\n\tconst factory = registry.get(channelFactoryType);\n\tif (factory === undefined) {\n\t\tthrow new DataCorruptionError(\n\t\t\t\"channelFactoryNotRegisteredForGivenType\",\n\t\t\ttagCodeArtifacts({\n\t\t\t\tchannelId,\n\t\t\t\tdataStoreId: dataStoreContext.id,\n\t\t\t\tdataStorePackagePath: dataStoreContext.packagePath.join(\"/\"),\n\t\t\t\tchannelFactoryType,\n\t\t\t}),\n\t\t);\n\t}\n\t// This is a backward compatibility case where the attach message doesn't include attributes. Get the attributes\n\t// from the factory.\n\tattributes = attributes ?? factory.attributes;\n\treturn { factory, attributes };\n}\n\nexport async function loadChannel(\n\tdataStoreRuntime: IFluidDataStoreRuntime,\n\tattributes: IChannelAttributes,\n\tfactory: IChannelFactory,\n\tservices: ChannelServiceEndpoints,\n\tlogger: ITelemetryLoggerExt,\n\tchannelId: string,\n): Promise<IChannel> {\n\t// Compare snapshot version to collaborative object version\n\tif (\n\t\tattributes.snapshotFormatVersion !== undefined &&\n\t\tattributes.snapshotFormatVersion !== factory.attributes.snapshotFormatVersion\n\t) {\n\t\tlogger.sendTelemetryEvent({\n\t\t\teventName: \"ChannelAttributesVersionMismatch\",\n\t\t\t...tagCodeArtifacts({\n\t\t\t\tchannelType: attributes.type,\n\t\t\t\tchannelSnapshotVersion: `${attributes.snapshotFormatVersion}@${attributes.packageVersion}`,\n\t\t\t\tchannelCodeVersion: `${factory.attributes.snapshotFormatVersion}@${factory.attributes.packageVersion}`,\n\t\t\t}),\n\t\t});\n\t}\n\n\treturn factory.load(dataStoreRuntime, channelId, services, attributes);\n}\n"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
6
|
-
import { IDeltaConnection, IDeltaHandler } from "@fluidframework/datastore-definitions";
|
|
7
5
|
import { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { IDeltaConnection, IDeltaHandler } from "@fluidframework/datastore-definitions";
|
|
7
|
+
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
8
8
|
export declare class ChannelDeltaConnection implements IDeltaConnection {
|
|
9
9
|
private _connected;
|
|
10
10
|
private readonly submitFn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelDeltaConnection.d.ts","sourceRoot":"","sources":["../src/channelDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"channelDeltaConnection.d.ts","sourceRoot":"","sources":["../src/channelDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAsCj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|
|
8
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
|
+
const internal_2 = require("@fluidframework/telemetry-utils/internal");
|
|
10
10
|
const stashedOpMetadataMark = Symbol();
|
|
11
11
|
function createStashedOpMetadata() {
|
|
12
12
|
const arr = [];
|
|
@@ -32,7 +32,7 @@ function processWithStashedOpMetadataHandling(content, localOpMetaData, func) {
|
|
|
32
32
|
}
|
|
33
33
|
class ChannelDeltaConnection {
|
|
34
34
|
get handler() {
|
|
35
|
-
(0,
|
|
35
|
+
(0, internal_1.assert)(!!this._handler, 0x177 /* "Missing delta handler" */);
|
|
36
36
|
return this._handler;
|
|
37
37
|
}
|
|
38
38
|
get connected() {
|
|
@@ -48,7 +48,7 @@ class ChannelDeltaConnection {
|
|
|
48
48
|
this.isAttachedAndVisible = isAttachedAndVisible;
|
|
49
49
|
}
|
|
50
50
|
attach(handler) {
|
|
51
|
-
(0,
|
|
51
|
+
(0, internal_1.assert)(this._handler === undefined, 0x178 /* "Missing delta handler on attach" */);
|
|
52
52
|
this._handler = handler;
|
|
53
53
|
}
|
|
54
54
|
setConnectionState(connected) {
|
|
@@ -61,7 +61,7 @@ class ChannelDeltaConnection {
|
|
|
61
61
|
processWithStashedOpMetadataHandling(message.contents, localOpMetadata, (contents, metadata) => this.handler.process({ ...message, contents }, local, metadata));
|
|
62
62
|
}
|
|
63
63
|
catch (error) {
|
|
64
|
-
throw
|
|
64
|
+
throw internal_2.DataProcessingError.wrapIfUnrecognized(error, "channelDeltaConnectionFailedToProcessMessage", message);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
reSubmit(content, localOpMetadata) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelDeltaConnection.js","sourceRoot":"","sources":["../src/channelDeltaConnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"channelDeltaConnection.js","sourceRoot":"","sources":["../src/channelDeltaConnection.ts"],"names":[],"mappings":";AAAA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,EACf,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CACxC,CAAC;IACH,CAAC;IAEM,cAAc,CAAC,OAAY;QACjC,IAAI;YACH,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YACvF,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACrC,OAAO,IAAI,CAAC,WAAW,CAAC;SACxB;gBAAS;YACT,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;SAC7B;IACF,CAAC;IAEM,MAAM,CAAC,QAAa,EAAE,QAAiB;QAC7C,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;YACnC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;SAC9C;aAAM;YACN,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;SAClC;IACF,CAAC;CACD;AAxFD,wDAwFC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { IDeltaConnection, IDeltaHandler } from \"@fluidframework/datastore-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { DataProcessingError } from \"@fluidframework/telemetry-utils/internal\";\n\nconst stashedOpMetadataMark = Symbol();\n\ntype StashedOpMetadata = { contents: any; metadata: unknown }[] &\n\tRecord<typeof stashedOpMetadataMark, typeof stashedOpMetadataMark>;\n\nfunction createStashedOpMetadata(): StashedOpMetadata {\n\tconst arr = [];\n\tObject.defineProperty(arr, stashedOpMetadataMark, {\n\t\tvalue: stashedOpMetadataMark,\n\t\twritable: false,\n\t\tenumerable: true,\n\t});\n\treturn arr as any as StashedOpMetadata;\n}\n\nfunction isStashedOpMetadata(md: unknown): md is StashedOpMetadata {\n\treturn (\n\t\tArray.isArray(md) &&\n\t\tstashedOpMetadataMark in md &&\n\t\tmd[stashedOpMetadataMark] === stashedOpMetadataMark\n\t);\n}\n\nfunction processWithStashedOpMetadataHandling(\n\tcontent: any,\n\tlocalOpMetaData: unknown,\n\tfunc: (contents: any, metadata: unknown) => void,\n) {\n\tif (isStashedOpMetadata(localOpMetaData)) {\n\t\tlocalOpMetaData.forEach(({ contents, metadata }) => func(contents, metadata));\n\t} else {\n\t\tfunc(content, localOpMetaData);\n\t}\n}\n\nexport class ChannelDeltaConnection implements IDeltaConnection {\n\tprivate _handler: IDeltaHandler | undefined;\n\tprivate stashedOpMd: StashedOpMetadata | undefined;\n\n\tprivate get handler(): IDeltaHandler {\n\t\tassert(!!this._handler, 0x177 /* \"Missing delta handler\" */);\n\t\treturn this._handler;\n\t}\n\tpublic get connected(): boolean {\n\t\treturn this._connected;\n\t}\n\n\tconstructor(\n\t\tprivate _connected: boolean,\n\t\tprivate readonly submitFn: (content: any, localOpMetadata: unknown) => void,\n\t\tpublic readonly dirty: () => void,\n\t\t/** @deprecated There is no replacement for this, its functionality is no longer needed at this layer. */\n\t\tpublic readonly addedGCOutboundReference: (\n\t\t\tsrcHandle: IFluidHandle,\n\t\t\toutboundHandle: IFluidHandle,\n\t\t) => void,\n\t\tprivate readonly isAttachedAndVisible: () => boolean,\n\t) {}\n\n\tpublic attach(handler: IDeltaHandler) {\n\t\tassert(this._handler === undefined, 0x178 /* \"Missing delta handler on attach\" */);\n\t\tthis._handler = handler;\n\t}\n\n\tpublic setConnectionState(connected: boolean) {\n\t\tthis._connected = connected;\n\t\tthis.handler.setConnectionState(connected);\n\t}\n\n\tpublic process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) {\n\t\ttry {\n\t\t\t// catches as data processing error whether or not they come from async pending queues\n\t\t\tprocessWithStashedOpMetadataHandling(\n\t\t\t\tmessage.contents,\n\t\t\t\tlocalOpMetadata,\n\t\t\t\t(contents, metadata) =>\n\t\t\t\t\tthis.handler.process({ ...message, contents }, local, metadata),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tthrow DataProcessingError.wrapIfUnrecognized(\n\t\t\t\terror,\n\t\t\t\t\"channelDeltaConnectionFailedToProcessMessage\",\n\t\t\t\tmessage,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic reSubmit(content: any, localOpMetadata: unknown) {\n\t\tprocessWithStashedOpMetadataHandling(\n\t\t\tcontent,\n\t\t\tlocalOpMetadata,\n\t\t\tthis.handler.reSubmit.bind(this.handler),\n\t\t);\n\t}\n\n\tpublic rollback(content: any, localOpMetadata: unknown) {\n\t\tif (this.handler.rollback === undefined) {\n\t\t\tthrow new Error(\"Handler doesn't support rollback\");\n\t\t}\n\t\tprocessWithStashedOpMetadataHandling(\n\t\t\tcontent,\n\t\t\tlocalOpMetadata,\n\t\t\tthis.handler.rollback.bind(this.handler),\n\t\t);\n\t}\n\n\tpublic applyStashedOp(content: any): unknown {\n\t\ttry {\n\t\t\tthis.stashedOpMd = this.isAttachedAndVisible() ? createStashedOpMetadata() : undefined;\n\t\t\tthis.handler.applyStashedOp(content);\n\t\t\treturn this.stashedOpMd;\n\t\t} finally {\n\t\t\tthis.stashedOpMd = undefined;\n\t\t}\n\t}\n\n\tpublic submit(contents: any, metadata: unknown): void {\n\t\tif (this.stashedOpMd !== undefined) {\n\t\t\tthis.stashedOpMd.push({ contents, metadata });\n\t\t} else {\n\t\t\tthis.submitFn(contents, metadata);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
6
|
-
import { ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
7
5
|
import { IChannelStorageService } from "@fluidframework/datastore-definitions";
|
|
6
|
+
import { IDocumentStorageService } from "@fluidframework/driver-definitions/internal";
|
|
7
|
+
import { ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
9
9
|
export declare class ChannelStorageService implements IChannelStorageService {
|
|
10
10
|
private readonly tree;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelStorageService.d.ts","sourceRoot":"","sources":["../src/channelStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"channelStorageService.d.ts","sourceRoot":"","sources":["../src/channelStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,qBAAa,qBAAsB,YAAW,sBAAsB;IAoBlE,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;IAtB7B,OAAO,CAAC,MAAM,CAAC,WAAW;IAgB1B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA6B;gBAGzC,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC,EAClD,MAAM,EAAE,mBAAmB,EAC3B,UAAU,CAAC,0CAA8B;IAS9C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAehD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAepC,YAAY;CAG1B"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.ChannelStorageService = void 0;
|
|
8
|
-
const
|
|
8
|
+
const internal_1 = require("@fluidframework/runtime-utils/internal");
|
|
9
9
|
class ChannelStorageService {
|
|
10
10
|
static flattenTree(base, tree, results) {
|
|
11
11
|
// eslint-disable-next-line guard-for-in, no-restricted-syntax
|
|
@@ -43,7 +43,7 @@ class ChannelStorageService {
|
|
|
43
43
|
}
|
|
44
44
|
async list(path) {
|
|
45
45
|
let tree = this.tree;
|
|
46
|
-
const pathParts = (0,
|
|
46
|
+
const pathParts = (0, internal_1.getNormalizedObjectStoragePathParts)(path);
|
|
47
47
|
while (tree !== undefined && pathParts.length > 0) {
|
|
48
48
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
49
49
|
const part = pathParts.shift();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelStorageService.js","sourceRoot":"","sources":["../src/channelStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,
|
|
1
|
+
{"version":3,"file":"channelStorageService.js","sourceRoot":"","sources":["../src/channelStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,qEAA6F;AAG7F,MAAa,qBAAqB;IACzB,MAAM,CAAC,WAAW,CACzB,IAAY,EACZ,IAAmB,EACnB,OAAmC;QAEnC,8DAA8D;QAC9D,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;YAC9B,qBAAqB,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;SA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EAAE,KAAK,CAAC,CAC3E,CAAC;QAEF,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,IAAY;QAC7B,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,MAAM,SAAS,GAAG,IAAA,8CAAmC,EAAC,IAAI,CAAC,CAAC;QAC5D,OAAO,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YAClD,oEAAoE;YACpE,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,EAAG,CAAC;YAChC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SACxB;QACD,IAAI,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YACjD,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;SACvC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;IAEO,KAAK,CAAC,YAAY,CAAC,IAAY;QACtC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CACD;AArED,sDAqEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IChannelStorageService } from \"@fluidframework/datastore-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions/internal\";\nimport { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport { getNormalizedObjectStoragePathParts } from \"@fluidframework/runtime-utils/internal\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\n\nexport class ChannelStorageService implements IChannelStorageService {\n\tprivate static flattenTree(\n\t\tbase: string,\n\t\ttree: ISnapshotTree,\n\t\tresults: { [path: string]: string },\n\t) {\n\t\t// eslint-disable-next-line guard-for-in, no-restricted-syntax\n\t\tfor (const path in tree.trees) {\n\t\t\tChannelStorageService.flattenTree(`${base}${path}/`, tree.trees[path], results);\n\t\t}\n\n\t\t// eslint-disable-next-line guard-for-in, no-restricted-syntax\n\t\tfor (const blob in tree.blobs) {\n\t\t\tresults[`${base}${blob}`] = tree.blobs[blob];\n\t\t}\n\t}\n\n\tprivate readonly flattenedTree: { [path: string]: string };\n\n\tconstructor(\n\t\tprivate readonly tree: ISnapshotTree | undefined,\n\t\tprivate readonly storage: Pick<IDocumentStorageService, \"readBlob\">,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t\tprivate readonly extraBlobs?: Map<string, ArrayBufferLike>,\n\t) {\n\t\tthis.flattenedTree = {};\n\t\t// Create a map from paths to blobs\n\t\tif (tree !== undefined) {\n\t\t\tChannelStorageService.flattenTree(\"\", tree, this.flattenedTree);\n\t\t}\n\t}\n\n\tpublic async contains(path: string): Promise<boolean> {\n\t\treturn this.flattenedTree[path] !== undefined;\n\t}\n\n\tpublic async readBlob(path: string): Promise<ArrayBufferLike> {\n\t\tconst id = await this.getIdForPath(path);\n\t\tconst blob = this.extraBlobs !== undefined ? this.extraBlobs.get(id) : undefined;\n\n\t\tif (blob !== undefined) {\n\t\t\treturn blob;\n\t\t}\n\t\tconst blobP = this.storage.readBlob(id);\n\t\tblobP.catch((error) =>\n\t\t\tthis.logger.sendErrorEvent({ eventName: \"ChannelStorageBlobError\" }, error),\n\t\t);\n\n\t\treturn blobP;\n\t}\n\n\tpublic async list(path: string): Promise<string[]> {\n\t\tlet tree = this.tree;\n\t\tconst pathParts = getNormalizedObjectStoragePathParts(path);\n\t\twhile (tree !== undefined && pathParts.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tconst part = pathParts.shift()!;\n\t\t\ttree = tree.trees[part];\n\t\t}\n\t\tif (tree === undefined || pathParts.length !== 0) {\n\t\t\tthrow new Error(\"path does not exist\");\n\t\t}\n\n\t\treturn Object.keys(tree?.blobs ?? {});\n\t}\n\n\tprivate async getIdForPath(path: string): Promise<string> {\n\t\treturn this.flattenedTree[path];\n\t}\n}\n"]}
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
|
-
import {
|
|
6
|
+
import { AttachState, IAudience, IDeltaManager } from "@fluidframework/container-definitions";
|
|
7
7
|
import { FluidObject, IFluidHandle, IFluidHandleContext, IRequest, IResponse } from "@fluidframework/core-interfaces";
|
|
8
|
-
import {
|
|
9
|
-
import { IClientDetails, IDocumentMessage, ISequencedDocumentMessage, IQuorumClients } from "@fluidframework/protocol-definitions";
|
|
10
|
-
import { IFluidDataStoreContext, IFluidDataStoreChannel, IGarbageCollectionData, IInboundSignalMessage, ISummaryTreeWithStats, VisibilityState, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
11
|
-
import { IChannel, IFluidDataStoreRuntime, IFluidDataStoreRuntimeEvents, IChannelFactory } from "@fluidframework/datastore-definitions";
|
|
8
|
+
import { IChannel, IChannelFactory, IFluidDataStoreRuntime, IFluidDataStoreRuntimeEvents } from "@fluidframework/datastore-definitions";
|
|
12
9
|
import { IIdCompressor } from "@fluidframework/id-compressor";
|
|
10
|
+
import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
11
|
+
import { IGarbageCollectionData, IInboundSignalMessage, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
12
|
+
import { IFluidDataStoreChannel, IFluidDataStoreContext, VisibilityState } from "@fluidframework/runtime-definitions/internal";
|
|
13
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
13
14
|
/**
|
|
14
15
|
* @alpha
|
|
15
16
|
*/
|
|
@@ -111,6 +112,7 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
|
|
|
111
112
|
addChannel(channel: IChannel): void;
|
|
112
113
|
createChannel(idArg: string | undefined, type: string): IChannel;
|
|
113
114
|
private createChannelContext;
|
|
115
|
+
private createRehydratedLocalChannelContext;
|
|
114
116
|
/**
|
|
115
117
|
* Binds a channel with the runtime. If the runtime is attached we will attach the channel right away.
|
|
116
118
|
* If the runtime is not attached we will defer the attach until the runtime attaches.
|
|
@@ -205,10 +207,10 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
|
|
|
205
207
|
/**
|
|
206
208
|
* Submits the signal to be sent to other clients.
|
|
207
209
|
* @param type - Type of the signal.
|
|
208
|
-
* @param content - Content of the signal.
|
|
210
|
+
* @param content - Content of the signal. Should be a JSON serializable object or primitive.
|
|
209
211
|
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
210
212
|
*/
|
|
211
|
-
submitSignal(type: string, content:
|
|
213
|
+
submitSignal(type: string, content: unknown, targetClientId?: string): void;
|
|
212
214
|
/**
|
|
213
215
|
* Will return when the data store is attached.
|
|
214
216
|
*/
|
|
@@ -245,13 +247,14 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
|
|
|
245
247
|
* other clients that are up-to-date till seq# 100 may not have them yet.
|
|
246
248
|
*/
|
|
247
249
|
private identifyLocalChangeInSummarizer;
|
|
250
|
+
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
|
|
248
251
|
}
|
|
249
252
|
/**
|
|
250
253
|
* Mixin class that adds request handler to FluidDataStoreRuntime
|
|
251
254
|
* Request handler is only called when data store can't resolve request, i.e. for custom requests.
|
|
252
255
|
* @param Base - base class, inherits from FluidDataStoreRuntime
|
|
253
256
|
* @param requestHandler - request handler to mix in
|
|
254
|
-
* @
|
|
257
|
+
* @alpha
|
|
255
258
|
*/
|
|
256
259
|
export declare const mixinRequestHandler: (requestHandler: (request: IRequest, runtime: FluidDataStoreRuntime) => Promise<IResponse>, Base?: typeof FluidDataStoreRuntime) => typeof FluidDataStoreRuntime;
|
|
257
260
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EACN,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EACN,QAAQ,EACR,eAAe,EACf,sBAAsB,EACtB,4BAA4B,EAC5B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EAKzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACN,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAKN,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EAEf,MAAM,8CAA8C,CAAC;AAgBtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAuBtE;;GAEG;AACH,oBAAY,oBAAoB;IAE/B,MAAM,WAAW;IACjB,SAAS,OAAO;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAGrC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;CAC/C;AAED;;;GAGG;AACH,qBAAa,qBACZ,SAAQ,iBAAiB,CAAC,4BAA4B,CACtD,YAAW,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