@kubb/plugin-zod 5.4.4 → 5.4.5
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/index.cjs +33 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +34 -31
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -533,7 +533,7 @@ export declare const pluginZodName = "plugin-zod";
|
|
|
533
533
|
* })
|
|
534
534
|
* ```
|
|
535
535
|
*/
|
|
536
|
-
export declare const pluginZod:
|
|
536
|
+
export declare const pluginZod: import("kubb/kit").PluginFactory<PluginZod>;
|
|
537
537
|
//#endregion
|
|
538
538
|
//#region src/resolvers/resolverZod.d.ts
|
|
539
539
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { Resolver, ast, containsCircularRef, createResolver, defineGenerator, definePlugin, extractRefName, syncSchemaRef } from "kubb/kit";
|
|
2
|
+
import { Resolver, addGenerator, ast, containsCircularRef, createResolver, defineGenerator, definePlugin, extractRefName, setMacros, setResolver, syncSchemaRef } from "kubb/kit";
|
|
3
3
|
import { Const, File, Function, Type, jsxRenderer } from "kubb/jsx";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "kubb/jsx/jsx-runtime";
|
|
5
5
|
//#region ../../internals/shared/src/params.ts
|
|
@@ -2219,6 +2219,9 @@ const zodGenerator = defineGenerator({
|
|
|
2219
2219
|
}
|
|
2220
2220
|
});
|
|
2221
2221
|
//#endregion
|
|
2222
|
+
//#region package.json
|
|
2223
|
+
var version = "5.4.5";
|
|
2224
|
+
//#endregion
|
|
2222
2225
|
//#region src/resolvers/resolverZod.ts
|
|
2223
2226
|
/**
|
|
2224
2227
|
* Default resolver used by `@kubb/plugin-zod`. Decides the names and file
|
|
@@ -2305,37 +2308,37 @@ const pluginZodName = "plugin-zod";
|
|
|
2305
2308
|
* })
|
|
2306
2309
|
* ```
|
|
2307
2310
|
*/
|
|
2308
|
-
const pluginZod = definePlugin(
|
|
2309
|
-
|
|
2310
|
-
path: "zod",
|
|
2311
|
-
barrel: { type: "named" }
|
|
2312
|
-
}, group, exclude = [], include, override = [], compile = false, mini = false, guidType = "uuid", regexType = "literal", importPath = mini ? "zod/mini" : "zod", coercion = false, inferred = false, typeGuards = false, printer, resolver: userResolver, macros: userMacros } = options;
|
|
2313
|
-
const groupConfig = createGroupConfig(group);
|
|
2314
|
-
return {
|
|
2311
|
+
const pluginZod = definePlugin({
|
|
2312
|
+
meta: {
|
|
2315
2313
|
name: pluginZodName,
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2314
|
+
version,
|
|
2315
|
+
compatibility: { kubb: ">=5.8.0" }
|
|
2316
|
+
},
|
|
2317
|
+
setup(options) {
|
|
2318
|
+
const { output = {
|
|
2319
|
+
path: "zod",
|
|
2320
|
+
barrel: { type: "named" }
|
|
2321
|
+
}, group, exclude = [], include, override = [], compile = false, mini = false, guidType = "uuid", regexType = "literal", importPath = mini ? "zod/mini" : "zod", coercion = false, inferred = false, typeGuards = false, printer, resolver: userResolver, macros: userMacros } = options;
|
|
2322
|
+
setResolver(userResolver ? Resolver.merge(resolverZod, userResolver) : resolverZod);
|
|
2323
|
+
if (userMacros?.length) setMacros(userMacros);
|
|
2324
|
+
addGenerator(zodGenerator);
|
|
2325
|
+
return {
|
|
2326
|
+
output,
|
|
2327
|
+
exclude,
|
|
2328
|
+
include,
|
|
2329
|
+
override,
|
|
2330
|
+
group: createGroupConfig(group),
|
|
2331
|
+
importPath,
|
|
2332
|
+
coercion,
|
|
2333
|
+
inferred,
|
|
2334
|
+
guidType,
|
|
2335
|
+
regexType,
|
|
2336
|
+
compile,
|
|
2337
|
+
mini,
|
|
2338
|
+
typeGuards,
|
|
2339
|
+
printer
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2339
2342
|
});
|
|
2340
2343
|
//#endregion
|
|
2341
2344
|
export { pluginZod as default, pluginZod, pluginZodName, printerZod, printerZodMini, resolverZod, zodGenerator };
|