storyblok 3.10.0 → 3.10.4
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/.travis.yml +2 -3
- package/package.json +8 -8
- package/src/tasks/quickstart.js +2 -2
- package/src/tasks/sync.js +5 -1
- package/src/utils/last-step.js +6 -6
package/.travis.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storyblok",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.4",
|
|
4
4
|
"description": "A simple CLI to start Storyblok from your command line.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storyblok",
|
|
@@ -21,24 +21,24 @@
|
|
|
21
21
|
"author": "Dominik Angerer <dominikangerer1@gmail.com>, Alexander Feiglstorfer <delooks@gmail.com>",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"axios": "^0.
|
|
24
|
+
"axios": "^0.21.1",
|
|
25
25
|
"chalk": "^4.1.0",
|
|
26
26
|
"clear": "0.1.0",
|
|
27
27
|
"commander": "^5.1.0",
|
|
28
|
-
"fast-csv": "^4.3.
|
|
28
|
+
"fast-csv": "^4.3.6",
|
|
29
29
|
"figlet": "^1.5.0",
|
|
30
30
|
"form-data": "^3.0.0",
|
|
31
31
|
"fs-extra": "^9.0.1",
|
|
32
|
-
"
|
|
32
|
+
"git-clone": "^0.1.0",
|
|
33
33
|
"inquirer": "^7.3.2",
|
|
34
|
-
"lodash": "^4.17.
|
|
34
|
+
"lodash": "^4.17.21",
|
|
35
35
|
"netrc": "0.1.4",
|
|
36
36
|
"on-change": "^2.0.1",
|
|
37
|
-
"
|
|
37
|
+
"open": "^6.0.0",
|
|
38
38
|
"p-series": "^2.1.0",
|
|
39
39
|
"path": "^0.12.7",
|
|
40
|
-
"storyblok-js-client": "^
|
|
41
|
-
"update-notifier": "^
|
|
40
|
+
"storyblok-js-client": "^3.3.1",
|
|
41
|
+
"update-notifier": "^5.1.0",
|
|
42
42
|
"xml-js": "^1.6.11"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
package/src/tasks/quickstart.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const open = require('open')
|
|
2
2
|
const chalk = require('chalk')
|
|
3
3
|
const lastStep = require('../utils/last-step')
|
|
4
4
|
|
|
@@ -79,7 +79,7 @@ const quickstart = async (api, answers, spaceId) => {
|
|
|
79
79
|
console.log(`${chalk.green('✓')} - Starting Storyblok in your browser`)
|
|
80
80
|
|
|
81
81
|
setTimeout(() => {
|
|
82
|
-
|
|
82
|
+
open('http://' + answers.spaceDomain + '/_quickstart?quickstart=' + answers.loginToken)
|
|
83
83
|
process.exit(0)
|
|
84
84
|
}, 2000)
|
|
85
85
|
} catch (e) {
|
package/src/tasks/sync.js
CHANGED
|
@@ -272,7 +272,11 @@ const SyncSpaces = {
|
|
|
272
272
|
const sync = (types, options) => {
|
|
273
273
|
SyncSpaces.init(options)
|
|
274
274
|
|
|
275
|
-
const tasks = types.
|
|
275
|
+
const tasks = types.sort((a, b) => {
|
|
276
|
+
if (a === 'folders') return -1
|
|
277
|
+
if (b === 'folders') return 1
|
|
278
|
+
return 0
|
|
279
|
+
}).map(_type => {
|
|
276
280
|
const command = `sync${capitalize(_type)}`
|
|
277
281
|
|
|
278
282
|
return () => SyncSpaces[command]()
|
package/src/utils/last-step.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs')
|
|
4
4
|
const chalk = require('chalk')
|
|
5
|
-
const ghdownload = require('
|
|
5
|
+
const ghdownload = require('git-clone')
|
|
6
6
|
const replace = require('./replace')
|
|
7
7
|
|
|
8
8
|
const getFinalStep = type => {
|
|
@@ -48,8 +48,8 @@ const lastStep = answers => {
|
|
|
48
48
|
|
|
49
49
|
console.log(chalk.green('✓') + ' - The github repository ' + gitRepo + ' will be cloned now...')
|
|
50
50
|
|
|
51
|
-
ghdownload(gitRepo, outputDir)
|
|
52
|
-
|
|
51
|
+
ghdownload(gitRepo, outputDir, async (err) => {
|
|
52
|
+
if(err) {
|
|
53
53
|
if (err.code === 'ENOTEMPTY') {
|
|
54
54
|
console.log(chalk.red(' Oh Snap! It seems that you already have a project with the name: ' + name))
|
|
55
55
|
reject(new Error('This repository already has been cloned'))
|
|
@@ -62,8 +62,7 @@ const lastStep = answers => {
|
|
|
62
62
|
console.log(chalk.red('X Don\'t forget to mark it with the tag `storyblok` so will can find it.'))
|
|
63
63
|
|
|
64
64
|
return reject(err)
|
|
65
|
-
}
|
|
66
|
-
.on('end', async function () {
|
|
65
|
+
} else {
|
|
67
66
|
const finalStep = getFinalStep(type)
|
|
68
67
|
|
|
69
68
|
console.log(chalk.green('✓') + ' - ' + chalk.white('Your Storyblok project is ready for you!'))
|
|
@@ -101,7 +100,8 @@ const lastStep = answers => {
|
|
|
101
100
|
} catch (e) {
|
|
102
101
|
return reject(new Error('An error occurred when finish the download repository task ' + e.message))
|
|
103
102
|
}
|
|
104
|
-
}
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
105
|
})
|
|
106
106
|
}
|
|
107
107
|
|