Add operator app base - #1
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new apps/operator workspace that scaffolds an “operator” Cloudflare Worker application using Hono, including local dev/deploy wiring and CI deployment.
Changes:
- Introduces
apps/operator(Hono app + Wrangler/TS/ESLint configuration) with a/healthendpoint. - Expands the pnpm workspace to include
apps/*and updates lockfile for new dependencies. - Updates CI workflow to deploy the operator Worker on pushes to
main.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds apps/* as a pnpm workspace root. |
| pnpm-lock.yaml | Locks new dependencies for the operator app (Hono, Wrangler, Workers types, etc.). |
| apps/operator/wrangler.jsonc | Cloudflare Worker deployment configuration (name, entrypoint, compatibility settings). |
| apps/operator/tsconfig.json | TS config for the operator app extending shared base + Workers types. |
| apps/operator/src/index.ts | Initial Hono app with /health endpoint and default export. |
| apps/operator/package.json | Adds workspace package metadata, scripts, and dependencies/devDependencies. |
| apps/operator/eslint.config.ts | Wires the operator app into the shared ESLint base config. |
| AGENTS.md | Updates repo snapshot docs to reflect new apps/operator workspace. |
| .gitignore | Adds .dev.vars to ignored files. |
| .github/workflows/main.yml | Adds deploy job to deploy the operator worker via Wrangler. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| export default baseConfig; |
There was a problem hiding this comment.
@repo/eslint/base hard-codes parserOptions.tsconfigRootDir to the tooling package directory, so importing it directly here can make type-aware linting resolve the wrong tsconfig (or fail to find the app tsconfig). Consider extending/overriding the exported config in this app to set tsconfigRootDir to the app directory (e.g., import.meta.dirname / current working directory) so TypeScript-ESLint uses apps/operator/tsconfig.json.
| export default baseConfig; | |
| import { fileURLToPath } from "node:url"; | |
| const appDir = fileURLToPath(new URL(".", import.meta.url)); | |
| function withAppTsconfigRootDir(config: unknown): unknown { | |
| if (Array.isArray(config)) { | |
| return config.map((entry) => withAppTsconfigRootDir(entry)); | |
| } | |
| if (config && typeof config === "object") { | |
| const cfg = config as { parserOptions?: Record<string, unknown> }; | |
| return { | |
| ...cfg, | |
| parserOptions: { | |
| ...cfg.parserOptions, | |
| tsconfigRootDir: appDir, | |
| }, | |
| }; | |
| } | |
| return config; | |
| } | |
| const operatorConfig = withAppTsconfigRootDir(baseConfig); | |
| export default operatorConfig; |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
a7add23 to
99ceeb0
Compare
What
Introduce the base structure for the operator application, including essential configurations and dependencies. This addition sets up the application to run as a Cloudflare Worker using the Hono framework. Key files include the ESLint and TypeScript configurations, as well as the initial application code and deployment settings.
Created the
apps/operatordirectory with necessary files.Configured ESLint and TypeScript for the new app.
Added a simple health check endpoint in the application.
Updated the GitHub Actions workflow to include deployment steps for the new app.
How to test
Run
pnpm installto install dependencies.Use
pnpm devto start the application locally.Access the health check endpoint at
/healthand expect a JSON response:{"status": "ok"}.Security review
Secrets / env vars: not changed.
Auth / session: not changed.
Network / API calls: changed. (New endpoint for health check.)
Data handling / PII: not changed.
Dependencies: added. (New dependencies for Hono and Cloudflare Workers.)
Justification: The new dependencies are necessary for the application to function as intended, and no sensitive information is included in the changes.