@fluidframework/map 1.2.6 → 2.0.0-dev.1.3.0.96595
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/.eslintrc.js +4 -1
- package/.mocharc.js +12 -0
- package/dist/directory.d.ts +26 -7
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +10 -25
- package/dist/directory.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +139 -181
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/internalInterfaces.d.ts +62 -0
- package/dist/internalInterfaces.d.ts.map +1 -0
- package/dist/internalInterfaces.js +7 -0
- package/dist/internalInterfaces.js.map +1 -0
- package/dist/localValues.d.ts +3 -3
- package/dist/localValues.js +2 -2
- package/dist/localValues.js.map +1 -1
- package/dist/map.d.ts +3 -5
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +4 -7
- package/dist/map.js.map +1 -1
- package/dist/mapKernel.d.ts +10 -41
- package/dist/mapKernel.d.ts.map +1 -1
- package/dist/mapKernel.js +34 -25
- 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.d.ts +26 -7
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.js +10 -25
- package/lib/directory.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/interfaces.d.ts +139 -181
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.js.map +1 -1
- package/lib/internalInterfaces.d.ts +62 -0
- package/lib/internalInterfaces.d.ts.map +1 -0
- package/lib/internalInterfaces.js +6 -0
- package/lib/internalInterfaces.js.map +1 -0
- package/lib/localValues.d.ts +3 -3
- package/lib/localValues.js +2 -2
- package/lib/localValues.js.map +1 -1
- package/lib/map.d.ts +3 -5
- package/lib/map.d.ts.map +1 -1
- package/lib/map.js +4 -7
- package/lib/map.js.map +1 -1
- package/lib/mapKernel.d.ts +10 -41
- package/lib/mapKernel.d.ts.map +1 -1
- package/lib/mapKernel.js +34 -25
- 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 +61 -21
- package/src/directory.ts +36 -27
- package/src/index.ts +2 -2
- package/src/interfaces.ts +146 -181
- package/src/internalInterfaces.ts +72 -0
- package/src/localValues.ts +3 -3
- package/src/map.ts +8 -11
- package/src/mapKernel.ts +64 -96
- package/src/packageVersion.ts +1 -1
package/.eslintrc.js
CHANGED
|
@@ -8,7 +8,10 @@ module.exports = {
|
|
|
8
8
|
require.resolve("@fluidframework/eslint-config-fluid")
|
|
9
9
|
],
|
|
10
10
|
"parserOptions": {
|
|
11
|
-
"project": [
|
|
11
|
+
"project": [
|
|
12
|
+
"./tsconfig.json",
|
|
13
|
+
"./src/test/tsconfig.json",
|
|
14
|
+
]
|
|
12
15
|
},
|
|
13
16
|
"rules": {
|
|
14
17
|
"@typescript-eslint/no-use-before-define": "off",
|
package/.mocharc.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const getFluidTestMochaConfig = require('@fluidframework/mocha-test-setup/mocharc-common');
|
|
9
|
+
|
|
10
|
+
const packageDir = __dirname;
|
|
11
|
+
const config = getFluidTestMochaConfig(packageDir);
|
|
12
|
+
module.exports = config;
|
package/dist/directory.d.ts
CHANGED
|
@@ -111,26 +111,47 @@ export declare type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirecto
|
|
|
111
111
|
export declare type IDirectoryOperation = IDirectoryStorageOperation | IDirectorySubDirectoryOperation;
|
|
112
112
|
/**
|
|
113
113
|
* Defines the in-memory object structure to be used for the conversion to/from serialized.
|
|
114
|
-
*
|
|
115
|
-
* Directly used in
|
|
114
|
+
*
|
|
115
|
+
* @remarks Directly used in
|
|
116
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
|
|
117
|
+
* | JSON.stringify}, direct result from
|
|
118
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse}.
|
|
116
119
|
*/
|
|
117
120
|
export interface IDirectoryDataObject {
|
|
121
|
+
/**
|
|
122
|
+
* Key/value date set by the user.
|
|
123
|
+
*/
|
|
118
124
|
storage?: {
|
|
119
125
|
[key: string]: ISerializableValue;
|
|
120
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* Recursive sub-directories {@link IDirectoryDataObject | objects}.
|
|
129
|
+
*/
|
|
121
130
|
subdirectories?: {
|
|
122
131
|
[subdirName: string]: IDirectoryDataObject;
|
|
123
132
|
};
|
|
124
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* {@link IDirectory} storage format.
|
|
136
|
+
*
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
125
139
|
export interface IDirectoryNewStorageFormat {
|
|
140
|
+
/**
|
|
141
|
+
* Blob IDs representing larger directory data that was serialized.
|
|
142
|
+
*/
|
|
126
143
|
blobs: string[];
|
|
144
|
+
/**
|
|
145
|
+
* Storage content representing directory data that was not serialized.
|
|
146
|
+
*/
|
|
127
147
|
content: IDirectoryDataObject;
|
|
128
148
|
}
|
|
129
149
|
/**
|
|
130
|
-
*
|
|
150
|
+
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedDirectory}.
|
|
151
|
+
*
|
|
131
152
|
* @sealed
|
|
132
153
|
*/
|
|
133
|
-
export declare class DirectoryFactory {
|
|
154
|
+
export declare class DirectoryFactory implements IChannelFactory {
|
|
134
155
|
/**
|
|
135
156
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
|
|
136
157
|
*/
|
|
@@ -157,9 +178,7 @@ export declare class DirectoryFactory {
|
|
|
157
178
|
create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory;
|
|
158
179
|
}
|
|
159
180
|
/**
|
|
160
|
-
*
|
|
161
|
-
* The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.
|
|
162
|
-
* SubDirectories can be retrieved for use as working directories.
|
|
181
|
+
* {@inheritDoc ISharedDirectory}
|
|
163
182
|
*
|
|
164
183
|
* @example
|
|
165
184
|
* ```typescript
|
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;AAKH,OAAO,EACH,yBAAyB,EAE5B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EAClB,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,EACH,UAAU,EAGV,kBAAkB,EAElB,gBAAgB,EAChB,sBAAsB,EAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAEH,eAAe,EAElB,MAAM,eAAe,CAAC;AAkCvB;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAA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AC,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO;IAQzD;;;OAGG;IACH,OAAO,CAAC,YAAY;IAIpB;;;;;;;;;OASG;IACH,OAAO,CAAC,SAAS;IAYjB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA6F1B;;OAEG;IACH,SAAS,CAAC,cAAc;IAIxB,OAAO,CAAC,kBAAkB;CAiE7B"}
|
package/dist/directory.js
CHANGED
|
@@ -39,7 +39,8 @@ const packageVersion_1 = require("./packageVersion");
|
|
|
39
39
|
const posix = path.posix;
|
|
40
40
|
const snapshotFileName = "header";
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedDirectory}.
|
|
43
|
+
*
|
|
43
44
|
* @sealed
|
|
44
45
|
*/
|
|
45
46
|
class DirectoryFactory {
|
|
@@ -86,9 +87,7 @@ DirectoryFactory.Attributes = {
|
|
|
86
87
|
packageVersion: packageVersion_1.pkgVersion,
|
|
87
88
|
};
|
|
88
89
|
/**
|
|
89
|
-
*
|
|
90
|
-
* The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.
|
|
91
|
-
* SubDirectories can be retrieved for use as working directories.
|
|
90
|
+
* {@inheritDoc ISharedDirectory}
|
|
92
91
|
*
|
|
93
92
|
* @example
|
|
94
93
|
* ```typescript
|
|
@@ -839,13 +838,9 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
839
838
|
const iterator = {
|
|
840
839
|
next() {
|
|
841
840
|
const nextVal = localEntriesIterator.next();
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
else {
|
|
846
|
-
// Unpack the stored value
|
|
847
|
-
return { value: [nextVal.value[0], nextVal.value[1].value], done: false };
|
|
848
|
-
}
|
|
841
|
+
return nextVal.done
|
|
842
|
+
? { value: undefined, done: true }
|
|
843
|
+
: { value: [nextVal.value[0], nextVal.value[1].value], done: false };
|
|
849
844
|
},
|
|
850
845
|
[Symbol.iterator]() {
|
|
851
846
|
return this;
|
|
@@ -871,13 +866,9 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
871
866
|
const iterator = {
|
|
872
867
|
next() {
|
|
873
868
|
const nextVal = localValuesIterator.next();
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
else {
|
|
878
|
-
// Unpack the stored value
|
|
879
|
-
return { value: nextVal.value.value, done: false };
|
|
880
|
-
}
|
|
869
|
+
return nextVal.done
|
|
870
|
+
? { value: undefined, done: true }
|
|
871
|
+
: { value: nextVal.value.value, done: false };
|
|
881
872
|
},
|
|
882
873
|
[Symbol.iterator]() {
|
|
883
874
|
return this;
|
|
@@ -897,7 +888,6 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
897
888
|
* Process a clear operation.
|
|
898
889
|
* @param op - The op to process
|
|
899
890
|
* @param local - Whether the message originated from the local client
|
|
900
|
-
* @param message - The message
|
|
901
891
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
902
892
|
* For messages from a remote client, this will be undefined.
|
|
903
893
|
* @internal
|
|
@@ -905,7 +895,7 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
905
895
|
processClearMessage(op, local, localOpMetadata) {
|
|
906
896
|
this.throwIfDisposed();
|
|
907
897
|
if (local) {
|
|
908
|
-
(0, common_utils_1.assert)(isClearLocalOpMetadata(localOpMetadata), 0x00f /*
|
|
898
|
+
(0, common_utils_1.assert)(isClearLocalOpMetadata(localOpMetadata), 0x00f /* pendingMessageId is missing from the local client's operation */);
|
|
909
899
|
const pendingClearMessageId = this.pendingClearMessageIds.shift();
|
|
910
900
|
(0, common_utils_1.assert)(pendingClearMessageId === localOpMetadata.pendingMessageId, 0x32a /* pendingMessageId does not match */);
|
|
911
901
|
return;
|
|
@@ -916,7 +906,6 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
916
906
|
* Process a delete operation.
|
|
917
907
|
* @param op - The op to process
|
|
918
908
|
* @param local - Whether the message originated from the local client
|
|
919
|
-
* @param message - The message
|
|
920
909
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
921
910
|
* For messages from a remote client, this will be undefined.
|
|
922
911
|
* @internal
|
|
@@ -932,7 +921,6 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
932
921
|
* Process a set operation.
|
|
933
922
|
* @param op - The op to process
|
|
934
923
|
* @param local - Whether the message originated from the local client
|
|
935
|
-
* @param message - The message
|
|
936
924
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
937
925
|
* For messages from a remote client, this will be undefined.
|
|
938
926
|
* @internal
|
|
@@ -951,7 +939,6 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
951
939
|
* Process a create subdirectory operation.
|
|
952
940
|
* @param op - The op to process
|
|
953
941
|
* @param local - Whether the message originated from the local client
|
|
954
|
-
* @param message - The message
|
|
955
942
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
956
943
|
* For messages from a remote client, this will be undefined.
|
|
957
944
|
* @internal
|
|
@@ -967,7 +954,6 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
967
954
|
* Process a delete subdirectory operation.
|
|
968
955
|
* @param op - The op to process
|
|
969
956
|
* @param local - Whether the message originated from the local client
|
|
970
|
-
* @param message - The message
|
|
971
957
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
972
958
|
* For messages from a remote client, this will be undefined.
|
|
973
959
|
* @internal
|
|
@@ -1311,7 +1297,6 @@ class SubDirectory extends common_utils_1.TypedEventEmitter {
|
|
|
1311
1297
|
/**
|
|
1312
1298
|
* Clear implementation used for both locally sourced clears as well as incoming remote clears.
|
|
1313
1299
|
* @param local - Whether the message originated from the local client
|
|
1314
|
-
* @param op - The message if from a remote clear, or null if from a local clear
|
|
1315
1300
|
*/
|
|
1316
1301
|
clearCore(local) {
|
|
1317
1302
|
this._storage.clear();
|