Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
🤖 Generated by Copilot at 63285c1
This pull request adds a new package for the leafwatch worker, which is a Cloudflare Worker that interacts with a PostgreSQL database. The package contains the TypeScript code, configuration files, and documentation for the worker. The worker has two handlers: one for creating the database table for events, and one for ingesting events from the web application. The worker uses the
pg
,itty-router
, and@cloudflare/workers-types
modules, and thewrangler
tool. The pull request also updates thepnpm-lock.yaml
file with the new dependencies.Related issues
Fixes # (issue)
Type of change
Explanation of the changes
🤖 Generated by Copilot at 63285c1
package.json
file that specifies the package metadata and dependencies (link)wrangler.toml
file that configures thewrangler
tool for deploying and developing the worker (link).eslintrc.js
file that configures the linting rules for the TypeScript code (link)tsconfig.json
file that configures the TypeScript compiler for the worker (link)README.md
file that provides a brief title for the package (link).dev.vars.example
file that stores the database URL and the secret key for the worker (link)src
folder that contains the source code for the worker (link-link)index.ts
file that exports the main fetch function that handles the incoming requests to the worker (link)types.ts
file that exports the interface for the environment variables for the worker (link)handlers
folder that contains the handlers for the different routes of the worker (link-link)createTables.ts
file that exports the handler for the/createTables
route that initializes the database schema (link)ingest.ts
file that exports the handler for the/ingest
route that inserts events into the database (link)helpers
folder that contains the helper function for validating the request body (link)keysValidator.ts
file that exports the function that checks the required keys in the request body (link)pnpm-lock.yaml
file to lock the dependency tree for the monorepo and add the dependencies for the leafwatch worker package (link,link,link,link,link,link,link)@types/pg
,buffer-writer
,obuf
,packet-reader
,pg-cloudflare
,postgres-array
,postgres-bytea
,postgres-date
,postgres-interval
, andpostgres-range
packages that list their resolutions, dependencies, and flags (link,link,link,link,link,link)Emoji
🚀🌿🗄️