@fluidframework/map 0.59.3003 → 0.59.4000
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/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +28 -8
- package/dist/directory.js.map +1 -1
- package/dist/interfaces.d.ts +64 -5
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +0 -1
- package/dist/map.js.map +1 -1
- package/dist/mapKernel.js +1 -1
- package/dist/mapKernel.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.js +28 -8
- package/lib/directory.js.map +1 -1
- package/lib/interfaces.d.ts +64 -5
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.js.map +1 -1
- package/lib/map.d.ts.map +1 -1
- package/lib/map.js +0 -1
- package/lib/map.js.map +1 -1
- package/lib/mapKernel.js +1 -1
- package/lib/mapKernel.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +17 -15
- package/src/directory.ts +35 -15
- package/src/interfaces.ts +82 -5
- package/src/map.ts +0 -1
- package/src/mapKernel.ts +1 -1
- package/src/packageVersion.ts +1 -1
package/src/interfaces.ts
CHANGED
|
@@ -112,7 +112,6 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
112
112
|
* (
|
|
113
113
|
* changed: IDirectoryValueChanged,
|
|
114
114
|
* local: boolean,
|
|
115
|
-
* op: ISequencedDocumentMessage | null,
|
|
116
115
|
* target: IEventThisPlaceHolder,
|
|
117
116
|
* ) => void
|
|
118
117
|
* ```
|
|
@@ -121,8 +120,6 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
121
120
|
*
|
|
122
121
|
* - `local` - Whether the change originated from the this client.
|
|
123
122
|
*
|
|
124
|
-
* - `op` - The op that caused the change in value.
|
|
125
|
-
*
|
|
126
123
|
* - `target` - The ISharedDirectory itself.
|
|
127
124
|
*
|
|
128
125
|
* ### "clear"
|
|
@@ -132,11 +129,39 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
132
129
|
* #### Listener signature
|
|
133
130
|
*
|
|
134
131
|
* ```typescript
|
|
135
|
-
* (local: boolean,
|
|
132
|
+
* (local: boolean, target: IEventThisPlaceHolder) => void
|
|
136
133
|
* ```
|
|
137
134
|
* - `local` - Whether the clear originated from the this client.
|
|
138
135
|
*
|
|
139
|
-
* - `
|
|
136
|
+
* - `target` - The ISharedDirectory itself.
|
|
137
|
+
*
|
|
138
|
+
* ### "subDirectoryCreated"
|
|
139
|
+
*
|
|
140
|
+
* The subDirectoryCreated event is emitted when a subdirectory is created.
|
|
141
|
+
*
|
|
142
|
+
* #### Listener signature
|
|
143
|
+
*
|
|
144
|
+
* ```typescript
|
|
145
|
+
* (path: string, local: boolean, target: IEventThisPlaceHolder) => void
|
|
146
|
+
* ```
|
|
147
|
+
* - `path` - The relative path to the key that is created.It is relative from the object which raises the event.
|
|
148
|
+
*
|
|
149
|
+
* - `local` - Whether the clear originated from the this client.
|
|
150
|
+
*
|
|
151
|
+
* - `target` - The ISharedDirectory itself.
|
|
152
|
+
*
|
|
153
|
+
* * ### "subDirectoryDeleted"
|
|
154
|
+
*
|
|
155
|
+
* The subDirectoryDeleted event is emitted when a subdirectory is deleted.
|
|
156
|
+
*
|
|
157
|
+
* #### Listener signature
|
|
158
|
+
*
|
|
159
|
+
* ```typescript
|
|
160
|
+
* (path: string, local: boolean, target: IEventThisPlaceHolder) => void
|
|
161
|
+
* ```
|
|
162
|
+
* - `path` - The relative path to the key that is deleted.It is relative from the object which raises the event.
|
|
163
|
+
*
|
|
164
|
+
* - `local` - Whether the clear originated from the this client.
|
|
140
165
|
*
|
|
141
166
|
* - `target` - The ISharedDirectory itself.
|
|
142
167
|
*/
|
|
@@ -150,6 +175,17 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
|
150
175
|
local: boolean,
|
|
151
176
|
target: IEventThisPlaceHolder,
|
|
152
177
|
) => void);
|
|
178
|
+
(event: "subDirectoryCreated", listener: (
|
|
179
|
+
path: string,
|
|
180
|
+
local: boolean,
|
|
181
|
+
target: IEventThisPlaceHolder,
|
|
182
|
+
) => void);
|
|
183
|
+
// eslint-disable-next-line @typescript-eslint/unified-signatures
|
|
184
|
+
(event: "subDirectoryDeleted", listener: (
|
|
185
|
+
path: string,
|
|
186
|
+
local: boolean,
|
|
187
|
+
target: IEventThisPlaceHolder,
|
|
188
|
+
) => void);
|
|
153
189
|
}
|
|
154
190
|
|
|
155
191
|
/**
|
|
@@ -169,7 +205,37 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
|
169
205
|
*
|
|
170
206
|
* - `local` - Whether the change originated from the this client.
|
|
171
207
|
*
|
|
208
|
+
*
|
|
172
209
|
* - `target` - The IDirectory itself.
|
|
210
|
+
* ### "subDirectoryCreated"
|
|
211
|
+
*
|
|
212
|
+
* The subDirectoryCreated event is emitted when a subdirectory is created.
|
|
213
|
+
*
|
|
214
|
+
* #### Listener signature
|
|
215
|
+
*
|
|
216
|
+
* ```typescript
|
|
217
|
+
* (path: string, local: boolean, target: IEventThisPlaceHolder) => void
|
|
218
|
+
* ```
|
|
219
|
+
* - `path` - The relative path to the key that is created. It is relative from the object which raises the event.
|
|
220
|
+
*
|
|
221
|
+
* - `local` - Whether the clear originated from the this client.
|
|
222
|
+
*
|
|
223
|
+
* - `target` - The ISharedDirectory itself.
|
|
224
|
+
*
|
|
225
|
+
* * ### "subDirectoryDeleted"
|
|
226
|
+
*
|
|
227
|
+
* The subDirectoryDeleted event is emitted when a subdirectory is deleted.
|
|
228
|
+
*
|
|
229
|
+
* #### Listener signature
|
|
230
|
+
*
|
|
231
|
+
* ```typescript
|
|
232
|
+
* (path: string, local: boolean, target: IEventThisPlaceHolder) => void
|
|
233
|
+
* ```
|
|
234
|
+
* - `path` - The relative path to the key that is deleted. It is relative from the object which raises the event.
|
|
235
|
+
*
|
|
236
|
+
* - `local` - Whether the clear originated from the this client.
|
|
237
|
+
*
|
|
238
|
+
* - `target` - The ISharedDirectory itself.
|
|
173
239
|
*
|
|
174
240
|
* ### "disposed"
|
|
175
241
|
*
|
|
@@ -189,6 +255,17 @@ export interface IDirectoryEvents extends IEvent {
|
|
|
189
255
|
local: boolean,
|
|
190
256
|
target: IEventThisPlaceHolder,
|
|
191
257
|
) => void);
|
|
258
|
+
(event: "subDirectoryCreated", listener: (
|
|
259
|
+
path: string,
|
|
260
|
+
local: boolean,
|
|
261
|
+
target: IEventThisPlaceHolder,
|
|
262
|
+
) => void);
|
|
263
|
+
// eslint-disable-next-line @typescript-eslint/unified-signatures
|
|
264
|
+
(event: "subDirectoryDeleted", listener: (
|
|
265
|
+
path: string,
|
|
266
|
+
local: boolean,
|
|
267
|
+
target: IEventThisPlaceHolder,
|
|
268
|
+
) => void);
|
|
192
269
|
(event: "disposed", listener: (
|
|
193
270
|
target: IEventThisPlaceHolder,
|
|
194
271
|
) => void);
|
package/src/map.ts
CHANGED
|
@@ -320,7 +320,6 @@ export class SharedMap extends SharedObject<ISharedMapEvents> implements IShared
|
|
|
320
320
|
* @internal
|
|
321
321
|
*/
|
|
322
322
|
protected async loadCore(storage: IChannelStorageService) {
|
|
323
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
324
323
|
const json = await readAndParse<object>(storage, snapshotFileName);
|
|
325
324
|
const newFormat = json as IMapSerializationFormat;
|
|
326
325
|
if (Array.isArray(newFormat.blobs)) {
|
package/src/mapKernel.ts
CHANGED
|
@@ -545,7 +545,7 @@ export class MapKernel {
|
|
|
545
545
|
// and don't process the op.
|
|
546
546
|
if (local) {
|
|
547
547
|
assert(localOpMetadata !== undefined,
|
|
548
|
-
0x014 /*
|
|
548
|
+
0x014 /* pendingMessageId is missing from the local client's operation */);
|
|
549
549
|
const pendingMessageId = localOpMetadata as number;
|
|
550
550
|
const pendingKeyMessageId = this.pendingKeys.get(op.key);
|
|
551
551
|
if (pendingKeyMessageId === pendingMessageId) {
|
package/src/packageVersion.ts
CHANGED