@fluidframework/map 1.1.0 → 1.2.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/api-extractor.json +1 -1
- package/dist/directory.d.ts +14 -10
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +289 -80
- package/dist/directory.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +29 -14
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.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 +14 -10
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.js +289 -80
- package/lib/directory.js.map +1 -1
- package/lib/index.d.ts +5 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/interfaces.d.ts +29 -14
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.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 +13 -13
- package/src/directory.ts +358 -94
- package/src/index.ts +5 -5
- package/src/interfaces.ts +29 -14
- package/src/packageVersion.ts +1 -1
package/dist/interfaces.d.ts
CHANGED
|
@@ -84,9 +84,13 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
84
84
|
getWorkingDirectory(relativePath: string): IDirectory | undefined;
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
|
-
* Events emitted in response to changes to the directory data.
|
|
87
|
+
* Events emitted in response to changes to the directory data. These events only emit on the ISharedDirectory itself,
|
|
88
88
|
* and not on subdirectories.
|
|
89
89
|
*
|
|
90
|
+
* @remarks
|
|
91
|
+
*
|
|
92
|
+
* The following is the list of events emitted.
|
|
93
|
+
*
|
|
90
94
|
* ### "valueChanged"
|
|
91
95
|
*
|
|
92
96
|
* The valueChanged event is emitted when a key is set or deleted. This is emitted for any key in the ISharedDirectory
|
|
@@ -104,7 +108,7 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
104
108
|
* - `changed` - Information on the key that changed, its value prior to the change, and the path to the key that
|
|
105
109
|
* changed.
|
|
106
110
|
*
|
|
107
|
-
* - `local` - Whether the change originated from
|
|
111
|
+
* - `local` - Whether the change originated from this client.
|
|
108
112
|
*
|
|
109
113
|
* - `target` - The ISharedDirectory itself.
|
|
110
114
|
*
|
|
@@ -117,7 +121,7 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
117
121
|
* ```typescript
|
|
118
122
|
* (local: boolean, target: IEventThisPlaceHolder) => void
|
|
119
123
|
* ```
|
|
120
|
-
* - `local` - Whether the clear originated from
|
|
124
|
+
* - `local` - Whether the clear originated from this client.
|
|
121
125
|
*
|
|
122
126
|
* - `target` - The ISharedDirectory itself.
|
|
123
127
|
*
|
|
@@ -137,7 +141,7 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
137
141
|
*
|
|
138
142
|
* - `target` - The ISharedDirectory itself.
|
|
139
143
|
*
|
|
140
|
-
*
|
|
144
|
+
* ###"subDirectoryDeleted"
|
|
141
145
|
*
|
|
142
146
|
* The subDirectoryDeleted event is emitted when a subdirectory is deleted.
|
|
143
147
|
*
|
|
@@ -162,6 +166,10 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
|
162
166
|
/**
|
|
163
167
|
* Events emitted in response to changes to the directory data.
|
|
164
168
|
*
|
|
169
|
+
* @remarks
|
|
170
|
+
*
|
|
171
|
+
* The following is the list of events emitted.
|
|
172
|
+
*
|
|
165
173
|
* ### "containedValueChanged"
|
|
166
174
|
*
|
|
167
175
|
* The containedValueChanged event is emitted when a key is set or deleted. As opposed to the SharedDirectory's
|
|
@@ -174,10 +182,10 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
|
174
182
|
* ```
|
|
175
183
|
* - `changed` - Information on the key that changed and its value prior to the change.
|
|
176
184
|
*
|
|
177
|
-
* - `local` - Whether the change originated from
|
|
178
|
-
*
|
|
185
|
+
* - `local` - Whether the change originated from this client.
|
|
179
186
|
*
|
|
180
187
|
* - `target` - The IDirectory itself.
|
|
188
|
+
*
|
|
181
189
|
* ### "subDirectoryCreated"
|
|
182
190
|
*
|
|
183
191
|
* The subDirectoryCreated event is emitted when a subdirectory is created.
|
|
@@ -194,7 +202,7 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
|
194
202
|
*
|
|
195
203
|
* - `target` - The ISharedDirectory itself.
|
|
196
204
|
*
|
|
197
|
-
*
|
|
205
|
+
* ### "subDirectoryDeleted"
|
|
198
206
|
*
|
|
199
207
|
* The subDirectoryDeleted event is emitted when a subdirectory is deleted.
|
|
200
208
|
*
|
|
@@ -236,7 +244,7 @@ export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents &
|
|
|
236
244
|
readonly [Symbol.toStringTag]: string;
|
|
237
245
|
}
|
|
238
246
|
/**
|
|
239
|
-
* Type of "valueChanged" event parameter for SharedDirectory
|
|
247
|
+
* Type of "valueChanged" event parameter for SharedDirectory.
|
|
240
248
|
*/
|
|
241
249
|
export interface IDirectoryValueChanged extends IValueChanged {
|
|
242
250
|
/**
|
|
@@ -247,6 +255,10 @@ export interface IDirectoryValueChanged extends IValueChanged {
|
|
|
247
255
|
/**
|
|
248
256
|
* Events emitted in response to changes to the map data.
|
|
249
257
|
*
|
|
258
|
+
* @remarks
|
|
259
|
+
*
|
|
260
|
+
* The following is the list of events emitted.
|
|
261
|
+
*
|
|
250
262
|
* ### "valueChanged"
|
|
251
263
|
*
|
|
252
264
|
* The valueChanged event is emitted when a key is set or deleted.
|
|
@@ -262,7 +274,7 @@ export interface IDirectoryValueChanged extends IValueChanged {
|
|
|
262
274
|
* ```
|
|
263
275
|
* - `changed` - Information on the key that changed and its value prior to the change.
|
|
264
276
|
*
|
|
265
|
-
* - `local` - Whether the change originated from
|
|
277
|
+
* - `local` - Whether the change originated from this client.
|
|
266
278
|
*
|
|
267
279
|
* - `target` - The map itself.
|
|
268
280
|
*
|
|
@@ -275,7 +287,7 @@ export interface IDirectoryValueChanged extends IValueChanged {
|
|
|
275
287
|
* ```typescript
|
|
276
288
|
* (local: boolean, target: IEventThisPlaceHolder) => void
|
|
277
289
|
* ```
|
|
278
|
-
* - `local` - Whether the clear originated from
|
|
290
|
+
* - `local` - Whether the clear originated from this client.
|
|
279
291
|
*
|
|
280
292
|
* - `target` - The map itself.
|
|
281
293
|
*/
|
|
@@ -302,19 +314,22 @@ export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string,
|
|
|
302
314
|
set<T = any>(key: string, value: T): this;
|
|
303
315
|
}
|
|
304
316
|
/**
|
|
305
|
-
* The _ready-for-serialization_ format of values contained in DDS contents.
|
|
317
|
+
* The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use
|
|
306
318
|
* ISerializableValue.type to understand whether they're storing a Plain JS object, a SharedObject, or a value type.
|
|
319
|
+
*
|
|
320
|
+
* @remarks
|
|
321
|
+
*
|
|
307
322
|
* Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with
|
|
308
323
|
* the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to
|
|
309
|
-
* JSON.stringify and comes out of JSON.parse.
|
|
324
|
+
* JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)
|
|
310
325
|
* and ops (set).
|
|
311
326
|
* If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will
|
|
312
|
-
* just get stringified to a URL string and not rehydrate as a URL object on the other side.
|
|
327
|
+
* just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members
|
|
313
328
|
* that are ISerializedHandle (the serialized form of a handle).
|
|
314
329
|
* If type is a value type then it must be amongst the types registered via registerValueType or we won't know how
|
|
315
330
|
* to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.
|
|
316
331
|
* If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a
|
|
317
|
-
* channel ID.
|
|
332
|
+
* channel ID. This type is legacy and deprecated.
|
|
318
333
|
*/
|
|
319
334
|
export interface ISerializableValue {
|
|
320
335
|
/**
|
package/dist/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,aAAa,EAAE,GAAG,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IACxG;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;;OAIG;IACH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAEzC;;;;;OAKG;IACH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAE1C;;;OAGG;IACH,iBAAiB,CAAC,IAAI,MAAM,CAAC;IAE7B;;;;;OAKG;IACH,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAAC;IAE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,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,qBAAqB,KAAK,IAAI,OAAE;IAC5C,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CACvB,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,qBAAqB,KAAK,IAAI,OAAE;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa,CAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IACjF;;;;OAIG;IACH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAEzC;;;;;OAKG;IACH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B"}
|
package/dist/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISharedObject, ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport { IDisposable, IEvent, IEventProvider, IEventThisPlaceHolder } from \"@fluidframework/common-definitions\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n */\nexport interface IValueChanged {\n /**\n * The key storing the value that changed.\n */\n key: string;\n\n /**\n * The value that was stored at the key prior to the change.\n */\n previousValue: any;\n}\n\n/**\n * Interface describing actions on a directory.\n *\n * @remarks\n * When used as a Map, operates on its keys.\n */\nexport interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {\n /**\n * The absolute path of the directory.\n */\n readonly absolutePath: string;\n\n /**\n * Retrieves the value stored at the given key from the directory.\n * @param key - Key to retrieve from\n * @returns The stored value, or undefined if the key is not set\n */\n get<T = any>(key: string): T | undefined;\n\n /**\n * Sets the value stored at key to the provided value.\n * @param key - Key to set at\n * @param value - Value to set\n * @returns The IDirectory itself\n */\n set<T = any>(key: string, value: T): this;\n\n /**\n * Get the number of sub directory within the directory.\n * @returns The number of sub directory within a directory.\n */\n countSubDirectory?(): number;\n\n /**\n * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the\n * same name already exists.\n * @param subdirName - Name of the new child directory to create\n * @returns The IDirectory child that was created or retrieved\n */\n createSubDirectory(subdirName: string): IDirectory;\n\n /**\n * Gets an IDirectory child of this IDirectory, if it exists.\n * @param subdirName - Name of the child directory to get\n * @returns The requested IDirectory\n */\n getSubDirectory(subdirName: string): IDirectory | undefined;\n\n /**\n * Checks whether this directory has a child directory with the given name.\n * @param subdirName - Name of the child directory to check\n * @returns True if it exists, false otherwise\n */\n hasSubDirectory(subdirName: string): boolean;\n\n /**\n * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.\n * @param subdirName - Name of the child directory to delete\n * @returns True if the IDirectory existed and was deleted, false if it did not exist\n */\n deleteSubDirectory(subdirName: string): boolean;\n\n /**\n * Gets an iterator over the IDirectory children of this IDirectory.\n * @returns The IDirectory iterator\n */\n subdirectories(): IterableIterator<[string, IDirectory]>;\n\n /**\n * Get an IDirectory within the directory, in order to use relative paths from that location.\n * @param relativePath - Path of the IDirectory to get, relative to this IDirectory\n * @returns The requested IDirectory\n */\n getWorkingDirectory(relativePath: string): IDirectory | undefined;\n}\n\n/**\n * Events emitted in response to changes to the directory data. These events only emit on the ISharedDirectory itself,\n * and not on subdirectories.\n *\n * ### \"valueChanged\"\n *\n * The valueChanged event is emitted when a key is set or deleted. This is emitted for any key in the ISharedDirectory\n * or any subdirectory.\n *\n * #### Listener signature\n *\n * ```typescript\n * (\n * changed: IDirectoryValueChanged,\n * local: boolean,\n * target: IEventThisPlaceHolder,\n * ) => void\n * ```\n * - `changed` - Information on the key that changed, its value prior to the change, and the path to the key that\n * changed.\n *\n * - `local` - Whether the change originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * ### \"clear\"\n *\n * The clear event is emitted when the ISharedDirectory is cleared.\n *\n * #### Listener signature\n *\n * ```typescript\n * (local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `local` - Whether the clear originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * ### \"subDirectoryCreated\"\n *\n * The subDirectoryCreated event is emitted when a subdirectory is created.\n *\n * #### Listener signature\n *\n * ```typescript\n * (path: string, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `path` - The relative path to the subdirectory that is created.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the create originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * * ### \"subDirectoryDeleted\"\n *\n * The subDirectoryDeleted event is emitted when a subdirectory is deleted.\n *\n * #### Listener signature\n *\n * ```typescript\n * (path: string, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `path` - The relative path to the subdirectory that is deleted.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the delete originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n */\nexport interface ISharedDirectoryEvents extends ISharedObjectEvents {\n (event: \"valueChanged\", listener: (\n changed: IDirectoryValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n (event: \"clear\", listener: (\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n (event: \"subDirectoryCreated\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"subDirectoryDeleted\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n *\n * ### \"containedValueChanged\"\n *\n * The containedValueChanged event is emitted when a key is set or deleted. As opposed to the SharedDirectory's\n * valueChanged event, this is emitted only on the IDirectory that directly contains the key.\n *\n * #### Listener signature\n *\n * ```typescript\n * (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `changed` - Information on the key that changed and its value prior to the change.\n *\n * - `local` - Whether the change originated from the this client.\n *\n *\n * - `target` - The IDirectory itself.\n * ### \"subDirectoryCreated\"\n *\n * The subDirectoryCreated event is emitted when a subdirectory is created.\n *\n * #### Listener signature\n *\n * ```typescript\n * (path: string, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `path` - The relative path to the subdirectory that is created.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the creation originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * * ### \"subDirectoryDeleted\"\n *\n * The subDirectoryDeleted event is emitted when a subdirectory is deleted.\n *\n * #### Listener signature\n *\n * ```typescript\n * (path: string, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `path` - The relative path to the subdirectory that is deleted.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the delete originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * ### \"disposed\"\n *\n * The dispose event is emitted when this sub directory is deleted.\n *\n * #### Listener signature\n *\n * ```typescript\n * (local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n *\n * - `target` - The IDirectory itself.\n */\nexport interface IDirectoryEvents extends IEvent {\n (event: \"containedValueChanged\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n (event: \"subDirectoryCreated\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"subDirectoryDeleted\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n (event: \"disposed\", listener: (\n target: IEventThisPlaceHolder,\n ) => void);\n}\n\n/**\n * Interface describing a shared directory.\n */\nexport interface ISharedDirectory extends\n ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>,\n Omit<IDirectory, \"on\" | \"once\" | \"off\"> {\n // The Omit type excludes symbols, which we don't want to exclude. Adding them back here manually.\n // https://github.com/microsoft/TypeScript/issues/31671\n [Symbol.iterator](): IterableIterator<[string, any]>;\n readonly [Symbol.toStringTag]: string;\n}\n\n/**\n * Type of \"valueChanged\" event parameter for SharedDirectory\n */\nexport interface IDirectoryValueChanged extends IValueChanged {\n /**\n * The absolute path to the IDirectory storing the key which changed.\n */\n path: string;\n}\n\n/**\n * Events emitted in response to changes to the map data.\n *\n * ### \"valueChanged\"\n *\n * The valueChanged event is emitted when a key is set or deleted.\n *\n * #### Listener signature\n *\n * ```typescript\n * (\n * changed: IValueChanged,\n * local: boolean,\n * target: IEventThisPlaceHolder,\n * ) => void\n * ```\n * - `changed` - Information on the key that changed and its value prior to the change.\n *\n * - `local` - Whether the change originated from the this client.\n *\n * - `target` - The map itself.\n *\n * ### \"clear\"\n *\n * The clear event is emitted when the map is cleared.\n *\n * #### Listener signature\n *\n * ```typescript\n * (local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `local` - Whether the clear originated from the this client.\n *\n * - `target` - The map itself.\n */\nexport interface ISharedMapEvents extends ISharedObjectEvents {\n (event: \"valueChanged\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n (event: \"clear\", listener: (\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * Shared map interface\n */\nexport interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {\n /**\n * Retrieves the given key from the map.\n * @param key - Key to retrieve from\n * @returns The stored value, or undefined if the key is not set\n */\n get<T = any>(key: string): T | undefined;\n\n /**\n * Sets the value stored at key to the provided value.\n * @param key - Key to set at\n * @param value - Value to set\n * @returns The ISharedMap itself\n */\n set<T = any>(key: string, value: T): this;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * ISerializableValue.type to understand whether they're storing a Plain JS object, a SharedObject, or a value type.\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n * If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will\n * just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members\n * that are ISerializedHandle (the serialized form of a handle).\n * If type is a value type then it must be amongst the types registered via registerValueType or we won't know how\n * to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.\n * If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a\n * channel ID. This type is legacy and deprecated.\n */\nexport interface ISerializableValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * The JSONable representation of the value.\n */\n value: any;\n}\n\nexport interface ISerializedValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * String representation of the value.\n */\n value: string | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISharedObject, ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport { IDisposable, IEvent, IEventProvider, IEventThisPlaceHolder } from \"@fluidframework/common-definitions\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n */\nexport interface IValueChanged {\n /**\n * The key storing the value that changed.\n */\n key: string;\n\n /**\n * The value that was stored at the key prior to the change.\n */\n previousValue: any;\n}\n\n/**\n * Interface describing actions on a directory.\n *\n * @remarks\n * When used as a Map, operates on its keys.\n */\nexport interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {\n /**\n * The absolute path of the directory.\n */\n readonly absolutePath: string;\n\n /**\n * Retrieves the value stored at the given key from the directory.\n * @param key - Key to retrieve from\n * @returns The stored value, or undefined if the key is not set\n */\n get<T = any>(key: string): T | undefined;\n\n /**\n * Sets the value stored at key to the provided value.\n * @param key - Key to set at\n * @param value - Value to set\n * @returns The IDirectory itself\n */\n set<T = any>(key: string, value: T): this;\n\n /**\n * Get the number of sub directory within the directory.\n * @returns The number of sub directory within a directory.\n */\n countSubDirectory?(): number;\n\n /**\n * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the\n * same name already exists.\n * @param subdirName - Name of the new child directory to create\n * @returns The IDirectory child that was created or retrieved\n */\n createSubDirectory(subdirName: string): IDirectory;\n\n /**\n * Gets an IDirectory child of this IDirectory, if it exists.\n * @param subdirName - Name of the child directory to get\n * @returns The requested IDirectory\n */\n getSubDirectory(subdirName: string): IDirectory | undefined;\n\n /**\n * Checks whether this directory has a child directory with the given name.\n * @param subdirName - Name of the child directory to check\n * @returns True if it exists, false otherwise\n */\n hasSubDirectory(subdirName: string): boolean;\n\n /**\n * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.\n * @param subdirName - Name of the child directory to delete\n * @returns True if the IDirectory existed and was deleted, false if it did not exist\n */\n deleteSubDirectory(subdirName: string): boolean;\n\n /**\n * Gets an iterator over the IDirectory children of this IDirectory.\n * @returns The IDirectory iterator\n */\n subdirectories(): IterableIterator<[string, IDirectory]>;\n\n /**\n * Get an IDirectory within the directory, in order to use relative paths from that location.\n * @param relativePath - Path of the IDirectory to get, relative to this IDirectory\n * @returns The requested IDirectory\n */\n getWorkingDirectory(relativePath: string): IDirectory | undefined;\n}\n\n/**\n * Events emitted in response to changes to the directory data. These events only emit on the ISharedDirectory itself,\n * and not on subdirectories.\n *\n * @remarks\n *\n * The following is the list of events emitted.\n *\n * ### \"valueChanged\"\n *\n * The valueChanged event is emitted when a key is set or deleted. This is emitted for any key in the ISharedDirectory\n * or any subdirectory.\n *\n * #### Listener signature\n *\n * ```typescript\n * (\n * changed: IDirectoryValueChanged,\n * local: boolean,\n * target: IEventThisPlaceHolder,\n * ) => void\n * ```\n * - `changed` - Information on the key that changed, its value prior to the change, and the path to the key that\n * changed.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * ### \"clear\"\n *\n * The clear event is emitted when the ISharedDirectory is cleared.\n *\n * #### Listener signature\n *\n * ```typescript\n * (local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `local` - Whether the clear originated from this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * ### \"subDirectoryCreated\"\n *\n * The subDirectoryCreated event is emitted when a subdirectory is created.\n *\n * #### Listener signature\n *\n * ```typescript\n * (path: string, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `path` - The relative path to the subdirectory that is created.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the create originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * ###\"subDirectoryDeleted\"\n *\n * The subDirectoryDeleted event is emitted when a subdirectory is deleted.\n *\n * #### Listener signature\n *\n * ```typescript\n * (path: string, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `path` - The relative path to the subdirectory that is deleted.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the delete originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n */\nexport interface ISharedDirectoryEvents extends ISharedObjectEvents {\n (event: \"valueChanged\", listener: (\n changed: IDirectoryValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n (event: \"clear\", listener: (\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n (event: \"subDirectoryCreated\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"subDirectoryDeleted\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n *\n * @remarks\n *\n * The following is the list of events emitted.\n *\n * ### \"containedValueChanged\"\n *\n * The containedValueChanged event is emitted when a key is set or deleted. As opposed to the SharedDirectory's\n * valueChanged event, this is emitted only on the IDirectory that directly contains the key.\n *\n * #### Listener signature\n *\n * ```typescript\n * (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `changed` - Information on the key that changed and its value prior to the change.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The IDirectory itself.\n *\n * ### \"subDirectoryCreated\"\n *\n * The subDirectoryCreated event is emitted when a subdirectory is created.\n *\n * #### Listener signature\n *\n * ```typescript\n * (path: string, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `path` - The relative path to the subdirectory that is created.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the creation originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * ### \"subDirectoryDeleted\"\n *\n * The subDirectoryDeleted event is emitted when a subdirectory is deleted.\n *\n * #### Listener signature\n *\n * ```typescript\n * (path: string, local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `path` - The relative path to the subdirectory that is deleted.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the delete originated from the this client.\n *\n * - `target` - The ISharedDirectory itself.\n *\n * ### \"disposed\"\n *\n * The dispose event is emitted when this sub directory is deleted.\n *\n * #### Listener signature\n *\n * ```typescript\n * (local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n *\n * - `target` - The IDirectory itself.\n */\nexport interface IDirectoryEvents extends IEvent {\n (event: \"containedValueChanged\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n (event: \"subDirectoryCreated\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"subDirectoryDeleted\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n (event: \"disposed\", listener: (\n target: IEventThisPlaceHolder,\n ) => void);\n}\n\n/**\n * Interface describing a shared directory.\n */\nexport interface ISharedDirectory extends\n ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>,\n Omit<IDirectory, \"on\" | \"once\" | \"off\"> {\n // The Omit type excludes symbols, which we don't want to exclude. Adding them back here manually.\n // https://github.com/microsoft/TypeScript/issues/31671\n [Symbol.iterator](): IterableIterator<[string, any]>;\n readonly [Symbol.toStringTag]: string;\n}\n\n/**\n * Type of \"valueChanged\" event parameter for SharedDirectory.\n */\nexport interface IDirectoryValueChanged extends IValueChanged {\n /**\n * The absolute path to the IDirectory storing the key which changed.\n */\n path: string;\n}\n\n/**\n * Events emitted in response to changes to the map data.\n *\n * @remarks\n *\n * The following is the list of events emitted.\n *\n * ### \"valueChanged\"\n *\n * The valueChanged event is emitted when a key is set or deleted.\n *\n * #### Listener signature\n *\n * ```typescript\n * (\n * changed: IValueChanged,\n * local: boolean,\n * target: IEventThisPlaceHolder,\n * ) => void\n * ```\n * - `changed` - Information on the key that changed and its value prior to the change.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The map itself.\n *\n * ### \"clear\"\n *\n * The clear event is emitted when the map is cleared.\n *\n * #### Listener signature\n *\n * ```typescript\n * (local: boolean, target: IEventThisPlaceHolder) => void\n * ```\n * - `local` - Whether the clear originated from this client.\n *\n * - `target` - The map itself.\n */\nexport interface ISharedMapEvents extends ISharedObjectEvents {\n (event: \"valueChanged\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n (event: \"clear\", listener: (\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * Shared map interface\n */\nexport interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {\n /**\n * Retrieves the given key from the map.\n * @param key - Key to retrieve from\n * @returns The stored value, or undefined if the key is not set\n */\n get<T = any>(key: string): T | undefined;\n\n /**\n * Sets the value stored at key to the provided value.\n * @param key - Key to set at\n * @param value - Value to set\n * @returns The ISharedMap itself\n */\n set<T = any>(key: string, value: T): this;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * ISerializableValue.type to understand whether they're storing a Plain JS object, a SharedObject, or a value type.\n *\n * @remarks\n *\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n * If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will\n * just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members\n * that are ISerializedHandle (the serialized form of a handle).\n * If type is a value type then it must be amongst the types registered via registerValueType or we won't know how\n * to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.\n * If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a\n * channel ID. This type is legacy and deprecated.\n */\nexport interface ISerializableValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * The JSONable representation of the value.\n */\n value: any;\n}\n\nexport interface ISerializedValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * String representation of the value.\n */\n value: string | undefined;\n}\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
package/dist/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,qBAAqB,CAAC;AAChC,QAAA,UAAU,GAAG,OAAO,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
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,qBAAqB,CAAC;AAChC,QAAA,UAAU,GAAG,OAAO,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.2.0\";\n"]}
|
package/lib/directory.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { LocalValueMaker } from "./localValues";
|
|
|
11
11
|
/**
|
|
12
12
|
* Operation indicating a value should be set for a key.
|
|
13
13
|
*/
|
|
14
|
-
interface IDirectorySetOperation {
|
|
14
|
+
export interface IDirectorySetOperation {
|
|
15
15
|
/**
|
|
16
16
|
* String identifier of the operation type.
|
|
17
17
|
*/
|
|
@@ -32,7 +32,7 @@ interface IDirectorySetOperation {
|
|
|
32
32
|
/**
|
|
33
33
|
* Operation indicating a key should be deleted from the directory.
|
|
34
34
|
*/
|
|
35
|
-
interface IDirectoryDeleteOperation {
|
|
35
|
+
export interface IDirectoryDeleteOperation {
|
|
36
36
|
/**
|
|
37
37
|
* String identifier of the operation type.
|
|
38
38
|
*/
|
|
@@ -49,11 +49,11 @@ interface IDirectoryDeleteOperation {
|
|
|
49
49
|
/**
|
|
50
50
|
* An operation on a specific key within a directory
|
|
51
51
|
*/
|
|
52
|
-
declare type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;
|
|
52
|
+
export declare type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;
|
|
53
53
|
/**
|
|
54
54
|
* Operation indicating the directory should be cleared.
|
|
55
55
|
*/
|
|
56
|
-
interface IDirectoryClearOperation {
|
|
56
|
+
export interface IDirectoryClearOperation {
|
|
57
57
|
/**
|
|
58
58
|
* String identifier of the operation type.
|
|
59
59
|
*/
|
|
@@ -66,11 +66,11 @@ interface IDirectoryClearOperation {
|
|
|
66
66
|
/**
|
|
67
67
|
* An operation on one or more of the keys within a directory
|
|
68
68
|
*/
|
|
69
|
-
declare type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;
|
|
69
|
+
export declare type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;
|
|
70
70
|
/**
|
|
71
71
|
* Operation indicating a subdirectory should be created.
|
|
72
72
|
*/
|
|
73
|
-
interface IDirectoryCreateSubDirectoryOperation {
|
|
73
|
+
export interface IDirectoryCreateSubDirectoryOperation {
|
|
74
74
|
/**
|
|
75
75
|
* String identifier of the operation type.
|
|
76
76
|
*/
|
|
@@ -87,7 +87,7 @@ interface IDirectoryCreateSubDirectoryOperation {
|
|
|
87
87
|
/**
|
|
88
88
|
* Operation indicating a subdirectory should be deleted.
|
|
89
89
|
*/
|
|
90
|
-
interface IDirectoryDeleteSubDirectoryOperation {
|
|
90
|
+
export interface IDirectoryDeleteSubDirectoryOperation {
|
|
91
91
|
/**
|
|
92
92
|
* String identifier of the operation type.
|
|
93
93
|
*/
|
|
@@ -104,7 +104,7 @@ interface IDirectoryDeleteSubDirectoryOperation {
|
|
|
104
104
|
/**
|
|
105
105
|
* An operation on the subdirectories within a directory
|
|
106
106
|
*/
|
|
107
|
-
declare type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirectoryOperation | IDirectoryDeleteSubDirectoryOperation;
|
|
107
|
+
export declare type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirectoryOperation | IDirectoryDeleteSubDirectoryOperation;
|
|
108
108
|
/**
|
|
109
109
|
* Any operation on a directory
|
|
110
110
|
*/
|
|
@@ -162,7 +162,7 @@ export declare class DirectoryFactory {
|
|
|
162
162
|
* SubDirectories can be retrieved for use as working directories.
|
|
163
163
|
*
|
|
164
164
|
* @example
|
|
165
|
-
* ```
|
|
165
|
+
* ```typescript
|
|
166
166
|
* mySharedDirectory.createSubDirectory("a").createSubDirectory("b").createSubDirectory("c").set("foo", val1);
|
|
167
167
|
* const mySubDir = mySharedDirectory.getWorkingDirectory("/a/b/c");
|
|
168
168
|
* mySubDir.get("foo"); // returns val1
|
|
@@ -335,6 +335,11 @@ export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents
|
|
|
335
335
|
* @internal
|
|
336
336
|
*/
|
|
337
337
|
protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
338
|
+
/**
|
|
339
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.rollback}
|
|
340
|
+
* @internal
|
|
341
|
+
*/
|
|
342
|
+
protected rollback(content: any, localOpMetadata: unknown): void;
|
|
338
343
|
/**
|
|
339
344
|
* Converts the given relative path to absolute against the root.
|
|
340
345
|
* @param relativePath - The path to convert
|
|
@@ -361,5 +366,4 @@ export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents
|
|
|
361
366
|
protected applyStashedOp(): void;
|
|
362
367
|
private serializeDirectory;
|
|
363
368
|
}
|
|
364
|
-
export {};
|
|
365
369
|
//# sourceMappingURL=directory.d.ts.map
|
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,OAAO,EACH,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EAClB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,iBAAi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