@sonic-equipment/ui 258.1.2 → 258.1.3
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,20 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { createFetchRequester } from '@algolia/requester-fetch';
|
|
2
3
|
import algoliasearch from 'algoliasearch';
|
|
3
4
|
|
|
4
5
|
const createSonicSearchClient = ({ apiKey, appId, host, protocol = 'https', }) => {
|
|
5
|
-
const searchClient = algoliasearch(appId, apiKey);
|
|
6
6
|
if (!host) {
|
|
7
|
-
return
|
|
7
|
+
return algoliasearch(appId, apiKey);
|
|
8
8
|
}
|
|
9
|
+
const searchClient = algoliasearch(appId, apiKey, {
|
|
10
|
+
hosts: [{ accept: 1, protocol, url: host }],
|
|
11
|
+
requester: createFetchRequester({
|
|
12
|
+
requesterOptions: { credentials: 'include' },
|
|
13
|
+
}),
|
|
14
|
+
timeouts: { connect: 3000, read: 3000, write: 3000 },
|
|
15
|
+
});
|
|
9
16
|
const read = searchClient.transporter.read;
|
|
10
17
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
18
|
// @ts-ignore
|
|
12
|
-
searchClient.transporter.hosts = [{ accept: 1, protocol, url: host }];
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
searchClient.transporter.timeouts = { connect: 3000, read: 3000, write: 3000 };
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17
|
-
// @ts-ignore
|
|
18
19
|
searchClient.transporter.read = (request, options) => {
|
|
19
20
|
request.path = `/api/v1/bff/${request.path.replace('*', 'x')}`;
|
|
20
21
|
return read(request, options);
|
package/dist/config.js
CHANGED
|
@@ -70,7 +70,7 @@ const configPerEnvironment = {
|
|
|
70
70
|
production: () => ({
|
|
71
71
|
ALGOLIA_API_KEY: 'e31a3a53449eceb4d0f9273b9bcd9759',
|
|
72
72
|
ALGOLIA_APP_ID: '14CUFCVMAD',
|
|
73
|
-
ALGOLIA_HOST: '
|
|
73
|
+
ALGOLIA_HOST: 'shopapi.sonic-equipment.com',
|
|
74
74
|
BFF_API_URL: 'https://shopapi.sonic-equipment.com/api/v1/bff',
|
|
75
75
|
COOKIE_DOMAIN: '.sonic-equipment.com',
|
|
76
76
|
HOME_PAGE_URL: 'https://sonic-equipment.com/',
|
|
@@ -80,7 +80,7 @@ const configPerEnvironment = {
|
|
|
80
80
|
sandbox: () => ({
|
|
81
81
|
ALGOLIA_API_KEY: 'e0edf30798a6b2e4e44fd25f0f2f9646',
|
|
82
82
|
ALGOLIA_APP_ID: 'testing9VXJ0U4GSV',
|
|
83
|
-
ALGOLIA_HOST: '
|
|
83
|
+
ALGOLIA_HOST: 'shopapi.accept-sonic-equipment.com',
|
|
84
84
|
BFF_API_URL: 'https://shopapi.accept-sonic-equipment.com/api/v1/bff',
|
|
85
85
|
COOKIE_DOMAIN: '.accept-sonic-equipment.com',
|
|
86
86
|
HOME_PAGE_URL: 'https://accept-sonic-equipment.com/',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonic-equipment/ui",
|
|
3
|
-
"version": "258.1.
|
|
3
|
+
"version": "258.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
"@algolia/autocomplete-plugin-recent-searches": "1.19.2",
|
|
132
132
|
"@algolia/autocomplete-preset-algolia": "1.19.2",
|
|
133
133
|
"@algolia/client-search": "4.24.0",
|
|
134
|
+
"@algolia/requester-fetch": "4.24.0",
|
|
134
135
|
"@tanstack/react-query": "5.85.5",
|
|
135
136
|
"@tanstack/react-query-devtools": "5.85.5",
|
|
136
137
|
"@types/react-transition-group": "4.4.12",
|