@valbuild/next 0.85.0 → 0.86.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.
Files changed (36) hide show
  1. package/README.md +86 -4
  2. package/client/dist/valbuild-next-client.cjs.dev.js +27 -5
  3. package/client/dist/valbuild-next-client.cjs.prod.js +27 -5
  4. package/client/dist/valbuild-next-client.esm.js +26 -4
  5. package/dist/ValApp-0ded607c.cjs.dev.js +133 -0
  6. package/dist/ValApp-489d97dc.esm.js +125 -0
  7. package/dist/ValApp-b10c2084.cjs.js +7 -0
  8. package/dist/ValApp-b10c2084.cjs.prod.js +133 -0
  9. package/dist/{ValNextProvider-25f1f5c9.esm.js → ValNextProvider-10c232b6.esm.js} +80 -44
  10. package/dist/ValNextProvider-7042b86d.cjs.js +7 -0
  11. package/dist/{ValNextProvider-a618d775.cjs.prod.js → ValNextProvider-7042b86d.cjs.prod.js} +80 -44
  12. package/dist/{ValNextProvider-c7952bdc.cjs.dev.js → ValNextProvider-726026f9.cjs.dev.js} +80 -44
  13. package/dist/cssUtils-9c11102f.cjs.dev.js +41 -0
  14. package/dist/cssUtils-b5651c03.esm.js +32 -0
  15. package/dist/cssUtils-d97a757c.cjs.prod.js +41 -0
  16. package/dist/declarations/src/ValApp.d.ts +1 -1
  17. package/dist/declarations/src/client/initValClient.d.ts +2 -0
  18. package/dist/declarations/src/rsc/initValRsc.d.ts +9 -0
  19. package/dist/{initValRouteFromVal-4e6253bf.esm.js → routeFromVal-248c62f1.esm.js} +17 -4
  20. package/dist/{initValRouteFromVal-0f4f2d39.cjs.prod.js → routeFromVal-a317debc.cjs.prod.js} +17 -3
  21. package/dist/{initValRouteFromVal-65dd1262.cjs.dev.js → routeFromVal-a3987ae3.cjs.dev.js} +17 -3
  22. package/dist/valbuild-next.cjs.dev.js +2 -2
  23. package/dist/valbuild-next.cjs.prod.js +2 -2
  24. package/dist/valbuild-next.esm.js +2 -2
  25. package/package.json +6 -6
  26. package/rsc/dist/valbuild-next-rsc.cjs.dev.js +134 -46
  27. package/rsc/dist/valbuild-next-rsc.cjs.prod.js +134 -46
  28. package/rsc/dist/valbuild-next-rsc.esm.js +133 -45
  29. package/dist/ValApp-0efa0e5d.cjs.dev.js +0 -63
  30. package/dist/ValApp-3ab62a2b.esm.js +0 -55
  31. package/dist/ValApp-a808cf89.cjs.js +0 -7
  32. package/dist/ValApp-a808cf89.cjs.prod.js +0 -63
  33. package/dist/ValNextProvider-a618d775.cjs.js +0 -7
  34. package/dist/useRemoteConfigSender-02451801.esm.js +0 -70
  35. package/dist/useRemoteConfigSender-3ea2fe91.cjs.prod.js +0 -76
  36. package/dist/useRemoteConfigSender-c78b81c5.cjs.dev.js +0 -76
@@ -10,7 +10,7 @@ var core = require('@valbuild/core');
10
10
  var internal = require('@valbuild/shared/internal');
11
11
  var server = require('@valbuild/server');
12
12
  var version = require('../../dist/version-82faa1d0.cjs.dev.js');
13
- var initValRouteFromVal = require('../../dist/initValRouteFromVal-65dd1262.cjs.dev.js');
13
+ var routeFromVal = require('../../dist/routeFromVal-a3987ae3.cjs.dev.js');
14
14
  require('../../dist/createForOfIteratorHelper-0445603c.cjs.dev.js');
15
15
  require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
16
16
  require('../../dist/slicedToArray-44036a76.cjs.dev.js');
@@ -205,7 +205,7 @@ var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpo
205
205
  _context2.t0 = _context2.sent;
206
206
  case 11:
207
207
  val = _context2.t0;
208
- route = initValRouteFromVal.initValRouteFromVal(resolvedParams, "fetchValRoute", path, schema, val);
208
+ route = routeFromVal.initValRouteFromVal(resolvedParams, "fetchValRoute", path, schema, val);
209
209
  return _context2.abrupt("return", route);
210
210
  case 14:
211
211
  case "end":
@@ -218,6 +218,54 @@ var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpo
218
218
  };
219
219
  }();
220
220
  };
221
+ var initFetchValRouteUrl = function initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
222
+ return /*#__PURE__*/function () {
223
+ var _ref3 = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3(selector, params) {
224
+ var fetchVal, resolvedParams, path, schema, val, route;
225
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
226
+ while (1) switch (_context3.prev = _context3.next) {
227
+ case 0:
228
+ fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
229
+ if (!(params === undefined)) {
230
+ _context3.next = 5;
231
+ break;
232
+ }
233
+ _context3.t0 = undefined;
234
+ _context3.next = 8;
235
+ break;
236
+ case 5:
237
+ _context3.next = 7;
238
+ return Promise.resolve(params);
239
+ case 7:
240
+ _context3.t0 = _context3.sent;
241
+ case 8:
242
+ resolvedParams = _context3.t0;
243
+ path = selector && core.Internal.getValPath(selector);
244
+ schema = selector && core.Internal.getSchema(selector);
245
+ _context3.t1 = selector;
246
+ if (!_context3.t1) {
247
+ _context3.next = 16;
248
+ break;
249
+ }
250
+ _context3.next = 15;
251
+ return fetchVal(selector);
252
+ case 15:
253
+ _context3.t1 = _context3.sent;
254
+ case 16:
255
+ val = _context3.t1;
256
+ route = routeFromVal.getValRouteUrlFromVal(resolvedParams, "fetchValRouteUrl", path, schema, val);
257
+ return _context3.abrupt("return", route);
258
+ case 19:
259
+ case "end":
260
+ return _context3.stop();
261
+ }
262
+ }, _callee3);
263
+ }));
264
+ return function (_x3, _x4) {
265
+ return _ref3.apply(this, arguments);
266
+ };
267
+ }();
268
+ };
221
269
  var valApiEndpoints = "/api/val";
222
270
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
223
271
  function initValRsc(config, valModules, rscNextConfig) {
@@ -236,22 +284,6 @@ function initValRsc(config, valModules, rscNextConfig) {
236
284
  }
237
285
  }, config), config, {
238
286
  isEnabled: function isEnabled() {
239
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3() {
240
- return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
241
- while (1) switch (_context3.prev = _context3.next) {
242
- case 0:
243
- _context3.next = 2;
244
- return rscNextConfig.draftMode();
245
- case 2:
246
- return _context3.abrupt("return", _context3.sent.isEnabled);
247
- case 3:
248
- case "end":
249
- return _context3.stop();
250
- }
251
- }, _callee3);
252
- }))();
253
- },
254
- onEnable: function onEnable() {
255
287
  return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee4() {
256
288
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee4$(_context4) {
257
289
  while (1) switch (_context4.prev = _context4.next) {
@@ -259,7 +291,7 @@ function initValRsc(config, valModules, rscNextConfig) {
259
291
  _context4.next = 2;
260
292
  return rscNextConfig.draftMode();
261
293
  case 2:
262
- _context4.sent.enable();
294
+ return _context4.abrupt("return", _context4.sent.isEnabled);
263
295
  case 3:
264
296
  case "end":
265
297
  return _context4.stop();
@@ -267,7 +299,7 @@ function initValRsc(config, valModules, rscNextConfig) {
267
299
  }, _callee4);
268
300
  }))();
269
301
  },
270
- onDisable: function onDisable() {
302
+ onEnable: function onEnable() {
271
303
  return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee5() {
272
304
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee5$(_context5) {
273
305
  while (1) switch (_context5.prev = _context5.next) {
@@ -275,39 +307,42 @@ function initValRsc(config, valModules, rscNextConfig) {
275
307
  _context5.next = 2;
276
308
  return rscNextConfig.draftMode();
277
309
  case 2:
278
- _context5.sent.disable();
310
+ _context5.sent.enable();
279
311
  case 3:
280
312
  case "end":
281
313
  return _context5.stop();
282
314
  }
283
315
  }, _callee5);
284
316
  }))();
317
+ },
318
+ onDisable: function onDisable() {
319
+ return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee6() {
320
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee6$(_context6) {
321
+ while (1) switch (_context6.prev = _context6.next) {
322
+ case 0:
323
+ _context6.next = 2;
324
+ return rscNextConfig.draftMode();
325
+ case 2:
326
+ _context6.sent.disable();
327
+ case 3:
328
+ case "end":
329
+ return _context6.stop();
330
+ }
331
+ }, _callee6);
332
+ }))();
285
333
  }
286
334
  });
287
335
  return {
288
336
  fetchValStega: initFetchValStega(config, valApiEndpoints,
289
337
  // TODO: get from config
290
- valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee6() {
291
- return asyncToGenerator._regeneratorRuntime().wrap(function _callee6$(_context6) {
292
- while (1) switch (_context6.prev = _context6.next) {
293
- case 0:
294
- _context6.next = 2;
295
- return rscNextConfig.draftMode();
296
- case 2:
297
- return _context6.abrupt("return", _context6.sent.isEnabled);
298
- case 3:
299
- case "end":
300
- return _context6.stop();
301
- }
302
- }, _callee6);
303
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee7() {
338
+ valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee7() {
304
339
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee7$(_context7) {
305
340
  while (1) switch (_context7.prev = _context7.next) {
306
341
  case 0:
307
342
  _context7.next = 2;
308
- return rscNextConfig.headers();
343
+ return rscNextConfig.draftMode();
309
344
  case 2:
310
- return _context7.abrupt("return", _context7.sent);
345
+ return _context7.abrupt("return", _context7.sent.isEnabled);
311
346
  case 3:
312
347
  case "end":
313
348
  return _context7.stop();
@@ -318,7 +353,7 @@ function initValRsc(config, valModules, rscNextConfig) {
318
353
  while (1) switch (_context8.prev = _context8.next) {
319
354
  case 0:
320
355
  _context8.next = 2;
321
- return rscNextConfig.cookies();
356
+ return rscNextConfig.headers();
322
357
  case 2:
323
358
  return _context8.abrupt("return", _context8.sent);
324
359
  case 3:
@@ -326,28 +361,28 @@ function initValRsc(config, valModules, rscNextConfig) {
326
361
  return _context8.stop();
327
362
  }
328
363
  }, _callee8);
329
- }))),
330
- fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee9() {
364
+ })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee9() {
331
365
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee9$(_context9) {
332
366
  while (1) switch (_context9.prev = _context9.next) {
333
367
  case 0:
334
368
  _context9.next = 2;
335
- return rscNextConfig.draftMode();
369
+ return rscNextConfig.cookies();
336
370
  case 2:
337
- return _context9.abrupt("return", _context9.sent.isEnabled);
371
+ return _context9.abrupt("return", _context9.sent);
338
372
  case 3:
339
373
  case "end":
340
374
  return _context9.stop();
341
375
  }
342
376
  }, _callee9);
343
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee10() {
377
+ }))),
378
+ fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee10() {
344
379
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee10$(_context10) {
345
380
  while (1) switch (_context10.prev = _context10.next) {
346
381
  case 0:
347
382
  _context10.next = 2;
348
- return rscNextConfig.headers();
383
+ return rscNextConfig.draftMode();
349
384
  case 2:
350
- return _context10.abrupt("return", _context10.sent);
385
+ return _context10.abrupt("return", _context10.sent.isEnabled);
351
386
  case 3:
352
387
  case "end":
353
388
  return _context10.stop();
@@ -358,7 +393,7 @@ function initValRsc(config, valModules, rscNextConfig) {
358
393
  while (1) switch (_context11.prev = _context11.next) {
359
394
  case 0:
360
395
  _context11.next = 2;
361
- return rscNextConfig.cookies();
396
+ return rscNextConfig.headers();
362
397
  case 2:
363
398
  return _context11.abrupt("return", _context11.sent);
364
399
  case 3:
@@ -366,6 +401,59 @@ function initValRsc(config, valModules, rscNextConfig) {
366
401
  return _context11.stop();
367
402
  }
368
403
  }, _callee11);
404
+ })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee12() {
405
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee12$(_context12) {
406
+ while (1) switch (_context12.prev = _context12.next) {
407
+ case 0:
408
+ _context12.next = 2;
409
+ return rscNextConfig.cookies();
410
+ case 2:
411
+ return _context12.abrupt("return", _context12.sent);
412
+ case 3:
413
+ case "end":
414
+ return _context12.stop();
415
+ }
416
+ }, _callee12);
417
+ }))),
418
+ fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee13() {
419
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee13$(_context13) {
420
+ while (1) switch (_context13.prev = _context13.next) {
421
+ case 0:
422
+ _context13.next = 2;
423
+ return rscNextConfig.draftMode();
424
+ case 2:
425
+ return _context13.abrupt("return", _context13.sent.isEnabled);
426
+ case 3:
427
+ case "end":
428
+ return _context13.stop();
429
+ }
430
+ }, _callee13);
431
+ })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee14() {
432
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee14$(_context14) {
433
+ while (1) switch (_context14.prev = _context14.next) {
434
+ case 0:
435
+ _context14.next = 2;
436
+ return rscNextConfig.headers();
437
+ case 2:
438
+ return _context14.abrupt("return", _context14.sent);
439
+ case 3:
440
+ case "end":
441
+ return _context14.stop();
442
+ }
443
+ }, _callee14);
444
+ })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee15() {
445
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee15$(_context15) {
446
+ while (1) switch (_context15.prev = _context15.next) {
447
+ case 0:
448
+ _context15.next = 2;
449
+ return rscNextConfig.cookies();
450
+ case 2:
451
+ return _context15.abrupt("return", _context15.sent);
452
+ case 3:
453
+ case "end":
454
+ return _context15.stop();
455
+ }
456
+ }, _callee15);
369
457
  })))
370
458
  };
371
459
  }
@@ -10,7 +10,7 @@ var core = require('@valbuild/core');
10
10
  var internal = require('@valbuild/shared/internal');
11
11
  var server = require('@valbuild/server');
12
12
  var version = require('../../dist/version-a9a6a619.cjs.prod.js');
13
- var initValRouteFromVal = require('../../dist/initValRouteFromVal-0f4f2d39.cjs.prod.js');
13
+ var routeFromVal = require('../../dist/routeFromVal-a317debc.cjs.prod.js');
14
14
  require('../../dist/createForOfIteratorHelper-d4afcad8.cjs.prod.js');
15
15
  require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
16
16
  require('../../dist/slicedToArray-ce613de6.cjs.prod.js');
@@ -205,7 +205,7 @@ var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpo
205
205
  _context2.t0 = _context2.sent;
206
206
  case 11:
207
207
  val = _context2.t0;
208
- route = initValRouteFromVal.initValRouteFromVal(resolvedParams, "fetchValRoute", path, schema, val);
208
+ route = routeFromVal.initValRouteFromVal(resolvedParams, "fetchValRoute", path, schema, val);
209
209
  return _context2.abrupt("return", route);
210
210
  case 14:
211
211
  case "end":
@@ -218,6 +218,54 @@ var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpo
218
218
  };
219
219
  }();
220
220
  };
221
+ var initFetchValRouteUrl = function initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
222
+ return /*#__PURE__*/function () {
223
+ var _ref3 = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3(selector, params) {
224
+ var fetchVal, resolvedParams, path, schema, val, route;
225
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
226
+ while (1) switch (_context3.prev = _context3.next) {
227
+ case 0:
228
+ fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
229
+ if (!(params === undefined)) {
230
+ _context3.next = 5;
231
+ break;
232
+ }
233
+ _context3.t0 = undefined;
234
+ _context3.next = 8;
235
+ break;
236
+ case 5:
237
+ _context3.next = 7;
238
+ return Promise.resolve(params);
239
+ case 7:
240
+ _context3.t0 = _context3.sent;
241
+ case 8:
242
+ resolvedParams = _context3.t0;
243
+ path = selector && core.Internal.getValPath(selector);
244
+ schema = selector && core.Internal.getSchema(selector);
245
+ _context3.t1 = selector;
246
+ if (!_context3.t1) {
247
+ _context3.next = 16;
248
+ break;
249
+ }
250
+ _context3.next = 15;
251
+ return fetchVal(selector);
252
+ case 15:
253
+ _context3.t1 = _context3.sent;
254
+ case 16:
255
+ val = _context3.t1;
256
+ route = routeFromVal.getValRouteUrlFromVal(resolvedParams, "fetchValRouteUrl", path, schema, val);
257
+ return _context3.abrupt("return", route);
258
+ case 19:
259
+ case "end":
260
+ return _context3.stop();
261
+ }
262
+ }, _callee3);
263
+ }));
264
+ return function (_x3, _x4) {
265
+ return _ref3.apply(this, arguments);
266
+ };
267
+ }();
268
+ };
221
269
  var valApiEndpoints = "/api/val";
222
270
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
223
271
  function initValRsc(config, valModules, rscNextConfig) {
@@ -236,22 +284,6 @@ function initValRsc(config, valModules, rscNextConfig) {
236
284
  }
237
285
  }, config), config, {
238
286
  isEnabled: function isEnabled() {
239
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3() {
240
- return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
241
- while (1) switch (_context3.prev = _context3.next) {
242
- case 0:
243
- _context3.next = 2;
244
- return rscNextConfig.draftMode();
245
- case 2:
246
- return _context3.abrupt("return", _context3.sent.isEnabled);
247
- case 3:
248
- case "end":
249
- return _context3.stop();
250
- }
251
- }, _callee3);
252
- }))();
253
- },
254
- onEnable: function onEnable() {
255
287
  return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee4() {
256
288
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee4$(_context4) {
257
289
  while (1) switch (_context4.prev = _context4.next) {
@@ -259,7 +291,7 @@ function initValRsc(config, valModules, rscNextConfig) {
259
291
  _context4.next = 2;
260
292
  return rscNextConfig.draftMode();
261
293
  case 2:
262
- _context4.sent.enable();
294
+ return _context4.abrupt("return", _context4.sent.isEnabled);
263
295
  case 3:
264
296
  case "end":
265
297
  return _context4.stop();
@@ -267,7 +299,7 @@ function initValRsc(config, valModules, rscNextConfig) {
267
299
  }, _callee4);
268
300
  }))();
269
301
  },
270
- onDisable: function onDisable() {
302
+ onEnable: function onEnable() {
271
303
  return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee5() {
272
304
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee5$(_context5) {
273
305
  while (1) switch (_context5.prev = _context5.next) {
@@ -275,39 +307,42 @@ function initValRsc(config, valModules, rscNextConfig) {
275
307
  _context5.next = 2;
276
308
  return rscNextConfig.draftMode();
277
309
  case 2:
278
- _context5.sent.disable();
310
+ _context5.sent.enable();
279
311
  case 3:
280
312
  case "end":
281
313
  return _context5.stop();
282
314
  }
283
315
  }, _callee5);
284
316
  }))();
317
+ },
318
+ onDisable: function onDisable() {
319
+ return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee6() {
320
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee6$(_context6) {
321
+ while (1) switch (_context6.prev = _context6.next) {
322
+ case 0:
323
+ _context6.next = 2;
324
+ return rscNextConfig.draftMode();
325
+ case 2:
326
+ _context6.sent.disable();
327
+ case 3:
328
+ case "end":
329
+ return _context6.stop();
330
+ }
331
+ }, _callee6);
332
+ }))();
285
333
  }
286
334
  });
287
335
  return {
288
336
  fetchValStega: initFetchValStega(config, valApiEndpoints,
289
337
  // TODO: get from config
290
- valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee6() {
291
- return asyncToGenerator._regeneratorRuntime().wrap(function _callee6$(_context6) {
292
- while (1) switch (_context6.prev = _context6.next) {
293
- case 0:
294
- _context6.next = 2;
295
- return rscNextConfig.draftMode();
296
- case 2:
297
- return _context6.abrupt("return", _context6.sent.isEnabled);
298
- case 3:
299
- case "end":
300
- return _context6.stop();
301
- }
302
- }, _callee6);
303
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee7() {
338
+ valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee7() {
304
339
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee7$(_context7) {
305
340
  while (1) switch (_context7.prev = _context7.next) {
306
341
  case 0:
307
342
  _context7.next = 2;
308
- return rscNextConfig.headers();
343
+ return rscNextConfig.draftMode();
309
344
  case 2:
310
- return _context7.abrupt("return", _context7.sent);
345
+ return _context7.abrupt("return", _context7.sent.isEnabled);
311
346
  case 3:
312
347
  case "end":
313
348
  return _context7.stop();
@@ -318,7 +353,7 @@ function initValRsc(config, valModules, rscNextConfig) {
318
353
  while (1) switch (_context8.prev = _context8.next) {
319
354
  case 0:
320
355
  _context8.next = 2;
321
- return rscNextConfig.cookies();
356
+ return rscNextConfig.headers();
322
357
  case 2:
323
358
  return _context8.abrupt("return", _context8.sent);
324
359
  case 3:
@@ -326,28 +361,28 @@ function initValRsc(config, valModules, rscNextConfig) {
326
361
  return _context8.stop();
327
362
  }
328
363
  }, _callee8);
329
- }))),
330
- fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee9() {
364
+ })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee9() {
331
365
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee9$(_context9) {
332
366
  while (1) switch (_context9.prev = _context9.next) {
333
367
  case 0:
334
368
  _context9.next = 2;
335
- return rscNextConfig.draftMode();
369
+ return rscNextConfig.cookies();
336
370
  case 2:
337
- return _context9.abrupt("return", _context9.sent.isEnabled);
371
+ return _context9.abrupt("return", _context9.sent);
338
372
  case 3:
339
373
  case "end":
340
374
  return _context9.stop();
341
375
  }
342
376
  }, _callee9);
343
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee10() {
377
+ }))),
378
+ fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee10() {
344
379
  return asyncToGenerator._regeneratorRuntime().wrap(function _callee10$(_context10) {
345
380
  while (1) switch (_context10.prev = _context10.next) {
346
381
  case 0:
347
382
  _context10.next = 2;
348
- return rscNextConfig.headers();
383
+ return rscNextConfig.draftMode();
349
384
  case 2:
350
- return _context10.abrupt("return", _context10.sent);
385
+ return _context10.abrupt("return", _context10.sent.isEnabled);
351
386
  case 3:
352
387
  case "end":
353
388
  return _context10.stop();
@@ -358,7 +393,7 @@ function initValRsc(config, valModules, rscNextConfig) {
358
393
  while (1) switch (_context11.prev = _context11.next) {
359
394
  case 0:
360
395
  _context11.next = 2;
361
- return rscNextConfig.cookies();
396
+ return rscNextConfig.headers();
362
397
  case 2:
363
398
  return _context11.abrupt("return", _context11.sent);
364
399
  case 3:
@@ -366,6 +401,59 @@ function initValRsc(config, valModules, rscNextConfig) {
366
401
  return _context11.stop();
367
402
  }
368
403
  }, _callee11);
404
+ })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee12() {
405
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee12$(_context12) {
406
+ while (1) switch (_context12.prev = _context12.next) {
407
+ case 0:
408
+ _context12.next = 2;
409
+ return rscNextConfig.cookies();
410
+ case 2:
411
+ return _context12.abrupt("return", _context12.sent);
412
+ case 3:
413
+ case "end":
414
+ return _context12.stop();
415
+ }
416
+ }, _callee12);
417
+ }))),
418
+ fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee13() {
419
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee13$(_context13) {
420
+ while (1) switch (_context13.prev = _context13.next) {
421
+ case 0:
422
+ _context13.next = 2;
423
+ return rscNextConfig.draftMode();
424
+ case 2:
425
+ return _context13.abrupt("return", _context13.sent.isEnabled);
426
+ case 3:
427
+ case "end":
428
+ return _context13.stop();
429
+ }
430
+ }, _callee13);
431
+ })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee14() {
432
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee14$(_context14) {
433
+ while (1) switch (_context14.prev = _context14.next) {
434
+ case 0:
435
+ _context14.next = 2;
436
+ return rscNextConfig.headers();
437
+ case 2:
438
+ return _context14.abrupt("return", _context14.sent);
439
+ case 3:
440
+ case "end":
441
+ return _context14.stop();
442
+ }
443
+ }, _callee14);
444
+ })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee15() {
445
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee15$(_context15) {
446
+ while (1) switch (_context15.prev = _context15.next) {
447
+ case 0:
448
+ _context15.next = 2;
449
+ return rscNextConfig.cookies();
450
+ case 2:
451
+ return _context15.abrupt("return", _context15.sent);
452
+ case 3:
453
+ case "end":
454
+ return _context15.stop();
455
+ }
456
+ }, _callee15);
369
457
  })))
370
458
  };
371
459
  }