@fluidframework/map 2.0.0-internal.6.3.3 → 2.0.0-internal.7.0.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 +48 -0
- package/dist/directory.d.ts +6 -5
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +34 -29
- package/dist/directory.js.map +1 -1
- package/dist/internalInterfaces.d.ts +2 -2
- package/dist/internalInterfaces.d.ts.map +1 -1
- package/dist/map.js +15 -15
- package/dist/map.js.map +1 -1
- package/dist/mapKernel.d.ts +2 -2
- package/dist/mapKernel.d.ts.map +1 -1
- package/dist/mapKernel.js +6 -6
- 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/dist/tsdoc-metadata.json +1 -1
- package/lib/directory.d.ts +6 -5
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.js +29 -28
- package/lib/directory.js.map +1 -1
- package/lib/internalInterfaces.d.ts +2 -2
- package/lib/internalInterfaces.d.ts.map +1 -1
- package/lib/map.js +15 -15
- package/lib/map.js.map +1 -1
- package/lib/mapKernel.d.ts +2 -2
- package/lib/mapKernel.d.ts.map +1 -1
- package/lib/mapKernel.js +6 -6
- 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 +20 -20
- package/src/directory.ts +5 -4
- package/src/packageVersion.ts +1 -1
package/lib/directory.js
CHANGED
|
@@ -68,6 +68,7 @@ DirectoryFactory.Attributes = {
|
|
|
68
68
|
* {@inheritDoc ISharedDirectory}
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
|
+
*
|
|
71
72
|
* ```typescript
|
|
72
73
|
* mySharedDirectory.createSubDirectory("a").createSubDirectory("b").createSubDirectory("c").set("foo", val1);
|
|
73
74
|
* const mySubDir = mySharedDirectory.getWorkingDirectory("/a/b/c");
|
|
@@ -77,6 +78,30 @@ DirectoryFactory.Attributes = {
|
|
|
77
78
|
* @sealed
|
|
78
79
|
*/
|
|
79
80
|
export class SharedDirectory extends SharedObject {
|
|
81
|
+
/**
|
|
82
|
+
* Create a new shared directory
|
|
83
|
+
*
|
|
84
|
+
* @param runtime - Data store runtime the new shared directory belongs to
|
|
85
|
+
* @param id - Optional name of the shared directory
|
|
86
|
+
* @returns Newly create shared directory (but not attached yet)
|
|
87
|
+
*/
|
|
88
|
+
static create(runtime, id) {
|
|
89
|
+
return runtime.createChannel(id, DirectoryFactory.Type);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get a factory for SharedDirectory to register with the data store.
|
|
93
|
+
*
|
|
94
|
+
* @returns A factory that creates and load SharedDirectory
|
|
95
|
+
*/
|
|
96
|
+
static getFactory() {
|
|
97
|
+
return new DirectoryFactory();
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* {@inheritDoc IDirectory.absolutePath}
|
|
101
|
+
*/
|
|
102
|
+
get absolutePath() {
|
|
103
|
+
return this.root.absolutePath;
|
|
104
|
+
}
|
|
80
105
|
/**
|
|
81
106
|
* Constructs a new shared directory. If the object is non-local an id and service interfaces will
|
|
82
107
|
* be provided.
|
|
@@ -111,30 +136,6 @@ export class SharedDirectory extends SharedObject {
|
|
|
111
136
|
this.emit("subDirectoryDeleted", relativePath, local, this);
|
|
112
137
|
});
|
|
113
138
|
}
|
|
114
|
-
/**
|
|
115
|
-
* Create a new shared directory
|
|
116
|
-
*
|
|
117
|
-
* @param runtime - Data store runtime the new shared directory belongs to
|
|
118
|
-
* @param id - Optional name of the shared directory
|
|
119
|
-
* @returns Newly create shared directory (but not attached yet)
|
|
120
|
-
*/
|
|
121
|
-
static create(runtime, id) {
|
|
122
|
-
return runtime.createChannel(id, DirectoryFactory.Type);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Get a factory for SharedDirectory to register with the data store.
|
|
126
|
-
*
|
|
127
|
-
* @returns A factory that creates and load SharedDirectory
|
|
128
|
-
*/
|
|
129
|
-
static getFactory() {
|
|
130
|
-
return new DirectoryFactory();
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* {@inheritDoc IDirectory.absolutePath}
|
|
134
|
-
*/
|
|
135
|
-
get absolutePath() {
|
|
136
|
-
return this.root.absolutePath;
|
|
137
|
-
}
|
|
138
139
|
/**
|
|
139
140
|
* {@inheritDoc IDirectory.get}
|
|
140
141
|
*/
|
|
@@ -420,7 +421,7 @@ export class SharedDirectory extends SharedObject {
|
|
|
420
421
|
/**
|
|
421
422
|
* This checks if there is pending delete op for local delete for a any subdir in the relative path.
|
|
422
423
|
* @param relativePath - path of sub directory.
|
|
423
|
-
* @returns
|
|
424
|
+
* @returns `true` if there is pending delete, `false` otherwise.
|
|
424
425
|
*/
|
|
425
426
|
isSubDirectoryDeletePending(relativePath) {
|
|
426
427
|
const absolutePath = this.makeAbsolute(relativePath);
|
|
@@ -823,7 +824,7 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
823
824
|
}
|
|
824
825
|
/**
|
|
825
826
|
* @returns A sequenceNumber which should be used for local changes.
|
|
826
|
-
* @remarks
|
|
827
|
+
* @remarks While detached, 0 is used rather than -1 to represent a change which should be universally known (as opposed to known
|
|
827
828
|
* only by the local client). This ensures that if the directory is later attached, none of its data needs to be updated (the values
|
|
828
829
|
* last set while detached will now be known to any new client, until they are changed).
|
|
829
830
|
* TODO: Convert these conventions to named constants. The semantics used here match those for merge-tree.
|
|
@@ -884,7 +885,7 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
884
885
|
/**
|
|
885
886
|
* This checks if there is pending delete op for local delete for a given child subdirectory.
|
|
886
887
|
* @param subDirName - directory name.
|
|
887
|
-
* @returns
|
|
888
|
+
* @returns true if there is pending delete.
|
|
888
889
|
*/
|
|
889
890
|
isSubDirectoryDeletePending(subDirName) {
|
|
890
891
|
if (this.pendingDeleteSubDirectoriesTracker.has(subDirName)) {
|
|
@@ -1668,7 +1669,7 @@ class SubDirectory extends TypedEventEmitter {
|
|
|
1668
1669
|
* @param local - Whether the message originated from the local client
|
|
1669
1670
|
* @param seq - Sequence number at which this directory is created
|
|
1670
1671
|
* @param clientId - Id of client which created this directory.
|
|
1671
|
-
* @returns
|
|
1672
|
+
* @returns True if is newly created, false if it already existed.
|
|
1672
1673
|
*/
|
|
1673
1674
|
createSubDirectoryCore(subdirName, local, seq, clientId) {
|
|
1674
1675
|
const subdir = this._subdirectories.get(subdirName);
|