@fugood/bricks-cli 2.25.0-beta.6 → 2.25.0-beta.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-cli",
3
- "version": "2.25.0-beta.6",
3
+ "version": "2.25.0-beta.60",
4
4
  "description": "BRICKS CLI - Command-line interface for BRICKS Workspace API",
5
5
  "keywords": [
6
6
  "bricks",
@@ -64,10 +64,11 @@
64
64
  "lodash": "^4.17.4",
65
65
  "mime-types": "^2.1.31",
66
66
  "node-fetch": "^2.6.9",
67
+ "node-machine-id": "^1.1.12",
67
68
  "ora": "^8.1.1"
68
69
  },
69
70
  "engines": {
70
71
  "node": ">=18.0.0"
71
72
  },
72
- "gitHead": "d8a3bbd695e9118cf725b7226866d804bbe56bbe"
73
+ "gitHead": "c0dd2ea071f45382808ad55acfc9837217d683ca"
73
74
  }
package/lib/602.js DELETED
@@ -1,3 +0,0 @@
1
- export const __rspack_esm_id=602;export const __rspack_esm_ids=[602];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,o=Array(i);++r<i;)o[r]=t(e[r],r,e);return o}},44187(e){e.exports=function(e,t,r,i){var o=-1,n=null==e?0:e.length;for(i&&n&&(r=e[++o]);++o<n;)r=t(r,e[o],o,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),o=r(8870),n=r(29005),c=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?o(e):n(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),o=r(65111),n=r(53142),c=r(51187),u=1/0,a=i?i.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(n(t))return o(t,e)+"";if(c(t))return l?l.call(t):"";var r=t+"";return"0"==r&&1/t==-u?"-0":r}},93640(e,t,r){var i=r(44187),o=r(45881),n=r(39850),c=RegExp("['’]","g");e.exports=function(e){return function(t){return i(n(o(t).replace(c,"")),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",Ò:"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"})},74967(e){e.exports="object"==typeof global&&global&&global.Object===Object&&global},8870(e,t,r){var i=r(65650),o=Object.prototype,n=o.hasOwnProperty,c=o.toString,u=i?i.toStringTag:void 0;e.exports=function(e){var t=n.call(e,u),r=e[u];try{e[u]=void 0;var i=!0}catch(e){}var o=c.call(e);return i&&(t?e[u]=r:delete e[u]),o}},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),o="object"==typeof self&&self&&self.Object===Object&&self;e.exports=i||o||Function("return this")()},10482(e){var t="\\ud800-\\udfff",r="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",o="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",c="['’]",u="["+n+"]",a="["+i+"]",l="[^"+t+n+"\\d+"+r+i+o+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",f="["+o+"]",p="(?:"+a+"|"+l+")",g="(?:"+f+"|"+l+")",y="(?:"+c+"(?:d|ll|m|re|s|t|ve))?",x="(?:"+c+"(?:D|LL|M|RE|S|T|VE))?",m="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",h="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+t+"]",s,d].join("|")+")"+h+m+")*",v="(?:"+["["+r+"]",s,d].join("|")+")"+(h+m+b),A=RegExp([f+"?"+a+"+"+y+"(?="+[u,f,"$"].join("|")+")",g+"+"+x+"(?="+[u,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(A)||[]}},45881(e,t,r){var i=r(69968),o=r(95243),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,c=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(n,i).replace(c,"")}},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),o=r(80547);e.exports=function(e){return"symbol"==typeof e||o(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),o=r(15813),n=r(95243),c=r(10482);e.exports=function(e,t,r){return(e=n(e),void 0===(t=r?void 0:t))?o(e)?c(e):i(e):e.match(t)||[]}},6553(e,t,r){r.r(t),r.d(t,{initProject:()=>j});var i,o,n,c,u=r(99436),a=r(16928),l=r(73284),s=r(30155),d=r(10750),f=r(48073),p=r(23258),g=r(85382),y=r(79896),x=r(35317),m=e=>{try{return(0,x.execSync)(`which ${e}`,{stdio:"ignore"}),!0}catch{return!1}},h=(e,t,r)=>new Promise((i,o)=>{var n=[e,...t].join(" "),c=(0,x.spawn)(n,[],{cwd:r,stdio:"pipe",shell:!0}),u=[];c.stderr.on("data",e=>u.push(e)),c.on("close",e=>{0===e?i():o(Error(Buffer.concat(u).toString().trim()||`Command failed with code ${e}`))}),c.on("error",o)}),b=(i=u(function*(e,t){try{var i=(yield r.e(456).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)}),v=(o=u(function*(e,t,r){var i,o=r.client,n=r.output;if(!o)throw Error("client is required");if(!n)throw Error("output directory is required");var c="application"===e,l=c?o.queries.applicationProject:o.queries.moduleProject,s=(yield o.query(l,{id:t,buildApplicationOnly:!1,setupGitHubActions:!1!==r.githubActions,setupAgents:!1!==r.agents,setupClaudeCode:!1!==r.claude,setupGeminiCLI:!0===r.gemini}))[c?"UNSTABLE_applicationProject":"UNSTABLE_moduleProject"];if(!s?.files)throw Error(`${e} project not found`);var f="bricks-ctor",p=s.files.find(e=>"application.json"===e.name);if(p)try{var g=JSON.parse(p.input);f=d(g.name||"bricks-ctor")}catch{}var x=a.resolve(n,f);if(y.existsSync(x))throw Error(`Directory already exists: ${x}`);y.mkdirSync(x,{recursive:!0}),(yield Promise.all(s.files.map((i=u(function*(e){var t=a.join(x,e.name),r=e.input;return e.formatable&&(r=yield b(r,t)),{...e,filePath:t,content:r}}),function(e){return i.apply(this,arguments)})))).forEach(e=>{var t=a.dirname(e.filePath);y.existsSync(t)||y.mkdirSync(t,{recursive:!0}),y.writeFileSync(e.filePath,e.content)});var v=m("bun"),A=m("git"),j=!1,S=!1;if(!1!==r.install&&v)try{yield h("bun",["install"],x),j=!0}catch{}if(!1!==r.git&&A)try{yield h("git",["init"],x),yield h("git",["add","."],x),yield h("git",["-c 'user.name=BRICKS CLI'","-c 'user.email=cli@bricks.tools'","commit","-m 'chore: initialize commit'"],x),S=!0}catch{}return{success:!0,path:x,files:s.files.length,bunInstalled:j,gitInitialized:S}}),function(e,t,r){return o.apply(this,arguments)}),A=(n=u(function*(e,t){console.log(l.Ay.bold.cyan(`
2
- Initialize BRICKS Project: ${t}
3
- `));var r=yield(0,f.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,f.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}]}),o=yield(0,f.hF)({message:"Output directory:",default:e.output||process.cwd()});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}}),function(e,t){return n.apply(this,arguments)}),j=(c=u(function*(e,t,r){var i,o,n=(i=(0,p.getCurrentProfile)(),(o=(0,p.getToken)(i))||(console.error(l.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,g.createClient)((0,p.getBaseUrl)(),o)),c=r.json,u=r.yes||c,f="application"===e,y=f?n.queries.applicationProject:n.queries.moduleProject,x=c?null:(0,s.default)(`Fetching ${e} info...`).start(),m="bricks-ctor";try{var h=(yield n.query(y,{id:t,buildApplicationOnly:!0}))[f?"UNSTABLE_applicationProject":"UNSTABLE_moduleProject"];if(h?.files){var b=h.files.find(e=>"application.json"===e.name);if(b)try{var j=JSON.parse(b.input);m=d(j.name||"bricks-ctor")}catch{}}x&&x.stop()}catch{x&&x.stop()}var S={...r};if(!u)try{var E=yield A(r,m);S={...r,...E}}catch{console.log(l.Ay.yellow("\nCancelled")),process.exit(0)}x=c?null:(0,s.default)(`Fetching ${e} project...`).start();try{var O=yield v(e,t,{client:n,output:S.output||process.cwd(),install:S.install,git:S.git,githubActions:S.githubActions,agents:S.agents,claude:S.claude,gemini:S.gemini});x&&x.succeed(`Project created: ${l.Ay.green(O.path)} (${O.files} files)`),c?console.log(JSON.stringify(O)):(console.log(""),console.log(l.Ay.bold.green("Project initialized successfully!")),console.log(""),console.log(l.Ay.bold("Next steps:")),console.log(l.Ay.gray(` cd ${a.basename(O.path)}`)),O.bunInstalled||console.log(l.Ay.gray(" bun install")),console.log(l.Ay.gray(" bun preview")),console.log(""),console.log(l.Ay.gray(`For more information, see ${a.basename(O.path)}/README.md`)))}catch(t){c?console.error(JSON.stringify({error:t.message})):x?x.fail(`Failed to initialize ${e} project: ${t.message}`):console.error(l.Ay.red(`Failed to initialize ${e} project: ${t.message}`)),process.exit(1)}}),function(e,t,r){return c.apply(this,arguments)})}};