Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
style: prettier-format registry-connect-ux changes
Jose Ramireza4e65d886de3
diff --git a/control-api/src/app.ts b/control-api/src/app.tsindex 538e887f7..aa4bb699b 100644--- a/control-api/src/app.ts+++ b/control-api/src/app.ts@@ -29,7 +29,10 @@ import { memberRegistrationErrorResponse } from './services/memberRegistrationEr// Only errors we construct with these codes are ever forwarded verbatim by the// global handler (see below). Keeps the blast radius tight: every other// status-less or non-allowlisted error still collapses to a 500.-const FORWARDABLE_INTEGRATION_CODES = new Set(['registry_unavailable', 'registry_integration_error'])+const FORWARDABLE_INTEGRATION_CODES = new Set([+ 'registry_unavailable',+ 'registry_integration_error',+])export function createApp(gateway: K8sGateway) {const app = express()diff --git a/control-api/src/services/registryClient.ts b/control-api/src/services/registryClient.tsindex 64b4b80c9..dee0020a0 100644--- a/control-api/src/services/registryClient.ts+++ b/control-api/src/services/registryClient.ts@@ -258,7 +258,9 @@ async function authedFetch(export class RegistryUnavailableError extends Error {readonly status = 503readonly code = 'registry_unavailable'- constructor(message = 'The registry is currently unavailable. Check the connection and try again.') {+ constructor(+ message = 'The registry is currently unavailable. Check the connection and try again.'+ ) {super(message)this.name = 'RegistryUnavailableError'}diff --git a/control-api/test/registryClient.test.ts b/control-api/test/registryClient.test.tsindex 86b5b1b1f..d433e4fda 100644--- a/control-api/test/registryClient.test.ts+++ b/control-api/test/registryClient.test.ts@@ -358,7 +358,9 @@ describe('registryClient — GET retry-once (transient resilience)', () => {vi.stubGlobal('fetch', fetchMock)Object.assign(process.env, ENV_OVERRIDE)- const err = (await publishEntry({ name: '@clerum/x', version: '0.0.1' }).catch(e => e)) as Error & {+ const err = (await publishEntry({ name: '@clerum/x', version: '0.0.1' }).catch(+ e => e+ )) as Error & {status?: numbercode?: string}@@ -417,7 +419,8 @@ describe('registryClient — registry-unavailable remap (Fix 2)', () => {// misconfig) — a status-less, non-network Error. It must surface unchanged,// NOT collapsed into the "unavailable" message.const fetchMock = vi.fn().mockImplementation((url: string) => {- if (url.endsWith('/oauth/token')) return Promise.resolve(new Response('bad creds', { status: 401 }))+ if (url.endsWith('/oauth/token'))+ return Promise.resolve(new Response('bad creds', { status: 401 }))return Promise.resolve(new Response(JSON.stringify({ data: [], meta: { total: 0, limit: 0, offset: 0 } }), {status: 200,diff --git a/control-ui/components/__tests__/RegistryCatalog.test.tsx b/control-ui/components/__tests__/RegistryCatalog.test.tsxindex 7af356f12..0108cf92e 100644--- a/control-ui/components/__tests__/RegistryCatalog.test.tsx+++ b/control-ui/components/__tests__/RegistryCatalog.test.tsx@@ -918,9 +918,7 @@ describe('RegistryCatalog - connect discoverability (Fix 1)', () => {render(<RegistryCatalog />)await waitFor(() => expect(screen.getByText('brave-search')).toBeInTheDocument())- expect(- screen.getByText(/This deployment isn't connected to a registry/i)- ).toBeInTheDocument()+ expect(screen.getByText(/This deployment isn't connected to a registry/i)).toBeInTheDocument()fireEvent.click(screen.getByRole('button', { name: 'Connect to registry' }))expect(mockPush).toHaveBeenCalledWith('/registry/connect')@@ -936,9 +934,7 @@ describe('RegistryCatalog - connect discoverability (Fix 1)', () => {render(<RegistryCatalog />)await waitFor(() => expect(screen.getByText('brave-search')).toBeInTheDocument())- expect(- screen.getByText(/This deployment isn't connected to a registry/i)- ).toBeInTheDocument()+ expect(screen.getByText(/This deployment isn't connected to a registry/i)).toBeInTheDocument()expect(screen.getByRole('button', { name: 'Connect' })).toBeInTheDocument()})