@fluidframework/container-runtime 2.33.2 → 2.40.0-336023
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/container-runtime.test-files.tar +0 -0
- package/dist/channelCollection.d.ts +18 -8
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +14 -6
- package/dist/channelCollection.js.map +1 -1
- package/dist/dataStoreContext.d.ts +3 -12
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +1 -2
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/channelCollection.d.ts +18 -8
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +15 -7
- package/lib/channelCollection.js.map +1 -1
- package/lib/dataStoreContext.d.ts +3 -12
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +1 -2
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/index.d.ts +0 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -3
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +17 -17
- package/src/channelCollection.ts +36 -14
- package/src/dataStoreContext.ts +5 -14
- package/src/index.ts +0 -13
- package/src/packageVersion.ts +1 -1
package/lib/packageVersion.d.ts
CHANGED
|
@@ -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/container-runtime";
|
|
8
|
-
export declare const pkgVersion = "2.
|
|
8
|
+
export declare const pkgVersion = "2.40.0-336023";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,sCAAsC,CAAC;AAC3D,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,sCAAsC,CAAC;AAC3D,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
|
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,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/container-runtime\";\nexport const pkgVersion = \"2.40.0-336023\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-runtime",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.40.0-336023",
|
|
4
4
|
"description": "Fluid container runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -119,18 +119,18 @@
|
|
|
119
119
|
"temp-directory": "nyc/.nyc_output"
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
|
-
"@fluid-internal/client-utils": "
|
|
123
|
-
"@fluidframework/container-definitions": "
|
|
124
|
-
"@fluidframework/container-runtime-definitions": "
|
|
125
|
-
"@fluidframework/core-interfaces": "
|
|
126
|
-
"@fluidframework/core-utils": "
|
|
127
|
-
"@fluidframework/datastore": "
|
|
128
|
-
"@fluidframework/driver-definitions": "
|
|
129
|
-
"@fluidframework/driver-utils": "
|
|
130
|
-
"@fluidframework/id-compressor": "
|
|
131
|
-
"@fluidframework/runtime-definitions": "
|
|
132
|
-
"@fluidframework/runtime-utils": "
|
|
133
|
-
"@fluidframework/telemetry-utils": "
|
|
122
|
+
"@fluid-internal/client-utils": "2.40.0-336023",
|
|
123
|
+
"@fluidframework/container-definitions": "2.40.0-336023",
|
|
124
|
+
"@fluidframework/container-runtime-definitions": "2.40.0-336023",
|
|
125
|
+
"@fluidframework/core-interfaces": "2.40.0-336023",
|
|
126
|
+
"@fluidframework/core-utils": "2.40.0-336023",
|
|
127
|
+
"@fluidframework/datastore": "2.40.0-336023",
|
|
128
|
+
"@fluidframework/driver-definitions": "2.40.0-336023",
|
|
129
|
+
"@fluidframework/driver-utils": "2.40.0-336023",
|
|
130
|
+
"@fluidframework/id-compressor": "2.40.0-336023",
|
|
131
|
+
"@fluidframework/runtime-definitions": "2.40.0-336023",
|
|
132
|
+
"@fluidframework/runtime-utils": "2.40.0-336023",
|
|
133
|
+
"@fluidframework/telemetry-utils": "2.40.0-336023",
|
|
134
134
|
"@tylerbu/sorted-btree-es6": "^1.8.0",
|
|
135
135
|
"double-ended-queue": "^2.1.0-0",
|
|
136
136
|
"lz4js": "^0.2.0",
|
|
@@ -140,16 +140,16 @@
|
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
142
142
|
"@biomejs/biome": "~1.9.3",
|
|
143
|
-
"@fluid-internal/mocha-test-setup": "
|
|
144
|
-
"@fluid-private/stochastic-test-utils": "
|
|
145
|
-
"@fluid-private/test-pairwise-generator": "
|
|
143
|
+
"@fluid-internal/mocha-test-setup": "2.40.0-336023",
|
|
144
|
+
"@fluid-private/stochastic-test-utils": "2.40.0-336023",
|
|
145
|
+
"@fluid-private/test-pairwise-generator": "2.40.0-336023",
|
|
146
146
|
"@fluid-tools/benchmark": "^0.50.0",
|
|
147
147
|
"@fluid-tools/build-cli": "^0.55.0",
|
|
148
148
|
"@fluidframework/build-common": "^2.0.3",
|
|
149
149
|
"@fluidframework/build-tools": "^0.55.0",
|
|
150
150
|
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.33.0",
|
|
151
151
|
"@fluidframework/eslint-config-fluid": "^5.7.3",
|
|
152
|
-
"@fluidframework/test-runtime-utils": "
|
|
152
|
+
"@fluidframework/test-runtime-utils": "2.40.0-336023",
|
|
153
153
|
"@microsoft/api-extractor": "7.52.5",
|
|
154
154
|
"@types/double-ended-queue": "^2.1.0",
|
|
155
155
|
"@types/lz4js": "^0.2.0",
|
package/src/channelCollection.ts
CHANGED
|
@@ -120,11 +120,22 @@ interface FluidDataStoreMessage {
|
|
|
120
120
|
type: string;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/**
|
|
124
|
+
* This version of the interface is private to this the package. it should never be exported under any tag.
|
|
125
|
+
* It is used to manage interactions within the container-runtime package. If something is needed
|
|
126
|
+
* cross package, it is likely it is also being used cross layer (ContainerRuntime * DataStoreRuntime).
|
|
127
|
+
* If that is the case, the change likely needs to be staged directly on IFluidParentContext. Changes
|
|
128
|
+
* being staged on IFluidParentContext can be added here as well, likely with optionality removed,
|
|
129
|
+
* to ease interactions within this package.
|
|
130
|
+
*/
|
|
131
|
+
export interface IFluidParentContextPrivate extends Omit<IFluidParentContext, "isReadOnly"> {
|
|
132
|
+
readonly isReadOnly: () => boolean;
|
|
133
|
+
}
|
|
134
|
+
|
|
123
135
|
/**
|
|
124
136
|
* Creates a shallow wrapper of {@link IFluidParentContext}. The wrapper can then have its methods overwritten as needed
|
|
125
137
|
*/
|
|
126
|
-
export function wrapContext(context:
|
|
127
|
-
const isReadOnly = context.isReadOnly;
|
|
138
|
+
export function wrapContext(context: IFluidParentContextPrivate): IFluidParentContextPrivate {
|
|
128
139
|
return {
|
|
129
140
|
get IFluidDataStoreRegistry() {
|
|
130
141
|
return context.IFluidDataStoreRegistry;
|
|
@@ -150,7 +161,7 @@ export function wrapContext(context: IFluidParentContext): IFluidParentContext {
|
|
|
150
161
|
get attachState() {
|
|
151
162
|
return context.attachState;
|
|
152
163
|
},
|
|
153
|
-
isReadOnly:
|
|
164
|
+
isReadOnly: () => context.isReadOnly(),
|
|
154
165
|
containerRuntime: context.containerRuntime,
|
|
155
166
|
scope: context.scope,
|
|
156
167
|
gcThrowOnTombstoneUsage: context.gcThrowOnTombstoneUsage,
|
|
@@ -201,8 +212,8 @@ export function wrapContext(context: IFluidParentContext): IFluidParentContext {
|
|
|
201
212
|
*/
|
|
202
213
|
function wrapContextForInnerChannel(
|
|
203
214
|
id: string,
|
|
204
|
-
parentContext:
|
|
205
|
-
):
|
|
215
|
+
parentContext: IFluidParentContextPrivate,
|
|
216
|
+
): IFluidParentContextPrivate {
|
|
206
217
|
const context = wrapContext(parentContext);
|
|
207
218
|
|
|
208
219
|
context.submitMessage = (type: string, content: unknown, localOpMetadata: unknown) => {
|
|
@@ -274,7 +285,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
274
285
|
|
|
275
286
|
constructor(
|
|
276
287
|
protected readonly baseSnapshot: ISnapshotTree | ISnapshot | undefined,
|
|
277
|
-
public readonly parentContext:
|
|
288
|
+
public readonly parentContext: IFluidParentContextPrivate,
|
|
278
289
|
baseLogger: ITelemetryBaseLogger,
|
|
279
290
|
private readonly gcNodeUpdated: (props: IGCNodeUpdatedProps) => void,
|
|
280
291
|
private readonly isDataStoreDeleted: (nodePath: string) => boolean,
|
|
@@ -372,7 +383,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
372
383
|
*/
|
|
373
384
|
private shouldSendAttachLog = true;
|
|
374
385
|
|
|
375
|
-
protected wrapContextForInnerChannel(id: string):
|
|
386
|
+
protected wrapContextForInnerChannel(id: string): IFluidParentContextPrivate {
|
|
376
387
|
return wrapContextForInnerChannel(id, this.parentContext);
|
|
377
388
|
}
|
|
378
389
|
|
|
@@ -1133,7 +1144,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1133
1144
|
fluidDataStoreId,
|
|
1134
1145
|
}),
|
|
1135
1146
|
details: {
|
|
1136
|
-
runtimeReadonly: this.parentContext.isReadOnly
|
|
1147
|
+
runtimeReadonly: this.parentContext.isReadOnly(),
|
|
1137
1148
|
readonly,
|
|
1138
1149
|
},
|
|
1139
1150
|
},
|
|
@@ -1622,9 +1633,7 @@ export function detectOutboundReferences(
|
|
|
1622
1633
|
/**
|
|
1623
1634
|
* @internal
|
|
1624
1635
|
*/
|
|
1625
|
-
export class ChannelCollectionFactory
|
|
1626
|
-
implements IFluidDataStoreFactory
|
|
1627
|
-
{
|
|
1636
|
+
export class ChannelCollectionFactory implements IFluidDataStoreFactory {
|
|
1628
1637
|
public readonly type = "ChannelCollectionChannel";
|
|
1629
1638
|
|
|
1630
1639
|
public IFluidDataStoreRegistry: IFluidDataStoreRegistry;
|
|
@@ -1635,12 +1644,11 @@ export class ChannelCollectionFactory<T extends ChannelCollection = ChannelColle
|
|
|
1635
1644
|
private readonly provideEntryPoint: (
|
|
1636
1645
|
runtime: IFluidDataStoreChannel,
|
|
1637
1646
|
) => Promise<FluidObject>,
|
|
1638
|
-
private readonly ctor: (...args: ConstructorParameters<typeof ChannelCollection>) => T,
|
|
1639
1647
|
) {
|
|
1640
1648
|
this.IFluidDataStoreRegistry = new FluidDataStoreRegistry(registryEntries);
|
|
1641
1649
|
}
|
|
1642
1650
|
|
|
1643
|
-
public get IFluidDataStoreFactory(): ChannelCollectionFactory
|
|
1651
|
+
public get IFluidDataStoreFactory(): ChannelCollectionFactory {
|
|
1644
1652
|
return this;
|
|
1645
1653
|
}
|
|
1646
1654
|
|
|
@@ -1648,7 +1656,21 @@ export class ChannelCollectionFactory<T extends ChannelCollection = ChannelColle
|
|
|
1648
1656
|
context: IFluidDataStoreContext,
|
|
1649
1657
|
_existing: boolean,
|
|
1650
1658
|
): Promise<IFluidDataStoreChannel> {
|
|
1651
|
-
|
|
1659
|
+
// when work is done to complete nested datastores
|
|
1660
|
+
// this class should move to a new package
|
|
1661
|
+
// and IFluidDataStoreContext will need to support
|
|
1662
|
+
// all the cross layer needs of the channel context,
|
|
1663
|
+
// and the below assert should be removed.
|
|
1664
|
+
//
|
|
1665
|
+
// for now this will continue to work if both
|
|
1666
|
+
// this factory and the container runtime are
|
|
1667
|
+
// from the same package.
|
|
1668
|
+
assert(
|
|
1669
|
+
context instanceof FluidDataStoreContext,
|
|
1670
|
+
"we don't support the layer boundary here today",
|
|
1671
|
+
);
|
|
1672
|
+
|
|
1673
|
+
const runtime = new ChannelCollection(
|
|
1652
1674
|
context.baseSnapshot,
|
|
1653
1675
|
context, // parentContext
|
|
1654
1676
|
context.baseLogger,
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -52,7 +52,6 @@ import {
|
|
|
52
52
|
IFluidDataStoreContext,
|
|
53
53
|
IFluidDataStoreContextDetached,
|
|
54
54
|
IFluidDataStoreRegistry,
|
|
55
|
-
IFluidParentContext,
|
|
56
55
|
IGarbageCollectionDetailsBase,
|
|
57
56
|
IProvideFluidDataStoreFactory,
|
|
58
57
|
ISummarizeInternalResult,
|
|
@@ -64,6 +63,7 @@ import {
|
|
|
64
63
|
type IPendingMessagesState,
|
|
65
64
|
type IRuntimeMessageCollection,
|
|
66
65
|
type IFluidDataStoreFactory,
|
|
66
|
+
type IFluidParentContext,
|
|
67
67
|
} from "@fluidframework/runtime-definitions/internal";
|
|
68
68
|
import {
|
|
69
69
|
addBlobToSummary,
|
|
@@ -81,6 +81,7 @@ import {
|
|
|
81
81
|
tagCodeArtifacts,
|
|
82
82
|
} from "@fluidframework/telemetry-utils/internal";
|
|
83
83
|
|
|
84
|
+
import type { IFluidParentContextPrivate } from "./channelCollection.js";
|
|
84
85
|
import { BaseDeltaManagerProxy } from "./deltaManagerProxies.js";
|
|
85
86
|
import {
|
|
86
87
|
runtimeCompatDetailsForDataStore,
|
|
@@ -117,9 +118,6 @@ export function createAttributesBlob(
|
|
|
117
118
|
return new BlobTreeEntry(dataStoreAttributesBlobName, JSON.stringify(attributes));
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
/**
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
123
121
|
export interface ISnapshotDetails {
|
|
124
122
|
pkg: readonly string[];
|
|
125
123
|
isRootDataStore: boolean;
|
|
@@ -131,7 +129,6 @@ export interface ISnapshotDetails {
|
|
|
131
129
|
* This is interface that every context should implement.
|
|
132
130
|
* This interface is used for context's parent - ChannelCollection.
|
|
133
131
|
* It should not be exposed to any other users of context.
|
|
134
|
-
* @internal
|
|
135
132
|
*/
|
|
136
133
|
export interface IFluidDataStoreContextInternal extends IFluidDataStoreContext {
|
|
137
134
|
getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
@@ -147,11 +144,10 @@ export interface IFluidDataStoreContextInternal extends IFluidDataStoreContext {
|
|
|
147
144
|
|
|
148
145
|
/**
|
|
149
146
|
* Properties necessary for creating a FluidDataStoreContext
|
|
150
|
-
* @internal
|
|
151
147
|
*/
|
|
152
148
|
export interface IFluidDataStoreContextProps {
|
|
153
149
|
readonly id: string;
|
|
154
|
-
readonly parentContext:
|
|
150
|
+
readonly parentContext: IFluidParentContextPrivate;
|
|
155
151
|
readonly storage: IDocumentStorageService;
|
|
156
152
|
readonly scope: FluidObject;
|
|
157
153
|
readonly createSummarizerNodeFn: CreateChildSummarizerNodeFn;
|
|
@@ -161,7 +157,6 @@ export interface IFluidDataStoreContextProps {
|
|
|
161
157
|
|
|
162
158
|
/**
|
|
163
159
|
* Properties necessary for creating a local FluidDataStoreContext
|
|
164
|
-
* @internal
|
|
165
160
|
*/
|
|
166
161
|
export interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContextProps {
|
|
167
162
|
readonly pkg: Readonly<string[]> | undefined;
|
|
@@ -171,7 +166,6 @@ export interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContext
|
|
|
171
166
|
|
|
172
167
|
/**
|
|
173
168
|
* Properties necessary for creating a local FluidDataStoreContext
|
|
174
|
-
* @internal
|
|
175
169
|
*/
|
|
176
170
|
export interface ILocalDetachedFluidDataStoreContextProps
|
|
177
171
|
extends ILocalFluidDataStoreContextProps {
|
|
@@ -180,7 +174,6 @@ export interface ILocalDetachedFluidDataStoreContextProps
|
|
|
180
174
|
|
|
181
175
|
/**
|
|
182
176
|
* Properties necessary for creating a remote FluidDataStoreContext
|
|
183
|
-
* @internal
|
|
184
177
|
*/
|
|
185
178
|
export interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContextProps {
|
|
186
179
|
readonly snapshot: ISnapshotTree | ISnapshot | undefined;
|
|
@@ -189,7 +182,6 @@ export interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContex
|
|
|
189
182
|
// back-compat: To be removed in the future.
|
|
190
183
|
// Added in "2.0.0-rc.2.0.0" timeframe (to support older builds).
|
|
191
184
|
/**
|
|
192
|
-
* @internal
|
|
193
185
|
*/
|
|
194
186
|
export interface IFluidDataStoreContextEvents extends IEvent {
|
|
195
187
|
(event: "attaching" | "attached", listener: () => void);
|
|
@@ -249,7 +241,6 @@ class ContextDeltaManagerProxy extends BaseDeltaManagerProxy {
|
|
|
249
241
|
|
|
250
242
|
/**
|
|
251
243
|
* Represents the context for the store. This context is passed to the store runtime.
|
|
252
|
-
* @internal
|
|
253
244
|
*/
|
|
254
245
|
export abstract class FluidDataStoreContext
|
|
255
246
|
extends TypedEventEmitter<IFluidDataStoreContextEvents>
|
|
@@ -281,7 +272,7 @@ export abstract class FluidDataStoreContext
|
|
|
281
272
|
return this._contextDeltaManagerProxy;
|
|
282
273
|
}
|
|
283
274
|
|
|
284
|
-
public isReadOnly = (): boolean => this.parentContext.isReadOnly
|
|
275
|
+
public isReadOnly = (): boolean => this.parentContext.isReadOnly();
|
|
285
276
|
|
|
286
277
|
public get connected(): boolean {
|
|
287
278
|
return this.parentContext.connected;
|
|
@@ -424,7 +415,7 @@ export abstract class FluidDataStoreContext
|
|
|
424
415
|
|
|
425
416
|
public readonly id: string;
|
|
426
417
|
private readonly _containerRuntime: IContainerRuntimeBase;
|
|
427
|
-
private readonly parentContext:
|
|
418
|
+
private readonly parentContext: IFluidParentContextPrivate;
|
|
428
419
|
public readonly storage: IDocumentStorageService;
|
|
429
420
|
public readonly scope: FluidObject;
|
|
430
421
|
// Represents the group to which the data store belongs too.
|
package/src/index.ts
CHANGED
|
@@ -109,16 +109,3 @@ export {
|
|
|
109
109
|
DefaultSummaryConfiguration,
|
|
110
110
|
} from "./summary/index.js";
|
|
111
111
|
export { IChunkedOp, unpackRuntimeMessage } from "./opLifecycle/index.js";
|
|
112
|
-
export { ChannelCollection } from "./channelCollection.js";
|
|
113
|
-
export {
|
|
114
|
-
IFluidDataStoreContextInternal,
|
|
115
|
-
ISnapshotDetails,
|
|
116
|
-
LocalFluidDataStoreContext,
|
|
117
|
-
LocalFluidDataStoreContextBase,
|
|
118
|
-
FluidDataStoreContext,
|
|
119
|
-
IFluidDataStoreContextProps,
|
|
120
|
-
ILocalFluidDataStoreContextProps,
|
|
121
|
-
ILocalDetachedFluidDataStoreContextProps,
|
|
122
|
-
IFluidDataStoreContextEvents,
|
|
123
|
-
} from "./dataStoreContext.js";
|
|
124
|
-
export { DataStoreContexts } from "./dataStoreContexts.js";
|
package/src/packageVersion.ts
CHANGED