/** App class Represents the git repository of the app that Kitten is currently serving. (Only relevant in production.) */ import Version from './lib/Version.ts'; import type { SimpleGit } from 'simple-git'; export default class AppRepository { path: string; git: SimpleGit; kittenVersion: Version; remoteTags: Array | undefined; lastRemoteTagUpdate: Date | undefined; originRemoteUrl: string | undefined; hasOrigin: boolean | undefined; currentVersion: string | undefined; latestAvailableCommit: string | undefined; usesKittenVersioning: boolean | undefined; manualUpdateAvailable: boolean | undefined; currentApiVersion: number | undefined; currentAppVersion: number | undefined; tags: string[] | undefined; tagsByApiAndAppVersion: [number, number][] | undefined; latestVersionByApiVersion: number[] | undefined; compatibleTags: string[] | undefined; incompatibleTags: string[] | undefined; latestApiVersion: number | undefined; latestAppVersion: number | undefined; latestVersion: string | undefined; latestCompatibleAppVersion: number | undefined; latestCompatibleVersion: string | undefined; static instance: AppRepository | undefined; static isBeingInitialisedAsSingleton: boolean; /** Matches Kitten version tag strings in the form '.' */ static kittenVersionRegExp: RegExp; /** Singleton accessor. Use this method to get an initialised/updated instance. You can always call the update() method again later to get the latest data from the remote repository. */ static getInstance(): Promise; /** Create an instance (should only be called in production). */ constructor(); /** Updates the app to the latest compatible version. */ upgradeAppToLatestCompatibleVersion(): Promise; /** Updates the app to the latest available commit. */ upgradeAppToLatestAvailableCommit(): Promise; /** Updates the app to the specified version tag. */ updateAppToVersion(versionTag: string): Promise; /** Updates the app repository with the latest information and content. After this method is run, you should have all tags and their content available locally so you can simply use the checkout() method to update the application to the required version. */ update(): Promise; get hasCompatibleAppVersion(): boolean; get canBeUpgraded(): boolean; get hasNewerApiVersion(): boolean; /** Returns the string 'upgrade' or 'downgrade' based on whether going from the current app version to the provided version string would be an upgrade or a downgrade. If lowercase is false, the string is returned in sentence case. Does not handle the versions being include. For that, see the isEqualToVersion() method. */ upgradeOrDowngrade(versionTag: string, lowercase?: boolean): "Downgrade" | "Upgrade" | "downgrade" | "upgrade" | false; isEqualToVersion(versionTag: string): boolean; UpdateButtonComponent(): ({ type, version, small }: { small?: boolean | undefined; type?: string | undefined; version?: string | undefined; }) => string | string[] | Promise; VersionComponent({ version, compatible, brief }: { version: string; compatible?: boolean; brief?: boolean; }): string | string[] | Promise; CurrentAppVersionComponent(): () => string | string[] | Promise; AllAvailableVersionsComponent(): string | string[] | Promise | (() => string | string[] | Promise); /** Display app version if Kitten is running in production. */ displayAppVersion(): void; }