@zibby/core 0.5.19 → 0.5.21

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.
@@ -1 +1 @@
1
- import{z as o}from"zod";import{zodToJsonSchema as n}from"zod-to-json-schema";function c(t,r={target:"openApi3"}){if(!t)return null;if(typeof o?.toJSONSchema=="function")try{return o.toJSONSchema(t)}catch{}try{return n(t,r)}catch{return null}}export{c as zodToJson};
1
+ import{z as y}from"zod";import{zodToJsonSchema as o}from"zod-to-json-schema";function u(t){if(!t||typeof t!="object")return t;if(Array.isArray(t.type))return t.type.includes("null")||(t.type=[...t.type,"null"]),t;if(typeof t.type=="string")return t.type=[t.type,"null"],t;for(let r of["anyOf","oneOf"])if(Array.isArray(t[r]))return t[r].some(f=>f&&f.type==="null")||(t[r]=[...t[r],{type:"null"}]),t;return{anyOf:[t,{type:"null"}]}}function e(t){if(!t||typeof t!="object")return t;for(let r of["$defs","definitions"])if(t[r]&&typeof t[r]=="object")for(let f of Object.keys(t[r]))t[r][f]=e(t[r][f]);for(let r of["anyOf","oneOf","allOf"])Array.isArray(t[r])&&(t[r]=t[r].map(e));if(t.properties&&typeof t.properties=="object"){t.additionalProperties=!1;let r=Object.keys(t.properties),f=new Set(Array.isArray(t.required)?t.required:[]);for(let i of r){let p=e(t.properties[i]);f.has(i)||(p=u(p)),t.properties[i]=p}t.required=r}return t.items&&(Array.isArray(t.items)?t.items=t.items.map(e):t.items=e(t.items)),t}function s(t,r={target:"openApi3"}){if(!t)return null;let f=r?.target==="openAi",i=null;if(typeof y?.toJSONSchema=="function")try{i=y.toJSONSchema(t)}catch{}if(!i)try{i=o(t,r)}catch{return null}if(f&&i)try{return e(i)}catch{return i}return i}export{s as zodToJson};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zibby/core",
3
- "version": "0.5.19",
3
+ "version": "0.5.21",
4
4
  "description": "Core test automation engine with multi-agent and multi-MCP support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",