@stryke/zod 0.1.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.
Files changed (55) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +300 -0
  3. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  4. package/dist/index.cjs +7 -0
  5. package/dist/index.d.cts +4 -0
  6. package/dist/index.d.mts +4 -0
  7. package/dist/index.mjs +4 -0
  8. package/dist/is-zod-type.cjs +35 -0
  9. package/dist/is-zod-type.d.cts +30 -0
  10. package/dist/is-zod-type.d.cts.map +1 -0
  11. package/dist/is-zod-type.d.mts +30 -0
  12. package/dist/is-zod-type.d.mts.map +1 -0
  13. package/dist/is-zod-type.mjs +34 -0
  14. package/dist/is-zod-type.mjs.map +1 -0
  15. package/dist/schema.cjs +33 -0
  16. package/dist/schema.d.cts +22 -0
  17. package/dist/schema.d.cts.map +1 -0
  18. package/dist/schema.d.mts +22 -0
  19. package/dist/schema.d.mts.map +1 -0
  20. package/dist/schema.mjs +32 -0
  21. package/dist/schema.mjs.map +1 -0
  22. package/dist/type-checks/src/get-object-tag.cjs +15 -0
  23. package/dist/type-checks/src/get-object-tag.mjs +15 -0
  24. package/dist/type-checks/src/get-object-tag.mjs.map +1 -0
  25. package/dist/type-checks/src/is-empty.cjs +20 -0
  26. package/dist/type-checks/src/is-empty.mjs +21 -0
  27. package/dist/type-checks/src/is-empty.mjs.map +1 -0
  28. package/dist/type-checks/src/is-non-null-object.cjs +16 -0
  29. package/dist/type-checks/src/is-non-null-object.mjs +17 -0
  30. package/dist/type-checks/src/is-non-null-object.mjs.map +1 -0
  31. package/dist/type-checks/src/is-null.cjs +12 -0
  32. package/dist/type-checks/src/is-null.mjs +12 -0
  33. package/dist/type-checks/src/is-null.mjs.map +1 -0
  34. package/dist/type-checks/src/is-object.cjs +19 -0
  35. package/dist/type-checks/src/is-object.mjs +20 -0
  36. package/dist/type-checks/src/is-object.mjs.map +1 -0
  37. package/dist/type-checks/src/is-plain-object.cjs +63 -0
  38. package/dist/type-checks/src/is-plain-object.mjs +64 -0
  39. package/dist/type-checks/src/is-plain-object.mjs.map +1 -0
  40. package/dist/type-checks/src/is-set-object.cjs +19 -0
  41. package/dist/type-checks/src/is-set-object.mjs +20 -0
  42. package/dist/type-checks/src/is-set-object.mjs.map +1 -0
  43. package/dist/type-checks/src/is-set.cjs +19 -0
  44. package/dist/type-checks/src/is-set.mjs +20 -0
  45. package/dist/type-checks/src/is-set.mjs.map +1 -0
  46. package/dist/type-checks/src/is-undefined.cjs +8 -0
  47. package/dist/type-checks/src/is-undefined.mjs +8 -0
  48. package/dist/type-checks/src/is-undefined.mjs.map +1 -0
  49. package/dist/types.cjs +0 -0
  50. package/dist/types.d.cts +20 -0
  51. package/dist/types.d.cts.map +1 -0
  52. package/dist/types.d.mts +20 -0
  53. package/dist/types.d.mts.map +1 -0
  54. package/dist/types.mjs +1 -0
  55. package/package.json +37 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../type-checks/src/is-undefined.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":";AAkBA,MAAa,eAAe,UAAuC;AACjE,QAAO,UAAU"}
package/dist/types.cjs ADDED
File without changes
@@ -0,0 +1,20 @@
1
+ import * as z3 from "zod/v3";
2
+ import * as z4 from "zod/v4/core";
3
+
4
+ //#region src/types.d.ts
5
+ type ZodType = z3.ZodTypeAny | z4.$ZodType;
6
+ type ZodTypeKind = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "date" | "array" | "null" | "void" | "any" | "unknown" | "union" | "intersection";
7
+ /**
8
+ * Extracted metadata from a Zod schema.
9
+ */
10
+ interface ZodTypeInfo {
11
+ kind: ZodTypeKind;
12
+ optional: boolean;
13
+ defaultValue?: unknown;
14
+ description?: string;
15
+ variadic: boolean;
16
+ choices?: (string | number)[];
17
+ }
18
+ //#endregion
19
+ export { ZodType, ZodTypeInfo, ZodTypeKind };
20
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,OAAA,GAAU,EAAA,CAAG,aAAa,EAAA,CAAG;KAE7B,WAAA;AAFZ;AAEA;AAqBA;UAAiB,WAAA;QACT"}
@@ -0,0 +1,20 @@
1
+ import * as z4 from "zod/v4/core";
2
+ import * as z3 from "zod/v3";
3
+
4
+ //#region src/types.d.ts
5
+ type ZodType = z3.ZodTypeAny | z4.$ZodType;
6
+ type ZodTypeKind = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "date" | "array" | "null" | "void" | "any" | "unknown" | "union" | "intersection";
7
+ /**
8
+ * Extracted metadata from a Zod schema.
9
+ */
10
+ interface ZodTypeInfo {
11
+ kind: ZodTypeKind;
12
+ optional: boolean;
13
+ defaultValue?: unknown;
14
+ description?: string;
15
+ variadic: boolean;
16
+ choices?: (string | number)[];
17
+ }
18
+ //#endregion
19
+ export { ZodType, ZodTypeInfo, ZodTypeKind };
20
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,OAAA,GAAU,EAAA,CAAG,aAAa,EAAA,CAAG;KAE7B,WAAA;AAFZ;AAEA;AAqBA;UAAiB,WAAA;QACT"}
package/dist/types.mjs ADDED
@@ -0,0 +1 @@
1
+ export { };
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@stryke/zod",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "A package containing helper utilities for working with zod schemas.",
6
+ "repository": {
7
+ "type": "github",
8
+ "url": "https://github.com/storm-software/stryke.git",
9
+ "directory": "packages/zod"
10
+ },
11
+ "private": false,
12
+ "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" },
13
+ "peerDependenciesMeta": { "zod": { "optional": true } },
14
+ "dependencies": {
15
+ "@stryke/type-checks": "^0.5.26",
16
+ "zod-to-json-schema": "^3.25.1"
17
+ },
18
+ "devDependencies": { "tsdown": "^0.17.2", "zod": "^4.3.6" },
19
+ "publishConfig": { "access": "public" },
20
+ "main": "./dist/index.cjs",
21
+ "module": "./dist/index.mjs",
22
+ "types": "./dist/index.d.cts",
23
+ "exports": {
24
+ ".": { "require": "./dist/index.cjs", "import": "./dist/index.mjs" },
25
+ "./is-zod-type": {
26
+ "require": "./dist/is-zod-type.cjs",
27
+ "import": "./dist/is-zod-type.mjs"
28
+ },
29
+ "./schema": {
30
+ "require": "./dist/schema.cjs",
31
+ "import": "./dist/schema.mjs"
32
+ },
33
+ "./types": { "require": "./dist/types.cjs", "import": "./dist/types.mjs" },
34
+ "./*": "./*"
35
+ },
36
+ "gitHead": "e569c1db49bd29cef0513170e5490a61a61578cf"
37
+ }