1
0
mirror of https://github.com/flarum/core.git synced 2025-08-21 23:56:33 +02:00

Bundled output for commit 335c602cea

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

[skip ci]
This commit is contained in:
flarum-bot
2022-08-20 17:30:31 +00:00
parent 335c602cea
commit ec97ee41f9
11 changed files with 86 additions and 60 deletions

View File

@@ -0,0 +1,57 @@
import { UpdaterLoadingTypes } from '../components/Updater';
import { InstallerLoadingTypes } from '../components/Installer';
import { MajorUpdaterLoadingTypes } from '../components/MajorUpdater';
import { Extension } from 'flarum/admin/AdminApplication';
export declare type UpdatedPackage = {
name: string;
version: string;
latest: string;
'latest-minor': string | null;
'latest-major': string | null;
'latest-status': string;
description: string;
};
export declare type ComposerUpdates = {
installed: UpdatedPackage[];
};
export declare type LastUpdateCheck = {
checkedAt: Date | null;
updates: ComposerUpdates;
};
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 declare type LastUpdateRun = {
[key in UpdateType]: UpdateState;
} & {
limitedPackages: () => string[];
};
export declare type LoadingTypes = UpdaterLoadingTypes | InstallerLoadingTypes | MajorUpdaterLoadingTypes;
export declare type CoreUpdate = {
package: UpdatedPackage;
extension: Extension;
};
export default class ControlSectionState {
loading: LoadingTypes;
packageUpdates: Record<string, UpdatedPackage>;
lastUpdateCheck: LastUpdateCheck;
extensionUpdates: Extension[];
coreUpdate: CoreUpdate | null;
get lastUpdateRun(): LastUpdateRun;
constructor();
isLoading(name?: LoadingTypes): boolean;
isLoadingOtherThan(name: LoadingTypes): boolean;
setLoading(name: LoadingTypes): void;
checkForUpdates(): void;
updateCoreMinor(): void;
updateExtension(extension: Extension): void;
updateGlobally(): void;
formatExtensionUpdates(lastUpdateCheck: LastUpdateCheck): Extension[];
formatCoreUpdate(lastUpdateCheck: LastUpdateCheck): CoreUpdate | null;
}
export {};

View File

@@ -0,0 +1,6 @@
import QueueState from './QueueState';
import ControlSectionState from './ControlSectionState';
export default class PackageManagerState {
queue: QueueState;
control: ControlSectionState;
}