diff --git a/package-lock.json b/package-lock.json index 1a2838efc99..022d75e8a39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "hpagent": "^1.2.0", "isomorphic-ws": "^5.0.0", "js-yaml": "^5.1.0", - "jsonpath-plus": "^10.3.0", + "jsonpath-plus": "^11.1.0", "openid-client": "^6.1.3", "rfc4648": "^1.3.0", "socks": "^2.8.4", @@ -1735,9 +1735,9 @@ } }, "node_modules/jsonpath-plus": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.4.0.tgz", - "integrity": "sha512-T92WWatJXmhBbKsgH/0hl+jxjdXrifi5IKeMY02DWggRxX0UElcbVzPlmgLTbvsPeW1PasQ6xE2Q75stkhGbsA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-11.1.0.tgz", + "integrity": "sha512-AKyLWRC9kE75CC0Z3GmXfaAauXPqs8/2RkwRkZmJ+i1ePWuD9ns3ckWwDJhLPZ/2ELwWvDE+aZoaGHCmmBXA0w==", "license": "MIT", "dependencies": { "@jsep-plugin/assignment": "^1.3.0", @@ -1749,7 +1749,7 @@ "jsonpath-plus": "bin/jsonpath-cli.js" }, "engines": { - "node": ">=18.0.0" + "node": ">=22.0.0" } }, "node_modules/locate-path": { diff --git a/package.json b/package.json index aacd3598c31..4e878af7bc7 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "hpagent": "^1.2.0", "isomorphic-ws": "^5.0.0", "js-yaml": "^5.1.0", - "jsonpath-plus": "^10.3.0", + "jsonpath-plus": "^11.1.0", "openid-client": "^6.1.3", "rfc4648": "^1.3.0", "socks": "^2.8.4", diff --git a/src/azure_auth.ts b/src/azure_auth.ts index ffa54fe1066..a6963c1fb98 100644 --- a/src/azure_auth.ts +++ b/src/azure_auth.ts @@ -90,7 +90,8 @@ export class AzureAuth implements Authenticator { const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1); const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1); - config['access-token'] = jsonpath.JSONPath({ path: tokenPathKey, json: resultObj }); - config.expiry = jsonpath.JSONPath({ path: expiryPathKey, json: resultObj }); + config['access-token'] = jsonpath.JSONPath({ path: tokenPathKey, json: resultObj }) as + string | undefined; + config.expiry = jsonpath.JSONPath({ path: expiryPathKey, json: resultObj }) as string | undefined; } } diff --git a/src/gcp_auth.ts b/src/gcp_auth.ts index 139aebcac99..98a78b29ee1 100644 --- a/src/gcp_auth.ts +++ b/src/gcp_auth.ts @@ -86,7 +86,8 @@ export class GoogleCloudPlatformAuth implements Authenticator { const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1); const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1); - config['access-token'] = jsonpath.JSONPath({ path: tokenPathKey, json: resultObj }); - config.expiry = jsonpath.JSONPath({ path: expiryPathKey, json: resultObj }); + config['access-token'] = jsonpath.JSONPath({ path: tokenPathKey, json: resultObj }) as + string | undefined; + config.expiry = jsonpath.JSONPath({ path: expiryPathKey, json: resultObj }) as string; } }