@fugood/bricks-cli 2.25.0-beta.64 → 2.25.0-beta.66
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/1010.js +1 -1
- package/lib/1708.js +7 -7
- package/lib/2486.js +1 -1
- package/lib/3223.js +3 -3
- package/lib/563.js +4 -4
- package/lib/6194.js +1 -1
- package/lib/6818.js +1 -1
- package/lib/7511.js +1 -1
- package/lib/8117.js +2 -2
- package/lib/9590.js +7 -0
- package/lib/index.js +3 -3
- package/lib/simulator-main.mjs +5 -3
- package/package.json +5 -5
- package/lib/915.js +0 -7
package/lib/2486.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __rspack_esm_id=2486;export const __rspack_esm_ids=[2486];export const __webpack_modules__={421(e,r,a){a.r(r),a.d(r,{buildDoctorReport:()=>k,renderDoctorReport:()=>v});var o,i,t=a(99436),s=a(85382),n=a(8479),c=a(7586),p=a(47988),l=(o=t(function*(){try{return yield Promise.all([a.e(9866),a.e(6645),a.e(4479),a.e(7648),a.e(853),a.e(1010),a.e(8117)]).then(a.bind(a,98372)),{available:!0}}catch(e){return{available:!1,error:e.message}}}),function(){return o.apply(this,arguments)}),u=(e,r,a)=>({severity:e,code:r,message:a}),k=(i=t(function*({version:e="2.25.0-beta.
|
|
1
|
+
export const __rspack_esm_id=2486;export const __rspack_esm_ids=[2486];export const __webpack_modules__={421(e,r,a){a.r(r),a.d(r,{buildDoctorReport:()=>k,renderDoctorReport:()=>v});var o,i,t=a(99436),s=a(85382),n=a(8479),c=a(7586),p=a(47988),l=(o=t(function*(){try{return yield Promise.all([a.e(9866),a.e(6645),a.e(4479),a.e(7648),a.e(853),a.e(1010),a.e(8117)]).then(a.bind(a,98372)),{available:!0}}catch(e){return{available:!1,error:e.message}}}),function(){return o.apply(this,arguments)}),u=(e,r,a)=>({severity:e,code:r,message:a}),k=(i=t(function*({version:e="2.25.0-beta.66",mcpCheck:r=l}={}){var a=(0,p.getCurrentProfile)(),o=(0,p.getCurrentProfileSource)(),i=(0,p.getTokenInfo)(a),t=(0,p.getBaseUrl)(),k=(0,p.getActivityLogBaseUrl)(),h=[],v={ok:!1,timestamp:new Date().toISOString(),cli:{name:"bricks",version:e},profile:{name:a,source:o},config:{path:p.CONFIG_PATH,baseUrl:t,activityLogBaseUrl:k},auth:{available:!!i?.token,source:i?.token?"config":"missing",workspaceId:i?.workspaceId||null,workspaceName:i?.workspaceName||null,createdAt:i?.createdAt||null,tokenPreview:(0,c.$l)(i?.token)},connectivity:{workspace:{ok:!1,skipped:!i?.token,error:null}},capabilities:{zeroArgMode:(0,n.isInteractiveTerminal)()?"interactive":"help",mcp:{available:!1,error:null}},issues:h};if(i?.token)try{var d=yield(0,s.createClient)(t,i.token).workspace();v.connectivity.workspace={ok:!0,skipped:!1,error:null,id:d?._id||i.workspaceId||null,name:d?.name||i.workspaceName||null},v.auth.workspaceId=d?._id||v.auth.workspaceId,v.auth.workspaceName=d?.name||v.auth.workspaceName}catch(e){v.connectivity.workspace={ok:!1,skipped:!1,error:e.message},h.push(u("error","workspace_unreachable",`Workspace query failed for ${t}: ${e.message}`))}else h.push(u("warning","auth_missing","No saved token for the current profile."));var m=yield r();return v.capabilities.mcp={available:m.available,error:m.error||null},m.available||h.push(u("warning","mcp_unavailable",`MCP stdio server is unavailable: ${m.error||"Unknown error"}`)),v.ok=0===h.length,v}),function(){return i.apply(this,arguments)}),h=(e,r,a)=>`${e.padEnd(14)} ${r}${a?` ${a}`:""}`,v=e=>{var r=[];if(r.push("BRICKS CLI Doctor"),r.push("─".repeat(60)),r.push(h("CLI","OK",`bricks v${e.cli.version}`)),r.push(h("Profile","OK",`${e.profile.name} (${e.profile.source})`)),r.push(h("BRICKS API","OK",e.config.baseUrl)),r.push(h("Activity Log","OK",e.config.activityLogBaseUrl)),e.auth.available){var a=e.auth.workspaceName||e.auth.workspaceId||"Unknown workspace";r.push(h("Auth","OK",`${a} (${e.auth.source}, ${e.auth.tokenPreview})`))}else r.push(h("Auth","WARN","No saved token for the current profile"));if(e.connectivity.workspace.skipped)r.push(h("Workspace","WARN","Skipped because no token is available"));else if(e.connectivity.workspace.ok){var o=e.connectivity.workspace.name||e.connectivity.workspace.id||"Unknown workspace";r.push(h("Workspace","OK",o))}else r.push(h("Workspace","FAIL",e.connectivity.workspace.error));return e.capabilities.mcp.available?r.push(h("MCP","OK","STDIO server import is available")):r.push(h("MCP","WARN",e.capabilities.mcp.error)),r.push(h("Zero-arg mode",((e,r=!1)=>e?"OK":r?"WARN":"FAIL")("interactive"===e.capabilities.zeroArgMode,"help"===e.capabilities.zeroArgMode),"interactive"===e.capabilities.zeroArgMode?"Starts Ink interactive mode on TTY":"Shows help outside TTY contexts")),e.issues.length>0&&(r.push("─".repeat(60)),r.push("Issues"),e.issues.forEach(e=>{r.push(`- [${e.severity}] ${e.message}`)})),r.join("\n")}}};
|
package/lib/3223.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id=3223;export const __rspack_esm_ids=[3223];export const __webpack_modules__={63322(e,r,o){o.r(r),o.d(r,{BUILTIN_ISSUE_CODES:()=>l,buildConfigDoctorReport:()=>g,getDoctorExitCode:()=>m,loadConfigForDoctor:()=>h,parseCodesOption:()=>
|
|
2
|
-
Valid codes: ${n.join(", ")}`);var a=e=>(!o||o.includes(e))&&(!t||!t.includes(e)),p=[],
|
|
1
|
+
export const __rspack_esm_id=3223;export const __rspack_esm_ids=[3223];export const __webpack_modules__={63322(e,r,o){o.r(r),o.d(r,{BUILTIN_ISSUE_CODES:()=>l,buildConfigDoctorReport:()=>g,getDoctorExitCode:()=>m,loadConfigForDoctor:()=>h,parseCodesOption:()=>u,renderConfigDoctorReport:()=>y,runConfigDoctor:()=>$});var t,i,n,s=o(99436),a=o(79896),c=o(38890),p=o(56493),l=["schema-error","ref-error","calc-error","expression-error","action-ref-error","deprecated-feature"],f={error:0,warning:1,info:2},u=e=>"string"==typeof e&&e?e.split(",").map(e=>e.trim()).filter(Boolean):null,d=e=>{if(!e)throw Error("The fetched record has no config");return"string"==typeof e?JSON.parse(e):e},h=(t=s(function*(e,r,{composed:o=!1}={}){if(a.existsSync(r))return{config:JSON.parse(a.readFileSync(r,"utf-8")),target:{type:e,source:"file",path:r}};var t=(0,p.requireAuth)();if("app"===e){var i=yield t.application({id:r,composed:o});if(!i)throw Error(`Application not found: ${r}`);return{config:d(i.config),target:{type:e,source:"remote",id:r,composed:o}}}var n=yield t.module({id:r});if(!n)throw Error(`Module not found: ${r}`);return{config:d(n.config),target:{type:e,source:"remote",id:r}}}),function(e,r){return t.apply(this,arguments)}),g=(i=s(function*(e,{type:r="app",only:o=null,ignore:t=null,checkAutomation:i=!1}={}){var n=[...l,...c.lintRuleCodes],s=[...o||[],...t||[]].filter(e=>!n.includes(e));if(s.length>0)throw Error(`Unknown rule code(s): ${s.join(", ")}
|
|
2
|
+
Valid codes: ${n.join(", ")}`);var a=e=>(!o||o.includes(e))&&(!t||!t.includes(e)),p=[],u=(0,c.checkConfig)(e,{checkCalc:!0,checkExpressions:!0,checkActionRefs:!0,checkAutomation:i}),d=(e,r,o)=>{a(r)&&(e||[]).forEach(e=>p.push({hint:null,...o(e)}))};d(u.schema,"schema-error",e=>({severity:"error",code:"schema-error",path:e.instancePath||e.dataPath||"/",message:e.message,hint:e.params?.pattern?`pattern: ${e.params.pattern}`:null})),d(u.ref,"ref-error",e=>({severity:"error",code:"ref-error",path:e.field,message:e.message})),d(u.calc,"calc-error",e=>({severity:"error",code:"calc-error",path:e.field,message:e.message})),d(u.expression,"expression-error",e=>({severity:"error",code:"expression-error",path:e.field,message:e.message})),d(u.actionRef,"action-ref-error",e=>({severity:"error",code:"action-ref-error",path:e.field,message:e.message})),a("deprecated-feature")&&(0,c.checkConfigDeprecatedFeatures)(e).forEach(e=>p.push({severity:"warning",code:"deprecated-feature",path:e.id,message:e.data,hint:null}));var h=!u.valid;if(!h){var g=o?o.filter(e=>c.lintRuleCodes.includes(e)):null,m=t?t.filter(e=>c.lintRuleCodes.includes(e)):null;(!g||g.length>0)&&p.push(...(0,c.lintConfig)(e,{configType:r,only:g,ignore:m}))}p.sort((e,r)=>f[e.severity]-f[r.severity]);var v={errors:p.filter(e=>"error"===e.severity).length,warnings:p.filter(e=>"warning"===e.severity).length,infos:p.filter(e=>"info"===e.severity).length};return{ok:0===v.errors,valid:u.valid,lintSkipped:h,summary:v,issues:p}}),function(e){return i.apply(this,arguments)}),m=(e,{strict:r=!1}={})=>e.summary.errors>0||r&&e.summary.warnings>0?1:0,v=[["error","Errors"],["warning","Warnings"],["info","Info"]],y=e=>{var r=[];r.push("\nConfig Doctor Report");var o=e.target;if(o){var t="file"===o.source?`${o.type} config: ${o.path}`:`${o.type}: ${o.id}${o.composed?" (composed)":""}`;r.push(t)}if(r.push("─".repeat(60)),0===e.issues.length)return r.push("✓ No issues found"),r.join("\n");v.forEach(([o,t])=>{var i=e.issues.filter(e=>e.severity===o);0!==i.length&&(r.push(`
|
|
3
3
|
${t} (${i.length})
|
|
4
|
-
`),i.forEach((e,o)=>{r.push(` ${o+1}. [${e.code}] ${e.path||""}`),r.push(` ${e.message}`),e.hint&&r.push(` ↳ ${e.hint}`)}))}),e.lintSkipped&&r.push("\n ⚠ Lint rules skipped — fix schema/reference errors first"),r.push("\n"+"─".repeat(60));var i=e.summary,n=i.errors,s=i.warnings,a=i.infos,c=[];return n>0&&c.push(`✗ ${n} error(s)`),s>0&&c.push(`⚠ ${s} warning(s)`),a>0&&c.push(`ℹ ${a} info`),r.push(c.join(" ")),r.join("\n")},$=(n=s(function*(e,r,o){var t=
|
|
4
|
+
`),i.forEach((e,o)=>{r.push(` ${o+1}. [${e.code}] ${e.path||""}`),r.push(` ${e.message}`),e.hint&&r.push(` ↳ ${e.hint}`)}))}),e.lintSkipped&&r.push("\n ⚠ Lint rules skipped — fix schema/reference errors first"),r.push("\n"+"─".repeat(60));var i=e.summary,n=i.errors,s=i.warnings,a=i.infos,c=[];return n>0&&c.push(`✗ ${n} error(s)`),s>0&&c.push(`⚠ ${s} warning(s)`),a>0&&c.push(`ℹ ${a} info`),r.push(c.join(" ")),r.join("\n")},$=(n=s(function*(e,r,o){var t=u(o.only),i=u(o.ignore),n=yield h(e,r,{composed:!!o.composed}),s=n.config,a=n.target,c=yield g(s,{type:e,only:t,ignore:i,checkAutomation:!!o.validateAutomation});return c.target=a,{report:c,exitCode:m(c,{strict:!!o.strict})}}),function(e,r,o){return n.apply(this,arguments)})}};
|
package/lib/563.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id=563;export const __rspack_esm_ids=[563];export const __webpack_modules__={56005(r,
|
|
2
|
-
Valid codes: ${
|
|
3
|
-
${t} (${
|
|
4
|
-
`),
|
|
1
|
+
export const __rspack_esm_id=563;export const __rspack_esm_ids=[563];export const __webpack_modules__={56005(e,r,o){var t=o(95243),i=o(5485);e.exports=function(e){return i(t(e).toLowerCase())}},63322(e,r,o){o.r(r),o.d(r,{BUILTIN_ISSUE_CODES:()=>l,buildConfigDoctorReport:()=>g,getDoctorExitCode:()=>m,loadConfigForDoctor:()=>h,parseCodesOption:()=>f,renderConfigDoctorReport:()=>y,runConfigDoctor:()=>$});var t,i,n,s=o(99436),a=o(79896),c=o(38890),p=o(56493),l=["schema-error","ref-error","calc-error","expression-error","action-ref-error","deprecated-feature"],u={error:0,warning:1,info:2},f=e=>"string"==typeof e&&e?e.split(",").map(e=>e.trim()).filter(Boolean):null,d=e=>{if(!e)throw Error("The fetched record has no config");return"string"==typeof e?JSON.parse(e):e},h=(t=s(function*(e,r,{composed:o=!1}={}){if(a.existsSync(r))return{config:JSON.parse(a.readFileSync(r,"utf-8")),target:{type:e,source:"file",path:r}};var t=(0,p.requireAuth)();if("app"===e){var i=yield t.application({id:r,composed:o});if(!i)throw Error(`Application not found: ${r}`);return{config:d(i.config),target:{type:e,source:"remote",id:r,composed:o}}}var n=yield t.module({id:r});if(!n)throw Error(`Module not found: ${r}`);return{config:d(n.config),target:{type:e,source:"remote",id:r}}}),function(e,r){return t.apply(this,arguments)}),g=(i=s(function*(e,{type:r="app",only:o=null,ignore:t=null,checkAutomation:i=!1}={}){var n=[...l,...c.lintRuleCodes],s=[...o||[],...t||[]].filter(e=>!n.includes(e));if(s.length>0)throw Error(`Unknown rule code(s): ${s.join(", ")}
|
|
2
|
+
Valid codes: ${n.join(", ")}`);var a=e=>(!o||o.includes(e))&&(!t||!t.includes(e)),p=[],f=(0,c.checkConfig)(e,{checkCalc:!0,checkExpressions:!0,checkActionRefs:!0,checkAutomation:i}),d=(e,r,o)=>{a(r)&&(e||[]).forEach(e=>p.push({hint:null,...o(e)}))};d(f.schema,"schema-error",e=>({severity:"error",code:"schema-error",path:e.instancePath||e.dataPath||"/",message:e.message,hint:e.params?.pattern?`pattern: ${e.params.pattern}`:null})),d(f.ref,"ref-error",e=>({severity:"error",code:"ref-error",path:e.field,message:e.message})),d(f.calc,"calc-error",e=>({severity:"error",code:"calc-error",path:e.field,message:e.message})),d(f.expression,"expression-error",e=>({severity:"error",code:"expression-error",path:e.field,message:e.message})),d(f.actionRef,"action-ref-error",e=>({severity:"error",code:"action-ref-error",path:e.field,message:e.message})),a("deprecated-feature")&&(0,c.checkConfigDeprecatedFeatures)(e).forEach(e=>p.push({severity:"warning",code:"deprecated-feature",path:e.id,message:e.data,hint:null}));var h=!f.valid;if(!h){var g=o?o.filter(e=>c.lintRuleCodes.includes(e)):null,m=t?t.filter(e=>c.lintRuleCodes.includes(e)):null;(!g||g.length>0)&&p.push(...(0,c.lintConfig)(e,{configType:r,only:g,ignore:m}))}p.sort((e,r)=>u[e.severity]-u[r.severity]);var v={errors:p.filter(e=>"error"===e.severity).length,warnings:p.filter(e=>"warning"===e.severity).length,infos:p.filter(e=>"info"===e.severity).length};return{ok:0===v.errors,valid:f.valid,lintSkipped:h,summary:v,issues:p}}),function(e){return i.apply(this,arguments)}),m=(e,{strict:r=!1}={})=>e.summary.errors>0||r&&e.summary.warnings>0?1:0,v=[["error","Errors"],["warning","Warnings"],["info","Info"]],y=e=>{var r=[];r.push("\nConfig Doctor Report");var o=e.target;if(o){var t="file"===o.source?`${o.type} config: ${o.path}`:`${o.type}: ${o.id}${o.composed?" (composed)":""}`;r.push(t)}if(r.push("─".repeat(60)),0===e.issues.length)return r.push("✓ No issues found"),r.join("\n");v.forEach(([o,t])=>{var i=e.issues.filter(e=>e.severity===o);0!==i.length&&(r.push(`
|
|
3
|
+
${t} (${i.length})
|
|
4
|
+
`),i.forEach((e,o)=>{r.push(` ${o+1}. [${e.code}] ${e.path||""}`),r.push(` ${e.message}`),e.hint&&r.push(` ↳ ${e.hint}`)}))}),e.lintSkipped&&r.push("\n ⚠ Lint rules skipped — fix schema/reference errors first"),r.push("\n"+"─".repeat(60));var i=e.summary,n=i.errors,s=i.warnings,a=i.infos,c=[];return n>0&&c.push(`✗ ${n} error(s)`),s>0&&c.push(`⚠ ${s} warning(s)`),a>0&&c.push(`ℹ ${a} info`),r.push(c.join(" ")),r.join("\n")},$=(n=s(function*(e,r,o){var t=f(o.only),i=f(o.ignore),n=yield h(e,r,{composed:!!o.composed}),s=n.config,a=n.target,c=yield g(s,{type:e,only:t,ignore:i,checkAutomation:!!o.validateAutomation});return c.target=a,{report:c,exitCode:m(c,{strict:!!o.strict})}}),function(e,r,o){return n.apply(this,arguments)})}};
|