eddev 2.0.0-beta.97 → 2.0.0-beta.99

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.
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { renderAsset } from "@vinxi/react";
3
3
  import { renderToPipeableStream, renderToString } from "react-dom/server";
4
4
  import { Writable } from "stream";
@@ -68,16 +68,14 @@ export async function getSsrStream(args) {
68
68
  stream.pipe(writableStream);
69
69
  });
70
70
  for (const asset of dynamicAssets) {
71
- // const assets = await clientManifest.inputs["/" + asset].assets()
71
+ const assets = await clientManifest.inputs[asset].assets();
72
72
  // console.log(assets)
73
73
  // console.log("A", assets.output, (await assets.assets())?.[0])
74
74
  // const assets = await clientManifest.inputs[assets.output.path!]?.assets()
75
75
  // console.log("F?", inputs)
76
- // controller.enqueue(new TextEncoder().encode(`\n<!-- for ${asset} -->`))
76
+ controller.enqueue(new TextEncoder().encode(`\n<!-- for ${asset} -->`));
77
77
  // controller.enqueue(new TextEncoder().encode(`\n<script>${JSON.stringify(assets)}</script>`))
78
- // controller.enqueue(
79
- // new TextEncoder().encode(renderToString(<>{assets.map((a) => renderAsset(asset as any))}</>)),
80
- // )
78
+ controller.enqueue(new TextEncoder().encode(renderToString(_jsx(_Fragment, { children: assets.map((a) => renderAsset(asset)) }))));
81
79
  }
82
80
  // console.log("ASSETS", await clientManifest)
83
81
  controller.enqueue(new TextEncoder().encode(middle));
@@ -342,7 +342,7 @@ export function createVinxiCodegen(opts) {
342
342
  const input = manifest.inputs[id === 'handler' ? manifest.handler : id]
343
343
  const result = {
344
344
  ...input,
345
- assets: await manifest.assets(),
345
+ assets: await input.assets(),
346
346
  }
347
347
  const code = inspect(result, { depth: 10 })
348
348
  return new Response(code, { headers: { "Content-Type": "text/plain" } })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.0.0-beta.97",
3
+ "version": "2.0.0-beta.99",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",