Lines 209-249javascript
213})`,valibot:`import openapi from '@elysiajs/openapi'
214import { toJsonSchema } from '@valibot/to-json-schema'
218 valibot: toJsonSchema
220})`,effect:`import { JSONSchema } from 'effect'
224 effect: JSONSchema.make
226})`},O9={},U2=(Z)=>{if(Z.length===0)return{schema:void 0,notObjects:[]};if(Z.length===1)return Z[0].type==="object"?{schema:Z[0],notObjects:[]}:{schema:void 0,notObjects:Z};let J,Y=[],w=!1,W=!1;for(let z of Z){if(!z)continue;if(z.type!=="object"){Y.push(z);continue}if("additionalProperties"in z){if(z.additionalProperties===!0)w=!0;else if(z.additionalProperties===!1)W=!0}if(!J){J=z;continue}J={...J,...z,properties:{...J.properties,...z.properties},required:[...J?.required??[],...z.required??[]]}}if(J){if(J.required)J.required=[...new Set(J.required)];if(W)J.additionalProperties=!1;else if(w)J. ...
227`),console.warn(KY.zod4);else O9.zod3=!0,console.warn(`For Zod v3, please install zod-to-json-schema package and use it like this:
228`),console.warn(KY.zod3);break;case"valibot":if(O9.valibot)break;O9.valibot=!0,console.warn("[@elysiajs/openapi] Valibot require a separate package for JSON Schema conversion"),console.warn(`Please install @valibot/to-json-schema package and use it like this:
229`),console.warn(KY.valibot);break;case"effect":if(O9.effect)break;O9.effect=!0,console.warn("[@elysiajs/openapi] Effect Schema doesn't provide JSON Schema method on the schema"),console.warn(`please provide JSONSchema from 'effect' package as follows:
230`),console.warn(KY.effect);break}if(w==="arktype")return V9(Z?.toJsonSchema?.());return V9(Z.toJSONSchema?.()??Z?.toJsonSchema?.())}catch(W){console.warn(W)}},V9=(Z)=>{if
231
LowEval
Package source references a known benign dynamic code generation pattern.
lib/index.jsView on unpkg · L229 232Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let X of Z.seen.entries()){let Q=X[1];if(J===X[0]){z(X);continue}if(Z.external){let H=Z.external.registry.get(X[
233`)){let z=W.indexOf(QG);if(z<0)continue;let X=W.slice(z+QG.length).trim();if(!X)continue;try{let Q=JSON.parse(X);if(!R1(Q)){w++;continue}if(HG(Q.message)){Y++;continue}J.push(Q)}catch{w++}}return{events:J,ignored:Y,parseErrors:w}}function f1(Z){return`${Z.hostname}:${Z.pid}:${Z.id}:${Z.time}`}function h1(Z,J){let Y=Date.parse(Z.time),w=Date.parse(J.time);if(Y!==w)return Y-w;if(Z.hostname!==J.hostname)return Z.hostname.localeCompare(J.hostname);if(Z.pid!==J.pid)return Z.pid-J.pid;return Z.id-J.id}async function g1(){let Z=b1(),J=_1(),Y=[],w=0,W=0;for(let z of Z){let X=await k1(z,J);if(!X)contin ...
234if redis.call("GET", KEYS[1]) == ARGV[1] then
235 return redis.call("DEL", KEYS[1])
238`;async function FH({key:Z,onError:J,ttlSeconds:Y}){let w=DL();try{let W=await OH($w.send("SET",[Z,w,"EX",String(Y),"NX"]));return{acquired:
239Originating from:`;function _8(Z,J){if(!Z||!Z.stack||!J)return;let Y=J.substring(J.indexOf(`
240`)+1),w=Z.stack.indexOf(ZB),W=w>=0?Z.stack.substring(0,w):Z.stack;Z.stack=`${W}${ZB}
241${Y}`}class D0{getClientName(){throw Error("getClientName not implemented.")}makeRequest(Z,J,Y,w,W,z,X,Q){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let Z=TypeError(D0.TIMEOUT_ERROR_CODE);return Z.code=D0.TIMEOUT_ERROR_CODE,Z}}D0.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];D0.TIMEOUT_ERROR_CODE="ETIMEDOUT";class k8{constructor(Z,J){this._statusCode=Z,this._headers=J}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream(Z){throw Error("toStream not implemented.")}toJS ...
242Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature`,E=L?`
244Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!C){if(A)throw new t0(O,B,{message:`Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead.
245Signature verification is impossible without access to the original signed material.
247`+E});throw new t0(O,B,{message:`No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
248 If a webhook request is being forwarded by a third-party tool, ensure that the exact request body, including JSON formatting and new line style, is preserved.
Long lines were clipped for display.