@nullix/zod-mongoose-studio 1.0.3 → 1.0.6
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{D472ZGCq.js → 0J_bLG6U.js} +1 -1
- package/.output/public/_nuxt/{D6eI43JV.js → 5KLjKHc1.js} +1 -1
- package/.output/public/_nuxt/{oZMtAKNj.js → B2UrsJHg.js} +1 -1
- package/.output/public/_nuxt/{CTD5tNSk.js → BC5hGokz.js} +1 -1
- package/.output/public/_nuxt/{8_3h5why.js → BJwN20Xm.js} +1 -1
- package/.output/public/_nuxt/{BrfF4KzT.js → BMgDPqps.js} +1 -1
- package/.output/public/_nuxt/{BTcmLiB7.js → B_sGF2qN.js} +1 -1
- package/.output/public/_nuxt/{DsRDu99v.js → BeaJ7I-K.js} +3 -3
- package/.output/public/_nuxt/{BZDFdfSq.js → BkE1sm_1.js} +1 -1
- package/.output/public/_nuxt/{DxYFEi7D.js → CADbZwE5.js} +1 -1
- package/.output/public/_nuxt/{Fx12nFY3.js → CB0WRoVi.js} +1 -1
- package/.output/public/_nuxt/{CWwPyxYn.js → CCh0PVV0.js} +1 -1
- package/.output/public/_nuxt/{opoY2rTZ.js → Cr0GW7rA.js} +1 -1
- package/.output/public/_nuxt/{23WKyq2p.js → DJe7Wxdv.js} +1 -1
- package/.output/public/_nuxt/{C04RIcgt.js → DRBrUaE5.js} +1 -1
- package/.output/public/_nuxt/{tyl0uonn.js → DV2n9B6m.js} +1 -1
- package/.output/public/_nuxt/{Bx1gX3vK.js → DVD-jGiv.js} +1 -1
- package/.output/public/_nuxt/Dk9qGA5X.js +59 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/1004ea5f-2e46-4ad9-827e-5f3d7460cbdf.json +1 -0
- package/.output/public/_nuxt/{CTHOxgmz.js → koEZfutw.js} +3 -3
- package/.output/public/_nuxt/{BJf7ga3-.js → r6LdR7DN.js} +1 -1
- package/.output/public/_nuxt/{zob_mQgw.js → rEfOp38p.js} +1 -1
- package/.output/public/zodmongoose.svg +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/{index-sIfHdQK9.mjs → index-Dnrh1ePF.mjs} +29 -6
- package/.output/server/chunks/build/index-Dnrh1ePF.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +6 -6
- package/.output/server/chunks/nitro/nitro.mjs +325 -325
- package/.output/server/chunks/routes/api/parse.post.mjs +44 -8
- package/.output/server/chunks/routes/api/parse.post.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/README.md +1 -1
- package/app/components/ZodMongooseStudio.vue +18 -3
- package/package.json +2 -2
- package/server/api/parse.post.ts +54 -4
- package/.output/public/_nuxt/Cw4shX_N.js +0 -59
- package/.output/public/_nuxt/builds/meta/6a58d38f-6d39-4d99-9bc8-b627d0ee0cc6.json +0 -1
- package/.output/server/chunks/build/index-sIfHdQK9.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, mergeProps, withCtx, createTextVNode, useSlots, computed, unref, renderSlot, openBlock, createBlock, createCommentVNode, toDisplayString, useSSRContext } from 'vue';
|
|
2
2
|
import { ssrRenderComponent, ssrRenderAttrs, ssrRenderSlot, ssrRenderClass, ssrInterpolate } from 'vue/server-renderer';
|
|
3
|
-
import { _ as _export_sfc, h as
|
|
3
|
+
import { _ as _export_sfc, h as _sfc_main$8, i as __nuxt_component_2$1, j as useRuntimeConfig, b as useAppConfig, c as useComponentUI, d as useFieldGroup, e as useComponentIcons, t as tv, P as Primitive, f as _sfc_main$d, g as _sfc_main$b } from './server.mjs';
|
|
4
4
|
import '../nitro/nitro.mjs';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import 'node:https';
|
|
@@ -387,6 +387,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
387
387
|
let debounceTimer;
|
|
388
388
|
const config = useRuntimeConfig();
|
|
389
389
|
const isLocalMode = ref(config.public.isLocalMode);
|
|
390
|
+
const isDocsMode = ref(config.public.isDocsMode);
|
|
390
391
|
const sourceCode = ref(`import { z } from 'zod/v4';
|
|
391
392
|
import { extractMongooseDef, toMongooseSchema } from '@nullix/zod-mongoose';
|
|
392
393
|
|
|
@@ -423,14 +424,18 @@ ${error.data?.message || error.message}`;
|
|
|
423
424
|
watch(
|
|
424
425
|
sourceCode,
|
|
425
426
|
() => {
|
|
427
|
+
if (isDocsMode.value) return;
|
|
426
428
|
clearTimeout(debounceTimer);
|
|
427
429
|
debounceTimer = setTimeout(handleCompile, 600);
|
|
428
|
-
}
|
|
429
|
-
{ immediate: true }
|
|
430
|
+
}
|
|
430
431
|
);
|
|
432
|
+
if (isDocsMode.value) {
|
|
433
|
+
handleCompile();
|
|
434
|
+
}
|
|
431
435
|
return (_ctx, _push, _parent, _attrs) => {
|
|
432
436
|
const _component_UBadge = _sfc_main$2;
|
|
433
|
-
const
|
|
437
|
+
const _component_UButton = _sfc_main$8;
|
|
438
|
+
const _component_ClientOnly = __nuxt_component_2$1;
|
|
434
439
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "h-screen flex flex-col bg-gray-50 dark:bg-gray-950" }, _attrs))}><header class="bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-800 py-3 px-4 flex justify-between items-center shrink-0"><div class="flex items-center gap-4"><h1 class="text-xl font-bold text-primary"> @nullix/zod-mongoose Studio </h1>`);
|
|
435
440
|
if (isLocalMode.value) {
|
|
436
441
|
_push(ssrRenderComponent(_component_UBadge, {
|
|
@@ -466,7 +471,25 @@ ${error.data?.message || error.message}`;
|
|
|
466
471
|
}, _parent));
|
|
467
472
|
}
|
|
468
473
|
_push(`</div><div class="flex items-center gap-2">`);
|
|
469
|
-
if (
|
|
474
|
+
if (isDocsMode.value) {
|
|
475
|
+
_push(ssrRenderComponent(_component_UButton, {
|
|
476
|
+
icon: "i-heroicons-play-solid",
|
|
477
|
+
color: "primary",
|
|
478
|
+
loading: isCompiling.value,
|
|
479
|
+
onClick: handleCompile
|
|
480
|
+
}, {
|
|
481
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
482
|
+
if (_push2) {
|
|
483
|
+
_push2(` Run `);
|
|
484
|
+
} else {
|
|
485
|
+
return [
|
|
486
|
+
createTextVNode(" Run ")
|
|
487
|
+
];
|
|
488
|
+
}
|
|
489
|
+
}),
|
|
490
|
+
_: 1
|
|
491
|
+
}, _parent));
|
|
492
|
+
} else if (isCompiling.value) {
|
|
470
493
|
_push(`<span class="text-sm text-gray-500">Transforming...</span>`);
|
|
471
494
|
} else {
|
|
472
495
|
_push(`<!---->`);
|
|
@@ -502,4 +525,4 @@ _sfc_main.setup = (props, ctx) => {
|
|
|
502
525
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
503
526
|
|
|
504
527
|
export { index as default };
|
|
505
|
-
//# sourceMappingURL=index-
|
|
528
|
+
//# sourceMappingURL=index-Dnrh1ePF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Dnrh1ePF.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/index-Dnrh1ePF.js"],"names":["_sfc_main$3","_sfc_main$4","_sfc_main$5","__nuxt_component_2"],"mappings":"","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import { defineComponent, h, computed, inject, toValue as toValue$1, mergeProps, unref, createVNode, resolveDynamicComponent, ref, watch, withCtx, renderSlot, openBlock, createBlock, toDisplayString, shallowRef, getCurrentInstance, provide, cloneVNode, createElementBlock, Comment, resolveComponent, toRef as toRef$1, camelize, useModel, createTextVNode,
|
|
1
|
+
import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import { defineComponent, h, computed, inject, toValue as toValue$1, mergeProps, unref, createVNode, resolveDynamicComponent, ref, watch, withCtx, renderSlot, openBlock, createBlock, toDisplayString, useSlots, createCommentVNode, shallowRef, getCurrentInstance, provide, cloneVNode, createElementBlock, Comment, resolveComponent, toRef as toRef$1, camelize, useModel, createTextVNode, mergeModels, hasInjectionContext, Fragment, onServerPrefetch, toRefs, isRef, reactive, nextTick, defineAsyncComponent, useSSRContext, Suspense, createApp, readonly, customRef, renderList, useId, shallowReactive, onErrorCaptured, effectScope, useTemplateRef, withModifiers, normalizeProps, guardReactiveProps, watchEffect, normalizeStyle, getCurrentScope, markRaw, Teleport, shallowReadonly, toHandlerKey, onScopeDispose, isReadonly, isShallow, isReactive, toRaw } from 'vue';
|
|
2
2
|
import { l as klona, m as defu, n as parseQuery$1, o as defuFn, q as hasProtocol, j as joinURL, s as parseURL$1, t as encodePath$1, v as decodePath, w as withQuery, x as isScriptProtocol, y as getContext, z as withTrailingSlash, A as withoutTrailingSlash, B as sanitizeStatusCode, $ as $fetch$1, C as baseURL, c as createError$1, D as executeAsync } from '../nitro/nitro.mjs';
|
|
3
3
|
import colors from 'tailwindcss/colors';
|
|
4
4
|
import { ssrRenderComponent, ssrRenderVNode, ssrRenderSlot, ssrRenderClass, ssrInterpolate, ssrRenderList, ssrRenderSuspense, ssrRenderStyle } from 'vue/server-renderer';
|
|
@@ -1965,7 +1965,7 @@ const _routes = [
|
|
|
1965
1965
|
{
|
|
1966
1966
|
name: "index",
|
|
1967
1967
|
path: "/",
|
|
1968
|
-
component: () => import('./index-
|
|
1968
|
+
component: () => import('./index-Dnrh1ePF.mjs')
|
|
1969
1969
|
}
|
|
1970
1970
|
];
|
|
1971
1971
|
const ROUTE_KEY_PARENTHESES_RE = /(:\w+)\([^)]+\)/g;
|
|
@@ -10837,14 +10837,14 @@ const NuxtIconCss = /* @__PURE__ */ defineComponent({
|
|
|
10837
10837
|
return () => h("span", { class: ["iconify", cssClass.value] });
|
|
10838
10838
|
}
|
|
10839
10839
|
});
|
|
10840
|
-
const __nuxt_component_1
|
|
10840
|
+
const __nuxt_component_1 = defineComponent({
|
|
10841
10841
|
name: "ServerPlaceholder",
|
|
10842
10842
|
render() {
|
|
10843
10843
|
return createElementBlock("div");
|
|
10844
10844
|
}
|
|
10845
10845
|
});
|
|
10846
10846
|
const clientOnlySymbol = /* @__PURE__ */ Symbol.for("nuxt:client-only");
|
|
10847
|
-
const
|
|
10847
|
+
const __nuxt_component_2$1 = defineComponent({
|
|
10848
10848
|
name: "ClientOnly",
|
|
10849
10849
|
inheritAttrs: false,
|
|
10850
10850
|
props: ["fallback", "placeholder", "placeholderTag", "fallbackTag"],
|
|
@@ -14446,7 +14446,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
14446
14446
|
const _sfc_main$2 = {};
|
|
14447
14447
|
function _sfc_ssrRender(_ctx, _push, _parent, _attrs) {
|
|
14448
14448
|
const _component_UApp = __nuxt_component_0;
|
|
14449
|
-
const _component_NuxtRouteAnnouncer = __nuxt_component_1
|
|
14449
|
+
const _component_NuxtRouteAnnouncer = __nuxt_component_1;
|
|
14450
14450
|
const _component_NuxtPage = __nuxt_component_2;
|
|
14451
14451
|
_push(ssrRenderComponent(_component_UApp, _attrs, {
|
|
14452
14452
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
@@ -14566,5 +14566,5 @@ let entry;
|
|
|
14566
14566
|
}
|
|
14567
14567
|
const entry_default = ((ssrContext) => entry(ssrContext));
|
|
14568
14568
|
|
|
14569
|
-
export { Primitive as P, _export_sfc as _, __nuxt_component_0$1 as a, useAppConfig as b, useComponentUI as c, useFieldGroup as d, entry_default as default, useComponentIcons as e, _sfc_main$d as f, _sfc_main$b as g,
|
|
14569
|
+
export { Primitive as P, _export_sfc as _, __nuxt_component_0$1 as a, useAppConfig as b, useComponentUI as c, useFieldGroup as d, entry_default as default, useComponentIcons as e, _sfc_main$d as f, _sfc_main$b as g, _sfc_main$8 as h, __nuxt_component_2$1 as i, useRuntimeConfig as j, tv as t, useHead as u };
|
|
14570
14570
|
//# sourceMappingURL=server.mjs.map
|