sb-mig 5.3.0-beta.3 → 5.3.0-beta.5
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.
|
@@ -7,5 +7,5 @@ export declare const migrationsDescription = "\n Usage\n $ sb-mig migr
|
|
|
7
7
|
export declare const removeDescription = "\n Usage\n $ sb-mig remove [components|roles|datasources] [space separated file names] or --all \n \n Description\n Remove components or roles with Storyblok space.\n \n COMMANDS\n components - remove components\n roles - remove roles\n datasources - remove datasources\n \n FLAGS\n --all - Remove all components \n \n EXAMPLES\n $ sb-mig remove components --all\n $ sb-mig remove components accordion accordion-item\n $ sb-mig remove roles --all\n $ sb-mig remove datasources --all\n";
|
|
8
8
|
export declare const backupDescription = "\n Usage\n $ sb-mig backup [components|component-groups|roles|datasources|presets|component-presets] component-name 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 plugins - backup plugins\n stories - backup stories (only --all)\n\n \n FLAGS\n --all - Backup all \n \n EXAMPLES\n $ sb-mig backup components --all\n $ sb-mig backup components accordion \n $ sb-mig backup datasources --all\n $ sb-mig backup roles admin\n $ sb-mig backup plugins --all\n $ sb-mig backup plugins my-awesome-plugin\n $ sb-mig backup stories --all\n";
|
|
9
9
|
export declare const debugDescription = "\n Usage\n $ sb-mig debug\n Description\n Output extra debugging information\n";
|
|
10
|
-
export declare const askDescription = "\n !! ALPHA !!!\n Usage\n $ sb-mig ask \"What sb-mig version am I using?\"\n $ sb-mig ask \"What is the schema type i should write?\"\n $ sb-mig ask \"Is debug mode turned on ?\"\n $ sb-mig ask \"What storyblok api urls I am using?\"\n $ sb-mig ask \"How would I sync just couple components ? what command should i use? I would like to also sync presets for this components\"\n Description\n Ask sb-mig about anything, especially stuff related to sb-mig and storyblok components.\n \n Needs OPENAI_API_KEY= environment set in your project. (Config will pick it up automatically, no need to modify\n storyblok.config.[c|m]js file\n \n Also, right now, you need to install @mrck-labs/anton-sdk in your project, since its not bundled.\n";
|
|
10
|
+
export declare const askDescription = "\n !! ALPHA !!!\n Usage\n $ sb-mig ask \"What sb-mig version am I using?\"\n $ sb-mig ask \"What is the schema type i should write?\"\n $ sb-mig ask \"Is debug mode turned on ?\"\n $ sb-mig ask \"What storyblok api urls I am using?\"\n $ sb-mig ask \"How would I sync just couple components ? what command should i use? I would like to also sync presets for this components\"\n $ sb-mig ask \"Can you give me a brief overview of sb-mig tool features, I would like to be sure i do not miss anything super important while using it\"\n Description\n Ask sb-mig about anything, especially stuff related to sb-mig and storyblok components.\n \n Needs OPENAI_API_KEY= environment set in your project. (Config will pick it up automatically, no need to modify\n storyblok.config.[c|m]js file\n \n Also, right now, you need to install @mrck-labs/anton-sdk in your project, since its not bundled.\n";
|
|
11
11
|
export declare const initDescription = "\n Usage\n $ sb-mig init\n Description\n Init and update your project\n";
|
|
@@ -193,6 +193,7 @@ export const askDescription = `
|
|
|
193
193
|
$ sb-mig ask "Is debug mode turned on ?"
|
|
194
194
|
$ sb-mig ask "What storyblok api urls I am using?"
|
|
195
195
|
$ sb-mig ask "How would I sync just couple components ? what command should i use? I would like to also sync presets for this components"
|
|
196
|
+
$ sb-mig ask "Can you give me a brief overview of sb-mig tool features, I would like to be sure i do not miss anything super important while using it"
|
|
196
197
|
Description
|
|
197
198
|
Ask sb-mig about anything, especially stuff related to sb-mig and storyblok components.
|
|
198
199
|
|
package/dist/cli/commands/ask.js
CHANGED
|
@@ -6,11 +6,20 @@ import { getFileContentWithRequire } from "../../utils/main.js";
|
|
|
6
6
|
import * as descriptions from "../cli-descriptions.js";
|
|
7
7
|
export const ask = async (props) => {
|
|
8
8
|
const { input, flags } = props;
|
|
9
|
+
console.log("whatever ?");
|
|
9
10
|
try {
|
|
10
11
|
const fileContent = await getFileContentWithRequire({
|
|
11
12
|
file: path.join("..", "..", "package.json"),
|
|
12
13
|
});
|
|
13
14
|
const anton = new Anton(config.openaiToken);
|
|
15
|
+
console.log(anton.setInitialMessages);
|
|
16
|
+
// anton.doWhatever()
|
|
17
|
+
anton.setInitialMessages([
|
|
18
|
+
{
|
|
19
|
+
role: "system",
|
|
20
|
+
content: "Act like a lady from high house",
|
|
21
|
+
},
|
|
22
|
+
]);
|
|
14
23
|
const question = input[1];
|
|
15
24
|
const cleanPackageJSON = {
|
|
16
25
|
...fileContent,
|
|
@@ -50,6 +59,7 @@ export const ask = async (props) => {
|
|
|
50
59
|
Logger.success(data?.choices[0]?.message?.content);
|
|
51
60
|
}
|
|
52
61
|
catch (e) {
|
|
62
|
+
console.log(e);
|
|
53
63
|
Logger.warning("Can't find package.json");
|
|
54
64
|
}
|
|
55
65
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sb-mig",
|
|
3
|
-
"version": "5.3.0-beta.
|
|
3
|
+
"version": "5.3.0-beta.5",
|
|
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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"build:yalc": "yarn build && yalc push"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@mrck-labs/anton-sdk": "^0.0.
|
|
55
|
+
"@mrck-labs/anton-sdk": "^0.0.15",
|
|
56
56
|
"@swc/core": "1.3.41",
|
|
57
57
|
"@swc/helpers": "0.4.14",
|
|
58
58
|
"chalk": "^5.3.0",
|