Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"/Users/bradtraversy/Desktop/dev/react-crash-2021/src/App.js":"1","/Users/bradtraversy/Desktop/dev/react-crash-2021/src/components/AddTask.js":"2","/Users/bradtraversy/Desktop/dev/react-crash-2021/src/components/Task.js":"3","/Users/bradtraversy/Desktop/dev/react-crash-2021/src/components/TaskDetails.js":"4"},{"size":3112,"mtime":1638644487276,"results":"5","hashOfConfig":"6"},{"size":1347,"mtime":1638631205734,"results":"7","hashOfConfig":"6"},{"size":455,"mtime":1638644496012,"results":"8","hashOfConfig":"6"},{"size":1002,"mtime":1638633759781,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"18ahndu",{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/Users/bradtraversy/Desktop/dev/react-crash-2021/src/App.js",[],"/Users/bradtraversy/Desktop/dev/react-crash-2021/src/components/AddTask.js",[],"/Users/bradtraversy/Desktop/dev/react-crash-2021/src/components/Task.js",[],"/Users/bradtraversy/Desktop/dev/react-crash-2021/src/components/TaskDetails.js",["18","19","20"],{"ruleId":"21","severity":1,"message":"22","line":2,"column":21,"nodeType":"23","messageId":"24","endLine":2,"endColumn":29},{"ruleId":"21","severity":1,"message":"25","line":8,"column":10,"nodeType":"23","messageId":"24","endLine":8,"endColumn":15},{"ruleId":"21","severity":1,"message":"26","line":8,"column":17,"nodeType":"23","messageId":"24","endLine":8,"endColumn":25},"no-unused-vars","'Navigate' is defined but never used.","Identifier","unusedVar","'error' is assigned a value but never used.","'setError' is assigned a value but never used."]
[{"/home/oren/nodejs/react-crash-2021/src/reportWebVitals.js":"1","/home/oren/nodejs/react-crash-2021/src/components/Button.js":"2"},{"size":362,"mtime":1638908642910,"results":"3","hashOfConfig":"4"},{"size":408,"mtime":1638908642910,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"uvwuxs",{"filePath":"8","messages":"9","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/oren/nodejs/react-crash-2021/src/reportWebVitals.js",[],"/home/oren/nodejs/react-crash-2021/src/components/Button.js",[]]
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,24 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

#amplify-do-not-edit-begin
amplify/\#current-cloud-backend
amplify/.config/local-*
amplify/logs
amplify/mock-data
amplify/backend/amplify-meta.json
amplify/backend/.temp
build/
dist/
node_modules/
aws-exports.js
awsconfiguration.json
amplifyconfiguration.json
amplifyconfiguration.dart
amplify-build-config.json
amplify-gradle-config.json
amplifytools.xcconfig
.secret-*
**.sample
#amplify-do-not-edit-end
11 changes: 11 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.8"
20 changes: 20 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions amplify/.config/project-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"projectName": "candlelit",
"version": "3.1",
"frontend": "javascript",
"javascript": {
"framework": "react",
"config": {
"SourceDir": "src",
"DistributionDir": "build",
"BuildCommand": "npm run-script build",
"StartCommand": "npm run-script start"
}
},
"providers": [
"awscloudformation"
]
}
8 changes: 8 additions & 0 deletions amplify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Getting Started with Amplify CLI
This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli).

Helpful resources:
- Amplify documentation: https://docs.amplify.aws
- Amplify CLI documentation: https://docs.amplify.aws/cli
- More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files
- Join Amplify's community: https://amplify.aws/community/
10 changes: 10 additions & 0 deletions amplify/backend/backend-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"function": {
"getSitesByCountryAndStream": {
"build": true,
"providerPlugin": "awscloudformation",
"service": "Lambda"
}
},
"api": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pluginId": "amplify-nodejs-function-runtime-provider",
"functionRuntime": "nodejs",
"useLegacyBuild": true,
"defaultEditorFile": "src/index.js"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"Action": [],
"Resource": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"lambdaLayers": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Lambda Function resource stack creation using Amplify CLI",
"Parameters": {
"CloudWatchRule": {
"Type": "String",
"Default" : "NONE",
"Description" : " Schedule Expression"
},
"deploymentBucketName": {
"Type": "String"
},
"env": {
"Type": "String"
},
"s3Key": {
"Type": "String"
}


},
"Conditions": {
"ShouldNotCreateEnvResources": {
"Fn::Equals": [
{
"Ref": "env"
},
"NONE"
]
}
},
"Resources": {
"LambdaFunction": {
"Type": "AWS::Lambda::Function",
"Metadata": {
"aws:asset:path": "./src",
"aws:asset:property": "Code"
},
"Properties": {
"Code": {
"S3Bucket": {
"Ref": "deploymentBucketName"
},
"S3Key": {
"Ref": "s3Key"
}
},
"Handler": "index.handler",
"FunctionName": {
"Fn::If": [
"ShouldNotCreateEnvResources",
"getSitesByCountryAndStream",
{

"Fn::Join": [
"",
[
"getSitesByCountryAndStream",
"-",
{
"Ref": "env"
}
]
]
}
]
},
"Environment": {
"Variables" : {"ENV":{"Ref":"env"},"REGION":{"Ref":"AWS::Region"}}
},
"Role": { "Fn::GetAtt": ["LambdaExecutionRole", "Arn"] },
"Runtime": "nodejs14.x",
"Layers": [],
"Timeout": 25
}
},
"LambdaExecutionRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"RoleName": {
"Fn::If": [
"ShouldNotCreateEnvResources",
"candlelitLambdaRolee9e81a7a",
{

"Fn::Join": [
"",
[
"candlelitLambdaRolee9e81a7a",
"-",
{
"Ref": "env"
}
]
]
}
]
},
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"lambda.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
}
}
}
,"lambdaexecutionpolicy": {
"DependsOn": ["LambdaExecutionRole"],
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyName": "lambda-execution-policy",
"Roles": [{ "Ref": "LambdaExecutionRole" }],
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"],
"Resource": { "Fn::Sub": [ "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*", { "region": {"Ref": "AWS::Region"}, "account": {"Ref": "AWS::AccountId"}, "lambda": {"Ref": "LambdaFunction"}} ]}
}
]
}
}
}


},
"Outputs": {
"Name": {
"Value": {
"Ref": "LambdaFunction"
}
},
"Arn": {
"Value": {"Fn::GetAtt": ["LambdaFunction", "Arn"]}
},
"Region": {
"Value": {
"Ref": "AWS::Region"
}
},
"LambdaExecutionRole": {
"Value": {
"Ref": "LambdaExecutionRole"
}
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
15 changes: 15 additions & 0 deletions amplify/backend/function/getSitesByCountryAndStream/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


exports.handler = async (event) => {
// TODO implement
const response = {
statusCode: 200,
// Uncomment below to enable CORS requests
// headers: {
// "Access-Control-Allow-Origin": "*",
// "Access-Control-Allow-Headers": "*"
// },
body: JSON.stringify('Hello from Lambda!'),
};
return response;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "getSitesByCountryAndStream",
"version": "2.0.0",
"description": "Lambda function generated by Amplify",
"main": "index.js",
"license": "Apache-2.0"
}
10 changes: 10 additions & 0 deletions amplify/backend/tags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"Key": "user:Stack",
"Value": "{project-env}"
},
{
"Key": "user:Application",
"Value": "{project-name}"
}
]
17 changes: 17 additions & 0 deletions amplify/backend/types/amplify-dependent-resources-ref.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export type AmplifyDependentResourcesAttributes = {
"function": {
"getSiteByCountryAndStream": {
"Name": "string",
"Arn": "string",
"Region": "string",
"LambdaExecutionRole": "string"
}
},
"api": {
"clapi": {
"RootUrl": "string",
"ApiName": "string",
"ApiId": "string"
}
}
}
51 changes: 51 additions & 0 deletions amplify/cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"features": {
"graphqltransformer": {
"addmissingownerfields": true,
"improvepluralization": false,
"validatetypenamereservedwords": true,
"useexperimentalpipelinedtransformer": true,
"enableiterativegsiupdates": true,
"secondarykeyasgsi": true,
"skipoverridemutationinputtypes": true,
"transformerversion": 2,
"suppressschemamigrationprompt": true
},
"frontend-ios": {
"enablexcodeintegration": true
},
"auth": {
"enablecaseinsensitivity": true,
"useinclusiveterminology": true,
"breakcirculardependency": true,
"forcealiasattributes": false,
"useenabledmfas": true
},
"codegen": {
"useappsyncmodelgenplugin": true,
"usedocsgeneratorplugin": true,
"usetypesgeneratorplugin": true,
"cleangeneratedmodelsdirectory": true,
"retaincasestyle": true,
"addtimestampfields": true,
"handlelistnullabilitytransparently": true,
"emitauthprovider": true,
"generateindexrules": true,
"enabledartnullsafety": true
},
"appsync": {
"generategraphqlpermissions": true
},
"latestregionsupport": {
"pinpoint": 1,
"translate": 1,
"transcribe": 1,
"rekognition": 1,
"textract": 1,
"comprehend": 1
},
"project": {
"overrides": true
}
}
}
Loading