@fluid-experimental/attributor 2.0.0-internal.7.3.0 → 2.0.0-internal.8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/api-extractor-lint.json +13 -0
  3. package/api-extractor.json +9 -1
  4. package/api-report/attributor.api.md +9 -9
  5. package/dist/attributor-alpha.d.ts +27 -0
  6. package/dist/attributor-beta.d.ts +35 -0
  7. package/dist/attributor-public.d.ts +35 -0
  8. package/dist/attributor-untrimmed.d.ts +124 -0
  9. package/dist/attributor.cjs +2 -2
  10. package/dist/attributor.cjs.map +1 -1
  11. package/dist/attributor.d.ts +3 -3
  12. package/dist/encoders.cjs +1 -1
  13. package/dist/encoders.cjs.map +1 -1
  14. package/dist/encoders.d.ts.map +1 -1
  15. package/dist/mixinAttributor.cjs +6 -21
  16. package/dist/mixinAttributor.cjs.map +1 -1
  17. package/dist/mixinAttributor.d.ts +6 -9
  18. package/dist/mixinAttributor.d.ts.map +1 -1
  19. package/lib/attributor-alpha.d.ts +27 -0
  20. package/lib/attributor-beta.d.ts +35 -0
  21. package/lib/attributor-public.d.ts +35 -0
  22. package/lib/attributor-untrimmed.d.ts +124 -0
  23. package/lib/attributor.d.ts +3 -3
  24. package/lib/attributor.d.ts.map +1 -1
  25. package/lib/attributor.mjs +2 -2
  26. package/lib/attributor.mjs.map +1 -1
  27. package/lib/encoders.d.ts +2 -2
  28. package/lib/encoders.d.ts.map +1 -1
  29. package/lib/encoders.mjs +1 -1
  30. package/lib/encoders.mjs.map +1 -1
  31. package/lib/index.d.ts +2 -6
  32. package/lib/index.d.ts.map +1 -1
  33. package/lib/lz4Encoder.d.ts +1 -1
  34. package/lib/lz4Encoder.d.ts.map +1 -1
  35. package/lib/mixinAttributor.d.ts +6 -9
  36. package/lib/mixinAttributor.d.ts.map +1 -1
  37. package/lib/mixinAttributor.mjs +6 -21
  38. package/lib/mixinAttributor.mjs.map +1 -1
  39. package/package.json +39 -34
  40. package/src/attributor.ts +3 -3
  41. package/src/encoders.ts +2 -3
  42. package/src/mixinAttributor.ts +10 -38
@@ -1,18 +1,15 @@
1
1
  import { ContainerRuntime } from "@fluidframework/container-runtime";
2
2
  import { AttributionInfo, AttributionKey } from "@fluidframework/runtime-definitions";
3
3
  /**
4
- * @alpha
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
- * @alpha
8
+ * @internal
12
9
  */
13
10
  export declare const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
14
11
  /**
15
- * @alpha
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
- * @alpha
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
- * @alpha
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
- * @alpha
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;;;;;GAKG;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,4BAwIrB,CAAC"}
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,4BA+GrB,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 { }
@@ -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 { }
@@ -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
- * @alpha
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
- * @alpha
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
- * @alpha
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]>);
@@ -1 +1 @@
1
- {"version":3,"file":"attributor.d.ts","sourceRoot":"","sources":["../src/attributor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B;;;;OAIG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;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M,GAAG,eAAe,GAAG,SAAS,CAAC;IAEhE;;OAEG;IACH,OAAO,IAAI,gBAAgB,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;CAIvD;AAED;;;GAGG;AACH,qBAAa,UAAW,YAAW,WAAW;IAC7C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAE3D;;OAEG;gBACS,cAAc,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAIhE;;OAEG;IACI,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe;IAQvD;;OAEG;IACI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAItE;;OAEG;IACI,OAAO,IAAI,gBAAgB,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAG7D;AAED;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,UAAW,YAAW,WAAW;gBAEvE,YAAY,EAAE,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,EACxE,QAAQ,EAAE,SAAS,EACnB,cAAc,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAoBrD"}
@@ -2,7 +2,7 @@ import { assert } from "@fluidframework/core-utils";
2
2
  import { UsageError } from "@fluidframework/telemetry-utils";
3
3
  /**
4
4
  * {@inheritdoc IAttributor}
5
- * @alpha
5
+ * @internal
6
6
  */
7
7
  export class Attributor {
8
8
  /**
@@ -37,7 +37,7 @@ export class Attributor {
37
37
  /**
38
38
  * Attributor which listens to an op stream and records entries for each op.
39
39
  * Sequence numbers are used as attribution keys.
40
- * @alpha
40
+ * @internal
41
41
  */
42
42
  export class OpStreamAttributor extends Attributor {
43
43
  constructor(deltaManager, audience, initialEntries) {
@@ -1 +1 @@
1
- {"version":3,"file":"attributor.mjs","sourceRoot":"","sources":["../src/attributor.ts"],"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,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,SAAS,EAAE,OAAO,CAAC,SAAS;iBAC5B,CAAC,CAAC;aACH;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;CACD","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 * @alpha\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 * @alpha\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 * @alpha\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"]}
1
+ {"version":3,"file":"attributor.mjs","sourceRoot":"","sources":["../src/attributor.ts"],"names":[],"mappings":"OAIO,EAAE,MAAM,EAAE,MAAM,4BAA4B;OAG5C,EAAE,UAAU,EAAE,MAAM,iCAAiC;AA8B5D;;;GAGG;AACH,MAAM,OAAO,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,UAAU,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;AAED;;;;GAIG;AACH,MAAM,OAAO,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,MAAM,CACL,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","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/lib/encoders.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AttributionInfo } from "@fluidframework/runtime-definitions";
2
- import { IAttributor } from "./attributor";
3
- import { InternedStringId } from "./stringInterner";
2
+ import { IAttributor } from "./attributor.mjs";
3
+ import { InternedStringId } from "./stringInterner.mjs";
4
4
  export interface Encoder<TDecoded, TEncoded> {
5
5
  encode(decoded: TDecoded): TEncoded;
6
6
  decode(encoded: TEncoded): TDecoded;
@@ -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,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AC,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/encoders.mjs CHANGED
@@ -11,7 +11,7 @@ export const deltaEncoder = {
11
11
  return deltaTimestamps;
12
12
  },
13
13
  decode: (encoded) => {
14
- assert(Array.isArray(encoded), 0x4b0 /* Encoded timestamps should be an array of nummbers */);
14
+ assert(Array.isArray(encoded), 0x4b0 /* Encoded timestamps should be an array of numbers */);
15
15
  const timestamps = new Array(encoded.length);
16
16
  let cumulativeSum = 0;
17
17
  for (let i = 0; i < enco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IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YAChC,MAAM,GAAG,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,IAAI,GAAU,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACxD,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;SACxC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACD;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAa,CAAkB,EAAE,CAAkB,EAAmB,EAAE,CAAC,CAAC;IAC9F,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;CAChD,CAAC,CAAC","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 { Jsonable } from \"@fluidframework/datastore-definitions\";\nimport { IUser } from \"@fluidframework/protocol-definitions\";\nimport { AttributionInfo } from \"@fluidframework/runtime-definitions\";\nimport { IAttributor } from \"./attributor\";\nimport { InternedStringId, MutableStringInterner } from \"./stringInterner\";\n\nexport interface Encoder<TDecoded, TEncoded> {\n\tencode(decoded: TDecoded): TEncoded;\n\n\tdecode(encoded: TEncoded): TDecoded;\n}\n\n// Note: the encoded format doesn't matter as long as it's serializable;\n// these types could be weakened.\nexport type TimestampEncoder = Encoder<number[], number[]>;\n\nexport const deltaEncoder: TimestampEncoder = {\n\tencode: (timestamps: number[]) => {\n\t\tconst deltaTimestamps: number[] = new Array(timestamps.length);\n\t\tlet prev = 0;\n\t\tfor (let i = 0; i < timestamps.length; i++) {\n\t\t\tdeltaTimestamps[i] = timestamps[i] - prev;\n\t\t\tprev = timestamps[i];\n\t\t}\n\t\treturn deltaTimestamps;\n\t},\n\tdecode: (encoded: Jsonable) => {\n\t\tassert(\n\t\t\tArray.isArray(encoded),\n\t\t\t0x4b0 /* Encoded timestamps should be an array of nummbers */,\n\t\t);\n\t\tconst timestamps: number[] = new Array(encoded.length);\n\t\tlet cumulativeSum = 0;\n\t\tfor (let i = 0; i < encoded.length; i++) {\n\t\t\tcumulativeSum += encoded[i];\n\t\t\ttimestamps[i] = cumulativeSum;\n\t\t}\n\t\treturn timestamps;\n\t},\n};\n\nexport type IAttributorSerializer = Encoder<IAttributor, SerializedAttributor>;\n\nexport interface SerializedAttributor {\n\tinterner: readonly string[] /* result of calling getSerializable() on a StringInterner */;\n\tseqs: number[];\n\ttimestamps: number[];\n\tattributionRefs: InternedStringId[];\n}\n\nexport class AttributorSerializer implements IAttributorSerializer {\n\tconstructor(\n\t\tprivate readonly makeAttributor: (\n\t\t\tentries: Iterable<[number, AttributionInfo]>,\n\t\t) => IAttributor,\n\t\tprivate readonly timestampEncoder: TimestampEncoder,\n\t) {}\n\n\tpublic encode(attributor: IAttributor): SerializedAttributor {\n\t\tconst interner = new MutableStringInterner();\n\t\tconst seqs: number[] = [];\n\t\tconst timestamps: number[] = [];\n\t\tconst attributionRefs: InternedStringId[] = [];\n\t\tfor (const [seq, { user, timestamp }] of attributor.entries()) {\n\t\t\tseqs.push(seq);\n\t\t\ttimestamps.push(timestamp);\n\t\t\tconst ref = interner.getOrCreateInternedId(JSON.stringify(user));\n\t\t\tattributionRefs.push(ref);\n\t\t}\n\n\t\tconst serialized: SerializedAttributor = {\n\t\t\tinterner: interner.getSerializable(),\n\t\t\tseqs,\n\t\t\ttimestamps: this.timestampEncoder.encode(timestamps),\n\t\t\tattributionRefs,\n\t\t};\n\n\t\treturn serialized;\n\t}\n\n\tpublic decode(encoded: SerializedAttributor): IAttributor {\n\t\tconst interner = new MutableStringInterner(encoded.interner);\n\t\tconst { seqs, timestamps: encodedTimestamps, attributionRefs } = encoded;\n\t\tconst timestamps = this.timestampEncoder.decode(encodedTimestamps);\n\t\tassert(\n\t\t\tseqs.length === timestamps.length && timestamps.length === attributionRefs.length,\n\t\t\t0x4b1 /* serialized attribution columns should have the same length */,\n\t\t);\n\t\tconst entries = new Array(seqs.length);\n\t\tfor (let i = 0; i < seqs.length; i++) {\n\t\t\tconst key = seqs[i];\n\t\t\tconst timestamp = timestamps[i];\n\t\t\tconst ref = attributionRefs[i];\n\t\t\tconst user: IUser = JSON.parse(interner.getString(ref));\n\t\t\tentries[i] = [key, { user, timestamp }];\n\t\t}\n\t\treturn this.makeAttributor(entries);\n\t}\n}\n\n/**\n * @returns an encoder which composes `a` and `b`.\n */\nexport const chain = <T1, T2, T3>(a: Encoder<T1, T2>, b: Encoder<T2, T3>): Encoder<T1, T3> => ({\n\tencode: (content) => b.encode(a.encode(content)),\n\tdecode: (content) => a.decode(b.decode(content)),\n});\n"]}
1
+ {"version":3,"file":"encoders.mjs","sourceRoot":"","sources":["../src/encoders.ts"],"names":[],"mappings":"OAIO,EAAE,MAAM,EAAE,MAAM,4BAA4B;OAI5C,EAAoB,qBAAqB,EAAE;AAYlD,MAAM,CAAC,MAAM,YAAY,GAAqB;IAC7C,MAAM,EAAE,CAAC,UAAoB,EAAE,EAAE;QAChC,MAAM,eAAe,GAAa,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,KAAK,IAAI,CAAC,G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AAC,CAAC;YACxD,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;SACxC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACD;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAa,CAAkB,EAAE,CAAkB,EAAmB,EAAE,CAAC,CAAC;IAC9F,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;CAChD,CAAC,CAAC","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 { IUser } from \"@fluidframework/protocol-definitions\";\nimport { AttributionInfo } from \"@fluidframework/runtime-definitions\";\nimport { IAttributor } from \"./attributor\";\nimport { InternedStringId, MutableStringInterner } from \"./stringInterner\";\n\nexport interface Encoder<TDecoded, TEncoded> {\n\tencode(decoded: TDecoded): TEncoded;\n\n\tdecode(encoded: TEncoded): TDecoded;\n}\n\n// Note: the encoded format doesn't matter as long as it's serializable;\n// these types could be weakened.\nexport type TimestampEncoder = Encoder<number[], number[]>;\n\nexport const deltaEncoder: TimestampEncoder = {\n\tencode: (timestamps: number[]) => {\n\t\tconst deltaTimestamps: number[] = new Array(timestamps.length);\n\t\tlet prev = 0;\n\t\tfor (let i = 0; i < timestamps.length; i++) {\n\t\t\tdeltaTimestamps[i] = timestamps[i] - prev;\n\t\t\tprev = timestamps[i];\n\t\t}\n\t\treturn deltaTimestamps;\n\t},\n\tdecode: (encoded: unknown) => {\n\t\tassert(\n\t\t\tArray.isArray(encoded),\n\t\t\t0x4b0 /* Encoded timestamps should be an array of numbers */,\n\t\t);\n\t\tconst timestamps: number[] = new Array(encoded.length);\n\t\tlet cumulativeSum = 0;\n\t\tfor (let i = 0; i < encoded.length; i++) {\n\t\t\tcumulativeSum += encoded[i];\n\t\t\ttimestamps[i] = cumulativeSum;\n\t\t}\n\t\treturn timestamps;\n\t},\n};\n\nexport type IAttributorSerializer = Encoder<IAttributor, SerializedAttributor>;\n\nexport interface SerializedAttributor {\n\tinterner: readonly string[] /* result of calling getSerializable() on a StringInterner */;\n\tseqs: number[];\n\ttimestamps: number[];\n\tattributionRefs: InternedStringId[];\n}\n\nexport class AttributorSerializer implements IAttributorSerializer {\n\tconstructor(\n\t\tprivate readonly makeAttributor: (\n\t\t\tentries: Iterable<[number, AttributionInfo]>,\n\t\t) => IAttributor,\n\t\tprivate readonly timestampEncoder: TimestampEncoder,\n\t) {}\n\n\tpublic encode(attributor: IAttributor): SerializedAttributor {\n\t\tconst interner = new MutableStringInterner();\n\t\tconst seqs: number[] = [];\n\t\tconst timestamps: number[] = [];\n\t\tconst attributionRefs: InternedStringId[] = [];\n\t\tfor (const [seq, { user, timestamp }] of attributor.entries()) {\n\t\t\tseqs.push(seq);\n\t\t\ttimestamps.push(timestamp);\n\t\t\tconst ref = interner.getOrCreateInternedId(JSON.stringify(user));\n\t\t\tattributionRefs.push(ref);\n\t\t}\n\n\t\tconst serialized: SerializedAttributor = {\n\t\t\tinterner: interner.getSerializable(),\n\t\t\tseqs,\n\t\t\ttimestamps: this.timestampEncoder.encode(timestamps),\n\t\t\tattributionRefs,\n\t\t};\n\n\t\treturn serialized;\n\t}\n\n\tpublic decode(encoded: SerializedAttributor): IAttributor {\n\t\tconst interner = new MutableStringInterner(encoded.interner);\n\t\tconst { seqs, timestamps: encodedTimestamps, attributionRefs } = encoded;\n\t\tconst timestamps = this.timestampEncoder.decode(encodedTimestamps);\n\t\tassert(\n\t\t\tseqs.length === timestamps.length && timestamps.length === attributionRefs.length,\n\t\t\t0x4b1 /* serialized attribution columns should have the same length */,\n\t\t);\n\t\tconst entries = new Array(seqs.length);\n\t\tfor (let i = 0; i < seqs.length; i++) {\n\t\t\tconst key = seqs[i];\n\t\t\tconst timestamp = timestamps[i];\n\t\t\tconst ref = attributionRefs[i];\n\t\t\tconst user: IUser = JSON.parse(interner.getString(ref));\n\t\t\tentries[i] = [key, { user, timestamp }];\n\t\t}\n\t\treturn this.makeAttributor(entries);\n\t}\n}\n\n/**\n * @returns an encoder which composes `a` and `b`.\n */\nexport const chain = <T1, T2, T3>(a: Encoder<T1, T2>, b: Encoder<T2, T3>): Encoder<T1, T3> => ({\n\tencode: (content) => b.encode(a.encode(content)),\n\tdecode: (content) => a.decode(b.decode(content)),\n});\n"]}
package/lib/index.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- export { Attributor, OpStreamAttributor, IAttributor } from "./attributor";
6
- export { createRuntimeAttributor, enableOnNewFileKey, IProvideRuntimeAttributor, IRuntimeAttributor, mixinAttributor, } from "./mixinAttributor";
1
+ export { Attributor, OpStreamAttributor, IAttributor } from "./attributor.mjs";
2
+ export { createRuntimeAttributor, enableOnNewFileKey, IProvideRuntimeAttributor, IRuntimeAttributor, mixinAttributor, } from "./mixinAttributor.mjs";
7
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EACN,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,GACf,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"OAIO,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE;OAC/C,EACN,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,GACf"}
@@ -1,5 +1,5 @@
1
1
  import { Jsonable } from "@fluidframework/datastore-definitions";
2
- import { Encoder } from "./encoders";
2
+ import { Encoder } from "./encoders.mjs";
3
3
  /**
4
4
  * @alpha
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"lz4Encoder.d.ts","sourceRoot":"","sources":["../src/lz4Encoder.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAchE"}
1
+ {"version":3,"file":"lz4Encoder.d.ts","sourceRoot":"","sources":["../src/lz4Encoder.ts"],"names":[],"mappings":"OAMO,EAAE,QAAQ,EAAE,MAAM,uCAAuC;OACzD,EAAE,OAAO,EAAE;AAElB;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAchE"}
@@ -1,18 +1,15 @@
1
1
  import { ContainerRuntime } from "@fluidframework/container-runtime";
2
2
  import { AttributionInfo, AttributionKey } from "@fluidframework/runtime-definitions";
3
3
  /**
4
- * @alpha
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
- * @alpha
8
+ * @internal
12
9
  */
13
10
  export declare const IRuntimeAttributor: keyof IProvideRuntimeAttributor;
14
11
  /**
15
- * @alpha
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
- * @alpha
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
- * @alpha
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
- * @alpha
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;;;;;GAKG;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,4BAwIrB,CAAC"}
1
+ {"version":3,"file":"mixinAttributor.d.ts","sourceRoot":"","sources":["../src/mixinAttributor.ts"],"names":[],"mappings":"OAUO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC;OAE7D,EACN,eAAe,EACf,cAAc,EAId,MAAM,qCAAqC;AAoB5C;;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,4BA+GrB,CAAC"}
@@ -10,20 +10,17 @@ import { makeLZ4Encoder } from "./lz4Encoder.mjs";
10
10
  const attributorTreeName = ".attributor";
11
11
  const opBlobName = "op";
12
12
  /**
13
- * @alpha
14
- * Feature Gate Key -
15
- * Whether or not a container runtime instantiated using `mixinAttributor`'s load should generate an attributor on
16
- * new files. See package README for more notes on integration.
13
+ * @internal
17
14
  */
18
15
  export const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile";
19
16
  /**
20
- * @alpha
17
+ * @internal
21
18
  */
22
19
  export const IRuntimeAttributor = "IRuntimeAttributor";
23
20
  /**
24
21
  * @returns an IRuntimeAttributor for usage with `mixinAttributor`. The attributor will only be populated with data
25
22
  * once it's passed via scope to a container runtime load flow. See {@link mixinAttributor}.
26
- * @alpha
23
+ * @internal
27
24
  */
28
25
  export function createRuntimeAttributor() {
29
26
  return new RuntimeAttributor();
@@ -37,23 +34,9 @@ export function createRuntimeAttributor() {
37
34
  * IRuntimeAttributor is passed via scope to load a document that never previously had attribution information,
38
35
  * that attributor's `has` method will always return `false`.
39
36
  * @param Base - base class, inherits from FluidAttributorRuntime
40
- * @alpha
37
+ * @internal
41
38
  */
42
39
  export const mixinAttributor = (Base = ContainerRuntime) => class ContainerRuntimeWithAttributor extends Base {
43
- static async load(context, registryEntries, requestHandler, runtimeOptions = {}, containerScope = context.scope, existing, containerRuntimeCtor = ContainerRuntimeWithAttributor) {
44
- return this.loadRuntime({
45
- context,
46
- registryEntries,
47
- existing: existing ?? false,
48
- requestHandler,
49
- runtimeOptions,
50
- containerScope,
51
- containerRuntimeCtor,
52
- provideEntryPoint: async () => {
53
- throw new UsageError("ContainerRuntime.load is deprecated and should no longer be used");
54
- },
55
- });
56
- }
57
40
  static async loadRuntime(params) {
58
41
  var _a;
59
42
  const { context, registryEntries, existing, requestHandler, provideEntryPoint, runtimeOptions, containerScope, containerRuntimeCtor = ContainerRuntimeWithAttributor, } = params;
@@ -75,6 +58,8 @@ export const mixinAttributor = (Base = ContainerRuntime) => class ContainerRunti
75
58
  registryEntries,
76
59
  requestHandler,
77
60
  provideEntryPoint,
61
+ // ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0
62
+ initializeEntryPoint: provideEntryPoint,
78
63
  runtimeOptions,
79
64
  containerScope,
80
65
  existing,