@zenstackhq/server 3.6.1 → 3.6.3-beta.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.
- package/dist/nuxt.cjs +8 -389
- package/dist/nuxt.cjs.map +1 -1
- package/dist/nuxt.d.cts +3 -528
- package/dist/nuxt.d.mts +3 -528
- package/dist/nuxt.mjs +1 -382
- package/dist/nuxt.mjs.map +1 -1
- package/package.json +12 -8
package/dist/nuxt.mjs
CHANGED
|
@@ -1,386 +1,5 @@
|
|
|
1
1
|
import { t as logInternalError } from "./common-Cdj4rLFr.mjs";
|
|
2
|
-
|
|
3
|
-
const PLUS_RE = /\+/g;
|
|
4
|
-
function decode(text = "") {
|
|
5
|
-
try {
|
|
6
|
-
return decodeURIComponent("" + text);
|
|
7
|
-
} catch {
|
|
8
|
-
return "" + text;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
function decodeQueryKey(text) {
|
|
12
|
-
return decode(text.replace(PLUS_RE, " "));
|
|
13
|
-
}
|
|
14
|
-
function decodeQueryValue(text) {
|
|
15
|
-
return decode(text.replace(PLUS_RE, " "));
|
|
16
|
-
}
|
|
17
|
-
function parseQuery(parametersString = "") {
|
|
18
|
-
const object = /* @__PURE__ */ Object.create(null);
|
|
19
|
-
if (parametersString[0] === "?") parametersString = parametersString.slice(1);
|
|
20
|
-
for (const parameter of parametersString.split("&")) {
|
|
21
|
-
const s = parameter.match(/([^=]+)=?(.*)/) || [];
|
|
22
|
-
if (s.length < 2) continue;
|
|
23
|
-
const key = decodeQueryKey(s[1]);
|
|
24
|
-
if (key === "__proto__" || key === "constructor") continue;
|
|
25
|
-
const value = decodeQueryValue(s[2] || "");
|
|
26
|
-
if (object[key] === void 0) object[key] = value;
|
|
27
|
-
else if (Array.isArray(object[key])) object[key].push(value);
|
|
28
|
-
else object[key] = [object[key], value];
|
|
29
|
-
}
|
|
30
|
-
return object;
|
|
31
|
-
}
|
|
32
|
-
const PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/;
|
|
33
|
-
const PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/;
|
|
34
|
-
const PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/;
|
|
35
|
-
function hasProtocol(inputString, opts = {}) {
|
|
36
|
-
if (typeof opts === "boolean") opts = { acceptRelative: opts };
|
|
37
|
-
if (opts.strict) return PROTOCOL_STRICT_REGEX.test(inputString);
|
|
38
|
-
return PROTOCOL_REGEX.test(inputString) || (opts.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(inputString) : false);
|
|
39
|
-
}
|
|
40
|
-
function getQuery$1(input) {
|
|
41
|
-
return parseQuery(parseURL(input).search);
|
|
42
|
-
}
|
|
43
|
-
const protocolRelative = Symbol.for("ufo:protocolRelative");
|
|
44
|
-
function parseURL(input = "", defaultProto) {
|
|
45
|
-
const _specialProtoMatch = input.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);
|
|
46
|
-
if (_specialProtoMatch) {
|
|
47
|
-
const [, _proto, _pathname = ""] = _specialProtoMatch;
|
|
48
|
-
return {
|
|
49
|
-
protocol: _proto.toLowerCase(),
|
|
50
|
-
pathname: _pathname,
|
|
51
|
-
href: _proto + _pathname,
|
|
52
|
-
auth: "",
|
|
53
|
-
host: "",
|
|
54
|
-
search: "",
|
|
55
|
-
hash: ""
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
if (!hasProtocol(input, { acceptRelative: true })) return defaultProto ? parseURL(defaultProto + input) : parsePath(input);
|
|
59
|
-
const [, protocol = "", auth, hostAndPath = ""] = input.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [];
|
|
60
|
-
let [, host = "", path = ""] = hostAndPath.match(/([^#/?]*)(.*)?/) || [];
|
|
61
|
-
if (protocol === "file:") path = path.replace(/\/(?=[A-Za-z]:)/, "");
|
|
62
|
-
const { pathname, search, hash } = parsePath(path);
|
|
63
|
-
return {
|
|
64
|
-
protocol: protocol.toLowerCase(),
|
|
65
|
-
auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : "",
|
|
66
|
-
host,
|
|
67
|
-
pathname,
|
|
68
|
-
search,
|
|
69
|
-
hash,
|
|
70
|
-
[protocolRelative]: !protocol
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function parsePath(input = "") {
|
|
74
|
-
const [pathname = "", search = "", hash = ""] = (input.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
|
|
75
|
-
return {
|
|
76
|
-
pathname,
|
|
77
|
-
search,
|
|
78
|
-
hash
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region ../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs
|
|
83
|
-
const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
84
|
-
const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
85
|
-
const JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
|
|
86
|
-
function jsonParseTransform(key, value) {
|
|
87
|
-
if (key === "__proto__" || key === "constructor" && value && typeof value === "object" && "prototype" in value) {
|
|
88
|
-
warnKeyDropped(key);
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
return value;
|
|
92
|
-
}
|
|
93
|
-
function warnKeyDropped(key) {
|
|
94
|
-
console.warn(`[destr] Dropping "${key}" key to prevent prototype pollution.`);
|
|
95
|
-
}
|
|
96
|
-
function destr(value, options = {}) {
|
|
97
|
-
if (typeof value !== "string") return value;
|
|
98
|
-
if (value[0] === "\"" && value[value.length - 1] === "\"" && value.indexOf("\\") === -1) return value.slice(1, -1);
|
|
99
|
-
const _value = value.trim();
|
|
100
|
-
if (_value.length <= 9) switch (_value.toLowerCase()) {
|
|
101
|
-
case "true": return true;
|
|
102
|
-
case "false": return false;
|
|
103
|
-
case "undefined": return;
|
|
104
|
-
case "null": return null;
|
|
105
|
-
case "nan": return NaN;
|
|
106
|
-
case "infinity": return Number.POSITIVE_INFINITY;
|
|
107
|
-
case "-infinity": return Number.NEGATIVE_INFINITY;
|
|
108
|
-
}
|
|
109
|
-
if (!JsonSigRx.test(value)) {
|
|
110
|
-
if (options.strict) throw new SyntaxError("[destr] Invalid JSON");
|
|
111
|
-
return value;
|
|
112
|
-
}
|
|
113
|
-
try {
|
|
114
|
-
if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
|
|
115
|
-
if (options.strict) throw new Error("[destr] Possible prototype pollution");
|
|
116
|
-
return JSON.parse(value, jsonParseTransform);
|
|
117
|
-
}
|
|
118
|
-
return JSON.parse(value);
|
|
119
|
-
} catch (error) {
|
|
120
|
-
if (options.strict) throw error;
|
|
121
|
-
return value;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
126
|
-
function isPlainObject(value) {
|
|
127
|
-
if (value === null || typeof value !== "object") return false;
|
|
128
|
-
const prototype = Object.getPrototypeOf(value);
|
|
129
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
|
|
130
|
-
if (Symbol.iterator in value) return false;
|
|
131
|
-
if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
135
|
-
if (!isPlainObject(defaults)) return _defu(baseObject, {}, namespace, merger);
|
|
136
|
-
const object = Object.assign({}, defaults);
|
|
137
|
-
for (const key in baseObject) {
|
|
138
|
-
if (key === "__proto__" || key === "constructor") continue;
|
|
139
|
-
const value = baseObject[key];
|
|
140
|
-
if (value === null || value === void 0) continue;
|
|
141
|
-
if (merger && merger(object, key, value, namespace)) continue;
|
|
142
|
-
if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
|
|
143
|
-
else if (isPlainObject(value) && isPlainObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
144
|
-
else object[key] = value;
|
|
145
|
-
}
|
|
146
|
-
return object;
|
|
147
|
-
}
|
|
148
|
-
function createDefu(merger) {
|
|
149
|
-
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
150
|
-
}
|
|
151
|
-
createDefu();
|
|
152
|
-
createDefu((object, key, currentValue) => {
|
|
153
|
-
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
154
|
-
object[key] = currentValue(object[key]);
|
|
155
|
-
return true;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
createDefu((object, key, currentValue) => {
|
|
159
|
-
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
160
|
-
object[key] = currentValue(object[key]);
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
//#endregion
|
|
165
|
-
//#region ../../node_modules/.pnpm/h3@1.15.5/node_modules/h3/dist/index.mjs
|
|
166
|
-
function hasProp(obj, prop) {
|
|
167
|
-
try {
|
|
168
|
-
return prop in obj;
|
|
169
|
-
} catch {
|
|
170
|
-
return false;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
var H3Error = class extends Error {
|
|
174
|
-
static __h3_error__ = true;
|
|
175
|
-
statusCode = 500;
|
|
176
|
-
fatal = false;
|
|
177
|
-
unhandled = false;
|
|
178
|
-
statusMessage;
|
|
179
|
-
data;
|
|
180
|
-
cause;
|
|
181
|
-
constructor(message, opts = {}) {
|
|
182
|
-
super(message, opts);
|
|
183
|
-
if (opts.cause && !this.cause) this.cause = opts.cause;
|
|
184
|
-
}
|
|
185
|
-
toJSON() {
|
|
186
|
-
const obj = {
|
|
187
|
-
message: this.message,
|
|
188
|
-
statusCode: sanitizeStatusCode(this.statusCode, 500)
|
|
189
|
-
};
|
|
190
|
-
if (this.statusMessage) obj.statusMessage = sanitizeStatusMessage(this.statusMessage);
|
|
191
|
-
if (this.data !== void 0) obj.data = this.data;
|
|
192
|
-
return obj;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
function createError(input) {
|
|
196
|
-
if (typeof input === "string") return new H3Error(input);
|
|
197
|
-
if (isError(input)) return input;
|
|
198
|
-
const err = new H3Error(input.message ?? input.statusMessage ?? "", { cause: input.cause || input });
|
|
199
|
-
if (hasProp(input, "stack")) try {
|
|
200
|
-
Object.defineProperty(err, "stack", { get() {
|
|
201
|
-
return input.stack;
|
|
202
|
-
} });
|
|
203
|
-
} catch {
|
|
204
|
-
try {
|
|
205
|
-
err.stack = input.stack;
|
|
206
|
-
} catch {}
|
|
207
|
-
}
|
|
208
|
-
if (input.data) err.data = input.data;
|
|
209
|
-
if (input.statusCode) err.statusCode = sanitizeStatusCode(input.statusCode, err.statusCode);
|
|
210
|
-
else if (input.status) err.statusCode = sanitizeStatusCode(input.status, err.statusCode);
|
|
211
|
-
if (input.statusMessage) err.statusMessage = input.statusMessage;
|
|
212
|
-
else if (input.statusText) err.statusMessage = input.statusText;
|
|
213
|
-
if (err.statusMessage) {
|
|
214
|
-
const originalMessage = err.statusMessage;
|
|
215
|
-
if (sanitizeStatusMessage(err.statusMessage) !== originalMessage) console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.");
|
|
216
|
-
}
|
|
217
|
-
if (input.fatal !== void 0) err.fatal = input.fatal;
|
|
218
|
-
if (input.unhandled !== void 0) err.unhandled = input.unhandled;
|
|
219
|
-
return err;
|
|
220
|
-
}
|
|
221
|
-
function isError(input) {
|
|
222
|
-
return input?.constructor?.__h3_error__ === true;
|
|
223
|
-
}
|
|
224
|
-
function getQuery(event) {
|
|
225
|
-
return getQuery$1(event.path || "");
|
|
226
|
-
}
|
|
227
|
-
function getRouterParams(event, opts = {}) {
|
|
228
|
-
let params = event.context.params || {};
|
|
229
|
-
if (opts.decode) {
|
|
230
|
-
params = { ...params };
|
|
231
|
-
for (const key in params) params[key] = decode(params[key]);
|
|
232
|
-
}
|
|
233
|
-
return params;
|
|
234
|
-
}
|
|
235
|
-
function isMethod(event, expected, allowHead) {
|
|
236
|
-
if (allowHead && event.method === "HEAD") return true;
|
|
237
|
-
if (typeof expected === "string") {
|
|
238
|
-
if (event.method === expected) return true;
|
|
239
|
-
} else if (expected.includes(event.method)) return true;
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
function assertMethod(event, expected, allowHead) {
|
|
243
|
-
if (!isMethod(event, expected, allowHead)) throw createError({
|
|
244
|
-
statusCode: 405,
|
|
245
|
-
statusMessage: "HTTP method is not allowed."
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
const RawBodySymbol = Symbol.for("h3RawBody");
|
|
249
|
-
const ParsedBodySymbol = Symbol.for("h3ParsedBody");
|
|
250
|
-
const PayloadMethods$1 = [
|
|
251
|
-
"PATCH",
|
|
252
|
-
"POST",
|
|
253
|
-
"PUT",
|
|
254
|
-
"DELETE"
|
|
255
|
-
];
|
|
256
|
-
function readRawBody(event, encoding = "utf8") {
|
|
257
|
-
assertMethod(event, PayloadMethods$1);
|
|
258
|
-
const _rawBody = event._requestBody || event.web?.request?.body || event.node.req[RawBodySymbol] || event.node.req.rawBody || event.node.req.body;
|
|
259
|
-
if (_rawBody) {
|
|
260
|
-
const promise2 = Promise.resolve(_rawBody).then((_resolved) => {
|
|
261
|
-
if (Buffer.isBuffer(_resolved)) return _resolved;
|
|
262
|
-
if (typeof _resolved.pipeTo === "function") return new Promise((resolve, reject) => {
|
|
263
|
-
const chunks = [];
|
|
264
|
-
_resolved.pipeTo(new WritableStream({
|
|
265
|
-
write(chunk) {
|
|
266
|
-
chunks.push(chunk);
|
|
267
|
-
},
|
|
268
|
-
close() {
|
|
269
|
-
resolve(Buffer.concat(chunks));
|
|
270
|
-
},
|
|
271
|
-
abort(reason) {
|
|
272
|
-
reject(reason);
|
|
273
|
-
}
|
|
274
|
-
})).catch(reject);
|
|
275
|
-
});
|
|
276
|
-
else if (typeof _resolved.pipe === "function") return new Promise((resolve, reject) => {
|
|
277
|
-
const chunks = [];
|
|
278
|
-
_resolved.on("data", (chunk) => {
|
|
279
|
-
chunks.push(chunk);
|
|
280
|
-
}).on("end", () => {
|
|
281
|
-
resolve(Buffer.concat(chunks));
|
|
282
|
-
}).on("error", reject);
|
|
283
|
-
});
|
|
284
|
-
if (_resolved.constructor === Object) return Buffer.from(JSON.stringify(_resolved));
|
|
285
|
-
if (_resolved instanceof URLSearchParams) return Buffer.from(_resolved.toString());
|
|
286
|
-
if (_resolved instanceof FormData) return new Response(_resolved).bytes().then((uint8arr) => Buffer.from(uint8arr));
|
|
287
|
-
return Buffer.from(_resolved);
|
|
288
|
-
});
|
|
289
|
-
return encoding ? promise2.then((buff) => buff.toString(encoding)) : promise2;
|
|
290
|
-
}
|
|
291
|
-
if (!Number.parseInt(event.node.req.headers["content-length"] || "") && !/\bchunked\b/i.test(String(event.node.req.headers["transfer-encoding"] ?? ""))) return Promise.resolve(void 0);
|
|
292
|
-
const promise = event.node.req[RawBodySymbol] = new Promise((resolve, reject) => {
|
|
293
|
-
const bodyData = [];
|
|
294
|
-
event.node.req.on("error", (err) => {
|
|
295
|
-
reject(err);
|
|
296
|
-
}).on("data", (chunk) => {
|
|
297
|
-
bodyData.push(chunk);
|
|
298
|
-
}).on("end", () => {
|
|
299
|
-
resolve(Buffer.concat(bodyData));
|
|
300
|
-
});
|
|
301
|
-
});
|
|
302
|
-
return encoding ? promise.then((buff) => buff.toString(encoding)) : promise;
|
|
303
|
-
}
|
|
304
|
-
async function readBody(event, options = {}) {
|
|
305
|
-
const request = event.node.req;
|
|
306
|
-
if (hasProp(request, ParsedBodySymbol)) return request[ParsedBodySymbol];
|
|
307
|
-
const contentType = request.headers["content-type"] || "";
|
|
308
|
-
const body = await readRawBody(event);
|
|
309
|
-
let parsed;
|
|
310
|
-
if (contentType === "application/json") parsed = _parseJSON(body, options.strict ?? true);
|
|
311
|
-
else if (contentType.startsWith("application/x-www-form-urlencoded")) parsed = _parseURLEncodedBody(body);
|
|
312
|
-
else if (contentType.startsWith("text/")) parsed = body;
|
|
313
|
-
else parsed = _parseJSON(body, options.strict ?? false);
|
|
314
|
-
request[ParsedBodySymbol] = parsed;
|
|
315
|
-
return parsed;
|
|
316
|
-
}
|
|
317
|
-
function _parseJSON(body = "", strict) {
|
|
318
|
-
if (!body) return;
|
|
319
|
-
try {
|
|
320
|
-
return destr(body, { strict });
|
|
321
|
-
} catch {
|
|
322
|
-
throw createError({
|
|
323
|
-
statusCode: 400,
|
|
324
|
-
statusMessage: "Bad Request",
|
|
325
|
-
message: "Invalid JSON body"
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
function _parseURLEncodedBody(body) {
|
|
330
|
-
const form = new URLSearchParams(body);
|
|
331
|
-
const parsedForm = /* @__PURE__ */ Object.create(null);
|
|
332
|
-
for (const [key, value] of form.entries()) if (hasProp(parsedForm, key)) {
|
|
333
|
-
if (!Array.isArray(parsedForm[key])) parsedForm[key] = [parsedForm[key]];
|
|
334
|
-
parsedForm[key].push(value);
|
|
335
|
-
} else parsedForm[key] = value;
|
|
336
|
-
return parsedForm;
|
|
337
|
-
}
|
|
338
|
-
const DISALLOWED_STATUS_CHARS = /[^\u0009\u0020-\u007E]/g;
|
|
339
|
-
function sanitizeStatusMessage(statusMessage = "") {
|
|
340
|
-
return statusMessage.replace(DISALLOWED_STATUS_CHARS, "");
|
|
341
|
-
}
|
|
342
|
-
function sanitizeStatusCode(statusCode, defaultStatusCode = 200) {
|
|
343
|
-
if (!statusCode) return defaultStatusCode;
|
|
344
|
-
if (typeof statusCode === "string") statusCode = Number.parseInt(statusCode, 10);
|
|
345
|
-
if (statusCode < 100 || statusCode > 999) return defaultStatusCode;
|
|
346
|
-
return statusCode;
|
|
347
|
-
}
|
|
348
|
-
function setResponseStatus(event, code, text) {
|
|
349
|
-
if (code) event.node.res.statusCode = sanitizeStatusCode(code, event.node.res.statusCode);
|
|
350
|
-
if (text) event.node.res.statusMessage = sanitizeStatusMessage(text);
|
|
351
|
-
}
|
|
352
|
-
function defineEventHandler(handler) {
|
|
353
|
-
if (typeof handler === "function") {
|
|
354
|
-
handler.__is_handler__ = true;
|
|
355
|
-
return handler;
|
|
356
|
-
}
|
|
357
|
-
const _hooks = {
|
|
358
|
-
onRequest: _normalizeArray(handler.onRequest),
|
|
359
|
-
onBeforeResponse: _normalizeArray(handler.onBeforeResponse)
|
|
360
|
-
};
|
|
361
|
-
const _handler = (event) => {
|
|
362
|
-
return _callHandler(event, handler.handler, _hooks);
|
|
363
|
-
};
|
|
364
|
-
_handler.__is_handler__ = true;
|
|
365
|
-
_handler.__resolve__ = handler.handler.__resolve__;
|
|
366
|
-
_handler.__websocket__ = handler.websocket;
|
|
367
|
-
return _handler;
|
|
368
|
-
}
|
|
369
|
-
function _normalizeArray(input) {
|
|
370
|
-
return input ? Array.isArray(input) ? input : [input] : void 0;
|
|
371
|
-
}
|
|
372
|
-
async function _callHandler(event, handler, hooks) {
|
|
373
|
-
if (hooks.onRequest) for (const hook of hooks.onRequest) {
|
|
374
|
-
await hook(event);
|
|
375
|
-
if (event.handled) return;
|
|
376
|
-
}
|
|
377
|
-
const response = { body: await handler(event) };
|
|
378
|
-
if (hooks.onBeforeResponse) for (const hook of hooks.onBeforeResponse) await hook(event, response);
|
|
379
|
-
return response.body;
|
|
380
|
-
}
|
|
381
|
-
globalThis.Headers;
|
|
382
|
-
globalThis.Response;
|
|
383
|
-
//#endregion
|
|
2
|
+
import { defineEventHandler, getQuery, getRouterParams, readBody, setResponseStatus } from "h3";
|
|
384
3
|
//#region src/adapter/nuxt/handler.ts
|
|
385
4
|
function createEventHandler(options) {
|
|
386
5
|
return defineEventHandler(async (event) => {
|