@valbuild/next 0.87.2 → 0.87.4

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