From ce7d4ca59f863e5f22af7466f7c2552fd03a3b97 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Fri, 10 Jan 2025 09:11:38 -0600 Subject: [PATCH 01/10] Node gRPC transport (163-2) --- package-lock.json | 639 +++++++++++++++++++++++++ package.json | 2 + src/controllers/ExtensionController.ts | 18 +- src/dh/NodeHttp2gRPCTransport.ts | 141 ++++++ src/extension.ts | 2 + 5 files changed, 799 insertions(+), 3 deletions(-) create mode 100644 src/dh/NodeHttp2gRPCTransport.ts diff --git a/package-lock.json b/package-lock.json index 8cf42491..c0538db5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,8 @@ "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", "@deephaven/jsapi-nodejs": "0.102.0", + "@improbable-eng/grpc-web": "^0.15.0", + "esbuild": "^0.24.0", "nanoid": "^5.0.7" }, "devDependencies": { @@ -501,6 +503,381 @@ "node": ">=16" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -827,6 +1204,17 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, + "node_modules/@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "dependencies": { + "browser-headers": "^0.4.1" + }, + "peerDependencies": { + "google-protobuf": "^3.14.0" + } + }, "node_modules/@internationalized/date": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.5.5.tgz", @@ -3927,6 +4315,11 @@ "node": ">=8" } }, + "node_modules/browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" + }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -5817,6 +6210,45 @@ "es6-symbol": "^3.1.1" } }, + "node_modules/esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, "node_modules/esbuild-wasm": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.24.0.tgz", @@ -7518,6 +7950,12 @@ "node": "*" } }, + "node_modules/google-protobuf": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", + "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==", + "peer": true + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -15532,6 +15970,156 @@ "resolved": "https://registry.npmjs.org/@deephaven/utils/-/utils-0.97.0.tgz", "integrity": "sha512-Qp7abGbcwXLXpsVubbiZJIuSa1VO6ePWlfon92/Ni3X92Bp/gsyB4gbogsrNa/3g1rt40d2EAiAVVa5wiy/jCw==" }, + "@esbuild/aix-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "optional": true + }, + "@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "optional": true + }, + "@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "optional": true + }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -15803,6 +16391,14 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, + "@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "requires": { + "browser-headers": "^0.4.1" + } + }, "@internationalized/date": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.5.5.tgz", @@ -18087,6 +18683,11 @@ "fill-range": "^7.1.1" } }, + "browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -19446,6 +20047,38 @@ "es6-symbol": "^3.1.1" } }, + "esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "requires": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, "esbuild-wasm": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.24.0.tgz", @@ -20715,6 +21348,12 @@ } } }, + "google-protobuf": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", + "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==", + "peer": true + }, "gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", diff --git a/package.json b/package.json index d66969fb..42bce4fd 100644 --- a/package.json +++ b/package.json @@ -871,6 +871,8 @@ "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", "@deephaven/jsapi-nodejs": "0.102.0", + "@improbable-eng/grpc-web": "^0.15.0", + "esbuild": "^0.24.0", "nanoid": "^5.0.7" }, "devDependencies": { diff --git a/src/controllers/ExtensionController.ts b/src/controllers/ExtensionController.ts index 6a7f7336..c366f53a 100644 --- a/src/controllers/ExtensionController.ts +++ b/src/controllers/ExtensionController.ts @@ -82,9 +82,20 @@ import { type AuthenticatedClient as DheAuthenticatedClient, type UnauthenticatedClient as DheUnauthenticatedClient, } from '@deephaven-enterprise/auth-nodejs'; +import type { grpc } from '@improbable-eng/grpc-web'; +import { NodeHttp2gRPCTransport } from '../dh/NodeHttp2gRPCTransport'; const logger = new Logger('ExtensionController'); +declare module '@deephaven/jsapi-types' { + export namespace dh { + export interface ConnectOptions { + debug?: boolean; + transportFactory?: grpc.TransportFactory; + } + } +} + export class ExtensionController implements Disposable { constructor(context: vscode.ExtensionContext, configService: IConfigService) { this._context = context; @@ -343,9 +354,10 @@ export class ExtensionController implements Disposable { const dhc = await this._coreJsApiCache.get(url); const client = new dhc.CoreClient(url.toString(), { - // `useWebsockets: true` is needed for 0.37.x servers until we enable - // the http2 based gRPC transport DH-18086 - useWebsockets: true, + debug: true, + // TODO: This should be optional, but types aren't happy yet + headers: {}, + transportFactory: NodeHttp2gRPCTransport.factory, }) as CoreUnauthenticatedClient; // Attach a dispose method so that client caches can dispose of the client diff --git a/src/dh/NodeHttp2gRPCTransport.ts b/src/dh/NodeHttp2gRPCTransport.ts new file mode 100644 index 00000000..0cae3625 --- /dev/null +++ b/src/dh/NodeHttp2gRPCTransport.ts @@ -0,0 +1,141 @@ +import http2 from 'node:http2'; +import { grpc } from '@improbable-eng/grpc-web'; + +export class NodeHttp2gRPCTransport implements grpc.Transport { + 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 factory: grpc.TransportFactory = 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); + }; + + /** + * Private constructor to restrict instantiation to static factory method. + * @param options Transport options. + * @param session node:http2 session. + */ + private constructor( + options: grpc.TransportOptions, + session: http2.ClientHttp2Session + ) { + this._options = options; + this._session = session; + } + + private readonly _options: grpc.TransportOptions; + private readonly _session: http2.ClientHttp2Session; + private _metadata: grpc.Metadata | null = null; + 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( + new grpc.Metadata(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: grpc.Metadata): void { + console.log('[NodeHttp2Transport] start', metadata.headersMap); + + if (this._metadata != null) { + throw new Error('start called more than once'); + } + + this._metadata = metadata; + } + + sendMessage(msgBytes: Uint8Array): void { + console.log('[NodeHttp2Transport] sendMessage', msgBytes); + + const headers: Record = {}; + this._metadata?.forEach((key, values) => { + headers[key] = values.join(', '); + }); + + if ( + !this._options.methodDefinition.requestStream && + !this._options.methodDefinition.responseStream + ) { + // Disable chunked encoding for unary calls + headers['Content-Length'] = String(msgBytes.length); + } + + const request = this._createRequest(headers); + + request.write(msgBytes); + this._request = request; + } + + finishSend(): void { + console.log('[NodeHttp2Transport] finishSend'); + this._request!.end(); + } + + cancel(): void { + console.log('[NodeHttp2Transport] cancel'); + this._request!.close(); + } + + /** + * Cleanup. + */ + static dispose(): void { + for (const session of NodeHttp2gRPCTransport._sessionMap.values()) { + session.close(); + } + NodeHttp2gRPCTransport._sessionMap.clear(); + } +} diff --git a/src/extension.ts b/src/extension.ts index 14aef31b..3f40f132 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -2,6 +2,8 @@ import * as vscode from 'vscode'; import { ExtensionController } from './controllers'; import { ConfigService } from './services'; +process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; + export function activate(context: vscode.ExtensionContext): void { const controller = new ExtensionController(context, ConfigService); From 2294d0c51eed7fd63ff7c737f16acf8ea03f41c3 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Fri, 22 Nov 2024 13:22:04 -0600 Subject: [PATCH 02/10] Moved stream creation into start method (163-2) --- src/dh/NodeHttp2gRPCTransport.ts | 35 ++++++++++++-------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/src/dh/NodeHttp2gRPCTransport.ts b/src/dh/NodeHttp2gRPCTransport.ts index 0cae3625..89d72ec1 100644 --- a/src/dh/NodeHttp2gRPCTransport.ts +++ b/src/dh/NodeHttp2gRPCTransport.ts @@ -1,5 +1,6 @@ import http2 from 'node:http2'; import { grpc } from '@improbable-eng/grpc-web'; +import { assertDefined } from '../util'; export class NodeHttp2gRPCTransport implements grpc.Transport { static _sessionMap: Map = new Map(); @@ -41,7 +42,6 @@ export class NodeHttp2gRPCTransport implements grpc.Transport { private readonly _options: grpc.TransportOptions; private readonly _session: http2.ClientHttp2Session; - private _metadata: grpc.Metadata | null = null; private _request: http2.ClientHttp2Stream | null = null; _createRequest = ( @@ -90,43 +90,34 @@ export class NodeHttp2gRPCTransport implements grpc.Transport { start(metadata: grpc.Metadata): void { console.log('[NodeHttp2Transport] start', metadata.headersMap); - if (this._metadata != null) { + if (this._request != null) { throw new Error('start called more than once'); } - this._metadata = metadata; - } - - sendMessage(msgBytes: Uint8Array): void { - console.log('[NodeHttp2Transport] sendMessage', msgBytes); - const headers: Record = {}; - this._metadata?.forEach((key, values) => { + metadata?.forEach((key, values) => { headers[key] = values.join(', '); }); - if ( - !this._options.methodDefinition.requestStream && - !this._options.methodDefinition.responseStream - ) { - // Disable chunked encoding for unary calls - headers['Content-Length'] = String(msgBytes.length); - } - - const request = this._createRequest(headers); + this._request = this._createRequest(headers); + } - request.write(msgBytes); - this._request = request; + sendMessage(msgBytes: Uint8Array): void { + console.log('[NodeHttp2Transport] sendMessage', msgBytes); + assertDefined(this._request, '_request'); + this._request.write(msgBytes); } finishSend(): void { console.log('[NodeHttp2Transport] finishSend'); - this._request!.end(); + assertDefined(this._request, '_request'); + this._request.end(); } cancel(): void { console.log('[NodeHttp2Transport] cancel'); - this._request!.close(); + assertDefined(this._request, '_request'); + this._request.close(); } /** From aedd05871cf53bebb46a6899e48eee04739c4674 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Fri, 10 Jan 2025 09:12:33 -0600 Subject: [PATCH 03/10] Using dh defined grpc interface (163-2) --- src/controllers/ExtensionController.ts | 4 +- src/dh/NodeHttp2gRPCTransport.ts | 53 +++++++++++-------- src/dh/grpc.ts | 73 ++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 25 deletions(-) create mode 100644 src/dh/grpc.ts diff --git a/src/controllers/ExtensionController.ts b/src/controllers/ExtensionController.ts index c366f53a..82e4d6de 100644 --- a/src/controllers/ExtensionController.ts +++ b/src/controllers/ExtensionController.ts @@ -82,8 +82,8 @@ import { type AuthenticatedClient as DheAuthenticatedClient, type UnauthenticatedClient as DheUnauthenticatedClient, } from '@deephaven-enterprise/auth-nodejs'; -import type { grpc } from '@improbable-eng/grpc-web'; import { NodeHttp2gRPCTransport } from '../dh/NodeHttp2gRPCTransport'; +import type { GrpcTransportFactory } from '../dh/grpc'; const logger = new Logger('ExtensionController'); @@ -91,7 +91,7 @@ declare module '@deephaven/jsapi-types' { export namespace dh { export interface ConnectOptions { debug?: boolean; - transportFactory?: grpc.TransportFactory; + transportFactory?: GrpcTransportFactory; } } } diff --git a/src/dh/NodeHttp2gRPCTransport.ts b/src/dh/NodeHttp2gRPCTransport.ts index 89d72ec1..b117d615 100644 --- a/src/dh/NodeHttp2gRPCTransport.ts +++ b/src/dh/NodeHttp2gRPCTransport.ts @@ -1,8 +1,12 @@ import http2 from 'node:http2'; -import { grpc } from '@improbable-eng/grpc-web'; +import type { + GrpcTransport, + GrpcTransportFactory, + GrpcTransportOptions, +} from './grpc'; import { assertDefined } from '../util'; -export class NodeHttp2gRPCTransport implements grpc.Transport { +export class NodeHttp2gRPCTransport implements GrpcTransport { static _sessionMap: Map = new Map(); /** @@ -11,20 +15,26 @@ export class NodeHttp2gRPCTransport implements grpc.Transport { * @param options Transport options. * @returns Transport instance. */ - static factory: grpc.TransportFactory = 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); - } + 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)!; - const session = NodeHttp2gRPCTransport._sessionMap.get(origin)!; + return new NodeHttp2gRPCTransport(options, session); + }, - return new NodeHttp2gRPCTransport(options, session); + get supportsClientStreaming(): boolean { + return false; + }, }; /** @@ -33,14 +43,14 @@ export class NodeHttp2gRPCTransport implements grpc.Transport { * @param session node:http2 session. */ private constructor( - options: grpc.TransportOptions, + options: GrpcTransportOptions, session: http2.ClientHttp2Session ) { this._options = options; this._session = session; } - private readonly _options: grpc.TransportOptions; + private readonly _options: GrpcTransportOptions; private readonly _session: http2.ClientHttp2Session; private _request: http2.ClientHttp2Stream | null = null; @@ -68,10 +78,7 @@ export class NodeHttp2gRPCTransport implements grpc.Transport { } } - this._options.onHeaders( - new grpc.Metadata(headersRecord), - Number(headers[':status']) - ); + this._options.onHeaders(headersRecord, Number(headers[':status'])); }); req.on('data', (chunk: Buffer) => { @@ -87,7 +94,7 @@ export class NodeHttp2gRPCTransport implements grpc.Transport { return req; }; - start(metadata: grpc.Metadata): void { + start(metadata: { [key: string]: string | Array }): void { console.log('[NodeHttp2Transport] start', metadata.headersMap); if (this._request != null) { @@ -95,8 +102,8 @@ export class NodeHttp2gRPCTransport implements grpc.Transport { } const headers: Record = {}; - metadata?.forEach((key, values) => { - headers[key] = values.join(', '); + Object.entries(metadata).forEach(([key, value]) => { + headers[key] = typeof value === 'string' ? value : value.join(', '); }); this._request = this._createRequest(headers); diff --git a/src/dh/grpc.ts b/src/dh/grpc.ts new file mode 100644 index 00000000..e8237265 --- /dev/null +++ b/src/dh/grpc.ts @@ -0,0 +1,73 @@ +/** + * Factory for creating gRPC transports. + */ +export interface GrpcTransportFactory { + /** + * Create a new transport instance. + * @param options - options for creating the transport + * @return a transport instance to use for gRPC communication + */ + create(options: GrpcTransportOptions): GrpcTransport; + /** + * Return true to signal that created transports may have {@link GrpcTransport.sendMessage} called on it + * more than once before {@link GrpcTransport.finishSend} should be called. + * @return true to signal that the implementation can stream multiple messages, false otherwise indicating that + * Open/Next gRPC calls should be used + */ + get supportsClientStreaming(): boolean; +} +/** + * Options for creating a gRPC stream transport instance. + */ +export interface GrpcTransportOptions { + /** + * The gRPC method URL. + */ + url: URL; + /** + * True to enable debug logging for this stream. + */ + debug: boolean; + /** + * Callback for when headers and status are received. The headers are a map of header names to values, and the + * status is the HTTP status code. If the connection could not be made, the status should be 0. + */ + onHeaders: ( + headers: { [key: string]: string | Array }, + status: number + ) => void; + /** + * Callback for when a chunk of data is received. + */ + onChunk: (chunk: Uint8Array) => void; + /** + * Callback for when the stream ends, with an error instance if it can be provided. Note that the present + * implementation does not consume errors, even if provided. + */ + onEnd: (error?: Error | undefined | null) => void; +} +/** + * gRPC transport implementation. + */ +export interface GrpcTransport { + /** + * Starts the stream, sending metadata to the server. + * @param metadata - the headers to send the server when opening the connection + */ + start(metadata: { [key: string]: string | Array }): void; + /** + * Sends a message to the server. + * @param msgBytes - bytes to send to the server + */ + sendMessage(msgBytes: Uint8Array): void; + /** + * "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still + * open to receiving messages. + */ + finishSend(): void; + /** + * End the stream, both notifying the server that no more messages will be sent nor received, and preventing the + * client from receiving any more events. + */ + cancel(): void; +} From 09dab060a761995855e6222e6068f58977419ccf Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Fri, 20 Dec 2024 11:12:34 -0600 Subject: [PATCH 04/10] Code changes for upcoming 0.38 jsapi-types (163-2) --- src/controllers/ExtensionController.ts | 12 ----- src/dh/NodeHttp2gRPCTransport.ts | 10 ++-- src/dh/grpc.ts | 73 -------------------------- 3 files changed, 5 insertions(+), 90 deletions(-) delete mode 100644 src/dh/grpc.ts diff --git a/src/controllers/ExtensionController.ts b/src/controllers/ExtensionController.ts index 82e4d6de..6cae8853 100644 --- a/src/controllers/ExtensionController.ts +++ b/src/controllers/ExtensionController.ts @@ -83,19 +83,9 @@ import { type UnauthenticatedClient as DheUnauthenticatedClient, } from '@deephaven-enterprise/auth-nodejs'; import { NodeHttp2gRPCTransport } from '../dh/NodeHttp2gRPCTransport'; -import type { GrpcTransportFactory } from '../dh/grpc'; const logger = new Logger('ExtensionController'); -declare module '@deephaven/jsapi-types' { - export namespace dh { - export interface ConnectOptions { - debug?: boolean; - transportFactory?: GrpcTransportFactory; - } - } -} - export class ExtensionController implements Disposable { constructor(context: vscode.ExtensionContext, configService: IConfigService) { this._context = context; @@ -355,8 +345,6 @@ export class ExtensionController implements Disposable { const client = new dhc.CoreClient(url.toString(), { debug: true, - // TODO: This should be optional, but types aren't happy yet - headers: {}, transportFactory: NodeHttp2gRPCTransport.factory, }) as CoreUnauthenticatedClient; diff --git a/src/dh/NodeHttp2gRPCTransport.ts b/src/dh/NodeHttp2gRPCTransport.ts index b117d615..4d3fb691 100644 --- a/src/dh/NodeHttp2gRPCTransport.ts +++ b/src/dh/NodeHttp2gRPCTransport.ts @@ -1,11 +1,11 @@ import http2 from 'node:http2'; -import type { - GrpcTransport, - GrpcTransportFactory, - GrpcTransportOptions, -} from './grpc'; +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(); diff --git a/src/dh/grpc.ts b/src/dh/grpc.ts deleted file mode 100644 index e8237265..00000000 --- a/src/dh/grpc.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Factory for creating gRPC transports. - */ -export interface GrpcTransportFactory { - /** - * Create a new transport instance. - * @param options - options for creating the transport - * @return a transport instance to use for gRPC communication - */ - create(options: GrpcTransportOptions): GrpcTransport; - /** - * Return true to signal that created transports may have {@link GrpcTransport.sendMessage} called on it - * more than once before {@link GrpcTransport.finishSend} should be called. - * @return true to signal that the implementation can stream multiple messages, false otherwise indicating that - * Open/Next gRPC calls should be used - */ - get supportsClientStreaming(): boolean; -} -/** - * Options for creating a gRPC stream transport instance. - */ -export interface GrpcTransportOptions { - /** - * The gRPC method URL. - */ - url: URL; - /** - * True to enable debug logging for this stream. - */ - debug: boolean; - /** - * Callback for when headers and status are received. The headers are a map of header names to values, and the - * status is the HTTP status code. If the connection could not be made, the status should be 0. - */ - onHeaders: ( - headers: { [key: string]: string | Array }, - status: number - ) => void; - /** - * Callback for when a chunk of data is received. - */ - onChunk: (chunk: Uint8Array) => void; - /** - * Callback for when the stream ends, with an error instance if it can be provided. Note that the present - * implementation does not consume errors, even if provided. - */ - onEnd: (error?: Error | undefined | null) => void; -} -/** - * gRPC transport implementation. - */ -export interface GrpcTransport { - /** - * Starts the stream, sending metadata to the server. - * @param metadata - the headers to send the server when opening the connection - */ - start(metadata: { [key: string]: string | Array }): void; - /** - * Sends a message to the server. - * @param msgBytes - bytes to send to the server - */ - sendMessage(msgBytes: Uint8Array): void; - /** - * "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still - * open to receiving messages. - */ - finishSend(): void; - /** - * End the stream, both notifying the server that no more messages will be sent nor received, and preventing the - * client from receiving any more events. - */ - cancel(): void; -} From 34b1b7e47b43c75424f557e22cc14910fe894a59 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Fri, 10 Jan 2025 09:13:45 -0600 Subject: [PATCH 05/10] Uninstalled @improbable-eng/grpc-web (DH-18086) --- package-lock.json | 42 ------------------------------------------ package.json | 1 - 2 files changed, 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0538db5..80541d07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", "@deephaven/jsapi-nodejs": "0.102.0", - "@improbable-eng/grpc-web": "^0.15.0", "esbuild": "^0.24.0", "nanoid": "^5.0.7" }, @@ -1204,17 +1203,6 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, - "node_modules/@improbable-eng/grpc-web": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", - "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", - "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" - } - }, "node_modules/@internationalized/date": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.5.5.tgz", @@ -4315,11 +4303,6 @@ "node": ">=8" } }, - "node_modules/browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" - }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -7950,12 +7933,6 @@ "node": "*" } }, - "node_modules/google-protobuf": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", - "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==", - "peer": true - }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -16391,14 +16368,6 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, - "@improbable-eng/grpc-web": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", - "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", - "requires": { - "browser-headers": "^0.4.1" - } - }, "@internationalized/date": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.5.5.tgz", @@ -18683,11 +18652,6 @@ "fill-range": "^7.1.1" } }, - "browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -21348,12 +21312,6 @@ } } }, - "google-protobuf": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", - "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==", - "peer": true - }, "gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", diff --git a/package.json b/package.json index 42bce4fd..f0cb448d 100644 --- a/package.json +++ b/package.json @@ -871,7 +871,6 @@ "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", "@deephaven/jsapi-nodejs": "0.102.0", - "@improbable-eng/grpc-web": "^0.15.0", "esbuild": "^0.24.0", "nanoid": "^5.0.7" }, From 412c54f450775f416dfad190b2b75f739644a982 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Tue, 14 Jan 2025 10:04:13 -0600 Subject: [PATCH 06/10] Removed esbuild (DH-18086) --- package-lock.json | 597 ---------------------------------------------- package.json | 1 - 2 files changed, 598 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80541d07..8cf42491 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", "@deephaven/jsapi-nodejs": "0.102.0", - "esbuild": "^0.24.0", "nanoid": "^5.0.7" }, "devDependencies": { @@ -502,381 +501,6 @@ "node": ">=16" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", - "cpu": [ - "ppc64" - ], - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", - "cpu": [ - "loong64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", - "cpu": [ - "mips64el" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", - "cpu": [ - "ppc64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", - "cpu": [ - "riscv64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", - "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", - "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -6193,45 +5817,6 @@ "es6-symbol": "^3.1.1" } }, - "node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" - } - }, "node_modules/esbuild-wasm": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.24.0.tgz", @@ -15947,156 +15532,6 @@ "resolved": "https://registry.npmjs.org/@deephaven/utils/-/utils-0.97.0.tgz", "integrity": "sha512-Qp7abGbcwXLXpsVubbiZJIuSa1VO6ePWlfon92/Ni3X92Bp/gsyB4gbogsrNa/3g1rt40d2EAiAVVa5wiy/jCw==" }, - "@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", - "optional": true - }, - "@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", - "optional": true - }, - "@esbuild/netbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", - "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", - "optional": true - }, - "@esbuild/openbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", - "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", - "optional": true - }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -20011,38 +19446,6 @@ "es6-symbol": "^3.1.1" } }, - "esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", - "requires": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" - } - }, "esbuild-wasm": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.24.0.tgz", diff --git a/package.json b/package.json index f0cb448d..d66969fb 100644 --- a/package.json +++ b/package.json @@ -871,7 +871,6 @@ "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", "@deephaven/jsapi-nodejs": "0.102.0", - "esbuild": "^0.24.0", "nanoid": "^5.0.7" }, "devDependencies": { From b3d4ed076ae6b725cda0c20c9eff33dcb3593e61 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Thu, 16 Jan 2025 11:18:23 -0600 Subject: [PATCH 07/10] Using @deephaven packages for grpc transport (DH-18086) --- package-lock.json | 116 ++++++++++++--------- package.json | 2 +- src/controllers/ExtensionController.ts | 14 +-- src/dh/NodeHttp2gRPCTransport.ts | 139 ------------------------- 4 files changed, 73 insertions(+), 198 deletions(-) delete mode 100644 src/dh/NodeHttp2gRPCTransport.ts diff --git a/package-lock.json b/package-lock.json index 8cf42491..f1f67393 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "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": { @@ -467,16 +467,38 @@ } }, "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.37.3", "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.37.3.tgz", @@ -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,11 +15516,29 @@ } }, "@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": { @@ -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 d66969fb..0cd6eb72 100644 --- a/package.json +++ b/package.json @@ -870,7 +870,7 @@ "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": { 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(); - } -} From c8db2fcb4d9de475e67f611902c0633afb07aa2f Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Tue, 21 Jan 2025 11:16:07 -0600 Subject: [PATCH 08/10] Upgrade @deephaven/jsapi-nodejs to ^0.103.0 (DH-18086) --- package-lock.json | 46 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index f1f67393..63a09046 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "dependencies": { "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", - "@deephaven/jsapi-nodejs": "0.102.1-alpha-grpc-transport.2", + "@deephaven/jsapi-nodejs": "^0.103.0", "nanoid": "^5.0.7" }, "devDependencies": { @@ -467,12 +467,12 @@ } }, "node_modules/@deephaven/jsapi-nodejs": { - "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==", + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/@deephaven/jsapi-nodejs/-/jsapi-nodejs-0.103.0.tgz", + "integrity": "sha512-dkAi321+Jx56STJK9jTrpyhiTigPDz5/sFBiXHsj/fHRYpdKieUFFAxEu3rYfy5gDOFs7EXB50VSQI7FP0D7iQ==", "dependencies": { - "@deephaven/log": "^0.102.1-alpha-grpc-transport.2+eb3a171c", - "@deephaven/utils": "^0.102.1-alpha-grpc-transport.2+eb3a171c", + "@deephaven/log": "^0.103.0", + "@deephaven/utils": "^0.103.0", "ws": "^8.18.0" }, "engines": { @@ -480,9 +480,9 @@ } }, "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==", + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/@deephaven/log/-/log-0.103.0.tgz", + "integrity": "sha512-8vQktsmaoJrPwZIZALRyFAWyYhFg5DzaN0Ye7HObe3n/kBBe5+GXbhv0F/AUbMzLngYkj7WLIXjsDzYRw70qNQ==", "dependencies": { "event-target-shim": "^6.0.2", "jszip": "^3.10.1" @@ -492,9 +492,9 @@ } }, "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==", + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/@deephaven/utils/-/utils-0.103.0.tgz", + "integrity": "sha512-1N0bBG5fpl89Ktt1Y0CUj3thl2uFFgHUMqJMvBje5D38DIuuu7VUifEXtFGcOSgi67z62hkFt0ODLWMzZuZcEQ==", "engines": { "node": ">=16" } @@ -15516,28 +15516,28 @@ } }, "@deephaven/jsapi-nodejs": { - "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==", + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/@deephaven/jsapi-nodejs/-/jsapi-nodejs-0.103.0.tgz", + "integrity": "sha512-dkAi321+Jx56STJK9jTrpyhiTigPDz5/sFBiXHsj/fHRYpdKieUFFAxEu3rYfy5gDOFs7EXB50VSQI7FP0D7iQ==", "requires": { - "@deephaven/log": "^0.102.1-alpha-grpc-transport.2+eb3a171c", - "@deephaven/utils": "^0.102.1-alpha-grpc-transport.2+eb3a171c", + "@deephaven/log": "^0.103.0", + "@deephaven/utils": "^0.103.0", "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==", + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/@deephaven/log/-/log-0.103.0.tgz", + "integrity": "sha512-8vQktsmaoJrPwZIZALRyFAWyYhFg5DzaN0Ye7HObe3n/kBBe5+GXbhv0F/AUbMzLngYkj7WLIXjsDzYRw70qNQ==", "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==" + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/@deephaven/utils/-/utils-0.103.0.tgz", + "integrity": "sha512-1N0bBG5fpl89Ktt1Y0CUj3thl2uFFgHUMqJMvBje5D38DIuuu7VUifEXtFGcOSgi67z62hkFt0ODLWMzZuZcEQ==" } } }, diff --git a/package.json b/package.json index 0cd6eb72..f4cf25ae 100644 --- a/package.json +++ b/package.json @@ -870,7 +870,7 @@ "dependencies": { "@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta", "@deephaven-enterprise/query-utils": "^1.20240723.124-beta", - "@deephaven/jsapi-nodejs": "0.102.1-alpha-grpc-transport.2", + "@deephaven/jsapi-nodejs": "^0.103.0", "nanoid": "^5.0.7" }, "devDependencies": { From c62aaa19cdedcc11a27f6fce9f5f9ef003545d46 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Tue, 21 Jan 2025 11:26:13 -0600 Subject: [PATCH 09/10] Removed NODE_TLS_REJECT_UNAUTHORIZED hack (DH-18086) --- src/extension.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 3f40f132..14aef31b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -2,8 +2,6 @@ import * as vscode from 'vscode'; import { ExtensionController } from './controllers'; import { ConfigService } from './services'; -process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; - export function activate(context: vscode.ExtensionContext): void { const controller = new ExtensionController(context, ConfigService); From c5a1cfeb09bbb2caef9f51510e6f512f8a4d2bc7 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Tue, 21 Jan 2025 11:35:33 -0600 Subject: [PATCH 10/10] Disabled debugging (DH-18086) --- src/controllers/ExtensionController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/ExtensionController.ts b/src/controllers/ExtensionController.ts index ee9ef0c2..524cb38d 100644 --- a/src/controllers/ExtensionController.ts +++ b/src/controllers/ExtensionController.ts @@ -344,7 +344,7 @@ export class ExtensionController implements Disposable { const dhc = await this._coreJsApiCache.get(url); const client = new dhc.CoreClient(url.toString(), { - debug: true, + debug: false, // Set `debug` to true to see debug logs for gRPC transport transportFactory: NodeHttp2gRPCTransport.factory, }) as CoreUnauthenticatedClient;