blink 1.1.34 → 1.1.36
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/dist/browser/control/index.d.cts +16 -16
- package/dist/browser/control/index.d.ts +16 -16
- package/dist/cli/{dist-Ceoe3h7v.js → auth-B9qq4cSL.js} +108 -65
- package/dist/cli/chat-DY4IWEHl.js +1 -0
- package/dist/cli/{chat-manager-bMAuoSb5.js → chat-manager-CIKM5Z0y.js} +7 -7
- package/dist/cli/{compute-server-BFNeHOmk.js → compute-server-qi2ObZrP.js} +1 -1
- package/dist/cli/config-jZRQMoaY.js +1 -0
- package/dist/cli/connect-CrE2QpMS.js +1 -0
- package/dist/cli/connect-CxdtUbca.js +1 -0
- package/dist/cli/{create-github-app-Dld06QIC.js → create-github-app-BeSDE8GT.js} +2 -2
- package/dist/cli/{dev-9EzQCNmd.js → dev-DRc-HUQD.js} +165 -158
- package/dist/cli/{esm-BiWxO8S7.js → esm-C6nUlmX4.js} +1 -1
- package/dist/cli/{getMachineId-bsd-BfwVPdTh.js → getMachineId-bsd-B09GfpQE.js} +1 -1
- package/dist/cli/{getMachineId-bsd-BmhpEQU_.js → getMachineId-bsd-B5inCcKX.js} +1 -1
- package/dist/cli/{getMachineId-bsd-C1eeoY31.js → getMachineId-bsd-BVOanLuZ.js} +1 -1
- package/dist/cli/{getMachineId-bsd-CO9ne--Y.js → getMachineId-bsd-BXrGuboa.js} +1 -1
- package/dist/cli/getMachineId-bsd-CBL_TGNf.js +1 -0
- package/dist/cli/getMachineId-bsd-CbC9XZ_w.js +1 -0
- package/dist/cli/{getMachineId-bsd-D4uBPoNF.js → getMachineId-bsd-CrOdTUu4.js} +1 -1
- package/dist/cli/getMachineId-bsd-Cxy148LG.js +1 -0
- package/dist/cli/{getMachineId-darwin-C0EZ3sY3.js → getMachineId-darwin-BU-w-BnC.js} +1 -1
- package/dist/cli/{getMachineId-darwin-CSfD7gS4.js → getMachineId-darwin-BWTc5KWy.js} +1 -1
- package/dist/cli/{getMachineId-darwin-CgQ9n4TU.js → getMachineId-darwin-BbUfrHce.js} +1 -1
- package/dist/cli/{getMachineId-darwin-CuAzoP7O.js → getMachineId-darwin-BlZzCAQ6.js} +1 -1
- package/dist/cli/getMachineId-darwin-BmmSRa_d.js +2 -0
- package/dist/cli/{getMachineId-darwin-Cpq0Lloc.js → getMachineId-darwin-UHAuN405.js} +1 -1
- package/dist/cli/getMachineId-darwin-hJWBup80.js +2 -0
- package/dist/cli/getMachineId-darwin-rxU3ohHe.js +2 -0
- package/dist/cli/{getMachineId-linux-B1XJTHUh.js → getMachineId-linux-B4EFTMpj.js} +1 -1
- package/dist/cli/{getMachineId-linux-CRUR6LbQ.js → getMachineId-linux-CKBueRrt.js} +1 -1
- package/dist/cli/{getMachineId-linux-CVQNNGui.js → getMachineId-linux-CNhTYXGA.js} +1 -1
- package/dist/cli/{getMachineId-linux-CtdZRCaX.js → getMachineId-linux-D3K2OTZn.js} +1 -1
- package/dist/cli/getMachineId-linux-DaUV--ii.js +1 -0
- package/dist/cli/getMachineId-linux-DrZ26-WQ.js +1 -0
- package/dist/cli/getMachineId-linux-DzK7jzi5.js +1 -0
- package/dist/cli/getMachineId-linux-fpVhDYCz.js +1 -0
- package/dist/cli/{getMachineId-unsupported-B-xvzil1.js → getMachineId-unsupported-16ooXsXU.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-BA3eQjiV.js → getMachineId-unsupported-72ceFIVM.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-BZCOxs7n.js → getMachineId-unsupported-BKotHSFu.js} +1 -1
- package/dist/cli/{getMachineId-unsupported-BjGFauqb.js → getMachineId-unsupported-BSdFT2aC.js} +1 -1
- package/dist/cli/getMachineId-unsupported-CDM0TBdr.js +1 -0
- package/dist/cli/getMachineId-unsupported-Cw89MFW-.js +1 -0
- package/dist/cli/getMachineId-unsupported-DBSoWxG_.js +1 -0
- package/dist/cli/getMachineId-unsupported-cHJvhp02.js +1 -0
- package/dist/cli/{getMachineId-win-AW-Mv9PG.js → getMachineId-win-BAPC_wWc.js} +1 -1
- package/dist/cli/{getMachineId-win-B_2C1cwE.js → getMachineId-win-Bn_WM7bG.js} +1 -1
- package/dist/cli/{getMachineId-win-CUeKGXdr.js → getMachineId-win-Cc69o1Nq.js} +1 -1
- package/dist/cli/{getMachineId-win-BbYxddZ9.js → getMachineId-win-DR3Dm4-5.js} +1 -1
- package/dist/cli/{getMachineId-win-BkozcdSh.js → getMachineId-win-DdInvJHL.js} +1 -1
- package/dist/cli/getMachineId-win-Dig4HMmA.js +1 -0
- package/dist/cli/getMachineId-win-DwHWO0Id.js +1 -0
- package/dist/cli/getMachineId-win-gVqg_Qhn.js +1 -0
- package/dist/cli/index.js +9 -9
- package/dist/cli/{init-CByRT25U.js → init-CO5TBme9.js} +1 -1
- package/dist/cli/{init-templates-jGRvqLQ6.js → init-templates-Br3bKUNT.js} +3 -3
- package/dist/cli/login-C60LmqjM.js +1 -0
- package/dist/cli/logout-2bj6PyZi.js +1 -0
- package/dist/cli/pull-BGcjDkHJ.js +18 -0
- package/dist/cli/run-SQMvtzUV.js +1 -0
- package/dist/cli/setup-github-app-DOhdofIm.js +9 -0
- package/dist/cli/{token-ClGOahUF.js → token-MaTAy4hv.js} +1 -1
- package/dist/cli/{token-util-h1hcKvQX.js → token-util-Bn01WxFK.js} +1 -1
- package/dist/cli/token-util-DbgI6oFx.js +1 -0
- package/dist/cli/undici-mM2IfLwA.js +1 -0
- package/dist/cli/{util-k3x8m_i5.js → util-DcqmsBrE.js} +1 -1
- package/dist/node/agent/index.node.cjs +1 -1
- package/dist/node/agent/index.node.d.ts +1 -1
- package/dist/node/agent/index.node.js +1 -1
- package/dist/node/build/index.cjs +1 -1
- package/dist/node/build/index.d.ts +1 -1
- package/dist/node/build/index.js +1 -1
- package/dist/node/context-Ch5QyxHM.js +1 -0
- package/dist/node/context-Cp_cUqvc.cjs +1 -0
- package/dist/node/esm-CSXsVdYr.js +1 -0
- package/dist/node/esm-DAl5TNhv.cjs +1 -0
- package/dist/node/{getMachineId-bsd-O0bNSuuh.cjs → getMachineId-bsd-C0y5EQEK.cjs} +1 -1
- package/dist/node/getMachineId-bsd-j5NqIOc8.js +1 -0
- package/dist/node/getMachineId-darwin-EKLAsCHs.js +2 -0
- package/dist/node/{getMachineId-darwin-DivkCgLG.cjs → getMachineId-darwin-QptN2GTZ.cjs} +1 -1
- package/dist/node/{getMachineId-linux-C8A0ak4z.cjs → getMachineId-linux-B7sBt1Ji.cjs} +1 -1
- package/dist/node/getMachineId-linux-BkKZQ4pT.js +1 -0
- package/dist/node/getMachineId-unsupported-C_PGk8nf.js +1 -0
- package/dist/node/{getMachineId-unsupported-DSRCXJha.cjs → getMachineId-unsupported-DwYXVQg7.cjs} +1 -1
- package/dist/node/getMachineId-win-BJspkM2m.js +1 -0
- package/dist/node/{getMachineId-win-B_okYUv6.cjs → getMachineId-win-C2mMnKyH.cjs} +1 -1
- package/dist/node/index.node-CU27y0G9.js +50 -0
- package/dist/node/index.node-DfJSk6zl.cjs +50 -0
- package/dist/node/internal/index.cjs +1 -0
- package/dist/node/internal/index.d.cts +24 -0
- package/dist/node/internal/index.d.ts +24 -0
- package/dist/node/internal/index.js +1 -0
- package/dist/node/react/index.node.cjs +110 -110
- package/dist/node/react/index.node.d.ts +2 -2
- package/dist/node/react/index.node.js +48 -48
- package/dist/node/{token-D4jFpAk0.cjs → token-BQFROC8n.cjs} +1 -1
- package/dist/node/{token-CI2_C_5D.js → token-Qko9jH1t.js} +1 -1
- package/dist/node/token-util-BRjrHLnr.cjs +1 -0
- package/dist/node/{token-util-BxSJFXkT.cjs → token-util-CzDIlVhL.cjs} +1 -1
- package/dist/node/{token-util-ChGcRyiF.js → token-util-DwGWB0np.js} +1 -1
- package/dist/node/{token-util-idU3T5iM.js → token-util-uzFo5Esl.js} +1 -1
- package/package.json +16 -8
- package/dist/cli/auth-DbpOUCTO.js +0 -2
- package/dist/cli/chat-mj0wnV3_.js +0 -1
- package/dist/cli/connect-BnhWpzRI.js +0 -1
- package/dist/cli/connect-Cd-0O7Uu.js +0 -1
- package/dist/cli/getMachineId-bsd-DVGtITCk.js +0 -1
- package/dist/cli/getMachineId-bsd-MA4oFaCa.js +0 -1
- package/dist/cli/getMachineId-bsd-dbToLPez.js +0 -1
- package/dist/cli/getMachineId-darwin-D6_tdcZj.js +0 -2
- package/dist/cli/getMachineId-darwin-DkExT2qu.js +0 -2
- package/dist/cli/getMachineId-darwin-xoAzTD7x.js +0 -2
- package/dist/cli/getMachineId-linux-DMILcDJR.js +0 -1
- package/dist/cli/getMachineId-linux-Deja7F2k.js +0 -1
- package/dist/cli/getMachineId-linux-DqOGXYgv.js +0 -1
- package/dist/cli/getMachineId-linux-FRx9q8NV.js +0 -1
- package/dist/cli/getMachineId-unsupported-CLWxRb7f.js +0 -1
- package/dist/cli/getMachineId-unsupported-CSVFDvWp.js +0 -1
- package/dist/cli/getMachineId-unsupported-Cp_95R-6.js +0 -1
- package/dist/cli/getMachineId-unsupported-Nd0_Z7NT.js +0 -1
- package/dist/cli/getMachineId-win-CPhFagnx.js +0 -1
- package/dist/cli/getMachineId-win-D3-sMfSu.js +0 -1
- package/dist/cli/getMachineId-win-DFVpvzl3.js +0 -1
- package/dist/cli/login-POW3H6LQ.js +0 -1
- package/dist/cli/run-Lp28Ogb_.js +0 -1
- package/dist/cli/setup-github-app-D-K7e6al.js +0 -9
- package/dist/cli/token-util-DIx5k-1f.js +0 -1
- package/dist/cli/undici-JD4hDNWZ.js +0 -1
- package/dist/cli/util-CUfifM0g.js +0 -5
- package/dist/node/esm-0UNjvroT.cjs +0 -1
- package/dist/node/esm-CbZfjZBn.js +0 -1
- package/dist/node/getMachineId-bsd-Ckr9jSoT.js +0 -1
- package/dist/node/getMachineId-darwin-36SFRv2R.js +0 -2
- package/dist/node/getMachineId-linux-ZoT5w75D.js +0 -1
- package/dist/node/getMachineId-unsupported-XVp8oFCM.js +0 -1
- package/dist/node/getMachineId-win-CGqZ4f4O.js +0 -1
- package/dist/node/index.node-Btg8Ii_o.cjs +0 -50
- package/dist/node/index.node-xL4mvvNL.js +0 -50
- package/dist/node/token-util-BENsR1Bn.cjs +0 -1
- /package/dist/cli/{devtools-CwQnB6v7.js → devtools-CS3ukAFj.js} +0 -0
- /package/dist/cli/{execAsync-4IyNgpoN.js → execAsync-9jtK4I3l.js} +0 -0
- /package/dist/cli/{execAsync-B6xSGvuk.js → execAsync-B4_pEoEJ.js} +0 -0
- /package/dist/cli/{execAsync-B8_ZTafx.js → execAsync-BdK7RB6d.js} +0 -0
- /package/dist/cli/{execAsync-B8nelpRN.js → execAsync-Bjxs-bO2.js} +0 -0
- /package/dist/cli/{execAsync-Cj_jF8MF.js → execAsync-CM_C8SBr.js} +0 -0
- /package/dist/cli/{execAsync-Ckbi9Yqe.js → execAsync-CNFaXJjR.js} +0 -0
- /package/dist/cli/{execAsync-CvOpnFex.js → execAsync-Dl3hbWiU.js} +0 -0
- /package/dist/cli/{execAsync-DDBH3pWg.js → execAsync-qGIZ8XA8.js} +0 -0
- /package/dist/cli/{ignore-NA4V6Pjc.js → ignore-ltyKbzfl.js} +0 -0
- /package/dist/cli/{token-error-BHDo_48c.js → token-error-CGIVaIg6.js} +0 -0
- /package/dist/cli/{undici-B5tM_IT9.js → undici-BiTrd9-R.js} +0 -0
- /package/dist/cli/{usingCtx-B1FpoePI.js → usingCtx-CCxav2be.js} +0 -0
- /package/dist/cli/{utils-B3iC7vdW.js → utils-BWKsfIcI.js} +0 -0
- /package/dist/node/{build-EgdtUZTI.cjs → build-BoU84guF.cjs} +0 -0
- /package/dist/node/{build-DYI55eX2.js → build-DBcSkHHH.js} +0 -0
- /package/dist/node/{execAsync-BMxJf0Eg.cjs → execAsync-BN6E2M46.cjs} +0 -0
- /package/dist/node/{execAsync-CY8juV7n.js → execAsync-CoM0jMb2.js} +0 -0
- /package/dist/node/{index-B4OXlWm3.d.ts → index-BcKU69uH.d.ts} +0 -0
- /package/dist/node/{index.node-BbqFCkOX.d.ts → index.node-Cl9AwUCW.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esmMin as e,__export as t}from"./chunk-D9KrCrVq.js";var n,r=e((()=>{n=typeof globalThis==`object`?globalThis:global})),i=e((()=>{r()})),a=e((()=>{i()})),o,s=e((()=>{o=`1.9.0`}));function c(e){var t=new Set([e]),n=new Set,r=e.match(l);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(t){return t===e};function a(e){return n.add(e),!1}function o(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match(l);if(!r)return a(e);var s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return s.prerelease!=null||i.major!==s.major?a(e):i.major===0?i.minor===s.minor&&i.patch<=s.patch?o(e):a(e):i.minor<=s.minor?o(e):a(e)}}var l,ee,te=e((()=>{s(),l=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,ee=c(o)}));function u(e,t,n,r){r===void 0&&(r=!1);var i=m[p]=m[p]??{version:o};if(!r&&i[e]){var a=Error(`@opentelemetry/api: Attempted duplicate registration of API: `+e);return n.error(a.stack||a.message),!1}if(i.version!==o){var a=Error(`@opentelemetry/api: Registration of version v`+i.version+` for `+e+` does not match previously registered API v`+o);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for `+e+` v`+o+`.`),!0}function d(e){var t=m[p]?.version;if(!(!t||!ee(t)))return m[p]?.[e]}function f(e,t){t.debug(`@opentelemetry/api: Unregistering a global for `+e+` v`+o+`.`);var n=m[p];n&&delete n[e]}var ne,p,m,h=e((()=>{a(),s(),te(),ne=o.split(`.`)[0],p=Symbol.for(`opentelemetry.js.api.`+ne),m=n}));function g(e,t,n){var r=d(`diag`);if(r)return n.unshift(t),r[e].apply(r,ie([],re(n),!1))}var re,ie,ae,oe=e((()=>{h(),re=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},ie=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},ae=function(){function e(e){this._namespace=e.namespace||`DiagComponentLogger`}return e.prototype.debug=function(){var e=[...arguments];return g(`debug`,this._namespace,e)},e.prototype.error=function(){var e=[...arguments];return g(`error`,this._namespace,e)},e.prototype.info=function(){var e=[...arguments];return g(`info`,this._namespace,e)},e.prototype.warn=function(){var e=[...arguments];return g(`warn`,this._namespace,e)},e.prototype.verbose=function(){var e=[...arguments];return g(`verbose`,this._namespace,e)},e}()})),_,v=e((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.ERROR=30]=`ERROR`,e[e.WARN=50]=`WARN`,e[e.INFO=60]=`INFO`,e[e.DEBUG=70]=`DEBUG`,e[e.VERBOSE=80]=`VERBOSE`,e[e.ALL=9999]=`ALL`})(_||={})}));function se(e,t){e<_.NONE?e=_.NONE:e>_.ALL&&(e=_.ALL),t||={};function n(n,r){var i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,_.ERROR),warn:n(`warn`,_.WARN),info:n(`info`,_.INFO),debug:n(`debug`,_.DEBUG),verbose:n(`verbose`,_.VERBOSE)}}var ce=e((()=>{v()})),le,ue,de,y,b=e((()=>{oe(),ce(),v(),h(),le=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},ue=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},de=`diag`,y=function(){function e(){function e(e){return function(){var t=[...arguments],n=d(`diag`);if(n)return n[e].apply(n,ue([],le(t),!1))}}var t=this;t.setLogger=function(e,n){if(n===void 0&&(n={logLevel:_.INFO}),e===t){var r=Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`);return t.error(r.stack??r.message),!1}typeof n==`number`&&(n={logLevel:n});var i=d(`diag`),a=se(n.logLevel??_.INFO,e);if(i&&!n.suppressOverrideMessage){var o=Error().stack??`<failed to generate stacktrace>`;i.warn(`Current logger will be overwritten from `+o),a.warn(`Current logger will overwrite one already registered from `+o)}return u(`diag`,a,t,!0)},t.disable=function(){f(de,t)},t.createComponentLogger=function(e){return new ae(e)},t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}return e.instance=function(){return this._instance||=new e,this._instance},e}()})),fe,pe,me,he=e((()=>{fe=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},pe=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},me=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=fe(e,2),n=t[0],r=t[1];return[n,r]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=new e(this._entries);try{for(var o=pe(r),s=o.next();!s.done;s=o.next()){var c=s.value;a._entries.delete(c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e}()})),ge,_e=e((()=>{ge=Symbol(`BaggageEntryMetadata`)}));function ve(e){return e===void 0&&(e={}),new me(new Map(Object.entries(e)))}function ye(e){return typeof e!=`string`&&(be.error(`Cannot create baggage metadata from unknown type: `+typeof e),e=``),{__TYPE__:ge,toString:function(){return e}}}var be,xe=e((()=>{b(),he(),_e(),be=y.instance()}));function Se(e){return Symbol.for(e)}var Ce,we,x=e((()=>{Ce=function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}return e}(),we=new Ce})),S,Te,Ee=e((()=>{S=[{n:`error`,c:`error`},{n:`warn`,c:`warn`},{n:`info`,c:`info`},{n:`debug`,c:`debug`},{n:`verbose`,c:`trace`}],Te=function(){function e(){function e(e){return function(){var t=[...arguments];if(console){var n=console[e];if(typeof n!=`function`&&(n=console.log),typeof n==`function`)return n.apply(console,t)}}}for(var t=0;t<S.length;t++)this[S[t].n]=e(S[t].c)}return e}()}));function De(){return Ie}var C,Oe,w,ke,Ae,je,Me,T,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We=e((()=>{C=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Oe=function(){function e(){}return e.prototype.createGauge=function(e,t){return Re},e.prototype.createHistogram=function(e,t){return ze},e.prototype.createCounter=function(e,t){return Le},e.prototype.createUpDownCounter=function(e,t){return Be},e.prototype.createObservableGauge=function(e,t){return He},e.prototype.createObservableCounter=function(e,t){return Ve},e.prototype.createObservableUpDownCounter=function(e,t){return Ue},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),w=function(){function e(){}return e}(),ke=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(e,t){},t}(w),Ae=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(e,t){},t}(w),je=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(e,t){},t}(w),Me=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(e,t){},t}(w),T=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),Ne=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(T),Pe=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(T),Fe=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(T),Ie=new Oe,Le=new ke,Re=new je,ze=new Me,Be=new Ae,Ve=new Ne,He=new Pe,Ue=new Fe})),E,Ge=e((()=>{(function(e){e[e.INT=0]=`INT`,e[e.DOUBLE=1]=`DOUBLE`})(E||={})})),D,O,Ke=e((()=>{D={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},O={set:function(e,t,n){e!=null&&(e[t]=n)}}})),qe,Je,Ye,Xe=e((()=>{x(),qe=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Je=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Ye=function(){function e(){}return e.prototype.active=function(){return we},e.prototype.with=function(e,t,n){var r=[...arguments].slice(3);return t.call.apply(t,Je([n],qe(r),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}()})),Ze,Qe,k,$e,A,j=e((()=>{Xe(),h(),b(),Ze=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Qe=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},k=`context`,$e=new Ye,A=function(){function e(){}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalContextManager=function(e){return u(k,e,y.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,n){for(var r,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return(r=this._getContextManager()).with.apply(r,Qe([e,t,n],Ze(i),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return d(k)||$e},e.prototype.disable=function(){this._getContextManager().disable(),f(k,y.instance())},e}()})),et,tt=e((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})(et||={})})),M,N,nt,rt=e((()=>{tt(),M=`0000000000000000`,N=`00000000000000000000000000000000`,nt={traceId:N,spanId:M,traceFlags:et.NONE}})),P,F=e((()=>{rt(),P=function(){function e(e){e===void 0&&(e=nt),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}()}));function I(e){return e.getValue(R)||void 0}function it(){return I(A.getInstance().active())}function L(e,t){return e.setValue(R,t)}function at(e){return e.deleteValue(R)}function ot(e,t){return L(e,new P(t))}function st(e){return I(e)?.spanContext()}var R,ct=e((()=>{x(),F(),j(),R=Se(`OpenTelemetry Context Key SPAN`)}));function lt(e){return ft.test(e)&&e!==N}function ut(e){return pt.test(e)&&e!==M}function z(e){return lt(e.traceId)&&ut(e.spanId)}function dt(e){return new P(e)}var ft,pt,B=e((()=>{rt(),F(),ft=/^([0-9a-f]{32})$/i,pt=/^[0-9a-f]{16}$/i}));function mt(e){return typeof e==`object`&&typeof e.spanId==`string`&&typeof e.traceId==`string`&&typeof e.traceFlags==`number`}var V,H,ht=e((()=>{j(),ct(),F(),B(),V=A.getInstance(),H=function(){function e(){}return e.prototype.startSpan=function(e,t,n){if(n===void 0&&(n=V.active()),t?.root)return new P;var r=n&&st(n);return mt(r)&&z(r)?new P(r):new P},e.prototype.startActiveSpan=function(e,t,n,r){var i,a,o;if(!(arguments.length<2)){arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);var s=a??V.active(),c=this.startSpan(e,i,s),l=L(s,c);return V.with(l,o,void 0,c)}},e}()})),gt,U,_t=e((()=>{ht(),gt=new H,U=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):gt},e}()})),vt,yt=e((()=>{ht(),vt=function(){function e(){}return e.prototype.getTracer=function(e,t,n){return new H},e}()})),bt,W,xt=e((()=>{_t(),yt(),bt=new vt,W=function(){function e(){}return e.prototype.getTracer=function(e,t,n){return this.getDelegateTracer(e,t,n)??new U(this,e,t,n)},e.prototype.getDelegate=function(){return this._delegate??bt},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,n){return this._delegate?.getTracer(e,t,n)},e}()})),St,Ct=e((()=>{(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(St||={})})),wt,Tt=e((()=>{(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(wt||={})})),Et,Dt=e((()=>{(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(Et||={})}));function Ot(e){return Mt.test(e)}function kt(e){return Nt.test(e)&&!Pt.test(e)}var G,At,jt,Mt,Nt,Pt,Ft=e((()=>{G=`[_0-9a-z-*/]`,At=`[a-z]`+G+`{0,255}`,jt=`[a-z0-9]`+G+`{0,240}@[a-z]`+G+`{0,13}`,Mt=RegExp(`^(?:`+At+`|`+jt+`)$`),Nt=/^[ -~]{0,255}[!-~]$/,Pt=/,|=/})),It,Lt,Rt,K,zt,Bt=e((()=>{Ft(),It=32,Lt=512,Rt=`,`,K=`=`,zt=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,n){return t.push(n+K+e.get(n)),t},[]).join(Rt)},e.prototype._parse=function(e){e.length>Lt||(this._internalState=e.split(Rt).reverse().reduce(function(e,t){var n=t.trim(),r=n.indexOf(K);if(r!==-1){var i=n.slice(0,r),a=n.slice(r+1,t.length);Ot(i)&&kt(a)&&e.set(i,a)}return e},new Map),this._internalState.size>It&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,It))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}()}));function Vt(e){return new zt(e)}var Ht=e((()=>{Bt()})),Ut,Wt=e((()=>{j(),Ut=A.getInstance()})),q,Gt=e((()=>{b(),q=y.instance()})),Kt,qt,Jt=e((()=>{We(),Kt=function(){function e(){}return e.prototype.getMeter=function(e,t,n){return Ie},e}(),qt=new Kt})),J,Yt,Xt=e((()=>{Jt(),h(),b(),J=`metrics`,Yt=function(){function e(){}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalMeterProvider=function(e){return u(J,e,y.instance())},e.prototype.getMeterProvider=function(){return d(J)||qt},e.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},e.prototype.disable=function(){f(J,y.instance())},e}()})),Y,Zt=e((()=>{Xt(),Y=Yt.getInstance()})),Qt,$t=e((()=>{Qt=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}()}));function en(e){return e.getValue(X)||void 0}function tn(){return en(A.getInstance().active())}function nn(e,t){return e.setValue(X,t)}function rn(e){return e.deleteValue(X)}var X,an=e((()=>{j(),x(),X=Se(`OpenTelemetry Baggage Key`)})),Z,on,sn,cn=e((()=>{h(),$t(),Ke(),an(),xe(),b(),Z=`propagation`,on=new Qt,sn=function(){function e(){this.createBaggage=ve,this.getBaggage=en,this.getActiveBaggage=tn,this.setBaggage=nn,this.deleteBaggage=rn}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalPropagator=function(e){return u(Z,e,y.instance())},e.prototype.inject=function(e,t,n){return n===void 0&&(n=O),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return n===void 0&&(n=D),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){f(Z,y.instance())},e.prototype._getGlobalPropagator=function(){return d(Z)||on},e}()})),ln,un=e((()=>{cn(),ln=sn.getInstance()})),Q,dn,fn=e((()=>{h(),xt(),B(),ct(),b(),Q=`trace`,dn=function(){function e(){this._proxyTracerProvider=new W,this.wrapSpanContext=dt,this.isSpanContextValid=z,this.deleteSpan=at,this.getSpan=I,this.getActiveSpan=it,this.getSpanContext=st,this.setSpan=L,this.setSpanContext=ot}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=u(Q,this._proxyTracerProvider,y.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return d(Q)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){f(Q,y.instance()),this._proxyTracerProvider=new W},e}()})),$,pn=e((()=>{fn(),$=dn.getInstance()})),mn=t({DiagConsoleLogger:()=>Te,DiagLogLevel:()=>_,INVALID_SPANID:()=>M,INVALID_SPAN_CONTEXT:()=>nt,INVALID_TRACEID:()=>N,ProxyTracer:()=>U,ProxyTracerProvider:()=>W,ROOT_CONTEXT:()=>we,SamplingDecision:()=>St,SpanKind:()=>wt,SpanStatusCode:()=>Et,TraceFlags:()=>et,ValueType:()=>E,baggageEntryMetadataFromString:()=>ye,context:()=>Ut,createContextKey:()=>Se,createNoopMeter:()=>De,createTraceState:()=>Vt,default:()=>hn,defaultTextMapGetter:()=>D,defaultTextMapSetter:()=>O,diag:()=>q,isSpanContextValid:()=>z,isValidSpanId:()=>ut,isValidTraceId:()=>lt,metrics:()=>Y,propagation:()=>ln,trace:()=>$}),hn,gn=e((()=>{xe(),x(),Ee(),v(),We(),Ge(),Ke(),_t(),xt(),Ct(),Tt(),Dt(),tt(),Ht(),B(),rt(),Wt(),Gt(),Zt(),un(),pn(),hn={context:Ut,diag:q,metrics:Y,propagation:ln,trace:$}}));export{Te as DiagConsoleLogger,_ as DiagLogLevel,Et as SpanStatusCode,E as ValueType,q as diag,mn as esm_exports,gn as init_esm,Y as metrics,$ as trace};
|
|
1
|
+
import{__esmMin as e,__export as t}from"./chunk-D9KrCrVq.js";var n,r=e((()=>{n=typeof globalThis==`object`?globalThis:global})),i=e((()=>{r()})),a=e((()=>{i()})),o,s=e((()=>{o=`1.9.0`}));function c(e){var t=new Set([e]),n=new Set,r=e.match(l);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(t){return t===e};function a(e){return n.add(e),!1}function o(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match(l);if(!r)return a(e);var s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return s.prerelease!=null||i.major!==s.major?a(e):i.major===0?i.minor===s.minor&&i.patch<=s.patch?o(e):a(e):i.minor<=s.minor?o(e):a(e)}}var l,ee,te=e((()=>{s(),l=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,ee=c(o)}));function u(e,t,n,r){r===void 0&&(r=!1);var i=m[p]=m[p]??{version:o};if(!r&&i[e]){var a=Error(`@opentelemetry/api: Attempted duplicate registration of API: `+e);return n.error(a.stack||a.message),!1}if(i.version!==o){var a=Error(`@opentelemetry/api: Registration of version v`+i.version+` for `+e+` does not match previously registered API v`+o);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for `+e+` v`+o+`.`),!0}function d(e){var t=m[p]?.version;if(!(!t||!ee(t)))return m[p]?.[e]}function f(e,t){t.debug(`@opentelemetry/api: Unregistering a global for `+e+` v`+o+`.`);var n=m[p];n&&delete n[e]}var ne,p,m,h=e((()=>{a(),s(),te(),ne=o.split(`.`)[0],p=Symbol.for(`opentelemetry.js.api.`+ne),m=n}));function g(e,t,n){var r=d(`diag`);if(r)return n.unshift(t),r[e].apply(r,ie([],re(n),!1))}var re,ie,ae,oe=e((()=>{h(),re=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},ie=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},ae=function(){function e(e){this._namespace=e.namespace||`DiagComponentLogger`}return e.prototype.debug=function(){var e=[...arguments];return g(`debug`,this._namespace,e)},e.prototype.error=function(){var e=[...arguments];return g(`error`,this._namespace,e)},e.prototype.info=function(){var e=[...arguments];return g(`info`,this._namespace,e)},e.prototype.warn=function(){var e=[...arguments];return g(`warn`,this._namespace,e)},e.prototype.verbose=function(){var e=[...arguments];return g(`verbose`,this._namespace,e)},e}()})),_,v=e((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.ERROR=30]=`ERROR`,e[e.WARN=50]=`WARN`,e[e.INFO=60]=`INFO`,e[e.DEBUG=70]=`DEBUG`,e[e.VERBOSE=80]=`VERBOSE`,e[e.ALL=9999]=`ALL`})(_||={})}));function se(e,t){e<_.NONE?e=_.NONE:e>_.ALL&&(e=_.ALL),t||={};function n(n,r){var i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,_.ERROR),warn:n(`warn`,_.WARN),info:n(`info`,_.INFO),debug:n(`debug`,_.DEBUG),verbose:n(`verbose`,_.VERBOSE)}}var ce=e((()=>{v()})),le,ue,de,y,b=e((()=>{oe(),ce(),v(),h(),le=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},ue=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},de=`diag`,y=function(){function e(){function e(e){return function(){var t=[...arguments],n=d(`diag`);if(n)return n[e].apply(n,ue([],le(t),!1))}}var t=this;t.setLogger=function(e,n){if(n===void 0&&(n={logLevel:_.INFO}),e===t){var r=Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`);return t.error(r.stack??r.message),!1}typeof n==`number`&&(n={logLevel:n});var i=d(`diag`),a=se(n.logLevel??_.INFO,e);if(i&&!n.suppressOverrideMessage){var o=Error().stack??`<failed to generate stacktrace>`;i.warn(`Current logger will be overwritten from `+o),a.warn(`Current logger will overwrite one already registered from `+o)}return u(`diag`,a,t,!0)},t.disable=function(){f(de,t)},t.createComponentLogger=function(e){return new ae(e)},t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}return e.instance=function(){return this._instance||=new e,this._instance},e}()})),fe,pe,me,he=e((()=>{fe=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},pe=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},me=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=fe(e,2),n=t[0],r=t[1];return[n,r]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=new e(this._entries);try{for(var o=pe(r),s=o.next();!s.done;s=o.next()){var c=s.value;a._entries.delete(c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e}()})),ge,_e=e((()=>{ge=Symbol(`BaggageEntryMetadata`)}));function ve(e){return e===void 0&&(e={}),new me(new Map(Object.entries(e)))}function ye(e){return typeof e!=`string`&&(be.error(`Cannot create baggage metadata from unknown type: `+typeof e),e=``),{__TYPE__:ge,toString:function(){return e}}}var be,xe=e((()=>{b(),he(),_e(),be=y.instance()}));function Se(e){return Symbol.for(e)}var Ce,we,x=e((()=>{Ce=function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}return e}(),we=new Ce})),S,Te,Ee=e((()=>{S=[{n:`error`,c:`error`},{n:`warn`,c:`warn`},{n:`info`,c:`info`},{n:`debug`,c:`debug`},{n:`verbose`,c:`trace`}],Te=function(){function e(){function e(e){return function(){var t=[...arguments];if(console){var n=console[e];if(typeof n!=`function`&&(n=console.log),typeof n==`function`)return n.apply(console,t)}}}for(var t=0;t<S.length;t++)this[S[t].n]=e(S[t].c)}return e}()}));function De(){return Ie}var C,Oe,w,ke,Ae,je,Me,T,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We=e((()=>{C=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Oe=function(){function e(){}return e.prototype.createGauge=function(e,t){return Re},e.prototype.createHistogram=function(e,t){return ze},e.prototype.createCounter=function(e,t){return Le},e.prototype.createUpDownCounter=function(e,t){return Be},e.prototype.createObservableGauge=function(e,t){return He},e.prototype.createObservableCounter=function(e,t){return Ve},e.prototype.createObservableUpDownCounter=function(e,t){return Ue},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),w=function(){function e(){}return e}(),ke=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(e,t){},t}(w),Ae=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(e,t){},t}(w),je=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(e,t){},t}(w),Me=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(e,t){},t}(w),T=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),Ne=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(T),Pe=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(T),Fe=function(e){C(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(T),Ie=new Oe,Le=new ke,Re=new je,ze=new Me,Be=new Ae,Ve=new Ne,He=new Pe,Ue=new Fe})),E,Ge=e((()=>{(function(e){e[e.INT=0]=`INT`,e[e.DOUBLE=1]=`DOUBLE`})(E||={})})),D,O,Ke=e((()=>{D={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},O={set:function(e,t,n){e!=null&&(e[t]=n)}}})),qe,Je,Ye,Xe=e((()=>{x(),qe=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Je=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Ye=function(){function e(){}return e.prototype.active=function(){return we},e.prototype.with=function(e,t,n){var r=[...arguments].slice(3);return t.call.apply(t,Je([n],qe(r),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}()})),Ze,Qe,k,$e,A,j=e((()=>{Xe(),h(),b(),Ze=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Qe=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},k=`context`,$e=new Ye,A=function(){function e(){}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalContextManager=function(e){return u(k,e,y.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,n){for(var r,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return(r=this._getContextManager()).with.apply(r,Qe([e,t,n],Ze(i),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return d(k)||$e},e.prototype.disable=function(){this._getContextManager().disable(),f(k,y.instance())},e}()})),et,tt=e((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})(et||={})})),M,N,nt,rt=e((()=>{tt(),M=`0000000000000000`,N=`00000000000000000000000000000000`,nt={traceId:N,spanId:M,traceFlags:et.NONE}})),P,it=e((()=>{rt(),P=function(){function e(e){e===void 0&&(e=nt),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}()}));function at(e){return e.getValue(I)||void 0}function ot(){return at(A.getInstance().active())}function F(e,t){return e.setValue(I,t)}function st(e){return e.deleteValue(I)}function ct(e,t){return F(e,new P(t))}function lt(e){return at(e)?.spanContext()}var I,ut=e((()=>{x(),it(),j(),I=Se(`OpenTelemetry Context Key SPAN`)}));function dt(e){return mt.test(e)&&e!==N}function ft(e){return ht.test(e)&&e!==M}function L(e){return dt(e.traceId)&&ft(e.spanId)}function pt(e){return new P(e)}var mt,ht,R=e((()=>{rt(),it(),mt=/^([0-9a-f]{32})$/i,ht=/^[0-9a-f]{16}$/i}));function gt(e){return typeof e==`object`&&typeof e.spanId==`string`&&typeof e.traceId==`string`&&typeof e.traceFlags==`number`}var z,B,_t=e((()=>{j(),ut(),it(),R(),z=A.getInstance(),B=function(){function e(){}return e.prototype.startSpan=function(e,t,n){if(n===void 0&&(n=z.active()),t?.root)return new P;var r=n&<(n);return gt(r)&&L(r)?new P(r):new P},e.prototype.startActiveSpan=function(e,t,n,r){var i,a,o;if(!(arguments.length<2)){arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);var s=a??z.active(),c=this.startSpan(e,i,s),l=F(s,c);return z.with(l,o,void 0,c)}},e}()})),vt,V,yt=e((()=>{_t(),vt=new B,V=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):vt},e}()})),bt,xt=e((()=>{_t(),bt=function(){function e(){}return e.prototype.getTracer=function(e,t,n){return new B},e}()})),St,H,Ct=e((()=>{yt(),xt(),St=new bt,H=function(){function e(){}return e.prototype.getTracer=function(e,t,n){return this.getDelegateTracer(e,t,n)??new V(this,e,t,n)},e.prototype.getDelegate=function(){return this._delegate??St},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,n){return this._delegate?.getTracer(e,t,n)},e}()})),wt,Tt=e((()=>{(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(wt||={})})),Et,Dt=e((()=>{(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(Et||={})})),Ot,kt=e((()=>{(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(Ot||={})}));function At(e){return Pt.test(e)}function jt(e){return Ft.test(e)&&!It.test(e)}var U,Mt,Nt,Pt,Ft,It,Lt=e((()=>{U=`[_0-9a-z-*/]`,Mt=`[a-z]`+U+`{0,255}`,Nt=`[a-z0-9]`+U+`{0,240}@[a-z]`+U+`{0,13}`,Pt=RegExp(`^(?:`+Mt+`|`+Nt+`)$`),Ft=/^[ -~]{0,255}[!-~]$/,It=/,|=/})),Rt,zt,Bt,W,Vt,Ht=e((()=>{Lt(),Rt=32,zt=512,Bt=`,`,W=`=`,Vt=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,n){return t.push(n+W+e.get(n)),t},[]).join(Bt)},e.prototype._parse=function(e){e.length>zt||(this._internalState=e.split(Bt).reverse().reduce(function(e,t){var n=t.trim(),r=n.indexOf(W);if(r!==-1){var i=n.slice(0,r),a=n.slice(r+1,t.length);At(i)&&jt(a)&&e.set(i,a)}return e},new Map),this._internalState.size>Rt&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Rt))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}()}));function Ut(e){return new Vt(e)}var Wt=e((()=>{Ht()})),G,Gt=e((()=>{j(),G=A.getInstance()})),K,Kt=e((()=>{b(),K=y.instance()})),qt,Jt,Yt=e((()=>{We(),qt=function(){function e(){}return e.prototype.getMeter=function(e,t,n){return Ie},e}(),Jt=new qt})),q,Xt,Zt=e((()=>{Yt(),h(),b(),q=`metrics`,Xt=function(){function e(){}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalMeterProvider=function(e){return u(q,e,y.instance())},e.prototype.getMeterProvider=function(){return d(q)||Jt},e.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},e.prototype.disable=function(){f(q,y.instance())},e}()})),J,Qt=e((()=>{Zt(),J=Xt.getInstance()})),$t,en=e((()=>{$t=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}()}));function tn(e){return e.getValue(Y)||void 0}function nn(){return tn(A.getInstance().active())}function rn(e,t){return e.setValue(Y,t)}function an(e){return e.deleteValue(Y)}var Y,on=e((()=>{j(),x(),Y=Se(`OpenTelemetry Baggage Key`)})),X,sn,cn,ln=e((()=>{h(),en(),Ke(),on(),xe(),b(),X=`propagation`,sn=new $t,cn=function(){function e(){this.createBaggage=ve,this.getBaggage=tn,this.getActiveBaggage=nn,this.setBaggage=rn,this.deleteBaggage=an}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalPropagator=function(e){return u(X,e,y.instance())},e.prototype.inject=function(e,t,n){return n===void 0&&(n=O),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return n===void 0&&(n=D),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){f(X,y.instance())},e.prototype._getGlobalPropagator=function(){return d(X)||sn},e}()})),Z,un=e((()=>{ln(),Z=cn.getInstance()})),Q,dn,fn=e((()=>{h(),Ct(),R(),ut(),b(),Q=`trace`,dn=function(){function e(){this._proxyTracerProvider=new H,this.wrapSpanContext=pt,this.isSpanContextValid=L,this.deleteSpan=st,this.getSpan=at,this.getActiveSpan=ot,this.getSpanContext=lt,this.setSpan=F,this.setSpanContext=ct}return e.getInstance=function(){return this._instance||=new e,this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=u(Q,this._proxyTracerProvider,y.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return d(Q)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){f(Q,y.instance()),this._proxyTracerProvider=new H},e}()})),$,pn=e((()=>{fn(),$=dn.getInstance()})),mn=t({DiagConsoleLogger:()=>Te,DiagLogLevel:()=>_,INVALID_SPANID:()=>M,INVALID_SPAN_CONTEXT:()=>nt,INVALID_TRACEID:()=>N,ProxyTracer:()=>V,ProxyTracerProvider:()=>H,ROOT_CONTEXT:()=>we,SamplingDecision:()=>wt,SpanKind:()=>Et,SpanStatusCode:()=>Ot,TraceFlags:()=>et,ValueType:()=>E,baggageEntryMetadataFromString:()=>ye,context:()=>G,createContextKey:()=>Se,createNoopMeter:()=>De,createTraceState:()=>Ut,default:()=>hn,defaultTextMapGetter:()=>D,defaultTextMapSetter:()=>O,diag:()=>K,isSpanContextValid:()=>L,isValidSpanId:()=>ft,isValidTraceId:()=>dt,metrics:()=>J,propagation:()=>Z,trace:()=>$}),hn,gn=e((()=>{xe(),x(),Ee(),v(),We(),Ge(),Ke(),yt(),Ct(),Tt(),Dt(),kt(),tt(),Wt(),R(),rt(),Gt(),Kt(),Qt(),un(),pn(),hn={context:G,diag:K,metrics:J,propagation:Z,trace:$}}));export{Te as DiagConsoleLogger,_ as DiagLogLevel,Ot as SpanStatusCode,E as ValueType,G as context,K as diag,mn as esm_exports,gn as init_esm,J as metrics,Z as propagation,$ as trace};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-B4_pEoEJ.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`fs`),s=a(),c=(i(),n(r));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-qGIZ8XA8.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`fs`),s=a(),c=(i(),n(r));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-CNFaXJjR.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`fs`),s=a(),c=(i(),n(r));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-Dl3hbWiU.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`fs`),s=a(),c=(i(),n(r));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-9jtK4I3l.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`fs`),s=a(),c=(i(),n(r));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-CM_C8SBr.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`fs`),s=a(),c=(i(),n(r));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{require_execAsync as r}from"./execAsync-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{require_execAsync as r}from"./execAsync-Bjxs-bO2.js";import{esm_exports as i,init_esm as a}from"./esm-C6nUlmX4.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`fs`),s=r(),c=(a(),n(i));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-BdK7RB6d.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`fs`),s=a(),c=(i(),n(r));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";import{require_execAsync as i}from"./execAsync-Dl3hbWiU.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=i(),o=(r(),t(n));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
2
|
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";import{require_execAsync as i}from"./execAsync-B4_pEoEJ.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=i(),o=(r(),t(n));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
2
|
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";import{require_execAsync as i}from"./execAsync-CNFaXJjR.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=i(),o=(r(),t(n));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
2
|
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";import{require_execAsync as i}from"./execAsync-CM_C8SBr.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=i(),o=(r(),t(n));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
2
|
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";import{require_execAsync as i}from"./execAsync-9jtK4I3l.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=i(),o=(r(),t(n));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
|
+
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{require_execAsync as n}from"./execAsync-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{require_execAsync as n}from"./execAsync-Bjxs-bO2.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=n(),o=(i(),t(r));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
2
|
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";import{require_execAsync as i}from"./execAsync-BdK7RB6d.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=i(),o=(r(),t(n));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
|
+
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";import{require_execAsync as i}from"./execAsync-qGIZ8XA8.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=i(),o=(r(),t(n));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
|
+
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=t(`fs`),o=(i(),n(r));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=t(`fs`),o=(i(),n(r));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=t(`fs`),o=(i(),n(r));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=t(`fs`),o=(i(),n(r));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=t(`fs`),o=(i(),n(r));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=t(`fs`),o=(i(),n(r));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=t(`fs`),o=(i(),n(r));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";var a=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let a=t(`fs`),o=(i(),n(r));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=s}));export default a();export{};
|
package/dist/cli/{getMachineId-unsupported-B-xvzil1.js → getMachineId-unsupported-16ooXsXU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}e.getMachineId=a}));export default i();export{};
|
package/dist/cli/{getMachineId-unsupported-BA3eQjiV.js → getMachineId-unsupported-72ceFIVM.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}e.getMachineId=a}));export default i();export{};
|
package/dist/cli/{getMachineId-unsupported-BZCOxs7n.js → getMachineId-unsupported-BKotHSFu.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}e.getMachineId=a}));export default i();export{};
|
package/dist/cli/{getMachineId-unsupported-BjGFauqb.js → getMachineId-unsupported-BSdFT2aC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}e.getMachineId=a}));export default i();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}e.getMachineId=a}));export default i();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}e.getMachineId=a}));export default i();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}e.getMachineId=a}));export default i();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__toCommonJS as t}from"./chunk-D9KrCrVq.js";import{esm_exports as n,init_esm as r}from"./esm-C6nUlmX4.js";var i=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let i=(r(),t(n));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}e.getMachineId=a}));export default i();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-qGIZ8XA8.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`process`),s=a(),c=(i(),n(r));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-BdK7RB6d.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`process`),s=a(),c=(i(),n(r));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{require_execAsync as r}from"./execAsync-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{require_execAsync as r}from"./execAsync-Bjxs-bO2.js";import{esm_exports as i,init_esm as a}from"./esm-C6nUlmX4.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`process`),s=r(),c=(a(),n(i));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-9jtK4I3l.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`process`),s=a(),c=(i(),n(r));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-Dl3hbWiU.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`process`),s=a(),c=(i(),n(r));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-B4_pEoEJ.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`process`),s=a(),c=(i(),n(r));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-CNFaXJjR.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`process`),s=a(),c=(i(),n(r));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__commonJSMin as e,__require as t,__toCommonJS as n}from"./chunk-D9KrCrVq.js";import{esm_exports as r,init_esm as i}from"./esm-C6nUlmX4.js";import{require_execAsync as a}from"./execAsync-CM_C8SBr.js";var o=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let o=t(`process`),s=a(),c=(i(),n(r));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}e.getMachineId=l}));export default o();export{};
|
package/dist/cli/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{__commonJSMin as e,__require as t,__toESM as n}from"./chunk-D9KrCrVq.js";import{import_websocket as r}from"./wrapper-DRdRnzOz.js";import{
|
|
2
|
+
import{__commonJSMin as e,__require as t,__toESM as n}from"./chunk-D9KrCrVq.js";import{import_websocket as r}from"./wrapper-DRdRnzOz.js";import{version as i,writeBlinkConfig as a}from"./config-jZRQMoaY.js";import{findNearestEntry as o,migrateDataToBlink as s,require_main as c,resolveConfig as l}from"./util-DcqmsBrE.js";import{Client as u,M as d,Y as f,getHost as p,loginIfNeeded as m,pD as h,source_default as g,ve as _,ye as v}from"./auth-B9qq4cSL.js";import{require_ignore as y}from"./ignore-ltyKbzfl.js";import{getDevhookID as ee,resetDevhookID as te}from"./create-github-app-BeSDE8GT.js";import"./usingCtx-CCxav2be.js";import{setupGithubAppCommand as b,setupSlackAppCommand as x}from"./setup-github-app-DOhdofIm.js";import"./utils-BWKsfIcI.js";import{randomUUID as S}from"crypto";import{basename as C,dirname as ne,join as w,relative as T}from"node:path";import{existsSync as re}from"node:fs";import{mkdir as ie,readdir as ae,writeFile as oe}from"fs/promises";import{readFile as E,stat as D}from"node:fs/promises";import{inspect as se}from"node:util";var O=e((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),k=e((e=>{let{InvalidArgumentError:t}=O();var n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith(`...`)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),A=e((e=>{let{humanReadableArgName:t}=k();var n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,``]}groupItems(e,t,n){let r=new Map;return e.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));if(a=a.concat(this.formatItemList(`Arguments:`,s,t)),this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??`Options:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(`Global Options:`,n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||`Commands:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),a.join(`
|
|
3
3
|
`)}displayWidth(e){return r(e).length}styleTitle(e){return e}styleUsage(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e===`[command]`?this.styleSubcommandText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleCommandText(e)).join(` `)}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleSubcommandText(e)).join(` `)}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let i=` `.repeat(2);if(!n)return i+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2,s;return s=o<this.minWidthToWrap||r.preformatted(n)?n:r.boxWrap(n,o).replace(/\n/g,`
|
|
4
4
|
`+` `.repeat(t+2)),i+a+` `.repeat(2)+s.replace(/\n/g,`\n${i}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,i=[];return n.forEach(e=>{let n=e.match(r);if(n===null){i.push(``);return}let a=[n.shift()],o=this.displayWidth(a[0]);n.forEach(e=>{let n=this.displayWidth(e);if(o+n<=t){a.push(e),o+=n;return}i.push(a.join(``));let r=e.trimStart();a=[r],o=this.displayWidth(r)}),i.push(a.join(``))}),i.join(`
|
|
5
|
-
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),
|
|
5
|
+
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),j=e((e=>{let{InvalidArgumentError:t}=O();var n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=a(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?i(this.name().replace(/^no-/,``)):i(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},r=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r===void 0?!1:r;return t.negate===(i===e)}};function i(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function a(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
|
|
6
6
|
- a short flag is a single dash and a single character
|
|
7
7
|
- either use a single dash and a single character (for a short flag)
|
|
8
8
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(t)?Error(`${n}
|
|
9
9
|
- too many short flags`):i.test(t)?Error(`${n}
|
|
10
10
|
- too many long flags`):Error(`${n}
|
|
11
|
-
- unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),
|
|
11
|
+
- unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),M=e((e=>{function t(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let i=1;i<=e.length;i++){let a=1;a=e[i-1]===t[r-1]?0:1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+a),i>1&&r>1&&e[i-1]===t[r-2]&&e[i-2]===t[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[e.length][t.length]}function n(e,n){if(!n||n.length===0)return``;n=Array.from(new Set(n));let r=e.startsWith(`--`);r&&(e=e.slice(2),n=n.map(e=>e.slice(2)));let i=[],a=3;return n.forEach(n=>{if(n.length<=1)return;let r=t(e,n),o=Math.max(e.length,n.length);(o-r)/o>.4&&(r<a?(a=r,i=[n]):r===a&&i.push(n))}),i.sort((e,t)=>e.localeCompare(t)),r&&(i=i.map(e=>`--${e}`)),i.length>1?`\n(Did you mean one of ${i.join(`, `)}?)`:i.length===1?`\n(Did you mean ${i[0]}?)`:``}e.suggestSimilar=n})),ce=e((e=>{let n=t(`node:events`).EventEmitter,r=t(`node:child_process`),i=t(`node:path`),a=t(`node:fs`),o=t(`node:process`),{Argument:s,humanReadableArgName:c}=k(),{CommanderError:l}=O(),{Help:u,stripColor:d}=A(),{Option:f,DualOptions:p}=j(),{suggestSimilar:m}=M();var h=class e extends n{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||``,this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description=``,this._summary=``,this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>o.stdout.write(e),writeErr:e=>o.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>o.stdout.isTTY?o.stdout.columns:void 0,getErrHelpWidth:()=>o.stderr.isTTY?o.stderr.columns:void 0,getOutHasColors:()=>_()??(o.stdout.isTTY&&o.stdout.hasColors?.()),getErrHasColors:()=>_()??(o.stderr.isTTY&&o.stderr.hasColors?.()),stripColor:e=>d(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,i=n;typeof r==`object`&&r&&(i=r,r=null),i||={};let[,a,o]=e.match(/([^ ]+) *(.*)/),s=this.createCommand(a);return r&&(s.description(r),s._executableHandler=!0),i.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(i.noHelp||i.hidden),s._executableFile=i.executableFile||null,o&&s.arguments(o),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),r?this:s}createCommand(t){return new e(t)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!=`string`&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw Error(`Command passed to .addCommand() must have a name
|
|
12
12
|
- specify the name in Command constructor or using .name()`);return t||={},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new s(e,t)}argument(e,t,n,r){let i=this.createArgument(e,t);return typeof n==`function`?i.default(r).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e==`boolean`)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let[,n,r]=(e??`help [command]`).match(/([^ ]+) *(.*)/),i=t??`display help for command`,a=this.createCommand(n);return a.helpOption(!1),r&&a.arguments(r),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e==`object`?(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this):(this.helpCommand(e,t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand(`help`))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=[`preSubcommand`,`preAction`,`postAction`];if(!n.includes(e))throw Error(`Unexpected value for event passed to hook : '${e}'.
|
|
13
13
|
Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=e=>{if(e.code!==`commander.executeSubCommandAsync`)throw e},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new l(e,t,n)),o.exit(e)}action(e){return this._actionHandler=t=>{let n=this.registeredArguments.length,r=t.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)},this}createOption(e,t){return new f(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code===`commander.invalidArgument`){let t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
14
14
|
- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){let r=t(this._findCommand(n)).join(`|`),i=t(e).join(`|`);throw Error(`cannot add command '${i}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let t=e.long.replace(/^--no-/,`--`);this._findOption(t)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,`default`)}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,`default`);let r=(t,r,i)=>{t==null&&e.presetArg!==void 0&&(t=e.presetArg);let a=this.getOptionValue(n);t!==null&&e.parseArg?t=this._callParseArg(e,t,a,r):t!==null&&e.variadic&&(t=e._collectValue(t,a)),t??=e.negate?!1:e.isBoolean()||e.optional?!0:``,this.setOptionValueWithSource(n,t,i)};return this.on(`option:`+t,t=>{let n=`error: option '${e.flags}' argument '${t}' is invalid.`;r(t,n,`cli`)}),e.envVar&&this.on(`optionEnv:`+t,t=>{let n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;r(t,n,`env`)}),this}_optionEx(e,t,n,r,i){if(typeof t==`object`&&t instanceof f)throw Error(`To add an Option object use addOption() instead of option() or requiredOption()`);let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof r==`function`)a.default(i).argParser(r);else if(r instanceof RegExp){let e=r;r=(t,n)=>{let r=e.exec(t);return r?r[0]:n},a.default(i).argParser(r)}else a.default(r);return this.addOption(a)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw Error(`call .storeOptionsAsProperties() before adding options`);if(Object.keys(this._optionValues).length)throw Error(`call .storeOptionsAsProperties() before setting option values`);return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw Error(`first parameter to parse must be array or undefined`);if(t||={},e===void 0&&t.from===void 0){o.versions?.electron&&(t.from=`electron`);let e=o.execArgv??[];(e.includes(`-e`)||e.includes(`--eval`)||e.includes(`-p`)||e.includes(`--print`))&&(t.from=`eval`)}e===void 0&&(e=o.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case`node`:this._scriptPath=e[1],n=e.slice(2);break;case`electron`:o.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case`user`:n=e.slice(0);break;case`eval`:n=e.slice(1);break;default:throw Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||`program`,n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
@@ -17,9 +17,9 @@ Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._life
|
|
|
17
17
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
18
18
|
- ${r}`;throw Error(i)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function c(e,t){let n=i.resolve(e,t);if(a.existsSync(n))return n;if(s.includes(i.extname(t)))return;let r=s.find(e=>a.existsSync(`${n}${e}`));if(r)return`${n}${r}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||``;if(this._scriptPath){let e;try{e=a.realpathSync(this._scriptPath)}catch{e=this._scriptPath}d=i.resolve(i.dirname(e),d)}if(d){let t=c(d,u);if(!t&&!e._executableFile&&this._scriptPath){let n=i.basename(this._scriptPath,i.extname(this._scriptPath));n!==this._name&&(t=c(d,`${n}-${e._name}`))}u=t||u}n=s.includes(i.extname(u));let f;o.platform===`win32`?(this._checkForMissingExecutable(u,d,e._name),t.unshift(u),t=g(o.execArgv).concat(t),f=r.spawn(o.execPath,t,{stdio:`inherit`})):n?(t.unshift(u),t=g(o.execArgv).concat(t),f=r.spawn(o.argv[0],t,{stdio:`inherit`})):f=r.spawn(u,t,{stdio:`inherit`}),f.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{o.on(e,()=>{f.killed===!1&&f.exitCode===null&&f.kill(e)})});let p=this._exitCallback;f.on(`close`,e=>{e??=1,p?p(new l(e,`commander.executeSubCommandAsync`,`(close)`)):o.exit(e)}),f.on(`error`,t=>{if(t.code===`ENOENT`)this._checkForMissingExecutable(u,d,e._name);else if(t.code===`EACCES`)throw Error(`'${u}' not executable`);if(!p)o.exit(1);else{let e=new l(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,p(e)}}),this.runningCommand=f}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent?.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)===void 0?!1:this.getOptionValueSource(t)!==`default`});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t;function i(e){return e.length>1&&e[0]===`-`}let a=e=>/^-\d*\.?\d+(e[+-]?\d+)?$/.test(e)?!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e))):!1,o=null,s=null,c=0;for(;c<e.length||s;){let l=s??e[c++];if(s=null,l===`--`){r===n&&r.push(l),r.push(...e.slice(c));break}if(o&&(!i(l)||a(l))){this.emit(`option:${o.name()}`,l);continue}if(o=null,i(l)){let t=this._findOption(l);if(t){if(t.required){let n=e[c++];n===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;c<e.length&&(!i(e[c])||a(e[c]))&&(n=e[c++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(l.length>2&&l[0]===`-`&&l[1]!==`-`){let e=this._findOption(`-${l[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,l.slice(2)):(this.emit(`option:${e.name()}`),s=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let e=l.indexOf(`=`),t=this._findOption(l.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,l.slice(e+1));continue}}if(r===t&&i(l)&&!(this.commands.length===0&&a(l))&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),n.push(...e.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}else if(this._defaultCommandName){n.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
19
19
|
`),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in o.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,o.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new p(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=m(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=m(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t||=`-V, --version`,n||=`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>c(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??``:(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??``:(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??``:(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e||={};let t=!!e.error,n,r,i;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:i}}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,r)),this.emit(`beforeHelp`,r);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!=`string`&&!Buffer.isBuffer(i)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,r),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,r))}helpOption(e,t){return typeof e==`boolean`?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??`-h, --help`,t??`display help for command`),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(o.exitCode??0);t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
20
|
-
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function g(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function _(){if(o.env.NO_COLOR||o.env.FORCE_COLOR===`0`||o.env.FORCE_COLOR===`false`)return!1;if(o.env.FORCE_COLOR||o.env.CLICOLOR_FORCE!==void 0)return!0}e.Command=h,e.useColor=_}));const{program:N,createCommand:
|
|
21
|
-
`);let q
|
|
22
|
-
`+
|
|
23
|
-
`)}`,`utf-8`)}}let o=
|
|
24
|
-
`+
|
|
25
|
-
`)}let
|
|
20
|
+
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function g(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function _(){if(o.env.NO_COLOR||o.env.FORCE_COLOR===`0`||o.env.FORCE_COLOR===`false`)return!1;if(o.env.FORCE_COLOR||o.env.CLICOLOR_FORCE!==void 0)return!0}e.Command=h,e.useColor=_}));const{program:N,createCommand:P,createArgument:le,createOption:ue,CommanderError:F,InvalidArgumentError:I,InvalidOptionArgumentError:de,Command:fe,Argument:L,Option:pe,Help:R}=n(e((e=>{let{Argument:t}=k(),{Command:n}=ce(),{CommanderError:r,InvalidArgumentError:i}=O(),{Help:a}=A(),{Option:o}=j();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i}))(),1).default;async function z(e){e||=process.cwd();let t=l(e);await t.build({cwd:e,entry:t.entry,outdir:t.outdir,watch:!1,onStart:()=>{console.log(`Building agent...`)},onResult:e=>{`error`in e&&(console.error(e.error),process.exit(1));for(let t of e.warnings)console.warn(t.message);console.log(`Built agent to ${e.entry}`)}})}var B=n(c(),1),V=n(y(),1);async function H(e,t){e||=process.cwd();let n=process.env.CI===`true`||!process.stdout.isTTY;await s(e);let r=await m(),c=p();if(!c)throw Error(`No Blink host configured`);let d=new u({baseURL:c,authToken:r,fetch:(e,t)=>{let n=new Headers(t?.headers);return n.set(`x-blink-cli-version`,i),fetch(e,{...t,headers:n})}}),y=await o(e,`package.json`);if(!y)throw Error(`package.json not found`);let b=await E(y,`utf-8`),x=JSON.parse(b),S=ne(y),ie=w(S,`.blink`,`config.json`),O={};if(re(ie)){let e=await E(ie,`utf-8`);O=JSON.parse(e)}process.env.BLINK_ORGANIZATION_ID&&(O.organizationId=process.env.BLINK_ORGANIZATION_ID),process.env.BLINK_AGENT_ID&&(O.agentId=process.env.BLINK_AGENT_ID);let k;if(O?.organizationId)try{k=(await d.organizations.get(O.organizationId)).name}catch{O.organizationId=void 0}if(!O?.organizationId){let e=await d.organizations.list();if(e.length===1)O.organizationId=e[0].id,k=e[0].name;else if(n)throw Error(`Multiple organizations found. To use CI mode, please deploy in interactive mode first to select an organization and generate .blink/config.json`);else{let t=await _({message:`Which organization should contain this agent?`,options:e.map(e=>({value:e.id,label:e.name}))});if(h(t))return;O.organizationId=t,k=e.find(e=>e.id===t).name,console.log()}}let A,j=!1,M=!1;if(O?.agentId)try{A=(await d.agents.get(O.agentId)).name}catch{O.agentId=void 0}if(!O?.agentId)try{let e=await d.organizations.agents.get({organization_id:O.organizationId,agent_name:x.name});O.agentId=e.id,A=e.name}catch{j=!0,A=x.name}j?console.log(g.bold(`blink■`)+` creating agent `+k+`/`+A):console.log(g.bold(`blink■`)+` deploying agent `+k+`/`+A);let ce=Date.now(),N=l(S),P=await new Promise((e,t)=>{N.build({cwd:S,entry:N.entry,outdir:N.outdir,watch:!1,onStart:()=>{},onResult:t=>{e(t)}}).catch(t)});if(!P)throw Error(`Failed to build agent`);if(`error`in P)throw Error(P.error.message);let le=Date.now()-ce;console.log(g.gray(`Built ${g.dim(`(${le}ms)`)}`));let ue=await ae(P.outdir),F=Object.fromEntries(ue.map(e=>[w(P.outdir,e),e])),I=w(e,`README.md`);await U(I)&&(F[I]=`README.md`);let de=await he(S),fe=Object.fromEntries(de.map(e=>[e,T(S,e)])),L=Object.entries(F),pe=Object.entries(fe),R=[...L,...pe],z=R.length,B=0,V=0,H=0,q=Array(z);await me(R,10,async([e,t],n)=>{let r=(await D(e)).size,i=++B;K(`${g.dim(`[${i}/${z}]`)} Uploading ${t} (${G(r)})...`);let a=await E(e),o=await d.files.upload(new File([Buffer.from(a)],t));q[n]={path:t,id:o.id},V+=1,H+=r}),K(g.gray(`Uploaded ${z} ${z===1?`file`:`files`} ${g.dim(`(${G(H)})`)}`)),process.stdout.write(`
|
|
21
|
+
`);let J=q.filter(Boolean),ge=J.slice(0,L.length),_e=J.slice(L.length),Y=await W(w(e,`.env.production`));if(j){let t=w(e,`.env.local`),r=w(e,`.env.production`),i=await W(t),a=Object.keys(i).filter(e=>!Y[e]);if(a.length>0)if(n)console.log(g.yellow(`Warning:`)+` Missing ${a.length} var${a.length===1?``:`s`} in .env.production: ${a.join(`, `)}`),console.log(g.dim(` Skipping in CI mode. Set these in .env.production if needed.`));else{console.log(`
|
|
22
|
+
`+g.cyan(`Environment Variables`)),console.log(g.dim(` Missing ${a.length} var${a.length===1?``:`s`} in .env.production: ${a.join(`, `)}`));let e=await v({message:`Copy missing vars from .env.local to .env.production?`,initialValue:!0});if(h(e))return;if(console.log(),e){for(let e of a)Y[e]=i[e];await oe(r,`# Environment variables for production deployment\n${Object.entries(Y).map(([e,t])=>`${e}=${t}`).join(`
|
|
23
|
+
`)}`,`utf-8`)}}let o=ee(e);if(o)if(n)console.log(g.dim(` Skipping webhook tunnel migration in CI mode`));else{let e=`https://${o}.blink.host`;console.log(`
|
|
24
|
+
`+g.cyan(`Webhook Tunnel`)),console.log(g.dim(` Current: ${e} → local dev`)),console.log(g.dim(` After: ${e} → production`)),console.log(g.dim(` Migrating will keep your webhooks working in production`));let t=await v({message:`Migrate tunnel to production?`});if(h(t))return;console.log(),t&&(M=!0)}}let X=Object.entries(Y);if(j){let t=ee(e),n=await d.agents.create({name:x.name,organization_id:O.organizationId,request_id:M?t:void 0,entrypoint:C(P.entry),output_files:ge,source_files:_e,env:X.map(([e,t])=>({key:e,value:t,target:[`production`,`preview`],secret:!0}))});O.agentId=n.id,A=n.name;let r=`${c}/${k}/${A}`;console.log(g.gray(`Agent created ${g.dim(r)}`))}else if(X.length>0){let e=0;for(let[t,n]of X)await d.agents.env.create({agent_id:O.agentId,key:t,value:n,target:[`production`,`preview`],secret:!0,upsert:!0}),K(`${g.dim(`[${++e}/${X.length}]`)} Updating environment variable: ${t} ${g.dim(`(.env.production)`)}`);K(g.gray(`Updated ${X.length} environment ${X.length===1?`variable`:`variables`} ${g.dim(`(.env.production)`)}`)),process.stdout.write(`
|
|
25
|
+
`)}let ve=await W(w(e,`.env.local`)),Z=Object.keys(ve).filter(e=>!Object.keys(Y).includes(e));if(Z.length>0)if(n){console.log(g.yellow(`Warning:`)+` The following environment variables are set in .env.local but not in .env.production:`);for(let e of Z)console.log(`- ${e}`);console.log(g.dim(` Continuing deployment in CI mode`))}else{console.log(`Warning: The following environment variables are set in .env.local but not in .env.production:`);for(let e of Z)console.log(`- ${e}`);let e=await v({message:`Do you want to deploy anyway?`});if(e===!1||h(e))return}let ye=j?(await d.agents.deployments.list({agent_id:O.agentId})).items[0]:await d.agents.deployments.create({agent_id:O.agentId,target:`production`,entrypoint:C(P.entry),output_files:ge,source_files:_e,message:t?.message}),Q=`${c}/${k}/${A}/deployments/${ye.number}`;console.log(g.gray(`View Deployment ${g.dim(Q)}`)),n||await a(S,O);let $=f();$.start(`Waiting for deployment to be live...`);try{for(;;){let t=await d.agents.deployments.get({agent_id:O.agentId,deployment_id:ye.id});if(t.status===`success`){$.stop(),j?(console.log(`Your agent is live.`),console.log(g.dim(Q))):(console.log(`Deployed. All new chats will use this version.`),console.log(g.dim(Q))),M&&(te(e),console.log(g.yellow(`Note:`)+` To continue developing locally with webhooks, you'll need to reconfigure external services (Slack, GitHub, etc.)`),Object.keys(ve).some(e=>e.toLowerCase().includes(`slack`))&&console.log(`Run ${g.cyan(`blink setup slack-app`)} to create a new Slack app for development.`));break}if(t.status===`failed`){$.stop(`Failed`+(t.error_message?`: ${t.error_message}`:``)),console.log(),console.log(`Logs: `+g.dim(Q));return}await new Promise(e=>setTimeout(e,500))}}catch(e){$.stop(`Failed to poll deployment status`),console.log(),console.log(`Error: `+se(e)),console.log(`Logs: `+g.dim(Q))}}const U=async e=>{try{return await D(e),!0}catch{return!1}};async function W(e){return await U(e)?(0,B.parse)(await E(e,`utf-8`)):{}}async function me(e,t,n){let r=Array(e.length),i=0,a=Array(Math.min(t,e.length)).fill(0).map(async()=>{for(;;){let t=i++;if(t>=e.length)break;r[t]=await n(e[t],t)}});return await Promise.all(a),r}function G(e){if(e===0)return`0B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(t)),i=e/t**+r;return`${i.toFixed(i>=100?0:i>=10?1:2)}${n[r]}`}function K(e){if(process.stdout.isTTY)try{process.stdout.clearLine(0),process.stdout.cursorTo(0),process.stdout.write(e);return}catch{}console.log(e)}async function he(e){let t=[],n=(0,V.default)().add([`.git`,`node_modules`,`.blink`,`.env`,`.env.*`]),r=w(e,`.gitignore`);if(await U(r)){let e=await E(r,`utf-8`);n.add(e)}async function i(r,a=e){let o=await ae(r,{withFileTypes:!0});for(let e of o){let o=w(r,e.name),s=T(a,o);n.ignores(s)||(e.isDirectory()?await i(o,a):e.isFile()&&t.push(o))}}return await i(e),t}if(globalThis.WebSocket||(globalThis.WebSocket=r.default),globalThis.Bun!==void 0){let e=t(`perf_hooks`);e.monitorEventLoopDelay=()=>({enable:()=>{}})}globalThis.crypto||(globalThis.crypto={}),globalThis.crypto.randomUUID||(globalThis.crypto.randomUUID=()=>S()),N.name(`blink`).description(`Blink is a runtime for building and deploying AI agents.`).version(i).action(()=>{N.outputHelp()});const q=e=>async(...t)=>{let{default:n}=await e();return n(...t)};N.command(`init [directory]`).description(`Initialize a new Blink agent.`).action(q(()=>import(`./init-CO5TBme9.js`))),N.command(`dev [directory] [options]`).description(`Start a development server for your agent.`).action(q(()=>import(`./dev-DRc-HUQD.js`))),N.command(`deploy [directory]`).description(`Deploy your agent to the Blink Cloud.`).option(`-m, --message <message>`,`Message for this deployment`).action(H),N.command(`pull [agent]`).description(`Pull an agent's source code to a local directory.`).option(`-d, --dir <directory>`,`Target directory (default: current directory)`).action((e=>async(...t)=>{let{default:n}=await e(),r=await n(...t);r!==0&&process.exit(r)})(()=>import(`./pull-BGcjDkHJ.js`))),N.command(`build [directory]`).description(`Build your agent for production.`).action(z);const J=N.command(`setup`).description(`Set up integrations for your agent.`);J.command(`slack-app [directory]`).description(`Set up Slack app integration`).action(x),J.command(`github-app [directory]`).description(`Set up GitHub App integration`).action(b),N.command(`telemetry [boolean]`).description(`Enable or disable telemetry.`),N.command(`start [directory]`).description("Starts the Blink runtime in production mode. The agent must be compiled with `blink build` first."),N.command(`run <message...>`).description(`Run your agent programmatically and get the response.`).option(`-d, --directory <directory>`,`Directory to run the agent from (default: current directory)`).option(`-c, --chat <chat>`,`Chat key to use (default: 'default')`).action(q(()=>import(`./run-SQMvtzUV.js`))),N.command(`connect`,{hidden:!0}).description(`Connect compute to the Blink Cloud.`).action(q(()=>import(`./connect-CrE2QpMS.js`))),N.command(`chat`,{hidden:!0}).description(`Start a Blink chat connected to your machine.`).action(q(()=>import(`./chat-DY4IWEHl.js`))),N.command(`login [url]`).description(`Log in to a Blink platform. Optionally specify a custom host URL.`).action(q(()=>import(`./login-C60LmqjM.js`))),N.command(`logout`).description(`Log out from the Blink platform and remove saved credentials.`).action(q(()=>import(`./logout-2bj6PyZi.js`))),N.command(`compute`).description(`Compute-related commands.`).command(`server`).description(`Run a compute protocol server on localhost.`).action(q(()=>import(`./compute-server-qi2ObZrP.js`))),N.configureOutput({writeErr:e=>{let t=e.replace(/\x1b\[[0-9;]*m/g,``);d.error(t.trim())}}),process.on(`unhandledRejection`,e=>{d.error(e?.message||String(e)),process.exit(1)}),N.parse(process.argv);export{};
|