{"id":28299298,"url":"https://github.com/laurentpellegrino/cloud-functions-loader","last_synced_at":"2026-04-15T16:32:12.111Z","repository":{"id":73450909,"uuid":"107288041","full_name":"laurentpellegrino/cloud-functions-loader","owner":"laurentpellegrino","description":"Exports Cloud Functions for Firebase with scale in mind.","archived":false,"fork":false,"pushed_at":"2017-10-17T16:44:27.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-11T12:09:53.055Z","etag":null,"topics":["cloud-functions","cloud-functions-emulator","firebase","firebase-database"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laurentpellegrino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-17T15:28:52.000Z","updated_at":"2020-04-14T18:29:15.000Z","dependencies_parsed_at":"2023-02-28T13:00:55.313Z","dependency_job_id":null,"html_url":"https://github.com/laurentpellegrino/cloud-functions-loader","commit_stats":null,"previous_names":["laurentpellegrino/cloud-functions-loader","lpellegr/cloud-functions-loader"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/laurentpellegrino/cloud-functions-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpellegrino%2Fcloud-functions-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpellegrino%2Fcloud-functions-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpellegrino%2Fcloud-functions-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpellegrino%2Fcloud-functions-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laurentpellegrino","download_url":"https://codeload.github.com/laurentpellegrino/cloud-functions-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpellegrino%2Fcloud-functions-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31849733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-functions","cloud-functions-emulator","firebase","firebase-database"],"created_at":"2025-05-23T09:14:29.092Z","updated_at":"2026-04-15T16:32:12.093Z","avatar_url":"https://github.com/laurentpellegrino.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud-functions-exporter\n\nExports Google Cloud Functions with scale in mind.\n\nThis package was inspired by a discussion started on Medium:\n\nhttps://codeburst.io/organizing-your-firebase-cloud-functions-67dc17b3b0da\n\n## Conventions\n\nThe purpose is to keep each function source code isolated in its own file to \nease maintenance. For the package to work properly, you have to following these \nconventions:\n \n  - Put each function code in a dedicated file (optionally in a directory hierarchy).\n  - Each function file must use the camel case for its name but also end with `.js`.\n  - Register the path to the function source code for loading by this module.\n \nIn most of the cases, this solution also provides performance improvements since \neach function loads only the dependencies it needs.\nBesides, not all functions are exported to Google Cloud Functions runtime, which has\nsmall benefits on cold-starts.\n\n## Usage example\n\nThe main `index.js`:\n\n```\nrequire('@noticeable/cloud-functions-loader')({\n    'api/env.js': false,\n    'api/headers.js': false,\n    'auth/onCreate.js': true,\n    'auth/onDelete.js': true,\n    'firestore/accessTokens/onCreate.js': true,\n    'firestore/accessTokens/onDelete.js': true,\n    'firestore/pendingWebhookActions/onCreate.js': true,\n    'firestore/posts/onCreate.js': true,\n    'firestore/posts/onDelete.js': true,\n    'firestore/posts/onUpdate.js': true,\n    'firestore/projects/onCreate.js': true,\n    'firestore/projects/onDelete.js': true,\n    'firestore/projects/onUpdate.js': true,\n    'firestore/users/onDelete.js': true\n});\n```\n\nThe definition for `api/env.js`:\n\n```\nconst functions = require('firebase-functions');\n\nexports = module.exports = functions.https.onRequest((req, res) =\u003e {\n    res.send(200, {\n        'date': new Date(),\n        'env': process.env\n    });\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurentpellegrino%2Fcloud-functions-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaurentpellegrino%2Fcloud-functions-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurentpellegrino%2Fcloud-functions-loader/lists"}