framework/extensions/package-manager/js/dist/admin.js.map
flarum-bot f6c9bbb427 Bundled output for commit feb968780a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-14 20:41:53 +00:00

1 line
93 KiB
Plaintext
Executable File
Generated

{"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,SAAS/B,EAAEC,GAAG,OAAOD,EAAEwB,EAAExB,GAAG,CAACgC,UAAS,EAAGC,OAAO,GAAGJ,EAAE7B,GAAGC,GAAG,CAAC+B,UAAS,EAAGC,OAAO,GAAGjC,EAAEC,GAAG,CAAC+B,UAAS,EAAGC,OAAO,GAAG,EAAEb,EAAE,WAAW,SAASI,EAAExB,EAAEC,EAAEC,GAAG,IAAIC,EAAE+B,KAAK,GAAGA,KAAKC,GAAG,CAAC,EAAED,KAAKZ,GAAGpB,OAAE,IAASF,IAAIkC,KAAKE,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IAAqB,0BAA0B,SAACA,GAC9CA,EAAI2N,MAAMC,OAAO,yBAA2B7D,GAE5C/J,EAAI6N,eAAiB,IAAIL,GAEzBxN,EAAI8N,cAAa,IACV,0BACJC,iBAAgB,kBACf,SAAKtO,UAAU,cACb,EAAC,IAAK,CAACC,KAAK,UAAU+H,aAAa,GAChCzH,EAAIgO,WAAWC,MAAM,yDAEpB,IAEPF,gBAAgB,CACfG,QAAS,oCACTvM,MAAO3B,EAAIgO,WAAWC,MAAM,oDAC5BE,KAAMhV,EAAEiV,MACNxM,IACE5B,EAAIgO,WAAWC,MAAM,wDAAyD,CAC5EI,gBAAiB,+FACjBC,cAAe,iEACfC,YAAa,WAAWvO,EAAIuF,KAAKiJ,WAAU,YAC3CC,kBAAmB,uDAIzBC,SAAS,EACThP,KAAM,UACNc,SAAUR,EAAIuF,KAAK,6CAEpBoJ,aAAa/F,KAEhB/F,EAAAA,EAAAA,QAAOmG,IAAAA,UAAyB,YAAY,SAAUvH,GAAO,WACjC,2BAAtB3H,KAAKgI,UAAUR,IAAmCsN,IAAmB9U,KAAKgI,UAAUR,KAIxFG,EAAM3F,IACJ,SACA,EAAC,IAAM,CACL2D,UAAU,wBACVoB,KAAK,eACLF,QAAS,WACPX,EAAI6O,MAAMC,KAAKrJ,KAEfzF,EACG+O,QAAqC,CACpCpJ,IAAQ3F,EAAIgP,MAAMC,UAAU,UAAS,+BAA+B,EAAKnN,UAAUR,GACnFoE,OAAQ,WAETG,MAAK,SAAC9B,GACO,MAARA,GAAAA,EAAU+B,WACZ1B,KAEApE,EAAIkP,OAAOJ,KAAK,CAAEpP,KAAM,WAAaM,EAAIgO,WAAWC,MAAM,8DAC1DrJ,OAAOoB,SAAWhG,EAAIgP,MAAMC,UAAU,YAE1C,IAAE,SACO,WACPjP,EAAI6O,MAAMM,OACZ,GACJ,GAAE,UAKR,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/external root \"flarum.core.compat['common/components/Alert']\"","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/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/utils/Stream']\"","webpack://@flarum/package-manager/./src/admin/utils/errorHandler.ts","webpack://@flarum/package-manager/./src/admin/utils/jumpToQueue.ts","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/components/WhyNotModal.tsx","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/./src/admin/components/SettingsPage.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/extends.js","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/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'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","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/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<LabelAttrs> {\n view(vnode: Mithril.Vnode<LabelAttrs, this>) {\n const { className, type, ...attrs } = this.attrs;\n\n return (\n <span className={classList(['Label', `Label--${this.attrs.type}`, className])} {...attrs}>\n {vnode.children}\n </span>\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<CustomAttrs extends TaskOutputModalAttrs = TaskOutputModalAttrs> extends Modal<CustomAttrs> {\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 <div className=\"Modal-body\">\n <div className=\"TaskOutputModal-data\">\n <div className=\"Form-group\">\n <label>{app.translator.trans('flarum-package-manager.admin.sections.queue.output_modal.command')}</label>\n <div className=\"FormControl TaskOutputModal-data-command\">\n <code>$ composer {this.attrs.task.command()}</code>\n </div>\n </div>\n <div className=\"Form-group\">\n <label>{app.translator.trans('flarum-package-manager.admin.sections.queue.output_modal.output')}</label>\n <div className=\"FormControl TaskOutputModal-data-output\">\n <code>\n <pre>{this.attrs.task.output()}</pre>\n </code>\n </div>\n </div>\n </div>\n </div>\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<PaginationAttrs> {\n view() {\n return (\n <nav className=\"Pagination UserListPage-gridPagination\">\n <Button\n disabled={!this.attrs.list.hasPrev()}\n title={app.translator.trans('core.admin.users.pagination.back_button')}\n onclick={() => this.attrs.list.prev()}\n icon=\"fas fa-chevron-left\"\n className=\"Button Button--icon UserListPage-backBtn\"\n />\n <span className=\"UserListPage-pageNumber\">\n {app.translator.trans('core.admin.users.pagination.page_counter', {\n current: this.attrs.list.pageNumber() + 1,\n total: this.attrs.list.getTotalPages(),\n })}\n </span>\n <Button\n disabled={!this.attrs.list.hasNext()}\n title={app.translator.trans('core.admin.users.pagination.next_button')}\n onclick={() => this.attrs.list.next()}\n icon=\"fas fa-chevron-right\"\n className=\"Button Button--icon UserListPage-nextBtn\"\n />\n </nav>\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';\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 <section id=\"PackageManager-queueSection\" className=\"ExtensionPage-permissions PackageManager-queueSection\">\n <div className=\"ExtensionPage-permissions-header PackageManager-queueSection-header\">\n <div className=\"container\">\n <h2 className=\"ExtensionTitle\">{app.translator.trans('flarum-package-manager.admin.sections.queue.title')}</h2>\n <Button\n className=\"Button Button--icon\"\n icon=\"fas fa-sync-alt\"\n onclick={() => app.packageManager.queue.load()}\n aria-label={app.translator.trans('flarum-package-manager.admin.sections.queue.refresh')}\n />\n </div>\n </div>\n <div className=\"container\">{this.queueTable()}</div>\n </section>\n );\n }\n\n columns() {\n const items = new ItemList<QueueTableColumn>();\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 <div className=\"PackageManager-queueTable-operation\">\n <span className=\"PackageManager-queueTable-operation-icon\">{this.operationIcon(task.operation())}</span>\n <span className=\"PackageManager-queueTable-operation-name\">\n {app.translator.trans(`flarum-package-manager.admin.sections.queue.operations.${task.operation()}`)}\n </span>\n </div>\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 <div className=\"PackageManager-queueTable-package\">\n <div className=\"PackageManager-queueTable-package-icon ExtensionIcon\" style={extension.icon}>\n {!!extension.icon && icon(extension.icon.name)}\n </div>\n <div className=\"PackageManager-queueTable-package-details\">\n <span className=\"PackageManager-queueTable-package-title\">{extension.extra['flarum-extension'].title}</span>\n <span className=\"PackageManager-queueTable-package-name\">{task.package()}</span>\n </div>\n </div>\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 <Label\n className=\"PackageManager-queueTable-status\"\n type={{ running: 'neutral', failure: 'error', pending: 'warning', success: 'success' }[task.status()]}\n >\n {app.translator.trans(`flarum-package-manager.admin.sections.queue.statuses.${task.status()}`)}\n </Label>\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() ? (\n app.translator.trans('flarum-package-manager.admin.sections.queue.task_just_started')\n ) : (\n <Tooltip text={`${dayjs(task.startedAt()).format('LL LTS')} ${dayjs(task.finishedAt()).format('LL LTS')}`}>\n <span>{humanDuration(task.startedAt(), task.finishedAt())}</span>\n </Tooltip>\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) => <span>{task.peakMemoryUsed()}</span>,\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 <Button\n className=\"Button Button--icon Table-controls-item\"\n icon=\"fas fa-file-alt\"\n aria-label={app.translator.trans('flarum-package-manager.admin.sections.queue.columns.details')}\n // @todo fix in core\n // @ts-ignore\n onclick={() => 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 <LoadingIndicator />;\n }\n\n if (tasks && !tasks.length) {\n return <h3 className=\"ExtensionPage-subHeader\">{app.translator.trans('flarum-package-manager.admin.sections.queue.none')}</h3>;\n }\n\n const columns = this.columns();\n\n return (\n <>\n <table className=\"Table PackageManager-queueTable\">\n <thead>\n <tr>\n {columns.toArray().map((item, index) => (\n <th key={index}>{item.label}</th>\n ))}\n </tr>\n </thead>\n <tbody>\n {tasks.map((task, index) => (\n <tr key={index}>\n {columns.toArray().map((item, index) => {\n const { label, content, ...attrs } = item;\n\n return (\n <td key={index} {...attrs}>\n {content(task)}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n\n <Pagination list={app.packageManager.queue} />\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/utils/Stream'];","import app from 'flarum/admin/app';\n\nexport default function (e: any) {\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 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 app from 'flarum/admin/app';\n\n// @ts-ignore\nwindow.jumpToQueue = jumpToQueue;\n\nexport default function jumpToQueue(): void {\n app.modal.close();\n m.route.set(app.route('extension', { id: 'flarum-package-manager' }));\n app.packageManager.queue.load();\n setTimeout(() => {\n document.getElementById('PackageManager-queueSection')?.scrollIntoView({ block: 'nearest' });\n }, 200);\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 Stream from 'flarum/common/utils/Stream';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\n\nimport errorHandler from '../utils/errorHandler';\nimport jumpToQueue from '../utils/jumpToQueue';\nimport { AsyncBackendResponse } from '../shims';\n\nexport interface InstallerAttrs extends ComponentAttrs {}\n\nexport type InstallerLoadingTypes = 'extension-install' | null;\n\nexport default class Installer extends Component<InstallerAttrs> {\n packageName!: Stream<string>;\n\n oninit(vnode: Mithril.Vnode<InstallerAttrs, this>): void {\n super.oninit(vnode);\n\n this.packageName = Stream('');\n }\n\n view(): Mithril.Children {\n return (\n <div className=\"Form-group PackageManager-installer\">\n <label htmlFor=\"install-extension\">{app.translator.trans('flarum-package-manager.admin.extensions.install')}</label>\n <p className=\"helpText\">\n {app.translator.trans('flarum-package-manager.admin.extensions.install_help', {\n extiverse: <a href=\"https://extiverse.com\">extiverse.com</a>,\n })}\n </p>\n <div className=\"FormControl-container\">\n <input className=\"FormControl\" id=\"install-extension\" placeholder=\"vendor/package-name\" bidi={this.packageName} />\n <Button\n className=\"Button\"\n icon=\"fas fa-download\"\n onclick={this.onsubmit.bind(this)}\n loading={app.packageManager.control.isLoading('extension-install')}\n disabled={app.packageManager.control.isLoadingOtherThan('extension-install')}\n >\n {app.translator.trans('flarum-package-manager.admin.extensions.proceed')}\n </Button>\n </div>\n </div>\n );\n }\n\n data(): any {\n return {\n package: this.packageName(),\n };\n }\n\n onsubmit(): void {\n app.packageManager.control.setLoading('extension-install');\n app.modal.show(LoadingModal);\n\n app\n .request<AsyncBackendResponse & { id: number }>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions`,\n body: {\n data: this.data(),\n },\n })\n .then((response) => {\n if (response.processing) {\n jumpToQueue();\n } else {\n const extensionId = response.id;\n app.alerts.show(\n { type: 'success' },\n app.translator.trans('flarum-package-manager.admin.extensions.successful_install', { extension: extensionId })\n );\n window.location.href = `${app.forum.attribute('adminUrl')}#/extension/${extensionId}`;\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n app.packageManager.control.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","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<CustomAttrs extends WhyNotModalAttrs = WhyNotModalAttrs> extends Modal<CustomAttrs> {\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<CustomAttrs, this>) {\n super.oncreate(vnode);\n\n this.requestWhyNot();\n }\n\n content() {\n return <div className=\"Modal-body\">{this.loading ? <LoadingIndicator /> : <pre className=\"WhyNotModal-contents\">{this.whyNot}</pre>}</div>;\n }\n\n requestWhyNot(): void {\n app\n .request<WhyNotResponse>({\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","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';\n\nexport interface ExtensionItemAttrs extends ComponentAttrs {\n extension: Extension;\n updates: UpdatedPackage;\n onClickUpdate: CallableFunction;\n whyNotWarning?: boolean;\n isCore?: boolean;\n updatable?: boolean;\n isDanger?: boolean;\n}\n\nexport default class ExtensionItem<Attrs extends ExtensionItemAttrs = ExtensionItemAttrs> extends Component<Attrs> {\n view(vnode: Mithril.Vnode<Attrs, this>): 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 <div\n className={classList({\n 'PackageManager-extension': true,\n 'PackageManager-extension--core': isCore,\n 'PackageManager-extension--danger': isDanger,\n })}\n >\n <div className=\"PackageManager-extension-icon ExtensionIcon\" style={extension.icon}>\n {extension.icon ? icon(extension.icon.name) : ''}\n </div>\n <div className=\"PackageManager-extension-info\">\n <div className=\"PackageManager-extension-name\">{extension.extra['flarum-extension'].title}</div>\n <div className=\"PackageManager-extension-version\">\n <span className=\"PackageManager-extension-version-current\">{this.version(updates['version'])}</span>\n {latestVersion ? (\n <Label className=\"PackageManager-extension-version-latest\" type={updates['latest-minor'] ? 'success' : 'warning'}>\n {this.version(latestVersion)}\n </Label>\n ) : null}\n </div>\n </div>\n <div className=\"PackageManager-extension-controls\">\n {onClickUpdate ? (\n <Tooltip text={app.translator.trans('flarum-package-manager.admin.extensions.update')}>\n <Button\n icon=\"fas fa-arrow-alt-circle-up\"\n className=\"Button Button--icon Button--flat\"\n onclick={onClickUpdate}\n aria-label={app.translator.trans('flarum-package-manager.admin.extensions.update')}\n />\n </Tooltip>\n ) : null}\n {whyNotWarning ? (\n <Tooltip text={app.translator.trans('flarum-package-manager.admin.extensions.check_why_it_failed_updating')}>\n <Button\n icon=\"fas fa-exclamation-circle\"\n className=\"Button Button--icon Button--flat Button--danger\"\n onclick={() => 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 </Tooltip>\n ) : null}\n </div>\n </div>\n );\n }\n\n version(v: string): string {\n return 'v' + v.replace('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 LoadingModal from 'flarum/admin/components/LoadingModal';\nimport Alert from 'flarum/common/components/Alert';\nimport RequestError from 'flarum/common/utils/RequestError';\n\nimport { UpdatedPackage, UpdateState } from '../states/ControlSectionState';\nimport errorHandler from '../utils/errorHandler';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionItem from './ExtensionItem';\nimport { AsyncBackendResponse } from '../shims';\nimport jumpToQueue from '../utils/jumpToQueue';\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<T extends MajorUpdaterAttrs = MajorUpdaterAttrs> extends Component<T> {\n updateState!: UpdateState;\n\n oninit(vnode: Mithril.Vnode<T, this>) {\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 <div className=\"Form-group Form-group--danger PackageManager-majorUpdate\">\n <img alt=\"flarum logo\" src={app.forum.attribute('baseUrl') + '/assets/extensions/flarum-package-manager/flarum.svg'} />\n <label>{app.translator.trans('flarum-package-manager.admin.major_updater.title', { version: this.attrs.coreUpdate['latest-major'] })}</label>\n <p className=\"helpText\">{app.translator.trans('flarum-package-manager.admin.major_updater.description')}</p>\n <div className=\"PackageManager-updaterControls\">\n <Tooltip text={app.translator.trans('flarum-package-manager.admin.major_updater.dry_run_help')}>\n <Button\n className=\"Button\"\n icon=\"fas fa-vial\"\n onclick={this.update.bind(this, true)}\n disabled={app.packageManager.control.isLoadingOtherThan('major-update-dry-run')}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.dry_run')}\n </Button>\n </Tooltip>\n <Button\n className=\"Button Button--danger\"\n icon=\"fas fa-play\"\n onclick={this.update.bind(this, false)}\n disabled={app.packageManager.control.isLoadingOtherThan('major-update')}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.update')}\n </Button>\n </div>\n {this.updateState.incompatibleExtensions.length ? (\n <div className=\"PackageManager-majorUpdate-incompatibleExtensions PackageManager-extensions-grid\">\n {this.updateState.incompatibleExtensions.map((extension: string) => (\n <ExtensionItem\n extension={app.data.extensions[extension.replace('flarum-', '').replace('flarum-ext-', '').replace('/', '-')]}\n updates={{}}\n onClickUpdate={null}\n isDanger={true}\n />\n ))}\n </div>\n ) : null}\n {this.updateState.status === 'failure' ? (\n <Alert\n type=\"error\"\n className=\"PackageManager-majorUpdate-failure\"\n dismissible={false}\n controls={[\n <Button\n className=\"Button Button--text PackageManager-majorUpdate-failure-details\"\n icon=\"fas fa-question-circle\"\n onclick={() => app.modal.show(WhyNotModal, { package: 'flarum/core' })}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.why')}\n </Button>,\n ]}\n >\n <p className=\"PackageManager-majorUpdate-failure-desc\">\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.desc')}\n </p>\n </Alert>\n ) : null}\n </div>\n );\n }\n\n update(dryRun: boolean) {\n app.packageManager.control.setLoading(dryRun ? 'major-update-dry-run' : 'major-update');\n app.modal.show(LoadingModal);\n\n app\n .request<AsyncBackendResponse | null>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/major-update`,\n body: {\n data: { dryRun },\n },\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.update_successful'));\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .catch((e: RequestError) => {\n app.modal.close();\n this.updateState.status = 'failure';\n this.updateState.incompatibleExtensions = e.response?.errors?.pop()?.incompatible_extensions as string[];\n })\n .finally(() => {\n app.packageManager.control.setLoading(null);\n m.redraw();\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 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 Alert from 'flarum/common/components/Alert';\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<IUpdaterAttrs> {\n view() {\n const core = app.packageManager.control.coreUpdate;\n\n return [\n <div className=\"Form-group\">\n <label>{app.translator.trans('flarum-package-manager.admin.updater.updater_title')}</label>\n <p className=\"helpText\">{app.translator.trans('flarum-package-manager.admin.updater.updater_help')}</p>\n {this.lastUpdateCheckView()}\n <div className=\"PackageManager-updaterControls\">{this.controlItems().toArray()}</div>\n {this.availableUpdatesView()}\n </div>,\n core && core.package['latest-major'] ? (\n <MajorUpdater coreUpdate={core.package} updateState={app.packageManager.control.lastUpdateRun.major} />\n ) : null,\n ];\n }\n\n lastUpdateCheckView() {\n return (\n (app.packageManager.control.lastUpdateCheck?.checkedAt && (\n <p className=\"PackageManager-lastUpdatedAt\">\n <span className=\"PackageManager-lastUpdatedAt-label\">\n {app.translator.trans('flarum-package-manager.admin.updater.last_update_checked_at')}\n </span>\n <span className=\"PackageManager-lastUpdatedAt-value\">{humanTime(app.packageManager.control.lastUpdateCheck.checkedAt)}</span>\n </p>\n )) ||\n null\n );\n }\n\n availableUpdatesView() {\n const state = app.packageManager.control;\n\n if (app.packageManager.control.isLoading()) {\n return (\n <div className=\"PackageManager-extensions\">\n <LoadingIndicator />\n </div>\n );\n }\n\n if (!(state.extensionUpdates.length || state.coreUpdate)) {\n return (\n <div className=\"PackageManager-extensions\">\n <Alert type=\"success\" dismissible={false}>\n {app.translator.trans('flarum-package-manager.admin.updater.up_to_date')}\n </Alert>\n </div>\n );\n }\n\n return (\n <div className=\"PackageManager-extensions\">\n <div className=\"PackageManager-extensions-grid\">\n {state.coreUpdate ? (\n <ExtensionItem\n extension={state.coreUpdate.extension}\n updates={state.coreUpdate.package}\n isCore={true}\n onClickUpdate={() => state.updateCoreMinor()}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes('flarum/core')}\n />\n ) : null}\n {state.extensionUpdates.map((extension: Extension) => (\n <ExtensionItem\n extension={extension}\n updates={state.packageUpdates[extension.id]}\n onClickUpdate={() => state.updateExtension(extension)}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes(extension.name)}\n />\n ))}\n </div>\n </div>\n );\n }\n\n controlItems() {\n const items = new ItemList();\n\n items.add(\n 'updateCheck',\n <Button\n className=\"Button\"\n icon=\"fas fa-sync-alt\"\n onclick={() => app.packageManager.control.checkForUpdates()}\n loading={app.packageManager.control.isLoading('check')}\n disabled={app.packageManager.control.isLoadingOtherThan('check')}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.check_for_updates')}\n </Button>,\n 100\n );\n\n items.add(\n 'globalUpdate',\n <Button\n className=\"Button\"\n icon=\"fas fa-play\"\n onclick={() => app.packageManager.control.updateGlobally()}\n loading={app.packageManager.control.isLoading('global-update')}\n disabled={app.packageManager.control.isLoadingOtherThan('global-update')}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.run_global_update')}\n </Button>\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<ComponentAttrs> {\n oninit(vnode: Mithril.Vnode<ComponentAttrs, this>) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n <div className=\"ExtensionPage-permissions PackageManager-controlSection\">\n <div className=\"ExtensionPage-permissions-header\">\n <div className=\"container\">\n <h2 className=\"ExtensionTitle\">{app.translator.trans('flarum-package-manager.admin.sections.control.title')}</h2>\n </div>\n </div>\n <div className=\"container\">\n {app.data['flarum-package-manager.writable_dirs'] ? (\n <>\n <Installer />\n <Updater />\n </>\n ) : (\n <div className=\"Form-group\">\n <Alert type=\"warning\" dismissible={false}>\n {app.translator.trans('flarum-package-manager.admin.file_permissions')}\n </Alert>\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport ExtensionPage, { ExtensionPageAttrs } from 'flarum/admin/components/ExtensionPage';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nimport QueueSection from './QueueSection';\nimport ControlSection from './ControlSection';\n\nexport default class SettingsPage extends ExtensionPage {\n sections(vnode: Mithril.VnodeDOM<ExtensionPageAttrs, this>): ItemList<unknown> {\n const items = super.sections(vnode);\n\n items.setPriority('content', 10);\n\n items.add('control', <ControlSection />, 8);\n\n if (parseInt(app.data.settings['flarum-package-manager.queue_jobs'])) {\n items.add('queue', <QueueSection />, 5);\n }\n\n items.setPriority('permissions', 0);\n\n return items;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","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 BYTE_UNITS = [\n\t'B',\n\t'kB',\n\t'MB',\n\t'GB',\n\t'TB',\n\t'PB',\n\t'EB',\n\t'ZB',\n\t'YB',\n];\n\nconst BIBYTE_UNITS = [\n\t'B',\n\t'kiB',\n\t'MiB',\n\t'GiB',\n\t'TiB',\n\t'PiB',\n\t'EiB',\n\t'ZiB',\n\t'YiB',\n];\n\nconst BIT_UNITS = [\n\t'b',\n\t'kbit',\n\t'Mbit',\n\t'Gbit',\n\t'Tbit',\n\t'Pbit',\n\t'Ebit',\n\t'Zbit',\n\t'Ybit',\n];\n\nconst BIBIT_UNITS = [\n\t'b',\n\t'kibit',\n\t'Mibit',\n\t'Gibit',\n\t'Tibit',\n\t'Pibit',\n\t'Eibit',\n\t'Zibit',\n\t'Yibit',\n];\n\n/*\nFormats the given number using `Number#toLocaleString`.\n- If locale is a string, the value is expected to be a locale-key (for example: `de`).\n- If locale is true, the system default locale is used for translation.\n- If no value for locale is specified, the number is returned unmodified.\n*/\nconst toLocaleString = (number, locale, options) => {\n\tlet result = number;\n\tif (typeof locale === 'string' || Array.isArray(locale)) {\n\t\tresult = number.toLocaleString(locale, options);\n\t} else if (locale === true || options !== undefined) {\n\t\tresult = number.toLocaleString(undefined, options);\n\t}\n\n\treturn result;\n};\n\nexport default function prettyBytes(number, options) {\n\tif (!Number.isFinite(number)) {\n\t\tthrow new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);\n\t}\n\n\toptions = {\n\t\tbits: false,\n\t\tbinary: false,\n\t\t...options,\n\t};\n\n\tconst UNITS = options.bits\n\t\t? (options.binary ? BIBIT_UNITS : BIT_UNITS)\n\t\t: (options.binary ? BIBYTE_UNITS : BYTE_UNITS);\n\n\tif (options.signed && number === 0) {\n\t\treturn ` 0 ${UNITS[0]}`;\n\t}\n\n\tconst isNegative = number < 0;\n\tconst prefix = isNegative ? '-' : (options.signed ? '+' : '');\n\n\tif (isNegative) {\n\t\tnumber = -number;\n\t}\n\n\tlet localeOptions;\n\n\tif (options.minimumFractionDigits !== undefined) {\n\t\tlocaleOptions = {minimumFractionDigits: options.minimumFractionDigits};\n\t}\n\n\tif (options.maximumFractionDigits !== undefined) {\n\t\tlocaleOptions = {maximumFractionDigits: options.maximumFractionDigits, ...localeOptions};\n\t}\n\n\tif (number < 1) {\n\t\tconst numberString = toLocaleString(number, options.locale, localeOptions);\n\t\treturn prefix + numberString + ' ' + UNITS[0];\n\t}\n\n\tconst exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);\n\tnumber /= (options.binary ? 1024 : 1000) ** exponent;\n\n\tif (!localeOptions) {\n\t\tnumber = number.toPrecision(3);\n\t}\n\n\tconst numberString = toLocaleString(Number(number), options.locale, localeOptions);\n\n\tconst unit = UNITS[exponent];\n\n\treturn prefix + numberString + ' ' + unit;\n}\n","import Model from 'flarum/common/Model';\nimport prettyBytes from 'pretty-bytes';\n\nexport type TaskOperations =\n | 'extension_install'\n | 'extension_remove'\n | 'extension_update'\n | 'update_global'\n | 'update_minor'\n | 'update_major'\n | 'update_check'\n | 'why_not';\n\nexport default class Task extends Model {\n status() {\n return Model.attribute<'pending' | 'running' | 'failure' | 'success'>('status').call(this);\n }\n\n operation() {\n return Model.attribute<TaskOperations>('operation').call(this);\n }\n\n command() {\n return Model.attribute<string>('command').call(this);\n }\n\n package() {\n return Model.attribute<string>('package').call(this);\n }\n\n output() {\n return Model.attribute<string>('output').call(this);\n }\n\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n startedAt() {\n return Model.attribute<Date, string>('startedAt', Model.transformDate).call(this);\n }\n\n finishedAt() {\n return Model.attribute<Date, string>('finishedAt', Model.transformDate).call(this);\n }\n\n peakMemoryUsed() {\n return prettyBytes(Model.attribute<number>('peakMemoryUsed').call(this) * 1024);\n }\n}\n","import app from 'flarum/admin/app';\nimport Task from '../models/Task';\nimport { ApiQueryParamsPlural } from 'flarum/common/Store';\n\nexport default class QueueState {\n private tasks: Task[] | null = null;\n private limit = 20;\n private offset = 0;\n private total = 0;\n\n load(params?: ApiQueryParamsPlural) {\n this.tasks = null;\n params = {\n page: {\n limit: this.limit,\n offset: this.offset,\n ...params?.page,\n },\n ...params,\n };\n\n return app.store.find<Task[]>('package-manager-tasks', params || {}).then((data) => {\n this.tasks = data;\n this.total = data.payload.meta?.total;\n\n m.redraw();\n\n return data;\n });\n }\n\n getItems() {\n return this.tasks;\n }\n\n getTotalPages(): number {\n return Math.ceil(this.total / this.limit);\n }\n\n pageNumber(): number {\n return Math.ceil(this.offset / this.limit);\n }\n\n hasPrev(): boolean {\n return this.pageNumber() !== 0;\n }\n\n hasNext(): boolean {\n return this.offset + this.limit < this.total;\n }\n\n prev(): void {\n if (this.hasPrev()) {\n this.offset -= this.limit;\n this.load();\n }\n }\n\n next(): void {\n if (this.hasNext()) {\n this.offset += this.limit;\n this.load();\n }\n }\n}\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import app from 'flarum/admin/app';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport { UpdaterLoadingTypes } from '../components/Updater';\nimport { InstallerLoadingTypes } from '../components/Installer';\nimport { MajorUpdaterLoadingTypes } from '../components/MajorUpdater';\nimport { AsyncBackendResponse } from '../shims';\nimport errorHandler from '../utils/errorHandler';\nimport jumpToQueue from '../utils/jumpToQueue';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport type UpdatedPackage = {\n name: string;\n version: string;\n latest: string;\n 'latest-minor': string | null;\n 'latest-major': string | null;\n 'latest-status': string;\n description: string;\n};\n\nexport type ComposerUpdates = {\n installed: UpdatedPackage[];\n};\n\nexport type LastUpdateCheck = {\n checkedAt: Date | null;\n updates: ComposerUpdates;\n};\n\ntype UpdateType = 'major' | 'minor' | 'global';\ntype UpdateStatus = 'success' | 'failure' | null;\nexport type UpdateState = {\n ranAt: Date | null;\n status: UpdateStatus;\n limitedPackages: string[];\n incompatibleExtensions: string[];\n};\n\nexport type LastUpdateRun = {\n [key in UpdateType]: UpdateState;\n} & {\n limitedPackages: () => string[];\n};\n\nexport type LoadingTypes = UpdaterLoadingTypes | InstallerLoadingTypes | MajorUpdaterLoadingTypes;\n\nexport type CoreUpdate = {\n package: UpdatedPackage;\n extension: Extension;\n};\n\nexport default class ControlSectionState {\n loading: LoadingTypes = null;\n\n public packageUpdates: Record<string, UpdatedPackage> = {};\n public lastUpdateCheck!: LastUpdateCheck;\n public extensionUpdates!: Extension[];\n public coreUpdate: CoreUpdate | null = null;\n get lastUpdateRun(): LastUpdateRun {\n const lastUpdateRun = JSON.parse(app.data.settings['flarum-package-manager.last_update_run']) as LastUpdateRun;\n\n lastUpdateRun.limitedPackages = () => [\n ...lastUpdateRun.major.limitedPackages,\n ...lastUpdateRun.minor.limitedPackages,\n ...lastUpdateRun.global.limitedPackages,\n ];\n\n return lastUpdateRun;\n }\n\n constructor() {\n this.lastUpdateCheck = JSON.parse(app.data.settings['flarum-package-manager.last_update_check']) as LastUpdateCheck;\n this.extensionUpdates = this.formatExtensionUpdates(this.lastUpdateCheck);\n this.coreUpdate = this.formatCoreUpdate(this.lastUpdateCheck);\n }\n\n isLoading(name: LoadingTypes = null): boolean {\n return (name && this.loading === name) || (!name && this.loading !== null);\n }\n\n isLoadingOtherThan(name: LoadingTypes): boolean {\n return this.loading !== null && this.loading !== name;\n }\n\n setLoading(name: LoadingTypes): void {\n this.loading = name;\n }\n\n checkForUpdates() {\n this.setLoading('check');\n\n app\n .request<AsyncBackendResponse | LastUpdateCheck>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/check-for-updates`,\n })\n .then((response) => {\n if ((response as AsyncBackendResponse).processing) {\n jumpToQueue();\n } else {\n this.lastUpdateCheck = response as LastUpdateCheck;\n this.extensionUpdates = this.formatExtensionUpdates(response as LastUpdateCheck);\n this.coreUpdate = this.formatCoreUpdate(response as LastUpdateCheck);\n m.redraw();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n this.setLoading(null);\n m.redraw();\n });\n }\n\n updateCoreMinor() {\n if (confirm(extractText(app.translator.trans('flarum-package-manager.admin.minor_update_confirmation.content')))) {\n app.modal.show(LoadingModal);\n this.setLoading('minor-update');\n\n app\n .request<AsyncBackendResponse | null>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/minor-update`,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.update_successful'));\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n }\n\n updateExtension(extension: Extension) {\n app.modal.show(LoadingModal);\n this.setLoading('extension-update');\n\n app\n .request<AsyncBackendResponse | null>({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions/${extension.id}`,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show(\n { type: 'success' },\n app.translator.trans('flarum-package-manager.admin.extensions.successful_update', {\n extension: extension.extra['flarum-extension'].title,\n })\n );\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n\n updateGlobally() {\n app.modal.show(LoadingModal);\n this.setLoading('global-update');\n\n app\n .request<AsyncBackendResponse | null>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/global-update`,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.updater.global_update_successful'));\n window.location.reload();\n }\n })\n .catch(errorHandler)\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n\n formatExtensionUpdates(lastUpdateCheck: LastUpdateCheck): Extension[] {\n this.packageUpdates = {};\n\n lastUpdateCheck?.updates?.installed?.filter((composerPackage: UpdatedPackage) => {\n const id = composerPackage.name.replace('/', '-').replace(/(flarum-ext-)|(flarum-)/, '');\n\n const extension = app.data.extensions[id];\n const safeToUpdate = ['semver-safe-update', 'update-possible'].includes(composerPackage['latest-status']);\n\n if (extension && safeToUpdate) {\n this.packageUpdates[extension.id] = composerPackage;\n }\n\n return extension && safeToUpdate;\n });\n\n return (Object.values(app.data.extensions) as Extension[]).filter((extension: Extension) => this.packageUpdates[extension.id]);\n }\n\n formatCoreUpdate(lastUpdateCheck: LastUpdateCheck): CoreUpdate | null {\n const core = lastUpdateCheck?.updates?.installed?.filter((composerPackage: UpdatedPackage) => composerPackage.name === 'flarum/core').pop();\n\n if (!core) return null;\n\n return {\n package: core,\n extension: {\n id: 'flarum-core',\n name: 'flarum/core',\n version: app.data.settings.version,\n icon: {\n // @ts-ignore\n backgroundImage: `url(${app.data.resources[0]['attributes']['baseUrl']}/assets/extensions/flarum-package-manager/flarum.svg`,\n },\n extra: {\n 'flarum-extension': {\n title: extractText(app.translator.trans('flarum-package-manager.admin.updater.flarum')),\n },\n },\n },\n };\n }\n}\n","import QueueState from './QueueState';\nimport ControlSectionState from './ControlSectionState';\n\nexport default class PackageManagerState {\n public queue: QueueState = new QueueState();\n public control: ControlSectionState = new ControlSectionState();\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport isExtensionEnabled from 'flarum/admin/utils/isExtensionEnabled';\nimport Alert from 'flarum/common/components/Alert';\n\nimport SettingsPage from './components/SettingsPage';\nimport Task from './models/Task';\nimport jumpToQueue from './utils/jumpToQueue';\nimport extractText from 'flarum/common/utils/extractText';\nimport { AsyncBackendResponse } from './shims';\nimport PackageManagerState from './states/PackageManagerState';\n\napp.initializers.add('flarum-package-manager', (app) => {\n app.store.models['package-manager-tasks'] = Task;\n\n app.packageManager = new PackageManagerState();\n\n app.extensionData\n .for('flarum-package-manager')\n .registerSetting(() => (\n <div className=\"Form-group\">\n <Alert type=\"warning\" dismissible={false}>\n {app.translator.trans('flarum-package-manager.admin.settings.access_warning')}\n </Alert>\n </div>\n ))\n .registerSetting({\n setting: 'flarum-package-manager.queue_jobs',\n label: app.translator.trans('flarum-package-manager.admin.settings.queue_jobs'),\n help: m.trust(\n extractText(\n app.translator.trans('flarum-package-manager.admin.settings.queue_jobs_help', {\n basic_impl_link: 'https://discuss.flarum.org/d/28151-database-queue-the-simplest-queue-even-for-shared-hosting',\n adv_impl_link: 'https://discuss.flarum.org/d/21873-redis-sessions-cache-queues',\n php_version: `<strong>${app.data.phpVersion}</strong>`,\n folder_perms_link: 'https://docs.flarum.org/install#folder-ownership',\n })\n )\n ),\n default: false,\n type: 'boolean',\n disabled: app.data['flarum-package-manager.using_sync_queue'],\n })\n .registerPage(SettingsPage);\n\n extend(ExtensionPage.prototype, 'topItems', function (items) {\n if (this.extension.id === 'flarum-package-manager' || isExtensionEnabled(this.extension.id)) {\n return;\n }\n\n items.add(\n 'remove',\n <Button\n className=\"Button Button--danger\"\n icon=\"fas fa-times\"\n onclick={() => {\n app.modal.show(LoadingModal);\n\n app\n .request<AsyncBackendResponse | null>({\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions/${this.extension.id}`,\n method: 'DELETE',\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.extensions.successful_remove'));\n window.location = app.forum.attribute('adminUrl');\n }\n })\n .finally(() => {\n app.modal.close();\n });\n }}\n >\n Remove\n </Button>\n );\n });\n});\n"],"names":["module","exports","t","s","n","i","e","r","o","u","h","a","d","years","months","days","hours","minutes","seconds","milliseconds","weeks","c","p","f","$l","m","l","$","Math","ceil","floor","y","abs","g","negative","format","this","$d","$ms","parseFromMilliseconds","Object","keys","forEach","calMilliseconds","match","slice","map","Number","prototype","reduce","toISOString","toJSON","Y","YY","YYYY","M","MM","D","DD","H","HH","mm","ss","SSS","replace","String","as","get","add","subtract","locale","clone","humanize","fromNow","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","$utils","duration","isDuration","bind","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call","getter","__esModule","definition","key","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","length","indexOf","Label","view","vnode","attrs","className","type","classList","children","Component","TaskOutputModal","title","app","task","operation","content","command","output","Modal","Pagination","disabled","list","hasPrev","onclick","prev","icon","current","pageNumber","total","getTotalPages","hasNext","next","QueueSection","oninit","id","queueTable","columns","items","ItemList","label","extractText","operationIcon","extension","style","name","extra","running","failure","pending","success","status","startedAt","text","dayjs","finishedAt","start","end","extend","durationTime","diff","humanDuration","peakMemoryUsed","tasks","toArray","item","index","update_check","update_major","update_minor","update_global","extension_install","extension_remove","extension_update","why_not","error","response","errors","includes","code","guessed_cause","jumpToQueue","route","set","setTimeout","document","getElementById","scrollIntoView","block","window","Installer","packageName","Stream","htmlFor","extiverse","href","placeholder","bidi","onsubmit","loading","data","package","LoadingModal","method","url","body","then","processing","extensionId","location","reload","errorHandler","redraw","WhyNotModal","whyNot","oncreate","requestWhyNot","reason","ExtensionItem","updates","onClickUpdate","whyNotWarning","isCore","isDanger","latestVersion","version","v","MajorUpdater","updateState","alt","src","coreUpdate","update","incompatibleExtensions","dismissible","controls","dryRun","pop","incompatible_extensions","Updater","lastUpdateCheckView","controlItems","availableUpdatesView","checkedAt","humanTime","state","extensionUpdates","updateCoreMinor","lastUpdateRun","limitedPackages","packageUpdates","updateExtension","ControlSection","SettingsPage","sections","setPriority","parseInt","ExtensionPage","_extends","assign","arguments","apply","BYTE_UNITS","BIBYTE_UNITS","BIT_UNITS","BIBIT_UNITS","toLocaleString","number","options","result","Array","isArray","Task","Model","createdAt","isFinite","TypeError","UNITS","bits","binary","signed","localeOptions","isNegative","prefix","minimumFractionDigits","maximumFractionDigits","exponent","min","log","log10","toPrecision","prettyBytes","QueueState","limit","offset","load","params","page","payload","meta","getItems","_defineProperties","props","descriptor","configurable","writable","ControlSectionState","lastUpdateCheck","JSON","parse","formatExtensionUpdates","formatCoreUpdate","Constructor","protoProps","isLoading","isLoadingOtherThan","setLoading","checkForUpdates","confirm","updateGlobally","installed","filter","composerPackage","safeToUpdate","values","backgroundImage","major","minor","global","PackageManagerState","queue","control","store","models","packageManager","extensionData","registerSetting","translator","trans","setting","help","trust","basic_impl_link","adv_impl_link","php_version","phpVersion","folder_perms_link","default","registerPage","isExtensionEnabled","modal","show","request","forum","attribute","alerts","close"],"sourceRoot":""}