@fluid-experimental/attributor 2.0.0-internal.6.4.0 → 2.0.0-internal.7.1.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 +48 -0
- package/api-extractor.json +1 -1
- package/api-report/attributor.api.md +71 -0
- package/dist/attributor-alpha.d.ts +127 -0
- package/dist/attributor-beta.d.ts +27 -0
- package/dist/attributor-public.d.ts +27 -0
- package/dist/attributor.d.ts +127 -56
- package/dist/encoders.d.ts +2 -2
- package/dist/encoders.d.ts.map +1 -1
- package/dist/stringInterner.d.ts +1 -1
- package/dist/stringInterner.d.ts.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/encoders.d.ts +2 -2
- package/lib/encoders.d.ts.map +1 -1
- package/lib/stringInterner.d.ts +1 -1
- package/lib/stringInterner.d.ts.map +1 -1
- package/package.json +28 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @fluid-experimental/attributor
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.7.1.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
7
|
+
## 2.0.0-internal.7.0.0
|
|
8
|
+
|
|
9
|
+
### Major Changes
|
|
10
|
+
|
|
11
|
+
- Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
12
|
+
|
|
13
|
+
This included the following changes from the protocol-definitions release:
|
|
14
|
+
|
|
15
|
+
- Updating signal interfaces for some planned improvements. The intention is split the interface between signals
|
|
16
|
+
submitted by clients to the server and the resulting signals sent from the server to clients.
|
|
17
|
+
- A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
|
|
18
|
+
been added, which will be the typing for signals sent from the client to the server. Both extend a new
|
|
19
|
+
ISignalMessageBase interface that contains common members.
|
|
20
|
+
- The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
|
|
21
|
+
|
|
22
|
+
- Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
23
|
+
|
|
24
|
+
Dependencies on the following Fluid server package have been updated to version 2.0.1:
|
|
25
|
+
|
|
26
|
+
- @fluidframework/gitresources: 2.0.1
|
|
27
|
+
- @fluidframework/server-kafka-orderer: 2.0.1
|
|
28
|
+
- @fluidframework/server-lambdas: 2.0.1
|
|
29
|
+
- @fluidframework/server-lambdas-driver: 2.0.1
|
|
30
|
+
- @fluidframework/server-local-server: 2.0.1
|
|
31
|
+
- @fluidframework/server-memory-orderer: 2.0.1
|
|
32
|
+
- @fluidframework/protocol-base: 2.0.1
|
|
33
|
+
- @fluidframework/server-routerlicious: 2.0.1
|
|
34
|
+
- @fluidframework/server-routerlicious-base: 2.0.1
|
|
35
|
+
- @fluidframework/server-services: 2.0.1
|
|
36
|
+
- @fluidframework/server-services-client: 2.0.1
|
|
37
|
+
- @fluidframework/server-services-core: 2.0.1
|
|
38
|
+
- @fluidframework/server-services-ordering-kafkanode: 2.0.1
|
|
39
|
+
- @fluidframework/server-services-ordering-rdkafka: 2.0.1
|
|
40
|
+
- @fluidframework/server-services-ordering-zookeeper: 2.0.1
|
|
41
|
+
- @fluidframework/server-services-shared: 2.0.1
|
|
42
|
+
- @fluidframework/server-services-telemetry: 2.0.1
|
|
43
|
+
- @fluidframework/server-services-utils: 2.0.1
|
|
44
|
+
- @fluidframework/server-test-utils: 2.0.1
|
|
45
|
+
- tinylicious: 2.0.1
|
|
46
|
+
|
|
47
|
+
- Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
48
|
+
|
|
49
|
+
The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
|
|
50
|
+
|
|
3
51
|
## 2.0.0-internal.6.4.0
|
|
4
52
|
|
|
5
53
|
Dependency updates only.
|
package/api-extractor.json
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
## API Report File for "@fluid-experimental/attributor"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { AttributionInfo } from '@fluidframework/runtime-definitions';
|
|
8
|
+
import { AttributionKey } from '@fluidframework/runtime-definitions';
|
|
9
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
10
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
11
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
12
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
13
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
14
|
+
|
|
15
|
+
// @alpha
|
|
16
|
+
export class Attributor implements IAttributor {
|
|
17
|
+
constructor(initialEntries?: Iterable<[number, AttributionInfo]>);
|
|
18
|
+
// (undocumented)
|
|
19
|
+
entries(): IterableIterator<[number, AttributionInfo]>;
|
|
20
|
+
getAttributionInfo(key: number): AttributionInfo;
|
|
21
|
+
// (undocumented)
|
|
22
|
+
protected readonly keyToInfo: Map<number, AttributionInfo>;
|
|
23
|
+
// (undocumented)
|
|
24
|
+
tryGetAttributionInfo(key: number): AttributionInfo | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// @alpha (undocumented)
|
|
28
|
+
export function createRuntimeAttributor(): IRuntimeAttributor;
|
|
29
|
+
|
|
30
|
+
// @alpha
|
|
31
|
+
export const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
|
|
32
|
+
|
|
33
|
+
// @alpha
|
|
34
|
+
export interface IAttributor {
|
|
35
|
+
// (undocumented)
|
|
36
|
+
entries(): IterableIterator<[number, AttributionInfo]>;
|
|
37
|
+
getAttributionInfo(key: number): AttributionInfo;
|
|
38
|
+
// (undocumented)
|
|
39
|
+
tryGetAttributionInfo(key: number): AttributionInfo | undefined;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// @alpha (undocumented)
|
|
43
|
+
export interface IProvideRuntimeAttributor {
|
|
44
|
+
// (undocumented)
|
|
45
|
+
readonly IRuntimeAttributor: IRuntimeAttributor;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// @alpha (undocumented)
|
|
49
|
+
export const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
|
|
50
|
+
|
|
51
|
+
// @alpha @sealed
|
|
52
|
+
export interface IRuntimeAttributor extends IProvideRuntimeAttributor {
|
|
53
|
+
// (undocumented)
|
|
54
|
+
get(key: AttributionKey): AttributionInfo;
|
|
55
|
+
// (undocumented)
|
|
56
|
+
has(key: AttributionKey): boolean;
|
|
57
|
+
// (undocumented)
|
|
58
|
+
readonly isEnabled: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// @alpha
|
|
62
|
+
export const mixinAttributor: (Base?: typeof ContainerRuntime) => typeof ContainerRuntime;
|
|
63
|
+
|
|
64
|
+
// @alpha
|
|
65
|
+
export class OpStreamAttributor extends Attributor implements IAttributor {
|
|
66
|
+
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, audience: IAudience, initialEntries?: Iterable<[number, AttributionInfo]>);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// (No @packageDocumentation comment for this package)
|
|
70
|
+
|
|
71
|
+
```
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
* @alpha
|
|
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
|
+
* @alpha
|
|
37
|
+
*/
|
|
38
|
+
export declare function createRuntimeAttributor(): IRuntimeAttributor;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @alpha
|
|
42
|
+
* Feature Gate Key -
|
|
43
|
+
* Whether or not a container runtime instantiated using `mixinAttributor`'s load should generate an attributor on
|
|
44
|
+
* new files. See package README for more notes on integration.
|
|
45
|
+
*/
|
|
46
|
+
export declare const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Provides lookup between attribution keys and their associated attribution information.
|
|
50
|
+
* @alpha
|
|
51
|
+
*/
|
|
52
|
+
export declare interface IAttributor {
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves attribution information associated with a particular key.
|
|
55
|
+
* @param key - Attribution key to look up.
|
|
56
|
+
* @throws If no attribution information is recorded for that key.
|
|
57
|
+
*/
|
|
58
|
+
getAttributionInfo(key: number): AttributionInfo;
|
|
59
|
+
/**
|
|
60
|
+
* @param key - Attribution key to look up.
|
|
61
|
+
* @returns the attribution information associated with the provided key, or undefined if no information exists.
|
|
62
|
+
*/
|
|
63
|
+
tryGetAttributionInfo(key: number): AttributionInfo | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* @returns an iterable of (attribution key, attribution info) pairs for each stored key.
|
|
66
|
+
*/
|
|
67
|
+
entries(): IterableIterator<[number, AttributionInfo]>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @alpha
|
|
72
|
+
*/
|
|
73
|
+
export declare interface IProvideRuntimeAttributor {
|
|
74
|
+
readonly IRuntimeAttributor: IRuntimeAttributor;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @alpha
|
|
79
|
+
*/
|
|
80
|
+
export declare const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Provides access to attribution information stored on the container runtime.
|
|
84
|
+
*
|
|
85
|
+
* Attributors are only populated after the container runtime they are injected into has initialized.
|
|
86
|
+
* @sealed
|
|
87
|
+
* @alpha
|
|
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
|
+
* @alpha
|
|
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
|
+
* @alpha
|
|
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 { }
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
2
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
3
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
4
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
5
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
6
|
+
|
|
7
|
+
/* Excluded from this release type: AttributionInfo */
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: AttributionKey */
|
|
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,27 @@
|
|
|
1
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
2
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
3
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
4
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
5
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
6
|
+
|
|
7
|
+
/* Excluded from this release type: AttributionInfo */
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: AttributionKey */
|
|
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 { }
|
package/dist/attributor.d.ts
CHANGED
|
@@ -1,56 +1,127 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @param
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
+
* @alpha
|
|
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
|
+
* @alpha
|
|
37
|
+
*/
|
|
38
|
+
export declare function createRuntimeAttributor(): IRuntimeAttributor;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @alpha
|
|
42
|
+
* Feature Gate Key -
|
|
43
|
+
* Whether or not a container runtime instantiated using `mixinAttributor`'s load should generate an attributor on
|
|
44
|
+
* new files. See package README for more notes on integration.
|
|
45
|
+
*/
|
|
46
|
+
export declare const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Provides lookup between attribution keys and their associated attribution information.
|
|
50
|
+
* @alpha
|
|
51
|
+
*/
|
|
52
|
+
export declare interface IAttributor {
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves attribution information associated with a particular key.
|
|
55
|
+
* @param key - Attribution key to look up.
|
|
56
|
+
* @throws If no attribution information is recorded for that key.
|
|
57
|
+
*/
|
|
58
|
+
getAttributionInfo(key: number): AttributionInfo;
|
|
59
|
+
/**
|
|
60
|
+
* @param key - Attribution key to look up.
|
|
61
|
+
* @returns the attribution information associated with the provided key, or undefined if no information exists.
|
|
62
|
+
*/
|
|
63
|
+
tryGetAttributionInfo(key: number): AttributionInfo | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* @returns an iterable of (attribution key, attribution info) pairs for each stored key.
|
|
66
|
+
*/
|
|
67
|
+
entries(): IterableIterator<[number, AttributionInfo]>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @alpha
|
|
72
|
+
*/
|
|
73
|
+
export declare interface IProvideRuntimeAttributor {
|
|
74
|
+
readonly IRuntimeAttributor: IRuntimeAttributor;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @alpha
|
|
79
|
+
*/
|
|
80
|
+
export declare const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Provides access to attribution information stored on the container runtime.
|
|
84
|
+
*
|
|
85
|
+
* Attributors are only populated after the container runtime they are injected into has initialized.
|
|
86
|
+
* @sealed
|
|
87
|
+
* @alpha
|
|
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
|
+
* @alpha
|
|
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
|
+
* @alpha
|
|
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 { }
|
package/dist/encoders.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export interface Encoder<TDecoded, TEncoded> {
|
|
|
5
5
|
encode(decoded: TDecoded): TEncoded;
|
|
6
6
|
decode(encoded: TEncoded): TDecoded;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type TimestampEncoder = Encoder<number[], number[]>;
|
|
9
9
|
export declare const deltaEncoder: TimestampEncoder;
|
|
10
|
-
export
|
|
10
|
+
export type IAttributorSerializer = Encoder<IAttributor, SerializedAttributor>;
|
|
11
11
|
export interface SerializedAttributor {
|
|
12
12
|
interner: readonly string[];
|
|
13
13
|
seqs: number[];
|
package/dist/encoders.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoders.d.ts","sourceRoot":"","sources":["../src/encoders.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,kBAAkB,CAAC;AAE3E,MAAM,WAAW,OAAO,CAAC,QAAQ,EAAE,QAAQ;IAC1C,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAEpC,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACpC;AAID,
|
|
1
|
+
{"version":3,"file":"encoders.d.ts","sourceRoot":"","sources":["../src/encoders.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,kBAAkB,CAAC;AAE3E,MAAM,WAAW,OAAO,CAAC,QAAQ,EAAE,QAAQ;IAC1C,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAEpC,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACpC;AAID,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AAE3D,eAAO,MAAM,YAAY,EAAE,gBAuB1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;AAE/E,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAA+D;IAC1F,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,EAAE,gBAAgB,EAAE,CAAC;CACpC;AAED,qBAAa,oBAAqB,YAAW,qBAAqB;IAEhE,OAAO,CAAC,QAAQ,CAAC,cAAc;IAG/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAHhB,cAAc,EAAE,CAChC,OAAO,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,KACxC,WAAW,EACC,gBAAgB,EAAE,gBAAgB;IAG7C,MAAM,CAAC,UAAU,EAAE,WAAW,GAAG,oBAAoB;IAsBrD,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,WAAW;CAkBzD;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,yEAGhB,CAAC"}
|
package/dist/stringInterner.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringInterner.d.ts","sourceRoot":"","sources":["../src/stringInterner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"stringInterner.d.ts","sourceRoot":"","sources":["../src/stringInterner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IACvC,QAAQ,CAAC,gBAAgB,EAAE,sCAAsC,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAAC;IAC3D,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,eAAe,IAAI,SAAS,MAAM,EAAE,CAAC;CACrC;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,YAAW,cAAc;IAC3D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAuC;IAC7E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgB;IAEhD;;;OAGG;gBACS,YAAY,GAAE,SAAS,MAAM,EAAO;IAMhD;;;OAGG;IACI,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAItD,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAIjE;;;;;OAKG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAQ1C;;;OAGG;IACI,eAAe,IAAI,SAAS,MAAM,EAAE;IAI3C,+GAA+G;IAC/G,OAAO,CAAC,WAAW;CAMnB"}
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib/encoders.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export interface Encoder<TDecoded, TEncoded> {
|
|
|
5
5
|
encode(decoded: TDecoded): TEncoded;
|
|
6
6
|
decode(encoded: TEncoded): TDecoded;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type TimestampEncoder = Encoder<number[], number[]>;
|
|
9
9
|
export declare const deltaEncoder: TimestampEncoder;
|
|
10
|
-
export
|
|
10
|
+
export type IAttributorSerializer = Encoder<IAttributor, SerializedAttributor>;
|
|
11
11
|
export interface SerializedAttributor {
|
|
12
12
|
interner: readonly string[];
|
|
13
13
|
seqs: number[];
|
package/lib/encoders.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoders.d.ts","sourceRoot":"","sources":["../src/encoders.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,kBAAkB,CAAC;AAE3E,MAAM,WAAW,OAAO,CAAC,QAAQ,EAAE,QAAQ;IAC1C,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAEpC,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACpC;AAID,
|
|
1
|
+
{"version":3,"file":"encoders.d.ts","sourceRoot":"","sources":["../src/encoders.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,kBAAkB,CAAC;AAE3E,MAAM,WAAW,OAAO,CAAC,QAAQ,EAAE,QAAQ;IAC1C,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAEpC,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACpC;AAID,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AAE3D,eAAO,MAAM,YAAY,EAAE,gBAuB1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;AAE/E,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAA+D;IAC1F,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,EAAE,gBAAgB,EAAE,CAAC;CACpC;AAED,qBAAa,oBAAqB,YAAW,qBAAqB;IAEhE,OAAO,CAAC,QAAQ,CAAC,cAAc;IAG/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAHhB,cAAc,EAAE,CAChC,OAAO,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,KACxC,WAAW,EACC,gBAAgB,EAAE,gBAAgB;IAG7C,MAAM,CAAC,UAAU,EAAE,WAAW,GAAG,oBAAoB;IAsBrD,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,WAAW;CAkBzD;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,yEAGhB,CAAC"}
|
package/lib/stringInterner.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringInterner.d.ts","sourceRoot":"","sources":["../src/stringInterner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"stringInterner.d.ts","sourceRoot":"","sources":["../src/stringInterner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IACvC,QAAQ,CAAC,gBAAgB,EAAE,sCAAsC,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAAC;IAC3D,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,eAAe,IAAI,SAAS,MAAM,EAAE,CAAC;CACrC;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,YAAW,cAAc;IAC3D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAuC;IAC7E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgB;IAEhD;;;OAGG;gBACS,YAAY,GAAE,SAAS,MAAM,EAAO;IAMhD;;;OAGG;IACI,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAItD,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAIjE;;;;;OAKG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAQ1C;;;OAGG;IACI,eAAe,IAAI,SAAS,MAAM,EAAE;IAI3C,+GAA+G;IAC/G,OAAO,CAAC,WAAW;CAMnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/attributor",
|
|
3
|
-
"version": "2.0.0-internal.
|
|
3
|
+
"version": "2.0.0-internal.7.1.0",
|
|
4
4
|
"description": "Operation attributor",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -35,44 +35,44 @@
|
|
|
35
35
|
"temp-directory": "nyc/.nyc_output"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@fluid-internal/client-utils": ">=2.0.0-internal.
|
|
39
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.
|
|
40
|
-
"@fluidframework/container-runtime": ">=2.0.0-internal.
|
|
41
|
-
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.
|
|
42
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.
|
|
43
|
-
"@fluidframework/core-utils": ">=2.0.0-internal.
|
|
44
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-internal.
|
|
45
|
-
"@fluidframework/protocol-definitions": "^
|
|
46
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.
|
|
47
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.
|
|
48
|
-
"@fluidframework/telemetry-utils": ">=2.0.0-internal.
|
|
38
|
+
"@fluid-internal/client-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
39
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
40
|
+
"@fluidframework/container-runtime": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
41
|
+
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
42
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
43
|
+
"@fluidframework/core-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
44
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
45
|
+
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
46
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
47
|
+
"@fluidframework/runtime-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
48
|
+
"@fluidframework/telemetry-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
49
49
|
"lz4js": "^0.2.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.
|
|
53
|
-
"@fluid-tools/build-cli": "^0.
|
|
54
|
-
"@fluidframework/build-common": "^2.0.
|
|
55
|
-
"@fluidframework/build-tools": "^0.
|
|
56
|
-
"@fluidframework/driver-definitions": ">=2.0.0-internal.
|
|
57
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
58
|
-
"@fluidframework/merge-tree": ">=2.0.0-internal.
|
|
59
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.
|
|
60
|
-
"@fluidframework/sequence": ">=2.0.0-internal.
|
|
61
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.
|
|
62
|
-
"@microsoft/api-extractor": "^7.
|
|
52
|
+
"@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
53
|
+
"@fluid-tools/build-cli": "^0.25.0",
|
|
54
|
+
"@fluidframework/build-common": "^2.0.1",
|
|
55
|
+
"@fluidframework/build-tools": "^0.25.0",
|
|
56
|
+
"@fluidframework/driver-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
57
|
+
"@fluidframework/eslint-config-fluid": "^3.0.0",
|
|
58
|
+
"@fluidframework/merge-tree": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
59
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
60
|
+
"@fluidframework/sequence": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
61
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
|
|
62
|
+
"@microsoft/api-extractor": "^7.37.0",
|
|
63
63
|
"@types/mocha": "^9.1.1",
|
|
64
64
|
"@types/node": "^16.18.38",
|
|
65
65
|
"c8": "^7.7.1",
|
|
66
66
|
"copyfiles": "^2.4.1",
|
|
67
67
|
"cross-env": "^7.0.3",
|
|
68
|
-
"eslint": "~8.
|
|
68
|
+
"eslint": "~8.50.0",
|
|
69
69
|
"mocha": "^10.2.0",
|
|
70
70
|
"mocha-json-output-reporter": "^2.0.1",
|
|
71
71
|
"mocha-multi-reporters": "^1.5.1",
|
|
72
72
|
"moment": "^2.21.0",
|
|
73
|
-
"prettier": "~
|
|
73
|
+
"prettier": "~3.0.3",
|
|
74
74
|
"rimraf": "^4.4.0",
|
|
75
|
-
"typescript": "~
|
|
75
|
+
"typescript": "~5.1.6"
|
|
76
76
|
},
|
|
77
77
|
"typeValidation": {
|
|
78
78
|
"disabled": true,
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
"build": "fluid-build . --task build",
|
|
83
83
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
84
84
|
"build:compile": "fluid-build . --task compile",
|
|
85
|
-
"build:docs": "api-extractor run --local
|
|
85
|
+
"build:docs": "api-extractor run --local",
|
|
86
86
|
"build:esnext": "tsc --project ./tsconfig.esnext.json",
|
|
87
87
|
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
88
|
-
"ci:build:docs": "api-extractor run
|
|
88
|
+
"ci:build:docs": "api-extractor run",
|
|
89
89
|
"clean": "rimraf --glob 'dist' 'lib' '*.tsbuildinfo' '*.build.log' '_api-extractor-temp' 'nyc'",
|
|
90
90
|
"eslint": "eslint --format stylish src",
|
|
91
91
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|