@jbrowse/core 3.0.3 → 3.0.4

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.
@@ -11,7 +11,7 @@ const material_1 = require("@mui/material");
11
11
  function HelpDialog({ handleClose, }) {
12
12
  return ((0, jsx_runtime_1.jsxs)(ui_1.Dialog, { maxWidth: "xl", open: true, onClose: () => {
13
13
  handleClose();
14
- }, title: "Feature sequence panel help", children: [(0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { paragraph: true, children: "The \"Feature sequence\" panel shows the underlying genomic sequence for a given feature, fetched from the reference genome." }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "For gene features, this panel does special calculations to e.g. stitch together the coding sequence, the options are:" }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: "CDS - shows the stitched together CDS sequences" }), (0, jsx_runtime_1.jsx)("li", { children: "Protein - the translated coding sequence, with the \"standard\" genetic code" }), (0, jsx_runtime_1.jsx)("li", { children: "cDNA - shows the 'copy DNA' of transcript, formed from exon sequences" }), (0, jsx_runtime_1.jsx)("li", { children: "Genomic w/ introns +/- Nbp up+down stream - the sequence underlying the entire gene including including introns, with UTR and CDS highlighted" })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { paragraph: true, children: "For other feature types, the options are:" }), (0, jsx_runtime_1.jsx)("ul", { children: (0, jsx_runtime_1.jsx)("li", { children: "Genomic +/- Nbp up+down stream - the reference genome sequence underlying the feature, with the up and downstream sequence" }) }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { children: ["Note 1: you can use the \"gear icon\" ", (0, jsx_runtime_1.jsx)(Settings_1.default, {}), " to edit the number of bp displayed up/downstream and in the intron region"] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Note 2: The 'Copy HTML' function retains the colors from the sequence panel but cannot be pasted into some programs like notepad that only expect plain text." })] }), (0, jsx_runtime_1.jsx)(material_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => {
14
+ }, title: "Feature sequence panel help", children: [(0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "The \"Feature sequence\" panel shows the underlying genomic sequence for a given feature, fetched from the reference genome." }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "For gene features, this panel does special calculations to e.g. stitch together the coding sequence, the options are:" }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: "CDS - shows the stitched together CDS sequences" }), (0, jsx_runtime_1.jsx)("li", { children: "Protein - the translated coding sequence, with the \"standard\" genetic code" }), (0, jsx_runtime_1.jsx)("li", { children: "cDNA - shows the 'copy DNA' of transcript, formed from exon sequences" }), (0, jsx_runtime_1.jsx)("li", { children: "Genomic w/ introns +/- Nbp up+down stream - the sequence underlying the entire gene including including introns, with UTR and CDS highlighted" })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "For other feature types, the options are:" }), (0, jsx_runtime_1.jsx)("ul", { children: (0, jsx_runtime_1.jsx)("li", { children: "Genomic +/- Nbp up+down stream - the reference genome sequence underlying the feature, with the up and downstream sequence" }) }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { children: ["Note 1: you can use the \"gear icon\" ", (0, jsx_runtime_1.jsx)(Settings_1.default, {}), " to edit the number of bp displayed up/downstream and in the intron region"] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Note 2: The 'Copy HTML' function retains the colors from the sequence panel but cannot be pasted into some programs like notepad that only expect plain text." })] }), (0, jsx_runtime_1.jsx)(material_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => {
15
15
  handleClose();
16
16
  }, autoFocus: true, variant: "contained", children: "Close" }) })] }));
17
17
  }
@@ -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(specification: Record<string, any>): number;
12
+ export declare function freeAdapterResources(args: Record<string, any>): void;
13
13
  export declare function clearAdapterCache(): void;
14
14
  export {};
@@ -29,23 +29,20 @@ async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
29
29
  cacheEntry.sessionIds.add(sessionId);
30
30
  return cacheEntry;
31
31
  }
32
- function freeAdapterResources(specification) {
33
- let deleteCount = 0;
34
- const specKeys = Object.keys(specification);
32
+ function freeAdapterResources(args) {
33
+ const specKeys = Object.keys(args);
35
34
  if (specKeys.length === 1 && specKeys[0] === 'sessionId') {
36
- const { sessionId } = specification;
35
+ const { sessionId } = args;
37
36
  Object.entries(adapterCache).forEach(([cacheKey, cacheEntry]) => {
38
37
  cacheEntry.sessionIds.delete(sessionId);
39
38
  if (cacheEntry.sessionIds.size === 0) {
40
- deleteCount += 1;
41
39
  delete adapterCache[cacheKey];
42
40
  }
43
41
  });
44
42
  }
45
43
  else {
46
44
  Object.values(adapterCache).forEach(cacheEntry => {
47
- const regions = specification.regions ||
48
- (specification.region ? [specification.region] : []);
45
+ const regions = args.regions || (args.region ? [args.region] : []);
49
46
  for (const region of regions) {
50
47
  if (region.refName !== undefined) {
51
48
  cacheEntry.dataAdapter.freeResources(region);
@@ -53,7 +50,6 @@ function freeAdapterResources(specification) {
53
50
  }
54
51
  });
55
52
  }
56
- return deleteCount;
57
53
  }
58
54
  function clearAdapterCache() {
59
55
  adapterCache = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/core",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "JBrowse 2 core libraries used by plugins",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -69,5 +69,5 @@
69
69
  "access": "public",
70
70
  "directory": "dist"
71
71
  },
72
- "gitHead": "f516540428282351d26e46743e69a724651bfb2c"
72
+ "gitHead": "61e6d26f83acbf58a946c2add3415bc46b878df9"
73
73
  }
@@ -1,35 +1,14 @@
1
1
  import FeatureRendererType from './FeatureRendererType';
2
- import GranularRectLayout from '../../util/layouts/GranularRectLayout';
3
- import MultiLayout from '../../util/layouts/MultiLayout';
2
+ import { LayoutSession } from './LayoutSession';
4
3
  import PrecomputedLayout from '../../util/layouts/PrecomputedLayout';
5
4
  import type { RenderArgs as FeatureRenderArgs, RenderArgsDeserialized as FeatureRenderArgsDeserialized, RenderArgsSerialized as FeatureRenderArgsSerialized, RenderResults as FeatureRenderResults, ResultsDeserialized as FeatureResultsDeserialized, ResultsSerialized as FeatureResultsSerialized } from './FeatureRendererType';
6
- import type { AnyConfigurationModel } from '../../configuration';
7
- import type { Feature, Region } from '../../util';
8
- import type SerializableFilterChain from './util/serializableFilterChain';
5
+ import type { LayoutSessionProps } from './LayoutSession';
9
6
  import type RpcManager from '../../rpc/RpcManager';
7
+ import type { Feature, Region } from '../../util';
10
8
  import type { BaseLayout, SerializedLayout } from '../../util/layouts/BaseLayout';
11
- export interface LayoutSessionProps {
12
- config: AnyConfigurationModel;
13
- bpPerPx: number;
14
- filters?: SerializableFilterChain;
15
- }
9
+ import type GranularRectLayout from '../../util/layouts/GranularRectLayout';
10
+ import type MultiLayout from '../../util/layouts/MultiLayout';
16
11
  export type MyMultiLayout = MultiLayout<GranularRectLayout<unknown>, unknown>;
17
- export interface CachedLayout {
18
- layout: MyMultiLayout;
19
- config: AnyConfigurationModel;
20
- filters?: SerializableFilterChain;
21
- }
22
- export declare class LayoutSession implements LayoutSessionProps {
23
- config: AnyConfigurationModel;
24
- bpPerPx: number;
25
- filters?: SerializableFilterChain;
26
- constructor(args: LayoutSessionProps);
27
- update(props: LayoutSessionProps): void;
28
- makeLayout(): MultiLayout<GranularRectLayout<unknown>, unknown>;
29
- cachedLayoutIsValid(cachedLayout: CachedLayout): boolean;
30
- cachedLayout: CachedLayout | undefined;
31
- get layout(): MyMultiLayout;
32
- }
33
12
  export interface RenderArgs extends FeatureRenderArgs {
34
13
  bpPerPx: number;
35
14
  layoutId: string;
@@ -53,7 +32,12 @@ export interface ResultsDeserialized extends FeatureResultsDeserialized {
53
32
  layout: PrecomputedLayout<string>;
54
33
  }
55
34
  export default class BoxRendererType extends FeatureRendererType {
56
- sessions: Record<string, LayoutSession>;
35
+ layoutSessions: Record<string, LayoutSession>;
36
+ createLayoutSession(props: LayoutSessionProps): LayoutSession;
37
+ getLayoutSession(props: {
38
+ sessionId: string;
39
+ layoutId: string;
40
+ }): LayoutSession | undefined;
57
41
  getWorkerSession(props: LayoutSessionProps & {
58
42
  sessionId: string;
59
43
  layoutId: string;
@@ -65,8 +49,9 @@ export default class BoxRendererType extends FeatureRendererType {
65
49
  reversed?: boolean | undefined;
66
50
  assemblyName: string;
67
51
  };
68
- createSession(props: LayoutSessionProps): LayoutSession;
69
- freeResourcesInClient(rpcManager: RpcManager, args: RenderArgs): Promise<number>;
52
+ freeResources(args: Record<string, any>): void;
53
+ freeResourcesInWorker(args: Record<string, any>): void;
54
+ freeResourcesInClient(rpcManager: RpcManager, args: RenderArgs): Promise<void>;
70
55
  deserializeLayoutInClient(json: SerializedLayout): PrecomputedLayout<unknown>;
71
56
  deserializeResultsInClient(result: ResultsSerialized, args: RenderArgs): ResultsDeserialized;
72
57
  createLayoutInWorker(args: RenderArgsDeserialized): GranularRectLayout<unknown>;
@@ -3,62 +3,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LayoutSession = void 0;
7
- const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
8
6
  const FeatureRendererType_1 = __importDefault(require("./FeatureRendererType"));
7
+ const LayoutSession_1 = require("./LayoutSession");
9
8
  const configuration_1 = require("../../configuration");
10
9
  const util_1 = require("../../util");
11
- const GranularRectLayout_1 = __importDefault(require("../../util/layouts/GranularRectLayout"));
12
- const MultiLayout_1 = __importDefault(require("../../util/layouts/MultiLayout"));
13
10
  const PrecomputedLayout_1 = __importDefault(require("../../util/layouts/PrecomputedLayout"));
14
- class LayoutSession {
15
- constructor(args) {
16
- this.config = args.config;
17
- this.bpPerPx = args.bpPerPx;
18
- this.filters = args.filters;
19
- this.update(args);
20
- }
21
- update(props) {
22
- Object.assign(this, props);
23
- }
24
- makeLayout() {
25
- return new MultiLayout_1.default(GranularRectLayout_1.default, {
26
- maxHeight: (0, configuration_1.readConfObject)(this.config, 'maxHeight'),
27
- displayMode: (0, configuration_1.readConfObject)(this.config, 'displayMode'),
28
- pitchX: this.bpPerPx,
29
- pitchY: (0, configuration_1.readConfObject)(this.config, 'noSpacing') ? 1 : 3,
30
- });
31
- }
32
- cachedLayoutIsValid(cachedLayout) {
33
- return (cachedLayout.layout.subLayoutConstructorArgs.pitchX === this.bpPerPx &&
34
- (0, fast_deep_equal_1.default)((0, configuration_1.readConfObject)(this.config), cachedLayout.config) &&
35
- (0, fast_deep_equal_1.default)(this.filters, cachedLayout.filters));
36
- }
37
- get layout() {
38
- if (!this.cachedLayout || !this.cachedLayoutIsValid(this.cachedLayout)) {
39
- this.cachedLayout = {
40
- layout: this.makeLayout(),
41
- config: (0, configuration_1.readConfObject)(this.config),
42
- filters: this.filters,
43
- };
44
- }
45
- return this.cachedLayout.layout;
46
- }
47
- }
48
- exports.LayoutSession = LayoutSession;
49
11
  class BoxRendererType extends FeatureRendererType_1.default {
50
12
  constructor() {
51
13
  super(...arguments);
52
- this.sessions = {};
14
+ this.layoutSessions = {};
15
+ }
16
+ createLayoutSession(props) {
17
+ return new LayoutSession_1.LayoutSession(props);
18
+ }
19
+ getLayoutSession(props) {
20
+ return this.layoutSessions[(0, util_1.getLayoutId)(props)];
53
21
  }
54
22
  getWorkerSession(props) {
55
23
  const key = (0, util_1.getLayoutId)(props);
56
- if (!this.sessions[key]) {
57
- this.sessions[key] = this.createSession(props);
24
+ if (!this.layoutSessions[key]) {
25
+ this.layoutSessions[key] = this.createLayoutSession(props);
58
26
  }
59
- const session = this.sessions[key];
60
- session.update(props);
61
- return session;
27
+ return this.layoutSessions[key].update(props);
62
28
  }
63
29
  getExpandedRegion(region, renderArgs) {
64
30
  const { bpPerPx, config } = renderArgs;
@@ -70,46 +36,65 @@ class BoxRendererType extends FeatureRendererType_1.default {
70
36
  end: Math.ceil(region.end + bpExpansion),
71
37
  };
72
38
  }
73
- createSession(props) {
74
- return new LayoutSession(props);
39
+ freeResources(args) {
40
+ this.freeResourcesInWorker(args);
41
+ }
42
+ freeResourcesInWorker(args) {
43
+ const { regions } = args;
44
+ const key = (0, util_1.getLayoutId)(args);
45
+ const session = this.layoutSessions[key];
46
+ if (session) {
47
+ const region = regions[0];
48
+ session.layout.discardRange(region.refName, region.start, region.end);
49
+ }
75
50
  }
76
51
  async freeResourcesInClient(rpcManager, args) {
77
52
  const { regions } = args;
78
53
  const key = (0, util_1.getLayoutId)(args);
79
- const session = this.sessions[key];
54
+ const session = this.layoutSessions[key];
80
55
  if (session) {
81
56
  const region = regions[0];
82
57
  session.layout.discardRange(region.refName, region.start, region.end);
83
58
  }
84
- return await super.freeResourcesInClient(rpcManager, args);
59
+ return super.freeResourcesInClient(rpcManager, args);
85
60
  }
86
61
  deserializeLayoutInClient(json) {
87
62
  return new PrecomputedLayout_1.default(json);
88
63
  }
89
64
  deserializeResultsInClient(result, args) {
90
65
  const layout = this.deserializeLayoutInClient(result.layout);
91
- return super.deserializeResultsInClient({ ...result, layout }, args);
66
+ return super.deserializeResultsInClient({
67
+ ...result,
68
+ layout,
69
+ }, args);
92
70
  }
93
71
  createLayoutInWorker(args) {
94
72
  const { regions } = args;
95
- const session = this.getWorkerSession(args);
96
- return session.layout.getSublayout(regions[0].refName);
73
+ const { layout } = this.getWorkerSession(args);
74
+ return layout.getSublayout(regions[0].refName);
97
75
  }
98
76
  serializeResultsInWorker(results, args) {
99
- const serialized = super.serializeResultsInWorker(results, args);
77
+ const { features, ...rest } = super.serializeResultsInWorker(results, args);
100
78
  const region = args.regions[0];
101
- serialized.layout = results.layout.serializeRegion(this.getExpandedRegion(region, args));
102
- serialized.features = serialized.features.filter(f => {
103
- return Boolean(serialized.layout.rectangles[f.uniqueId]);
104
- });
105
- serialized.maxHeightReached = serialized.layout.maxHeightReached;
106
- return serialized;
79
+ const layout = results.layout.serializeRegion(this.getExpandedRegion(region, args));
80
+ return {
81
+ ...rest,
82
+ layout,
83
+ maxHeightReached: layout.maxHeightReached,
84
+ features: features.filter(f => !!layout.rectangles[f.uniqueId]),
85
+ };
107
86
  }
108
87
  async render(props) {
109
88
  const layout = props.layout ||
110
89
  this.createLayoutInWorker(props);
111
- const result = await super.render({ ...props, layout });
112
- return { ...result, layout };
90
+ const result = await super.render({
91
+ ...props,
92
+ layout,
93
+ });
94
+ return {
95
+ ...result,
96
+ layout,
97
+ };
113
98
  }
114
99
  }
115
100
  exports.default = BoxRendererType;
@@ -0,0 +1,25 @@
1
+ import GranularRectLayout from '../../util/layouts/GranularRectLayout';
2
+ import MultiLayout from '../../util/layouts/MultiLayout';
3
+ import type { AnyConfigurationModel } from '../../configuration';
4
+ import type { Region } from '../../util';
5
+ import type SerializableFilterChain from './util/serializableFilterChain';
6
+ export interface LayoutSessionProps {
7
+ regions: Region[];
8
+ config: AnyConfigurationModel;
9
+ bpPerPx: number;
10
+ filters?: SerializableFilterChain;
11
+ }
12
+ export type MyMultiLayout = MultiLayout<GranularRectLayout<unknown>, unknown>;
13
+ export interface CachedLayout {
14
+ layout: MyMultiLayout;
15
+ props: LayoutSessionProps;
16
+ }
17
+ export declare class LayoutSession {
18
+ props: LayoutSessionProps;
19
+ cachedLayout: CachedLayout | undefined;
20
+ constructor(props: LayoutSessionProps);
21
+ update(props: LayoutSessionProps): this;
22
+ makeLayout(): MultiLayout<GranularRectLayout<unknown>, unknown>;
23
+ cachedLayoutIsValid(cachedLayout: CachedLayout): boolean;
24
+ get layout(): MyMultiLayout;
25
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LayoutSession = void 0;
7
+ const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
8
+ const configuration_1 = require("../../configuration");
9
+ const GranularRectLayout_1 = __importDefault(require("../../util/layouts/GranularRectLayout"));
10
+ const MultiLayout_1 = __importDefault(require("../../util/layouts/MultiLayout"));
11
+ class LayoutSession {
12
+ constructor(props) {
13
+ this.props = props;
14
+ }
15
+ update(props) {
16
+ this.props = props;
17
+ return this;
18
+ }
19
+ makeLayout() {
20
+ return new MultiLayout_1.default(GranularRectLayout_1.default, {
21
+ maxHeight: (0, configuration_1.readConfObject)(this.props.config, 'maxHeight'),
22
+ displayMode: (0, configuration_1.readConfObject)(this.props.config, 'displayMode'),
23
+ pitchX: this.props.bpPerPx,
24
+ pitchY: (0, configuration_1.readConfObject)(this.props.config, 'noSpacing') ? 1 : 3,
25
+ });
26
+ }
27
+ cachedLayoutIsValid(cachedLayout) {
28
+ return (cachedLayout.props.bpPerPx === this.props.bpPerPx &&
29
+ (0, fast_deep_equal_1.default)((0, configuration_1.readConfObject)(this.props.config), (0, configuration_1.readConfObject)(cachedLayout.props.config)) &&
30
+ (0, fast_deep_equal_1.default)(this.props.filters, cachedLayout.props.filters));
31
+ }
32
+ get layout() {
33
+ if (!this.cachedLayout || !this.cachedLayoutIsValid(this.cachedLayout)) {
34
+ this.cachedLayout = {
35
+ layout: this.makeLayout(),
36
+ props: this.props,
37
+ };
38
+ }
39
+ return this.cachedLayout.layout;
40
+ }
41
+ }
42
+ exports.LayoutSession = LayoutSession;
@@ -21,5 +21,5 @@ export default class RendererType extends PluggableElementBase {
21
21
  pluginManager: PluginManager;
22
22
  });
23
23
  render(props: RenderProps): Promise<RenderResults>;
24
- freeResources(): number;
24
+ freeResources(_args: any): void;
25
25
  }
@@ -18,8 +18,6 @@ class RendererType extends PluggableElementBase_1.default {
18
18
  reactElement: (0, jsx_runtime_1.jsx)(this.ReactComponent, { ...props }),
19
19
  };
20
20
  }
21
- freeResources() {
22
- return 0;
23
- }
21
+ freeResources(_args) { }
24
22
  }
25
23
  exports.default = RendererType;
@@ -44,6 +44,6 @@ export default class ServerSideRenderer extends RendererType {
44
44
  serializeResultsInWorker(results: RenderResults, args: RenderArgsDeserialized): ResultsSerialized;
45
45
  renderInClient(rpcManager: RpcManager, args: RenderArgs): Promise<ResultsSerialized>;
46
46
  renderInWorker(args: RenderArgsSerialized): Promise<ResultsSerialized>;
47
- freeResourcesInClient(rpcManager: RpcManager, args: RenderArgs): Promise<number>;
47
+ freeResourcesInClient(rpcManager: RpcManager, args: RenderArgs): Promise<void>;
48
48
  }
49
49
  export { type RenderResults } from './RendererType';
@@ -75,9 +75,8 @@ class ServerSideRenderer extends RendererType_1.default {
75
75
  }
76
76
  async freeResourcesInClient(rpcManager, args) {
77
77
  const serializedArgs = this.serializeArgsInClient(args);
78
- const freed = this.freeResources();
79
- const freedRpc = (await rpcManager.call(args.sessionId, 'CoreFreeResources', serializedArgs));
80
- return freed + freedRpc;
78
+ const { sessionId } = args;
79
+ await rpcManager.call(sessionId, 'CoreFreeResources', serializedArgs);
81
80
  }
82
81
  }
83
82
  exports.default = ServerSideRenderer;
@@ -1,6 +1,6 @@
1
1
  import RpcMethodType from '../../pluggableElementTypes/RpcMethodType';
2
2
  export default class CoreFreeResources extends RpcMethodType {
3
3
  name: string;
4
- execute(specification: Record<string, unknown>): Promise<number>;
4
+ execute(args: Record<string, unknown>): Promise<void>;
5
5
  serializeArguments(args: Record<string, unknown>, _rpcDriver: string): Promise<Record<string, unknown>>;
6
6
  }
@@ -10,16 +10,11 @@ class CoreFreeResources extends RpcMethodType_1.default {
10
10
  super(...arguments);
11
11
  this.name = 'CoreFreeResources';
12
12
  }
13
- async execute(specification) {
14
- let deleteCount = 0;
15
- deleteCount += (0, dataAdapterCache_1.freeAdapterResources)(specification);
13
+ async execute(args) {
14
+ (0, dataAdapterCache_1.freeAdapterResources)(args);
16
15
  this.pluginManager.getRendererTypes().forEach(renderer => {
17
- const count = renderer.freeResources();
18
- if (count) {
19
- deleteCount += count;
20
- }
16
+ renderer.freeResources(args);
21
17
  });
22
- return deleteCount;
23
18
  }
24
19
  async serializeArguments(args, _rpcDriver) {
25
20
  return args;
@@ -31,7 +31,7 @@ class CoreGetFeatureDetails extends RpcMethodType_1.default {
31
31
  const { rendererType, featureId } = deserializedArgs;
32
32
  const RendererType = this.pluginManager.getRendererType(rendererType);
33
33
  return {
34
- feature: (_b = (_a = RendererType.sessions[(0, util_1.getLayoutId)(args)]) === null || _a === void 0 ? void 0 : _a.cachedLayout.layout.getDataByID(featureId)) === null || _b === void 0 ? void 0 : _b.toJSON(),
34
+ feature: (_b = (_a = RendererType.getLayoutSession(args)) === null || _a === void 0 ? void 0 : _a.cachedLayout.layout.getDataByID(featureId)) === null || _b === void 0 ? void 0 : _b.toJSON(),
35
35
  };
36
36
  }
37
37
  }