paypal-braintree-web-client
Advanced tools
Comparing version 4.0.39 to 4.0.40
{ | ||
"name": "paypal-braintree-web-client", | ||
"version": "4.0.39", | ||
"version": "4.0.40", | ||
"description": "Shared config between PayPal/Braintree.", | ||
@@ -26,3 +26,3 @@ "main": "index.js", | ||
"prepublish": "in-publish && npm run babel || not-in-publish", | ||
"postpublish": "git checkout ./server" | ||
"postpublish": "rm -rf ./server && git checkout ./server" | ||
}, | ||
@@ -29,0 +29,0 @@ "files": [ |
@@ -1,3 +0,3 @@ | ||
PayPal/Braintree SDK Client | ||
--------------------------- | ||
PayPal SDK Client | ||
----------------- | ||
@@ -4,0 +4,0 @@ A shared client for PayPal/Braintree client sdk modules. Featuring: |
@@ -10,2 +10,3 @@ /* @flow */ | ||
declare var __STAGE_HOST__ : string; | ||
declare var __SERVICE_STAGE_HOST__ : string; | ||
@@ -12,0 +13,0 @@ declare var __TEST__ : boolean; |
@@ -29,2 +29,8 @@ /* @flow */ | ||
export function getDefaultAPIStageHost() : string { | ||
return (typeof __SERVICE_STAGE_HOST__ !== 'undefined') | ||
? __SERVICE_STAGE_HOST__ | ||
: __STAGE_HOST__.replace('www.', ''); | ||
} | ||
export function getVersion() : string { | ||
@@ -31,0 +37,0 @@ return __VERSION__; |
@@ -7,3 +7,3 @@ /* @flow */ | ||
import { getHost, getPath, getDefaultStageHost } from './globals'; | ||
import { getHost, getPath, getDefaultStageHost, getDefaultAPIStageHost } from './globals'; | ||
@@ -121,3 +121,3 @@ export const CLIENT_ID_ALIAS = { | ||
export function getAPIStageHost() : string { | ||
return getSDKAttribute(SDK_SETTINGS.API_STAGE_HOST, getStageHost()); | ||
return getSDKAttribute(SDK_SETTINGS.API_STAGE_HOST, getDefaultAPIStageHost()); | ||
} | ||
@@ -124,0 +124,0 @@ |
52878
950