generated from guillermoandrae/php-lambda-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomposer.json
66 lines (66 loc) · 2.06 KB
/
composer.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"name": "guillermoandrae/andrae-posts",
"description": "Andrae REST API for posts",
"license": "MIT",
"type": "project",
"require": {
"php": "^8.1",
"ext-json": "*",
"bref/bref": "^1.0",
"guillermoandrae/fisher": "*",
"guillermoandrae/php-lambda-api-gateway-response": "*"
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"squizlabs/php_codesniffer": "3.*",
"guillermoandrae/php-debug": "*"
},
"autoload-dev": {
"psr-4": {
"AppTest\\": "tests/"
}
},
"scripts": {
"start-db": [
"mkdir -p ./database",
"if [ ! -f ./database/dynamodb_local_latest.zip ]; then wget --directory-prefix=./database https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip; fi",
"if [ ! -d ./database/DynamoDBLocal_lib ]; then unzip ./database/dynamodb_local_latest.zip -d database; fi",
"nohup java -Djava.library.path=./database/DynamoDBLocal_lib -jar ./database/DynamoDBLocal.jar -sharedDb &"
],
"stop-db": [
"kill -9 `pgrep -f DynamoDB`",
"rm -rf ./database",
"rm -f ./shared-local-instance.db"
],
"restart-db": [
"@stop-db",
"@start-db"
],
"check-style": [
"phpcbf --standard=PSR2 --extensions=php src tests",
"phpcs --standard=PSR2 --extensions=php src tests"
],
"test": [
"@check-style",
"@start-db",
"phpunit --coverage-text --coverage-clover=./clover.xml",
"@stop-db"
],
"test-html": [
"@check-style",
"phpunit --coverage-text --coverage-html report",
"php -S localhost:8080 -t report/ > report/phpd.log 2>&1"
],
"invoke": [
"serverless invoke -f andrae-posts"
],
"deploy": [
"serverless deploy"
]
}
}