eddev 2.0.0-beta.95 → 2.0.0-beta.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -301,6 +301,8 @@ export function createVinxiCodegen(opts) {
|
|
|
301
301
|
} from "vinxi/http"
|
|
302
302
|
import { handleRPC } from "./rpc.js"
|
|
303
303
|
import { serverContext } from "./context.js"
|
|
304
|
+
import { getManifest } from "vinxi/manifest"
|
|
305
|
+
import { inspect } from "node:util"
|
|
304
306
|
|
|
305
307
|
const router = createRouter()
|
|
306
308
|
.get(
|
|
@@ -332,6 +334,20 @@ export function createVinxiCodegen(opts) {
|
|
|
332
334
|
return await serverContext.fetchNamedQuery({ name: id, params: params, headers: getRequestHeaders(event) })
|
|
333
335
|
}),
|
|
334
336
|
)
|
|
337
|
+
.get(
|
|
338
|
+
"/_data/manifest/**:input",
|
|
339
|
+
eventHandler(async (event) => {
|
|
340
|
+
const manifest = getManifest("client")
|
|
341
|
+
const id = getRouterParam(event, "input")
|
|
342
|
+
const input = manifest.inputs[id === 'handler' ? manifest.handler : id]
|
|
343
|
+
const result = {
|
|
344
|
+
...input,
|
|
345
|
+
assets: await manifest.assets(),
|
|
346
|
+
}
|
|
347
|
+
const code = inspect(result, { depth: 10 })
|
|
348
|
+
return new Response(code, { headers: { "Content-Type": "text/plain" } })
|
|
349
|
+
}),
|
|
350
|
+
)
|
|
335
351
|
.post(
|
|
336
352
|
"/_data/mutation/**:name",
|
|
337
353
|
eventHandler(async (event) => {
|