prjct-cli 1.24.0 → 1.24.1
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/CHANGELOG.md +25 -1
- package/dist/bin/prjct-core.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.24.1] - 2026-02-11
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- strip shebangs in build via esbuild plugin (#171)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.24.2] - 2026-02-10
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **Strip shebangs in build via esbuild plugin**: Added a `stripShebangPlugin` to the build script that removes shebangs from source files before bundling. This prevents double-shebang SyntaxErrors when source files (e.g. `#!/usr/bin/env bun`) are compiled with a banner that also injects a shebang. The previous fix (v1.24.1) removed shebangs manually from known files; this fix handles it generically for all future source files.
|
|
15
|
+
|
|
16
|
+
### Test Plan
|
|
17
|
+
|
|
18
|
+
#### For QA
|
|
19
|
+
1. Add `#!/usr/bin/env bun` to any source `.ts` file used as an entry point
|
|
20
|
+
2. Run `node scripts/build.js`
|
|
21
|
+
3. Verify compiled output has exactly one shebang (`#!/usr/bin/env node`) — not two
|
|
22
|
+
4. Run `node dist/cli/linear.mjs --help` — should work without SyntaxError
|
|
23
|
+
|
|
24
|
+
#### For Users
|
|
25
|
+
**What changed:** Build-time fix — no user action needed.
|
|
26
|
+
**Breaking changes:** None
|
|
27
|
+
|
|
3
28
|
## [1.24.0] - 2026-02-11
|
|
4
29
|
|
|
5
30
|
### Features
|
|
@@ -10,7 +35,6 @@
|
|
|
10
35
|
|
|
11
36
|
- remove source shebang causing SyntaxError in compiled linear CLI (#169)
|
|
12
37
|
|
|
13
|
-
|
|
14
38
|
## [1.24.1] - 2026-02-10
|
|
15
39
|
|
|
16
40
|
### Bug Fixes
|
package/dist/bin/prjct-core.mjs
CHANGED
|
@@ -1662,7 +1662,7 @@ if [ -f "$CONFIG" ]; then
|
|
|
1662
1662
|
fi
|
|
1663
1663
|
fi
|
|
1664
1664
|
echo "prjct"
|
|
1665
|
-
`;await z.writeFile(s,S,{mode:493})}await tw(t,s),await ew(e,t)}catch(r){k(r)||_.warn(`Status line warning: ${w(r)}`)}}async function Mj(){try{let r=te.join(bs.homedir(),".claude"),e=te.join(r,"mcp.json");await v(r)||await z.mkdir(r,{recursive:!0});let t={mcpServers:{context7:{command:"npx",args:["-y","@upstash/context7-mcp@latest"]}}};if(await v(e)){let n=await z.readFile(e,"utf-8"),s=JSON.parse(n);if(s.mcpServers?.context7)return;s.mcpServers=s.mcpServers||{},s.mcpServers.context7=t.mcpServers.context7,await z.writeFile(e,JSON.stringify(s,null,2),"utf-8")}else await z.writeFile(e,JSON.stringify(t,null,2),"utf-8")}catch(r){_.warn(`Context7 MCP setup warning: ${w(r)}`)}}async function Ba(r,e){if(!await v(r))return;let t=await z.readdir(r);for(let n of t)if(n.endsWith(".sh")){let s=te.join(r,n),o=te.join(e,n);await z.copyFile(s,o),await z.chmod(o,493)}}async function tw(r,e){try{if(await v(r)){if((await z.lstat(r)).isSymbolicLink()&&await z.readlink(r)===e)return;await z.unlink(r)}await z.symlink(e,r)}catch{try{await v(e)&&(await z.copyFile(e,r),await z.chmod(r,493))}catch(n){k(n)||_.warn(`Symlink fallback warning: ${n.message}`)}}}function Oj(r,e){if(console.log(""),r.cliInstalled?console.log(` ${me.green("\u2713")} ${e.displayName} CLI installed`):console.log(` ${me.green("\u2713")} ${e.displayName} CLI found`),r.commandsAdded+r.commandsUpdated>0){let n=[];r.commandsAdded>0&&n.push(`${r.commandsAdded} new`),r.commandsUpdated>0&&n.push(`${r.commandsUpdated} updated`),console.log(` ${me.green("\u2713")} Commands synced (${n.join(", ")})`)}else console.log(` ${me.green("\u2713")} Commands up to date`);r.configAction==="created"?console.log(` ${me.green("\u2713")} Global config created (${e.contextFile})`):r.configAction==="updated"?console.log(` ${me.green("\u2713")} Global config updated (${e.contextFile})`):r.configAction==="appended"&&console.log(` ${me.green("\u2713")} Global config merged (${e.contextFile})`),console.log("")}var Fj,ow=y(()=>{"use strict";is();zi();F();Yt();he();Vn();it();ze();Rn();gc();l(jj,"installAICLI");l(nw,"run");l(Aj,"installGeminiRouter");l(Ij,"installGeminiGlobalConfig");l(sw,"installAntigravitySkill");l(Dj,"needsAntigravityInstallation");l(Rj,"migrateProjectsCliVersion");l(ew,"ensureStatusLineSettings");l($j,"installStatusLine");l(Mj,"installContext7MCP");l(Ba,"installStatusLineModules");l(tw,"ensureStatusLineSymlink");l(Oj,"showResults");Fj=process.argv[1]?.includes("setup.ts")||process.argv[1]?.includes("setup.js");Fj&&nw().catch(r=>{console.error("Setup error:",r.message),process.exit(1)})});var iw=hw((jq,_j)=>{_j.exports={name:"prjct-cli",version:"1.24.
|
|
1665
|
+
`;await z.writeFile(s,S,{mode:493})}await tw(t,s),await ew(e,t)}catch(r){k(r)||_.warn(`Status line warning: ${w(r)}`)}}async function Mj(){try{let r=te.join(bs.homedir(),".claude"),e=te.join(r,"mcp.json");await v(r)||await z.mkdir(r,{recursive:!0});let t={mcpServers:{context7:{command:"npx",args:["-y","@upstash/context7-mcp@latest"]}}};if(await v(e)){let n=await z.readFile(e,"utf-8"),s=JSON.parse(n);if(s.mcpServers?.context7)return;s.mcpServers=s.mcpServers||{},s.mcpServers.context7=t.mcpServers.context7,await z.writeFile(e,JSON.stringify(s,null,2),"utf-8")}else await z.writeFile(e,JSON.stringify(t,null,2),"utf-8")}catch(r){_.warn(`Context7 MCP setup warning: ${w(r)}`)}}async function Ba(r,e){if(!await v(r))return;let t=await z.readdir(r);for(let n of t)if(n.endsWith(".sh")){let s=te.join(r,n),o=te.join(e,n);await z.copyFile(s,o),await z.chmod(o,493)}}async function tw(r,e){try{if(await v(r)){if((await z.lstat(r)).isSymbolicLink()&&await z.readlink(r)===e)return;await z.unlink(r)}await z.symlink(e,r)}catch{try{await v(e)&&(await z.copyFile(e,r),await z.chmod(r,493))}catch(n){k(n)||_.warn(`Symlink fallback warning: ${n.message}`)}}}function Oj(r,e){if(console.log(""),r.cliInstalled?console.log(` ${me.green("\u2713")} ${e.displayName} CLI installed`):console.log(` ${me.green("\u2713")} ${e.displayName} CLI found`),r.commandsAdded+r.commandsUpdated>0){let n=[];r.commandsAdded>0&&n.push(`${r.commandsAdded} new`),r.commandsUpdated>0&&n.push(`${r.commandsUpdated} updated`),console.log(` ${me.green("\u2713")} Commands synced (${n.join(", ")})`)}else console.log(` ${me.green("\u2713")} Commands up to date`);r.configAction==="created"?console.log(` ${me.green("\u2713")} Global config created (${e.contextFile})`):r.configAction==="updated"?console.log(` ${me.green("\u2713")} Global config updated (${e.contextFile})`):r.configAction==="appended"&&console.log(` ${me.green("\u2713")} Global config merged (${e.contextFile})`),console.log("")}var Fj,ow=y(()=>{"use strict";is();zi();F();Yt();he();Vn();it();ze();Rn();gc();l(jj,"installAICLI");l(nw,"run");l(Aj,"installGeminiRouter");l(Ij,"installGeminiGlobalConfig");l(sw,"installAntigravitySkill");l(Dj,"needsAntigravityInstallation");l(Rj,"migrateProjectsCliVersion");l(ew,"ensureStatusLineSettings");l($j,"installStatusLine");l(Mj,"installContext7MCP");l(Ba,"installStatusLineModules");l(tw,"ensureStatusLineSymlink");l(Oj,"showResults");Fj=process.argv[1]?.includes("setup.ts")||process.argv[1]?.includes("setup.js");Fj&&nw().catch(r=>{console.error("Setup error:",r.message),process.exit(1)})});var iw=hw((jq,_j)=>{_j.exports={name:"prjct-cli",version:"1.24.1",description:"Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",main:"dist/bin/prjct.mjs",bin:{prjct:"bin/prjct"},publishConfig:{access:"public",registry:"https://registry.npmjs.org"},scripts:{build:"node scripts/build.js","build:node":"node scripts/build.js",release:"node scripts/release.js","release:patch":"node scripts/release.js patch","release:minor":"node scripts/release.js minor","release:major":"node scripts/release.js major",postinstall:"node scripts/postinstall.js",prepare:"lefthook install","update-commands":`bun -e "const installer = require('./core/infrastructure/command-installer'); installer.syncCommands().then(r => console.log('Commands updated:', r)).catch(e => console.error('Error:', e.message))"`,"install-global":"./scripts/install.sh",update:"./scripts/update.sh",test:"bun test","test:watch":"bun test --watch","test:coverage":"bun test --coverage",typecheck:"tsc --noEmit -p core/tsconfig.json","typecheck:watch":"tsc --noEmit -p core/tsconfig.json --watch",validate:"bun scripts/validate-commands.js",lint:"biome lint .","lint:fix":"biome lint --write .","lint:meta":"bun core/cli/lint-meta-commentary.ts",format:"biome format --write .","format:check":"biome format .",check:"biome check .","check:fix":"biome check --write ."},keywords:["claude-code","gemini-cli","ai-agents","context-layer","developer-tools","ai-assistant","productivity","mcp","llm","coding-agents"],author:"prjct.app",license:"MIT",dependencies:{"@hono/node-server":"^1.13.7","@linear/sdk":"^29.0.0",chalk:"^4.1.2",chokidar:"^5.0.0","date-fns":"^4.1.0",glob:"^13.0.1",hono:"^4.11.3","jsonc-parser":"^3.3.1",prompts:"^2.4.2",zod:"^3.24.1"},devDependencies:{"@biomejs/biome":"^2.3.13","@types/bun":"latest","@types/chokidar":"^2.1.7","@types/prompts":"^2.4.9",esbuild:"^0.25.0",lefthook:"^2.1.0",typescript:"^5.9.3"},repository:{type:"git",url:"git+https://github.com/jlopezlira/prjct-cli.git"},bugs:{url:"https://github.com/jlopezlira/prjct-cli/issues"},homepage:"https://prjct.app",packageManager:"bun@1.2.23",engines:{node:">=18.0.0",bun:">=1.0.0"},files:["assets/","bin/prjct","dist/","scripts/postinstall.js","scripts/install.sh","LICENSE","README.md","CHANGELOG.md"],prepublishOnly:"node scripts/build.js",trustedDependencies:["chalk","prompts"]}});var Wj={};import aw from"node:os";import Va from"node:path";import Ie from"chalk";async function Nj(){let[r,...e]=process.argv.slice(2);if(["-v","--version","version"].includes(r)){let t=await Promise.resolve().then(()=>yw(iw()));await zj(t.version),process.exit(0)}["-h","--help",void 0].includes(r)&&(Jj(),process.exit(0)),h.start();try{let t=G.getByName(r);if(!t){let d=Uj(r),m=d?`Did you mean 'prjct ${d}'? Run 'prjct --help' for all commands`:"Run 'prjct --help' to see available commands";h.failWithHint(Xn("UNKNOWN_COMMAND",{message:`Unknown command: ${r}`,hint:m})),h.end(),process.exit(1)}if(t.deprecated){let d=t.replacedBy?`Use 'prjct ${t.replacedBy}' instead`:"Run 'prjct --help' to see available commands";h.failWithHint({message:`Command '${r}' is deprecated`,hint:d}),h.end(),process.exit(1)}t.implemented||(h.failWithHint({message:`Command '${r}' is not yet implemented`,hint:"Run 'prjct --help' to see available commands",docs:"https://github.com/jlopezlira/prjct-cli"}),h.end(),process.exit(1));let{parsedArgs:n,options:s}=Gj(t,e),o=Lj(t,n);o&&(h.failWithHint(o),h.end(),process.exit(1));let i=null,a=Date.now();try{i=await R.getProjectId(process.cwd()),i&&(await En.expireIfStale(i),await En.touch(i))}catch{}let c=new Pn,u;if(r==="design"){let d=n.join(" ");u=await c.design(d,s)}else if(r==="analyze")u=await c.analyze(s);else if(r==="cleanup")u=await c.cleanup(s);else if(r==="setup")u=await c.setup(s);else{let d=n.join(" ")||null,p={done:l(()=>c.done(),"done"),next:l(()=>c.next(),"next"),pause:l(g=>c.pause(g||""),"pause"),resume:l(g=>c.resume(g),"resume"),init:l(g=>c.init(g),"init"),bug:l(g=>c.bug(g||""),"bug"),idea:l(g=>c.idea(g||""),"idea"),spec:l(g=>c.spec(g),"spec"),ship:l(g=>c.ship(g),"ship"),dash:l(g=>c.dash(g||"default"),"dash"),stats:l(()=>c.stats(process.cwd(),{json:s.json===!0,export:s.export===!0}),"stats"),status:l(()=>c.status(process.cwd(),{json:s.json===!0}),"status"),help:l(g=>c.help(g||""),"help"),perf:l(g=>c.perf(g||"7"),"perf"),velocity:l(g=>c.velocity(g||"0"),"velocity"),recover:l(()=>c.recover(),"recover"),undo:l(()=>c.undo(),"undo"),redo:l(()=>c.redo(),"redo"),history:l(()=>c.history(),"history"),sync:l(()=>c.sync(process.cwd(),{aiTools:s.agents?String(s.agents).split(","):void 0,preview:s.preview===!0||s["dry-run"]===!0,yes:s.yes===!0,json:s.json===!0,package:s.package?String(s.package):void 0,full:s.full===!0}),"sync"),seal:l(()=>c.seal(process.cwd(),{json:s.json===!0}),"seal"),verify:l(()=>c.verify(process.cwd(),{json:s.json===!0,semantic:s.semantic===!0}),"verify"),start:l(()=>c.start(),"start"),context:l(g=>c.context(g),"context")}[r];if(p)u=await p(d);else throw new Error(`Command '${r}' has no handler`)}if(i){let d=Date.now()-a;try{await En.trackCommand(i,r,d)}catch{}try{await Zn.recordTiming(i,"command_duration",d,{command:r});let m=globalThis.__perfStartNs;if(m){let p=Number(process.hrtime.bigint()-m)/1e6;await Zn.recordTiming(i,"startup_time",p)}await Zn.recordMemory(i,{command:r})}catch{}}u?.message&&console.log(u.message),h.end(),process.exit(u?.success?0:1)}catch(t){console.error("Error:",w(t)),process.env.DEBUG&&console.error(Oo(t)),h.end(),process.exit(1)}}function Lj(r,e){if(!r.params)return null;let t=r.params.match(/<[^>]+>/g);if(!t||t.length===0)return null;if(e.length<t.length){let n=t.map(o=>o.slice(1,-1)).join(", "),s=r.usage.terminal||`prjct ${r.name} ${r.params}`;return Xn("MISSING_PARAM",{message:`Missing required parameter: ${n}`,hint:`Usage: ${s}`})}return null}function Uj(r){let e=G.getAll().map(s=>s.name),t=null,n=1/0;for(let s of e){let o=Hj(r.toLowerCase(),s.toLowerCase());o<n&&(n=o,t=s)}return n<=2?t:null}function Hj(r,e){let t=r.length,n=e.length,s=Array.from({length:t+1},()=>Array(n+1).fill(0));for(let o=0;o<=t;o++)s[o][0]=o;for(let o=0;o<=n;o++)s[0][o]=o;for(let o=1;o<=t;o++)for(let i=1;i<=n;i++)s[o][i]=r[o-1]===e[i-1]?s[o-1][i-1]:1+Math.min(s[o-1][i],s[o][i-1],s[o-1][i-1]);return s[t][n]}function Gj(r,e){let t=[],n={};for(let s=0;s<e.length;s++){let o=e[s];if(o.startsWith("--")){let i=o.slice(2);s+1<e.length&&!e[s+1].startsWith("--")?n[i]=e[++s]:n[i]=!0}else t.push(o)}return{parsedArgs:t,options:n}}async function zj(r){let e=await ln(),t=Va.join(aw.homedir(),".claude","commands","p.md"),n=Va.join(aw.homedir(),".gemini","commands","p.toml"),[s,o,i,a]=await Promise.all([v(t),v(n),v(Va.join(process.cwd(),".cursor","commands","sync.md")),v(Va.join(process.cwd(),".cursor"))]),c=await As();if(console.log(`
|
|
1666
1666
|
${Ie.cyan("p/")} prjct v${r}
|
|
1667
1667
|
${Ie.dim("Context layer for AI coding agents")}
|
|
1668
1668
|
|