@fluid-experimental/attributor 2.0.0-dev-rc.3.0.0.254274 → 2.0.0-dev-rc.3.0.0.254674

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/dist/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/alpha.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/attributor",
3
- "version": "2.0.0-dev-rc.3.0.0.254274",
3
+ "version": "2.0.0-dev-rc.3.0.0.254674",
4
4
  "description": "Operation attributor",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -25,11 +25,11 @@
25
25
  },
26
26
  "./public": {
27
27
  "import": {
28
- "types": "./lib/attributor-public.d.ts",
28
+ "types": "./lib/public.d.ts",
29
29
  "default": "./lib/index.js"
30
30
  },
31
31
  "require": {
32
- "types": "./dist/attributor-public.d.ts",
32
+ "types": "./dist/public.d.ts",
33
33
  "default": "./dist/index.js"
34
34
  }
35
35
  },
@@ -67,32 +67,32 @@
67
67
  "temp-directory": "nyc/.nyc_output"
68
68
  },
69
69
  "dependencies": {
70
- "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254274",
71
- "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.254274",
72
- "@fluidframework/container-runtime": "2.0.0-dev-rc.3.0.0.254274",
73
- "@fluidframework/container-runtime-definitions": "2.0.0-dev-rc.3.0.0.254274",
74
- "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254274",
75
- "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254274",
76
- "@fluidframework/datastore-definitions": "2.0.0-dev-rc.3.0.0.254274",
70
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254674",
71
+ "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.254674",
72
+ "@fluidframework/container-runtime": "2.0.0-dev-rc.3.0.0.254674",
73
+ "@fluidframework/container-runtime-definitions": "2.0.0-dev-rc.3.0.0.254674",
74
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254674",
75
+ "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254674",
76
+ "@fluidframework/datastore-definitions": "2.0.0-dev-rc.3.0.0.254674",
77
77
  "@fluidframework/protocol-definitions": "^3.2.0",
78
- "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.254274",
79
- "@fluidframework/runtime-utils": "2.0.0-dev-rc.3.0.0.254274",
80
- "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.254274",
78
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.254674",
79
+ "@fluidframework/runtime-utils": "2.0.0-dev-rc.3.0.0.254674",
80
+ "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.254674",
81
81
  "lz4js": "^0.2.0"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@arethetypeswrong/cli": "^0.15.2",
85
85
  "@biomejs/biome": "^1.6.2",
86
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254274",
87
- "@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.3.0.0.254274",
88
- "@fluid-tools/build-cli": "^0.34.0",
86
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254674",
87
+ "@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.3.0.0.254674",
88
+ "@fluid-tools/build-cli": "^0.35.0",
89
89
  "@fluidframework/build-common": "^2.0.3",
90
- "@fluidframework/build-tools": "^0.34.0",
91
- "@fluidframework/driver-definitions": "2.0.0-dev-rc.3.0.0.254274",
90
+ "@fluidframework/build-tools": "^0.35.0",
91
+ "@fluidframework/driver-definitions": "2.0.0-dev-rc.3.0.0.254674",
92
92
  "@fluidframework/eslint-config-fluid": "^5.1.0",
93
- "@fluidframework/merge-tree": "2.0.0-dev-rc.3.0.0.254274",
94
- "@fluidframework/sequence": "2.0.0-dev-rc.3.0.0.254274",
95
- "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.254274",
93
+ "@fluidframework/merge-tree": "2.0.0-dev-rc.3.0.0.254674",
94
+ "@fluidframework/sequence": "2.0.0-dev-rc.3.0.0.254674",
95
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.254674",
96
96
  "@microsoft/api-extractor": "^7.42.3",
97
97
  "@types/mocha": "^9.1.1",
98
98
  "@types/node": "^18.19.0",
@@ -108,30 +108,18 @@
108
108
  "rimraf": "^4.4.0",
109
109
  "typescript": "~5.1.6"
110
110
  },
111
- "fluidBuild": {
112
- "tasks": {
113
- "build:docs": {
114
- "dependsOn": [
115
- "...",
116
- "api-extractor:commonjs",
117
- "api-extractor:esnext"
118
- ],
119
- "script": false
120
- }
121
- }
122
- },
123
111
  "typeValidation": {
124
112
  "disabled": true,
125
113
  "broken": {}
126
114
  },
127
115
  "scripts": {
128
116
  "api": "fluid-build . --task api",
129
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
130
- "api-extractor:esnext": "api-extractor run --local",
117
+ "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
118
+ "api-extractor:esnext": "flub generate entrypoints --outDir ./lib",
131
119
  "build": "fluid-build . --task build",
132
120
  "build:commonjs": "fluid-build . --task commonjs",
133
121
  "build:compile": "fluid-build . --task compile",
134
- "build:docs": "fluid-build . --task api",
122
+ "build:docs": "api-extractor run --local",
135
123
  "build:esnext": "tsc --project ./tsconfig.json",
136
124
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
137
125
  "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }
@@ -1,27 +0,0 @@
1
- import { AttributionInfo } from '@fluidframework/runtime-definitions/internal';
2
- import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
3
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
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 { }
@@ -1,31 +0,0 @@
1
- import { AttributionInfo } from '@fluidframework/runtime-definitions/internal';
2
- import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
3
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
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: IProvideRuntimeAttributor */
24
-
25
- /* Excluded from this release type: IRuntimeAttributor */
26
-
27
- /* Excluded from this release type: mixinAttributor */
28
-
29
- /* Excluded from this release type: OpStreamAttributor */
30
-
31
- export { }
@@ -1,31 +0,0 @@
1
- import { AttributionInfo } from '@fluidframework/runtime-definitions/internal';
2
- import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
3
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
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: IProvideRuntimeAttributor */
24
-
25
- /* Excluded from this release type: IRuntimeAttributor */
26
-
27
- /* Excluded from this release type: mixinAttributor */
28
-
29
- /* Excluded from this release type: OpStreamAttributor */
30
-
31
- export { }
@@ -1,127 +0,0 @@
1
- import { AttributionInfo } from '@fluidframework/runtime-definitions/internal';
2
- import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
3
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
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
- * Creates an `IRuntimeAttributor` for usage with {@link mixinAttributor}.
35
- *
36
- * @remarks The attributor will only be populated with data once it's passed via scope to a container runtime load flow.
37
- *
38
- * @internal
39
- */
40
- export declare function createRuntimeAttributor(): IRuntimeAttributor;
41
-
42
- /**
43
- * @internal
44
- */
45
- export declare const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
46
-
47
- /**
48
- * Provides lookup between attribution keys and their associated attribution information.
49
- * @internal
50
- */
51
- export declare interface IAttributor {
52
- /**
53
- * Retrieves attribution information associated with a particular key.
54
- * @param key - Attribution key to look up.
55
- * @throws If no attribution information is recorded for that key.
56
- */
57
- getAttributionInfo(key: number): AttributionInfo;
58
- /**
59
- * @param key - Attribution key to look up.
60
- * @returns the attribution information associated with the provided key, or undefined if no information exists.
61
- */
62
- tryGetAttributionInfo(key: number): AttributionInfo | undefined;
63
- /**
64
- * @returns an iterable of (attribution key, attribution info) pairs for each stored key.
65
- */
66
- entries(): IterableIterator<[number, AttributionInfo]>;
67
- }
68
-
69
- /**
70
- * @internal
71
- */
72
- export declare interface IProvideRuntimeAttributor {
73
- readonly IRuntimeAttributor: IRuntimeAttributor;
74
- }
75
-
76
- /**
77
- * @internal
78
- */
79
- export declare const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
80
-
81
- /**
82
- * Provides access to attribution information stored on the container runtime.
83
- *
84
- * @remarks Attributors are only populated after the container runtime into which they are being injected has initialized.
85
- *
86
- * @sealed
87
- * @internal
88
- */
89
- export declare interface IRuntimeAttributor extends IProvideRuntimeAttributor {
90
- /**
91
- * @throws - If no AttributionInfo exists for this key.
92
- */
93
- get(key: AttributionKey): AttributionInfo;
94
- /**
95
- * @returns Whether any AttributionInfo exists for the provided key.
96
- */
97
- has(key: AttributionKey): boolean;
98
- /**
99
- * @returns Whether the runtime is currently tracking attribution information for the loaded container.
100
- * See {@link mixinAttributor} for more details on when this happens.
101
- */
102
- readonly isEnabled: boolean;
103
- }
104
-
105
- /**
106
- * Mixes in logic to load and store runtime-based attribution functionality.
107
- *
108
- * The `scope` passed to `load` should implement `IProvideRuntimeAttributor`.
109
- *
110
- * Existing documents without stored attributors will not start storing attribution information: if an
111
- * IRuntimeAttributor is passed via scope to load a document that never previously had attribution information,
112
- * that attributor's `has` method will always return `false`.
113
- * @param Base - base class, inherits from FluidAttributorRuntime
114
- * @internal
115
- */
116
- export declare const mixinAttributor: (Base?: typeof ContainerRuntime) => typeof ContainerRuntime;
117
-
118
- /**
119
- * Attributor which listens to an op stream and records entries for each op.
120
- * Sequence numbers are used as attribution keys.
121
- * @internal
122
- */
123
- export declare class OpStreamAttributor extends Attributor implements IAttributor {
124
- constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, audience: IAudience, initialEntries?: Iterable<[number, AttributionInfo]>);
125
- }
126
-
127
- export { }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.42.3"
9
- }
10
- ]
11
- }
@@ -1,27 +0,0 @@
1
- import { AttributionInfo } from '@fluidframework/runtime-definitions/internal';
2
- import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
3
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
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 { }
@@ -1,31 +0,0 @@
1
- import { AttributionInfo } from '@fluidframework/runtime-definitions/internal';
2
- import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
3
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
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: IProvideRuntimeAttributor */
24
-
25
- /* Excluded from this release type: IRuntimeAttributor */
26
-
27
- /* Excluded from this release type: mixinAttributor */
28
-
29
- /* Excluded from this release type: OpStreamAttributor */
30
-
31
- export { }
@@ -1,31 +0,0 @@
1
- import { AttributionInfo } from '@fluidframework/runtime-definitions/internal';
2
- import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
3
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
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: IProvideRuntimeAttributor */
24
-
25
- /* Excluded from this release type: IRuntimeAttributor */
26
-
27
- /* Excluded from this release type: mixinAttributor */
28
-
29
- /* Excluded from this release type: OpStreamAttributor */
30
-
31
- export { }
@@ -1,127 +0,0 @@
1
- import { AttributionInfo } from '@fluidframework/runtime-definitions/internal';
2
- import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
3
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
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
- * Creates an `IRuntimeAttributor` for usage with {@link mixinAttributor}.
35
- *
36
- * @remarks The attributor will only be populated with data once it's passed via scope to a container runtime load flow.
37
- *
38
- * @internal
39
- */
40
- export declare function createRuntimeAttributor(): IRuntimeAttributor;
41
-
42
- /**
43
- * @internal
44
- */
45
- export declare const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
46
-
47
- /**
48
- * Provides lookup between attribution keys and their associated attribution information.
49
- * @internal
50
- */
51
- export declare interface IAttributor {
52
- /**
53
- * Retrieves attribution information associated with a particular key.
54
- * @param key - Attribution key to look up.
55
- * @throws If no attribution information is recorded for that key.
56
- */
57
- getAttributionInfo(key: number): AttributionInfo;
58
- /**
59
- * @param key - Attribution key to look up.
60
- * @returns the attribution information associated with the provided key, or undefined if no information exists.
61
- */
62
- tryGetAttributionInfo(key: number): AttributionInfo | undefined;
63
- /**
64
- * @returns an iterable of (attribution key, attribution info) pairs for each stored key.
65
- */
66
- entries(): IterableIterator<[number, AttributionInfo]>;
67
- }
68
-
69
- /**
70
- * @internal
71
- */
72
- export declare interface IProvideRuntimeAttributor {
73
- readonly IRuntimeAttributor: IRuntimeAttributor;
74
- }
75
-
76
- /**
77
- * @internal
78
- */
79
- export declare const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
80
-
81
- /**
82
- * Provides access to attribution information stored on the container runtime.
83
- *
84
- * @remarks Attributors are only populated after the container runtime into which they are being injected has initialized.
85
- *
86
- * @sealed
87
- * @internal
88
- */
89
- export declare interface IRuntimeAttributor extends IProvideRuntimeAttributor {
90
- /**
91
- * @throws - If no AttributionInfo exists for this key.
92
- */
93
- get(key: AttributionKey): AttributionInfo;
94
- /**
95
- * @returns Whether any AttributionInfo exists for the provided key.
96
- */
97
- has(key: AttributionKey): boolean;
98
- /**
99
- * @returns Whether the runtime is currently tracking attribution information for the loaded container.
100
- * See {@link mixinAttributor} for more details on when this happens.
101
- */
102
- readonly isEnabled: boolean;
103
- }
104
-
105
- /**
106
- * Mixes in logic to load and store runtime-based attribution functionality.
107
- *
108
- * The `scope` passed to `load` should implement `IProvideRuntimeAttributor`.
109
- *
110
- * Existing documents without stored attributors will not start storing attribution information: if an
111
- * IRuntimeAttributor is passed via scope to load a document that never previously had attribution information,
112
- * that attributor's `has` method will always return `false`.
113
- * @param Base - base class, inherits from FluidAttributorRuntime
114
- * @internal
115
- */
116
- export declare const mixinAttributor: (Base?: typeof ContainerRuntime) => typeof ContainerRuntime;
117
-
118
- /**
119
- * Attributor which listens to an op stream and records entries for each op.
120
- * Sequence numbers are used as attribution keys.
121
- * @internal
122
- */
123
- export declare class OpStreamAttributor extends Attributor implements IAttributor {
124
- constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, audience: IAudience, initialEntries?: Iterable<[number, AttributionInfo]>);
125
- }
126
-
127
- export { }