@wix/cli-app 1.1.35 → 1.1.37
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/build/{CreateVersionCommand-FGFXCQ6O.js → CreateVersionCommand-6EC4JSXM.js} +2 -2
- package/build/CreateVersionCommand-6EC4JSXM.js.map +1 -0
- package/build/DevCommand-X6EMKMNL.js +4 -0
- package/build/DevCommand-X6EMKMNL.js.map +1 -0
- package/build/GenerateCommand-OMONJKBI.js +99 -0
- package/build/GenerateCommand-OMONJKBI.js.map +1 -0
- package/build/LogsCommand-J2FI7ZFQ.js +4 -0
- package/build/LogsCommand-J2FI7ZFQ.js.map +1 -0
- package/build/PreviewCommand-62VXVRKG.js +4 -0
- package/build/{ServeCommand-3XS2PRLZ.js → ServeCommand-MITPYVYW.js} +2 -2
- package/build/ServeCommand-MITPYVYW.js.map +1 -0
- package/build/{build-R2V6VPAY.js → build-QYESI24D.js} +2 -2
- package/build/build-QYESI24D.js.map +1 -0
- package/build/{chunk-CBDNKNAV.js → chunk-22T5OFY2.js} +2 -2
- package/build/chunk-22T5OFY2.js.map +1 -0
- package/build/chunk-2M3UC7RV.js +4 -0
- package/build/chunk-2M3UC7RV.js.map +1 -0
- package/build/{chunk-R4ZQYYZR.js → chunk-7DTNPXX6.js} +2 -2
- package/build/{chunk-3T3H3UJF.js → chunk-7IFG7QRE.js} +3 -3
- package/build/chunk-7IFG7QRE.js.map +1 -0
- package/build/chunk-CKCOR335.js +10 -0
- package/build/chunk-CKCOR335.js.map +1 -0
- package/build/{chunk-2JOP4YNL.js → chunk-CXOD6WQ4.js} +2 -2
- package/build/chunk-CXOD6WQ4.js.map +1 -0
- package/build/chunk-E6KVS4MA.js +4 -0
- package/build/chunk-E6KVS4MA.js.map +1 -0
- package/build/{chunk-OWEB37KH.js → chunk-EQUG3BNW.js} +2 -2
- package/build/chunk-FVAP6LIO.js +4 -0
- package/build/chunk-FVAP6LIO.js.map +1 -0
- package/build/chunk-HDM7FXQ2.js +4 -0
- package/build/chunk-HMROXS2Y.js +116 -0
- package/build/{chunk-5JYQ2Z7Y.js.map → chunk-HMROXS2Y.js.map} +1 -1
- package/build/{chunk-ZORLYW6M.js → chunk-JA2XJ7LG.js} +2 -2
- package/build/{chunk-YT6VEJPK.js → chunk-KEE43HZL.js} +2 -2
- package/build/chunk-KEE43HZL.js.map +1 -0
- package/build/{chunk-KRQ3H7GR.js → chunk-PVYYLEXH.js} +2 -2
- package/build/chunk-PVYYLEXH.js.map +1 -0
- package/build/chunk-QCRAQWKR.js +11 -0
- package/build/chunk-QCRAQWKR.js.map +1 -0
- package/build/{chunk-QEH4HZND.js → chunk-RPHPWNCA.js} +2 -2
- package/build/chunk-T3M3WLBF.js +4 -0
- package/build/chunk-T3M3WLBF.js.map +1 -0
- package/build/chunk-U6DFVNFC.js +4 -0
- package/build/chunk-U6DFVNFC.js.map +1 -0
- package/build/chunk-XFE6VTSD.js +233 -0
- package/build/chunk-XFE6VTSD.js.map +1 -0
- package/build/{chunk-A3KHJIN7.js → chunk-XMBKXITX.js} +2 -2
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/platform-sdk/chunk-OSR2I5MY.js +2 -0
- package/build/platform-sdk/chunk-OSR2I5MY.js.map +1 -0
- package/build/platform-sdk/chunk-SHVQ4QZG.js +2 -0
- package/build/platform-sdk/chunk-SHVQ4QZG.js.map +1 -0
- package/build/platform-sdk/chunk-TEDR2MDT.js +2 -0
- package/build/platform-sdk/dashboard.js +1 -1
- package/build/platform-sdk/dashboard.js.map +1 -1
- package/build/platform-sdk/editor.js +8 -0
- package/build/platform-sdk/editor.js.map +1 -0
- package/build/platform-sdk/{esm-IUMNLA6B.js → esm-WXLS5NTC.js} +2 -2
- package/build/platform-sdk/esm-WXLS5NTC.js.map +1 -0
- package/build/platform-sdk/site.js +2 -0
- package/build/platform-sdk/site.js.map +1 -0
- package/build/preview-YWEFS3GP.js +4 -0
- package/build/{preview-5HAC2VHN.js.map → preview-YWEFS3GP.js.map} +1 -1
- package/build/render-command-QQQFQTR7.js +4 -0
- package/build/render-command-QQQFQTR7.js.map +1 -0
- package/internal/component-hmr-wrapper.tsx +0 -1
- package/package.json +9 -6
- package/schemas/ecom-additional-fees.json +1 -0
- package/schemas/ecom-discounts-trigger.json +1 -0
- package/schemas/ecom-payment-settings.json +1 -0
- package/schemas/ecom-shipping-rates.json +1 -0
- package/schemas/ecom-validations.json +1 -0
- package/templates/custom-element/dependencies.json +1 -2
- package/templates/custom-element/files/element.module.css.ejs +22 -0
- package/templates/custom-element/files/element.tsx.ejs +11 -10
- package/templates/custom-element/files/panel.tsx.ejs +26 -32
- package/templates/dashboard-modal/dependencies.json +2 -3
- package/templates/dashboard-modal/files/modal.tsx.ejs +11 -16
- package/templates/dashboard-page/dependencies.json +1 -3
- package/templates/dashboard-page/files/page.tsx.ejs +7 -11
- package/templates/dashboard-plugin/dependencies.json +1 -3
- package/templates/dashboard-plugin/files/plugin.tsx.ejs +6 -10
- package/templates/service-plugin/ecom-additional-fees/dependencies.json +5 -0
- package/templates/service-plugin/ecom-additional-fees/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-additional-fees/files/plugin.ts.ejs +12 -0
- package/templates/service-plugin/ecom-discounts-trigger/dependencies.json +5 -0
- package/templates/service-plugin/ecom-discounts-trigger/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-discounts-trigger/files/plugin.ts.ejs +17 -0
- package/templates/service-plugin/ecom-payment-settings/dependencies.json +5 -0
- package/templates/service-plugin/ecom-payment-settings/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-payment-settings/files/plugin.ts.ejs +12 -0
- package/templates/service-plugin/ecom-shipping-rates/dependencies.json +5 -0
- package/templates/service-plugin/ecom-shipping-rates/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-shipping-rates/files/plugin.ts.ejs +12 -0
- package/templates/service-plugin/ecom-validations/dependencies.json +5 -0
- package/templates/service-plugin/ecom-validations/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-validations/files/plugin.ts.ejs +12 -0
- package/build/CreateVersionCommand-FGFXCQ6O.js.map +0 -1
- package/build/DevCommand-5DVDWGBY.js +0 -4
- package/build/DevCommand-5DVDWGBY.js.map +0 -1
- package/build/GenerateCommand-5MXGDU5D.js +0 -99
- package/build/GenerateCommand-5MXGDU5D.js.map +0 -1
- package/build/LogsCommand-GT4C6W63.js +0 -4
- package/build/LogsCommand-GT4C6W63.js.map +0 -1
- package/build/PreviewCommand-TYTUHLCK.js +0 -4
- package/build/ServeCommand-3XS2PRLZ.js.map +0 -1
- package/build/build-R2V6VPAY.js.map +0 -1
- package/build/chunk-2JOP4YNL.js.map +0 -1
- package/build/chunk-3T3H3UJF.js.map +0 -1
- package/build/chunk-5JYQ2Z7Y.js +0 -116
- package/build/chunk-5YLHD2SK.js +0 -4
- package/build/chunk-A7TURNR5.js +0 -4
- package/build/chunk-A7TURNR5.js.map +0 -1
- package/build/chunk-CBDNKNAV.js.map +0 -1
- package/build/chunk-F6WBFD2I.js +0 -11
- package/build/chunk-F6WBFD2I.js.map +0 -1
- package/build/chunk-J2KSZ5LE.js +0 -4
- package/build/chunk-J2KSZ5LE.js.map +0 -1
- package/build/chunk-KRQ3H7GR.js.map +0 -1
- package/build/chunk-MI2F3EIB.js +0 -4
- package/build/chunk-MI2F3EIB.js.map +0 -1
- package/build/chunk-NNF6JCN7.js +0 -4
- package/build/chunk-NNF6JCN7.js.map +0 -1
- package/build/chunk-PWHZSGUV.js +0 -10
- package/build/chunk-PWHZSGUV.js.map +0 -1
- package/build/chunk-RXT5UM7Q.js +0 -184
- package/build/chunk-RXT5UM7Q.js.map +0 -1
- package/build/chunk-VRNTLFVH.js +0 -4
- package/build/chunk-VRNTLFVH.js.map +0 -1
- package/build/chunk-YT6VEJPK.js.map +0 -1
- package/build/platform-sdk/chunk-RFBBAUMM.js +0 -2
- package/build/platform-sdk/esm-IUMNLA6B.js.map +0 -1
- package/build/preview-5HAC2VHN.js +0 -4
- package/build/render-command-OPJNFJRC.js +0 -4
- package/build/render-command-OPJNFJRC.js.map +0 -1
- /package/build/{PreviewCommand-TYTUHLCK.js.map → PreviewCommand-62VXVRKG.js.map} +0 -0
- /package/build/{chunk-R4ZQYYZR.js.map → chunk-7DTNPXX6.js.map} +0 -0
- /package/build/{chunk-OWEB37KH.js.map → chunk-EQUG3BNW.js.map} +0 -0
- /package/build/{chunk-5YLHD2SK.js.map → chunk-HDM7FXQ2.js.map} +0 -0
- /package/build/{chunk-ZORLYW6M.js.map → chunk-JA2XJ7LG.js.map} +0 -0
- /package/build/{chunk-QEH4HZND.js.map → chunk-RPHPWNCA.js.map} +0 -0
- /package/build/{chunk-A3KHJIN7.js.map → chunk-XMBKXITX.js.map} +0 -0
- /package/build/platform-sdk/{chunk-RFBBAUMM.js.map → chunk-TEDR2MDT.js.map} +0 -0
package/build/chunk-PWHZSGUV.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
-
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{Ha as Te,Ia as Ce,Ka as Ot,Oa as Pt,a as ve,b as wt,c as bt,d as G,m as Et,u as vt}from"./chunk-5JYQ2Z7Y.js";import{a as Vn,d as Oe,e as Pe,l as F,m as te}from"./chunk-2JOP4YNL.js";import{a as x,c as _,e as ee,g as f,h as s}from"./chunk-V4TR6DCM.js";var $t=_((ba,jt)=>{"use strict";s();jt.exports=Nt;Nt.sync=Kn;var Rt=x("fs");function Xn(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function Lt(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:Xn(t,r)}function Nt(e,t,r){Rt.stat(e,function(n,o){r(n,n?!1:Lt(o,e,t))})}function Kn(e,t){return Lt(Rt.statSync(e),e,t)}});var Gt=_((va,Bt)=>{"use strict";s();Bt.exports=kt;kt.sync=Yn;var Dt=x("fs");function kt(e,t,r){Dt.stat(e,function(n,o){r(n,n?!1:Ut(o,t))})}function Yn(e,t){return Ut(Dt.statSync(e),t)}function Ut(e,t){return e.isFile()&&Zn(e,t)}function Zn(e,t){var r=e.mode,n=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),c=parseInt("100",8),l=parseInt("010",8),p=parseInt("001",8),u=c|l,h=r&p||r&l&&o===a||r&c&&n===i||r&u&&i===0;return h}});var Mt=_((Ta,Ft)=>{"use strict";s();var Pa=x("fs"),ne;process.platform==="win32"||global.TESTING_WINDOWS?ne=$t():ne=Gt();Ft.exports=Ie;Ie.sync=Qn;function Ie(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){Ie(e,t||{},function(i,a){i?o(i):n(a)})})}ne(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function Qn(e,t){try{return ne.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Xt=_((Ia,Jt)=>{"use strict";s();var j=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",qt=x("path"),eo=j?";":":",Vt=Mt(),zt=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Ht=(e,t)=>{let r=t.colon||eo,n=e.match(/\//)||j&&e.match(/\\/)?[""]:[...j?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=j?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=j?o.split(r):[""];return j&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},Wt=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:i}=Ht(e,t),a=[],c=p=>new Promise((u,h)=>{if(p===n.length)return t.all&&a.length?u(a):h(zt(e));let m=n[p],g=/^".*"$/.test(m)?m.slice(1,-1):m,y=qt.join(g,e),b=!g&&/^\.[\\\/]/.test(e)?e.slice(0,2)+y:y;u(l(b,p,0))}),l=(p,u,h)=>new Promise((m,g)=>{if(h===o.length)return m(c(u+1));let y=o[h];Vt(p+y,{pathExt:i},(b,E)=>{if(!b&&E)if(t.all)a.push(p+y);else return m(p+y);return m(l(p,u,h+1))})});return r?c(0).then(p=>r(null,p),r):c(0)},to=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=Ht(e,t),i=[];for(let a=0;a<r.length;a++){let c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,p=qt.join(l,e),u=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;for(let h=0;h<n.length;h++){let m=u+n[h];try{if(Vt.sync(m,{pathExt:o}))if(t.all)i.push(m);else return m}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw zt(e)};Jt.exports=Wt;Wt.sync=to});var Yt=_((Ra,Ae)=>{"use strict";s();var Kt=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Ae.exports=Kt;Ae.exports.default=Kt});var tr=_((Na,er)=>{"use strict";s();var Zt=x("path"),ro=Xt(),no=Yt();function Qt(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let a;try{a=ro.sync(e.command,{path:r[no({env:r})],pathExt:t?Zt.delimiter:void 0})}catch{}finally{i&&process.chdir(n)}return a&&(a=Zt.resolve(o?e.options.cwd:"",a)),a}function oo(e){return Qt(e)||Qt(e,!0)}er.exports=oo});var rr=_(($a,Le)=>{"use strict";s();var Re=/([()\][%!^"`<>&|;, *?])/g;function io(e){return e=e.replace(Re,"^$1"),e}function so(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(Re,"^$1"),t&&(e=e.replace(Re,"^$1")),e}Le.exports.command=io;Le.exports.argument=so});var or=_((ka,nr)=>{"use strict";s();nr.exports=/^#!(.*)/});var sr=_((Ba,ir)=>{"use strict";s();var ao=or();ir.exports=(e="")=>{let t=e.match(ao);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var cr=_((Fa,ar)=>{"use strict";s();var Ne=x("fs"),co=sr();function lo(e){let r=Buffer.alloc(150),n;try{n=Ne.openSync(e,"r"),Ne.readSync(n,r,0,150,0),Ne.closeSync(n)}catch{}return co(r.toString())}ar.exports=lo});var dr=_((qa,fr)=>{"use strict";s();var uo=x("path"),lr=tr(),ur=rr(),fo=cr(),po=process.platform==="win32",mo=/\.(?:com|exe)$/i,ho=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function go(e){e.file=lr(e);let t=e.file&&fo(e.file);return t?(e.args.unshift(e.file),e.command=t,lr(e)):e.file}function yo(e){if(!po)return e;let t=go(e),r=!mo.test(t);if(e.options.forceShell||r){let n=ho.test(t);e.command=uo.normalize(e.command),e.command=ur.command(e.command),e.args=e.args.map(i=>ur.argument(i,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function _o(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:yo(n)}fr.exports=_o});var hr=_((za,mr)=>{"use strict";s();var je=process.platform==="win32";function $e(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function xo(e,t){if(!je)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let i=pr(o,t,"spawn");if(i)return r.call(e,"error",i)}return r.apply(e,arguments)}}function pr(e,t){return je&&e===1&&!t.file?$e(t.original,"spawn"):null}function So(e,t){return je&&e===1&&!t.file?$e(t.original,"spawnSync"):null}mr.exports={hookChildProcess:xo,verifyENOENT:pr,verifyENOENTSync:So,notFoundError:$e}});var _r=_((Wa,$)=>{"use strict";s();var gr=x("child_process"),De=dr(),ke=hr();function yr(e,t,r){let n=De(e,t,r),o=gr.spawn(n.command,n.args,n.options);return ke.hookChildProcess(o,n),o}function wo(e,t,r){let n=De(e,t,r),o=gr.spawnSync(n.command,n.args,n.options);return o.error=o.error||ke.verifyENOENTSync(o.status,n),o}$.exports=yr;$.exports.spawn=yr;$.exports.sync=wo;$.exports._parse=De;$.exports._enoent=ke});var zr=_((xl,Vr)=>{"use strict";s();var{PassThrough:_i}=x("stream");Vr.exports=function(){var e=[],t=new _i({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=n,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(r),t;function r(i){return Array.isArray(i)?(i.forEach(r),this):(e.push(i),i.once("end",o.bind(null,i)),i.once("error",t.emit.bind(t,"error")),i.pipe(t,{end:!1}),this)}function n(){return e.length==0}function o(i){e=e.filter(function(a){return a!==i}),!e.length&&t.readable&&t.end()}}});var H=_((nu,dn)=>{"use strict";s();var Mi=Object.create,_e=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,Vi=Object.getOwnPropertyNames,zi=Object.getPrototypeOf,Hi=Object.prototype.hasOwnProperty,Wi=(e,t)=>{for(var r in t)_e(e,r,{get:t[r],enumerable:!0})},cn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vi(t))!Hi.call(e,o)&&o!==r&&_e(e,o,{get:()=>t[o],enumerable:!(n=qi(t,o))||n.enumerable});return e},Ji=(e,t,r)=>(r=e!=null?Mi(zi(e)):{},cn(t||!e||!e.__esModule?_e(r,"default",{value:e,enumerable:!0}):r,e)),Xi=e=>cn(_e({},"__esModule",{value:!0}),e),ln={};Wi(ln,{CLOUDFLARED_VERSION:()=>Zi,DEFAULT_CLOUDFLARED_BIN:()=>un,RELEASE_BASE:()=>Qi,bin:()=>fn,use:()=>Yi});dn.exports=Xi(ln);var Ki=Ji(x("node:path")),un=Ki.default.join(f,"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared"),fn=process.env.CLOUDFLARED_BIN||un;function Yi(e){fn=e}var Zi=process.env.CLOUDFLARED_VERSION||"latest",Qi="https://github.com/cloudflare/cloudflared/releases/"});var hn=_((iu,mn)=>{"use strict";s();var ct=Object.defineProperty,es=Object.getOwnPropertyDescriptor,ts=Object.getOwnPropertyNames,rs=Object.prototype.hasOwnProperty,ns=(e,t)=>{for(var r in t)ct(e,r,{get:t[r],enumerable:!0})},os=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ts(t))!rs.call(e,o)&&o!==r&&ct(e,o,{get:()=>t[o],enumerable:!(n=es(t,o))||n.enumerable});return e},is=e=>os(ct({},"__esModule",{value:!0}),e),pn={};ns(pn,{UnsupportedError:()=>at});mn.exports=is(pn);var at=class extends Error{constructor(t){super(t)}}});var bn=_((au,wn)=>{"use strict";s();var ss=Object.create,xe=Object.defineProperty,as=Object.getOwnPropertyDescriptor,cs=Object.getOwnPropertyNames,ls=Object.getPrototypeOf,us=Object.prototype.hasOwnProperty,fs=(e,t)=>{for(var r in t)xe(e,r,{get:t[r],enumerable:!0})},gn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cs(t))!us.call(e,o)&&o!==r&&xe(e,o,{get:()=>t[o],enumerable:!(n=as(t,o))||n.enumerable});return e},lt=(e,t,r)=>(r=e!=null?ss(ls(e)):{},gn(t||!e||!e.__esModule?xe(r,"default",{value:e,enumerable:!0}):r,e)),ds=e=>gn(xe({},"__esModule",{value:!0}),e),yn={};fs(yn,{install:()=>_s,install_linux:()=>_n,install_macos:()=>xn,install_windows:()=>Sn});wn.exports=ds(yn);var A=lt(x("node:fs")),W=lt(x("node:path")),ps=lt(x("node:https")),ms=x("node:child_process"),D=H(),Se=hn(),hs={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},gs={arm64:"cloudflared-darwin-amd64.tgz",x64:"cloudflared-darwin-amd64.tgz"},ys={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe"};function ut(e){return e==="latest"?`${D.RELEASE_BASE}latest/download/`:`${D.RELEASE_BASE}download/${e}/`}async function _s(e,t=D.CLOUDFLARED_VERSION){if(process.platform==="linux")return _n(e,t);if(process.platform==="darwin")return xn(e,t);if(process.platform==="win32")return Sn(e,t);throw new Se.UnsupportedError("Unsupported platform: "+process.platform)}async function _n(e,t=D.CLOUDFLARED_VERSION){let r=hs[process.arch];if(r===void 0)throw new Se.UnsupportedError("Unsupported architecture: "+process.arch);return await we(ut(t)+r,e),A.default.chmodSync(e,"755"),e}async function xn(e,t=D.CLOUDFLARED_VERSION){let r=gs[process.arch];if(r===void 0)throw new Se.UnsupportedError("Unsupported architecture: "+process.arch);return await we(ut(t)+r,`${e}.tgz`),process.env.VERBOSE&&console.log(`Extracting to ${e}`),(0,ms.execSync)(`tar -xzf ${W.default.basename(`${e}.tgz`)}`,{cwd:W.default.dirname(e)}),A.default.unlinkSync(`${e}.tgz`),A.default.renameSync(`${W.default.dirname(e)}/cloudflared`,e),e}async function Sn(e,t=D.CLOUDFLARED_VERSION){let r=ys[process.arch];if(r===void 0)throw new Se.UnsupportedError("Unsupported architecture: "+process.arch);return await we(ut(t)+r,e),e}function we(e,t,r=0){return r===0?process.env.VERBOSE&&console.log(`Downloading ${e} to ${t}`):process.env.VERBOSE&&console.log(`Redirecting to ${e}`),A.default.existsSync(W.default.dirname(t))||A.default.mkdirSync(W.default.dirname(t),{recursive:!0}),new Promise((n,o)=>{let i=ps.default.get(e,a=>{if([301,302,303,307,308].includes(a.statusCode)&&a.headers.location!==void 0){i.destroy();let l=a.headers.location;n(we(l,t,r+1));return}if(a.statusCode&&a.statusCode>=200&&a.statusCode<300){let l=A.default.createWriteStream(t);l.on("finish",()=>{l.close(()=>n(t))}),l.on("error",p=>{A.default.unlink(t,()=>o(p))}),a.pipe(l)}else i.destroy(),o(new Error(`HTTP response with status code: ${a.statusCode}`))});i.on("error",a=>{o(a)}),i.end()})}});var dt=_((lu,vn)=>{"use strict";s();var ft=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Ss=Object.getOwnPropertyNames,ws=Object.prototype.hasOwnProperty,bs=(e,t)=>{for(var r in t)ft(e,r,{get:t[r],enumerable:!0})},Es=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ss(t))!ws.call(e,o)&&o!==r&&ft(e,o,{get:()=>t[o],enumerable:!(n=xs(t,o))||n.enumerable});return e},vs=e=>Es(ft({},"__esModule",{value:!0}),e),En={};bs(En,{config_regex:()=>Ns,conn_regex:()=>Os,connectorID_regex:()=>Rs,disconnect_regex:()=>Is,index_regex:()=>Cs,ip_regex:()=>Ps,location_regex:()=>Ts,metrics_regex:()=>Ls,tunnelID_regex:()=>As});vn.exports=vs(En);var Os=/connection[= ]([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12})/i,Ps=/ip=([0-9.]+)/,Ts=/location=([A-Za-z0-9]+)/,Cs=/connIndex=(\d)/,Is=/Unregistered tunnel connection connIndex=(\d)/i,As=/tunnelID=([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12})/i,Rs=/Connector ID: ([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12})/i,Ls=/metrics server on ([0-9.:]+\/metrics)/,Ns=/config="(.+[^\\])"/});var Tn=_((fu,Pn)=>{"use strict";s();var pt=Object.defineProperty,js=Object.getOwnPropertyDescriptor,$s=Object.getOwnPropertyNames,Ds=Object.prototype.hasOwnProperty,ks=(e,t)=>{for(var r in t)pt(e,r,{get:t[r],enumerable:!0})},Us=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of $s(t))!Ds.call(e,o)&&o!==r&&pt(e,o,{get:()=>t[o],enumerable:!(n=js(t,o))||n.enumerable});return e},Bs=e=>Us(pt({},"__esModule",{value:!0}),e),On={};ks(On,{tunnel:()=>Ms});Pn.exports=Bs(On);var Gs=x("node:child_process"),Fs=H(),be=dt();function Ms(e={}){let t=["tunnel"];for(let[m,g]of Object.entries(e))typeof g=="string"?t.push(`${m}`,g):typeof g=="number"?t.push(`${m}`,g.toString()):g===null&&t.push(`${m}`);t.length===1&&t.push("--url","localhost:8080");let r=(0,Gs.spawn)(Fs.bin,t,{stdio:["ignore","pipe","pipe"]});process.env.VERBOSE&&(r.stdout.pipe(process.stdout),r.stderr.pipe(process.stderr));let n=/\|\s+(https?:\/\/[^\s]+)/,o=()=>{},i=()=>{},a=new Promise((...m)=>[o,i]=m),c=[],l=[],p=[];for(let m=0;m<1;m++)p.push(new Promise((...g)=>[c[m],l[m]]=g));let u=m=>{var g;let y=m.toString(),b=y.match(n);b&&o(b[1]);let E=y.match(be.conn_regex),P=y.match(be.ip_regex),T=y.match(be.location_regex),C=y.match(be.index_regex);if(E&&P&&T&&C){let[,K]=E,[,Y]=P,[,Z]=T,[,Q]=C;(g=c[+Q])==null||g.call(c,{id:K,ip:Y,location:Z})}};return r.stdout.on("data",u).on("error",i),r.stderr.on("data",u).on("error",i),{url:a,connections:p,child:r,stop:()=>r.kill("SIGINT")}}});var Un=_((pu,kn)=>{"use strict";s();var qs=Object.create,Ee=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,zs=Object.getOwnPropertyNames,Hs=Object.getPrototypeOf,Ws=Object.prototype.hasOwnProperty,Js=(e,t)=>{for(var r in t)Ee(e,r,{get:t[r],enumerable:!0})},Cn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zs(t))!Ws.call(e,o)&&o!==r&&Ee(e,o,{get:()=>t[o],enumerable:!(n=Vs(t,o))||n.enumerable});return e},In=(e,t,r)=>(r=e!=null?qs(Hs(e)):{},Cn(t||!e||!e.__esModule?Ee(r,"default",{value:e,enumerable:!0}):r,e)),Xs=e=>Cn(Ee({},"__esModule",{value:!0}),e),An={};Js(An,{AlreadyInstalledError:()=>J,LINUX_SERVICE_PATH:()=>L,MACOS_SERVICE_PATH:()=>v,NotInstalledError:()=>N,clean:()=>Dn,current:()=>$n,err:()=>_t,exists:()=>O,identifier:()=>R,install:()=>Ln,journal:()=>xt,log:()=>jn,service:()=>Ks,service_name:()=>yt,uninstall:()=>Nn});kn.exports=Xs(An);var mt=In(x("node:os")),w=In(x("node:fs")),gt=x("node:child_process"),Rn=H(),S=dt(),R="com.cloudflare.cloudflared",yt="cloudflared.service",v={PLIST:ht()?`/Library/LaunchDaemons/${R}.plist`:`${mt.default.homedir()}/Library/LaunchAgents/${R}.plist`,OUT:ht()?`/Library/Logs/${R}.out.log`:`${mt.default.homedir()}/Library/Logs/${R}.out.log`,ERR:ht()?`/Library/Logs/${R}.err.log`:`${mt.default.homedir()}/Library/Logs/${R}.err.log`},L={SYSTEMD:`/etc/systemd/system/${yt}`,SERVICE:"/etc/init.d/cloudflared",SERVICE_OUT:"/var/log/cloudflared.log",SERVICE_ERR:"/var/log/cloudflared.err"},Ks={install:Ln,uninstall:Nn,exists:O,log:jn,err:_t,current:$n,clean:Dn,journal:xt},J=class extends Error{constructor(){super("service is already installed")}},N=class extends Error{constructor(){super("service is not installed")}};function Ln(e){if(!["darwin","linux"].includes(process.platform))throw new Error(`Not Implemented on platform ${process.platform}`);if(O())throw new J;let t=["service","install"];e&&t.push(e);let r=(0,gt.spawnSync)(Rn.bin,t);if(r.status!==0)throw new Error(`service install failed: ${r.stderr.toString()}`)}function Nn(){if(!["darwin","linux"].includes(process.platform))throw new Error(`Not Implemented on platform ${process.platform}`);if(!O())throw new N;let e=(0,gt.spawnSync)(Rn.bin,["service","uninstall"]);if(e.status!==0)throw new Error(`service uninstall failed: ${e.stderr.toString()}`);process.platform==="darwin"?(w.default.rmSync(v.OUT),w.default.rmSync(v.ERR)):process.platform==="linux"&&!k()&&(w.default.rmSync(L.SERVICE_OUT),w.default.rmSync(L.SERVICE_ERR))}function jn(){if(!O())throw new N;if(process.platform==="darwin")return w.default.readFileSync(v.OUT,"utf8");if(process.platform==="linux"&&!k())return w.default.readFileSync(L.SERVICE_OUT,"utf8");throw new Error(`Not Implemented on platform ${process.platform}`)}function _t(){if(!O())throw new N;if(process.platform==="darwin")return w.default.readFileSync(v.ERR,"utf8");if(process.platform==="linux"&&!k())return w.default.readFileSync(L.SERVICE_ERR,"utf8");throw new Error(`Not Implemented on platform ${process.platform}`)}function xt(e=300){if(process.platform==="linux"&&k()){let t=["-u",yt,"-o","cat","-n",e.toString()];return(0,gt.spawnSync)("journalctl",t).stdout.toString()}throw new Error(`Not Implemented on platform ${process.platform}`)}function $n(){var e,t,r,n;if(!["darwin","linux"].includes(process.platform))throw new Error(`Not Implemented on platform ${process.platform}`);if(!O())throw new N;let o=k()?xt():_t(),i="",a="",c=[],l="",p={};for(let u of o.split(`
|
|
4
|
-
`))try{if(u.match(S.tunnelID_regex))i=((e=u.match(S.tunnelID_regex))==null?void 0:e[1])??"";else if(u.match(S.connectorID_regex))a=((t=u.match(S.connectorID_regex))==null?void 0:t[1])??"";else if(u.match(S.conn_regex)&&u.match(S.location_regex)&&u.match(S.ip_regex)&&u.match(S.index_regex)){let[,h]=u.match(S.conn_regex)??[],[,m]=u.match(S.location_regex)??[],[,g]=u.match(S.ip_regex)??[],[,y]=u.match(S.index_regex)??[];c[parseInt(y)]={id:h,ip:g,location:m}}else if(u.match(S.disconnect_regex)){let[,h]=u.match(S.disconnect_regex)??[];parseInt(h)in c&&(c[parseInt(h)]={id:"",ip:"",location:""})}else u.match(S.metrics_regex)?l=((r=u.match(S.metrics_regex))==null?void 0:r[1])??"":u.match(S.config_regex)&&(p=JSON.parse(((n=u.match(S.config_regex))==null?void 0:n[1].replace(/\\/g,""))??"{}"))}catch(h){process.env.VERBOSE&&console.error("log parsing failed",h)}return{tunnelID:i,connectorID:a,connections:c,metrics:l,config:p}}function Dn(){if(process.platform!=="darwin")throw new Error(`Not Implemented on platform ${process.platform}`);if(O())throw new J;w.default.rmSync(v.OUT,{force:!0}),w.default.rmSync(v.ERR,{force:!0})}function O(){if(process.platform==="darwin")return w.default.existsSync(v.PLIST);if(process.platform==="linux")return k()?w.default.existsSync(L.SYSTEMD):w.default.existsSync(L.SERVICE);throw new Error(`Not Implemented on platform ${process.platform}`)}function ht(){var e;return((e=process.getuid)==null?void 0:e.call(process))===0}function k(){return process.platform==="linux"&&w.default.existsSync("/run/systemd/system")}});var Fn=_((hu,Gn)=>{"use strict";s();var St=Object.defineProperty,Ys=Object.getOwnPropertyDescriptor,Zs=Object.getOwnPropertyNames,Qs=Object.prototype.hasOwnProperty,ea=(e,t)=>{for(var r in t)St(e,r,{get:t[r],enumerable:!0})},ta=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Zs(t))!Qs.call(e,o)&&o!==r&&St(e,o,{get:()=>t[o],enumerable:!(n=Ys(t,o))||n.enumerable});return e},ra=e=>ta(St({},"__esModule",{value:!0}),e),Bn={};ea(Bn,{AlreadyInstalledError:()=>X.AlreadyInstalledError,MACOS_SERVICE_PATH:()=>X.MACOS_SERVICE_PATH,NotInstalledError:()=>X.NotInstalledError,bin:()=>na.bin,identifier:()=>X.identifier,install:()=>oa.install,service:()=>X.service,tunnel:()=>ia.tunnel});Gn.exports=ra(Bn);var na=H(),oa=bn(),ia=Tn(),X=Un()});s();var B=ee(Vn(),1);s();s();var zn={},Hn={},Wn={},Jn={};function Tt(e){var t={"bo._base_domain_":[{srcPath:"/_serverless/wix-app-backend-manager",destPath:""}],"wixbo.ai":[{srcPath:"/_serverless/wix-app-backend-manager",destPath:""}],"manage._base_domain_":[{srcPath:"/_serverless/wix-app-backend-manager",destPath:""}]};return wt(Object.assign(e,{domainToMappings:t}))}function Ct(e){var t=G(zn,{}),r=t.toJSON,n=t.fromJSON,o=G(Hn,{}).fromJSON;function i(a){var c=a.host,l=r(e),p={entityFqdn:"wix.apps.hosting.v1.deployment",method:"POST",methodFqn:"wix.apps.hosting.v1.BackendService.CreateTunnel",url:Tt({protoPath:"/v1/tunnel",data:l,host:c}),data:l,transformResponse:o};return p}return i.fromReq=n,i.__isAmbassador=!0,i}function It(e){var t=G(Wn,{}),r=t.toJSON,n=t.fromJSON,o=G(Jn,{}).fromJSON;function i(a){var c=a.host,l=r(e),p={entityFqdn:"wix.apps.hosting.v1.deployment",method:"DELETE",methodFqn:"wix.apps.hosting.v1.BackendService.DeleteTunnel",url:Tt({protoPath:"/v1/tunnel",data:l,host:c}),params:bt(l),transformResponse:o};return p}return i.fromReq=n,i.__isAmbassador=!0,i}s();var At=F.object({id:F.string(),token:F.string(),domain:F.string()});var re=class{constructor(t){this.httpClient=t;let{minRetryTimeout:r}=te();this.retryOptions={retries:3,minTimeout:r,maxTimeout:3*1e3}}retryOptions;createTunnel=async({port:t})=>{try{let{data:r}=await ve(()=>this.httpClient.request(Ct({port:t})),this.retryOptions);return At.parse(r)}catch(r){throw new Oe({code:Pe.FailedToCreateTunnel(),cause:r})}};deleteTunnel=async t=>{try{await ve(()=>this.httpClient.request(It({id:t})),this.retryOptions)}catch(r){throw new Oe({code:Pe.FailedToDeleteTunnel(),cause:r})}}};s();s();var on=ee(_r(),1);import{Buffer as Di}from"node:buffer";import ki from"node:path";import st from"node:child_process";import ge from"node:process";s();function Ue(e){let t=typeof e=="string"?`
|
|
5
|
-
`:10,r=typeof e=="string"?"\r":13;return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===r&&(e=e.slice(0,-1)),e}s();import ie from"node:process";import M from"node:path";import bo from"node:url";s();function oe(e={}){let{env:t=process.env,platform:r=process.platform}=e;return r!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}function Eo(e={}){let{cwd:t=ie.cwd(),path:r=ie.env[oe()],execPath:n=ie.execPath}=e,o,i=t instanceof URL?bo.fileURLToPath(t):t,a=M.resolve(i),c=[];for(;o!==a;)c.push(M.join(a,"node_modules/.bin")),o=a,a=M.resolve(a,"..");return c.push(M.resolve(i,n,"..")),[...c,r].join(M.delimiter)}function xr({env:e=ie.env,...t}={}){e={...e};let r=oe({env:e});return t.path=e[r],e[r]=Eo(t),e}s();s();var vo=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let o=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!Oo(o,i)&&n||Object.defineProperty(e,r,i)},Oo=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Po=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},To=(e,t)=>`/* Wrapped ${e}*/
|
|
6
|
-
${t}`,Co=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Io=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ao=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,o=To.bind(null,n,t.toString());Object.defineProperty(o,"name",Io),Object.defineProperty(e,"toString",{...Co,value:o})};function Be(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(let o of Reflect.ownKeys(t))vo(e,t,o,r);return Po(e,t),Ao(e,t,n),e}var se=new WeakMap,Sr=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,o=e.displayName||e.name||"<anonymous>",i=function(...a){if(se.set(i,++n),n===1)r=e.apply(this,a),e=null;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return r};return Be(i,e),se.set(i,n),i};Sr.callCount=e=>{if(!se.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return se.get(e)};var wr=Sr;s();import Go from"node:process";s();import{constants as jo}from"node:os";s();var br=()=>{let e=vr-Er+1;return Array.from({length:e},Ro)},Ro=(e,t)=>({name:`SIGRT${t+1}`,number:Er+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Er=34,vr=64;s();import{constants as Lo}from"node:os";s();var Or=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var Ge=()=>{let e=br();return[...Or,...e].map(No)},No=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{let{signals:{[e]:a}}=Lo,c=a!==void 0;return{name:e,number:c?a:t,description:r,supported:c,action:n,forced:o,standard:i}};var $o=()=>{let e=Ge();return Object.fromEntries(e.map(Do))},Do=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:a})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:a}],Pr=$o(),ko=()=>{let e=Ge(),t=65,r=Array.from({length:t},(n,o)=>Uo(o,e));return Object.assign({},...r)},Uo=(e,t)=>{let r=Bo(e,t);if(r===void 0)return{};let{name:n,description:o,supported:i,action:a,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:a,forced:c,standard:l}}},Bo=(e,t)=>{let r=t.find(({name:n})=>jo.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},wc=ko();var Fo=({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:a})=>e?`timed out after ${t} milliseconds`:a?"was canceled":r!==void 0?`failed with ${r}`:n!==void 0?`was killed with ${n} (${o})`:i!==void 0?`failed with exit code ${i}`:"failed",q=({stdout:e,stderr:t,all:r,error:n,signal:o,exitCode:i,command:a,escapedCommand:c,timedOut:l,isCanceled:p,killed:u,parsed:{options:{timeout:h,cwd:m=Go.cwd()}}})=>{i=i===null?void 0:i,o=o===null?void 0:o;let g=o===void 0?void 0:Pr[o].description,y=n&&n.code,E=`Command ${Fo({timedOut:l,timeout:h,errorCode:y,signal:o,signalDescription:g,exitCode:i,isCanceled:p})}: ${a}`,P=Object.prototype.toString.call(n)==="[object Error]",T=P?`${E}
|
|
7
|
-
${n.message}`:E,C=[T,t,e].filter(Boolean).join(`
|
|
8
|
-
`);return P?(n.originalMessage=n.message,n.message=C):n=new Error(C),n.shortMessage=T,n.command=a,n.escapedCommand=c,n.exitCode=i,n.signal=o,n.signalDescription=g,n.stdout=e,n.stderr=t,n.cwd=m,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=p,n.killed=u&&!l,n};s();var ae=["stdin","stdout","stderr"],Mo=e=>ae.some(t=>e[t]!==void 0),Tr=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return ae.map(n=>e[n]);if(Mo(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ae.map(n=>`\`${n}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,ae.length);return Array.from({length:r},(n,o)=>t[o])};s();import zo from"node:os";s();s();var I=[];I.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&I.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&I.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ce=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Fe=Symbol.for("signal-exit emitter"),Me=globalThis,qo=Object.defineProperty.bind(Object),qe=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Me[Fe])return Me[Fe];qo(Me,Fe,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],o=n.indexOf(r);o!==-1&&(o===0&&n.length===1?n.length=0:n.splice(o,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let o=!1;for(let i of this.listeners[t])o=i(r,n)===!0||o;return t==="exit"&&(o=this.emit("afterExit",r,n)||o),o}},le=class{},Vo=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Ve=class extends le{onExit(){return()=>{}}load(){}unload(){}},ze=class extends le{#s=He.platform==="win32"?"SIGINT":"SIGHUP";#t=new qe;#e;#o;#i;#n={};#r=!1;constructor(t){super(),this.#e=t,this.#n={};for(let r of I)this.#n[r]=()=>{let n=this.#e.listeners(r),{count:o}=this.#t,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(o+=i.__signal_exit_emitter__.count),n.length===o){this.unload();let a=this.#t.emit("exit",null,r),c=r==="SIGHUP"?this.#s:r;a||t.kill(t.pid,c)}};this.#i=t.reallyExit,this.#o=t.emit}onExit(t,r){if(!ce(this.#e))return()=>{};this.#r===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#t.on(n,t),()=>{this.#t.removeListener(n,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#r){this.#r=!0,this.#t.count+=1;for(let t of I)try{let r=this.#n[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#c(t,...r),this.#e.reallyExit=t=>this.#a(t)}}unload(){this.#r&&(this.#r=!1,I.forEach(t=>{let r=this.#n[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#i,this.#t.count-=1)}#a(t){return ce(this.#e)?(this.#e.exitCode=t||0,this.#t.emit("exit",this.#e.exitCode,null),this.#i.call(this.#e,this.#e.exitCode)):0}#c(t,...r){let n=this.#o;if(t==="exit"&&ce(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let o=n.call(this.#e,t,...r);return this.#t.emit("exit",this.#e.exitCode,null),o}else return n.call(this.#e,t,...r)}},He=globalThis.process,{onExit:Cr,load:Nc,unload:jc}=Vo(ce(He)?new ze(He):new Ve);var Ho=1e3*5,Ir=(e,t="SIGTERM",r={})=>{let n=e(t);return Wo(e,t,r,n),n},Wo=(e,t,r,n)=>{if(!Jo(t,r,n))return;let o=Ko(r),i=setTimeout(()=>{e("SIGKILL")},o);i.unref&&i.unref()},Jo=(e,{forceKillAfterTimeout:t},r)=>Xo(e)&&t!==!1&&r,Xo=e=>e===zo.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Ko=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return Ho;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Ar=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Yo=(e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},Rr=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===void 0)return n;let o,i=new Promise((c,l)=>{o=setTimeout(()=>{Yo(e,r,l)},t)}),a=n.finally(()=>{clearTimeout(o)});return Promise.race([i,a])},Lr=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Nr=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let o=Cr(()=>{e.kill()});return n.finally(()=>{o()})};s();import{createWriteStream as Zo}from"node:fs";import{ChildProcess as Qo}from"node:child_process";var ei=e=>e instanceof Qo&&typeof e.then=="function",We=(e,t,r)=>{if(typeof r=="string")return e[t].pipe(Zo(r)),e;if(Ce(r))return e[t].pipe(r),e;if(!ei(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!Ce(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r},jr=e=>{e.stdout!==null&&(e.pipeStdout=We.bind(void 0,e,"stdout")),e.stderr!==null&&(e.pipeStderr=We.bind(void 0,e,"stderr")),e.all!==void 0&&(e.pipeAll=We.bind(void 0,e,"all"))};s();import{createReadStream as xi,readFileSync as Si}from"node:fs";import{setTimeout as wi}from"node:timers/promises";s();s();s();var V=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:a,finalize:c},{maxBuffer:l=Number.POSITIVE_INFINITY}={})=>{if(!ri(e))throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let p=t();p.length=0;try{for await(let u of e){let h=ni(u),m=r[h](u,p);kr({convertedChunk:m,state:p,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:l})}return ti({state:p,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:a,maxBuffer:l}),c(p)}catch(u){throw u.bufferedData=c(p),u}},ti=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{let a=o(e);a!==void 0&&kr({convertedChunk:a,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},kr=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{let a=r(e),c=t.length+a;if(c<=i){$r(e,t,o,c);return}let l=n(e,i-t.length);throw l!==void 0&&$r(l,t,o,i),new ue},$r=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},ri=e=>typeof e=="object"&&e!==null&&typeof e[Symbol.asyncIterator]=="function",ni=e=>{let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";let r=Dr.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&Dr.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:Dr}=Object.prototype,ue=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};s();var Je=e=>e,Xe=()=>{},Ke=({contents:e})=>e,fe=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},de=e=>e.length;s();async function Ye(e,t){return V(e,di,t)}var oi=()=>({contents:new ArrayBuffer(0)}),ii=e=>si.encode(e),si=new TextEncoder,Ur=e=>new Uint8Array(e),Br=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),ai=(e,t)=>e.slice(0,t),ci=(e,{contents:t,length:r},n)=>{let o=Mr()?ui(t,n):li(t,n);return new Uint8Array(o).set(e,r),o},li=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(Fr(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},ui=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:Fr(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Fr=e=>Gr**Math.ceil(Math.log(e)/Math.log(Gr)),Gr=2,fi=({contents:e,length:t})=>Mr()?e:e.slice(0,t),Mr=()=>"resize"in ArrayBuffer.prototype,di={init:oi,convertChunk:{string:ii,buffer:Ur,arrayBuffer:Ur,dataView:Br,typedArray:Br,others:fe},getSize:de,truncateChunk:ai,addChunk:ci,getFinalChunk:Xe,finalize:fi};s();async function pe(e,t){if(!("Buffer"in globalThis))throw new Error("getStreamAsBuffer() is only supported in Node.js");try{return qr(await Ye(e,t))}catch(r){throw r.bufferedData!==void 0&&(r.bufferedData=qr(r.bufferedData)),r}}var qr=e=>globalThis.Buffer.from(e);s();async function Ze(e,t){return V(e,yi,t)}var pi=()=>({contents:"",textDecoder:new TextDecoder}),me=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),mi=(e,{contents:t})=>t+e,hi=(e,t)=>e.slice(0,t),gi=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},yi={init:pi,convertChunk:{string:Je,buffer:me,arrayBuffer:me,dataView:me,typedArray:me,others:fe},getSize:de,truncateChunk:hi,addChunk:mi,getFinalChunk:gi,finalize:Ke};var Hr=ee(zr(),1),Wr=e=>{if(e!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},bi=({input:e,inputFile:t})=>typeof t!="string"?e:(Wr(e),Si(t)),Jr=e=>{let t=bi(e);if(Te(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t},Ei=({input:e,inputFile:t})=>typeof t!="string"?e:(Wr(e),xi(t)),Xr=(e,t)=>{let r=Ei(t);r!==void 0&&(Te(r)?r.pipe(e.stdin):e.stdin.end(r))},Kr=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=(0,Hr.default)();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},Qe=async(e,t)=>{if(!(!e||t===void 0)){await wi(0),e.destroy();try{return await t}catch(r){return r.bufferedData}}},et=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(!(!e||!r))return t==="utf8"||t==="utf-8"?Ze(e,{maxBuffer:n}):t===null||t==="buffer"?pe(e,{maxBuffer:n}):vi(e,n,t)},vi=async(e,t,r)=>(await pe(e,{maxBuffer:t})).toString(r),Yr=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:o,maxBuffer:i},a)=>{let c=et(e,{encoding:n,buffer:o,maxBuffer:i}),l=et(t,{encoding:n,buffer:o,maxBuffer:i}),p=et(r,{encoding:n,buffer:o,maxBuffer:i*2});try{return await Promise.all([a,c,l,p])}catch(u){return Promise.all([{error:u,signal:u.signal,timedOut:u.timedOut},Qe(e,c),Qe(t,l),Qe(r,p)])}};s();var Oi=(async()=>{})().constructor.prototype,Pi=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Oi,e)]),tt=(e,t)=>{for(let[r,n]of Pi){let o=typeof t=="function"?(...i)=>Reflect.apply(n.value,t(),i):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Zr=e=>new Promise((t,r)=>{e.on("exit",(n,o)=>{t({exitCode:n,signal:o})}),e.on("error",n=>{r(n)}),e.stdin&&e.stdin.on("error",n=>{r(n)})});s();import{Buffer as Ti}from"node:buffer";import{ChildProcess as Ci}from"node:child_process";var tn=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Ii=/^[\w.-]+$/,Ai=e=>typeof e!="string"||Ii.test(e)?e:`"${e.replaceAll('"','\\"')}"`,rt=(e,t)=>tn(e,t).join(" "),nt=(e,t)=>tn(e,t).map(r=>Ai(r)).join(" "),Ri=/ +/g;var Qr=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(t==="object"&&e!==null&&!(e instanceof Ci)&&"stdout"in e){let r=typeof e.stdout;if(r==="string")return e.stdout;if(Ti.isBuffer(e.stdout))return e.stdout.toString();throw new TypeError(`Unexpected "${r}" stdout in template expression`)}throw new TypeError(`Unexpected "${t}" in template expression`)},en=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],Li=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{let i=o??e.raw[n],a=i.split(Ri).filter(Boolean),c=en(r,a,i.startsWith(" "));if(n===t.length)return c;let l=t[n],p=Array.isArray(l)?l.map(u=>Qr(u)):[Qr(l)];return en(c,p,i.endsWith(" "))},ot=(e,t)=>{let r=[];for(let[n,o]of e.entries())r=Li({templates:e,expressions:t,tokens:r,index:n,template:o});return r};s();import{debuglog as Ni}from"node:util";import ji from"node:process";var rn=Ni("execa").enabled,he=(e,t)=>String(e).padStart(t,"0"),$i=()=>{let e=new Date;return`${he(e.getHours(),2)}:${he(e.getMinutes(),2)}:${he(e.getSeconds(),2)}.${he(e.getMilliseconds(),3)}`},it=(e,{verbose:t})=>{t&&ji.stderr.write(`[${$i()}] ${e}
|
|
9
|
-
`)};var Ui=1e3*1e3*100,Bi=({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{let i=t?{...ge.env,...e}:e;return r?xr({env:i,cwd:n,execPath:o}):i},sn=(e,t,r={})=>{let n=on.default._parse(e,t,r);return e=n.command,t=n.args,r=n.options,r={maxBuffer:Ui,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||ge.cwd(),execPath:ge.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:rn,...r},r.env=Bi(r),r.stdio=Tr(r),ge.platform==="win32"&&ki.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},z=(e,t,r)=>typeof t!="string"&&!Di.isBuffer(t)?r===void 0?void 0:"":e.stripFinalNewline?Ue(t):t;function ye(e,t,r){let n=sn(e,t,r),o=rt(e,t),i=nt(e,t);it(i,n.options),Lr(n.options);let a;try{a=st.spawn(n.file,n.args,n.options)}catch(g){let y=new st.ChildProcess,b=Promise.reject(q({error:g,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return tt(y,b),y}let c=Zr(a),l=Rr(a,n.options,c),p=Nr(a,n.options,l),u={isCanceled:!1};a.kill=Ir.bind(null,a.kill.bind(a)),a.cancel=Ar.bind(null,a,u);let m=wr(async()=>{let[{error:g,exitCode:y,signal:b,timedOut:E},P,T,C]=await Yr(a,n.options,p),K=z(n.options,P),Y=z(n.options,T),Z=z(n.options,C);if(g||y!==0||b!==null){let Q=q({error:g,exitCode:y,signal:b,stdout:K,stderr:Y,all:Z,command:o,escapedCommand:i,parsed:n,timedOut:E,isCanceled:u.isCanceled||(n.options.signal?n.options.signal.aborted:!1),killed:a.killed});if(!n.options.reject)return Q;throw Q}return{command:o,escapedCommand:i,exitCode:0,stdout:K,stderr:Y,all:Z,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return Xr(a,n.options),a.all=Kr(a,n.options),jr(a),tt(a,m),a}function Gi(e,t,r){let n=sn(e,t,r),o=rt(e,t),i=nt(e,t);it(i,n.options);let a=Jr(n.options),c;try{c=st.spawnSync(n.file,n.args,{...n.options,input:a})}catch(u){throw q({error:u,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}let l=z(n.options,c.stdout,c.error),p=z(n.options,c.stderr,c.error);if(c.error||c.status!==0||c.signal!==null){let u=q({stdout:l,stderr:p,error:c.error,signal:c.signal,exitCode:c.status,command:o,escapedCommand:i,parsed:n,timedOut:c.error&&c.error.code==="ETIMEDOUT",isCanceled:!1,killed:c.signal!==null});if(!n.options.reject)return u;throw u}return{command:o,escapedCommand:i,exitCode:0,stdout:l,stderr:p,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}var Fi=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},nn=(e={})=>({preferLocal:!0,...Fi(e),...e});function an(e){function t(r,...n){if(!Array.isArray(r))return an({...e,...r});let[o,...i]=ot(r,n);return ye(o,i,nn(e))}return t.sync=(r,...n)=>{if(!Array.isArray(r))throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[o,...i]=ot(r,n);return Gi(o,i,nn(e))},t}var eu=an();var U=ee(Fn(),1);async function Mn(e,t){let{localTunnel:r}=te();!r&&!await Et(U.bin)&&await(0,U.install)(U.bin);let n=await t.createTunnel({port:e}),o=`http${r?"":"s"}://${n.domain}`,i=new Promise((a,c)=>{let l=r?ye("echo",[n.domain,n.token],{detached:!0}):ye(U.bin,["tunnel","run","--token",n.token]),p=()=>{l.kill()},u=async h=>{h.toString().match(n.domain)?.[0]&&a({domain:o,close:p})};l.stderr?.on("data",u),l.stdout?.on("data",u),l.on("error",h=>{c(h)})});return{domain:o,close:async()=>(await i).close()}}s();var qn=e=>({tunnel:()=>{let t=Date.now();return{finish:({isSuccess:r,failureReason:n})=>e.report(Pt({isSuccess:r,failureReason:n,tunnelCreationTime:Date.now()-t}))}}});function sa(){let e=(0,B.useRef)(),t=Ot({type:"backoffice"}),r=vt();return(0,B.useEffect)(()=>()=>{e.current?.close()},[]),(0,B.useCallback)(async n=>{let o=new re(t),a=qn(r).tunnel();try{let c=await Mn(n,o);return e.current=c,a.finish({isSuccess:!0}),{url:c.domain}}catch(c){throw a.finish({isSuccess:!1,failureReason:c instanceof Error?c.message:"Unknown error"}),c}},[t,r])}s();export{sa as a};
|
|
10
|
-
//# sourceMappingURL=chunk-PWHZSGUV.js.map
|