diff --git a/packages/insomnia-app/app/common/analytics.ts b/packages/insomnia-app/app/common/analytics.ts index 29f978dd5..fa15c0013 100644 --- a/packages/insomnia-app/app/common/analytics.ts +++ b/packages/insomnia-app/app/common/analytics.ts @@ -182,7 +182,7 @@ export async function _trackEvent( action: string, label?: string | null, value?: string | null, - queuable?: boolean | null, + queueable?: boolean | null, ) { const prefix = interactive ? '[ga] Event' : '[ga] Non-interactive'; console.log(prefix, [category, action, label, value].filter(Boolean).join(', ')); @@ -216,7 +216,7 @@ export async function _trackEvent( value: value, }); // @ts-expect-error -- TSCONVERSION appears to be a genuine error - await _sendToGoogle(params, !!queuable); + await _sendToGoogle(params, !!queueable); } export async function _trackPageView(location: string) { diff --git a/packages/insomnia-app/app/common/har.ts b/packages/insomnia-app/app/common/har.ts index c938cdf3b..c7daa5f94 100644 --- a/packages/insomnia-app/app/common/har.ts +++ b/packages/insomnia-app/app/common/har.ts @@ -256,7 +256,7 @@ export async function exportHarResponse(response: ResponseModel | null) { status: response.statusCode, statusText: response.statusMessage, httpVersion: 'HTTP/1.1', - cookies: getReponseCookies(response), + cookies: getResponseCookies(response), headers: getResponseHeaders(response), content: getResponseContent(response), redirectURL: '', @@ -380,7 +380,7 @@ function getRequestCookies(renderedRequest: RenderedRequest) { return harCookies; } -function getReponseCookies(response: ResponseModel) { +function getResponseCookies(response: ResponseModel) { const headers = response.headers.filter(Boolean) as HarCookie[]; const responseCookies = getSetCookieHeaders(headers) .reduce((accumulator, harCookie) => { diff --git a/packages/insomnia-app/app/common/misc.ts b/packages/insomnia-app/app/common/misc.ts index 3745bdaab..dc5d0b7d8 100644 --- a/packages/insomnia-app/app/common/misc.ts +++ b/packages/insomnia-app/app/common/misc.ts @@ -424,7 +424,7 @@ export function isObject(obj: unknown) { /** Finds epoch's digit count and converts it to make it exactly 13 digits. - Which is the epoch millisecond represntation. + Which is the epoch millisecond representation. */ export function convertEpochToMilliseconds(epoch: number) { const expDigitCount = epoch.toString().length; diff --git a/packages/insomnia-app/app/network/grpc/proto-manager/index.tsx b/packages/insomnia-app/app/network/grpc/proto-manager/index.tsx index 4cea01a5e..a0c64f971 100644 --- a/packages/insomnia-app/app/network/grpc/proto-manager/index.tsx +++ b/packages/insomnia-app/app/network/grpc/proto-manager/index.tsx @@ -109,7 +109,7 @@ export async function addDirectory(workspaceId: string) { error: e, }); } finally { - // Fake flushing changes (or, rollback) only prevents change notifs being sent to the UI + // Fake flushing changes (or, rollback) only prevents change notifications being sent to the UI // It does NOT revert changes written to the database, as is typical of a db transaction rollback // As such, if rolling back, the created directory needs to be deleted manually await db.flushChanges(bufferId, rollback); diff --git a/packages/insomnia-app/app/network/network.ts b/packages/insomnia-app/app/network/network.ts index 049967064..bc339a128 100644 --- a/packages/insomnia-app/app/network/network.ts +++ b/packages/insomnia-app/app/network/network.ts @@ -705,7 +705,7 @@ export async function _actuallySend( }); } - // Set User-Agent if it't not already in headers + // Set User-Agent if it's not already in headers if (!hasUserAgentHeader(headers)) { setOpt(Curl.option.USERAGENT, `insomnia/${getAppVersion()}`); } diff --git a/packages/insomnia-app/app/plugins/install.ts b/packages/insomnia-app/app/plugins/install.ts index 6234cb680..3a07e3fb8 100644 --- a/packages/insomnia-app/app/plugins/install.ts +++ b/packages/insomnia-app/app/plugins/install.ts @@ -172,8 +172,8 @@ async function _installPluginToTmpDir(lookupName: string) { }, (err, stdout, stderr) => { // Check yarn/electron process exit code. - // In certain environments electron can exit with error even if the command was perfomed sucesfully. - // Checking for sucess message in output is a workaround for false errors. + // In certain environments electron can exit with error even if the command was performed successfully. + // Checking for success message in output is a workaround for false errors. if (err && !stdout.toString().includes('success')) { reject(new Error(`${lookupName} install error: ${err.message}`)); return; diff --git a/packages/insomnia-app/app/sync/git/mem-client.ts b/packages/insomnia-app/app/sync/git/mem-client.ts index 3283986e4..20251df06 100644 --- a/packages/insomnia-app/app/sync/git/mem-client.ts +++ b/packages/insomnia-app/app/sync/git/mem-client.ts @@ -369,7 +369,7 @@ export class MemClient { throw new SystemError({ code: 'ENOTDIR', errno: -20, - message: `ENOTDIR: not a simlink, scandir '${entry.path}'`, + message: `ENOTDIR: not a symlink, scandir '${entry.path}'`, path: entry.path, syscall: 'scandir', }); diff --git a/packages/insomnia-app/app/ui/components/codemirror/modes/openapi.ts b/packages/insomnia-app/app/ui/components/codemirror/modes/openapi.ts index be22f0394..f3462d081 100644 --- a/packages/insomnia-app/app/ui/components/codemirror/modes/openapi.ts +++ b/packages/insomnia-app/app/ui/components/codemirror/modes/openapi.ts @@ -61,13 +61,13 @@ CodeMirror.defineMode('openapi', function() { return 'meta'; } - /* list seperator */ + /* list separator */ if (state.inlineList > 0 && !esc && ch === ',') { stream.next(); return 'meta'; } - /* pairs seperator */ + /* pairs separator */ if (state.inlinePairs > 0 && !esc && ch === ',') { state.keyCol = 0; state.pair = false; diff --git a/packages/insomnia-app/app/ui/components/templating/tag-editor.tsx b/packages/insomnia-app/app/ui/components/templating/tag-editor.tsx index 67ca6bf84..36a237816 100644 --- a/packages/insomnia-app/app/ui/components/templating/tag-editor.tsx +++ b/packages/insomnia-app/app/ui/components/templating/tag-editor.tsx @@ -538,7 +538,7 @@ class TagEditor extends PureComponent { {docs.map((doc: any) => { let namePrefix: string | null = null; - // Show paren't folder with name if it's a request + // Show parent folder with name if it's a request if (doc.type === models.request.type) { const requests = allDocs[models.request.type] || []; const request: any = requests.find(r => r._id === doc._id); diff --git a/packages/insomnia-app/app/ui/components/wrapper-migration.tsx b/packages/insomnia-app/app/ui/components/wrapper-migration.tsx index 2a36a507a..dab397e06 100644 --- a/packages/insomnia-app/app/ui/components/wrapper-migration.tsx +++ b/packages/insomnia-app/app/ui/components/wrapper-migration.tsx @@ -239,7 +239,7 @@ const Fail = ({ error }: FailProps) => ( {error && (
- Additonal information + Additional information
             {error.stack || error}
           
diff --git a/packages/insomnia-importers/src/importers/openapi-3.ts b/packages/insomnia-importers/src/importers/openapi-3.ts index f6d9293f5..57a98eef0 100644 --- a/packages/insomnia-importers/src/importers/openapi-3.ts +++ b/packages/insomnia-importers/src/importers/openapi-3.ts @@ -460,7 +460,7 @@ const prepareBody = (endpointSchema: OpenAPIV3.OperationObject): ImportRequest[' }; /** - * Converts openapi schema of parametes into insomnia one. + * Converts openapi schema of parameters into insomnia one. */ const convertParameters = (parameters: OpenAPIV3.ParameterObject[] = []) => { return parameters.map((parameter) => { diff --git a/packages/insomnia-importers/src/importers/swagger-2.ts b/packages/insomnia-importers/src/importers/swagger-2.ts index 9b9e9f7c8..1b0a816d4 100644 --- a/packages/insomnia-importers/src/importers/swagger-2.ts +++ b/packages/insomnia-importers/src/importers/swagger-2.ts @@ -90,7 +90,7 @@ const parseEndpoints = (document: OpenAPIV2.Document) => { return distinct; }, [] as string[]) .filter((tag) => !tags.map((tag) => tag.name).includes(tag)) - .map((name) => ({ name, desciption: '' })); + .map((name) => ({ name, description: '' })); const folders = [...tags, ...implicitTags].map( importFolderItem(defaultParent), @@ -515,7 +515,7 @@ const generateParameterExample = ( }; /** - * Converts swagger schema of parametes into insomnia one. + * Converts swagger schema of parameters into insomnia one. */ const convertParameters = (parameters?: OpenAPIV2.Parameter[]) => { return parameters?.map((parameter) => { diff --git a/packages/insomnia-inso/README.md b/packages/insomnia-inso/README.md index 49b894441..a2ecedcb2 100644 --- a/packages/insomnia-inso/README.md +++ b/packages/insomnia-inso/README.md @@ -41,7 +41,7 @@ If `inso` cannot find the `.insomnia` directory, it will try to run against the Typically, Insomnia database id's are quite long, for example: `wrk_012d4860c7da418a85ffea7406e1292a` . When specifying an identifier for `inso` , similar to Git hashes, you may choose to concatenate and use the first x characters (for example, `wrk_012d486` ), which is very likely to be unique. If in the rare chance the short id is _not_ unique against the data, `inso` will inform as such. -Additionally, if the `[identifier]` argument is ommitted from the command, `inso` will search in the database for the information it needs, and prompt the user. Prompts can be disabled with the `--ci` global option. +Additionally, if the `[identifier]` argument is omitted from the command, `inso` will search in the database for the information it needs, and prompt the user. Prompts can be disabled with the `--ci` global option. ![](https://raw.githubusercontent.com/Kong/insomnia/develop/packages/insomnia-inso/assets/ci-demo.gif) diff --git a/packages/insomnia-inso/src/db/models/environment.ts b/packages/insomnia-inso/src/db/models/environment.ts index 45be992d0..d78d69134 100644 --- a/packages/insomnia-inso/src/db/models/environment.ts +++ b/packages/insomnia-inso/src/db/models/environment.ts @@ -30,7 +30,7 @@ export const loadEnvironment = ( env => env.parentId === baseWorkspaceEnv._id, ); - // If no identifier, return base environmenmt + // If no identifier, return base environment if (!identifier) { logger.trace('No sub environments found, using base environment'); return baseWorkspaceEnv; diff --git a/packages/insomnia-smoke-test/README.md b/packages/insomnia-smoke-test/README.md index 5e756d441..094e74eed 100644 --- a/packages/insomnia-smoke-test/README.md +++ b/packages/insomnia-smoke-test/README.md @@ -72,7 +72,7 @@ A test should not depend on any external services unless absolutely necessary. I ### Element selection Spectron is built heavily on top of WebdriverIO, and WebdriverIO's `browser` object is available under `app.client` ([docs](https://github.com/electron-userland/spectron#client)). This is the primary API you will need for user interactions, see examples with existing tests. -Through WebdriverIO you can use a host of CSS or React selectors. There is no clear guideline about which selector to use, but whichever approach is used it must favour stablility and be understandable. +Through WebdriverIO you can use a host of CSS or React selectors. There is no clear guideline about which selector to use, but whichever approach is used it must favour stability and be understandable. There are trade-offs with each selector approach but it's important to know how generic or specific a particular component or CSS class is, in order to ensure that the correct element is always selected as the application evolves. @@ -194,7 +194,7 @@ Unlike unit tests, the application startup time for a smoke test can sometimes b ## Contributing a smoke test? -Smoke tests can potentially be flaky, and one attempt to avoid flaky tests in the default branch is to run the final implementation of a test atleast 20 times locally to prove its stability. If a test is unable to achieve this, it is very unlikely to be accepted into the test suite. +Smoke tests can potentially be flaky, and one attempt to avoid flaky tests in the default branch is to run the final implementation of a test at least 20 times locally to prove its stability. If a test is unable to achieve this, it is very unlikely to be accepted into the test suite. You can repeat a test quickly by wrapping it with the following block: ```ts diff --git a/packages/insomnia-smoke-test/core/app.test.ts b/packages/insomnia-smoke-test/core/app.test.ts index edb976b64..987de7654 100644 --- a/packages/insomnia-smoke-test/core/app.test.ts +++ b/packages/insomnia-smoke-test/core/app.test.ts @@ -191,7 +191,7 @@ describe('Application launch', function() { // 1. sending no basic auth will fail // 2. sending basic auth will succeed // 3. sending basic auth with special characters encoded with IS0-8859-1 will succeed - // 4. sending while basic auth is disabled within insomnnia will fail + // 4. sending while basic auth is disabled within insomnia will fail // TODO(TSCONVERSION) - this test fails fairly readily after TS conversion, needs investigation it.skip('sends request with basic authentication', async () => { const url = 'http://127.0.0.1:4010/auth/basic'; diff --git a/packages/openapi-2-kong/src/common.ts b/packages/openapi-2-kong/src/common.ts index d7a7f176f..6bfd30d3e 100644 --- a/packages/openapi-2-kong/src/common.ts +++ b/packages/openapi-2-kong/src/common.ts @@ -55,7 +55,7 @@ export function getName( const defaultName = defaultValue || 'openapi'; const name = typeof rawName === 'string' && rawName ? rawName : defaultName; - // Sluggify + // Slugify return generateSlug(name, slugifyOptions); } @@ -65,7 +65,7 @@ export function generateSlug(str: string, options: SlugifyOptions = {}) { return slugify(str, options); } -/** characters in curly brances not immediately followed by `://`, e.g. `{foo}` will match but `{foo}://` will not. */ +/** characters in curly braces not immediately followed by `://`, e.g. `{foo}` will match but `{foo}://` will not. */ const pathVariableSearchValue = /{([^}]+)}(?!:\/\/)/g; export function pathVariablesToRegex(p: string) { diff --git a/packages/openapi-2-kong/src/declarative-config/services.ts b/packages/openapi-2-kong/src/declarative-config/services.ts index 9f2363aa4..4b5d53a38 100644 --- a/packages/openapi-2-kong/src/declarative-config/services.ts +++ b/packages/openapi-2-kong/src/declarative-config/services.ts @@ -157,7 +157,7 @@ export function generateRouteName( return `${name}-${opsName}`; } - // replace all `/` with `-` except the ones at the beginng or end of a string + // replace all `/` with `-` except the ones at the beginning or end of a string const replacedRoute = routePath.replace(/(?!^)\/(?!$)/g, '-'); const pathSlug = generateSlug(pathItem['x-kong-name'] || replacedRoute); return `${name}${pathSlug ? `-${pathSlug}` : ''}-${method}`;