@infra-blocks/zod-utils 0.5.0-alpha.0 → 0.5.0-alpha.1

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 (48) hide show
  1. package/README.md +4 -23
  2. package/lib/cjs/geojson/base.d.ts +2 -6
  3. package/lib/cjs/geojson/bounding-box.d.ts +2 -2
  4. package/lib/cjs/geojson/coordinate.d.ts +2 -2
  5. package/lib/cjs/geojson/feature-collection.d.ts +50 -634
  6. package/lib/cjs/geojson/feature.d.ts +46 -378
  7. package/lib/cjs/geojson/feature.js +1 -1
  8. package/lib/cjs/geojson/feature.js.map +1 -1
  9. package/lib/cjs/geojson/geojson.d.ts +134 -1146
  10. package/lib/cjs/geojson/geometry.d.ts +39 -135
  11. package/lib/cjs/geojson/index.d.ts +67 -573
  12. package/lib/cjs/geojson/line-string.d.ts +6 -22
  13. package/lib/cjs/geojson/multi-line-string.d.ts +6 -22
  14. package/lib/cjs/geojson/multi-point.d.ts +6 -22
  15. package/lib/cjs/geojson/multi-polygon.d.ts +6 -22
  16. package/lib/cjs/geojson/point.d.ts +6 -22
  17. package/lib/cjs/geojson/polygon.d.ts +6 -22
  18. package/lib/cjs/index.d.ts +93 -596
  19. package/lib/cjs/index.js +9 -0
  20. package/lib/cjs/index.js.map +1 -1
  21. package/lib/cjs/json/index.d.ts +1 -1
  22. package/lib/cjs/json/json.d.ts +7 -7
  23. package/lib/cjs/json/json.js +2 -2
  24. package/lib/cjs/json/json.js.map +1 -1
  25. package/lib/esm/geojson/base.d.ts +2 -6
  26. package/lib/esm/geojson/bounding-box.d.ts +2 -2
  27. package/lib/esm/geojson/coordinate.d.ts +2 -2
  28. package/lib/esm/geojson/feature-collection.d.ts +50 -634
  29. package/lib/esm/geojson/feature.d.ts +46 -378
  30. package/lib/esm/geojson/feature.js +1 -1
  31. package/lib/esm/geojson/feature.js.map +1 -1
  32. package/lib/esm/geojson/geojson.d.ts +134 -1146
  33. package/lib/esm/geojson/geometry.d.ts +39 -135
  34. package/lib/esm/geojson/index.d.ts +67 -573
  35. package/lib/esm/geojson/line-string.d.ts +6 -22
  36. package/lib/esm/geojson/multi-line-string.d.ts +6 -22
  37. package/lib/esm/geojson/multi-point.d.ts +6 -22
  38. package/lib/esm/geojson/multi-polygon.d.ts +6 -22
  39. package/lib/esm/geojson/point.d.ts +6 -22
  40. package/lib/esm/geojson/polygon.d.ts +6 -22
  41. package/lib/esm/index.d.ts +93 -596
  42. package/lib/esm/index.js +9 -0
  43. package/lib/esm/index.js.map +1 -1
  44. package/lib/esm/json/index.d.ts +1 -1
  45. package/lib/esm/json/json.d.ts +7 -7
  46. package/lib/esm/json/json.js +2 -2
  47. package/lib/esm/json/json.js.map +1 -1
  48. package/package.json +3 -3
package/README.md CHANGED
@@ -1,12 +1,11 @@
1
1
  # ts-zod-utils
2
- [![Build](https://github.com/infrastructure-blocks/ts-zod-utils/actions/workflows/build.yml/badge.svg)](https://github.com/infrastructure-blocks/ts-zod-utils/actions/workflows/build.yml)
3
- [![Release](https://github.com/infrastructure-blocks/ts-zod-utils/actions/workflows/release.yml/badge.svg)](https://github.com/infrastructure-blocks/ts-zod-utils/actions/workflows/release.yml)
4
- [![Update From Template](https://github.com/infrastructure-blocks/ts-zod-utils/actions/workflows/update-from-template.yml/badge.svg)](https://github.com/infrastructure-blocks/ts-zod-utils/actions/workflows/update-from-template.yml)
5
- [![codecov](https://codecov.io/gh/infrastructure-blocks/ts-zod-utils/graph/badge.svg?token=vyI1qM1EZg)](https://codecov.io/gh/infrastructure-blocks/ts-zod-utils)
2
+ [![Build](https://github.com/infra-blocks/ts-zod-utils/actions/workflows/build.yml/badge.svg)](https://github.com/infra-blocks/ts-zod-utils/actions/workflows/build.yml)
3
+ [![Release](https://github.com/infra-blocks/ts-zod-utils/actions/workflows/release.yml/badge.svg)](https://github.com/infra-blocks/ts-zod-utils/actions/workflows/release.yml)
4
+ [![Update From Template](https://github.com/infra-blocks/ts-zod-utils/actions/workflows/update-from-template.yml/badge.svg)](https://github.com/infra-blocks/ts-zod-utils/actions/workflows/update-from-template.yml)
5
+ [![codecov](https://codecov.io/gh/infra-blocks/ts-zod-utils/graph/badge.svg?token=Q9ZLX7AMPH)](https://codecov.io/gh/infra-blocks/ts-zod-utils)
6
6
 
7
7
  This package exposes various utilities extending the [zod](https://www.npmjs.com/package/zod) package.
8
8
 
9
- <<<<<<< HEAD
10
9
  ## API
11
10
 
12
11
  - [geojson](#geojson)
@@ -221,21 +220,3 @@ const jsonObject: JsonObject = zu.json.object().parse({ hello: "world" });
221
220
  zu.json.object().parse(5); // Boom.
222
221
  zu.json.object().parse([]); // Boom.
223
222
  ```
224
- =======
225
- Follow these steps after instantiating the template:
226
- - Remove the [trigger update from template workflow](.github/workflows/trigger-update-from-template.yml)
227
- - Do a global search & replace for `ts-lib-template` and replace it with the name of your repository
228
- - Likewise, do a search and replace for the *name of the package* in the `package.json` file
229
- - Configure code coverage
230
- - Update the status badges:
231
- - Replace the `Trigger Update From Template` status badge for the `Update From Template` status badge.
232
- - Update package.json
233
- - Edit the search keywords
234
- - Edit the description
235
- - Describe the package and its usage in this readme.
236
- - Replace the [changelog](CHANGELOG.md) with the [stub](CHANGELOG-STUB.md) and prepare it for the first version of
237
- the package that will be released.
238
- - Run `nvm install && npm install`
239
- - Run `npm run compile && npm run lint && npm run test`
240
- - Edit the `.npmrc` file if you wish to change the defaults. Specifically, if you wish to make your package private.
241
- >>>>>>> template/master
@@ -1,8 +1,4 @@
1
1
  import { z } from "zod";
2
2
  export declare const schemaWithBoundingBox: z.ZodObject<{
3
- bbox: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
4
- }, "strict", z.ZodTypeAny, {
5
- bbox?: [number, number, number, number] | [number, number, number, number, number, number] | undefined;
6
- }, {
7
- bbox?: [number, number, number, number] | [number, number, number, number, number, number] | undefined;
8
- }>;
3
+ bbox: z.ZodOptional<z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
4
+ }, z.core.$strict>;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- declare const boundingBoxSchema: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
2
+ declare const boundingBoxSchema: z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
3
3
  export type GeoJsonBoundingBox = z.infer<typeof boundingBoxSchema>;
4
- export declare function boundingBox(): z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
4
+ export declare function boundingBox(): z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- declare const schema: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
2
+ declare const schema: z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
3
3
  export type GeoJsonCoordinate = z.infer<typeof schema>;
4
- export declare function coordinate(): z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
4
+ export declare function coordinate(): z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
5
5
  export {};