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

[skip ci]
2022-04-09 22:06:48 +00:00

1 line
42 KiB
Plaintext
Executable File
Generated

{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,2B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,kC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iC,aCAzC,SAASC,EAAgBhB,EAAGiB,GAMzC,OALAD,EAAkBf,OAAOiB,gBAAkB,SAAyBlB,EAAGiB,GAErE,OADAjB,EAAEmB,UAAYF,EACPjB,GAGFgB,EAAgBhB,EAAGiB,GCLb,SAASG,EAAeC,EAAUC,GAC/CD,EAASd,UAAYN,OAAOsB,OAAOD,EAAWf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K,CAAE1H,KAAM,WAAaD,EAAImH,WAAWC,MAAM,8DAC1DpF,OAAOC,SAAWjC,EAAI6H,MAAMC,UAAU,eAP1C,SASW,WACP9H,EAAI0H,MAAMM,aAhBlB,kB","sources":["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['common/components/Alert']\"","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/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/Component']\"","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/components/Installer.tsx","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/extractText']\"","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/components/Modal']\"","webpack://@flarum/package-manager/./src/admin/components/WhyNotModal.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/helpers/icon']\"","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/external root \"flarum.core.compat['admin/utils/isExtensionEnabled']\"","webpack://@flarum/package-manager/./src/admin/index.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\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['common/components/Alert'];","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'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\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}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","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 type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component 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';\nimport errorHandler from '../utils/errorHandler';\n\nexport default class Installer<Attrs> extends Component<Attrs> {\n packageName!: Stream<string>;\n isLoading: boolean = false;\n\n oninit(vnode: Mithril.Vnode<Attrs, this>): void {\n super.oninit(vnode);\n\n this.packageName = Stream('');\n }\n\n view(): Mithril.Children {\n return (\n <div className=\"Form-group\">\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 className=\"Button\" icon=\"fas fa-download\" onclick={this.onsubmit.bind(this)} loading={this.isLoading}>\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 this.isLoading = true;\n app.modal.show(LoadingModal);\n\n app\n .request<{ id: string }>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions`,\n body: {\n data: this.data(),\n },\n errorHandler,\n })\n .then((response) => {\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 .finally(() => {\n this.isLoading = false;\n m.redraw();\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}\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}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","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/components/Modal'];","import app from 'flarum/admin/app';\nimport Mithril from 'mithril';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport errorHandler from '../utils/errorHandler';\n\nexport interface WhyNotModalAttrs extends IInternalModalAttrs {\n package: string;\n}\n\nexport default class WhyNotModal<Attrs extends WhyNotModalAttrs = WhyNotModalAttrs> extends Modal<Attrs> {\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<Attrs, 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({\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 errorHandler,\n })\n .then((response: any) => {\n this.loading = false;\n this.whyNot = response.data.whyNot;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import 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 as BaseExtension } from 'flarum/admin/AdminApplication';\nimport { UpdatedPackage } from './Updater';\nimport WhyNotModal from './WhyNotModal';\n\n/*\n * @todo fix in core\n */\nexport type Extension = BaseExtension & {\n name: string;\n};\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\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(extension.version)}</span>\n {updates['latest-minor'] ? (\n <span className=\"PackageManager-extension-version-latest PackageManager-extension-version-latest--minor\">\n {this.version(updates['latest-minor']!)}\n </span>\n ) : null}\n {updates['latest-major'] && !isCore ? (\n <span className=\"PackageManager-extension-version-latest PackageManager-extension-version-latest--major\">\n {this.version(updates['latest-major']!)}\n </span>\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 private version(v: string): string {\n return 'v' + v.replace('v', '');\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Mithril from 'mithril';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport { UpdatedPackage, UpdateState } from './Updater';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport errorHandler from '../utils/errorHandler';\nimport Alert from 'flarum/common/components/Alert';\nimport WhyNotModal from './WhyNotModal';\nimport RequestError from 'flarum/common/utils/RequestError';\nimport ExtensionItem, { Extension } from './ExtensionItem';\n\ninterface MajorUpdaterAttrs extends ComponentAttrs {\n coreUpdate: UpdatedPackage;\n updateState: UpdateState;\n}\n\nexport default class MajorUpdater<T extends MajorUpdaterAttrs = MajorUpdaterAttrs> extends Component<T> {\n isLoading: string | null = null;\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(vnode: Mithril.Vnode<T, this>): 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 className=\"Button\" icon=\"fas fa-vial\" onclick={this.update.bind(this, true)}>\n {app.translator.trans('flarum-package-manager.admin.major_updater.dry_run')}\n </Button>\n </Tooltip>\n <Button className=\"Button Button--danger\" icon=\"fas fa-play\" onclick={this.update.bind(this, false)}>\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 this.isLoading = `update-${dryRun ? 'dry-run' : 'run'}`;\n app.modal.show(LoadingModal);\n\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/major-update`,\n body: {\n data: { dryRun },\n },\n errorHandler,\n })\n .then(() => {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.update_successful'));\n window.location.reload();\n })\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 this.isLoading = null;\n m.redraw();\n });\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport extractText from 'flarum/common/utils/extractText';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport errorHandler from '../utils/errorHandler';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport MajorUpdater from './MajorUpdater';\nimport ExtensionItem, { Extension } from './ExtensionItem';\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 default class Updater<Attrs> extends Component<Attrs> {\n isLoading: string | null = null;\n packageUpdates: Record<string, UpdatedPackage> = {};\n lastUpdateCheck: LastUpdateCheck = JSON.parse(app.data.settings['flarum-package-manager.last_update_check']) as LastUpdateCheck;\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 oninit(vnode: Mithril.Vnode<Attrs, this>) {\n super.oninit(vnode);\n }\n\n view() {\n const extensions = this.getExtensionUpdates();\n let coreUpdate: UpdatedPackage | undefined = this.getCoreUpdate();\n let core: any;\n\n if (coreUpdate) {\n core = {\n id: 'flarum-core',\n name: 'flarum/core',\n version: app.data.settings.version,\n icon: {\n backgroundImage: `url(${app.forum.attribute('baseUrl')}/assets/extensions/flarum-package-manager/flarum.svg`,\n },\n extra: {\n 'flarum-extension': {\n title: app.translator.trans('flarum-package-manager.admin.updater.flarum'),\n },\n },\n };\n }\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.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(this.lastUpdateCheck.checkedAt)}</span>\n </p>\n )}\n <div className=\"PackageManager-updaterControls\">\n <Button\n className=\"Button\"\n icon=\"fas fa-sync-alt\"\n onclick={this.checkForUpdates.bind(this)}\n loading={this.isLoading === 'check'}\n disabled={this.isLoading !== null && this.isLoading !== 'check'}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.check_for_updates')}\n </Button>\n <Button\n className=\"Button\"\n icon=\"fas fa-play\"\n onclick={this.updateGlobally.bind(this)}\n loading={this.isLoading === 'global-update'}\n disabled={this.isLoading !== null && this.isLoading !== 'global-update'}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.run_global_update')}\n </Button>\n </div>\n {this.isLoading !== null ? (\n <div className=\"PackageManager-extensions\">\n <LoadingIndicator />\n </div>\n ) : extensions.length || core ? (\n <div className=\"PackageManager-extensions\">\n <div className=\"PackageManager-extensions-grid\">\n {core ? (\n <ExtensionItem\n extension={core}\n updates={coreUpdate}\n isCore={true}\n onClickUpdate={this.updateCoreMinor.bind(this)}\n whyNotWarning={this.lastUpdateRun.limitedPackages().includes('flarum/core')}\n />\n ) : null}\n {extensions.map((extension: Extension) => (\n <ExtensionItem\n extension={extension}\n updates={this.packageUpdates[extension.id]}\n onClickUpdate={this.updateExtension.bind(this, extension)}\n whyNotWarning={this.lastUpdateRun.limitedPackages().includes(extension.name)}\n />\n ))}\n </div>\n </div>\n ) : null}\n </div>,\n coreUpdate && coreUpdate['latest-major'] ? <MajorUpdater coreUpdate={coreUpdate} updateState={this.lastUpdateRun.major} /> : null,\n ];\n }\n\n getExtensionUpdates(): Extension[] {\n this.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 getCoreUpdate(): UpdatedPackage | undefined {\n return this.lastUpdateCheck?.updates?.installed?.filter((composerPackage: UpdatedPackage) => composerPackage.name === 'flarum/core').pop();\n }\n\n checkForUpdates() {\n this.isLoading = 'check';\n\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/check-for-updates`,\n errorHandler,\n })\n .then((response) => {\n this.lastUpdateCheck = response as LastUpdateCheck;\n })\n .finally(() => {\n this.isLoading = 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.isLoading = 'minor-update';\n\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/minor-update`,\n errorHandler,\n })\n .then(() => {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.update_successful'));\n window.location.reload();\n })\n .finally(() => {\n this.isLoading = null;\n m.redraw();\n });\n }\n }\n\n updateExtension(extension: any) {\n app.modal.show(LoadingModal);\n this.isLoading = 'extension-update';\n\n app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions/${extension.id}`,\n errorHandler,\n })\n .then(() => {\n app.alerts.show(\n { type: 'success' },\n app.translator.trans('flarum-package-manager.admin.extensions.successful_update', { extension: extension.extra['flarum-extension'].title })\n );\n window.location.reload();\n })\n .finally(() => {\n this.isLoading = null;\n m.redraw();\n });\n }\n\n updateGlobally() {\n app.modal.show(LoadingModal);\n this.isLoading = 'global-update';\n\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/global-update`,\n errorHandler,\n })\n .then(() => {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.updater.global_update_successful'));\n window.location.reload();\n })\n .finally(() => {\n this.isLoading = null;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/utils/isExtensionEnabled'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/admin/app';\nimport Alert from 'flarum/common/components/Alert';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport Installer from './components/Installer';\nimport Updater from './components/Updater';\nimport isExtensionEnabled from 'flarum/admin/utils/isExtensionEnabled';\n\napp.initializers.add('flarum-package-manager', (app) => {\n app.extensionData\n .for('flarum-package-manager')\n .registerSetting(() => {\n if (!app.data.isRequiredDirectoriesWritable) {\n return (\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 }\n\n return null;\n })\n .registerSetting(() => {\n if (app.data.isRequiredDirectoriesWritable) {\n return <Installer />;\n }\n\n return null;\n })\n .registerSetting(() => {\n if (app.data.isRequiredDirectoriesWritable) {\n return <Updater />;\n }\n\n return null;\n });\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({\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions/${this.extension.id}`,\n method: 'DELETE',\n })\n .then(() => {\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 .finally(() => {\n app.modal.close();\n });\n }}\n >\n Remove\n </Button>\n );\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","e","error","response","errors","includes","code","guessed_cause","app","type","Installer","packageName","isLoading","oninit","vnode","this","Stream","view","className","htmlFor","extiverse","href","id","placeholder","bidi","icon","onclick","onsubmit","bind","loading","data","package","LoadingModal","method","url","body","errorHandler","then","extensionId","extension","window","location","reload","m","redraw","Component","_defineProperties","target","props","i","length","descriptor","configurable","writable","WhyNotModal","whyNot","title","oncreate","requestWhyNot","content","attrs","Modal","ExtensionItem","updates","onClickUpdate","whyNotWarning","isCore","isDanger","classList","style","name","extra","version","text","v","replace","MajorUpdater","updateState","alt","src","coreUpdate","update","incompatibleExtensions","map","status","dismissible","controls","dryRun","pop","incompatible_extensions","Updater","packageUpdates","lastUpdateCheck","JSON","parse","Constructor","protoProps","extensions","getExtensionUpdates","getCoreUpdate","backgroundImage","checkedAt","humanTime","checkForUpdates","disabled","updateGlobally","updateCoreMinor","lastUpdateRun","limitedPackages","updateExtension","major","installed","filter","composerPackage","safeToUpdate","values","confirm","extractText","minor","global","extensionData","registerSetting","isRequiredDirectoriesWritable","translator","trans","extend","ExtensionPage","items","isExtensionEnabled","add","modal","show","request","forum","attribute","alerts","close"],"sourceRoot":""}