@infra-blocks/zod-utils 0.2.0-alpha.0 → 0.3.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/README.md CHANGED
@@ -35,9 +35,9 @@ zu.json().parse({
35
35
  }
36
36
  });
37
37
  // Throws for bullshit.
38
- zu.json().parse(undefined);
39
- zu.json().parse(Symbol("nope"));
40
- zu.json().parse(new Set());
38
+ zu.json().parse(undefined); // Boom.
39
+ zu.json().parse(Symbol("nope")); // Boom.
40
+ zu.json().parse(new Set()); // Boom.
41
41
  // etc...
42
42
 
43
43
  // You can also parse stringified JSON!
@@ -46,14 +46,41 @@ zu.json.stringified().parse('"JSON string"'); // Returns "JSON string". Note the
46
46
  zu.json.stringified().parse(JSON.strinfify({ field: "value" })); // Returns {field: "value"}.
47
47
 
48
48
  // Inferred types are exported for convenience.
49
- import { Json, Literal } from "@infra-blocks/zod-utils/json";
49
+ import { Json } from "@infra-blocks/zod-utils/json";
50
50
 
51
51
  // Compiles.
52
52
  const myJson: Json = { hello: "world" };
53
- // Doesn't compile.
53
+ // Doesn't compile: undefined is not valid JSON.
54
54
  const boom: Json = { nope: undefined };
55
55
  ````
56
56
 
57
+ The package also allows using sub schemas:
58
+
59
+ ```typescript
60
+ import { zu } from "@infra-blocks/zod-utils";
61
+ import { JsonArray, JsonObject, JsonPrimitive } from "@infra-blocks/zod-utils/json";
62
+
63
+ // The type hints are used just to showcase their usage. They aren't necessary when parsing.
64
+ // Want to parse a JSON primitive?
65
+ const jsonPrimitive: JsonPrimitive = zu.json.primitive().parse(5);
66
+ // Will throw for anything that is not a JSON primitive.
67
+ zu.json.primitive().parse([]); // Boom.
68
+ zu.json.primitive().parse({}); // Boom.
69
+ zu.json.primitive().parse(undefined); // Boom.
70
+
71
+ // A JSON array maybe?
72
+ const jsonArray: JsonArray = zu.json.array().parse([1, 2, 3]);
73
+ // Will throw for anything that is not a JSON array.
74
+ zu.json.array().parse(5); // Boom.
75
+ zu.json.array().parse({}); // Boom.
76
+
77
+ // And finally, what about making sure you get a JSON object?
78
+ const jsonObject: JsonObject = zu.json.object().parse({ hello: "world" });
79
+ // You know it by now, but just to make sure.
80
+ zu.json.object().parse(5); // Boom.
81
+ zu.json.object().parse([]); // Boom.
82
+ ```
83
+
57
84
  ## Development
58
85
 
59
86
  ### Repo init
@@ -1,8 +1,10 @@
1
1
  declare const zu: {
2
2
  json: {
3
3
  (): import("zod").ZodType<import("./json/json.js").Json, import("zod").ZodTypeDef, import("./json/json.js").Json>;
4
+ array: typeof import("./json/json.js").array;
5
+ object: typeof import("./json/json.js").object;
6
+ primitive: typeof import("./json/json.js").primitive;
4
7
  stringified: typeof import("./json/json.js").stringifiedJson;
5
- literal: typeof import("./json/json.js").literal;
6
8
  };
7
9
  };
8
10
  export { zu };
@@ -1,7 +1,9 @@
1
- import { literal, stringifiedJson } from "./json.js";
1
+ import { array, object, primitive, stringifiedJson } from "./json.js";
2
2
  declare const module: {
3
3
  (): import("zod").ZodType<import("./json.js").Json, import("zod").ZodTypeDef, import("./json.js").Json>;
4
+ array: typeof array;
5
+ object: typeof object;
6
+ primitive: typeof primitive;
4
7
  stringified: typeof stringifiedJson;
5
- literal: typeof literal;
6
8
  };
7
9
  export { module as json };
@@ -6,8 +6,10 @@ const module = (() => {
6
6
  function module() {
7
7
  return (0, json_js_1.json)();
8
8
  }
9
+ module.array = json_js_1.array;
10
+ module.object = json_js_1.object;
11
+ module.primitive = json_js_1.primitive;
9
12
  module.stringified = json_js_1.stringifiedJson;
10
- module.literal = json_js_1.literal;
11
13
  return module;
12
14
  })();
13
15
  exports.json = module;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/json/index.ts"],"names":[],"mappings":";;;AAAA,uCAA2D;AAE3D,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;IACnB,SAAS,MAAM;QACb,OAAO,IAAA,cAAI,GAAE,CAAC;IAChB,CAAC;IACD,MAAM,CAAC,WAAW,GAAG,yBAAe,CAAC;IACrC,MAAM,CAAC,OAAO,GAAG,iBAAO,CAAC;IAEzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,EAAE,CAAC;AAEc,sBAAI"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/json/index.ts"],"names":[],"mappings":";;;AAAA,uCAA4E;AAE5E,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;IACnB,SAAS,MAAM;QACb,OAAO,IAAA,cAAI,GAAE,CAAC;IAChB,CAAC;IACD,MAAM,CAAC,KAAK,GAAG,eAAK,CAAC;IACrB,MAAM,CAAC,MAAM,GAAG,gBAAM,CAAC;IACvB,MAAM,CAAC,SAAS,GAAG,mBAAS,CAAC;IAC7B,MAAM,CAAC,WAAW,GAAG,yBAAe,CAAC;IAErC,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,EAAE,CAAC;AAEc,sBAAI"}
@@ -1,11 +1,15 @@
1
1
  import { z } from "zod";
2
- declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
3
- export type Literal = z.infer<typeof literalSchema>;
4
- export declare function literal(): z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
5
- export type Json = Literal | {
2
+ declare const primitiveSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
3
+ export type JsonPrimitive = z.infer<typeof primitiveSchema>;
4
+ export declare function primitive(): z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
5
+ export type JsonObject = {
6
6
  [key: string]: Json;
7
- } | Json[];
7
+ };
8
+ export type JsonArray = Array<Json>;
9
+ export type Json = JsonPrimitive | JsonObject | JsonArray;
8
10
  export declare function json(): z.ZodType<Json, z.ZodTypeDef, Json>;
11
+ export declare function object(): z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>;
12
+ export declare function array(): z.ZodArray<z.ZodType<Json, z.ZodTypeDef, Json>, "many">;
9
13
  export declare const stringifiedJsonSchema: z.ZodType<Json, z.ZodTypeDef, string>;
10
14
  export declare function stringifiedJson(): z.ZodType<Json, z.ZodTypeDef, string>;
11
15
  export {};
@@ -1,17 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stringifiedJson = exports.stringifiedJsonSchema = exports.json = exports.literal = void 0;
3
+ exports.stringifiedJson = exports.stringifiedJsonSchema = exports.array = exports.object = exports.json = exports.primitive = void 0;
4
4
  const zod_1 = require("zod");
5
- const literalSchema = zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.null()]);
6
- function literal() {
7
- return literalSchema;
5
+ const primitiveSchema = zod_1.z.union([
6
+ zod_1.z.string(),
7
+ zod_1.z.number(),
8
+ zod_1.z.boolean(),
9
+ zod_1.z.null(),
10
+ ]);
11
+ function primitive() {
12
+ return primitiveSchema;
8
13
  }
9
- exports.literal = literal;
10
- const jsonSchema = zod_1.z.lazy(() => zod_1.z.union([literal(), zod_1.z.array(jsonSchema), zod_1.z.record(jsonSchema)]));
14
+ exports.primitive = primitive;
15
+ const jsonSchema = zod_1.z.lazy(() => zod_1.z.union([primitive(), zod_1.z.array(jsonSchema), zod_1.z.record(jsonSchema)]));
11
16
  function json() {
12
17
  return jsonSchema;
13
18
  }
14
19
  exports.json = json;
20
+ const objectSchema = zod_1.z.record(jsonSchema);
21
+ function object() {
22
+ return objectSchema;
23
+ }
24
+ exports.object = object;
25
+ const arraySchema = zod_1.z.array(jsonSchema);
26
+ function array() {
27
+ return arraySchema;
28
+ }
29
+ exports.array = array;
15
30
  exports.stringifiedJsonSchema = zod_1.z
16
31
  .string()
17
32
  .transform((str, ctx) => {
@@ -1 +1 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/json/json.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,aAAa,GAAG,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AAgB,SAAS;IACvB,OAAO,eAAe,CAAC;AACzB,CAAC;AAFD,8BAEC;AAMD,MAAM,UAAU,GAAoB,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC9C,OAAC,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,OAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAClE,CAAC;AACF,SAAgB,IAAI;IAClB,OAAO,UAAU,CAAC;AACpB,CAAC;AAFD,oBAEC;AAED,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAC1C,SAAgB,MAAM;IACpB,OAAO,YAAY,CAAC;AACtB,CAAC;AAFD,wBAEC;AAED,MAAM,WAAW,GAAG,OAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AACxC,SAAgB,KAAK;IACnB,OAAO,WAAW,CAAC;AACrB,CAAC;AAFD,sBAEC;AAEY,QAAA,qBAAqB,GAA0C,OAAC;KAC1E,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACtB,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAS,CAAC;KAChC;IAAC,OAAO,CAAC,EAAE;QACV,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;QAC1D,OAAO,OAAC,CAAC,KAAK,CAAC;KAChB;AACH,CAAC,CAAC,CAAC;AAEL,SAAgB,eAAe;IAC7B,OAAO,6BAAqB,CAAC;AAC/B,CAAC;AAFD,0CAEC"}
@@ -1 +1 @@
1
- export type { Literal, Json } from "./json.js";
1
+ export type { JsonPrimitive, JsonObject, JsonArray, Json } from "./json.js";
@@ -1,8 +1,10 @@
1
1
  declare const zu: {
2
2
  json: {
3
3
  (): import("zod").ZodType<import("./json/json.js").Json, import("zod").ZodTypeDef, import("./json/json.js").Json>;
4
+ array: typeof import("./json/json.js").array;
5
+ object: typeof import("./json/json.js").object;
6
+ primitive: typeof import("./json/json.js").primitive;
4
7
  stringified: typeof import("./json/json.js").stringifiedJson;
5
- literal: typeof import("./json/json.js").literal;
6
8
  };
7
9
  };
8
10
  export { zu };
@@ -1,7 +1,9 @@
1
- import { literal, stringifiedJson } from "./json.js";
1
+ import { array, object, primitive, stringifiedJson } from "./json.js";
2
2
  declare const module: {
3
3
  (): import("zod").ZodType<import("./json.js").Json, import("zod").ZodTypeDef, import("./json.js").Json>;
4
+ array: typeof array;
5
+ object: typeof object;
6
+ primitive: typeof primitive;
4
7
  stringified: typeof stringifiedJson;
5
- literal: typeof literal;
6
8
  };
7
9
  export { module as json };
@@ -1,10 +1,12 @@
1
- import { json, literal, stringifiedJson } from "./json.js";
1
+ import { array, object, json, primitive, stringifiedJson } from "./json.js";
2
2
  const module = (() => {
3
3
  function module() {
4
4
  return json();
5
5
  }
6
+ module.array = array;
7
+ module.object = object;
8
+ module.primitive = primitive;
6
9
  module.stringified = stringifiedJson;
7
- module.literal = literal;
8
10
  return module;
9
11
  })();
10
12
  export { module as json };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/json/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE3D,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;IACnB,SAAS,MAAM;QACb,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IACD,MAAM,CAAC,WAAW,GAAG,eAAe,CAAC;IACrC,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IAEzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/json/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5E,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;IACnB,SAAS,MAAM;QACb,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IACD,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,WAAW,GAAG,eAAe,CAAC;IAErC,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,CAAC"}
@@ -1,11 +1,15 @@
1
1
  import { z } from "zod";
2
- declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
3
- export type Literal = z.infer<typeof literalSchema>;
4
- export declare function literal(): z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
5
- export type Json = Literal | {
2
+ declare const primitiveSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
3
+ export type JsonPrimitive = z.infer<typeof primitiveSchema>;
4
+ export declare function primitive(): z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
5
+ export type JsonObject = {
6
6
  [key: string]: Json;
7
- } | Json[];
7
+ };
8
+ export type JsonArray = Array<Json>;
9
+ export type Json = JsonPrimitive | JsonObject | JsonArray;
8
10
  export declare function json(): z.ZodType<Json, z.ZodTypeDef, Json>;
11
+ export declare function object(): z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>;
12
+ export declare function array(): z.ZodArray<z.ZodType<Json, z.ZodTypeDef, Json>, "many">;
9
13
  export declare const stringifiedJsonSchema: z.ZodType<Json, z.ZodTypeDef, string>;
10
14
  export declare function stringifiedJson(): z.ZodType<Json, z.ZodTypeDef, string>;
11
15
  export {};
@@ -1,12 +1,25 @@
1
1
  import { z } from "zod";
2
- const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
3
- export function literal() {
4
- return literalSchema;
2
+ const primitiveSchema = z.union([
3
+ z.string(),
4
+ z.number(),
5
+ z.boolean(),
6
+ z.null(),
7
+ ]);
8
+ export function primitive() {
9
+ return primitiveSchema;
5
10
  }
6
- const jsonSchema = z.lazy(() => z.union([literal(), z.array(jsonSchema), z.record(jsonSchema)]));
11
+ const jsonSchema = z.lazy(() => z.union([primitive(), z.array(jsonSchema), z.record(jsonSchema)]));
7
12
  export function json() {
8
13
  return jsonSchema;
9
14
  }
15
+ const objectSchema = z.record(jsonSchema);
16
+ export function object() {
17
+ return objectSchema;
18
+ }
19
+ const arraySchema = z.array(jsonSchema);
20
+ export function array() {
21
+ return arraySchema;
22
+ }
10
23
  export const stringifiedJsonSchema = z
11
24
  .string()
12
25
  .transform((str, ctx) => {
@@ -1 +1 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/json/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAE/E,MAAM,UAAU,OAAO;IACrB,OAAO,aAAa,CAAC;AACvB,CAAC;AAGD,MAAM,UAAU,GAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC9C,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAChE,CAAC;AACF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AO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AACxC,MAAM,UAAU,KAAK;IACnB,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAA0C,CAAC;KAC1E,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACtB,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAS,CAAC;KAChC;IAAC,OAAO,CAAC,EAAE;QACV,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAC,CAAC,KAAK,CAAC;KAChB;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,UAAU,eAAe;IAC7B,OAAO,qBAAqB,CAAC;AAC/B,CAAC"}
@@ -1 +1 @@
1
- export type { Literal, Json } from "./json.js";
1
+ export type { JsonPrimitive, JsonObject, JsonArray, Json } from "./json.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infra-blocks/zod-utils",
3
- "version": "0.2.0-alpha.0",
3
+ "version": "0.3.0-alpha.0",
4
4
  "description": "Extensions to the zod package.",
5
5
  "license": "ISC",
6
6
  "author": "",