feat(05-01): enrich BACKEND_REGISTRY and update all consumers
- Change BACKEND_REGISTRY shape from Record<BackendType, FieldDef[]> to
Record<BackendType, { displayName, description, fields: FieldDef[] }>
- Add displayName and description to azureblob, s3, s3-compatible entries
- Update schemas/index.ts buildZodSchema to use .fields access
- Update RemoteConfigStep.tsx two .fields accesses (azureblob.find + map)
This commit is contained in:
@@ -7,7 +7,7 @@ import { z } from 'zod';
|
||||
import { BACKEND_REGISTRY, BackendType } from './registry';
|
||||
|
||||
function buildZodSchema(backendType: BackendType): z.ZodObject<Record<string, z.ZodTypeAny>> {
|
||||
const fields = BACKEND_REGISTRY[backendType];
|
||||
const fields = BACKEND_REGISTRY[backendType].fields;
|
||||
const shape: Record<string, z.ZodTypeAny> = {};
|
||||
for (const field of fields) {
|
||||
shape[field.key] = field.required
|
||||
|
||||
Reference in New Issue
Block a user