@fugood/bricks-cli 2.25.0-beta.74 → 2.25.0-beta.76
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 +54 -26
- package/lib/1001.js +1 -0
- package/lib/1708.js +2 -2
- package/lib/1936.js +1 -1
- package/lib/1946.js +1 -0
- package/lib/2486.js +1 -1
- package/lib/{8026.js → 3593.js} +1 -1
- package/lib/4305.js +1 -1
- package/lib/6194.js +1 -1
- package/lib/6818.js +1 -1
- package/lib/7294.js +19 -0
- package/lib/7494.js +18 -0
- package/lib/7511.js +1 -1
- package/lib/8117.js +231 -231
- package/lib/8295.js +109 -0
- package/lib/907.js +14 -12
- package/lib/9215.js +1 -0
- package/lib/9387.js +6 -9
- package/lib/9583.js +3 -6
- package/lib/index.js +166 -98
- package/lib/lib.js +1077 -0
- package/package.json +5 -6
- package/lib/2209.js +0 -112
- package/lib/5785.js +0 -1
- package/lib/6370.js +0 -1
- package/lib/9940.js +0 -19
package/lib/1936.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __rspack_esm_id=1936;export const __rspack_esm_ids=[1936];export const __webpack_modules__={76627(e,a
|
|
1
|
+
export const __rspack_esm_id=1936;export const __rspack_esm_ids=[1936];export const __webpack_modules__={76627(e,r,a){a.r(r),a.d(r,{BANK_DISABLED_MESSAGE:()=>p.GE,DEFAULT_BANK_KEY_NAME:()=>k,clearStoredBankCredentials:()=>f,issueBankCredentials:()=>l,resolveBankCredentials:()=>u});var n,t,i,o=a(99436),s=a(77598),c=a(47988),p=a(31596),k="bricks-cli",d=(e,r,a)=>{var n,t=(0,c.getProfileCredentialSnapshot)(e);if(void 0!==r&&(n=t.fingerprint,n&&r?n.kind!==r.kind||n.workspaceId!==r.workspaceId||n.baseUrl!==r.baseUrl||n.activityLogBaseUrl!==r.activityLogBaseUrl||("oauth"===n.kind?n.oauthSubject!==r.oauthSubject:n.token!==r.token):n!==r))throw Error(`Profile ${e} changed or is no longer logged in. Retry.`);return{fingerprint:void 0===r?t.fingerprint:r,bank:void 0===a?t.bank:a}},l=(n=o(function*(e,{keyName:r,profile:a=(0,c.getCurrentProfile)(),expectedProfile:n,bank:t}={}){var i=d(a,n,t),o=i.fingerprint,l=i.bank;if(!o)throw Error(`Profile ${a} changed or is no longer logged in. Retry.`);var u=yield e.workspace();if(!u?._id||null==o.workspaceId||String(u._id)!==o.workspaceId)throw Error(`Profile ${a} changed or the client targets another workspace. Retry.`);var f=u?.bank;if(!f?.enable_remote_update||!f?.spacename)throw Error(p.GE);var y=new Set((f.keys||[]).map(e=>e.value)),_=`${r||k}-${s.randomUUID()}`,v=yield e.updateWorkspace({newBankKey:{name:_,enableExpired:!1}}),g=(v?.bank?.keys||[]).find(e=>e.name===_&&!y.has(e.value));if(!g)throw Error("Failed to issue a Data Bank space key");var h={spacename:v.bank.spacename,spacekey:g.value,keyName:g.name||_,issuedAt:g.createAt||new Date().toISOString()};if(!(0,c.setBankCredentials)(a,h,{expectedProfile:o}))throw yield e.updateWorkspace({revokeBankKey:g.value}).catch(()=>{}),Error(`Profile ${a} changed while issuing Data Bank credentials. Retry.`);return l?.spacekey&&l.spacekey!==g.value&&(yield e.updateWorkspace({revokeBankKey:l.spacekey}).catch(()=>{})),h}),function(e){return n.apply(this,arguments)}),u=(t=o(function*(e,{profile:r=(0,c.getCurrentProfile)(),expectedProfile:a,bank:n}={}){if(process.env.BRICKS_BANK_SPACENAME&&process.env.BRICKS_BANK_SPACEKEY)return{spacename:process.env.BRICKS_BANK_SPACENAME,spacekey:process.env.BRICKS_BANK_SPACEKEY,source:"env"};var t=d(r,a,n),i=t.fingerprint,o=t.bank;return o?.spacename&&o?.spacekey?{...o,source:"profile"}:{...yield l(e,{profile:r,expectedProfile:i,bank:o}),source:"issued"}}),function(e){return t.apply(this,arguments)}),f=(i=o(function*(e,{revoke:r,profile:a=(0,c.getCurrentProfile)(),expectedProfile:n,bank:t}={}){var i=d(a,n,t),o=i.fingerprint,s=i.bank;if(!s?.spacekey)return{cleared:!1,revoked:!1};var p=!1;if(r){var k=yield e.workspace();if(!k?._id||o?.workspaceId==null||String(k._id)!==o.workspaceId)throw Error(`Profile ${a} changed or the client targets another workspace. Retry.`);yield e.updateWorkspace({revokeBankKey:s.spacekey}),p=!0}return{cleared:(0,c.clearBankCredentials)(a,{expectedProfile:o,expectedSpacekey:s.spacekey}),revoked:p}}),function(e){return i.apply(this,arguments)})}};
|
package/lib/1946.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as _ from"react";export const __rspack_esm_id=1946;export const __rspack_esm_ids=[1946];export const __webpack_modules__={51649(s){s.exports=_}};
|
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:()=>
|
|
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:()=>h,renderDoctorReport:()=>v});var i,o,t=a(99436),s=a(85382),n=a(31802),c=a(8479),l=a(7586),p=a(47988),u=(i=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 i.apply(this,arguments)}),k=(e,r,a)=>({severity:e,code:r,message:a}),h=(o=t(function*({version:e="2.25.0-beta.76",mcpCheck:r=u}={}){var a=(0,p.getCurrentProfile)(),i=(0,p.getCurrentProfileSource)(),o=(0,n.getConnectionContext)(a),t=o.tokenInfo,h=o.auth,d=o.baseUrl,v=o.activityLogBaseUrl,m=[],w={ok:!1,timestamp:new Date().toISOString(),cli:{name:"bricks",version:e},profile:{name:a,source:i},config:{path:p.CONFIG_PATH,baseUrl:d,activityLogBaseUrl:v},auth:{available:!!h,source:h?"config":"missing",kind:h?.kind||null,workspaceId:t?.workspaceId||null,workspaceName:t?.workspaceName||null,createdAt:t?.createdAt||null,tokenPreview:h?.kind==="token"?(0,l.$l)(h.token):null},connectivity:{workspace:{ok:!1,skipped:!h,error:null}},capabilities:{zeroArgMode:(0,c.isInteractiveTerminal)()?"interactive":"help",mcp:{available:!1,error:null}},issues:m};if(h)try{var b=yield(0,s.createClient)(d,h).workspace();w.connectivity.workspace={ok:!0,skipped:!1,error:null,id:b?._id||t.workspaceId||null,name:b?.name||t.workspaceName||null},w.auth.workspaceId=b?._id||w.auth.workspaceId,w.auth.workspaceName=b?.name||w.auth.workspaceName}catch(e){w.connectivity.workspace={ok:!1,skipped:!1,error:e.message},m.push(k("error","workspace_unreachable",`Workspace query failed for ${d}: ${e.message}`))}else m.push(k("warning","auth_missing","No usable credential for the current profile."));var f=yield r();return w.capabilities.mcp={available:f.available,error:f.error||null},f.available||m.push(k("warning","mcp_unavailable",`MCP stdio server is unavailable: ${f.error||"Unknown error"}`)),w.ok=0===m.length,w}),function(){return o.apply(this,arguments)}),d=(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(d("CLI","OK",`bricks v${e.cli.version}`)),r.push(d("Profile","OK",`${e.profile.name} (${e.profile.source})`)),r.push(d("BRICKS API","OK",e.config.baseUrl)),r.push(d("Activity Log","OK",e.config.activityLogBaseUrl)),e.auth.available){var a=e.auth.workspaceName||e.auth.workspaceId||"Unknown workspace",i=[e.auth.source,e.auth.kind,e.auth.tokenPreview].filter(Boolean).join(", ");r.push(d("Auth","OK",i?`${a} (${i})`:a))}else r.push(d("Auth","WARN","No usable credential for the current profile"));if(e.connectivity.workspace.skipped)r.push(d("Workspace","WARN","Skipped because no credential is available"));else if(e.connectivity.workspace.ok){var o=e.connectivity.workspace.name||e.connectivity.workspace.id||"Unknown workspace";r.push(d("Workspace","OK",o))}else r.push(d("Workspace","FAIL",e.connectivity.workspace.error));return e.capabilities.mcp.available?r.push(d("MCP","OK","STDIO server import is available")):r.push(d("MCP","WARN",e.capabilities.mcp.error)),r.push(d("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")}}};
|