@fugood/bricks-cli 2.26.0-beta.3 → 2.26.0-beta.30

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/lib/4456.js CHANGED
@@ -1,3 +1,3 @@
1
- export const __rspack_esm_id=4456;export const __rspack_esm_ids=[4456];export const __webpack_modules__={65650(e,t,r){e.exports=r(78942).Symbol},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}},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}},39546(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},87379(e,t,r){var i=r(65650),n=r(8870),o=r(29005),u=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?n(e):o(e)}},51035(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},52291(e,t,r){var i=r(65650),n=r(65111),o=r(53142),u=r(51187),a=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return n(t,e)+"";if(u(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-a?"-0":r}},93640(e,t,r){var i=r(44187),n=r(45881),o=r(39850),u=RegExp("['’]","g");e.exports=function(e){return function(t){return i(o(n(t).replace(u,"")),e,"")}}},69968(e,t,r){e.exports=r(51035)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",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Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"})},74967(e){e.exports="object"==typeof global&&global&&global.Object===Object&&global},8870(e,t,r){var i=r(65650),n=Object.prototype,o=n.hasOwnProperty,u=n.toString,a=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var i=!0}catch(e){}var n=u.call(e);return i&&(t?e[a]=r:delete e[a]),n}},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)}},29005(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},78942(e,t,r){var i=r(74967),n="object"==typeof self&&self&&self.Object===Object&&self;e.exports=i||n||Function("return this")()},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",u="['’]",a="["+o+"]",l="["+i+"]",c="[^"+t+o+"\\d+"+r+i+n+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",f="["+n+"]",p="(?:"+l+"|"+c+")",g="(?:"+f+"|"+c+")",y="(?:"+u+"(?:d|ll|m|re|s|t|ve))?",x="(?:"+u+"(?:D|LL|M|RE|S|T|VE))?",h="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",m="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+t+"]",s,d].join("|")+")"+m+h+")*",v="(?:"+["["+r+"]",s,d].join("|")+")"+(m+h+b),j=RegExp([f+"?"+l+"+"+y+"(?="+[a,f,"$"].join("|")+")",g+"+"+x+"(?="+[a,f+p,"$"].join("|")+")",f+"?"+p+"+"+y,f+"+"+x,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",v].join("|"),"g");e.exports=function(e){return e.match(j)||[]}},45881(e,t,r){var i=r(69968),n=r(95243),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=n(e))&&e.replace(o,i).replace(u,"")}},53142(e){e.exports=Array.isArray},80547(e){e.exports=function(e){return null!=e&&"object"==typeof e}},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)}},10750(e,t,r){e.exports=r(93640)(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})},95243(e,t,r){var i=r(52291);e.exports=function(e){return null==e?"":i(e)}},39850(e,t,r){var i=r(39546),n=r(15813),o=r(95243),u=r(10482);e.exports=function(e,t,r){return(e=o(e),void 0===(t=r?void 0:t))?n(e)?u(e):i(e):e.match(t)||[]}},58891(e,t,r){r.r(t),r.d(t,{initProject:()=>p});var i,n,o=r(99436),u=r(16928),a=r(73284),l=r(30155),c=r(27521),s=r(56493),d=r(77768),f=(i=o(function*(e,t){console.log(a.default.bold.cyan(`
1
+ export const __rspack_esm_id=4456;export const __rspack_esm_ids=[4456];export const __webpack_modules__={44187(e){e.exports=function(e,t,i,n){var r=-1,o=null==e?0:e.length;for(n&&o&&(i=e[++r]);++r<o;)i=t(i,e[r],r,e);return i}},39546(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},51035(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},93640(e,t,i){var n=i(44187),r=i(45881),o=i(39850),u=RegExp("['’]","g");e.exports=function(e){return function(t){return n(o(r(t).replace(u,"")),e,"")}}},69968(e,t,i){e.exports=i(51035)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"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"})},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)}},10482(e){var t="\\ud800-\\udfff",i="\\u2700-\\u27bf",n="a-z\\xdf-\\xf6\\xf8-\\xff",r="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",u="['’]",a="["+o+"]",l="["+n+"]",c="[^"+t+o+"\\d+"+i+n+r+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",f="["+r+"]",p="(?:"+l+"|"+c+")",g="(?:"+f+"|"+c+")",h="(?:"+u+"(?:d|ll|m|re|s|t|ve))?",m="(?:"+u+"(?:D|LL|M|RE|S|T|VE))?",x="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",y="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+t+"]",s,d].join("|")+")"+y+x+")*",v="(?:"+["["+i+"]",s,d].join("|")+")"+(y+x+b),A=RegExp([f+"?"+l+"+"+h+"(?="+[a,f,"$"].join("|")+")",g+"+"+m+"(?="+[a,f+p,"$"].join("|")+")",f+"?"+p+"+"+h,f+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",v].join("|"),"g");e.exports=function(e){return e.match(A)||[]}},45881(e,t,i){var n=i(69968),r=i(95243),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=r(e))&&e.replace(o,n).replace(u,"")}},10750(e,t,i){e.exports=i(93640)(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()})},39850(e,t,i){var n=i(39546),r=i(15813),o=i(95243),u=i(10482);e.exports=function(e,t,i){return(e=o(e),void 0===(t=i?void 0:t))?r(e)?u(e):n(e):e.match(t)||[]}},58891(e,t,i){i.r(t),i.d(t,{initProject:()=>p});var n,r,o=i(99436),u=i(16928),a=i(73284),l=i(14636),c=i(27521),s=i(56493),d=i(77768),f=(n=o(function*(e,t){console.log(a.default.bold.cyan(`
2
2
  Initialize BRICKS Project: ${t}
3
- `));var r=yield(0,c.checkbox)({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,c.checkbox)({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?u.resolve(e.output):u.join(process.cwd(),t),o=yield(0,c.input)({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}}),function(e,t){return i.apply(this,arguments)}),p=(n=o(function*(e,t,r){var i=(0,s.requireAuth)(),n=r.json,o=r.yes||n,c="application"===e?i.applicationProject:i.moduleProject,p=n?null:(0,l.default)(`Fetching ${e} info...`).start(),g="bricks-ctor";try{var y=yield c({id:t,buildApplicationOnly:!0});y?.files&&(g=(0,d.kU)(y.files)),p&&p.stop()}catch{p&&p.stop()}var x={...r};if(!o)try{var h=yield f(r,g);x={...r,...h}}catch{console.log(a.default.yellow("\nCancelled")),process.exit(0)}p=n?null:(0,l.default)(`Fetching ${e} project...`).start();var m=!!x.output;try{var b=yield(0,d.BZ)(e,t,{client:i,output:m?x.output:process.cwd(),outputAsTarget:m||!0===x.outputAsTarget,install:x.install,git:x.git,githubActions:x.githubActions,agents:x.agents,claude:x.claude,gemini:x.gemini});p&&p.succeed(`Project created: ${a.default.green(b.path)} (${b.files} files)`),n?console.log(JSON.stringify(b)):(console.log(""),console.log(a.default.bold.green("Project initialized successfully!")),console.log(""),console.log(a.default.bold("Next steps:")),console.log(a.default.gray(` cd ${u.basename(b.path)}`)),b.bunInstalled||console.log(a.default.gray(" bun install")),console.log(a.default.gray(" bun invoke-simulator")),console.log(""),console.log(a.default.gray(`For more information, see ${u.basename(b.path)}/README.md`)))}catch(t){n?console.error(JSON.stringify({error:t.message})):p?p.fail(`Failed to initialize ${e} project: ${t.message}`):console.error(a.default.red(`Failed to initialize ${e} project: ${t.message}`)),process.exit(1)}}),function(e,t,r){return n.apply(this,arguments)})},77768(e,t,r){r.d(t,{BZ:()=>b,KN:()=>x,kU:()=>y,o0:()=>m,oz:()=>h});var i,n,o,u,a=r(99436),l=r(16928),c=r(79896),s=r(35317),d=r(10750),f=e=>{try{return(0,s.execSync)(`which ${e}`,{stdio:"ignore"}),!0}catch{return!1}},p=(e,t,r)=>new Promise((i,n)=>{var o=[e,...t].join(" "),u=(0,s.spawn)(o,[],{cwd:r,stdio:"pipe",shell:!0}),a=[];u.stderr.on("data",e=>a.push(e)),u.on("close",e=>{0===e?i():n(Error(Buffer.concat(a).toString().trim()||`Command failed with code ${e}`))}),u.on("error",n)}),g=(i=a(function*(e,t){try{var i=(yield r.e(7456).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)}),y=(e=[])=>{var t=e.find(e=>"application.json"===e.name);if(!t)return"bricks-ctor";try{var r=JSON.parse(t.input);return d(r.name||"bricks-ctor")}catch{return"bricks-ctor"}},x=(n=a(function*(e,t){var r;return Promise.all(e.map((r=a(function*(e){var r=l.join(t,e.name),i=e.input;return e.formatable&&(i=yield g(i,r)),{...e,filePath:r,content:i}}),function(e){return r.apply(this,arguments)})))}),function(e,t){return n.apply(this,arguments)}),h=e=>{e.forEach(e=>{c.mkdirSync(l.dirname(e.filePath),{recursive:!0}),c.writeFileSync(e.filePath,e.content)})},m=(o=a(function*(e,t={}){var r="function"==typeof t.onStatus?t.onStatus:()=>{},i=!1,n=!1;if(!1!==t.install&&f("bun")){r("Installing dependencies (bun install)...");try{yield p("bun",["install"],e),i=!0}catch{}}if(!1!==t.git&&f("git")){r("Initializing git repository...");try{yield p("git",["init"],e),yield p("git",["add","."],e),yield p("git",["-c 'user.name=BRICKS CLI'","-c 'user.email=cli@bricks.tools'","commit","-m 'chore: initialize commit'"],e),n=!0}catch{}}return{bunInstalled:i,gitInitialized:n}}),function(e){return o.apply(this,arguments)}),b=(u=a(function*(e,t,r){var i=r.client,n=r.output,o=r.outputAsTarget;if(!i)throw Error("client is required");if(!n)throw Error("output directory is required");var u=(e=>{for(var t=l.resolve(e);;){if(c.existsSync(l.join(t,"application.json"))||c.existsSync(l.join(t,"module.json")))return t;var r=l.dirname(t);if(r===t)return null;t=r}})(o?l.dirname(l.resolve(n)):n);if(u)throw Error(`Cannot initialize a new BRICKS project inside an existing project (${u}). Choose a directory outside the project.`);var a="application"===e?i.applicationProject:i.moduleProject,s=yield a({id:t,buildApplicationOnly:!1,setupGitHubActions:!1!==r.githubActions,setupAgents:!1!==r.agents,setupClaudeCode:!1!==r.claude,setupGeminiCLI:!0===r.gemini});if(!s?.files)throw Error(`${e} project not found`);var d=y(s.files),f=o?l.resolve(n):l.resolve(n,d);if(c.existsSync(f))throw Error(`Directory already exists: ${f}`);c.mkdirSync(f,{recursive:!0}),h((yield x(s.files,f)));var p=yield m(f,r),g=p.bunInstalled,b=p.gitInitialized;return{success:!0,path:f,files:s.files.length,bunInstalled:g,gitInitialized:b}}),function(e,t,r){return u.apply(this,arguments)})}};
3
+ `));var i=yield(0,c.checkbox)({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}]}),n=yield(0,c.checkbox)({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}]}),r=e.output?u.resolve(e.output):u.join(process.cwd(),t),o=yield(0,c.input)({message:"Output directory:",default:r});return{githubActions:i.includes("githubActions"),agents:i.includes("agents"),claude:i.includes("claude"),gemini:i.includes("gemini"),install:n.includes("install"),git:n.includes("git"),output:o,outputAsTarget:!0}}),function(e,t){return n.apply(this,arguments)}),p=(r=o(function*(e,t,i){var n=(0,s.requireAuth)(),r=i.json,o=i.yes||r,c="application"===e?n.applicationProject:n.moduleProject,p=r?null:(0,l.default)(`Fetching ${e} info...`).start(),g="bricks-ctor";try{var h=yield c({id:t,buildApplicationOnly:!0});h?.files&&(g=(0,d.kU)(h.files)),p&&p.stop()}catch{p&&p.stop()}var m={...i};if(!o)try{var x=yield f(i,g);m={...i,...x}}catch{console.log(a.default.yellow("\nCancelled")),process.exit(0)}p=r?null:(0,l.default)(`Fetching ${e} project...`).start();var y=!!m.output;try{var b=yield(0,d.BZ)(e,t,{client:n,output:y?m.output:process.cwd(),outputAsTarget:y||!0===m.outputAsTarget,install:m.install,git:m.git,githubActions:m.githubActions,agents:m.agents,claude:m.claude,gemini:m.gemini});p&&p.succeed(`Project created: ${a.default.green(b.path)} (${b.files} files)`),r?console.log(JSON.stringify(b)):(console.log(""),console.log(a.default.bold.green("Project initialized successfully!")),console.log(""),console.log(a.default.bold("Next steps:")),console.log(a.default.gray(` cd ${u.basename(b.path)}`)),b.bunInstalled||console.log(a.default.gray(" bun install")),console.log(a.default.gray(" bun invoke-simulator")),console.log(""),console.log(a.default.gray(`For more information, see ${u.basename(b.path)}/README.md`)))}catch(t){r?console.error(JSON.stringify({error:t.message})):p?p.fail(`Failed to initialize ${e} project: ${t.message}`):console.error(a.default.red(`Failed to initialize ${e} project: ${t.message}`)),process.exit(1)}}),function(e,t,i){return r.apply(this,arguments)})},77768(e,t,i){i.d(t,{BZ:()=>b,KN:()=>m,kU:()=>h,o0:()=>y,oz:()=>x});var n,r,o,u,a=i(99436),l=i(16928),c=i(79896),s=i(35317),d=i(10750),f=e=>{try{return(0,s.execSync)(`which ${e}`,{stdio:"ignore"}),!0}catch{return!1}},p=(e,t,i)=>new Promise((n,r)=>{var o=[e,...t].join(" "),u=(0,s.spawn)(o,[],{cwd:i,stdio:["pipe","ignore","pipe"],shell:!0}),a=[];u.stderr.on("data",e=>a.push(e)),u.on("close",e=>{0===e?n():r(Error(Buffer.concat(a).toString().trim()||`Command failed with code ${e}`))}),u.on("error",r)}),g=(n=a(function*(e,t){try{var n=(yield i.e(7456).then(i.bind(i,79491))).format;return(yield n(t,e,{trailingComma:"all",tabWidth:2,semi:!1,singleQuote:!0,printWidth:100})).code}catch{}return e}),function(e,t){return n.apply(this,arguments)}),h=(e=[])=>{var t=e.find(e=>"application.json"===e.name);if(!t)return"bricks-ctor";try{var i=JSON.parse(t.input);return d(i.name||"bricks-ctor")}catch{return"bricks-ctor"}},m=(r=a(function*(e,t){var i;return Promise.all(e.map((i=a(function*(e){var i=l.join(t,e.name),n=e.input;return e.formatable&&(n=yield g(n,i)),{...e,filePath:i,content:n}}),function(e){return i.apply(this,arguments)})))}),function(e,t){return r.apply(this,arguments)}),x=e=>{e.forEach(e=>{c.mkdirSync(l.dirname(e.filePath),{recursive:!0}),c.writeFileSync(e.filePath,e.content)})},y=(o=a(function*(e,t={}){var i="function"==typeof t.onStatus?t.onStatus:()=>{},n=!1,r=!1;if(!1!==t.install&&f("bun")){i("Installing dependencies (bun install)...");try{yield p("bun",["install"],e),n=!0}catch{}}if(!1!==t.git&&f("git")){i("Initializing git repository...");try{yield p("git",["init"],e),yield p("git",["add","."],e),yield p("git",["-c 'user.name=BRICKS CLI'","-c 'user.email=cli@bricks.tools'","commit","-m 'chore: initialize commit'"],e),r=!0}catch{}}return{bunInstalled:n,gitInitialized:r}}),function(e){return o.apply(this,arguments)}),b=(u=a(function*(e,t,i){var n=i.client,r=i.output,o=i.outputAsTarget;if(!n)throw Error("client is required");if(!r)throw Error("output directory is required");var u=(e=>{for(var t=l.resolve(e);;){if(c.existsSync(l.join(t,"application.json"))||c.existsSync(l.join(t,"module.json")))return t;var i=l.dirname(t);if(i===t)return null;t=i}})(o?l.dirname(l.resolve(r)):r);if(u)throw Error(`Cannot initialize a new BRICKS project inside an existing project (${u}). Choose a directory outside the project.`);var a="application"===e?n.applicationProject:n.moduleProject,s=yield a({id:t,buildApplicationOnly:!1,setupGitHubActions:!1!==i.githubActions,setupAgents:!1!==i.agents,setupClaudeCode:!1!==i.claude,setupGeminiCLI:!0===i.gemini});if(!s?.files)throw Error(`${e} project not found`);var d=h(s.files),f=o?l.resolve(r):l.resolve(r,d);if(c.existsSync(f))throw Error(`Directory already exists: ${f}`);c.mkdirSync(f,{recursive:!0}),x((yield m(s.files,f)));var p=yield y(f,i),g=p.bunInstalled,b=p.gitInitialized;return{success:!0,path:f,files:s.files.length,bunInstalled:g,gitInitialized:b}}),function(e,t,i){return u.apply(this,arguments)})}};
package/lib/4485.js ADDED
@@ -0,0 +1 @@
1
+ export const __rspack_esm_id=4485;export const __rspack_esm_ids=[4485];export const __webpack_modules__={44187(u){u.exports=function(u,f,e,r){var t=-1,n=null==u?0:u.length;for(r&&n&&(e=u[++t]);++t<n;)e=f(e,u[t],t,u);return e}},52837(u){u.exports=function(u){return u.split("")}},39546(u){var f=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;u.exports=function(u){return u.match(f)||[]}},51035(u){u.exports=function(u){return function(f){return null==u?void 0:u[f]}}},28931(u,f,e){var r=e(73501);u.exports=function(u,f,e){var t=u.length;return e=void 0===e?t:e,!f&&e>=t?u:r(u,f,e)}},4326(u,f,e){var r=e(28931),t=e(83417),n=e(82237),o=e(95243);u.exports=function(u){return function(f){var e=t(f=o(f))?n(f):void 0,d=e?e[0]:f.charAt(0),x=e?r(e,1).join(""):f.slice(1);return d[u]()+x}}},93640(u,f,e){var r=e(44187),t=e(45881),n=e(39850),o=RegExp("['’]","g");u.exports=function(u){return function(f){return r(n(t(f).replace(o,"")),u,"")}}},69968(u,f,e){u.exports=e(51035)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",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"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"})},83417(u){var f=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");u.exports=function(u){return f.test(u)}},15813(u){var f=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;u.exports=function(u){return f.test(u)}},82237(u,f,e){var r=e(52837),t=e(83417),n=e(92013);u.exports=function(u){return t(u)?n(u):r(u)}},92013(u){var f="\\ud800-\\udfff",e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",t="[^"+f+"]",n="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",d="(?:"+e+"|"+r+")?",x="[\\ufe0e\\ufe0f]?",a="(?:\\u200d(?:"+[t,n,o].join("|")+")"+x+d+")*",c=RegExp(r+"(?="+r+")|"+("(?:"+[t+e+"?",e,n,o,"["+f+"]"].join("|"))+")"+(x+d+a),"g");u.exports=function(u){return u.match(c)||[]}},10482(u){var f="\\ud800-\\udfff",e="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",t="A-Z\\xc0-\\xd6\\xd8-\\xde",n="\\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",o="['’]",d="["+n+"]",x="["+r+"]",a="[^"+f+n+"\\d+"+e+r+t+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",s="["+t+"]",p="(?:"+x+"|"+a+")",v="(?:"+s+"|"+a+")",l="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",E="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+f+"]",c,i].join("|")+")"+E+g+")*",_="(?:"+["["+e+"]",c,i].join("|")+")"+(E+g+b),h=RegExp([s+"?"+x+"+"+l+"(?="+[d,s,"$"].join("|")+")",v+"+"+A+"(?="+[d,s+p,"$"].join("|")+")",s+"?"+p+"+"+l,s+"+"+A,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",_].join("|"),"g");u.exports=function(u){return u.match(h)||[]}},56005(u,f,e){var r=e(95243),t=e(5485);u.exports=function(u){return t(r(u).toLowerCase())}},45881(u,f,e){var r=e(69968),t=e(95243),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");u.exports=function(u){return(u=t(u))&&u.replace(n,r).replace(o,"")}},5485(u,f,e){u.exports=e(4326)("toUpperCase")},39850(u,f,e){var r=e(39546),t=e(15813),n=e(95243),o=e(10482);u.exports=function(u,f,e){return(u=n(u),void 0===(f=e?void 0:f))?t(u)?o(u):r(u):u.match(f)||[]}}};