diff --git a/js/dist-typings/components/ConfigureAuth.d.ts b/js/dist-typings/components/ConfigureAuth.d.ts index ca71f4a..5832ca6 100644 --- a/js/dist-typings/components/ConfigureAuth.d.ts +++ b/js/dist-typings/components/ConfigureAuth.d.ts @@ -6,5 +6,5 @@ export default class ConfigureAuth extends ConfigureJson { className(): string; content(): Mithril.Children; submitButton(): Mithril.Children[]; - onchange(type: string, host: string, token: string): void; + onchange(oldHost: string | null, type: string, host: string, token: string): void; } diff --git a/js/dist/admin.js b/js/dist/admin.js index 0929e8c..9c35160 100755 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var a={3:function(a){a.exports=function(){"use strict";var a,t,e=1e3,n=6e4,r=36e5,s=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,i=31536e6,l=2592e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:i,months:l,days:s,hours:r,minutes:n,seconds:e,milliseconds:1,weeks:6048e5},m=function(a){return a instanceof b},d=function(a,t,e){return new b(a,e,t.$l)},p=function(a){return t.p(a)+"s"},g=function(a){return a<0},f=function(a){return g(a)?Math.ceil(a):Math.floor(a)},h=function(a){return Math.abs(a)},k=function(a,t){return a?g(a)?{negative:!0,format:""+h(a)+t}:{negative:!1,format:""+a+t}:{negative:!1,format:""}},b=function(){function g(a,t,e){var n=this;if(this.$d={},this.$l=e,void 0===a&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(a*u[p(t)],this);if("number"==typeof a)return this.$ms=a,this.parseFromMilliseconds(),this;if("object"==typeof a)return Object.keys(a).forEach((function(t){n.$d[p(t)]=a[t]})),this.calMilliseconds(),this;if("string"==typeof a){var r=a.match(c);if(r){var s=r.slice(2).map((function(a){return null!=a?Number(a):0}));return this.$d.years=s[0],this.$d.months=s[1],this.$d.weeks=s[2],this.$d.days=s[3],this.$d.hours=s[4],this.$d.minutes=s[5],this.$d.seconds=s[6],this.calMilliseconds(),this}}return this}var h=g.prototype;return h.calMilliseconds=function(){var a=this;this.$ms=Object.keys(this.$d).reduce((function(t,e){return t+(a.$d[e]||0)*u[e]}),0)},h.parseFromMilliseconds=function(){var a=this.$ms;this.$d.years=f(a/i),a%=i,this.$d.months=f(a/l),a%=l,this.$d.days=f(a/s),a%=s,this.$d.hours=f(a/r),a%=r,this.$d.minutes=f(a/n),a%=n,this.$d.seconds=f(a/e),a%=e,this.$d.milliseconds=a},h.toISOString=function(){var a=k(this.$d.years,"Y"),t=k(this.$d.months,"M"),e=+this.$d.days||0;this.$d.weeks&&(e+=7*this.$d.weeks);var n=k(e,"D"),r=k(this.$d.hours,"H"),s=k(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var i=k(o,"S"),l=a.negative||t.negative||n.negative||r.negative||s.negative||i.negative,c=r.format||s.format||i.format?"T":"",u=(l?"-":"")+"P"+a.format+t.format+n.format+c+r.format+s.format+i.format;return"P"===u||"-P"===u?"P0D":u},h.toJSON=function(){return this.toISOString()},h.format=function(a){var e=a||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return e.replace(o,(function(a,t){return t||String(n[a])}))},h.as=function(a){return this.$ms/u[p(a)]},h.get=function(a){var t=this.$ms,e=p(a);return"milliseconds"===e?t%=1e3:t="weeks"===e?f(t/u[e]):this.$d[e],0===t?0:t},h.add=function(a,t,e){var n;return n=t?a*u[p(t)]:m(a)?a.$ms:d(a,this).$ms,d(this.$ms+n*(e?-1:1),this)},h.subtract=function(a,t){return this.add(a,t,!0)},h.locale=function(a){var t=this.clone();return t.$l=a,t},h.clone=function(){return d(this.$ms,this)},h.humanize=function(t){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},h.milliseconds=function(){return this.get("milliseconds")},h.asMilliseconds=function(){return this.as("milliseconds")},h.seconds=function(){return this.get("seconds")},h.asSeconds=function(){return this.as("seconds")},h.minutes=function(){return this.get("minutes")},h.asMinutes=function(){return this.as("minutes")},h.hours=function(){return this.get("hours")},h.asHours=function(){return this.as("hours")},h.days=function(){return this.get("days")},h.asDays=function(){return this.as("days")},h.weeks=function(){return this.get("weeks")},h.asWeeks=function(){return this.as("weeks")},h.months=function(){return this.get("months")},h.asMonths=function(){return this.as("months")},h.years=function(){return this.get("years")},h.asYears=function(){return this.as("years")},g}();return function(e,n,r){a=r,t=r().$utils(),r.duration=function(a,t){var e=r.locale();return d(a,{$l:e},t)},r.isDuration=m;var s=n.prototype.add,o=n.prototype.subtract;n.prototype.add=function(a,t){return m(a)&&(a=a.asMilliseconds()),s.bind(this)(a,t)},n.prototype.subtract=function(a,t){return m(a)&&(a=a.asMilliseconds()),o.bind(this)(a,t)}}}()}},t={};function e(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return a[n].call(s.exports,s,s.exports,e),s.exports}e.n=a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},e.d=(a,t)=>{for(var n in t)e.o(t,n)&&!e.o(a,n)&&Object.defineProperty(a,n,{enumerable:!0,get:t[n]})},e.o=(a,t)=>Object.prototype.hasOwnProperty.call(a,t),e.r=a=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var n={};(()=>{"use strict";e.r(n);const a=flarum.core.compat["common/extend"],t=flarum.core.compat["admin/app"];var r=e.n(t);const s=flarum.core.compat["admin/components/ExtensionPage"];var o=e.n(s);const i=flarum.core.compat["common/components/Button"];var l=e.n(i);const c=flarum.core.compat["admin/components/LoadingModal"];var u=e.n(c);const d=flarum.core.compat["admin/utils/isExtensionEnabled"];var p=e.n(d);function g(a,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,t){return a.__proto__=t,a},g(a,t)}function f(a,t){a.prototype=Object.create(t.prototype),a.prototype.constructor=a,g(a,t)}function h(a,t){if(null==a)return{};var e,n,r={},s=Object.keys(a);for(n=0;n=0||(r[e]=a[e]);return r}const k=flarum.core.compat["common/Component"];var b=e.n(k);const v=flarum.core.compat["common/components/LoadingIndicator"];var y=e.n(v);const _=flarum.core.compat["common/components/Tooltip"];var N=e.n(_);const x=flarum.core.compat["common/helpers/icon"];var M=e.n(x);const w=flarum.core.compat["common/utils/ItemList"];var P=e.n(w);const U=flarum.core.compat["common/utils/extractText"];var B=e.n(U);const S=flarum.core.compat["common/components/Link"];var q=e.n(S);const j=flarum.core.compat["common/utils/classList"];var $=e.n(j),T=["className","type"],C=function(a){function t(){return a.apply(this,arguments)||this}return f(t,a),t.prototype.view=function(a){var t=this.attrs,e=t.className,n=(t.type,h(t,T));return m("span",Object.assign({className:$()(["Label","Label--"+this.attrs.type,e])},n),a.children)},t}(b());const F=flarum.core.compat["common/components/Modal"];var O=e.n(F),L=function(a){function t(){return a.apply(this,arguments)||this}f(t,a);var e=t.prototype;return e.className=function(){return"Modal--large QuickModal"},e.title=function(){return r().translator.trans("flarum-package-manager.admin.sections.queue.operations."+this.attrs.task.operation())},e.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"TaskOutputModal-data"},m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-package-manager.admin.sections.queue.output_modal.guessed_cause")),m("div",{className:"FormControl TaskOutputModal-data-guessed-cause"},this.attrs.task.guessedCause()&&r().translator.trans("flarum-package-manager.admin.exceptions.guessed_cause."+this.attrs.task.guessedCause())||r().translator.trans("flarum-package-manager.admin.sections.queue.output_modal.cause_unknown"))),m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-package-manager.admin.sections.queue.output_modal.command")),m("div",{className:"FormControl TaskOutputModal-data-command"},m("code",null,"$ composer ",this.attrs.task.command()))),m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-package-manager.admin.sections.queue.output_modal.output")),m("div",{className:"FormControl TaskOutputModal-data-output"},m("code",null,m("pre",null,this.attrs.task.output()))))))},t}(O()),A=e(3),E=e.n(A),D=function(a){function t(){return a.apply(this,arguments)||this}return f(t,a),t.prototype.view=function(){var a=this;return m("nav",{className:"Pagination UserListPage-gridPagination"},m(l(),{disabled:!this.attrs.list.hasPrev(),title:r().translator.trans("core.admin.users.pagination.back_button"),onclick:function(){return a.attrs.list.prev()},icon:"fas fa-chevron-left",className:"Button Button--icon UserListPage-backBtn"}),m("span",{className:"UserListPage-pageNumber"},r().translator.trans("core.admin.users.pagination.page_counter",{current:this.attrs.list.pageNumber()+1,total:this.attrs.list.getTotalPages()})),m(l(),{disabled:!this.attrs.list.hasNext(),title:r().translator.trans("core.admin.users.pagination.next_button"),onclick:function(){return a.attrs.list.next()},icon:"fas fa-chevron-right",className:"Button Button--icon UserListPage-nextBtn"}))},t}(b()),Y=["label","content"],I=function(a){function t(){return a.apply(this,arguments)||this}f(t,a);var e=t.prototype;return e.oninit=function(t){a.prototype.oninit.call(this,t),r().packageManager.queue.load()},e.view=function(){return m("section",{id:"PackageManager-queueSection",className:"ExtensionPage-permissions PackageManager-queueSection"},m("div",{className:"ExtensionPage-permissions-header PackageManager-queueSection-header"},m("div",{className:"container"},m("h2",{className:"ExtensionTitle"},r().translator.trans("flarum-package-manager.admin.sections.queue.title")),m(l(),{className:"Button Button--icon",icon:"fas fa-sync-alt",onclick:function(){return r().packageManager.queue.load()},"aria-label":r().translator.trans("flarum-package-manager.admin.sections.queue.refresh")}))),m("div",{className:"container"},this.queueTable()))},e.columns=function(){var a=this,t=new(P());return t.add("operation",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.operation")),content:function(t){return m("div",{className:"PackageManager-queueTable-operation"},m("span",{className:"PackageManager-queueTable-operation-icon"},a.operationIcon(t.operation())),m("span",{className:"PackageManager-queueTable-operation-name"},r().translator.trans("flarum-package-manager.admin.sections.queue.operations."+t.operation())))}},80),t.add("package",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.package")),content:function(a){var t,e=r().data.extensions[null==(t=a.package())?void 0:t.replace(/(\/flarum-|\/flarum-ext-|\/)/g,"-")];return e?m(q(),{className:"PackageManager-queueTable-package",href:r().route("extension",{id:e.id})},m("div",{className:"PackageManager-queueTable-package-icon ExtensionIcon",style:e.icon},!!e.icon&&M()(e.icon.name)),m("div",{className:"PackageManager-queueTable-package-details"},m("span",{className:"PackageManager-queueTable-package-title"},e.extra["flarum-extension"].title),m("span",{className:"PackageManager-queueTable-package-name"},a.package()))):a.package()}},75),t.add("status",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.status")),content:function(a){return m("[",null,m(C,{className:"PackageManager-queueTable-status",type:{running:"neutral",failure:"error",pending:"warning",success:"success"}[a.status()]},r().translator.trans("flarum-package-manager.admin.sections.queue.statuses."+a.status())),["pending","running"].includes(a.status())&&m(y(),{size:"small",display:"inline"}))}},70),t.add("elapsedTime",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.elapsed_time")),content:function(a){return a.startedAt()&&a.finishedAt()?m(N(),{text:dayjs(a.startedAt()).format("LL LTS")+" "+dayjs(a.finishedAt()).format("LL LTS")},m("span",null,function(a,t){dayjs.extend(E());var e=dayjs(t).diff(a);return dayjs.duration(e).humanize()}(a.startedAt(),a.finishedAt()))):r().translator.trans("flarum-package-manager.admin.sections.queue.task_just_started")}},65),t.add("memoryUsed",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.peak_memory_used")),content:function(a){return m("span",null,a.peakMemoryUsed())}},60),t.add("details",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.details")),content:function(a){return m(l(),{className:"Button Button--icon Table-controls-item",icon:"fas fa-file-alt","aria-label":r().translator.trans("flarum-package-manager.admin.sections.queue.columns.details"),onclick:function(){return r().modal.show(L,{task:a})}})},className:"Table-controls"},55),t},e.queueTable=function(){var a=r().packageManager.queue.getItems();if(!a)return m(y(),null);if(a&&!a.length)return m("h3",{className:"ExtensionPage-subHeader"},r().translator.trans("flarum-package-manager.admin.sections.queue.none"));var t=this.columns();return m("[",null,m("table",{className:"Table PackageManager-queueTable"},m("thead",null,m("tr",null,t.toArray().map((function(a,t){return m("th",{key:t},a.label)})))),m("tbody",null,a.map((function(a,e){return m("tr",{key:e},t.toArray().map((function(t,e){t.label;var n=t.content,r=h(t,Y);return m("td",Object.assign({key:e},r),n(a))})))})))),m(D,{list:r().packageManager.queue}))},e.operationIcon=function(a){return M()({update_check:"fas fa-sync-alt",update_major:"fas fa-play",update_minor:"fas fa-play",update_global:"fas fa-play",extension_install:"fas fa-download",extension_remove:"fas fa-times",extension_update:"fas fa-arrow-alt-circle-up",why_not:"fas fa-exclamation-circle"}[a])},t}(b());const G=flarum.core.compat["common/components/Alert"];var H=e.n(G);const R=flarum.core.compat["common/utils/Stream"];var W=e.n(R),V=function(a){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r"+t.data.phpVersion+"",folder_perms_link:"https://docs.flarum.org/install#folder-ownership"}))),type:"boolean",disabled:t.data["flarum-package-manager.using_sync_queue"]}).registerSetting({setting:"flarum-package-manager.task_retention_days",label:t.translator.trans("flarum-package-manager.admin.settings.task_retention_days"),help:t.translator.trans("flarum-package-manager.admin.settings.task_retention_days_help"),type:"number"}).registerPage(ha),(0,a.extend)(o().prototype,"topItems",(function(a){var e=this;"flarum-package-manager"===this.extension.id||p()(this.extension.id)||a.add("remove",m(l(),{className:"Button Button--danger",icon:"fas fa-times",onclick:function(){t.modal.show(u()),t.request({url:t.forum.attribute("apiUrl")+"/package-manager/extensions/"+e.extension.id,method:"DELETE"}).then((function(a){null!=a&&a.processing?wa():(t.alerts.show({type:"success"},t.translator.trans("flarum-package-manager.admin.extensions.successful_remove")),window.location=t.forum.attribute("adminUrl"))})).finally((function(){t.modal.close()}))}},t.translator.trans("flarum-package-manager.admin.extensions.remove")))}))}))})(),module.exports=n})(); +(()=>{var a={3:function(a){a.exports=function(){"use strict";var a,t,e=1e3,n=6e4,r=36e5,s=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,i=31536e6,l=2592e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:i,months:l,days:s,hours:r,minutes:n,seconds:e,milliseconds:1,weeks:6048e5},m=function(a){return a instanceof b},d=function(a,t,e){return new b(a,e,t.$l)},p=function(a){return t.p(a)+"s"},g=function(a){return a<0},f=function(a){return g(a)?Math.ceil(a):Math.floor(a)},h=function(a){return Math.abs(a)},k=function(a,t){return a?g(a)?{negative:!0,format:""+h(a)+t}:{negative:!1,format:""+a+t}:{negative:!1,format:""}},b=function(){function g(a,t,e){var n=this;if(this.$d={},this.$l=e,void 0===a&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(a*u[p(t)],this);if("number"==typeof a)return this.$ms=a,this.parseFromMilliseconds(),this;if("object"==typeof a)return Object.keys(a).forEach((function(t){n.$d[p(t)]=a[t]})),this.calMilliseconds(),this;if("string"==typeof a){var r=a.match(c);if(r){var s=r.slice(2).map((function(a){return null!=a?Number(a):0}));return this.$d.years=s[0],this.$d.months=s[1],this.$d.weeks=s[2],this.$d.days=s[3],this.$d.hours=s[4],this.$d.minutes=s[5],this.$d.seconds=s[6],this.calMilliseconds(),this}}return this}var h=g.prototype;return h.calMilliseconds=function(){var a=this;this.$ms=Object.keys(this.$d).reduce((function(t,e){return t+(a.$d[e]||0)*u[e]}),0)},h.parseFromMilliseconds=function(){var a=this.$ms;this.$d.years=f(a/i),a%=i,this.$d.months=f(a/l),a%=l,this.$d.days=f(a/s),a%=s,this.$d.hours=f(a/r),a%=r,this.$d.minutes=f(a/n),a%=n,this.$d.seconds=f(a/e),a%=e,this.$d.milliseconds=a},h.toISOString=function(){var a=k(this.$d.years,"Y"),t=k(this.$d.months,"M"),e=+this.$d.days||0;this.$d.weeks&&(e+=7*this.$d.weeks);var n=k(e,"D"),r=k(this.$d.hours,"H"),s=k(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var i=k(o,"S"),l=a.negative||t.negative||n.negative||r.negative||s.negative||i.negative,c=r.format||s.format||i.format?"T":"",u=(l?"-":"")+"P"+a.format+t.format+n.format+c+r.format+s.format+i.format;return"P"===u||"-P"===u?"P0D":u},h.toJSON=function(){return this.toISOString()},h.format=function(a){var e=a||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return e.replace(o,(function(a,t){return t||String(n[a])}))},h.as=function(a){return this.$ms/u[p(a)]},h.get=function(a){var t=this.$ms,e=p(a);return"milliseconds"===e?t%=1e3:t="weeks"===e?f(t/u[e]):this.$d[e],0===t?0:t},h.add=function(a,t,e){var n;return n=t?a*u[p(t)]:m(a)?a.$ms:d(a,this).$ms,d(this.$ms+n*(e?-1:1),this)},h.subtract=function(a,t){return this.add(a,t,!0)},h.locale=function(a){var t=this.clone();return t.$l=a,t},h.clone=function(){return d(this.$ms,this)},h.humanize=function(t){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},h.milliseconds=function(){return this.get("milliseconds")},h.asMilliseconds=function(){return this.as("milliseconds")},h.seconds=function(){return this.get("seconds")},h.asSeconds=function(){return this.as("seconds")},h.minutes=function(){return this.get("minutes")},h.asMinutes=function(){return this.as("minutes")},h.hours=function(){return this.get("hours")},h.asHours=function(){return this.as("hours")},h.days=function(){return this.get("days")},h.asDays=function(){return this.as("days")},h.weeks=function(){return this.get("weeks")},h.asWeeks=function(){return this.as("weeks")},h.months=function(){return this.get("months")},h.asMonths=function(){return this.as("months")},h.years=function(){return this.get("years")},h.asYears=function(){return this.as("years")},g}();return function(e,n,r){a=r,t=r().$utils(),r.duration=function(a,t){var e=r.locale();return d(a,{$l:e},t)},r.isDuration=m;var s=n.prototype.add,o=n.prototype.subtract;n.prototype.add=function(a,t){return m(a)&&(a=a.asMilliseconds()),s.bind(this)(a,t)},n.prototype.subtract=function(a,t){return m(a)&&(a=a.asMilliseconds()),o.bind(this)(a,t)}}}()}},t={};function e(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return a[n].call(s.exports,s,s.exports,e),s.exports}e.n=a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},e.d=(a,t)=>{for(var n in t)e.o(t,n)&&!e.o(a,n)&&Object.defineProperty(a,n,{enumerable:!0,get:t[n]})},e.o=(a,t)=>Object.prototype.hasOwnProperty.call(a,t),e.r=a=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var n={};(()=>{"use strict";e.r(n);const a=flarum.core.compat["common/extend"],t=flarum.core.compat["admin/app"];var r=e.n(t);const s=flarum.core.compat["admin/components/ExtensionPage"];var o=e.n(s);const i=flarum.core.compat["common/components/Button"];var l=e.n(i);const c=flarum.core.compat["admin/components/LoadingModal"];var u=e.n(c);const d=flarum.core.compat["admin/utils/isExtensionEnabled"];var p=e.n(d);function g(a,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,t){return a.__proto__=t,a},g(a,t)}function f(a,t){a.prototype=Object.create(t.prototype),a.prototype.constructor=a,g(a,t)}function h(a,t){if(null==a)return{};var e,n,r={},s=Object.keys(a);for(n=0;n=0||(r[e]=a[e]);return r}const k=flarum.core.compat["common/Component"];var b=e.n(k);const v=flarum.core.compat["common/components/LoadingIndicator"];var y=e.n(v);const _=flarum.core.compat["common/components/Tooltip"];var N=e.n(_);const x=flarum.core.compat["common/helpers/icon"];var M=e.n(x);const w=flarum.core.compat["common/utils/ItemList"];var P=e.n(w);const U=flarum.core.compat["common/utils/extractText"];var B=e.n(U);const S=flarum.core.compat["common/components/Link"];var j=e.n(S);const q=flarum.core.compat["common/utils/classList"];var $=e.n(q),T=["className","type"],C=function(a){function t(){return a.apply(this,arguments)||this}return f(t,a),t.prototype.view=function(a){var t=this.attrs,e=t.className,n=(t.type,h(t,T));return m("span",Object.assign({className:$()(["Label","Label--"+this.attrs.type,e])},n),a.children)},t}(b());const O=flarum.core.compat["common/components/Modal"];var F=e.n(O),L=function(a){function t(){return a.apply(this,arguments)||this}f(t,a);var e=t.prototype;return e.className=function(){return"Modal--large QuickModal"},e.title=function(){return r().translator.trans("flarum-package-manager.admin.sections.queue.operations."+this.attrs.task.operation())},e.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"TaskOutputModal-data"},"failure"===this.attrs.task.status()&&m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-package-manager.admin.sections.queue.output_modal.guessed_cause")),m("div",{className:"FormControl TaskOutputModal-data-guessed-cause"},this.attrs.task.guessedCause()&&r().translator.trans("flarum-package-manager.admin.exceptions.guessed_cause."+this.attrs.task.guessedCause())||r().translator.trans("flarum-package-manager.admin.sections.queue.output_modal.cause_unknown"))),m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-package-manager.admin.sections.queue.output_modal.command")),m("div",{className:"FormControl TaskOutputModal-data-command"},m("code",null,"$ composer ",this.attrs.task.command()))),m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-package-manager.admin.sections.queue.output_modal.output")),m("div",{className:"FormControl TaskOutputModal-data-output"},m("code",null,m("pre",null,this.attrs.task.output()))))))},t}(F()),A=e(3),E=e.n(A),D=function(a){function t(){return a.apply(this,arguments)||this}return f(t,a),t.prototype.view=function(){var a=this;return m("nav",{className:"Pagination UserListPage-gridPagination"},m(l(),{disabled:!this.attrs.list.hasPrev()||r().packageManager.control.isLoading(),title:r().translator.trans("core.admin.users.pagination.back_button"),onclick:function(){return a.attrs.list.prev()},icon:"fas fa-chevron-left",className:"Button Button--icon UserListPage-backBtn"}),m("span",{className:"UserListPage-pageNumber"},r().translator.trans("core.admin.users.pagination.page_counter",{current:this.attrs.list.pageNumber()+1,total:this.attrs.list.getTotalPages()})),m(l(),{disabled:!this.attrs.list.hasNext()||r().packageManager.control.isLoading(),title:r().translator.trans("core.admin.users.pagination.next_button"),onclick:function(){return a.attrs.list.next()},icon:"fas fa-chevron-right",className:"Button Button--icon UserListPage-nextBtn"}))},t}(b()),Y=["label","content"],I=function(a){function t(){return a.apply(this,arguments)||this}f(t,a);var e=t.prototype;return e.oninit=function(t){a.prototype.oninit.call(this,t),r().packageManager.queue.load()},e.view=function(){return m("section",{id:"PackageManager-queueSection",className:"ExtensionPage-permissions PackageManager-queueSection"},m("div",{className:"ExtensionPage-permissions-header PackageManager-queueSection-header"},m("div",{className:"container"},m("h2",{className:"ExtensionTitle"},r().translator.trans("flarum-package-manager.admin.sections.queue.title")),m(l(),{className:"Button Button--icon",icon:"fas fa-sync-alt",onclick:function(){return r().packageManager.queue.load()},"aria-label":r().translator.trans("flarum-package-manager.admin.sections.queue.refresh"),disabled:r().packageManager.control.isLoading()}))),m("div",{className:"container"},this.queueTable()))},e.columns=function(){var a=this,t=new(P());return t.add("operation",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.operation")),content:function(t){return m("div",{className:"PackageManager-queueTable-operation"},m("span",{className:"PackageManager-queueTable-operation-icon"},a.operationIcon(t.operation())),m("span",{className:"PackageManager-queueTable-operation-name"},r().translator.trans("flarum-package-manager.admin.sections.queue.operations."+t.operation())))}},80),t.add("package",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.package")),content:function(a){var t,e=r().data.extensions[null==(t=a.package())?void 0:t.replace(/(\/flarum-|\/flarum-ext-|\/)/g,"-")];return e?m(j(),{className:"PackageManager-queueTable-package",href:r().route("extension",{id:e.id})},m("div",{className:"PackageManager-queueTable-package-icon ExtensionIcon",style:e.icon},!!e.icon&&M()(e.icon.name)),m("div",{className:"PackageManager-queueTable-package-details"},m("span",{className:"PackageManager-queueTable-package-title"},e.extra["flarum-extension"].title),m("span",{className:"PackageManager-queueTable-package-name"},a.package()))):a.package()}},75),t.add("status",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.status")),content:function(a){return m("[",null,m(C,{className:"PackageManager-queueTable-status",type:{running:"neutral",failure:"error",pending:"warning",success:"success"}[a.status()]},r().translator.trans("flarum-package-manager.admin.sections.queue.statuses."+a.status())),["pending","running"].includes(a.status())&&m(y(),{size:"small",display:"inline"}))}},70),t.add("elapsedTime",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.elapsed_time")),content:function(a){return a.startedAt()&&a.finishedAt()?m(N(),{text:dayjs(a.startedAt()).format("LL LTS")+" "+dayjs(a.finishedAt()).format("LL LTS")},m("span",null,function(a,t){dayjs.extend(E());var e=dayjs(t).diff(a);return dayjs.duration(e).humanize()}(a.startedAt(),a.finishedAt()))):r().translator.trans("flarum-package-manager.admin.sections.queue.task_just_started")}},65),t.add("memoryUsed",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.peak_memory_used")),content:function(a){return m("span",null,a.peakMemoryUsed())}},60),t.add("details",{label:B()(r().translator.trans("flarum-package-manager.admin.sections.queue.columns.details")),content:function(a){return m(l(),{className:"Button Button--icon Table-controls-item",icon:"fas fa-file-alt","aria-label":r().translator.trans("flarum-package-manager.admin.sections.queue.columns.details"),onclick:function(){return r().modal.show(L,{task:a})},disabled:["pending","running"].includes(a.status())})},className:"Table-controls"},55),t},e.queueTable=function(){var a=r().packageManager.queue.getItems();if(!a)return m(y(),null);if(a&&!a.length)return m("h3",{className:"ExtensionPage-subHeader"},r().translator.trans("flarum-package-manager.admin.sections.queue.none"));var t=this.columns();return m("[",null,m("table",{className:"Table PackageManager-queueTable"},m("thead",null,m("tr",null,t.toArray().map((function(a,t){return m("th",{key:t},a.label)})))),m("tbody",null,a.map((function(a,e){return m("tr",{key:e},t.toArray().map((function(t,e){t.label;var n=t.content,r=h(t,Y);return m("td",Object.assign({key:e},r),n(a))})))})))),m(D,{list:r().packageManager.queue}))},e.operationIcon=function(a){return M()({update_check:"fas fa-sync-alt",update_major:"fas fa-play",update_minor:"fas fa-play",update_global:"fas fa-play",extension_install:"fas fa-download",extension_remove:"fas fa-times",extension_update:"fas fa-arrow-alt-circle-up",why_not:"fas fa-exclamation-circle"}[a])},t}(b());const G=flarum.core.compat["common/components/Alert"];var H=e.n(G);const W=flarum.core.compat["common/utils/Stream"];var R=e.n(W),V=function(a){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r"+t.data.phpVersion+"",folder_perms_link:"https://docs.flarum.org/install#folder-ownership"}))),type:"boolean",disabled:t.data["flarum-package-manager.using_sync_queue"]}).registerSetting({setting:"flarum-package-manager.task_retention_days",label:t.translator.trans("flarum-package-manager.admin.settings.task_retention_days"),help:t.translator.trans("flarum-package-manager.admin.settings.task_retention_days_help"),type:"number"}).registerPage(ha),(0,a.extend)(o().prototype,"topItems",(function(a){var e=this;"flarum-package-manager"===this.extension.id||p()(this.extension.id)||a.add("remove",m(l(),{className:"Button Button--danger",icon:"fas fa-times",onclick:function(){t.modal.show(u()),t.request({url:t.forum.attribute("apiUrl")+"/package-manager/extensions/"+e.extension.id,method:"DELETE"}).then((function(a){null!=a&&a.processing?wa():(t.alerts.show({type:"success"},t.translator.trans("flarum-package-manager.admin.extensions.successful_remove")),window.location=t.forum.attribute("adminUrl"))})).finally((function(){t.modal.close()}))}},t.translator.trans("flarum-package-manager.admin.extensions.remove")))}))}))})(),module.exports=n})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 462867f..e6ec422 100755 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"2BAAoEA,EAAOC,QAAmJ,WAAW,aAAa,IAAIC,EAAEC,EAAEC,EAAE,IAAIC,EAAE,IAAIC,EAAE,KAAKC,EAAE,MAAMC,EAAE,sFAAsFC,EAAE,QAAQC,EAAE,OAAOC,EAAE,sKAAsKC,EAAE,CAACC,MAAMJ,EAAEK,OAAOJ,EAAEK,KAAKR,EAAES,MAAMV,EAAEW,QAAQZ,EAAEa,QAAQd,EAAEe,aAAa,EAAEC,MAAM,QAAQC,EAAE,SAASnB,GAAG,OAAOA,aAAaoB,CAAC,EAAEC,EAAE,SAASrB,EAAEC,EAAEC,GAAG,OAAO,IAAIkB,EAAEpB,EAAEE,EAAED,EAAEqB,GAAG,EAAEC,EAAE,SAASvB,GAAG,OAAOC,EAAEmB,EAAEpB,GAAG,GAAG,EAAEwB,EAAE,SAASxB,GAAG,OAAOA,EAAE,CAAC,EAAEyB,EAAE,SAASzB,GAAG,OAAOwB,EAAExB,GAAG0B,KAAKC,KAAK3B,GAAG0B,KAAKE,MAAM5B,EAAE,EAAE6B,EAAE,SAAS7B,GAAG,OAAO0B,KAAKI,IAAI9B,EAAE,EAAE+B,EAAE,S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K6D,SAAS,qCAAuC,KAG3D3I,EAAI2R,cAAa,IACV,0BACJC,gBAAgB,CACf1I,QAAS,oCACTtH,MAAO5B,EAAI6R,WAAWC,MAAM,oDAC5BzH,KAAMlR,EAAE4Y,MACNlQ,IACE7B,EAAI6R,WAAWC,MAAM,wDAAyD,CAC5EE,gBAAiB,+FACjBC,cAAe,iEACfC,YAAa,WAAWlS,EAAI8E,KAAKqN,WAAU,YAC3CC,kBAAmB,uDAIzB1S,KAAM,UACNe,SAAUT,EAAI8E,KAAK,6CAEpB8M,gBAAgB,CACf1I,QAAS,6CACTtH,MAAO5B,EAAI6R,WAAWC,MAAM,6DAC5BzH,KAAMrK,EAAI6R,WAAWC,MAAM,kEAC3BpS,KAAM,WAEP2S,aAAa7G,KAEhBtI,EAAAA,EAAAA,QAAO6I,IAAAA,UAAyB,YAAY,SAAUrK,GAAO,WACjC,2BAAtB5H,KAAKiI,UAAUR,IAAmC+Q,IAAmBxY,KAAKiI,UAAUR,KAIxFG,EAAM5F,IACJ,SACA,EAAC,IAAM,CACL2D,UAAU,wBACVqB,KAAK,eACLF,QAAS,WACPZ,EAAIuS,MAAMC,KAAKrC,KAEfnQ,EACGyS,QAAqC,CACpChN,IAAQzF,EAAI0S,MAAMC,UAAU,UAAS,+BAA+B,EAAK5Q,UAAUR,GACnFiE,OAAQ,WAETG,MAAK,SAACV,GACO,MAARA,GAAAA,EAAUmL,WACZzC,MAEA3N,EAAI4S,OAAOJ,KAAK,CAAE9S,KAAM,WAAaM,EAAI6R,WAAWC,MAAM,8DAC1D3D,OAAOa,SAAWhP,EAAI0S,MAAMC,UAAU,YAE1C,IAAE,SACO,WACP3S,EAAIuS,MAAMM,OACZ,GACJ,GAEC7S,EAAI6R,WAAWC,MAAM,mDAG5B,GACF,G","sources":["webpack://@flarum/package-manager/../../../node_modules/dayjs/plugin/duration.js","webpack://@flarum/package-manager/webpack/bootstrap","webpack://@flarum/package-manager/webpack/runtime/compat get default export","webpack://@flarum/package-manager/webpack/runtime/define property getters","webpack://@flarum/package-manager/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/package-manager/webpack/runtime/make namespace object","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/components/LoadingModal']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/utils/isExtensionEnabled']\"","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/package-manager/./src/admin/components/Label.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/package-manager/./src/admin/components/TaskOutputModal.tsx","webpack://@flarum/package-manager/./src/admin/components/Pagination.tsx","webpack://@flarum/package-manager/./src/admin/components/QueueSection.tsx","webpack://@flarum/package-manager/./src/admin/utils/humanDuration.ts","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/package-manager/./src/admin/components/Installer.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/package-manager/./src/admin/utils/errorHandler.ts","webpack://@flarum/package-manager/./src/admin/components/WhyNotModal.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@flarum/package-manager/./src/admin/components/ExtensionItem.tsx","webpack://@flarum/package-manager/./src/admin/components/MajorUpdater.tsx","webpack://@flarum/package-manager/./src/admin/components/Updater.tsx","webpack://@flarum/package-manager/./src/admin/components/ControlSection.tsx","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/components/AdminPage']\"","webpack://@flarum/package-manager/./src/admin/components/ConfigureJson.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Select']\"","webpack://@flarum/package-manager/./src/admin/components/RepositoryModal.tsx","webpack://@flarum/package-manager/./src/admin/components/ConfigureComposer.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@flarum/package-manager/./src/admin/components/AuthMethodModal.tsx","webpack://@flarum/package-manager/./src/admin/components/ConfigureAuth.tsx","webpack://@flarum/package-manager/./src/admin/components/SettingsPage.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/package-manager/../../../node_modules/pretty-bytes/index.js","webpack://@flarum/package-manager/./src/admin/models/Task.ts","webpack://@flarum/package-manager/./src/admin/utils/jumpToQueue.ts","webpack://@flarum/package-manager/./src/admin/states/QueueState.ts","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/package-manager/./src/admin/states/ControlSectionState.ts","webpack://@flarum/package-manager/./src/admin/states/PackageManagerState.ts","webpack://@flarum/package-manager/./src/admin/index.tsx"],"sourcesContent":["!function(t,s){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=s():\"function\"==typeof define&&define.amd?define(s):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){\"use strict\";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,h=2592e6,a=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:u,months:h,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof p},f=function(t,s,n){return new p(t,n,s.$l)},m=function(t){return s.p(t)+\"s\"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},g=function(t,s){return t?l(t)?{negative:!0,format:\"\"+y(t)+s}:{negative:!1,format:\"\"+t+s}:{negative:!1,format:\"\"}},p=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*d[m(s)],this);if(\"number\"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if(\"object\"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if(\"string\"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*d[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/h),t%=h,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=g(this.$d.years,\"Y\"),s=g(this.$d.months,\"M\"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=g(n,\"D\"),e=g(this.$d.hours,\"H\"),r=g(this.$d.minutes,\"M\"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=g(o,\"S\"),h=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?\"T\":\"\",d=(h?\"-\":\"\")+\"P\"+t.format+s.format+i.format+a+e.format+r.format+u.format;return\"P\"===d||\"-P\"===d?\"P0D\":d},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||\"YYYY-MM-DDTHH:mm:ss\",i={Y:this.$d.years,YY:s.s(this.$d.years,2,\"0\"),YYYY:s.s(this.$d.years,4,\"0\"),M:this.$d.months,MM:s.s(this.$d.months,2,\"0\"),D:this.$d.days,DD:s.s(this.$d.days,2,\"0\"),H:this.$d.hours,HH:s.s(this.$d.hours,2,\"0\"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,\"0\"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,\"0\"),SSS:s.s(this.$d.milliseconds,3,\"0\")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/d[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return\"milliseconds\"===n?s%=1e3:s=\"weeks\"===n?$(s/d[n]):this.$d[n],0===s?0:s},y.add=function(t,s,n){var i;return i=s?t*d[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,\"ms\").locale(this.$l).fromNow(!s)},y.milliseconds=function(){return this.get(\"milliseconds\")},y.asMilliseconds=function(){return this.as(\"milliseconds\")},y.seconds=function(){return this.get(\"seconds\")},y.asSeconds=function(){return this.as(\"seconds\")},y.minutes=function(){return this.get(\"minutes\")},y.asMinutes=function(){return this.as(\"minutes\")},y.hours=function(){return this.get(\"hours\")},y.asHours=function(){return this.as(\"hours\")},y.days=function(){return this.get(\"days\")},y.asDays=function(){return this.as(\"days\")},y.weeks=function(){return this.get(\"weeks\")},y.asWeeks=function(){return this.as(\"weeks\")},y.months=function(){return this.get(\"months\")},y.asMonths=function(){return this.as(\"months\")},y.years=function(){return this.get(\"years\")},y.asYears=function(){return this.as(\"years\")},l}();return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)&&(t=t.asMilliseconds()),r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)&&(t=t.asMilliseconds()),o.bind(this)(t,s)}}}));","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/LoadingModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/utils/isExtensionEnabled'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\n\ninterface LabelAttrs extends ComponentAttrs {\n type: 'success' | 'error' | 'neutral' | 'warning';\n}\n\nexport default class Label extends Component {\n view(vnode: Mithril.Vnode) {\n const { className, type, ...attrs } = this.attrs;\n\n return (\n \n {vnode.children}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","import app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Task from '../models/Task';\n\ninterface TaskOutputModalAttrs extends IInternalModalAttrs {\n task: Task;\n}\n\nexport default class TaskOutputModal extends Modal {\n className() {\n return 'Modal--large QuickModal';\n }\n\n title() {\n return app.translator.trans(`flarum-package-manager.admin.sections.queue.operations.${this.attrs.task.operation()}`);\n }\n\n content() {\n return (\n
\n
\n
\n \n
\n {(this.attrs.task.guessedCause() &&\n app.translator.trans('flarum-package-manager.admin.exceptions.guessed_cause.' + this.attrs.task.guessedCause())) ||\n app.translator.trans('flarum-package-manager.admin.sections.queue.output_modal.cause_unknown')}\n
\n
\n\n
\n \n
\n $ composer {this.attrs.task.command()}\n
\n
\n\n
\n \n
\n \n
{this.attrs.task.output()}
\n
\n
\n
\n
\n
\n );\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport QueueState from '../states/QueueState';\n\ninterface PaginationAttrs extends ComponentAttrs {\n list: QueueState;\n}\n\n/**\n * @todo make it abstract in core for reusability.\n */\nexport default class Pagination extends Component {\n view() {\n return (\n \n );\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\nimport Link from 'flarum/common/components/Link';\n\nimport Label from './Label';\nimport TaskOutputModal from './TaskOutputModal';\nimport humanDuration from '../utils/humanDuration';\nimport Task, { TaskOperations } from '../models/Task';\nimport Pagination from './Pagination';\n\ninterface QueueTableColumn extends ComponentAttrs {\n label: string;\n content: (task: Task) => Mithril.Children;\n}\n\nexport default class QueueSection extends Component<{}> {\n oninit(vnode: Mithril.Vnode<{}, this>) {\n super.oninit(vnode);\n\n app.packageManager.queue.load();\n }\n\n view() {\n return (\n
\n
\n
\n

{app.translator.trans('flarum-package-manager.admin.sections.queue.title')}

\n app.packageManager.queue.load()}\n aria-label={app.translator.trans('flarum-package-manager.admin.sections.queue.refresh')}\n />\n
\n
\n
{this.queueTable()}
\n
\n );\n }\n\n columns() {\n const items = new ItemList();\n\n items.add(\n 'operation',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.operation')),\n content: (task) => (\n
\n {this.operationIcon(task.operation())}\n \n {app.translator.trans(`flarum-package-manager.admin.sections.queue.operations.${task.operation()}`)}\n \n
\n ),\n },\n 80\n );\n\n items.add(\n 'package',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.package')),\n content: (task) => {\n const extension: Extension | null = app.data.extensions[task.package()?.replace(/(\\/flarum-|\\/flarum-ext-|\\/)/g, '-')];\n\n return extension ? (\n \n
\n {!!extension.icon && icon(extension.icon.name)}\n
\n
\n {extension.extra['flarum-extension'].title}\n {task.package()}\n
\n \n ) : (\n task.package()\n );\n },\n },\n 75\n );\n\n items.add(\n 'status',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.status')),\n content: (task) => (\n <>\n \n {app.translator.trans(`flarum-package-manager.admin.sections.queue.statuses.${task.status()}`)}\n \n {['pending', 'running'].includes(task.status()) && }\n \n ),\n },\n 70\n );\n\n items.add(\n 'elapsedTime',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.elapsed_time')),\n content: (task) =>\n !task.startedAt() || !task.finishedAt() ? (\n app.translator.trans('flarum-package-manager.admin.sections.queue.task_just_started')\n ) : (\n \n {humanDuration(task.startedAt(), task.finishedAt())}\n \n ),\n },\n 65\n );\n\n items.add(\n 'memoryUsed',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.peak_memory_used')),\n content: (task) => {task.peakMemoryUsed()},\n },\n 60\n );\n\n items.add(\n 'details',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.details')),\n content: (task) => (\n app.modal.show(TaskOutputModal, { task })}\n />\n ),\n className: 'Table-controls',\n },\n 55\n );\n\n return items;\n }\n\n queueTable() {\n const tasks = app.packageManager.queue.getItems();\n\n if (!tasks) {\n return ;\n }\n\n if (tasks && !tasks.length) {\n return

{app.translator.trans('flarum-package-manager.admin.sections.queue.none')}

;\n }\n\n const columns = this.columns();\n\n return (\n <>\n \n \n \n {columns.toArray().map((item, index) => (\n \n ))}\n \n \n \n {tasks.map((task, index) => (\n \n {columns.toArray().map((item, index) => {\n const { label, content, ...attrs } = item;\n\n return (\n \n );\n })}\n \n ))}\n \n
{item.label}
\n {content(task)}\n
\n\n \n \n );\n }\n\n operationIcon(operation: TaskOperations): Mithril.Children {\n return icon(\n {\n update_check: 'fas fa-sync-alt',\n update_major: 'fas fa-play',\n update_minor: 'fas fa-play',\n update_global: 'fas fa-play',\n extension_install: 'fas fa-download',\n extension_remove: 'fas fa-times',\n extension_update: 'fas fa-arrow-alt-circle-up',\n why_not: 'fas fa-exclamation-circle',\n }[operation]\n );\n }\n}\n","import duration from 'dayjs/plugin/duration';\n\nexport default function humanDuration(start: Date, end: Date) {\n dayjs.extend(duration);\n\n const durationTime = dayjs(end).diff(start);\n\n return dayjs.duration(durationTime).humanize();\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport interface InstallerAttrs extends ComponentAttrs {}\n\nexport type InstallerLoadingTypes = 'extension-install' | null;\n\nexport default class Installer extends Component {\n packageName!: Stream;\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.packageName = Stream('');\n }\n\n view(): Mithril.Children {\n return (\n
\n \n

\n {app.translator.trans('flarum-package-manager.admin.extensions.install_help', {\n extiverse: extiverse.com,\n semantic_link: ,\n code: ,\n })}\n

\n
\n \n \n {app.translator.trans('flarum-package-manager.admin.extensions.proceed')}\n \n
\n
\n );\n }\n\n data(): any {\n return {\n package: this.packageName(),\n };\n }\n\n onsubmit(): void {\n app.packageManager.control.requirePackage(this.data());\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/admin/app';\n\nexport default function (e: any) {\n app.packageManager.control.setLoading(null);\n\n const error = e.response.errors[0];\n\n if (!['composer_command_failure', 'extension_already_installed', 'extension_not_installed'].includes(error.code)) {\n throw e;\n }\n\n app.alerts.clear();\n\n switch (error.code) {\n case 'composer_command_failure':\n if (error.guessed_cause) {\n app.alerts.show({ type: 'error' }, app.translator.trans(`flarum-package-manager.admin.exceptions.guessed_cause.${error.guessed_cause}`));\n app.modal.close();\n } else {\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.composer_command_failure'));\n }\n break;\n\n case 'extension_already_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.extension_already_installed'));\n app.modal.close();\n break;\n\n case 'extension_not_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.extension_not_installed'));\n app.modal.close();\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nimport errorHandler from '../utils/errorHandler';\n\ntype WhyNotResponse = {\n data: {\n reason: string;\n };\n};\n\nexport interface WhyNotModalAttrs extends IInternalModalAttrs {\n package: string;\n}\n\nexport default class WhyNotModal extends Modal {\n loading: boolean = true;\n whyNot: string | null = null;\n\n className() {\n return 'Modal--large WhyNotModal';\n }\n\n title() {\n return app.translator.trans('flarum-package-manager.admin.why_not_modal.title');\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n this.requestWhyNot();\n }\n\n content() {\n return
{this.loading ? :
{this.whyNot}
}
;\n }\n\n requestWhyNot(): void {\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/why-not`,\n body: {\n data: {\n package: this.attrs.package,\n },\n },\n })\n .then((response) => {\n this.loading = false;\n this.whyNot = response.data.reason;\n m.redraw();\n })\n .catch(errorHandler);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport { Extension } from 'flarum/admin/AdminApplication';\n\nimport { UpdatedPackage } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport Label from './Label';\nimport Dropdown from 'flarum/common/components/Dropdown';\n\nexport interface ExtensionItemAttrs extends ComponentAttrs {\n extension: Extension;\n updates: UpdatedPackage;\n onClickUpdate:\n | CallableFunction\n | {\n soft: CallableFunction;\n hard: CallableFunction;\n };\n whyNotWarning?: boolean;\n isCore?: boolean;\n updatable?: boolean;\n isDanger?: boolean;\n}\n\nexport default class ExtensionItem extends Component {\n view(vnode: Mithril.Vnode): Mithril.Children {\n const { extension, updates, onClickUpdate, whyNotWarning, isCore, isDanger } = this.attrs;\n const latestVersion = updates['latest-minor'] ?? (updates['latest-major'] && !isCore ? updates['latest-major'] : null);\n\n return (\n \n
\n {extension.icon ? icon(extension.icon.name) : ''}\n
\n
\n
{extension.extra['flarum-extension'].title}
\n
\n {this.version(updates['version'])}\n {latestVersion ? (\n \n ) : null}\n
\n
\n
\n {onClickUpdate && typeof onClickUpdate === 'function' ? (\n \n \n \n ) : onClickUpdate ? (\n \n \n \n \n ) : null}\n {whyNotWarning ? (\n \n app.modal.show(WhyNotModal, { package: extension.name })}\n aria-label={app.translator.trans('flarum-package-manager.admin.extensions.check_why_it_failed_updating')}\n />\n \n ) : null}\n
\n \n );\n }\n\n version(v: string): string {\n return v.charAt(0) === 'v' ? v.substring(1) : v;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Alert from 'flarum/common/components/Alert';\n\nimport { UpdatedPackage, UpdateState } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionItem from './ExtensionItem';\nimport classList from 'flarum/common/utils/classList';\n\nexport interface MajorUpdaterAttrs extends ComponentAttrs {\n coreUpdate: UpdatedPackage;\n updateState: UpdateState;\n}\n\nexport type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';\n\nexport default class MajorUpdater extends Component {\n updateState!: UpdateState;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.updateState = this.attrs.updateState;\n }\n\n view(): Mithril.Children {\n // @todo move Form-group--danger class to core for reuse\n return (\n \n \"flarum\n \n

{app.translator.trans('flarum-package-manager.admin.major_updater.description')}

\n
\n \n \n \n \n {app.translator.trans('flarum-package-manager.admin.major_updater.update')}\n \n
\n {this.updateState.incompatibleExtensions.length ? (\n
\n {this.updateState.incompatibleExtensions.map((extension: string) => (\n \n ))}\n
\n ) : null}\n {this.updateState.status === 'failure' ? (\n app.modal.show(WhyNotModal, { package: 'flarum/core' })}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.why')}\n ,\n ]}\n >\n

\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.desc')}\n

\n \n ) : null}\n \n );\n }\n\n update(dryRun: boolean) {\n app.packageManager.control.majorUpdate({ dryRun });\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport MajorUpdater from './MajorUpdater';\nimport ExtensionItem from './ExtensionItem';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport interface IUpdaterAttrs extends ComponentAttrs {}\n\nexport type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;\n\nexport default class Updater extends Component {\n view() {\n const core = app.packageManager.control.coreUpdate;\n\n return [\n
\n \n

{app.translator.trans('flarum-package-manager.admin.updater.updater_help')}

\n {this.lastUpdateCheckView()}\n
{this.controlItems().toArray()}
\n {this.availableUpdatesView()}\n
,\n core && core.package['latest-major'] ? (\n \n ) : null,\n ];\n }\n\n lastUpdateCheckView() {\n return (\n (app.packageManager.control.lastUpdateCheck?.checkedAt && (\n

\n \n {app.translator.trans('flarum-package-manager.admin.updater.last_update_checked_at')}\n \n {humanTime(app.packageManager.control.lastUpdateCheck.checkedAt)}\n

\n )) ||\n null\n );\n }\n\n availableUpdatesView() {\n const state = app.packageManager.control;\n\n if (app.packageManager.control.isLoading('check') || app.packageManager.control.isLoading('global-update')) {\n return (\n
\n \n
\n );\n }\n\n const hasMinorCoreUpdate = state.coreUpdate && state.coreUpdate.package['latest-minor'];\n\n if (!(state.extensionUpdates.length || hasMinorCoreUpdate)) {\n return (\n
\n {app.translator.trans('flarum-package-manager.admin.updater.up_to_date')}\n
\n );\n }\n\n return (\n
\n
\n {hasMinorCoreUpdate ? (\n state.updateCoreMinor()}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes('flarum/core')}\n />\n ) : null}\n {state.extensionUpdates.map((extension: Extension) => (\n state.updateExtension(extension, 'soft'),\n hard: () => state.updateExtension(extension, 'hard'),\n }}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes(extension.name)}\n />\n ))}\n
\n
\n );\n }\n\n controlItems() {\n const items = new ItemList();\n\n items.add(\n 'updateCheck',\n app.packageManager.control.checkForUpdates()}\n loading={app.packageManager.control.isLoading('check')}\n disabled={app.packageManager.control.isLoading()}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.check_for_updates')}\n ,\n 100\n );\n\n items.add(\n 'globalUpdate',\n app.packageManager.control.updateGlobally()}\n loading={app.packageManager.control.isLoading('global-update')}\n disabled={app.packageManager.control.isLoading()}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.run_global_update')}\n \n );\n\n return items;\n }\n}\n","import app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Alert from 'flarum/common/components/Alert';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nimport Installer from './Installer';\nimport Updater from './Updater';\nimport Mithril from 'mithril';\n\nexport default class ControlSection extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n
\n
\n
\n

{app.translator.trans('flarum-package-manager.admin.sections.control.title')}

\n
\n
\n
\n {app.data['flarum-package-manager.writable_dirs'] ? (\n <>\n \n \n \n ) : (\n
\n \n {app.translator.trans('flarum-package-manager.admin.file_permissions')}\n \n
\n )}\n
\n
\n );\n }\n}\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/AdminPage'];","import app from 'flarum/admin/app';\nimport type Mithril from 'mithril';\nimport Component, { type ComponentAttrs } from 'flarum/common/Component';\nimport { CommonSettingsItemOptions, type SettingsComponentOptions } from '@flarum/core/src/admin/components/AdminPage';\nimport AdminPage from 'flarum/admin/components/AdminPage';\nimport type ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\n\nexport interface IConfigureJson extends ComponentAttrs {\n buildSettingComponent: (entry: ((this: this) => Mithril.Children) | SettingsComponentOptions) => Mithril.Children;\n}\n\nexport default abstract class ConfigureJson extends Component {\n protected settings: Record> = {};\n protected initialSettings: Record | null = null;\n protected loading: boolean = false;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.submit(true);\n }\n\n protected abstract type: string;\n abstract title(): Mithril.Children;\n abstract content(): Mithril.Children;\n\n className(): string {\n return '';\n }\n\n view(): Mithril.Children {\n return (\n
\n \n {this.content()}\n
{this.submitButton()}
\n
\n );\n }\n\n submitButton(): Mithril.Children[] {\n return [\n ,\n ];\n }\n\n customSettingComponents(): ItemList<(attributes: CommonSettingsItemOptions) => Mithril.Children> {\n return AdminPage.prototype.customSettingComponents();\n }\n\n setting(key: string) {\n return this.settings[key] ?? (this.settings[key] = Stream());\n }\n\n submit(readOnly: boolean) {\n this.loading = true;\n\n const configuration: any = {};\n\n Object.keys(this.settings).forEach((key) => {\n configuration[key] = this.settings[key]();\n });\n\n app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/package-manager/composer',\n body: {\n type: this.type,\n data: readOnly ? null : configuration,\n },\n })\n .then(({ data }: any) => {\n Object.keys(data).forEach((key) => {\n this.settings[key] = Stream(data[key]);\n });\n\n this.initialSettings = Array.isArray(data) ? {} : data;\n })\n .finally(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n isDirty() {\n return JSON.stringify(this.initialSettings) !== JSON.stringify(this.settings);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport { type Repository } from './ConfigureComposer';\n\nexport interface IRepositoryModalAttrs extends IInternalModalAttrs {\n onsubmit: (repository: Repository, key: string) => void;\n name?: string;\n repository?: Repository;\n}\n\nexport default class RepositoryModal extends Modal {\n protected name!: Stream;\n protected repository!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.name = Stream(this.attrs.name || '');\n this.repository = Stream(this.attrs.repository || { type: 'composer', url: '' });\n }\n\n className(): string {\n return 'RepositoryModal Modal--small';\n }\n\n title(): Mithril.Children {\n const context = this.attrs.repository ? 'edit' : 'add';\n return app.translator.trans(`flarum-package-manager.admin.composer.${context}_repository_label`);\n }\n\n content(): Mithril.Children {\n const types = {\n composer: app.translator.trans('flarum-package-manager.admin.composer.repositories.types.composer'),\n vcs: app.translator.trans('flarum-package-manager.admin.composer.repositories.types.vcs'),\n path: app.translator.trans('flarum-package-manager.admin.composer.repositories.types.path'),\n };\n\n return (\n
\n
\n \n \n
\n
\n \n this.repository({ ...this.repository(), type: value })}\n />\n
\n
\n \n this.repository({ ...this.repository(), url: (e.target as HTMLInputElement).value })}\n value={this.repository().url}\n />\n
\n
\n \n
\n
\n );\n }\n\n submit() {\n this.attrs.onsubmit(this.repository(), this.name());\n this.hide();\n }\n}\n","import app from 'flarum/admin/app';\nimport type Mithril from 'mithril';\nimport ConfigureJson, { type IConfigureJson } from './ConfigureJson';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport RepositoryModal from './RepositoryModal';\n\nexport type Repository = {\n type: 'composer' | 'vcs' | 'path';\n url: string;\n};\n\nexport default class ConfigureComposer extends ConfigureJson {\n protected type = 'composer';\n\n title(): Mithril.Children {\n return app.translator.trans('flarum-package-manager.admin.composer.title');\n }\n\n className(): string {\n return 'ConfigureComposer';\n }\n\n content(): Mithril.Children {\n return (\n
\n {this.attrs.buildSettingComponent.call(this, {\n setting: 'minimum-stability',\n label: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.label'),\n help: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.help'),\n type: 'select',\n options: {\n stable: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.stable'),\n RC: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.rc'),\n beta: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.beta'),\n alpha: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.alpha'),\n dev: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.dev'),\n },\n })}\n
\n \n
{app.translator.trans('flarum-package-manager.admin.composer.repositories.help')}
\n
\n {Object.keys(this.setting('repositories')() || {}).map((name) => {\n const repository = this.setting('repositories')()[name] as Repository;\n\n return (\n
\n \n app.modal.show(RepositoryModal, {\n name,\n repository,\n onsubmit: this.onchange.bind(this),\n })\n }\n >\n {name} ({repository.type})\n \n {\n if (confirm(extractText(app.translator.trans('flarum-package-manager.admin.composer.delete_repository_confirmation')))) {\n const repositories = { ...this.setting('repositories')() };\n delete repositories[name];\n\n this.setting('repositories')(repositories);\n }\n }}\n />\n
\n );\n })}\n
\n
\n
\n );\n }\n\n submitButton(): Mithril.Children[] {\n const items = super.submitButton();\n\n items.push(\n \n );\n\n return items;\n }\n\n onchange(repository: Repository, name: string) {\n this.setting('repositories')({\n ...this.setting('repositories')(),\n [name]: repository,\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport interface IAuthMethodModalAttrs extends IInternalModalAttrs {\n onsubmit: (type: string, host: string, token: string) => void;\n type?: string;\n host?: string;\n token?: string;\n}\n\nexport default class AuthMethodModal extends Modal {\n protected type!: Stream;\n protected host!: Stream;\n protected token!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.type = Stream(this.attrs.type || 'bearer');\n this.host = Stream(this.attrs.host || '');\n this.token = Stream(this.attrs.token || '');\n }\n\n className(): string {\n return 'AuthMethodModal Modal--small';\n }\n\n title(): Mithril.Children {\n const context = this.attrs.host ? 'edit' : 'add';\n return app.translator.trans(`flarum-package-manager.admin.auth_config.${context}_label`);\n }\n\n content(): Mithril.Children {\n const types = {\n 'github-oauth': app.translator.trans('flarum-package-manager.admin.auth_config.types.github-oauth'),\n 'gitlab-oauth': app.translator.trans('flarum-package-manager.admin.auth_config.types.gitlab-oauth'),\n 'gitlab-token': app.translator.trans('flarum-package-manager.admin.auth_config.types.gitlab-token'),\n bearer: app.translator.trans('flarum-package-manager.admin.auth_config.types.bearer'),\n };\n\n return (\n
\n
\n \n \n \n {app.translator.trans('flarum-package-manager.admin.extensions.proceed')}\n \n
\n
\n );\n }\n\n data(): any {\n return {\n package: this.packageName(),\n };\n }\n\n onsubmit(): void {\n app.packageManager.control.requirePackage(this.data());\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/admin/app';\n\nexport default function (e: any) {\n app.packageManager.control.setLoading(null);\n\n const error = e.response.errors[0];\n\n if (!['composer_command_failure', 'extension_already_installed', 'extension_not_installed'].includes(error.code)) {\n throw e;\n }\n\n app.alerts.clear();\n\n switch (error.code) {\n case 'composer_command_failure':\n if (error.guessed_cause) {\n app.alerts.show({ type: 'error' }, app.translator.trans(`flarum-package-manager.admin.exceptions.guessed_cause.${error.guessed_cause}`));\n app.modal.close();\n } else {\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.composer_command_failure'));\n }\n break;\n\n case 'extension_already_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.extension_already_installed'));\n app.modal.close();\n break;\n\n case 'extension_not_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.extension_not_installed'));\n app.modal.close();\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nimport errorHandler from '../utils/errorHandler';\n\ntype WhyNotResponse = {\n data: {\n reason: string;\n };\n};\n\nexport interface WhyNotModalAttrs extends IInternalModalAttrs {\n package: string;\n}\n\nexport default class WhyNotModal extends Modal {\n loading: boolean = true;\n whyNot: string | null = null;\n\n className() {\n return 'Modal--large WhyNotModal';\n }\n\n title() {\n return app.translator.trans('flarum-package-manager.admin.why_not_modal.title');\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n this.requestWhyNot();\n }\n\n content() {\n return
{this.loading ? :
{this.whyNot}
}
;\n }\n\n requestWhyNot(): void {\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/why-not`,\n body: {\n data: {\n package: this.attrs.package,\n },\n },\n })\n .then((response) => {\n this.loading = false;\n this.whyNot = response.data.reason;\n m.redraw();\n })\n .catch(errorHandler);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport { Extension } from 'flarum/admin/AdminApplication';\n\nimport { UpdatedPackage } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport Label from './Label';\nimport Dropdown from 'flarum/common/components/Dropdown';\n\nexport interface ExtensionItemAttrs extends ComponentAttrs {\n extension: Extension;\n updates: UpdatedPackage;\n onClickUpdate:\n | CallableFunction\n | {\n soft: CallableFunction;\n hard: CallableFunction;\n };\n whyNotWarning?: boolean;\n isCore?: boolean;\n updatable?: boolean;\n isDanger?: boolean;\n}\n\nexport default class ExtensionItem extends Component {\n view(vnode: Mithril.Vnode): Mithril.Children {\n const { extension, updates, onClickUpdate, whyNotWarning, isCore, isDanger } = this.attrs;\n const latestVersion = updates['latest-minor'] ?? (updates['latest-major'] && !isCore ? updates['latest-major'] : null);\n\n return (\n \n
\n {extension.icon ? icon(extension.icon.name) : ''}\n
\n
\n
{extension.extra['flarum-extension'].title}
\n
\n {this.version(updates['version'])}\n {latestVersion ? (\n \n ) : null}\n
\n
\n
\n {onClickUpdate && typeof onClickUpdate === 'function' ? (\n \n \n \n ) : onClickUpdate ? (\n \n \n \n \n ) : null}\n {whyNotWarning ? (\n \n app.modal.show(WhyNotModal, { package: extension.name })}\n aria-label={app.translator.trans('flarum-package-manager.admin.extensions.check_why_it_failed_updating')}\n />\n \n ) : null}\n
\n \n );\n }\n\n version(v: string): string {\n return v.charAt(0) === 'v' ? v.substring(1) : v;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Alert from 'flarum/common/components/Alert';\n\nimport { UpdatedPackage, UpdateState } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionItem from './ExtensionItem';\nimport classList from 'flarum/common/utils/classList';\n\nexport interface MajorUpdaterAttrs extends ComponentAttrs {\n coreUpdate: UpdatedPackage;\n updateState: UpdateState;\n}\n\nexport type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';\n\nexport default class MajorUpdater extends Component {\n updateState!: UpdateState;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.updateState = this.attrs.updateState;\n }\n\n view(): Mithril.Children {\n // @todo move Form-group--danger class to core for reuse\n return (\n \n \"flarum\n \n

{app.translator.trans('flarum-package-manager.admin.major_updater.description')}

\n
\n \n \n \n \n {app.translator.trans('flarum-package-manager.admin.major_updater.update')}\n \n
\n {this.updateState.incompatibleExtensions.length ? (\n
\n {this.updateState.incompatibleExtensions.map((extension: string) => (\n \n ))}\n
\n ) : null}\n {this.updateState.status === 'failure' ? (\n app.modal.show(WhyNotModal, { package: 'flarum/core' })}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.why')}\n ,\n ]}\n >\n

\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.desc')}\n

\n \n ) : null}\n \n );\n }\n\n update(dryRun: boolean) {\n app.packageManager.control.majorUpdate({ dryRun });\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport MajorUpdater from './MajorUpdater';\nimport ExtensionItem from './ExtensionItem';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport interface IUpdaterAttrs extends ComponentAttrs {}\n\nexport type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;\n\nexport default class Updater extends Component {\n view() {\n const core = app.packageManager.control.coreUpdate;\n\n return [\n
\n \n

{app.translator.trans('flarum-package-manager.admin.updater.updater_help')}

\n {this.lastUpdateCheckView()}\n
{this.controlItems().toArray()}
\n {this.availableUpdatesView()}\n
,\n core && core.package['latest-major'] ? (\n \n ) : null,\n ];\n }\n\n lastUpdateCheckView() {\n return (\n (app.packageManager.control.lastUpdateCheck?.checkedAt && (\n

\n \n {app.translator.trans('flarum-package-manager.admin.updater.last_update_checked_at')}\n \n {humanTime(app.packageManager.control.lastUpdateCheck.checkedAt)}\n

\n )) ||\n null\n );\n }\n\n availableUpdatesView() {\n const state = app.packageManager.control;\n\n if (app.packageManager.control.isLoading('check') || app.packageManager.control.isLoading('global-update')) {\n return (\n
\n \n
\n );\n }\n\n const hasMinorCoreUpdate = state.coreUpdate && state.coreUpdate.package['latest-minor'];\n\n if (!(state.extensionUpdates.length || hasMinorCoreUpdate)) {\n return (\n
\n {app.translator.trans('flarum-package-manager.admin.updater.up_to_date')}\n
\n );\n }\n\n return (\n
\n
\n {hasMinorCoreUpdate ? (\n state.updateCoreMinor()}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes('flarum/core')}\n />\n ) : null}\n {state.extensionUpdates.map((extension: Extension) => (\n state.updateExtension(extension, 'soft'),\n hard: () => state.updateExtension(extension, 'hard'),\n }}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes(extension.name)}\n />\n ))}\n
\n
\n );\n }\n\n controlItems() {\n const items = new ItemList();\n\n items.add(\n 'updateCheck',\n app.packageManager.control.checkForUpdates()}\n loading={app.packageManager.control.isLoading('check')}\n disabled={app.packageManager.control.isLoading()}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.check_for_updates')}\n ,\n 100\n );\n\n items.add(\n 'globalUpdate',\n app.packageManager.control.updateGlobally()}\n loading={app.packageManager.control.isLoading('global-update')}\n disabled={app.packageManager.control.isLoading()}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.run_global_update')}\n \n );\n\n return items;\n }\n}\n","import app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Alert from 'flarum/common/components/Alert';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nimport Installer from './Installer';\nimport Updater from './Updater';\nimport Mithril from 'mithril';\n\nexport default class ControlSection extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n
\n
\n
\n

{app.translator.trans('flarum-package-manager.admin.sections.control.title')}

\n
\n
\n
\n {app.data['flarum-package-manager.writable_dirs'] ? (\n <>\n \n \n \n ) : (\n
\n \n {app.translator.trans('flarum-package-manager.admin.file_permissions')}\n \n
\n )}\n
\n
\n );\n }\n}\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/AdminPage'];","import app from 'flarum/admin/app';\nimport type Mithril from 'mithril';\nimport Component, { type ComponentAttrs } from 'flarum/common/Component';\nimport { CommonSettingsItemOptions, type SettingsComponentOptions } from '@flarum/core/src/admin/components/AdminPage';\nimport AdminPage from 'flarum/admin/components/AdminPage';\nimport type ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\n\nexport interface IConfigureJson extends ComponentAttrs {\n buildSettingComponent: (entry: ((this: this) => Mithril.Children) | SettingsComponentOptions) => Mithril.Children;\n}\n\nexport default abstract class ConfigureJson extends Component {\n protected settings: Record> = {};\n protected initialSettings: Record | null = null;\n protected loading: boolean = false;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.submit(true);\n }\n\n protected abstract type: string;\n abstract title(): Mithril.Children;\n abstract content(): Mithril.Children;\n\n className(): string {\n return '';\n }\n\n view(): Mithril.Children {\n return (\n
\n \n {this.content()}\n
{this.submitButton()}
\n
\n );\n }\n\n submitButton(): Mithril.Children[] {\n return [\n ,\n ];\n }\n\n customSettingComponents(): ItemList<(attributes: CommonSettingsItemOptions) => Mithril.Children> {\n return AdminPage.prototype.customSettingComponents();\n }\n\n setting(key: string) {\n return this.settings[key] ?? (this.settings[key] = Stream());\n }\n\n submit(readOnly: boolean) {\n this.loading = true;\n\n const configuration: any = {};\n\n Object.keys(this.settings).forEach((key) => {\n configuration[key] = this.settings[key]();\n });\n\n app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/package-manager/composer',\n body: {\n type: this.type,\n data: readOnly ? null : configuration,\n },\n })\n .then(({ data }: any) => {\n Object.keys(data).forEach((key) => {\n this.settings[key] = Stream(data[key]);\n });\n\n this.initialSettings = Array.isArray(data) ? {} : data;\n })\n .finally(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n isDirty() {\n return JSON.stringify(this.initialSettings) !== JSON.stringify(this.settings);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport { type Repository } from './ConfigureComposer';\n\nexport interface IRepositoryModalAttrs extends IInternalModalAttrs {\n onsubmit: (repository: Repository, key: string) => void;\n name?: string;\n repository?: Repository;\n}\n\nexport default class RepositoryModal extends Modal {\n protected name!: Stream;\n protected repository!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.name = Stream(this.attrs.name || '');\n this.repository = Stream(this.attrs.repository || { type: 'composer', url: '' });\n }\n\n className(): string {\n return 'RepositoryModal Modal--small';\n }\n\n title(): Mithril.Children {\n const context = this.attrs.repository ? 'edit' : 'add';\n return app.translator.trans(`flarum-package-manager.admin.composer.${context}_repository_label`);\n }\n\n content(): Mithril.Children {\n const types = {\n composer: app.translator.trans('flarum-package-manager.admin.composer.repositories.types.composer'),\n vcs: app.translator.trans('flarum-package-manager.admin.composer.repositories.types.vcs'),\n path: app.translator.trans('flarum-package-manager.admin.composer.repositories.types.path'),\n };\n\n return (\n
\n
\n \n \n
\n
\n \n this.repository({ ...this.repository(), type: value })}\n />\n
\n
\n \n this.repository({ ...this.repository(), url: (e.target as HTMLInputElement).value })}\n value={this.repository().url}\n />\n
\n
\n \n
\n
\n );\n }\n\n submit() {\n this.attrs.onsubmit(this.repository(), this.name());\n this.hide();\n }\n}\n","import app from 'flarum/admin/app';\nimport type Mithril from 'mithril';\nimport ConfigureJson, { type IConfigureJson } from './ConfigureJson';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport RepositoryModal from './RepositoryModal';\n\nexport type Repository = {\n type: 'composer' | 'vcs' | 'path';\n url: string;\n};\n\nexport default class ConfigureComposer extends ConfigureJson {\n protected type = 'composer';\n\n title(): Mithril.Children {\n return app.translator.trans('flarum-package-manager.admin.composer.title');\n }\n\n className(): string {\n return 'ConfigureComposer';\n }\n\n content(): Mithril.Children {\n return (\n
\n {this.attrs.buildSettingComponent.call(this, {\n setting: 'minimum-stability',\n label: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.label'),\n help: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.help'),\n type: 'select',\n options: {\n stable: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.stable'),\n RC: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.rc'),\n beta: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.beta'),\n alpha: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.alpha'),\n dev: app.translator.trans('flarum-package-manager.admin.composer.minimum_stability.options.dev'),\n },\n })}\n
\n \n
{app.translator.trans('flarum-package-manager.admin.composer.repositories.help')}
\n
\n {Object.keys(this.setting('repositories')() || {}).map((name) => {\n const repository = this.setting('repositories')()[name] as Repository;\n\n return (\n
\n \n app.modal.show(RepositoryModal, {\n name,\n repository,\n onsubmit: (repository: Repository, newName: string) => {\n const repositories = this.setting('repositories')();\n delete repositories[name];\n\n this.setting('repositories')(repositories);\n\n this.onchange(repository, newName);\n },\n })\n }\n >\n {name} ({repository.type})\n \n {\n if (confirm(extractText(app.translator.trans('flarum-package-manager.admin.composer.delete_repository_confirmation')))) {\n const repositories = { ...this.setting('repositories')() };\n delete repositories[name];\n\n this.setting('repositories')(repositories);\n }\n }}\n />\n
\n );\n })}\n
\n
\n
\n );\n }\n\n submitButton(): Mithril.Children[] {\n const items = super.submitButton();\n\n items.push(\n \n );\n\n return items;\n }\n\n onchange(repository: Repository, name: string) {\n this.setting('repositories')({\n ...this.setting('repositories')(),\n [name]: repository,\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport interface IAuthMethodModalAttrs extends IInternalModalAttrs {\n onsubmit: (type: string, host: string, token: string) => void;\n type?: string;\n host?: string;\n token?: string;\n}\n\nexport default class AuthMethodModal extends Modal {\n protected type!: Stream;\n protected host!: Stream;\n protected token!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.type = Stream(this.attrs.type || 'bearer');\n this.host = Stream(this.attrs.host || '');\n this.token = Stream(this.attrs.token || '');\n }\n\n className(): string {\n return 'AuthMethodModal Modal--small';\n }\n\n title(): Mithril.Children {\n const context = this.attrs.host ? 'edit' : 'add';\n return app.translator.trans(`flarum-package-manager.admin.auth_config.${context}_label`);\n }\n\n content(): Mithril.Children {\n const types = {\n 'github-oauth': app.translator.trans('flarum-package-manager.admin.auth_config.types.github-oauth'),\n 'gitlab-oauth': app.translator.trans('flarum-package-manager.admin.auth_config.types.gitlab-oauth'),\n 'gitlab-token': app.translator.trans('flarum-package-manager.admin.auth_config.types.gitlab-token'),\n bearer: app.translator.trans('flarum-package-manager.admin.auth_config.types.bearer'),\n };\n\n return (\n
\n
\n \n