@fluid-experimental/attributor 2.0.0-internal.7.3.0 → 2.0.0-internal.7.4.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 +4 -0
- package/api-extractor-lint.json +13 -0
- package/api-extractor.json +9 -1
- package/api-report/attributor.api.md +9 -9
- package/dist/attributor-alpha.d.ts +27 -0
- package/dist/attributor-beta.d.ts +35 -0
- package/dist/attributor-public.d.ts +35 -0
- package/dist/attributor-untrimmed.d.ts +124 -0
- package/dist/attributor.cjs +2 -2
- package/dist/attributor.cjs.map +1 -1
- package/dist/attributor.d.ts +3 -3
- package/dist/mixinAttributor.cjs +6 -7
- package/dist/mixinAttributor.cjs.map +1 -1
- package/dist/mixinAttributor.d.ts +6 -9
- package/dist/mixinAttributor.d.ts.map +1 -1
- package/lib/attributor-alpha.d.ts +27 -0
- package/lib/attributor-beta.d.ts +35 -0
- package/lib/attributor-public.d.ts +35 -0
- package/lib/attributor-untrimmed.d.ts +124 -0
- package/lib/attributor.d.ts +3 -3
- package/lib/attributor.d.ts.map +1 -1
- package/lib/attributor.mjs +2 -2
- package/lib/attributor.mjs.map +1 -1
- package/lib/encoders.d.ts +2 -2
- package/lib/encoders.d.ts.map +1 -1
- package/lib/index.d.ts +2 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/lz4Encoder.d.ts +1 -1
- package/lib/lz4Encoder.d.ts.map +1 -1
- package/lib/mixinAttributor.d.ts +6 -9
- package/lib/mixinAttributor.d.ts.map +1 -1
- package/lib/mixinAttributor.mjs +6 -7
- package/lib/mixinAttributor.mjs.map +1 -1
- package/package.json +39 -34
- package/src/attributor.ts +3 -3
- package/src/mixinAttributor.ts +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-lint.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
// TODO: remove once base config has this enabled as an error
|
|
7
|
+
"ae-incompatible-release-tags": {
|
|
8
|
+
"logLevel": "error",
|
|
9
|
+
"addToApiReportFile": false
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
// TODO: Add missing documentation and remove this rule override
|
|
7
|
+
"ae-undocumented": {
|
|
8
|
+
"logLevel": "none"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
4
12
|
}
|
|
@@ -12,7 +12,7 @@ import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
|
12
12
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
13
13
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
14
14
|
|
|
15
|
-
// @
|
|
15
|
+
// @internal
|
|
16
16
|
export class Attributor implements IAttributor {
|
|
17
17
|
constructor(initialEntries?: Iterable<[number, AttributionInfo]>);
|
|
18
18
|
// (undocumented)
|
|
@@ -24,13 +24,13 @@ export class Attributor implements IAttributor {
|
|
|
24
24
|
tryGetAttributionInfo(key: number): AttributionInfo | undefined;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
// @
|
|
27
|
+
// @internal (undocumented)
|
|
28
28
|
export function createRuntimeAttributor(): IRuntimeAttributor;
|
|
29
29
|
|
|
30
|
-
// @
|
|
30
|
+
// @internal (undocumented)
|
|
31
31
|
export const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
|
|
32
32
|
|
|
33
|
-
// @
|
|
33
|
+
// @internal
|
|
34
34
|
export interface IAttributor {
|
|
35
35
|
// (undocumented)
|
|
36
36
|
entries(): IterableIterator<[number, AttributionInfo]>;
|
|
@@ -39,16 +39,16 @@ export interface IAttributor {
|
|
|
39
39
|
tryGetAttributionInfo(key: number): AttributionInfo | undefined;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
// @
|
|
42
|
+
// @internal (undocumented)
|
|
43
43
|
export interface IProvideRuntimeAttributor {
|
|
44
44
|
// (undocumented)
|
|
45
45
|
readonly IRuntimeAttributor: IRuntimeAttributor;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
// @
|
|
48
|
+
// @internal (undocumented)
|
|
49
49
|
export const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
|
|
50
50
|
|
|
51
|
-
// @
|
|
51
|
+
// @internal @sealed
|
|
52
52
|
export interface IRuntimeAttributor extends IProvideRuntimeAttributor {
|
|
53
53
|
// (undocumented)
|
|
54
54
|
get(key: AttributionKey): AttributionInfo;
|
|
@@ -58,10 +58,10 @@ export interface IRuntimeAttributor extends IProvideRuntimeAttributor {
|
|
|
58
58
|
readonly isEnabled: boolean;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// @
|
|
61
|
+
// @internal
|
|
62
62
|
export const mixinAttributor: (Base?: typeof ContainerRuntime) => typeof ContainerRuntime;
|
|
63
63
|
|
|
64
|
-
// @
|
|
64
|
+
// @internal
|
|
65
65
|
export class OpStreamAttributor extends Attributor implements IAttributor {
|
|
66
66
|
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, audience: IAudience, initialEntries?: Iterable<[number, AttributionInfo]>);
|
|
67
67
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AttributionInfo } from '@fluidframework/runtime-definitions';
|
|
2
|
+
import { AttributionKey } from '@fluidframework/runtime-definitions';
|
|
3
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
4
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
5
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: AttributionInfo */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: Attributor */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: createRuntimeAttributor */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: enableOnNewFileKey */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IAttributor */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IProvideRuntimeAttributor */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: IRuntimeAttributor */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: mixinAttributor */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: OpStreamAttributor */
|
|
26
|
+
|
|
27
|
+
export { }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AttributionInfo } from '@fluidframework/runtime-definitions';
|
|
2
|
+
import { AttributionKey } from '@fluidframework/runtime-definitions';
|
|
3
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
4
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
5
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: AttributionInfo */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: AttributionKey */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: Attributor */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: ContainerRuntime */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: createRuntimeAttributor */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: enableOnNewFileKey */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: IAttributor */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: IAudience */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: IDeltaManager */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: IProvideRuntimeAttributor */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: IRuntimeAttributor */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: mixinAttributor */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: OpStreamAttributor */
|
|
34
|
+
|
|
35
|
+
export { }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AttributionInfo } from '@fluidframework/runtime-definitions';
|
|
2
|
+
import { AttributionKey } from '@fluidframework/runtime-definitions';
|
|
3
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
4
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
5
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: AttributionInfo */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: AttributionKey */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: Attributor */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: ContainerRuntime */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: createRuntimeAttributor */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: enableOnNewFileKey */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: IAttributor */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: IAudience */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: IDeltaManager */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: IProvideRuntimeAttributor */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: IRuntimeAttributor */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: mixinAttributor */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: OpStreamAttributor */
|
|
34
|
+
|
|
35
|
+
export { }
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { AttributionInfo } from '@fluidframework/runtime-definitions';
|
|
2
|
+
import { AttributionKey } from '@fluidframework/runtime-definitions';
|
|
3
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
4
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
5
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* {@inheritdoc IAttributor}
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare class Attributor implements IAttributor {
|
|
14
|
+
protected readonly keyToInfo: Map<number, AttributionInfo>;
|
|
15
|
+
/**
|
|
16
|
+
* @param initialEntries - Any entries which should be populated on instantiation.
|
|
17
|
+
*/
|
|
18
|
+
constructor(initialEntries?: Iterable<[number, AttributionInfo]>);
|
|
19
|
+
/**
|
|
20
|
+
* {@inheritdoc IAttributor.getAttributionInfo}
|
|
21
|
+
*/
|
|
22
|
+
getAttributionInfo(key: number): AttributionInfo;
|
|
23
|
+
/**
|
|
24
|
+
* {@inheritdoc IAttributor.tryGetAttributionInfo}
|
|
25
|
+
*/
|
|
26
|
+
tryGetAttributionInfo(key: number): AttributionInfo | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* {@inheritdoc IAttributor.entries}
|
|
29
|
+
*/
|
|
30
|
+
entries(): IterableIterator<[number, AttributionInfo]>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @returns an IRuntimeAttributor for usage with `mixinAttributor`. The attributor will only be populated with data
|
|
35
|
+
* once it's passed via scope to a container runtime load flow. See {@link mixinAttributor}.
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare function createRuntimeAttributor(): IRuntimeAttributor;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export declare const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Provides lookup between attribution keys and their associated attribution information.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare interface IAttributor {
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves attribution information associated with a particular key.
|
|
52
|
+
* @param key - Attribution key to look up.
|
|
53
|
+
* @throws If no attribution information is recorded for that key.
|
|
54
|
+
*/
|
|
55
|
+
getAttributionInfo(key: number): AttributionInfo;
|
|
56
|
+
/**
|
|
57
|
+
* @param key - Attribution key to look up.
|
|
58
|
+
* @returns the attribution information associated with the provided key, or undefined if no information exists.
|
|
59
|
+
*/
|
|
60
|
+
tryGetAttributionInfo(key: number): AttributionInfo | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* @returns an iterable of (attribution key, attribution info) pairs for each stored key.
|
|
63
|
+
*/
|
|
64
|
+
entries(): IterableIterator<[number, AttributionInfo]>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export declare interface IProvideRuntimeAttributor {
|
|
71
|
+
readonly IRuntimeAttributor: IRuntimeAttributor;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export declare const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Provides access to attribution information stored on the container runtime.
|
|
81
|
+
*
|
|
82
|
+
* Attributors are only populated after the container runtime they are injected into has initialized.
|
|
83
|
+
* @sealed
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export declare interface IRuntimeAttributor extends IProvideRuntimeAttributor {
|
|
87
|
+
/**
|
|
88
|
+
* @throws - If no AttributionInfo exists for this key.
|
|
89
|
+
*/
|
|
90
|
+
get(key: AttributionKey): AttributionInfo;
|
|
91
|
+
/**
|
|
92
|
+
* @returns Whether any AttributionInfo exists for the provided key.
|
|
93
|
+
*/
|
|
94
|
+
has(key: AttributionKey): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* @returns Whether the runtime is currently tracking attribution information for the loaded container.
|
|
97
|
+
* See {@link mixinAttributor} for more details on when this happens.
|
|
98
|
+
*/
|
|
99
|
+
readonly isEnabled: boolean;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Mixes in logic to load and store runtime-based attribution functionality.
|
|
104
|
+
*
|
|
105
|
+
* The `scope` passed to `load` should implement `IProvideRuntimeAttributor`.
|
|
106
|
+
*
|
|
107
|
+
* Existing documents without stored attributors will not start storing attribution information: if an
|
|
108
|
+
* IRuntimeAttributor is passed via scope to load a document that never previously had attribution information,
|
|
109
|
+
* that attributor's `has` method will always return `false`.
|
|
110
|
+
* @param Base - base class, inherits from FluidAttributorRuntime
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
export declare const mixinAttributor: (Base?: typeof ContainerRuntime) => typeof ContainerRuntime;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Attributor which listens to an op stream and records entries for each op.
|
|
117
|
+
* Sequence numbers are used as attribution keys.
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
export declare class OpStreamAttributor extends Attributor implements IAttributor {
|
|
121
|
+
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, audience: IAudience, initialEntries?: Iterable<[number, AttributionInfo]>);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { }
|
package/dist/attributor.cjs
CHANGED
|
@@ -9,7 +9,7 @@ const core_utils_1 = require("@fluidframework/core-utils");
|
|
|
9
9
|
const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
|
|
10
10
|
/**
|
|
11
11
|
* {@inheritdoc IAttributor}
|
|
12
|
-
* @
|
|
12
|
+
* @internal
|
|
13
13
|
*/
|
|
14
14
|
class Attributor {
|
|
15
15
|
/**
|
|
@@ -45,7 +45,7 @@ exports.Attributor = Attributor;
|
|
|
45
45
|
/**
|
|
46
46
|
* Attributor which listens to an op stream and records entries for each op.
|
|
47
47
|
* Sequence numbers are used as attribution keys.
|
|
48
|
-
* @
|
|
48
|
+
* @internal
|
|
49
49
|
*/
|
|
50
50
|
class OpStreamAttributor extends Attributor {
|
|
51
51
|
constructor(deltaManager, audience, initialEntries) {
|
package/dist/attributor.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributor.cjs","sourceRoot":"","sources":["../src/attributor.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2DAAoD;AAGpD,qEAA6D;AA8B7D;;;GAGG;AACH,MAAa,UAAU;IAGtB;;OAEG;IACH,YAAY,cAAoD;QAC/D,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACI,kBAAkB,CAAC,GAAW;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,EAAE;YACZ,MAAM,IAAI,4BAAU,CAAC,uDAAuD,GAAG,GAAG,CAAC,CAAC;SACpF;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;OAEG;IACI,qBAAqB,CAAC,GAAW;QACvC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED;;OAEG;IACI,OAAO;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IACjC,CAAC;CACD;AAlCD,gCAkCC;AAED;;;;GAIG;AACH,MAAa,kBAAmB,SAAQ,UAAU;IACjD,YACC,YAAwE,EACxE,QAAmB,EACnB,cAAoD;QAEpD,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,OAAkC,EAAE,EAAE;YAC5D,+FAA+F;YAC/F,4EAA4E;YAC5E,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,QAAkB,CAAC,CAAC;YAC9D,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,EAAE;gBAC1B,uFAAuF;gBACvF,IAAA,mBAAM,EACL,MAAM,KAAK,SAAS,EACpB,KAAK,CAAC,oDAAoD,CAC1D,CAAC;gBACF,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE;oBAC1C,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,SAAS,EAAE,OAAO,CAAC,SAAS;iBAC5B,CAAC,CAAC;aACH;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAxBD,gDAwBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IDocumentMessage, ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { AttributionInfo } from \"@fluidframework/runtime-definitions\";\nimport { UsageError } from \"@fluidframework/telemetry-utils\";\nimport { IAudience, IDeltaManager } from \"@fluidframework/container-definitions\";\n\n/**\n * Provides lookup between attribution keys and their associated attribution information.\n * @
|
|
1
|
+
{"version":3,"file":"attributor.cjs","sourceRoot":"","sources":["../src/attributor.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2DAAoD;AAGpD,qEAA6D;AA8B7D;;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;aACH;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAxBD,gDAwBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IDocumentMessage, ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { AttributionInfo } from \"@fluidframework/runtime-definitions\";\nimport { UsageError } from \"@fluidframework/telemetry-utils\";\nimport { IAudience, IDeltaManager } from \"@fluidframework/container-definitions\";\n\n/**\n * Provides lookup between attribution keys and their associated attribution information.\n * @internal\n */\nexport interface IAttributor {\n\t/**\n\t * Retrieves attribution information associated with a particular key.\n\t * @param key - Attribution key to look up.\n\t * @throws If no attribution information is recorded for that key.\n\t */\n\tgetAttributionInfo(key: number): AttributionInfo;\n\n\t/**\n\t * @param key - Attribution key to look up.\n\t * @returns the attribution information associated with the provided key, or undefined if no information exists.\n\t */\n\ttryGetAttributionInfo(key: number): AttributionInfo | undefined;\n\n\t/**\n\t * @returns an iterable of (attribution key, attribution info) pairs for each stored key.\n\t */\n\tentries(): IterableIterator<[number, AttributionInfo]>;\n\n\t// TODO:\n\t// - GC\n}\n\n/**\n * {@inheritdoc IAttributor}\n * @internal\n */\nexport class Attributor implements IAttributor {\n\tprotected readonly keyToInfo: Map<number, AttributionInfo>;\n\n\t/**\n\t * @param initialEntries - Any entries which should be populated on instantiation.\n\t */\n\tconstructor(initialEntries?: Iterable<[number, AttributionInfo]>) {\n\t\tthis.keyToInfo = new Map(initialEntries ?? []);\n\t}\n\n\t/**\n\t * {@inheritdoc IAttributor.getAttributionInfo}\n\t */\n\tpublic getAttributionInfo(key: number): AttributionInfo {\n\t\tconst result = this.tryGetAttributionInfo(key);\n\t\tif (!result) {\n\t\t\tthrow new UsageError(`Requested attribution information for unstored key: ${key}.`);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * {@inheritdoc IAttributor.tryGetAttributionInfo}\n\t */\n\tpublic tryGetAttributionInfo(key: number): AttributionInfo | undefined {\n\t\treturn this.keyToInfo.get(key);\n\t}\n\n\t/**\n\t * {@inheritdoc IAttributor.entries}\n\t */\n\tpublic entries(): IterableIterator<[number, AttributionInfo]> {\n\t\treturn this.keyToInfo.entries();\n\t}\n}\n\n/**\n * Attributor which listens to an op stream and records entries for each op.\n * Sequence numbers are used as attribution keys.\n * @internal\n */\nexport class OpStreamAttributor extends Attributor implements IAttributor {\n\tconstructor(\n\t\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n\t\taudience: IAudience,\n\t\tinitialEntries?: Iterable<[number, AttributionInfo]>,\n\t) {\n\t\tsuper(initialEntries);\n\t\tdeltaManager.on(\"op\", (message: ISequencedDocumentMessage) => {\n\t\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tconst client = audience.getMember(message.clientId as string);\n\t\t\tif (message.type === \"op\") {\n\t\t\t\t// TODO: This case may be legitimate, and if so we need to figure out how to handle it.\n\t\t\t\tassert(\n\t\t\t\t\tclient !== undefined,\n\t\t\t\t\t0x4af /* Received message from user not in the audience */,\n\t\t\t\t);\n\t\t\t\tthis.keyToInfo.set(message.sequenceNumber, {\n\t\t\t\t\tuser: client.user,\n\t\t\t\t\ttimestamp: message.timestamp,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
|
package/dist/attributor.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AttributionInfo } from "@fluidframework/runtime-definitions";
|
|
|
3
3
|
import { IAudience, IDeltaManager } from "@fluidframework/container-definitions";
|
|
4
4
|
/**
|
|
5
5
|
* Provides lookup between attribution keys and their associated attribution information.
|
|
6
|
-
* @
|
|
6
|
+
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export interface IAttributor {
|
|
9
9
|
/**
|
|
@@ -24,7 +24,7 @@ export interface IAttributor {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* {@inheritdoc IAttributor}
|
|
27
|
-
* @
|
|
27
|
+
* @internal
|
|
28
28
|
*/
|
|
29
29
|
export declare class Attributor implements IAttributor {
|
|
30
30
|
protected readonly keyToInfo: Map<number, AttributionInfo>;
|
|
@@ -48,7 +48,7 @@ export declare class Attributor implements IAttributor {
|
|
|
48
48
|
/**
|
|
49
49
|
* Attributor which listens to an op stream and records entries for each op.
|
|
50
50
|
* Sequence numbers are used as attribution keys.
|
|
51
|
-
* @
|
|
51
|
+
* @internal
|
|
52
52
|
*/
|
|
53
53
|
export declare class OpStreamAttributor extends Attributor implements IAttributor {
|
|
54
54
|
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, audience: IAudience, initialEntries?: Iterable<[number, AttributionInfo]>);
|
package/dist/mixinAttributor.cjs
CHANGED
|
@@ -13,20 +13,17 @@ const lz4Encoder_1 = require("./lz4Encoder.cjs");
|
|
|
13
13
|
const attributorTreeName = ".attributor";
|
|
14
14
|
const opBlobName = "op";
|
|
15
15
|
/**
|
|
16
|
-
* @
|
|
17
|
-
* Feature Gate Key -
|
|
18
|
-
* Whether or not a container runtime instantiated using `mixinAttributor`'s load should generate an attributor on
|
|
19
|
-
* new files. See package README for more notes on integration.
|
|
16
|
+
* @internal
|
|
20
17
|
*/
|
|
21
18
|
exports.enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
|
|
22
19
|
/**
|
|
23
|
-
* @
|
|
20
|
+
* @internal
|
|
24
21
|
*/
|
|
25
22
|
exports.IRuntimeAttributor = "IRuntimeAttributor";
|
|
26
23
|
/**
|
|
27
24
|
* @returns an IRuntimeAttributor for usage with `mixinAttributor`. The attributor will only be populated with data
|
|
28
25
|
* once it's passed via scope to a container runtime load flow. See {@link mixinAttributor}.
|
|
29
|
-
* @
|
|
26
|
+
* @internal
|
|
30
27
|
*/
|
|
31
28
|
function createRuntimeAttributor() {
|
|
32
29
|
return new RuntimeAttributor();
|
|
@@ -41,7 +38,7 @@ exports.createRuntimeAttributor = createRuntimeAttributor;
|
|
|
41
38
|
* IRuntimeAttributor is passed via scope to load a document that never previously had attribution information,
|
|
42
39
|
* that attributor's `has` method will always return `false`.
|
|
43
40
|
* @param Base - base class, inherits from FluidAttributorRuntime
|
|
44
|
-
* @
|
|
41
|
+
* @internal
|
|
45
42
|
*/
|
|
46
43
|
const mixinAttributor = (Base = container_runtime_1.ContainerRuntime) => class ContainerRuntimeWithAttributor extends Base {
|
|
47
44
|
static async load(context, registryEntries, requestHandler, runtimeOptions = {}, containerScope = context.scope, existing, containerRuntimeCtor = ContainerRuntimeWithAttributor) {
|
|
@@ -79,6 +76,8 @@ const mixinAttributor = (Base = container_runtime_1.ContainerRuntime) => class C
|
|
|
79
76
|
registryEntries,
|
|
80
77
|
requestHandler,
|
|
81
78
|
provideEntryPoint,
|
|
79
|
+
// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0
|
|
80
|
+
initializeEntryPoint: provideEntryPoint,
|
|
82
81
|
runtimeOptions,
|
|
83
82
|
containerScope,
|
|
84
83
|
existing,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixinAttributor.cjs","sourceRoot":"","sources":["../src/mixinAttributor.ts"],"names":[],"mappings":";;;AAUA,yEAAqE;AASrE,iEAAgG;AAGhG,+DAA8D;AAC9D,2DAAqE;AACrE,qEAKyC;AACzC,iDAA2E;AAC3E,6CAAgF;AAChF,iDAA8C;AAE9C,oBAAoB;AACpB,MAAM,kBAAkB,GAAG,aAAa,CAAC;AACzC,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB;;;;;GAKG;AACU,QAAA,kBAAkB,GAAG,mCAAmC,CAAC;AAEtE;;GAEG;AACU,QAAA,kBAAkB,GAAoC,oBAAoB,CAAC;AAkCxF;;;;GAIG;AACH,SAAgB,uBAAuB;IACtC,OAAO,IAAI,iBAAiB,EAAE,CAAC;AAChC,CAAC;AAFD,0DAEC;AAED;;;;;;;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AC;SAC5D;aAAM;YACN,IAAI,CAAC,YAAY,GAAG,IAAI,+BAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;SACnE;IACF,CAAC;IAEM,SAAS;QACf,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB,8EAA8E;YAC9E,OAAO,SAAS,CAAC;SACjB;QAED,IAAA,mBAAM,EACL,IAAI,CAAC,YAAY,KAAK,SAAS,EAC/B,KAAK,CAAC,kEAAkE,CACxE,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,kCAAkB,EAAE,CAAC;QACzC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC,cAAc,EAAE,CAAC;IACjC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience, IContainerContext, IDeltaManager } from \"@fluidframework/container-definitions\";\nimport { ContainerRuntime } from \"@fluidframework/container-runtime\";\nimport type { IContainerRuntimeOptions } from \"@fluidframework/container-runtime\";\nimport {\n\tAttributionInfo,\n\tAttributionKey,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport { addSummarizeResultToSummary, SummaryTreeBuilder } from \"@fluidframework/runtime-utils\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IRequest, IResponse, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert, unreachableCase } from \"@fluidframework/core-utils\";\nimport {\n\tcreateChildLogger,\n\tloggerToMonitoringContext,\n\tPerformanceEvent,\n\tUsageError,\n} from \"@fluidframework/telemetry-utils\";\nimport { Attributor, IAttributor, OpStreamAttributor } from \"./attributor\";\nimport { AttributorSerializer, chain, deltaEncoder, Encoder } from \"./encoders\";\nimport { makeLZ4Encoder } from \"./lz4Encoder\";\n\n// Summary tree keys\nconst attributorTreeName = \".attributor\";\nconst opBlobName = \"op\";\n\n/**\n * @alpha\n * Feature Gate Key -\n * Whether or not a container runtime instantiated using `mixinAttributor`'s load should generate an attributor on\n * new files. See package README for more notes on integration.\n */\nexport const enableOnNewFileKey = \"Fluid.Attribution.EnableOnNewFile\";\n\n/**\n * @alpha\n */\nexport const IRuntimeAttributor: keyof IProvideRuntimeAttributor = \"IRuntimeAttributor\";\n\n/**\n * @alpha\n */\nexport interface IProvideRuntimeAttributor {\n\treadonly IRuntimeAttributor: IRuntimeAttributor;\n}\n\n/**\n * Provides access to attribution information stored on the container runtime.\n *\n * Attributors are only populated after the container runtime they are injected into has initialized.\n * @sealed\n * @alpha\n */\nexport interface IRuntimeAttributor extends IProvideRuntimeAttributor {\n\t/**\n\t * @throws - If no AttributionInfo exists for this key.\n\t */\n\tget(key: AttributionKey): AttributionInfo;\n\n\t/**\n\t * @returns Whether any AttributionInfo exists for the provided key.\n\t */\n\thas(key: AttributionKey): boolean;\n\n\t/**\n\t * @returns Whether the runtime is currently tracking attribution information for the loaded container.\n\t * See {@link mixinAttributor} for more details on when this happens.\n\t */\n\treadonly isEnabled: boolean;\n}\n\n/**\n * @returns an IRuntimeAttributor for usage with `mixinAttributor`. The attributor will only be populated with data\n * once it's passed via scope to a container runtime load flow. See {@link mixinAttributor}.\n * @alpha\n */\nexport function createRuntimeAttributor(): IRuntimeAttributor {\n\treturn new RuntimeAttributor();\n}\n\n/**\n * Mixes in logic to load and store runtime-based attribution functionality.\n *\n * The `scope` passed to `load` should implement `IProvideRuntimeAttributor`.\n *\n * Existing documents without stored attributors will not start storing attribution information: if an\n * IRuntimeAttributor is passed via scope to load a document that never previously had attribution information,\n * that attributor's `has` method will always return `false`.\n * @param Base - base class, inherits from FluidAttributorRuntime\n * @alpha\n */\nexport const mixinAttributor = (Base: typeof ContainerRuntime = ContainerRuntime) =>\n\tclass ContainerRuntimeWithAttributor extends Base {\n\t\tpublic static async load(\n\t\t\tcontext: IContainerContext,\n\t\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\t\trequestHandler?:\n\t\t\t\t| ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>)\n\t\t\t\t| undefined,\n\t\t\truntimeOptions: IContainerRuntimeOptions | undefined = {},\n\t\t\tcontainerScope: FluidObject | undefined = context.scope,\n\t\t\texisting?: boolean | undefined,\n\t\t\tcontainerRuntimeCtor: typeof ContainerRuntime = ContainerRuntimeWithAttributor as unknown as typeof ContainerRuntime,\n\t\t): Promise<ContainerRuntime> {\n\t\t\treturn this.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries,\n\t\t\t\texisting: existing ?? false,\n\t\t\t\trequestHandler,\n\t\t\t\truntimeOptions,\n\t\t\t\tcontainerScope,\n\t\t\t\tcontainerRuntimeCtor,\n\t\t\t\tprovideEntryPoint: async () => {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\"ContainerRuntime.load is deprecated and should no longer be used\",\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tpublic static async loadRuntime(params: {\n\t\t\tcontext: IContainerContext;\n\t\t\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t\t\texisting: boolean;\n\t\t\truntimeOptions?: IContainerRuntimeOptions;\n\t\t\tcontainerScope?: FluidObject;\n\t\t\tcontainerRuntimeCtor?: typeof ContainerRuntime;\n\t\t\t/** @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md */\n\t\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;\n\t\t\tprovideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;\n\t\t}): Promise<ContainerRuntime> {\n\t\t\tconst {\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries,\n\t\t\t\texisting,\n\t\t\t\trequestHandler,\n\t\t\t\tprovideEntryPoint,\n\t\t\t\truntimeOptions,\n\t\t\t\tcontainerScope,\n\t\t\t\tcontainerRuntimeCtor = ContainerRuntimeWithAttributor as unknown as typeof ContainerRuntime,\n\t\t\t} = params;\n\n\t\t\tconst runtimeAttributor = (\n\t\t\t\tcontainerScope as FluidObject<IProvideRuntimeAttributor> | undefined\n\t\t\t)?.IRuntimeAttributor;\n\t\t\tif (!runtimeAttributor) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"ContainerRuntimeWithAttributor must be passed a scope implementing IProvideRuntimeAttributor\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst pendingRuntimeState = context.pendingLocalState as {\n\t\t\t\tbaseSnapshot?: ISnapshotTree;\n\t\t\t};\n\t\t\tconst baseSnapshot: ISnapshotTree | undefined =\n\t\t\t\tpendingRuntimeState?.baseSnapshot ?? context.baseSnapshot;\n\n\t\t\tconst { audience, deltaManager } = context;\n\t\t\tassert(\n\t\t\t\taudience !== undefined,\n\t\t\t\t0x508 /* Audience must exist when instantiating attribution-providing runtime */,\n\t\t\t);\n\n\t\t\tconst mc = loggerToMonitoringContext(context.taggedLogger);\n\n\t\t\tconst shouldTrackAttribution = mc.config.getBoolean(enableOnNewFileKey) ?? false;\n\t\t\tif (shouldTrackAttribution) {\n\t\t\t\t(context.options.attribution ??= {}).track = true;\n\t\t\t}\n\n\t\t\tconst runtime = (await Base.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries,\n\t\t\t\trequestHandler,\n\t\t\t\tprovideEntryPoint,\n\t\t\t\truntimeOptions,\n\t\t\t\tcontainerScope,\n\t\t\t\texisting,\n\t\t\t\tcontainerRuntimeCtor,\n\t\t\t})) as ContainerRuntimeWithAttributor;\n\t\t\truntime.runtimeAttributor = runtimeAttributor as RuntimeAttributor;\n\n\t\t\tconst logger = createChildLogger({ logger: runtime.logger, namespace: \"Attributor\" });\n\n\t\t\t// Note: this fetches attribution blobs relatively eagerly in the load flow; we may want to optimize\n\t\t\t// this to avoid blocking on such information until application actually requests some op-based attribution\n\t\t\t// info or we need to summarize. All that really needs to happen immediately is to start recording\n\t\t\t// op seq# -> attributionInfo for new ops.\n\t\t\tawait PerformanceEvent.timedExecAsync(\n\t\t\t\tlogger,\n\t\t\t\t{\n\t\t\t\t\teventName: \"initialize\",\n\t\t\t\t},\n\t\t\t\tasync (event) => {\n\t\t\t\t\tawait runtime.runtimeAttributor?.initialize(\n\t\t\t\t\t\tdeltaManager,\n\t\t\t\t\t\taudience,\n\t\t\t\t\t\tbaseSnapshot,\n\t\t\t\t\t\tasync (id) => runtime.storage.readBlob(id),\n\t\t\t\t\t\tshouldTrackAttribution,\n\t\t\t\t\t);\n\t\t\t\t\tevent.end({\n\t\t\t\t\t\tattributionEnabledInConfig: shouldTrackAttribution,\n\t\t\t\t\t\tattributionEnabledInDoc: runtime.runtimeAttributor\n\t\t\t\t\t\t\t? runtime.runtimeAttributor.isEnabled\n\t\t\t\t\t\t\t: false,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t);\n\n\t\t\treturn runtime;\n\t\t}\n\n\t\tprivate runtimeAttributor: RuntimeAttributor | undefined;\n\n\t\tprotected addContainerStateToSummary(\n\t\t\tsummaryTree: ISummaryTreeWithStats,\n\t\t\tfullTree: boolean,\n\t\t\ttrackState: boolean,\n\t\t\ttelemetryContext?: ITelemetryContext,\n\t\t) {\n\t\t\tsuper.addContainerStateToSummary(summaryTree, fullTree, trackState, telemetryContext);\n\t\t\tconst attributorSummary = this.runtimeAttributor?.summarize();\n\t\t\tif (attributorSummary) {\n\t\t\t\taddSummarizeResultToSummary(summaryTree, attributorTreeName, attributorSummary);\n\t\t\t}\n\t\t}\n\t} as unknown as typeof ContainerRuntime;\n\nclass RuntimeAttributor implements IRuntimeAttributor {\n\tpublic get IRuntimeAttributor(): IRuntimeAttributor {\n\t\treturn this;\n\t}\n\n\tpublic get(key: AttributionKey): AttributionInfo {\n\t\tassert(\n\t\t\tthis.opAttributor !== undefined,\n\t\t\t0x509 /* RuntimeAttributor must be initialized before getAttributionInfo can be called */,\n\t\t);\n\n\t\tif (key.type === \"detached\") {\n\t\t\tthrow new Error(\"Attribution of detached keys is not yet supported.\");\n\t\t}\n\n\t\tif (key.type === \"local\") {\n\t\t\t// Note: we can *almost* orchestrate this correctly with internal-only changes by looking up the current\n\t\t\t// client id in the audience. However, for read->write client transition, the container might have not yet\n\t\t\t// received a client id. This is left as a TODO as it might be more easily solved once the detached case\n\t\t\t// is settled (e.g. if it's reasonable for the host to know the current user information at container\n\t\t\t// creation time, we could just use that here as well).\n\t\t\tthrow new Error(\"Attribution of local keys is not yet supported.\");\n\t\t}\n\n\t\treturn this.opAttributor.getAttributionInfo(key.seq);\n\t}\n\n\tpublic has(key: AttributionKey): boolean {\n\t\tif (key.type === \"detached\") {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (key.type === \"local\") {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.opAttributor?.tryGetAttributionInfo(key.seq) !== undefined;\n\t}\n\n\tprivate encoder: Encoder<IAttributor, string> = {\n\t\tencode: unreachableCase,\n\t\tdecode: unreachableCase,\n\t};\n\n\tprivate opAttributor: IAttributor | undefined;\n\tpublic isEnabled = false;\n\n\tpublic async initialize(\n\t\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n\t\taudience: IAudience,\n\t\tbaseSnapshot: ISnapshotTree | undefined,\n\t\treadBlob: (id: string) => Promise<ArrayBufferLike>,\n\t\tshouldAddAttributorOnNewFile: boolean,\n\t): Promise<void> {\n\t\tconst attributorTree = baseSnapshot?.trees[attributorTreeName];\n\t\t// Existing documents that don't already have a snapshot containing runtime attribution info shouldn't\n\t\t// inject any for now--this causes some back-compat integration problems that aren't fully worked out.\n\t\tconst shouldExcludeAttributor =\n\t\t\t(baseSnapshot !== undefined && attributorTree === undefined) ||\n\t\t\t(baseSnapshot === undefined && !shouldAddAttributorOnNewFile);\n\t\tif (shouldExcludeAttributor) {\n\t\t\t// This gives a consistent error for calls to `get` on keys that don't exist.\n\t\t\tthis.opAttributor = new Attributor();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isEnabled = true;\n\t\tthis.encoder = chain(\n\t\t\tnew AttributorSerializer(\n\t\t\t\t(entries) => new OpStreamAttributor(deltaManager, audience, entries),\n\t\t\t\tdeltaEncoder,\n\t\t\t),\n\t\t\tmakeLZ4Encoder(),\n\t\t);\n\n\t\tif (attributorTree !== undefined) {\n\t\t\tconst id = attributorTree.blobs[opBlobName];\n\t\t\tassert(\n\t\t\t\tid !== undefined,\n\t\t\t\t0x50a /* Attributor tree should have op attributor summary blob. */,\n\t\t\t);\n\t\t\tconst blobContents = await readBlob(id);\n\t\t\tconst attributorSnapshot = bufferToString(blobContents, \"utf8\");\n\t\t\tthis.opAttributor = this.encoder.decode(attributorSnapshot);\n\t\t} else {\n\t\t\tthis.opAttributor = new OpStreamAttributor(deltaManager, audience);\n\t\t}\n\t}\n\n\tpublic summarize(): ISummaryTreeWithStats | undefined {\n\t\tif (!this.isEnabled) {\n\t\t\t// Loaded existing document without attributor data: avoid injecting any data.\n\t\t\treturn undefined;\n\t\t}\n\n\t\tassert(\n\t\t\tthis.opAttributor !== undefined,\n\t\t\t0x50b /* RuntimeAttributor should be initialized before summarization */,\n\t\t);\n\t\tconst builder = new SummaryTreeBuilder();\n\t\tbuilder.addBlob(opBlobName, this.encoder.encode(this.opAttributor));\n\t\treturn builder.getSummaryTree();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"mixinAttributor.cjs","sourceRoot":"","sources":["../src/mixinAttributor.ts"],"names":[],"mappings":";;;AAUA,yEAAqE;AASrE,iEAAgG;AAGhG,+DAA8D;AAC9D,2DAAqE;AACrE,qEAKyC;AACzC,iDAA2E;AAC3E,6CAAgF;AAChF,iDAA8C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AM,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAA,mBAAM,EACL,EAAE,KAAK,SAAS,EAChB,KAAK,CAAC,6DAA6D,CACnE,CAAC;YACF,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,EAAE,CAAC,CAAC;YACxC,MAAM,kBAAkB,GAAG,IAAA,6BAAc,EAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YAChE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;SAC5D;aAAM;YACN,IAAI,CAAC,YAAY,GAAG,IAAI,+BAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;SACnE;IACF,CAAC;IAEM,SAAS;QACf,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB,8EAA8E;YAC9E,OAAO,SAAS,CAAC;SACjB;QAED,IAAA,mBAAM,EACL,IAAI,CAAC,YAAY,KAAK,SAAS,EAC/B,KAAK,CAAC,kEAAkE,CACxE,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,kCAAkB,EAAE,CAAC;QACzC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC,cAAc,EAAE,CAAC;IACjC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience, IContainerContext, IDeltaManager } from \"@fluidframework/container-definitions\";\nimport { ContainerRuntime } from \"@fluidframework/container-runtime\";\nimport type { IContainerRuntimeOptions } from \"@fluidframework/container-runtime\";\nimport {\n\tAttributionInfo,\n\tAttributionKey,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport { addSummarizeResultToSummary, SummaryTreeBuilder } from \"@fluidframework/runtime-utils\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IRequest, IResponse, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert, unreachableCase } from \"@fluidframework/core-utils\";\nimport {\n\tcreateChildLogger,\n\tloggerToMonitoringContext,\n\tPerformanceEvent,\n\tUsageError,\n} from \"@fluidframework/telemetry-utils\";\nimport { Attributor, IAttributor, OpStreamAttributor } from \"./attributor\";\nimport { AttributorSerializer, chain, deltaEncoder, Encoder } from \"./encoders\";\nimport { makeLZ4Encoder } from \"./lz4Encoder\";\n\n// Summary tree keys\nconst attributorTreeName = \".attributor\";\nconst opBlobName = \"op\";\n\n/**\n * @internal\n */\nexport const enableOnNewFileKey = \"Fluid.Attribution.EnableOnNewFile\";\n\n/**\n * @internal\n */\nexport const IRuntimeAttributor: keyof IProvideRuntimeAttributor = \"IRuntimeAttributor\";\n\n/**\n * @internal\n */\nexport interface IProvideRuntimeAttributor {\n\treadonly IRuntimeAttributor: IRuntimeAttributor;\n}\n\n/**\n * Provides access to attribution information stored on the container runtime.\n *\n * Attributors are only populated after the container runtime they are injected into has initialized.\n * @sealed\n * @internal\n */\nexport interface IRuntimeAttributor extends IProvideRuntimeAttributor {\n\t/**\n\t * @throws - If no AttributionInfo exists for this key.\n\t */\n\tget(key: AttributionKey): AttributionInfo;\n\n\t/**\n\t * @returns Whether any AttributionInfo exists for the provided key.\n\t */\n\thas(key: AttributionKey): boolean;\n\n\t/**\n\t * @returns Whether the runtime is currently tracking attribution information for the loaded container.\n\t * See {@link mixinAttributor} for more details on when this happens.\n\t */\n\treadonly isEnabled: boolean;\n}\n\n/**\n * @returns an IRuntimeAttributor for usage with `mixinAttributor`. The attributor will only be populated with data\n * once it's passed via scope to a container runtime load flow. See {@link mixinAttributor}.\n * @internal\n */\nexport function createRuntimeAttributor(): IRuntimeAttributor {\n\treturn new RuntimeAttributor();\n}\n\n/**\n * Mixes in logic to load and store runtime-based attribution functionality.\n *\n * The `scope` passed to `load` should implement `IProvideRuntimeAttributor`.\n *\n * Existing documents without stored attributors will not start storing attribution information: if an\n * IRuntimeAttributor is passed via scope to load a document that never previously had attribution information,\n * that attributor's `has` method will always return `false`.\n * @param Base - base class, inherits from FluidAttributorRuntime\n * @internal\n */\nexport const mixinAttributor = (Base: typeof ContainerRuntime = ContainerRuntime) =>\n\tclass ContainerRuntimeWithAttributor extends Base {\n\t\tpublic static async load(\n\t\t\tcontext: IContainerContext,\n\t\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\t\trequestHandler?:\n\t\t\t\t| ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>)\n\t\t\t\t| undefined,\n\t\t\truntimeOptions: IContainerRuntimeOptions | undefined = {},\n\t\t\tcontainerScope: FluidObject | undefined = context.scope,\n\t\t\texisting?: boolean | undefined,\n\t\t\tcontainerRuntimeCtor: typeof ContainerRuntime = ContainerRuntimeWithAttributor as unknown as typeof ContainerRuntime,\n\t\t): Promise<ContainerRuntime> {\n\t\t\treturn this.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries,\n\t\t\t\texisting: existing ?? false,\n\t\t\t\trequestHandler,\n\t\t\t\truntimeOptions,\n\t\t\t\tcontainerScope,\n\t\t\t\tcontainerRuntimeCtor,\n\t\t\t\tprovideEntryPoint: async () => {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\"ContainerRuntime.load is deprecated and should no longer be used\",\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tpublic static async loadRuntime(params: {\n\t\t\tcontext: IContainerContext;\n\t\t\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t\t\texisting: boolean;\n\t\t\truntimeOptions?: IContainerRuntimeOptions;\n\t\t\tcontainerScope?: FluidObject;\n\t\t\tcontainerRuntimeCtor?: typeof ContainerRuntime;\n\t\t\t/** @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md */\n\t\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;\n\t\t\tprovideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;\n\t\t}): Promise<ContainerRuntime> {\n\t\t\tconst {\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries,\n\t\t\t\texisting,\n\t\t\t\trequestHandler,\n\t\t\t\tprovideEntryPoint,\n\t\t\t\truntimeOptions,\n\t\t\t\tcontainerScope,\n\t\t\t\tcontainerRuntimeCtor = ContainerRuntimeWithAttributor as unknown as typeof ContainerRuntime,\n\t\t\t} = params;\n\n\t\t\tconst runtimeAttributor = (\n\t\t\t\tcontainerScope as FluidObject<IProvideRuntimeAttributor> | undefined\n\t\t\t)?.IRuntimeAttributor;\n\t\t\tif (!runtimeAttributor) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"ContainerRuntimeWithAttributor must be passed a scope implementing IProvideRuntimeAttributor\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst pendingRuntimeState = context.pendingLocalState as {\n\t\t\t\tbaseSnapshot?: ISnapshotTree;\n\t\t\t};\n\t\t\tconst baseSnapshot: ISnapshotTree | undefined =\n\t\t\t\tpendingRuntimeState?.baseSnapshot ?? context.baseSnapshot;\n\n\t\t\tconst { audience, deltaManager } = context;\n\t\t\tassert(\n\t\t\t\taudience !== undefined,\n\t\t\t\t0x508 /* Audience must exist when instantiating attribution-providing runtime */,\n\t\t\t);\n\n\t\t\tconst mc = loggerToMonitoringContext(context.taggedLogger);\n\n\t\t\tconst shouldTrackAttribution = mc.config.getBoolean(enableOnNewFileKey) ?? false;\n\t\t\tif (shouldTrackAttribution) {\n\t\t\t\t(context.options.attribution ??= {}).track = true;\n\t\t\t}\n\n\t\t\tconst runtime = (await Base.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries,\n\t\t\t\trequestHandler,\n\t\t\t\tprovideEntryPoint,\n\t\t\t\t// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0\n\t\t\t\tinitializeEntryPoint: provideEntryPoint,\n\t\t\t\truntimeOptions,\n\t\t\t\tcontainerScope,\n\t\t\t\texisting,\n\t\t\t\tcontainerRuntimeCtor,\n\t\t\t} as any)) as ContainerRuntimeWithAttributor;\n\t\t\truntime.runtimeAttributor = runtimeAttributor as RuntimeAttributor;\n\n\t\t\tconst logger = createChildLogger({ logger: runtime.logger, namespace: \"Attributor\" });\n\n\t\t\t// Note: this fetches attribution blobs relatively eagerly in the load flow; we may want to optimize\n\t\t\t// this to avoid blocking on such information until application actually requests some op-based attribution\n\t\t\t// info or we need to summarize. All that really needs to happen immediately is to start recording\n\t\t\t// op seq# -> attributionInfo for new ops.\n\t\t\tawait PerformanceEvent.timedExecAsync(\n\t\t\t\tlogger,\n\t\t\t\t{\n\t\t\t\t\teventName: \"initialize\",\n\t\t\t\t},\n\t\t\t\tasync (event) => {\n\t\t\t\t\tawait runtime.runtimeAttributor?.initialize(\n\t\t\t\t\t\tdeltaManager,\n\t\t\t\t\t\taudience,\n\t\t\t\t\t\tbaseSnapshot,\n\t\t\t\t\t\tasync (id) => runtime.storage.readBlob(id),\n\t\t\t\t\t\tshouldTrackAttribution,\n\t\t\t\t\t);\n\t\t\t\t\tevent.end({\n\t\t\t\t\t\tattributionEnabledInConfig: shouldTrackAttribution,\n\t\t\t\t\t\tattributionEnabledInDoc: runtime.runtimeAttributor\n\t\t\t\t\t\t\t? runtime.runtimeAttributor.isEnabled\n\t\t\t\t\t\t\t: false,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t);\n\n\t\t\treturn runtime;\n\t\t}\n\n\t\tprivate runtimeAttributor: RuntimeAttributor | undefined;\n\n\t\tprotected addContainerStateToSummary(\n\t\t\tsummaryTree: ISummaryTreeWithStats,\n\t\t\tfullTree: boolean,\n\t\t\ttrackState: boolean,\n\t\t\ttelemetryContext?: ITelemetryContext,\n\t\t) {\n\t\t\tsuper.addContainerStateToSummary(summaryTree, fullTree, trackState, telemetryContext);\n\t\t\tconst attributorSummary = this.runtimeAttributor?.summarize();\n\t\t\tif (attributorSummary) {\n\t\t\t\taddSummarizeResultToSummary(summaryTree, attributorTreeName, attributorSummary);\n\t\t\t}\n\t\t}\n\t} as unknown as typeof ContainerRuntime;\n\nclass RuntimeAttributor implements IRuntimeAttributor {\n\tpublic get IRuntimeAttributor(): IRuntimeAttributor {\n\t\treturn this;\n\t}\n\n\tpublic get(key: AttributionKey): AttributionInfo {\n\t\tassert(\n\t\t\tthis.opAttributor !== undefined,\n\t\t\t0x509 /* RuntimeAttributor must be initialized before getAttributionInfo can be called */,\n\t\t);\n\n\t\tif (key.type === \"detached\") {\n\t\t\tthrow new Error(\"Attribution of detached keys is not yet supported.\");\n\t\t}\n\n\t\tif (key.type === \"local\") {\n\t\t\t// Note: we can *almost* orchestrate this correctly with internal-only changes by looking up the current\n\t\t\t// client id in the audience. However, for read->write client transition, the container might have not yet\n\t\t\t// received a client id. This is left as a TODO as it might be more easily solved once the detached case\n\t\t\t// is settled (e.g. if it's reasonable for the host to know the current user information at container\n\t\t\t// creation time, we could just use that here as well).\n\t\t\tthrow new Error(\"Attribution of local keys is not yet supported.\");\n\t\t}\n\n\t\treturn this.opAttributor.getAttributionInfo(key.seq);\n\t}\n\n\tpublic has(key: AttributionKey): boolean {\n\t\tif (key.type === \"detached\") {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (key.type === \"local\") {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.opAttributor?.tryGetAttributionInfo(key.seq) !== undefined;\n\t}\n\n\tprivate encoder: Encoder<IAttributor, string> = {\n\t\tencode: unreachableCase,\n\t\tdecode: unreachableCase,\n\t};\n\n\tprivate opAttributor: IAttributor | undefined;\n\tpublic isEnabled = false;\n\n\tpublic async initialize(\n\t\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n\t\taudience: IAudience,\n\t\tbaseSnapshot: ISnapshotTree | undefined,\n\t\treadBlob: (id: string) => Promise<ArrayBufferLike>,\n\t\tshouldAddAttributorOnNewFile: boolean,\n\t): Promise<void> {\n\t\tconst attributorTree = baseSnapshot?.trees[attributorTreeName];\n\t\t// Existing documents that don't already have a snapshot containing runtime attribution info shouldn't\n\t\t// inject any for now--this causes some back-compat integration problems that aren't fully worked out.\n\t\tconst shouldExcludeAttributor =\n\t\t\t(baseSnapshot !== undefined && attributorTree === undefined) ||\n\t\t\t(baseSnapshot === undefined && !shouldAddAttributorOnNewFile);\n\t\tif (shouldExcludeAttributor) {\n\t\t\t// This gives a consistent error for calls to `get` on keys that don't exist.\n\t\t\tthis.opAttributor = new Attributor();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isEnabled = true;\n\t\tthis.encoder = chain(\n\t\t\tnew AttributorSerializer(\n\t\t\t\t(entries) => new OpStreamAttributor(deltaManager, audience, entries),\n\t\t\t\tdeltaEncoder,\n\t\t\t),\n\t\t\tmakeLZ4Encoder(),\n\t\t);\n\n\t\tif (attributorTree !== undefined) {\n\t\t\tconst id = attributorTree.blobs[opBlobName];\n\t\t\tassert(\n\t\t\t\tid !== undefined,\n\t\t\t\t0x50a /* Attributor tree should have op attributor summary blob. */,\n\t\t\t);\n\t\t\tconst blobContents = await readBlob(id);\n\t\t\tconst attributorSnapshot = bufferToString(blobContents, \"utf8\");\n\t\t\tthis.opAttributor = this.encoder.decode(attributorSnapshot);\n\t\t} else {\n\t\t\tthis.opAttributor = new OpStreamAttributor(deltaManager, audience);\n\t\t}\n\t}\n\n\tpublic summarize(): ISummaryTreeWithStats | undefined {\n\t\tif (!this.isEnabled) {\n\t\t\t// Loaded existing document without attributor data: avoid injecting any data.\n\t\t\treturn undefined;\n\t\t}\n\n\t\tassert(\n\t\t\tthis.opAttributor !== undefined,\n\t\t\t0x50b /* RuntimeAttributor should be initialized before summarization */,\n\t\t);\n\t\tconst builder = new SummaryTreeBuilder();\n\t\tbuilder.addBlob(opBlobName, this.encoder.encode(this.opAttributor));\n\t\treturn builder.getSummaryTree();\n\t}\n}\n"]}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { ContainerRuntime } from "@fluidframework/container-runtime";
|
|
2
2
|
import { AttributionInfo, AttributionKey } from "@fluidframework/runtime-definitions";
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
5
|
-
* Feature Gate Key -
|
|
6
|
-
* Whether or not a container runtime instantiated using `mixinAttributor`'s load should generate an attributor on
|
|
7
|
-
* new files. See package README for more notes on integration.
|
|
4
|
+
* @internal
|
|
8
5
|
*/
|
|
9
6
|
export declare const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
|
|
10
7
|
/**
|
|
11
|
-
* @
|
|
8
|
+
* @internal
|
|
12
9
|
*/
|
|
13
10
|
export declare const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
|
|
14
11
|
/**
|
|
15
|
-
* @
|
|
12
|
+
* @internal
|
|
16
13
|
*/
|
|
17
14
|
export interface IProvideRuntimeAttributor {
|
|
18
15
|
readonly IRuntimeAttributor: IRuntimeAttributor;
|
|
@@ -22,7 +19,7 @@ export interface IProvideRuntimeAttributor {
|
|
|
22
19
|
*
|
|
23
20
|
* Attributors are only populated after the container runtime they are injected into has initialized.
|
|
24
21
|
* @sealed
|
|
25
|
-
* @
|
|
22
|
+
* @internal
|
|
26
23
|
*/
|
|
27
24
|
export interface IRuntimeAttributor extends IProvideRuntimeAttributor {
|
|
28
25
|
/**
|
|
@@ -42,7 +39,7 @@ export interface IRuntimeAttributor extends IProvideRuntimeAttributor {
|
|
|
42
39
|
/**
|
|
43
40
|
* @returns an IRuntimeAttributor for usage with `mixinAttributor`. The attributor will only be populated with data
|
|
44
41
|
* once it's passed via scope to a container runtime load flow. See {@link mixinAttributor}.
|
|
45
|
-
* @
|
|
42
|
+
* @internal
|
|
46
43
|
*/
|
|
47
44
|
export declare function createRuntimeAttributor(): IRuntimeAttributor;
|
|
48
45
|
/**
|
|
@@ -54,7 +51,7 @@ export declare function createRuntimeAttributor(): IRuntimeAttributor;
|
|
|
54
51
|
* IRuntimeAttributor is passed via scope to load a document that never previously had attribution information,
|
|
55
52
|
* that attributor's `has` method will always return `false`.
|
|
56
53
|
* @param Base - base class, inherits from FluidAttributorRuntime
|
|
57
|
-
* @
|
|
54
|
+
* @internal
|
|
58
55
|
*/
|
|
59
56
|
export declare const mixinAttributor: (Base?: typeof ContainerRuntime) => typeof ContainerRuntime;
|
|
60
57
|
//# sourceMappingURL=mixinAttributor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixinAttributor.d.ts","sourceRoot":"","sources":["../src/mixinAttributor.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EACN,eAAe,EACf,cAAc,EAId,MAAM,qCAAqC,CAAC;AAoB7C
|
|
1
|
+
{"version":3,"file":"mixinAttributor.d.ts","sourceRoot":"","sources":["../src/mixinAttributor.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EACN,eAAe,EACf,cAAc,EAId,MAAM,qCAAqC,CAAC;AAoB7C;;GAEG;AACH,eAAO,MAAM,kBAAkB,sCAAsC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,yBAAgD,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;CAChD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAmB,SAAQ,yBAAyB;IACpE;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,eAAe,CAAC;IAE1C;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,kBAAkB,CAE5D;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,UAAU,uBAAuB,4BA0IrB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AttributionInfo } from '@fluidframework/runtime-definitions';
|
|
2
|
+
import { AttributionKey } from '@fluidframework/runtime-definitions';
|
|
3
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
4
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
5
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: AttributionInfo */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: Attributor */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: createRuntimeAttributor */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: enableOnNewFileKey */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IAttributor */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IProvideRuntimeAttributor */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: IRuntimeAttributor */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: mixinAttributor */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: OpStreamAttributor */
|
|
26
|
+
|
|
27
|
+
export { }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AttributionInfo } from '@fluidframework/runtime-definitions';
|
|
2
|
+
import { AttributionKey } from '@fluidframework/runtime-definitions';
|
|
3
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
4
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
5
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
7
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: AttributionInfo */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: AttributionKey */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: Attributor */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: ContainerRuntime */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: createRuntimeAttributor */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: enableOnNewFileKey */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: IAttributor */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: IAudience */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: IDeltaManager */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: IProvideRuntimeAttributor */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: IRuntimeAttributor */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: mixinAttributor */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: OpStreamAttributor */
|
|
34
|
+
|
|
35
|
+
export { }
|