@fluidframework/core-interfaces 2.0.0-internal.7.0.0 → 2.0.0-internal.7.2.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 +8 -0
- package/api-extractor.json +9 -1
- package/api-report/core-interfaces.api.md +514 -0
- package/dist/error.d.ts +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/error.d.ts +1 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/logger.d.ts +1 -1
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js.map +1 -1
- package/package.json +11 -12
- package/src/error.ts +1 -1
- package/src/logger.ts +1 -1
package/CHANGELOG.md
CHANGED
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "@fluidframework/build-common/api-extractor-
|
|
3
|
+
"extends": "@fluidframework/build-common/api-extractor-base.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
"ae-missing-release-tag": {
|
|
7
|
+
// TODO: Fix violations and remove this rule override
|
|
8
|
+
"logLevel": "none"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
4
12
|
}
|
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
## API Report File for "@fluidframework/core-interfaces"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// @public
|
|
8
|
+
export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
|
|
9
|
+
|
|
10
|
+
// @public
|
|
11
|
+
export const FluidErrorTypes: {
|
|
12
|
+
readonly genericError: "genericError";
|
|
13
|
+
readonly throttlingError: "throttlingError";
|
|
14
|
+
readonly dataCorruptionError: "dataCorruptionError";
|
|
15
|
+
readonly dataProcessingError: "dataProcessingError";
|
|
16
|
+
readonly usageError: "usageError";
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
|
|
21
|
+
|
|
22
|
+
// @public
|
|
23
|
+
export type FluidObject<T = unknown> = {
|
|
24
|
+
[P in FluidObjectProviderKeys<T>]?: T[P];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// @public
|
|
28
|
+
export type FluidObjectKeys<T> = keyof FluidObject<T>;
|
|
29
|
+
|
|
30
|
+
// @public
|
|
31
|
+
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
|
|
32
|
+
|
|
33
|
+
// @public
|
|
34
|
+
export interface IDisposable {
|
|
35
|
+
dispose(error?: Error): void;
|
|
36
|
+
readonly disposed: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// @public
|
|
40
|
+
export interface IErrorBase extends Partial<Error> {
|
|
41
|
+
readonly errorType: string;
|
|
42
|
+
getTelemetryProperties?(): ITelemetryBaseProperties;
|
|
43
|
+
readonly message: string;
|
|
44
|
+
readonly name?: string;
|
|
45
|
+
readonly stack?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// @public
|
|
49
|
+
export interface IErrorEvent extends IEvent {
|
|
50
|
+
// @eventProperty
|
|
51
|
+
(event: "error", listener: (message: any) => void): any;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// @public
|
|
55
|
+
export interface IEvent {
|
|
56
|
+
// @eventProperty
|
|
57
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// @public
|
|
61
|
+
export interface IEventProvider<TEvent extends IEvent> {
|
|
62
|
+
readonly off: IEventTransformer<this, TEvent>;
|
|
63
|
+
readonly on: IEventTransformer<this, TEvent>;
|
|
64
|
+
readonly once: IEventTransformer<this, TEvent>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// @public
|
|
68
|
+
export type IEventThisPlaceHolder = {
|
|
69
|
+
thisPlaceHolder: "thisPlaceHolder";
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// @public
|
|
73
|
+
export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
|
|
74
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
75
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
76
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
77
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
78
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
79
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
80
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
81
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
82
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
83
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
84
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
85
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
86
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
87
|
+
(event: infer E13, listener: (...args: infer A13) => void): any;
|
|
88
|
+
(event: infer E14, listener: (...args: infer A14) => void): any;
|
|
89
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
90
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> & TransformedEvent<TThis, E14, A14> : TEvent extends {
|
|
91
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
92
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
93
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
94
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
95
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
96
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
97
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
98
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
99
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
100
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
101
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
102
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
103
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
104
|
+
(event: infer E13, listener: (...args: infer A13) => void): any;
|
|
105
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
106
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> & TransformedEvent<TThis, E13, A13> : TEvent extends {
|
|
107
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
108
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
109
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
110
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
111
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
112
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
113
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
114
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
115
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
116
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
117
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
118
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
119
|
+
(event: infer E12, listener: (...args: infer A12) => void): any;
|
|
120
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
121
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> & TransformedEvent<TThis, E12, A12> : TEvent extends {
|
|
122
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
123
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
124
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
125
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
126
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
127
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
128
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
129
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
130
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
131
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
132
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
133
|
+
(event: infer E11, listener: (...args: infer A11) => void): any;
|
|
134
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
135
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> & TransformedEvent<TThis, E11, A11> : TEvent extends {
|
|
136
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
137
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
138
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
139
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
140
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
141
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
142
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
143
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
144
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
145
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
146
|
+
(event: infer E10, listener: (...args: infer A10) => void): any;
|
|
147
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
148
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> & TransformedEvent<TThis, E10, A10> : TEvent extends {
|
|
149
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
150
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
151
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
152
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
153
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
154
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
155
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
156
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
157
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
158
|
+
(event: infer E9, listener: (...args: infer A9) => void): any;
|
|
159
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
160
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> & TransformedEvent<TThis, E9, A9> : TEvent extends {
|
|
161
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
162
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
163
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
164
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
165
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
166
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
167
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
168
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
169
|
+
(event: infer E8, listener: (...args: infer A8) => void): any;
|
|
170
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
171
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> & TransformedEvent<TThis, E8, A8> : TEvent extends {
|
|
172
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
173
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
174
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
175
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
176
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
177
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
178
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
179
|
+
(event: infer E7, listener: (...args: infer A7) => void): any;
|
|
180
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
181
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> & TransformedEvent<TThis, E7, A7> : TEvent extends {
|
|
182
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
183
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
184
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
185
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
186
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
187
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
188
|
+
(event: infer E6, listener: (...args: infer A6) => void): any;
|
|
189
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
190
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> & TransformedEvent<TThis, E6, A6> : TEvent extends {
|
|
191
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
192
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
193
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
194
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
195
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
196
|
+
(event: infer E5, listener: (...args: infer A5) => void): any;
|
|
197
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
198
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> & TransformedEvent<TThis, E5, A5> : TEvent extends {
|
|
199
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
200
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
201
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
202
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
203
|
+
(event: infer E4, listener: (...args: infer A4) => void): any;
|
|
204
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
205
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> & TransformedEvent<TThis, E4, A4> : TEvent extends {
|
|
206
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
207
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
208
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
209
|
+
(event: infer E3, listener: (...args: infer A3) => void): any;
|
|
210
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
211
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> & TransformedEvent<TThis, E3, A3> : TEvent extends {
|
|
212
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
213
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
214
|
+
(event: infer E2, listener: (...args: infer A2) => void): any;
|
|
215
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
216
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> & TransformedEvent<TThis, E2, A2> : TEvent extends {
|
|
217
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
218
|
+
(event: infer E1, listener: (...args: infer A1) => void): any;
|
|
219
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
220
|
+
} ? TransformedEvent<TThis, E0, A0> & TransformedEvent<TThis, E1, A1> : TEvent extends {
|
|
221
|
+
(event: infer E0, listener: (...args: infer A0) => void): any;
|
|
222
|
+
(event: string, listener: (...args: any[]) => void): any;
|
|
223
|
+
} ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
|
|
224
|
+
|
|
225
|
+
// @public @deprecated
|
|
226
|
+
export interface IFluidCodeDetails {
|
|
227
|
+
readonly config?: IFluidCodeDetailsConfig;
|
|
228
|
+
readonly package: string | Readonly<IFluidPackage>;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// @public @deprecated (undocumented)
|
|
232
|
+
export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
233
|
+
|
|
234
|
+
// @public @deprecated
|
|
235
|
+
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
236
|
+
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
|
|
237
|
+
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// @public @deprecated
|
|
241
|
+
export interface IFluidCodeDetailsConfig {
|
|
242
|
+
// (undocumented)
|
|
243
|
+
readonly [key: string]: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// @public (undocumented)
|
|
247
|
+
export const IFluidHandle: keyof IProvideFluidHandle;
|
|
248
|
+
|
|
249
|
+
// @public
|
|
250
|
+
export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
|
|
251
|
+
// @deprecated (undocumented)
|
|
252
|
+
readonly absolutePath: string;
|
|
253
|
+
// @deprecated (undocumented)
|
|
254
|
+
attachGraph(): void;
|
|
255
|
+
// @deprecated (undocumented)
|
|
256
|
+
bind(handle: IFluidHandle): void;
|
|
257
|
+
get(): Promise<T>;
|
|
258
|
+
readonly isAttached: boolean;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// @public (undocumented)
|
|
262
|
+
export const IFluidHandleContext: keyof IProvideFluidHandleContext;
|
|
263
|
+
|
|
264
|
+
// @public
|
|
265
|
+
export interface IFluidHandleContext extends IProvideFluidHandleContext {
|
|
266
|
+
readonly absolutePath: string;
|
|
267
|
+
attachGraph(): void;
|
|
268
|
+
readonly isAttached: boolean;
|
|
269
|
+
// (undocumented)
|
|
270
|
+
resolveHandle(request: IRequest): Promise<IResponse>;
|
|
271
|
+
readonly routeContext?: IFluidHandleContext;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// @public (undocumented)
|
|
275
|
+
export const IFluidLoadable: keyof IProvideFluidLoadable;
|
|
276
|
+
|
|
277
|
+
// @public
|
|
278
|
+
export interface IFluidLoadable extends IProvideFluidLoadable {
|
|
279
|
+
// (undocumented)
|
|
280
|
+
handle: IFluidHandle;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// @public @deprecated
|
|
284
|
+
export interface IFluidPackage {
|
|
285
|
+
[key: string]: unknown;
|
|
286
|
+
fluid: {
|
|
287
|
+
[environment: string]: undefined | IFluidPackageEnvironment;
|
|
288
|
+
};
|
|
289
|
+
name: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// @public @deprecated
|
|
293
|
+
export interface IFluidPackageEnvironment {
|
|
294
|
+
[target: string]: undefined | {
|
|
295
|
+
files: string[];
|
|
296
|
+
[key: string]: unknown;
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// @public @deprecated (undocumented)
|
|
301
|
+
export const IFluidRouter: keyof IProvideFluidRouter;
|
|
302
|
+
|
|
303
|
+
// @public @deprecated (undocumented)
|
|
304
|
+
export interface IFluidRouter extends IProvideFluidRouter {
|
|
305
|
+
// (undocumented)
|
|
306
|
+
request(request: IRequest): Promise<IResponse>;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// @public (undocumented)
|
|
310
|
+
export const IFluidRunnable: keyof IProvideFluidRunnable;
|
|
311
|
+
|
|
312
|
+
// @public (undocumented)
|
|
313
|
+
export interface IFluidRunnable {
|
|
314
|
+
// (undocumented)
|
|
315
|
+
run(...args: any[]): Promise<void>;
|
|
316
|
+
// (undocumented)
|
|
317
|
+
stop(reason?: string): void;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// @public
|
|
321
|
+
export interface IGenericError extends IErrorBase {
|
|
322
|
+
// (undocumented)
|
|
323
|
+
error?: any;
|
|
324
|
+
readonly errorType: typeof FluidErrorTypes.genericError;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// @public
|
|
328
|
+
export interface ILoggingError extends Error {
|
|
329
|
+
getTelemetryProperties(): ITelemetryBaseProperties;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// @public @deprecated (undocumented)
|
|
333
|
+
export interface IProvideFluidCodeDetailsComparer {
|
|
334
|
+
// (undocumented)
|
|
335
|
+
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// @public (undocumented)
|
|
339
|
+
export interface IProvideFluidHandle {
|
|
340
|
+
// (undocumented)
|
|
341
|
+
readonly IFluidHandle: IFluidHandle;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// @public (undocumented)
|
|
345
|
+
export interface IProvideFluidHandleContext {
|
|
346
|
+
// (undocumented)
|
|
347
|
+
readonly IFluidHandleContext: IFluidHandleContext;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// @public (undocumented)
|
|
351
|
+
export interface IProvideFluidLoadable {
|
|
352
|
+
// (undocumented)
|
|
353
|
+
readonly IFluidLoadable: IFluidLoadable;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// @public @deprecated
|
|
357
|
+
export interface IProvideFluidRouter {
|
|
358
|
+
// (undocumented)
|
|
359
|
+
readonly IFluidRouter: IFluidRouter;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// @public (undocumented)
|
|
363
|
+
export interface IProvideFluidRunnable {
|
|
364
|
+
// (undocumented)
|
|
365
|
+
readonly IFluidRunnable: IFluidRunnable;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// @public (undocumented)
|
|
369
|
+
export interface IRequest {
|
|
370
|
+
// (undocumented)
|
|
371
|
+
headers?: IRequestHeader;
|
|
372
|
+
// (undocumented)
|
|
373
|
+
url: string;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// @public (undocumented)
|
|
377
|
+
export interface IRequestHeader {
|
|
378
|
+
// (undocumented)
|
|
379
|
+
[index: string]: any;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// @public (undocumented)
|
|
383
|
+
export interface IResponse {
|
|
384
|
+
// (undocumented)
|
|
385
|
+
headers?: {
|
|
386
|
+
[key: string]: any;
|
|
387
|
+
};
|
|
388
|
+
// (undocumented)
|
|
389
|
+
mimeType: string;
|
|
390
|
+
// (undocumented)
|
|
391
|
+
stack?: string;
|
|
392
|
+
// (undocumented)
|
|
393
|
+
status: number;
|
|
394
|
+
// (undocumented)
|
|
395
|
+
value: any;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// @public @deprecated (undocumented)
|
|
399
|
+
export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
400
|
+
|
|
401
|
+
// @public @deprecated
|
|
402
|
+
export const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
|
|
403
|
+
|
|
404
|
+
// @public @deprecated (undocumented)
|
|
405
|
+
export interface ITaggedTelemetryPropertyType {
|
|
406
|
+
// (undocumented)
|
|
407
|
+
tag: string;
|
|
408
|
+
// (undocumented)
|
|
409
|
+
value: TelemetryEventPropertyType;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// @public
|
|
413
|
+
export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
414
|
+
// (undocumented)
|
|
415
|
+
category: string;
|
|
416
|
+
// (undocumented)
|
|
417
|
+
eventName: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// @public
|
|
421
|
+
export interface ITelemetryBaseLogger {
|
|
422
|
+
// (undocumented)
|
|
423
|
+
minLogLevel?: LogLevel;
|
|
424
|
+
// (undocumented)
|
|
425
|
+
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// @public
|
|
429
|
+
export type ITelemetryBaseProperties = ITelemetryProperties;
|
|
430
|
+
|
|
431
|
+
// @public @deprecated
|
|
432
|
+
export interface ITelemetryErrorEvent extends ITelemetryProperties {
|
|
433
|
+
// (undocumented)
|
|
434
|
+
eventName: string;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// @public @deprecated
|
|
438
|
+
export interface ITelemetryGenericEvent extends ITelemetryProperties {
|
|
439
|
+
// (undocumented)
|
|
440
|
+
category?: TelemetryEventCategory;
|
|
441
|
+
// (undocumented)
|
|
442
|
+
eventName: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// @public @deprecated
|
|
446
|
+
export interface ITelemetryLogger extends ITelemetryBaseLogger {
|
|
447
|
+
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
|
|
448
|
+
sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
|
|
449
|
+
sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
|
|
450
|
+
sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// @public @deprecated
|
|
454
|
+
export interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
|
|
455
|
+
// (undocumented)
|
|
456
|
+
duration?: number;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// @public @deprecated
|
|
460
|
+
export interface ITelemetryProperties {
|
|
461
|
+
// (undocumented)
|
|
462
|
+
[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// @public
|
|
466
|
+
export interface IThrottlingWarning extends IErrorBase {
|
|
467
|
+
readonly errorType: typeof FluidErrorTypes.throttlingError;
|
|
468
|
+
// (undocumented)
|
|
469
|
+
readonly retryAfterSeconds: number;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// @public
|
|
473
|
+
export interface IUsageError extends IErrorBase {
|
|
474
|
+
readonly errorType: typeof FluidErrorTypes.usageError;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// @public
|
|
478
|
+
export const LogLevel: {
|
|
479
|
+
readonly verbose: 10;
|
|
480
|
+
readonly default: 20;
|
|
481
|
+
readonly error: 30;
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
// @public
|
|
485
|
+
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
486
|
+
|
|
487
|
+
// @public
|
|
488
|
+
export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
|
|
489
|
+
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
|
|
490
|
+
} : L;
|
|
491
|
+
|
|
492
|
+
// @public
|
|
493
|
+
export interface Tagged<V, T extends string = string> {
|
|
494
|
+
// (undocumented)
|
|
495
|
+
tag: T;
|
|
496
|
+
// (undocumented)
|
|
497
|
+
value: V;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// @public
|
|
501
|
+
export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
|
|
502
|
+
|
|
503
|
+
// @public @deprecated
|
|
504
|
+
export type TelemetryEventCategory = "generic" | "error" | "performance";
|
|
505
|
+
|
|
506
|
+
// @public @deprecated
|
|
507
|
+
export type TelemetryEventPropertyType = string | number | boolean | undefined;
|
|
508
|
+
|
|
509
|
+
// @public
|
|
510
|
+
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
|
|
511
|
+
|
|
512
|
+
// (No @packageDocumentation comment for this package)
|
|
513
|
+
|
|
514
|
+
```
|
package/dist/error.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const FluidErrorTypes: {
|
|
|
28
28
|
*/
|
|
29
29
|
readonly usageError: "usageError";
|
|
30
30
|
};
|
|
31
|
-
export type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
|
|
31
|
+
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
|
|
32
32
|
/**
|
|
33
33
|
* Base interface for all errors and warnings emitted the container.
|
|
34
34
|
*
|
package/dist/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;A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AS,EAAE,OAAO,eAAe,CAAC,UAAU,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACrD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,eAAe,CAAC;IAC3D,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC"}
|
package/dist/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseProperties } from \"./index\";\n\n/**\n * Error types the Fluid Framework may report.\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n} as const;\nexport type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseProperties } from \"./index\";\n\n/**\n * Error types the Fluid Framework may report.\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n} as const;\nexport type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n"]}
|
package/dist/logger.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export declare const LogLevel: {
|
|
|
75
75
|
/**
|
|
76
76
|
* Specify a level to the log to filter out logs based on the level.
|
|
77
77
|
*/
|
|
78
|
-
export type LogLevel = typeof LogLevel[keyof typeof LogLevel];
|
|
78
|
+
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
79
79
|
/**
|
|
80
80
|
* Interface to output telemetry events.
|
|
81
81
|
* Implemented by hosting app / loader
|
package/dist/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/E;;;;;;GAMG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM;IACnD,KAAK,EAAE,CAAC,CAAC;IACT,GAAG,EAAE,CAAC,CAAC;CACP;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC5C,KAAK,EAAE,0BAA0B,CAAC;IAClC,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC,CAAC,KAAK,EAAE,MAAM,GAAG,0BAA0B,GAAG,MAAM,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B,KAAK,EAAE,0BAA0B,EAGjC,KAAK,CAAC,EAAE,GAAG,EACX,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC,OAAO,GAAG,OAAO,QAAQ,CAAC,OAAO,GAC1D,IAAI,CAAC;CACR"}
|
package/dist/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwEH;;GAEG;AACU,QAAA,QAAQ,GAAG;IACvB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE,EAAE,iBAAiB;CACnB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Examples of known categories, however category can be any string for extensibility.\n *\n * @deprecated Moved to \\@fluidframework/telemetry-utils package\n */\nexport type TelemetryEventCategory = \"generic\" | \"error\" | \"performance\";\n\n/**\n * Property types that can be logged.\n *\n * @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can\n * easily add fields to objects that shouldn't be logged and not realize it's going to be logged.\n * General best practice is to explicitly log the fields you care about from objects.\n */\nexport type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;\n\n/**\n * {@inheritDoc TelemetryBaseEventPropertyType}\n *\n * @deprecated Renamed to {@link TelemetryBaseEventPropertyType}\n */\nexport type TelemetryEventPropertyType = string | number | boolean | undefined;\n\n/**\n * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.\n * This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).\n *\n * This indicates that the value should be organized or handled differently by loggers in various first or third\n * party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.\n */\nexport interface Tagged<V, T extends string = string> {\n\tvalue: V;\n\ttag: T;\n}\n\n/**\n * @see {@link Tagged} for info on tagging\n *\n * @deprecated Use Tagged\\<TelemetryBaseEventPropertyType\\>\n */\nexport interface ITaggedTelemetryPropertyType {\n\tvalue: TelemetryEventPropertyType;\n\ttag: string;\n}\n\n/**\n * JSON-serializable properties, which will be logged with telemetry.\n */\nexport type ITelemetryBaseProperties = ITelemetryProperties;\n\n/**\n * {@inheritDoc ITelemetryBaseProperties}\n *\n * @deprecated Renamed to {@link ITelemetryBaseProperties}\n */\nexport interface ITelemetryProperties {\n\t[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;\n}\n\n/**\n * Base interface for logging telemetry statements.\n * Can contain any number of properties that get serialized as json payload.\n * @param category - category of the event, like \"error\", \"performance\", \"generic\", etc.\n * @param eventName - name of the event.\n */\nexport interface ITelemetryBaseEvent extends ITelemetryBaseProperties {\n\tcategory: string;\n\teventName: string;\n}\n\n/**\n * Specify levels of the logs.\n */\nexport const LogLevel = {\n\tverbose: 10, // To log any verbose event for example when you are debugging something.\n\tdefault: 20, // Default log level\n\terror: 30, // To log errors.\n} as const;\n\n/**\n * Specify a level to the log to filter out logs based on the level.\n */\nexport type LogLevel = typeof LogLevel[keyof typeof LogLevel];\n\n/**\n * Interface to output telemetry events.\n * Implemented by hosting app / loader\n */\nexport interface ITelemetryBaseLogger {\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\tminLogLevel?: LogLevel;\n}\n\n/**\n * Informational (non-error) telemetry event\n * Maps to category = \"generic\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryGenericEvent extends ITelemetryProperties {\n\teventName: string;\n\tcategory?: TelemetryEventCategory;\n}\n\n/**\n * Error telemetry event.\n * Maps to category = \"error\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryErrorEvent extends ITelemetryProperties {\n\teventName: string;\n}\n\n/**\n * Performance telemetry event.\n * Maps to category = \"performance\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {\n\tduration?: number; // Duration of event (optional)\n}\n\n/**\n * An error object that supports exporting its properties to be logged to telemetry\n */\nexport interface ILoggingError extends Error {\n\t/**\n\t * Return all properties from this object that should be logged to telemetry\n\t */\n\tgetTelemetryProperties(): ITelemetryBaseProperties;\n}\n\n/**\n * ITelemetryLogger interface contains various helper telemetry methods,\n * encoding in one place schemas for various types of Fluid telemetry events.\n * Creates sub-logger that appends properties to all events\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryLogger extends ITelemetryBaseLogger {\n\t/**\n\t * Actual implementation that sends telemetry event\n\t * Implemented by derived classes\n\t * @param event - Telemetry event to send over\n\t * @param logLevel - optional level of the log.\n\t */\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\t/**\n\t * Send information telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendTelemetryEvent(\n\t\tevent: ITelemetryGenericEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n\n\t/**\n\t * Send error telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;\n\n\t/**\n\t * Send performance telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendPerformanceEvent(\n\t\tevent: ITelemetryPerformanceEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwEH;;GAEG;AACU,QAAA,QAAQ,GAAG;IACvB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE,EAAE,iBAAiB;CACnB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Examples of known categories, however category can be any string for extensibility.\n *\n * @deprecated Moved to \\@fluidframework/telemetry-utils package\n */\nexport type TelemetryEventCategory = \"generic\" | \"error\" | \"performance\";\n\n/**\n * Property types that can be logged.\n *\n * @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can\n * easily add fields to objects that shouldn't be logged and not realize it's going to be logged.\n * General best practice is to explicitly log the fields you care about from objects.\n */\nexport type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;\n\n/**\n * {@inheritDoc TelemetryBaseEventPropertyType}\n *\n * @deprecated Renamed to {@link TelemetryBaseEventPropertyType}\n */\nexport type TelemetryEventPropertyType = string | number | boolean | undefined;\n\n/**\n * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.\n * This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).\n *\n * This indicates that the value should be organized or handled differently by loggers in various first or third\n * party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.\n */\nexport interface Tagged<V, T extends string = string> {\n\tvalue: V;\n\ttag: T;\n}\n\n/**\n * @see {@link Tagged} for info on tagging\n *\n * @deprecated Use Tagged\\<TelemetryBaseEventPropertyType\\>\n */\nexport interface ITaggedTelemetryPropertyType {\n\tvalue: TelemetryEventPropertyType;\n\ttag: string;\n}\n\n/**\n * JSON-serializable properties, which will be logged with telemetry.\n */\nexport type ITelemetryBaseProperties = ITelemetryProperties;\n\n/**\n * {@inheritDoc ITelemetryBaseProperties}\n *\n * @deprecated Renamed to {@link ITelemetryBaseProperties}\n */\nexport interface ITelemetryProperties {\n\t[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;\n}\n\n/**\n * Base interface for logging telemetry statements.\n * Can contain any number of properties that get serialized as json payload.\n * @param category - category of the event, like \"error\", \"performance\", \"generic\", etc.\n * @param eventName - name of the event.\n */\nexport interface ITelemetryBaseEvent extends ITelemetryBaseProperties {\n\tcategory: string;\n\teventName: string;\n}\n\n/**\n * Specify levels of the logs.\n */\nexport const LogLevel = {\n\tverbose: 10, // To log any verbose event for example when you are debugging something.\n\tdefault: 20, // Default log level\n\terror: 30, // To log errors.\n} as const;\n\n/**\n * Specify a level to the log to filter out logs based on the level.\n */\nexport type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];\n\n/**\n * Interface to output telemetry events.\n * Implemented by hosting app / loader\n */\nexport interface ITelemetryBaseLogger {\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\tminLogLevel?: LogLevel;\n}\n\n/**\n * Informational (non-error) telemetry event\n * Maps to category = \"generic\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryGenericEvent extends ITelemetryProperties {\n\teventName: string;\n\tcategory?: TelemetryEventCategory;\n}\n\n/**\n * Error telemetry event.\n * Maps to category = \"error\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryErrorEvent extends ITelemetryProperties {\n\teventName: string;\n}\n\n/**\n * Performance telemetry event.\n * Maps to category = \"performance\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {\n\tduration?: number; // Duration of event (optional)\n}\n\n/**\n * An error object that supports exporting its properties to be logged to telemetry\n */\nexport interface ILoggingError extends Error {\n\t/**\n\t * Return all properties from this object that should be logged to telemetry\n\t */\n\tgetTelemetryProperties(): ITelemetryBaseProperties;\n}\n\n/**\n * ITelemetryLogger interface contains various helper telemetry methods,\n * encoding in one place schemas for various types of Fluid telemetry events.\n * Creates sub-logger that appends properties to all events\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryLogger extends ITelemetryBaseLogger {\n\t/**\n\t * Actual implementation that sends telemetry event\n\t * Implemented by derived classes\n\t * @param event - Telemetry event to send over\n\t * @param logLevel - optional level of the log.\n\t */\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\t/**\n\t * Send information telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendTelemetryEvent(\n\t\tevent: ITelemetryGenericEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n\n\t/**\n\t * Send error telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;\n\n\t/**\n\t * Send performance telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendPerformanceEvent(\n\t\tevent: ITelemetryPerformanceEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n}\n"]}
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib/error.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const FluidErrorTypes: {
|
|
|
28
28
|
*/
|
|
29
29
|
readonly usageError: "usageError";
|
|
30
30
|
};
|
|
31
|
-
export type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
|
|
31
|
+
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
|
|
32
32
|
/**
|
|
33
33
|
* Base interface for all errors and warnings emitted the container.
|
|
34
34
|
*
|
package/lib/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEM,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEM,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC;IACjD;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;;;;OAQG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,sBAAsB,CAAC,IAAI,wBAAwB,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAChD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,YAAY,CAAC;IAIxD,KAAK,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC9C;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,UAAU,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACrD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,eAAe,CAAC;IAC3D,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC"}
|
package/lib/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseProperties } from \"./index\";\n\n/**\n * Error types the Fluid Framework may report.\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n} as const;\nexport type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseProperties } from \"./index\";\n\n/**\n * Error types the Fluid Framework may report.\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n} as const;\nexport type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n"]}
|
package/lib/logger.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export declare const LogLevel: {
|
|
|
75
75
|
/**
|
|
76
76
|
* Specify a level to the log to filter out logs based on the level.
|
|
77
77
|
*/
|
|
78
|
-
export type LogLevel = typeof LogLevel[keyof typeof LogLevel];
|
|
78
|
+
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
79
79
|
/**
|
|
80
80
|
* Interface to output telemetry events.
|
|
81
81
|
* Implemented by hosting app / loader
|
package/lib/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;AAE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,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC3C;;OAEG;IACH,sBAAsB,IAAI,wBAAwB,CAAC;CACnD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC7D;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE5D;;;;;OAKG;IACH,kBAAkB,CACjB,KAAK,EAAE,sBAAsB,EAG7B,KAAK,CAAC,EAAE,GAAG,EACX,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC,OAAO,GAAG,OAAO,QAAQ,CAAC,OAAO,GAC1D,IAAI,CAAC;IAER;;;;OAIG;IAEH,cAAc,CAAC,KAAK,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IAE/D;;;;;OAKG;IACH,oBAAoB,CACnB,KAAK,EAAE,0BAA0B,EAGjC,KAAK,CAAC,EAAE,GAAG,EACX,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC,OAAO,GAAG,OAAO,QAAQ,CAAC,OAAO,GAC1D,IAAI,CAAC;CACR"}
|
package/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwEH;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE,EAAE,iBAAiB;CACnB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Examples of known categories, however category can be any string for extensibility.\n *\n * @deprecated Moved to \\@fluidframework/telemetry-utils package\n */\nexport type TelemetryEventCategory = \"generic\" | \"error\" | \"performance\";\n\n/**\n * Property types that can be logged.\n *\n * @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can\n * easily add fields to objects that shouldn't be logged and not realize it's going to be logged.\n * General best practice is to explicitly log the fields you care about from objects.\n */\nexport type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;\n\n/**\n * {@inheritDoc TelemetryBaseEventPropertyType}\n *\n * @deprecated Renamed to {@link TelemetryBaseEventPropertyType}\n */\nexport type TelemetryEventPropertyType = string | number | boolean | undefined;\n\n/**\n * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.\n * This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).\n *\n * This indicates that the value should be organized or handled differently by loggers in various first or third\n * party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.\n */\nexport interface Tagged<V, T extends string = string> {\n\tvalue: V;\n\ttag: T;\n}\n\n/**\n * @see {@link Tagged} for info on tagging\n *\n * @deprecated Use Tagged\\<TelemetryBaseEventPropertyType\\>\n */\nexport interface ITaggedTelemetryPropertyType {\n\tvalue: TelemetryEventPropertyType;\n\ttag: string;\n}\n\n/**\n * JSON-serializable properties, which will be logged with telemetry.\n */\nexport type ITelemetryBaseProperties = ITelemetryProperties;\n\n/**\n * {@inheritDoc ITelemetryBaseProperties}\n *\n * @deprecated Renamed to {@link ITelemetryBaseProperties}\n */\nexport interface ITelemetryProperties {\n\t[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;\n}\n\n/**\n * Base interface for logging telemetry statements.\n * Can contain any number of properties that get serialized as json payload.\n * @param category - category of the event, like \"error\", \"performance\", \"generic\", etc.\n * @param eventName - name of the event.\n */\nexport interface ITelemetryBaseEvent extends ITelemetryBaseProperties {\n\tcategory: string;\n\teventName: string;\n}\n\n/**\n * Specify levels of the logs.\n */\nexport const LogLevel = {\n\tverbose: 10, // To log any verbose event for example when you are debugging something.\n\tdefault: 20, // Default log level\n\terror: 30, // To log errors.\n} as const;\n\n/**\n * Specify a level to the log to filter out logs based on the level.\n */\nexport type LogLevel = typeof LogLevel[keyof typeof LogLevel];\n\n/**\n * Interface to output telemetry events.\n * Implemented by hosting app / loader\n */\nexport interface ITelemetryBaseLogger {\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\tminLogLevel?: LogLevel;\n}\n\n/**\n * Informational (non-error) telemetry event\n * Maps to category = \"generic\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryGenericEvent extends ITelemetryProperties {\n\teventName: string;\n\tcategory?: TelemetryEventCategory;\n}\n\n/**\n * Error telemetry event.\n * Maps to category = \"error\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryErrorEvent extends ITelemetryProperties {\n\teventName: string;\n}\n\n/**\n * Performance telemetry event.\n * Maps to category = \"performance\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {\n\tduration?: number; // Duration of event (optional)\n}\n\n/**\n * An error object that supports exporting its properties to be logged to telemetry\n */\nexport interface ILoggingError extends Error {\n\t/**\n\t * Return all properties from this object that should be logged to telemetry\n\t */\n\tgetTelemetryProperties(): ITelemetryBaseProperties;\n}\n\n/**\n * ITelemetryLogger interface contains various helper telemetry methods,\n * encoding in one place schemas for various types of Fluid telemetry events.\n * Creates sub-logger that appends properties to all events\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryLogger extends ITelemetryBaseLogger {\n\t/**\n\t * Actual implementation that sends telemetry event\n\t * Implemented by derived classes\n\t * @param event - Telemetry event to send over\n\t * @param logLevel - optional level of the log.\n\t */\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\t/**\n\t * Send information telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendTelemetryEvent(\n\t\tevent: ITelemetryGenericEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n\n\t/**\n\t * Send error telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;\n\n\t/**\n\t * Send performance telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendPerformanceEvent(\n\t\tevent: ITelemetryPerformanceEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwEH;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE,EAAE,iBAAiB;CACnB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Examples of known categories, however category can be any string for extensibility.\n *\n * @deprecated Moved to \\@fluidframework/telemetry-utils package\n */\nexport type TelemetryEventCategory = \"generic\" | \"error\" | \"performance\";\n\n/**\n * Property types that can be logged.\n *\n * @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can\n * easily add fields to objects that shouldn't be logged and not realize it's going to be logged.\n * General best practice is to explicitly log the fields you care about from objects.\n */\nexport type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;\n\n/**\n * {@inheritDoc TelemetryBaseEventPropertyType}\n *\n * @deprecated Renamed to {@link TelemetryBaseEventPropertyType}\n */\nexport type TelemetryEventPropertyType = string | number | boolean | undefined;\n\n/**\n * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.\n * This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).\n *\n * This indicates that the value should be organized or handled differently by loggers in various first or third\n * party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.\n */\nexport interface Tagged<V, T extends string = string> {\n\tvalue: V;\n\ttag: T;\n}\n\n/**\n * @see {@link Tagged} for info on tagging\n *\n * @deprecated Use Tagged\\<TelemetryBaseEventPropertyType\\>\n */\nexport interface ITaggedTelemetryPropertyType {\n\tvalue: TelemetryEventPropertyType;\n\ttag: string;\n}\n\n/**\n * JSON-serializable properties, which will be logged with telemetry.\n */\nexport type ITelemetryBaseProperties = ITelemetryProperties;\n\n/**\n * {@inheritDoc ITelemetryBaseProperties}\n *\n * @deprecated Renamed to {@link ITelemetryBaseProperties}\n */\nexport interface ITelemetryProperties {\n\t[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;\n}\n\n/**\n * Base interface for logging telemetry statements.\n * Can contain any number of properties that get serialized as json payload.\n * @param category - category of the event, like \"error\", \"performance\", \"generic\", etc.\n * @param eventName - name of the event.\n */\nexport interface ITelemetryBaseEvent extends ITelemetryBaseProperties {\n\tcategory: string;\n\teventName: string;\n}\n\n/**\n * Specify levels of the logs.\n */\nexport const LogLevel = {\n\tverbose: 10, // To log any verbose event for example when you are debugging something.\n\tdefault: 20, // Default log level\n\terror: 30, // To log errors.\n} as const;\n\n/**\n * Specify a level to the log to filter out logs based on the level.\n */\nexport type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];\n\n/**\n * Interface to output telemetry events.\n * Implemented by hosting app / loader\n */\nexport interface ITelemetryBaseLogger {\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\tminLogLevel?: LogLevel;\n}\n\n/**\n * Informational (non-error) telemetry event\n * Maps to category = \"generic\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryGenericEvent extends ITelemetryProperties {\n\teventName: string;\n\tcategory?: TelemetryEventCategory;\n}\n\n/**\n * Error telemetry event.\n * Maps to category = \"error\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryErrorEvent extends ITelemetryProperties {\n\teventName: string;\n}\n\n/**\n * Performance telemetry event.\n * Maps to category = \"performance\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {\n\tduration?: number; // Duration of event (optional)\n}\n\n/**\n * An error object that supports exporting its properties to be logged to telemetry\n */\nexport interface ILoggingError extends Error {\n\t/**\n\t * Return all properties from this object that should be logged to telemetry\n\t */\n\tgetTelemetryProperties(): ITelemetryBaseProperties;\n}\n\n/**\n * ITelemetryLogger interface contains various helper telemetry methods,\n * encoding in one place schemas for various types of Fluid telemetry events.\n * Creates sub-logger that appends properties to all events\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryLogger extends ITelemetryBaseLogger {\n\t/**\n\t * Actual implementation that sends telemetry event\n\t * Implemented by derived classes\n\t * @param event - Telemetry event to send over\n\t * @param logLevel - optional level of the log.\n\t */\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\t/**\n\t * Send information telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendTelemetryEvent(\n\t\tevent: ITelemetryGenericEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n\n\t/**\n\t * Send error telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;\n\n\t/**\n\t * Send performance telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendPerformanceEvent(\n\t\tevent: ITelemetryPerformanceEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/core-interfaces",
|
|
3
|
-
"version": "2.0.0-internal.7.
|
|
3
|
+
"version": "2.0.0-internal.7.2.0",
|
|
4
4
|
"description": "Fluid object interfaces",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -15,16 +15,15 @@
|
|
|
15
15
|
"module": "lib/index.js",
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@fluid-tools/build-cli": "^0.
|
|
19
|
-
"@fluidframework/build-common": "^2.0.
|
|
20
|
-
"@fluidframework/build-tools": "^0.
|
|
21
|
-
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.0.0-internal.
|
|
22
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
18
|
+
"@fluid-tools/build-cli": "^0.26.1",
|
|
19
|
+
"@fluidframework/build-common": "^2.0.3",
|
|
20
|
+
"@fluidframework/build-tools": "^0.26.1",
|
|
21
|
+
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.0.0-internal.7.1.0",
|
|
22
|
+
"@fluidframework/eslint-config-fluid": "^3.0.0",
|
|
23
23
|
"@microsoft/api-extractor": "^7.37.0",
|
|
24
24
|
"@types/node": "^16.18.38",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"prettier": "~2.6.2",
|
|
25
|
+
"eslint": "~8.50.0",
|
|
26
|
+
"prettier": "~3.0.3",
|
|
28
27
|
"rimraf": "^4.4.0",
|
|
29
28
|
"typescript": "~5.1.6"
|
|
30
29
|
},
|
|
@@ -35,14 +34,14 @@
|
|
|
35
34
|
"build": "fluid-build . --task build",
|
|
36
35
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
37
36
|
"build:compile": "fluid-build . --task compile",
|
|
38
|
-
"build:docs": "api-extractor run --local
|
|
37
|
+
"build:docs": "api-extractor run --local",
|
|
39
38
|
"build:esnext": "tsc --project ./tsconfig.esnext.json",
|
|
40
39
|
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
41
40
|
"ci:build": "npm run build:compile",
|
|
42
|
-
"ci:build:docs": "api-extractor run
|
|
41
|
+
"ci:build:docs": "api-extractor run",
|
|
43
42
|
"ci:test": "echo No test for this package",
|
|
44
43
|
"ci:test:coverage": "echo No test for this package",
|
|
45
|
-
"clean": "rimraf --glob
|
|
44
|
+
"clean": "rimraf --glob dist lib \"*.tsbuildinfo\" \"*.build.log\" _api-extractor-temp",
|
|
46
45
|
"eslint": "eslint --format stylish src",
|
|
47
46
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
48
47
|
"format": "npm run prettier:fix",
|
package/src/error.ts
CHANGED
|
@@ -34,7 +34,7 @@ export const FluidErrorTypes = {
|
|
|
34
34
|
*/
|
|
35
35
|
usageError: "usageError",
|
|
36
36
|
} as const;
|
|
37
|
-
export type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
|
|
37
|
+
export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Base interface for all errors and warnings emitted the container.
|
package/src/logger.ts
CHANGED
|
@@ -85,7 +85,7 @@ export const LogLevel = {
|
|
|
85
85
|
/**
|
|
86
86
|
* Specify a level to the log to filter out logs based on the level.
|
|
87
87
|
*/
|
|
88
|
-
export type LogLevel = typeof LogLevel[keyof typeof LogLevel];
|
|
88
|
+
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Interface to output telemetry events.
|