Skip to content

Commit

Permalink
Version 1.17.5
Browse files Browse the repository at this point in the history
**Changes**

- Add cloudChoice parameter, allowing users to choose which cloud provider will be used for their searches #1896
  • Loading branch information
Fondryext authored Sep 13, 2024
2 parents 2bf2b35 + 9460d9e commit 302b2fe
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ CDN

The following NPM package may be included in this product:

- @yext/search-core@2.5.1
- @yext/search-core@2.5.4

This package contains the following license and notice below:

Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/answers-search-ui",
"version": "1.17.4",
"version": "1.17.5",
"description": "Javascript Search Programming Interface",
"main": "dist/answers-umd.js",
"repository": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"@mapbox/mapbox-gl-language": "^0.10.1",
"@yext/answers-storage": "^1.1.0",
"@yext/rtf-converter": "^1.7.1",
"@yext/search-core": "^2.5.1",
"@yext/search-core": "^2.5.4",
"bowser": "^2.11.0",
"cross-fetch": "^3.1.5",
"css-vars-ponyfill": "^2.4.3",
Expand Down
9 changes: 8 additions & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @module Core */
import { provideCore } from '@yext/search-core/lib/commonjs';
// Using the ESM build for importing the Environment enum due to an issue importing the commonjs version
import { Environment } from '@yext/search-core';
import { CloudChoice, Environment } from '@yext/search-core';
import { generateUUID } from './utils/uuid';
import SearchDataTransformer from './search/searchdatatransformer';

Expand Down Expand Up @@ -120,6 +120,12 @@ export default class Core {
*/
this._cloudRegion = CLOUD_REGION;

/**
* Determines the cloud choice of the api endpoints used when making search requests.
* @type {string}
*/
this._cloudChoice = config.cloudChoice || CloudChoice.GLOBAL_MULTI;

/** @type {string} */
this._verticalKey = config.verticalKey;

Expand Down Expand Up @@ -154,6 +160,7 @@ export default class Core {
jsLibVersion: LIB_VERSION
},
cloudRegion: this._cloudRegion,
cloudChoice: this._cloudChoice,
environment,
...config
};
Expand Down

0 comments on commit 302b2fe

Please sign in to comment.