0.0.9 • Published 10 months ago

zod-cdk-context v0.0.9

Weekly downloads
-
License
-
Repository
github
Last release
10 months ago

Get and validate AWS CDK context against Zod schema. Get typed, validated context as a result, or error will be thrown.

import { getValidatedContext, z } from 'zod-cdk-context'

// {foo: string; bar?: string; baz: number}
const { foo, bar, baz } = getValidatedContext(app.node, {
  foo: z.string().min(1),
  bar: z.string().min(1).optional(),
  baz: z.coerce.number(),
})

Article with some implementation details

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago