{"id":16758403,"url":"https://github.com/kessler/firebase-events","last_synced_at":"2025-10-16T22:08:03.066Z","repository":{"id":222824245,"uuid":"758506037","full_name":"kessler/firebase-events","owner":"kessler","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-16T16:59:54.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T18:18:47.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kessler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-02-16T13:22:13.000Z","updated_at":"2024-02-16T13:23:05.000Z","dependencies_parsed_at":"2024-02-20T07:31:49.271Z","dependency_job_id":null,"html_url":"https://github.com/kessler/firebase-events","commit_stats":null,"previous_names":["kessler/firebase-events"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kessler/firebase-events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Ffirebase-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Ffirebase-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Ffirebase-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Ffirebase-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kessler","download_url":"https://codeload.github.com/kessler/firebase-events/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kessler%2Ffirebase-events/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019161,"owners_count":26086685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-13T04:05:10.694Z","updated_at":"2025-10-16T22:08:03.022Z","avatar_url":"https://github.com/kessler.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firebase-events\n\nA simple library to send events to firestore database\n\n## general usage\n\n```js\n\nconst { open } = require('@kessler/firebase-events')\nconst { onRequest } = require('firebase-functions/v2/https')\nconst logger = require('firebase-functions/logger')\n\nexports.helloWorld = onRequest((req, res) =\u003e {\n  const { newEvent, updateEvent } = await open('events')  \n  const startEvent = newEvent('start', { functionName: 'helloWorld', type: 'start'})\n\n  logger.info('Hello logs!', { structuredData: true })\n\n  updateEvent(startEvent, { type: 'end' })\n})\n\n```\n\n## timer\n\n```js\n\nconst { open } = require('@kessler/firebase-events')\nconst { onRequest } = require('firebase-functions/v2/https')\nconst logger = require('firebase-functions/logger')\n\nexports.helloWorld = onRequest(async (req, res) =\u003e {\n  const { timer } = await open()\n  const timerEvent = timer('function_duration', { fnName: 'helloWorld2' })\n  logger.info('Hello logs!', { structuredData: true })\n  await timerEvent.send()\n})\n\n```\n\n\n\n\n1. enable firestore database in your firebase project\n2. npm install @kessler/firebase-events\n3. update your function code\n4. deploy your function\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkessler%2Ffirebase-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkessler%2Ffirebase-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkessler%2Ffirebase-events/lists"}