@forge/cli 11.5.0-next.2-experimental-07de784 → 11.5.0-next.2-experimental-9b8de22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -6
- package/out/bin/cli.js +1 -1
- package/out/bin/postinstall.js +1 -1
- package/package.json +9 -7
- package/scriptOut/configureAutocomplete.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @forge/cli
|
|
2
2
|
|
|
3
|
-
## 11.5.0-next.2-experimental-
|
|
3
|
+
## 11.5.0-next.2-experimental-9b8de22
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
- 19cd149: Change bundling and caching of CLI to improve performance
|
|
13
13
|
- Updated dependencies [8bd52d6]
|
|
14
14
|
- Updated dependencies [743bbdc]
|
|
15
|
-
- @forge/manifest@9.3.0-next.1-experimental-
|
|
16
|
-
- @forge/bundler@4.23.1-next.1-experimental-
|
|
17
|
-
- @forge/cli-shared@6.10.1-next.1-experimental-
|
|
18
|
-
- @forge/lint@5.7.6-next.1-experimental-
|
|
19
|
-
- @forge/tunnel@5.10.4-next.1-experimental-
|
|
15
|
+
- @forge/manifest@9.3.0-next.1-experimental-9b8de22
|
|
16
|
+
- @forge/bundler@4.23.1-next.1-experimental-9b8de22
|
|
17
|
+
- @forge/cli-shared@6.10.1-next.1-experimental-9b8de22
|
|
18
|
+
- @forge/lint@5.7.6-next.1-experimental-9b8de22
|
|
19
|
+
- @forge/tunnel@5.10.4-next.1-experimental-9b8de22
|
|
20
20
|
|
|
21
21
|
## 11.5.0-next.2
|
|
22
22
|
|
package/out/bin/cli.js
CHANGED
|
@@ -10268,7 +10268,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof Yv))r
|
|
|
10268
10268
|
`+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)+`
|
|
10269
10269
|
`)}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(`
|
|
10270
10270
|
`).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
|
|
10271
|
-
`;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(`
|
|
10271
|
+
`;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(`
|
|
10272
10272
|
`).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(`
|
|
10273
10273
|
`)}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
|
|
10274
10274
|
`,`
|
package/out/bin/postinstall.js
CHANGED
|
@@ -10121,7 +10121,7 @@ ${r}`,ata=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ota=Obj
|
|
|
10121
10121
|
}
|
|
10122
10122
|
}
|
|
10123
10123
|
}`,{});if(t.me.user&&t.me.user.accountStatus==="active")return t.me.user}catch(r){this.logger.debug((0,Mta.errorMessage)(r))}throw new K1e}};zG.MeGraphqlClient=Irr});var Srr=G($G=>{"use strict";Object.defineProperty($G,"__esModule",{value:!0});$G.getBearerAuthorizationHeader=$G.getBasicAuthorizationHeader=void 0;function Bta(e,r){return{authorization:`Basic ${Buffer.from(`${e}:${r}`).toString("base64")}`}}$G.getBasicAuthorizationHeader=Bta;function qta(e){return{authorization:`Bearer ${e}`}}$G.getBearerAuthorizationHeader=qta});var Crr=G(Q1e=>{"use strict";Object.defineProperty(Q1e,"__esModule",{value:!0});Q1e.PersonalTokenAuthenticator=void 0;var jct=Ug(),jta=Srr(),Uta=W1e(),Y1e=vrr(),Arr=class{credentialStore;constructor(r){this.credentialStore=r}async getAuthorizationHeader(){let{email:r,token:t}=await this.credentialStore.getCredentials();return(0,jta.getBasicAuthorizationHeader)(r,t)}getInstructionsWhenInvalid(){let r=(0,Uta.getInstructionsUrl)();return process.env[Y1e.API_TOKEN_KEY]&&process.env[Y1e.EMAIL_KEY]?jct.Text.error.invalidTokenInEnv(r,Y1e.EMAIL_KEY,Y1e.API_TOKEN_KEY):jct.Text.error.invalidTokenInKeytar}};Q1e.PersonalTokenAuthenticator=Arr});var Uct=G(X1e=>{"use strict";Object.defineProperty(X1e,"__esModule",{value:!0});X1e.UserRepositoryImpl=void 0;var Vta=Err(),Gta=Crr(),Trr=class{createGraphQLClient;logger;constructor(r,t){this.createGraphQLClient=r,this.logger=t}async getUser(r){let t=new Gta.PersonalTokenAuthenticator({getCredentials:async()=>({...r,accountId:""})}),n=this.createGraphQLClient(t);return await new Vta.MeGraphqlClient(n,this.logger).getUser()}};X1e.UserRepositoryImpl=Trr});var Vct=G(B6=>{"use strict";Object.defineProperty(B6,"__esModule",{value:!0});var HG=(as(),ls(is));HG.__exportStar(vrr(),B6);HG.__exportStar(Bct(),B6);HG.__exportStar(qct(),B6);HG.__exportStar(Err(),B6);HG.__exportStar(Crr(),B6);HG.__exportStar(Uct(),B6)});var Gct=G(iee=>{"use strict";Object.defineProperty(iee,"__esModule",{value:!0});var xrr=(as(),ls(is));xrr.__exportStar(Vct(),iee);xrr.__exportStar(Srr(),iee);xrr.__exportStar(W1e(),iee)});var Wct=G(CA=>{"use strict";Object.defineProperty(CA,"__esModule",{value:!0});CA.HttpFileUploader=CA.UploadFileEmptyError=CA.UploadFileNotFoundError=CA.CannotUploadFileError=void 0;var Wta=(as(),ls(is)),Jta=Wta.__importDefault(zX()),Drr=Ug(),ebe=class extends Error{};CA.CannotUploadFileError=ebe;var rbe=class extends Error{};CA.UploadFileNotFoundError=rbe;var tbe=class extends Error{};CA.UploadFileEmptyError=tbe;var zta=(e,r)=>{if(!r)throw new rbe(Drr.Text.upload.error.notFound(e));if(!r.length)throw new tbe(Drr.Text.upload.error.empty(e));return r},$ta=async e=>{if(!e.ok)throw new ebe(Drr.Text.upload.error.status(e.status,await e.text()))},wrr=class{fileSystem;constructor(r){this.fileSystem=r}async uploadFromPath(r,t){let n=this.fileSystem.readBinaryFile(t),i=zta(t,n),o=await(0,Jta.default)(r,{method:"PUT",headers:{"Content-Type":"application/zip","Content-Length":i.length.toString()},body:i});await $ta(o)}};CA.HttpFileUploader=wrr});var zct=G(q6=>{"use strict";Object.defineProperty(q6,"__esModule",{value:!0});q6.GlobalEdgeHttpClient=q6.InvalidResponseError=q6.InvalidSiteError=void 0;var Hta=require("url"),Jct=Ug(),nbe=class extends Error{constructor(r){super(Jct.Text.install.error.url(r.toString()))}};q6.InvalidSiteError=nbe;var aee=class extends Error{constructor(r){super(Jct.Text.install.error.site(r.toString()))}};q6.InvalidResponseError=aee;var Orr=class{fetchClient;constructor(r){this.fetchClient=r}async getCloudId(r){let t=this.buildUrl(r),n=await this.fetchClient.fetch(t);if(!n.ok)throw new nbe(r);let i;try{i=await n.json()}catch{throw new aee(r)}if(i&&i.cloudId)return i.cloudId;throw new aee(r)}buildUrl(r){return new Hta.URL("/_edge/tenant_info",r.toString()).toString()}};q6.GlobalEdgeHttpClient=Orr});var $ct=G(ibe=>{"use strict";Object.defineProperty(ibe,"__esModule",{value:!0});ibe.HttpsFeedbackPostClient=void 0;var Zta=(as(),ls(is)),Kta=Zta.__importDefault(zX()),Yta=e=>({fields:[{id:"summary",value:e.summary},{id:"description",value:e.description},{id:"email",value:e.email}]}),Nrr=class{forgeFeedbackCollectorUrl="https://jsd-widget.atlassian.com/api/embeddable/b8a921af-5e55-4b6f-a219-590251ab908f/request?requestTypeId=326";async sendFeedback(r){return(0,Kta.default)(this.forgeFeedbackCollectorUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Yta(r))})}};ibe.HttpsFeedbackPostClient=Nrr});var Hct=G(abe=>{"use strict";Object.defineProperty(abe,"__esModule",{value:!0});abe.getAtlassianTraceId=void 0;function Qta(e){var r;return(r=e.get("atl-traceid"))!=null?r:void 0}abe.getAtlassianTraceId=Qta});var Zct=G(ZG=>{"use strict";Object.defineProperty(ZG,"__esModule",{value:!0});var obe=(as(),ls(is));obe.__exportStar(Wct(),ZG);obe.__exportStar(zct(),ZG);obe.__exportStar($ct(),ZG);obe.__exportStar(Hct(),ZG)});var Yct=G(sbe=>{"use strict";Object.defineProperty(sbe,"__esModule",{value:!0});sbe.BridgeScriptService=void 0;var Xta=(as(),ls(is)),ena=Xta.__importDefault(V_e()),Kct=VQ(),rna="global-bridge.js",tna="forge",Prr=class{env;constructor(r=(0,Kct.getEnvironmentConfig)(Kct.CDNEnvironments)){this.env=r}createBridgeCoreScriptTag(){return`<script src="https://${tna}.cdn.${this.env}.atlassian-dev.net/${rna}"></script>`}injectBridgeCore(r,t){let n=ena.default.load(r);n("html").length===0&&t();let i=n("head");return i.length===0&&(n("html").prepend("<head></head>"),i=n("head")),i.prepend(this.createBridgeCoreScriptTag()),Buffer.from(n.html())}};sbe.BridgeScriptService=Prr});var Xct=G(cbe=>{"use strict";Object.defineProperty(cbe,"__esModule",{value:!0});cbe.IframeResizerScriptService=void 0;var nna=(as(),ls(is)),ina=nna.__importDefault(V_e()),Qct=VQ(),ana="iframeResizer.contentWindow.min.js",ona="forge",krr=class{env;constructor(r=(0,Qct.getEnvironmentConfig)(Qct.CDNEnvironments)){this.env=r}createIframeResizerScriptTag(){return`<script async src="https://${ona}.cdn.${this.env}.atlassian-dev.net/${ana}"></script>`}injectIframeResizer(r,t){let n=ina.default.load(r);n("html").length===0&&t();let i=n("head");return i.length===0&&(n("html").prepend("<head></head>"),i=n("head")),i.prepend(this.createIframeResizerScriptTag()),Buffer.from(n.html())}};cbe.IframeResizerScriptService=krr});var eut=G(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});KT.I18nResourceBundlingService=KT.listFilesInI18nResourceBundle=KT.EMPTY_I18N_RESOURCE_BUNDLE=void 0;var sna=(as(),ls(is)),cna=sna.__importDefault(Vte()),KG=require("fs"),m9=require("path"),ube=Bpe(),una=bA();KT.EMPTY_I18N_RESOURCE_BUNDLE={exists:!1};var lna=e=>e.exists?(0,KG.readdirSync)(e.path).map(r=>[r,(0,m9.join)(e.path,r)]):[];KT.listFilesInI18nResourceBundle=lna;var Rrr=class{async copyLocaleFilesToBundleDir(r,t){let n=t.resources.map(i=>[i.key,(0,m9.resolve)(i.path)]);await Promise.all(n.map(async([i,o])=>{let s=(0,m9.join)(r,`${i}.json`);await KG.promises.copyFile(o,s)}))}async createI18nInfoFile(r,t,n){let i=(0,ube.extractI18nKeysFromModules)(n),o=await this.loadTranslationLookup(t),s=this.createI18nInfo(t,i,o),u=(0,m9.join)(r,ube.I18N_INFO_FILE_NAME);await KG.promises.writeFile(u,JSON.stringify(s))}createI18nInfo(r,t,n){let i={},o=Object.keys(n).sort();t.forEach(u=>{let l=o.reduce((d,f)=>{let h=(0,ube.getTranslationValue)(n,u,f);return h&&(d[f]=h),d},{});i[u]=l});let s=r.fallback.default;if(t.some(u=>!i[u][s]))throw new una.UserError(`Default locale '${s}' is missing translations for some keys`);return{translations:i,config:{locales:o,fallback:r.fallback}}}async loadTranslationLookup(r){let t=r.resources.map(i=>[i.key,(0,m9.resolve)(i.path)]),n=await Promise.all(t.map(async([i,o])=>{let s=await KG.promises.readFile(o);return[i,JSON.parse(s.toString())]}));return Object.fromEntries(n)}async bundle(r,t){if(!r||!t)return KT.EMPTY_I18N_RESOURCE_BUNDLE;let n=cna.default.dirSync().name;return await this.copyLocaleFilesToBundleDir(n,t),await this.createI18nInfoFile(n,t,r),{exists:!0,path:n}}createFileAccessor(r){let t=ube.I18N_INFO_FILE_NAME.split(".")[0];return async n=>{if(n===t)return Buffer.from(JSON.stringify({translations:{},config:{locales:r.resources.map(o=>o.key),fallback:r.fallback}}));let i=r.resources.find(o=>o.key===n);return!i||!(await KG.promises.stat((0,m9.resolve)(i.path))).isFile()?null:KG.promises.readFile((0,m9.resolve)(i.path))}}};KT.I18nResourceBundlingService=Rrr});var rut=G(j6=>{"use strict";Object.defineProperty(j6,"__esModule",{value:!0});j6.StatsigService=j6.cacheStatsigResult=j6.StatsigReader=void 0;var Lrr=bA(),lbe=class{async testForgeCliTestGate(){var r;return(r=await this.checkGate("forge-cli-test-gate"))!=null?r:!1}async getForgeCliTestDynamicConfig(){var r;return(r=await this.getDynamicConfig("forge-cli-test-dynamic-configs"))!=null?r:[]}async isLogsV2ApiEnabled(){var r;return(r=await this.checkGate("is-logs-v-2-api-enabled"))!=null?r:!0}async isAtlasProductSupported(){var r;return(r=await this.checkGate("forge-cli-enable-atlas-product-support"))!=null?r:!1}async isTeamworkGraphProductSupported(){var r;return(r=await this.checkGate("forge-cli-enable-teamwork-graph-product-support"))!=null?r:!1}async testForgeCliBundleRuntimeLoaderGate(){var r;return(r=await this.checkGate("forge-cli-bundle-runtime-loader"))!=null?r:!1}async enableCrossProductAppInstallation(){var r;return(r=await this.checkGate("forge-cli-enable-xpa-installation"))!=null?r:!1}async packageSingleWrapper(){var r;return(r=await this.checkGate("forge-cli-xls-enable-single-handler"))!=null?r:!1}async enableInstallationWarnings(){var r;return(r=await this.checkGate("forge-cli-enable-installation-warning"))!=null?r:!1}async getDeprecatedRuntimes(){var r;return(r=await this.getDynamicConfig("xls-forge-cli-deprecated-runtimes"))!=null?r:[]}};j6.StatsigReader=lbe;var dbe;(function(e){e.DEV="8821cc19-368d-43d4-a20d-c6b8dca6b7ee",e.STG="a821948e-f0a9-4fae-b211-7ea7a666ccc5",e.PROD="b63235cf-e03e-460b-aa2c-f071b3986a0c",e.FEDRAMP_MODERATE_STAGING="",e.FEDRAMP_MODERATE_PROD=""})(dbe||(dbe={}));var pbe;(function(e){e.DEV="https://api.stg.atlassian.com/flags/api/v2/",e.STG="https://api.stg.atlassian.com/flags/api/v2/",e.PROD="https://api.atlassian.com/flags/api/v2/",e.FEDRAMP_MODERATE_STAGING="",e.FEDRAMP_MODERATE_PROD=""})(pbe||(pbe={}));function oee(e){let r=new Map;return async function(...t){let n=t.filter(s=>s!==void 0),i=JSON.stringify(n);if(r.has(i))return r.get(i);let o=await e.apply(this,t);return r.set(i,o),o}}j6.cacheStatsigResult=oee;var Frr=class extends lbe{logger;cliDetails;credentialStore;appConfigReader;getEnvironmentFn;constructor(r,t,n,i,o=Lrr.getEnvironmentConfig){super(),this.logger=r,this.cliDetails=t,this.credentialStore=n,this.appConfigReader=i,this.getEnvironmentFn=o}appID=oee(async()=>{try{let r=await this.appConfigReader.readConfigSection();return r==="missing"||r==="invalid"?null:r.id}catch{return null}});context=oee(async()=>{let r={};try{let{accountId:n}=await this.credentialStore.getCredentials();n&&(r.accountId=n)}catch{}let t=await this.appID();return t&&(r.appId=t.split("/")[1]),this.cliDetails&&(r.version=this.cliDetails.version),r});fetchGates=async r=>{try{let t=this.getEnvironmentFn(pbe),n=this.getEnvironmentFn(dbe),i=await this.context();return await(await fetch(`${t}/frontend/gates`,{headers:{"x-api-key":n,"Content-Type":"application/json"},method:"POST",body:JSON.stringify({identifiers:{atlassianAccountId:i.accountId,randomizationId:i.appId},customAttributes:{appId:i.appId,version:i.version,atlassianAccountId:i.accountId,...r},targetApp:"forge_cli"})})).json()}catch(t){return this.logger.debug(`Failed to fetch gates: ${t}`),{}}};fetchDynamicConfigs=async r=>{try{let t=this.getEnvironmentFn(pbe),n=this.getEnvironmentFn(dbe),i=await this.context();return await(await fetch(`${t}/configurations`,{headers:{"x-api-key":n,"Content-Type":"application/json"},method:"POST",body:JSON.stringify({identifiers:{atlassianAccountId:i.accountId,randomizationId:i.appId},metadata:{appId:i.appId,version:i.version,atlassianAccountId:i.accountId,...r},namespace:"forge_cli"})})).json()}catch(t){return this.logger.debug(`Failed to fetch dynamic configurations: ${t}`),{"forge-cli-test-dynamic-configs":{value:[]}}}};gatesClient=oee(async r=>({gates:await this.fetchGates(r)}));dynamicConfigClient=oee(async r=>({dynamicConfigs:await this.fetchDynamicConfigs(r)}));async checkGate(r,t={}){var n;if((0,Lrr.isFedrampEnv)())return this.logger.debug(`Feature gates ${r} is not available in FedRAMP environments.`),!1;try{let{gates:i}=await this.gatesClient(t,{});return(n=i[r])!=null?n:null}catch{return this.logger.error(new Error("Failed to read feature gates. Proceeding with defaults.")),null}}async getDynamicConfig(r,t={}){var n;if((0,Lrr.isFedrampEnv)())return this.logger.debug(`Dynamic config ${r} is not available in FedRAMP environments.`),[];try{let{dynamicConfigs:i}=await this.dynamicConfigClient({},t);return(n=i[r].value)!=null?n:null}catch{return this.logger.error(new Error("Failed to read dynamic configs. Proceeding with defaults.")),null}}};j6.StatsigService=Frr});var iut=G(U6=>{"use strict";Object.defineProperty(U6,"__esModule",{value:!0});U6.TEST_ONLY_EXPORTS=U6.isBitbucketProduct=U6.SupportedProductsService=void 0;var dna=require("url"),YG=G1(),tut=Ug(),pna=[{name:"Jira",productType:"sited",special:{supportedByCrossProductApps:!0}},{name:"Confluence",productType:"sited",special:{supportedByCrossProductApps:!0}},{name:"Compass",productType:"sited",special:{supportedByCrossProductApps:!0}},{name:"Teamwork Graph",productType:"sited",special:{isEnabledByFeatureGate:async e=>e.isTeamworkGraphProductSupported()}},{name:"Atlas",productType:"sited",special:{isEnabledByFeatureGate:async e=>e.isAtlasProductSupported()}},{name:"Bitbucket",productType:"workspace"}],Mrr=class{productName;productType;supportedByCrossProductApps;constructor(r,t,n){this.productName=r,this.productType=t,this.supportedByCrossProductApps=n}};async function nut(e){return(await Promise.all(pna.map(async n=>{var s;let i=(s=n.special)==null?void 0:s.isEnabledByFeatureGate,o=i?await i(e):!0;return{pd:n,isEnabled:o}}))).filter(({isEnabled:n})=>n).map(({pd:n})=>n).map(n=>{var i,o;return new Mrr(n.name,n.productType,(o=(i=n.special)==null?void 0:i.supportedByCrossProductApps)!=null?o:!1)})}var Brr=class{value;constructor(r){this.value=r}async initialize(r){if(this.value)throw new Error("SupportedProductsService was already initialized - is initialization called multiple times?");this.value=await r()}get(){if(!this.value)throw new Error("SupportedProductsService is not initialized - are you calling it from some constructor?");return this.value}},qrr=class{supportedProductEntriesHolder;constructor(r){this.supportedProductEntriesHolder=new Brr(r)}async initializeWithSupportedProducts(r){await this.supportedProductEntriesHolder.initialize(async()=>await nut(r))}getFilteredSupportedProducts(r){return this.supportedProductEntriesHolder.get().filter(t=>r(t)).map(t=>t.productName)}getSupportedProducts(){return this.supportedProductEntriesHolder.get().map(r=>r.productName)}getSupportedSecondaryProductsForXPA(r){let t=r.map(n=>(0,YG.productDisplayName)(n));return this.getFilteredSupportedProducts(n=>n.supportedByCrossProductApps&&!t.includes(n.productName))}validateSupportedProduct(r){let t=(0,YG.productDisplayName)(r);if(this.getSupportedProducts().includes(t))return t;throw new YG.ValidationError(tut.Text.error.invalidContext([]))}isWorkspaceProduct(r){return this.getFilteredSupportedProducts(t=>t.productType==="workspace").includes((0,YG.productDisplayName)(r))}validateSite(r,t){let n=[r,`https://${r}`];for(let i of n)try{let o=new dna.URL(i);return t&&this.isWorkspaceProduct(t)||(o.pathname="/"),o}catch{}throw new YG.ValidationError(tut.Text.error.invalidSite)}};U6.SupportedProductsService=qrr;var fna=e=>(0,YG.productDisplayName)(e)==="Bitbucket";U6.isBitbucketProduct=fna;U6.TEST_ONLY_EXPORTS={resolveEnabledProducts:nut}});var aut=G(g9=>{"use strict";Object.defineProperty(g9,"__esModule",{value:!0});var see=(as(),ls(is));see.__exportStar(Yct(),g9);see.__exportStar(Xct(),g9);see.__exportStar(eut(),g9);see.__exportStar(rut(),g9);see.__exportStar(iut(),g9)});var out=G(YT=>{"use strict";Object.defineProperty(YT,"__esModule",{value:!0});YT.defaultNoDebugTunnelOptions=YT.TUNNEL_BUNDLE_DIRECTORY=YT.defaultDebugStartingPort=void 0;var mna=(as(),ls(is)),gna=mna.__importDefault(require("path")),_na=G1();YT.defaultDebugStartingPort=9229;YT.TUNNEL_BUNDLE_DIRECTORY=gna.default.join(_na.FORGE_DIRECTORY,"tunnel-output");YT.defaultNoDebugTunnelOptions={debug:!1,debugStartingPort:YT.defaultDebugStartingPort}});var sut=G(jrr=>{"use strict";Object.defineProperty(jrr,"__esModule",{value:!0});var hna=(as(),ls(is));hna.__exportStar(out(),jrr)});var bA=G(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});var g1=(as(),ls(is));g1.__exportStar(FQr(),Iy);g1.__exportStar(Ust(),Iy);g1.__exportStar(uye(),Iy);g1.__exportStar(Gct(),Iy);g1.__exportStar(grr(),Iy);g1.__exportStar(qQ(),Iy);g1.__exportStar(Fer(),Iy);g1.__exportStar(DG(),Iy);g1.__exportStar(Zct(),Iy);g1.__exportStar(WZe(),Iy);g1.__exportStar(aut(),Iy);g1.__exportStar(G1(),Iy);g1.__exportStar(sut(),Iy);g1.__exportStar(Ug(),Iy)});var cut=G((cee,Urr)=>{(function(e,r){typeof cee=="object"&&typeof Urr=="object"?Urr.exports=r(require("child_process"),require("crypto")):typeof define=="function"&&define.amd?define(["child_process","crypto"],r):typeof cee=="object"?cee["electron-machine-id"]=r(require("child_process"),require("crypto")):e["electron-machine-id"]=r(e.child_process,e.crypto)})(cee,function(e,r){return function(t){function n(o){if(i[o])return i[o].exports;var s=i[o]={exports:{},id:o,loaded:!1};return t[o].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}var i={};return n.m=t,n.c=i,n.p="",n(0)}([function(t,n,i){t.exports=i(34)},function(t,n,i){var o=i(29)("wks"),s=i(33),u=i(2).Symbol,l=typeof u=="function",d=t.exports=function(f){return o[f]||(o[f]=l&&u[f]||(l?u:s)("Symbol."+f))};d.store=o},function(t,n){var i=t.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=i)},function(t,n,i){var o=i(9);t.exports=function(s){if(!o(s))throw TypeError(s+" is not an object!");return s}},function(t,n,i){t.exports=!i(24)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(t,n,i){var o=i(12),s=i(17);t.exports=i(4)?function(u,l,d){return o.f(u,l,s(1,d))}:function(u,l,d){return u[l]=d,u}},function(t,n){var i=t.exports={version:"2.4.0"};typeof __e=="number"&&(__e=i)},function(t,n,i){var o=i(14);t.exports=function(s,u,l){if(o(s),u===void 0)return s;switch(l){case 1:return function(d){return s.call(u,d)};case 2:return function(d,f){return s.call(u,d,f)};case 3:return function(d,f,h){return s.call(u,d,f,h)}}return function(){return s.apply(u,arguments)}}},function(t,n){var i={}.hasOwnProperty;t.exports=function(o,s){return i.call(o,s)}},function(t,n){t.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},function(t,n){t.exports={}},function(t,n){var i={}.toString;t.exports=function(o){return i.call(o).slice(8,-1)}},function(t,n,i){var o=i(3),s=i(26),u=i(32),l=Object.defineProperty;n.f=i(4)?Object.defineProperty:function(d,f,h){if(o(d),f=u(f,!0),o(h),s)try{return l(d,f,h)}catch{}if("get"in h||"set"in h)throw TypeError("Accessors not supported!");return"value"in h&&(d[f]=h.value),d}},function(t,n,i){var o=i(42),s=i(15);t.exports=function(u){return o(s(u))}},function(t,n){t.exports=function(i){if(typeof i!="function")throw TypeError(i+" is not a function!");return i}},function(t,n){t.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},function(t,n,i){var o=i(9),s=i(2).document,u=o(s)&&o(s.createElement);t.exports=function(l){return u?s.createElement(l):{}}},function(t,n){t.exports=function(i,o){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:o}}},function(t,n,i){var o=i(12).f,s=i(8),u=i(1)("toStringTag");t.exports=function(l,d,f){l&&!s(l=f?l:l.prototype,u)&&o(l,u,{configurable:!0,value:d})}},function(t,n,i){var o=i(29)("keys"),s=i(33);t.exports=function(u){return o[u]||(o[u]=s(u))}},function(t,n){var i=Math.ceil,o=Math.floor;t.exports=function(s){return isNaN(s=+s)?0:(s>0?o:i)(s)}},function(t,n,i){var o=i(11),s=i(1)("toStringTag"),u=o(function(){return arguments}())=="Arguments",l=function(d,f){try{return d[f]}catch{}};t.exports=function(d){var f,h,E;return d===void 0?"Undefined":d===null?"Null":typeof(h=l(f=Object(d),s))=="string"?h:u?o(f):(E=o(f))=="Object"&&typeof f.callee=="function"?"Arguments":E}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,i){var o=i(2),s=i(6),u=i(7),l=i(5),d="prototype",f=function(h,E,S){var T,v,y,x=h&f.F,w=h&f.G,B=h&f.S,O=h&f.P,W=h&f.B,P=h&f.W,fe=w?s:s[E]||(s[E]={}),he=fe[d],me=w?o:B?o[E]:(o[E]||{})[d];w&&(S=E);for(T in S)v=!x&&me&&me[T]!==void 0,v&&T in fe||(y=v?me[T]:S[T],fe[T]=w&&typeof me[T]!="function"?S[T]:W&&v?u(y,o):P&&me[T]==y?function(K){var V=function(re,ae,F){if(this instanceof K){switch(arguments.length){case 0:return new K;case 1:return new K(re);case 2:return new K(re,ae)}return new K(re,ae,F)}return K.apply(this,arguments)};return V[d]=K[d],V}(y):O&&typeof y=="function"?u(Function.call,y):y,O&&((fe.virtual||(fe.virtual={}))[T]=y,h&f.R&&he&&!he[T]&&l(he,T,y)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n){t.exports=function(i){try{return!!i()}catch{return!0}}},function(t,n,i){t.exports=i(2).document&&document.documentElement},function(t,n,i){t.exports=!i(4)&&!i(24)(function(){return Object.defineProperty(i(16)("div"),"a",{get:function(){return 7}}).a!=7})},function(t,n,i){"use strict";var o=i(28),s=i(23),u=i(57),l=i(5),d=i(8),f=i(10),h=i(45),E=i(18),S=i(52),T=i(1)("iterator"),v=!([].keys&&"next"in[].keys()),y="@@iterator",x="keys",w="values",B=function(){return this};t.exports=function(O,W,P,fe,he,me,K){h(P,W,fe);var V,re,ae,F=function(ue){if(!v&&ue in H)return H[ue];switch(ue){case x:return function(){return new P(this,ue)};case w:return function(){return new P(this,ue)}}return function(){return new P(this,ue)}},Z=W+" Iterator",pe=he==w,Y=!1,H=O.prototype,z=H[T]||H[y]||he&&H[he],oe=z||F(he),ie=he?pe?F("entries"):oe:void 0,ee=W=="Array"&&H.entries||z;if(ee&&(ae=S(ee.call(new O)),ae!==Object.prototype&&(E(ae,Z,!0),o||d(ae,T)||l(ae,T,B))),pe&&z&&z.name!==w&&(Y=!0,oe=function(){return z.call(this)}),o&&!K||!v&&!Y&&H[T]||l(H,T,oe),f[W]=oe,f[Z]=B,he)if(V={values:pe?oe:F(w),keys:me?oe:F(x),entries:ie},K)for(re in V)re in H||u(H,re,V[re]);else s(s.P+s.F*(v||Y),W,V);return V}},function(t,n){t.exports=!0},function(t,n,i){var o=i(2),s="__core-js_shared__",u=o[s]||(o[s]={});t.exports=function(l){return u[l]||(u[l]={})}},function(t,n,i){var o,s,u,l=i(7),d=i(41),f=i(25),h=i(16),E=i(2),S=E.process,T=E.setImmediate,v=E.clearImmediate,y=E.MessageChannel,x=0,w={},B="onreadystatechange",O=function(){var P=+this;if(w.hasOwnProperty(P)){var fe=w[P];delete w[P],fe()}},W=function(P){O.call(P.data)};T&&v||(T=function(P){for(var fe=[],he=1;arguments.length>he;)fe.push(arguments[he++]);return w[++x]=function(){d(typeof P=="function"?P:Function(P),fe)},o(x),x},v=function(P){delete w[P]},i(11)(S)=="process"?o=function(P){S.nextTick(l(O,P,1))}:y?(s=new y,u=s.port2,s.port1.onmessage=W,o=l(u.postMessage,u,1)):E.addEventListener&&typeof postMessage=="function"&&!E.importScripts?(o=function(P){E.postMessage(P+"","*")},E.addEventListener("message",W,!1)):o=B in h("script")?function(P){f.appendChild(h("script"))[B]=function(){f.removeChild(this),O.call(P)}}:function(P){setTimeout(l(O,P,1),0)}),t.exports={set:T,clear:v}},function(t,n,i){var o=i(20),s=Math.min;t.exports=function(u){return u>0?s(o(u),9007199254740991):0}},function(t,n,i){var o=i(9);t.exports=function(s,u){if(!o(s))return s;var l,d;if(u&&typeof(l=s.toString)=="function"&&!o(d=l.call(s))||typeof(l=s.valueOf)=="function"&&!o(d=l.call(s))||!u&&typeof(l=s.toString)=="function"&&!o(d=l.call(s)))return d;throw TypeError("Can't convert object to primitive value")}},function(t,n){var i=0,o=Math.random();t.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++i+o).toString(36))}},function(t,n,i){"use strict";function o(B){return B&&B.__esModule?B:{default:B}}function s(){return process.platform!=="win32"?"":process.arch==="ia32"&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"}function u(B){return(0,T.createHash)("sha256").update(B).digest("hex")}function l(B){switch(y){case"darwin":return B.split("IOPlatformUUID")[1].split(`
|
|
10124
|
-
`)[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return B.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":return B.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"freebsd":return B.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}function d(B){var O=l((0,S.execSync)(w[y]).toString());return B?O:u(O)}function f(B){return new E.default(function(O,W){return(0,S.exec)(w[y],{},function(P,fe,he){if(P)return W(new Error("Error while obtaining machine id: "+P.stack));var me=l(fe.toString());return O(B?me:u(me))})})}Object.defineProperty(n,"__esModule",{value:!0});var h=i(35),E=o(h);n.machineIdSync=d,n.machineId=f;var S=i(70),T=i(71),v=process,y=v.platform,x={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},w={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:x[s()]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(t,n,i){t.exports={default:i(36),__esModule:!0}},function(t,n,i){i(66),i(68),i(69),i(67),t.exports=i(6).Promise},function(t,n){t.exports=function(){}},function(t,n){t.exports=function(i,o,s,u){if(!(i instanceof o)||u!==void 0&&u in i)throw TypeError(s+": incorrect invocation!");return i}},function(t,n,i){var o=i(13),s=i(31),u=i(62);t.exports=function(l){return function(d,f,h){var E,S=o(d),T=s(S.length),v=u(h,T);if(l&&f!=f){for(;T>v;)if(E=S[v++],E!=E)return!0}else for(;T>v;v++)if((l||v in S)&&S[v]===f)return l||v||0;return!l&&-1}}},function(t,S,i){var o=i(7),s=i(44),u=i(43),l=i(3),d=i(31),f=i(64),h={},E={},S=t.exports=function(T,v,y,x,w){var B,O,W,P,fe=w?function(){return T}:f(T),he=o(y,x,v?2:1),me=0;if(typeof fe!="function")throw TypeError(T+" is not iterable!");if(u(fe)){for(B=d(T.length);B>me;me++)if(P=v?he(l(O=T[me])[0],O[1]):he(T[me]),P===h||P===E)return P}else for(W=fe.call(T);!(O=W.next()).done;)if(P=s(W,he,O.value,v),P===h||P===E)return P};S.BREAK=h,S.RETURN=E},function(t,n){t.exports=function(i,o,s){var u=s===void 0;switch(o.length){case 0:return u?i():i.call(s);case 1:return u?i(o[0]):i.call(s,o[0]);case 2:return u?i(o[0],o[1]):i.call(s,o[0],o[1]);case 3:return u?i(o[0],o[1],o[2]):i.call(s,o[0],o[1],o[2]);case 4:return u?i(o[0],o[1],o[2],o[3]):i.call(s,o[0],o[1],o[2],o[3])}return i.apply(s,o)}},function(t,n,i){var o=i(11);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return o(s)=="String"?s.split(""):Object(s)}},function(t,n,i){var o=i(10),s=i(1)("iterator"),u=Array.prototype;t.exports=function(l){return l!==void 0&&(o.Array===l||u[s]===l)}},function(t,n,i){var o=i(3);t.exports=function(s,u,l,d){try{return d?u(o(l)[0],l[1]):u(l)}catch(h){var f=s.return;throw f!==void 0&&o(f.call(s)),h}}},function(t,n,i){"use strict";var o=i(49),s=i(17),u=i(18),l={};i(5)(l,i(1)("iterator"),function(){return this}),t.exports=function(d,f,h){d.prototype=o(l,{next:s(1,h)}),u(d,f+" Iterator")}},function(t,n,i){var o=i(1)("iterator"),s=!1;try{var u=[7][o]();u.return=function(){s=!0},Array.from(u,function(){throw 2})}catch{}t.exports=function(l,d){if(!d&&!s)return!1;var f=!1;try{var h=[7],E=h[o]();E.next=function(){return{done:f=!0}},h[o]=function(){return E},l(h)}catch{}return f}},function(t,n){t.exports=function(i,o){return{value:o,done:!!i}}},function(t,n,i){var o=i(2),s=i(30).set,u=o.MutationObserver||o.WebKitMutationObserver,l=o.process,d=o.Promise,f=i(11)(l)=="process";t.exports=function(){var h,E,S,T=function(){var w,B;for(f&&(w=l.domain)&&w.exit();h;){B=h.fn,h=h.next;try{B()}catch(O){throw h?S():E=void 0,O}}E=void 0,w&&w.enter()};if(f)S=function(){l.nextTick(T)};else if(u){var v=!0,y=document.createTextNode("");new u(T).observe(y,{characterData:!0}),S=function(){y.data=v=!v}}else if(d&&d.resolve){var x=d.resolve();S=function(){x.then(T)}}else S=function(){s.call(o,T)};return function(w){var B={fn:w,next:void 0};E&&(E.next=B),h||(h=B,S()),E=B}}},function(t,n,i){var o=i(3),s=i(50),u=i(22),l=i(19)("IE_PROTO"),d=function(){},f="prototype",h=function(){var E,S=i(16)("iframe"),T=u.length,v=">";for(S.style.display="none",i(25).appendChild(S),S.src="javascript:",E=S.contentWindow.document,E.open(),E.write("<script>document.F=Object</script"+v),E.close(),h=E.F;T--;)delete h[f][u[T]];return h()};t.exports=Object.create||function(E,S){var T;return E!==null?(d[f]=o(E),T=new d,d[f]=null,T[l]=E):T=h(),S===void 0?T:s(T,S)}},function(t,n,i){var o=i(12),s=i(3),u=i(54);t.exports=i(4)?Object.defineProperties:function(l,d){s(l);for(var f,h=u(d),E=h.length,S=0;E>S;)o.f(l,f=h[S++],d[f]);return l}},function(t,n,i){var o=i(55),s=i(17),u=i(13),l=i(32),d=i(8),f=i(26),h=Object.getOwnPropertyDescriptor;n.f=i(4)?h:function(E,S){if(E=u(E),S=l(S,!0),f)try{return h(E,S)}catch{}if(d(E,S))return s(!o.f.call(E,S),E[S])}},function(t,n,i){var o=i(8),s=i(63),u=i(19)("IE_PROTO"),l=Object.prototype;t.exports=Object.getPrototypeOf||function(d){return d=s(d),o(d,u)?d[u]:typeof d.constructor=="function"&&d instanceof d.constructor?d.constructor.prototype:d instanceof Object?l:null}},function(t,n,i){var o=i(8),s=i(13),u=i(39)(!1),l=i(19)("IE_PROTO");t.exports=function(d,f){var h,E=s(d),S=0,T=[];for(h in E)h!=l&&o(E,h)&&T.push(h);for(;f.length>S;)o(E,h=f[S++])&&(~u(T,h)||T.push(h));return T}},function(t,n,i){var o=i(53),s=i(22);t.exports=Object.keys||function(u){return o(u,s)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,i){var o=i(5);t.exports=function(s,u,l){for(var d in u)l&&s[d]?s[d]=u[d]:o(s,d,u[d]);return s}},function(t,n,i){t.exports=i(5)},function(t,n,i){var o=i(9),s=i(3),u=function(l,d){if(s(l),!o(d)&&d!==null)throw TypeError(d+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(l,d,f){try{f=i(7)(Function.call,i(51).f(Object.prototype,"__proto__").set,2),f(l,[]),d=!(l instanceof Array)}catch{d=!0}return function(h,E){return u(h,E),d?h.__proto__=E:f(h,E),h}}({},!1):void 0),check:u}},function(t,n,i){"use strict";var o=i(2),s=i(6),u=i(12),l=i(4),d=i(1)("species");t.exports=function(f){var h=typeof s[f]=="function"?s[f]:o[f];l&&h&&!h[d]&&u.f(h,d,{configurable:!0,get:function(){return this}})}},function(t,n,i){var o=i(3),s=i(14),u=i(1)("species");t.exports=function(l,d){var f,h=o(l).constructor;return h===void 0||(f=o(h)[u])==null?d:s(f)}},function(t,n,i){var o=i(20),s=i(15);t.exports=function(u){return function(l,d){var f,h,E=String(s(l)),S=o(d),T=E.length;return S<0||S>=T?u?"":void 0:(f=E.charCodeAt(S),f<55296||f>56319||S+1===T||(h=E.charCodeAt(S+1))<56320||h>57343?u?E.charAt(S):f:u?E.slice(S,S+2):(f-55296<<10)+(h-56320)+65536)}}},function(t,n,i){var o=i(20),s=Math.max,u=Math.min;t.exports=function(l,d){return l=o(l),l<0?s(l+d,0):u(l,d)}},function(t,n,i){var o=i(15);t.exports=function(s){return Object(o(s))}},function(t,n,i){var o=i(21),s=i(1)("iterator"),u=i(10);t.exports=i(6).getIteratorMethod=function(l){if(l!=null)return l[s]||l["@@iterator"]||u[o(l)]}},function(t,n,i){"use strict";var o=i(37),s=i(47),u=i(10),l=i(13);t.exports=i(27)(Array,"Array",function(d,f){this._t=l(d),this._i=0,this._k=f},function(){var d=this._t,f=this._k,h=this._i++;return!d||h>=d.length?(this._t=void 0,s(1)):f=="keys"?s(0,h):f=="values"?s(0,d[h]):s(0,[h,d[h]])},"values"),u.Arguments=u.Array,o("keys"),o("values"),o("entries")},function(t,n){},function(t,n,i){"use strict";var o,s,u,l=i(28),d=i(2),f=i(7),h=i(21),E=i(23),S=i(9),T=(i(3),i(14)),v=i(38),y=i(40),x=(i(58).set,i(60)),w=i(30).set,B=i(48)(),O="Promise",W=d.TypeError,fe=d.process,P=d[O],fe=d.process,he=h(fe)=="process",me=function(){},K=!!function(){try{var ee=P.resolve(1),ue=(ee.constructor={})[i(1)("species")]=function(L){L(me,me)};return(he||typeof PromiseRejectionEvent=="function")&&ee.then(me)instanceof ue}catch{}}(),V=function(ee,ue){return ee===ue||ee===P&&ue===u},re=function(ee){var ue;return!(!S(ee)||typeof(ue=ee.then)!="function")&&ue},ae=function(ee){return V(P,ee)?new F(ee):new s(ee)},F=s=function(ee){var ue,L;this.promise=new ee(function(U,D){if(ue!==void 0||L!==void 0)throw W("Bad Promise constructor");ue=U,L=D}),this.resolve=T(ue),this.reject=T(L)},Z=function(ee){try{ee()}catch(ue){return{error:ue}}},pe=function(ee,ue){if(!ee._n){ee._n=!0;var L=ee._c;B(function(){for(var U=ee._v,D=ee._s==1,R=0,$=function(A){var J,Q,ne=D?A.ok:A.fail,se=A.resolve,Te=A.reject,Ae=A.domain;try{ne?(D||(ee._h==2&&z(ee),ee._h=1),ne===!0?J=U:(Ae&&Ae.enter(),J=ne(U),Ae&&Ae.exit()),J===A.promise?Te(W("Promise-chain cycle")):(Q=re(J))?Q.call(J,se,Te):se(J)):Te(U)}catch(Pe){Te(Pe)}};L.length>R;)$(L[R++]);ee._c=[],ee._n=!1,ue&&!ee._h&&Y(ee)})}},Y=function(ee){w.call(d,function(){var ue,L,U,D=ee._v;if(H(ee)&&(ue=Z(function(){he?fe.emit("unhandledRejection",D,ee):(L=d.onunhandledrejection)?L({promise:ee,reason:D}):(U=d.console)&&U.error&&U.error("Unhandled promise rejection",D)}),ee._h=he||H(ee)?2:1),ee._a=void 0,ue)throw ue.error})},H=function(ee){if(ee._h==1)return!1;for(var ue,L=ee._a||ee._c,U=0;L.length>U;)if(ue=L[U++],ue.fail||!H(ue.promise))return!1;return!0},z=function(ee){w.call(d,function(){var ue;he?fe.emit("rejectionHandled",ee):(ue=d.onrejectionhandled)&&ue({promise:ee,reason:ee._v})})},oe=function(ee){var ue=this;ue._d||(ue._d=!0,ue=ue._w||ue,ue._v=ee,ue._s=2,ue._a||(ue._a=ue._c.slice()),pe(ue,!0))},ie=function(ee){var ue,L=this;if(!L._d){L._d=!0,L=L._w||L;try{if(L===ee)throw W("Promise can't be resolved itself");(ue=re(ee))?B(function(){var U={_w:L,_d:!1};try{ue.call(ee,f(ie,U,1),f(oe,U,1))}catch(D){oe.call(U,D)}}):(L._v=ee,L._s=1,pe(L,!1))}catch(U){oe.call({_w:L,_d:!1},U)}}};K||(P=function(ee){v(this,P,O,"_h"),T(ee),o.call(this);try{ee(f(ie,this,1),f(oe,this,1))}catch(ue){oe.call(this,ue)}},o=function(ee){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},o.prototype=i(56)(P.prototype,{then:function(ee,ue){var L=ae(x(this,P));return L.ok=typeof ee!="function"||ee,L.fail=typeof ue=="function"&&ue,L.domain=he?fe.domain:void 0,this._c.push(L),this._a&&this._a.push(L),this._s&&pe(this,!1),L.promise},catch:function(ee){return this.then(void 0,ee)}}),F=function(){var ee=new o;this.promise=ee,this.resolve=f(ie,ee,1),this.reject=f(oe,ee,1)}),E(E.G+E.W+E.F*!K,{Promise:P}),i(18)(P,O),i(59)(O),u=i(6)[O],E(E.S+E.F*!K,O,{reject:function(ee){var ue=ae(this),L=ue.reject;return L(ee),ue.promise}}),E(E.S+E.F*(l||!K),O,{resolve:function(ee){if(ee instanceof P&&V(ee.constructor,this))return ee;var ue=ae(this),L=ue.resolve;return L(ee),ue.promise}}),E(E.S+E.F*!(K&&i(46)(function(ee){P.all(ee).catch(me)})),O,{all:function(ee){var ue=this,L=ae(ue),U=L.resolve,D=L.reject,R=Z(function(){var $=[],A=0,J=1;y(ee,!1,function(Q){var ne=A++,se=!1;$.push(void 0),J++,ue.resolve(Q).then(function(Te){se||(se=!0,$[ne]=Te,--J||U($))},D)}),--J||U($)});return R&&D(R.error),L.promise},race:function(ee){var ue=this,L=ae(ue),U=L.reject,D=Z(function(){y(ee,!1,function(R){ue.resolve(R).then(L.resolve,U)})});return D&&U(D.error),L.promise}})},function(t,n,i){"use strict";var o=i(61)(!0);i(27)(String,"String",function(s){this._t=String(s),this._i=0},function(){var s,u=this._t,l=this._i;return l>=u.length?{value:void 0,done:!0}:(s=o(u,l),this._i+=s.length,{value:s,done:!1})})},function(t,n,i){i(65);for(var o=i(2),s=i(5),u=i(10),l=i(1)("toStringTag"),d=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],f=0;f<5;f++){var h=d[f],E=o[h],S=E&&E.prototype;S&&!S[l]&&s(S,l,h),u[h]=u.Array}},function(t,n){t.exports=require("child_process")},function(t,n){t.exports=require("crypto")}])})});var but=G((_4a,Ina)=>{Ina.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 fut=P_(vte()),QG=P_(require("os")),mut=P_(Ite());var o7t=P_(vte());var zor=P_(require("crypto")),Ste=new Uint8Array(256),Ete=Ste.length;function H6e(){return Ete>Ste.length-16&&(zor.default.randomFillSync(Ste),Ete=0),Ste.slice(Ete,Ete+=16)}var Qh=[];for(let e=0;e<256;++e)Qh.push((e+256).toString(16).slice(1));function $or(e,r=0){return Qh[e[r+0]]+Qh[e[r+1]]+Qh[e[r+2]]+Qh[e[r+3]]+"-"+Qh[e[r+4]]+Qh[e[r+5]]+"-"+Qh[e[r+6]]+Qh[e[r+7]]+"-"+Qh[e[r+8]]+Qh[e[r+9]]+"-"+Qh[e[r+10]]+Qh[e[r+11]]+Qh[e[r+12]]+Qh[e[r+13]]+Qh[e[r+14]]+Qh[e[r+15]]}var Hor=P_(require("crypto")),Z6e={randomUUID:Hor.default.randomUUID};function s7t(e,r,t){if(Z6e.randomUUID&&!r&&!e)return Z6e.randomUUID();e=e||{};let n=e.random||(e.rng||H6e)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(let i=0;i<16;++i)r[t+i]=n[i];return r}return $or(n)}var xx=s7t;var Vrr=P_(bA());var uut=P_(cut()),fbe=P_(bA()),vna="machineId",yna=()=>{try{return(0,uut.machineIdSync)()}catch{return xx()}},lut=()=>fbe.CachedConf.getCache(fbe.CONFIG_PROJECT_NAME).cached(vna,yna);var bna=P_(bA()),mbe=class{errors;constructor(r){this.errors=r}getErrors(){return this.errors}};var gut=require("url"),dut=e=>e;function put(e){try{return mut.EcosystemAppAri.parse(e).appId}catch{return}}var gbe=class{constructor(r,t,n){this.storage=r;this.logger=t;this.configService=n}source="forge/cli";reportSuccess(r,t,n){this.processAnalyticsEvent({id:xx(),eventType:"track",event:{timestamp:new Date,os:{name:QG.platform(),version:QG.release()},...this._getUserId(t),trackEvent:{source:this.source,action:"invoked",actionSubject:r,attributes:this._getAttributes(n),containers:this._getContainer(n)}}})}reportFailure(r,t,n,i){n={...n,...this._getErrorDetails(i)},this.reportOperationalEvent("invoked",r,t,n)}reportCommandInvoke(r,t,n){this.reportOperationalEvent("cmdInvoked",r,t,n)}reportInvokeFailure(r,t,n,i){i&&(n={...n,...this._getErrorListDetails(i)}),this.reportOperationalEvent("cmdInvokeFailed",r,t,n)}reportOperationalEvent(r,t,n,i){this.processAnalyticsEvent({id:xx(),eventType:"operational",event:{timestamp:new Date,os:{name:QG.platform(),version:QG.release()},...this._getUserId(n),operationalEvent:{source:this.source,action:r,actionSubject:t,attributes:{...this._getAttributes(i)},containers:this._getContainer(i)}}})}processAnalyticsEvent(r){this.configService.getAnalyticsPreferences()!==!1&&(process.env.FORGE_DEV_DOCKER_TUNNEL||process.env.FORGE_DEV_TUNNEL?this.logger.trace(`
|
|
10124
|
+
`)[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return B.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":return B.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"freebsd":return B.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}function d(B){var O=l((0,S.execSync)(w[y]).toString());return B?O:u(O)}function f(B){return new E.default(function(O,W){return(0,S.exec)(w[y],{},function(P,fe,he){if(P)return W(new Error("Error while obtaining machine id: "+P.stack));var me=l(fe.toString());return O(B?me:u(me))})})}Object.defineProperty(n,"__esModule",{value:!0});var h=i(35),E=o(h);n.machineIdSync=d,n.machineId=f;var S=i(70),T=i(71),v=process,y=v.platform,x={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},w={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:x[s()]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(t,n,i){t.exports={default:i(36),__esModule:!0}},function(t,n,i){i(66),i(68),i(69),i(67),t.exports=i(6).Promise},function(t,n){t.exports=function(){}},function(t,n){t.exports=function(i,o,s,u){if(!(i instanceof o)||u!==void 0&&u in i)throw TypeError(s+": incorrect invocation!");return i}},function(t,n,i){var o=i(13),s=i(31),u=i(62);t.exports=function(l){return function(d,f,h){var E,S=o(d),T=s(S.length),v=u(h,T);if(l&&f!=f){for(;T>v;)if(E=S[v++],E!=E)return!0}else for(;T>v;v++)if((l||v in S)&&S[v]===f)return l||v||0;return!l&&-1}}},function(t,S,i){var o=i(7),s=i(44),u=i(43),l=i(3),d=i(31),f=i(64),h={},E={},S=t.exports=function(T,v,y,x,w){var B,O,W,P,fe=w?function(){return T}:f(T),he=o(y,x,v?2:1),me=0;if(typeof fe!="function")throw TypeError(T+" is not iterable!");if(u(fe)){for(B=d(T.length);B>me;me++)if(P=v?he(l(O=T[me])[0],O[1]):he(T[me]),P===h||P===E)return P}else for(W=fe.call(T);!(O=W.next()).done;)if(P=s(W,he,O.value,v),P===h||P===E)return P};S.BREAK=h,S.RETURN=E},function(t,n){t.exports=function(i,o,s){var u=s===void 0;switch(o.length){case 0:return u?i():i.call(s);case 1:return u?i(o[0]):i.call(s,o[0]);case 2:return u?i(o[0],o[1]):i.call(s,o[0],o[1]);case 3:return u?i(o[0],o[1],o[2]):i.call(s,o[0],o[1],o[2]);case 4:return u?i(o[0],o[1],o[2],o[3]):i.call(s,o[0],o[1],o[2],o[3])}return i.apply(s,o)}},function(t,n,i){var o=i(11);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return o(s)=="String"?s.split(""):Object(s)}},function(t,n,i){var o=i(10),s=i(1)("iterator"),u=Array.prototype;t.exports=function(l){return l!==void 0&&(o.Array===l||u[s]===l)}},function(t,n,i){var o=i(3);t.exports=function(s,u,l,d){try{return d?u(o(l)[0],l[1]):u(l)}catch(h){var f=s.return;throw f!==void 0&&o(f.call(s)),h}}},function(t,n,i){"use strict";var o=i(49),s=i(17),u=i(18),l={};i(5)(l,i(1)("iterator"),function(){return this}),t.exports=function(d,f,h){d.prototype=o(l,{next:s(1,h)}),u(d,f+" Iterator")}},function(t,n,i){var o=i(1)("iterator"),s=!1;try{var u=[7][o]();u.return=function(){s=!0},Array.from(u,function(){throw 2})}catch{}t.exports=function(l,d){if(!d&&!s)return!1;var f=!1;try{var h=[7],E=h[o]();E.next=function(){return{done:f=!0}},h[o]=function(){return E},l(h)}catch{}return f}},function(t,n){t.exports=function(i,o){return{value:o,done:!!i}}},function(t,n,i){var o=i(2),s=i(30).set,u=o.MutationObserver||o.WebKitMutationObserver,l=o.process,d=o.Promise,f=i(11)(l)=="process";t.exports=function(){var h,E,S,T=function(){var w,B;for(f&&(w=l.domain)&&w.exit();h;){B=h.fn,h=h.next;try{B()}catch(O){throw h?S():E=void 0,O}}E=void 0,w&&w.enter()};if(f)S=function(){l.nextTick(T)};else if(u){var v=!0,y=document.createTextNode("");new u(T).observe(y,{characterData:!0}),S=function(){y.data=v=!v}}else if(d&&d.resolve){var x=d.resolve();S=function(){x.then(T)}}else S=function(){s.call(o,T)};return function(w){var B={fn:w,next:void 0};E&&(E.next=B),h||(h=B,S()),E=B}}},function(t,n,i){var o=i(3),s=i(50),u=i(22),l=i(19)("IE_PROTO"),d=function(){},f="prototype",h=function(){var E,S=i(16)("iframe"),T=u.length,v=">";for(S.style.display="none",i(25).appendChild(S),S.src="javascript:",E=S.contentWindow.document,E.open(),E.write("<script>document.F=Object</script"+v),E.close(),h=E.F;T--;)delete h[f][u[T]];return h()};t.exports=Object.create||function(E,S){var T;return E!==null?(d[f]=o(E),T=new d,d[f]=null,T[l]=E):T=h(),S===void 0?T:s(T,S)}},function(t,n,i){var o=i(12),s=i(3),u=i(54);t.exports=i(4)?Object.defineProperties:function(l,d){s(l);for(var f,h=u(d),E=h.length,S=0;E>S;)o.f(l,f=h[S++],d[f]);return l}},function(t,n,i){var o=i(55),s=i(17),u=i(13),l=i(32),d=i(8),f=i(26),h=Object.getOwnPropertyDescriptor;n.f=i(4)?h:function(E,S){if(E=u(E),S=l(S,!0),f)try{return h(E,S)}catch{}if(d(E,S))return s(!o.f.call(E,S),E[S])}},function(t,n,i){var o=i(8),s=i(63),u=i(19)("IE_PROTO"),l=Object.prototype;t.exports=Object.getPrototypeOf||function(d){return d=s(d),o(d,u)?d[u]:typeof d.constructor=="function"&&d instanceof d.constructor?d.constructor.prototype:d instanceof Object?l:null}},function(t,n,i){var o=i(8),s=i(13),u=i(39)(!1),l=i(19)("IE_PROTO");t.exports=function(d,f){var h,E=s(d),S=0,T=[];for(h in E)h!=l&&o(E,h)&&T.push(h);for(;f.length>S;)o(E,h=f[S++])&&(~u(T,h)||T.push(h));return T}},function(t,n,i){var o=i(53),s=i(22);t.exports=Object.keys||function(u){return o(u,s)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,i){var o=i(5);t.exports=function(s,u,l){for(var d in u)l&&s[d]?s[d]=u[d]:o(s,d,u[d]);return s}},function(t,n,i){t.exports=i(5)},function(t,n,i){var o=i(9),s=i(3),u=function(l,d){if(s(l),!o(d)&&d!==null)throw TypeError(d+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(l,d,f){try{f=i(7)(Function.call,i(51).f(Object.prototype,"__proto__").set,2),f(l,[]),d=!(l instanceof Array)}catch{d=!0}return function(h,E){return u(h,E),d?h.__proto__=E:f(h,E),h}}({},!1):void 0),check:u}},function(t,n,i){"use strict";var o=i(2),s=i(6),u=i(12),l=i(4),d=i(1)("species");t.exports=function(f){var h=typeof s[f]=="function"?s[f]:o[f];l&&h&&!h[d]&&u.f(h,d,{configurable:!0,get:function(){return this}})}},function(t,n,i){var o=i(3),s=i(14),u=i(1)("species");t.exports=function(l,d){var f,h=o(l).constructor;return h===void 0||(f=o(h)[u])==null?d:s(f)}},function(t,n,i){var o=i(20),s=i(15);t.exports=function(u){return function(l,d){var f,h,E=String(s(l)),S=o(d),T=E.length;return S<0||S>=T?u?"":void 0:(f=E.charCodeAt(S),f<55296||f>56319||S+1===T||(h=E.charCodeAt(S+1))<56320||h>57343?u?E.charAt(S):f:u?E.slice(S,S+2):(f-55296<<10)+(h-56320)+65536)}}},function(t,n,i){var o=i(20),s=Math.max,u=Math.min;t.exports=function(l,d){return l=o(l),l<0?s(l+d,0):u(l,d)}},function(t,n,i){var o=i(15);t.exports=function(s){return Object(o(s))}},function(t,n,i){var o=i(21),s=i(1)("iterator"),u=i(10);t.exports=i(6).getIteratorMethod=function(l){if(l!=null)return l[s]||l["@@iterator"]||u[o(l)]}},function(t,n,i){"use strict";var o=i(37),s=i(47),u=i(10),l=i(13);t.exports=i(27)(Array,"Array",function(d,f){this._t=l(d),this._i=0,this._k=f},function(){var d=this._t,f=this._k,h=this._i++;return!d||h>=d.length?(this._t=void 0,s(1)):f=="keys"?s(0,h):f=="values"?s(0,d[h]):s(0,[h,d[h]])},"values"),u.Arguments=u.Array,o("keys"),o("values"),o("entries")},function(t,n){},function(t,n,i){"use strict";var o,s,u,l=i(28),d=i(2),f=i(7),h=i(21),E=i(23),S=i(9),T=(i(3),i(14)),v=i(38),y=i(40),x=(i(58).set,i(60)),w=i(30).set,B=i(48)(),O="Promise",W=d.TypeError,fe=d.process,P=d[O],fe=d.process,he=h(fe)=="process",me=function(){},K=!!function(){try{var ee=P.resolve(1),ue=(ee.constructor={})[i(1)("species")]=function(L){L(me,me)};return(he||typeof PromiseRejectionEvent=="function")&&ee.then(me)instanceof ue}catch{}}(),V=function(ee,ue){return ee===ue||ee===P&&ue===u},re=function(ee){var ue;return!(!S(ee)||typeof(ue=ee.then)!="function")&&ue},ae=function(ee){return V(P,ee)?new F(ee):new s(ee)},F=s=function(ee){var ue,L;this.promise=new ee(function(U,D){if(ue!==void 0||L!==void 0)throw W("Bad Promise constructor");ue=U,L=D}),this.resolve=T(ue),this.reject=T(L)},Z=function(ee){try{ee()}catch(ue){return{error:ue}}},pe=function(ee,ue){if(!ee._n){ee._n=!0;var L=ee._c;B(function(){for(var U=ee._v,D=ee._s==1,R=0,$=function(A){var J,Q,ne=D?A.ok:A.fail,se=A.resolve,Te=A.reject,Ae=A.domain;try{ne?(D||(ee._h==2&&z(ee),ee._h=1),ne===!0?J=U:(Ae&&Ae.enter(),J=ne(U),Ae&&Ae.exit()),J===A.promise?Te(W("Promise-chain cycle")):(Q=re(J))?Q.call(J,se,Te):se(J)):Te(U)}catch(Pe){Te(Pe)}};L.length>R;)$(L[R++]);ee._c=[],ee._n=!1,ue&&!ee._h&&Y(ee)})}},Y=function(ee){w.call(d,function(){var ue,L,U,D=ee._v;if(H(ee)&&(ue=Z(function(){he?fe.emit("unhandledRejection",D,ee):(L=d.onunhandledrejection)?L({promise:ee,reason:D}):(U=d.console)&&U.error&&U.error("Unhandled promise rejection",D)}),ee._h=he||H(ee)?2:1),ee._a=void 0,ue)throw ue.error})},H=function(ee){if(ee._h==1)return!1;for(var ue,L=ee._a||ee._c,U=0;L.length>U;)if(ue=L[U++],ue.fail||!H(ue.promise))return!1;return!0},z=function(ee){w.call(d,function(){var ue;he?fe.emit("rejectionHandled",ee):(ue=d.onrejectionhandled)&&ue({promise:ee,reason:ee._v})})},oe=function(ee){var ue=this;ue._d||(ue._d=!0,ue=ue._w||ue,ue._v=ee,ue._s=2,ue._a||(ue._a=ue._c.slice()),pe(ue,!0))},ie=function(ee){var ue,L=this;if(!L._d){L._d=!0,L=L._w||L;try{if(L===ee)throw W("Promise can't be resolved itself");(ue=re(ee))?B(function(){var U={_w:L,_d:!1};try{ue.call(ee,f(ie,U,1),f(oe,U,1))}catch(D){oe.call(U,D)}}):(L._v=ee,L._s=1,pe(L,!1))}catch(U){oe.call({_w:L,_d:!1},U)}}};K||(P=function(ee){v(this,P,O,"_h"),T(ee),o.call(this);try{ee(f(ie,this,1),f(oe,this,1))}catch(ue){oe.call(this,ue)}},o=function(ee){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},o.prototype=i(56)(P.prototype,{then:function(ee,ue){var L=ae(x(this,P));return L.ok=typeof ee!="function"||ee,L.fail=typeof ue=="function"&&ue,L.domain=he?fe.domain:void 0,this._c.push(L),this._a&&this._a.push(L),this._s&&pe(this,!1),L.promise},catch:function(ee){return this.then(void 0,ee)}}),F=function(){var ee=new o;this.promise=ee,this.resolve=f(ie,ee,1),this.reject=f(oe,ee,1)}),E(E.G+E.W+E.F*!K,{Promise:P}),i(18)(P,O),i(59)(O),u=i(6)[O],E(E.S+E.F*!K,O,{reject:function(ee){var ue=ae(this),L=ue.reject;return L(ee),ue.promise}}),E(E.S+E.F*(l||!K),O,{resolve:function(ee){if(ee instanceof P&&V(ee.constructor,this))return ee;var ue=ae(this),L=ue.resolve;return L(ee),ue.promise}}),E(E.S+E.F*!(K&&i(46)(function(ee){P.all(ee).catch(me)})),O,{all:function(ee){var ue=this,L=ae(ue),U=L.resolve,D=L.reject,R=Z(function(){var $=[],A=0,J=1;y(ee,!1,function(Q){var ne=A++,se=!1;$.push(void 0),J++,ue.resolve(Q).then(function(Te){se||(se=!0,$[ne]=Te,--J||U($))},D)}),--J||U($)});return R&&D(R.error),L.promise},race:function(ee){var ue=this,L=ae(ue),U=L.reject,D=Z(function(){y(ee,!1,function(R){ue.resolve(R).then(L.resolve,U)})});return D&&U(D.error),L.promise}})},function(t,n,i){"use strict";var o=i(61)(!0);i(27)(String,"String",function(s){this._t=String(s),this._i=0},function(){var s,u=this._t,l=this._i;return l>=u.length?{value:void 0,done:!0}:(s=o(u,l),this._i+=s.length,{value:s,done:!1})})},function(t,n,i){i(65);for(var o=i(2),s=i(5),u=i(10),l=i(1)("toStringTag"),d=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],f=0;f<5;f++){var h=d[f],E=o[h],S=E&&E.prototype;S&&!S[l]&&s(S,l,h),u[h]=u.Array}},function(t,n){t.exports=require("child_process")},function(t,n){t.exports=require("crypto")}])})});var but=G((_4a,Ina)=>{Ina.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 fut=P_(vte()),QG=P_(require("os")),mut=P_(Ite());var o7t=P_(vte());var zor=P_(require("crypto")),Ste=new Uint8Array(256),Ete=Ste.length;function H6e(){return Ete>Ste.length-16&&(zor.default.randomFillSync(Ste),Ete=0),Ste.slice(Ete,Ete+=16)}var Qh=[];for(let e=0;e<256;++e)Qh.push((e+256).toString(16).slice(1));function $or(e,r=0){return Qh[e[r+0]]+Qh[e[r+1]]+Qh[e[r+2]]+Qh[e[r+3]]+"-"+Qh[e[r+4]]+Qh[e[r+5]]+"-"+Qh[e[r+6]]+Qh[e[r+7]]+"-"+Qh[e[r+8]]+Qh[e[r+9]]+"-"+Qh[e[r+10]]+Qh[e[r+11]]+Qh[e[r+12]]+Qh[e[r+13]]+Qh[e[r+14]]+Qh[e[r+15]]}var Hor=P_(require("crypto")),Z6e={randomUUID:Hor.default.randomUUID};function s7t(e,r,t){if(Z6e.randomUUID&&!r&&!e)return Z6e.randomUUID();e=e||{};let n=e.random||(e.rng||H6e)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(let i=0;i<16;++i)r[t+i]=n[i];return r}return $or(n)}var xx=s7t;var Vrr=P_(bA());var uut=P_(cut()),fbe=P_(bA()),vna="machineId",yna=()=>{try{return(0,uut.machineIdSync)()}catch{return xx()}},lut=()=>fbe.CachedConf.getCache(fbe.CONFIG_PROJECT_NAME).cached(vna,yna);var bna=P_(bA()),mbe=class{errors;constructor(r){this.errors=r}getErrors(){return this.errors}};var gut=require("url"),dut=e=>e;function put(e){try{return mut.EcosystemAppAri.parse(e).appId}catch{return}}var gbe=class{constructor(r,t,n){this.storage=r;this.logger=t;this.configService=n}source="forge/cli";reportSuccess(r,t,n){this.processAnalyticsEvent({id:xx(),eventType:"track",event:{timestamp:new Date,os:{name:QG.platform(),version:QG.release()},...this._getUserId(t),trackEvent:{source:this.source,action:"invoked",actionSubject:r,attributes:this._getAttributes(n),containers:this._getContainer(n)}}})}reportFailure(r,t,n,i){n={...n,...this._getErrorDetails(i)},this.reportOperationalEvent("invoked",r,t,n)}reportCommandInvoke(r,t,n){this.reportOperationalEvent("cmdInvoked",r,t,n)}reportInvokeFailure(r,t,n,i){i&&(n={...n,...this._getErrorListDetails(i)}),this.reportOperationalEvent("cmdInvokeFailed",r,t,n)}reportOperationalEvent(r,t,n,i){this.processAnalyticsEvent({id:xx(),eventType:"operational",event:{timestamp:new Date,os:{name:QG.platform(),version:QG.release()},...this._getUserId(n),operationalEvent:{source:this.source,action:r,actionSubject:t,attributes:{...this._getAttributes(i)},containers:this._getContainer(i)}}})}processAnalyticsEvent(r){this.configService.getAnalyticsPreferences()!==!1&&(process.env.FORGE_DEV_DOCKER_TUNNEL||process.env.FORGE_DEV_TUNNEL?this.logger.trace(`
|
|
10125
10125
|
Analytics event: ${JSON.stringify(r,null,2)}`):this.storage.addAnalyticsEvent(r))}_getUserId(r){return typeof r=="string"?{anonymousId:r}:{userIdType:fut.userTypes.ATLASSIAN_ACCOUNT,userId:r.accountId}}_getErrorDetails(r){return r instanceof Vrr.GraphQlMutationError?{error:r.getCode()}:{error:r.constructor.name}}_getErrorListDetails(r){let t=[];return(r instanceof mbe?r.getErrors():[r]).forEach(i=>{i instanceof Vrr.GraphQlMutationError?t.push(i.getCode()):t.push(i.constructor.name)}),{error:t.join(",")}}_asContainer(r,t,n,i=dut){let o=i(r);return o?{[t]:{id:o,type:n}}:void 0}_nodeVersion(){return{node:process.version}}_machineId(){return{machineId:lut()}}_asAttribute(r,t,n=dut){let i=n(r);return i?{[t]:i}:{}}_getAttributes(r){return{...r,...this._asAttribute(r.appId,"appId",put),...this._nodeVersion(),...this._machineId()}}_getContainer(r){return{...this._asContainer(r.appId,"app","appId",put),...this._asContainer(r.appEnv,"appEnv","environment"),...this._asContainer(r.product,"product","product")}}static formatValue(r){return r instanceof gut.URL?r.href.toString():typeof r=="string"?r:r===void 0?"undefined":JSON.stringify(r)}};var V6=P_(bA());var _be=P_(require("path")),QT=P_(require("fs")),_ut=P_(Xer()),hut=P_(iye()),hbe=class e{static STORAGE_PATHS=(0,_ut.default)("forge-cli");static FOLDER=e.STORAGE_PATHS.data;constructor(){QT.existsSync(e.FOLDER)||(0,hut.mkdirpSync)(e.FOLDER)}addAnalyticsEvent(r){try{QT.writeFileSync(_be.default.join(e.FOLDER,`${r.id}.json`),JSON.stringify(r))}catch{}}async getAnalyticsEvent(r){try{let t=await QT.promises.readFile(_be.default.join(e.FOLDER,r),{encoding:"utf8"}),n=JSON.parse(t);return n.event.timestamp=new Date(n.event.timestamp),n}catch{return}}getAnalytics(){try{return QT.readdirSync(e.FOLDER).filter(r=>r.endsWith(".json"))}catch{return[]}}async deleteAnalyticsEvent(r){try{await QT.promises.unlink(_be.default.join(e.FOLDER,r))}catch{}}};var vut=P_(_er()),yut=P_(require("path")),vbe=class{constructor(r){let t="node",n="./forge-cli-workers.js";process.env.NODE_ENV=="development"&&(t="ts-node",n="./forge-cli-workers.ts"),(0,vut.spawn)(t,[yut.default.join(__dirname,n),JSON.stringify(r||"")],{detached:!0,stdio:"ignore"}).unref()}};var Iut=P_(bA()),Ena="latest",h4a=1e3*60*60*24,Eut=()=>{try{let e=but(),t=Iut.CachedConf.getCache(e.name).get(Ena);return{name:e.name,version:e.version,latest:t,compatibleNodeVersion:e.engines.node}}catch{return}},Sut=[18,20,22],y4a=Sut.map(e=>`${e}.x`).join(" || "),b4a=Sut.map(e=>`${e}.x`).join(", ").replace(/^(.*)?,\s(.*)$/g,"$1 or $2");var ybe=P_(bA()),Sna="anonId";function Aut(e=!1){return ybe.CachedConf.getCache(ybe.CONFIG_PROJECT_NAME).cached(Sna,()=>{if(e)return xx()})}function Cut(){let e=process.env.SHELL;return e?/bash/.test(e)||/zsh/.test(e)||/fish/.test(e):!1}var Tut="analytics-preferences",xut="default-environment",bbe=class{constructor(r){this.cachedConf=r}getAnalyticsPreferences(){return process.env.FORGE_DISABLE_ANALYTICS?!1:this.cachedConf.get(Tut)}setAnalyticsPreferences(r){this.cachedConf.set(Tut,r)}getDefaultEnvironments(){return this.cachedConf.get(xut)||{}}getDefaultEnvironment(r){return this.getDefaultEnvironments()[r]}setDefaultEnvironment(r,t){let n=this.getDefaultEnvironments();n[r]=t,this.cachedConf.set(xut,n)}};var Dut=new V6.CommandLineUI(()=>!0),Ana=V6.CachedConf.getCache(V6.CONFIG_PROJECT_NAME),Cna=new bbe(Ana),Tna=new gbe(new hbe,Dut,Cna),Grr=Eut(),xna={version:Grr==null?void 0:Grr.version},Dna=Aut(!0);Tna.reportSuccess("postinstall",Dna,xna);Cut()&&Dut.info(V6.Text.autocomplete.postinstall);new vbe(void 0);
|
|
10126
10126
|
/*! For license information please see index.js.LICENSE.txt */
|
|
10127
10127
|
/*! Bundled license information:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "11.5.0-next.2-experimental-
|
|
3
|
+
"version": "11.5.0-next.2-experimental-9b8de22",
|
|
4
4
|
"description": "A command line interface for managing Atlassian-hosted apps",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"@babel/plugin-transform-optional-chaining": "^7.23.4",
|
|
30
30
|
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
31
31
|
"@babel/preset-typescript": "^7.23.3",
|
|
32
|
-
"@forge/bundler": "4.23.1-next.1-experimental-
|
|
33
|
-
"@forge/cli-shared": "6.10.1-next.1-experimental-
|
|
32
|
+
"@forge/bundler": "4.23.1-next.1-experimental-9b8de22",
|
|
33
|
+
"@forge/cli-shared": "6.10.1-next.1-experimental-9b8de22",
|
|
34
34
|
"@forge/babel-plugin-transform-ui": "1.1.21",
|
|
35
35
|
"@forge/egress": "1.4.0",
|
|
36
|
-
"@forge/lint": "5.7.6-next.1-experimental-
|
|
37
|
-
"@forge/manifest": "9.3.0-next.1-experimental-
|
|
36
|
+
"@forge/lint": "5.7.6-next.1-experimental-9b8de22",
|
|
37
|
+
"@forge/manifest": "9.3.0-next.1-experimental-9b8de22",
|
|
38
38
|
"@forge/runtime": "5.10.7",
|
|
39
|
-
"@forge/tunnel": "5.10.4-next.1-experimental-
|
|
39
|
+
"@forge/tunnel": "5.10.4-next.1-experimental-9b8de22",
|
|
40
40
|
"@forge/util": "1.4.8",
|
|
41
41
|
"@sentry/node": "7.106.0",
|
|
42
42
|
"@forge/i18n": "0.0.5",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"exponential-backoff": "^3.1.1",
|
|
57
57
|
"form-data": "^4.0.0",
|
|
58
58
|
"fs-extra": "^11.2.0",
|
|
59
|
+
"headers-utils": "^3.0.2",
|
|
59
60
|
"hidefile": "^3.0.0",
|
|
60
61
|
"latest-version": "^7.0.0",
|
|
61
62
|
"lodash": "^4.17.21",
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
"semver": "^7.6.0",
|
|
69
70
|
"tmp": "^0.2.3",
|
|
70
71
|
"tslib": "^2.6.2",
|
|
72
|
+
"readable-stream": "^4.5.2",
|
|
71
73
|
"uuid": "^9.0.1",
|
|
72
74
|
"v8-compile-cache": "^2.4.0"
|
|
73
75
|
},
|
|
@@ -105,4 +107,4 @@
|
|
|
105
107
|
"publishConfig": {
|
|
106
108
|
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
|
|
107
109
|
}
|
|
108
|
-
}
|
|
110
|
+
}
|
|
@@ -10208,7 +10208,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof Yv))r
|
|
|
10208
10208
|
`+a),e.push(i+"m+"+N5e.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=hMo()+t+" "+e[0]}function hMo(){return G1.inspectOpts.hideDate?"":new Date().toISOString()+" "}function _Mo(){return process.stderr.write(O5e.format.apply(O5e,arguments)+`
|
|
10209
10209
|
`)}function vMo(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function yMo(){return process.env.DEBUG}function bMo(e){e.inspectOpts={};for(var t=Object.keys(G1.inspectOpts),r=0;r<t.length;r++)e.inspectOpts[t[r]]=G1.inspectOpts[t[r]]}N5e.exports=R6t()(G1);var dtn=N5e.exports.formatters;dtn.o=function(e){return this.inspectOpts.colors=this.useColors,O5e.inspect(e,this.inspectOpts).split(`
|
|
10210
10210
|
`).map(function(t){return t.trim()}).join(" ")};dtn.O=function(e){return this.inspectOpts.colors=this.useColors,O5e.inspect(e,this.inspectOpts)}});var ftn=P((sCs,k6t)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?k6t.exports=ltn():k6t.exports=ptn()});var _tn=P((uCs,htn)=>{var Hpe=require("path"),mtn=require("fs"),gtn=parseInt("0777",8);htn.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||mtn;i===void 0&&(i=gtn),n||(n=null);var s=r||function(){};e=Hpe.resolve(e),a.mkdir(e,i,function(u){if(!u)return n=n||e,s(null,n);switch(u.code){case"ENOENT":if(Hpe.dirname(e)===e)return s(u);KX(Hpe.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||mtn;i===void 0&&(i=gtn),n||(n=null),t=Hpe.resolve(t);try{a.mkdirSync(t,i),n=n||t}catch(u){switch(u.code){case"ENOENT":n=e(Hpe.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 q6t=P(af=>{"use strict";var vtn=require("fs"),SMo=require("os"),IMo=require("net"),P5e=require("path"),ytn=otn(),M6t=ftn(),EMo=_tn().mkdirp,L6t=M6t("portfinder:testPort"),Jpe=M6t("portfinder:getPort"),AMo=M6t("portfinder:defaultHosts"),F6t={};F6t.testPort=function(e,t){t||(t=e,e={}),e.server=e.server||IMo.createServer(function(){}),L6t("entered testPort(): trying",e.host,"port",e.port);function r(){L6t("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(L6t("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"));F6t.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 ytn.eachSeries(af._defaultHosts,function(i,a){return Jpe("in eachSeries() iteration callback: host is",i),F6t.testPort({host:i,port:e.port},function(s,u){return s?(Jpe("in eachSeries() iteration callback testPort() callback","with an err:",s.code),n=i,a(s)):(Jpe("in eachSeries() iteration callback testPort() callback","with a success for port",u),r.push(u),a())})},function(i){if(i)if(Jpe("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}),Jpe("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;ytn.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(){vtn.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){EMo(a,e.mod,function(s){if(s)return t(s);e.exists=!0,r()})}function i(){var a=P5e.dirname(e.path);vtn.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=P5e.dirname(e),r=P5e.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,P5e.join(t,a+i+".sock")};af._defaultHosts=function(){var e={};try{e=SMo.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),AMo("exports._defaultHosts is: %o",n),n}()});var B6t=P((pCs,Atn)=>{"use strict";var Etn="Not a Windows platform",k5e=process.platform.startsWith("win"),xMo=e=>(!k5e&&typeof e=="function"&&e(new Error(Etn)),k5e),TMo=()=>{if(k5e)return k5e;throw new Error(Etn)};Atn.exports={async:xMo,sync:TMo}});var Ctn=P((fCs,Ttn)=>{"use strict";var L5e={archive:"IS_ARCHIVED",hidden:"IS_HIDDEN",readonly:"IS_READ_ONLY",system:"IS_SYSTEM"},xtn=(e,t)=>{let r={};return wMo(e,(n,i)=>{OMo((a,s)=>{if(t===!0){if(a===i)return r[s]=n,!1}else if(s===i)return r[a]=n,!1})}),r},CMo=e=>xtn(e,!0),DMo=e=>xtn(e,!1),wMo=(e,t)=>{for(let r in e)if(e.hasOwnProperty(r)&&t(e[r],r,e)===!1)break},OMo=e=>{for(let t in L5e)if(L5e.hasOwnProperty(t)&&e(L5e[t],t,L5e)===!1)break};Ttn.exports={from:CMo,to:DMo}});var wtn=P((mCs,Dtn)=>{"use strict";var F5e=require("fswin"),M5e=Ctn(),NMo=(e,t)=>{F5e.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,M5e.from(n))})},PMo=e=>{let t=F5e.getAttributesSync(e);if(t===null)throw new Error("unknown erorr");return M5e.from(t)},RMo=(e,t,r)=>{F5e.setAttributes(e,M5e.to(t),n=>{r(n===!0?null:new Error("unknown error"))})},kMo=(e,t)=>{if(F5e.setAttributesSync(e,M5e.to(t))===!1)throw new Error("unknown erorr")};Dtn.exports={get:NMo,getSync:PMo,set:RMo,setSync:kMo}});var Btn=P((gCs,qtn)=>{"use strict";var Ntn=require("child_process"),Otn={archive:"a",hidden:"h",readonly:"r",system:"s"},Ptn=e=>[`${__dirname}/hostscript.js`,e,"//nologo","//E:jscript"],Rtn=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}},ktn=(e,t)=>{let r=[];for(let n in t)t.hasOwnProperty(n)&&Otn.hasOwnProperty(n)&&r.push((t[n]===!0?"+":"-")+Otn[n]);return r.push(e),r},Ltn=e=>e.stdout.length<=0?null:new Error(e.stdout),Ftn=(e,t,r)=>{var n=Ntn.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})})},Mtn=(e,t)=>{var r=Ntn.spawnSync(e,t,{encoding:"utf8"});return r.stderr===null&&(r.stderr=""),r.stdout===null&&(r.stdout=""),r},LMo=(e,t)=>{Ftn("cscript",Ptn(e),function(r){r=Rtn(r),t(r.error,r.attrs)})},FMo=e=>{var t=Mtn("cscript",Ptn(e));if(t=Rtn(t),t.error!==null)throw t.error;return t.attrs},MMo=(e,t,r)=>{Ftn("attrib",ktn(e,t),function(n){r(Ltn(n))})},qMo=(e,t,r)=>{var n=Mtn("attrib",ktn(e,t));if(n=Ltn(n),n!==null)throw n};qtn.exports={get:LMo,getSync:FMo,set:MMo,setSync:qMo}});var Utn=P((hCs,jtn)=>{"use strict";var BMo=B6t(),oT={mode:null,binding:null,shell:null},j6t=(e,t)=>{if(BMo.async())switch(e){case"auto":case"binding":{if(oT.binding===null)try{oT.binding=wtn(),oT.mode="binding"}catch(r){if(t!==!0)oT.binding=null,j6t("shell");else throw r}else oT.mode="binding";break}case"shell":{oT.shell===null&&(oT.shell=Btn()),oT.mode="shell";break}}},jMo=()=>oT[oT.mode],UMo=e=>{let t;try{t=e()}catch(r){if(oT.mode==="binding"&&r.message==="The specified procedure could not be found.")j6t("shell"),t=e();else throw r}return t};jtn.exports={change:j6t,current:jMo,run:UMo}});var Wtn=P((_Cs,Vtn)=>{"use strict";var q5e=B6t(),{resolve:B5e}=require("path"),fw=Utn(),VMo=(e,t)=>{if(q5e.async(t))return fw.run(()=>fw.current().get(B5e(e),t))},WMo=e=>{if(q5e.sync())return fw.run(()=>fw.current().getSync(B5e(e)))},GMo=(e,t,r)=>{if(q5e.async(r))return fw.run(()=>fw.current().set(B5e(e),t,r))},zMo=(e,t)=>{if(q5e.sync())return fw.run(()=>fw.current().setSync(B5e(e),t))};fw.change("auto");Vtn.exports={get:VMo,getSync:WMo,set:GMo,setSync:zMo,change:fw.change}});var Ytn=P((vCs,Ktn)=>{"use strict";var ztn=require("fs"),U6t=require("path"),j5e=Wtn(),gk=process.platform.startsWith("win"),V6t=".",$tn=(e,t,r,n)=>{ztn.rename(e,t,i=>{i==null&&gk?j5e.set(t,r,a=>{Gtn(a,t,n)}):Gtn(i,t,n)})},Gtn=(e,t,r)=>{e==null?r(e,t):r(e)},Htn=(e,t,r)=>(ztn.renameSync(e,t),gk&&j5e.setSync(t,r),t),YX=e=>{let t=U6t.basename(e),r=U6t.dirname(e);return r==="."&&(r=""),{basename:t,dirname:r,prefixed:t[0]===V6t}},Jtn=(e,t)=>{let r={unix:YX(e).prefixed,windows:!1};gk?j5e.get(e,(n,i)=>{r.windows=n!=null?!1:i.hidden,t(n,r)}):t(null,r)},Ztn=e=>{let t={unix:YX(e).prefixed,windows:!1};return gk&&(t.windows=j5e.getSync(e).hidden),t},U5e=(e,t)=>{let r="";return e.basename!==""&&(t&&!e.prefixed?r=V6t+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},$Mo=(e,t)=>{let r=U5e(YX(e),!0);$tn(e,r,{hidden:!0},t)},HMo=e=>{let t=U5e(YX(e),!0);return Htn(e,t,{hidden:!0})},JMo=e=>U6t.basename(e)[0]===V6t,ZMo=(e,t)=>{Jtn(e,(r,n)=>{r==null?t(null,n.unix&&(n.windows&&gk||!gk)):t(r)})},KMo=(e,t)=>{let r=Ztn(e);return r.unix&&(r.windows&&gk||!gk)},YMo=(e,t)=>{let r=U5e(YX(e),!1);$tn(e,r,{hidden:!1},t)},QMo=(e,t)=>{let r=U5e(YX(e),!1);return Htn(e,r,{hidden:!1})},XMo=(e,t)=>{Jtn(e,(r,n)=>{r==null?t(null,n.unix||n.windows):t(r)})},eqo=(e,t)=>{let r=Ztn(e);return r.unix||r.windows};Ktn.exports={hide:$Mo,hideSync:HMo,isDotPrefixed:JMo,isHidden:ZMo,isHiddenSync:KMo,reveal:YMo,revealSync:QMo,shouldBeHidden:XMo,shouldBeHiddenSync:eqo}});var nrn=P((xCs,rrn)=>{var trn=require("stream").Stream,tqo=require("util");rrn.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=[]}tqo.inherits(sT,trn);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=trn.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 srn=P((TCs,orn)=>{var rqo=require("util"),arn=require("stream").Stream,irn=nrn();orn.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}rqo.inherits(s_,arn);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 irn)){var r=irn.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 arn.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 crn=P((CCs,urn)=>{urn.exports=nqo;function nqo(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var H6t=P((DCs,drn)=>{var lrn=crn();drn.exports=iqo;function iqo(e){var t=!1;return lrn(function(){t=!0}),function(n,i){t?e(n,i):lrn(function(){e(n,i)})}}});var J6t=P((wCs,prn)=>{prn.exports=aqo;function aqo(e){Object.keys(e.jobs).forEach(oqo.bind(e)),e.jobs={}}function oqo(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var Z6t=P((OCs,mrn)=>{var frn=H6t(),sqo=J6t();mrn.exports=uqo;function uqo(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=cqo(t,i,e[i],function(a,s){i in r.jobs&&(delete r.jobs[i],a?sqo(r):r.results[i]=s,n(a,r.results))})}function cqo(e,t,r,n){var i;return e.length==2?i=e(r,frn(n)):i=e(r,t,frn(n)),i}});var K6t=P((NCs,grn)=>{grn.exports=lqo;function lqo(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 Y6t=P((PCs,hrn)=>{var dqo=J6t(),pqo=H6t();hrn.exports=fqo;function fqo(e){Object.keys(this.jobs).length&&(this.index=this.size,dqo(this),pqo(e)(null,this.results))}});var vrn=P((RCs,_rn)=>{var mqo=Z6t(),gqo=K6t(),hqo=Y6t();_rn.exports=_qo;function _qo(e,t,r){for(var n=gqo(e);n.index<(n.keyedList||e).length;)mqo(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 hqo.bind(n,r)}});var Q6t=P((kCs,G5e)=>{var yrn=Z6t(),vqo=K6t(),yqo=Y6t();G5e.exports=bqo;G5e.exports.ascending=brn;G5e.exports.descending=Sqo;function bqo(e,t,r,n){var i=vqo(e,r);return yrn(e,t,i,function a(s,u){if(s){n(s,u);return}if(i.index++,i.index<(i.keyedList||e).length){yrn(e,t,i,a);return}n(null,i.results)}),yqo.bind(i,n)}function brn(e,t){return e<t?-1:e>t?1:0}function Sqo(e,t){return-1*brn(e,t)}});var Irn=P((LCs,Srn)=>{var Iqo=Q6t();Srn.exports=Eqo;function Eqo(e,t,r){return Iqo(e,t,null,r)}});var Arn=P((FCs,Ern)=>{Ern.exports={parallel:vrn(),serial:Irn(),serialOrdered:Q6t()}});var Trn=P((MCs,xrn)=>{xrn.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var wrn=P((qCs,Drn)=>{var rNt=srn(),Crn=require("util"),X6t=require("path"),Aqo=require("http"),xqo=require("https"),Tqo=require("url").parse,Cqo=require("fs"),Dqo=require("stream").Stream,eNt=Rot(),wqo=Arn(),tNt=Trn();Drn.exports=Lp;Crn.inherits(Lp,rNt);function Lp(e){if(!(this instanceof Lp))return new Lp(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],rNt.call(this),e=e||{};for(var t in e)this[t]=e[t]}Lp.LINE_BREAK=`\r
|
|
10211
|
-
`;Lp.DEFAULT_CONTENT_TYPE="application/octet-stream";Lp.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=rNt.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Crn.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 Dqo))&&(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)):Cqo.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"&&tNt(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=X6t.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=X6t.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=X6t.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=eNt.lookup(e.name)),!r&&e.path&&(r=eNt.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=eNt.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}wqo.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=Tqo(e),n=tNt({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=tNt(e,i),n.port||(n.port=n.protocol=="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol=="https:"?r=xqo.request(n):r=Aqo.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 krn=P(($Cs,Oqo)=>{Oqo.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(uNt=>{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}},sNt=class extends s9e{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};uNt.CommanderError=s9e;uNt.InvalidArgumentError=sNt});var u9e=P(lNt=>{var{InvalidArgumentError:Pqo}=Qpe(),cNt=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 Pqo(`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 Rqo(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}lNt.Argument=cNt;lNt.humanReadableArgName=Rqo});var pNt=P(enn=>{var{humanReadableArgName:kqo}=u9e(),dNt=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=>kqo(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(`
|
|
10211
|
+
`;Lp.DEFAULT_CONTENT_TYPE="application/octet-stream";Lp.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=rNt.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Crn.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 Dqo))&&(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)):Cqo.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"&&tNt(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=X6t.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=X6t.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=X6t.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=eNt.lookup(e.name)),!r&&e.path&&(r=eNt.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=eNt.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}wqo.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=Tqo(e),n=tNt({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=tNt(e,i),n.port||(n.port=n.protocol=="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol=="https:"?r=xqo.request(n):r=Aqo.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 krn=P(($Cs,Oqo)=>{Oqo.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(uNt=>{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}},sNt=class extends s9e{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};uNt.CommanderError=s9e;uNt.InvalidArgumentError=sNt});var u9e=P(lNt=>{var{InvalidArgumentError:Pqo}=Qpe(),cNt=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 Pqo(`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 Rqo(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}lNt.Argument=cNt;lNt.humanReadableArgName=Rqo});var pNt=P(enn=>{var{humanReadableArgName:kqo}=u9e(),dNt=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=>kqo(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(`
|
|
10212
10212
|
`).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(`
|
|
10213
10213
|
`)}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
|
|
10214
10214
|
`,`
|