Skip to content
Myr

worker.ts

This file

Path

apps/sandbox/src/worker.ts

50 lines · 1.3 KiB · TypeScript

Last changed by

Merge build/comments-ops into mainoscabrielbefore adoptione4c407e

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–20why, one step back
1import type { CheckExit, CheckWire } from "@repo/checks/check-runner/wire";
2import type {3 BundleExit,4 BundleWire,5 ComposeExit,6 ComposeWire,7 LandExit,8 LandWire,9 MergeExit,10 MergeWire,11} from "@repo/project/lander/wire";12import { WorkerEntrypoint } from "cloudflare:workers";1314import { runCheck } from "./checker.ts";15import { runBundleRules, runCompose, runLand, runMerge } from "./lander.ts";1617export { Checker } from "./checker.ts";1819export { Lander } from "./lander.ts";20

Merge build/comments-ops into mainoscabrielbefore adoptione4c407e

line 21why, one step back
21// `ctx.exports` holds a loopback only for the main module's exports.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 22–50why, one step back
22export { CloneGateway, EgressGateway } from "./outbound.ts";
2324export { EnvGateway } from "./env-gateway.ts";2526export default class Sandbox extends WorkerEntrypoint<Env> {27 check(wire: typeof CheckWire.Encoded): Promise<typeof CheckExit.Encoded> {28 return runCheck(this.env, wire);29 }3031 merge(wire: typeof MergeWire.Encoded): Promise<typeof MergeExit.Encoded> {32 return runMerge(this.env, wire);33 }3435 land(wire: typeof LandWire.Encoded): Promise<typeof LandExit.Encoded> {36 return runLand(this.env, wire);37 }3839 compose(40 wire: typeof ComposeWire.Encoded41 ): Promise<typeof ComposeExit.Encoded> {42 return runCompose(this.env, wire);43 }4445 bundleRules(46 wire: typeof BundleWire.Encoded47 ): Promise<typeof BundleExit.Encoded> {48 return runBundleRules(this.env, wire);49 }50}