diff --git a/package-lock.json b/package-lock.json index 97f8e56c..6d35cb16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,12 +13,12 @@ "dependencies": { "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", - "@deephaven/jsapi-nodejs": "0.102.0", + "@deephaven/jsapi-nodejs": "0.102.1-alpha-grpc-transport.2", "nanoid": "^5.0.7" }, "devDependencies": { "@deephaven-enterprise/jsapi-types": "^1.20240723.124-beta", - "@deephaven/jsapi-types": "^1.0.0-dev0.36.1", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@types/node": "22.5.4", "@types/vscode": "^1.91.0", "@types/ws": "^8.5.10", @@ -467,20 +467,42 @@ } }, "node_modules/@deephaven/jsapi-nodejs": { - "version": "0.102.0", - "resolved": "https://registry.npmjs.org/@deephaven/jsapi-nodejs/-/jsapi-nodejs-0.102.0.tgz", - "integrity": "sha512-BtnhM8CwIHjK+8Vws02MjEUxgMLIBX78jTtFYgbRX8/1gLgq97pnsumhvnucc9JDf8hbIslXtkIUb+6Mc8f9aQ==", + "version": "0.102.1-alpha-grpc-transport.2", + "resolved": "https://registry.npmjs.org/@deephaven/jsapi-nodejs/-/jsapi-nodejs-0.102.1-alpha-grpc-transport.2.tgz", + "integrity": "sha512-9zudU+fko+LjQcKiOoqoJ50BwMfjuY/Tt24wmGoNByiO0bKoFB7YluqvSNAd2AFZx9py34XnD/lZX0S74lBFuA==", "dependencies": { + "@deephaven/log": "^0.102.1-alpha-grpc-transport.2+eb3a171c", + "@deephaven/utils": "^0.102.1-alpha-grpc-transport.2+eb3a171c", "ws": "^8.18.0" }, "engines": { "node": ">=16" } }, + "node_modules/@deephaven/jsapi-nodejs/node_modules/@deephaven/log": { + "version": "0.102.1-beta.0", + "resolved": "https://registry.npmjs.org/@deephaven/log/-/log-0.102.1-beta.0.tgz", + "integrity": "sha512-m50UfUt7LD0hNrulYdQ/845k8d1AO/xLsb8Ka6jcrkDvo3yIeXBX14DfsnXIGo1OvLTiXgKQAAFoE1ex02I8OQ==", + "dependencies": { + "event-target-shim": "^6.0.2", + "jszip": "^3.10.1" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@deephaven/jsapi-nodejs/node_modules/@deephaven/utils": { + "version": "0.102.1-beta.0", + "resolved": "https://registry.npmjs.org/@deephaven/utils/-/utils-0.102.1-beta.0.tgz", + "integrity": "sha512-j1zlAMRD8ClUwWoFqnHmcvnwKJraZnPwSMzi16uB6cCiWk//RkgIZvrp8DDj1IbqV25fJYFH+UDQ0N75hl5aYA==", + "engines": { + "node": ">=16" + } + }, "node_modules/@deephaven/jsapi-types": { - "version": "1.0.0-dev0.36.1", - "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.36.1.tgz", - "integrity": "sha512-Q7we+JYMqQrHp3hQfbKF3YmjjCLTjy+D3an8x6IsfVMv7Uv7LqvuA0c/tKCIT19JDa2b9giFWf3TV8apzXry/A==" + "version": "1.0.0-dev0.37.3", + "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.37.3.tgz", + "integrity": "sha512-EyAEpiOWNA3fUsp3LGBTwsOeAu5As7CoCibRec4kBOMLJ7jaEhAx1RHQEWnm3sVhhxBWREfmJy3OESWwcXZLQw==" }, "node_modules/@deephaven/log": { "version": "0.97.0", @@ -4785,8 +4807,7 @@ "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/crc-32": { "version": "1.2.2", @@ -7877,8 +7898,7 @@ "node_modules/immediate": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "dev": true + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" }, "node_modules/import-fresh": { "version": "3.3.0", @@ -7943,8 +7963,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { "version": "1.3.8", @@ -8527,8 +8546,7 @@ "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, "node_modules/isexe": { "version": "2.0.0", @@ -8801,7 +8819,6 @@ "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "dev": true, "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", @@ -9016,7 +9033,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dev": true, "dependencies": { "immediate": "~3.0.5" } @@ -10776,8 +10792,7 @@ "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "node_modules/parent-module": { "version": "1.0.1", @@ -11262,8 +11277,7 @@ "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "node_modules/process-warning": { "version": "3.0.0", @@ -11689,7 +11703,6 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -12102,8 +12115,7 @@ "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==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-regex-test": { "version": "1.0.3", @@ -12266,8 +12278,7 @@ "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "node_modules/setprototypeof": { "version": "1.2.0", @@ -12748,7 +12759,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -13732,8 +13742,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { "version": "8.3.2", @@ -15507,17 +15516,35 @@ } }, "@deephaven/jsapi-nodejs": { - "version": "0.102.0", - "resolved": "https://registry.npmjs.org/@deephaven/jsapi-nodejs/-/jsapi-nodejs-0.102.0.tgz", - "integrity": "sha512-BtnhM8CwIHjK+8Vws02MjEUxgMLIBX78jTtFYgbRX8/1gLgq97pnsumhvnucc9JDf8hbIslXtkIUb+6Mc8f9aQ==", + "version": "0.102.1-alpha-grpc-transport.2", + "resolved": "https://registry.npmjs.org/@deephaven/jsapi-nodejs/-/jsapi-nodejs-0.102.1-alpha-grpc-transport.2.tgz", + "integrity": "sha512-9zudU+fko+LjQcKiOoqoJ50BwMfjuY/Tt24wmGoNByiO0bKoFB7YluqvSNAd2AFZx9py34XnD/lZX0S74lBFuA==", "requires": { + "@deephaven/log": "^0.102.1-alpha-grpc-transport.2+eb3a171c", + "@deephaven/utils": "^0.102.1-alpha-grpc-transport.2+eb3a171c", "ws": "^8.18.0" + }, + "dependencies": { + "@deephaven/log": { + "version": "0.102.1-beta.0", + "resolved": "https://registry.npmjs.org/@deephaven/log/-/log-0.102.1-beta.0.tgz", + "integrity": "sha512-m50UfUt7LD0hNrulYdQ/845k8d1AO/xLsb8Ka6jcrkDvo3yIeXBX14DfsnXIGo1OvLTiXgKQAAFoE1ex02I8OQ==", + "requires": { + "event-target-shim": "^6.0.2", + "jszip": "^3.10.1" + } + }, + "@deephaven/utils": { + "version": "0.102.1-beta.0", + "resolved": "https://registry.npmjs.org/@deephaven/utils/-/utils-0.102.1-beta.0.tgz", + "integrity": "sha512-j1zlAMRD8ClUwWoFqnHmcvnwKJraZnPwSMzi16uB6cCiWk//RkgIZvrp8DDj1IbqV25fJYFH+UDQ0N75hl5aYA==" + } } }, "@deephaven/jsapi-types": { - "version": "1.0.0-dev0.36.1", - "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.36.1.tgz", - "integrity": "sha512-Q7we+JYMqQrHp3hQfbKF3YmjjCLTjy+D3an8x6IsfVMv7Uv7LqvuA0c/tKCIT19JDa2b9giFWf3TV8apzXry/A==" + "version": "1.0.0-dev0.37.3", + "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.37.3.tgz", + "integrity": "sha512-EyAEpiOWNA3fUsp3LGBTwsOeAu5As7CoCibRec4kBOMLJ7jaEhAx1RHQEWnm3sVhhxBWREfmJy3OESWwcXZLQw==" }, "@deephaven/log": { "version": "0.97.0", @@ -18689,8 +18716,7 @@ "core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "crc-32": { "version": "1.2.2", @@ -20971,8 +20997,7 @@ "immediate": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "dev": true + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" }, "import-fresh": { "version": "3.3.0", @@ -21021,8 +21046,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { "version": "1.3.8", @@ -21426,8 +21450,7 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, "isexe": { "version": "2.0.0", @@ -21660,7 +21683,6 @@ "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "dev": true, "requires": { "lie": "~3.3.0", "pako": "~1.0.2", @@ -21834,7 +21856,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dev": true, "requires": { "immediate": "~3.0.5" } @@ -23174,8 +23195,7 @@ "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parent-module": { "version": "1.0.1", @@ -23501,8 +23521,7 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "process-warning": { "version": "3.0.0", @@ -23803,7 +23822,6 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -24123,8 +24141,7 @@ "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==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex-test": { "version": "1.0.3", @@ -24252,8 +24269,7 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "setprototypeof": { "version": "1.2.0", @@ -24602,7 +24618,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "requires": { "safe-buffer": "~5.1.0" } @@ -25326,8 +25341,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "uuid": { "version": "8.3.2", diff --git a/package.json b/package.json index 1a849d6f..1c430def 100644 --- a/package.json +++ b/package.json @@ -870,12 +870,12 @@ "dependencies": { "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", - "@deephaven/jsapi-nodejs": "0.102.0", + "@deephaven/jsapi-nodejs": "0.102.1-alpha-grpc-transport.2", "nanoid": "^5.0.7" }, "devDependencies": { "@deephaven-enterprise/jsapi-types": "^1.20240723.124-beta", - "@deephaven/jsapi-types": "^1.0.0-dev0.36.1", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@types/node": "22.5.4", "@types/vscode": "^1.91.0", "@types/ws": "^8.5.10", diff --git a/src/controllers/ExtensionController.ts b/src/controllers/ExtensionController.ts index 6cae8853..ee9ef0c2 100644 --- a/src/controllers/ExtensionController.ts +++ b/src/controllers/ExtensionController.ts @@ -1,6 +1,13 @@ import * as vscode from 'vscode'; import type { dh as DhcType } from '@deephaven/jsapi-types'; import type { EnterpriseDhType as DheType } from '@deephaven-enterprise/jsapi-types'; +import { + createClient as createDheClient, + getWsUrl, + type AuthenticatedClient as DheAuthenticatedClient, + type UnauthenticatedClient as DheUnauthenticatedClient, +} from '@deephaven-enterprise/auth-nodejs'; +import { NodeHttp2gRPCTransport } from '@deephaven/jsapi-nodejs'; import { CLEAR_SECRET_STORAGE_CMD, CREATE_NEW_TEXT_DOC_CMD, @@ -76,13 +83,6 @@ import { ConnectionController } from './ConnectionController'; import { PipServerController } from './PipServerController'; import { PanelController } from './PanelController'; import { UserLoginController } from './UserLoginController'; -import { - createClient as createDheClient, - getWsUrl, - type AuthenticatedClient as DheAuthenticatedClient, - type UnauthenticatedClient as DheUnauthenticatedClient, -} from '@deephaven-enterprise/auth-nodejs'; -import { NodeHttp2gRPCTransport } from '../dh/NodeHttp2gRPCTransport'; const logger = new Logger('ExtensionController'); diff --git a/src/dh/NodeHttp2gRPCTransport.ts b/src/dh/NodeHttp2gRPCTransport.ts deleted file mode 100644 index 4d3fb691..00000000 --- a/src/dh/NodeHttp2gRPCTransport.ts +++ /dev/null @@ -1,139 +0,0 @@ -import http2 from 'node:http2'; -import type { dh as DhcType } from '@deephaven/jsapi-types'; -import { assertDefined } from '../util'; - -type GrpcTransport = DhcType.grpc.GrpcTransport; -type GrpcTransportFactory = DhcType.grpc.GrpcTransportFactory; -type GrpcTransportOptions = DhcType.grpc.GrpcTransportOptions; - -export class NodeHttp2gRPCTransport implements GrpcTransport { - static _sessionMap: Map = new Map(); - - /** - * TODO: Cleanup requests similar to https://github.com/deephaven/deephaven-core/blob/c05b35957e466fded4da61154ba106cfc3198bc5/web/client-api/src/main/java/io/deephaven/web/client/api/grpc/MultiplexedWebsocketTransport.java#L129 - * Create a Transport instance. - * @param options Transport options. - * @returns Transport instance. - */ - static readonly factory: GrpcTransportFactory = { - create: options => { - const { origin } = new URL(options.url); - - if (!NodeHttp2gRPCTransport._sessionMap.has(origin)) { - const session = http2.connect(origin); - session.on('error', err => { - console.error('Session error', err); - }); - NodeHttp2gRPCTransport._sessionMap.set(origin, session); - } - - const session = NodeHttp2gRPCTransport._sessionMap.get(origin)!; - - return new NodeHttp2gRPCTransport(options, session); - }, - - get supportsClientStreaming(): boolean { - return false; - }, - }; - - /** - * Private constructor to restrict instantiation to static factory method. - * @param options Transport options. - * @param session node:http2 session. - */ - private constructor( - options: GrpcTransportOptions, - session: http2.ClientHttp2Session - ) { - this._options = options; - this._session = session; - } - - private readonly _options: GrpcTransportOptions; - private readonly _session: http2.ClientHttp2Session; - private _request: http2.ClientHttp2Stream | null = null; - - _createRequest = ( - headers: Record | null - ): http2.ClientHttp2Stream => { - const url = new URL(this._options.url); - - const req = this._session.request({ - ...headers, - // may need to set the :authority header at some point - ':method': 'POST', - ':path': url.pathname, - }); - - console.log('[NodeHttp2Transport] _createRequest', url.pathname); - - req.on('response', (headers, _flags) => { - const headersRecord: Record = {}; - - // strip any undefined headers or keys that start with `:` - for (const name in headers) { - if (headers[name] != null && !name.startsWith(':')) { - headersRecord[name] = headers[name]; - } - } - - this._options.onHeaders(headersRecord, Number(headers[':status'])); - }); - - req.on('data', (chunk: Buffer) => { - this._options.onChunk(chunk); - }); - req.on('end', () => { - this._options.onEnd(); - }); - req.on('error', err => { - this._options.onEnd(err); - }); - - return req; - }; - - start(metadata: { [key: string]: string | Array }): void { - console.log('[NodeHttp2Transport] start', metadata.headersMap); - - if (this._request != null) { - throw new Error('start called more than once'); - } - - const headers: Record = {}; - Object.entries(metadata).forEach(([key, value]) => { - headers[key] = typeof value === 'string' ? value : value.join(', '); - }); - - this._request = this._createRequest(headers); - } - - sendMessage(msgBytes: Uint8Array): void { - console.log('[NodeHttp2Transport] sendMessage', msgBytes); - assertDefined(this._request, '_request'); - this._request.write(msgBytes); - } - - finishSend(): void { - console.log('[NodeHttp2Transport] finishSend'); - assertDefined(this._request, '_request'); - this._request.end(); - } - - cancel(): void { - console.log('[NodeHttp2Transport] cancel'); - assertDefined(this._request, '_request'); - this._request.close(); - } - - /** - * Cleanup. - */ - static dispose(): void { - for (const session of NodeHttp2gRPCTransport._sessionMap.values()) { - session.close(); - } - NodeHttp2gRPCTransport._sessionMap.clear(); - } -}