@valbuild/next 0.99.1 → 0.101.0

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,5 @@
1
1
  import 'server-only';
2
+ import { i as initValRouteFromVal, g as getJsonEntryStegaRoot, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal, _ as _typeof } from '../../dist/routeFromVal-263eec96.esm.js';
2
3
  import { _ as _objectSpread2 } from '../../dist/objectSpread2-60d1bd93.esm.js';
3
4
  import { _ as _asyncToGenerator, V as VERSION, a as _regenerator } from '../../dist/version-4d7b692c.esm.js';
4
5
  import { _ as _defineProperty } from '../../dist/defineProperty-cca5affa.esm.js';
@@ -6,7 +7,6 @@ import { SET_RSC, stegaEncode, SET_AUTO_TAG_JSX_ENABLED } from '@valbuild/react/
6
7
  import { Internal } from '@valbuild/core';
7
8
  import { VAL_SESSION_COOKIE } from '@valbuild/shared/internal';
8
9
  import { createValServer } from '@valbuild/server';
9
- import { i as initValRouteFromVal, g as getValRouteUrlFromVal } from '../../dist/routeFromVal-8855a5cc.esm.js';
10
10
  import '../../dist/createForOfIteratorHelper-5758a730.esm.js';
11
11
  import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
12
12
  import '../../dist/slicedToArray-aa291011.esm.js';
@@ -178,80 +178,383 @@ function getHost(headers) {
178
178
  var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
179
179
  return /*#__PURE__*/function () {
180
180
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(selector, params) {
181
- var fetchVal, resolvedParams, path, schema, val, route, _t4;
181
+ var resolvedParams, path, schema, source, url, enabled, draft, content, fetchVal, val, route, _t5;
182
182
  return _regenerator().w(function (_context2) {
183
- while (1) switch (_context2.n) {
183
+ while (1) switch (_context2.p = _context2.n) {
184
184
  case 0:
185
- fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
186
185
  _context2.n = 1;
187
186
  return Promise.resolve(params);
188
187
  case 1:
189
188
  resolvedParams = _context2.v;
190
189
  path = selector && Internal.getValPath(selector);
191
- schema = selector && Internal.getSchema(selector);
192
- _t4 = selector;
193
- if (!_t4) {
194
- _context2.n = 3;
190
+ schema = selector && Internal.getSchema(selector); // `.jsonValues()` router: map params → the entry key and load ONLY that
191
+ // entry's backing `*.val.json`, instead of eagerly resolving the whole
192
+ // record via `fetchVal`.
193
+ if (!isJsonValuesRecordSchema(schema)) {
194
+ _context2.n = 11;
195
195
  break;
196
196
  }
197
- _context2.n = 2;
198
- return fetchVal(selector);
197
+ source = selector && Internal.getSource(selector);
198
+ url = getValRouteUrlFromVal(resolvedParams, "fetchValRoute", path, schema, source);
199
+ if (url) {
200
+ _context2.n = 2;
201
+ break;
202
+ }
203
+ return _context2.a(2, null);
199
204
  case 2:
200
- _t4 = _context2.v;
201
- case 3:
202
- val = _t4;
205
+ enabled = false;
206
+ _context2.p = 3;
207
+ _context2.n = 4;
208
+ return isEnabled();
209
+ case 4:
210
+ enabled = _context2.v;
211
+ _context2.n = 6;
212
+ break;
213
+ case 5:
214
+ _context2.p = 5;
215
+ _context2.v;
216
+ case 6:
217
+ draft = {
218
+ status: "unavailable"
219
+ };
220
+ if (!(enabled && path)) {
221
+ _context2.n = 8;
222
+ break;
223
+ }
224
+ SET_AUTO_TAG_JSX_ENABLED(true);
225
+ _context2.n = 7;
226
+ return loadDraftJsonEntry(valServerPromise, getCookies, path, url);
227
+ case 7:
228
+ draft = _context2.v;
229
+ case 8:
230
+ _context2.n = 9;
231
+ return resolveDraftOrCommittedEntry(draft, function () {
232
+ return loadJsonEntryContent(source, url);
233
+ });
234
+ case 9:
235
+ content = _context2.v;
236
+ if (!(content === undefined)) {
237
+ _context2.n = 10;
238
+ break;
239
+ }
240
+ return _context2.a(2, null);
241
+ case 10:
242
+ return _context2.a(2, stegaEncode(content, {
243
+ disabled: !enabled,
244
+ root: getJsonEntryStegaRoot(selector, url)
245
+ }));
246
+ case 11:
247
+ fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
248
+ _t5 = selector;
249
+ if (!_t5) {
250
+ _context2.n = 13;
251
+ break;
252
+ }
253
+ _context2.n = 12;
254
+ return fetchVal(selector);
255
+ case 12:
256
+ _t5 = _context2.v;
257
+ case 13:
258
+ val = _t5;
203
259
  route = initValRouteFromVal(resolvedParams, "fetchValRoute", path, schema, val);
204
260
  return _context2.a(2, route);
205
261
  }
206
- }, _callee2);
262
+ }, _callee2, null, [[3, 5]]);
207
263
  }));
208
264
  return function (_x, _x2) {
209
265
  return _ref2.apply(this, arguments);
210
266
  };
211
267
  }();
212
268
  };
213
- var initFetchValRouteUrl = function initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
269
+
270
+ /**
271
+ * Resolves a single `.jsonValues()` entry's content by key from a module's local
272
+ * source markers (one dynamic import). Returns `undefined` when the key is
273
+ * missing or its marker has no runtime thunk (transport marker / draft entry).
274
+ */
275
+ function loadJsonEntryContent(_x3, _x4) {
276
+ return _loadJsonEntryContent.apply(this, arguments);
277
+ }
278
+ /**
279
+ * Loads a single `.jsonValues()` entry's DRAFT content via the in-process
280
+ * `/json` endpoint (which replays pending patches). Returns `undefined` when the
281
+ * entry has no draft content to serve — the caller then falls back to the
282
+ * locally-bundled committed content.
283
+ */
284
+ /**
285
+ * What the draft state says about an entry.
286
+ *
287
+ * The three cases have to stay distinct: `absent` is an ANSWER — the entry is not
288
+ * there in the draft state, e.g. a pending patch removed it — while `unavailable`
289
+ * means we could not ask. Collapsing them into `undefined` is what made a
290
+ * draft-deleted entry keep rendering its committed content: the caller could not
291
+ * tell "it is gone" from "ask the committed source instead".
292
+ */
293
+ /**
294
+ * The slice of `ValServer` the single-entry readers actually use. Narrower than
295
+ * `ValServer` on purpose: it says what the dependency IS, and it lets a test
296
+ * drive these readers with a one-route fake instead of casting a partial object
297
+ * to the whole server type.
298
+ */
299
+ function _loadJsonEntryContent() {
300
+ _loadJsonEntryContent = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17(source, key) {
301
+ var marker, thunk;
302
+ return _regenerator().w(function (_context17) {
303
+ while (1) switch (_context17.n) {
304
+ case 0:
305
+ if (!(!source || _typeof(source) !== "object")) {
306
+ _context17.n = 1;
307
+ break;
308
+ }
309
+ return _context17.a(2, undefined);
310
+ case 1:
311
+ marker = source[key];
312
+ if (Internal.isJson(marker)) {
313
+ _context17.n = 2;
314
+ break;
315
+ }
316
+ return _context17.a(2, undefined);
317
+ case 2:
318
+ thunk = Internal.getJsonImport(marker);
319
+ if (thunk) {
320
+ _context17.n = 3;
321
+ break;
322
+ }
323
+ return _context17.a(2, undefined);
324
+ case 3:
325
+ _context17.n = 4;
326
+ return thunk();
327
+ case 4:
328
+ return _context17.a(2, _context17.v["default"]);
329
+ }
330
+ }, _callee17);
331
+ }));
332
+ return _loadJsonEntryContent.apply(this, arguments);
333
+ }
334
+ /**
335
+ * Picks the content a draft-aware single-entry read should render.
336
+ *
337
+ * The rule the two callers share: the draft state WINS when it has an answer —
338
+ * including the answer "this entry is gone" — and the committed content is used
339
+ * only when there is no draft answer to be had (Val disabled, or we could not
340
+ * ask). Returning `undefined` means "render nothing"; both callers turn that into
341
+ * a null/undefined result.
342
+ */
343
+ function resolveDraftOrCommittedEntry(_x5, _x6) {
344
+ return _resolveDraftOrCommittedEntry.apply(this, arguments);
345
+ }
346
+ function _resolveDraftOrCommittedEntry() {
347
+ _resolveDraftOrCommittedEntry = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18(draft, loadCommitted) {
348
+ return _regenerator().w(function (_context18) {
349
+ while (1) switch (_context18.n) {
350
+ case 0:
351
+ if (!(draft.status === "content")) {
352
+ _context18.n = 1;
353
+ break;
354
+ }
355
+ return _context18.a(2, draft.content);
356
+ case 1:
357
+ if (!(draft.status === "absent")) {
358
+ _context18.n = 2;
359
+ break;
360
+ }
361
+ return _context18.a(2, undefined);
362
+ case 2:
363
+ return _context18.a(2, loadCommitted());
364
+ }
365
+ }, _callee18);
366
+ }));
367
+ return _resolveDraftOrCommittedEntry.apply(this, arguments);
368
+ }
369
+ function loadDraftJsonEntry(_x7, _x8, _x9, _x0) {
370
+ return _loadDraftJsonEntry.apply(this, arguments);
371
+ } // The (loosened) content type a single `.jsonValues()` entry resolves to.
372
+ function _loadDraftJsonEntry() {
373
+ _loadDraftJsonEntry = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee19(valServerPromise, getCookies, moduleFilePath, key) {
374
+ var _cookies3;
375
+ var cookies, valServer, res;
376
+ return _regenerator().w(function (_context19) {
377
+ while (1) switch (_context19.p = _context19.n) {
378
+ case 0:
379
+ _context19.p = 0;
380
+ _context19.n = 1;
381
+ return getCookies();
382
+ case 1:
383
+ cookies = _context19.v;
384
+ _context19.n = 3;
385
+ break;
386
+ case 2:
387
+ _context19.p = 2;
388
+ _context19.v;
389
+ return _context19.a(2, {
390
+ status: "unavailable"
391
+ });
392
+ case 3:
393
+ _context19.n = 4;
394
+ return valServerPromise;
395
+ case 4:
396
+ valServer = _context19.v;
397
+ _context19.n = 5;
398
+ return valServer["/json"]["GET"]({
399
+ query: {
400
+ path: moduleFilePath,
401
+ key: key,
402
+ keys: undefined,
403
+ // single-entry shape
404
+ offset: undefined,
405
+ limit: undefined,
406
+ apply_patches: true
407
+ },
408
+ cookies: _defineProperty({}, VAL_SESSION_COOKIE, (_cookies3 = cookies) === null || _cookies3 === void 0 || (_cookies3 = _cookies3.get(VAL_SESSION_COOKIE)) === null || _cookies3 === void 0 ? void 0 : _cookies3.value)
409
+ });
410
+ case 5:
411
+ res = _context19.v;
412
+ if (!(res.status === 200 && "content" in res.json)) {
413
+ _context19.n = 6;
414
+ break;
415
+ }
416
+ return _context19.a(2, {
417
+ status: "content",
418
+ content: res.json.content
419
+ });
420
+ case 6:
421
+ if (!(res.status === 401)) {
422
+ _context19.n = 7;
423
+ break;
424
+ }
425
+ console.warn("Val: authentication error: ", res.json.message);
426
+ return _context19.a(2, {
427
+ status: "unavailable"
428
+ });
429
+ case 7:
430
+ if (!(res.status === 404)) {
431
+ _context19.n = 8;
432
+ break;
433
+ }
434
+ return _context19.a(2, {
435
+ status: "absent"
436
+ });
437
+ case 8:
438
+ console.error("Val: could not load draft JSON entry: ", "message" in res.json ? res.json.message : "status ".concat(res.status));
439
+ return _context19.a(2, {
440
+ status: "unavailable"
441
+ });
442
+ }
443
+ }, _callee19, null, [[0, 2]]);
444
+ }));
445
+ return _loadDraftJsonEntry.apply(this, arguments);
446
+ }
447
+ /**
448
+ * Resolves ONE `.jsonValues()` entry by key, loading only that entry instead of
449
+ * the whole record — the runtime-scaling counterpart to the eager `fetchVal`.
450
+ *
451
+ * Production (Val disabled): resolves the entry's lazy import thunk from the
452
+ * locally-bundled module. One dynamic import, no server round-trip.
453
+ *
454
+ * Enabled (draft mode): reads the entry through `/json`, which replays pending
455
+ * patches, so uncommitted Studio edits show up. Falls back to the local thunk if
456
+ * the draft read yields nothing.
457
+ */
458
+ var initFetchValKeyStega = function initFetchValKeyStega(valServerPromise, isEnabled, getCookies) {
214
459
  return /*#__PURE__*/function () {
215
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(selector, params) {
216
- var fetchVal, resolvedParams, path, schema, val, route, _t5, _t6;
460
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(selector, key) {
461
+ var enabled, source, moduleFilePath, draft, content;
217
462
  return _regenerator().w(function (_context3) {
218
- while (1) switch (_context3.n) {
463
+ while (1) switch (_context3.p = _context3.n) {
464
+ case 0:
465
+ enabled = false;
466
+ _context3.p = 1;
467
+ _context3.n = 2;
468
+ return isEnabled();
469
+ case 2:
470
+ enabled = _context3.v;
471
+ _context3.n = 4;
472
+ break;
473
+ case 3:
474
+ _context3.p = 3;
475
+ _context3.v;
476
+ case 4:
477
+ source = selector && Internal.getSource(selector);
478
+ moduleFilePath = selector && Internal.getValPath(selector);
479
+ draft = {
480
+ status: "unavailable"
481
+ };
482
+ if (!(enabled && moduleFilePath)) {
483
+ _context3.n = 6;
484
+ break;
485
+ }
486
+ SET_AUTO_TAG_JSX_ENABLED(true);
487
+ _context3.n = 5;
488
+ return loadDraftJsonEntry(valServerPromise, getCookies, moduleFilePath, key);
489
+ case 5:
490
+ draft = _context3.v;
491
+ case 6:
492
+ _context3.n = 7;
493
+ return resolveDraftOrCommittedEntry(draft, function () {
494
+ return loadJsonEntryContent(source, key);
495
+ });
496
+ case 7:
497
+ content = _context3.v;
498
+ if (!(content === undefined)) {
499
+ _context3.n = 8;
500
+ break;
501
+ }
502
+ return _context3.a(2, undefined);
503
+ case 8:
504
+ return _context3.a(2, stegaEncode(content, {
505
+ disabled: !enabled,
506
+ root: getJsonEntryStegaRoot(selector, key)
507
+ }));
508
+ }
509
+ }, _callee3, null, [[1, 3]]);
510
+ }));
511
+ return function (_x1, _x10) {
512
+ return _ref3.apply(this, arguments);
513
+ };
514
+ }();
515
+ };
516
+ var initFetchValRouteUrl = function initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
517
+ return /*#__PURE__*/function () {
518
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(selector, params) {
519
+ var fetchVal, resolvedParams, path, schema, val, route, _t7, _t8;
520
+ return _regenerator().w(function (_context4) {
521
+ while (1) switch (_context4.n) {
219
522
  case 0:
220
523
  fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
221
524
  if (!(params === undefined)) {
222
- _context3.n = 1;
525
+ _context4.n = 1;
223
526
  break;
224
527
  }
225
- _t5 = undefined;
226
- _context3.n = 3;
528
+ _t7 = undefined;
529
+ _context4.n = 3;
227
530
  break;
228
531
  case 1:
229
- _context3.n = 2;
532
+ _context4.n = 2;
230
533
  return Promise.resolve(params);
231
534
  case 2:
232
- _t5 = _context3.v;
535
+ _t7 = _context4.v;
233
536
  case 3:
234
- resolvedParams = _t5;
537
+ resolvedParams = _t7;
235
538
  path = selector && Internal.getValPath(selector);
236
539
  schema = selector && Internal.getSchema(selector);
237
- _t6 = selector;
238
- if (!_t6) {
239
- _context3.n = 5;
540
+ _t8 = selector;
541
+ if (!_t8) {
542
+ _context4.n = 5;
240
543
  break;
241
544
  }
242
- _context3.n = 4;
545
+ _context4.n = 4;
243
546
  return fetchVal(selector);
244
547
  case 4:
245
- _t6 = _context3.v;
548
+ _t8 = _context4.v;
246
549
  case 5:
247
- val = _t6;
550
+ val = _t8;
248
551
  route = getValRouteUrlFromVal(resolvedParams, "fetchValRouteUrl", path, schema, val);
249
- return _context3.a(2, route);
552
+ return _context4.a(2, route);
250
553
  }
251
- }, _callee3);
554
+ }, _callee4);
252
555
  }));
253
- return function (_x3, _x4) {
254
- return _ref3.apply(this, arguments);
556
+ return function (_x11, _x12) {
557
+ return _ref4.apply(this, arguments);
255
558
  };
256
559
  }();
257
560
  };
@@ -272,19 +575,6 @@ function initValRsc(config, valModules, rscNextConfig) {
272
575
  }
273
576
  }, config), config, {
274
577
  isEnabled: function isEnabled() {
275
- return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
276
- return _regenerator().w(function (_context4) {
277
- while (1) switch (_context4.n) {
278
- case 0:
279
- _context4.n = 1;
280
- return rscNextConfig.draftMode();
281
- case 1:
282
- return _context4.a(2, _context4.v.isEnabled);
283
- }
284
- }, _callee4);
285
- }))();
286
- },
287
- onEnable: function onEnable() {
288
578
  return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
289
579
  return _regenerator().w(function (_context5) {
290
580
  while (1) switch (_context5.n) {
@@ -292,14 +582,12 @@ function initValRsc(config, valModules, rscNextConfig) {
292
582
  _context5.n = 1;
293
583
  return rscNextConfig.draftMode();
294
584
  case 1:
295
- _context5.v.enable();
296
- case 2:
297
- return _context5.a(2);
585
+ return _context5.a(2, _context5.v.isEnabled);
298
586
  }
299
587
  }, _callee5);
300
588
  }))();
301
589
  },
302
- onDisable: function onDisable() {
590
+ onEnable: function onEnable() {
303
591
  return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
304
592
  return _regenerator().w(function (_context6) {
305
593
  while (1) switch (_context6.n) {
@@ -307,35 +595,40 @@ function initValRsc(config, valModules, rscNextConfig) {
307
595
  _context6.n = 1;
308
596
  return rscNextConfig.draftMode();
309
597
  case 1:
310
- _context6.v.disable();
598
+ _context6.v.enable();
311
599
  case 2:
312
600
  return _context6.a(2);
313
601
  }
314
602
  }, _callee6);
315
603
  }))();
604
+ },
605
+ onDisable: function onDisable() {
606
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
607
+ return _regenerator().w(function (_context7) {
608
+ while (1) switch (_context7.n) {
609
+ case 0:
610
+ _context7.n = 1;
611
+ return rscNextConfig.draftMode();
612
+ case 1:
613
+ _context7.v.disable();
614
+ case 2:
615
+ return _context7.a(2);
616
+ }
617
+ }, _callee7);
618
+ }))();
316
619
  }
317
620
  });
318
621
  return {
319
622
  fetchValStega: initFetchValStega(config, valApiEndpoints,
320
623
  // TODO: get from config
321
- valServerPromise, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
322
- return _regenerator().w(function (_context7) {
323
- while (1) switch (_context7.n) {
324
- case 0:
325
- _context7.n = 1;
326
- return rscNextConfig.draftMode();
327
- case 1:
328
- return _context7.a(2, _context7.v.isEnabled);
329
- }
330
- }, _callee7);
331
- })), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
624
+ valServerPromise, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
332
625
  return _regenerator().w(function (_context8) {
333
626
  while (1) switch (_context8.n) {
334
627
  case 0:
335
628
  _context8.n = 1;
336
- return rscNextConfig.headers();
629
+ return rscNextConfig.draftMode();
337
630
  case 1:
338
- return _context8.a(2, _context8.v);
631
+ return _context8.a(2, _context8.v.isEnabled);
339
632
  }
340
633
  }, _callee8);
341
634
  })), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
@@ -343,30 +636,30 @@ function initValRsc(config, valModules, rscNextConfig) {
343
636
  while (1) switch (_context9.n) {
344
637
  case 0:
345
638
  _context9.n = 1;
346
- return rscNextConfig.cookies();
639
+ return rscNextConfig.headers();
347
640
  case 1:
348
641
  return _context9.a(2, _context9.v);
349
642
  }
350
643
  }, _callee9);
351
- }))),
352
- fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
644
+ })), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
353
645
  return _regenerator().w(function (_context0) {
354
646
  while (1) switch (_context0.n) {
355
647
  case 0:
356
648
  _context0.n = 1;
357
- return rscNextConfig.draftMode();
649
+ return rscNextConfig.cookies();
358
650
  case 1:
359
- return _context0.a(2, _context0.v.isEnabled);
651
+ return _context0.a(2, _context0.v);
360
652
  }
361
653
  }, _callee0);
362
- })), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
654
+ }))),
655
+ fetchValKeyStega: initFetchValKeyStega(valServerPromise, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
363
656
  return _regenerator().w(function (_context1) {
364
657
  while (1) switch (_context1.n) {
365
658
  case 0:
366
659
  _context1.n = 1;
367
- return rscNextConfig.headers();
660
+ return rscNextConfig.draftMode();
368
661
  case 1:
369
- return _context1.a(2, _context1.v);
662
+ return _context1.a(2, _context1.v.isEnabled);
370
663
  }
371
664
  }, _callee1);
372
665
  })), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
@@ -380,7 +673,7 @@ function initValRsc(config, valModules, rscNextConfig) {
380
673
  }
381
674
  }, _callee10);
382
675
  }))),
383
- fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
676
+ fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
384
677
  return _regenerator().w(function (_context11) {
385
678
  while (1) switch (_context11.n) {
386
679
  case 0:
@@ -410,6 +703,37 @@ function initValRsc(config, valModules, rscNextConfig) {
410
703
  return _context13.a(2, _context13.v);
411
704
  }
412
705
  }, _callee13);
706
+ }))),
707
+ fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee14() {
708
+ return _regenerator().w(function (_context14) {
709
+ while (1) switch (_context14.n) {
710
+ case 0:
711
+ _context14.n = 1;
712
+ return rscNextConfig.draftMode();
713
+ case 1:
714
+ return _context14.a(2, _context14.v.isEnabled);
715
+ }
716
+ }, _callee14);
717
+ })), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15() {
718
+ return _regenerator().w(function (_context15) {
719
+ while (1) switch (_context15.n) {
720
+ case 0:
721
+ _context15.n = 1;
722
+ return rscNextConfig.headers();
723
+ case 1:
724
+ return _context15.a(2, _context15.v);
725
+ }
726
+ }, _callee15);
727
+ })), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16() {
728
+ return _regenerator().w(function (_context16) {
729
+ while (1) switch (_context16.n) {
730
+ case 0:
731
+ _context16.n = 1;
732
+ return rscNextConfig.cookies();
733
+ case 1:
734
+ return _context16.a(2, _context16.v);
735
+ }
736
+ }, _callee16);
413
737
  })))
414
738
  };
415
739
  }