@fugood/bricks-cli 2.26.0-beta.11 → 2.26.0-beta.13
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 +10 -0
- package/lib/1010.js +1 -1
- package/lib/1178.js +1 -1
- package/lib/1708.js +2 -2
- package/lib/2486.js +1 -1
- package/lib/6818.js +1 -1
- package/lib/7511.js +1 -1
- package/lib/9439.js +1 -1
- package/lib/9590.js +1 -1
- package/lib/devtools.js +1 -0
- package/lib/index.js +23 -23
- package/lib/lib.js +13 -13
- package/package.json +6 -5
package/lib/1178.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __rspack_esm_id=1178;export const __rspack_esm_ids=[1178];export const __webpack_modules__={28193(e,o,r){r.a(e,async function(e,t){try{r.r(o),r.d(o,{createCdpClient:()=>u});var n,s=r(99436),a=r(84361),c=e([a]);a=(c.then?(await c)():c)[0];var i=15e3,l=({address:e,port:o,method:r,phase:t="request",closeCode:n,closeReason:s,local:a=!1})=>{var c=s?Buffer.isBuffer(s)?s.toString("utf8"):String(s):"",i="connect"===t?"before the CDP session opened":r?`while waiting for ${r}`:"during the CDP session",l=`${e}:${o}`,d=[];null!=n&&d.push(`code ${n}`),c&&d.push(`reason: ${c}`);var u=[a?`CDP client closed the connection to ${l} ${i}.`:`CDP connection to ${l} closed ${i}.`,d.length>0?`WebSocket close ${d.join(", ")}.`:null,a?null:"The DevTools server currently accepts one CDP client at a time. Another DevTools window or CLI command may have replaced this session. Retry the command, close the other inspector, or avoid running DevTools commands in parallel."].filter(Boolean).join("\n"),
|
|
1
|
+
export const __rspack_esm_id=1178;export const __rspack_esm_ids=[1178];export const __webpack_modules__={28193(e,o,r){r.a(e,async function(e,t){try{r.r(o),r.d(o,{createCdpClient:()=>u});var n,s=r(99436),a=r(84361),c=e([a]);a=(c.then?(await c)():c)[0];var i=15e3,l=({address:e,port:o,method:r,phase:t="request",closeCode:n,closeReason:s,local:a=!1})=>{var c=s?Buffer.isBuffer(s)?s.toString("utf8"):String(s):"",i="connect"===t?"before the CDP session opened":r?`while waiting for ${r}`:"during the CDP session",l=`${e}:${o}`,d=[];null!=n&&d.push(`code ${n}`),c&&d.push(`reason: ${c}`);var u=[a?`CDP client closed the connection to ${l} ${i}.`:`CDP connection to ${l} closed ${i}.`,d.length>0?`WebSocket close ${d.join(", ")}.`:null,a?null:"The DevTools server currently accepts one CDP client at a time. Another DevTools window or CLI command may have replaced this session. Retry the command, close the other inspector, or avoid running DevTools commands in parallel."].filter(Boolean).join("\n"),h=Error(u);return h.code="CDP_CONNECTION_CLOSED",h.method=r,h.phase=t,h.closeCode=n,h.closeReason=c,h},d=(n=s(function*(e,o,r){var t,n=r?"string"==typeof r?{passcode:r}:r:{},s=n.passcode,a=n.accessToken;if(a)return`ws://${e}:${o}/ws?access_token=${encodeURIComponent(a)}`;if(!s)try{var c=new AbortController;t=setTimeout(()=>c.abort(),3e3);var i=yield fetch(`http://${e}:${o}/json/list`,{signal:c.signal});if(i.ok){var l=yield i.json(),d=l?.[0]?.webSocketDebuggerUrl;if(d){var u=d.match(/\/ws(?:\/.*)?$/);if(u)return`ws://${e}:${o}${u[0]}`}}}catch{}finally{void 0!==t&&clearTimeout(t)}return s?`ws://${e}:${o}/ws/${encodeURIComponent(s)}`:`ws://${e}:${o}/ws`}),function(e,o,r){return n.apply(this,arguments)}),u=(e,o,r)=>{var t,n,c=0,u=new Map,h=new Map,f=null,m=0,p=e=>{for(var o of u.values()){var r=o.reject,t=o.timer,n=o.method;clearTimeout(t),r(e(n))}u.clear()};return{connect:(t=s(function*(){var t=++m,s=yield d(e,o,r);if(t!==m)throw l({address:e,port:o,phase:"connect",local:!0});return new Promise((r,t)=>{n=new a.WebSocket(s,{handshakeTimeout:i});var c=!1;n.once("open",()=>{c=!0,f=null,r()}),n.once("error",r=>{c||t(Error(r.message||`Cannot connect to ${e}:${o}`))}),n.on("message",e=>{try{var o=JSON.parse(e.toString());if(null!=o.id&&u.has(o.id)){var r=u.get(o.id),t=r.resolve,n=r.reject,s=r.timer;clearTimeout(s),u.delete(o.id),o.error?n(Error(o.error.message)):t(o.result);return}if(o.method){var a=h.get(o.method);if(a)for(var c of a)c(o.params)}}catch{}}),n.on("close",(r,n)=>{f={closeCode:r,closeReason:n},c||t(l({address:e,port:o,phase:"connect",closeCode:r,closeReason:n})),p(t=>l({address:e,port:o,method:t,closeCode:r,closeReason:n}))})})}),function(){return t.apply(this,arguments)}),send:(r,t={},s=i)=>new Promise((a,i)=>{if(!n||n.readyState!==n.OPEN)return f?void i(l({address:e,port:o,method:r,closeCode:f.closeCode,closeReason:f.closeReason})):void i(Error(`Not connected to CDP at ${e}:${o} while sending ${r}`));var d=++c,h=setTimeout(()=>{u.delete(d),i(Error(`Timeout: ${r}`))},s);u.set(d,{resolve:a,reject:i,timer:h,method:r}),n.send(JSON.stringify({id:d,method:r,params:t}))}),on:(e,o)=>{h.has(e)||h.set(e,[]),h.get(e).push(o)},off:(e,o)=>{var r=h.get(e);if(r){var t=r.indexOf(o);t>=0&&r.splice(t,1)}},close:()=>{m++,p(r=>l({address:e,port:o,method:r,local:!0})),n&&(n.terminate(),n=null)}}};t()}catch(e){t(e)}})}};
|