Skip to content

Commit 43d11d6

Browse files
author
Ace Nassri
authored
chore(functions): add start scripts (GoogleCloudPlatform#1287)
1 parent 369fe4c commit 43d11d6

File tree

9 files changed

+53
-1
lines changed

9 files changed

+53
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"require": {
33
"google/cloud-functions-framework": "^0.7"
4+
},
5+
"scripts": {
6+
"start": [
7+
"Composer\\Config::disableProcessTimeout",
8+
"FUNCTION_TARGET=helloGet php -S localhost:${PORT:-8080} vendor/bin/router.php"
9+
]
410
}
511
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"require": {
33
"google/cloud-functions-framework": "^0.7"
4+
},
5+
"scripts": {
6+
"start": [
7+
"Composer\\Config::disableProcessTimeout",
8+
"FUNCTION_TARGET=helloHttp php -S localhost:${PORT:-8080} vendor/bin/router.php"
9+
]
410
}
511
}

functions/helloworld_pubsub/composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"require": {
33
"google/cloud-functions-framework": "^0.7.1"
44
},
5+
"scripts": {
6+
"start": [
7+
"Composer\\Config::disableProcessTimeout",
8+
"FUNCTION_SIGNATURE_TYPE=cloudevent FUNCTION_TARGET=helloworldPubsub php -S localhost:${PORT:-8080} vendor/bin/router.php"
9+
]
10+
},
511
"require-dev": {
612
"google/cloud-pubsub": "^1.29",
713
"google/cloud-logging": "^1.21"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"require": {
33
"google/cloud-functions-framework": "^0.7"
4+
},
5+
"scripts": {
6+
"start": [
7+
"Composer\\Config::disableProcessTimeout",
8+
"FUNCTION_TARGET=helloContent php -S localhost:${PORT:-8080} vendor/bin/router.php"
9+
]
410
}
511
}

functions/imagemagick/composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
"google/cloud-vision": "^1.2",
66
"ext-imagick": "*"
77
},
8+
"scripts": {
9+
"start": [
10+
"Composer\\Config::disableProcessTimeout",
11+
"FUNCTION_SIGNATURE_TYPE=cloudevent FUNCTION_TARGET=blurOffensiveImages php -S localhost:${PORT:-8080} vendor/bin/router.php"
12+
]
13+
},
814
"require-dev": {
915
"google/cloud-logging": "^1.21"
1016
}

functions/slack_slash_command/composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"google/apiclient": "^2.8"
55
},
66
"scripts": {
7-
"post-update-cmd": "Google\\Task\\Composer::cleanup"
7+
"post-update-cmd": "Google\\Task\\Composer::cleanup",
8+
"start": [
9+
"Composer\\Config::disableProcessTimeout",
10+
"FUNCTION_TARGET=receiveRequest php -S localhost:${PORT:-8080} vendor/bin/router.php"
11+
]
812
},
913
"extra": {
1014
"google/apiclient-services": [

functions/tips_infinite_retries/composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"require": {
33
"google/cloud-functions-framework": "^0.7.1"
44
},
5+
"scripts": {
6+
"start": [
7+
"Composer\\Config::disableProcessTimeout",
8+
"FUNCTION_SIGNATURE_TYPE=cloudevent FUNCTION_TARGET=avoidInfiniteRetries php -S localhost:${PORT:-8080} vendor/bin/router.php"
9+
]
10+
},
511
"require-dev": {
612
"google/cloud-pubsub": "^1.29",
713
"google/cloud-logging": "^1.21"

functions/tips_phpinfo/composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"require": {
33
"google/cloud-functions-framework": "^0.7.1"
4+
},
5+
"scripts": {
6+
"start": [
7+
"Composer\\Config::disableProcessTimeout",
8+
"FUNCTION_TARGET=phpInfoDemo php -S localhost:${PORT:-8080} vendor/bin/router.php"
9+
]
410
}
511
}

functions/tips_scopes/composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"require": {
33
"google/cloud-functions-framework": "^0.7.1"
4+
},
5+
"scripts": {
6+
"start": [
7+
"Composer\\Config::disableProcessTimeout",
8+
"FUNCTION_TARGET=scopeDemo php -S localhost:${PORT:-8080} vendor/bin/router.php"
9+
]
410
}
511
}

0 commit comments

Comments
 (0)