diff --git a/package.json b/package.json index 7c81f613a4..bac34c0127 100644 --- a/package.json +++ b/package.json @@ -196,8 +196,8 @@ "@hapi/call": "^8.0.1", "@hapi/subtext": "^7.0.3", "@kubernetes/client-node": "^0.16.1", - "@ogre-tools/injectable": "3.0.0", - "@ogre-tools/injectable-react": "3.0.0", + "@ogre-tools/injectable": "3.1.0", + "@ogre-tools/injectable-react": "3.1.0", "@sentry/electron": "^2.5.4", "@sentry/integrations": "^6.15.0", "abort-controller": "^3.0.0", diff --git a/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.injectable.ts b/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.injectable.ts index c8d2797d4e..8e15322802 100644 --- a/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.injectable.ts +++ b/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.injectable.ts @@ -29,6 +29,7 @@ const shellRequestAuthenticatorInjectable = getInjectable({ return authenticator; }, + lifecycle: lifecycleEnum.singleton, }); diff --git a/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.ts b/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.ts index 4259f98435..30862544bd 100644 --- a/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.ts +++ b/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.ts @@ -48,7 +48,7 @@ export class ShellRequestAuthenticator { * @param token The value that is being presented as a one time authentication token * @returns `true` if `token` was valid, false otherwise */ - authenticate(clusterId: ClusterId, tabId: string, token: string): boolean { + authenticate = (clusterId: ClusterId, tabId: string, token: string): boolean => { const clusterTokens = this.tokens.get(clusterId); if (!clusterTokens) { @@ -66,5 +66,5 @@ export class ShellRequestAuthenticator { } return false; - } + }; } diff --git a/yarn.lock b/yarn.lock index 551f9b52d4..ec40d5b3a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -979,19 +979,19 @@ dependencies: lodash "^4.17.21" -"@ogre-tools/injectable-react@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@ogre-tools/injectable-react/-/injectable-react-3.0.0.tgz#074252080a5972daa9bfbd3a257bee904941c498" - integrity sha512-67dRDHlUndh91PHZQHBu9K24k7q4nA9z0ebLuqzWgrys3fpEXcnEaGR7J3WLbtQqnn7joHl5caMSG54KKcr8lA== +"@ogre-tools/injectable-react@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@ogre-tools/injectable-react/-/injectable-react-3.1.0.tgz#76417e71a02cd571633cae6171e04cfd67e9a95a" + integrity sha512-v8uDRzEgwLmG0uWMgePFoqTQ8skklXFMPC8V3CtD4WV/7Brll3WkGZrgHLM/hJPn5/9xVIz51GK1jp0yvJK6HA== dependencies: "@ogre-tools/fp" "^3.0.0" - "@ogre-tools/injectable" "^3.0.0" + "@ogre-tools/injectable" "^3.1.0" lodash "^4.17.21" -"@ogre-tools/injectable@3.0.0", "@ogre-tools/injectable@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@ogre-tools/injectable/-/injectable-3.0.0.tgz#0dedafddd53dd13440d1072a51fe0a84661dfb9a" - integrity sha512-fx5yNrmeVNHPYd80hNg+eHq1HoZmPYuGXD6Mdmo33rLOznf7ipBnmcK4nyCfgr/h8+2dwRYIYLLFI7cleSSdcA== +"@ogre-tools/injectable@3.1.0", "@ogre-tools/injectable@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@ogre-tools/injectable/-/injectable-3.1.0.tgz#f03ddc0316b68e35e0adfa392410ee0bdcdcb772" + integrity sha512-/513kD4vDGrzw9lVMiQlnivVjos8ZiezWm4svm5BRiZ8y6NwsORlvR2DfViqijJZhp3nFC4i1tQkHHbf8g7lIA== dependencies: "@ogre-tools/fp" "^3.0.0" lodash "^4.17.21"