Skip to content

Commit

Permalink
chore: skip CN
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-butti committed Sep 20, 2023
1 parent 582c741 commit 8d89a38
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ OPTIONS
-h, --help show CLI help
-k, --key=key Storyblok Access Token
-p, --packagemanager=packagemanager Package manager to use (yarn or npm)
-r, --region=region Space region (e.g. EU, US or CN)
-r, --region=region Space region (EU, US). The support for the China region will be introduced in the next release.
-v, --version show CLI version
~~~

Expand Down
2 changes: 1 addition & 1 deletion src/commands/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class CreateStoryblokAppCommand extends Command {
key: Flags.string({char: 'k', description: 'Storyblok Access Token'}),
region: Flags.string({
char: 'r',
description: 'Space region (EU, US or CN)',
description: 'Space region (EU or US)',
}),
folder: Flags.string({
char: 'd',
Expand Down
6 changes: 0 additions & 6 deletions src/lib/regions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ const regions: RegionMap = {
apiEndpoint: 'https://api-us.storyblok.com/v2/cdn/',
urlUi: 'https://app.storyblok.com',
},
CN: {
name: 'CN',
value: '',
apiEndpoint: 'https://app.storyblokchina.cn/v2/cdn/',
urlUi: 'https://app.storyblokchina.cn/fe/editor_v2',
},

}

Expand Down
8 changes: 4 additions & 4 deletions test/unit/regions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ describe('Regions', function () {
it('contains US', function () {
assert.equal(Object.keys(regions).includes('US'), true)
})
it('contains CN', function () {
assert.equal(Object.keys(regions).includes('CN'), true)
it('not contains CN', function () {
assert.equal(Object.keys(regions).includes('CN'), false)
})
it('contains 3 regions', function () {
assert.equal(Object.keys(regions).length, 3)
it('contains 2 regions', function () {
assert.equal(Object.keys(regions).length, 2)
})
})

0 comments on commit 8d89a38

Please sign in to comment.