@dra2020/baseclient 1.0.126 → 1.0.128
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/dist/baseclient.js +5 -3
- package/dist/baseclient.js.map +1 -1
- package/dist/ot-js/otsession.d.ts +2 -0
- package/docs/fsm.md +22 -0
- package/lib/ot-js/otsession.ts +4 -2
- package/package.json +9 -9
|
@@ -21,7 +21,9 @@ export declare const FilterTrash: number;
|
|
|
21
21
|
export declare const FilterPublic: number;
|
|
22
22
|
export declare const FilterOfficial: number;
|
|
23
23
|
export declare const FilterCOI: number;
|
|
24
|
+
export declare const FilterMyGroupMaps: number;
|
|
24
25
|
export declare const FilterMyGroups: number;
|
|
26
|
+
export declare const FilterMyDatasets: number;
|
|
25
27
|
export declare const FilterCount: number;
|
|
26
28
|
export declare type Filter = number;
|
|
27
29
|
export declare const PermNone: number;
|
package/docs/fsm.md
CHANGED
|
@@ -204,6 +204,28 @@ The class should override the `end` member function if it needs to do cleanup an
|
|
|
204
204
|
If a class internally is implemented with callbacks or promises, by convention it should check `if this.done`
|
|
205
205
|
when the callback or promise completes to check whether it may have been externally canceled while awaiting.
|
|
206
206
|
|
|
207
|
+
### waitOnCompletion
|
|
208
|
+
|
|
209
|
+
In some cases, a waiting `Fsm` wants to know immediately whether a dependent `Fsm` has completed.
|
|
210
|
+
For example, it might want to keep a queue filled rather than wait until all dependent state machines
|
|
211
|
+
have completed and it has transitioned to a ready state.
|
|
212
|
+
|
|
213
|
+
Additionally, entering the `tick()` function simply indicates _any_ `Fsm` may have completed and determining which
|
|
214
|
+
is `done` would normally require a linear walk through all dependents. This linear walk can risk introducing
|
|
215
|
+
O(N^2) behavior.
|
|
216
|
+
|
|
217
|
+
In these cases, an `Fsm` subclass may override the `waitOnCompletion` member function to get notified of
|
|
218
|
+
a completion. This gets called when any dependent machine completes with success or failure.
|
|
219
|
+
For example:
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
waitOnCompletion(fsm: Fsm): void
|
|
223
|
+
{
|
|
224
|
+
// Some processing on child completion, e.g.
|
|
225
|
+
this.nFailures += fsm.iserror ? 1 : 0;
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
207
229
|
### FsmOnDone
|
|
208
230
|
|
|
209
231
|
A simple utility class `FsmOnDone` provides a way of integrating a callback with an Fsm-based infrastructor.
|
package/lib/ot-js/otsession.ts
CHANGED
|
@@ -24,8 +24,10 @@ export const FilterTrash: number = 4;
|
|
|
24
24
|
export const FilterPublic: number = 5;
|
|
25
25
|
export const FilterOfficial: number = 6;
|
|
26
26
|
export const FilterCOI: number = 7;
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
27
|
+
export const FilterMyGroupMaps: number = 8;
|
|
28
|
+
export const FilterMyGroups: number = 9;
|
|
29
|
+
export const FilterMyDatasets: number = 10;
|
|
30
|
+
export const FilterCount: number = 11;
|
|
29
31
|
export type Filter = number;
|
|
30
32
|
|
|
31
33
|
// Permissions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dra2020/baseclient",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.128",
|
|
4
4
|
"description": "Utility functions for Javascript projects.",
|
|
5
5
|
"main": "dist/baseclient.js",
|
|
6
6
|
"types": "./dist/all/all.d.ts",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/diff-match-patch": "^1.0.32",
|
|
32
32
|
"@types/geojson": "^7946.0.8",
|
|
33
|
-
"@types/node": "
|
|
34
|
-
"@types/object-hash": "^
|
|
35
|
-
"source-map-loader": "^
|
|
36
|
-
"ts-loader": "^9.
|
|
33
|
+
"@types/node": "20.11.30",
|
|
34
|
+
"@types/object-hash": "^3.0.6",
|
|
35
|
+
"source-map-loader": "^5.0.0",
|
|
36
|
+
"ts-loader": "^9.5.1",
|
|
37
37
|
"tsify": "^5.0.4",
|
|
38
|
-
"typescript": "^4.
|
|
39
|
-
"webpack": "^5.
|
|
40
|
-
"webpack-cli": "^
|
|
38
|
+
"typescript": "^5.4.3",
|
|
39
|
+
"webpack": "^5.91.0",
|
|
40
|
+
"webpack-cli": "^5.1.4"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@dra2020/topojson-client": "^3.2.12",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@dra2020/topojson-simplify": "^3.0.102",
|
|
46
46
|
"diff-match-patch": "^1.0.5",
|
|
47
47
|
"geojson": "^0.5.0",
|
|
48
|
-
"object-hash": "^
|
|
48
|
+
"object-hash": "^3.0.0",
|
|
49
49
|
"polygon-clipping": "^0.15.3",
|
|
50
50
|
"tinyqueue": "^2.0.3"
|
|
51
51
|
}
|