@capgo/cli 4.13.20 → 4.13.21

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -280,7 +280,7 @@ GFS4: `),console.error(e)});Ct[jr]||(z1e=global[jr]||[],W1e(Ct,z1e),Ct.close=fun
280
280
  `)};Jn.renderTable=Int;var Lnt=e=>{let t=new Tnt.default;return t.addRows(e),(0,Jn.renderTable)(t)};Jn.renderSimpleTable=Lnt;var Bnt=e=>{console.log((0,Jn.renderSimpleTable)(e))};Jn.printSimpleTable=Bnt});var QF=m(tN=>{"use strict";Object.defineProperty(tN,"__esModule",{value:!0});var qnt=UF(),$y=T2(),My=N2(),jnt=VF(),$nt=ZF(),Mnt=()=>0,Unt=()=>!0,eN=class{initSimple(t){this.columns=t.map(r=>({name:r,title:r,alignment:$y.DEFAULT_ROW_ALIGNMENT}))}initDetailed(t){var r;this.title=t?.title||this.title,this.tableStyle=t?.style||this.tableStyle,this.sortFunction=t?.sort||this.sortFunction,this.filterFunction=t?.filter||this.filterFunction,this.enabledColumns=t?.enabledColumns||this.enabledColumns,this.disabledColumns=t?.disabledColumns||this.disabledColumns,this.computedColumns=t?.computedColumns||this.computedColumns,this.columns=((r=t?.columns)===null||r===void 0?void 0:r.map(jnt.rawColumnToInternalColumn))||this.columns,this.rowSeparator=t?.rowSeparator||this.rowSeparator,this.charLength=t?.charLength||this.charLength,t?.shouldDisableColors?this.colorMap={}:t?.colorMap&&(this.colorMap=Object.assign(Object.assign({},this.colorMap),t.colorMap)),t.rows!==void 0&&this.addRows(t.rows)}constructor(t){this.rows=[],this.columns=[],this.title=void 0,this.tableStyle=$y.DEFAULT_TABLE_STYLE,this.filterFunction=Unt,this.sortFunction=Mnt,this.enabledColumns=[],this.disabledColumns=[],this.computedColumns=[],this.rowSeparator=$y.DEFAULT_ROW_SEPARATOR,this.colorMap=qnt.DEFAULT_COLOR_MAP,this.charLength={},t instanceof Array?this.initSimple(t):typeof t=="object"&&this.initDetailed(t)}createColumnFromRow(t){let r=this.columns.map(i=>i.name);Object.keys(t).forEach(i=>{r.includes(i)||this.columns.push((0,My.createColumFromOnlyName)(i))})}addColumn(t){typeof t=="string"?this.columns.push((0,My.createColumFromOnlyName)(t)):this.columns.push((0,My.createColumFromComputedColumn)(t))}addColumns(t){t.forEach(r=>{this.addColumn(r)})}addRow(t,r){this.createColumnFromRow(t),this.rows.push((0,My.createRow)(r?.color||$y.DEFAULT_ROW_FONT_COLOR,t,r?.separator!==void 0?r?.separator:this.rowSeparator))}addRows(t,r){t.forEach(i=>{this.addRow(i,r)})}renderTable(){return(0,$nt.renderTable)(this)}};tN.default=eN});var N2e=m(k2=>{"use strict";var Vnt=k2&&k2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k2,"__esModule",{value:!0});var Hnt=Vnt(QF()),F2e=N2(),rN=class{constructor(t){this.table=new Hnt.default(t)}addColumn(t){return this.table.addColumn(t),this}addColumns(t){return this.table.addColumns(t),this}addRow(t,r){return this.table.addRow(t,(0,F2e.convertRawRowOptionsToStandard)(r)),this}addRows(t,r){return this.table.addRows(t,(0,F2e.convertRawRowOptionsToStandard)(r)),this}printTable(){let t=this.table.renderTable();console.log(t)}render(){return this.table.renderTable()}};k2.default=rN});var R2=m(ba=>{"use strict";var znt=ba&&ba.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ba,"__esModule",{value:!0});ba.renderTable=ba.printTable=ba.Table=void 0;var Gnt=znt(N2e());ba.Table=Gnt.default;var k2e=ZF();Object.defineProperty(ba,"printTable",{enumerable:!0,get:function(){return k2e.printSimpleTable}});Object.defineProperty(ba,"renderTable",{enumerable:!0,get:function(){return k2e.renderSimpleTable}})});var U2e=m((a3t,Wnt)=>{Wnt.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var sN=m(cn=>{"use strict";var H2e=U2e(),ur=process.env;Object.defineProperty(cn,"_vendors",{value:H2e.map(function(e){return e.constant})});cn.name=null;cn.isPR=null;H2e.forEach(function(e){let r=(Array.isArray(e.env)?e.env:[e.env]).every(function(i){return V2e(i)});if(cn[e.constant]=r,!!r)switch(cn.name=e.name,typeof e.pr){case"string":cn.isPR=!!ur[e.pr];break;case"object":"env"in e.pr?cn.isPR=e.pr.env in ur&&ur[e.pr.env]!==e.pr.ne:"any"in e.pr?cn.isPR=e.pr.any.some(function(i){return!!ur[i]}):cn.isPR=V2e(e.pr);break;default:cn.isPR=null}});cn.isCI=!!(ur.CI!=="false"&&(ur.BUILD_ID||ur.BUILD_NUMBER||ur.CI||ur.CI_APP_ID||ur.CI_BUILD_ID||ur.CI_BUILD_NUMBER||ur.CI_NAME||ur.CONTINUOUS_INTEGRATION||ur.RUN_ID||cn.name));function V2e(e){return typeof e=="string"?!!ur[e]:"env"in e?ur[e.env]&&ur[e.env].includes(e.includes):"any"in e?e.any.some(function(t){return!!ur[t]}):Object.keys(e).every(function(t){return ur[t]===e[t]})}});var r6e=m(al=>{var Zc=require("fs"),t6e=require("path");al.promiseFiles=function(t,r,i){r=r||"file";var n=function(s,a){var o=function(u,l){if(u)return a(u);s(l)};al.files(t,r,o,i)};return new Promise(n)};al.files=function e(t,r,i,n){var s=typeof r;s=="object"?(n=n||r,r="file",i=function(){}):s!=="string"&&(i=r,r="file"),n=n||{};var a,o={files:[],dirs:[]},u=function(){r==="combine"?o=o.files.concat(o.dirs):!r||n.ignoreType||["all","combine"].indexOf(r)>=0?o=o:o=o[r+"s"],!n.sync&&i(null,o)},l=function(f,h,g){return function(v,y){if(v)return g?i(v):Zc.lstat(f,l(f,h,!0));var x=n.shortName?h:f;if(y&&y.isDirectory()&&y.mode!==17115)if(r!=="file"&&o.dirs.push(x),n.recursive==null||n.recursive){var D=function(A,C){if(A)return i(A);r==="combine"?o.files=o.files.concat(C):r==="all"?(o.files=o.files.concat(C.files),o.dirs=o.dirs.concat(C.dirs)):r==="file"?o.files=o.files.concat(C.files):o.dirs=o.dirs.concat(C.dirs),--a||u()},w=Object.assign({},n);w.ignoreType=!0;var _=e(f,r,D,w);n.sync&&D(null,_)}else--a||u();else r!=="dir"&&o.files.push(x),--a||u()}},c=Buffer.from(t);let d=function(f,h){if(f)return i(f);if(a=h.length,!a)return u();for(var g,v=0,y=h.length;v<y;v++){var x=h[v].toString();g=t6e.join(t,x);var D=Buffer.concat([c,Buffer.from(t6e.sep),h[v]]);if(n.sync){var w=Zc.statSync(D);l(g,x)(null,w)}else Zc.stat(D,l(g,x))}return o},p=function(f,h){if(f)return i(f);if(h&&h.mode===17115)return u();if(n.sync){let g=Zc.readdirSync(c,{encoding:"buffer"});return d(null,g)}else Zc.readdir(c,{encoding:"buffer"},d)};if(n.sync){let f=Zc.statSync(c);return p(null,f)}else Zc.stat(c,p)};al.paths=function(t,r,i){var n;typeof r=="function"&&(i=r,r=!1),al.files(t,"all",function(s,a){if(s)return i(s);r?i(null,a.files.concat(a.dirs)):i(null,a)})};al.subdirs=function(t,r,i,n){n=n||{};let s=function(o,u){if(o)return r(o);if(i=="combine"&&(u=u.files.concat(u.dirs)),n.sync)return u;r(null,u)},a=al.files(t,"dir",s,n);if(n&&n.sync)return s(null,a)}});var a6e=m((F3t,s6e)=>{var fN=require("fs"),ist=require("path");function i6e(e,t,r){var i=e?r?e:i6e({},e,!0):{};if(!t)return i;for(var n in t)t.hasOwnProperty(n)&&t[n]!==void 0&&(i[n]=t[n]);return i}function Ky(e,t){return Array.isArray(t)?t.indexOf(e)>-1:t.test(e)}function n6e(e,t,r,i){typeof t=="function"&&(i=r,r=t,t={}),typeof t=="string"&&(t={encoding:t}),t=i6e({recursive:!0,encoding:"utf8",doneOnErr:!0},t);var n=[],s=function(a){if(typeof i=="function"){if(a)return i(a);i(null,n)}};fN.readdir(e,function(a,o){if(a&&t.doneOnErr===!0)return a.code==="EACCES"?s():s(a);var u=0;t.reverse===!0||typeof t.sort=="string"&&/reverse|desc/i.test(t.sort)?o=o.reverse():t.sort!==!1&&(o=o.sort()),function l(){var c=o[u++];if(!c)return s(null,n);var d=ist.join(e,c);fN.stat(d,function(p,f){if(p&&t.doneOnErr===!0)return s(p);if(f&&f.isDirectory())if(t.recursive){if(t.matchDir&&!Ky(c,t.matchDir)||t.excludeDir&&Ky(c,t.excludeDir))return l();n6e(d,t,r,function(h,g){if(h&&t.doneOnErr===!0)return s(h);n=n.concat(g),l()})}else l();else if(f&&f.isFile()){if(t.match&&!Ky(c,t.match)||t.exclude&&Ky(c,t.exclude)||t.filter&&!t.filter(c))return l();t.shortName?n.push(c):n.push(d),fN.readFile(d,t.encoding,function(h,g){if(h){if(h.code==="EACCES")return l();if(t.doneOnErr===!0)return s(h)}r.length>3?t.shortName?r(null,g,c,l):r(null,g,d,l):r(null,g,l)})}else l()})}()})}s6e.exports=n6e});var u6e=m((N3t,o6e)=>{o6e.exports=function(e,t){for(var r=[],i=0;i<e.length;i++){var n=t(e[i],i);nst(n)?r.push.apply(r,n):r.push(n)}return r};var nst=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var f6e=m((k3t,p6e)=>{"use strict";p6e.exports=c6e;function c6e(e,t,r){e instanceof RegExp&&(e=l6e(e,r)),t instanceof RegExp&&(t=l6e(t,r));var i=d6e(e,t,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+t.length)}}function l6e(e,t){var r=t.match(e);return r?r[0]:null}c6e.range=d6e;function d6e(e,t,r){var i,n,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){if(e===t)return[u,l];for(i=[],s=r.length;c>=0&&!o;)c==u?(i.push(c),u=r.indexOf(e,c+1)):i.length==1?o=[i.pop(),l]:(n=i.pop(),n<s&&(s=n,a=l),l=r.indexOf(t,c+1)),c=u<l&&u>=0?u:l;i.length&&(o=[s,a])}return o}});var D6e=m((R3t,_6e)=>{var sst=u6e(),h6e=f6e();_6e.exports=ust;var m6e="\0SLASH"+Math.random()+"\0",g6e="\0OPEN"+Math.random()+"\0",mN="\0CLOSE"+Math.random()+"\0",y6e="\0COMMA"+Math.random()+"\0",v6e="\0PERIOD"+Math.random()+"\0";function hN(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function ast(e){return e.split("\\\\").join(m6e).split("\\{").join(g6e).split("\\}").join(mN).split("\\,").join(y6e).split("\\.").join(v6e)}function ost(e){return e.split(m6e).join("\\").split(g6e).join("{").split(mN).join("}").split(y6e).join(",").split(v6e).join(".")}function w6e(e){if(!e)return[""];var t=[],r=h6e("{","}",e);if(!r)return e.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=w6e(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),t.push.apply(t,a),t}function ust(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Qf(ast(e),!0).map(ost)):[]}function lst(e){return"{"+e+"}"}function cst(e){return/^-?0\d/.test(e)}function dst(e,t){return e<=t}function pst(e,t){return e>=t}function Qf(e,t){var r=[],i=h6e("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var n=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),a=n||s,o=i.body.indexOf(",")>=0;if(!a&&!o)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+mN+i.post,Qf(e)):[e];var u;if(a)u=i.body.split(/\.\./);else if(u=w6e(i.body),u.length===1&&(u=Qf(u[0],!1).map(lst),u.length===1)){var c=i.post.length?Qf(i.post,!1):[""];return c.map(function(b){return i.pre+u[0]+b})}var l=i.pre,c=i.post.length?Qf(i.post,!1):[""],d;if(a){var p=hN(u[0]),f=hN(u[1]),h=Math.max(u[0].length,u[1].length),g=u.length==3?Math.abs(hN(u[2])):1,v=dst,y=f<p;y&&(g*=-1,v=pst);var x=u.some(cst);d=[];for(var D=p;v(D,f);D+=g){var w;if(s)w=String.fromCharCode(D),w==="\\"&&(w="");else if(w=String(D),x){var _=h-w.length;if(_>0){var A=new Array(_+1).join("0");D<0?w="-"+A+w.slice(1):w=A+w}}d.push(w)}}else d=sst(u,function(E){return Qf(E,!1)});for(var C=0;C<d.length;C++)for(var S=0;S<c.length;S++){var T=l+d[C]+c[S];(!t||a||T)&&r.push(T)}return r}});var A6e=m((P3t,C6e)=>{C6e.exports=dn;dn.Minimatch=$r;var j2=function(){try{return require("path")}catch{}}()||{sep:"/"};dn.sep=j2.sep;var vN=dn.GLOBSTAR=$r.GLOBSTAR={},fst=D6e(),b6e={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},gN="[^/]",yN=gN+"*?",hst="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",mst="(?:(?!(?:\\/|^)\\.).)*?",E6e=gst("().*{}+?[]^$\\!");function gst(e){return e.split("").reduce(function(t,r){return t[r]=!0,t},{})}var x6e=/\/+/;dn.filter=yst;function yst(e,t){return t=t||{},function(r,i,n){return dn(r,e,t)}}function ol(e,t){t=t||{};var r={};return Object.keys(e).forEach(function(i){r[i]=e[i]}),Object.keys(t).forEach(function(i){r[i]=t[i]}),r}dn.defaults=function(e){if(!e||typeof e!="object"||!Object.keys(e).length)return dn;var t=dn,r=function(n,s,a){return t(n,s,ol(e,a))};return r.Minimatch=function(n,s){return new t.Minimatch(n,ol(e,s))},r.Minimatch.defaults=function(n){return t.defaults(ol(e,n)).Minimatch},r.filter=function(n,s){return t.filter(n,ol(e,s))},r.defaults=function(n){return t.defaults(ol(e,n))},r.makeRe=function(n,s){return t.makeRe(n,ol(e,s))},r.braceExpand=function(n,s){return t.braceExpand(n,ol(e,s))},r.match=function(i,n,s){return t.match(i,n,ol(e,s))},r};$r.defaults=function(e){return dn.defaults(e).Minimatch};function dn(e,t,r){return Zy(t),r||(r={}),!r.nocomment&&t.charAt(0)==="#"?!1:new $r(t,r).match(e)}function $r(e,t){if(!(this instanceof $r))return new $r(e,t);Zy(e),t||(t={}),e=e.trim(),!t.allowWindowsEscape&&j2.sep!=="/"&&(e=e.split(j2.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}$r.prototype.debug=function(){};$r.prototype.make=vst;function vst(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(i){return i.split(x6e)}),this.debug(this.pattern,r),r=r.map(function(i,n,s){return i.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}$r.prototype.parseNegate=wst;function wst(){var e=this.pattern,t=!1,r=this.options,i=0;if(!r.nonegate){for(var n=0,s=e.length;n<s&&e.charAt(n)==="!";n++)t=!t,i++;i&&(this.pattern=e.substr(i)),this.negate=t}}dn.braceExpand=function(e,t){return S6e(e,t)};$r.prototype.braceExpand=S6e;function S6e(e,t){return t||(this instanceof $r?t=this.options:t={}),e=typeof e>"u"?this.pattern:e,Zy(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:fst(e)}var _st=1024*64,Zy=function(e){if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>_st)throw new TypeError("pattern is too long")};$r.prototype.parse=Dst;var Jy={};function Dst(e,t){Zy(e);var r=this.options;if(e==="**")if(r.noglobstar)e="*";else return vN;if(e==="")return"";var i="",n=!!r.nocase,s=!1,a=[],o=[],u,l=!1,c=-1,d=-1,p=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=this;function h(){if(u){switch(u){case"*":i+=yN,n=!0;break;case"?":i+=gN,n=!0;break;default:i+="\\"+u;break}f.debug("clearStateChar %j %j",u,i),u=!1}}for(var g=0,v=e.length,y;g<v&&(y=e.charAt(g));g++){if(this.debug("%s %s %s %j",e,g,i,y),s&&E6e[y]){i+="\\"+y,s=!1;continue}switch(y){case"/":return!1;case"\\":h(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,g,i,y),l){this.debug(" in class"),y==="!"&&g===d+1&&(y="^"),i+=y;continue}f.debug("call clearStateChar %j",u),h(),u=y,r.noext&&h();continue;case"(":if(l){i+="(";continue}if(!u){i+="\\(";continue}a.push({type:u,start:g-1,reStart:i.length,open:b6e[u].open,close:b6e[u].close}),i+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,i),u=!1;continue;case")":if(l||!a.length){i+="\\)";continue}h(),n=!0;var x=a.pop();i+=x.close,x.type==="!"&&o.push(x),x.reEnd=i.length;continue;case"|":if(l||!a.length||s){i+="\\|",s=!1;continue}h(),i+="|";continue;case"[":if(h(),l){i+="\\"+y;continue}l=!0,d=g,c=i.length,i+=y;continue;case"]":if(g===d+1||!l){i+="\\"+y,s=!1;continue}var D=e.substring(d+1,g);try{RegExp("["+D+"]")}catch{var w=this.parse(D,Jy);i=i.substr(0,c)+"\\["+w[0]+"\\]",n=n||w[1],l=!1;continue}n=!0,l=!1,i+=y;continue;default:h(),s?s=!1:E6e[y]&&!(y==="^"&&l)&&(i+="\\"),i+=y}}for(l&&(D=e.substr(d+1),w=this.parse(D,Jy),i=i.substr(0,c)+"\\["+w[0],n=n||w[1]),x=a.pop();x;x=a.pop()){var _=i.slice(x.reStart+x.open.length);this.debug("setting tail",i,x),_=_.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(Ve,zt,Ss){return Ss||(Ss="\\"),zt+zt+Ss+"|"}),this.debug(`tail=%j
281
281
  %s`,_,_,x,i);var A=x.type==="*"?yN:x.type==="?"?gN:"\\"+x.type;n=!0,i=i.slice(0,x.reStart)+A+"\\("+_}h(),s&&(i+="\\\\");var C=!1;switch(i.charAt(0)){case"[":case".":case"(":C=!0}for(var S=o.length-1;S>-1;S--){var T=o[S],E=i.slice(0,T.reStart),b=i.slice(T.reStart,T.reEnd-8),k=i.slice(T.reEnd-8,T.reEnd),L=i.slice(T.reEnd);k+=L;var q=E.split("(").length-1,I=L;for(g=0;g<q;g++)I=I.replace(/\)[+*?]?/,"");L=I;var P="";L===""&&t!==Jy&&(P="$");var M=E+b+L+P+k;i=M}if(i!==""&&n&&(i="(?=.)"+i),C&&(i=p+i),t===Jy)return[i,n];if(!n)return Est(e);var j=r.nocase?"i":"";try{var V=new RegExp("^"+i+"$",j)}catch{return new RegExp("$.")}return V._glob=e,V._src=i,V}dn.makeRe=function(e,t){return new $r(e,t||{}).makeRe()};$r.prototype.makeRe=bst;function bst(){if(this.regexp||this.regexp===!1)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?yN:t.dot?hst:mst,i=t.nocase?"i":"",n=e.map(function(s){return s.map(function(a){return a===vN?r:typeof a=="string"?xst(a):a._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,i)}catch{this.regexp=!1}return this.regexp}dn.match=function(e,t,r){r=r||{};var i=new $r(t,r);return e=e.filter(function(n){return i.match(n)}),i.options.nonull&&!e.length&&e.push(t),e};$r.prototype.match=function(t,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;var i=this.options;j2.sep!=="/"&&(t=t.split(j2.sep).join("/")),t=t.split(x6e),this.debug(this.pattern,"split",t);var n=this.set;this.debug(this.pattern,"set",n);var s,a;for(a=t.length-1;a>=0&&(s=t[a],!s);a--);for(a=0;a<n.length;a++){var o=n[a],u=t;i.matchBase&&o.length===1&&(u=[s]);var l=this.matchOne(u,o,r);if(l)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate};$r.prototype.matchOne=function(e,t,r){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var n=0,s=0,a=e.length,o=t.length;n<a&&s<o;n++,s++){this.debug("matchOne loop");var u=t[s],l=e[n];if(this.debug(t,u,l),u===!1)return!1;if(u===vN){this.debug("GLOBSTAR",[t,u,l]);var c=n,d=s+1;if(d===o){for(this.debug("** at the end");n<a;n++)if(e[n]==="."||e[n]===".."||!i.dot&&e[n].charAt(0)===".")return!1;return!0}for(;c<a;){var p=e[c];if(this.debug(`
282
282
  globstar while`,e,c,t,d,p),this.matchOne(e.slice(c),t.slice(d),r))return this.debug("globstar found match!",c,a,p),!0;if(p==="."||p===".."||!i.dot&&p.charAt(0)==="."){this.debug("dot detected!",e,c,t,d);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(r&&(this.debug(`
283
- >>> no match, partial?`,e,c,t,d),c===a))}var f;if(typeof u=="string"?(f=l===u,this.debug("string match",u,l,f)):(f=l.match(u),this.debug("pattern match",u,l,f)),!f)return!1}if(n===a&&s===o)return!0;if(n===a)return r;if(s===o)return n===a-1&&e[n]==="";throw new Error("wtf?")};function Est(e){return e.replace(/\\(.)/g,"$1")}function xst(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var N6e=m((I3t,F6e)=>{var wN=require("fs"),Sst=A6e(),Cst=require("path");function T6e(e,t,r){var i=e?r?e:T6e({},e,!0):{};if(!t)return i;for(var n in t)t.hasOwnProperty(n)&&t[n]!==void 0&&(i[n]=t[n]);return i}function Qy(e,t){if(Array.isArray(t)){for(var r=t.length,i=0;i<r;i++)if(Sst(e,t[i]))return!0;return!1}return t.test(e)}function O6e(e,t,r,i){typeof t=="function"&&(i=r,r=t,t={}),typeof t=="string"&&(t={encoding:t}),t=T6e({recursive:!0,encoding:"utf8",doneOnErr:!0},t);var n=[],s=function(a){if(typeof i=="function"){if(a)return i(a);i(null,n)}};wN.readdir(e,function(a,o){if(a&&t.doneOnErr===!0)return a.code==="EACCES"?s():s(a);var u=0;t.reverse===!0||typeof t.sort=="string"&&/reverse|desc/i.test(t.sort)?o=o.reverse():t.sort!==!1&&(o=o.sort()),function l(){var c=o[u++];if(!c)return s(null,n);var d=Cst.join(e,c);wN.stat(d,function(p,f){if(p&&t.doneOnErr===!0)return s(p);if(f&&f.isDirectory())if(t.recursive){if(t.matchDir&&!Qy(c,t.matchDir)||t.excludeDir&&Qy(c,t.excludeDir))return l();O6e(d,t,r,function(g,v){if(g&&t.doneOnErr===!0)return s(g);n=n.concat(v),l()})}else l();else if(f&&f.isFile()){if(t.match&&!Qy(c,t.match)||t.exclude&&Qy(c,t.exclude)||t.filter&&!t.filter(c))return l();t.shortName?n.push(c):n.push(d);var h=wN.createReadStream(d);t.encoding!==null&&h.setEncoding(t.encoding),h.on("error",function(g){if(t.doneOnErr===!0)return s(g);l()}),r.length>3?t.shortName?r(null,h,c,l):r(null,h,d,l):r(null,h,l)}else l()})}()})}F6e.exports=O6e});var k6e=m(e5=>{var Ast=r6e();Object.assign(e5,Ast);e5.readFiles=a6e();e5.readFilesStream=N6e()});var x4e=m((byt,E4e)=>{E4e.exports=F9()});var HN=me(VN(),1),{program:B,createCommand:_at,createArgument:Dat,createOption:bat,CommanderError:Eat,InvalidArgumentError:xat,InvalidOptionArgumentError:Sat,Command:Cat,Argument:Aat,Option:Tat,Help:Oat}=HN.default;var Vo={name:"@capgo/cli",version:"4.13.20",description:"A CLI to upload to capgo servers",author:"github.com/riderx",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLIl#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],main:"dist/index.js",bin:{capgo:"dist/index.js"},engines:{npm:">=8.0.0",node:">=18.0.0"},scripts:{build:"node build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js",test:"npx --yes ts-node -T src/index.ts","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",test_rls:"ts-node ./test/test_headers_rls.ts",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js"},devDependencies:{"@antfu/eslint-config":"^2.23.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^6.1.1","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.7.0","@manypkg/find-root":"^2.2.1","@supabase/supabase-js":"^2.44.4","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"0.5.5","@types/mime":"^4.0.0","@types/node":"^20.14.11","@types/npmcli__ci-detect":"^2.0.3","@types/prettyjson":"^0.0.33","@types/prompt-sync":"^4.2.3","@types/semver":"^7.5.8","@types/tmp":"^0.2.6","@typescript-eslint/eslint-plugin":"^7.16.1","@typescript-eslint/parser":"^7.16.1","@vercel/ncc":"^0.38.1","adm-zip":"^0.5.14","ci-info":"^4.0.0",commander:"12.1.0","console-table-printer":"^2.12.1",esbuild:"^0.23.0",eslint:"9.8.0","get-latest-version":"^5.1.0","git-format-staged":"3.1.1",husky:"^9.1.1","is-wsl":"^3.1.0",jszip:"^3.10.1",ky:"^1.4.0",logsnag:"1.0.0",mime:"^4.0.4",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",semver:"^7.6.2",tmp:"^0.2.3","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"4.2.0",typescript:"5.5.4","node-dir":"^0.1.17"}};var ii=me(it(),1),ed=require("node:process"),Ho=me(require("node:readline"),1),k5=me(require("node:readline"),1),QN=require("node:tty");function lge({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function ek(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(lge(),"")}var R5={},cge={get exports(){return R5},set exports(e){R5=e}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(i){var n=i.charCodeAt(0),s=i.length==2?i.charCodeAt(1):0,a=n;return 55296<=n&&n<=56319&&56320<=s&&s<=57343&&(n&=1023,s&=1023,a=n<<10|s,a+=65536),a==12288||65281<=a&&a<=65376||65504<=a&&a<=65510?"F":a==8361||65377<=a&&a<=65470||65474<=a&&a<=65479||65482<=a&&a<=65487||65490<=a&&a<=65495||65498<=a&&a<=65500||65512<=a&&a<=65518?"H":4352<=a&&a<=4447||4515<=a&&a<=4519||4602<=a&&a<=4607||9001<=a&&a<=9002||11904<=a&&a<=11929||11931<=a&&a<=12019||12032<=a&&a<=12245||12272<=a&&a<=12283||12289<=a&&a<=12350||12353<=a&&a<=12438||12441<=a&&a<=12543||12549<=a&&a<=12589||12593<=a&&a<=12686||12688<=a&&a<=12730||12736<=a&&a<=12771||12784<=a&&a<=12830||12832<=a&&a<=12871||12880<=a&&a<=13054||13056<=a&&a<=19903||19968<=a&&a<=42124||42128<=a&&a<=42182||43360<=a&&a<=43388||44032<=a&&a<=55203||55216<=a&&a<=55238||55243<=a&&a<=55291||63744<=a&&a<=64255||65040<=a&&a<=65049||65072<=a&&a<=65106||65108<=a&&a<=65126||65128<=a&&a<=65131||110592<=a&&a<=110593||127488<=a&&a<=127490||127504<=a&&a<=127546||127552<=a&&a<=127560||127568<=a&&a<=127569||131072<=a&&a<=194367||177984<=a&&a<=196605||196608<=a&&a<=262141?"W":32<=a&&a<=126||162<=a&&a<=163||165<=a&&a<=166||a==172||a==175||10214<=a&&a<=10221||10629<=a&&a<=10630?"Na":a==161||a==164||167<=a&&a<=168||a==170||173<=a&&a<=174||176<=a&&a<=180||182<=a&&a<=186||188<=a&&a<=191||a==198||a==208||215<=a&&a<=216||222<=a&&a<=225||a==230||232<=a&&a<=234||236<=a&&a<=237||a==240||242<=a&&a<=243||247<=a&&a<=250||a==252||a==254||a==257||a==273||a==275||a==283||294<=a&&a<=295||a==299||305<=a&&a<=307||a==312||319<=a&&a<=322||a==324||328<=a&&a<=331||a==333||338<=a&&a<=339||358<=a&&a<=359||a==363||a==462||a==464||a==466||a==468||a==470||a==472||a==474||a==476||a==593||a==609||a==708||a==711||713<=a&&a<=715||a==717||a==720||728<=a&&a<=731||a==733||a==735||768<=a&&a<=879||913<=a&&a<=929||931<=a&&a<=937||945<=a&&a<=961||963<=a&&a<=969||a==1025||1040<=a&&a<=1103||a==1105||a==8208||8211<=a&&a<=8214||8216<=a&&a<=8217||8220<=a&&a<=8221||8224<=a&&a<=8226||8228<=a&&a<=8231||a==8240||8242<=a&&a<=8243||a==8245||a==8251||a==8254||a==8308||a==8319||8321<=a&&a<=8324||a==8364||a==8451||a==8453||a==8457||a==8467||a==8470||8481<=a&&a<=8482||a==8486||a==8491||8531<=a&&a<=8532||8539<=a&&a<=8542||8544<=a&&a<=8555||8560<=a&&a<=8569||a==8585||8592<=a&&a<=8601||8632<=a&&a<=8633||a==8658||a==8660||a==8679||a==8704||8706<=a&&a<=8707||8711<=a&&a<=8712||a==8715||a==8719||a==8721||a==8725||a==8730||8733<=a&&a<=8736||a==8739||a==8741||8743<=a&&a<=8748||a==8750||8756<=a&&a<=8759||8764<=a&&a<=8765||a==8776||a==8780||a==8786||8800<=a&&a<=8801||8804<=a&&a<=8807||8810<=a&&a<=8811||8814<=a&&a<=8815||8834<=a&&a<=8835||8838<=a&&a<=8839||a==8853||a==8857||a==8869||a==8895||a==8978||9312<=a&&a<=9449||9451<=a&&a<=9547||9552<=a&&a<=9587||9600<=a&&a<=9615||9618<=a&&a<=9621||9632<=a&&a<=9633||9635<=a&&a<=9641||9650<=a&&a<=9651||9654<=a&&a<=9655||9660<=a&&a<=9661||9664<=a&&a<=9665||9670<=a&&a<=9672||a==9675||9678<=a&&a<=9681||9698<=a&&a<=9701||a==9711||9733<=a&&a<=9734||a==9737||9742<=a&&a<=9743||9748<=a&&a<=9749||a==9756||a==9758||a==9792||a==9794||9824<=a&&a<=9825||9827<=a&&a<=9829||9831<=a&&a<=9834||9836<=a&&a<=9837||a==9839||9886<=a&&a<=9887||9918<=a&&a<=9919||9924<=a&&a<=9933||9935<=a&&a<=9953||a==9955||9960<=a&&a<=9983||a==10045||a==10071||10102<=a&&a<=10111||11093<=a&&a<=11097||12872<=a&&a<=12879||57344<=a&&a<=63743||65024<=a&&a<=65039||a==65533||127232<=a&&a<=127242||127248<=a&&a<=127277||127280<=a&&a<=127337||127344<=a&&a<=127386||917760<=a&&a<=917999||983040<=a&&a<=1048573||1048576<=a&&a<=1114109?"A":"N"},t.characterLength=function(i){var n=this.eastAsianWidth(i);return n=="F"||n=="W"||n=="A"?2:1};function r(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(i){for(var n=r(i),s=0,a=0;a<n.length;a++)s=s+this.characterLength(n[a]);return s},t.slice=function(i,n,s){textLen=t.length(i),n=n||0,s=s||1,n<0&&(n=textLen+n),s<0&&(s=textLen+s);for(var a="",o=0,u=r(i),l=0;l<u.length;l++){var c=u[l],d=t.length(c);if(o>=n-(d==2?1:0))if(o+d<=s)a+=c;else break;o+=d}return a}})(cge);var dge=R5,pge=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function o1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=ek(e),e.length===0))return 0;e=e.replace(pge()," ");let r=t.ambiguousIsNarrow?1:2,i=0;for(let n of e){let s=n.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(dge.eastAsianWidth(n)){case"F":case"W":i+=2;break;case"A":i+=r;break;default:i+=1}}return i}var F5=10,GN=(e=0)=>t=>`\x1B[${t+e}m`,WN=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,XN=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,dt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(dt.modifier);var fge=Object.keys(dt.color),hge=Object.keys(dt.bgColor);[...fge,...hge];function mge(){let e=new Map;for(let[t,r]of Object.entries(dt)){for(let[i,n]of Object.entries(r))dt[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=dt[i],e.set(n[0],n[1]);Object.defineProperty(dt,t,{value:r,enumerable:!1})}return Object.defineProperty(dt,"codes",{value:e,enumerable:!1}),dt.color.close="\x1B[39m",dt.bgColor.close="\x1B[49m",dt.color.ansi=GN(),dt.color.ansi256=WN(),dt.color.ansi16m=XN(),dt.bgColor.ansi=GN(F5),dt.bgColor.ansi256=WN(F5),dt.bgColor.ansi16m=XN(F5),Object.defineProperties(dt,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(s=>s+s).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>dt.rgbToAnsi256(...dt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,i=Math.floor(o/6)/5,n=o%6/5}let s=Math.max(r,i,n)*2;if(s===0)return 30;let a=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>dt.ansi256ToAnsi(dt.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>dt.ansi256ToAnsi(dt.hexToAnsi256(t)),enumerable:!1}}),dt}var gge=mge(),Q2=new Set(["\x1B","\x9B"]),yge=39,P5="\x07",tk="[",vge="]",rk="m",I5=`${vge}8;;`,YN=e=>`${Q2.values().next().value}${tk}${e}${rk}`,KN=e=>`${Q2.values().next().value}${I5}${e}${P5}`,wge=e=>e.split(" ").map(t=>o1(t)),N5=(e,t,r)=>{let i=[...t],n=!1,s=!1,a=o1(ek(e[e.length-1]));for(let[o,u]of i.entries()){let l=o1(u);if(a+l<=r?e[e.length-1]+=u:(e.push(u),a=0),Q2.has(u)&&(n=!0,s=i.slice(o+1).join("").startsWith(I5)),n){s?u===P5&&(n=!1,s=!1):u===rk&&(n=!1);continue}a+=l,a===r&&o<i.length-1&&(e.push(""),a=0)}!a&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},_ge=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(o1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Dge=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let i="",n,s,a=wge(e),o=[""];for(let[l,c]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let d=o1(o[o.length-1]);if(l!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),d=0),(d>0||r.trim===!1)&&(o[o.length-1]+=" ",d++)),r.hard&&a[l]>t){let p=t-d,f=1+Math.floor((a[l]-p-1)/t);Math.floor((a[l]-1)/t)<f&&o.push(""),N5(o,c,t);continue}if(d+a[l]>t&&d>0&&a[l]>0){if(r.wordWrap===!1&&d<t){N5(o,c,t);continue}o.push("")}if(d+a[l]>t&&r.wordWrap===!1){N5(o,c,t);continue}o[o.length-1]+=c}r.trim!==!1&&(o=o.map(l=>_ge(l)));let u=[...o.join(`
283
+ >>> no match, partial?`,e,c,t,d),c===a))}var f;if(typeof u=="string"?(f=l===u,this.debug("string match",u,l,f)):(f=l.match(u),this.debug("pattern match",u,l,f)),!f)return!1}if(n===a&&s===o)return!0;if(n===a)return r;if(s===o)return n===a-1&&e[n]==="";throw new Error("wtf?")};function Est(e){return e.replace(/\\(.)/g,"$1")}function xst(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var N6e=m((I3t,F6e)=>{var wN=require("fs"),Sst=A6e(),Cst=require("path");function T6e(e,t,r){var i=e?r?e:T6e({},e,!0):{};if(!t)return i;for(var n in t)t.hasOwnProperty(n)&&t[n]!==void 0&&(i[n]=t[n]);return i}function Qy(e,t){if(Array.isArray(t)){for(var r=t.length,i=0;i<r;i++)if(Sst(e,t[i]))return!0;return!1}return t.test(e)}function O6e(e,t,r,i){typeof t=="function"&&(i=r,r=t,t={}),typeof t=="string"&&(t={encoding:t}),t=T6e({recursive:!0,encoding:"utf8",doneOnErr:!0},t);var n=[],s=function(a){if(typeof i=="function"){if(a)return i(a);i(null,n)}};wN.readdir(e,function(a,o){if(a&&t.doneOnErr===!0)return a.code==="EACCES"?s():s(a);var u=0;t.reverse===!0||typeof t.sort=="string"&&/reverse|desc/i.test(t.sort)?o=o.reverse():t.sort!==!1&&(o=o.sort()),function l(){var c=o[u++];if(!c)return s(null,n);var d=Cst.join(e,c);wN.stat(d,function(p,f){if(p&&t.doneOnErr===!0)return s(p);if(f&&f.isDirectory())if(t.recursive){if(t.matchDir&&!Qy(c,t.matchDir)||t.excludeDir&&Qy(c,t.excludeDir))return l();O6e(d,t,r,function(g,v){if(g&&t.doneOnErr===!0)return s(g);n=n.concat(v),l()})}else l();else if(f&&f.isFile()){if(t.match&&!Qy(c,t.match)||t.exclude&&Qy(c,t.exclude)||t.filter&&!t.filter(c))return l();t.shortName?n.push(c):n.push(d);var h=wN.createReadStream(d);t.encoding!==null&&h.setEncoding(t.encoding),h.on("error",function(g){if(t.doneOnErr===!0)return s(g);l()}),r.length>3?t.shortName?r(null,h,c,l):r(null,h,d,l):r(null,h,l)}else l()})}()})}F6e.exports=O6e});var k6e=m(e5=>{var Ast=r6e();Object.assign(e5,Ast);e5.readFiles=a6e();e5.readFilesStream=N6e()});var x4e=m((byt,E4e)=>{E4e.exports=F9()});var HN=me(VN(),1),{program:B,createCommand:_at,createArgument:Dat,createOption:bat,CommanderError:Eat,InvalidArgumentError:xat,InvalidOptionArgumentError:Sat,Command:Cat,Argument:Aat,Option:Tat,Help:Oat}=HN.default;var Vo={name:"@capgo/cli",version:"4.13.21",description:"A CLI to upload to capgo servers",author:"github.com/riderx",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLIl#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],main:"dist/index.js",bin:{capgo:"dist/index.js"},engines:{npm:">=8.0.0",node:">=18.0.0"},scripts:{build:"node build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js",test:"npx --yes ts-node -T src/index.ts","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",test_rls:"ts-node ./test/test_headers_rls.ts",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js"},devDependencies:{"@antfu/eslint-config":"^2.23.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^6.1.1","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.7.0","@manypkg/find-root":"^2.2.1","@supabase/supabase-js":"^2.44.4","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"0.5.5","@types/mime":"^4.0.0","@types/node":"^20.14.11","@types/npmcli__ci-detect":"^2.0.3","@types/prettyjson":"^0.0.33","@types/prompt-sync":"^4.2.3","@types/semver":"^7.5.8","@types/tmp":"^0.2.6","@typescript-eslint/eslint-plugin":"^7.16.1","@typescript-eslint/parser":"^7.16.1","@vercel/ncc":"^0.38.1","adm-zip":"^0.5.14","ci-info":"^4.0.0",commander:"12.1.0","console-table-printer":"^2.12.1",esbuild:"^0.23.0",eslint:"9.8.0","get-latest-version":"^5.1.0","git-format-staged":"3.1.1",husky:"^9.1.1","is-wsl":"^3.1.0",jszip:"^3.10.1",ky:"^1.4.0",logsnag:"1.0.0",mime:"^4.0.4",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",semver:"^7.6.2",tmp:"^0.2.3","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"4.2.0",typescript:"5.5.4","node-dir":"^0.1.17"}};var ii=me(it(),1),ed=require("node:process"),Ho=me(require("node:readline"),1),k5=me(require("node:readline"),1),QN=require("node:tty");function lge({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function ek(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(lge(),"")}var R5={},cge={get exports(){return R5},set exports(e){R5=e}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(i){var n=i.charCodeAt(0),s=i.length==2?i.charCodeAt(1):0,a=n;return 55296<=n&&n<=56319&&56320<=s&&s<=57343&&(n&=1023,s&=1023,a=n<<10|s,a+=65536),a==12288||65281<=a&&a<=65376||65504<=a&&a<=65510?"F":a==8361||65377<=a&&a<=65470||65474<=a&&a<=65479||65482<=a&&a<=65487||65490<=a&&a<=65495||65498<=a&&a<=65500||65512<=a&&a<=65518?"H":4352<=a&&a<=4447||4515<=a&&a<=4519||4602<=a&&a<=4607||9001<=a&&a<=9002||11904<=a&&a<=11929||11931<=a&&a<=12019||12032<=a&&a<=12245||12272<=a&&a<=12283||12289<=a&&a<=12350||12353<=a&&a<=12438||12441<=a&&a<=12543||12549<=a&&a<=12589||12593<=a&&a<=12686||12688<=a&&a<=12730||12736<=a&&a<=12771||12784<=a&&a<=12830||12832<=a&&a<=12871||12880<=a&&a<=13054||13056<=a&&a<=19903||19968<=a&&a<=42124||42128<=a&&a<=42182||43360<=a&&a<=43388||44032<=a&&a<=55203||55216<=a&&a<=55238||55243<=a&&a<=55291||63744<=a&&a<=64255||65040<=a&&a<=65049||65072<=a&&a<=65106||65108<=a&&a<=65126||65128<=a&&a<=65131||110592<=a&&a<=110593||127488<=a&&a<=127490||127504<=a&&a<=127546||127552<=a&&a<=127560||127568<=a&&a<=127569||131072<=a&&a<=194367||177984<=a&&a<=196605||196608<=a&&a<=262141?"W":32<=a&&a<=126||162<=a&&a<=163||165<=a&&a<=166||a==172||a==175||10214<=a&&a<=10221||10629<=a&&a<=10630?"Na":a==161||a==164||167<=a&&a<=168||a==170||173<=a&&a<=174||176<=a&&a<=180||182<=a&&a<=186||188<=a&&a<=191||a==198||a==208||215<=a&&a<=216||222<=a&&a<=225||a==230||232<=a&&a<=234||236<=a&&a<=237||a==240||242<=a&&a<=243||247<=a&&a<=250||a==252||a==254||a==257||a==273||a==275||a==283||294<=a&&a<=295||a==299||305<=a&&a<=307||a==312||319<=a&&a<=322||a==324||328<=a&&a<=331||a==333||338<=a&&a<=339||358<=a&&a<=359||a==363||a==462||a==464||a==466||a==468||a==470||a==472||a==474||a==476||a==593||a==609||a==708||a==711||713<=a&&a<=715||a==717||a==720||728<=a&&a<=731||a==733||a==735||768<=a&&a<=879||913<=a&&a<=929||931<=a&&a<=937||945<=a&&a<=961||963<=a&&a<=969||a==1025||1040<=a&&a<=1103||a==1105||a==8208||8211<=a&&a<=8214||8216<=a&&a<=8217||8220<=a&&a<=8221||8224<=a&&a<=8226||8228<=a&&a<=8231||a==8240||8242<=a&&a<=8243||a==8245||a==8251||a==8254||a==8308||a==8319||8321<=a&&a<=8324||a==8364||a==8451||a==8453||a==8457||a==8467||a==8470||8481<=a&&a<=8482||a==8486||a==8491||8531<=a&&a<=8532||8539<=a&&a<=8542||8544<=a&&a<=8555||8560<=a&&a<=8569||a==8585||8592<=a&&a<=8601||8632<=a&&a<=8633||a==8658||a==8660||a==8679||a==8704||8706<=a&&a<=8707||8711<=a&&a<=8712||a==8715||a==8719||a==8721||a==8725||a==8730||8733<=a&&a<=8736||a==8739||a==8741||8743<=a&&a<=8748||a==8750||8756<=a&&a<=8759||8764<=a&&a<=8765||a==8776||a==8780||a==8786||8800<=a&&a<=8801||8804<=a&&a<=8807||8810<=a&&a<=8811||8814<=a&&a<=8815||8834<=a&&a<=8835||8838<=a&&a<=8839||a==8853||a==8857||a==8869||a==8895||a==8978||9312<=a&&a<=9449||9451<=a&&a<=9547||9552<=a&&a<=9587||9600<=a&&a<=9615||9618<=a&&a<=9621||9632<=a&&a<=9633||9635<=a&&a<=9641||9650<=a&&a<=9651||9654<=a&&a<=9655||9660<=a&&a<=9661||9664<=a&&a<=9665||9670<=a&&a<=9672||a==9675||9678<=a&&a<=9681||9698<=a&&a<=9701||a==9711||9733<=a&&a<=9734||a==9737||9742<=a&&a<=9743||9748<=a&&a<=9749||a==9756||a==9758||a==9792||a==9794||9824<=a&&a<=9825||9827<=a&&a<=9829||9831<=a&&a<=9834||9836<=a&&a<=9837||a==9839||9886<=a&&a<=9887||9918<=a&&a<=9919||9924<=a&&a<=9933||9935<=a&&a<=9953||a==9955||9960<=a&&a<=9983||a==10045||a==10071||10102<=a&&a<=10111||11093<=a&&a<=11097||12872<=a&&a<=12879||57344<=a&&a<=63743||65024<=a&&a<=65039||a==65533||127232<=a&&a<=127242||127248<=a&&a<=127277||127280<=a&&a<=127337||127344<=a&&a<=127386||917760<=a&&a<=917999||983040<=a&&a<=1048573||1048576<=a&&a<=1114109?"A":"N"},t.characterLength=function(i){var n=this.eastAsianWidth(i);return n=="F"||n=="W"||n=="A"?2:1};function r(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(i){for(var n=r(i),s=0,a=0;a<n.length;a++)s=s+this.characterLength(n[a]);return s},t.slice=function(i,n,s){textLen=t.length(i),n=n||0,s=s||1,n<0&&(n=textLen+n),s<0&&(s=textLen+s);for(var a="",o=0,u=r(i),l=0;l<u.length;l++){var c=u[l],d=t.length(c);if(o>=n-(d==2?1:0))if(o+d<=s)a+=c;else break;o+=d}return a}})(cge);var dge=R5,pge=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function o1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=ek(e),e.length===0))return 0;e=e.replace(pge()," ");let r=t.ambiguousIsNarrow?1:2,i=0;for(let n of e){let s=n.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(dge.eastAsianWidth(n)){case"F":case"W":i+=2;break;case"A":i+=r;break;default:i+=1}}return i}var F5=10,GN=(e=0)=>t=>`\x1B[${t+e}m`,WN=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,XN=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,dt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(dt.modifier);var fge=Object.keys(dt.color),hge=Object.keys(dt.bgColor);[...fge,...hge];function mge(){let e=new Map;for(let[t,r]of Object.entries(dt)){for(let[i,n]of Object.entries(r))dt[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=dt[i],e.set(n[0],n[1]);Object.defineProperty(dt,t,{value:r,enumerable:!1})}return Object.defineProperty(dt,"codes",{value:e,enumerable:!1}),dt.color.close="\x1B[39m",dt.bgColor.close="\x1B[49m",dt.color.ansi=GN(),dt.color.ansi256=WN(),dt.color.ansi16m=XN(),dt.bgColor.ansi=GN(F5),dt.bgColor.ansi256=WN(F5),dt.bgColor.ansi16m=XN(F5),Object.defineProperties(dt,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(s=>s+s).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>dt.rgbToAnsi256(...dt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,i=Math.floor(o/6)/5,n=o%6/5}let s=Math.max(r,i,n)*2;if(s===0)return 30;let a=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>dt.ansi256ToAnsi(dt.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>dt.ansi256ToAnsi(dt.hexToAnsi256(t)),enumerable:!1}}),dt}var gge=mge(),Q2=new Set(["\x1B","\x9B"]),yge=39,P5="\x07",tk="[",vge="]",rk="m",I5=`${vge}8;;`,YN=e=>`${Q2.values().next().value}${tk}${e}${rk}`,KN=e=>`${Q2.values().next().value}${I5}${e}${P5}`,wge=e=>e.split(" ").map(t=>o1(t)),N5=(e,t,r)=>{let i=[...t],n=!1,s=!1,a=o1(ek(e[e.length-1]));for(let[o,u]of i.entries()){let l=o1(u);if(a+l<=r?e[e.length-1]+=u:(e.push(u),a=0),Q2.has(u)&&(n=!0,s=i.slice(o+1).join("").startsWith(I5)),n){s?u===P5&&(n=!1,s=!1):u===rk&&(n=!1);continue}a+=l,a===r&&o<i.length-1&&(e.push(""),a=0)}!a&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},_ge=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(o1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Dge=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let i="",n,s,a=wge(e),o=[""];for(let[l,c]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let d=o1(o[o.length-1]);if(l!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),d=0),(d>0||r.trim===!1)&&(o[o.length-1]+=" ",d++)),r.hard&&a[l]>t){let p=t-d,f=1+Math.floor((a[l]-p-1)/t);Math.floor((a[l]-1)/t)<f&&o.push(""),N5(o,c,t);continue}if(d+a[l]>t&&d>0&&a[l]>0){if(r.wordWrap===!1&&d<t){N5(o,c,t);continue}o.push("")}if(d+a[l]>t&&r.wordWrap===!1){N5(o,c,t);continue}o[o.length-1]+=c}r.trim!==!1&&(o=o.map(l=>_ge(l)));let u=[...o.join(`
284
284
  `)];for(let[l,c]of u.entries()){if(i+=c,Q2.has(c)){let{groups:p}=new RegExp(`(?:\\${tk}(?<code>\\d+)m|\\${I5}(?<uri>.*)${P5})`).exec(u.slice(l).join(""))||{groups:{}};if(p.code!==void 0){let f=Number.parseFloat(p.code);n=f===yge?void 0:f}else p.uri!==void 0&&(s=p.uri.length===0?void 0:p.uri)}let d=gge.codes.get(Number(n));u[l+1]===`
285
285
  `?(s&&(i+=KN("")),n&&d&&(i+=YN(d))):c===`
286
286
  `&&(n&&d&&(i+=YN(n)),s&&(i+=KN(s)))}return i};function JN(e,t,r){return String(e).normalize().replace(/\r\n/g,`
@@ -394,7 +394,7 @@ ${i5};
394
394
  ${K6e};
395
395
 
396
396
  ${i5};
397
- `)}async function Zst(e,t,r,i){let n=vi(),s=await Xe({message:`Automatic configure end-to-end encryption in ${i} updates?`});if(await xa(s,e,t),s){let a=$e();a.start(`Running: ${n.runner} @capgo/cli@latest key create`),await $F({force:!0},!1)?a.stop("key created \u{1F511}"):(a.stop("Error"),O.warn("Cannot create key \u274C"),ee("Bye \u{1F44B}"),(0,pn.exit)(1)),Lo("onboarding-v2",e,t,"Use encryption")}await xs(e,t,6)}async function Qst(e,t,r,i){let n=vi(),s=await Xe({message:`Automatic build ${i} with "${n.pm} run build" ?`});if(await xa(s,e,t),s){let a=$e(),o=await UT(),u=await Fde(o);a.start(`Running: ${n.pm} run ${u} && ${n.runner} cap sync`),(await Ui()).scripts[u]||(a.stop("Error"),O.warn(`Cannot find ${u} script in package.json, please add it and run \`capgo init\` again`),ee("Bye \u{1F44B}"),(0,pn.exit)()),(0,U2.execSync)(`${n.pm} run ${u} && ${n.runner} cap sync`,J6e),a.stop("Build & Sync Done \u2705")}else O.info(`Build yourself with command: ${n.pm} run build && ${n.runner} cap sync`);await xs(e,t,7)}async function eat(e,t,r,i){let n=vi(),s=await Xe({message:`Automatic upload ${i} bundle to Capgo?`});if(await xa(s,e,t),s){let a=$e();a.start(`Running: ${n.runner} @capgo/cli@latest bundle upload`),await r5(i,{channel:M2,apikey:r},!1)?a.stop("Upload Done \u2705"):(a.stop("Error"),O.warn("Upload failed \u274C"),ee("Bye \u{1F44B}"),(0,pn.exit)())}else O.info(`Upload yourself with command: ${n.runner} @capgo/cli@latest bundle upload`);await xs(e,t,8)}async function tat(e,t){let r=vi(),i=await Xe({message:"Run in device now ?"});if(await xa(i,e,t),i){let n=await rd({message:"Pick a platform to run your app",options:[{value:"ios",label:"IOS"},{value:"android",label:"Android"}]});Gi(n)&&(ee("Bye \u{1F44B}"),(0,pn.exit)());let s=n,a=$e();a.start(`Running: ${r.runner} cap run ${s}`),await(0,U2.spawnSync)(r.runner,["cap","run",s],{stdio:"inherit"}),a.stop("Started Done \u2705")}else O.info(`If you change your mind, run it for yourself with: ${r.runner} cap run <ios|android>`);await xs(e,t,9)}async function rat(e,t,r,i){let n=await Xe({message:"Automatic check if update working in device ?"});if(await xa(n,e,t),n)O.info(`Wait logs sent to Capgo from ${i} device, Please open your app \u{1F4AA}`),await jF("onboarding-v2",r,i,t,e);else{let s=Cf(i);O.info(`Check logs in https://web.capgo.app/app/p/${s}/logs to see if update works.`)}await xs(e,t,10)}async function Q6e(e,t,r){let i=vi();se("Capgo onboarding \u{1F6EB}"),await ct();let n=Ht(),s=await ge();t=t||s?.config?.appId;let a=e||Ae(),o=$e();(!U6e()||e)&&(o.start(`Running: ${i.runner} @capgo/cli@latest login ***`),await bN(a,r,!1),o.stop("Login Done \u2705"));let u=await Ee(a);await xe(u,a,["upload","all","read","write"]);let l=await Sf(u,["admin","super_admin"]),c=l.gid,d=await Hst(c,n)??0;try{d<1&&await xs(c,n,1),d<2&&(await Gst(l,n,t,r),ul(2)),d<3&&(await Wst(c,n,a,t),ul(3)),d<4&&(await Kst(c,n,a,t),ul(4)),d<5&&(await Jst(c,n,a,t),ul(5)),d<6&&(await Zst(c,n,a,t),ul(6)),d<7&&(await Qst(c,n,a,t),ul(7)),d<8&&(await eat(c,n,a,t),ul(8)),d<9&&(await tat(c,n),ul(9)),await rat(c,n,a,t),await xs(c,n,0),zst()}catch(p){console.error(p),O.error("Error during onboarding, please try again later"),(0,pn.exit)(1)}O.info("Welcome onboard \u2708\uFE0F!"),O.info("Your Capgo update system is setup"),O.info(`Next time use \`${i.runner} @capgo/cli@latest bundle upload\` to only upload your bundle`),O.info(`If you have any issue try to use the debug command \`${i.runner} @capgo/cli@latest app debug\``),ee("Bye \u{1F44B}"),(0,pn.exit)()}var s4e=require("node:process");var r4e=require("node:process");var i4e=me(R2());var e4e=require("node:process");async function t4e(e,t,r){let{data:i,error:n}=await e.from("devices_override").select().eq("app_id",t).eq("version",r.id);if(n&&(O.error(`Cannot check Device override ${t}@${r.name}`),B.error("")),i&&i.length>0)if(se(`\u274C Version ${t}@${r.name} is used in ${i.length} device override`),await Xe({message:"unlink it?"}))for(let s of i){let a=$e();a.start(`Unlinking device ${s.device_id}`);let{error:o}=await e.from("devices_override").delete().eq("device_id",s.device_id);o&&(a.stop(`Cannot unlink device ${s.device_id} ${ue(o)}`),(0,e4e.exit)(1)),a.stop(`\u2705 Device ${s.device_id} unlinked`)}else O.error("Unlink it first"),B.error("")}async function iat(e,t,r){let{error:i}=await e.from("app_versions").update({deleted:!0}).eq("app_id",t).eq("deleted",!1).eq("name",r);i&&(O.error(`App Version ${t}@${r} not found in database`),B.error(""))}async function a5(e,t,r){let i=await nat(e,t,r);await I2e(e,t,i),await t4e(e,t,i),await iat(e,t,r)}function o5(e){e.length||(O.error("No bundle found"),(0,r4e.exit)(1));let t=new i4e.Table({title:"Bundles",charLength:{"\u274C":2,"\u2705":2}});e.reverse().forEach(r=>{t.addRow({Version:r.name,Created:Af(r.created_at),...r.keep!=null?{Keep:r.keep}:{}})}),O.success(t.render())}async function u5(e,t){let{data:r,error:i}=await e.from("app_versions").select().eq("app_id",t).eq("deleted",!1).order("created_at",{ascending:!1});return i&&(O.error(`App ${t} not found in database`),B.error("")),r}async function n4e(e,t){let{data:r,error:i}=await e.from("channels").select("version").eq("app_id",t);return i&&(O.error(`App ${t} not found in database`),B.error("")),r.map(n=>n.version)}async function nat(e,t,r){let{data:i,error:n}=await e.from("app_versions").select().eq("app_id",t).eq("name",r).eq("deleted",!1).single();return(!i||n)&&(O.error(`App Version ${t}@${r} doesn't exist`),B.error("")),i}async function a4e(e,t){se("List bundles"),await ct(),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId,t.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(O.error("Missing argument, you need to provide a appid, or be in a capacitor project"),B.error(""));let i=await Ee(t.apikey);await xe(i,t.apikey,["write","all","read","upload"]),O.info(`Querying available versions of: ${e} in Capgo`),await tt(i,t.apikey,e,1);let n=await u5(i,e);O.info(`Active versions in Capgo: ${n?.length}`),o5(n),ee("Done \u2705"),(0,s4e.exit)()}var Sa=require("node:fs"),o4e=require("node:process");async function u4e(e,t,r){se("Decrypt zip file"),await ct(),(0,Sa.existsSync)(e)||(O.error(`Zip not found at the path ${e}`),B.error(""));let i=await ge(),{extConfig:n}=i.app;!r.key&&!(0,Sa.existsSync)(Co)&&!n.plugins?.CapacitorUpdater?.privateKey&&(O.error(`Private Key not found at the path ${Co} or in ${i.apextConfigFilePath}`),B.error(""));let s=r.key||Co,a=n?.plugins?.CapacitorUpdater?.privateKey;!(0,Sa.existsSync)(s)&&!a?(O.error(`Cannot find public key ${s} or as keyData option or in ${i.apextConfigFilePath}`),B.error("")):(0,Sa.existsSync)(s)&&(a=(0,Sa.readFileSync)(s).toString());let o=(0,Sa.readFileSync)(e),u=p2e(o,t,r.keyData??a??"");(0,Sa.writeFileSync)(`${e}_decrypted.zip`,u),ee(`Decrypted zip file at ${e}_decrypted.zip`),(0,o4e.exit)()}var Uo=require("node:fs"),l4e=require("node:process");var c4e=me(sN());async function d4e(e,t){se("Encryption"),await ct();let r=await xc();(0,Uo.existsSync)(e)||(O.error(`Error: Zip not found at the path ${e}`),B.error(""));let i=t.key||Ao,n=t.keyData||"";!(0,Uo.existsSync)(i)&&!n?(O.warning(`Cannot find public key ${i} or as keyData option`),c4e.default.isCI&&(O.error("Error: Missing public key"),B.error("")),await Xe({message:"Do you want to use our public key ?"})||(O.error("Error: Missing public key"),B.error("")),n=r.signKey||""):(0,Uo.existsSync)(i)&&(n=(0,Uo.readFileSync)(i).toString());let s=(0,Uo.readFileSync)(e),a=qy(s,n);O.success(`ivSessionKey: ${a.ivSessionKey}`),(0,Uo.writeFileSync)(`${e}_encrypted.zip`,a.encryptedData),O.success(`Encrypted zip saved at ${e}_encrypted.zip`),ee("Done \u2705"),(0,l4e.exit)()}var n1=require("node:process"),l5=require("node:os"),p4e=me(FF());async function sat(e){let t={},r=[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.push((0,p4e.default)(i));return await Promise.all(r).then(i=>{let n=Object.keys(e);for(let s=0;s<i.length;s+=1){let a=i[s];a&&(t[n[s]]=a)}}),t}async function aat(){let{dependencies:e}=await Ui(),t={"@capgo/cli":Vo.version};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith("@capgo/")&&r.startsWith("@capawesome/")&&r.startsWith("capacitor")){let i=e[r].replace("^","").replace("~","");t[r]=i}return t}async function f4e(){O.warn(" \u{1F48A} Capgo Doctor \u{1F48A}");let e=await ge(),t=await Ui(),r=e?.config?.plugins?.CapacitorUpdater?.version||t?.version,i=e?.config?.appName||"";O.info(` App Name: ${i}`);let n=e?.config?.appId||"";O.info(` App ID: ${n}`),O.info(` App Version: ${r}`);let s=e?.config?.webDir||"";O.info(` Web Dir: ${s}`),O.info(` OS: ${(0,l5.platform)()} ${(0,l5.version)()}`),O.info(` Node: ${n1.version}`),O.info(" Installed Dependencies:");let a=await aat();Object.keys(a).length===0&&(O.warning("\x1B[31m%s\x1B[0m \u{1F6A8} No dependencies found"),(0,n1.exit)(1));for(let l in a)if(Object.prototype.hasOwnProperty.call(a,l)){let c=a[l];O.info(` ${l}: ${c}`)}let o=$e();o.start("Running: Loading latest dependencies");let u=await sat(a);o.stop("Latest Dependencies:");for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let c=u[l];O.info(` ${l}: ${c}`)}JSON.stringify(a)!==JSON.stringify(u)&&(O.warn("\x1B[31m\u{1F6A8} Some dependencies are not up to date\x1B[0m"),(0,n1.exit)(1)),O.success("\x1B[32m\u2705 All dependencies are up to date\x1B[0m"),(0,n1.exit)()}var h4e=require("node:process");async function m4e(e,t,r){se("Delete bundle"),r.apikey=r.apikey||Ae();let i=await ge();t=t||i?.config?.appId,r.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(r.apikey);await xe(n,r.apikey,["write","all"]),await tt(n,r.apikey,t,3),r.apikey||(O.error("Missing API key, you need to provide an API key to delete your app"),B.error("")),e||(O.error("Missing argument, you need to provide a bundleId, or be in a capacitor project"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error("")),O.info(`Deleting bundle ${t}@${e} from Capgo`),await a5(n,t,e),O.success(`Bundle ${t}@${e} deleted in Capgo`),ee("Done"),(0,h4e.exit)()}var y4e=require("node:process");var g4e=["major","minor","metadata","patch","none"];async function v4e(e,t,r){se("Set channel"),r.apikey=r.apikey||Ae();let i=await ge();t=t||i?.config?.appId;let n=Ht();r.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all"]);await tt(s,r.apikey,t,4);let o=await zn(s,t),{bundle:u,state:l,downgrade:c,latest:d,upgrade:p,ios:f,android:h,selfAssign:g,disableAutoUpdate:v,dev:y,emulator:x}=r;e||(O.error("Missing argument, you need to provide a channel"),B.error("")),d&&u&&(O.error("Cannot set latest and bundle at the same time"),B.error("")),u==null&&l==null&&d==null&&c==null&&p==null&&f==null&&h==null&&g==null&&y==null&&x==null&&v==null&&(O.error("Missing argument, you need to provide a option to set"),B.error(""));try{await xf(s,o,r.apikey,t);let D={created_by:a,app_id:t,name:e,owner_org:o,version:void 0},w=await Ui(),_=d?w?.version:u;if(_!=null){let{data:A,error:C}=await s.from("app_versions").select().eq("app_id",t).eq("name",_).eq("user_id",a).eq("deleted",!1).single();(C||!A)&&(O.error(`Cannot find version ${_}`),B.error("")),O.info(`Set ${t} channel: ${e} to @${_}`),D.version=A.id}if(l!=null&&((l==="public"||l==="private")&&O.info(`Set ${t} channel: ${e} to public or private is deprecated, use default or normal instead`),O.info(`Set ${t} channel: ${e} to ${l==="public"||l==="default"?"default":"normal"}`),D.public=l==="public"||l==="default"),c!=null&&(O.info(`Set ${t} channel: ${e} to ${c?"allow":"disallow"} downgrade`),D.disable_auto_update_under_native=!c),f!=null&&(O.info(`Set ${t} channel: ${e} to ${f?"allow":"disallow"} ios update`),D.ios=!!f),h!=null&&(O.info(`Set ${t} channel: ${e} to ${h?"allow":"disallow"} android update`),D.android=!!h),g!=null&&(O.info(`Set ${t} channel: ${e} to ${g?"allow":"disallow"} self assign to this channel`),D.allow_device_self_set=!!g),v!=null){let A=v.toLocaleLowerCase();g4e.includes(A)||(O.error(`Channel strategy ${A} is not known. The possible values are: ${g4e.join(", ")}.`),B.error("")),A==="metadata"&&(A="version_number"),D.disable_auto_update=A,O.info(`Set ${t} channel: ${e} to ${A} disable update strategy to this channel`)}try{let{error:A}=await M9(s,D);A&&(O.error('Cannot set channel the upload key is not allowed to do that, use the "all" for this.'),B.error(""))}catch{O.error('Cannot set channel the upload key is not allowed to do that, use the "all" for this.'),B.error("")}await n.track({channel:"channel",event:"Set channel",icon:"\u2705",user_id:o,tags:{"app-id":t},notify:!1}).catch()}catch(D){O.error(`Unknow error ${ue(D)}`),B.error("")}ee("Done \u2705"),(0,y4e.exit)()}var w4e=require("node:process");async function _4e(e,t,r){let{quiet:i}=r;i||se("List current bundle"),r.apikey=r.apikey||Ae(i);let n=await ge();t=t||n?.config?.appId,r.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all","read"]);await tt(s,r.apikey,t,1),e||(O.error("Please provide a channel to get the bundle from."),B.error(""));let{data:o,error:u}=await s.from("channels").select("version ( name )").eq("name",e).eq("app_id",t).limit(1);(u||o.length===0)&&(O.error(`Error retrieving channel ${e} for app ${t}. Perhaps the channel does not exists?`),B.error(""));let{version:l}=o[0];l||(O.error(`Error retrieving channel ${e} for app ${t}. Perhaps the channel does not exists?`),B.error("")),i?O.info(l.name):O.info(`Current bundle for channel ${e} is ${l.name}`),(0,w4e.exit)()}var AN=require("node:process");var D4e=me(R2());function oat(e){e.length||(O.error("No apps found"),(0,AN.exit)(1));let t=new D4e.Table({title:"Apps",charLength:{"\u274C":2,"\u2705":2}});e.reverse().forEach(r=>{t.addRow({Name:r.name,id:r.app_id,Created:Af(r.created_at)})}),O.success(t.render())}async function uat(e){let{data:t,error:r}=await e.from("apps").select().order("created_at",{ascending:!1});return r&&(O.error("Apps not found"),B.error("")),t}async function b4e(e){se("List apps in Capgo"),await ct(),e.apikey=e.apikey||Ae();let t=await Ee(e.apikey);await xe(t,e.apikey,["write","all","read","upload"]),O.info("Getting active bundle in Capgo");let r=await uat(t);O.info(`Active app in Capgo: ${r?.length}`),oat(r),ee("Done \u2705"),(0,AN.exit)()}var TN=require("node:process");var c5=me(x4e());async function lat(e,t,r){for await(let i of e)O.warn(`Removing ${i.name} created on ${Af(i.created_at)}`),await a5(t,r,i.name)}function cat(e,t,r){let i=[];return e?.forEach(n=>{c5.default.gte(n.name,t)&&c5.default.lt(n.name,`${r}`)&&i.push(n)}),i}async function S4e(e,t){se("Cleanup versions in Capgo"),await ct(),t.apikey=t.apikey||Ae();let{bundle:r,keep:i=4}=t,n=t.force||!1,s=await ge();e=e||s?.config?.appId,t.apikey||(O.error("Missing API key, you need to provide an API key to delete your app"),B.error("")),e||(O.error("Missing argument, you need to provide a appid, or be in a capacitor project"),B.error(""));let a=await Ee(t.apikey);await xe(a,t.apikey,["write","all"]),await tt(a,t.apikey,e,3),O.info("Querying all available versions in Capgo");let o=await u5(a,e),u=await n4e(a,e);if(O.info(`Total active versions in Capgo: ${o?.length}`),o?.length===0){O.error("No versions found, aborting cleanup");return}if(r){let d=`${c5.default.inc(r,"major")}`;O.info(`Querying available versions in Capgo between ${r} and ${d}`),o=cat(o,r,d),O.info(`Active versions in Capgo between ${r} and ${d}: ${o?.length}`)}let l=[],c=0;if(o.forEach(d=>{let p=u.find(f=>f===d.id);c<i||p?(p?d.keep="\u2705 (Linked to channel)":d.keep="\u2705",c+=1):(d.keep="\u274C",l.push(d))}),l.length===0){O.warn("Nothing to be removed, aborting removal...");return}if(o5(o),!n){let d=await Xe({message:"Do you want to continue removing the versions specified?"});(Gi(d)||!d)&&(O.warn("Not confirmed, aborting removal..."),(0,TN.exit)())}O.success("You have confirmed removal, removing versions now"),await lat(l,a,e),ee("Done \u2705"),(0,TN.exit)()}var C4e=require("node:process");async function A4e(e,t,r){se("Delete channel"),r.apikey=r.apikey||Ae();let i=await ge();t=t||i?.config?.appId;let n=Ht();r.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all"]);await tt(s,r.apikey,t,4),O.info(`Deleting channel ${t}#${e} from Capgo`);try{let o=await B2e(s,e,t,a);o.error&&(O.error(`Cannot delete Channel \u{1F640} ${ue(o.error)}`),B.error(""));let u=await zn(s,t);O.success("Channel deleted"),await n.track({channel:"channel",event:"Delete channel",icon:"\u2705",user_id:u,tags:{"user-id":a,"app-id":t,channel:e},notify:!1}).catch()}catch{O.error("Cannot delete Channel \u{1F640}")}ee("Done \u2705"),(0,C4e.exit)()}var T4e=require("node:process");async function O4e(e,t){se("List channels"),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId;let i=Ht();t.apikey||O.error("Missing API key, you need to provide a API key to upload your bundle"),e||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey),s=await xe(n,t.apikey,["write","all","read","upload"]);await tt(n,t.apikey,e,1),O.info("Querying available channels in Capgo");let a=await j2e(n,e);O.info(`Active channels in Capgo: ${a?.length}`),q2e(a),await i.track({channel:"channel",event:"List channel",icon:"\u2705",user_id:s,tags:{"app-id":e},notify:!1}).catch(),ee("Done \u2705"),(0,T4e.exit)()}var F4e=require("node:crypto"),s1=require("node:fs"),N4e=require("node:process");async function k4e(e,t){se("Set app"),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId,t.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let i=await Ee(t.apikey),s=(await Sf(i,["admin","super_admin"])).gid,a=await xe(i,t.apikey,["write","all"]);await tt(i,t.apikey,e,4);let{name:o,icon:u,retention:l}=t;l&&Number.isNaN(Number(l))?(O.error("retention value must be a number"),B.error("")):l&&l<0&&(O.error("retention value cannot be less than 0"),B.error(""));let c,d,p=`icon_${(0,F4e.randomUUID)()}`,f="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(u&&(0,s1.existsSync)(u)?(c=(0,s1.readFileSync)(u),d=t1.getType(u)||"image/png",O.warn(`Found app icon ${u}`)):(0,s1.existsSync)(Kn)?(c=(0,s1.readFileSync)(Kn),d=t1.getType(Kn)||"image/png",O.warn(`Found app icon ${Kn}`)):O.warn(`Cannot find app icon in any of the following locations: ${u}, ${Kn}`),c&&d){let{error:g}=await i.storage.from(`images/org/${s}/${e}`).upload(p,c,{contentType:d});g&&(O.error(`Could not set app ${ue(g)}`),B.error(""));let{data:v}=await i.storage.from(`images/org/${s}/${e}`).getPublicUrl(p);f=v?.publicUrl||f}let{error:h}=await i.from("apps").update({icon_url:f,name:o,retention:l?l*24*60*60:void 0}).eq("app_id",e).eq("user_id",a);h&&(O.error(`Could not set app ${ue(h)}`),B.error("")),ee("Done \u2705"),(0,N4e.exit)()}var R4e=require("node:process");async function P4e(e,t){se("Deleting"),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId;let i=Ht();t.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey),s=await xe(n,t.apikey,["write","all"]);await tt(n,t.apikey,e,5);let{data:a,error:o}=await n.from("apps").select("owner_org ( created_by, id )").eq("app_id",e).single(),u=a;if(!o&&(u?.owner_org.created_by??"")!==s){O.warn("Deleting the app is not recomended for users that are not the organization owner"),O.warn("You are invited as a super_admin but your are not the owner"),O.warn("It's strongly recomended that you do not continue!");let f=await rd({message:"Do you want to continue?",options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}]});(Gi(f)||f==="no")&&(O.error("Canceled deleting the app, exiting"),B.error(""))}else o&&O.warn(`Cannot get the app owner ${ue(o)}`);let{error:l}=await n.storage.from("images").remove([`org/${u?.owner_org.id}/${e}/icon`]);l&&(console.error(l,`images/org/${u?.owner_org.id}/${e}`),O.error("Could not delete app logo"));let{error:c}=await n.storage.from(`apps/${e}/${s}`).remove(["versions"]);c&&O.error("Could not delete app version");let{error:d}=await n.from("apps").delete().eq("app_id",e);d&&(O.error("Could not delete app"),B.error(""));let p=await zn(n,e);await i.track({channel:"app",event:"App Deleted",icon:"\u{1F5D1}\uFE0F",user_id:p,tags:{"app-id":e},notify:!1}).catch(),O.success("App deleted in Capgo"),ee("Done \u2705"),(0,R4e.exit)()}var I4e=me(R2());async function L4e(e,t){se("Check compatibility"),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId;let{channel:i}=t;i||(O.error("Missing argument, you need to provide a channel"),B.error("")),t.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey);await xe(n,t.apikey,["write","all","read","upload"]),await tt(n,t.apikey,e,1);let{finalCompatibility:s}=await U9(n,e,i),a=new I4e.Table({title:"Compatibility",charLength:{"\u274C":2,"\u2705":2}}),o=t.text?"Yes":"\u2705",u=t.text?"No":"\u274C";s.forEach(l=>{let{name:c,localVersion:d,remoteVersion:p}=l;a.addRow({Package:c,"Local version":d??"None","Remote version":p??"None",Compatible:p===d?o:u})}),O.success(a.render())}B.name(Vo.name).description("Manage packages and bundle versions in Capgo Cloud").version(Vo.version);B.command("login [apikey]").alias("l").description("Save apikey to your machine or folder").action(V6e).option("--local","Only save in local folder");B.command("doctor").description("Get info about your Capgo app install").action(f4e);B.command("init [apikey] [appId]").description("Init a new app").action(Q6e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account");var V2=B.command("app").description("Manage app");V2.command("add [appId]").alias("a").description("Add a new app in Capgo Cloud").action(Y6e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account");V2.command("delete [appId]").description("Delete an app in Capgo Cloud").action(P4e).option("-a, --apikey <apikey>","apikey to link to your account");V2.command("list").alias("l").description("list apps in Capgo Cloud").action(b4e).option("-a, --apikey <apikey>","apikey to link to your account");V2.command("debug [appId]").description("Listen for live updates event in Capgo Cloud to debug your app").option("-a, --apikey <apikey>","apikey to link to your account").option("-d, --device <device>","the specific device to debug").action(u2e);V2.command("set [appId]").alias("s").description("Set an app in Capgo Cloud").action(k4e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account").option("-r, --retention <retention>","retention period of app bundle in days");var ll=B.command("bundle").description("Manage bundle");ll.command("upload [appId]").alias("u").description("Upload a new bundle in Capgo Cloud").action($6e).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--iv-session-key <key>","Set the iv and session key for bundle url external").option("--s3-region <region>","Region for your S3 bucket").option("--s3-apikey <apikey>","Apikey for your S3 endpoint").option("--s3-apisecret <apisecret>","Api secret for your S3 endpoint").option("--s3-endoint <s3Endpoint>","Url of S3 endpoint").option("--s3-bucket-name <bucketName>","Name for your AWS S3 bucket").option("--s3-port <port>","Port for your S3 endpoint").option("--no-s3-ssl","Disable SSL for S3 upload").option("--key <key>","custom path for public signing key").option("--key-data <keyData>","base64 public signing key").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the bundle to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel").option("--auto-min-update-version","Set the min update version based on native packages").option("--ignore-metadata-check","Ignores the metadata (node_modules) check when uploading").option("--ignore-checksum-check","Ignores the checksum check when uploading").option("--timeout <timeout>","Timeout for the upload process in seconds").option("--multipart","Uses multipart protocol to upload data to S3");ll.command("compatibility [appId]").action(L4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-c, --channel <channel>","channel to check the compatibility with").option("--text","output text instead of emojis");ll.command("delete [bundleId] [appId]").alias("d").description("Delete a bundle in Capgo Cloud").action(m4e).option("-a, --apikey <apikey>","apikey to link to your account");ll.command("list [appId]").alias("l").description("List bundle in Capgo Cloud").action(a4e).option("-a, --apikey <apikey>","apikey to link to your account");ll.command("cleanup [appId]").alias("c").action(S4e).description("Cleanup bundle in Capgo Cloud").option("-b, --bundle <bundle>","bundle version number of the app to delete").option("-a, --apikey <apikey>","apikey to link to your account").option("-k, --keep <keep>","number of version to keep").option("-f, --force","force removal");ll.command("decrypt [zipPath] [sessionKey]").description("Decrypt a signed zip bundle").action(u4e).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","base64 private signing key");ll.command("encrypt [zipPath]").description("Encrypt a zip bundle").action(d4e).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","base64 private signing key");ll.command("zip [appId]").description("Zip a bundle").action(Hme).option("-p, --path <path>","path of the folder to upload").option("-b, --bundle <bundle>","bundle version number to name the zip file").option("-n, --name <name>","name of the zip file").option("-j, --json","output in JSON").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder");var H2=B.command("channel").description("Manage channel");H2.command("add [channelId] [appId]").alias("a").description("Create channel").action(M2e).option("-d, --default","set the channel as default").option("-a, --apikey <apikey>","apikey to link to your account");H2.command("delete [channelId] [appId]").alias("d").description("Delete channel").action(A4e).option("-a, --apikey <apikey>","apikey to link to your account");H2.command("list [appId]").alias("l").description("List channel").action(O4e).option("-a, --apikey <apikey>","apikey to link to your account");H2.command("currentBundle [channel] [appId]").description("Get current bundle for specific channel in Capgo Cloud").action(_4e).option("-c, --channel <channel>","channel to get the current bundle from").option("-a, --apikey <apikey>","apikey to link to your account").option("--quiet","only print the bundle version");H2.command("set [channelId] [appId]").alias("s").description("Set channel").action(v4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-b, --bundle <bundle>","bundle version number of the file to set").option("-s, --state <state>","set the state of the channel, default or normal").option("--latest","get the latest version key in the package.json to set it to the channel").option("--downgrade","Allow to downgrade to version under native one").option("--no-downgrade","Disable downgrade to version under native one").option("--upgrade","Allow to upgrade to version above native one").option("--no-upgrade","Disable upgrade to version above native one").option("--ios","Allow sending update to ios devices").option("--no-ios","Disable sending update to ios devices").option("--android","Allow sending update to android devices").option("--no-android","Disable sending update to android devices").option("--self-assign","Allow to device to self assign to this channel").option("--no-self-assign","Disable devices to self assign to this channel").option("--disable-auto-update <disableAutoUpdate>","Disable auto update strategy for this channel.The possible options are: major, minor, metadata, patch, none").option("--dev","Allow sending update to development devices").option("--no-dev","Disable sending update to development devices").option("--emulator","Allow sending update to emulator devices").option("--no-emulator","Disable sending update to emulator devices");var B4e=B.command("key").description("Manage key");B4e.command("save").description("Save base64 signing key in capacitor config, usefull for CI").action(h2e).option("-f, --force","force generate a new one").option("--key","key path to save in capacitor config").option("--key-data","key data to save in capacitor config");B4e.command("create").description("Create a new signing key").action(m2e).option("-f, --force","force generate a new one");B.command("upload [appId]").alias("u").description("(Deprecated) Upload a new bundle to Capgo Cloud").action(M6e).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--key <key>","custom path for public signing key").option("--key-data <keyData>","base64 public signing key").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the file to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel");var dat=B.command("account").description("Manage account");dat.command("id").description("Get your account ID").action(Bde).option("-a, --apikey <apikey>","apikey to link to your account");B.parseAsync();
397
+ `)}async function Zst(e,t,r,i){let n=vi(),s=await Xe({message:`Automatic configure end-to-end encryption in ${i} updates?`});if(await xa(s,e,t),s){let a=$e();a.start(`Running: ${n.runner} @capgo/cli@latest key create`),await $F({force:!0},!1)?a.stop("key created \u{1F511}"):(a.stop("Error"),O.warn("Cannot create key \u274C"),ee("Bye \u{1F44B}"),(0,pn.exit)(1)),Lo("onboarding-v2",e,t,"Use encryption")}await xs(e,t,6)}async function Qst(e,t,r,i){let n=vi(),s=await Xe({message:`Automatic build ${i} with "${n.pm} run build" ?`});if(await xa(s,e,t),s){let a=$e(),o=await UT(),u=await Fde(o);a.start(`Running: ${n.pm} run ${u} && ${n.runner} cap sync`),(await Ui()).scripts[u]||(a.stop("Error"),O.warn(`Cannot find ${u} script in package.json, please add it and run \`capgo init\` again`),ee("Bye \u{1F44B}"),(0,pn.exit)()),(0,U2.execSync)(`${n.pm} run ${u} && ${n.runner} cap sync`,J6e),a.stop("Build & Sync Done \u2705")}else O.info(`Build yourself with command: ${n.pm} run build && ${n.runner} cap sync`);await xs(e,t,7)}async function eat(e,t,r,i){let n=vi(),s=await Xe({message:`Automatic upload ${i} bundle to Capgo?`});if(await xa(s,e,t),s){let a=$e();a.start(`Running: ${n.runner} @capgo/cli@latest bundle upload`),await r5(i,{channel:M2,apikey:r},!1)?a.stop("Upload Done \u2705"):(a.stop("Error"),O.warn("Upload failed \u274C"),ee("Bye \u{1F44B}"),(0,pn.exit)())}else O.info(`Upload yourself with command: ${n.runner} @capgo/cli@latest bundle upload`);await xs(e,t,8)}async function tat(e,t){let r=vi(),i=await Xe({message:"Run in device now ?"});if(await xa(i,e,t),i){let n=await rd({message:"Pick a platform to run your app",options:[{value:"ios",label:"IOS"},{value:"android",label:"Android"}]});Gi(n)&&(ee("Bye \u{1F44B}"),(0,pn.exit)());let s=n,a=$e();a.start(`Running: ${r.runner} cap run ${s}`),await(0,U2.spawnSync)(r.runner,["cap","run",s],{stdio:"inherit"}),a.stop("Started Done \u2705")}else O.info(`If you change your mind, run it for yourself with: ${r.runner} cap run <ios|android>`);await xs(e,t,9)}async function rat(e,t,r,i){let n=await Xe({message:"Automatic check if update working in device ?"});if(await xa(n,e,t),n)O.info(`Wait logs sent to Capgo from ${i} device, Please open your app \u{1F4AA}`),await jF("onboarding-v2",r,i,t,e);else{let s=Cf(i);O.info(`Check logs in https://web.capgo.app/app/p/${s}/logs to see if update works.`)}await xs(e,t,10)}async function Q6e(e,t,r){let i=vi();se("Capgo onboarding \u{1F6EB}"),await ct();let n=Ht(),s=await ge();t=t||s?.config?.appId;let a=e||Ae(),o=$e();(!U6e()||e)&&(o.start(`Running: ${i.runner} @capgo/cli@latest login ***`),await bN(a,r,!1),o.stop("Login Done \u2705"));let u=await Ee(a);await xe(u,a,["upload","all","read","write"]);let l=await Sf(u,["admin","super_admin"]),c=l.gid,d=await Hst(c,n)??0;try{d<1&&await xs(c,n,1),d<2&&(await Gst(l,n,t,r),ul(2)),d<3&&(await Wst(c,n,a,t),ul(3)),d<4&&(await Kst(c,n,a,t),ul(4)),d<5&&(await Jst(c,n,a,t),ul(5)),d<6&&(await Zst(c,n,a,t),ul(6)),d<7&&(await Qst(c,n,a,t),ul(7)),d<8&&(await eat(c,n,a,t),ul(8)),d<9&&(await tat(c,n),ul(9)),await rat(c,n,a,t),await xs(c,n,0),zst()}catch(p){console.error(p),O.error("Error during onboarding, please try again later"),(0,pn.exit)(1)}O.info("Welcome onboard \u2708\uFE0F!"),O.info("Your Capgo update system is setup"),O.info(`Next time use \`${i.runner} @capgo/cli@latest bundle upload\` to only upload your bundle`),O.info(`If you have any issue try to use the debug command \`${i.runner} @capgo/cli@latest app debug\``),ee("Bye \u{1F44B}"),(0,pn.exit)()}var s4e=require("node:process");var r4e=require("node:process");var i4e=me(R2());var e4e=require("node:process");async function t4e(e,t,r){let{data:i,error:n}=await e.from("devices_override").select().eq("app_id",t).eq("version",r.id);if(n&&(O.error(`Cannot check Device override ${t}@${r.name}`),B.error("")),i&&i.length>0)if(se(`\u274C Version ${t}@${r.name} is used in ${i.length} device override`),await Xe({message:"unlink it?"}))for(let s of i){let a=$e();a.start(`Unlinking device ${s.device_id}`);let{error:o}=await e.from("devices_override").delete().eq("device_id",s.device_id);o&&(a.stop(`Cannot unlink device ${s.device_id} ${ue(o)}`),(0,e4e.exit)(1)),a.stop(`\u2705 Device ${s.device_id} unlinked`)}else O.error("Unlink it first"),B.error("")}async function iat(e,t,r){let{error:i}=await e.from("app_versions").update({deleted:!0}).eq("app_id",t).eq("deleted",!1).eq("name",r);i&&(O.error(`App Version ${t}@${r} not found in database`),B.error(""))}async function a5(e,t,r){let i=await nat(e,t,r);await I2e(e,t,i),await t4e(e,t,i),await iat(e,t,r)}function o5(e){e.length||(O.error("No bundle found"),(0,r4e.exit)(1));let t=new i4e.Table({title:"Bundles",charLength:{"\u274C":2,"\u2705":2}});e.reverse().forEach(r=>{t.addRow({Version:r.name,Created:Af(r.created_at),...r.keep!=null?{Keep:r.keep}:{}})}),O.success(t.render())}async function u5(e,t){let{data:r,error:i}=await e.from("app_versions").select().eq("app_id",t).eq("deleted",!1).order("created_at",{ascending:!1});return i&&(O.error(`App ${t} not found in database`),B.error("")),r}async function n4e(e,t){let{data:r,error:i}=await e.from("channels").select("version").eq("app_id",t);return i&&(O.error(`App ${t} not found in database`),B.error("")),r.map(n=>n.version)}async function nat(e,t,r){let{data:i,error:n}=await e.from("app_versions").select().eq("app_id",t).eq("name",r).eq("deleted",!1).single();return(!i||n)&&(O.error(`App Version ${t}@${r} doesn't exist`),B.error("")),i}async function a4e(e,t){se("List bundles"),await ct(),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId,t.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(O.error("Missing argument, you need to provide a appid, or be in a capacitor project"),B.error(""));let i=await Ee(t.apikey);await xe(i,t.apikey,["write","all","read","upload"]),O.info(`Querying available versions of: ${e} in Capgo`),await tt(i,t.apikey,e,1);let n=await u5(i,e);O.info(`Active versions in Capgo: ${n?.length}`),o5(n),ee("Done \u2705"),(0,s4e.exit)()}var Sa=require("node:fs"),o4e=require("node:process");async function u4e(e,t,r){se("Decrypt zip file"),await ct(),(0,Sa.existsSync)(e)||(O.error(`Zip not found at the path ${e}`),B.error(""));let i=await ge();!r.key&&!(0,Sa.existsSync)(Co)&&!i.config.plugins?.CapacitorUpdater?.privateKey&&(O.error(`Private Key not found at the path ${Co} or in ${i.path}`),B.error(""));let n=r.key||Co,s=i.config.plugins?.CapacitorUpdater?.privateKey;!(0,Sa.existsSync)(n)&&!s?(O.error(`Cannot find public key ${n} or as keyData option or in ${i.path}`),B.error("")):(0,Sa.existsSync)(n)&&(s=(0,Sa.readFileSync)(n).toString());let a=(0,Sa.readFileSync)(e),o=p2e(a,t,r.keyData??s??"");(0,Sa.writeFileSync)(`${e}_decrypted.zip`,o),ee(`Decrypted zip file at ${e}_decrypted.zip`),(0,o4e.exit)()}var Uo=require("node:fs"),l4e=require("node:process");var c4e=me(sN());async function d4e(e,t){se("Encryption"),await ct();let r=await xc();(0,Uo.existsSync)(e)||(O.error(`Error: Zip not found at the path ${e}`),B.error(""));let i=t.key||Ao,n=t.keyData||"";!(0,Uo.existsSync)(i)&&!n?(O.warning(`Cannot find public key ${i} or as keyData option`),c4e.default.isCI&&(O.error("Error: Missing public key"),B.error("")),await Xe({message:"Do you want to use our public key ?"})||(O.error("Error: Missing public key"),B.error("")),n=r.signKey||""):(0,Uo.existsSync)(i)&&(n=(0,Uo.readFileSync)(i).toString());let s=(0,Uo.readFileSync)(e),a=qy(s,n);O.success(`ivSessionKey: ${a.ivSessionKey}`),(0,Uo.writeFileSync)(`${e}_encrypted.zip`,a.encryptedData),O.success(`Encrypted zip saved at ${e}_encrypted.zip`),ee("Done \u2705"),(0,l4e.exit)()}var n1=require("node:process"),l5=require("node:os"),p4e=me(FF());async function sat(e){let t={},r=[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.push((0,p4e.default)(i));return await Promise.all(r).then(i=>{let n=Object.keys(e);for(let s=0;s<i.length;s+=1){let a=i[s];a&&(t[n[s]]=a)}}),t}async function aat(){let{dependencies:e}=await Ui(),t={"@capgo/cli":Vo.version};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith("@capgo/")&&r.startsWith("@capawesome/")&&r.startsWith("capacitor")){let i=e[r].replace("^","").replace("~","");t[r]=i}return t}async function f4e(){O.warn(" \u{1F48A} Capgo Doctor \u{1F48A}");let e=await ge(),t=await Ui(),r=e?.config?.plugins?.CapacitorUpdater?.version||t?.version,i=e?.config?.appName||"";O.info(` App Name: ${i}`);let n=e?.config?.appId||"";O.info(` App ID: ${n}`),O.info(` App Version: ${r}`);let s=e?.config?.webDir||"";O.info(` Web Dir: ${s}`),O.info(` OS: ${(0,l5.platform)()} ${(0,l5.version)()}`),O.info(` Node: ${n1.version}`),O.info(" Installed Dependencies:");let a=await aat();Object.keys(a).length===0&&(O.warning("\x1B[31m%s\x1B[0m \u{1F6A8} No dependencies found"),(0,n1.exit)(1));for(let l in a)if(Object.prototype.hasOwnProperty.call(a,l)){let c=a[l];O.info(` ${l}: ${c}`)}let o=$e();o.start("Running: Loading latest dependencies");let u=await sat(a);o.stop("Latest Dependencies:");for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let c=u[l];O.info(` ${l}: ${c}`)}JSON.stringify(a)!==JSON.stringify(u)&&(O.warn("\x1B[31m\u{1F6A8} Some dependencies are not up to date\x1B[0m"),(0,n1.exit)(1)),O.success("\x1B[32m\u2705 All dependencies are up to date\x1B[0m"),(0,n1.exit)()}var h4e=require("node:process");async function m4e(e,t,r){se("Delete bundle"),r.apikey=r.apikey||Ae();let i=await ge();t=t||i?.config?.appId,r.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(r.apikey);await xe(n,r.apikey,["write","all"]),await tt(n,r.apikey,t,3),r.apikey||(O.error("Missing API key, you need to provide an API key to delete your app"),B.error("")),e||(O.error("Missing argument, you need to provide a bundleId, or be in a capacitor project"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error("")),O.info(`Deleting bundle ${t}@${e} from Capgo`),await a5(n,t,e),O.success(`Bundle ${t}@${e} deleted in Capgo`),ee("Done"),(0,h4e.exit)()}var y4e=require("node:process");var g4e=["major","minor","metadata","patch","none"];async function v4e(e,t,r){se("Set channel"),r.apikey=r.apikey||Ae();let i=await ge();t=t||i?.config?.appId;let n=Ht();r.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all"]);await tt(s,r.apikey,t,4);let o=await zn(s,t),{bundle:u,state:l,downgrade:c,latest:d,upgrade:p,ios:f,android:h,selfAssign:g,disableAutoUpdate:v,dev:y,emulator:x}=r;e||(O.error("Missing argument, you need to provide a channel"),B.error("")),d&&u&&(O.error("Cannot set latest and bundle at the same time"),B.error("")),u==null&&l==null&&d==null&&c==null&&p==null&&f==null&&h==null&&g==null&&y==null&&x==null&&v==null&&(O.error("Missing argument, you need to provide a option to set"),B.error(""));try{await xf(s,o,r.apikey,t);let D={created_by:a,app_id:t,name:e,owner_org:o,version:void 0},w=await Ui(),_=d?w?.version:u;if(_!=null){let{data:A,error:C}=await s.from("app_versions").select().eq("app_id",t).eq("name",_).eq("user_id",a).eq("deleted",!1).single();(C||!A)&&(O.error(`Cannot find version ${_}`),B.error("")),O.info(`Set ${t} channel: ${e} to @${_}`),D.version=A.id}if(l!=null&&((l==="public"||l==="private")&&O.info(`Set ${t} channel: ${e} to public or private is deprecated, use default or normal instead`),O.info(`Set ${t} channel: ${e} to ${l==="public"||l==="default"?"default":"normal"}`),D.public=l==="public"||l==="default"),c!=null&&(O.info(`Set ${t} channel: ${e} to ${c?"allow":"disallow"} downgrade`),D.disable_auto_update_under_native=!c),f!=null&&(O.info(`Set ${t} channel: ${e} to ${f?"allow":"disallow"} ios update`),D.ios=!!f),h!=null&&(O.info(`Set ${t} channel: ${e} to ${h?"allow":"disallow"} android update`),D.android=!!h),g!=null&&(O.info(`Set ${t} channel: ${e} to ${g?"allow":"disallow"} self assign to this channel`),D.allow_device_self_set=!!g),v!=null){let A=v.toLocaleLowerCase();g4e.includes(A)||(O.error(`Channel strategy ${A} is not known. The possible values are: ${g4e.join(", ")}.`),B.error("")),A==="metadata"&&(A="version_number"),D.disable_auto_update=A,O.info(`Set ${t} channel: ${e} to ${A} disable update strategy to this channel`)}try{let{error:A}=await M9(s,D);A&&(O.error('Cannot set channel the upload key is not allowed to do that, use the "all" for this.'),B.error(""))}catch{O.error('Cannot set channel the upload key is not allowed to do that, use the "all" for this.'),B.error("")}await n.track({channel:"channel",event:"Set channel",icon:"\u2705",user_id:o,tags:{"app-id":t},notify:!1}).catch()}catch(D){O.error(`Unknow error ${ue(D)}`),B.error("")}ee("Done \u2705"),(0,y4e.exit)()}var w4e=require("node:process");async function _4e(e,t,r){let{quiet:i}=r;i||se("List current bundle"),r.apikey=r.apikey||Ae(i);let n=await ge();t=t||n?.config?.appId,r.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all","read"]);await tt(s,r.apikey,t,1),e||(O.error("Please provide a channel to get the bundle from."),B.error(""));let{data:o,error:u}=await s.from("channels").select("version ( name )").eq("name",e).eq("app_id",t).limit(1);(u||o.length===0)&&(O.error(`Error retrieving channel ${e} for app ${t}. Perhaps the channel does not exists?`),B.error(""));let{version:l}=o[0];l||(O.error(`Error retrieving channel ${e} for app ${t}. Perhaps the channel does not exists?`),B.error("")),i?O.info(l.name):O.info(`Current bundle for channel ${e} is ${l.name}`),(0,w4e.exit)()}var AN=require("node:process");var D4e=me(R2());function oat(e){e.length||(O.error("No apps found"),(0,AN.exit)(1));let t=new D4e.Table({title:"Apps",charLength:{"\u274C":2,"\u2705":2}});e.reverse().forEach(r=>{t.addRow({Name:r.name,id:r.app_id,Created:Af(r.created_at)})}),O.success(t.render())}async function uat(e){let{data:t,error:r}=await e.from("apps").select().order("created_at",{ascending:!1});return r&&(O.error("Apps not found"),B.error("")),t}async function b4e(e){se("List apps in Capgo"),await ct(),e.apikey=e.apikey||Ae();let t=await Ee(e.apikey);await xe(t,e.apikey,["write","all","read","upload"]),O.info("Getting active bundle in Capgo");let r=await uat(t);O.info(`Active app in Capgo: ${r?.length}`),oat(r),ee("Done \u2705"),(0,AN.exit)()}var TN=require("node:process");var c5=me(x4e());async function lat(e,t,r){for await(let i of e)O.warn(`Removing ${i.name} created on ${Af(i.created_at)}`),await a5(t,r,i.name)}function cat(e,t,r){let i=[];return e?.forEach(n=>{c5.default.gte(n.name,t)&&c5.default.lt(n.name,`${r}`)&&i.push(n)}),i}async function S4e(e,t){se("Cleanup versions in Capgo"),await ct(),t.apikey=t.apikey||Ae();let{bundle:r,keep:i=4}=t,n=t.force||!1,s=await ge();e=e||s?.config?.appId,t.apikey||(O.error("Missing API key, you need to provide an API key to delete your app"),B.error("")),e||(O.error("Missing argument, you need to provide a appid, or be in a capacitor project"),B.error(""));let a=await Ee(t.apikey);await xe(a,t.apikey,["write","all"]),await tt(a,t.apikey,e,3),O.info("Querying all available versions in Capgo");let o=await u5(a,e),u=await n4e(a,e);if(O.info(`Total active versions in Capgo: ${o?.length}`),o?.length===0){O.error("No versions found, aborting cleanup");return}if(r){let d=`${c5.default.inc(r,"major")}`;O.info(`Querying available versions in Capgo between ${r} and ${d}`),o=cat(o,r,d),O.info(`Active versions in Capgo between ${r} and ${d}: ${o?.length}`)}let l=[],c=0;if(o.forEach(d=>{let p=u.find(f=>f===d.id);c<i||p?(p?d.keep="\u2705 (Linked to channel)":d.keep="\u2705",c+=1):(d.keep="\u274C",l.push(d))}),l.length===0){O.warn("Nothing to be removed, aborting removal...");return}if(o5(o),!n){let d=await Xe({message:"Do you want to continue removing the versions specified?"});(Gi(d)||!d)&&(O.warn("Not confirmed, aborting removal..."),(0,TN.exit)())}O.success("You have confirmed removal, removing versions now"),await lat(l,a,e),ee("Done \u2705"),(0,TN.exit)()}var C4e=require("node:process");async function A4e(e,t,r){se("Delete channel"),r.apikey=r.apikey||Ae();let i=await ge();t=t||i?.config?.appId;let n=Ht();r.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),t||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let s=await Ee(r.apikey),a=await xe(s,r.apikey,["write","all"]);await tt(s,r.apikey,t,4),O.info(`Deleting channel ${t}#${e} from Capgo`);try{let o=await B2e(s,e,t,a);o.error&&(O.error(`Cannot delete Channel \u{1F640} ${ue(o.error)}`),B.error(""));let u=await zn(s,t);O.success("Channel deleted"),await n.track({channel:"channel",event:"Delete channel",icon:"\u2705",user_id:u,tags:{"user-id":a,"app-id":t,channel:e},notify:!1}).catch()}catch{O.error("Cannot delete Channel \u{1F640}")}ee("Done \u2705"),(0,C4e.exit)()}var T4e=require("node:process");async function O4e(e,t){se("List channels"),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId;let i=Ht();t.apikey||O.error("Missing API key, you need to provide a API key to upload your bundle"),e||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey),s=await xe(n,t.apikey,["write","all","read","upload"]);await tt(n,t.apikey,e,1),O.info("Querying available channels in Capgo");let a=await j2e(n,e);O.info(`Active channels in Capgo: ${a?.length}`),q2e(a),await i.track({channel:"channel",event:"List channel",icon:"\u2705",user_id:s,tags:{"app-id":e},notify:!1}).catch(),ee("Done \u2705"),(0,T4e.exit)()}var F4e=require("node:crypto"),s1=require("node:fs"),N4e=require("node:process");async function k4e(e,t){se("Set app"),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId,t.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let i=await Ee(t.apikey),s=(await Sf(i,["admin","super_admin"])).gid,a=await xe(i,t.apikey,["write","all"]);await tt(i,t.apikey,e,4);let{name:o,icon:u,retention:l}=t;l&&Number.isNaN(Number(l))?(O.error("retention value must be a number"),B.error("")):l&&l<0&&(O.error("retention value cannot be less than 0"),B.error(""));let c,d,p=`icon_${(0,F4e.randomUUID)()}`,f="https://xvwzpoazmxkqosrdewyv.supabase.co/storage/v1/object/public/images/capgo.png";if(u&&(0,s1.existsSync)(u)?(c=(0,s1.readFileSync)(u),d=t1.getType(u)||"image/png",O.warn(`Found app icon ${u}`)):(0,s1.existsSync)(Kn)?(c=(0,s1.readFileSync)(Kn),d=t1.getType(Kn)||"image/png",O.warn(`Found app icon ${Kn}`)):O.warn(`Cannot find app icon in any of the following locations: ${u}, ${Kn}`),c&&d){let{error:g}=await i.storage.from(`images/org/${s}/${e}`).upload(p,c,{contentType:d});g&&(O.error(`Could not set app ${ue(g)}`),B.error(""));let{data:v}=await i.storage.from(`images/org/${s}/${e}`).getPublicUrl(p);f=v?.publicUrl||f}let{error:h}=await i.from("apps").update({icon_url:f,name:o,retention:l?l*24*60*60:void 0}).eq("app_id",e).eq("user_id",a);h&&(O.error(`Could not set app ${ue(h)}`),B.error("")),ee("Done \u2705"),(0,N4e.exit)()}var R4e=require("node:process");async function P4e(e,t){se("Deleting"),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId;let i=Ht();t.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey),s=await xe(n,t.apikey,["write","all"]);await tt(n,t.apikey,e,5);let{data:a,error:o}=await n.from("apps").select("owner_org ( created_by, id )").eq("app_id",e).single(),u=a;if(!o&&(u?.owner_org.created_by??"")!==s){O.warn("Deleting the app is not recomended for users that are not the organization owner"),O.warn("You are invited as a super_admin but your are not the owner"),O.warn("It's strongly recomended that you do not continue!");let f=await rd({message:"Do you want to continue?",options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}]});(Gi(f)||f==="no")&&(O.error("Canceled deleting the app, exiting"),B.error(""))}else o&&O.warn(`Cannot get the app owner ${ue(o)}`);let{error:l}=await n.storage.from("images").remove([`org/${u?.owner_org.id}/${e}/icon`]);l&&(console.error(l,`images/org/${u?.owner_org.id}/${e}`),O.error("Could not delete app logo"));let{error:c}=await n.storage.from(`apps/${e}/${s}`).remove(["versions"]);c&&O.error("Could not delete app version");let{error:d}=await n.from("apps").delete().eq("app_id",e);d&&(O.error("Could not delete app"),B.error(""));let p=await zn(n,e);await i.track({channel:"app",event:"App Deleted",icon:"\u{1F5D1}\uFE0F",user_id:p,tags:{"app-id":e},notify:!1}).catch(),O.success("App deleted in Capgo"),ee("Done \u2705"),(0,R4e.exit)()}var I4e=me(R2());async function L4e(e,t){se("Check compatibility"),t.apikey=t.apikey||Ae();let r=await ge();e=e||r?.config?.appId;let{channel:i}=t;i||(O.error("Missing argument, you need to provide a channel"),B.error("")),t.apikey||(O.error("Missing API key, you need to provide a API key to upload your bundle"),B.error("")),e||(O.error("Missing argument, you need to provide a appId, or be in a capacitor project"),B.error(""));let n=await Ee(t.apikey);await xe(n,t.apikey,["write","all","read","upload"]),await tt(n,t.apikey,e,1);let{finalCompatibility:s}=await U9(n,e,i),a=new I4e.Table({title:"Compatibility",charLength:{"\u274C":2,"\u2705":2}}),o=t.text?"Yes":"\u2705",u=t.text?"No":"\u274C";s.forEach(l=>{let{name:c,localVersion:d,remoteVersion:p}=l;a.addRow({Package:c,"Local version":d??"None","Remote version":p??"None",Compatible:p===d?o:u})}),O.success(a.render())}B.name(Vo.name).description("Manage packages and bundle versions in Capgo Cloud").version(Vo.version);B.command("login [apikey]").alias("l").description("Save apikey to your machine or folder").action(V6e).option("--local","Only save in local folder");B.command("doctor").description("Get info about your Capgo app install").action(f4e);B.command("init [apikey] [appId]").description("Init a new app").action(Q6e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account");var V2=B.command("app").description("Manage app");V2.command("add [appId]").alias("a").description("Add a new app in Capgo Cloud").action(Y6e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account");V2.command("delete [appId]").description("Delete an app in Capgo Cloud").action(P4e).option("-a, --apikey <apikey>","apikey to link to your account");V2.command("list").alias("l").description("list apps in Capgo Cloud").action(b4e).option("-a, --apikey <apikey>","apikey to link to your account");V2.command("debug [appId]").description("Listen for live updates event in Capgo Cloud to debug your app").option("-a, --apikey <apikey>","apikey to link to your account").option("-d, --device <device>","the specific device to debug").action(u2e);V2.command("set [appId]").alias("s").description("Set an app in Capgo Cloud").action(k4e).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account").option("-r, --retention <retention>","retention period of app bundle in days");var ll=B.command("bundle").description("Manage bundle");ll.command("upload [appId]").alias("u").description("Upload a new bundle in Capgo Cloud").action($6e).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--iv-session-key <key>","Set the iv and session key for bundle url external").option("--s3-region <region>","Region for your S3 bucket").option("--s3-apikey <apikey>","Apikey for your S3 endpoint").option("--s3-apisecret <apisecret>","Api secret for your S3 endpoint").option("--s3-endoint <s3Endpoint>","Url of S3 endpoint").option("--s3-bucket-name <bucketName>","Name for your AWS S3 bucket").option("--s3-port <port>","Port for your S3 endpoint").option("--no-s3-ssl","Disable SSL for S3 upload").option("--key <key>","custom path for public signing key").option("--key-data <keyData>","base64 public signing key").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the bundle to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel").option("--auto-min-update-version","Set the min update version based on native packages").option("--ignore-metadata-check","Ignores the metadata (node_modules) check when uploading").option("--ignore-checksum-check","Ignores the checksum check when uploading").option("--timeout <timeout>","Timeout for the upload process in seconds").option("--multipart","Uses multipart protocol to upload data to S3");ll.command("compatibility [appId]").action(L4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-c, --channel <channel>","channel to check the compatibility with").option("--text","output text instead of emojis");ll.command("delete [bundleId] [appId]").alias("d").description("Delete a bundle in Capgo Cloud").action(m4e).option("-a, --apikey <apikey>","apikey to link to your account");ll.command("list [appId]").alias("l").description("List bundle in Capgo Cloud").action(a4e).option("-a, --apikey <apikey>","apikey to link to your account");ll.command("cleanup [appId]").alias("c").action(S4e).description("Cleanup bundle in Capgo Cloud").option("-b, --bundle <bundle>","bundle version number of the app to delete").option("-a, --apikey <apikey>","apikey to link to your account").option("-k, --keep <keep>","number of version to keep").option("-f, --force","force removal");ll.command("decrypt [zipPath] [sessionKey]").description("Decrypt a signed zip bundle").action(u4e).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","base64 private signing key");ll.command("encrypt [zipPath]").description("Encrypt a zip bundle").action(d4e).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","base64 private signing key");ll.command("zip [appId]").description("Zip a bundle").action(Hme).option("-p, --path <path>","path of the folder to upload").option("-b, --bundle <bundle>","bundle version number to name the zip file").option("-n, --name <name>","name of the zip file").option("-j, --json","output in JSON").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder");var H2=B.command("channel").description("Manage channel");H2.command("add [channelId] [appId]").alias("a").description("Create channel").action(M2e).option("-d, --default","set the channel as default").option("-a, --apikey <apikey>","apikey to link to your account");H2.command("delete [channelId] [appId]").alias("d").description("Delete channel").action(A4e).option("-a, --apikey <apikey>","apikey to link to your account");H2.command("list [appId]").alias("l").description("List channel").action(O4e).option("-a, --apikey <apikey>","apikey to link to your account");H2.command("currentBundle [channel] [appId]").description("Get current bundle for specific channel in Capgo Cloud").action(_4e).option("-c, --channel <channel>","channel to get the current bundle from").option("-a, --apikey <apikey>","apikey to link to your account").option("--quiet","only print the bundle version");H2.command("set [channelId] [appId]").alias("s").description("Set channel").action(v4e).option("-a, --apikey <apikey>","apikey to link to your account").option("-b, --bundle <bundle>","bundle version number of the file to set").option("-s, --state <state>","set the state of the channel, default or normal").option("--latest","get the latest version key in the package.json to set it to the channel").option("--downgrade","Allow to downgrade to version under native one").option("--no-downgrade","Disable downgrade to version under native one").option("--upgrade","Allow to upgrade to version above native one").option("--no-upgrade","Disable upgrade to version above native one").option("--ios","Allow sending update to ios devices").option("--no-ios","Disable sending update to ios devices").option("--android","Allow sending update to android devices").option("--no-android","Disable sending update to android devices").option("--self-assign","Allow to device to self assign to this channel").option("--no-self-assign","Disable devices to self assign to this channel").option("--disable-auto-update <disableAutoUpdate>","Disable auto update strategy for this channel.The possible options are: major, minor, metadata, patch, none").option("--dev","Allow sending update to development devices").option("--no-dev","Disable sending update to development devices").option("--emulator","Allow sending update to emulator devices").option("--no-emulator","Disable sending update to emulator devices");var B4e=B.command("key").description("Manage key");B4e.command("save").description("Save base64 signing key in capacitor config, usefull for CI").action(h2e).option("-f, --force","force generate a new one").option("--key","key path to save in capacitor config").option("--key-data","key data to save in capacitor config");B4e.command("create").description("Create a new signing key").action(m2e).option("-f, --force","force generate a new one");B.command("upload [appId]").alias("u").description("(Deprecated) Upload a new bundle to Capgo Cloud").action(M6e).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--key <key>","custom path for public signing key").option("--key-data <keyData>","base64 public signing key").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the file to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel");var dat=B.command("account").description("Manage account");dat.command("id").description("Get your account ID").action(Bde).option("-a, --apikey <apikey>","apikey to link to your account");B.parseAsync();
398
398
  /*! Bundled license information:
399
399
 
400
400
  is-extglob/index.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "4.13.20",
3
+ "version": "4.13.21",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "author": "github.com/riderx",
6
6
  "license": "Apache 2.0",