@nuxt/schema-nightly 4.5.0-29673761.f253a70d → 4.5.0-29673775.d239dbcd

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.
package/dist/index.d.mts CHANGED
@@ -2447,6 +2447,32 @@ interface ConfigSchema {
2447
2447
  */
2448
2448
  nitroAutoImports: boolean;
2449
2449
  /**
2450
+ * Enable SSR streaming to improve Time to First Byte (TTFB).
2451
+ *
2452
+ * When enabled, the server sends the HTML shell (head, styles, preload hints)
2453
+ * immediately and streams the rendered body content progressively.
2454
+ *
2455
+ * Streaming is automatically disabled for bot/crawler user agents to ensure
2456
+ * search engines receive fully-rendered HTML. You can opt a route out of
2457
+ * streaming via `routeRules` with `streaming: false`.
2458
+ *
2459
+ * Set to `true` to enable with defaults, or pass an object to configure options.
2460
+ *
2461
+ * @default false
2462
+ * @see https://github.com/nuxt/nuxt/issues/4753
2463
+ */
2464
+ ssrStreaming: boolean | {
2465
+ enabled?: boolean;
2466
+ /**
2467
+ * A regular expression matching bot/crawler user agents. Requests matching
2468
+ * the pattern are served fully-buffered (non-streamed) responses for SEO
2469
+ * safety.
2470
+ *
2471
+ * @default /bot\b|crawl|spider|slurp|facebookexternalhit|google\b|bing\b|yandex\b|baidu\b|duckduck/i
2472
+ */
2473
+ botRegex?: RegExp;
2474
+ };
2475
+ /**
2450
2476
  * Whether `callHook` always returns a `Promise`, wrapping synchronous hook results.
2451
2477
  *
2452
2478
  * Hookable v6 may return `void` instead of `Promise<void>` when there are no registered
package/dist/index.mjs CHANGED
@@ -699,6 +699,18 @@ var experimental_default = defineResolvers({
699
699
  nitroAutoImports: { $resolve: async (val, get) => {
700
700
  return typeof val === "boolean" ? val : await get("future.compatibilityVersion") < 5;
701
701
  } },
702
+ ssrStreaming: { $resolve(val) {
703
+ const defaultBotRegex = /bot\b|crawl|spider|slurp|facebookexternalhit|google\b|bing\b|yandex\b|baidu\b|duckduck/i;
704
+ const obj = val !== null && typeof val === "object" ? val : null;
705
+ if (!(val === true || obj !== null && obj.enabled !== false)) return {
706
+ enabled: false,
707
+ botRegex: defaultBotRegex
708
+ };
709
+ return {
710
+ enabled: true,
711
+ botRegex: obj?.botRegex instanceof RegExp ? obj.botRegex : defaultBotRegex
712
+ };
713
+ } },
702
714
  asyncCallHook: { $resolve: async (val, get) => {
703
715
  return typeof val === "boolean" ? val : await get("future.compatibilityVersion") < 5;
704
716
  } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/schema-nightly",
3
- "version": "4.5.0-29673761.f253a70d",
3
+ "version": "4.5.0-29673775.d239dbcd",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",