Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Commit d1c89dd

Browse files
author
Lisi Linhart
committed
Merge branch 'master' into develop
2 parents bef96c8 + 8019b46 commit d1c89dd

27 files changed

Lines changed: 960 additions & 121 deletions

.DS_Store

6 KB
Binary file not shown.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,7 @@ dist
103103
.dynamodb/
104104

105105
# TernJS port file
106-
.tern-port
106+
.tern-port
107+
108+
# IntelliJ
109+
.idea/

README.md

Lines changed: 94 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ You found an issue?<br>Tell us about it - <a href="https://github.com/storyblok/
1010
[![GitHub issues](https://img.shields.io/github/issues/storyblok/storyblok.svg?style=flat-square&v=1)](https://github.com/storyblok/storyblok/issues?q=is%3Aopen+is%3Aissue)
1111
[![GitHub closed issues](https://img.shields.io/github/issues-closed/storyblok/storyblok.svg?style=flat-square&v=1)](https://github.com/storyblok/storyblok/issues?q=is%3Aissue+is%3Aclosed)
1212

13+
## BREAKING CHANGE
14+
15+
We added the `region` option upon login. If you are using the CLI, please `logout` and `login` again providing your user region.
16+
1317
## Installation
1418

15-
Make sure you've node `>= 9.11.0` installed.
19+
Make sure you have Node `>= 9.11.0` installed.
1620

1721
```sh
1822
$ npm i storyblok -g
@@ -28,12 +32,24 @@ Usage to kickstart a boilerplate, fieldtype or theme
2832
$ storyblok select
2933
```
3034

35+
### pull-languages
36+
37+
Download your space's languages schema as json. This command will download 1 file.
38+
39+
```sh
40+
$ storyblok pull-languages --space <SPACE_ID>
41+
```
42+
43+
#### Options
44+
45+
* `space`: your space id
46+
3147
### pull-components
3248

3349
Download your space's components schema as json. This command will download 2 files: 1 for the components and 1 for the presets.
3450

3551
```sh
36-
$ storyblok pull-components --space <SPACE_ID>
52+
$ storyblok pull-components --space <SPACE_ID> --region <REGION>
3753
```
3854

3955
#### Options
@@ -45,7 +61,7 @@ $ storyblok pull-components --space <SPACE_ID>
4561
Push your components file to your/another space
4662

4763
```sh
48-
$ storyblok push-components <SOURCE> --space <SPACE_ID> --presets-source <PRESETS_SOURCE>
64+
$ storyblok push-components <SOURCE> --space <SPACE_ID> --region <REGION> --presets-source <PRESETS_SOURCE>
4965
```
5066

5167
#### Parameters
@@ -83,6 +99,65 @@ Using a **path** to file
8399
$ storyblok push-components ./components.json --presets-source ./presets.json --space 67819
84100
```
85101

102+
### delete-component
103+
104+
Delete a single component on your space.
105+
106+
```sh
107+
storyblok delete-component <component> --space <SPACE_ID>
108+
```
109+
110+
#### Parameters
111+
* `component`: The name or id of the component
112+
113+
#### Options
114+
* `space_id`: the space where the command should be executed.
115+
116+
#### Examples
117+
118+
Delete a component on your space.
119+
```sh
120+
storyblok delete-component 111111 --space 67819
121+
```
122+
123+
```sh
124+
storyblok delete-component teaser --space 67819
125+
```
126+
127+
### delete-components
128+
129+
Delete all components from your Space that occur in your Local JSON.
130+
Or delete those components on your Space that do not appear in the JSON. (`--reverse`)
131+
132+
```sh
133+
storyblok delete-components <SOURCE> --space <SPACE_ID>
134+
```
135+
136+
#### Parameters
137+
* `source`: can be a URL or path to JSON file.
138+
139+
#### Options
140+
* `space_id`: the space where the command should be executed.
141+
* `reverse`: When passed as an argument, deletes only those components on your space that do not appear in the JSON.
142+
* `dryrun`: when passed as an argument, does not perform any changes on the given space.
143+
144+
#### Examples
145+
146+
Delete all components on a certain space that occur in your local JSON.
147+
```sh
148+
storyblok delete-components ./components.json --space 67819
149+
```
150+
151+
Delete only those components which do not occur in your local json from your space.
152+
```sh
153+
storyblok delete-components ./components.json --space 67819 --reverse
154+
```
155+
156+
To see the result in your console output but to not perform the command on your space, use the `--dryrun` argument.
157+
```sh
158+
storyblok delete-components ./components.json --space 67819 --reverse --dryrun
159+
```
160+
86161
### sync
87162

88163
Sync components, folder, roles, datasources or stories between spaces
@@ -130,6 +205,19 @@ Login to the Storyblok cli
130205
```sh
131206
$ storyblok login
132207
```
208+
#### Options
209+
210+
* `email`: your user's email address
211+
* `password`: your user's password
212+
* `region`: your user's region (default: `eu`). You can use `us`, `cn` or `eu`. This region will be used for the other cli's commands.
213+
214+
### user
215+
216+
Get the currently logged in user
217+
218+
```sh
219+
$ storyblok user
220+
```
133221

134222
### generate-migration
135223

@@ -138,6 +226,7 @@ Create a migration file (with the name `change_<COMPONENT>_<FIELD>.js`) inside t
138226
```sh
139227
$ storyblok generate-migration --space <SPACE_ID> --component <COMPONENT_NAME> --field <FIELD>
140228
```
229+
It's important to note that the `component` and `field` parameters are required and must be spelled exactly as they are in Storyblok. You can check the exact name by looking at the `Block library` inside your space.
141230

142231
#### Options
143232

@@ -189,6 +278,7 @@ $ storyblok rollback-migration --space 1234 --component Product --field title
189278

190279
### spaces
191280

281+
192282
List all spaces of the logged account
193283

194284
```sh
@@ -275,7 +365,7 @@ $ storyblok -V # or --version
275365

276366
Content migrations are a convenient way to change fields of your content.
277367

278-
To execute a migration you first need to create a migration file. This file is a pure Javascript function where the content of a specific content type or compontent gets passed through.
368+
To execute a migration you first need to create a migration file. This file is a pure Javascript function where the content of a specific content type or component gets passed through.
279369

280370
### 1. Creating a migration file
281371

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"open": "^6.0.0",
4242
"p-series": "^2.1.0",
4343
"path": "^0.12.7",
44-
"storyblok-js-client": "^3.3.1",
44+
"simple-uuid": "^0.0.1",
45+
"storyblok-js-client": "^4.5.6",
4546
"update-notifier": "^5.1.0",
4647
"xml-js": "^1.6.11"
4748
},

pull_request_template.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!--- Please provide a general summary of your changes in the title above -->
2+
3+
## Pull request type
4+
5+
Jira Link: [INT-](url)
6+
7+
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed.
8+
9+
Please check the type of change your PR introduces:-->
10+
11+
- [ ] Bugfix
12+
- [ ] Feature
13+
- [ ] Code style update (formatting, renaming)
14+
- [ ] Refactoring (no functional changes, no api changes)
15+
- [ ] Other (please describe):
16+
17+
## How to test this PR
18+
19+
<!-- Please provide the steps on how to test this PR. -->
20+
21+
## What is the new behavior?
22+
23+
<!-- Please describe the behavior or changes that are being added by this PR. -->
24+
25+
-
26+
-
27+
-
28+
29+
## Other information

0 commit comments

Comments
 (0)