Skip to content

Commit

Permalink
fix: occurred spelling mistake (#4595)
Browse files Browse the repository at this point in the history
* fix: occurred spelling mistake
  • Loading branch information
nikhname committed Jun 17, 2020
1 parent c0e0396 commit a461487
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async function uploadFiles(context) {
await sequential(uploadFileTasks);
spinner.succeed('Uploaded files successfully.');
} catch (e) {
spinner.fail('Error has occured during file upload.');
spinner.fail('Error has occurred during file upload.');
throw e;
}
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function invalidate(context) {
context.print.info(chalk.green(CloudFrontSecureURL));
context.exeInfo.cftInvalidationData = data;
} catch (err) {
context.print.error('Error occured when invalidating the Amazon CloudFront distribution');
context.print.error('Error occurred when invalidating the Amazon CloudFront distribution');
context.print.info(err);
throw err;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function run(context, distributionDirPath) {
await sequential(uploadFileTasks);
spinner.succeed('Uploaded files successfully.');
} catch (e) {
spinner.fail('Error has occured during file upload.');
spinner.fail('Error has occurred during file upload.');
throw e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-notifications/lib/auth-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function ensureAuth(context) {
await attachPolicy(context, policy);
spinner.succeed('Successfully set the IAM policy');
} catch (e) {
spinner.fail('Error occured during IAM policy setup.');
spinner.fail('Error occurred during IAM policy setup.');
throw e;
}
await checkAuth(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function deleteImageIndex(rekognition, result, externalImageID) {
if (result1.DeletedFaces) {
console.log('deleted faces from collection successfully');
} else {
console.log('error occured');
console.log('error occurred');
console.log(result1);
}
resultDeleted = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-cli/src/commands/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
return await context.amplify.pushResources(context);
} catch (e) {
if (e.name !== 'InvalidDirectiveError') {
context.print.error(`An error occured during the push operation: ${e.message}`);
context.print.error(`An error occurred during the push operation: ${e.message}`);
}
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-cli/src/config-steps/c9-onFailure.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const print = require('../extensions/amplify-helpers/print');
const util = require('util');

function run(e) {
print.error('Error occured during configuration.');
print.error('Error occurred during configuration.');
print.info(util.inspect(e));
}

Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-cli/src/init-steps/postInitSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function run(context) {
await runPackage();
} catch (e) {
if (e.name !== 'InvalidDirectiveError') {
context.print.error(`An error occured during the push operation: ${e.message}`);
context.print.error(`An error occurred during the push operation: ${e.message}`);
}
process.exit(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async function updateStackForAPIMigration(context, category, resourceName, optio
})
.catch(err => {
if (!isCLIMigration) {
spinner.fail('An error occured when migrating the API project.');
spinner.fail('An error occurred when migrating the API project.');
}
throw err;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class CloudFormation {
clearInterval(self.pollForEvents);
}
if (completeErr) {
context.print.error('An error occurred when creating the CloudFormation stack');
context.print.error('An error occurred when creating the CloudFormation stack');
this.collectStackErrors(cfnParentStackParams.StackName).then(() => reject(completeErr));
}
resolve(waitForStackdata);
Expand Down
20 changes: 10 additions & 10 deletions packages/graphql-transformer-core/src/util/sanity-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface Diff {
export async function check(
currentCloudBackendDir: string,
buildDirectory: string,
rootStackName: string = 'cloudformation-template.json'
rootStackName: string = 'cloudformation-template.json',
) {
const cloudBackendDirectoryExists = await fs.exists(currentCloudBackendDir);
const buildDirectoryExists = await fs.exists(buildDirectory);
Expand Down Expand Up @@ -77,7 +77,7 @@ export function cantEditKeySchema(diff: Diff) {
throw new InvalidMigrationError(
`Attempting to edit the key schema of the ${tableName} table in the ${stackName} stack. `,
'Adding a primary @key directive to an existing @model. ',
'Remove the @key directive or provide a name e.g @key(name: "ByStatus", fields: ["status"]).'
'Remove the @key directive or provide a name e.g @key(name: "ByStatus", fields: ["status"]).',
);
}
}
Expand All @@ -103,7 +103,7 @@ export function cantAddLSILater(diff: Diff) {
`Attempting to add a local secondary index to the ${tableName} table in the ${stackName} stack. ` +
'Local secondary indexes must be created when the table is created.',
"Adding a @key directive where the first field in 'fields' is the same as the first field in the 'fields' of the primary @key.",
"Change the first field in 'fields' such that a global secondary index is created or delete and recreate the model."
"Change the first field in 'fields' such that a global secondary index is created or delete and recreate the model.",
);
}
}
Expand All @@ -122,7 +122,7 @@ export function cantEditGSIKeySchema(diff: Diff, currentBuild: DiffableProject,
'The key schema of a global secondary index cannot be changed after being deployed.',
'If using @key, first add a new @key, run `amplify push`, ' +
'and then remove the old @key. If using @connection, first remove the @connection, run `amplify push`, ' +
'and then add the new @connection with the new configuration.'
'and then add the new @connection with the new configuration.',
);
}
if (
Expand All @@ -142,7 +142,7 @@ export function cantEditGSIKeySchema(diff: Diff, currentBuild: DiffableProject,
const innerDiffs = getDiffs(oldIndexesDiffable, newIndexesDiffable);
// We must look at this inner diff or else we could confuse a situation
// where the user adds a GSI to the beginning of the GlobalSecondaryIndexes list in CFN.
// We re-key the indexes list so we can determine if a change occured to an index that
// We re-key the indexes list so we can determine if a change occurred to an index that
// already exists.
for (const innerDiff of innerDiffs) {
// path: ["AGSI","KeySchema",0,"AttributeName"]
Expand Down Expand Up @@ -176,7 +176,7 @@ export function cantAddAndRemoveGSIAtSameTime(diff: Diff, currentBuild: Diffable
'You may only change one global secondary index in a single CloudFormation stack update. ',
'If using @key, change one @key at a time. ' +
'If using @connection, add the new @connection, run `amplify push`, ' +
'and then remove the new @connection with the new configuration.'
'and then remove the new @connection with the new configuration.',
);
}
if (
Expand Down Expand Up @@ -236,7 +236,7 @@ export function cantEditLSIKeySchema(diff: Diff, currentBuild: DiffableProject,
const innerDiffs = getDiffs(oldIndexesDiffable, newIndexesDiffable);
// We must look at this inner diff or else we could confuse a situation
// where the user adds a LSI to the beginning of the LocalSecondaryIndex list in CFN.
// We re-key the indexes list so we can determine if a change occured to an index that
// We re-key the indexes list so we can determine if a change occurred to an index that
// already exists.
for (const innerDiff of innerDiffs) {
// path: ["AGSI","KeySchema",0,"AttributeName"]
Expand All @@ -248,7 +248,7 @@ export function cantEditLSIKeySchema(diff: Diff, currentBuild: DiffableProject,
`Attempting to edit the local secondary index ${indexName} on the ${tableName} table in the ${stackName} stack. `,
'The key schema of a local secondary index cannot be changed after being deployed.',
'When enabling new access patterns you should: 1. Add a new @key 2. run amplify push ' +
'3. Verify the new access pattern and remove the old @key.'
'3. Verify the new access pattern and remove the old @key.',
);
}
}
Expand All @@ -265,7 +265,7 @@ export function cantHaveMoreThan200Resources(diffs: Diff[], currentBuild: Diffab
'CloudFormation templates may contain at most 200 resources.',
'If the stack is a custom stack, break the stack up into multiple files in stacks/. ' +
'If the stack was generated, you have hit a limit and can use the StackMapping argument in ' +
`${TRANSFORM_CONFIG_FILE_NAME} to fine tune how resources are assigned to stacks.`
`${TRANSFORM_CONFIG_FILE_NAME} to fine tune how resources are assigned to stacks.`,
);
}
}
Expand All @@ -279,7 +279,7 @@ function keyBy(objects: any[], attr: string) {
...acc,
[obj[attr]]: obj,
}),
{}
{},
);
}

Expand Down

0 comments on commit a461487

Please sign in to comment.