@omer-x/next-form-actions 1.0.0-alpha.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Omer Mecitoglu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # next-form-actions
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@omer-x/next-form-actions?logo=npm&logoColor=CB3837&color=CB3837)](https://www.npmjs.com/package/@omer-x/next-form-actions)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@omer-x/next-form-actions?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tIUZvbnQgQXdlc29tZSBGcmVlIDYuNi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlL2ZyZWUgQ29weXJpZ2h0IDIwMjQgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTI4OCAzMmMwLTE3LjctMTQuMy0zMi0zMi0zMnMtMzIgMTQuMy0zMiAzMmwwIDI0Mi43LTczLjQtNzMuNGMtMTIuNS0xMi41LTMyLjgtMTIuNS00NS4zIDBzLTEyLjUgMzIuOCAwIDQ1LjNsMTI4IDEyOGMxMi41IDEyLjUgMzIuOCAxMi41IDQ1LjMgMGwxMjgtMTI4YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zcy0zMi44LTEyLjUtNDUuMyAwTDI4OCAyNzQuNyAyODggMzJ6TTY0IDM1MmMtMzUuMyAwLTY0IDI4LjctNjQgNjRsMCAzMmMwIDM1LjMgMjguNyA2NCA2NCA2NGwzODQgMGMzNS4zIDAgNjQtMjguNyA2NC02NGwwLTMyYzAtMzUuMy0yOC43LTY0LTY0LTY0bC0xMDEuNSAwLTQ1LjMgNDUuM2MtMjUgMjUtNjUuNSAyNS05MC41IDBMMTY1LjUgMzUyIDY0IDM1MnptMzY4IDU2YTI0IDI0IDAgMSAxIDAgNDggMjQgMjQgMCAxIDEgMC00OHoiIGZpbGw9IiMwMDc4MjAiIC8+PC9zdmc+&color=007820)](https://www.npmjs.com/package/@omer-x/next-form-actions)
5
+ [![codecov](https://codecov.io/gh/omermecitoglu/next-form-actions/branch/main/graph/badge.svg)](https://codecov.io/gh/omermecitoglu/next-form-actions)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48IS0tIUZvbnQgQXdlc29tZSBGcmVlIDYuNi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlL2ZyZWUgQ29weXJpZ2h0IDIwMjQgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTM4NCAzMmwxMjggMGMxNy43IDAgMzIgMTQuMyAzMiAzMnMtMTQuMyAzMi0zMiAzMkwzOTguNCA5NmMtNS4yIDI1LjgtMjIuOSA0Ny4xLTQ2LjQgNTcuM0wzNTIgNDQ4bDE2MCAwYzE3LjcgMCAzMiAxNC4zIDMyIDMycy0xNC4zIDMyLTMyIDMybC0xOTIgMC0xOTIgMGMtMTcuNyAwLTMyLTE0LjMtMzItMzJzMTQuMy0zMiAzMi0zMmwxNjAgMCAwLTI5NC43Yy0yMy41LTEwLjMtNDEuMi0zMS42LTQ2LjQtNTcuM0wxMjggOTZjLTE3LjcgMC0zMi0xNC4zLTMyLTMyczE0LjMtMzIgMzItMzJsMTI4IDBjMTQuNi0xOS40IDM3LjgtMzIgNjQtMzJzNDkuNCAxMi42IDY0IDMyem01NS42IDI4OGwxNDQuOSAwTDUxMiAxOTUuOCA0MzkuNiAzMjB6TTUxMiA0MTZjLTYyLjkgMC0xMTUuMi0zNC0xMjYtNzguOWMtMi42LTExIDEtMjIuMyA2LjctMzIuMWw5NS4yLTE2My4yYzUtOC42IDE0LjItMTMuOCAyNC4xLTEzLjhzMTkuMSA1LjMgMjQuMSAxMy44bDk1LjIgMTYzLjJjNS43IDkuOCA5LjMgMjEuMSA2LjcgMzIuMUM2MjcuMiAzODIgNTc0LjkgNDE2IDUxMiA0MTZ6TTEyNi44IDE5NS44TDU0LjQgMzIwbDE0NC45IDBMMTI2LjggMTk1Ljh6TS45IDMzNy4xYy0yLjYtMTEgMS0yMi4zIDYuNy0zMi4xbDk1LjItMTYzLjJjNS04LjYgMTQuMi0xMy44IDI0LjEtMTMuOHMxOS4xIDUuMyAyNC4xIDEzLjhsOTUuMiAxNjMuMmM1LjcgOS44IDkuMyAyMS4xIDYuNyAzMi4xQzI0MiAzODIgMTg5LjcgNDE2IDEyNi44IDQxNlMxMS43IDM4MiAuOSAzMzcuMXoiIGZpbGw9IiNEMEE4MUMiIC8+PC9zdmc+)](https://opensource.org/licenses/MIT)
7
+ [![GitHub last commit](https://img.shields.io/github/last-commit/omermecitoglu/next-form-actions?color=c977be&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48IS0tIUZvbnQgQXdlc29tZSBGcmVlIDYuNi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlL2ZyZWUgQ29weXJpZ2h0IDIwMjQgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTMyMCAzMzZhODAgODAgMCAxIDAgMC0xNjAgODAgODAgMCAxIDAgMCAxNjB6bTE1Ni44LTQ4QzQ2MiAzNjEgMzk3LjQgNDE2IDMyMCA0MTZzLTE0Mi01NS0xNTYuOC0xMjhMMzIgMjg4Yy0xNy43IDAtMzItMTQuMy0zMi0zMnMxNC4zLTMyIDMyLTMybDEzMS4yIDBDMTc4IDE1MSAyNDIuNiA5NiAzMjAgOTZzMTQyIDU1IDE1Ni44IDEyOEw2MDggMjI0YzE3LjcgMCAzMiAxNC4zIDMyIDMycy0xNC4zIDMyLTMyIDMybC0xMzEuMiAweiIgZmlsbD0iI0M5NzdCRSIgLz48L3N2Zz4=)](https://github.com/omermecitoglu/next-form-actions/commits/main/)
8
+ [![GitHub issues](https://img.shields.io/github/issues/omermecitoglu/next-form-actions?color=a38eed&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij4KICA8cGF0aCBkPSJNOCA5LjVhMS41IDEuNSAwIDEgMCAwLTMgMS41IDEuNSAwIDAgMCAwIDNaIiBmaWxsPSIjQTM4RUVEIj48L3BhdGg+CiAgPHBhdGggZD0iTTggMGE4IDggMCAxIDEgMCAxNkE4IDggMCAwIDEgOCAwWk0xLjUgOGE2LjUgNi41IDAgMSAwIDEzIDAgNi41IDYuNSAwIDAgMC0xMyAwWiIgZmlsbD0iI0EzOEVFRCI+PC9wYXRoPgo8L3N2Zz4=)](https://github.com/omermecitoglu/next-form-actions/issues)
9
+ [![GitHub stars](https://img.shields.io/github/stars/omermecitoglu/next-form-actions?style=social)](https://github.com/omermecitoglu/next-form-actions)
10
+
11
+ ## Overview
12
+
13
+ Provides helper functions to define a type-safe React server action for forms, validating form data with Zod and handling errors internally.
14
+
15
+ ## Installation
16
+
17
+ To install this package
18
+
19
+ ```sh
20
+ npm install @omer-x/next-form-actions
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ```typescript
26
+ "use server";
27
+ import { defineFormAction, displayMessage } from "@omer-x/next-form-actions";
28
+ import z from "zod";
29
+ import { authMiddleware } from "./middlewares/session";
30
+
31
+ export const createUser = defineFormAction({
32
+ middlewares: [authMiddleware],
33
+ schema: z.object({
34
+ foo: z.string(),
35
+ }),
36
+ action: input => (async () => {
37
+ console.log(input); // { foo: "bar" }
38
+ try {
39
+ // try to create a user
40
+
41
+ displayMessage("success", "ok!");
42
+ } catch (error) {
43
+ if (error === "BAD_REQUEST") {
44
+ displayMessage("warning", "you are doing something wrong");
45
+ }
46
+ displayMessage("error", "unknown error");
47
+ }
48
+ }),
49
+ });
50
+ ```
51
+
52
+ ## License
53
+
54
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
package/dist/index.cjs ADDED
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ defineFormAction: () => defineFormAction,
24
+ displayMessage: () => displayMessage
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/core/bundleErrors.ts
29
+ function handleZodIssue(issue) {
30
+ switch (issue.code) {
31
+ case "custom": {
32
+ const params = issue.params ?? {};
33
+ if ("customErrorCode" in params && typeof params.customErrorCode === "string") {
34
+ return params.customErrorCode;
35
+ }
36
+ return issue.message;
37
+ }
38
+ case "invalid_format":
39
+ return `invalid_${issue.format}`;
40
+ // e.g., INVALID_EMAIL, INVALID_URL, INVALID_UUID
41
+ case "invalid_type": {
42
+ if (/expected .+?, received undefined/.test(issue.message)) {
43
+ return "required";
44
+ }
45
+ return issue.code;
46
+ }
47
+ case "too_small":
48
+ case "too_big":
49
+ return issue.code;
50
+ // known errors
51
+ default:
52
+ return "unknown_error";
53
+ }
54
+ }
55
+ function bundleErrors(issues) {
56
+ return issues.reduce((bundle, issue) => {
57
+ const [location] = issue.path;
58
+ return {
59
+ ...bundle,
60
+ [location]: handleZodIssue(issue).toUpperCase()
61
+ };
62
+ }, {});
63
+ }
64
+
65
+ // src/core/solveKnownIssues.ts
66
+ function solveKnownIssues(schema, input) {
67
+ const validation = schema.safeParse(input);
68
+ if (!validation.success) {
69
+ for (const issue of validation.error.issues) {
70
+ if (issue.code === "invalid_type") {
71
+ if (issue.expected === "number" && issue.message.includes("expected number, received string")) {
72
+ const [location] = issue.path;
73
+ return solveKnownIssues(schema, {
74
+ ...input,
75
+ [location]: parseFloat(input[location])
76
+ });
77
+ }
78
+ }
79
+ }
80
+ }
81
+ return validation;
82
+ }
83
+
84
+ // src/core/defineFormAction.ts
85
+ function defineFormAction(definition) {
86
+ async function handler(...allParams) {
87
+ if (definition.middlewares) {
88
+ await Promise.all(definition.middlewares.map((middleware) => middleware()));
89
+ }
90
+ const formData = allParams[allParams.length - 1];
91
+ const customArgs = allParams.slice(0, allParams.length - 2);
92
+ const validation = solveKnownIssues(definition.schema.strip(), Object.fromEntries(formData.entries()));
93
+ if (!validation.success) {
94
+ return bundleErrors(validation.error.issues);
95
+ }
96
+ return await definition.action(validation.data)(...customArgs);
97
+ }
98
+ return handler;
99
+ }
100
+
101
+ // src/core/displayMessage.ts
102
+ function displayMessage(messageType, message) {
103
+ throw { isDisplayMessage: true, messageType, message };
104
+ }
105
+ // Annotate the CommonJS export names for ESM import in node:
106
+ 0 && (module.exports = {
107
+ defineFormAction,
108
+ displayMessage
109
+ });
@@ -0,0 +1,35 @@
1
+ import { ZodType, ZodObject } from 'zod';
2
+
3
+ /**
4
+ * Describes the definition of a type-safe server action for forms.
5
+ */
6
+ type ActionDefinition<Shape extends Record<string, ZodType>, SchemaI, SchemaO, Args extends unknown[]> = {
7
+ /**
8
+ * An array of middleware functions to execute before the action. (Optional)
9
+ */
10
+ middlewares?: (() => void | Promise<void>)[];
11
+ /**
12
+ * The Zod schema used to validate form data.
13
+ */
14
+ schema: ZodType<SchemaO, SchemaI> & ZodObject<Shape>;
15
+ /**
16
+ * The function to execute if validation succeeds. Receives parsed data and returns a function for additional arguments.
17
+ */
18
+ action: (input: SchemaO) => ((...args: [...Args]) => Promise<Partial<Record<string, string>>>);
19
+ };
20
+ type FormAction<Args extends unknown[]> = (...allParams: [...Args, initialState: unknown, formData: FormData]) => Promise<Record<string, string>>;
21
+ /**
22
+ * Defines a type-safe React server action for forms, validating form data with Zod and handling errors internally.
23
+ *
24
+ * @param definition - The form action definition object.
25
+ * @param definition.name - The unique name of the action.
26
+ * @param definition.middleware - An array of middleware functions to execute before the action. (Optional)
27
+ * @param definition.schema - The Zod schema used to validate form data.
28
+ * @param definition.action - The function to execute if validation succeeds.
29
+ * @returns An object containing the server action handler keyed by the action name.
30
+ */
31
+ declare function defineFormAction<Shape extends Record<string, ZodType>, SchemaI, SchemaO, Args extends unknown[]>(definition: ActionDefinition<Shape, SchemaI, SchemaO, Args>): FormAction<Args>;
32
+
33
+ declare function displayMessage(messageType: "error" | "warning" | "success", message: string): never;
34
+
35
+ export { defineFormAction, displayMessage };
@@ -0,0 +1,35 @@
1
+ import { ZodType, ZodObject } from 'zod';
2
+
3
+ /**
4
+ * Describes the definition of a type-safe server action for forms.
5
+ */
6
+ type ActionDefinition<Shape extends Record<string, ZodType>, SchemaI, SchemaO, Args extends unknown[]> = {
7
+ /**
8
+ * An array of middleware functions to execute before the action. (Optional)
9
+ */
10
+ middlewares?: (() => void | Promise<void>)[];
11
+ /**
12
+ * The Zod schema used to validate form data.
13
+ */
14
+ schema: ZodType<SchemaO, SchemaI> & ZodObject<Shape>;
15
+ /**
16
+ * The function to execute if validation succeeds. Receives parsed data and returns a function for additional arguments.
17
+ */
18
+ action: (input: SchemaO) => ((...args: [...Args]) => Promise<Partial<Record<string, string>>>);
19
+ };
20
+ type FormAction<Args extends unknown[]> = (...allParams: [...Args, initialState: unknown, formData: FormData]) => Promise<Record<string, string>>;
21
+ /**
22
+ * Defines a type-safe React server action for forms, validating form data with Zod and handling errors internally.
23
+ *
24
+ * @param definition - The form action definition object.
25
+ * @param definition.name - The unique name of the action.
26
+ * @param definition.middleware - An array of middleware functions to execute before the action. (Optional)
27
+ * @param definition.schema - The Zod schema used to validate form data.
28
+ * @param definition.action - The function to execute if validation succeeds.
29
+ * @returns An object containing the server action handler keyed by the action name.
30
+ */
31
+ declare function defineFormAction<Shape extends Record<string, ZodType>, SchemaI, SchemaO, Args extends unknown[]>(definition: ActionDefinition<Shape, SchemaI, SchemaO, Args>): FormAction<Args>;
32
+
33
+ declare function displayMessage(messageType: "error" | "warning" | "success", message: string): never;
34
+
35
+ export { defineFormAction, displayMessage };
package/dist/index.js ADDED
@@ -0,0 +1,81 @@
1
+ // src/core/bundleErrors.ts
2
+ function handleZodIssue(issue) {
3
+ switch (issue.code) {
4
+ case "custom": {
5
+ const params = issue.params ?? {};
6
+ if ("customErrorCode" in params && typeof params.customErrorCode === "string") {
7
+ return params.customErrorCode;
8
+ }
9
+ return issue.message;
10
+ }
11
+ case "invalid_format":
12
+ return `invalid_${issue.format}`;
13
+ // e.g., INVALID_EMAIL, INVALID_URL, INVALID_UUID
14
+ case "invalid_type": {
15
+ if (/expected .+?, received undefined/.test(issue.message)) {
16
+ return "required";
17
+ }
18
+ return issue.code;
19
+ }
20
+ case "too_small":
21
+ case "too_big":
22
+ return issue.code;
23
+ // known errors
24
+ default:
25
+ return "unknown_error";
26
+ }
27
+ }
28
+ function bundleErrors(issues) {
29
+ return issues.reduce((bundle, issue) => {
30
+ const [location] = issue.path;
31
+ return {
32
+ ...bundle,
33
+ [location]: handleZodIssue(issue).toUpperCase()
34
+ };
35
+ }, {});
36
+ }
37
+
38
+ // src/core/solveKnownIssues.ts
39
+ function solveKnownIssues(schema, input) {
40
+ const validation = schema.safeParse(input);
41
+ if (!validation.success) {
42
+ for (const issue of validation.error.issues) {
43
+ if (issue.code === "invalid_type") {
44
+ if (issue.expected === "number" && issue.message.includes("expected number, received string")) {
45
+ const [location] = issue.path;
46
+ return solveKnownIssues(schema, {
47
+ ...input,
48
+ [location]: parseFloat(input[location])
49
+ });
50
+ }
51
+ }
52
+ }
53
+ }
54
+ return validation;
55
+ }
56
+
57
+ // src/core/defineFormAction.ts
58
+ function defineFormAction(definition) {
59
+ async function handler(...allParams) {
60
+ if (definition.middlewares) {
61
+ await Promise.all(definition.middlewares.map((middleware) => middleware()));
62
+ }
63
+ const formData = allParams[allParams.length - 1];
64
+ const customArgs = allParams.slice(0, allParams.length - 2);
65
+ const validation = solveKnownIssues(definition.schema.strip(), Object.fromEntries(formData.entries()));
66
+ if (!validation.success) {
67
+ return bundleErrors(validation.error.issues);
68
+ }
69
+ return await definition.action(validation.data)(...customArgs);
70
+ }
71
+ return handler;
72
+ }
73
+
74
+ // src/core/displayMessage.ts
75
+ function displayMessage(messageType, message) {
76
+ throw { isDisplayMessage: true, messageType, message };
77
+ }
78
+ export {
79
+ defineFormAction,
80
+ displayMessage
81
+ };
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@omer-x/next-form-actions",
3
+ "version": "1.0.0-alpha.0",
4
+ "description": "Provides helper functions to define a type-safe React server action for forms, validating form data with Zod and handling errors internally.",
5
+ "keywords": [
6
+ "nextjs",
7
+ "server-actions",
8
+ "middlewares",
9
+ "form-validation",
10
+ "zod"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/omermecitoglu/next-form-actions.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/omermecitoglu/next-form-actions/issues"
18
+ },
19
+ "homepage": "https://github.com/omermecitoglu/next-form-actions#readme",
20
+ "private": false,
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "author": {
25
+ "name": "Omer Mecitoglu",
26
+ "email": "omer.mecitoglu@gmail.com",
27
+ "url": "https://omermecitoglu.github.io"
28
+ },
29
+ "license": "MIT",
30
+ "type": "module",
31
+ "files": [
32
+ "dist/"
33
+ ],
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "import": "./dist/index.js",
38
+ "require": "./dist/index.cjs"
39
+ }
40
+ },
41
+ "scripts": {
42
+ "lint": "eslint --flag unstable_native_nodejs_ts_config",
43
+ "lint:fix": "eslint --fix --flag unstable_native_nodejs_ts_config",
44
+ "test": "vitest run --coverage",
45
+ "test:watch": "vitest --coverage",
46
+ "dev": "tsup --watch",
47
+ "build": "tsup"
48
+ },
49
+ "peerDependencies": {
50
+ "zod": "^4"
51
+ },
52
+ "devDependencies": {
53
+ "@omer-x/eslint-config": "^2.2.6",
54
+ "@types/node": "^25.0.10",
55
+ "@vitest/coverage-v8": "^4.0.17",
56
+ "eslint": "^9.39.2",
57
+ "semantic-release": "^25.0.2",
58
+ "tsup": "^8.5.1",
59
+ "typescript": "^5.9.3",
60
+ "vitest": "^4.0.17"
61
+ }
62
+ }