From 11e410295308280d4308d7f7ed1587d3c43b8484 Mon Sep 17 00:00:00 2001 From: Alejandro Marco <78371908+amalej@users.noreply.github.com> Date: Sat, 4 May 2024 23:16:39 +0800 Subject: [PATCH] Fix typo (#1002) --- docs/config-files.md | 8 ++++---- src/auth.ts | 4 ++-- src/commands/create.ts | 2 +- src/commands/setting.ts | 2 +- src/conf.ts | 2 +- src/files.ts | 8 ++++---- src/index.ts | 2 +- src/messages.ts | 2 +- test/test.ts | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/config-files.md b/docs/config-files.md index f316d7ca..a2301560 100644 --- a/docs/config-files.md +++ b/docs/config-files.md @@ -12,9 +12,9 @@ Typescript configuration file | `/tsconfig.json` | Used for user specif ## Environment variables -Environment variables can be set in order to specify the location of the following configutation files: +Environment variables can be set in order to specify the location of the following configuration files: -File | Environment varaiable | Comment +File | Environment variable | Comment --- | --- | --- Clasp project file | `clasp_config_project` | The filename must start with a dot '.' Clasp ignore file | `clasp_config_ignore` | @@ -22,9 +22,9 @@ Google Auth file | `clasp_config_auth` | The filename must start with a dot '.' ## Command line options -Command line options can be used in order to specify the location of the following configutation files: +Command line options can be used in order to specify the location of the following configuration files: -File | Environment varaiable | Comment +File | Environment variable | Comment --- | --- | --- Clasp project file | `-P ` or `--project ` | The filename must start with a dot '.' Clasp ignore file | `-I ` or `--ignore ` | diff --git a/src/auth.ts b/src/auth.ts index ecdad8ab..6ff13025 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -274,7 +274,7 @@ const authorizeWithoutLocalhost = async ( }; /** - * Set OAuth client credentails from rc. + * Set OAuth client credentials from rc. * Can be global or local. * Saves new credentials if access token refreshed. * @param {ClaspToken} rc OAuth client settings from rc file. @@ -313,7 +313,7 @@ const setOauthClientCredentials = async (rc: ClaspToken) => { // /** // * Compare global OAuth client scopes against manifest and prompt user to -// * authorize if new scopes found (local OAuth credentails only). +// * authorize if new scopes found (local OAuth credentials only). // * @param {ClaspToken} rc OAuth client settings from rc file. // */ // // TODO: currently unused. Check relevancy diff --git a/src/commands/create.ts b/src/commands/create.ts index 71bdb814..50a2a5ee 100644 --- a/src/commands/create.ts +++ b/src/commands/create.ts @@ -73,7 +73,7 @@ export default async (options: CommandOption): Promise => { try { projectExist = is.string((await getProjectSettings()).scriptId); } catch { - process.exitCode = 0; // To reset `exitCode` that was overriden in ClaspError constructor. + process.exitCode = 0; // To reset `exitCode` that was overridden in ClaspError constructor. projectExist = false; } diff --git a/src/commands/setting.ts b/src/commands/setting.ts index bcc75ab2..b6ab0310 100644 --- a/src/commands/setting.ts +++ b/src/commands/setting.ts @@ -26,7 +26,7 @@ export default async (settingKey?: keyof ProjectSettings, settingValue?: string) } // We don't use console.log as it automatically adds a new line - // Which interfers with storing the value + // Which interferes with storing the value process.stdout.write(keyValue); } else { throw new ClaspError(ERROR.UNKNOWN_KEY(settingKey)); diff --git a/src/conf.ts b/src/conf.ts index 6673365a..4717a282 100644 --- a/src/conf.ts +++ b/src/conf.ts @@ -42,7 +42,7 @@ export class Conf { set projectRootDirectory(path: string | undefined) { this._root = path; - this._projectConfig = undefined; // Force recalculation of path if root chanaged + this._projectConfig = undefined; // Force recalculation of path if root changed } get projectRootDirectory() { diff --git a/src/files.ts b/src/files.ts index 914561f7..cac6213c 100644 --- a/src/files.ts +++ b/src/files.ts @@ -140,9 +140,9 @@ export const splitProjectFiles = (files: ProjectFile[]): [ProjectFile[], Project ]; async function getContentOfProjectFiles(files: ProjectFile[]) { - const transpileOpttions = getTranspileOptions(); + const transpileOptions = getTranspileOptions(); - const getContent = (file: ProjectFile) => (file.isIgnored ? file : projectFileWithContent(file, transpileOpttions)); + const getContent = (file: ProjectFile) => (file.isIgnored ? file : projectFileWithContent(file, transpileOptions)); return Promise.all(files.map(getContent)); } @@ -223,7 +223,7 @@ const getTranspileOptions = (): TranspileOptions => { // * Recursively finds all files that are part of the current project, and those that are ignored // * by .claspignore and calls the passed callback function with the file lists. // * @param {string} rootDir The project's root directory -// * @param {FilesCallBack} callback The callback will be called with the following paramters +// * @param {FilesCallBack} callback The callback will be called with the following parameters // * error: Error if there's an error, otherwise null // * result: string[][], array of two lists of strings, ie. [validFilePaths,ignoredFilePaths] // * files?: Array Array of AppsScriptFile objects used by clasp push @@ -328,7 +328,7 @@ export const fetchProject = async ( /** * Writes files locally to `pwd` with dots converted to subdirectories. - * @param {AppsScriptFile[]} Files to wirte + * @param {AppsScriptFile[]} Files to write * @param {string?} rootDir The directory to save the project files to. Defaults to `pwd` */ export const writeProjectFiles = async (files: AppsScriptFile[], rootDir = '') => { diff --git a/src/index.ts b/src/index.ts index 891fe4f5..3173e796 100755 --- a/src/index.ts +++ b/src/index.ts @@ -125,7 +125,7 @@ program .action(login); /** - * Logs out the user by deleteing client credentials. + * Logs out the user by deleting client credentials. * @name logout * @example logout */ diff --git a/src/messages.ts b/src/messages.ts index 2466bc8c..d3c3caf9 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -60,7 +60,7 @@ Forgot ${PROJECT_NAME} commands? Get help:\n ${PROJECT_NAME} --help`, NO_FUNCTION_NAME: 'N/A', NO_GCLOUD_PROJECT: () => `No projectId found in your ${config.projectConfig} file.`, NO_PARENT_ID: () => `No parentId or empty parentId found in your ${config.projectConfig} file.`, - NO_LOCAL_CREDENTIALS: `Requires local crendetials:\n\n ${PROJECT_NAME} login --creds `, + NO_LOCAL_CREDENTIALS: `Requires local credentials:\n\n ${PROJECT_NAME} login --creds `, NO_MANIFEST: (filename: string) => `Manifest: ${filename} invalid. \`create\` or \`clone\` a project first.`, NO_NESTED_PROJECTS: '\nNested clasp projects are not supported.', NO_VERSIONED_DEPLOYMENTS: 'No versioned deployments found in project.', diff --git a/test/test.ts b/test/test.ts index a6f7e135..c24b1539 100644 --- a/test/test.ts +++ b/test/test.ts @@ -183,7 +183,7 @@ describe('Test getLocalFileType function from utils', () => { expect(getLocalFileType('HTML')).to.equal('html'); }); - it('should return the specified file extention if the file type is SERVER_JS', () => { + it('should return the specified file extension if the file type is SERVER_JS', () => { expect(getLocalFileType('SERVER_JS', 'gs')).to.equal('gs'); expect(getLocalFileType('GS', 'js')).to.equal('gs'); expect(getLocalFileType('JS', 'gs')).to.equal('js');