@valbuild/next 0.61.0 → 0.62.1

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 (28) hide show
  1. package/client/dist/valbuild-next-client.cjs.dev.js +1 -1
  2. package/client/dist/valbuild-next-client.cjs.prod.js +1 -1
  3. package/client/dist/valbuild-next-client.esm.js +1 -1
  4. package/dist/{ValContext-a73be368.cjs.dev.js → ValContext-8eb2ec77.cjs.dev.js} +13 -13
  5. package/dist/ValContext-df4a9ae7.cjs.js +7 -0
  6. package/dist/{ValContext-37ea12ae.cjs.prod.js → ValContext-df4a9ae7.cjs.prod.js} +13 -13
  7. package/dist/{ValContext-e5293493.esm.js → ValContext-ea0b967a.esm.js} +13 -13
  8. package/dist/ValNextProvider-06d5c71e.cjs.js +7 -0
  9. package/dist/{ValNextProvider-676d6cb8.cjs.prod.js → ValNextProvider-06d5c71e.cjs.prod.js} +4 -4
  10. package/dist/{ValNextProvider-23099a43.esm.js → ValNextProvider-259bf24d.esm.js} +4 -4
  11. package/dist/{ValNextProvider-ef4fdca6.cjs.dev.js → ValNextProvider-3df6c619.cjs.dev.js} +4 -4
  12. package/dist/asyncToGenerator-0859ab5c.esm.js +334 -0
  13. package/dist/asyncToGenerator-3551d940.cjs.prod.js +337 -0
  14. package/dist/asyncToGenerator-ba66657c.cjs.dev.js +337 -0
  15. package/dist/declarations/src/external_exempt_from_val_quickjs.d.ts +3 -2
  16. package/dist/declarations/src/server/initValServer.d.ts +3 -1
  17. package/dist/valbuild-next.cjs.dev.js +1 -1
  18. package/dist/valbuild-next.cjs.prod.js +1 -1
  19. package/dist/valbuild-next.esm.js +1 -1
  20. package/package.json +5 -5
  21. package/rsc/dist/valbuild-next-rsc.cjs.dev.js +75 -76
  22. package/rsc/dist/valbuild-next-rsc.cjs.prod.js +75 -76
  23. package/rsc/dist/valbuild-next-rsc.esm.js +77 -78
  24. package/server/dist/valbuild-next-server.cjs.dev.js +8 -340
  25. package/server/dist/valbuild-next-server.cjs.prod.js +8 -340
  26. package/server/dist/valbuild-next-server.esm.js +2 -334
  27. package/dist/ValContext-37ea12ae.cjs.js +0 -7
  28. package/dist/ValNextProvider-676d6cb8.cjs.js +0 -7
@@ -1,5 +1,6 @@
1
1
  import 'server-only';
2
2
  import { _ as _slicedToArray } from '../../dist/slicedToArray-1ff80c5e.esm.js';
3
+ import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../dist/asyncToGenerator-0859ab5c.esm.js';
3
4
  import { _ as _objectSpread2 } from '../../dist/objectSpread2-439bdcdd.esm.js';
4
5
  import { Internal } from '@valbuild/core';
5
6
  import { createValApiRouter, createValServer } from '@valbuild/server';
@@ -7,339 +8,6 @@ import { NextResponse } from 'next/server';
7
8
  import { V as VERSION } from '../../dist/version-98ec5c7a.esm.js';
8
9
  import '../../dist/unsupportedIterableToArray-51bb61c2.esm.js';
9
10
 
10
- function _regeneratorRuntime() {
11
- _regeneratorRuntime = function () {
12
- return e;
13
- };
14
- var t,
15
- e = {},
16
- r = Object.prototype,
17
- n = r.hasOwnProperty,
18
- o = Object.defineProperty || function (t, e, r) {
19
- t[e] = r.value;
20
- },
21
- i = "function" == typeof Symbol ? Symbol : {},
22
- a = i.iterator || "@@iterator",
23
- c = i.asyncIterator || "@@asyncIterator",
24
- u = i.toStringTag || "@@toStringTag";
25
- function define(t, e, r) {
26
- return Object.defineProperty(t, e, {
27
- value: r,
28
- enumerable: !0,
29
- configurable: !0,
30
- writable: !0
31
- }), t[e];
32
- }
33
- try {
34
- define({}, "");
35
- } catch (t) {
36
- define = function (t, e, r) {
37
- return t[e] = r;
38
- };
39
- }
40
- function wrap(t, e, r, n) {
41
- var i = e && e.prototype instanceof Generator ? e : Generator,
42
- a = Object.create(i.prototype),
43
- c = new Context(n || []);
44
- return o(a, "_invoke", {
45
- value: makeInvokeMethod(t, r, c)
46
- }), a;
47
- }
48
- function tryCatch(t, e, r) {
49
- try {
50
- return {
51
- type: "normal",
52
- arg: t.call(e, r)
53
- };
54
- } catch (t) {
55
- return {
56
- type: "throw",
57
- arg: t
58
- };
59
- }
60
- }
61
- e.wrap = wrap;
62
- var h = "suspendedStart",
63
- l = "suspendedYield",
64
- f = "executing",
65
- s = "completed",
66
- y = {};
67
- function Generator() {}
68
- function GeneratorFunction() {}
69
- function GeneratorFunctionPrototype() {}
70
- var p = {};
71
- define(p, a, function () {
72
- return this;
73
- });
74
- var d = Object.getPrototypeOf,
75
- v = d && d(d(values([])));
76
- v && v !== r && n.call(v, a) && (p = v);
77
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
78
- function defineIteratorMethods(t) {
79
- ["next", "throw", "return"].forEach(function (e) {
80
- define(t, e, function (t) {
81
- return this._invoke(e, t);
82
- });
83
- });
84
- }
85
- function AsyncIterator(t, e) {
86
- function invoke(r, o, i, a) {
87
- var c = tryCatch(t[r], t, o);
88
- if ("throw" !== c.type) {
89
- var u = c.arg,
90
- h = u.value;
91
- return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
92
- invoke("next", t, i, a);
93
- }, function (t) {
94
- invoke("throw", t, i, a);
95
- }) : e.resolve(h).then(function (t) {
96
- u.value = t, i(u);
97
- }, function (t) {
98
- return invoke("throw", t, i, a);
99
- });
100
- }
101
- a(c.arg);
102
- }
103
- var r;
104
- o(this, "_invoke", {
105
- value: function (t, n) {
106
- function callInvokeWithMethodAndArg() {
107
- return new e(function (e, r) {
108
- invoke(t, n, e, r);
109
- });
110
- }
111
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
112
- }
113
- });
114
- }
115
- function makeInvokeMethod(e, r, n) {
116
- var o = h;
117
- return function (i, a) {
118
- if (o === f) throw new Error("Generator is already running");
119
- if (o === s) {
120
- if ("throw" === i) throw a;
121
- return {
122
- value: t,
123
- done: !0
124
- };
125
- }
126
- for (n.method = i, n.arg = a;;) {
127
- var c = n.delegate;
128
- if (c) {
129
- var u = maybeInvokeDelegate(c, n);
130
- if (u) {
131
- if (u === y) continue;
132
- return u;
133
- }
134
- }
135
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
136
- if (o === h) throw o = s, n.arg;
137
- n.dispatchException(n.arg);
138
- } else "return" === n.method && n.abrupt("return", n.arg);
139
- o = f;
140
- var p = tryCatch(e, r, n);
141
- if ("normal" === p.type) {
142
- if (o = n.done ? s : l, p.arg === y) continue;
143
- return {
144
- value: p.arg,
145
- done: n.done
146
- };
147
- }
148
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
149
- }
150
- };
151
- }
152
- function maybeInvokeDelegate(e, r) {
153
- var n = r.method,
154
- o = e.iterator[n];
155
- if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
156
- var i = tryCatch(o, e.iterator, r.arg);
157
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
158
- var a = i.arg;
159
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
160
- }
161
- function pushTryEntry(t) {
162
- var e = {
163
- tryLoc: t[0]
164
- };
165
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
166
- }
167
- function resetTryEntry(t) {
168
- var e = t.completion || {};
169
- e.type = "normal", delete e.arg, t.completion = e;
170
- }
171
- function Context(t) {
172
- this.tryEntries = [{
173
- tryLoc: "root"
174
- }], t.forEach(pushTryEntry, this), this.reset(!0);
175
- }
176
- function values(e) {
177
- if (e || "" === e) {
178
- var r = e[a];
179
- if (r) return r.call(e);
180
- if ("function" == typeof e.next) return e;
181
- if (!isNaN(e.length)) {
182
- var o = -1,
183
- i = function next() {
184
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
185
- return next.value = t, next.done = !0, next;
186
- };
187
- return i.next = i;
188
- }
189
- }
190
- throw new TypeError(typeof e + " is not iterable");
191
- }
192
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
193
- value: GeneratorFunctionPrototype,
194
- configurable: !0
195
- }), o(GeneratorFunctionPrototype, "constructor", {
196
- value: GeneratorFunction,
197
- configurable: !0
198
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
199
- var e = "function" == typeof t && t.constructor;
200
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
201
- }, e.mark = function (t) {
202
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
203
- }, e.awrap = function (t) {
204
- return {
205
- __await: t
206
- };
207
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
208
- return this;
209
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
210
- void 0 === i && (i = Promise);
211
- var a = new AsyncIterator(wrap(t, r, n, o), i);
212
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
213
- return t.done ? t.value : a.next();
214
- });
215
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
216
- return this;
217
- }), define(g, "toString", function () {
218
- return "[object Generator]";
219
- }), e.keys = function (t) {
220
- var e = Object(t),
221
- r = [];
222
- for (var n in e) r.push(n);
223
- return r.reverse(), function next() {
224
- for (; r.length;) {
225
- var t = r.pop();
226
- if (t in e) return next.value = t, next.done = !1, next;
227
- }
228
- return next.done = !0, next;
229
- };
230
- }, e.values = values, Context.prototype = {
231
- constructor: Context,
232
- reset: function (e) {
233
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
234
- },
235
- stop: function () {
236
- this.done = !0;
237
- var t = this.tryEntries[0].completion;
238
- if ("throw" === t.type) throw t.arg;
239
- return this.rval;
240
- },
241
- dispatchException: function (e) {
242
- if (this.done) throw e;
243
- var r = this;
244
- function handle(n, o) {
245
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
246
- }
247
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
248
- var i = this.tryEntries[o],
249
- a = i.completion;
250
- if ("root" === i.tryLoc) return handle("end");
251
- if (i.tryLoc <= this.prev) {
252
- var c = n.call(i, "catchLoc"),
253
- u = n.call(i, "finallyLoc");
254
- if (c && u) {
255
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
256
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
257
- } else if (c) {
258
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
259
- } else {
260
- if (!u) throw new Error("try statement without catch or finally");
261
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
262
- }
263
- }
264
- }
265
- },
266
- abrupt: function (t, e) {
267
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
268
- var o = this.tryEntries[r];
269
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
270
- var i = o;
271
- break;
272
- }
273
- }
274
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
275
- var a = i ? i.completion : {};
276
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
277
- },
278
- complete: function (t, e) {
279
- if ("throw" === t.type) throw t.arg;
280
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
281
- },
282
- finish: function (t) {
283
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
284
- var r = this.tryEntries[e];
285
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
286
- }
287
- },
288
- catch: function (t) {
289
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
290
- var r = this.tryEntries[e];
291
- if (r.tryLoc === t) {
292
- var n = r.completion;
293
- if ("throw" === n.type) {
294
- var o = n.arg;
295
- resetTryEntry(r);
296
- }
297
- return o;
298
- }
299
- }
300
- throw new Error("illegal catch attempt");
301
- },
302
- delegateYield: function (e, r, n) {
303
- return this.delegate = {
304
- iterator: values(e),
305
- resultName: r,
306
- nextLoc: n
307
- }, "next" === this.method && (this.arg = t), y;
308
- }
309
- }, e;
310
- }
311
-
312
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
313
- try {
314
- var info = gen[key](arg);
315
- var value = info.value;
316
- } catch (error) {
317
- reject(error);
318
- return;
319
- }
320
- if (info.done) {
321
- resolve(value);
322
- } else {
323
- Promise.resolve(value).then(_next, _throw);
324
- }
325
- }
326
- function _asyncToGenerator(fn) {
327
- return function () {
328
- var self = this,
329
- args = arguments;
330
- return new Promise(function (resolve, reject) {
331
- var gen = fn.apply(self, args);
332
- function _next(value) {
333
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
334
- }
335
- function _throw(err) {
336
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
337
- }
338
- _next(undefined);
339
- });
340
- };
341
- }
342
-
343
11
  var initValNextAppRouter = function initValNextAppRouter(valModules, config, nextConfig) {
344
12
  var route = "/api/val"; // TODO: get from config
345
13
  var coreVersion = Internal.VERSION.core;
@@ -395,7 +63,7 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
395
63
  }, _callee3);
396
64
  }))();
397
65
  }
398
- }), function (valRes) {
66
+ }, nextConfig.formatter), function (valRes) {
399
67
  var headersInit = undefined;
400
68
  var valResHeaders = "headers" in valRes && valRes.headers || {};
401
69
  for (var key in valResHeaders) {
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValContext-37ea12ae.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValContext-37ea12ae.cjs.dev.js");
7
- }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValNextProvider-676d6cb8.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValNextProvider-676d6cb8.cjs.dev.js");
7
- }