@selvajs/selva 4.21.0-beta.18 → 4.21.0-beta.19

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.
Files changed (30) hide show
  1. package/build/adapter-node.js +2 -2
  2. package/build/client/_app/version.json +1 -1
  3. package/build/client/_app/version.json.br +0 -0
  4. package/build/client/_app/version.json.gz +0 -0
  5. package/build/server/.vite/manifest.json +8 -34
  6. package/build/server/chunks/baseHDR.js +2 -2
  7. package/build/server/chunks/baseHDR.js.map +1 -1
  8. package/build/server/chunks/functions.js +1 -1
  9. package/build/server/chunks/grasshopper.js +23 -1
  10. package/build/server/chunks/grasshopper.js.map +1 -1
  11. package/build/server/chunks/instance.js +5 -5
  12. package/build/server/chunks/internal.js +3 -3
  13. package/build/server/chunks/package.js +1 -1
  14. package/build/server/chunks/package.js.map +1 -1
  15. package/build/server/chunks/rhino3dm.js.map +1 -1
  16. package/build/server/chunks/server-errors.js +1 -19
  17. package/build/server/chunks/server-errors.js.map +1 -1
  18. package/build/server/chunks/solve.js +1 -1
  19. package/build/server/entries/endpoints/mcp/_server.ts.js +160 -14
  20. package/build/server/entries/endpoints/mcp/_server.ts.js.map +1 -1
  21. package/build/server/index.js +1 -1
  22. package/build/server/remote-entry.js +1559 -1
  23. package/build/server/remote-entry.js.map +1 -0
  24. package/package.json +3 -3
  25. package/build/client/_app/immutable/assets/baseHDR.Dkr46J8-.hdr +0 -0
  26. package/build/server/_app/immutable/assets/baseHDR.Dkr46J8-.hdr +0 -0
  27. package/build/server/chunks/remote.js +0 -1559
  28. package/build/server/chunks/remote.js.map +0 -1
  29. package/build/server/chunks/server5.js +0 -52
  30. package/build/server/chunks/server5.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { K as server_api_unavailable } from "./server-errors.js";
1
+ import { W as server_api_unavailable } from "./server-errors.js";
2
2
  // ../../node_modules/.pnpm/@sveltejs+kit@3.1.1_@opentelemetry+api@1.10.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte_f967bc3fd8a221ab5730ab7d29103078/node_modules/@sveltejs/kit/src/utils/functions.js
3
3
  function noop() {}
4
4
  /**
@@ -1,4 +1,4 @@
1
- // ../compute/dist/handle-files-CzqBN3MP.js
1
+ // ../compute/dist/handle-files-T0TI_QtQ.js
2
2
  var ErrorCodes = {
3
3
  /** Connection failure, a gateway status (502/503/504), or a 2xx body cut off mid-stream. */
4
4
  NETWORK_ERROR: "NETWORK_ERROR",
@@ -583,6 +583,26 @@ function parseServerTiming(headerValue) {
583
583
  }
584
584
  return sawMetric ? timing : null;
585
585
  }
586
+ /**
587
+ * Parse `X-Compute-Profile`, a JSON array of `{ name, nick, ms }`. Entries of another shape are
588
+ * dropped; null when none is left or the header is not JSON.
589
+ */
590
+ function parseComputeProfile(headerValue) {
591
+ if (!headerValue) return null;
592
+ let parsed;
593
+ try {
594
+ parsed = JSON.parse(headerValue);
595
+ } catch {
596
+ return null;
597
+ }
598
+ if (!Array.isArray(parsed)) return null;
599
+ const entries = parsed.filter((e) => typeof e === "object" && e !== null && typeof e.name === "string" && typeof e.nick === "string" && typeof e.ms === "number" && Number.isFinite(e.ms));
600
+ return entries.length > 0 ? entries.map(({ name, nick, ms }) => ({
601
+ name,
602
+ nick,
603
+ ms
604
+ })) : null;
605
+ }
586
606
  function isAffinity(value) {
587
607
  return AFFINITY_OUTCOMES.includes(value);
588
608
  }
@@ -597,6 +617,8 @@ function fireServerTiming(response, requestId, onServerTiming) {
597
617
  if (!onServerTiming) return;
598
618
  const timing = parseServerTiming(response.headers.get("Server-Timing"));
599
619
  if (!timing) return;
620
+ const profile = parseComputeProfile(response.headers.get("X-Compute-Profile"));
621
+ if (profile) timing.profile = profile;
600
622
  try {
601
623
  onServerTiming(timing, requestId);
602
624
  } catch (err) {