@nullix/zod-mongoose-studio 0.0.1 → 1.0.3
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/{Dcm9cKUX.js → 23WKyq2p.js} +1 -1
- package/.output/public/_nuxt/{JqRWe2rp.js → 8_3h5why.js} +1 -1
- package/.output/public/_nuxt/{DIpCSwC3.js → BJf7ga3-.js} +1 -1
- package/.output/public/_nuxt/{CpO_ztTX.js → BTcmLiB7.js} +1 -1
- package/.output/public/_nuxt/{BcvAzS8a.js → BZDFdfSq.js} +1 -1
- package/.output/public/_nuxt/{CMQZ64NL.js → BrfF4KzT.js} +1 -1
- package/.output/public/_nuxt/{Be1F0pOV.js → Bx1gX3vK.js} +1 -1
- package/.output/public/_nuxt/{B2KnRiWG.js → C04RIcgt.js} +1 -1
- package/.output/public/_nuxt/{BKILRCQU.js → CTD5tNSk.js} +1 -1
- package/.output/public/_nuxt/{Cw6BJv9p.js → CTHOxgmz.js} +3 -3
- package/.output/public/_nuxt/{Dj0IH4Bd.js → CWwPyxYn.js} +1 -1
- package/.output/public/_nuxt/{cCwfBBRk.js → Cw4shX_N.js} +3 -3
- package/.output/public/_nuxt/{DWLU9E4j.js → D472ZGCq.js} +1 -1
- package/.output/public/_nuxt/{CtU7CIYd.js → D6eI43JV.js} +1 -1
- package/.output/public/_nuxt/DsRDu99v.js +33 -0
- package/.output/public/_nuxt/{DA_xQXIa.js → DxYFEi7D.js} +1 -1
- package/.output/public/_nuxt/{DARyPmWN.js → Fx12nFY3.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/6a58d38f-6d39-4d99-9bc8-b627d0ee0cc6.json +1 -0
- package/.output/public/_nuxt/error-404.64pZEiDn.css +1 -0
- package/.output/public/_nuxt/error-500.DHOpI0Ir.css +1 -0
- package/.output/public/_nuxt/{Dm9fPMHo.js → oZMtAKNj.js} +1 -1
- package/.output/public/_nuxt/{c_t8T7LW.js → opoY2rTZ.js} +1 -1
- package/.output/public/_nuxt/{XOt5hzHz.js → tyl0uonn.js} +1 -1
- package/.output/public/_nuxt/{DSgGBnBI.js → zob_mQgw.js} +1 -1
- package/.output/server/chunks/_/error-500.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/{error-404-C01T0Fs3.mjs → error-404-BN-7rNE4.mjs} +5 -4
- package/.output/server/chunks/build/error-404-BN-7rNE4.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.Byx46oLR.mjs +8 -0
- package/.output/server/chunks/build/error-404-styles.Byx46oLR.mjs.map +1 -0
- package/.output/server/chunks/build/{error-500-BxPzc_RO.mjs → error-500-DhIQ-2yt.mjs} +5 -4
- package/.output/server/chunks/build/error-500-DhIQ-2yt.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.BL3UT0Wa.mjs +8 -0
- package/.output/server/chunks/build/error-500-styles.BL3UT0Wa.mjs.map +1 -0
- package/.output/server/chunks/build/{index-Cm3PgUzj.mjs → index-sIfHdQK9.mjs} +3 -2
- package/.output/server/chunks/build/index-sIfHdQK9.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +218 -217
- package/.output/server/chunks/build/server.mjs.map +1 -1
- package/.output/server/chunks/build/styles.mjs +4 -4
- package/.output/server/chunks/nitro/nitro.mjs +392 -456
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs.map +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/node_modules/@esbuild/{darwin-arm64 → linux-x64}/bin/esbuild +0 -0
- package/.output/server/node_modules/@esbuild/{darwin-arm64 → linux-x64}/package.json +4 -4
- package/.output/server/node_modules/perfect-debounce/dist/index.mjs +89 -0
- package/.output/server/node_modules/perfect-debounce/package.json +41 -0
- package/.output/server/package.json +3 -2
- package/README.md +11 -4
- package/package.json +19 -3
- package/.output/public/_nuxt/DuqnmPmx.js +0 -33
- package/.output/public/_nuxt/builds/meta/5f8bfdb9-d523-4660-afb9-2a5faf918ee2.json +0 -1
- package/.output/public/_nuxt/error-404.ZEdaMr7r.css +0 -1
- package/.output/public/_nuxt/error-500.CPEQ7gwd.css +0 -1
- package/.output/server/chunks/build/error-404-C01T0Fs3.mjs.map +0 -1
- package/.output/server/chunks/build/error-404-styles.C9SFt1Pa.mjs +0 -8
- package/.output/server/chunks/build/error-404-styles.C9SFt1Pa.mjs.map +0 -1
- package/.output/server/chunks/build/error-500-BxPzc_RO.mjs.map +0 -1
- package/.output/server/chunks/build/error-500-styles.BgBkJrKx.mjs +0 -8
- package/.output/server/chunks/build/error-500-styles.BgBkJrKx.mjs.map +0 -1
- package/.output/server/chunks/build/index-Cm3PgUzj.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.6/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.11/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules
|
|
1
|
+
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.6/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.11/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.5_db0@0.3.4_better-sqlite3@12.8.0__ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-sqli_c30afa596bde8aa5bc5cc4263ab97795/node_modules/@nuxt/nitro-server/dist/runtime/utils/error.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-sqli_c30afa596bde8aa5bc5cc4263ab97795/node_modules/@nuxt/nitro-server/dist/runtime/handlers/error.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/@nuxtjs+color-mode@3.5.2_magicast@0.5.2/node_modules/@nuxtjs/color-mode/dist/runtime/nitro-plugin.js","../../../../../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/static.mjs","../../../../server/middleware/security.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/renderer.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-sqli_c30afa596bde8aa5bc5cc4263ab97795/node_modules/@nuxt/nitro-server/dist/runtime/utils/paths.mjs","../../../../node_modules/.cache/nuxt/.nuxt/nuxt-icon-server-bundle.mjs","../../../../../../node_modules/.pnpm/@nuxt+icon@2.2.1_magicast@0.5.2_vite@7.3.1_@types+node@24.12.1_jiti@2.6.1_lightningcss@_afbaacf166e2612501278747958dccc1/node_modules/@nuxt/icon/dist/runtime/server/api.js","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.3_better-sqlite3@12.8.0_srvx@0.11.14/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["getQuery","createRouter","f","h","c","i","l","createError","mergeHeaders","s","nodeFetch","fetch","Headers","Headers$1","AbortController$1","$fetch","normalizeKey","defineDriver","DRIVER_NAME","dirname","fsPromises","resolve","fsp","serialize","hash","_inlineAppConfig","createRadixRouter","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.mjs","sources":["../../../../../../node_modules/.pnpm/@unhead+vue@2.1.12_vue@3.5.32_typescript@5.9.3_/node_modules/@unhead/vue/dist/shared/vue.N9zWjxoK.mjs","../../../../../../node_modules/.pnpm/@unhead+vue@2.1.12_vue@3.5.32_typescript@5.9.3_/node_modules/@unhead/vue/dist/shared/vue.Cr7xSEtD.mjs","../../../../../../node_modules/.pnpm/@unhead+vue@2.1.12_vue@3.5.32_typescript@5.9.3_/node_modules/@unhead/vue/dist/server.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-
|
|
1
|
+
{"version":3,"file":"renderer.mjs","sources":["../../../../../../node_modules/.pnpm/@unhead+vue@2.1.12_vue@3.5.32_typescript@5.9.3_/node_modules/@unhead/vue/dist/shared/vue.N9zWjxoK.mjs","../../../../../../node_modules/.pnpm/@unhead+vue@2.1.12_vue@3.5.32_typescript@5.9.3_/node_modules/@unhead/vue/dist/shared/vue.Cr7xSEtD.mjs","../../../../../../node_modules/.pnpm/@unhead+vue@2.1.12_vue@3.5.32_typescript@5.9.3_/node_modules/@unhead/vue/dist/server.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-sqli_c30afa596bde8aa5bc5cc4263ab97795/node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/build-files.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-sqli_c30afa596bde8aa5bc5cc4263ab97795/node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/payload.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-sqli_c30afa596bde8aa5bc5cc4263ab97795/node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/app.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-sqli_c30afa596bde8aa5bc5cc4263ab97795/node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/inline-styles.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.4.2_@babel+core@7.29.0_better-sqlite3@12.8.0_db0@0.3.4_better-sqli_c30afa596bde8aa5bc5cc4263ab97795/node_modules/@nuxt/nitro-server/dist/runtime/handlers/renderer.mjs"],"names":["renderToString","_renderToString"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7]}
|
package/.output/server/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};import 'node:http';
|
|
2
2
|
import 'node:https';
|
|
3
|
-
export {
|
|
3
|
+
export { E as default } from './chunks/nitro/nitro.mjs';
|
|
4
4
|
import 'node:events';
|
|
5
5
|
import 'node:buffer';
|
|
6
6
|
import 'node:fs';
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@esbuild/
|
|
2
|
+
"name": "@esbuild/linux-x64",
|
|
3
3
|
"version": "0.28.0",
|
|
4
|
-
"description": "The
|
|
4
|
+
"description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/evanw/esbuild.git"
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"node": ">=18"
|
|
13
13
|
},
|
|
14
14
|
"os": [
|
|
15
|
-
"
|
|
15
|
+
"linux"
|
|
16
16
|
],
|
|
17
17
|
"cpu": [
|
|
18
|
-
"
|
|
18
|
+
"x64"
|
|
19
19
|
]
|
|
20
20
|
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
const DEBOUNCE_DEFAULTS = { trailing: true };
|
|
3
|
+
/**
|
|
4
|
+
Debounce functions
|
|
5
|
+
@param fn - Promise-returning/async function to debounce.
|
|
6
|
+
@param wait - Milliseconds to wait before calling `fn`. Default value is 25ms
|
|
7
|
+
@returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
|
|
8
|
+
@example
|
|
9
|
+
```
|
|
10
|
+
import { debounce } from 'perfect-debounce';
|
|
11
|
+
const expensiveCall = async input => input;
|
|
12
|
+
const debouncedFn = debounce(expensiveCall, 200);
|
|
13
|
+
for (const number of [1, 2, 3]) {
|
|
14
|
+
console.log(await debouncedFn(number));
|
|
15
|
+
}
|
|
16
|
+
//=> 1
|
|
17
|
+
//=> 2
|
|
18
|
+
//=> 3
|
|
19
|
+
```
|
|
20
|
+
*/
|
|
21
|
+
function debounce(fn, wait = 25, options = {}) {
|
|
22
|
+
options = {
|
|
23
|
+
...DEBOUNCE_DEFAULTS,
|
|
24
|
+
...options
|
|
25
|
+
};
|
|
26
|
+
if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
|
|
27
|
+
let leadingValue;
|
|
28
|
+
let timeout;
|
|
29
|
+
let resolveList = [];
|
|
30
|
+
let currentPromise;
|
|
31
|
+
let trailingArgs;
|
|
32
|
+
const applyFn = (_this, args) => {
|
|
33
|
+
currentPromise = _applyPromised(fn, _this, args);
|
|
34
|
+
currentPromise.finally(() => {
|
|
35
|
+
currentPromise = null;
|
|
36
|
+
if (options.trailing && trailingArgs && !timeout) {
|
|
37
|
+
const promise = applyFn(_this, trailingArgs);
|
|
38
|
+
trailingArgs = null;
|
|
39
|
+
return promise;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return currentPromise;
|
|
43
|
+
};
|
|
44
|
+
const debounced = function(...args) {
|
|
45
|
+
if (options.trailing) trailingArgs = args;
|
|
46
|
+
if (currentPromise) return currentPromise;
|
|
47
|
+
return new Promise((resolve) => {
|
|
48
|
+
const shouldCallNow = !timeout && options.leading;
|
|
49
|
+
clearTimeout(timeout);
|
|
50
|
+
timeout = setTimeout(() => {
|
|
51
|
+
timeout = null;
|
|
52
|
+
const promise = options.leading ? leadingValue : applyFn(this, args);
|
|
53
|
+
trailingArgs = null;
|
|
54
|
+
for (const _resolve of resolveList) _resolve(promise);
|
|
55
|
+
resolveList = [];
|
|
56
|
+
}, wait);
|
|
57
|
+
if (shouldCallNow) {
|
|
58
|
+
leadingValue = applyFn(this, args);
|
|
59
|
+
resolve(leadingValue);
|
|
60
|
+
} else resolveList.push(resolve);
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const _clearTimeout = (timer) => {
|
|
64
|
+
if (timer) {
|
|
65
|
+
clearTimeout(timer);
|
|
66
|
+
timeout = null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
debounced.isPending = () => !!timeout;
|
|
70
|
+
debounced.cancel = () => {
|
|
71
|
+
_clearTimeout(timeout);
|
|
72
|
+
resolveList = [];
|
|
73
|
+
trailingArgs = null;
|
|
74
|
+
};
|
|
75
|
+
debounced.flush = () => {
|
|
76
|
+
_clearTimeout(timeout);
|
|
77
|
+
if (!trailingArgs || currentPromise) return;
|
|
78
|
+
const args = trailingArgs;
|
|
79
|
+
trailingArgs = null;
|
|
80
|
+
return applyFn(this, args);
|
|
81
|
+
};
|
|
82
|
+
return debounced;
|
|
83
|
+
}
|
|
84
|
+
async function _applyPromised(fn, _this, args) {
|
|
85
|
+
return await fn.apply(_this, args);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
export { debounce };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "perfect-debounce",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"repository": "unjs/perfect-debounce",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/index.mjs"
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.mjs",
|
|
13
|
+
"module": "./dist/index.mjs",
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "obuild",
|
|
20
|
+
"dev": "vitest dev",
|
|
21
|
+
"lint": "eslint . && prettier --check src test",
|
|
22
|
+
"lint:fix": "eslint . --fix && prettier -w src test",
|
|
23
|
+
"release": "pnpm test && pnpm build && changelogen --release --push && npm publish",
|
|
24
|
+
"test": "vitest run --coverage"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^25.0.10",
|
|
28
|
+
"@vitest/coverage-v8": "^4.0.17",
|
|
29
|
+
"automd": "^0.4.2",
|
|
30
|
+
"changelogen": "^0.6.2",
|
|
31
|
+
"eslint": "^9.39.2",
|
|
32
|
+
"eslint-config-unjs": "^0.6.2",
|
|
33
|
+
"in-range": "^3.0.0",
|
|
34
|
+
"obuild": "^0.4.18",
|
|
35
|
+
"prettier": "^3.8.1",
|
|
36
|
+
"time-span": "^5.1.0",
|
|
37
|
+
"typescript": "^5.9.3",
|
|
38
|
+
"vitest": "^4.0.17"
|
|
39
|
+
},
|
|
40
|
+
"packageManager": "pnpm@10.28.1"
|
|
41
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nullix/zod-mongoose-studio-prod",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@babel/parser": "7.29.2",
|
|
8
|
-
"@esbuild/
|
|
8
|
+
"@esbuild/linux-x64": "0.28.0",
|
|
9
9
|
"@iconify/utils": "3.1.0",
|
|
10
10
|
"@mongodb-js/saslprep": "1.4.6",
|
|
11
11
|
"@vue/compiler-core": "3.5.32",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"mpath": "0.9.0",
|
|
34
34
|
"mquery": "5.0.0",
|
|
35
35
|
"ms": "2.1.3",
|
|
36
|
+
"perfect-debounce": "2.1.0",
|
|
36
37
|
"punycode": "2.3.1",
|
|
37
38
|
"sift": "17.1.3",
|
|
38
39
|
"smart-buffer": "4.2.0",
|
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
[](https://github.com/Harm-Nullix/zod-mongoose/actions/workflows/release.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@nullix/zod-mongoose-studio)
|
|
5
|
+
[](https://github.com/Harm-Nullix/zod-mongoose/blob/main/packages/core/LICENSE.md)
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
# @nullix/zod-mongoose-studio
|
|
2
9
|
|
|
3
|
-
A Monaco-powered TypeScript playground for [@nullix/mongoose
|
|
10
|
+
A Monaco-powered TypeScript playground for [@nullix/zod-mongoose](https://github.com/Harm-Nullix/zod-mongoose).
|
|
4
11
|
|
|
5
12
|
The Studio provides a powerful web-integrated interface to experiment with Zod-to-Mongoose transformations. It supports local development via a CLI with full filesystem access and a sandboxed mode for documentation and live demos.
|
|
6
13
|
|
|
@@ -19,7 +26,7 @@ Create a CLI tool and web-integrated "Studio" that provides:
|
|
|
19
26
|
- **Editor**: [Monaco Editor](https://microsoft.github.io/monaco-editor/)
|
|
20
27
|
- **Server**: Nitro (Nuxt built-in server)
|
|
21
28
|
- **CLI**: Commander.js
|
|
22
|
-
- **Logic**: [@nullix/mongoose
|
|
29
|
+
- **Logic**: [@nullix/zod-mongoose](https://www.npmjs.com/package/@nullix/zod-mongoose) for the transformation engine.
|
|
23
30
|
|
|
24
31
|
## Usage
|
|
25
32
|
|
|
@@ -82,12 +89,12 @@ export default defineNuxtConfig({
|
|
|
82
89
|
|
|
83
90
|
### Transformation Engine (`/api/parse`)
|
|
84
91
|
|
|
85
|
-
The core logic executes Zod schemas in a controlled environment. It automatically injects the necessary imports for `zod/v4` and `@nullix/mongoose
|
|
92
|
+
The core logic executes Zod schemas in a controlled environment. It automatically injects the necessary imports for `zod/v4` and `@nullix/zod-mongoose`:
|
|
86
93
|
|
|
87
94
|
```ts
|
|
88
95
|
import * as zod from 'zod/v4';
|
|
89
96
|
const z = zod.z;
|
|
90
|
-
import { toMongooseScheme, extractMongooseDefinition } from '@nullix/mongoose
|
|
97
|
+
import { toMongooseScheme, extractMongooseDefinition } from '@nullix/zod-mongoose';
|
|
91
98
|
```
|
|
92
99
|
|
|
93
100
|
### Filesystem Bridge (`/api/resolve`)
|
package/package.json
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nullix/zod-mongoose-studio",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Monaco-powered TypeScript playground for @nullix/zod-mongoose",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"bin": {
|
|
7
7
|
"zod-mongoose-studio": "./bin/index.mjs"
|
|
8
8
|
},
|
|
9
|
+
"homepage": "https://zodmongoose.com/studio",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/Harm-Nullix/zod-mongoose"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/Harm-Nullix/zod-mongoose/issues/new"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"mongoose",
|
|
19
|
+
"zod",
|
|
20
|
+
"mongodb",
|
|
21
|
+
"studio",
|
|
22
|
+
"playground"
|
|
23
|
+
],
|
|
9
24
|
"type": "module",
|
|
10
25
|
"files": [
|
|
11
26
|
"app",
|
|
@@ -20,14 +35,15 @@
|
|
|
20
35
|
"node": ">=24"
|
|
21
36
|
},
|
|
22
37
|
"publishConfig": {
|
|
23
|
-
"access": "public"
|
|
38
|
+
"access": "public",
|
|
39
|
+
"provenance": true
|
|
24
40
|
},
|
|
25
41
|
"dependencies": {
|
|
26
42
|
"esbuild": "0.28.0",
|
|
27
43
|
"get-port-please": "3.2.0",
|
|
28
44
|
"open": "11.0.0",
|
|
29
45
|
"zod": "4.3.6",
|
|
30
|
-
"@nullix/zod-mongoose": "
|
|
46
|
+
"@nullix/zod-mongoose": "1.0.3"
|
|
31
47
|
},
|
|
32
48
|
"devDependencies": {
|
|
33
49
|
"@nuxt/ui": "4.6.0",
|