@jbrowse/core 3.5.0 → 3.5.1
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/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +1 -1
- package/PhasedScheduler.d.ts +7 -0
- package/PhasedScheduler.js +28 -0
- package/Plugin.d.ts +2 -0
- package/PluginManager.d.ts +4 -8
- package/PluginManager.js +27 -27
- package/assemblyManager/assembly.d.ts +7 -5
- package/assemblyManager/assembly.js +21 -15
- package/assemblyManager/assemblyManager.d.ts +42 -70
- package/data_adapters/dataAdapterCache.d.ts +1 -1
- package/data_adapters/dataAdapterCache.js +28 -24
- package/package.json +2 -3
- package/rpc/methods/CoreFreeResources.js +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/CascadingMenu.d.ts +1 -1
- package/ui/CascadingMenu.js +27 -16
- package/ui/CascadingMenuButton.js +3 -12
- package/ui/DropDownMenu.d.ts +3 -2
- package/ui/DropDownMenu.js +3 -3
- package/ui/HoverMenu.d.ts +4 -0
- package/ui/HoverMenu.js +50 -0
- package/ui/Icons.d.ts +0 -5
- package/ui/Icons.js +0 -20
- package/ui/hooks.d.ts +66 -0
- package/ui/hooks.js +185 -0
- package/ui/useEvent.d.ts +1 -0
- package/ui/useEvent.js +47 -0
|
@@ -14,18 +14,18 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
14
14
|
refNameAliases: {
|
|
15
15
|
[x: string]: string;
|
|
16
16
|
} | undefined;
|
|
17
|
-
lowerCaseRefNameAliases: {
|
|
18
|
-
[x: string]: string;
|
|
19
|
-
} | undefined;
|
|
20
17
|
cytobands: import("../util").Feature[] | undefined;
|
|
21
18
|
} & {
|
|
22
19
|
getConf(arg: string): any;
|
|
20
|
+
readonly lowerCaseRefNameAliases: {
|
|
21
|
+
[k: string]: string;
|
|
22
|
+
} | undefined;
|
|
23
23
|
} & {
|
|
24
24
|
readonly initialized: boolean;
|
|
25
25
|
readonly name: string;
|
|
26
26
|
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
27
27
|
readonly aliases: string[];
|
|
28
|
-
readonly displayName: string
|
|
28
|
+
readonly displayName: string;
|
|
29
29
|
hasName(name: string): boolean;
|
|
30
30
|
readonly allAliases: string[];
|
|
31
31
|
readonly allRefNames: string[] | undefined;
|
|
@@ -40,22 +40,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
40
40
|
getRefNameColor(refName: string): string | undefined;
|
|
41
41
|
isValidRefName(refName: string): boolean;
|
|
42
42
|
} & {
|
|
43
|
-
setLoaded({ regions, refNameAliases,
|
|
43
|
+
setLoaded({ regions, refNameAliases, cytobands, }: {
|
|
44
44
|
regions: import("../util").Region[];
|
|
45
45
|
refNameAliases: {
|
|
46
46
|
[x: string]: string;
|
|
47
47
|
};
|
|
48
|
-
lowerCaseRefNameAliases: {
|
|
49
|
-
[x: string]: string;
|
|
50
|
-
};
|
|
51
48
|
cytobands: import("../util").Feature[];
|
|
52
49
|
}): void;
|
|
53
50
|
setError(e: unknown): void;
|
|
54
51
|
setRegions(regions: import("../util").Region[]): void;
|
|
55
52
|
setRefNameAliases(aliases: {
|
|
56
53
|
[x: string]: string;
|
|
57
|
-
}, lowerCaseAliases: {
|
|
58
|
-
[x: string]: string;
|
|
59
54
|
}): void;
|
|
60
55
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
61
56
|
setLoadingP(p?: Promise<void>): void;
|
|
@@ -75,6 +70,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
75
70
|
}, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
76
71
|
[x: string]: string;
|
|
77
72
|
}>;
|
|
73
|
+
afterCreate(): void;
|
|
78
74
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
79
75
|
}, {
|
|
80
76
|
readonly assemblyNameMap: Record<string, {
|
|
@@ -86,18 +82,18 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
86
82
|
refNameAliases: {
|
|
87
83
|
[x: string]: string;
|
|
88
84
|
} | undefined;
|
|
89
|
-
lowerCaseRefNameAliases: {
|
|
90
|
-
[x: string]: string;
|
|
91
|
-
} | undefined;
|
|
92
85
|
cytobands: import("../util").Feature[] | undefined;
|
|
93
86
|
} & {
|
|
94
87
|
getConf(arg: string): any;
|
|
88
|
+
readonly lowerCaseRefNameAliases: {
|
|
89
|
+
[k: string]: string;
|
|
90
|
+
} | undefined;
|
|
95
91
|
} & {
|
|
96
92
|
readonly initialized: boolean;
|
|
97
93
|
readonly name: string;
|
|
98
94
|
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
99
95
|
readonly aliases: string[];
|
|
100
|
-
readonly displayName: string
|
|
96
|
+
readonly displayName: string;
|
|
101
97
|
hasName(name: string): boolean;
|
|
102
98
|
readonly allAliases: string[];
|
|
103
99
|
readonly allRefNames: string[] | undefined;
|
|
@@ -112,22 +108,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
112
108
|
getRefNameColor(refName: string): string | undefined;
|
|
113
109
|
isValidRefName(refName: string): boolean;
|
|
114
110
|
} & {
|
|
115
|
-
setLoaded({ regions, refNameAliases,
|
|
111
|
+
setLoaded({ regions, refNameAliases, cytobands, }: {
|
|
116
112
|
regions: import("../util").Region[];
|
|
117
113
|
refNameAliases: {
|
|
118
114
|
[x: string]: string;
|
|
119
115
|
};
|
|
120
|
-
lowerCaseRefNameAliases: {
|
|
121
|
-
[x: string]: string;
|
|
122
|
-
};
|
|
123
116
|
cytobands: import("../util").Feature[];
|
|
124
117
|
}): void;
|
|
125
118
|
setError(e: unknown): void;
|
|
126
119
|
setRegions(regions: import("../util").Region[]): void;
|
|
127
120
|
setRefNameAliases(aliases: {
|
|
128
121
|
[x: string]: string;
|
|
129
|
-
}, lowerCaseAliases: {
|
|
130
|
-
[x: string]: string;
|
|
131
122
|
}): void;
|
|
132
123
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
133
124
|
setLoadingP(p?: Promise<void>): void;
|
|
@@ -147,6 +138,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
147
138
|
}, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
148
139
|
[x: string]: string;
|
|
149
140
|
}>;
|
|
141
|
+
afterCreate(): void;
|
|
150
142
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
151
143
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
152
144
|
}, {
|
|
@@ -156,18 +148,18 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
156
148
|
refNameAliases: {
|
|
157
149
|
[x: string]: string;
|
|
158
150
|
} | undefined;
|
|
159
|
-
lowerCaseRefNameAliases: {
|
|
160
|
-
[x: string]: string;
|
|
161
|
-
} | undefined;
|
|
162
151
|
cytobands: import("../util").Feature[] | undefined;
|
|
163
152
|
} & {
|
|
164
153
|
getConf(arg: string): any;
|
|
154
|
+
readonly lowerCaseRefNameAliases: {
|
|
155
|
+
[k: string]: string;
|
|
156
|
+
} | undefined;
|
|
165
157
|
} & {
|
|
166
158
|
readonly initialized: boolean;
|
|
167
159
|
readonly name: string;
|
|
168
160
|
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
169
161
|
readonly aliases: string[];
|
|
170
|
-
readonly displayName: string
|
|
162
|
+
readonly displayName: string;
|
|
171
163
|
hasName(name: string): boolean;
|
|
172
164
|
readonly allAliases: string[];
|
|
173
165
|
readonly allRefNames: string[] | undefined;
|
|
@@ -182,22 +174,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
182
174
|
getRefNameColor(refName: string): string | undefined;
|
|
183
175
|
isValidRefName(refName: string): boolean;
|
|
184
176
|
} & {
|
|
185
|
-
setLoaded({ regions, refNameAliases,
|
|
177
|
+
setLoaded({ regions, refNameAliases, cytobands, }: {
|
|
186
178
|
regions: import("../util").Region[];
|
|
187
179
|
refNameAliases: {
|
|
188
180
|
[x: string]: string;
|
|
189
181
|
};
|
|
190
|
-
lowerCaseRefNameAliases: {
|
|
191
|
-
[x: string]: string;
|
|
192
|
-
};
|
|
193
182
|
cytobands: import("../util").Feature[];
|
|
194
183
|
}): void;
|
|
195
184
|
setError(e: unknown): void;
|
|
196
185
|
setRegions(regions: import("../util").Region[]): void;
|
|
197
186
|
setRefNameAliases(aliases: {
|
|
198
187
|
[x: string]: string;
|
|
199
|
-
}, lowerCaseAliases: {
|
|
200
|
-
[x: string]: string;
|
|
201
188
|
}): void;
|
|
202
189
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
203
190
|
setLoadingP(p?: Promise<void>): void;
|
|
@@ -217,6 +204,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
217
204
|
}, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
218
205
|
[x: string]: string;
|
|
219
206
|
}>;
|
|
207
|
+
afterCreate(): void;
|
|
220
208
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
221
209
|
} & {
|
|
222
210
|
get(asmName: string): ({
|
|
@@ -228,18 +216,18 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
228
216
|
refNameAliases: {
|
|
229
217
|
[x: string]: string;
|
|
230
218
|
} | undefined;
|
|
231
|
-
lowerCaseRefNameAliases: {
|
|
232
|
-
[x: string]: string;
|
|
233
|
-
} | undefined;
|
|
234
219
|
cytobands: import("../util").Feature[] | undefined;
|
|
235
220
|
} & {
|
|
236
221
|
getConf(arg: string): any;
|
|
222
|
+
readonly lowerCaseRefNameAliases: {
|
|
223
|
+
[k: string]: string;
|
|
224
|
+
} | undefined;
|
|
237
225
|
} & {
|
|
238
226
|
readonly initialized: boolean;
|
|
239
227
|
readonly name: string;
|
|
240
228
|
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
241
229
|
readonly aliases: string[];
|
|
242
|
-
readonly displayName: string
|
|
230
|
+
readonly displayName: string;
|
|
243
231
|
hasName(name: string): boolean;
|
|
244
232
|
readonly allAliases: string[];
|
|
245
233
|
readonly allRefNames: string[] | undefined;
|
|
@@ -254,22 +242,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
254
242
|
getRefNameColor(refName: string): string | undefined;
|
|
255
243
|
isValidRefName(refName: string): boolean;
|
|
256
244
|
} & {
|
|
257
|
-
setLoaded({ regions, refNameAliases,
|
|
245
|
+
setLoaded({ regions, refNameAliases, cytobands, }: {
|
|
258
246
|
regions: import("../util").Region[];
|
|
259
247
|
refNameAliases: {
|
|
260
248
|
[x: string]: string;
|
|
261
249
|
};
|
|
262
|
-
lowerCaseRefNameAliases: {
|
|
263
|
-
[x: string]: string;
|
|
264
|
-
};
|
|
265
250
|
cytobands: import("../util").Feature[];
|
|
266
251
|
}): void;
|
|
267
252
|
setError(e: unknown): void;
|
|
268
253
|
setRegions(regions: import("../util").Region[]): void;
|
|
269
254
|
setRefNameAliases(aliases: {
|
|
270
255
|
[x: string]: string;
|
|
271
|
-
}, lowerCaseAliases: {
|
|
272
|
-
[x: string]: string;
|
|
273
256
|
}): void;
|
|
274
257
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
275
258
|
setLoadingP(p?: Promise<void>): void;
|
|
@@ -289,6 +272,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
289
272
|
}, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
290
273
|
[x: string]: string;
|
|
291
274
|
}>;
|
|
275
|
+
afterCreate(): void;
|
|
292
276
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
293
277
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
294
278
|
}, {
|
|
@@ -298,18 +282,18 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
298
282
|
refNameAliases: {
|
|
299
283
|
[x: string]: string;
|
|
300
284
|
} | undefined;
|
|
301
|
-
lowerCaseRefNameAliases: {
|
|
302
|
-
[x: string]: string;
|
|
303
|
-
} | undefined;
|
|
304
285
|
cytobands: import("../util").Feature[] | undefined;
|
|
305
286
|
} & {
|
|
306
287
|
getConf(arg: string): any;
|
|
288
|
+
readonly lowerCaseRefNameAliases: {
|
|
289
|
+
[k: string]: string;
|
|
290
|
+
} | undefined;
|
|
307
291
|
} & {
|
|
308
292
|
readonly initialized: boolean;
|
|
309
293
|
readonly name: string;
|
|
310
294
|
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
311
295
|
readonly aliases: string[];
|
|
312
|
-
readonly displayName: string
|
|
296
|
+
readonly displayName: string;
|
|
313
297
|
hasName(name: string): boolean;
|
|
314
298
|
readonly allAliases: string[];
|
|
315
299
|
readonly allRefNames: string[] | undefined;
|
|
@@ -324,22 +308,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
324
308
|
getRefNameColor(refName: string): string | undefined;
|
|
325
309
|
isValidRefName(refName: string): boolean;
|
|
326
310
|
} & {
|
|
327
|
-
setLoaded({ regions, refNameAliases,
|
|
311
|
+
setLoaded({ regions, refNameAliases, cytobands, }: {
|
|
328
312
|
regions: import("../util").Region[];
|
|
329
313
|
refNameAliases: {
|
|
330
314
|
[x: string]: string;
|
|
331
315
|
};
|
|
332
|
-
lowerCaseRefNameAliases: {
|
|
333
|
-
[x: string]: string;
|
|
334
|
-
};
|
|
335
316
|
cytobands: import("../util").Feature[];
|
|
336
317
|
}): void;
|
|
337
318
|
setError(e: unknown): void;
|
|
338
319
|
setRegions(regions: import("../util").Region[]): void;
|
|
339
320
|
setRefNameAliases(aliases: {
|
|
340
321
|
[x: string]: string;
|
|
341
|
-
}, lowerCaseAliases: {
|
|
342
|
-
[x: string]: string;
|
|
343
322
|
}): void;
|
|
344
323
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
345
324
|
setLoadingP(p?: Promise<void>): void;
|
|
@@ -359,6 +338,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
359
338
|
}, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
360
339
|
[x: string]: string;
|
|
361
340
|
}>;
|
|
341
|
+
afterCreate(): void;
|
|
362
342
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
363
343
|
readonly assemblyNamesList: any[];
|
|
364
344
|
readonly assemblyList: AnyConfigurationModel[];
|
|
@@ -373,18 +353,18 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
373
353
|
refNameAliases: {
|
|
374
354
|
[x: string]: string;
|
|
375
355
|
} | undefined;
|
|
376
|
-
lowerCaseRefNameAliases: {
|
|
377
|
-
[x: string]: string;
|
|
378
|
-
} | undefined;
|
|
379
356
|
cytobands: import("../util").Feature[] | undefined;
|
|
380
357
|
} & {
|
|
381
358
|
getConf(arg: string): any;
|
|
359
|
+
readonly lowerCaseRefNameAliases: {
|
|
360
|
+
[k: string]: string;
|
|
361
|
+
} | undefined;
|
|
382
362
|
} & {
|
|
383
363
|
readonly initialized: boolean;
|
|
384
364
|
readonly name: string;
|
|
385
365
|
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
386
366
|
readonly aliases: string[];
|
|
387
|
-
readonly displayName: string
|
|
367
|
+
readonly displayName: string;
|
|
388
368
|
hasName(name: string): boolean;
|
|
389
369
|
readonly allAliases: string[];
|
|
390
370
|
readonly allRefNames: string[] | undefined;
|
|
@@ -399,22 +379,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
399
379
|
getRefNameColor(refName: string): string | undefined;
|
|
400
380
|
isValidRefName(refName: string): boolean;
|
|
401
381
|
} & {
|
|
402
|
-
setLoaded({ regions, refNameAliases,
|
|
382
|
+
setLoaded({ regions, refNameAliases, cytobands, }: {
|
|
403
383
|
regions: import("../util").Region[];
|
|
404
384
|
refNameAliases: {
|
|
405
385
|
[x: string]: string;
|
|
406
386
|
};
|
|
407
|
-
lowerCaseRefNameAliases: {
|
|
408
|
-
[x: string]: string;
|
|
409
|
-
};
|
|
410
387
|
cytobands: import("../util").Feature[];
|
|
411
388
|
}): void;
|
|
412
389
|
setError(e: unknown): void;
|
|
413
390
|
setRegions(regions: import("../util").Region[]): void;
|
|
414
391
|
setRefNameAliases(aliases: {
|
|
415
392
|
[x: string]: string;
|
|
416
|
-
}, lowerCaseAliases: {
|
|
417
|
-
[x: string]: string;
|
|
418
393
|
}): void;
|
|
419
394
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
420
395
|
setLoadingP(p?: Promise<void>): void;
|
|
@@ -434,6 +409,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
434
409
|
}, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
435
410
|
[x: string]: string;
|
|
436
411
|
}>;
|
|
412
|
+
afterCreate(): void;
|
|
437
413
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
438
414
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
439
415
|
}, {
|
|
@@ -443,18 +419,18 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
443
419
|
refNameAliases: {
|
|
444
420
|
[x: string]: string;
|
|
445
421
|
} | undefined;
|
|
446
|
-
lowerCaseRefNameAliases: {
|
|
447
|
-
[x: string]: string;
|
|
448
|
-
} | undefined;
|
|
449
422
|
cytobands: import("../util").Feature[] | undefined;
|
|
450
423
|
} & {
|
|
451
424
|
getConf(arg: string): any;
|
|
425
|
+
readonly lowerCaseRefNameAliases: {
|
|
426
|
+
[k: string]: string;
|
|
427
|
+
} | undefined;
|
|
452
428
|
} & {
|
|
453
429
|
readonly initialized: boolean;
|
|
454
430
|
readonly name: string;
|
|
455
431
|
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
456
432
|
readonly aliases: string[];
|
|
457
|
-
readonly displayName: string
|
|
433
|
+
readonly displayName: string;
|
|
458
434
|
hasName(name: string): boolean;
|
|
459
435
|
readonly allAliases: string[];
|
|
460
436
|
readonly allRefNames: string[] | undefined;
|
|
@@ -469,22 +445,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
469
445
|
getRefNameColor(refName: string): string | undefined;
|
|
470
446
|
isValidRefName(refName: string): boolean;
|
|
471
447
|
} & {
|
|
472
|
-
setLoaded({ regions, refNameAliases,
|
|
448
|
+
setLoaded({ regions, refNameAliases, cytobands, }: {
|
|
473
449
|
regions: import("../util").Region[];
|
|
474
450
|
refNameAliases: {
|
|
475
451
|
[x: string]: string;
|
|
476
452
|
};
|
|
477
|
-
lowerCaseRefNameAliases: {
|
|
478
|
-
[x: string]: string;
|
|
479
|
-
};
|
|
480
453
|
cytobands: import("../util").Feature[];
|
|
481
454
|
}): void;
|
|
482
455
|
setError(e: unknown): void;
|
|
483
456
|
setRegions(regions: import("../util").Region[]): void;
|
|
484
457
|
setRefNameAliases(aliases: {
|
|
485
458
|
[x: string]: string;
|
|
486
|
-
}, lowerCaseAliases: {
|
|
487
|
-
[x: string]: string;
|
|
488
459
|
}): void;
|
|
489
460
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
490
461
|
setLoadingP(p?: Promise<void>): void;
|
|
@@ -504,6 +475,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
504
475
|
}, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
505
476
|
[x: string]: string;
|
|
506
477
|
}>;
|
|
478
|
+
afterCreate(): void;
|
|
507
479
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined>;
|
|
508
480
|
getRefNameMapForAdapter(adapterConf: AdapterConf, assemblyName: string | undefined, opts: {
|
|
509
481
|
stopToken?: string;
|
|
@@ -9,6 +9,6 @@ interface AdapterCacheEntry {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function getAdapter(pluginManager: PluginManager, sessionId: string, adapterConfigSnapshot: SnapshotIn<AnyConfigurationSchemaType>): Promise<AdapterCacheEntry>;
|
|
11
11
|
export type getSubAdapterType = (adapterConfigSnap: ConfigSnap) => ReturnType<typeof getAdapter>;
|
|
12
|
-
export declare function freeAdapterResources(args: Record<string, any>): void
|
|
12
|
+
export declare function freeAdapterResources(args: Record<string, any>): Promise<void>;
|
|
13
13
|
export declare function clearAdapterCache(): void;
|
|
14
14
|
export {};
|
|
@@ -5,35 +5,38 @@ exports.freeAdapterResources = freeAdapterResources;
|
|
|
5
5
|
exports.clearAdapterCache = clearAdapterCache;
|
|
6
6
|
const util_1 = require("./util");
|
|
7
7
|
let adapterCache = {};
|
|
8
|
+
async function getAdapterPre(pluginManager, sessionId, adapterConfigSnapshot) {
|
|
9
|
+
const adapterType = adapterConfigSnapshot === null || adapterConfigSnapshot === void 0 ? void 0 : adapterConfigSnapshot.type;
|
|
10
|
+
if (!adapterType) {
|
|
11
|
+
throw new Error(`could not determine adapter type from adapter config snapshot ${JSON.stringify(adapterConfigSnapshot)}`);
|
|
12
|
+
}
|
|
13
|
+
const dataAdapterType = pluginManager.getAdapterType(adapterType);
|
|
14
|
+
if (!dataAdapterType) {
|
|
15
|
+
throw new Error(`unknown data adapter type ${adapterType}`);
|
|
16
|
+
}
|
|
17
|
+
const adapterConfig = dataAdapterType.configSchema.create(adapterConfigSnapshot, { pluginManager });
|
|
18
|
+
const getSubAdapter = getAdapter.bind(null, pluginManager, sessionId);
|
|
19
|
+
const CLASS = await dataAdapterType.getAdapterClass();
|
|
20
|
+
const dataAdapter = new CLASS(adapterConfig, getSubAdapter, pluginManager);
|
|
21
|
+
return {
|
|
22
|
+
dataAdapter,
|
|
23
|
+
sessionIds: new Set([sessionId]),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
8
26
|
async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
|
|
27
|
+
var _a;
|
|
9
28
|
const cacheKey = (0, util_1.adapterConfigCacheKey)(adapterConfigSnapshot);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
const dataAdapterType = pluginManager.getAdapterType(adapterType);
|
|
16
|
-
if (!dataAdapterType) {
|
|
17
|
-
throw new Error(`unknown data adapter type ${adapterType}`);
|
|
18
|
-
}
|
|
19
|
-
const adapterConfig = dataAdapterType.configSchema.create(adapterConfigSnapshot, { pluginManager });
|
|
20
|
-
const getSubAdapter = getAdapter.bind(null, pluginManager, sessionId);
|
|
21
|
-
const CLASS = await dataAdapterType.getAdapterClass();
|
|
22
|
-
const dataAdapter = new CLASS(adapterConfig, getSubAdapter, pluginManager);
|
|
23
|
-
adapterCache[cacheKey] = {
|
|
24
|
-
dataAdapter,
|
|
25
|
-
sessionIds: new Set([sessionId]),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const cacheEntry = adapterCache[cacheKey];
|
|
29
|
-
cacheEntry.sessionIds.add(sessionId);
|
|
30
|
-
return cacheEntry;
|
|
29
|
+
(_a = adapterCache[cacheKey]) !== null && _a !== void 0 ? _a : (adapterCache[cacheKey] = getAdapterPre(pluginManager, sessionId, adapterConfigSnapshot));
|
|
30
|
+
const ret = await adapterCache[cacheKey];
|
|
31
|
+
ret.sessionIds.add(sessionId);
|
|
32
|
+
return ret;
|
|
31
33
|
}
|
|
32
|
-
function freeAdapterResources(args) {
|
|
34
|
+
async function freeAdapterResources(args) {
|
|
33
35
|
const specKeys = Object.keys(args);
|
|
34
36
|
if (specKeys.length === 1 && specKeys[0] === 'sessionId') {
|
|
35
37
|
const { sessionId } = args;
|
|
36
|
-
for (const [cacheKey,
|
|
38
|
+
for (const [cacheKey, cacheEntryP] of Object.entries(adapterCache)) {
|
|
39
|
+
const cacheEntry = await cacheEntryP;
|
|
37
40
|
cacheEntry.sessionIds.delete(sessionId);
|
|
38
41
|
if (cacheEntry.sessionIds.size === 0) {
|
|
39
42
|
delete adapterCache[cacheKey];
|
|
@@ -41,7 +44,8 @@ function freeAdapterResources(args) {
|
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
else {
|
|
44
|
-
for (const
|
|
47
|
+
for (const cacheEntryP of Object.values(adapterCache)) {
|
|
48
|
+
const cacheEntry = await cacheEntryP;
|
|
45
49
|
const regions = args.regions || (args.region ? [args.region] : []);
|
|
46
50
|
for (const region of regions) {
|
|
47
51
|
if (region.refName !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "JBrowse 2 core libraries used by plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"jexl": "^2.3.0",
|
|
52
52
|
"librpc-web-mod": "^1.1.5",
|
|
53
53
|
"load-script": "^2.0.0",
|
|
54
|
-
"material-ui-popup-state": "^5.0.0",
|
|
55
54
|
"mobx": "^6.0.0",
|
|
56
55
|
"mobx-react": "^9.0.0",
|
|
57
56
|
"mobx-state-tree": "^5.0.0",
|
|
@@ -70,5 +69,5 @@
|
|
|
70
69
|
"access": "public",
|
|
71
70
|
"directory": "dist"
|
|
72
71
|
},
|
|
73
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "cb8859da9d838ad2594964777c5c54f385d98f5e"
|
|
74
73
|
}
|
|
@@ -11,7 +11,7 @@ class CoreFreeResources extends RpcMethodType_1.default {
|
|
|
11
11
|
this.name = 'CoreFreeResources';
|
|
12
12
|
}
|
|
13
13
|
async execute(args) {
|
|
14
|
-
(0, dataAdapterCache_1.freeAdapterResources)(args);
|
|
14
|
+
await (0, dataAdapterCache_1.freeAdapterResources)(args);
|
|
15
15
|
for (const renderer of this.pluginManager.getRendererTypes()) {
|
|
16
16
|
renderer.freeResources(args);
|
|
17
17
|
}
|