@fluidframework/map 2.0.0-internal.6.1.1 → 2.0.0-internal.6.3.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 +35 -0
- package/README.md +4 -3
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +25 -21
- package/dist/directory.js.map +1 -1
- package/dist/interfaces.d.ts +1 -2
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/internalInterfaces.d.ts.map +1 -1
- package/dist/internalInterfaces.js.map +1 -1
- package/dist/localValues.d.ts.map +1 -1
- package/dist/localValues.js +1 -0
- package/dist/localValues.js.map +1 -1
- package/dist/mapKernel.d.ts +1 -1
- package/dist/mapKernel.d.ts.map +1 -1
- package/dist/mapKernel.js +10 -9
- 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 +7 -3
- package/lib/directory.js.map +1 -1
- package/lib/interfaces.d.ts +1 -2
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.js.map +1 -1
- package/lib/internalInterfaces.d.ts.map +1 -1
- package/lib/internalInterfaces.js.map +1 -1
- package/lib/localValues.d.ts.map +1 -1
- package/lib/localValues.js +1 -0
- package/lib/localValues.js.map +1 -1
- package/lib/mapKernel.d.ts +1 -1
- package/lib/mapKernel.d.ts.map +1 -1
- package/lib/mapKernel.js +2 -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 +21 -23
- package/src/directory.ts +8 -2
- package/src/interfaces.ts +6 -2
- package/src/internalInterfaces.ts +2 -0
- package/src/localValues.ts +3 -0
- package/src/mapKernel.ts +5 -1
- package/src/packageVersion.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @fluidframework/map
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.6.3.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
7
|
+
## 2.0.0-internal.6.2.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- Remove use of @fluidframework/common-definitions ([#16638](https://github.com/microsoft/FluidFramework/issues/16638)) [a8c81509c9](https://github.com/microsoft/FluidFramework/commits/a8c81509c9bf09cfb2092ebcf7265205f9eb6dbf)
|
|
12
|
+
|
|
13
|
+
The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
|
|
14
|
+
imported from the **@fluidframework/core-interfaces** package:
|
|
15
|
+
|
|
16
|
+
- interface IDisposable
|
|
17
|
+
- interface IErrorEvent
|
|
18
|
+
- interface IErrorEvent
|
|
19
|
+
- interface IEvent
|
|
20
|
+
- interface IEventProvider
|
|
21
|
+
- interface ILoggingError
|
|
22
|
+
- interface ITaggedTelemetryPropertyType
|
|
23
|
+
- interface ITelemetryBaseEvent
|
|
24
|
+
- interface ITelemetryBaseLogger
|
|
25
|
+
- interface ITelemetryErrorEvent
|
|
26
|
+
- interface ITelemetryGenericEvent
|
|
27
|
+
- interface ITelemetryLogger
|
|
28
|
+
- interface ITelemetryPerformanceEvent
|
|
29
|
+
- interface ITelemetryProperties
|
|
30
|
+
- type ExtendEventProvider
|
|
31
|
+
- type IEventThisPlaceHolder
|
|
32
|
+
- type IEventTransformer
|
|
33
|
+
- type ReplaceIEventThisPlaceHolder
|
|
34
|
+
- type ReplaceIEventThisPlaceHolder
|
|
35
|
+
- type TelemetryEventCategory
|
|
36
|
+
- type TelemetryEventPropertyType
|
|
37
|
+
|
|
3
38
|
## 2.0.0-internal.6.1.0
|
|
4
39
|
|
|
5
40
|
Dependency updates only.
|
package/README.md
CHANGED
|
@@ -11,9 +11,10 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
|
|
|
11
11
|
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
12
12
|
library consumers should always prefer `^`.
|
|
13
13
|
|
|
14
|
-
Note that when depending on a library version of the form 2.0.0-internal.x.y.z
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
|
|
15
|
+
you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
|
|
16
|
+
Standard `^` and `~` ranges will not work as expected.
|
|
17
|
+
See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
|
|
17
18
|
package for more information including tools to convert between version schemes.
|
|
18
19
|
|
|
19
20
|
<!-- prettier-ignore-end -->
|
package/dist/directory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,yBAAyB,EAAe,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAa,MAAM,oCAAoC,CAAC;AAG/F,OAAO,EACN,UAAU,EAIV,kBAAkB,EAElB,gBAAgB,EAChB,sBAAsB,EAEtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAe,eAAe,EAAoB,MAAM,eAAe,CAAC;AAsC/E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;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OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAQpE;;;OAGG;IACH,OAAO,CAAC,YAAY;IAIpB;;;;;;;;;OASG;IACH,OAAO,CAAC,SAAS;IAcjB;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAsBnC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAsJ1B;;;OAGG;IACH,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO;IAQ9C,OAAO,CAAC,kBAAkB;CAkE1B"}
|
package/dist/directory.js
CHANGED
|
@@ -25,8 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
var _a, _b;
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.SharedDirectory = exports.DirectoryFactory = void 0;
|
|
28
|
-
const
|
|
29
|
-
const
|
|
28
|
+
const core_utils_1 = require("@fluidframework/core-utils");
|
|
29
|
+
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
30
|
+
const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
|
|
30
31
|
const driver_utils_1 = require("@fluidframework/driver-utils");
|
|
31
32
|
const protocol_definitions_1 = require("@fluidframework/protocol-definitions");
|
|
32
33
|
const shared_object_base_1 = require("@fluidframework/shared-object-base");
|
|
@@ -333,7 +334,7 @@ class SharedDirectory extends shared_object_base_1.SharedObject {
|
|
|
333
334
|
reSubmitCore(content, localOpMetadata) {
|
|
334
335
|
const message = content;
|
|
335
336
|
const handler = this.messageHandlers.get(message.type);
|
|
336
|
-
(0,
|
|
337
|
+
(0, core_utils_1.assert)(handler !== undefined, 0x00d /* Missing message handler for message type */);
|
|
337
338
|
handler.submit(message, localOpMetadata);
|
|
338
339
|
}
|
|
339
340
|
/**
|
|
@@ -400,7 +401,7 @@ class SharedDirectory extends shared_object_base_1.SharedObject {
|
|
|
400
401
|
if (message.type === protocol_definitions_1.MessageType.Operation) {
|
|
401
402
|
const op = message.contents;
|
|
402
403
|
const handler = this.messageHandlers.get(op.type);
|
|
403
|
-
(0,
|
|
404
|
+
(0, core_utils_1.assert)(handler !== undefined, 0x00e /* Missing message handler for message type */);
|
|
404
405
|
handler.process(message, op, local, localOpMetadata);
|
|
405
406
|
}
|
|
406
407
|
}
|
|
@@ -432,8 +433,10 @@ class SharedDirectory extends shared_object_base_1.SharedObject {
|
|
|
432
433
|
* @param serializable - The remote information that we can convert into a real object
|
|
433
434
|
* @returns The local value that was produced
|
|
434
435
|
*/
|
|
435
|
-
makeLocal(key, absolutePath,
|
|
436
|
-
|
|
436
|
+
makeLocal(key, absolutePath,
|
|
437
|
+
// eslint-disable-next-line import/no-deprecated
|
|
438
|
+
serializable) {
|
|
439
|
+
(0, core_utils_1.assert)(serializable.type === shared_object_base_1.ValueType[shared_object_base_1.ValueType.Plain] ||
|
|
437
440
|
serializable.type === shared_object_base_1.ValueType[shared_object_base_1.ValueType.Shared], 0x1e4 /* "Unexpected serializable type" */);
|
|
438
441
|
return this.localValueMaker.fromSerializable(serializable);
|
|
439
442
|
}
|
|
@@ -609,6 +612,7 @@ class SharedDirectory extends shared_object_base_1.SharedObject {
|
|
|
609
612
|
if (!currentSubDirObject.storage) {
|
|
610
613
|
currentSubDirObject.storage = {};
|
|
611
614
|
}
|
|
615
|
+
// eslint-disable-next-line import/no-deprecated
|
|
612
616
|
const result = {
|
|
613
617
|
type: value.type,
|
|
614
618
|
value: value.value && JSON.parse(value.value),
|
|
@@ -674,13 +678,13 @@ function isDirectoryLocalOpMetadata(metadata) {
|
|
|
674
678
|
}
|
|
675
679
|
/* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
|
|
676
680
|
function assertNonNullClientId(clientId) {
|
|
677
|
-
(0,
|
|
681
|
+
(0, core_utils_1.assert)(clientId !== null, 0x6af /* client id should never be null */);
|
|
678
682
|
}
|
|
679
683
|
/**
|
|
680
684
|
* Node of the directory tree.
|
|
681
685
|
* @sealed
|
|
682
686
|
*/
|
|
683
|
-
class SubDirectory extends
|
|
687
|
+
class SubDirectory extends client_utils_1.TypedEventEmitter {
|
|
684
688
|
/**
|
|
685
689
|
* Constructor.
|
|
686
690
|
* @param sequenceNumber - Message seq number at which this was created.
|
|
@@ -758,7 +762,7 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
758
762
|
}
|
|
759
763
|
throwIfDisposed() {
|
|
760
764
|
if (this._deleted) {
|
|
761
|
-
throw new
|
|
765
|
+
throw new telemetry_utils_1.UsageError("Cannot access Disposed subDirectory");
|
|
762
766
|
}
|
|
763
767
|
}
|
|
764
768
|
/**
|
|
@@ -825,7 +829,7 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
825
829
|
// Create the sub directory locally first.
|
|
826
830
|
const isNew = this.createSubDirectoryCore(subdirName, true, this.getLocalSeq(), this.runtime.clientId ?? "detached");
|
|
827
831
|
const subDir = this._subdirectories.get(subdirName);
|
|
828
|
-
(0,
|
|
832
|
+
(0, core_utils_1.assert)(subDir !== undefined, 0x5aa /* subdirectory should exist after creation */);
|
|
829
833
|
// If we are not attached, don't submit the op.
|
|
830
834
|
if (!this.directory.isAttached()) {
|
|
831
835
|
return subDir;
|
|
@@ -1040,9 +1044,9 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
1040
1044
|
return;
|
|
1041
1045
|
}
|
|
1042
1046
|
if (local) {
|
|
1043
|
-
(0,
|
|
1047
|
+
(0, core_utils_1.assert)(isClearLocalOpMetadata(localOpMetadata), 0x00f /* pendingMessageId is missing from the local client's operation */);
|
|
1044
1048
|
const pendingClearMessageId = this.pendingClearMessageIds.shift();
|
|
1045
|
-
(0,
|
|
1049
|
+
(0, core_utils_1.assert)(pendingClearMessageId === localOpMetadata.pendingMessageId, 0x32a /* pendingMessageId does not match */);
|
|
1046
1050
|
return;
|
|
1047
1051
|
}
|
|
1048
1052
|
this.clearExceptPendingKeys(false);
|
|
@@ -1222,7 +1226,7 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
1222
1226
|
* @internal
|
|
1223
1227
|
*/
|
|
1224
1228
|
resubmitClearMessage(op, localOpMetadata) {
|
|
1225
|
-
(0,
|
|
1229
|
+
(0, core_utils_1.assert)(isClearLocalOpMetadata(localOpMetadata), 0x32b /* Invalid localOpMetadata for clear */);
|
|
1226
1230
|
// We don't reuse the metadata pendingMessageId but send a new one on each submit.
|
|
1227
1231
|
const pendingClearMessageId = this.pendingClearMessageIds.shift();
|
|
1228
1232
|
// Only submit the op, if we have record for it, otherwise it is possible that the older instance
|
|
@@ -1264,7 +1268,7 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
1264
1268
|
* @internal
|
|
1265
1269
|
*/
|
|
1266
1270
|
resubmitKeyMessage(op, localOpMetadata) {
|
|
1267
|
-
(0,
|
|
1271
|
+
(0, core_utils_1.assert)(isKeyEditLocalOpMetadata(localOpMetadata), 0x32d /* Invalid localOpMetadata in submit */);
|
|
1268
1272
|
// clear the old pending message id
|
|
1269
1273
|
const pendingMessageIds = this.pendingKeys.get(op.key);
|
|
1270
1274
|
// Only submit the op, if we have record for it, otherwise it is possible that the older instance
|
|
@@ -1334,7 +1338,7 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
1334
1338
|
* @internal
|
|
1335
1339
|
*/
|
|
1336
1340
|
resubmitSubDirectoryMessage(op, localOpMetadata) {
|
|
1337
|
-
(0,
|
|
1341
|
+
(0, core_utils_1.assert)(isSubDirLocalOpMetadata(localOpMetadata), 0x32f /* Invalid localOpMetadata for sub directory op */);
|
|
1338
1342
|
// Only submit the op, if we have record for it, otherwise it is possible that the older instance
|
|
1339
1343
|
// is already deleted, in which case we don't need to submit the op.
|
|
1340
1344
|
if (localOpMetadata.type === "createSubDir" &&
|
|
@@ -1490,7 +1494,7 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
1490
1494
|
needProcessStorageOperation(op, local, localOpMetadata) {
|
|
1491
1495
|
if (this.pendingClearMessageIds.length > 0) {
|
|
1492
1496
|
if (local) {
|
|
1493
|
-
(0,
|
|
1497
|
+
(0, core_utils_1.assert)(localOpMetadata !== undefined &&
|
|
1494
1498
|
isKeyEditLocalOpMetadata(localOpMetadata) &&
|
|
1495
1499
|
localOpMetadata.pendingMessageId < this.pendingClearMessageIds[0], 0x010 /* "Received out of order storage op when there is an unackd clear message" */);
|
|
1496
1500
|
// Remove all pendingMessageIds lower than first pendingClearMessageId.
|
|
@@ -1518,9 +1522,9 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
1518
1522
|
// Found an NACK op, clear it from the directory if the latest sequence number in the directory
|
|
1519
1523
|
// match the message's and don't process the op.
|
|
1520
1524
|
if (local) {
|
|
1521
|
-
(0,
|
|
1525
|
+
(0, core_utils_1.assert)(localOpMetadata !== undefined && isKeyEditLocalOpMetadata(localOpMetadata), 0x011 /* pendingMessageId is missing from the local client's operation */);
|
|
1522
1526
|
const pendingMessageIds = this.pendingKeys.get(op.key);
|
|
1523
|
-
(0,
|
|
1527
|
+
(0, core_utils_1.assert)(pendingMessageIds !== undefined &&
|
|
1524
1528
|
pendingMessageIds[0] === localOpMetadata.pendingMessageId, 0x331 /* Unexpected pending message received */);
|
|
1525
1529
|
pendingMessageIds.shift();
|
|
1526
1530
|
if (pendingMessageIds.length === 0) {
|
|
@@ -1562,13 +1566,13 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
1562
1566
|
if ((pendingDeleteCount !== undefined && pendingDeleteCount > 0) ||
|
|
1563
1567
|
(pendingCreateCount !== undefined && pendingCreateCount > 0)) {
|
|
1564
1568
|
if (local) {
|
|
1565
|
-
(0,
|
|
1569
|
+
(0, core_utils_1.assert)(isSubDirLocalOpMetadata(localOpMetadata), 0x012 /* pendingMessageId is missing from the local client's operation */);
|
|
1566
1570
|
if (localOpMetadata.type === "deleteSubDir") {
|
|
1567
|
-
(0,
|
|
1571
|
+
(0, core_utils_1.assert)(pendingDeleteCount !== undefined && pendingDeleteCount > 0, 0x6c2 /* pendingDeleteCount should exist */);
|
|
1568
1572
|
this.decrementPendingSubDirCount(this.pendingDeleteSubDirectoriesTracker, op.subdirName);
|
|
1569
1573
|
}
|
|
1570
1574
|
else if (localOpMetadata.type === "createSubDir") {
|
|
1571
|
-
(0,
|
|
1575
|
+
(0, core_utils_1.assert)(pendingCreateCount !== undefined && pendingCreateCount > 0, 0x6c3 /* pendingCreateCount should exist */);
|
|
1572
1576
|
this.decrementPendingSubDirCount(this.pendingCreateSubDirectoriesTracker, op.subdirName);
|
|
1573
1577
|
}
|
|
1574
1578
|
}
|