@algolia/client-common 5.0.0-alpha.27 → 5.0.0-alpha.28
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.
|
@@ -476,11 +476,13 @@ function createTransporter({
|
|
|
476
476
|
...requestOptions.data
|
|
477
477
|
} : {};
|
|
478
478
|
const queryParameters = {
|
|
479
|
-
'x-algolia-agent': algoliaAgent.value,
|
|
480
479
|
...baseQueryParameters,
|
|
481
480
|
...request.queryParameters,
|
|
482
481
|
...dataQueryParameters
|
|
483
482
|
};
|
|
483
|
+
if (algoliaAgent.value) {
|
|
484
|
+
queryParameters['x-algolia-agent'] = algoliaAgent.value;
|
|
485
|
+
}
|
|
484
486
|
if (requestOptions && requestOptions.queryParameters) {
|
|
485
487
|
for (const key of Object.keys(requestOptions.queryParameters)) {
|
|
486
488
|
// We want to keep `undefined` and `null` values,
|
|
@@ -472,11 +472,13 @@ function createTransporter({
|
|
|
472
472
|
...requestOptions.data
|
|
473
473
|
} : {};
|
|
474
474
|
const queryParameters = {
|
|
475
|
-
'x-algolia-agent': algoliaAgent.value,
|
|
476
475
|
...baseQueryParameters,
|
|
477
476
|
...request.queryParameters,
|
|
478
477
|
...dataQueryParameters
|
|
479
478
|
};
|
|
479
|
+
if (algoliaAgent.value) {
|
|
480
|
+
queryParameters['x-algolia-agent'] = algoliaAgent.value;
|
|
481
|
+
}
|
|
480
482
|
if (requestOptions && requestOptions.queryParameters) {
|
|
481
483
|
for (const key of Object.keys(requestOptions.queryParameters)) {
|
|
482
484
|
// We want to keep `undefined` and `null` values,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTransporter.d.ts","sourceRoot":"","sources":["../../../src/transporter/createTransporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,kBAAkB,EAClB,WAAW,EAEZ,MAAM,UAAU,CAAC;AAsBlB,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"createTransporter.d.ts","sourceRoot":"","sources":["../../../src/transporter/createTransporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,kBAAkB,EAClB,WAAW,EAEZ,MAAM,UAAU,CAAC;AAsBlB,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,GAAG,WAAW,CAmTlC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-common",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.28",
|
|
4
4
|
"description": "Common package for the Algolia JavaScript API client.",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/jest": "28.1.8",
|
|
23
23
|
"@types/node": "16.11.59",
|
|
24
|
-
"jest": "29.
|
|
25
|
-
"jest-environment-jsdom": "29.
|
|
24
|
+
"jest": "29.3.1",
|
|
25
|
+
"jest-environment-jsdom": "29.3.1",
|
|
26
26
|
"ts-jest": "28.0.8",
|
|
27
27
|
"typescript": "4.8.3"
|
|
28
28
|
},
|
|
@@ -110,12 +110,15 @@ export function createTransporter({
|
|
|
110
110
|
: {};
|
|
111
111
|
|
|
112
112
|
const queryParameters: QueryParameters = {
|
|
113
|
-
'x-algolia-agent': algoliaAgent.value,
|
|
114
113
|
...baseQueryParameters,
|
|
115
114
|
...request.queryParameters,
|
|
116
115
|
...dataQueryParameters,
|
|
117
116
|
};
|
|
118
117
|
|
|
118
|
+
if (algoliaAgent.value) {
|
|
119
|
+
queryParameters['x-algolia-agent'] = algoliaAgent.value;
|
|
120
|
+
}
|
|
121
|
+
|
|
119
122
|
if (requestOptions && requestOptions.queryParameters) {
|
|
120
123
|
for (const key of Object.keys(requestOptions.queryParameters)) {
|
|
121
124
|
// We want to keep `undefined` and `null` values,
|