-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: remove ESM loader to speed up CLI execution (#9873)
* perf: remove ESM loader to speed up CLI execution Removed ESM loader for NPM CLI installation and update all the packages to be transpiled using typescript to covert all ES6 import export statements to commonjs format * build: remove esm from post-install script * build: transpile interaction category and copy asset files to lib dir * build: copy additional templates part of build step * fixup: address review comment Co-authored-by: Yathi <511386+yuth@users.noreply.github.com>
- Loading branch information
Showing
133 changed files
with
824 additions
and
766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 0 additions & 108 deletions
108
...der-utils/awscloudformation/cloudformation-templates/kinesis-cloudformation-template.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
93 changes: 93 additions & 0 deletions
93
...der-utils/awscloudformation/cloudformation-templates/kinesis-cloudformation-template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"AWSTemplateFormatVersion": "2010-09-09", | ||
"Description": "Kinesis resource stack creation using Amplify CLI", | ||
"Parameters": { | ||
"env": { | ||
"Type": "String" | ||
}, | ||
"kinesisStreamName": { | ||
"Type": "String" | ||
}, | ||
"kinesisStreamShardCount": { | ||
"Type": "Number", | ||
"Default": 1 | ||
}, | ||
"authPolicyName": { | ||
"Type": "String" | ||
}, | ||
"unauthPolicyName": { | ||
"Type": "String" | ||
}, | ||
"authRoleName": { | ||
"Type": "String" | ||
}, | ||
"unauthRoleName": { | ||
"Type": "String" | ||
} | ||
}, | ||
"Conditions": { | ||
"ShouldNotCreateEnvResources": { | ||
"Fn::Equals": [{ "Ref": "env" }, "NONE"] | ||
} | ||
}, | ||
"Resources": { | ||
"KinesisStream": { | ||
"Type": "AWS::Kinesis::Stream", | ||
"Properties": { | ||
"Name": { | ||
"Fn::Join": ["-", [{ "Ref": "kinesisStreamName" }, { "Ref": "env" }]] | ||
}, | ||
"ShardCount": { "Ref": "kinesisStreamShardCount" } | ||
} | ||
}, | ||
"CognitoUnauthPolicy": { | ||
"Type": "AWS::IAM::Policy", | ||
"Properties": { | ||
"PolicyName": { "Ref": "unauthPolicyName" }, | ||
"Roles": [{ "Ref": "unauthRoleName" }], | ||
"PolicyDocument": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": ["kinesis:PutRecord", "kinesis:PutRecords"], | ||
"Resource": { | ||
"Fn::GetAtt": ["KinesisStream", "Arn"] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"CognitoAuthPolicy": { | ||
"Type": "AWS::IAM::Policy", | ||
"Properties": { | ||
"PolicyName": { "Ref": "authPolicyName" }, | ||
"Roles": [{ "Ref": "authRoleName" }], | ||
"PolicyDocument": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": ["kinesis:PutRecord", "kinesis:PutRecords"], | ||
"Resource": { | ||
"Fn::GetAtt": ["KinesisStream", "Arn"] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"Outputs": { | ||
"kinesisStreamArn": { | ||
"Value": { "Fn::GetAtt": ["KinesisStream", "Arn"] } | ||
}, | ||
"kinesisStreamId": { | ||
"Value": { "Ref": "KinesisStream" } | ||
}, | ||
"kinesisStreamShardCount": { | ||
"Value": { "Ref": "kinesisStreamShardCount" } | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "lib", | ||
"rootDir": "src", | ||
"allowJs": true, | ||
"strictPropertyInitialization": false, | ||
"inlineSources": true | ||
}, | ||
"include": [ | ||
"src/**/*", | ||
"src/provider-utils/**/*.json", | ||
], | ||
"exclude": [ | ||
"coverage", | ||
"lib", | ||
"resources", | ||
"scripts", | ||
"src/__tests__" | ||
], | ||
"references": [ | ||
{ "path": "../amplify-cli-core" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.