Skip to content

Commit

Permalink
Fix typo (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
amalej authored May 4, 2024
1 parent 84584b6 commit 11e4102
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions docs/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ Typescript configuration file | `<rootDir>/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` |
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 <path>` or `--project <path>` | The filename must start with a dot '.'
Clasp ignore file | `-I <path>` or `--ignore <path>` |
Expand Down
4 changes: 2 additions & 2 deletions src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default async (options: CommandOption): Promise<void> => {
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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions src/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down Expand Up @@ -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<AppsScriptFile> Array of AppsScriptFile objects used by clasp push
Expand Down Expand Up @@ -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 = '') => {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <file.json>`,
NO_LOCAL_CREDENTIALS: `Requires local credentials:\n\n ${PROJECT_NAME} login --creds <file.json>`,
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.',
Expand Down
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 11e4102

Please sign in to comment.