Skip to content

Commit 87ee246

Browse files
Merge pull request #20 from contentstack/next
Implemented GCP NA Support (#19)
2 parents 78400d3 + 2f15481 commit 87ee246

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Changelog
22

3+
## [v1.1.1](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.1.1) (2024-06-11)
4+
- Added GCP Region support
5+
36
## [v1.1.0](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.1.0) (2024-06-05)
4-
- added reinstall app function
7+
- Added reinstall app function
58

69
## [v1.0.2](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.0.2) (2024-01-16)
710
- Updated dependencies

lib/core/region.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const Region = {
22
EU: 'eu',
33
NA: '',
44
AZURE_NA: 'azure-na',
5-
AZURE_EU: 'azure-eu'
5+
AZURE_EU: 'azure-eu',
6+
GCP_NA: 'gcp-na'
67
}
78

89
export default Region

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/marketplace-sdk",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "The Contentstack Marketplace SDK is used to manage the content of your Contentstack marketplace apps",
55
"main": "./dist/node/contentstack-marketplace.js",
66
"browser": "./dist/web/contentstack-marketplace.js",

test/unit/ContentstackHTTPClient-test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,16 @@ describe('Contentstack HTTP Client', () => {
167167
expect(axiosInstance.defaults.baseURL).to.be.equal('https://azure-eu-contentstack.com:443')
168168
done()
169169
})
170+
171+
it('Contentstack Http Client Host with GCP NA region', done => {
172+
var axiosInstance = contentstackHTTPClient(
173+
{
174+
region: Region.GCP_NA,
175+
defaultHostName: 'defaulthost',
176+
host: 'contentstack.com:443'
177+
})
178+
expect(axiosInstance.defaults.region).to.be.equal('gcp-na')
179+
expect(axiosInstance.defaults.baseURL).to.be.equal('https://gcp-na-contentstack.com:443')
180+
done()
181+
})
170182
})

types/contentstackClient.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export enum Region {
2525
EU = 'eu',
2626
NA = '',
2727
AZURE_NA = 'azure-na',
28-
AZURE_EU = 'azure-eu'
28+
AZURE_EU = 'azure-eu',
29+
GCP_NA = 'gcp-na'
2930
}
3031
export interface ContentstackConfig extends AxiosRequestConfig, ContentstackToken {
3132
proxy?: ProxyConfig | false

0 commit comments

Comments
 (0)