storyblok 3.17.0 → 3.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +2 -2
- package/package.json +1 -1
- package/src/cli.js +1 -1
- package/src/constants.js +1 -1
- package/src/utils/api.js +9 -5
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
- uses: actions/checkout@v3
|
|
13
13
|
- uses: actions/setup-node@v3
|
|
14
14
|
with:
|
|
15
|
-
node-version:
|
|
15
|
+
node-version: 18
|
|
16
16
|
cache: 'yarn'
|
|
17
17
|
- name: Install dependencies
|
|
18
18
|
run: yarn
|
|
@@ -20,4 +20,4 @@ jobs:
|
|
|
20
20
|
env:
|
|
21
21
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
22
22
|
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}
|
|
23
|
-
run: npx semantic-release
|
|
23
|
+
run: npx semantic-release
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -16,7 +16,7 @@ const { getQuestions, lastStep, api, creds } = require('./utils')
|
|
|
16
16
|
const { SYNC_TYPES, COMMANDS } = require('./constants')
|
|
17
17
|
|
|
18
18
|
clear()
|
|
19
|
-
console.log(chalk.cyan(figlet.textSync('
|
|
19
|
+
console.log(chalk.cyan(figlet.textSync('storyblok')))
|
|
20
20
|
console.log()
|
|
21
21
|
console.log()
|
|
22
22
|
console.log('Hi, welcome to the Storyblok CLI')
|
package/src/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const API_URL = 'https://api.storyblok.com/v1/'
|
|
2
2
|
const US_API_URL = 'https://api-us.storyblok.com/v1/'
|
|
3
|
-
const CN_API_URL = 'https://
|
|
3
|
+
const CN_API_URL = 'https://app.storyblokchina.cn/v1/'
|
|
4
4
|
const LOGIN_URL = `${API_URL}users/login`
|
|
5
5
|
const SIGNUP_URL = `${API_URL}users/signup`
|
|
6
6
|
|
package/src/utils/api.js
CHANGED
|
@@ -16,11 +16,15 @@ module.exports = {
|
|
|
16
16
|
getClient () {
|
|
17
17
|
const { region } = creds.get()
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
try {
|
|
20
|
+
return new Storyblok({
|
|
21
|
+
accessToken: this.accessToken,
|
|
22
|
+
oauthToken: this.oauthToken,
|
|
23
|
+
region: this.region
|
|
24
|
+
}, this.apiSwitcher(region))
|
|
25
|
+
} catch (error) {
|
|
26
|
+
throw new Error(error)
|
|
27
|
+
}
|
|
24
28
|
},
|
|
25
29
|
|
|
26
30
|
getPath (path) {
|