1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 07:27:39 +02:00

Bundled output for commit 7e6458a125

Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
This commit is contained in:
flarum-bot
2023-02-10 22:08:35 +00:00
parent 7e6458a125
commit 77a0b11bc8
31 changed files with 304 additions and 62 deletions

View File

@@ -3,7 +3,7 @@ import Component, { ComponentAttrs } from 'flarum/common/Component';
import Stream from 'flarum/common/utils/Stream';
export interface InstallerAttrs extends ComponentAttrs {
}
export type InstallerLoadingTypes = 'extension-install' | null;
export declare type InstallerLoadingTypes = 'extension-install' | null;
export default class Installer extends Component<InstallerAttrs> {
packageName: Stream<string>;
oninit(vnode: Mithril.Vnode<InstallerAttrs, this>): void;

View File

@@ -5,7 +5,7 @@ export interface MajorUpdaterAttrs extends ComponentAttrs {
coreUpdate: UpdatedPackage;
updateState: UpdateState;
}
export type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';
export declare type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';
export default class MajorUpdater<T extends MajorUpdaterAttrs = MajorUpdaterAttrs> extends Component<T> {
updateState: UpdateState;
oninit(vnode: Mithril.Vnode<T, this>): void;

View File

@@ -3,7 +3,7 @@ import Component, { ComponentAttrs } from 'flarum/common/Component';
import ItemList from '@flarum/core/src/common/utils/ItemList';
export interface IUpdaterAttrs extends ComponentAttrs {
}
export type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;
export declare type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;
export default class Updater extends Component<IUpdaterAttrs> {
view(): (JSX.Element | null)[];
lastUpdateCheckView(): JSX.Element | null;

View File

@@ -1,5 +1,5 @@
import Model from 'flarum/common/Model';
export type TaskOperations = 'extension_install' | 'extension_remove' | 'extension_update' | 'update_global' | 'update_minor' | 'update_major' | 'update_check' | 'why_not';
export declare type TaskOperations = 'extension_install' | 'extension_remove' | 'extension_update' | 'update_global' | 'update_minor' | 'update_major' | 'update_check' | 'why_not';
export default class Task extends Model {
status(): "running" | "pending" | "success" | "failure";
operation(): TaskOperations;

View File

@@ -2,7 +2,7 @@ import { UpdaterLoadingTypes } from '../components/Updater';
import { InstallerLoadingTypes } from '../components/Installer';
import { MajorUpdaterLoadingTypes } from '../components/MajorUpdater';
import { Extension } from 'flarum/admin/AdminApplication';
export type UpdatedPackage = {
export declare type UpdatedPackage = {
name: string;
version: string;
latest: string;
@@ -11,28 +11,28 @@ export type UpdatedPackage = {
'latest-status': string;
description: string;
};
export type ComposerUpdates = {
export declare type ComposerUpdates = {
installed: UpdatedPackage[];
};
export type LastUpdateCheck = {
export declare type LastUpdateCheck = {
checkedAt: Date | null;
updates: ComposerUpdates;
};
type UpdateType = 'major' | 'minor' | 'global';
type UpdateStatus = 'success' | 'failure' | null;
export type UpdateState = {
declare type UpdateType = 'major' | 'minor' | 'global';
declare type UpdateStatus = 'success' | 'failure' | null;
export declare type UpdateState = {
ranAt: Date | null;
status: UpdateStatus;
limitedPackages: string[];
incompatibleExtensions: string[];
};
export type LastUpdateRun = {
export declare type LastUpdateRun = {
[key in UpdateType]: UpdateState;
} & {
limitedPackages: () => string[];
};
export type LoadingTypes = UpdaterLoadingTypes | InstallerLoadingTypes | MajorUpdaterLoadingTypes;
export type CoreUpdate = {
export declare type LoadingTypes = UpdaterLoadingTypes | InstallerLoadingTypes | MajorUpdaterLoadingTypes;
export declare type CoreUpdate = {
package: UpdatedPackage;
extension: Extension;
};

View File

@@ -1,5 +1,5 @@
import * as PusherTypes from 'pusher-js';
export type PusherBinding = {
export declare type PusherBinding = {
channels: {
main: PusherTypes.Channel;
user: PusherTypes.Channel | null;

View File

@@ -44,7 +44,7 @@ export interface ITagSelectionModalAttrs extends IInternalModalAttrs {
/** Callback for when the selection is submitted. */
onsubmit?: (selected: Tag[]) => void;
}
export type ITagSelectionModalState = undefined;
export declare type ITagSelectionModalState = undefined;
export default class TagSelectionModal<CustomAttrs extends ITagSelectionModalAttrs = ITagSelectionModalAttrs, CustomState extends ITagSelectionModalState = ITagSelectionModalState> extends Modal<CustomAttrs, CustomState> {
protected loading: boolean;
protected tags: Tag[];