@fluidframework/map 1.2.0-77818 → 1.2.0-78837

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/map",
3
- "version": "1.2.0-77818",
3
+ "version": "1.2.0-78837",
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": "1.2.0-77818",
66
- "@fluidframework/core-interfaces": "1.2.0-77818",
67
- "@fluidframework/datastore-definitions": "1.2.0-77818",
68
- "@fluidframework/driver-utils": "1.2.0-77818",
65
+ "@fluidframework/container-utils": "1.2.0-78837",
66
+ "@fluidframework/core-interfaces": "1.2.0-78837",
67
+ "@fluidframework/datastore-definitions": "1.2.0-78837",
68
+ "@fluidframework/driver-utils": "1.2.0-78837",
69
69
  "@fluidframework/protocol-definitions": "^0.1028.2000",
70
- "@fluidframework/runtime-definitions": "1.2.0-77818",
71
- "@fluidframework/runtime-utils": "1.2.0-77818",
72
- "@fluidframework/shared-object-base": "1.2.0-77818",
70
+ "@fluidframework/runtime-definitions": "1.2.0-78837",
71
+ "@fluidframework/runtime-utils": "1.2.0-78837",
72
+ "@fluidframework/shared-object-base": "1.2.0-78837",
73
73
  "path-browserify": "^1.0.1"
74
74
  },
75
75
  "devDependencies": {
76
- "@fluid-internal/test-dds-utils": "1.2.0-77818",
76
+ "@fluid-internal/test-dds-utils": "1.2.0-78837",
77
77
  "@fluidframework/build-common": "^0.24.0",
78
78
  "@fluidframework/build-tools": "^0.2.74327",
79
79
  "@fluidframework/eslint-config-fluid": "^0.28.2000",
80
80
  "@fluidframework/map-previous": "npm:@fluidframework/map@1.1.0",
81
- "@fluidframework/mocha-test-setup": "1.2.0-77818",
82
- "@fluidframework/test-runtime-utils": "1.2.0-77818",
81
+ "@fluidframework/mocha-test-setup": "1.2.0-78837",
82
+ "@fluidframework/test-runtime-utils": "1.2.0-78837",
83
83
  "@microsoft/api-extractor": "^7.22.2",
84
84
  "@rushstack/eslint-config": "^2.5.1",
85
85
  "@types/mocha": "^9.1.1",
package/src/directory.ts CHANGED
@@ -72,7 +72,7 @@ interface IDirectoryMessageHandler {
72
72
  /**
73
73
  * Operation indicating a value should be set for a key.
74
74
  */
75
- interface IDirectorySetOperation {
75
+ export interface IDirectorySetOperation {
76
76
  /**
77
77
  * String identifier of the operation type.
78
78
  */
@@ -97,7 +97,7 @@ interface IDirectorySetOperation {
97
97
  /**
98
98
  * Operation indicating a key should be deleted from the directory.
99
99
  */
100
- interface IDirectoryDeleteOperation {
100
+ export interface IDirectoryDeleteOperation {
101
101
  /**
102
102
  * String identifier of the operation type.
103
103
  */
@@ -117,12 +117,12 @@ interface IDirectoryDeleteOperation {
117
117
  /**
118
118
  * An operation on a specific key within a directory
119
119
  */
120
- type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;
120
+ export type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;
121
121
 
122
122
  /**
123
123
  * Operation indicating the directory should be cleared.
124
124
  */
125
- interface IDirectoryClearOperation {
125
+ export interface IDirectoryClearOperation {
126
126
  /**
127
127
  * String identifier of the operation type.
128
128
  */
@@ -137,12 +137,12 @@ interface IDirectoryClearOperation {
137
137
  /**
138
138
  * An operation on one or more of the keys within a directory
139
139
  */
140
- type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;
140
+ export type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;
141
141
 
142
142
  /**
143
143
  * Operation indicating a subdirectory should be created.
144
144
  */
145
- interface IDirectoryCreateSubDirectoryOperation {
145
+ export interface IDirectoryCreateSubDirectoryOperation {
146
146
  /**
147
147
  * String identifier of the operation type.
148
148
  */
@@ -162,7 +162,7 @@ interface IDirectoryCreateSubDirectoryOperation {
162
162
  /**
163
163
  * Operation indicating a subdirectory should be deleted.
164
164
  */
165
- interface IDirectoryDeleteSubDirectoryOperation {
165
+ export interface IDirectoryDeleteSubDirectoryOperation {
166
166
  /**
167
167
  * String identifier of the operation type.
168
168
  */
@@ -182,7 +182,8 @@ interface IDirectoryDeleteSubDirectoryOperation {
182
182
  /**
183
183
  * An operation on the subdirectories within a directory
184
184
  */
185
- type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirectoryOperation | IDirectoryDeleteSubDirectoryOperation;
185
+ export type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirectoryOperation
186
+ | IDirectoryDeleteSubDirectoryOperation;
186
187
 
187
188
  /**
188
189
  * Any operation on a directory
@@ -268,7 +269,7 @@ export class DirectoryFactory {
268
269
  * SubDirectories can be retrieved for use as working directories.
269
270
  *
270
271
  * @example
271
- * ```ts
272
+ * ```typescript
272
273
  * mySharedDirectory.createSubDirectory("a").createSubDirectory("b").createSubDirectory("c").set("foo", val1);
273
274
  * const mySubDir = mySharedDirectory.getWorkingDirectory("/a/b/c");
274
275
  * mySubDir.get("foo"); // returns val1
@@ -1278,7 +1279,7 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1278
1279
  0x00f /* `pendingMessageId is missing from the local client's ${op.type} operation` */);
1279
1280
  const pendingClearMessageId = this.pendingClearMessageIds.shift();
1280
1281
  assert(pendingClearMessageId === localOpMetadata.pendingMessageId,
1281
- "pendingMessageId does not match");
1282
+ 0x32a /* pendingMessageId does not match */);
1282
1283
  return;
1283
1284
  }
1284
1285
  this.clearExceptPendingKeys();
@@ -1397,11 +1398,11 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1397
1398
  * @internal
1398
1399
  */
1399
1400
  public resubmitClearMessage(op: IDirectoryClearOperation, localOpMetadata: unknown): void {
1400
- assert(isClearLocalOpMetadata(localOpMetadata), "Invalid localOpMetadata for clear");
1401
+ assert(isClearLocalOpMetadata(localOpMetadata), 0x32b /* Invalid localOpMetadata for clear */);
1401
1402
  // We don't reuse the metadata pendingMessageId but send a new one on each submit.
1402
1403
  const pendingClearMessageId = this.pendingClearMessageIds.shift();
1403
1404
  assert(pendingClearMessageId === localOpMetadata.pendingMessageId,
1404
- "pendingMessageId does not match");
1405
+ 0x32c /* pendingMessageId does not match */);
1405
1406
  this.submitClearMessage(op, localOpMetadata.previousStorage);
1406
1407
  }
1407
1408
 
@@ -1439,12 +1440,12 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1439
1440
  * @internal
1440
1441
  */
1441
1442
  public resubmitKeyMessage(op: IDirectoryKeyOperation, localOpMetadata: unknown): void {
1442
- assert(isKeyEditLocalOpMetadata(localOpMetadata), "Invalid localOpMetadata in submit");
1443
+ assert(isKeyEditLocalOpMetadata(localOpMetadata), 0x32d /* Invalid localOpMetadata in submit */);
1443
1444
 
1444
1445
  // clear the old pending message id
1445
1446
  const pendingMessageIds = this.pendingKeys.get(op.key);
1446
1447
  assert(pendingMessageIds !== undefined && pendingMessageIds[0] === localOpMetadata.pendingMessageId,
1447
- "Unexpected pending message received");
1448
+ 0x32e /* Unexpected pending message received */);
1448
1449
  pendingMessageIds.shift();
1449
1450
  if (pendingMessageIds.length === 0) {
1450
1451
  this.pendingKeys.delete(op.key);
@@ -1511,12 +1512,12 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1511
1512
  * @internal
1512
1513
  */
1513
1514
  public resubmitSubDirectoryMessage(op: IDirectorySubDirectoryOperation, localOpMetadata: unknown): void {
1514
- assert(isSubDirLocalOpMetadata(localOpMetadata), "Invalid localOpMetadata for sub directory op");
1515
+ assert(isSubDirLocalOpMetadata(localOpMetadata), 0x32f /* Invalid localOpMetadata for sub directory op */);
1515
1516
 
1516
1517
  // clear the old pending message id
1517
1518
  const pendingMessageIds = this.pendingSubDirectories.get(op.subdirName);
1518
1519
  assert(pendingMessageIds !== undefined && pendingMessageIds[0] === localOpMetadata.pendingMessageId,
1519
- "Unexpected pending message received");
1520
+ 0x330 /* Unexpected pending message received */);
1520
1521
  pendingMessageIds.shift();
1521
1522
  if (pendingMessageIds.length === 0) {
1522
1523
  this.pendingSubDirectories.delete(op.subdirName);
@@ -1683,7 +1684,7 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1683
1684
  0x011 /* pendingMessageId is missing from the local client's operation */);
1684
1685
  const pendingMessageIds = this.pendingKeys.get(op.key);
1685
1686
  assert(pendingMessageIds !== undefined && pendingMessageIds[0] === localOpMetadata.pendingMessageId,
1686
- "Unexpected pending message received");
1687
+ 0x331 /* Unexpected pending message received */);
1687
1688
  pendingMessageIds.shift();
1688
1689
  if (pendingMessageIds.length === 0) {
1689
1690
  this.pendingKeys.delete(op.key);
@@ -1718,7 +1719,7 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1718
1719
  0x012 /* pendingMessageId is missing from the local client's operation */);
1719
1720
  const pendingMessageIds = this.pendingSubDirectories.get(op.subdirName);
1720
1721
  assert(pendingMessageIds !== undefined && pendingMessageIds[0] === localOpMetadata.pendingMessageId,
1721
- "Unexpected pending message received");
1722
+ 0x332 /* Unexpected pending message received */);
1722
1723
  pendingMessageIds.shift();
1723
1724
  if (pendingMessageIds.length === 0) {
1724
1725
  this.pendingSubDirectories.delete(op.subdirName);
package/src/index.ts CHANGED
@@ -6,11 +6,11 @@
6
6
  /**
7
7
  * The `map` package provides interfaces and implementing classes for map-like distributed data structures.
8
8
  *
9
- * @remarks
10
- * The following distributed data structures are defined in this package:
9
+ * @remarks The following distributed data structures are defined in this package:
11
10
  *
12
- * - {@link @fluidframework/map#SharedMap}
13
- * - {@link @fluidframework/map#SharedDirectory}
11
+ * - {@link SharedMap}
12
+ *
13
+ * - {@link SharedDirectory}
14
14
  *
15
15
  * @packageDocumentation
16
16
  */
@@ -18,4 +18,4 @@
18
18
  export * from "./interfaces";
19
19
  export * from "./map";
20
20
  export * from "./directory";
21
- export { LocalValueMaker } from "./localValues";
21
+ export { LocalValueMaker, ILocalValue } from "./localValues";
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/map";
9
- export const pkgVersion = "1.2.0-77818";
9
+ export const pkgVersion = "1.2.0-78837";