sb-mig 4.0.3 → 4.0.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/dist/cli-descriptions.d.ts +4 -4
- package/dist/cli-descriptions.js +13 -11
- package/dist/commands/backup.js +3 -0
- package/dist/index.js +0 -0
- package/package.json +4 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const mainDescription = "\n
|
|
2
|
-
export declare const syncDescription = "\n Usage\n $ sb-mig
|
|
3
|
-
export declare const backupDescription = "\n Usage\n $ sb-mig
|
|
4
|
-
export declare const debugDescription = "\n Usage\n $ sb-mig
|
|
1
|
+
export declare const mainDescription = "\n USAGE\n $ sb-mig [command]\n \n COMMANDS\n sync Synchronize components, datasources or roles with Storyblok space.\n backup Command for backing up anything related to Storyblok\n debug Output extra debugging information\n help This screen\n \n Examples\n $ sb-mig sync\n $ sb-mig debug \n";
|
|
2
|
+
export declare const syncDescription = "\n Usage\n $ sb-mig sync [components|roles|datasources] [space separated file names] or --all --packageName\n \n Description\n Synchronize components or roles with Storyblok space.\n \n COMMANDS\n components - sync components\n roles - sync roles\n datasources - sync datasources\n \n FLAGS\n --all - Sync all components\n --packageName - Sync based on package name, instead of file name (package can have multiple schema files to sync)\n --presets - Pass it, if u want to sync also with presets (will take longer) \n \n EXAMPLES\n $ sb-mig sync components --all\n $ sb-mig sync components --all --presets\n $ sb-mig sync components accordion accordion-item\n $ sb-mig sync components accordion accordion-item --presets\n $ sb-mig sync components @storyblok-components/accordion --packageName\n $ sb-mig sync components @storyblok-components/accordion --packageName --presets\n $ sb-mig sync roles --all\n $ sb-mig sync datasources --all\n";
|
|
3
|
+
export declare const backupDescription = "\n Usage\n $ sb-mig backup [components|component-groups|roles|datasources|presets|component-presets] component-name --one or --all\n Description\n Command for backing up anything related to Storyblok\n \n COMMANDS\n components - backup components\n component-groups - backup component-groups\n roles - backup components\n datasources - backup components\n presets - backup presets\n component-presets - backup component presets\n \n FLAGS\n --all - Backup all \n --one - Backup one \n \n EXAMPLES\n $ sb-mig backup components --all\n $ sb-mig backup components accordion --one \n $ sb-mig backup datasources --all\n $ sb-mig backup roles admin --one\n";
|
|
4
|
+
export declare const debugDescription = "\n Usage\n $ sb-mig debug\n Description\n Output extra debugging information\n";
|
package/dist/cli-descriptions.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export const mainDescription = `
|
|
2
|
-
CLI to rule the world. (and handle stuff related to Storyblok CMS)
|
|
3
|
-
|
|
4
2
|
USAGE
|
|
5
3
|
$ sb-mig [command]
|
|
6
4
|
|
|
@@ -11,12 +9,12 @@ export const mainDescription = `
|
|
|
11
9
|
help This screen
|
|
12
10
|
|
|
13
11
|
Examples
|
|
14
|
-
$ sb-
|
|
15
|
-
$ sb-mig
|
|
12
|
+
$ sb-mig sync
|
|
13
|
+
$ sb-mig debug
|
|
16
14
|
`;
|
|
17
15
|
export const syncDescription = `
|
|
18
16
|
Usage
|
|
19
|
-
$ sb-mig
|
|
17
|
+
$ sb-mig sync [components|roles|datasources] [space separated file names] or --all --packageName
|
|
20
18
|
|
|
21
19
|
Description
|
|
22
20
|
Synchronize components or roles with Storyblok space.
|
|
@@ -33,19 +31,23 @@ export const syncDescription = `
|
|
|
33
31
|
|
|
34
32
|
EXAMPLES
|
|
35
33
|
$ sb-mig sync components --all
|
|
34
|
+
$ sb-mig sync components --all --presets
|
|
36
35
|
$ sb-mig sync components accordion accordion-item
|
|
36
|
+
$ sb-mig sync components accordion accordion-item --presets
|
|
37
37
|
$ sb-mig sync components @storyblok-components/accordion --packageName
|
|
38
|
-
|
|
38
|
+
$ sb-mig sync components @storyblok-components/accordion --packageName --presets
|
|
39
|
+
$ sb-mig sync roles --all
|
|
40
|
+
$ sb-mig sync datasources --all
|
|
39
41
|
`;
|
|
40
42
|
export const backupDescription = `
|
|
41
43
|
Usage
|
|
42
|
-
$ sb-mig
|
|
44
|
+
$ sb-mig backup [components|component-groups|roles|datasources|presets|component-presets] component-name --one or --all
|
|
43
45
|
Description
|
|
44
46
|
Command for backing up anything related to Storyblok
|
|
45
47
|
|
|
46
48
|
COMMANDS
|
|
47
49
|
components - backup components
|
|
48
|
-
component-groups -
|
|
50
|
+
component-groups - backup component-groups
|
|
49
51
|
roles - backup components
|
|
50
52
|
datasources - backup components
|
|
51
53
|
presets - backup presets
|
|
@@ -57,13 +59,13 @@ export const backupDescription = `
|
|
|
57
59
|
|
|
58
60
|
EXAMPLES
|
|
59
61
|
$ sb-mig backup components --all
|
|
60
|
-
$ sb-mig backup components accordion
|
|
62
|
+
$ sb-mig backup components accordion --one
|
|
61
63
|
$ sb-mig backup datasources --all
|
|
62
|
-
$ sb-mig backup roles admin
|
|
64
|
+
$ sb-mig backup roles admin --one
|
|
63
65
|
`;
|
|
64
66
|
export const debugDescription = `
|
|
65
67
|
Usage
|
|
66
|
-
$ sb-mig
|
|
68
|
+
$ sb-mig debug
|
|
67
69
|
Description
|
|
68
70
|
Output extra debugging information
|
|
69
71
|
`;
|
package/dist/commands/backup.js
CHANGED
|
@@ -38,6 +38,9 @@ export const backup = (props) => {
|
|
|
38
38
|
const componentToBackup = unpackOne(input);
|
|
39
39
|
getComponent(componentToBackup)
|
|
40
40
|
.then(async (res) => {
|
|
41
|
+
console.log("############");
|
|
42
|
+
console.log(res);
|
|
43
|
+
console.log("############");
|
|
41
44
|
await createAndSaveToFile({
|
|
42
45
|
prefix: "component-",
|
|
43
46
|
folder: "components",
|
package/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sb-mig",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "CLI to rule the world. (and handle stuff related to Storyblok CMS)",
|
|
5
5
|
"author": "Marcin Krawczyk <marckraw@icloud.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
],
|
|
36
36
|
"scripts": {
|
|
37
37
|
"lint-staged": "lint-staged",
|
|
38
|
-
"build": "rm -rf dist && tsc",
|
|
39
|
-
"build:dev": "
|
|
38
|
+
"build": "rm -rf dist && tsc && chmod +x ./dist/index.js",
|
|
39
|
+
"build:dev": "chokidar 'src/**/*.{js,ts,cjs,mjs}' -c 'yarn build'",
|
|
40
40
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
41
41
|
"start": "yarn build && ./dist/index.js",
|
|
42
42
|
"debug": "yarn build && ./dist/index.js sync components accordion accordion-item",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"@types/glob": "^7.2.0",
|
|
63
63
|
"@types/ncp": "^2.0.5",
|
|
64
64
|
"@types/node": "^17.0.35",
|
|
65
|
+
"chokidar-cli": "^3.0.0",
|
|
65
66
|
"commitizen": "^4.0.4",
|
|
66
67
|
"conventional-changelog-cli": "^2.0.31",
|
|
67
68
|
"eslint": "^8.16.0",
|