Skip to content

Commit

Permalink
Merge pull request #20 from contentstack/next
Browse files Browse the repository at this point in the history
Implemented GCP NA Support (#19)
  • Loading branch information
harshithad0703 authored Jun 7, 2024
2 parents 04da1a1 + b26bae6 commit 0ea346c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Changelog

## [v1.1.1](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.1.1) (2024-06-11)
- Added GCP Region support

## [v1.1.0](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.1.0) (2024-06-05)
- added reinstall app function
- Added reinstall app function

## [v1.0.2](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.0.2) (2024-01-16)
- Updated dependencies
Expand Down
3 changes: 2 additions & 1 deletion lib/core/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ const Region = {
EU: 'eu',
NA: '',
AZURE_NA: 'azure-na',
AZURE_EU: 'azure-eu'
AZURE_EU: 'azure-eu',
GCP_NA: 'gcp-na'
}

export default Region
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/marketplace-sdk",
"version": "1.1.0",
"version": "1.1.1",
"description": "The Contentstack Marketplace SDK is used to manage the content of your Contentstack marketplace apps",
"main": "./dist/node/contentstack-marketplace.js",
"browser": "./dist/web/contentstack-marketplace.js",
Expand Down
12 changes: 12 additions & 0 deletions test/unit/ContentstackHTTPClient-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,16 @@ describe('Contentstack HTTP Client', () => {
expect(axiosInstance.defaults.baseURL).to.be.equal('https://azure-eu-contentstack.com:443')
done()
})

it('Contentstack Http Client Host with GCP NA region', done => {
var axiosInstance = contentstackHTTPClient(
{
region: Region.GCP_NA,
defaultHostName: 'defaulthost',
host: 'contentstack.com:443'
})
expect(axiosInstance.defaults.region).to.be.equal('gcp-na')
expect(axiosInstance.defaults.baseURL).to.be.equal('https://gcp-na-contentstack.com:443')
done()
})
})
3 changes: 2 additions & 1 deletion types/contentstackClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export enum Region {
EU = 'eu',
NA = '',
AZURE_NA = 'azure-na',
AZURE_EU = 'azure-eu'
AZURE_EU = 'azure-eu',
GCP_NA = 'gcp-na'
}
export interface ContentstackConfig extends AxiosRequestConfig, ContentstackToken {
proxy?: ProxyConfig | false
Expand Down

0 comments on commit 0ea346c

Please sign in to comment.