Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cea2aj committed May 5, 2023
1 parent 970a19b commit b031d18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions hbshelpers/sdkAssetUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const RELEASE_BRANCH_REGEX = /^release\/v[0-9.]+$/;
const HOTFIX_BRANCH_REGEX = /^hotfix\/v[0-9.]+$/;
const I18N_FEATURE_BRANCH_REGEX = /^feature\/.+-i18n$/;
const SEM_VER_REGEX = /^[1-9]+$|^[1-9]+\.[0-9]+$|^[1-9]+\.[0-9]+\.[0-9]+$/;
const US = 'us';
const EU = 'eu';

/**
* Given a branch (or release) of the SDK and a locale, this helper provides the correct
Expand All @@ -17,7 +19,7 @@ module.exports = function sdkAssetUrl(
branch,
locale,
assetName,
cloudRegion = 'us'
cloudRegion = US
) {
const isReleasedBranch = SEM_VER_REGEX.test(branch);

Expand All @@ -42,7 +44,7 @@ module.exports = function sdkAssetUrl(
`${locale}-${assetName}` :
assetName;

const domain = cloudRegion === 'eu'
const domain = cloudRegion === EU
? 'assets.eu.sitescdn.net'
: 'assets.sitescdn.net';

Expand Down
4 changes: 2 additions & 2 deletions test-site/config/global_config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"sdkVersion": "1.15", // The version of the Answers SDK to use
"sdkVersion": "develop", // The version of the Answers SDK to use
// "token": "<REPLACE ME>", // The auth token to access Answers experience.
"apiKey": "2d8c550071a64ea23e263118a2b0680b", // The answers api key found on the experiences page. This will be provided automatically by the Yext CI system
// "experienceVersion": "<REPLACE ME>", // the Answers Experience version to use for API requests. This will be provided automatically by the Yext CI system
// "environment": "production", // The environment to run on for this Answers Experience. (i.e. 'production' or 'sandbox')
// "cloudRegion": "us", // The cloud region to use for this Answers Experience. (i.e. 'us' or 'eu')
"cloudRegion": "eu", // The cloud region to use for this Answers Experience. (i.e. 'us' or 'eu')
"businessId": "3350634", // The business ID of the account. This will be provided automatically by the Yext CI system
// "initializeManually": true, // If true, the experience must be started by calling AnswersExperience.init() or AnswersExperienceFrame.init() for iframe integrations.
// "useJWT": true, // Whether or not to enable JWT. If true, the apiKey will be hidden from the build and the token must be specified through the runtime config.
Expand Down

0 comments on commit b031d18

Please sign in to comment.