@fluidframework/map 1.2.7 → 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/lib/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/lib/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,OA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U,EAAE,gBAAgB,EAC5B,gBAAgB,CAAC,EAAE,iBAAiB,GACrC,qBAAqB;IAIxB;;;;;;OAMG;IACI,sBAAsB,CAAC,EAAE,EAAE,mBAAmB,EAAE,eAAe,EAAE,OAAO;IAI/E;;;OAGG;IACH,SAAS,CAAC,YAAY;IAEtB;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO;IAO7D;;;OAGG;cACa,QAAQ,CAAC,OAAO,EAAE,sBAAsB;IAgBxD;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,oBAAoB;IAmC7C;;;OAGG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IASzG;;;MAGE;IACF,SAAS,CAAC,QAAQ,CAAC,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/lib/directory.js
CHANGED
|
@@ -17,7 +17,8 @@ import { pkgVersion } from "./packageVersion";
|
|
|
17
17
|
const posix = path.posix;
|
|
18
18
|
const snapshotFileName = "header";
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedDirectory}.
|
|
21
|
+
*
|
|
21
22
|
* @sealed
|
|
22
23
|
*/
|
|
23
24
|
export class DirectoryFactory {
|
|
@@ -63,9 +64,7 @@ DirectoryFactory.Attributes = {
|
|
|
63
64
|
packageVersion: pkgVersion,
|
|
64
65
|
};
|
|
65
66
|
/**
|
|
66
|
-
*
|
|
67
|
-
* The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.
|
|
68
|
-
* SubDirectories can be retrieved for use as working directories.
|
|
67
|
+
* {@inheritDoc ISharedDirectory}
|
|
69
68
|
*
|
|
70
69
|
* @example
|
|
71
70
|
* ```typescript
|
|
@@ -815,13 +814,9 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
815
814
|
const iterator = {
|
|
816
815
|
next() {
|
|
817
816
|
const nextVal = localEntriesIterator.next();
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
else {
|
|
822
|
-
// Unpack the stored value
|
|
823
|
-
return { value: [nextVal.value[0], nextVal.value[1].value], done: false };
|
|
824
|
-
}
|
|
817
|
+
return nextVal.done
|
|
818
|
+
? { value: undefined, done: true }
|
|
819
|
+
: { value: [nextVal.value[0], nextVal.value[1].value], done: false };
|
|
825
820
|
},
|
|
826
821
|
[Symbol.iterator]() {
|
|
827
822
|
return this;
|
|
@@ -847,13 +842,9 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
847
842
|
const iterator = {
|
|
848
843
|
next() {
|
|
849
844
|
const nextVal = localValuesIterator.next();
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
else {
|
|
854
|
-
// Unpack the stored value
|
|
855
|
-
return { value: nextVal.value.value, done: false };
|
|
856
|
-
}
|
|
845
|
+
return nextVal.done
|
|
846
|
+
? { value: undefined, done: true }
|
|
847
|
+
: { value: nextVal.value.value, done: false };
|
|
857
848
|
},
|
|
858
849
|
[Symbol.iterator]() {
|
|
859
850
|
return this;
|
|
@@ -873,7 +864,6 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
873
864
|
* Process a clear operation.
|
|
874
865
|
* @param op - The op to process
|
|
875
866
|
* @param local - Whether the message originated from the local client
|
|
876
|
-
* @param message - The message
|
|
877
867
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
878
868
|
* For messages from a remote client, this will be undefined.
|
|
879
869
|
* @internal
|
|
@@ -881,7 +871,7 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
881
871
|
processClearMessage(op, local, localOpMetadata) {
|
|
882
872
|
this.throwIfDisposed();
|
|
883
873
|
if (local) {
|
|
884
|
-
assert(isClearLocalOpMetadata(localOpMetadata), 0x00f /*
|
|
874
|
+
assert(isClearLocalOpMetadata(localOpMetadata), 0x00f /* pendingMessageId is missing from the local client's operation */);
|
|
885
875
|
const pendingClearMessageId = this.pendingClearMessageIds.shift();
|
|
886
876
|
assert(pendingClearMessageId === localOpMetadata.pendingMessageId, 0x32a /* pendingMessageId does not match */);
|
|
887
877
|
return;
|
|
@@ -892,7 +882,6 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
892
882
|
* Process a delete operation.
|
|
893
883
|
* @param op - The op to process
|
|
894
884
|
* @param local - Whether the message originated from the local client
|
|
895
|
-
* @param message - The message
|
|
896
885
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
897
886
|
* For messages from a remote client, this will be undefined.
|
|
898
887
|
* @internal
|
|
@@ -908,7 +897,6 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
908
897
|
* Process a set operation.
|
|
909
898
|
* @param op - The op to process
|
|
910
899
|
* @param local - Whether the message originated from the local client
|
|
911
|
-
* @param message - The message
|
|
912
900
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
913
901
|
* For messages from a remote client, this will be undefined.
|
|
914
902
|
* @internal
|
|
@@ -927,7 +915,6 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
927
915
|
* Process a create subdirectory operation.
|
|
928
916
|
* @param op - The op to process
|
|
929
917
|
* @param local - Whether the message originated from the local client
|
|
930
|
-
* @param message - The message
|
|
931
918
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
932
919
|
* For messages from a remote client, this will be undefined.
|
|
933
920
|
* @internal
|
|
@@ -943,7 +930,6 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
943
930
|
* Process a delete subdirectory operation.
|
|
944
931
|
* @param op - The op to process
|
|
945
932
|
* @param local - Whether the message originated from the local client
|
|
946
|
-
* @param message - The message
|
|
947
933
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
948
934
|
* For messages from a remote client, this will be undefined.
|
|
949
935
|
* @internal
|
|
@@ -1287,7 +1273,6 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
1287
1273
|
/**
|
|
1288
1274
|
* Clear implementation used for both locally sourced clears as well as incoming remote clears.
|
|
1289
1275
|
* @param local - Whether the message originated from the local client
|
|
1290
|
-
* @param op - The message if from a remote clear, or null if from a local clear
|
|
1291
1276
|
*/
|
|
1292
1277
|
clearCore(local) {
|
|
1293
1278
|
this._storage.clear();
|