@fluidframework/map 1.0.0 → 1.1.0-76254
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.js +4 -4
- package/dist/directory.js.map +1 -1
- package/dist/interfaces.d.ts +13 -14
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/map.d.ts +5 -0
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +7 -0
- package/dist/map.js.map +1 -1
- package/dist/mapKernel.d.ts +20 -11
- package/dist/mapKernel.d.ts.map +1 -1
- package/dist/mapKernel.js +160 -82
- package/dist/mapKernel.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/directory.js +4 -4
- package/lib/directory.js.map +1 -1
- package/lib/interfaces.d.ts +13 -14
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.js.map +1 -1
- package/lib/map.d.ts +5 -0
- package/lib/map.d.ts.map +1 -1
- package/lib/map.js +7 -0
- package/lib/map.js.map +1 -1
- package/lib/mapKernel.d.ts +20 -11
- package/lib/mapKernel.d.ts.map +1 -1
- package/lib/mapKernel.js +160 -82
- package/lib/mapKernel.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +15 -15
- package/src/directory.ts +4 -4
- package/src/interfaces.ts +14 -16
- package/src/map.ts +8 -0
- package/src/mapKernel.ts +195 -90
- package/src/packageVersion.ts +1 -1
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/map\";\nexport const pkgVersion = \"1.1.0-76254\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/map",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0-76254",
|
|
4
4
|
"description": "Distributed map",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -62,24 +62,24 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
64
64
|
"@fluidframework/common-utils": "^0.32.1",
|
|
65
|
-
"@fluidframework/container-utils": "
|
|
66
|
-
"@fluidframework/core-interfaces": "
|
|
67
|
-
"@fluidframework/datastore-definitions": "
|
|
68
|
-
"@fluidframework/driver-utils": "
|
|
65
|
+
"@fluidframework/container-utils": "1.1.0-76254",
|
|
66
|
+
"@fluidframework/core-interfaces": "1.1.0-76254",
|
|
67
|
+
"@fluidframework/datastore-definitions": "1.1.0-76254",
|
|
68
|
+
"@fluidframework/driver-utils": "1.1.0-76254",
|
|
69
69
|
"@fluidframework/protocol-definitions": "^0.1028.2000",
|
|
70
|
-
"@fluidframework/runtime-definitions": "
|
|
71
|
-
"@fluidframework/runtime-utils": "
|
|
72
|
-
"@fluidframework/shared-object-base": "
|
|
70
|
+
"@fluidframework/runtime-definitions": "1.1.0-76254",
|
|
71
|
+
"@fluidframework/runtime-utils": "1.1.0-76254",
|
|
72
|
+
"@fluidframework/shared-object-base": "1.1.0-76254",
|
|
73
73
|
"path-browserify": "^1.0.1"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@fluid-internal/test-dds-utils": "
|
|
77
|
-
"@fluidframework/build-common": "^0.
|
|
78
|
-
"@fluidframework/build-tools": "^0.2.
|
|
76
|
+
"@fluid-internal/test-dds-utils": "1.1.0-76254",
|
|
77
|
+
"@fluidframework/build-common": "^0.24.0-0",
|
|
78
|
+
"@fluidframework/build-tools": "^0.2.74327",
|
|
79
79
|
"@fluidframework/eslint-config-fluid": "^0.28.2000",
|
|
80
|
-
"@fluidframework/map-previous": "npm:@fluidframework/map@^0.
|
|
81
|
-
"@fluidframework/mocha-test-setup": "
|
|
82
|
-
"@fluidframework/test-runtime-utils": "
|
|
80
|
+
"@fluidframework/map-previous": "npm:@fluidframework/map@^1.0.0",
|
|
81
|
+
"@fluidframework/mocha-test-setup": "1.1.0-76254",
|
|
82
|
+
"@fluidframework/test-runtime-utils": "1.1.0-76254",
|
|
83
83
|
"@microsoft/api-extractor": "^7.22.2",
|
|
84
84
|
"@rushstack/eslint-config": "^2.5.1",
|
|
85
85
|
"@types/mocha": "^9.1.1",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"typescript-formatter": "7.1.0"
|
|
96
96
|
},
|
|
97
97
|
"typeValidation": {
|
|
98
|
-
"version": "1.
|
|
98
|
+
"version": "1.1.0",
|
|
99
99
|
"broken": {}
|
|
100
100
|
}
|
|
101
101
|
}
|
package/src/directory.ts
CHANGED
|
@@ -1429,14 +1429,14 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1429
1429
|
return false;
|
|
1430
1430
|
}
|
|
1431
1431
|
|
|
1432
|
-
|
|
1432
|
+
const pendingKeyMessageId = this.pendingKeys.get(op.key);
|
|
1433
|
+
if (pendingKeyMessageId !== undefined) {
|
|
1433
1434
|
// Found an NACK op, clear it from the directory if the latest sequence number in the directory
|
|
1434
1435
|
// match the message's and don't process the op.
|
|
1435
1436
|
if (local) {
|
|
1436
1437
|
assert(localOpMetadata !== undefined,
|
|
1437
1438
|
0x011 /* pendingMessageId is missing from the local client's operation */);
|
|
1438
1439
|
const pendingMessageId = localOpMetadata as number;
|
|
1439
|
-
const pendingKeyMessageId = this.pendingKeys.get(op.key);
|
|
1440
1440
|
if (pendingKeyMessageId === pendingMessageId) {
|
|
1441
1441
|
this.pendingKeys.delete(op.key);
|
|
1442
1442
|
}
|
|
@@ -1463,12 +1463,12 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1463
1463
|
local: boolean,
|
|
1464
1464
|
localOpMetadata: unknown,
|
|
1465
1465
|
): boolean {
|
|
1466
|
-
|
|
1466
|
+
const pendingSubDirectoryMessageId = this.pendingSubDirectories.get(op.subdirName);
|
|
1467
|
+
if (pendingSubDirectoryMessageId !== undefined) {
|
|
1467
1468
|
if (local) {
|
|
1468
1469
|
assert(localOpMetadata !== undefined,
|
|
1469
1470
|
0x012 /* pendingMessageId is missing from the local client's operation */);
|
|
1470
1471
|
const pendingMessageId = localOpMetadata as number;
|
|
1471
|
-
const pendingSubDirectoryMessageId = this.pendingSubDirectories.get(op.subdirName);
|
|
1472
1472
|
if (pendingSubDirectoryMessageId === pendingMessageId) {
|
|
1473
1473
|
this.pendingSubDirectories.delete(op.subdirName);
|
|
1474
1474
|
}
|
package/src/interfaces.ts
CHANGED
|
@@ -144,9 +144,10 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
144
144
|
* ```typescript
|
|
145
145
|
* (path: string, local: boolean, target: IEventThisPlaceHolder) => void
|
|
146
146
|
* ```
|
|
147
|
-
* - `path` - The relative path to the
|
|
147
|
+
* - `path` - The relative path to the subdirectory that is created.
|
|
148
|
+
* It is relative from the object which raises the event.
|
|
148
149
|
*
|
|
149
|
-
* - `local` - Whether the
|
|
150
|
+
* - `local` - Whether the create originated from the this client.
|
|
150
151
|
*
|
|
151
152
|
* - `target` - The ISharedDirectory itself.
|
|
152
153
|
*
|
|
@@ -159,9 +160,10 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
159
160
|
* ```typescript
|
|
160
161
|
* (path: string, local: boolean, target: IEventThisPlaceHolder) => void
|
|
161
162
|
* ```
|
|
162
|
-
* - `path` - The relative path to the
|
|
163
|
+
* - `path` - The relative path to the subdirectory that is deleted.
|
|
164
|
+
* It is relative from the object which raises the event.
|
|
163
165
|
*
|
|
164
|
-
* - `local` - Whether the
|
|
166
|
+
* - `local` - Whether the delete originated from the this client.
|
|
165
167
|
*
|
|
166
168
|
* - `target` - The ISharedDirectory itself.
|
|
167
169
|
*/
|
|
@@ -216,9 +218,10 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
|
216
218
|
* ```typescript
|
|
217
219
|
* (path: string, local: boolean, target: IEventThisPlaceHolder) => void
|
|
218
220
|
* ```
|
|
219
|
-
* - `path` - The relative path to the
|
|
221
|
+
* - `path` - The relative path to the subdirectory that is created.
|
|
222
|
+
* It is relative from the object which raises the event.
|
|
220
223
|
*
|
|
221
|
-
* - `local` - Whether the
|
|
224
|
+
* - `local` - Whether the creation originated from the this client.
|
|
222
225
|
*
|
|
223
226
|
* - `target` - The ISharedDirectory itself.
|
|
224
227
|
*
|
|
@@ -231,9 +234,10 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
|
231
234
|
* ```typescript
|
|
232
235
|
* (path: string, local: boolean, target: IEventThisPlaceHolder) => void
|
|
233
236
|
* ```
|
|
234
|
-
* - `path` - The relative path to the
|
|
237
|
+
* - `path` - The relative path to the subdirectory that is deleted.
|
|
238
|
+
* It is relative from the object which raises the event.
|
|
235
239
|
*
|
|
236
|
-
* - `local` - Whether the
|
|
240
|
+
* - `local` - Whether the delete originated from the this client.
|
|
237
241
|
*
|
|
238
242
|
* - `target` - The ISharedDirectory itself.
|
|
239
243
|
*
|
|
@@ -306,7 +310,6 @@ export interface IDirectoryValueChanged extends IValueChanged {
|
|
|
306
310
|
* (
|
|
307
311
|
* changed: IValueChanged,
|
|
308
312
|
* local: boolean,
|
|
309
|
-
* op: ISequencedDocumentMessage | null,
|
|
310
313
|
* target: IEventThisPlaceHolder,
|
|
311
314
|
* ) => void
|
|
312
315
|
* ```
|
|
@@ -314,8 +317,6 @@ export interface IDirectoryValueChanged extends IValueChanged {
|
|
|
314
317
|
*
|
|
315
318
|
* - `local` - Whether the change originated from the this client.
|
|
316
319
|
*
|
|
317
|
-
* - `op` - The op that caused the change in value.
|
|
318
|
-
*
|
|
319
320
|
* - `target` - The map itself.
|
|
320
321
|
*
|
|
321
322
|
* ### "clear"
|
|
@@ -325,12 +326,10 @@ export interface IDirectoryValueChanged extends IValueChanged {
|
|
|
325
326
|
* #### Listener signature
|
|
326
327
|
*
|
|
327
328
|
* ```typescript
|
|
328
|
-
* (local: boolean,
|
|
329
|
+
* (local: boolean, target: IEventThisPlaceHolder) => void
|
|
329
330
|
* ```
|
|
330
331
|
* - `local` - Whether the clear originated from the this client.
|
|
331
332
|
*
|
|
332
|
-
* - `op` - The op that caused the clear.
|
|
333
|
-
*
|
|
334
333
|
* - `target` - The map itself.
|
|
335
334
|
*/
|
|
336
335
|
export interface ISharedMapEvents extends ISharedObjectEvents {
|
|
@@ -340,8 +339,7 @@ export interface ISharedMapEvents extends ISharedObjectEvents {
|
|
|
340
339
|
target: IEventThisPlaceHolder) => void);
|
|
341
340
|
(event: "clear", listener: (
|
|
342
341
|
local: boolean,
|
|
343
|
-
target: IEventThisPlaceHolder
|
|
344
|
-
) => void);
|
|
342
|
+
target: IEventThisPlaceHolder) => void);
|
|
345
343
|
}
|
|
346
344
|
|
|
347
345
|
/**
|
package/src/map.ts
CHANGED
|
@@ -368,4 +368,12 @@ export class SharedMap extends SharedObject<ISharedMapEvents> implements IShared
|
|
|
368
368
|
this.kernel.tryProcessMessage(message.contents, local, localOpMetadata);
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.rollback}
|
|
374
|
+
* @internal
|
|
375
|
+
*/
|
|
376
|
+
protected rollback(content: any, localOpMetadata: unknown) {
|
|
377
|
+
this.kernel.rollback(content, localOpMetadata);
|
|
378
|
+
}
|
|
371
379
|
}
|