storyblok-backup 0.1.0 → 0.1.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/README.md CHANGED
@@ -31,23 +31,20 @@ The backup script will fetch the following resources of a Storyblok space using
31
31
  - Pipeline Branches
32
32
  - Access Tokens
33
33
 
34
- The restore script is able to individually restore the the resources from the backup files (via update or create) with the following exceptions:
34
+ The restore script is able to individually restore the resources from the backup files (via update or create) with the following exceptions:
35
35
 
36
- - Assets: Creating assets is not supported
37
- - Tasks: Currently not supported due to missing fields returned from management API
36
+ - Assets: Only updating asset-resource-data is supported. Creating assets and updating asset-files is not supported.
37
+ - Tasks: Currently not supported due to missing fields returned from management API.
38
38
  - Field types: Currently not supported
39
- - Workflow stage changes: No update possible
39
+ - Workflow stage changes: No update possible.
40
40
  - Access Tokens: Creating access tokens from backup makes no sense, since it will result in a new token-string.
41
41
 
42
42
  ## Installation
43
43
 
44
44
  ```shell
45
45
 
46
- # simply auto-download and run via npx
47
- ## for backup:
46
+ # simply auto-download and run via npx (backup only)
48
47
  $ npx storyblok-backup
49
- ## for restore:
50
- $ npx -p storyblok-backup storyblok-restore
51
48
 
52
49
  # or install globally
53
50
  $ npm install -g storyblok-backup
@@ -185,7 +182,9 @@ Also keep in mind, that there is a limit on artifact storage and runner minutes
185
182
 
186
183
  ### Restore
187
184
 
188
- Call `npx -p storyblok-backup storyblok-restore` with the following options:
185
+ Make sure to install the package first (see [Installation](#installation)).
186
+
187
+ Call `npx storyblok-restore` with the following options:
189
188
 
190
189
  #### Restore options
191
190
 
@@ -235,7 +234,7 @@ Call `npx -p storyblok-backup storyblok-restore` with the following options:
235
234
  #### Minimal restore example
236
235
 
237
236
  ```shell
238
- npx -p storyblok-backup storyblok-restore --token 1234567890abcdef --space 12345 --type story --file ./.output/backup/123456789.json
237
+ npx storyblok-restore --token 1234567890abcdef --space 12345 --type story --file ./.output/backup/123456789.json
239
238
  ```
240
239
 
241
240
  This will restore the story from the stated file by updating it.
@@ -243,7 +242,7 @@ This will restore the story from the stated file by updating it.
243
242
  #### Maximal restore example
244
243
 
245
244
  ```shell
246
- npx -p storyblok-backup storyblok-restore \
245
+ npx storyblok-restore \
247
246
  --token 1234567890abcdef \
248
247
  --space 12345 \
249
248
  --region ap \
@@ -106,8 +106,8 @@ const fileName =
106
106
  [
107
107
  filePrefix,
108
108
  new Date().getFullYear(),
109
- new Date().getMonth().toString().padStart(2, '0'),
110
- new Date().getDay().toString().padStart(2, '0'),
109
+ (new Date().getMonth() + 1).toString().padStart(2, '0'),
110
+ new Date().getDate().toString().padStart(2, '0'),
111
111
  new Date().getHours().toString().padStart(2, '0'),
112
112
  new Date().getMinutes().toString().padStart(2, '0'),
113
113
  new Date().getSeconds().toString().padStart(2, '0'),
@@ -37,7 +37,7 @@ const args = minimist(process.argv.slice(2))
37
37
 
38
38
  if ('help' in args) {
39
39
  console.log(`USAGE
40
- $ npx -p storyblok-backup storyblok-restore
40
+ $ npx storyblok-restore
41
41
 
42
42
  OPTIONS
43
43
  --token <token> (required) Personal OAuth access token created
@@ -65,10 +65,10 @@ OPTIONS
65
65
  --help Show this help
66
66
 
67
67
  MINIMAL EXAMPLE
68
- $ npx -p storyblok-backup storyblok-restore --token 1234567890abcdef --space 12345 --type story --file ./.output/backup/123456789.json
68
+ $ npx storyblok-restore --token 1234567890abcdef --space 12345 --type story --file ./.output/backup/123456789.json
69
69
 
70
70
  MAXIMAL EXAMPLE
71
- $ npx -p storyblok-backup storyblok-restore \\
71
+ $ npx storyblok-restore \\
72
72
  --token 1234567890abcdef \\
73
73
  --space 12345 \\
74
74
  --region ap \\
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storyblok-backup",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "npx CLI tool to create a full backup of a Storyblok space and restore single resources from it.",
5
5
  "scripts": {
6
6
  "upgrade": "npx npm-check-updates -i -u && pnpm install",