createPublicServerManifest
función
Quita del manifiesto descubierto del servidor las rutas privadas de los handlers, para poder serializarlo y enviarlo al navegador.
ts
import { createPublicServerManifest } from "@meekojs/meeko/framework";Código fuente src/shared/clients.ts:84
Firma #
ts
function createPublicServerManifest(manifest: PublicServerManifest): PublicServerManifestParámetros #
-
manifestPublicServerManifest Manifiesto con, como mínimo, los campos públicos de cada endpoint.
Devuelve #
-
PublicServerManifest Un manifiesto nuevo con sólo
clientKey,pathname,method,contentType,id.
Ejemplo #
ts
import { discoverServerManifest } from "@meekojs/meeko/build";
import { createPublicServerManifest } from "@meekojs/meeko/framework";
const manifest = await discoverServerManifest(process.cwd());
const json = JSON.stringify(createPublicServerManifest(manifest));