@infra-blocks/zod-utils 0.10.0-alpha.0 → 0.10.0-alpha.2

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.
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
- declare const schema: z.ZodEnum<{
2
+ declare const schema: z.core.$ZodBranded<z.ZodEnum<{
3
3
  [x: string]: string;
4
- }>;
4
+ }>, "AwsPartition">;
5
5
  export type AwsPartition = z.infer<typeof schema>;
6
6
  /**
7
7
  * Validates that a string is a valid AWS partition.
@@ -13,7 +13,7 @@ export type AwsPartition = z.infer<typeof schema>;
13
13
  *
14
14
  * @see https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html
15
15
  */
16
- export declare function partition(): z.ZodEnum<{
16
+ export declare function partition(): z.core.$ZodBranded<z.ZodEnum<{
17
17
  [x: string]: string;
18
- }>;
18
+ }>, "AwsPartition">;
19
19
  export {};
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.partition = partition;
4
4
  const zod_1 = require("zod");
5
5
  const AWS_PARTITIONS = ["aws", "aws-cn", "aws-us-gov"];
6
- const schema = zod_1.z.enum(AWS_PARTITIONS);
6
+ const schema = zod_1.z.enum(AWS_PARTITIONS).brand("AwsPartition");
7
7
  /**
8
8
  * Validates that a string is a valid AWS partition.
9
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../src/aws/partition.ts"],"names":[],"mappings":";;AAkBA,8BAEC;AApBD,6BAAwB;AAExB,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AAEvD,MAAM,MAAM,GAAG,OAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAItC;;;;;;;;;GASG;AACH,SAAgB,SAAS;IACvB,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../src/aws/partition.ts"],"names":[],"mappings":";;AAkBA,8BAEC;AApBD,6BAAwB;AAExB,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AAEvD,MAAM,MAAM,GAAG,OAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AAI5D;;;;;;;;;GASG;AACH,SAAgB,SAAS;IACvB,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- declare const schema: z.ZodEnum<{
2
+ declare const schema: z.core.$ZodBranded<z.ZodEnum<{
3
3
  "us-east-1": "us-east-1";
4
4
  "us-east-2": "us-east-2";
5
5
  "us-west-1": "us-west-1";
@@ -38,7 +38,7 @@ declare const schema: z.ZodEnum<{
38
38
  "sa-east-1": "sa-east-1";
39
39
  "us-gov-east-1": "us-gov-east-1";
40
40
  "us-gov-west-1": "us-gov-west-1";
41
- }>;
41
+ }>, "AwsRegion">;
42
42
  export type AwsRegion = z.infer<typeof schema>;
43
43
  /**
44
44
  * Validates that a string is a valid AWS region.
@@ -48,7 +48,7 @@ export type AwsRegion = z.infer<typeof schema>;
48
48
  *
49
49
  * @returns A schema that validates AWS regions.
50
50
  */
51
- export declare function region(): z.ZodEnum<{
51
+ export declare function region(): z.core.$ZodBranded<z.ZodEnum<{
52
52
  "us-east-1": "us-east-1";
53
53
  "us-east-2": "us-east-2";
54
54
  "us-west-1": "us-west-1";
@@ -87,5 +87,5 @@ export declare function region(): z.ZodEnum<{
87
87
  "sa-east-1": "sa-east-1";
88
88
  "us-gov-east-1": "us-gov-east-1";
89
89
  "us-gov-west-1": "us-gov-west-1";
90
- }>;
90
+ }>, "AwsRegion">;
91
91
  export {};
@@ -42,7 +42,7 @@ const AWS_REGIONS = [
42
42
  "us-gov-east-1",
43
43
  "us-gov-west-1",
44
44
  ];
45
- const schema = zod_1.z.enum(AWS_REGIONS);
45
+ const schema = zod_1.z.enum(AWS_REGIONS).brand("AwsRegion");
46
46
  /**
47
47
  * Validates that a string is a valid AWS region.
48
48
  *
@@ -1 +1 @@
1
- {"version":3,"file":"region.js","sourceRoot":"","sources":["../../../src/aws/region.ts"],"names":[],"mappings":";;AAuDA,wBAEC;AAzDD,6BAAwB;AAExB,MAAM,WAAW,GAAG;IAClB,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,YAAY;IACZ,WAAW;IACX,eAAe;IACf,eAAe;CACP,CAAC;AAEX,MAAM,MAAM,GAAG,OAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAInC;;;;;;;GAOG;AACH,SAAgB,MAAM;IACpB,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"region.js","sourceRoot":"","sources":["../../../src/aws/region.ts"],"names":[],"mappings":";;AAuDA,wBAEC;AAzDD,6BAAwB;AAExB,MAAM,WAAW,GAAG;IAClB,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,YAAY;IACZ,WAAW;IACX,eAAe;IACf,eAAe;CACP,CAAC;AAEX,MAAM,MAAM,GAAG,OAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAItD;;;;;;;GAOG;AACH,SAAgB,MAAM;IACpB,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
- declare const schema: z.ZodEnum<{
2
+ declare const schema: z.core.$ZodBranded<z.ZodEnum<{
3
3
  [x: string]: string;
4
- }>;
4
+ }>, "AwsPartition">;
5
5
  export type AwsPartition = z.infer<typeof schema>;
6
6
  /**
7
7
  * Validates that a string is a valid AWS partition.
@@ -13,7 +13,7 @@ export type AwsPartition = z.infer<typeof schema>;
13
13
  *
14
14
  * @see https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html
15
15
  */
16
- export declare function partition(): z.ZodEnum<{
16
+ export declare function partition(): z.core.$ZodBranded<z.ZodEnum<{
17
17
  [x: string]: string;
18
- }>;
18
+ }>, "AwsPartition">;
19
19
  export {};
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  const AWS_PARTITIONS = ["aws", "aws-cn", "aws-us-gov"];
3
- const schema = z.enum(AWS_PARTITIONS);
3
+ const schema = z.enum(AWS_PARTITIONS).brand("AwsPartition");
4
4
  /**
5
5
  * Validates that a string is a valid AWS partition.
6
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../src/aws/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AAEvD,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAItC;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../src/aws/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AAEvD,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AAI5D;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- declare const schema: z.ZodEnum<{
2
+ declare const schema: z.core.$ZodBranded<z.ZodEnum<{
3
3
  "us-east-1": "us-east-1";
4
4
  "us-east-2": "us-east-2";
5
5
  "us-west-1": "us-west-1";
@@ -38,7 +38,7 @@ declare const schema: z.ZodEnum<{
38
38
  "sa-east-1": "sa-east-1";
39
39
  "us-gov-east-1": "us-gov-east-1";
40
40
  "us-gov-west-1": "us-gov-west-1";
41
- }>;
41
+ }>, "AwsRegion">;
42
42
  export type AwsRegion = z.infer<typeof schema>;
43
43
  /**
44
44
  * Validates that a string is a valid AWS region.
@@ -48,7 +48,7 @@ export type AwsRegion = z.infer<typeof schema>;
48
48
  *
49
49
  * @returns A schema that validates AWS regions.
50
50
  */
51
- export declare function region(): z.ZodEnum<{
51
+ export declare function region(): z.core.$ZodBranded<z.ZodEnum<{
52
52
  "us-east-1": "us-east-1";
53
53
  "us-east-2": "us-east-2";
54
54
  "us-west-1": "us-west-1";
@@ -87,5 +87,5 @@ export declare function region(): z.ZodEnum<{
87
87
  "sa-east-1": "sa-east-1";
88
88
  "us-gov-east-1": "us-gov-east-1";
89
89
  "us-gov-west-1": "us-gov-west-1";
90
- }>;
90
+ }>, "AwsRegion">;
91
91
  export {};
@@ -39,7 +39,7 @@ const AWS_REGIONS = [
39
39
  "us-gov-east-1",
40
40
  "us-gov-west-1",
41
41
  ];
42
- const schema = z.enum(AWS_REGIONS);
42
+ const schema = z.enum(AWS_REGIONS).brand("AwsRegion");
43
43
  /**
44
44
  * Validates that a string is a valid AWS region.
45
45
  *
@@ -1 +1 @@
1
- {"version":3,"file":"region.js","sourceRoot":"","sources":["../../../src/aws/region.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,GAAG;IAClB,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,YAAY;IACZ,WAAW;IACX,eAAe;IACf,eAAe;CACP,CAAC;AAEX,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAInC;;;;;;;GAOG;AACH,MAAM,UAAU,MAAM;IACpB,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"region.js","sourceRoot":"","sources":["../../../src/aws/region.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,GAAG;IAClB,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,YAAY;IACZ,WAAW;IACX,eAAe;IACf,eAAe;CACP,CAAC;AAEX,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAItD;;;;;;;GAOG;AACH,MAAM,UAAU,MAAM;IACpB,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infra-blocks/zod-utils",
3
- "version": "0.10.0-alpha.0",
3
+ "version": "0.10.0-alpha.2",
4
4
  "description": "Extensions to the zod package.",
5
5
  "keywords": [
6
6
  "zod",