diff --git a/package-lock.json b/package-lock.json index 18934bf57..59fe46362 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,13 @@ "@thewtex/zstddec": "^0.2.0", "@types/emscripten": "^1.39.6", "axios": "^1.4.0", + "comlink": "^4.4.1", "commander": "^9.4.0", "fs-extra": "^10.0.0", "glob": "^8.1.0", "markdown-table": "^3.0.3", "mime-types": "^2.1.35", - "wasm-feature-detect": "^1.5.1", - "webworker-promise": "^0.5.1" + "wasm-feature-detect": "^1.5.1" }, "bin": { "itk-wasm": "src/itk-wasm-cli.js" @@ -2791,6 +2791,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, "engines": { "node": ">=6.0.0" } @@ -2799,6 +2800,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, "engines": { "node": ">=6.0.0" } @@ -2807,6 +2809,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -2816,6 +2819,7 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -2828,12 +2832,14 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.19", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -4255,6 +4261,7 @@ "version": "8.4.6", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.6.tgz", "integrity": "sha512-/fqTbjxyFUaYNO7VcW5g+4npmqVACz1bB7RTHYuLj+PRjw9hrCwrUXVQFpChUS0JsyEFvMZ7U/PfmvWgxJhI9g==", + "dev": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -4264,6 +4271,7 @@ "version": "3.7.4", "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dev": true, "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -4272,7 +4280,8 @@ "node_modules/@types/estree": { "version": "0.0.51", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true }, "node_modules/@types/express": { "version": "4.17.13", @@ -4309,7 +4318,8 @@ "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true }, "node_modules/@types/json5": { "version": "0.0.29", @@ -4338,7 +4348,8 @@ "node_modules/@types/node": { "version": "16.18.50", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.50.tgz", - "integrity": "sha512-OiDU5xRgYTJ203v4cprTs0RwOCd5c5Zjv+K5P8KSqfiCsB1W3LcamTUMcnQarpq5kOYbhHfSOgIEJvdPyb5xyw==" + "integrity": "sha512-OiDU5xRgYTJ203v4cprTs0RwOCd5c5Zjv+K5P8KSqfiCsB1W3LcamTUMcnQarpq5kOYbhHfSOgIEJvdPyb5xyw==", + "dev": true }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -4670,6 +4681,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -4678,22 +4690,26 @@ "node_modules/@webassemblyjs/floating-point-hex-parser": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==" + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==" + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==" + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -4703,12 +4719,14 @@ "node_modules/@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==" + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -4720,6 +4738,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -4728,6 +4747,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -4735,12 +4755,14 @@ "node_modules/@webassemblyjs/utf8": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==" + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -4756,6 +4778,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -4768,6 +4791,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -4779,6 +4803,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -4792,6 +4817,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" @@ -4844,12 +4870,14 @@ "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true }, "node_modules/accepts": { "version": "1.3.8", @@ -4868,6 +4896,7 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -4879,6 +4908,7 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, "peerDependencies": { "acorn": "^8" } @@ -6060,6 +6090,7 @@ "version": "4.21.10", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, "funding": [ { "type": "opencollective", @@ -6123,7 +6154,8 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/bufferjs": { "version": "3.0.1", @@ -6204,6 +6236,7 @@ "version": "1.0.30001527", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001527.tgz", "integrity": "sha512-YkJi7RwPgWtXVSgK4lG9AHH57nSzvvOp9MesgXmw4Q7n0C3H04L0foHqfxcmSAm5AcWb8dW9AYj2tR7/5GnddQ==", + "dev": true, "funding": [ { "type": "opencollective", @@ -6352,6 +6385,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, "engines": { "node": ">=6.0" } @@ -6549,6 +6583,11 @@ "node": ">= 0.8" } }, + "node_modules/comlink": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/comlink/-/comlink-4.4.1.tgz", + "integrity": "sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q==" + }, "node_modules/commander": { "version": "9.4.0", "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", @@ -7864,7 +7903,8 @@ "node_modules/electron-to-chromium": { "version": "1.4.513", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.513.tgz", - "integrity": "sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==" + "integrity": "sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==", + "dev": true }, "node_modules/emittery": { "version": "0.11.0", @@ -7966,6 +8006,7 @@ "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -8170,7 +8211,8 @@ "node_modules/es-module-lexer": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==" + "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", + "dev": true }, "node_modules/es-shim-unscopables": { "version": "1.0.0", @@ -8245,6 +8287,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, "engines": { "node": ">=6" } @@ -8768,6 +8811,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -8780,6 +8824,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, "engines": { "node": ">=4.0" } @@ -9003,6 +9048,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -9014,6 +9060,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "engines": { "node": ">=4.0" } @@ -9079,6 +9126,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, "engines": { "node": ">=0.8.x" } @@ -9343,7 +9391,8 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-diff": { "version": "1.2.0", @@ -9370,7 +9419,8 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -10084,7 +10134,8 @@ "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", @@ -11668,7 +11719,8 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-schema": { "version": "0.4.0", @@ -12071,6 +12123,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, "engines": { "node": ">=6.11.5" } @@ -12690,7 +12743,8 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", @@ -12954,7 +13008,8 @@ "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true }, "node_modules/nerf-dart": { "version": "1.0.0", @@ -13019,7 +13074,8 @@ "node_modules/node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true }, "node_modules/nofilter": { "version": "3.1.0", @@ -16819,7 +16875,8 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", @@ -17304,6 +17361,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, "engines": { "node": ">=6" } @@ -17436,6 +17494,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -18106,7 +18165,8 @@ "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -19522,6 +19582,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -19530,6 +19591,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -20665,6 +20727,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, "engines": { "node": ">=6" } @@ -20845,6 +20908,7 @@ "version": "5.21.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.21.0.tgz", "integrity": "sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==", + "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -20862,6 +20926,7 @@ "version": "5.3.9", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", @@ -20895,6 +20960,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -20910,6 +20976,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, "peerDependencies": { "ajv": "^6.9.1" } @@ -20918,6 +20985,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "engines": { "node": ">=8" } @@ -20926,6 +20994,7 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -20938,12 +21007,14 @@ "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/terser-webpack-plugin/node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -20961,6 +21032,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, "dependencies": { "randombytes": "^2.1.0" } @@ -20969,6 +21041,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -20982,7 +21055,8 @@ "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true }, "node_modules/text-extensions": { "version": "1.9.0", @@ -21821,6 +21895,7 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, "funding": [ { "type": "opencollective", @@ -21850,6 +21925,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -22005,6 +22081,7 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -22050,6 +22127,7 @@ "version": "5.88.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -22334,6 +22412,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, "engines": { "node": ">=10.13.0" } @@ -22341,12 +22420,14 @@ "node_modules/webpack/node_modules/@types/estree": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", - "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==" + "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", + "dev": true }, "node_modules/webpack/node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -22362,6 +22443,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, "peerDependencies": { "ajv": "^6.9.1" } @@ -22369,12 +22451,14 @@ "node_modules/webpack/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/webpack/node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -22481,14 +22565,6 @@ "node": ">=0.8.0" } }, - "node_modules/webworker-promise": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/webworker-promise/-/webworker-promise-0.5.1.tgz", - "integrity": "sha512-KiHNwAWKVM5fyqssxD9TZb977qE9xsXYxYKxDogRefYdwDuDlGIJCGMd8nA1/bXoqa66E8JOIwgl8YEHOV0pIw==", - "dependencies": { - "webpack": "^5.74.0" - } - }, "node_modules/well-known-symbols": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", @@ -24618,17 +24694,20 @@ "@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true }, "@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true }, "@jridgewell/source-map": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -24638,6 +24717,7 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -24649,12 +24729,14 @@ "@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true }, "@jridgewell/trace-mapping": { "version": "0.3.19", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -25714,6 +25796,7 @@ "version": "8.4.6", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.6.tgz", "integrity": "sha512-/fqTbjxyFUaYNO7VcW5g+4npmqVACz1bB7RTHYuLj+PRjw9hrCwrUXVQFpChUS0JsyEFvMZ7U/PfmvWgxJhI9g==", + "dev": true, "requires": { "@types/estree": "*", "@types/json-schema": "*" @@ -25723,6 +25806,7 @@ "version": "3.7.4", "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dev": true, "requires": { "@types/eslint": "*", "@types/estree": "*" @@ -25731,7 +25815,8 @@ "@types/estree": { "version": "0.0.51", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true }, "@types/express": { "version": "4.17.13", @@ -25768,7 +25853,8 @@ "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true }, "@types/json5": { "version": "0.0.29", @@ -25797,7 +25883,8 @@ "@types/node": { "version": "16.18.50", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.50.tgz", - "integrity": "sha512-OiDU5xRgYTJ203v4cprTs0RwOCd5c5Zjv+K5P8KSqfiCsB1W3LcamTUMcnQarpq5kOYbhHfSOgIEJvdPyb5xyw==" + "integrity": "sha512-OiDU5xRgYTJ203v4cprTs0RwOCd5c5Zjv+K5P8KSqfiCsB1W3LcamTUMcnQarpq5kOYbhHfSOgIEJvdPyb5xyw==", + "dev": true }, "@types/normalize-package-data": { "version": "2.4.1", @@ -26042,6 +26129,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, "requires": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -26050,22 +26138,26 @@ "@webassemblyjs/floating-point-hex-parser": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==" + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true }, "@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==" + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true }, "@webassemblyjs/helper-buffer": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==" + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true }, "@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, "requires": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -26075,12 +26167,14 @@ "@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==" + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -26092,6 +26186,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } @@ -26100,6 +26195,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, "requires": { "@xtuc/long": "4.2.2" } @@ -26107,12 +26203,14 @@ "@webassemblyjs/utf8": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==" + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true }, "@webassemblyjs/wasm-edit": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -26128,6 +26226,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -26140,6 +26239,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -26151,6 +26251,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -26164,6 +26265,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" @@ -26193,12 +26295,14 @@ "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true }, "accepts": { "version": "1.3.8", @@ -26213,12 +26317,14 @@ "acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true }, "acorn-import-assertions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, "requires": {} }, "acorn-jsx": { @@ -27072,6 +27178,7 @@ "version": "4.21.10", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, "requires": { "caniuse-lite": "^1.0.30001517", "electron-to-chromium": "^1.4.477", @@ -27098,7 +27205,8 @@ "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "bufferjs": { "version": "3.0.1", @@ -27154,7 +27262,8 @@ "caniuse-lite": { "version": "1.0.30001527", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001527.tgz", - "integrity": "sha512-YkJi7RwPgWtXVSgK4lG9AHH57nSzvvOp9MesgXmw4Q7n0C3H04L0foHqfxcmSAm5AcWb8dW9AYj2tR7/5GnddQ==" + "integrity": "sha512-YkJi7RwPgWtXVSgK4lG9AHH57nSzvvOp9MesgXmw4Q7n0C3H04L0foHqfxcmSAm5AcWb8dW9AYj2tR7/5GnddQ==", + "dev": true }, "cardinal": { "version": "2.1.1", @@ -27261,7 +27370,8 @@ "chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true }, "chunkd": { "version": "2.0.1", @@ -27411,6 +27521,11 @@ "delayed-stream": "~1.0.0" } }, + "comlink": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/comlink/-/comlink-4.4.1.tgz", + "integrity": "sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q==" + }, "commander": { "version": "9.4.0", "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", @@ -28447,7 +28562,8 @@ "electron-to-chromium": { "version": "1.4.513", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.513.tgz", - "integrity": "sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==" + "integrity": "sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==", + "dev": true }, "emittery": { "version": "0.11.0", @@ -28519,6 +28635,7 @@ "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -28665,7 +28782,8 @@ "es-module-lexer": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==" + "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", + "dev": true }, "es-shim-unscopables": { "version": "1.0.0", @@ -28726,7 +28844,8 @@ "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true }, "escape-html": { "version": "1.0.3", @@ -29192,6 +29311,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -29200,7 +29320,8 @@ "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true } } }, @@ -29271,6 +29392,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "requires": { "estraverse": "^5.2.0" } @@ -29278,7 +29400,8 @@ "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true }, "esutils": { "version": "2.0.3", @@ -29333,7 +29456,8 @@ "events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true }, "execa": { "version": "5.1.1", @@ -29534,7 +29658,8 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "fast-diff": { "version": "1.2.0", @@ -29558,7 +29683,8 @@ "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -30160,7 +30286,8 @@ "glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true }, "global-dirs": { "version": "3.0.0", @@ -31276,7 +31403,8 @@ "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "json-schema": { "version": "0.4.0", @@ -31587,7 +31715,8 @@ "loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==" + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true }, "loader-utils": { "version": "2.0.4", @@ -32057,7 +32186,8 @@ "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "merge2": { "version": "1.4.1", @@ -32255,7 +32385,8 @@ "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true }, "nerf-dart": { "version": "1.0.0", @@ -32308,7 +32439,8 @@ "node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true }, "nofilter": { "version": "3.1.0", @@ -34869,7 +35001,8 @@ "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "picomatch": { "version": "2.3.1", @@ -35226,7 +35359,8 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "puppeteer": { "version": "18.2.1", @@ -35323,6 +35457,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -35839,7 +35974,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -36854,12 +36990,14 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -37731,7 +37869,8 @@ "tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true }, "tape": { "version": "4.16.0", @@ -37867,6 +38006,7 @@ "version": "5.21.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.21.0.tgz", "integrity": "sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==", + "dev": true, "requires": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -37877,7 +38017,8 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true } } }, @@ -37885,6 +38026,7 @@ "version": "5.3.9", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", @@ -37897,6 +38039,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -37908,17 +38051,20 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, "requires": {} }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -37928,12 +38074,14 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -37944,6 +38092,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, "requires": { "randombytes": "^2.1.0" } @@ -37952,6 +38101,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -38568,6 +38718,7 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -38577,6 +38728,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -38713,6 +38865,7 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -38752,6 +38905,7 @@ "version": "5.88.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -38782,12 +38936,14 @@ "@types/estree": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", - "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==" + "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", + "dev": true }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -38799,17 +38955,20 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, "requires": {} }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -38970,7 +39129,8 @@ "webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==" + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true }, "webpackbar": { "version": "5.0.2", @@ -39037,14 +39197,6 @@ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, - "webworker-promise": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/webworker-promise/-/webworker-promise-0.5.1.tgz", - "integrity": "sha512-KiHNwAWKVM5fyqssxD9TZb977qE9xsXYxYKxDogRefYdwDuDlGIJCGMd8nA1/bXoqa66E8JOIwgl8YEHOV0pIw==", - "requires": { - "webpack": "^5.74.0" - } - }, "well-known-symbols": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", diff --git a/package.json b/package.json index 9dedd59a6..582e3d685 100644 --- a/package.json +++ b/package.json @@ -163,13 +163,13 @@ "@thewtex/zstddec": "^0.2.0", "@types/emscripten": "^1.39.6", "axios": "^1.4.0", + "comlink": "^4.4.1", "commander": "^9.4.0", "fs-extra": "^10.0.0", "glob": "^8.1.0", "markdown-table": "^3.0.3", "mime-types": "^2.1.35", - "wasm-feature-detect": "^1.5.1", - "webworker-promise": "^0.5.1" + "wasm-feature-detect": "^1.5.1" }, "bin": { "itk-wasm": "./src/itk-wasm-cli.js" diff --git a/src/core/createWebWorkerPromise.ts b/src/core/create-worker-proxy.ts similarity index 62% rename from src/core/createWebWorkerPromise.ts rename to src/core/create-worker-proxy.ts index f7c4e782d..73cb78388 100644 --- a/src/core/createWebWorkerPromise.ts +++ b/src/core/create-worker-proxy.ts @@ -1,31 +1,44 @@ import axios from 'axios' -import WebworkerPromise from 'webworker-promise' +import * as Comlink from 'comlink' +import WorkerProxy from './web-workers/worker-proxy.js' import config from '../itkConfig.js' -interface createWebWorkerPromiseResult { - webworkerPromise: typeof WebworkerPromise - worker: Worker +interface ItkWorker extends Worker { + workerProxy: WorkerProxy + originalTerminate: () => void } -interface itkWorker extends Worker { - workerPromise?: typeof WebworkerPromise +interface createWorkerProxyResult { + workerProxy: WorkerProxy + worker: ItkWorker +} + +function workerToWorkerProxy (worker: Worker): createWorkerProxyResult { + const workerProxy = Comlink.wrap(worker) as WorkerProxy + const itkWebWorker = worker as ItkWorker + itkWebWorker.workerProxy = workerProxy + itkWebWorker.originalTerminate = itkWebWorker.terminate + itkWebWorker.terminate = () => { + itkWebWorker.workerProxy[Comlink.releaseProxy]() + itkWebWorker.originalTerminate() + } + return { workerProxy, worker: itkWebWorker } } // Internal function to create a web worker promise -async function createWebWorkerPromise (existingWorker: Worker | null, pipelineWorkerUrl?: string | null): Promise { - let workerPromise: typeof WebworkerPromise +async function createWorkerProxy (existingWorker: Worker | null, pipelineWorkerUrl?: string | null): Promise { + let workerProxy: WorkerProxy if (existingWorker != null) { // See if we have a worker promise attached the worker, if so reuse it. This ensures // that we can safely reuse the worker without issues. - const itkWebWorker = existingWorker as itkWorker - if (itkWebWorker.workerPromise !== undefined) { - workerPromise = itkWebWorker.workerPromise + const itkWebWorker = existingWorker as ItkWorker + if (itkWebWorker.workerProxy !== undefined) { + workerProxy = itkWebWorker.workerProxy + return { workerProxy, worker: itkWebWorker } } else { - workerPromise = new WebworkerPromise(existingWorker) + return workerToWorkerProxy(existingWorker) } - - return await Promise.resolve({ webworkerPromise: workerPromise, worker: existingWorker }) } const workerUrl = typeof pipelineWorkerUrl === 'undefined' ? config.pipelineWorkerUrl : pipelineWorkerUrl @@ -61,13 +74,7 @@ async function createWebWorkerPromise (existingWorker: Worker | null, pipelineWo } } - const webworkerPromise = new WebworkerPromise(worker) - - // Attach the worker promise to the worker, so if the worker is reused we can - // also reuse the the worker promise. - const itkWebWorker = (worker as itkWorker) - itkWebWorker.workerPromise = webworkerPromise - return { webworkerPromise, worker: itkWebWorker } + return workerToWorkerProxy(worker) } -export default createWebWorkerPromise +export default createWorkerProxy diff --git a/src/core/getTransferables.ts b/src/core/get-transferables.ts similarity index 100% rename from src/core/getTransferables.ts rename to src/core/get-transferables.ts diff --git a/src/core/index.ts b/src/core/index.ts index 4bcee8ced..3d9c4a94f 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -44,5 +44,5 @@ export { default as WorkerPool } from './WorkerPool.js' export { default as WorkerPoolFunction } from './WorkerPoolFunction.js' export { default as WorkerPoolProgressCallback } from './WorkerPoolProgressCallback.js' export { default as WorkerPoolRunTasksResult } from './WorkerPoolRunTasksResult.js' -export { default as getTransferables } from './getTransferables.js' -export { default as createWebWorkerPromise } from './createWebWorkerPromise.js' +export { default as getTransferables } from './get-transferables.js' +export { default as createWorkerProxy } from './create-worker-proxy.js' diff --git a/src/core/web-workers/itk-wasm-pipeline.worker.ts b/src/core/web-workers/itk-wasm-pipeline.worker.ts index 294578b7d..dcfba349d 100644 --- a/src/core/web-workers/itk-wasm-pipeline.worker.ts +++ b/src/core/web-workers/itk-wasm-pipeline.worker.ts @@ -1,5 +1,15 @@ -import registerWebworker from 'webworker-promise/lib/register.js' +import * as Comlink from 'comlink' +import ITKConfig from './itk-config.js' +import PipelineOutput from '../../pipeline/PipelineOutput.js' +import PipelineInput from '../../pipeline/PipelineInput.js' +import MeshToPolyDataPipelineResult from './mesh-to-poly-data-pipeline-result.js' +import PolyDataToMeshPipelineResult from './poly-data-to-mesh-pipeline-result.js' +import ReadImagePipelineResult from './read-image-pipeline-result.js' +import WriteImagePipelineResult from './write-image-pipeline-result.js' +import ReadMeshPipelineResult from './read-mesh-pipeline-result.js' +import WriteMeshPipelineResult from './write-mesh-pipeline-result.js' +import RunPipelineWorkerResult from './run-pipeline-worker-result.js' import loadPipelineModule from './load-pipeline-module.js' import loadImageIOPipelineModule from './load-image-io-pipeline-module.js' import loadMeshIOPipelineModule from './load-mesh-io-pipeline-module.js' @@ -7,29 +17,42 @@ import runPipeline from './run-pipeline.js' import RunPipelineInput from './run-pipeline-input.js' import IOInput from './io-input.js' -registerWebworker(async function (input: RunPipelineInput | IOInput) { - let pipelineModule = null - if (input.operation === 'runPipeline') { - const pipelineBaseUrl = typeof input.config[input.pipelineBaseUrl] === 'undefined' ? input.pipelineBaseUrl : input.config[input.pipelineBaseUrl] as string - pipelineModule = await loadPipelineModule(input.pipelinePath, pipelineBaseUrl) - } else if (input.operation === 'readImage') { - pipelineModule = await loadImageIOPipelineModule(input as IOInput, '-read-image') - } else if (input.operation === 'writeImage') { - pipelineModule = await loadImageIOPipelineModule(input as IOInput, '-write-image') - } else if (input.operation === 'readMesh') { - pipelineModule = await loadMeshIOPipelineModule(input as IOInput, '-read-mesh') - } else if (input.operation === 'writeMesh') { - pipelineModule = await loadMeshIOPipelineModule(input as IOInput, '-write-mesh') - } else if (input.operation === 'meshToPolyData') { - pipelineModule = await loadPipelineModule('mesh-to-polydata', input.config.meshIOUrl) - } else if (input.operation === 'polyDataToMesh') { - pipelineModule = await loadPipelineModule('polydata-to-mesh', input.config.meshIOUrl) - } else if (input.operation === 'readDICOMImageSeries') { - pipelineModule = await loadPipelineModule('read-image-dicom-file-series', input.config.imageIOUrl) - } else if (input.operation === 'readDICOMTags') { - pipelineModule = await loadPipelineModule('read-dicom-tags', input.config.imageIOUrl) - } else { - throw new Error('Unknown worker operation') - } - return runPipeline(pipelineModule, input.args, input.outputs, input.inputs) -}) +const workerOperations = { + meshToPolyData: async function (config: ITKConfig, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]): Promise { + const pipelineModule = await loadPipelineModule('mesh-to-polydata', config.meshIOUrl) + return runPipeline(pipelineModule, args, outputs, inputs) + }, + + polyDataToMesh: async function (config: ITKConfig, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]): Promise { + const pipelineModule = await loadPipelineModule('polydata-to-mesh', config.meshIOUrl) + return runPipeline(pipelineModule, args, outputs, inputs) + }, + + readImage: async function (config: ITKConfig, mimeType: string, fileName: string, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]): Promise { + const pipelineModule = await loadImageIOPipelineModule({ fileName, mimeType, config, args, outputs, inputs } as IOInput, '-read-image') + return runPipeline(pipelineModule, args, outputs, inputs) + }, + + writeImage: async function (config: ITKConfig, mimeType: string, fileName: string, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]): Promise { + const pipelineModule = await loadImageIOPipelineModule({ fileName, mimeType, config, args, outputs, inputs } as IOInput, '-write-image') + return runPipeline(pipelineModule, args, outputs, inputs) + }, + + readMesh: async function (config: ITKConfig, mimeType: string, fileName: string, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]): Promise { + const pipelineModule = await loadMeshIOPipelineModule({ fileName, mimeType, config, args, outputs, inputs } as IOInput, '-read-mesh') + return runPipeline(pipelineModule, args, outputs, inputs) + }, + + writeMesh: async function (config: ITKConfig, mimeType: string, fileName: string, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]): Promise { + const pipelineModule = await loadMeshIOPipelineModule({ fileName, mimeType, config, args, outputs, inputs } as IOInput, '-write-mesh') + return runPipeline(pipelineModule, args, outputs, inputs) + }, + + runPipeline: async function (config: ITKConfig, pipelinePath: string, pipelineBaseUrl: string, args: string[], outputs: PipelineOutput[] | null, inputs: PipelineInput[] | null): Promise { + const resolvedPipelineBaseUrl = typeof config[pipelineBaseUrl] === 'undefined' ? pipelineBaseUrl : config[pipelineBaseUrl] as string + const pipelineModule = await loadPipelineModule(pipelinePath, resolvedPipelineBaseUrl) + return runPipeline(pipelineModule, args, outputs, inputs) + }, +} + +Comlink.expose(workerOperations) \ No newline at end of file diff --git a/src/core/web-workers/mesh-to-poly-data-pipeline-result.ts b/src/core/web-workers/mesh-to-poly-data-pipeline-result.ts new file mode 100644 index 000000000..613beff35 --- /dev/null +++ b/src/core/web-workers/mesh-to-poly-data-pipeline-result.ts @@ -0,0 +1,5 @@ + interface MeshToPolyDataPipelineResult { + outputs: any[] + } + + export default MeshToPolyDataPipelineResult \ No newline at end of file diff --git a/src/core/web-workers/poly-data-to-mesh-pipeline-result.ts b/src/core/web-workers/poly-data-to-mesh-pipeline-result.ts new file mode 100644 index 000000000..3b3d8a616 --- /dev/null +++ b/src/core/web-workers/poly-data-to-mesh-pipeline-result.ts @@ -0,0 +1,5 @@ + interface PolyDataToMeshPipelineResult { + outputs: any[] + } + + export default PolyDataToMeshPipelineResult \ No newline at end of file diff --git a/src/core/web-workers/read-image-pipeline-result.ts b/src/core/web-workers/read-image-pipeline-result.ts new file mode 100644 index 000000000..676ffccc0 --- /dev/null +++ b/src/core/web-workers/read-image-pipeline-result.ts @@ -0,0 +1,7 @@ +interface ReadImagePipelineResult { + stdout: string + stderr: string + outputs: any[] +} + +export default ReadImagePipelineResult \ No newline at end of file diff --git a/src/core/web-workers/read-mesh-pipeline-result.ts b/src/core/web-workers/read-mesh-pipeline-result.ts new file mode 100644 index 000000000..285497e52 --- /dev/null +++ b/src/core/web-workers/read-mesh-pipeline-result.ts @@ -0,0 +1,7 @@ +interface ReadMeshPipelineResult { + stdout: string + stderr: string + outputs: any[] +} + +export default ReadMeshPipelineResult \ No newline at end of file diff --git a/src/core/web-workers/run-pipeline-worker-result.ts b/src/core/web-workers/run-pipeline-worker-result.ts new file mode 100644 index 000000000..b2375918b --- /dev/null +++ b/src/core/web-workers/run-pipeline-worker-result.ts @@ -0,0 +1,9 @@ + import PipelineOutput from '../../pipeline/PipelineOutput.js' + interface RunPipelineWorkerResult { + returnValue: number + stdout: string + stderr: string + outputs: PipelineOutput[] + } + + export default RunPipelineWorkerResult \ No newline at end of file diff --git a/src/core/web-workers/run-pipeline.ts b/src/core/web-workers/run-pipeline.ts index 13691a10e..2f2912008 100644 --- a/src/core/web-workers/run-pipeline.ts +++ b/src/core/web-workers/run-pipeline.ts @@ -1,9 +1,9 @@ -import registerWebworker from 'webworker-promise/lib/register.js' +import * as Comlink from 'comlink' import PipelineEmscriptenModule from '../../pipeline/PipelineEmscriptenModule.js' import runPipelineEmscripten from '../../pipeline/internal/runPipelineEmscripten.js' import IOTypes from '../IOTypes.js' -import getTransferables from '../getTransferables.js' +import getTransferables from '../get-transferables.js' import PipelineInput from '../../pipeline/PipelineInput.js' import PipelineOutput from '../../pipeline/PipelineOutput.js' @@ -17,7 +17,7 @@ import imageTransferables from '../internal/imageTransferables.js' import meshTransferables from '../internal/meshTransferables.js' import polyDataTransferables from '../internal/polyDataTransferables.js' -async function runPipeline(pipelineModule: PipelineEmscriptenModule, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]) { +async function runPipeline(pipelineModule: PipelineEmscriptenModule, args: string[], outputs: PipelineOutput[] | null, inputs: PipelineInput[] | null) { const result = runPipelineEmscripten(pipelineModule, args, outputs, inputs) const transferables: (ArrayBuffer | TypedArray | null)[] = [] @@ -53,10 +53,7 @@ async function runPipeline(pipelineModule: PipelineEmscriptenModule, args: strin }) } - return new registerWebworker.TransferableResponse( - result, - getTransferables(transferables) - ) + return Comlink.transfer(result, getTransferables(transferables)) } export default runPipeline diff --git a/src/core/web-workers/web-worker-input.ts b/src/core/web-workers/web-worker-input.ts index ed3489c12..60e38f6cc 100644 --- a/src/core/web-workers/web-worker-input.ts +++ b/src/core/web-workers/web-worker-input.ts @@ -1,7 +1,7 @@ import ITKConfig from './itk-config.js' interface WebWorkerInput { - operation: 'runPipeline' | 'runPolyDataIOPipeline' | 'readImage' | 'writeImage' | 'readMesh' | 'writeMesh' | 'meshToPolyData' | 'polyDataToMesh' | 'readDICOMImageSeries' | 'readDICOMTags' + operation: 'runPipeline' | 'runPolyDataIOPipeline' | 'readImage' | 'writeImage' | 'readMesh' | 'writeMesh' | 'meshToPolyData' | 'polyDataToMesh' config: ITKConfig } diff --git a/src/core/web-workers/worker-operations.ts b/src/core/web-workers/worker-operations.ts new file mode 100644 index 000000000..73a91752d --- /dev/null +++ b/src/core/web-workers/worker-operations.ts @@ -0,0 +1,22 @@ +import ITKConfig from './itk-config.js' +import PipelineOutput from '../../pipeline/PipelineOutput.js' +import PipelineInput from '../../pipeline/PipelineInput.js' +import MeshToPolyDataPipelineResult from './mesh-to-poly-data-pipeline-result.js' +import PolyDataToMeshPipelineResult from './poly-data-to-mesh-pipeline-result.js' +import ReadImagePipelineResult from './read-image-pipeline-result.js' +import WriteImagePipelineResult from './write-image-pipeline-result.js' +import ReadMeshPipelineResult from './read-mesh-pipeline-result.js' +import WriteMeshPipelineResult from './write-mesh-pipeline-result.js' +import RunPipelineWorkerResult from './run-pipeline-worker-result.js' + +interface WorkerOperations { + meshToPolyData: (config: ITKConfig, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]) => MeshToPolyDataPipelineResult + polyDataToMesh: (config: ITKConfig, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]) => PolyDataToMeshPipelineResult + readImage: (config: ITKConfig, mimeType: string, fileName: string, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]) => ReadImagePipelineResult + writeImage: (config: ITKConfig, mimeType: string, fileName: string, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]) => WriteImagePipelineResult + readMesh: (config: ITKConfig, mimeType: string, fileName: string, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]) => ReadMeshPipelineResult + writeMesh: (config: ITKConfig, mimeType: string, fileName: string, args: string[], outputs: PipelineOutput[], inputs: PipelineInput[]) => WriteMeshPipelineResult + runPipeline: (config: ITKConfig, pipelinePath: string, pipelineBaseUrl: string, args: string[], outputs: PipelineOutput[] | null, inputs: PipelineInput[] | null) => RunPipelineWorkerResult +} + +export default WorkerOperations \ No newline at end of file diff --git a/src/core/web-workers/worker-proxy.ts b/src/core/web-workers/worker-proxy.ts new file mode 100644 index 000000000..0e3d4ca86 --- /dev/null +++ b/src/core/web-workers/worker-proxy.ts @@ -0,0 +1,7 @@ +import * as Comlink from 'comlink' + +import WorkerOperations from './worker-operations.js' + +type WorkerProxy = Comlink.Remote + +export default WorkerProxy \ No newline at end of file diff --git a/src/core/web-workers/write-image-pipeline-result.ts b/src/core/web-workers/write-image-pipeline-result.ts new file mode 100644 index 000000000..2f62fb3a0 --- /dev/null +++ b/src/core/web-workers/write-image-pipeline-result.ts @@ -0,0 +1,7 @@ +interface WriteImagePipelineResult { + stdout: string + stderr: string + outputs: any[] +} + +export default WriteImagePipelineResult \ No newline at end of file diff --git a/src/core/web-workers/write-mesh-pipeline-result.ts b/src/core/web-workers/write-mesh-pipeline-result.ts new file mode 100644 index 000000000..be30423cb --- /dev/null +++ b/src/core/web-workers/write-mesh-pipeline-result.ts @@ -0,0 +1,7 @@ +interface WriteMeshPipelineResult { + stdout: string + stderr: string + outputs: any[] +} + +export default WriteMeshPipelineResult \ No newline at end of file diff --git a/src/io/meshToPolyData.ts b/src/io/meshToPolyData.ts index 99c518dff..0db58ace1 100644 --- a/src/io/meshToPolyData.ts +++ b/src/io/meshToPolyData.ts @@ -1,15 +1,18 @@ -import createWebWorkerPromise from '../core/createWebWorkerPromise.js' +import * as Comlink from 'comlink' + +import createWorkerProxy from '../core/create-worker-proxy.js' import Mesh from '../core/interface-types/mesh.js' import InterfaceTypes from '../core/InterfaceTypes.js' import PolyData from '../core/interface-types/poly-data.js' import meshTransferables from '../core/internal/meshTransferables.js' import PipelineInput from '../pipeline/PipelineInput.js' +import MeshToPolyDataPipelineResult from '../core/web-workers/mesh-to-poly-data-pipeline-result.js' import config from '../itkConfig.js' -import getTransferables from '../core/getTransferables.js' +import getTransferables from '../core/get-transferables.js' async function meshToPolyData (webWorker: Worker | null, mesh: Mesh): Promise<{ polyData: PolyData, webWorker: Worker }> { let worker = webWorker - const { webworkerPromise, worker: usedWorker } = await createWebWorkerPromise(worker, null) + const { workerProxy, worker: usedWorker } = await createWorkerProxy(worker, null) worker = usedWorker const args = ['0', '0', '--memory-io'] @@ -21,20 +24,12 @@ async function meshToPolyData (webWorker: Worker | null, mesh: Mesh): Promise<{ ] as PipelineInput[] const transferables = meshTransferables(mesh) - interface RunMeshToPolyDataPipelineResult { - outputs: any[] - } - const result: RunMeshToPolyDataPipelineResult = await webworkerPromise.postMessage( - { - operation: 'meshToPolyData', - config: config, - pipelinePath: 'mesh-to-polydata', // placeholder - args, - outputs, - inputs - }, - getTransferables(transferables) + const result: MeshToPolyDataPipelineResult = await workerProxy.meshToPolyData( + config, + args, + outputs, + Comlink.transfer(inputs, getTransferables(transferables)) ) return { polyData: result.outputs[0].data as PolyData, webWorker: worker } } diff --git a/src/io/polyDataToMesh.ts b/src/io/polyDataToMesh.ts index 291271e2b..8c8fe55a4 100644 --- a/src/io/polyDataToMesh.ts +++ b/src/io/polyDataToMesh.ts @@ -1,15 +1,18 @@ -import createWebWorkerPromise from '../core/createWebWorkerPromise.js' +import * as Comlink from 'comlink' + +import createWorkerProxy from '../core/create-worker-proxy.js' +import PolyDataToMeshPipelineResult from '../core/web-workers/poly-data-to-mesh-pipeline-result.js' import Mesh from '../core/interface-types/mesh.js' import InterfaceTypes from '../core/InterfaceTypes.js' import PolyData from '../core/interface-types/poly-data.js' import polyDataTransferables from '../core/internal/polyDataTransferables.js' import PipelineInput from '../pipeline/PipelineInput.js' import config from '../itkConfig.js' -import getTransferables from '../core/getTransferables.js' +import getTransferables from '../core/get-transferables.js' async function polyDataToMesh (webWorker: Worker | null, polyData: PolyData): Promise<{ mesh: Mesh, webWorker: Worker }> { let worker = webWorker - const { webworkerPromise, worker: usedWorker } = await createWebWorkerPromise(worker, null) + const { workerProxy, worker: usedWorker } = await createWorkerProxy(worker, null) worker = usedWorker const args = ['0', '0', '--memory-io'] @@ -21,20 +24,12 @@ async function polyDataToMesh (webWorker: Worker | null, polyData: PolyData): Pr ] as PipelineInput[] const transferables = polyDataTransferables(polyData) - interface Result { - outputs: any[] - } - const result: Result = await webworkerPromise.postMessage( - { - operation: 'polyDataToMesh', - config: config, - pipelinePath: 'polydata-to-mesh', // placeholder - args, - outputs, - inputs - }, - getTransferables(transferables) + const result: PolyDataToMeshPipelineResult = await workerProxy.polyDataToMesh( + config, + args, + outputs, + Comlink.transfer(inputs, getTransferables(transferables)) ) return { mesh: result.outputs[0].data as Mesh, webWorker: worker } } diff --git a/src/io/readImageArrayBuffer.ts b/src/io/readImageArrayBuffer.ts index 7f3156f4a..861a1e8a3 100644 --- a/src/io/readImageArrayBuffer.ts +++ b/src/io/readImageArrayBuffer.ts @@ -1,5 +1,8 @@ -import getTransferables from '../core/getTransferables.js' -import createWebWorkerPromise from '../core/createWebWorkerPromise.js' +import * as Comlink from 'comlink' + +import createWorkerProxy from '../core/create-worker-proxy.js' +import getTransferables from '../core/get-transferables.js' +import ReadImagePipelineResult from '../core/web-workers/read-image-pipeline-result.js' import Image from '../core/interface-types/image.js' import InterfaceTypes from '../core/InterfaceTypes.js' import PipelineInput from '../pipeline/PipelineInput.js' @@ -12,7 +15,7 @@ import ReadImageArrayBufferOptions from './ReadImageArrayBufferOptions.js' async function readImageArrayBuffer (webWorker: Worker | null, arrayBuffer: ArrayBuffer, fileName: string, options?: ReadImageArrayBufferOptions | string): Promise { let worker = webWorker - const { webworkerPromise, worker: usedWorker } = await createWebWorkerPromise(worker, null) + const { workerProxy, worker: usedWorker } = await createWorkerProxy(worker, null) worker = usedWorker const filePath = `./${fileName}` @@ -25,11 +28,6 @@ async function readImageArrayBuffer (webWorker: Worker | null, arrayBuffer: Arra ] as PipelineInput[] const transferables: ArrayBuffer[] = [arrayBuffer] - interface RunReadImagePipelineResult { - stdout: string - stderr: string - outputs: any[] - } let mimeType if (typeof options === 'string') { // backwards compatibility @@ -39,18 +37,14 @@ async function readImageArrayBuffer (webWorker: Worker | null, arrayBuffer: Arra mimeType = options.mimeType } } - const result: RunReadImagePipelineResult = await webworkerPromise.postMessage( - { - operation: 'readImage', - config: config, - mimeType, - fileName, - pipelinePath: 'read-image', // placeholder - args, - outputs, - inputs - }, - getTransferables(transferables) + const mimeTypeString = mimeType?.toString() ?? '' + const result: ReadImagePipelineResult = await workerProxy.readImage( + config, + mimeTypeString, + fileName, + args, + outputs, + Comlink.transfer(inputs, getTransferables(transferables)) ) let image = result.outputs[0].data as Image if (typeof options === 'object' && (typeof options.componentType !== 'undefined' || typeof options.pixelType !== 'undefined')) { diff --git a/src/io/readMeshArrayBuffer.ts b/src/io/readMeshArrayBuffer.ts index de6a9cfff..dfe1148e0 100644 --- a/src/io/readMeshArrayBuffer.ts +++ b/src/io/readMeshArrayBuffer.ts @@ -1,8 +1,11 @@ -import getTransferables from '../core/getTransferables.js' -import createWebWorkerPromise from '../core/createWebWorkerPromise.js' +import * as Comlink from 'comlink' + +import createWorkerProxy from '../core/create-worker-proxy.js' +import getTransferables from '../core/get-transferables.js' import Mesh from '../core/interface-types/mesh.js' import InterfaceTypes from '../core/InterfaceTypes.js' import PipelineInput from '../pipeline/PipelineInput.js' +import ReadMeshPipelineResult from '../core/web-workers/read-mesh-pipeline-result.js' import config from '../itkConfig.js' @@ -10,7 +13,7 @@ import ReadMeshResult from './ReadMeshResult.js' async function readMeshArrayBuffer (webWorker: Worker | null, arrayBuffer: ArrayBuffer, fileName: string, mimeType: string): Promise { let worker = webWorker - const { webworkerPromise, worker: usedWorker } = await createWebWorkerPromise(worker, null) + const { workerProxy, worker: usedWorker } = await createWorkerProxy(worker, null) worker = usedWorker const filePath = `./${fileName}` @@ -23,24 +26,14 @@ async function readMeshArrayBuffer (webWorker: Worker | null, arrayBuffer: Array ] as PipelineInput[] const transferables: ArrayBuffer[] = [arrayBuffer] - interface RunReadMeshPipelineResult { - stdout: string - stderr: string - outputs: any[] - } - - const result: RunReadMeshPipelineResult = await webworkerPromise.postMessage( - { - operation: 'readMesh', - config: config, - mimeType, - fileName, - pipelinePath: 'read-mesh', // placeholder - args, - outputs, - inputs - }, - getTransferables(transferables) + + const result: ReadMeshPipelineResult = await workerProxy.readMesh( + config, + mimeType, + fileName, + args, + outputs, + Comlink.transfer(inputs, getTransferables(transferables)) ) return { mesh: result.outputs[0].data as Mesh, webWorker: worker } } diff --git a/src/io/writeImageArrayBuffer.ts b/src/io/writeImageArrayBuffer.ts index 200306fd5..3ba832052 100644 --- a/src/io/writeImageArrayBuffer.ts +++ b/src/io/writeImageArrayBuffer.ts @@ -1,4 +1,6 @@ -import createWebWorkerPromise from '../core/createWebWorkerPromise.js' +import * as Comlink from 'comlink' + +import createWorkerProxy from '../core/create-worker-proxy.js' import Image from '../core/interface-types/image.js' @@ -6,8 +8,9 @@ import config from '../itkConfig.js' import PipelineInput from '../pipeline/PipelineInput.js' import PipelineOutput from '../pipeline/PipelineOutput.js' import InterfaceTypes from '../core/InterfaceTypes.js' -import getTransferables from '../core/getTransferables.js' +import getTransferables from '../core/get-transferables.js' import castImage from '../core/castImage.js' +import WriteImagePipelineResult from '../core/web-workers/write-image-pipeline-result.js' import WriteImageOptions from './WriteImageOptions.js' import WriteArrayBufferResult from './WriteArrayBufferResult.js' @@ -32,7 +35,7 @@ async function writeImageArrayBuffer (webWorker: Worker | null, image: Image, fi } let worker = webWorker - const { webworkerPromise, worker: usedWorker } = await createWebWorkerPromise(worker, null) + const { workerProxy, worker: usedWorker } = await createWorkerProxy(worker, null) worker = usedWorker const filePath = `./${fileName}` @@ -53,23 +56,13 @@ async function writeImageArrayBuffer (webWorker: Worker | null, image: Image, fi const transferables = imageTransferables(image) - interface RunWriteImagePipelineResult { - stdout: string - stderr: string - outputs: any[] - } - const result: RunWriteImagePipelineResult = await webworkerPromise.postMessage( - { - operation: 'writeImage', - config: config, - mimeType, - fileName, - pipelinePath: 'WriteImage', // placeholder - args, - outputs, - inputs - }, - getTransferables(transferables) + const result: WriteImagePipelineResult = await workerProxy.writeImage( + config, + mimeType, + fileName, + args, + outputs, + Comlink.transfer(inputs, getTransferables(transferables)) ) return { arrayBuffer: result.outputs[0].data.data.buffer as ArrayBuffer, webWorker: worker } } diff --git a/src/io/writeMeshArrayBuffer.ts b/src/io/writeMeshArrayBuffer.ts index 906d3056f..5d48db38b 100644 --- a/src/io/writeMeshArrayBuffer.ts +++ b/src/io/writeMeshArrayBuffer.ts @@ -1,4 +1,7 @@ -import createWebWorkerPromise from '../core/createWebWorkerPromise.js' +import * as Comlink from 'comlink' + +import createWorkerProxy from '../core/create-worker-proxy.js' +import WriteMeshPipelineResult from '../core/web-workers/write-mesh-pipeline-result.js' import Mesh from '../core/interface-types/mesh.js' @@ -9,7 +12,7 @@ import PipelineInput from '../pipeline/PipelineInput.js' import PipelineOutput from '../pipeline/PipelineOutput.js' import InterfaceTypes from '../core/InterfaceTypes.js' import meshTransferables from '../core/internal/meshTransferables.js' -import getTransferables from '../core/getTransferables.js' +import getTransferables from '../core/get-transferables.js' async function writeMeshArrayBuffer (webWorker: Worker | null, mesh: Mesh, fileName: string, mimeType: string, options: WriteMeshOptions): Promise { if ('useCompression' in (mesh as any) || 'binaryFileType' in (mesh as any)) { @@ -17,7 +20,7 @@ async function writeMeshArrayBuffer (webWorker: Worker | null, mesh: Mesh, fileN } let worker = webWorker - const { webworkerPromise, worker: usedWorker } = await createWebWorkerPromise(worker, null) + const { workerProxy, worker: usedWorker } = await createWorkerProxy(worker, null) worker = usedWorker const filePath = `./${fileName}` @@ -37,23 +40,13 @@ async function writeMeshArrayBuffer (webWorker: Worker | null, mesh: Mesh, fileN const transferables = meshTransferables(mesh) - interface RunWriteMeshPipelineResult { - stdout: string - stderr: string - outputs: any[] - } - const result: RunWriteMeshPipelineResult = await webworkerPromise.postMessage( - { - operation: 'writeMesh', - config: config, - mimeType, - fileName, - pipelinePath: 'WriteMesh', // placeholder - args, - outputs, - inputs - }, - getTransferables(transferables) + const result: WriteMeshPipelineResult = await workerProxy.writeMesh( + config, + mimeType, + fileName, + args, + outputs, + Comlink.transfer(inputs, getTransferables(transferables)) ) return { arrayBuffer: result.outputs[0].data.data.buffer as ArrayBuffer, webWorker: worker } } diff --git a/src/pipeline/runPipeline.ts b/src/pipeline/runPipeline.ts index 8f5d154de..6bc842ee6 100644 --- a/src/pipeline/runPipeline.ts +++ b/src/pipeline/runPipeline.ts @@ -1,4 +1,6 @@ -import createWebWorkerPromise from '../core/createWebWorkerPromise.js' +import * as Comlink from 'comlink' + +import createWorkerProxy from '../core/create-worker-proxy.js' import loadEmscriptenModuleMainThread from '../core/internal/loadEmscriptenModuleMainThread.js' import { simd } from 'wasm-feature-detect' @@ -8,7 +10,7 @@ import config from '../itkConfig.js' import IOTypes from '../core/IOTypes.js' import InterfaceTypes from '../core/InterfaceTypes.js' import runPipelineEmscripten from './internal/runPipelineEmscripten.js' -import getTransferables from '../core/getTransferables.js' +import getTransferables from '../core/get-transferables.js' import BinaryStream from '../core/interface-types/binary-stream.js' import BinaryFile from '../core/interface-types/binary-file.js' import Image from '../core/interface-types/image.js' @@ -22,6 +24,7 @@ import RunPipelineOptions from './RunPipelineOptions.js' import meshTransferables from '../core/internal/meshTransferables.js' import TypedArray from '../core/TypedArray.js' import imageTransferables from '../core/internal/imageTransferables.js' +import RunPipelineWorkerResult from '../core/web-workers/run-pipeline-worker-result.js' // To cache loaded pipeline modules const pipelineToModule: Map = new Map() @@ -69,7 +72,7 @@ async function runPipeline ( let worker = webWorker const pipelineWorkerUrl = options?.pipelineWorkerUrl ?? null const pipelineWorkerUrlString = typeof pipelineWorkerUrl !== 'string' && typeof pipelineWorkerUrl?.href !== 'undefined' ? pipelineWorkerUrl.href : pipelineWorkerUrl - const { webworkerPromise, worker: usedWorker } = await createWebWorkerPromise( + const { workerProxy, worker: usedWorker } = await createWorkerProxy( worker as Worker | null, pipelineWorkerUrlString as string | undefined | null ) worker = usedWorker @@ -108,25 +111,16 @@ async function runPipeline ( } }) } - interface RunPipelineWorkerResult { - returnValue: number - stdout: string - stderr: string - outputs: PipelineOutput[] - } const pipelineBaseUrl = options?.pipelineBaseUrl ?? 'pipelinesUrl' const pipelineBaseUrlString = typeof pipelineBaseUrl !== 'string' && typeof pipelineBaseUrl?.href !== 'undefined' ? pipelineBaseUrl.href : pipelineBaseUrl - const result: RunPipelineWorkerResult = await webworkerPromise.postMessage( - { - operation: 'runPipeline', - config: config, - pipelinePath: pipelinePath.toString(), - pipelineBaseUrl: pipelineBaseUrlString, - args, - outputs, - inputs - }, - getTransferables(transferables) + const transferedInputs = (inputs != null) ? Comlink.transfer(inputs, getTransferables(transferables)) : null + const result: RunPipelineWorkerResult = await workerProxy.runPipeline( + config, + pipelinePath.toString(), + pipelineBaseUrlString as string, + args, + outputs, + transferedInputs ) return { returnValue: result.returnValue,