Skip to content

Add operator app base - #1

Merged
valuecodes merged 2 commits into
mainfrom
operator-app-base
Mar 29, 2026
Merged

Add operator app base#1
valuecodes merged 2 commits into
mainfrom
operator-app-base

Conversation

@valuecodes

Copy link
Copy Markdown
Owner

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/operator directory 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 install to install dependencies.

  • Use pnpm dev to start the application locally.

  • Access the health check endpoint at /health and 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.

Copilot AI review requested due to automatic review settings March 29, 2026 08:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /health endpoint.
  • 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.

Comment on lines +2 to +3

export default baseConfig;

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Suggested change
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;

Copilot uses AI. Check for mistakes.
Comment thread apps/operator/package.json Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@valuecodes
valuecodes merged commit 3e99e9e into main Mar 29, 2026
4 checks passed
@valuecodes
valuecodes deleted the operator-app-base branch March 29, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants