@algolia/client-search 5.17.1 → 5.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  // builds/node.ts
2
+ import { createHmac } from "node:crypto";
2
3
  import { createHttpRequester } from "@algolia/requester-node-http";
3
4
  import { createMemoryCache, createNullCache, createNullLogger, serializeQueryParameters } from "@algolia/client-common";
4
5
 
@@ -11,7 +12,7 @@ import {
11
12
  getAlgoliaAgent,
12
13
  shuffle
13
14
  } from "@algolia/client-common";
14
- var apiClientVersion = "5.17.1";
15
+ var apiClientVersion = "5.18.0";
15
16
  function getDefaultHosts(appId) {
16
17
  return [
17
18
  {
@@ -2300,7 +2301,6 @@ function createSearchClient({
2300
2301
  }
2301
2302
 
2302
2303
  // builds/node.ts
2303
- import { createHmac } from "node:crypto";
2304
2304
  function searchClient(appId, apiKey, options) {
2305
2305
  if (!appId || typeof appId !== "string") {
2306
2306
  throw new Error("`appId` is missing.");
@@ -2362,7 +2362,7 @@ function searchClient(appId, apiKey, options) {
2362
2362
  * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
2363
2363
  */
2364
2364
  getSecuredApiKeyRemainingValidity: ({ securedApiKey }) => {
2365
- const decodedString = Buffer.from(securedApiKey, "base64").toString("ascii");
2365
+ const decodedString = atob(securedApiKey);
2366
2366
  const regex = /validUntil=(\d+)/;
2367
2367
  const match = decodedString.match(regex);
2368
2368
  if (match === null) {