@fugood/bricks-cli 2.24.7 → 2.24.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/README.md +49 -0
- package/lib/153.js +1 -0
- package/lib/236.js +1 -0
- package/lib/703.js +1 -0
- package/lib/737.js +17 -17
- package/lib/779.js +1 -1
- package/lib/886.js +1 -0
- package/lib/890.js +1 -1
- package/lib/index.js +26 -26
- package/package.json +1 -1
- package/lib/300.js +0 -1
- package/lib/425.js +0 -1
- package/lib/465.js +0 -1
package/lib/465.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=465;export const __webpack_esm_ids__=[465];export const __webpack_esm_modules__={8870:(e,t,r)=>{var i=r(65650),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,u=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,u),r=e[u];try{e[u]=void 0;var i=!0}catch(e){}var n=a.call(e);return i&&(t?e[u]=r:delete e[u]),n}},10482:e=>{var t="\\ud800-\\udfff",r="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+o+"]",u="\\d+",c="["+r+"]",l="["+i+"]",s="[^"+t+o+u+r+i+n+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+n+"]",g="(?:"+l+"|"+s+")",y="(?:"+p+"|"+s+")",v="(?:['’](?:d|ll|m|re|s|t|ve))?",m="(?:['’](?:D|LL|M|RE|S|T|VE))?",x="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",h="[\\ufe0e\\ufe0f]?",b=h+x+("(?:\\u200d(?:"+["[^"+t+"]",d,f].join("|")+")"+h+x+")*"),j="(?:"+[c,d,f].join("|")+")"+b,A=RegExp([p+"?"+l+"+"+v+"(?="+[a,p,"$"].join("|")+")",y+"+"+m+"(?="+[a,p+g,"$"].join("|")+")",p+"?"+g+"+"+v,p+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",u,j].join("|"),"g");e.exports=function(e){return e.match(A)||[]}},10750:(e,t,r)=>{var i=r(93640)(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});e.exports=i},15813:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},16465:(e,t,r)=>{r.d(t,{initProject:()=>h}),r.r(t);var i,n,o=r(99436),a=r(16928),u=r(88568),c=r(29790),l=r(10750),s=r(84553),d=r(88055),f=r(79896),p=r(35317),g=e=>{try{return(0,p.execSync)(`which ${e}`,{stdio:"ignore"}),!0}catch{return!1}},y=(e,t,r)=>new Promise((i,n)=>{var o=[e,...t].join(" "),a=(0,p.spawn)(o,[],{cwd:r,stdio:"pipe",shell:!0}),u=[];a.stderr.on("data",e=>u.push(e)),a.on("close",e=>{if(0===e)i();else{var t=Buffer.concat(u).toString().trim();n(new Error(t||`Command failed with code ${e}`))}}),a.on("error",n)}),v=(i=o(function*(e,t){try{var i=(yield Promise.resolve().then(r.bind(r,79491))).format;return(yield i(t,e,{trailingComma:"all",tabWidth:2,semi:!1,singleQuote:!0,printWidth:100})).code}catch{}return e}),function(e,t){return i.apply(this,arguments)}),m=(n=o(function*(e,t,r){var i=r.client,n=r.output,u=r.outputAsTarget;if(!i)throw new Error("client is required");if(!n)throw new Error("output directory is required");var c=(e=>{for(var t=a.resolve(e);;){if(f.existsSync(a.join(t,"application.json"))||f.existsSync(a.join(t,"module.json")))return t;var r=a.dirname(t);if(r===t)return null;t=r}})(u?a.dirname(a.resolve(n)):n);if(c)throw new Error(`Cannot initialize a new BRICKS project inside an existing project (${c}). Choose a directory outside the project.`);var s="application"===e,d=s?"applicationProject":"moduleProject",p=s?i.queries.applicationProject:i.queries.moduleProject,m=(yield i.query(p,{id:t,buildApplicationOnly:!1,setupGitHubActions:!1!==r.githubActions,setupAgents:!1!==r.agents,setupClaudeCode:!1!==r.claude,setupGeminiCLI:!0===r.gemini}))[d];if(!m?.files)throw new Error(`${e} project not found`);var x="bricks-ctor",h=m.files.find(e=>"application.json"===e.name);if(h)try{var b=JSON.parse(h.input);x=l(b.name||"bricks-ctor")}catch{}var j=u?a.resolve(n):a.resolve(n,x);if(f.existsSync(j))throw new Error(`Directory already exists: ${j}`);f.mkdirSync(j,{recursive:!0});var A,w=yield Promise.all(m.files.map((A=o(function*(e){var t=a.join(j,e.name),r=e.input;return e.formatable&&(r=yield v(r,t)),{...e,filePath:t,content:r}}),function(e){return A.apply(this,arguments)})));w.forEach(e=>{var t=a.dirname(e.filePath);f.existsSync(t)||f.mkdirSync(t,{recursive:!0}),f.writeFileSync(e.filePath,e.content)});var S=g("bun"),E=g("git"),O=!1,k=!1;if(!1!==r.install&&S)try{yield y("bun",["install"],j),O=!0}catch{}if(!1!==r.git&&E)try{yield y("git",["init"],j),yield y("git",["add","."],j),yield y("git",["-c 'user.name=BRICKS CLI'","-c 'user.email=cli@bricks.tools'","commit","-m 'chore: initialize commit'"],j),k=!0}catch{}return{success:!0,path:j,files:m.files.length,bunInstalled:O,gitInitialized:k}}),function(e,t,r){return n.apply(this,arguments)}),x=function(){var e=o(function*(e,t){console.log(u.Ay.bold.cyan(`\nInitialize BRICKS Project: ${t}\n`));var r=yield(0,s.kv)({message:"Select files to include:",choices:[{name:"GitHub Actions workflow (.github/workflows/ci.yml)",value:"githubActions",checked:!1!==e.githubActions},{name:"AGENTS.md",value:"agents",checked:!1!==e.agents},{name:"CLAUDE.md",value:"claude",checked:!1!==e.claude},{name:"GEMINI.md",value:"gemini",checked:!0===e.gemini}]}),i=yield(0,s.kv)({message:"Select post-generation steps:",choices:[{name:"Run bun install",value:"install",checked:!1!==e.install},{name:"Initialize git repository",value:"git",checked:!1!==e.git}]}),n=e.output?a.resolve(e.output):a.join(process.cwd(),t),o=yield(0,s.hF)({message:"Output directory:",default:n});return{githubActions:r.includes("githubActions"),agents:r.includes("agents"),claude:r.includes("claude"),gemini:r.includes("gemini"),install:i.includes("install"),git:i.includes("git"),output:o,outputAsTarget:!0}});return function(t,r){return e.apply(this,arguments)}}(),h=function(){var e=o(function*(e,t,r){var i=(0,d.o)(),n=r.json,o=r.yes||n,s="application"===e,f=s?"applicationProject":"moduleProject",p=s?i.queries.applicationProject:i.queries.moduleProject,g=n?null:(0,c.default)(`Fetching ${e} info...`).start(),y="bricks-ctor";try{var v=(yield i.query(p,{id:t,buildApplicationOnly:!0}))[f];if(v?.files){var h=v.files.find(e=>"application.json"===e.name);if(h)try{var b=JSON.parse(h.input);y=l(b.name||"bricks-ctor")}catch{}}g&&g.stop()}catch{g&&g.stop()}var j={...r};if(!o)try{var A=yield x(r,y);j={...r,...A}}catch{console.log(u.Ay.yellow("\nCancelled")),process.exit(0)}g=n?null:(0,c.default)(`Fetching ${e} project...`).start();var w=Boolean(j.output);try{var S=yield m(e,t,{client:i,output:w?j.output:process.cwd(),outputAsTarget:w||!0===j.outputAsTarget,install:j.install,git:j.git,githubActions:j.githubActions,agents:j.agents,claude:j.claude,gemini:j.gemini});g&&g.succeed(`Project created: ${u.Ay.green(S.path)} (${S.files} files)`),n?console.log(JSON.stringify(S)):(console.log(""),console.log(u.Ay.bold.green("Project initialized successfully!")),console.log(""),console.log(u.Ay.bold("Next steps:")),console.log(u.Ay.gray(` cd ${a.basename(S.path)}`)),S.bunInstalled||console.log(u.Ay.gray(" bun install")),console.log(u.Ay.gray(" bun preview")),console.log(""),console.log(u.Ay.gray(`For more information, see ${a.basename(S.path)}/README.md`)))}catch(t){n?console.error(JSON.stringify({error:t.message})):g?g.fail(`Failed to initialize ${e} project: ${t.message}`):console.error(u.Ay.red(`Failed to initialize ${e} project: ${t.message}`)),process.exit(1)}});return function(t,r,i){return e.apply(this,arguments)}}()},29005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},39546:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},39850:(e,t,r)=>{var i=r(39546),n=r(15813),o=r(95243),a=r(10482);e.exports=function(e,t,r){return e=o(e),void 0===(t=r?void 0:t)?n(e)?a(e):i(e):e.match(t)||[]}},44187:e=>{e.exports=function(e,t,r,i){var n=-1,o=null==e?0:e.length;for(i&&o&&(r=e[++n]);++n<o;)r=t(r,e[n],n,e);return r}},45881:(e,t,r)=>{var i=r(69968),n=r(95243),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=n(e))&&e.replace(o,i).replace(a,"")}},51035:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},51187:(e,t,r)=>{var i=r(87379),n=r(80547);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==i(e)}},52291:(e,t,r)=>{var i=r(65650),n=r(65111),o=r(53142),a=r(51187),u=i?i.prototype:void 0,c=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return n(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},53142:e=>{var t=Array.isArray;e.exports=t},65111:e=>{e.exports=function(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}},65650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",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=i},74967:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},78942:(e,t,r)=>{var i=r(74967),n="object"==typeof self&&self&&self.Object===Object&&self,o=i||n||Function("return this")();e.exports=o},80547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},87379:(e,t,r)=>{var i=r(65650),n=r(8870),o=r(29005),a=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?n(e):o(e)}},93640:(e,t,r)=>{var i=r(44187),n=r(45881),o=r(39850),a=RegExp("['’]","g");e.exports=function(e){return function(t){return i(o(n(t).replace(a,"")),e,"")}}},95243:(e,t,r)=>{var i=r(52291);e.exports=function(e){return null==e?"":i(e)}}};
|