derived-cli 0.0.32 → 0.0.33
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/bundle.js +1 -1
- package/package.json +2 -2
package/dist/bundle.js
CHANGED
|
@@ -87,4 +87,4 @@ Available commands:
|
|
|
87
87
|
|
|
88
88
|
help
|
|
89
89
|
Show this help text.
|
|
90
|
-
`)});var gi=r=>{let e=j();try{e.start("Decoding base64...");let t=Buffer.from(r,"base64").toString("utf8"),i=JSON.parse(t);for(;typeof i!="object";)i=JSON.parse(i);return e.stop("Decoded input successfully"),i}catch{return e.stop("Failed to decode input"),null}};ne.command("add <blockCode>").description("Generate and refine a JSON block interactively").option("-q, --query <value>","Optional user input").option("-i, --block-input <value>","Optional block input json schema in base 64").action(async(r,e)=>{let t=e.blockInput?gi(e.blockInput):null;await Fi(r,e.query,t)});ne.command("init <project-slug>").description("Initialize a project from a template").action(async r=>{We(`\u{1F680} Initializing project: ${r}`);try{let e=process.cwd(),{isDirectoryEmpty:t,removeGitDirectory:i}=await Promise.resolve().then(()=>(Gt(),Wt));t(e)||(T("\u274C Error: Current directory is not empty. Please run this command in an empty directory."),process.exit(1));let s=j();s.start("Fetching project details...");let n=await oe.fetchProjectBySlug(r);n?.result||(s.stop("\u274C Project not found"),T(`Project with slug '${r}' does not exist.`),process.exit(1));let u=n.result;s.stop(`\u2705 Found project: ${u.name}`),s.start(`Cloning repository from ${u.gitUrl}...`);let{execSync:o}=await import("child_process");try{o(`git clone ${u.gitUrl} .`,{stdio:"pipe",cwd:e}),s.stop("\u2705 Repository cloned successfully")}catch(a){s.stop("\u274C Failed to clone repository"),T(`Git clone failed: ${a.message}`),process.exit(1)}if(
|
|
90
|
+
`)});var gi=r=>{let e=j();try{e.start("Decoding base64...");let t=Buffer.from(r,"base64").toString("utf8"),i=JSON.parse(t);for(;typeof i!="object";)i=JSON.parse(i);return e.stop("Decoded input successfully"),i}catch{return e.stop("Failed to decode input"),null}};ne.command("add <blockCode>").description("Generate and refine a JSON block interactively").option("-q, --query <value>","Optional user input").option("-i, --block-input <value>","Optional block input json schema in base 64").action(async(r,e)=>{let t=e.blockInput?gi(e.blockInput):null;await Fi(r,e.query,t)});ne.command("init <project-slug>").description("Initialize a project from a template").action(async r=>{We(`\u{1F680} Initializing project: ${r}`);try{let e=process.cwd(),{isDirectoryEmpty:t,removeGitDirectory:i}=await Promise.resolve().then(()=>(Gt(),Wt));t(e)||(T("\u274C Error: Current directory is not empty. Please run this command in an empty directory."),process.exit(1));let s=j();s.start("Fetching project details...");let n=await oe.fetchProjectBySlug(r);n?.result||(s.stop("\u274C Project not found"),T(`Project with slug '${r}' does not exist.`),process.exit(1));let u=n.result;s.stop(`\u2705 Found project: ${u.name}`),s.start(`Cloning repository from ${u.gitUrl}...`);let{execSync:o}=await import("child_process");try{o(`git clone ${u.gitUrl} .`,{stdio:"pipe",cwd:e}),s.stop("\u2705 Repository cloned successfully")}catch(a){s.stop("\u274C Failed to clone repository"),T(`Git clone failed: ${a.message}`),process.exit(1)}if(i(e),u.setupCommand&&u.setupCommand.trim()){let a=u.setupCommand.split(",").map(c=>c.trim());for(let c of a)if(c){s.start(`Running: ${c}`);try{o(c,{stdio:"inherit",cwd:e}),s.stop(`\u2705 Completed: ${c}`)}catch(D){s.stop(`\u26A0\uFE0F Warning: Command failed: ${c}`),console.warn(` ${D.message}`)}}}Tt(`\u{1F389} Project '${u.name}' setup successfully!`)}catch(e){T(`\u274C An error occurred: ${e.message}`),process.exit(1)}});ne.parse();0&&(module.exports={displayFileTree});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "derived-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"description": "CLI for Derived",
|
|
5
5
|
"author": "Derived",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@clack/prompts": "^0.11.0",
|
|
26
26
|
"commander": "^14.0.2",
|
|
27
|
-
"derived-sdk": "^0.0.
|
|
27
|
+
"derived-sdk": "^0.0.10",
|
|
28
28
|
"dotenv": "16.4.5",
|
|
29
29
|
"inquirer": "^12.6.0",
|
|
30
30
|
"keytar": "^7.9.0",
|