jig-dev 0.2.8 → 0.2.9
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.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1508,7 +1508,7 @@ Task ${e.task_name} timed out after 10 minutes`)),await this.markTaskFailed(e.id
|
|
|
1508
1508
|
`).map(e=>e.trim()).filter(e=>e.length>0)}catch{return[]}}async function S4(t){let e=process.cwd(),r=await yre();if(r.length>0){console.error(y.red("Error: Uncommitted changes detected.")),console.error(y.dim("Commit or stash your changes before running 'jig serve'.")),console.error(y.dim(`
|
|
1509
1509
|
Uncommitted files:`));for(let l of r.slice(0,10))console.error(y.dim(` ${l}`));r.length>10&&console.error(y.dim(` ... and ${r.length-10} more`)),process.exit(1)}let n=await Is(),s=await Ii(e);s||(console.error(y.red("Error: Not linked to a cloud project. Run 'jig init' first.")),process.exit(1));let i=nn(n);console.log(y.bold("jig serve \u2014 task watcher")),console.log(y.dim(`Project: ${s}`)),console.log(y.dim(`Waiting for queued tasks... (Ctrl+C to stop)
|
|
1510
1510
|
`));let o=new sv(i,s,{onTaskPickedUp:async l=>{console.log(y.cyan(`Processing task: ${l.task_name}`));let{data:u,error:d}=await i.from("tasks").select("*").eq("id",l.id).single();if(d||!u)throw new Error(`Failed to fetch task ${l.id}: ${d?.message??"not found"}`);let{data:p,error:f}=await i.from("specs").select("name, content").eq("id",l.spec_id).single();if(f||!p)throw new Error(`Failed to fetch spec ${l.spec_id}: ${f?.message??"not found"}`);let h=p.name,m=p.content??"",g=m?Ch(h,m):{name:h},_={id:u.task_name,spec_id:h,objective:u.objective??"",context:u.context??"",acceptance_criteria:u.acceptance_criteria??[],file_scope:u.file_scope??[],verification:u.verification??[],dependencies:u.dependencies??[],status:"in-progress",intent:u.intent??void 0,guardrails:u.guardrails??void 0,complexity:u.complexity??void 0},v=await Rh(e,g,_,{supabase:i,timeoutMs:6e5});if(console.log(y.dim(` Duration: ${(v.duration/1e3).toFixed(1)}s`)),console.log(y.dim(` Files changed: ${v.filesChanged.length}`)),v.status==="failed")throw new Error(`Task failed (exit ${v.exitCode})`)},onTaskComplete:async l=>{let{error:u}=await i.from("tasks").update({status:"passed"}).eq("id",l);u?console.error(y.red(`Failed to mark task ${l} as passed: ${u.message}`)):console.log(y.green(`Task ${l} marked as passed.`))},onTaskFailed:async(l,u)=>{let{error:d}=await i.from("tasks").update({status:"failed"}).eq("id",l);d?console.error(y.red(`Failed to mark task ${l} as failed: ${d.message}`)):console.log(y.red(`Task ${l} marked as failed: ${u}`))},onError:l=>{console.error(y.red(`Queue error: ${l.message}`))}}),a=!1;async function c(l){a||(a=!0,console.log(y.yellow(`
|
|
1511
|
-
Received ${l}. Shutting down gracefully...`)),o.isProcessing()&&console.log(y.yellow("Waiting for current task to complete...")),await o.shutdown(),console.log(y.dim("Goodbye.")),process.exit(0))}process.on("SIGINT",()=>{c("SIGINT").catch(console.error)}),process.on("SIGTERM",()=>{c("SIGTERM").catch(console.error)}),await o.start(),await new Promise(()=>{})}async function $4(){let{ds:t}=await K();await k4(t)}import{join as $P}from"node:path";async function x4(t){let e=process.cwd(),r=$P(e,".jig"),n=$P(r,"config.yaml");if(!Oe(n)){console.error(y.red("Not a jig project. Run 'jig init' first."));return}console.log(y.dim("Scanning project..."));let s=await of(e),i=s.files.filter(
|
|
1511
|
+
Received ${l}. Shutting down gracefully...`)),o.isProcessing()&&console.log(y.yellow("Waiting for current task to complete...")),await o.shutdown(),console.log(y.dim("Goodbye.")),process.exit(0))}process.on("SIGINT",()=>{c("SIGINT").catch(console.error)}),process.on("SIGTERM",()=>{c("SIGTERM").catch(console.error)}),await o.start(),await new Promise(()=>{})}async function $4(){let{ds:t}=await K();await k4(t)}import{join as $P}from"node:path";async function x4(t){let e=process.cwd(),r=$P(e,".jig"),n=$P(r,"config.yaml");if(!Oe(n)){console.error(y.red("Not a jig project. Run 'jig init' first."));return}console.log(y.dim("Scanning project..."));let s=await of(e),i=s.files.filter(d=>[".ts",".tsx",".js",".jsx",".py"].includes(d.extension));if(console.log(y.dim(`Scan complete: ${s.files.length} files, ${s.directories.length} directories`)),console.log(y.dim(`Source files: ${i.length}`)),s.frameworks.length>0&&console.log(y.dim(`Frameworks detected: ${s.frameworks.map(d=>d.name).join(", ")}`)),i.length<3){console.log(y.yellow("Project too small for bootstrap. Use 'jig spec new' instead."));return}let o=await oO(s),a=iO(),c={scan_summary:await el(s),schema:a,prompt:o,generated_at:new Date().toISOString()},l=t.output??$P(r,"bootstrap-prepare.json"),{writeFile:u}=await import("node:fs/promises");await u(l,JSON.stringify(c,null,2),"utf-8"),console.log(y.green(`
|
|
1512
1512
|
Prepare data saved to: ${l}`)),console.log(y.dim(`
|
|
1513
1513
|
Next steps:
|
|
1514
1514
|
1. Claude Code reads ${l} for project context and expected JSON schema
|