Skip to content

Commit

Permalink
Revert/last green (#8759)
Browse files Browse the repository at this point in the history
* Revert "fix(amplify-category-auth): added username attributes to configure sms (#8624)"

This reverts commit adb70b1.

* Revert "Model vnext unit test update (#8749)"

This reverts commit 8a308a8.

* Revert "Revert "feat: version blocking for CLI (#8737)" (#8747)"

This reverts commit 2d5110c.

* Revert "chore: update aws-sdk, cdk, typescript dependency, regen yarn.lock (#8739)"

This reverts commit d8065a8.

* Revert "feat: version blocking for CLI (#8737)"

This reverts commit b92cd32.

* Revert "Remove pipelineFunction references in favor of resolvers (#8729)"

This reverts commit a0295aa.

* Revert "fix: move @model params to root stack and fix ds logical id (#8736)"

This reverts commit df4408c.

* Revert "fix(amplify-provider-awscloudformation): use amplify prompts for warnings (#8731)"

This reverts commit 98840ec.
  • Loading branch information
ammarkarachi committed Nov 9, 2021
1 parent adb70b1 commit f1c1ee2
Show file tree
Hide file tree
Showing 77 changed files with 3,035 additions and 5,599 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"rimraf": "^3.0.0",
"ts-jest": "^26.4.4",
"ts-node": "^8.10.1",
"typescript": "^4.4.4"
"typescript": "^4.1.3"
},
"config": {
"commitizen": {
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-appsync-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"amplify-velocity-template": "1.4.5",
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"chalk": "^4.1.1",
"cors": "^2.8.5",
"dataloader": "^2.0.0",
Expand Down
88 changes: 44 additions & 44 deletions packages/amplify-category-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,50 @@
},
"dependencies": {
"@aws-amplify/graphql-transformer-migrator": "0.1.0",
"@aws-cdk/assets": "~1.131.0",
"@aws-cdk/aws-apigateway": "~1.131.0",
"@aws-cdk/aws-apigatewayv2": "~1.131.0",
"@aws-cdk/aws-applicationautoscaling": "~1.131.0",
"@aws-cdk/aws-autoscaling": "~1.131.0",
"@aws-cdk/aws-autoscaling-common": "~1.131.0",
"@aws-cdk/aws-autoscaling-hooktargets": "~1.131.0",
"@aws-cdk/aws-certificatemanager": "~1.131.0",
"@aws-cdk/aws-cloudformation": "~1.131.0",
"@aws-cdk/aws-cloudfront": "~1.131.0",
"@aws-cdk/aws-cloudwatch": "~1.131.0",
"@aws-cdk/aws-codebuild": "~1.131.0",
"@aws-cdk/aws-codeguruprofiler": "~1.131.0",
"@aws-cdk/aws-codepipeline": "~1.131.0",
"@aws-cdk/aws-codepipeline-actions": "~1.131.0",
"@aws-cdk/aws-cognito": "~1.131.0",
"@aws-cdk/aws-ec2": "~1.131.0",
"@aws-cdk/aws-ecr": "~1.131.0",
"@aws-cdk/aws-ecr-assets": "~1.131.0",
"@aws-cdk/aws-ecs": "~1.131.0",
"@aws-cdk/aws-efs": "~1.131.0",
"@aws-cdk/aws-elasticloadbalancing": "~1.131.0",
"@aws-cdk/aws-elasticloadbalancingv2": "~1.131.0",
"@aws-cdk/aws-events": "~1.131.0",
"@aws-cdk/aws-iam": "~1.131.0",
"@aws-cdk/aws-kms": "~1.131.0",
"@aws-cdk/aws-lambda": "~1.131.0",
"@aws-cdk/aws-logs": "~1.131.0",
"@aws-cdk/aws-route53": "~1.131.0",
"@aws-cdk/aws-route53-targets": "~1.131.0",
"@aws-cdk/aws-s3": "~1.131.0",
"@aws-cdk/aws-s3-assets": "~1.131.0",
"@aws-cdk/aws-sam": "~1.131.0",
"@aws-cdk/aws-secretsmanager": "~1.131.0",
"@aws-cdk/aws-servicediscovery": "~1.131.0",
"@aws-cdk/aws-sns": "~1.131.0",
"@aws-cdk/aws-sns-subscriptions": "~1.131.0",
"@aws-cdk/aws-sqs": "~1.131.0",
"@aws-cdk/aws-ssm": "~1.131.0",
"@aws-cdk/cloud-assembly-schema": "~1.131.0",
"@aws-cdk/core": "~1.131.0",
"@aws-cdk/custom-resources": "~1.131.0",
"@aws-cdk/cx-api": "~1.131.0",
"@aws-cdk/region-info": "~1.131.0",
"@aws-cdk/assets": "~1.124.0",
"@aws-cdk/aws-apigateway": "~1.124.0",
"@aws-cdk/aws-apigatewayv2": "~1.124.0",
"@aws-cdk/aws-applicationautoscaling": "~1.124.0",
"@aws-cdk/aws-autoscaling": "~1.124.0",
"@aws-cdk/aws-autoscaling-common": "~1.124.0",
"@aws-cdk/aws-autoscaling-hooktargets": "~1.124.0",
"@aws-cdk/aws-certificatemanager": "~1.124.0",
"@aws-cdk/aws-cloudformation": "~1.124.0",
"@aws-cdk/aws-cloudfront": "~1.124.0",
"@aws-cdk/aws-cloudwatch": "~1.124.0",
"@aws-cdk/aws-codebuild": "~1.124.0",
"@aws-cdk/aws-codeguruprofiler": "~1.124.0",
"@aws-cdk/aws-codepipeline": "~1.124.0",
"@aws-cdk/aws-codepipeline-actions": "~1.124.0",
"@aws-cdk/aws-cognito": "~1.124.0",
"@aws-cdk/aws-ec2": "~1.124.0",
"@aws-cdk/aws-ecr": "~1.124.0",
"@aws-cdk/aws-ecr-assets": "~1.124.0",
"@aws-cdk/aws-ecs": "~1.124.0",
"@aws-cdk/aws-efs": "~1.124.0",
"@aws-cdk/aws-elasticloadbalancing": "~1.124.0",
"@aws-cdk/aws-elasticloadbalancingv2": "~1.124.0",
"@aws-cdk/aws-events": "~1.124.0",
"@aws-cdk/aws-iam": "~1.124.0",
"@aws-cdk/aws-kms": "~1.124.0",
"@aws-cdk/aws-lambda": "~1.124.0",
"@aws-cdk/aws-logs": "~1.124.0",
"@aws-cdk/aws-route53": "~1.124.0",
"@aws-cdk/aws-route53-targets": "~1.124.0",
"@aws-cdk/aws-s3": "~1.124.0",
"@aws-cdk/aws-s3-assets": "~1.124.0",
"@aws-cdk/aws-sam": "~1.124.0",
"@aws-cdk/aws-secretsmanager": "~1.124.0",
"@aws-cdk/aws-servicediscovery": "~1.124.0",
"@aws-cdk/aws-sns": "~1.124.0",
"@aws-cdk/aws-sns-subscriptions": "~1.124.0",
"@aws-cdk/aws-sqs": "~1.124.0",
"@aws-cdk/aws-ssm": "~1.124.0",
"@aws-cdk/cloud-assembly-schema": "~1.124.0",
"@aws-cdk/core": "~1.124.0",
"@aws-cdk/custom-resources": "~1.124.0",
"@aws-cdk/cx-api": "~1.124.0",
"@aws-cdk/region-info": "~1.124.0",
"@graphql-tools/merge": "^6.0.18",
"@octokit/rest": "^18.0.9",
"amplify-cli-core": "1.31.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.845.0",
"axios": "^0.21.4",
"body-parser": "^1.19.0",
"express": "^4.17.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"author": "",
"license": "ISC",
"dependencies": {
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.845.0",
"body-parser": "^1.19.0",
"express": "^4.17.1"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.845.0",
"express": "^4.17.1",
"express-graphql": "^0.11.0",
"graphql": "^15.4.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-category-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"amplify-headless-interface": "1.10.0",
"amplify-util-headless-input": "1.5.4",
"amplify-util-import": "1.5.15",
"aws-cdk": "~1.131.0",
"aws-sdk": "^2.1024.0",
"aws-cdk": "~1.124.0",
"aws-sdk": "^2.963.0",
"chalk": "^4.1.1",
"change-case": "^4.1.1",
"enquirer": "^2.3.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "Richard Threlkeld",
"license": "Apache-2.0",
"dependencies": {
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.845.0",
"aws-serverless-express": "^3.3.5",
"body-parser": "^1.17.2",
"express": "^4.17.1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% var autoVerifiedAttributes = props.autoVerifiedAttributes ? props.autoVerifiedAttributes.concat(props.aliasAttributes ? props.aliasAttributes : []).filter((attr, i, aliasAttributeArray) => ['email', 'phone_number'].includes(attr) && aliasAttributeArray.indexOf(attr) === i) : [] %>
<% var configureSMS = ((props.autoVerifiedAttributes && props.autoVerifiedAttributes.includes('phone_number')) || (props.mfaConfiguration != 'OFF' && props.mfaTypes && props.mfaTypes.includes('SMS Text Message')) || (props.requiredAttributes && props.requiredAttributes.includes('phone_number')) || (props.usernameAttributes && props.usernameAttributes.includes('phone_number'))) %>
<% var configureSMS = ((props.autoVerifiedAttributes && props.autoVerifiedAttributes.includes('phone_number')) || (props.mfaConfiguration != 'OFF' && props.mfaTypes && props.mfaTypes.includes('SMS Text Message')) || (props.requiredAttributes && props.requiredAttributes.includes('phone_number'))) %>
AWSTemplateFormatVersion: 2010-09-09

Parameters:
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"amplify-cli-core": "1.31.1",
"amplify-function-plugin-interface": "1.9.1",
"archiver": "^5.3.0",
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"chalk": "^4.1.1",
"cloudform-types": "^4.2.0",
"enquirer": "^2.3.6",
Expand Down
10 changes: 5 additions & 5 deletions packages/amplify-category-geo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"aws"
],
"dependencies": {
"@aws-cdk/aws-iam": "~1.131.0",
"@aws-cdk/aws-lambda": "~1.131.0",
"@aws-cdk/aws-location": "~1.131.0",
"@aws-cdk/core": "~1.131.0",
"@aws-cdk/custom-resources": "~1.131.0",
"@aws-cdk/aws-iam": "~1.124.0",
"@aws-cdk/aws-lambda": "~1.124.0",
"@aws-cdk/aws-location": "~1.124.0",
"@aws-cdk/core": "~1.124.0",
"@aws-cdk/custom-resources": "~1.124.0",
"amplify-cli-core": "1.31.1",
"amplify-prompts": "1.2.0",
"folder-hash": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-predictions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"dependencies": {
"amplify-cli-core": "1.31.1",
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"chalk": "^4.1.1",
"fs-extra": "^8.1.0",
"inquirer": "^7.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"rimraf": "^3.0.2"
},
"jest": {
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"node": ">=12.0.0"
},
"dependencies": {
"@aws-cdk/cloudformation-diff": "~1.131.0",
"@aws-cdk/cloudformation-diff": "~1.124.0",
"amplify-app": "3.0.16",
"amplify-category-analytics": "2.21.24",
"amplify-category-api": "2.33.2",
Expand Down Expand Up @@ -69,7 +69,7 @@
"amplify-python-function-template-provider": "1.3.12",
"amplify-util-import": "1.5.15",
"amplify-util-mock": "3.34.11",
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"chalk": "^4.1.1",
"ci-info": "^2.0.0",
"cli-table3": "^0.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-console-hosting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"amplify-cli-core": "1.31.1",
"archiver": "^5.3.0",
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"chalk": "^4.1.1",
"cli-table3": "^0.6.0",
"execa": "^5.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-console-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"@types/ini": "^1.3.30",
"amplify-e2e-core": "1.30.0",
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"dotenv": "^8.2.0",
"esm": "^3.2.25",
"fs-extra": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-dynamodb-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"amplify-cli-core": "1.31.1",
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"detect-port": "^1.3.0",
"event-to-promise": "^0.8.0",
"execa": "^5.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"amplify-e2e-core": "1.30.0",
"aws-amplify": "^4.2.8",
"aws-appsync": "^4.1.1",
"aws-sdk": "^2.1024.0",
"aws-sdk": "^2.963.0",
"circleci-api": "^4.1.4",
"dotenv": "^8.2.0",
"esm": "^3.2.25",
Expand Down
28 changes: 23 additions & 5 deletions packages/amplify-e2e-tests/src/__tests__/resolvers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('user created resolvers', () => {
it('adds the overwritten resolver to the build', async () => {
const resolverName = 'Query.listTodos.req.vtl';
const resolver = '$util.unauthorized()';
const generatedResolverPath = join(projectDir, 'amplify', 'backend', 'api', apiName, 'build', 'resolvers', resolverName);
const generatedResolverPath = join(projectDir, 'amplify', 'backend', 'api', apiName, 'build', 'pipelineFunctions', resolverName);

await addApiWithoutSchema(projectDir, { apiName });
await updateApiSchema(projectDir, apiName, 'simple_model.graphql');
Expand All @@ -55,8 +55,26 @@ describe('user created resolvers', () => {
const resolverReq = '$util.unauthorized()';
const resolverRes = '$util.toJson({})';

const generatedReqResolverPath = join(projectDir, 'amplify', 'backend', 'api', apiName, 'build', 'resolvers', resolverReqName);
const generatedResResolverPath = join(projectDir, 'amplify', 'backend', 'api', apiName, 'build', 'resolvers', resolverResName);
const generatedReqResolverPath = join(
projectDir,
'amplify',
'backend',
'api',
apiName,
'build',
'pipelineFunctions',
resolverReqName,
);
const generatedResResolverPath = join(
projectDir,
'amplify',
'backend',
'api',
apiName,
'build',
'pipelineFunctions',
resolverResName,
);
const stackPath = join(projectDir, 'amplify', 'backend', 'api', apiName, 'build', 'stacks', 'CustomResources.json');

const Resources = {
Expand All @@ -72,7 +90,7 @@ describe('user created resolvers', () => {
FieldName: 'commentsForTodo',
RequestMappingTemplateS3Location: {
'Fn::Sub': [
's3://${S3DeploymentBucket}/${S3DeploymentRootKey}/resolvers/Query.commentsForTodo.req.vtl',
's3://${S3DeploymentBucket}/${S3DeploymentRootKey}/pipelineFunctions/Query.commentsForTodo.req.vtl',
{
S3DeploymentBucket: {
Ref: 'S3DeploymentBucket',
Expand All @@ -85,7 +103,7 @@ describe('user created resolvers', () => {
},
ResponseMappingTemplateS3Location: {
'Fn::Sub': [
's3://${S3DeploymentBucket}/${S3DeploymentRootKey}/resolvers/Query.commentsForTodo.res.vtl',
's3://${S3DeploymentBucket}/${S3DeploymentRootKey}/pipelineFunctions/Query.commentsForTodo.res.vtl',
{
S3DeploymentBucket: {
Ref: 'S3DeploymentBucket',
Expand Down
3 changes: 1 addition & 2 deletions packages/amplify-graphiql-explorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"noEmit": true,
"jsx": "react-jsx",
"noImplicitAny": false,
"noFallthroughCasesInSwitch": true,
"useUnknownInCatchVariables": false,
"noFallthroughCasesInSwitch": true
},
"include": [
"src"
Expand Down
10 changes: 5 additions & 5 deletions packages/amplify-graphql-auth-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"@aws-amplify/graphql-transformer-core": "0.9.2",
"@aws-amplify/graphql-transformer-interfaces": "1.10.0",
"@aws-amplify/graphql-model-transformer": "0.6.4",
"@aws-cdk/aws-appsync": "~1.131.0",
"@aws-cdk/aws-dynamodb": "~1.131.0",
"@aws-cdk/core": "~1.131.0",
"@aws-cdk/aws-iam": "~1.131.0",
"@aws-cdk/aws-appsync": "~1.124.0",
"@aws-cdk/aws-dynamodb": "~1.124.0",
"@aws-cdk/core": "~1.124.0",
"@aws-cdk/aws-iam": "~1.124.0",
"constructs": "^3.3.125",
"graphql": "^14.5.8",
"graphql-mapping-template": "4.18.3",
Expand All @@ -44,7 +44,7 @@
"@aws-amplify/graphql-index-transformer": "0.4.0",
"@aws-amplify/graphql-searchable-transformer": "0.6.3",
"@types/fs-extra": "^8.0.1",
"@aws-cdk/assert": "~1.131.0",
"@aws-cdk/assert": "~1.124.0",
"@types/node": "^12.12.6"
},
"jest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,6 @@ test('Test simple model with AdminUI enabled should add IAM policy only for fiel
]);
// should throw unauthorized if it's not signed by the admin ui iam role
['Mutation.createPost.auth.1.req.vtl', 'Mutation.updatePost.auth.1.res.vtl', 'Mutation.deletePost.auth.1.res.vtl'].forEach(r => {
expect(out.resolvers[r]).toMatchSnapshot();
expect(out.pipelineFunctions[r]).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test('test single auth model is enabled with conflict resolution', () => {
expect(out.schema).toContain(
`syncPosts(filter: ModelPostFilterInput, limit: Int, nextToken: String, lastSync: AWSTimestamp): ModelPostConnection`,
);
expect(out.resolvers['Query.syncPosts.auth.1.req.vtl']).toMatchSnapshot();
expect(out.pipelineFunctions['Query.syncPosts.auth.1.req.vtl']).toMatchSnapshot();
});

test('test multi auth model with conflict resolution', () => {
Expand Down Expand Up @@ -66,5 +66,5 @@ test('test multi auth model with conflict resolution', () => {
expect(out.schema).toContain(
`syncPosts(filter: ModelPostFilterInput, limit: Int, nextToken: String, lastSync: AWSTimestamp): ModelPostConnection @aws_iam @aws_cognito_user_pools`,
);
expect(out.resolvers['Query.syncPosts.auth.1.req.vtl']).toMatchSnapshot();
expect(out.pipelineFunctions['Query.syncPosts.auth.1.req.vtl']).toMatchSnapshot();
});

0 comments on commit f1c1ee2

Please sign in to comment.