@fluidframework/counter 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.216897

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,13 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-lint.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ // TODO: remove once base config has this enabled as an error
7
+ "ae-incompatible-release-tags": {
8
+ "logLevel": "error",
9
+ "addToApiReportFile": false
10
+ }
11
+ }
12
+ }
13
+ }
@@ -15,19 +15,19 @@ import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
15
15
  import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
16
16
  import { SharedObject } from '@fluidframework/shared-object-base';
17
17
 
18
- // @public
18
+ // @internal
19
19
  export interface ISharedCounter extends ISharedObject<ISharedCounterEvents> {
20
20
  increment(incrementAmount: number): void;
21
21
  value: number;
22
22
  }
23
23
 
24
- // @public
24
+ // @internal
25
25
  export interface ISharedCounterEvents extends ISharedObjectEvents {
26
26
  // @eventProperty
27
27
  (event: "incremented", listener: (incrementAmount: number, newValue: number) => void): any;
28
28
  }
29
29
 
30
- // @public
30
+ // @internal
31
31
  export class SharedCounter extends SharedObject<ISharedCounterEvents> implements ISharedCounter {
32
32
  constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
33
33
  // (undocumented)
@@ -5,149 +5,30 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
 
8
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
9
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
10
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
11
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
12
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
13
8
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
14
- import { ISharedObject } from '@fluidframework/shared-object-base';
15
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
16
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
17
- import { SharedObject } from '@fluidframework/shared-object-base';
18
9
 
19
- /**
20
- * A shared object that holds a number that can be incremented or decremented.
21
- *
22
- * @remarks Note that `SharedCounter` only operates on integer values. This is validated at runtime.
23
- *
24
- * @example Creating a `SharedCounter`
25
- *
26
- * First, get the factory and call {@link @fluidframework/datastore-definitions#IChannelFactory.create}
27
- * with a runtime and string ID:
28
- *
29
- * ```typescript
30
- * const factory = SharedCounter.getFactory();
31
- * const counter = factory.create(this.runtime, id) as SharedCounter;
32
- * ```
33
- *
34
- * The initial value of a new `SharedCounter` is 0.
35
- * If you wish to initialize the counter to a different value, you may call {@link SharedCounter.increment} before
36
- * attaching the Container, or before inserting it into an existing shared object.
37
- *
38
- * @example Using the `SharedCounter`
39
- *
40
- * Once created, you can call {@link SharedCounter.increment} to modify the value with either a positive or
41
- * negative number:
42
- *
43
- * ```typescript
44
- * counter.increment(10); // add 10 to the counter value
45
- * counter.increment(-5); // subtract 5 from the counter value
46
- * ```
47
- *
48
- * To observe changes to the value (including those from remote clients), register for the
49
- * {@link ISharedCounterEvents | incremented} event:
50
- *
51
- * ```typescript
52
- * counter.on("incremented", (incrementAmount, newValue) => {
53
- * console.log(`The counter incremented by ${incrementAmount} and now has a value of ${newValue}`);
54
- * });
55
- * ```
56
- *
57
- * @public
58
- */
59
- export declare interface ISharedCounter extends ISharedObject<ISharedCounterEvents> {
60
- /**
61
- * The counter value.
62
- *
63
- * @remarks Must be a whole number.
64
- */
65
- value: number;
66
- /**
67
- * Increments or decrements the value.
68
- * Must only increment or decrement by a whole number value.
69
- *
70
- * @param incrementAmount - A whole number to increment or decrement by.
71
- */
72
- increment(incrementAmount: number): void;
73
- }
10
+ /* Excluded from this release type: IChannelAttributes */
74
11
 
75
- /**
76
- * Events sent by {@link SharedCounter}.
77
- *
78
- * @public
79
- */
80
- export declare interface ISharedCounterEvents extends ISharedObjectEvents {
81
- /**
82
- * This event is raised when the counter is incremented or decremented.
83
- *
84
- * @param event - The event name.
85
- * @param listener - An event listener.
86
- *
87
- * @eventProperty
88
- */
89
- (event: "incremented", listener: (incrementAmount: number, newValue: number) => void): any;
90
- }
12
+ /* Excluded from this release type: IChannelFactory */
91
13
 
92
- /**
93
- * {@inheritDoc ISharedCounter}
94
- *
95
- * @public
96
- */
97
- export declare class SharedCounter extends SharedObject<ISharedCounterEvents> implements ISharedCounter {
98
- /**
99
- * Create a new {@link SharedCounter}.
100
- *
101
- * @param runtime - The data store runtime to which the new `SharedCounter` will belong.
102
- * @param id - Optional name of the `SharedCounter`. If not provided, one will be generated.
103
- *
104
- * @returns newly create shared counter (but not attached yet)
105
- */
106
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedCounter;
107
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
108
- /**
109
- * Get a factory for {@link SharedCounter} to register with the data store.
110
- *
111
- * @returns a factory that creates and load SharedCounter
112
- */
113
- static getFactory(): IChannelFactory;
114
- private _value;
115
- /**
116
- * {@inheritDoc ISharedCounter.value}
117
- */
118
- get value(): number;
119
- /**
120
- * {@inheritDoc ISharedCounter.increment}
121
- */
122
- increment(incrementAmount: number): void;
123
- private incrementCore;
124
- /**
125
- * Create a summary for the counter.
126
- *
127
- * @returns The summary of the current state of the counter.
128
- */
129
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
130
- /**
131
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
132
- */
133
- protected loadCore(storage: IChannelStorageService): Promise<void>;
134
- /**
135
- * Called when the object has disconnected from the delta stream.
136
- */
137
- protected onDisconnect(): void;
138
- /**
139
- * Process a counter operation (op).
140
- *
141
- * @param message - The message to prepare.
142
- * @param local - Whether or not the message was sent by the local client.
143
- * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
144
- * For messages from a remote client, this will be `undefined`.
145
- */
146
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
147
- /**
148
- * {@inheritdoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
149
- */
150
- protected applyStashedOp(op: unknown): void;
151
- }
14
+ /* Excluded from this release type: IChannelStorageService */
15
+
16
+ /* Excluded from this release type: IFluidDataStoreRuntime */
17
+
18
+ /* Excluded from this release type: IFluidSerializer */
19
+
20
+ /* Excluded from this release type: ISharedCounter */
21
+
22
+ /* Excluded from this release type: ISharedCounterEvents */
23
+
24
+ /* Excluded from this release type: ISharedObject */
25
+
26
+ /* Excluded from this release type: ISharedObjectEvents */
27
+
28
+ /* Excluded from this release type: ISummaryTreeWithStats */
29
+
30
+ /* Excluded from this release type: SharedCounter */
31
+
32
+ /* Excluded from this release type: SharedObject */
152
33
 
153
34
  export { }
@@ -5,149 +5,30 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
 
8
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
9
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
10
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
11
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
12
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
13
8
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
14
- import { ISharedObject } from '@fluidframework/shared-object-base';
15
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
16
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
17
- import { SharedObject } from '@fluidframework/shared-object-base';
18
9
 
19
- /**
20
- * A shared object that holds a number that can be incremented or decremented.
21
- *
22
- * @remarks Note that `SharedCounter` only operates on integer values. This is validated at runtime.
23
- *
24
- * @example Creating a `SharedCounter`
25
- *
26
- * First, get the factory and call {@link @fluidframework/datastore-definitions#IChannelFactory.create}
27
- * with a runtime and string ID:
28
- *
29
- * ```typescript
30
- * const factory = SharedCounter.getFactory();
31
- * const counter = factory.create(this.runtime, id) as SharedCounter;
32
- * ```
33
- *
34
- * The initial value of a new `SharedCounter` is 0.
35
- * If you wish to initialize the counter to a different value, you may call {@link SharedCounter.increment} before
36
- * attaching the Container, or before inserting it into an existing shared object.
37
- *
38
- * @example Using the `SharedCounter`
39
- *
40
- * Once created, you can call {@link SharedCounter.increment} to modify the value with either a positive or
41
- * negative number:
42
- *
43
- * ```typescript
44
- * counter.increment(10); // add 10 to the counter value
45
- * counter.increment(-5); // subtract 5 from the counter value
46
- * ```
47
- *
48
- * To observe changes to the value (including those from remote clients), register for the
49
- * {@link ISharedCounterEvents | incremented} event:
50
- *
51
- * ```typescript
52
- * counter.on("incremented", (incrementAmount, newValue) => {
53
- * console.log(`The counter incremented by ${incrementAmount} and now has a value of ${newValue}`);
54
- * });
55
- * ```
56
- *
57
- * @public
58
- */
59
- export declare interface ISharedCounter extends ISharedObject<ISharedCounterEvents> {
60
- /**
61
- * The counter value.
62
- *
63
- * @remarks Must be a whole number.
64
- */
65
- value: number;
66
- /**
67
- * Increments or decrements the value.
68
- * Must only increment or decrement by a whole number value.
69
- *
70
- * @param incrementAmount - A whole number to increment or decrement by.
71
- */
72
- increment(incrementAmount: number): void;
73
- }
10
+ /* Excluded from this release type: IChannelAttributes */
74
11
 
75
- /**
76
- * Events sent by {@link SharedCounter}.
77
- *
78
- * @public
79
- */
80
- export declare interface ISharedCounterEvents extends ISharedObjectEvents {
81
- /**
82
- * This event is raised when the counter is incremented or decremented.
83
- *
84
- * @param event - The event name.
85
- * @param listener - An event listener.
86
- *
87
- * @eventProperty
88
- */
89
- (event: "incremented", listener: (incrementAmount: number, newValue: number) => void): any;
90
- }
12
+ /* Excluded from this release type: IChannelFactory */
91
13
 
92
- /**
93
- * {@inheritDoc ISharedCounter}
94
- *
95
- * @public
96
- */
97
- export declare class SharedCounter extends SharedObject<ISharedCounterEvents> implements ISharedCounter {
98
- /**
99
- * Create a new {@link SharedCounter}.
100
- *
101
- * @param runtime - The data store runtime to which the new `SharedCounter` will belong.
102
- * @param id - Optional name of the `SharedCounter`. If not provided, one will be generated.
103
- *
104
- * @returns newly create shared counter (but not attached yet)
105
- */
106
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedCounter;
107
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
108
- /**
109
- * Get a factory for {@link SharedCounter} to register with the data store.
110
- *
111
- * @returns a factory that creates and load SharedCounter
112
- */
113
- static getFactory(): IChannelFactory;
114
- private _value;
115
- /**
116
- * {@inheritDoc ISharedCounter.value}
117
- */
118
- get value(): number;
119
- /**
120
- * {@inheritDoc ISharedCounter.increment}
121
- */
122
- increment(incrementAmount: number): void;
123
- private incrementCore;
124
- /**
125
- * Create a summary for the counter.
126
- *
127
- * @returns The summary of the current state of the counter.
128
- */
129
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
130
- /**
131
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
132
- */
133
- protected loadCore(storage: IChannelStorageService): Promise<void>;
134
- /**
135
- * Called when the object has disconnected from the delta stream.
136
- */
137
- protected onDisconnect(): void;
138
- /**
139
- * Process a counter operation (op).
140
- *
141
- * @param message - The message to prepare.
142
- * @param local - Whether or not the message was sent by the local client.
143
- * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
144
- * For messages from a remote client, this will be `undefined`.
145
- */
146
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
147
- /**
148
- * {@inheritdoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
149
- */
150
- protected applyStashedOp(op: unknown): void;
151
- }
14
+ /* Excluded from this release type: IChannelStorageService */
15
+
16
+ /* Excluded from this release type: IFluidDataStoreRuntime */
17
+
18
+ /* Excluded from this release type: IFluidSerializer */
19
+
20
+ /* Excluded from this release type: ISharedCounter */
21
+
22
+ /* Excluded from this release type: ISharedCounterEvents */
23
+
24
+ /* Excluded from this release type: ISharedObject */
25
+
26
+ /* Excluded from this release type: ISharedObjectEvents */
27
+
28
+ /* Excluded from this release type: ISummaryTreeWithStats */
29
+
30
+ /* Excluded from this release type: SharedCounter */
31
+
32
+ /* Excluded from this release type: SharedObject */
152
33
 
153
34
  export { }
@@ -5,149 +5,30 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
 
8
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
9
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
10
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
11
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
12
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
13
8
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
14
- import { ISharedObject } from '@fluidframework/shared-object-base';
15
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
16
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
17
- import { SharedObject } from '@fluidframework/shared-object-base';
18
9
 
19
- /**
20
- * A shared object that holds a number that can be incremented or decremented.
21
- *
22
- * @remarks Note that `SharedCounter` only operates on integer values. This is validated at runtime.
23
- *
24
- * @example Creating a `SharedCounter`
25
- *
26
- * First, get the factory and call {@link @fluidframework/datastore-definitions#IChannelFactory.create}
27
- * with a runtime and string ID:
28
- *
29
- * ```typescript
30
- * const factory = SharedCounter.getFactory();
31
- * const counter = factory.create(this.runtime, id) as SharedCounter;
32
- * ```
33
- *
34
- * The initial value of a new `SharedCounter` is 0.
35
- * If you wish to initialize the counter to a different value, you may call {@link SharedCounter.increment} before
36
- * attaching the Container, or before inserting it into an existing shared object.
37
- *
38
- * @example Using the `SharedCounter`
39
- *
40
- * Once created, you can call {@link SharedCounter.increment} to modify the value with either a positive or
41
- * negative number:
42
- *
43
- * ```typescript
44
- * counter.increment(10); // add 10 to the counter value
45
- * counter.increment(-5); // subtract 5 from the counter value
46
- * ```
47
- *
48
- * To observe changes to the value (including those from remote clients), register for the
49
- * {@link ISharedCounterEvents | incremented} event:
50
- *
51
- * ```typescript
52
- * counter.on("incremented", (incrementAmount, newValue) => {
53
- * console.log(`The counter incremented by ${incrementAmount} and now has a value of ${newValue}`);
54
- * });
55
- * ```
56
- *
57
- * @public
58
- */
59
- export declare interface ISharedCounter extends ISharedObject<ISharedCounterEvents> {
60
- /**
61
- * The counter value.
62
- *
63
- * @remarks Must be a whole number.
64
- */
65
- value: number;
66
- /**
67
- * Increments or decrements the value.
68
- * Must only increment or decrement by a whole number value.
69
- *
70
- * @param incrementAmount - A whole number to increment or decrement by.
71
- */
72
- increment(incrementAmount: number): void;
73
- }
10
+ /* Excluded from this release type: IChannelAttributes */
74
11
 
75
- /**
76
- * Events sent by {@link SharedCounter}.
77
- *
78
- * @public
79
- */
80
- export declare interface ISharedCounterEvents extends ISharedObjectEvents {
81
- /**
82
- * This event is raised when the counter is incremented or decremented.
83
- *
84
- * @param event - The event name.
85
- * @param listener - An event listener.
86
- *
87
- * @eventProperty
88
- */
89
- (event: "incremented", listener: (incrementAmount: number, newValue: number) => void): any;
90
- }
12
+ /* Excluded from this release type: IChannelFactory */
91
13
 
92
- /**
93
- * {@inheritDoc ISharedCounter}
94
- *
95
- * @public
96
- */
97
- export declare class SharedCounter extends SharedObject<ISharedCounterEvents> implements ISharedCounter {
98
- /**
99
- * Create a new {@link SharedCounter}.
100
- *
101
- * @param runtime - The data store runtime to which the new `SharedCounter` will belong.
102
- * @param id - Optional name of the `SharedCounter`. If not provided, one will be generated.
103
- *
104
- * @returns newly create shared counter (but not attached yet)
105
- */
106
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedCounter;
107
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
108
- /**
109
- * Get a factory for {@link SharedCounter} to register with the data store.
110
- *
111
- * @returns a factory that creates and load SharedCounter
112
- */
113
- static getFactory(): IChannelFactory;
114
- private _value;
115
- /**
116
- * {@inheritDoc ISharedCounter.value}
117
- */
118
- get value(): number;
119
- /**
120
- * {@inheritDoc ISharedCounter.increment}
121
- */
122
- increment(incrementAmount: number): void;
123
- private incrementCore;
124
- /**
125
- * Create a summary for the counter.
126
- *
127
- * @returns The summary of the current state of the counter.
128
- */
129
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
130
- /**
131
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
132
- */
133
- protected loadCore(storage: IChannelStorageService): Promise<void>;
134
- /**
135
- * Called when the object has disconnected from the delta stream.
136
- */
137
- protected onDisconnect(): void;
138
- /**
139
- * Process a counter operation (op).
140
- *
141
- * @param message - The message to prepare.
142
- * @param local - Whether or not the message was sent by the local client.
143
- * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
144
- * For messages from a remote client, this will be `undefined`.
145
- */
146
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
147
- /**
148
- * {@inheritdoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
149
- */
150
- protected applyStashedOp(op: unknown): void;
151
- }
14
+ /* Excluded from this release type: IChannelStorageService */
15
+
16
+ /* Excluded from this release type: IFluidDataStoreRuntime */
17
+
18
+ /* Excluded from this release type: IFluidSerializer */
19
+
20
+ /* Excluded from this release type: ISharedCounter */
21
+
22
+ /* Excluded from this release type: ISharedCounterEvents */
23
+
24
+ /* Excluded from this release type: ISharedObject */
25
+
26
+ /* Excluded from this release type: ISharedObjectEvents */
27
+
28
+ /* Excluded from this release type: ISummaryTreeWithStats */
29
+
30
+ /* Excluded from this release type: SharedCounter */
31
+
32
+ /* Excluded from this release type: SharedObject */
152
33
 
153
34
  export { }
@@ -53,8 +53,7 @@ import { SharedObject } from '@fluidframework/shared-object-base';
53
53
  * console.log(`The counter incremented by ${incrementAmount} and now has a value of ${newValue}`);
54
54
  * });
55
55
  * ```
56
- *
57
- * @public
56
+ * @internal
58
57
  */
59
58
  export declare interface ISharedCounter extends ISharedObject<ISharedCounterEvents> {
60
59
  /**
@@ -74,8 +73,7 @@ export declare interface ISharedCounter extends ISharedObject<ISharedCounterEven
74
73
 
75
74
  /**
76
75
  * Events sent by {@link SharedCounter}.
77
- *
78
- * @public
76
+ * @internal
79
77
  */
80
78
  export declare interface ISharedCounterEvents extends ISharedObjectEvents {
81
79
  /**
@@ -91,8 +89,7 @@ export declare interface ISharedCounterEvents extends ISharedObjectEvents {
91
89
 
92
90
  /**
93
91
  * {@inheritDoc ISharedCounter}
94
- *
95
- * @public
92
+ * @internal
96
93
  */
97
94
  export declare class SharedCounter extends SharedObject<ISharedCounterEvents> implements ISharedCounter {
98
95
  /**
package/dist/counter.cjs CHANGED
@@ -13,8 +13,7 @@ const counterFactory_1 = require("./counterFactory.cjs");
13
13
  const snapshotFileName = "header";
14
14
  /**
15
15
  * {@inheritDoc ISharedCounter}
16
- *
17
- * @public
16
+ * @internal
18
17
  */
19
18
  class SharedCounter extends shared_object_base_1.SharedObject {
20
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"counter.cjs","sourceRoot":"","sources":["../src/counter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,+EAAmG;AAOnG,+DAA4D;AAE5D,2EAI4C;AAC5C,yDAAkD;AAqBlD,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC;;;;GAIG;AACH,MAAa,aAAc,SAAQ,iCAAkC;IACpE;;;;;;;OAOG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,+BAAc,CAAC,IAAI,CAAkB,CAAC;IACxE,CAAC;IAED,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B;QAE9B,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAY1C,WAAM,GAAW,CAAC,CAAC;IAX3B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,+BAAc,EAAE,CAAC;IAC7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I,CAAC,KAAK,EAAE;YACrD,MAAM,EAAE,GAAG,OAAO,CAAC,QAA+B,CAAC;YAEnD,QAAQ,EAAE,CAAC,IAAI,EAAE;gBAChB,KAAK,WAAW,CAAC,CAAC;oBACjB,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC;oBACvC,MAAM;iBACN;gBAED,OAAO,CAAC,CAAC;oBACR,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;iBACrC;aACD;SACD;IACF,CAAC;IAED;;OAEG;IACO,cAAc,CAAC,EAAW;QACnC,MAAM,SAAS,GAAG,EAAyB,CAAC;QAE5C,yDAAyD;QAEzD,4DAA4D;QAC5D,IAAA,mBAAM,EAAC,SAAS,CAAC,IAAI,KAAK,WAAW,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAE7E,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC/C,CAAC;CACD;AAvID,sCAuIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { type ISequencedDocumentMessage, MessageType } from \"@fluidframework/protocol-definitions\";\nimport {\n\ttype IFluidDataStoreRuntime,\n\ttype IChannelStorageService,\n\ttype IChannelFactory,\n\ttype IChannelAttributes,\n} from \"@fluidframework/datastore-definitions\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport { type ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\ttype IFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\nimport { CounterFactory } from \"./counterFactory\";\nimport { type ISharedCounter, type ISharedCounterEvents } from \"./interfaces\";\n\n/**\n * Describes the operation (op) format for incrementing the {@link SharedCounter}.\n */\ninterface IIncrementOperation {\n\ttype: \"increment\";\n\tincrementAmount: number;\n}\n\n/**\n * @remarks Used in snapshotting.\n */\ninterface ICounterSnapshotFormat {\n\t/**\n\t * The value of the counter.\n\t */\n\tvalue: number;\n}\n\nconst snapshotFileName = \"header\";\n\n/**\n * {@inheritDoc ISharedCounter}\n *\n * @public\n */\nexport class SharedCounter extends SharedObject<ISharedCounterEvents> implements ISharedCounter {\n\t/**\n\t * Create a new {@link SharedCounter}.\n\t *\n\t * @param runtime - The data store runtime to which the new `SharedCounter` will belong.\n\t * @param id - Optional name of the `SharedCounter`. If not provided, one will be generated.\n\t *\n\t * @returns newly create shared counter (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string): SharedCounter {\n\t\treturn runtime.createChannel(id, CounterFactory.Type) as SharedCounter;\n\t}\n\n\tpublic constructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_counter_\");\n\t}\n\n\t/**\n\t * Get a factory for {@link SharedCounter} to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedCounter\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new CounterFactory();\n\t}\n\n\tprivate _value: number = 0;\n\n\t/**\n\t * {@inheritDoc ISharedCounter.value}\n\t */\n\tpublic get value(): number {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedCounter.increment}\n\t */\n\tpublic increment(incrementAmount: number): void {\n\t\t// Incrementing by floating point numbers will be eventually inconsistent, since the order in which the\n\t\t// increments are applied affects the result. A more-robust solution would be required to support this.\n\t\tif (incrementAmount % 1 !== 0) {\n\t\t\tthrow new Error(\"Must increment by a whole number\");\n\t\t}\n\n\t\tconst op: IIncrementOperation = {\n\t\t\ttype: \"increment\",\n\t\t\tincrementAmount,\n\t\t};\n\n\t\tthis.incrementCore(incrementAmount);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\tprivate incrementCore(incrementAmount: number): void {\n\t\tthis._value += incrementAmount;\n\t\tthis.emit(\"incremented\", incrementAmount, this._value);\n\t}\n\n\t/**\n\t * Create a summary for the counter.\n\t *\n\t * @returns The summary of the current state of the counter.\n\t */\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\t// Get a serializable form of data\n\t\tconst content: ICounterSnapshotFormat = {\n\t\t\tvalue: this.value,\n\t\t};\n\n\t\t// And then construct the summary for it\n\t\treturn createSingleBlobSummary(snapshotFileName, JSON.stringify(content));\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}\n\t */\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst content = await readAndParse<ICounterSnapshotFormat>(storage, snapshotFileName);\n\n\t\tthis._value = content.value;\n\t}\n\n\t/**\n\t * Called when the object has disconnected from the delta stream.\n\t */\n\tprotected onDisconnect(): void {}\n\n\t/**\n\t * Process a counter operation (op).\n\t *\n\t * @param message - The message to prepare.\n\t * @param local - Whether or not the message was sent by the local client.\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be `undefined`.\n\t */\n\tprotected processCore(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison\n\t\tif (message.type === MessageType.Operation && !local) {\n\t\t\tconst op = message.contents as IIncrementOperation;\n\n\t\t\tswitch (op.type) {\n\t\t\t\tcase \"increment\": {\n\t\t\t\t\tthis.incrementCore(op.incrementAmount);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault: {\n\t\t\t\t\tthrow new Error(\"Unknown operation\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritdoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}\n\t */\n\tprotected applyStashedOp(op: unknown): void {\n\t\tconst counterOp = op as IIncrementOperation;\n\n\t\t// TODO: Clean up error code linter violations repo-wide.\n\n\t\t// eslint-disable-next-line unicorn/numeric-separators-style\n\t\tassert(counterOp.type === \"increment\", 0x3ec /* Op type is not increment */);\n\n\t\tthis.incrementCore(counterOp.incrementAmount);\n\t}\n}\n"]}
1
+ {"version":3,"file":"counter.cjs","sourceRoot":"","sources":["../src/counter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,+EAAmG;AAOnG,+DAA4D;AAE5D,2EAI4C;AAC5C,yDAAkD;AAqBlD,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC;;;GAGG;AACH,MAAa,aAAc,SAAQ,iCAAkC;IACpE;;;;;;;OAOG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,+BAAc,CAAC,IAAI,CAAkB,CAAC;IACxE,CAAC;IAED,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B;QAE9B,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAY1C,WAAM,GAAW,CAAC,CAAC;IAX3B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,+BAAc,EAAE,CAAC;IAC7B,CAAC;IAID;;OAEG;IACH,IAAW,KAAK;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAED;;OAEG;IACI,SAAS,CAAC,eAAuB;QACvC,uGAAuG;QACvG,wGAAwG;QACxG,IAAI,eAAe,GAAG,CAAC,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;SACpD;QAED,MAAM,EAAE,GAAwB;YAC/B,IAAI,EAAE,WAAW;YACjB,eAAe;SACf,CAAC;QAEF,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QACpC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IA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C5D,IAAA,mBAAM,EAAC,SAAS,CAAC,IAAI,KAAK,WAAW,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAE7E,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC/C,CAAC;CACD;AAvID,sCAuIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { type ISequencedDocumentMessage, MessageType } from \"@fluidframework/protocol-definitions\";\nimport {\n\ttype IFluidDataStoreRuntime,\n\ttype IChannelStorageService,\n\ttype IChannelFactory,\n\ttype IChannelAttributes,\n} from \"@fluidframework/datastore-definitions\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport { type ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\ttype IFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\nimport { CounterFactory } from \"./counterFactory\";\nimport { type ISharedCounter, type ISharedCounterEvents } from \"./interfaces\";\n\n/**\n * Describes the operation (op) format for incrementing the {@link SharedCounter}.\n */\ninterface IIncrementOperation {\n\ttype: \"increment\";\n\tincrementAmount: number;\n}\n\n/**\n * @remarks Used in snapshotting.\n */\ninterface ICounterSnapshotFormat {\n\t/**\n\t * The value of the counter.\n\t */\n\tvalue: number;\n}\n\nconst snapshotFileName = \"header\";\n\n/**\n * {@inheritDoc ISharedCounter}\n * @internal\n */\nexport class SharedCounter extends SharedObject<ISharedCounterEvents> implements ISharedCounter {\n\t/**\n\t * Create a new {@link SharedCounter}.\n\t *\n\t * @param runtime - The data store runtime to which the new `SharedCounter` will belong.\n\t * @param id - Optional name of the `SharedCounter`. If not provided, one will be generated.\n\t *\n\t * @returns newly create shared counter (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string): SharedCounter {\n\t\treturn runtime.createChannel(id, CounterFactory.Type) as SharedCounter;\n\t}\n\n\tpublic constructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_counter_\");\n\t}\n\n\t/**\n\t * Get a factory for {@link SharedCounter} to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedCounter\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new CounterFactory();\n\t}\n\n\tprivate _value: number = 0;\n\n\t/**\n\t * {@inheritDoc ISharedCounter.value}\n\t */\n\tpublic get value(): number {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedCounter.increment}\n\t */\n\tpublic increment(incrementAmount: number): void {\n\t\t// Incrementing by floating point numbers will be eventually inconsistent, since the order in which the\n\t\t// increments are applied affects the result. A more-robust solution would be required to support this.\n\t\tif (incrementAmount % 1 !== 0) {\n\t\t\tthrow new Error(\"Must increment by a whole number\");\n\t\t}\n\n\t\tconst op: IIncrementOperation = {\n\t\t\ttype: \"increment\",\n\t\t\tincrementAmount,\n\t\t};\n\n\t\tthis.incrementCore(incrementAmount);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\tprivate incrementCore(incrementAmount: number): void {\n\t\tthis._value += incrementAmount;\n\t\tthis.emit(\"incremented\", incrementAmount, this._value);\n\t}\n\n\t/**\n\t * Create a summary for the counter.\n\t *\n\t * @returns The summary of the current state of the counter.\n\t */\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\t// Get a serializable form of data\n\t\tconst content: ICounterSnapshotFormat = {\n\t\t\tvalue: this.value,\n\t\t};\n\n\t\t// And then construct the summary for it\n\t\treturn createSingleBlobSummary(snapshotFileName, JSON.stringify(content));\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}\n\t */\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst content = await readAndParse<ICounterSnapshotFormat>(storage, snapshotFileName);\n\n\t\tthis._value = content.value;\n\t}\n\n\t/**\n\t * Called when the object has disconnected from the delta stream.\n\t */\n\tprotected onDisconnect(): void {}\n\n\t/**\n\t * Process a counter operation (op).\n\t *\n\t * @param message - The message to prepare.\n\t * @param local - Whether or not the message was sent by the local client.\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be `undefined`.\n\t */\n\tprotected processCore(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison\n\t\tif (message.type === MessageType.Operation && !local) {\n\t\t\tconst op = message.contents as IIncrementOperation;\n\n\t\t\tswitch (op.type) {\n\t\t\t\tcase \"increment\": {\n\t\t\t\t\tthis.incrementCore(op.incrementAmount);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault: {\n\t\t\t\t\tthrow new Error(\"Unknown operation\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritdoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}\n\t */\n\tprotected applyStashedOp(op: unknown): void {\n\t\tconst counterOp = op as IIncrementOperation;\n\n\t\t// TODO: Clean up error code linter violations repo-wide.\n\n\t\t// eslint-disable-next-line unicorn/numeric-separators-style\n\t\tassert(counterOp.type === \"increment\", 0x3ec /* Op type is not increment */);\n\n\t\tthis.incrementCore(counterOp.incrementAmount);\n\t}\n}\n"]}
package/dist/counter.d.ts CHANGED
@@ -9,8 +9,7 @@ import { type IFluidSerializer, SharedObject } from "@fluidframework/shared-obje
9
9
  import { type ISharedCounter, type ISharedCounterEvents } from "./interfaces";
10
10
  /**
11
11
  * {@inheritDoc ISharedCounter}
12
- *
13
- * @public
12
+ * @internal
14
13
  */
15
14
  export declare class SharedCounter extends SharedObject<ISharedCounterEvents> implements ISharedCounter {
16
15
  /**
@@ -1 +1 @@
1
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