Options
All
  • Public
  • Public/Protected
  • All
Menu

Based off Microsoft VSCode's extension system (MIT Licensed) https://github.com/Microsoft/vscode Module is created during runtime and injected. Please read the documentation below to understand how to use these types. See https://github.com/FlashpointProject/launcher/blob/develop/docs/extensions.md for Extension documentation. See https://flashpointproject.github.io/launcher_ApiDocs/ (or /docs/api in the repo) for API documentation.

Index

Type aliases

AdditionalApp

AdditionalApp: { applicationPath: string; autoRunBefore: boolean; id: string; launchCommand: string; name: string; parentGame: Game; waitForExit: boolean }

Type declaration

  • applicationPath: string

    Path to the application that runs the additional application

  • autoRunBefore: boolean

    If the additional application should run before the game. (If true, this will always run when the game is launched) (If false, this will only run when specifically launched)

  • id: string

    ID of the additional application (unique identifier)

  • launchCommand: string

    Command line argument(s) passed to the application to launch the game

  • name: string

    Name of the additional application

  • parentGame: Game

    Parent of this add app

  • waitForExit: boolean

    Wait for this to exit before the Game will launch (if starting before launch)

AppConfigData

AppConfigData: { backPortMax: number; backPortMin: number; disableExtremeGames: boolean; extensionsPath: string; flashpointPath: string; imageFolderPath: string; imagesPortMax: number; imagesPortMin: number; jsonFolderPath: string; lastSync: number; logoFolderPath: string; logoSetsFolderPath: string; logsBaseUrl: string; metaEditsFolderPath: string; metadataServerHost: string; nativePlatforms: string[]; onDemandBaseUrl: string; platformFolderPath: string; playlistFolderPath: string; server: string; showBrokenGames: boolean; startServer: boolean; themeFolderPath: string; updatesEnabled: boolean; useCustomTitlebar: boolean }

Data contained in the Config file

Type declaration

  • backPortMax: number

    Upper limit of the range of ports that the back should listen on.

  • backPortMin: number

    Lower limit of the range of ports that the back should listen on.

  • disableExtremeGames: boolean

    If games flagged as "extreme" should be hidden (mainly for parental control)

  • extensionsPath: string

    Path to load User extensions from (relative to the flashpoint path)

  • flashpointPath: string

    Path to the Flashpoint root folder (relative or absolute)

  • imageFolderPath: string

    Path to the image folder (relative to the flashpoint path)

  • imagesPortMax: number

    Upper limit of the range of ports that the back image server should listen on.

  • imagesPortMin: number

    Lower limit of the range of ports that the back image server should listen on.

  • jsonFolderPath: string

    Path to the json folder (relative to the flashpoint path)

  • lastSync: number

    Last time the Metadata Server Host was synced with

  • logoFolderPath: string

    Path to the logo folder (relative to the flashpoint path)

  • logoSetsFolderPath: string

    Path to the logo sets folder (relative to the flashpoint path)

  • logsBaseUrl: string

    Base URL of the server to do pastes of the Logs to.

  • metaEditsFolderPath: string

    Path of the meta edits folder (relative to the flashpoint path)

  • metadataServerHost: string

    Metadata Server Host (For Online Sync)

  • nativePlatforms: string[]

    Array of native locked platforms

  • onDemandBaseUrl: string

    Base URL of the server to download missing thumbnails/screenshots from.

  • platformFolderPath: string

    Path to the platform folder (relative to the flashpoint path)

  • playlistFolderPath: string

    Path to the playlist folder (relative to the flashpoint path)

  • server: string
  • showBrokenGames: boolean

    If games flagged as "broken" should be hidden

  • startServer: boolean

    If the Server should be started, and closed, together with this application. The "server" is defined in "services.json".

  • themeFolderPath: string

    Path to the theme folder (relative to the flashpoint path)

  • updatesEnabled: boolean

    Whether to notify that launcher updates are available

  • useCustomTitlebar: boolean

    If the custom title bar should be used in MainWindow

AppPathOverride

AppPathOverride: { override: string; path: string }

Type declaration

  • override: string
  • path: string

AppPreferencesData

AppPreferencesData: { appPathOverrides: AppPathOverride[]; browsePageGameScale: number; browsePageLayout: BrowsePageLayout; browsePageLeftSidebarWidth: number; browsePageRightSidebarWidth: number; browsePageShowExtreme: boolean; browsePageShowLeftSidebar: boolean; browsePageShowRightSidebar: boolean; curatePageLeftSidebarWidth: number; currentLanguage: string; currentLogoSet: string | undefined; currentTheme: string | undefined; defaultLibrary: string; enableEditing: boolean; excludedRandomLibraries: string[]; fallbackLanguage: string; gamesOrder: GameOrderDirection; gamesOrderBy: GameOrderBy; lastSelectedLibrary: string; mainWindow: AppPreferencesDataMainWindow; onDemandImages: boolean; saveImportedCurations: boolean; showDeveloperTab: boolean; showLogLevel: {}; showLogSource: {}; symlinkCurationContent: boolean }

Contains state of all non-config settings the user can change in the application. This is the data contained in the Preferences file.

Type declaration

  • [key: string]: any
  • appPathOverrides: AppPathOverride[]

    Application path overrides to check during app launches

  • browsePageGameScale: number

    Scale of the games at the BrowsePage.

  • browsePageLayout: BrowsePageLayout

    Layout of game collection at BrowsePage.

  • browsePageLeftSidebarWidth: number

    Width of the left sidebar. (Browse Page)

  • browsePageRightSidebarWidth: number

    Width of the right sidebar. (Browse Page)

  • browsePageShowExtreme: boolean

    If "Extreme" games should be shown at the BrowsePage.

  • browsePageShowLeftSidebar: boolean

    If the left sidebar at the BrowsePage should be visible.

  • browsePageShowRightSidebar: boolean

    If the right sidebar at the BrowsePage should be visible.

  • curatePageLeftSidebarWidth: number

    Width of the left sidebar. (Curate Page)

  • currentLanguage: string

    Current language

  • currentLogoSet: string | undefined

    Filename of the current logo set

  • currentTheme: string | undefined

    Filename of the current theme.

  • defaultLibrary: string

    Default Library for new games etc.

  • enableEditing: boolean

    If editing games, additional applications and playlists should be allowed.

  • excludedRandomLibraries: string[]

    Libraries that should be excluded from random picks.

  • fallbackLanguage: string

    Default language used for fallback

  • gamesOrder: GameOrderDirection

    What order the games should appear in.

  • gamesOrderBy: GameOrderBy

    What property to order the games by.

  • lastSelectedLibrary: string

    The "route" of the last selected library (empty string selects the default).

  • mainWindow: AppPreferencesDataMainWindow

    Position and size of the main window.

  • onDemandImages: boolean

    Download missing thumbnails/screenshots from a remote server.

  • saveImportedCurations: boolean

    Save curations after importing

  • showDeveloperTab: boolean

    If the "Developer" tab should be visible in the header.

  • showLogLevel: {}

    Levels to show/hide in the log page.

  • showLogSource: {}

    Sources to show/hide in the log page.

    • [key: string]: boolean
  • symlinkCurationContent: boolean

    Whether to symlink or copy curation content when running (Symlink required for MAD4FP)

AppPreferencesDataMainWindow

AppPreferencesDataMainWindow: { height?: undefined | number; maximized: boolean; width?: undefined | number; x?: undefined | number; y?: undefined | number }

Type declaration

  • Optional height?: undefined | number
  • maximized: boolean
  • Optional width?: undefined | number
  • Optional x?: undefined | number
  • Optional y?: undefined | number

BrowserApplicationOpts

BrowserApplicationOpts: { proxy?: undefined | string; url: string }

Options expected for 'browser' mode application return

Type declaration

  • Optional proxy?: undefined | string
  • url: string

CurationImportState

CurationImportState: { contentToMove: string[][]; curationPath: string; game: Game }

Type declaration

  • contentToMove: string[][]

    Files / Folders being copied, and to where

  • curationPath: string

    Path of the curation

  • game: Game

    Game being imported

DeepPartial

DeepPartial<T>: {}

Utility type. Recursively set all properties as optional.

Type parameters

  • T

Type declaration

Disposable

Disposable: { isDisposed: boolean; onDispose?: undefined | (() => void); toDispose: Disposable[] }

A self-nesting type that allows one time disposable with an optional callback

Type declaration

  • isDisposed: boolean

    Whether this is already disposed

  • Optional onDispose?: undefined | (() => void)

    Callback to use when disposed

  • toDispose: Disposable[]

    Children to dispose of in the future. Add with registerDisposable to maintain safety.

ExtensionContext

ExtensionContext: { subscriptions: Disposable }

Type declaration

  • subscriptions: Disposable

    Put all extension disposables on here with registerDisposable

FieldFilter

FieldFilter: { field: string; value: any }

A search filter that applies to a specific field.

Type declaration

  • field: string

    The field the filter applies to.

  • value: any

    Value to search for in the field.

FilterGameOpts

FilterGameOpts: { playlistId?: undefined | string; searchQuery?: ParsedSearch }

Options for ordering games.

Type declaration

  • Optional playlistId?: undefined | string

    Playlist to limit the results to (no playlist limit will be applied if undefined).

  • Optional searchQuery?: ParsedSearch

    Search query to filter by

FindGamesOpts

FindGamesOpts: { direction?: GameOrderDirection; filter?: FilterGameOpts; getTotal?: undefined | false | true; orderBy?: GameOrderBy; ranges?: RequestGameRange[] }

Type declaration

Game

Game: { addApps: AdditionalApp[]; alternateTitles: string; applicationPath: string; broken: boolean; dateAdded: string; dateModified: string; developer: string; extreme: boolean; id: string; language: string; launchCommand: string; library: string; notes: string; orderTitle: string; originalDescription: string; parentGameId?: undefined | string; placeholder: boolean; platform: string; playMode: string; publisher: string; releaseDate: string; series: string; source: string; status: string; tags: Tag[]; title: string; version: string }

Type declaration

  • addApps: AdditionalApp[]

    All attached Additional Apps of a game

  • alternateTitles: string

    Any alternate titles to match against search

  • applicationPath: string

    Path to the application that runs the game

  • broken: boolean

    If the game is "broken" or not

  • dateAdded: string

    Date-time of when the game was added to collection

  • dateModified: string

    Date-time of when the game was added to collection

  • developer: string

    Name of the developer(s) of the game (developer names are separated by ',')

  • extreme: boolean

    Game is not suitable for children

  • id: string

    ID of the game (unique identifier)

  • language: string

    The language(s) the game is in

  • launchCommand: string

    Command line argument(s) passed to the application to launch the game

  • library: string

    Library this game belongs to

  • notes: string

    Information that could be useful for the player (of varying importance)

  • orderTitle: string

    Unused

  • originalDescription: string

    Original description of the game (probably given by the game's creator or publisher)

  • Optional parentGameId?: undefined | string

    ID of the game which owns this game

  • placeholder: boolean

    If the game is a placeholder (and can therefore not be saved)

  • platform: string

    Platform the game runs on (Flash, HTML5, Shockwave etc.)

  • playMode: string

    If the game is single player or multiplayer, and if the multiplayer is cooperative or not

  • publisher: string

    Name of the publisher of the game

  • releaseDate: string

    Date of when the game was released

  • series: string

    Game series the game belongs to (empty string if none)

  • source: string

    Source if the game files, either full URL or the name of the website

  • status: string

    How playable the game is

  • tags: Tag[]

    List of tags attached to the game

  • title: string

    Full title of the game

  • version: string

    Version of the game

GameLaunchInfo

GameLaunchInfo: { game: Game; launchInfo: LaunchInfo }

Info type passed to onWillLaunch events

Type declaration

GameOrderBy

GameOrderBy: keyof Game

Game field to order the results by

GameOrderDirection

GameOrderDirection: "ASC" | "DESC"

Direction to return the results in (ascending or descending)

LaunchInfo

LaunchInfo: { env: ProcessEnv; gameArgs: string | string[]; gamePath: string; useWine: boolean }

Type declaration

  • env: ProcessEnv
  • gameArgs: string | string[]
  • gamePath: string
  • useWine: boolean

MergeTagData

MergeTagData: { makeAlias: boolean; mergeInto: string; toMerge: string }

Data passed to merge tags together

param

Tag to merge from

param

Tag to merge into

param

Whether to move all aliases from toMerge into mergeInto as well

Type declaration

  • makeAlias: boolean
  • mergeInto: string
  • toMerge: string

ObjectLike

ObjectLike: Record<string, unknown> | Record<number, unknown>

Replacement of "object" type. Note: I'm not sure how effective it is though //obelisk

PageTuple

PageTuple: { id: string; orderVal: any; title: string }

Tuple of values from the last game of a previous page (look up "keyset pagination").

Type declaration

  • id: string

    ID of the game (unique value).

  • orderVal: any

    Primary order value.

  • title: string

    Title of the game (secondary order value).

ParsedSearch

ParsedSearch: { blacklist: FieldFilter[]; genericBlacklist: string[]; genericWhitelist: string[]; whitelist: FieldFilter[] }

Object representation of a parsed search query.

Type declaration

  • blacklist: FieldFilter[]

    Whitelists to apply

  • genericBlacklist: string[]

    Generic filter to blacklist some predetermined field(s).

  • genericWhitelist: string[]

    Generic filter to whitelist some predetermined field(s).

  • whitelist: FieldFilter[]

    Blacklists to apply

Playlist

Playlist: { author: string; description: string; extreme: boolean; games: PlaylistGame[]; icon: string; id: string; library: string; title: string }

Type declaration

  • author: string

    Author of the playlist.

  • description: string

    Description of the playlist.

  • extreme: boolean

    Attribute for if playlist contains games not suitable for children

  • games: PlaylistGame[]

    Games in this playlist

  • icon: string

    Icon of the playlist (Base64 encoded image).

  • id: string

    ID of the playlist (unique identifier)

  • library: string

    Route of the library this playlist is for.

  • title: string

    Title of the playlist.

PlaylistGame

PlaylistGame: { game?: Game; gameId?: undefined | string; id?: undefined | string; notes: string; order: number; playlist?: Playlist; playlistId?: undefined | string }

Type declaration

  • Optional game?: Game

    Game this represents (either ID or Game will exist)

  • Optional gameId?: undefined | string

    Game this represents (either ID or Game will exist)

  • Optional id?: undefined | string

    Internal ID of the playlist game entry

  • notes: string

    Notes for the game inside the playlist specifically

  • order: number

    Order priority of the game in the playlist

  • Optional playlist?: Playlist

    Playlist which owns this game (either ID or Playlist will exist)

  • Optional playlistId?: undefined | string

    Playlist which owns this game (either ID or Playlist will exist)

ProcessInfo

ProcessInfo: { arguments: string[]; filename: string; path: string }

Type declaration

  • arguments: string[]

    Arguments to pass to the process

  • filename: string

    Name of the file to execute

  • path: string

    Path of the file (relative to the Flashpoint root)

ProcessOpts

ProcessOpts: { autoRestart?: undefined | false | true; detached?: undefined | false | true; shell?: undefined | false | true }

Type declaration

  • Optional autoRestart?: undefined | false | true
  • Optional detached?: undefined | false | true
  • Optional shell?: undefined | false | true

RequestGameRange

RequestGameRange: { index?: PageTuple; length: number | undefined; start: number }

Type declaration

  • Optional index?: PageTuple

    Tuple of the last game of the previous page. If this is set then "start" must be the index of the game after this (since this will be used instead of "start" when selecting the games).

  • length: number | undefined

    Number of games to request (if undefined, all games until the end of the query will be included).

  • start: number

    Index of the first game.

ResponseGameRange

ResponseGameRange<T>: { games: T extends true ? ViewGame[] : Game[]; length?: undefined | number; start: number }

Type parameters

  • T: boolean

Type declaration

  • games: T extends true ? ViewGame[] : Game[]

    Games found within the range.

  • Optional length?: undefined | number

    Number of games requested.

  • start: number

    Index of the first game.

ServiceChange

ServiceChange: { newState: ProcessState; oldState: ProcessState; process: ManagedChildProcess }

Type declaration

ShowMessageBoxOptions

ShowMessageBoxOptions: { buttons?: string[]; cancelId?: undefined | number; message: string; title?: undefined | string }

See Electron docs for explanations. https://www.electronjs.org/docs/api/dialog

Type declaration

  • Optional buttons?: string[]
  • Optional cancelId?: undefined | number
  • message: string
  • Optional title?: undefined | string

ShowOpenDialogOptions

ShowOpenDialogOptions: { buttonLabel?: undefined | string; defaultPath?: undefined | string; filters: FileFilter[]; message?: undefined | string; properties?: Array<"openFile" | "openDirectory" | "multiSelections" | "showHiddenFiles" | "createDirectory" | "promptToCreate" | "noResolveAliases" | "treatPackageAsDirectory" | "dontAddToRecent">; title?: undefined | string }

See Electron docs for explanations. https://www.electronjs.org/docs/api/dialog

Type declaration

  • Optional buttonLabel?: undefined | string
  • Optional defaultPath?: undefined | string
  • filters: FileFilter[]
  • Optional message?: undefined | string
  • Optional properties?: Array<"openFile" | "openDirectory" | "multiSelections" | "showHiddenFiles" | "createDirectory" | "promptToCreate" | "noResolveAliases" | "treatPackageAsDirectory" | "dontAddToRecent">
  • Optional title?: undefined | string

ShowSaveDialogOptions

ShowSaveDialogOptions: { buttonLabel?: undefined | string; defaultPath?: undefined | string; filters?: FileFilter[]; message?: undefined | string; nameFieldLabel?: undefined | string; title?: undefined | string }

See Electron docs for explanations. https://www.electronjs.org/docs/api/dialog

Type declaration

  • Optional buttonLabel?: undefined | string
  • Optional defaultPath?: undefined | string
  • Optional filters?: FileFilter[]
  • Optional message?: undefined | string
  • Optional nameFieldLabel?: undefined | string
  • Optional title?: undefined | string

StatusState

StatusState: { devConsole: string }

Type declaration

  • devConsole: string

Tag

Tag: { aliases: TagAlias[]; category?: TagCategory; categoryId?: undefined | number; count?: undefined | number; dateModified: string; description?: undefined | string; gamesUsing?: Game[]; id?: undefined | number; primaryAlias: TagAlias; primaryAliasId: number }

Type declaration

  • aliases: TagAlias[]

    Aliases / Names of the tag

  • Optional category?: TagCategory

    Category this tag is a part of (either ID or TagCategory will exist)

  • Optional categoryId?: undefined | number

    Category this tag is a part of (either ID or TagCategory will exist)

  • Optional count?: undefined | number

    Number of games this tag belongs to

  • dateModified: string

    Date when this tag was last modified

  • Optional description?: undefined | string

    Description of the tag

  • Optional gamesUsing?: Game[]

    Games which are marked with this Tag

  • Optional id?: undefined | number

    ID of the tag (unique identifier)

  • primaryAlias: TagAlias

    Primary Alias

  • primaryAliasId: number

    ID of Primary Alias

TagAlias

TagAlias: { id: number; name: string; tag?: Tag; tagId?: undefined | number }

Type declaration

  • id: number

    ID of the tag alias (unique identifier)

  • name: string

    The name this alias represents

  • Optional tag?: Tag

    Tag this alias belongs to (either ID or Tag will exist)

  • Optional tagId?: undefined | number

    Tag this alias belongs to (either ID or Tag will exist)

TagCategory

TagCategory: { color: string; description?: undefined | string; id: number; name: string; tags: Tag[] }

Type declaration

  • color: string

    Category Color

  • Optional description?: undefined | string

    Description of the Tag Category

  • id: number

    ID of the tag category (unique identifier)

  • name: string

    Category Name

  • tags: Tag[]

    Tags using this Tag Category

TagSuggestion

TagSuggestion: { alias?: undefined | string; primaryAlias: string; tag: Tag }

Type declaration

  • Optional alias?: undefined | string

    Alias found, only present if not the same as the primary alias

  • primaryAlias: string

    Primary alias of the tag suggestion

  • tag: Tag

    Tag suggested

ViewGame

ViewGame: { developer: string; id: string; platform: string; publisher: string; tags: Tag[]; title: string }

Shortend version of Game returned in searches, makes for better performance.

Type declaration

  • developer: string
  • id: string
  • platform: string
  • publisher: string
  • tags: Tag[]
  • title: string

ZipExtractOptions

ZipExtractOptions: { onData?: undefined | ((data: ZipData) => void); onProgress?: undefined | ((progress: ZipProgress) => void) }

Type declaration

  • Optional onData?: undefined | ((data: ZipData) => void)
  • Optional onProgress?: undefined | ((progress: ZipProgress) => void)

Variables

Const config

Config Data

Const extensionPath

extensionPath: string

Path to own extension

Const onDidConnect

onDidConnect: Event<void>

Called when a client connects to the backend

Const onDidInit

onDidInit: Event<void>

Called when the backend has fully initialized. Extension activation is earlier.

Const version

version: string

Version of the Flashpoint Launcher

Functions

clearDisposable

dispose

getExtensionFileURL

  • getExtensionFileURL(filePath: string): string

getPreferences

loadConfig

  • loadConfig(): Promise<any>

newDisposable

  • newDisposable(callback?: undefined | (() => void)): Disposable

overwritePreferenceData

registerDisposable

saveConfig

  • saveConfig(data: any): Promise<void>

unload

  • unload(): Promise<void>

unzipFile

  • unzipFile(filePath: string, outDir: string, opts: ZipExtractOptions): Promise<void>

Generated using TypeDoc