Add Prettier and ESLint tooling (Refs #77)

This commit is contained in:
2026-10-09 15:56:13 -04:00
parent 8ed059b8d3
commit 16469e2d43
711 changed files with 99737 additions and 28286 deletions
@@ -5,8 +5,15 @@ export async function POST({ request, params }: { request: Request; params: { id
requireManagementOrigin(request);
try {
const body = await objectBody(request);
if (body.kind !== 'runtime.pull' || typeof body.image !== 'string' || !/^[a-zA-Z0-9][a-zA-Z0-9./_:@-]{0,511}$/.test(body.image)) throw new Error('Provide a runtime.pull request and a valid container image.');
if (
body.kind !== 'runtime.pull' ||
typeof body.image !== 'string' ||
!/^[a-zA-Z0-9][a-zA-Z0-9./_:@-]{0,511}$/.test(body.image)
)
throw new Error('Provide a runtime.pull request and a valid container image.');
const operation = queueHostOperation(params.id, 'runtime.pull', { image: body.image });
return json({ operationId: operation.id }, { status: 202 });
} catch (cause) { return hostApiError(cause); }
} catch (cause) {
return hostApiError(cause);
}
}