From 8d89a38802b143d6722164e5ee5f35c0219788ce Mon Sep 17 00:00:00 2001 From: Roberto Butti Date: Wed, 20 Sep 2023 19:53:32 +0200 Subject: [PATCH] chore: skip CN --- README.md | 2 +- src/commands/default.ts | 2 +- src/lib/regions.ts | 6 ------ test/unit/regions.test.ts | 8 ++++---- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a741409..ff6674e 100644 --- a/README.md +++ b/README.md @@ -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 ~~~ diff --git a/src/commands/default.ts b/src/commands/default.ts index d96a415..2297434 100644 --- a/src/commands/default.ts +++ b/src/commands/default.ts @@ -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', diff --git a/src/lib/regions.ts b/src/lib/regions.ts index 48b8b47..2291c48 100644 --- a/src/lib/regions.ts +++ b/src/lib/regions.ts @@ -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', - }, } diff --git a/test/unit/regions.test.ts b/test/unit/regions.test.ts index a303f6b..549c458 100644 --- a/test/unit/regions.test.ts +++ b/test/unit/regions.test.ts @@ -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) }) })