npm package diff

Package: @forge/cli

Versions: 11.5.0-next.2-experimental-07de784 - 11.5.0-next.2-experimental-9b8de22

File: package/out/bin/cli.js

Index: package/out/bin/cli.js
===================================================================
--- package/out/bin/cli.js
+++ package/out/bin/cli.js
@@ -10267,9 +10267,9 @@
 `).join(`
 `+a),e.push(i+"m+"+O5e.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=vMo()+t+" "+e[0]}function vMo(){return G1.inspectOpts.hideDate?"":new Date().toISOString()+" "}function yMo(){return process.stderr.write(w5e.format.apply(w5e,arguments)+`
 `)}function bMo(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function SMo(){return process.env.DEBUG}function IMo(e){e.inspectOpts={};for(var t=Object.keys(G1.inspectOpts),r=0;r<t.length;r++)e.inspectOpts[t[r]]=G1.inspectOpts[t[r]]}O5e.exports=P6t()(G1);var _tn=O5e.exports.formatters;_tn.o=function(e){return this.inspectOpts.colors=this.useColors,w5e.inspect(e,this.inspectOpts).split(`
 `).map(function(t){return t.trim()}).join(" ")};_tn.O=function(e){return this.inspectOpts.colors=this.useColors,w5e.inspect(e,this.inspectOpts)}});var ytn=P((dCs,R6t)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?R6t.exports=htn():R6t.exports=vtn()});var Etn=P((pCs,Itn)=>{var Jpe=require("path"),btn=require("fs"),Stn=parseInt("0777",8);Itn.exports=KX.mkdirp=KX.mkdirP=KX;function KX(e,t,r,n){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var i=t.mode,a=t.fs||btn;i===void 0&&(i=Stn),n||(n=null);var s=r||function(){};e=Jpe.resolve(e),a.mkdir(e,i,function(u){if(!u)return n=n||e,s(null,n);switch(u.code){case"ENOENT":if(Jpe.dirname(e)===e)return s(u);KX(Jpe.dirname(e),t,function(c,d){c?s(c,d):KX(e,t,s,d)});break;default:a.stat(e,function(c,d){c||!d.isDirectory()?s(u,n):s(null,n)});break}})}KX.sync=function e(t,r,n){(!r||typeof r!="object")&&(r={mode:r});var i=r.mode,a=r.fs||btn;i===void 0&&(i=Stn),n||(n=null),t=Jpe.resolve(t);try{a.mkdirSync(t,i),n=n||t}catch(u){switch(u.code){case"ENOENT":n=e(Jpe.dirname(t),r,n),e(t,r,n);break;default:var s;try{s=a.statSync(t)}catch{throw u}if(!s.isDirectory())throw u;break}}return n}});var M6t=P(af=>{"use strict";var Atn=require("fs"),EMo=require("os"),AMo=require("net"),N5e=require("path"),xtn=ptn(),F6t=ytn(),xMo=Etn().mkdirp,k6t=F6t("portfinder:testPort"),Zpe=F6t("portfinder:getPort"),TMo=F6t("portfinder:defaultHosts"),L6t={};L6t.testPort=function(e,t){t||(t=e,e={}),e.server=e.server||AMo.createServer(function(){}),k6t("entered testPort(): trying",e.host,"port",e.port);function r(){k6t("done w/ testPort(): OK",e.host,"port",e.port),e.server.removeListener("error",n),e.server.close(),t(null,e.port)}function n(i){if(k6t("done w/ testPort(): failed",e.host,"w/ port",e.port,"with error",i.code),e.server.removeListener("listening",r),!(i.code=="EADDRINUSE"||i.code=="EACCES"))return t(i);var a=af.nextPort(e.port);if(a>af.highestPort)return t(new Error("No open ports available"));L6t.testPort({port:a,host:e.host,server:e.server},t)}e.server.once("error",n),e.server.once("listening",r),e.host?e.server.listen(e.port,e.host):e.server.listen(e.port)};af.basePort=8e3;af.setBasePort=function(e){af.basePort=e};af.highestPort=65535;af.setHighestPort=function(e){af.highestPort=e};af.basePath="/tmp/portfinder";af.getPort=function(e,t){if(t||(t=e,e={}),e.port=Number(e.port)||Number(af.basePort),e.host=e.host||null,e.stopPort=Number(e.stopPort)||Number(af.highestPort),!e.startPort){if(e.startPort=Number(e.port),e.startPort<0)throw Error("Provided options.startPort("+e.startPort+") is less than 0, which are cannot be bound.");if(e.stopPort<e.startPort)throw Error("Provided options.stopPort("+e.stopPort+"is less than options.startPort ("+e.startPort+")")}e.host&&af._defaultHosts.indexOf(e.host)!==-1&&af._defaultHosts.push(e.host);var r=[],n;return xtn.eachSeries(af._defaultHosts,function(i,a){return Zpe("in eachSeries() iteration callback: host is",i),L6t.testPort({host:i,port:e.port},function(s,u){return s?(Zpe("in eachSeries() iteration callback testPort() callback","with an err:",s.code),n=i,a(s)):(Zpe("in eachSeries() iteration callback testPort() callback","with a success for port",u),r.push(u),a())})},function(i){if(i)if(Zpe("in eachSeries() result callback: err is",i),i.code==="EADDRNOTAVAIL"||i.code==="EINVAL")if(e.host===n){var a="Provided host "+e.host+" could NOT be bound. Please provide a different host address or hostname";return t(Error(a))}else{var s=af._defaultHosts.indexOf(n);return af._defaultHosts.splice(s,1),af.getPort(e,t)}else return t(i);if(r.sort(function(u,c){return u-c}),Zpe("in eachSeries() result callback: openPorts is",r),r[0]===r[r.length-1]){if(r[0]<=e.stopPort)return t(null,r[0]);var a="No open ports found in between "+e.startPort+" and "+e.stopPort;return t(Error(a))}else return af.getPort({port:r.pop(),host:e.host,startPort:e.startPort,stopPort:e.stopPort},t)})};af.getPortPromise=function(e){if(typeof Promise!="function")throw Error("Native promise support is not available in this version of node.Please install a polyfill and assign Promise to global.Promise before calling this method");return e||(e={}),new Promise(function(t,r){af.getPort(e,function(n,i){if(n)return r(n);t(i)})})};af.getPorts=function(e,t,r){r||(r=t,t={});var n=null;xtn.timesSeries(e,function(i,a){n&&(t.port=af.nextPort(n)),af.getPort(t,function(s,u){s?a(s):(n=u,a(null,u))})},r)};af.getSocket=function(e,t){t||(t=e,e={}),e.mod=e.mod||parseInt(755,8),e.path=e.path||af.basePath+".sock";function r(){Atn.stat(e.path,function(a){a?a.code=="ENOENT"?t(null,e.path):t(a):(e.path=af.nextSocket(e.path),af.getSocket(e,t))})}function n(a){xMo(a,e.mod,function(s){if(s)return t(s);e.exists=!0,r()})}function i(){var a=N5e.dirname(e.path);Atn.stat(a,function(s,u){if(s||!u.isDirectory())return n(a);e.exists=!0,r()})}return e.exists?r():i()};af.nextPort=function(e){return e+1};af.nextSocket=function(e){var t=N5e.dirname(e),r=N5e.basename(e,".sock"),n=r.match(/^([a-zA-z]+)(\d*)$/i),i=parseInt(n[2]),a=n[1];return isNaN(i)&&(i=0),i+=1,N5e.join(t,a+i+".sock")};af._defaultHosts=function(){var e={};try{e=EMo.networkInterfaces()}catch(c){if(c.syscall!=="uv_interface_addresses")throw c}for(var t=Object.keys(e),r="0.0.0.0",n=[r],i=0;i<t.length;i++)for(var a=e[t[i]],s=0;s<a.length;s++){var u=a[s];n.push(u.address)}return n.push(null),TMo("exports._defaultHosts is: %o",n),n}()});var q6t=P((hCs,Otn)=>{"use strict";var wtn="Not a Windows platform",R5e=process.platform.startsWith("win"),CMo=e=>(!R5e&&typeof e=="function"&&e(new Error(wtn)),R5e),DMo=()=>{if(R5e)return R5e;throw new Error(wtn)};Otn.exports={async:CMo,sync:DMo}});var Rtn=P((_Cs,Ptn)=>{"use strict";var k5e={archive:"IS_ARCHIVED",hidden:"IS_HIDDEN",readonly:"IS_READ_ONLY",system:"IS_SYSTEM"},Ntn=(e,t)=>{let r={};return NMo(e,(n,i)=>{PMo((a,s)=>{if(t===!0){if(a===i)return r[s]=n,!1}else if(s===i)return r[a]=n,!1})}),r},wMo=e=>Ntn(e,!0),OMo=e=>Ntn(e,!1),NMo=(e,t)=>{for(let r in e)if(e.hasOwnProperty(r)&&t(e[r],r,e)===!1)break},PMo=e=>{for(let t in k5e)if(k5e.hasOwnProperty(t)&&e(k5e[t],t,k5e)===!1)break};Ptn.exports={from:wMo,to:OMo}});var Ltn=P((vCs,ktn)=>{"use strict";var L5e=require("fswin"),F5e=Rtn(),RMo=(e,t)=>{L5e.getAttributes(e,r=>{if(r===null){t(new Error("unknown error"));return}let n={};for(let i in r)i.startsWith("IS_")&&(n[i]=r[i]);t(null,F5e.from(n))})},kMo=e=>{let t=L5e.getAttributesSync(e);if(t===null)throw new Error("unknown erorr");return F5e.from(t)},LMo=(e,t,r)=>{L5e.setAttributes(e,F5e.to(t),n=>{r(n===!0?null:new Error("unknown error"))})},FMo=(e,t)=>{if(L5e.setAttributesSync(e,F5e.to(t))===!1)throw new Error("unknown erorr")};ktn.exports={get:RMo,getSync:kMo,set:LMo,setSync:FMo}});var ztn=P((yCs,Gtn)=>{"use strict";var Mtn=require("child_process"),Ftn={archive:"a",hidden:"h",readonly:"r",system:"s"},qtn=e=>[`${__dirname}/hostscript.js`,e,"//nologo","//E:jscript"],Btn=e=>{var t,r=null;return e.stdout=e.stdout.trim(),e.stdout.length<=0?r=new Error("unknown error"):(t=JSON.parse(e.stdout),t.error!==void 0&&(r=new Error(t.error),t=void 0)),{error:r,attrs:t}},jtn=(e,t)=>{let r=[];for(let n in t)t.hasOwnProperty(n)&&Ftn.hasOwnProperty(n)&&r.push((t[n]===!0?"+":"-")+Ftn[n]);return r.push(e),r},Utn=e=>e.stdout.length<=0?null:new Error(e.stdout),Vtn=(e,t,r)=>{var n=Mtn.spawn(e,t),i="",a="";n.stderr.on("data",s=>{i+=s.toString()}),n.stdout.on("data",s=>{a+=s.toString()}),n.on("exit",function(s){this.removeAllListeners(),r({status:s,stdout:a,stderr:i})})},Wtn=(e,t)=>{var r=Mtn.spawnSync(e,t,{encoding:"utf8"});return r.stderr===null&&(r.stderr=""),r.stdout===null&&(r.stdout=""),r},MMo=(e,t)=>{Vtn("cscript",qtn(e),function(r){r=Btn(r),t(r.error,r.attrs)})},qMo=e=>{var t=Wtn("cscript",qtn(e));if(t=Btn(t),t.error!==null)throw t.error;return t.attrs},BMo=(e,t,r)=>{Vtn("attrib",jtn(e,t),function(n){r(Utn(n))})},jMo=(e,t,r)=>{var n=Wtn("attrib",jtn(e,t));if(n=Utn(n),n!==null)throw n};Gtn.exports={get:MMo,getSync:qMo,set:BMo,setSync:jMo}});var Htn=P((bCs,$tn)=>{"use strict";var UMo=q6t(),oT={mode:null,binding:null,shell:null},B6t=(e,t)=>{if(UMo.async())switch(e){case"auto":case"binding":{if(oT.binding===null)try{oT.binding=Ltn(),oT.mode="binding"}catch(r){if(t!==!0)oT.binding=null,B6t("shell");else throw r}else oT.mode="binding";break}case"shell":{oT.shell===null&&(oT.shell=ztn()),oT.mode="shell";break}}},VMo=()=>oT[oT.mode],WMo=e=>{let t;try{t=e()}catch(r){if(oT.mode==="binding"&&r.message==="The specified procedure could not be found.")B6t("shell"),t=e();else throw r}return t};$tn.exports={change:B6t,current:VMo,run:WMo}});var Ztn=P((SCs,Jtn)=>{"use strict";var M5e=q6t(),{resolve:q5e}=require("path"),fw=Htn(),GMo=(e,t)=>{if(M5e.async(t))return fw.run(()=>fw.current().get(q5e(e),t))},zMo=e=>{if(M5e.sync())return fw.run(()=>fw.current().getSync(q5e(e)))},$Mo=(e,t,r)=>{if(M5e.async(r))return fw.run(()=>fw.current().set(q5e(e),t,r))},HMo=(e,t)=>{if(M5e.sync())return fw.run(()=>fw.current().setSync(q5e(e),t))};fw.change("auto");Jtn.exports={get:GMo,getSync:zMo,set:$Mo,setSync:HMo,change:fw.change}});var nrn=P((ICs,rrn)=>{"use strict";var Ytn=require("fs"),j6t=require("path"),B5e=Ztn(),gk=process.platform.startsWith("win"),U6t=".",Qtn=(e,t,r,n)=>{Ytn.rename(e,t,i=>{i==null&&gk?B5e.set(t,r,a=>{Ktn(a,t,n)}):Ktn(i,t,n)})},Ktn=(e,t,r)=>{e==null?r(e,t):r(e)},Xtn=(e,t,r)=>(Ytn.renameSync(e,t),gk&&B5e.setSync(t,r),t),YX=e=>{let t=j6t.basename(e),r=j6t.dirname(e);return r==="."&&(r=""),{basename:t,dirname:r,prefixed:t[0]===U6t}},ern=(e,t)=>{let r={unix:YX(e).prefixed,windows:!1};gk?B5e.get(e,(n,i)=>{r.windows=n!=null?!1:i.hidden,t(n,r)}):t(null,r)},trn=e=>{let t={unix:YX(e).prefixed,windows:!1};return gk&&(t.windows=B5e.getSync(e).hidden),t},j5e=(e,t)=>{let r="";return e.basename!==""&&(t&&!e.prefixed?r=U6t+e.basename:!t&&e.prefixed?r=e.basename.slice(1):r=e.basename),e.dirname!==""&&(r!==""&&e.dirname!=="/"&&e.dirname[e.dirname.length-1]!=="/"?r=e.dirname+"/"+r:r=e.dirname+r),r},JMo=(e,t)=>{let r=j5e(YX(e),!0);Qtn(e,r,{hidden:!0},t)},ZMo=e=>{let t=j5e(YX(e),!0);return Xtn(e,t,{hidden:!0})},KMo=e=>j6t.basename(e)[0]===U6t,YMo=(e,t)=>{ern(e,(r,n)=>{r==null?t(null,n.unix&&(n.windows&&gk||!gk)):t(r)})},QMo=(e,t)=>{let r=trn(e);return r.unix&&(r.windows&&gk||!gk)},XMo=(e,t)=>{let r=j5e(YX(e),!1);Qtn(e,r,{hidden:!1},t)},eqo=(e,t)=>{let r=j5e(YX(e),!1);return Xtn(e,r,{hidden:!1})},tqo=(e,t)=>{ern(e,(r,n)=>{r==null?t(null,n.unix||n.windows):t(r)})},rqo=(e,t)=>{let r=trn(e);return r.unix||r.windows};rrn.exports={hide:JMo,hideSync:ZMo,isDotPrefixed:KMo,isHidden:YMo,isHiddenSync:QMo,reveal:XMo,revealSync:eqo,shouldBeHidden:tqo,shouldBeHiddenSync:rqo}});var crn=P((wCs,urn)=>{var srn=require("stream").Stream,nqo=require("util");urn.exports=sT;function sT(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}nqo.inherits(sT,srn);sT.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(sT.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});sT.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};sT.prototype.resume=function(){this._released||this.release(),this.source.resume()};sT.prototype.pause=function(){this.source.pause()};sT.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};sT.prototype.pipe=function(){var e=srn.prototype.pipe.apply(this,arguments);return this.resume(),e};sT.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};sT.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var frn=P((OCs,prn)=>{var iqo=require("util"),drn=require("stream").Stream,lrn=crn();prn.exports=s_;function s_(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}iqo.inherits(s_,drn);s_.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};s_.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};s_.prototype.append=function(e){var t=s_.isStreamLike(e);if(t){if(!(e instanceof lrn)){var r=lrn.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};s_.prototype.pipe=function(e,t){return drn.prototype.pipe.call(this,e,t),this.resume(),e};s_.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};s_.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=s_.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};s_.prototype._pipeNext=function(e){this._currentStream=e;var t=s_.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};s_.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};s_.prototype.write=function(e){this.emit("data",e)};s_.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};s_.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};s_.prototype.end=function(){this._reset(),this.emit("end")};s_.prototype.destroy=function(){this._reset(),this.emit("close")};s_.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};s_.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};s_.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};s_.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var grn=P((NCs,mrn)=>{mrn.exports=aqo;function aqo(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var $6t=P((PCs,_rn)=>{var hrn=grn();_rn.exports=oqo;function oqo(e){var t=!1;return hrn(function(){t=!0}),function(n,i){t?e(n,i):hrn(function(){e(n,i)})}}});var H6t=P((RCs,vrn)=>{vrn.exports=sqo;function sqo(e){Object.keys(e.jobs).forEach(uqo.bind(e)),e.jobs={}}function uqo(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var J6t=P((kCs,brn)=>{var yrn=$6t(),cqo=H6t();brn.exports=lqo;function lqo(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=dqo(t,i,e[i],function(a,s){i in r.jobs&&(delete r.jobs[i],a?cqo(r):r.results[i]=s,n(a,r.results))})}function dqo(e,t,r,n){var i;return e.length==2?i=e(r,yrn(n)):i=e(r,t,yrn(n)),i}});var Z6t=P((LCs,Srn)=>{Srn.exports=pqo;function pqo(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,a){return t(e[i],e[a])}),n}});var K6t=P((FCs,Irn)=>{var fqo=H6t(),mqo=$6t();Irn.exports=gqo;function gqo(e){Object.keys(this.jobs).length&&(this.index=this.size,fqo(this),mqo(e)(null,this.results))}});var Arn=P((MCs,Ern)=>{var hqo=J6t(),_qo=Z6t(),vqo=K6t();Ern.exports=yqo;function yqo(e,t,r){for(var n=_qo(e);n.index<(n.keyedList||e).length;)hqo(e,t,n,function(i,a){if(i){r(i,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return vqo.bind(n,r)}});var Y6t=P((qCs,W5e)=>{var xrn=J6t(),bqo=Z6t(),Sqo=K6t();W5e.exports=Iqo;W5e.exports.ascending=Trn;W5e.exports.descending=Eqo;function Iqo(e,t,r,n){var i=bqo(e,r);return xrn(e,t,i,function a(s,u){if(s){n(s,u);return}if(i.index++,i.index<(i.keyedList||e).length){xrn(e,t,i,a);return}n(null,i.results)}),Sqo.bind(i,n)}function Trn(e,t){return e<t?-1:e>t?1:0}function Eqo(e,t){return-1*Trn(e,t)}});var Drn=P((BCs,Crn)=>{var Aqo=Y6t();Crn.exports=xqo;function xqo(e,t,r){return Aqo(e,t,null,r)}});var Orn=P((jCs,wrn)=>{wrn.exports={parallel:Arn(),serial:Drn(),serialOrdered:Y6t()}});var Prn=P((UCs,Nrn)=>{Nrn.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Lrn=P((VCs,krn)=>{var tNt=frn(),Rrn=require("util"),Q6t=require("path"),Tqo=require("http"),Cqo=require("https"),Dqo=require("url").parse,wqo=require("fs"),Oqo=require("stream").Stream,X6t=Pot(),Nqo=Orn(),eNt=Prn();krn.exports=Lp;Rrn.inherits(Lp,tNt);function Lp(e){if(!(this instanceof Lp))return new Lp(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],tNt.call(this),e=e||{};for(var t in e)this[t]=e[t]}Lp.LINE_BREAK=`\r
-`;Lp.DEFAULT_CONTENT_TYPE="application/octet-stream";Lp.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=tNt.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Rrn.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),a=this._multiPartFooter();n(i),n(t),n(a),this._trackLength(i,t,r)};Lp.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=+r.knownLength:Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+Lp.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof Oqo))&&(r.knownLength||this._valuesToMeasure.push(t))};Lp.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):wqo.stat(e.path,function(r,n){var i;if(r){t(r);return}i=n.size-(e.start?e.start:0),t(null,i)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(r){e.pause(),t(null,+r.headers["content-length"])}),e.resume()):t("Unknown stream")};Lp.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),a="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&eNt(s,r.header);var u;for(var c in s)s.hasOwnProperty(c)&&(u=s[c],u!=null&&(Array.isArray(u)||(u=[u]),u.length&&(a+=c+": "+u.join("; ")+Lp.LINE_BREAK)));return"--"+this.getBoundary()+Lp.LINE_BREAK+a+Lp.LINE_BREAK};Lp.prototype._getContentDisposition=function(e,t){var r,n;return typeof t.filepath=="string"?r=Q6t.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=Q6t.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=Q6t.basename(e.client._httpMessage.path||"")),r&&(n='filename="'+r+'"'),n};Lp.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=X6t.lookup(e.name)),!r&&e.path&&(r=X6t.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=X6t.lookup(t.filepath||t.filename)),!r&&typeof e=="object"&&(r=Lp.DEFAULT_CONTENT_TYPE),r};Lp.prototype._multiPartFooter=function(){return function(e){var t=Lp.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};Lp.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Lp.LINE_BREAK};Lp.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r};Lp.prototype.setBoundary=function(e){this._boundary=e};Lp.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Lp.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(Lp.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Lp.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(Math.random()*10).toString(16);this._boundary=e};Lp.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};Lp.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Lp.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Nqo.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};Lp.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Dqo(e),n=eNt({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=eNt(e,i),n.port||(n.port=n.protocol=="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol=="https:"?r=Cqo.request(n):r=Tqo.request(n),this.getLength(function(a,s){if(a&&a!=="Unknown stream"){this._error(a);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,c=function(d,p){return r.removeListener("error",c),r.removeListener("response",u),t.call(this,d,p)};u=c.bind(this,null),r.on("error",c),r.on("response",u)}}.bind(this)),r};Lp.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Lp.prototype.toString=function(){return"[object FormData]"}});var jrn=P((KCs,Pqo)=>{Pqo.exports={name:"@forge/cli",version:"11.5.0-next.2",description:"A command line interface for managing Atlassian-hosted apps",author:"Atlassian",license:"SEE LICENSE IN LICENSE.txt",bin:{forge:"out/bin/cli.js"},homepage:"https://developer.atlassian.com/platform/forge",scripts:{build:"yarn clean && yarn run check && yarn run compile",clean:"rm -rf ./scriptOut && rm -rf ./out && rm -f tsconfig.tsbuildinfo",compile:"NODE_ENV=production yarn run compile:base","compile:base":"ts-node scripts/build.ts && mkdir -p ./out/autocomplete && cp ./src/autocomplete/autocomplete-config.json ./out/autocomplete/autocomplete-config.json",dev:"NODE_ENV=development yarn run compile:base && NODE_ENV=development node ./out/bin/cli.js",inspect:"NODE_ENV=development ts-node scripts/build.ts && NODE_ENV=development node --inspect-brk ./out/bin/cli.js",postbuild:"yarn run postbuild:chmod && yarn run postbuild:autocomplete && yarn run postbuild:copy-stubs","postbuild:chmod":"chmod +x out/bin/*.js","postbuild:autocomplete":"ts-node scripts/build.ts scripts/configureAutocomplete.ts && ts-node ./scriptOut/configureAutocomplete.js","postbuild:copy-stubs":"mkdir -p out/stubs && cp ../forge-bundler/out/stubs/unsupported.js out/stubs/ && cp ../forge-bundler/out/stubs/http-sandbox.js out/stubs/ && cp ../forge-bundler/out/stubs/http-sandbox-impl.js out/stubs/",postinstall:`node -e "fs.existsSync('./out/bin/postinstall.js') && require('./out/bin/postinstall.js')"`,check:"tsc --noEmit"},dependencies:{"@babel/plugin-transform-class-properties":"^7.23.3","@babel/plugin-transform-class-static-block":"^7.23.4","@babel/plugin-transform-numeric-separator":"^7.23.4","@babel/plugin-transform-optional-chaining":"^7.23.4","@babel/plugin-transform-react-jsx":"^7.23.4","@babel/preset-typescript":"^7.23.3","@forge/bundler":"4.23.1-next.1","@forge/cli-shared":"6.10.1-next.1","@forge/babel-plugin-transform-ui":"1.1.21","@forge/egress":"1.4.0","@forge/lint":"5.7.6-next.1","@forge/manifest":"9.3.0-next.1","@forge/runtime":"5.10.7","@forge/tunnel":"5.10.4-next.1","@forge/util":"1.4.8","@sentry/node":"7.106.0","@forge/i18n":"0.0.5",ajv:"^8.12.0",archiver:"^6.0.2",case:"^1.6.3",chalk:"^4.1.2",cheerio:"^0.22.0","cli-table3":"^0.6.3","command-exists":"^1.2.9",commander:"^11.1.0","cross-spawn":"^7.0.5",dayjs:"^1.11.10",didyoumean:"^1.2.2",diff:"^7.0.0","env-paths":"^2.2.1","exponential-backoff":"^3.1.1","form-data":"^4.0.0","fs-extra":"^11.2.0",hidefile:"^3.0.0","latest-version":"^7.0.0",lodash:"^4.17.21","node-fetch":"2.7.0","node-machine-id":"^1.1.12",omelette:"^0.4.17",ora:"^5.4.1",portfinder:"^1.0.32","sanitize-filename":"^1.6.3",semver:"^7.6.0",tmp:"^0.2.3",tslib:"^2.6.2",uuid:"^9.0.1","v8-compile-cache":"^2.4.0"},devDependencies:{"@types/archiver":"^6.0.2","@types/cheerio":"^0.22.35","@types/command-exists":"^1.2.3","@types/cross-spawn":"^6.0.6","@types/didyoumean":"^1.2.2","@types/diff":"^6.0.0","@types/fs-extra":"^11.0.4","@types/hidefile":"^3.0.3","@types/inquirer":"^8.2.10","@types/jest":"^29.5.12","@types/node":"14.18.63","@types/node-fetch":"^2.6.11","@types/omelette":"^0.4.4","@types/semver":"^7.5.8","@types/tmp":"^0.2.6","@types/uuid":"^9.0.8","@types/jws":"^3.2.10",jws:"^4.0.0",jest:"^29.7.0","jest-fixtures":"^0.6.0","jest-matcher-specific-error":"^1.0.0","jest-when":"^3.6.0",memfs:"^4.6.0","sentry-testkit":"^5.0.9",esbuild:"^0.21.5","type-fest":"4.10.2"},engines:{node:">=18.20.7"},publishConfig:{registry:"https://packages.atlassian.com/api/npm/npm-public/"}}});var Qpe=P(sNt=>{var s9e=class extends Error{constructor(t,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},oNt=class extends s9e{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};sNt.CommanderError=s9e;sNt.InvalidArgumentError=oNt});var u9e=P(cNt=>{var{InvalidArgumentError:kqo}=Qpe(),uNt=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new kqo(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Lqo(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}cNt.Argument=uNt;cNt.humanReadableArgName=Lqo});var dNt=P(onn=>{var{humanReadableArgName:Fqo}=u9e(),lNt=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden);if(t._hasImplicitHelpCommand()){let[,n,i]=t._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),a=t.createCommand(n).helpOption(!1);a.description(t._helpCommandDescription),i&&a.arguments(i),r.push(a)}return this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(t).localeCompare(n(r))}visibleOptions(t){let r=t.options.filter(a=>!a.hidden),n=t._hasHelpOption&&t._helpShortFlag&&!t._findOption(t._helpShortFlag),i=t._hasHelpOption&&!t._findOption(t._helpLongFlag);if(n||i){let a;n?i?a=t.createOption(t._helpFlags,t._helpDescription):a=t.createOption(t._helpShortFlag,t._helpDescription):a=t.createOption(t._helpLongFlag,t._helpDescription),r.push(a)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let n=t.parent;n;n=n.parent){let i=n.options.filter(a=>!a.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(n=>Fqo(n)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((n,i)=>Math.max(n,r.subcommandTerm(i).length),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((n,i)=>Math.max(n,r.optionTerm(i).length),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((n,i)=>Math.max(n,r.optionTerm(i).length),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((n,i)=>Math.max(n,r.argumentTerm(i).length),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let n="";for(let i=t.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}formatHelp(t,r){let n=r.padWidth(t,r),i=r.helpWidth||80,a=2,s=2;function u(E,h){if(h){let I=`${E.padEnd(n+s)}${h}`;return r.wrap(I,i-a,n+s)}return E}function c(E){return E.join(`
+`;Lp.DEFAULT_CONTENT_TYPE="application/octet-stream";Lp.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=tNt.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Rrn.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),a=this._multiPartFooter();n(i),n(t),n(a),this._trackLength(i,t,r)};Lp.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=+r.knownLength:Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+Lp.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof Oqo))&&(r.knownLength||this._valuesToMeasure.push(t))};Lp.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):wqo.stat(e.path,function(r,n){var i;if(r){t(r);return}i=n.size-(e.start?e.start:0),t(null,i)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(r){e.pause(),t(null,+r.headers["content-length"])}),e.resume()):t("Unknown stream")};Lp.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),a="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&eNt(s,r.header);var u;for(var c in s)s.hasOwnProperty(c)&&(u=s[c],u!=null&&(Array.isArray(u)||(u=[u]),u.length&&(a+=c+": "+u.join("; ")+Lp.LINE_BREAK)));return"--"+this.getBoundary()+Lp.LINE_BREAK+a+Lp.LINE_BREAK};Lp.prototype._getContentDisposition=function(e,t){var r,n;return typeof t.filepath=="string"?r=Q6t.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=Q6t.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=Q6t.basename(e.client._httpMessage.path||"")),r&&(n='filename="'+r+'"'),n};Lp.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=X6t.lookup(e.name)),!r&&e.path&&(r=X6t.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=X6t.lookup(t.filepath||t.filename)),!r&&typeof e=="object"&&(r=Lp.DEFAULT_CONTENT_TYPE),r};Lp.prototype._multiPartFooter=function(){return function(e){var t=Lp.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};Lp.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Lp.LINE_BREAK};Lp.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r};Lp.prototype.setBoundary=function(e){this._boundary=e};Lp.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Lp.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(Lp.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Lp.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(Math.random()*10).toString(16);this._boundary=e};Lp.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};Lp.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Lp.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Nqo.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};Lp.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Dqo(e),n=eNt({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=eNt(e,i),n.port||(n.port=n.protocol=="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol=="https:"?r=Cqo.request(n):r=Tqo.request(n),this.getLength(function(a,s){if(a&&a!=="Unknown stream"){this._error(a);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,c=function(d,p){return r.removeListener("error",c),r.removeListener("response",u),t.call(this,d,p)};u=c.bind(this,null),r.on("error",c),r.on("response",u)}}.bind(this)),r};Lp.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Lp.prototype.toString=function(){return"[object FormData]"}});var jrn=P((KCs,Pqo)=>{Pqo.exports={name:"@forge/cli",version:"11.5.0-next.2",description:"A command line interface for managing Atlassian-hosted apps",author:"Atlassian",license:"SEE LICENSE IN LICENSE.txt",bin:{forge:"out/bin/cli.js"},homepage:"https://developer.atlassian.com/platform/forge",scripts:{build:"yarn clean && yarn run check && yarn run compile",clean:"rm -rf ./scriptOut && rm -rf ./out && rm -f tsconfig.tsbuildinfo",compile:"NODE_ENV=production yarn run compile:base","compile:base":"ts-node scripts/build.ts && mkdir -p ./out/autocomplete && cp ./src/autocomplete/autocomplete-config.json ./out/autocomplete/autocomplete-config.json",dev:"NODE_ENV=development yarn run compile:base && NODE_ENV=development node ./out/bin/cli.js",inspect:"NODE_ENV=development ts-node scripts/build.ts && NODE_ENV=development node --inspect-brk ./out/bin/cli.js",postbuild:"yarn run postbuild:chmod && yarn run postbuild:autocomplete && yarn run postbuild:copy-stubs","postbuild:chmod":"chmod +x out/bin/*.js","postbuild:autocomplete":"ts-node scripts/build.ts scripts/configureAutocomplete.ts && ts-node ./scriptOut/configureAutocomplete.js","postbuild:copy-stubs":"mkdir -p out/stubs && cp ../forge-bundler/out/stubs/unsupported.js out/stubs/ && cp ../forge-bundler/out/stubs/http-sandbox.js out/stubs/ && cp ../forge-bundler/out/stubs/http-sandbox-impl.js out/stubs/",postinstall:`node -e "fs.existsSync('./out/bin/postinstall.js') && require('./out/bin/postinstall.js')"`,check:"tsc --noEmit"},dependencies:{"@babel/plugin-transform-class-properties":"^7.23.3","@babel/plugin-transform-class-static-block":"^7.23.4","@babel/plugin-transform-numeric-separator":"^7.23.4","@babel/plugin-transform-optional-chaining":"^7.23.4","@babel/plugin-transform-react-jsx":"^7.23.4","@babel/preset-typescript":"^7.23.3","@forge/bundler":"4.23.1-next.1","@forge/cli-shared":"6.10.1-next.1","@forge/babel-plugin-transform-ui":"1.1.21","@forge/egress":"1.4.0","@forge/lint":"5.7.6-next.1","@forge/manifest":"9.3.0-next.1","@forge/runtime":"5.10.7","@forge/tunnel":"5.10.4-next.1","@forge/util":"1.4.8","@sentry/node":"7.106.0","@forge/i18n":"0.0.5",ajv:"^8.12.0",archiver:"^6.0.2",case:"^1.6.3",chalk:"^4.1.2",cheerio:"^0.22.0","cli-table3":"^0.6.3","command-exists":"^1.2.9",commander:"^11.1.0","cross-spawn":"^7.0.5",dayjs:"^1.11.10",didyoumean:"^1.2.2",diff:"^7.0.0","env-paths":"^2.2.1","exponential-backoff":"^3.1.1","form-data":"^4.0.0","fs-extra":"^11.2.0","headers-utils":"^3.0.2",hidefile:"^3.0.0","latest-version":"^7.0.0",lodash:"^4.17.21","node-fetch":"2.7.0","node-machine-id":"^1.1.12",omelette:"^0.4.17",ora:"^5.4.1",portfinder:"^1.0.32","sanitize-filename":"^1.6.3",semver:"^7.6.0",tmp:"^0.2.3",tslib:"^2.6.2","readable-stream":"^4.5.2",uuid:"^9.0.1","v8-compile-cache":"^2.4.0"},devDependencies:{"@types/archiver":"^6.0.2","@types/cheerio":"^0.22.35","@types/command-exists":"^1.2.3","@types/cross-spawn":"^6.0.6","@types/didyoumean":"^1.2.2","@types/diff":"^6.0.0","@types/fs-extra":"^11.0.4","@types/hidefile":"^3.0.3","@types/inquirer":"^8.2.10","@types/jest":"^29.5.12","@types/node":"14.18.63","@types/node-fetch":"^2.6.11","@types/omelette":"^0.4.4","@types/semver":"^7.5.8","@types/tmp":"^0.2.6","@types/uuid":"^9.0.8","@types/jws":"^3.2.10",jws:"^4.0.0",jest:"^29.7.0","jest-fixtures":"^0.6.0","jest-matcher-specific-error":"^1.0.0","jest-when":"^3.6.0",memfs:"^4.6.0","sentry-testkit":"^5.0.9",esbuild:"^0.21.5","type-fest":"4.10.2"},engines:{node:">=18.20.7"},publishConfig:{registry:"https://packages.atlassian.com/api/npm/npm-public/"}}});var Qpe=P(sNt=>{var s9e=class extends Error{constructor(t,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},oNt=class extends s9e{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};sNt.CommanderError=s9e;sNt.InvalidArgumentError=oNt});var u9e=P(cNt=>{var{InvalidArgumentError:kqo}=Qpe(),uNt=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new kqo(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Lqo(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}cNt.Argument=uNt;cNt.humanReadableArgName=Lqo});var dNt=P(onn=>{var{humanReadableArgName:Fqo}=u9e(),lNt=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden);if(t._hasImplicitHelpCommand()){let[,n,i]=t._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),a=t.createCommand(n).helpOption(!1);a.description(t._helpCommandDescription),i&&a.arguments(i),r.push(a)}return this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(t).localeCompare(n(r))}visibleOptions(t){let r=t.options.filter(a=>!a.hidden),n=t._hasHelpOption&&t._helpShortFlag&&!t._findOption(t._helpShortFlag),i=t._hasHelpOption&&!t._findOption(t._helpLongFlag);if(n||i){let a;n?i?a=t.createOption(t._helpFlags,t._helpDescription):a=t.createOption(t._helpShortFlag,t._helpDescription):a=t.createOption(t._helpLongFlag,t._helpDescription),r.push(a)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let n=t.parent;n;n=n.parent){let i=n.options.filter(a=>!a.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(n=>Fqo(n)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((n,i)=>Math.max(n,r.subcommandTerm(i).length),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((n,i)=>Math.max(n,r.optionTerm(i).length),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((n,i)=>Math.max(n,r.optionTerm(i).length),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((n,i)=>Math.max(n,r.argumentTerm(i).length),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let n="";for(let i=t.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}formatHelp(t,r){let n=r.padWidth(t,r),i=r.helpWidth||80,a=2,s=2;function u(E,h){if(h){let I=`${E.padEnd(n+s)}${h}`;return r.wrap(I,i-a,n+s)}return E}function c(E){return E.join(`
 `).replace(/^/gm," ".repeat(a))}let d=[`Usage: ${r.commandUsage(t)}`,""],p=r.commandDescription(t);p.length>0&&(d=d.concat([r.wrap(p,i,0),""]));let g=r.visibleArguments(t).map(E=>u(r.argumentTerm(E),r.argumentDescription(E)));g.length>0&&(d=d.concat(["Arguments:",c(g),""]));let v=r.visibleOptions(t).map(E=>u(r.optionTerm(E),r.optionDescription(E)));if(v.length>0&&(d=d.concat(["Options:",c(v),""])),this.showGlobalOptions){let E=r.visibleGlobalOptions(t).map(h=>u(r.optionTerm(h),r.optionDescription(h)));E.length>0&&(d=d.concat(["Global Options:",c(E),""]))}let S=r.visibleCommands(t).map(E=>u(r.subcommandTerm(E),r.subcommandDescription(E)));return S.length>0&&(d=d.concat(["Commands:",c(S),""])),d.join(`
 `)}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}wrap(t,r,n,i=40){let a=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",s=new RegExp(`[\\n][${a}]+`);if(t.match(s))return t;let u=r-n;if(u<i)return t;let c=t.slice(0,n),d=t.slice(n).replace(`\r
 `,`
 `),p=" ".repeat(n),v="\\s\u200B",S=new RegExp(`