Skip to content

Commit

Permalink
Spelling
Browse files Browse the repository at this point in the history
* application
* called
* coerce
* command
* conflicts
* continuous
* copying
* declaration
* dereference
* different
* discarded
* ensures
* entries
* environment
* equivalents
* etc.
* evaluate
* github
* hexadecimal
* initialize
* initializes
* insensitively
* library
* listening
* minimum
* miscellaneous
* multiple
* primary
* promoted
* publicly
* request
* response
* retrieval
* separate
* separated
* shifted
* shorten
* socket
* substituted
* substitutes
* substitutions
* succeeds
* typesafe
* unavailable
* undefined
* while

Signed-off-by: Josh Soref <[email protected]>
  • Loading branch information
jsoref committed Jan 25, 2021
1 parent 3c03be8 commit 9b1dca6
Show file tree
Hide file tree
Showing 44 changed files with 60 additions and 60 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ There is now a TypeScript / JavaScript API available to interact with the Flashp

## Changed

- Flash Mode (:flash: applicaton path) has now been reworked into a general use Browser Mode so it can be used by Extensions.
- Flash Mode (:flash: application path) has now been reworked into a general use Browser Mode so it can be used by Extensions.

## Fixed

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ Must be one of the following:
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **github**: Changes to our Github CI configuration files or scripts
* **github**: Changes to our GitHub CI configuration files or scripts
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
* **test**: Adding missing tests or correcting existing tests

## Body
Expand Down
8 changes: 4 additions & 4 deletions docs/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ In this example, any game run with the `:my-application:` application path will

However, Applications can also provide `url` or `command` instead. The full details of all 3 including `path` are listed below.

`path` will launch the application with the launch command as its arguments. You must use the `<exePath>` or `<fpPath>` subtitutions to correctly reference the application.
`path` will launch the application with the launch command as its arguments. You must use the `<exePath>` or `<fpPath>` substitutions to correctly reference the application.

`url` will launch that URL in Flashpoints Browser Mode (Electron). The launch command must be subtituted since it can not be given as an argument this way. See below for allowed subtitutions.
`url` will launch that URL in Flashpoints Browser Mode (Electron). The launch command must be substituted since it can not be given as an argument this way. See below for allowed substitutions.

`command` will run a registered command that is given the launching Game as an argument and expects a valid response of either a string (`path`) or BrowserApplicationOpts (`url`) which will then be run accordingly. Subtitutions cannot be used on the returned values, although you may find their equiavelents in the API, with an exception of os, arch and cwd which you may use Node types for. (`@types/node`)
`command` will run a registered command that is given the launching Game as an argument and expects a valid response of either a string (`path`) or BrowserApplicationOpts (`url`) which will then be run accordingly. Substitutions cannot be used on the returned values, although you may find their equivalents in the API, with an exception of os, arch and cwd which you may use Node types for. (`@types/node`)

`url` and `path` string subtitutes:
`url` and `path` string substitutes:

- **\<exePath\>** - Path to the extension.
- **\<fpPath\>** - Path to the Flashpoint folder.
Expand Down
4 changes: 2 additions & 2 deletions docs/meta_edits.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To import *all* meta edits:
* Go the the Developer tab
- If the tab is not displayed, go to the "Config" tab and enable "Show Developer Tab"
* Click the "Import Meta Edits" button
* If there are any conficts in the meta edits you will be promted to select which value to apply
* If there are any conflicts in the meta edits you will be promoted to select which value to apply

**Note:** This does *NOT* delete the meta edit files. The files have to be moved / deleted manually.

Expand Down Expand Up @@ -70,7 +70,7 @@ Reasons for discarding includes:
Discarded changes (X changes in Y games):
<Game title> (<Game ID>)
<Property name>: <Discarde value>
<Property name>: <Discarded value>
...
...
Expand Down
2 changes: 1 addition & 1 deletion docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The launcher provides multiple ways to run programs alongside. An example config is provided at the bottom of the page.

`<fpPath>` can be used in any file path. These will be substitued out for the absolute Flashpoint path as defined in Config.
`<fpPath>` can be used in any file path. These will be substituted out for the absolute Flashpoint path as defined in Config.

### File Layout

Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ gulp.task('pack', (done) => {
'./build',
],
extraFiles: copyFiles, // Files to copy to the build folder
compression: 'maximum', // Only used if a compressed target (like 7z, nsis, dmg etc)
compression: 'maximum', // Only used if a compressed target (like 7z, nsis, dmg etc.)
target: 'dir',
asar: true,
publish: publish,
Expand Down
4 changes: 2 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@
"areYouSure": "Are you sure?",
"cancel": "Cancel",
"mergePlaylists": "Merge Playlists",
"newPlaylist": "Stay Seperate",
"uploadPrivacyWarning": "This will make your Logs available publically.\nA link will be copied to your clipboard.\n\nAre you sure?",
"newPlaylist": "Stay Separate",
"uploadPrivacyWarning": "This will make your Logs available publicly.\nA link will be copied to your clipboard.\n\nAre you sure?",
"overwriteFileTitle": "File already exists!",
"overwriteFileMessage": "A file with the same name already exists. Do you want to overwrite it?",
"overwriteFileDetail": "File path:"
Expand Down
4 changes: 2 additions & 2 deletions src/back/SocketServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class SocketServer {

/**
* Try to listen on one of the ports in the given range (starting from the lowest).
* If it succeedes it will set the "server" and "port" properties of this object.
* If it succeeds it will set the "server" and "port" properties of this object.
* If it fails it will reject with the error.
* @param minPort Minimum port number (tried first).
* @param maxPort Maximum port number (tried last).
Expand Down Expand Up @@ -274,7 +274,7 @@ export class SocketServer {
}

type StartServerResult = {
/** WebScoket server (undefined if it failed to listen). */
/** WebSocket server (undefined if it failed to listen). */
server: ws.Server;
/** Port it is listening on (-1 if it failed to listen). */
port: number;
Expand Down
4 changes: 2 additions & 2 deletions src/back/extensions/ApiImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Command } from './types';
/**
* Create a Flashpoint API implementation specific to an extension, used during module load interception
* @param extManifest Manifest of the caller
* @param registry Registry to register commands etc to
* @param registry Registry to register commands etc. to
* @param addExtLog Function to add an Extensions log to the Logs page
* @param version Version of the Flashpoint Launcher
* @returns API Implementation specific to the caller
Expand Down Expand Up @@ -305,6 +305,6 @@ export function createApiFactory(extId: string, extManifest: IExtensionManifest,
registerDisposable: registerDisposable,
newDisposable: newDisposable

// Note - Types are defined in the decleration file, not here
// Note - Types are defined in the declaration file, not here
};
}
4 changes: 2 additions & 2 deletions src/back/extensions/ExtensionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function getExtensionEntry(ext: IExtension): string {
/** Creates an Extension log (Message format "[extension-name] <message>")
* @param extManifest Manifest of the Extension
* @param message Message to fill in
* @param func Log function to use (log.info, warn, error etc)
* @param func Log function to use (log.info, warn, error etc.)
* @returns Complete Log Entry
*/
export function newExtLog(extManifest: IExtensionManifest, message: string, func: LogFunc): ILogEntry {
Expand All @@ -43,7 +43,7 @@ export function newExtLog(extManifest: IExtensionManifest, message: string, func
/** Creates an Extension Log Function
* @param extManifest Manifest of the Extension
* @param addLog Function to push new log onto Logs page stack
* @param func Log function to use (log.info, warn, error etc)
* @param func Log function to use (log.info, warn, error etc.)
* @returns Function that logs an extensions message given just a message string
*/
export function extLogFactory(extManifest: IExtensionManifest, addLog: (entry: ILogEntry) => void, func: LogFunc): ExtensionLogFunc {
Expand Down
4 changes: 2 additions & 2 deletions src/back/importGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export async function importCuration(opts: ImportCurationOpts): Promise<void> {
date.getUTCDate().toString().padStart(2, '0');
const backupPath = path.join(fpPath, 'Curations', 'Imported', `${dateStr}__${curation.key}`);
await fs.copy(getCurationFolder(curation, fpPath), backupPath);
// Why does this return before finishing coying? Replaced with line above for now.
// Why does this return before finishing copying? Replaced with line above for now.
// await copyFolder(getCurationFolder(curation, fpPath), backupPath, true, opts.openDialog);
}
if (log) {
Expand Down Expand Up @@ -317,7 +317,7 @@ async function importGameImage(image: CurationIndexImage, gameId: string, folder
}
}

/** Symlinks (or copies if unavailble) a curations `content` folder to `htdocs\content`
/** Symlinks (or copies if unavailable) a curations `content` folder to `htdocs\content`
* @param curationKey Key of the (game) curation to link
*/
async function linkContentFolder(curationKey: string, fpPath: string, isDev: boolean, exePath: string, htdocsPath: string, symlinkCurationContent: boolean) {
Expand Down
2 changes: 1 addition & 1 deletion src/back/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ export function registerRequestCallbacks(state: BackState): void {
});

state.socketServer.register(BackIn.RUN_COMMAND, async (event, command, args = []) => {
// Find comamnd
// Find command
const c = state.registry.commands.get(command);
let res = undefined;
let success = false;
Expand Down
2 changes: 1 addition & 1 deletion src/back/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export type ServiceFileData = {
start: IBackProcessInfo[];
/** Processes to run when the launcher closes. */
stop: IBackProcessInfo[];
/** Files to watch and run continous logging on */
/** Files to watch and run continuous logging on */
watch: string[];
};

Expand Down
2 changes: 1 addition & 1 deletion src/back/util/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function exit(state: BackState): void {
.catch(e => { console.error(e); }),
// Close file server
new Promise(resolve => state.fileServer.close(error => {
if (error) { console.warn('An error occurred whie closing the file server.', error); }
if (error) { console.warn('An error occurred while closing the file server.', error); }
resolve();
})),
// Wait for game manager to complete all saves
Expand Down
2 changes: 1 addition & 1 deletion src/back/util/sanitizeFilename.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function truncate(string: string, byteLength: number): string {
* Reserved filenames in Windows ("CON", "PRN", "AUX", "NUL", "COM1",
* "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
* "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", and
* "LPT9") case-insesitively and with or without filename extensions.
* "LPT9") case-insensitively and with or without filename extensions.
*
* Capped at 255 characters in length.
* http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs
Expand Down
2 changes: 1 addition & 1 deletion src/back/util/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
export function validateSqlName(name: string): void {
// The first character is not allowed to be @ or # because they denote special values
// (They might be safe to use, but I don't know enough to evaludate that //obelisk)
// (They might be safe to use, but I don't know enough to evaluate that //obelisk)

if (name.length > 128) {
throw new Error(`SQL name validation failed! The name contains more than 128 characters (name: "${name}", length: ${name.length})!`);
Expand Down
2 changes: 1 addition & 1 deletion src/database/entity/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class Game {

@ManyToMany(type => Tag, t => t.gamesUsing, { cascade: true, eager: true })
@JoinTable()
/** Tags of the game (seperated by semi-colon) */
/** Tags of the game (separated by semi-colon) */
tags: Tag[];

@Column({collation: 'NOCASE'})
Expand Down
6 changes: 3 additions & 3 deletions src/main/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function main(init: Init): void {
app.allowRendererProcessReuse = true; // Hides the "new default value" warning message (remove this line after upgrading to electron 9)

// Single process
// No more than one "main" instance should exist at any time. Mutliple "flash" instances are fine.
// No more than one "main" instance should exist at any time. Multiple "flash" instances are fine.
if (!app.requestSingleInstanceLock()) {
app.exit();
return;
Expand Down Expand Up @@ -164,7 +164,7 @@ export function main(init: Init): void {
localeCode: localeCode,
exePath: app.getPath('exe'),
acceptRemote: !!init.args['host-remote'],
version: app.getVersion(), // @TODO Manually load this from the package.json file while in a dev enviroment (so it doesn't use Electron's version)
version: app.getVersion(), // @TODO Manually load this from the package.json file while in a dev environment (so it doesn't use Electron's version)
};
state.backProc.send(JSON.stringify(msg));
}));
Expand Down Expand Up @@ -403,7 +403,7 @@ export function main(init: Init): void {
const isMaximized = window.isMaximized();
window.webContents.send(WindowIPC.WINDOW_RESIZE, size[0], size[1], isMaximized);
});
// Derefence window when closed
// Dereference window when closed
window.on('closed', () => {
if (state.window === window) {
state.window = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/CurateBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ export function CurateBox(props: CurateBoxProps) {
}
}, [props.curation && props.curation.thumbnail, props.curation && props.curation.screenshot, disabled]);

// Own Lirary Options
// Own Library Options
const ownLibraryOptions = useMemo(() => {
// Add meta's library if invalid (special option)
if (warnings.nonExistingLibrary && props.curation) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/ProgressComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function AutoProgressComponent(props: ProgressComponentProps) {
}
}

/** Large centered primar text, smaller underneath secondary text. */
/** Large centered primary text, smaller underneath secondary text. */
export function StatusBar(props: ProgressComponentProps) {
return (
<div className={(props.wrapperClass ? ' ' + props.wrapperClass : '') + 'progress-component__wrapper'}>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/RightTagCategoriesSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class RightTagCategoriesSidebar extends React.Component<RightTagCategorie
}

onDeleteCategoryClick = (): void => {
console.log('clalled');
console.log('called');
if (this.props.onDeleteCategory) {
this.props.onDeleteCategory();
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/RightTagsSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class RightTagsSidebar extends React.Component<RightTagsSidebarProps, Rig
}

onDeleteTagClick = (): void => {
console.log('clalled');
console.log('called');
if (this.props.onDeleteTag) {
this.props.onDeleteTag();
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/ServiceBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function useInterval(callback: () => void, ms: number, deps?: any[]): void {
}

/**
* Stringify all entires that are from a specific source.
* Stringify all entries that are from a specific source.
* @param entries Entries to stringify.
* @param source The source to filter by.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/pages/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class AboutPage extends React.Component<AboutPageProps, AboutPageState> {
<p><b>{strings.version}:</b> {versionNumberToText(window.Shared.version)} ({window.Shared.version})</p>
<p><b>{strings.license}:</b> {strings.licenseInfo}</p>
<div className='about-page__section__links'>
{link('Github', 'https://github.com/FlashpointProject/launcher')}
{link('GitHub', 'https://github.com/FlashpointProject/launcher')}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/pages/CuratePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ function scrollToDiv(id: string) {
}
}

/* Returns the width of a div ref, minumum 10 */
/* Returns the width of a div ref, minimum 10 */
function getDivWidth(ref: React.RefObject<HTMLDivElement>) {
if (!document.defaultView) { throw new Error('"document.defaultView" missing.'); }
if (!ref.current) { throw new Error('div is missing.'); }
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/pages/LogsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class LogsPage extends React.Component<LogsPageProps, LogsPageState> {
onUploadClick = async (): Promise<void> => {
this.setState({ uploading: true });
const strings = this.context;
// IMPORTANT - Make sure they want to *publically* post their info
// IMPORTANT - Make sure they want to *publicly* post their info
const res = await remote.dialog.showMessageBox({
title: strings.dialog.areYouSure,
message: strings.dialog.uploadPrivacyWarning,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/containers/withPreferences.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function withPreferences<P>(Component: React.ComponentType<P>) {
const preferences = useContext(PreferencesContext);
return (
<Component
{...props as P} // @HACK This is annoying to make typsafe
{...props as P} // @HACK This is annoying to make typesafe
preferencesData={preferences} />
);
};
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/context/ProgressContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function progressReducer(prevState: Record<string, (ProgressData[]|undefined)>,
}

/**
* Returns the ProgressData of a parent (initalizes it if necessary)
* Returns the ProgressData of a parent (initializes it if necessary)
* @param state Mutable ProgressState
* @param key Parent's Key
*/
Expand Down Expand Up @@ -213,7 +213,7 @@ function ensureProgressIndex(state: ProgressData[], key: string): number {

/**
* Return a new ProgressHandle to be given out to other functions
* @param parentKey Identifier of parent (page, component etc)
* @param parentKey Identifier of parent (page, component etc.)
* @param dispatch Dispatcher to ProgressContext
* @returns Handle containing all data necessary to dispatch ProgressAction's
*/
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/main/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export enum MainActionType {
export enum RequestState {
/** Request is waiting to be made. */
WAITING,
/** Reqest has been made. Waiting for the response to be received. */
/** Request has been made. Waiting for the response to be received. */
REQUESTED,
/** Response has been received. */
RECEIVED,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/main/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function mainStateReducer(state: MainState = createInitialState(), action
// Dirty games
isDirty: true,
pageState: {},
// Update total (for the first reponse only)
// Update total (for the first response only)
total: (view.total === undefined)
? action.total
: view.total,
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/store/main/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type View = {
/** Page keyset of the results. */
pageKeyset: PageKeyset;
};
/** State of the meta request (undfined means the view is "idle" and no request should be made). */
/** State of the meta request (undefined means the view is "idle" and no request should be made). */
metaState?: RequestState;
/** Games to display. */
games: ViewGameSet;
Expand Down Expand Up @@ -75,7 +75,7 @@ export type MainState = {
randomGames: ViewGame[];
/** Whether we're currently requesting random games */
requestingRandomGames: boolean;
/** If the random games should be shiften when the request is complete. */
/** If the random games should be shifted when the request is complete. */
shiftRandomGames: boolean;

/** Data and state used for the upgrade system (optional install-able downloads from the HomePage). */
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/util/platform.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Game } from '@database/entity/Game';

/** platform.ts is suggestion.ts modified for retreival of platform type */
/** platform.ts is suggestion.ts modified for retrieval of platform type */
export function getPlatforms(games: Game[]): string [] {
// Get the values from the game collection
const map: { [key: string]: true } = {};
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/util/queue.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type QueueOneWrapper<T extends (...args: any[]) => Promise<void>> = (...args: Parameters<T>) => void

/**
* Esnures that the wrapped function can not be called until its returned promise is pending.
* Ensures that the wrapped function can not be called until its returned promise is pending.
* If the wrapper is called before that and there is no call queued,
* the call will be queued and executed when the promise resolves or rejects.
* If there is a call queued then it will replace the currently queued call (hence "queueOne").
Expand Down
Loading

0 comments on commit 9b1dca6

Please sign in to comment.