(table: {
id: string
name: string
description?: string | null
schema: unknown
rowCount: number
maxRows: number
createdAt: Date | string
updatedAt: Date | string
})
| 313 | * Serialize table metadata for VFS tables/{name}/meta.json |
| 314 | */ |
| 315 | export function serializeTableMeta(table: { |
| 316 | id: string |
| 317 | name: string |
| 318 | description?: string | null |
| 319 | schema: unknown |
| 320 | rowCount: number |
| 321 | maxRows: number |
| 322 | createdAt: Date | string |
| 323 | updatedAt: Date | string |
| 324 | }): string { |
| 325 | return JSON.stringify( |
| 326 | { |
| 327 | id: table.id, |
| 328 | name: table.name, |
| 329 | description: table.description || undefined, |
| 330 | schema: table.schema, |
| 331 | rowCount: table.rowCount, |
| 332 | maxRows: table.maxRows, |
| 333 | createdAt: table.createdAt instanceof Date ? table.createdAt.toISOString() : table.createdAt, |
| 334 | updatedAt: table.updatedAt instanceof Date ? table.updatedAt.toISOString() : table.updatedAt, |
| 335 | }, |
| 336 | null, |
| 337 | 2 |
| 338 | ) |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Returns the static model list from PROVIDER_DEFINITIONS for VFS serialization. |
no outgoing calls
no test coverage detected