0.0.9 • Published 9 months ago

zod-cdk-context v0.0.9

Weekly downloads
-
License
-
Repository
github
Last release
9 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

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago