diff --git a/examples/with-gcp/.gcloudignore b/examples/with-gcp/.gcloudignore deleted file mode 100644 index fb252d6..0000000 --- a/examples/with-gcp/.gcloudignore +++ /dev/null @@ -1,16 +0,0 @@ -# This file specifies files that are *not* uploaded to Google Cloud -# using gcloud. It follows the same syntax as .gitignore, with the addition of -# "#!include" directives (which insert the entries of the given .gitignore-style -# file at that point). -# -# For more information, run: -# $ gcloud topic gcloudignore -# -.gcloudignore -# If you would like to upload your .git directory, .gitignore file or files -# from your .gitignore file, remove the corresponding line -# below: -.git -.gitignore - -node_modules diff --git a/examples/with-gcp/README.md b/examples/with-gcp/README.md index 511f43f..6e9c371 100644 --- a/examples/with-gcp/README.md +++ b/examples/with-gcp/README.md @@ -29,14 +29,22 @@ Deploy the GCP function (cd examples/with-gcp) --entry-point=handler \ --runtime nodejs20 \ --trigger-http \ - --no-allow-unauthenticated \ + --allow-unauthenticated \ --project [PROJECT ID] +access the URL (example): https://us-central1-zinc-style-449212-s0.cloudfunctions.net/gcp-function + ## Authenticate for invocation -Since authentication is required, clicking the URL will return Error: Forbidden. Execute this line: +If authentication is required (--no-allow-unauthenticated), execute this line: $ curl -H "Authorization: Bearer $(gcloud auth print-identity-token)" \ [FUNCTION URL] more info: https://cloud.google.com/functions/docs/securing/authenticating + +To invoke the GCP function directly, execute this line: + + $ gcloud functions call [FUNCTION NAME] + +more info: https://cloud.google.com/functions/docs/running/direct diff --git a/examples/with-gcp/package.json b/examples/with-gcp/package.json index a4e88fc..233f97d 100644 --- a/examples/with-gcp/package.json +++ b/examples/with-gcp/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@google-cloud/functions-framework": "^3.4.5", - "@stackpress/ingest": "0.3.28" + "@stackpress/ingest": "0.3.30" }, "devDependencies": { "@types/node": "22.9.3", diff --git a/yarn.lock b/yarn.lock index b63d0a6..2f758b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1653,19 +1653,19 @@ "@smithy/types" "^4.1.0" tslib "^2.6.2" -"@stackpress/ingest@0.3.28": - version "0.3.28" - resolved "https://registry.yarnpkg.com/@stackpress/ingest/-/ingest-0.3.28.tgz#fa9b61a52a61a6ec276181e7a73f763b55c65994" - integrity sha512-7BCg8PYOO6aTrMI/TLUDiub1PS7R6hZvrqbvlxk77Y/Bql/EOKZUe1SjuRJ1CHMNee+FDCpcZTXBIwTSDJNGhQ== +"@stackpress/ingest@0.3.30": + version "0.3.30" + resolved "https://registry.npmjs.org/@stackpress/ingest/-/ingest-0.3.30.tgz#5bff67871b19733141b53171b1a6c660c27e300a" + integrity sha512-M+SdQuC6HtxYhLt568O9KVnngaywxMgrhy2kpGL9zOYdfvtDUiYTCQojr6+G018TAek03uWK7i3zpaYtkv4DZA== dependencies: - "@stackpress/lib" "0.3.28" + "@stackpress/lib" "0.3.30" "@whatwg-node/server" "0.6.7" cookie "1.0.2" -"@stackpress/lib@0.3.28": - version "0.3.28" - resolved "https://registry.yarnpkg.com/@stackpress/lib/-/lib-0.3.28.tgz#b1c5249d02b11860d1bffe7ac749f89baead4a0a" - integrity sha512-9WqKWUwL/f90d61AuCjo6/vdCqDHr74Kz3184tdoolpmxAFNa9La9JULR2/qoew8yEMo90JM7mZPIU4BPBRMrQ== +"@stackpress/lib@0.3.30": + version "0.3.30" + resolved "https://registry.npmjs.org/@stackpress/lib/-/lib-0.3.30.tgz#a31aac974df62a5c991346e50f7abcbc067754b3" + integrity sha512-aUuhYxrftwL3CL6nh3knMNCAPjKdOudBgwHCiKQDf7Q/p1ZoTc/iVZ3SXthNDUmsilpgfsjXKipe5jmpD+KK5g== dependencies: "@inquirer/prompts" "7.1.0"