diff --git a/package-lock.json b/package-lock.json index 4ddc0be..981009e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2151,9 +2151,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -2706,9 +2706,9 @@ } }, "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", - "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", "dev": true, "dependencies": { "@babel/core": "^7.23.9", @@ -5663,9 +5663,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001638", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz", - "integrity": "sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ==", + "version": "1.0.30001639", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001639.tgz", + "integrity": "sha512-eFHflNTBIlFwP2AIKaYuBQN/apnUoKNhBdza8ZnW/h2di4LCZ4xFqYlxUxo+LQ76KFI1PGcC1QDxMbxTZpSCAg==", "dev": true, "funding": [ { @@ -6580,9 +6580,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.812", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.812.tgz", - "integrity": "sha512-7L8fC2Ey/b6SePDFKR2zHAy4mbdp1/38Yk5TsARO66W3hC5KEaeKMMHoxwtuH+jcu2AYLSn9QX04i95t6Fl1Hg==", + "version": "1.4.815", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.815.tgz", + "integrity": "sha512-OvpTT2ItpOXJL7IGcYakRjHCt8L5GrrN/wHCQsRB4PQa1X9fe+X9oen245mIId7s14xvArCGSTIq644yPUKKLg==", "dev": true }, "node_modules/emittery": { @@ -7359,9 +7359,9 @@ } }, "node_modules/find-cache-dir/node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", "dev": true, "engines": { "node": ">=12.20" @@ -8209,9 +8209,9 @@ "dev": true }, "node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -9959,9 +9959,9 @@ } }, "node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.3.0.tgz", + "integrity": "sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -11870,9 +11870,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "dev": true, "funding": [ { @@ -11890,7 +11890,7 @@ ], "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "source-map-js": "^1.2.0" }, "engines": { diff --git a/src/components/dace_interface.ts b/src/components/dace_interface.ts index ab83bc7..0ebedbc 100644 --- a/src/components/dace_interface.ts +++ b/src/components/dace_interface.ts @@ -31,7 +31,7 @@ enum InteractionMode { } const MIN_SAFE_VERSION = '0.16.0'; -const MAX_SAFE_VERSION = '0.16.0'; +const MAX_SAFE_VERSION = '0.16.1'; export class DaCeInterface extends BaseComponent diff --git a/src/webclients/components/sdfv/utils/helpers.ts b/src/webclients/components/sdfv/utils/helpers.ts index 6ad8682..0aaae09 100644 --- a/src/webclients/components/sdfv/utils/helpers.ts +++ b/src/webclients/components/sdfv/utils/helpers.ts @@ -28,7 +28,7 @@ export function findMaximumSdfgId(sdfg: JsonSDFG): number { let maxId = sdfg.cfg_list_id; for (const node of sdfg.nodes) { if (node.type === SDFGElementType.SDFGState) - for (const n of node.nodes) { + for (const n of node.nodes ?? []) { if (n.type === SDFGElementType.NestedSDFG) maxId = Math.max( findMaximumSdfgId(n.attributes.sdfg), maxId @@ -73,14 +73,14 @@ export function findJsonSDFGElementByUUID(cfgList: CFGListType, uuid: string): [ const stateId = parseInt(parts[1]); if (stateId >= 0 && cfg?.nodes) { const state = cfg.nodes[stateId]; - if (state) { + if (state && state.nodes) { if (parts.length > 2) { const nodeId = parseInt(parts[2]); if (nodeId >= 0) { return [state.nodes[nodeId], cfg]; } else if (parts.length === 4) { const edgeId = parseInt(parts[3]); - if (edgeId >= 0) + if (edgeId >= 0 && state.edges) return [state.edges[edgeId], cfg]; } } @@ -530,7 +530,7 @@ export function doForAllNodeTypes( fun(block); if (block.type === SDFGElementType.SDFGState) { - block.nodes.forEach(node => { + block.nodes?.forEach(node => { if (node.type === type) fun(node); diff --git a/src/webclients/components/sdfv/vscode_sdfv.ts b/src/webclients/components/sdfv/vscode_sdfv.ts index 6b64ae3..7539626 100644 --- a/src/webclients/components/sdfv/vscode_sdfv.ts +++ b/src/webclients/components/sdfv/vscode_sdfv.ts @@ -741,14 +741,17 @@ export class VSCodeSDFV extends SDFV { if (elem instanceof Edge && elem.data.type === 'Memlet' && elem.parent_id !== null) { - let sdfg_edge = elem.cfg!.nodes[elem.parent_id].edges[elem.id]; - $('

', { - 'class': 'info-subtitle', - 'html': 'Connectors: ' + sdfg_edge.src_connector + - ' ' + - 'arrow_forward ' + sdfg_edge.dst_connector, - }).appendTo(contents); - $('


').appendTo(contents); + const ndEdges = elem.cfg?.nodes[elem.parent_id].edges; + if (ndEdges) { + let sdfg_edge = ndEdges[elem.id]; + $('

', { + 'class': 'info-subtitle', + 'html': 'Connectors: ' + sdfg_edge.src_connector + + ' ' + + 'arrow_forward ' + sdfg_edge.dst_connector, + }).appendTo(contents); + $('


').appendTo(contents); + } } const tableContainer = $('
', {