History

Merge remote-tracking branch 'origin/codex/batch21-local-app-boundaries' into codex/effect-lint-integration

Rhys Sullivan committed 6 months ago

Commit ad94c1d2 parents 1875c13 e393aed3 files · +4 −0Browse files

Unified · Split

3 files
  1. apps/local/src/routes/plugins.$pluginId.$.tsx +2 −0
  2. apps/local/src/serve.ts +1 −0
  3. apps/local/src/server/observability.ts +1 −0
apps/local/src/routes/plugins.$pluginId.$.tsx+2−0
@@ -30,10 +30,12 @@ function PluginRouteComponent() { · 29 unmodified lines
30 const { pluginId, _splat: rest } = Route.useParams();30 const { pluginId, _splat: rest } = Route.useParams();
31 const plugins = useClientPlugins();31 const plugins = useClientPlugins();
32 const plugin = plugins.find((p) => p.id === pluginId);32 const plugin = plugins.find((p) => p.id === pluginId);
33 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: TanStack Router represents not-found from components by throwing notFound()
33 if (!plugin) throw notFound();34 if (!plugin) throw notFound();
34 35
35 const target = normalizePath(rest ?? "/");36 const target = normalizePath(rest ?? "/");
36 const page = plugin.pages?.find((p) => normalizePath(p.path) === target);37 const page = plugin.pages?.find((p) => normalizePath(p.path) === target);
38 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: TanStack Router represents not-found from components by throwing notFound()
37 if (!page) throw notFound();39 if (!page) throw notFound();
38 40
39 const Component = page.component;41 const Component = page.component;
apps/local/src/serve.ts+1−0
@@ -37,6 +37,7 @@ const hasFileExtension = (pathname: string): boolean => { · 36 unmodified lines
37 37
38function collectStaticRoutes(dir: string, prefix = ""): Record<string, StaticHandler> {38function collectStaticRoutes(dir: string, prefix = ""): Record<string, StaticHandler> {
39 const routes: Record<string, StaticHandler> = {};39 const routes: Record<string, StaticHandler> = {};
40 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: filesystem route discovery is best-effort for optional built assets
40 try {41 try {
41 for (const entry of readdirSync(dir, { withFileTypes: true })) {42 for (const entry of readdirSync(dir, { withFileTypes: true })) {
42 const fullPath = join(dir, entry.name);43 const fullPath = join(dir, entry.name);
apps/local/src/server/observability.ts+1−0
@@ -23,6 +23,7 @@ export const ErrorCaptureLive: Layer.Layer<ErrorCapture> = Layer.succeed( · 22 unmodified lines
23 const squashed = Cause.squash(cause);23 const squashed = Cause.squash(cause);
24 console.error(24 console.error(
25 `[executor ${traceId}]`,25 `[executor ${traceId}]`,
26 // oxlint-disable-next-line executor/no-instanceof-error -- boundary: console logger preserves native Error stack output
26 squashed instanceof Error ? squashed.stack ?? squashed : squashed,27 squashed instanceof Error ? squashed.stack ?? squashed : squashed,
27 );28 );
28 console.error(`[executor ${traceId}] cause:`, Cause.pretty(cause));29 console.error(`[executor ${traceId}] cause:`, Cause.pretty(cause));