open-index/open-npm huggingface dataset:
npm package: @rexeus/typeweaver-aws-cdk
Description: Generates AWS CDK helpers to provision the infrastructure your APIs need. Powered by Typeweaver 🧵✨
Author: Dennis Wentzien
Latest version: 0.10.1

# 🧵✨ @rexeus/typeweaver-aws-cdk

[![npm version](https://img.shields.io/npm/v/@rexeus/typeweaver-aws-cdk.svg)](https://www.npmjs.com/package/@rexeus/typeweaver-aws-cdk)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)

Typeweaver is a type-safe HTTP API framework built for API-first development with a focus on
developer experience. Use typeweaver to specify your HTTP APIs in TypeScript and Zod, and generate
clients, validators, routers, and more ✨

## 📝 AWS CDK Plugin

This plugin generates utils for the AWS CDK from your typeweaver API definitions, making it easy to
deploy type-safe APIs to AWS. Currently only the AWS API Gateway HTTP API (V2) is supported.

---

## 📥 Installation

```bash
# Install the CLI and the plugin as a dev dependency
npm install -D @rexeus/typeweaver @rexeus/typeweaver-aws-cdk

# Install the runtime as a dependency
npm install @rexeus/typeweaver-core
```

## 💡 How to use

```bash
npx typeweaver generate --input ./api/spec/index.ts --output ./api/generated --plugins aws-cdk
```

More details on how to use the
[CLI](https://github.com/rexeus/typeweaver/tree/main/packages/cli/README.md#️-cli).

## 📂 Generated Output

For each resource, one file is generated: `<ResourceName>HttpApiRoutes.ts`.

This file contains a generated class `<ResourceName>HttpApiRoutes` that includes all routes for its
defined operations, e.g. `TodoHttpApiRoutes`.

**Using the generated routes**

```typescript
import { Construct } from "constructs";
import { HttpApi } from "aws-cdk-lib/aws-apigatewayv2";
import { HttpLambdaIntegration } from "aws-cdk-lib/aws-apigatewayv2-integrations";
import { NodejsFunction } from "aws-cdk-lib/aws-lambda-nodejs";
import { TodoHttpApiRoutes } from "path/to/generated/output";

type TodoApiProps = {
  // Provide an HttpApi instance, where the routes for the resource should be added
  readonly httpApi: HttpApi;
  // ...
};

export class TodoApi extends Construct {
  public constructor(
    scope: Construct,
    id: string,
    private readonly props: TodoApiProps
  ) {
    // A Lambda handler for the resource API
    const apiHandler = new NodejsFunction(this, "Handler", {
      // ...
    });
    const integration = new HttpLambdaIntegration("Integration", apiHandler);

    // Get all routes
    const routes = new TodoHttpApiRoutes().getRoutes();
    for (const endpoint of routes) {
      // Register the routes with the HTTP API
      this.props.httpApi.addRoutes({
        integration,
        path: endpoint.path,
        methods: endpoint.methods,
      });
    }
  }
}
```

## 📄 License

Apache 2.0 © Dennis Wentzien 2026
npm package: @rexeus/typeweaver-core
Description: Runtime utilities and shared types to drive type-safe API definitions. Powered by Typeweaver 🧵✨
Author: Dennis Wentzien
Latest version: 0.10.1

# 🧵✨ @rexeus/typeweaver-core

[![npm version](https://img.shields.io/npm/v/@rexeus/typeweaver-core.svg)](https://www.npmjs.com/package/@rexeus/typeweaver-core)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)

Typeweaver is a type-safe HTTP API framework built for API-first development with a focus on
developer experience. Use typeweaver to specify your HTTP APIs in TypeScript and Zod, and generate
clients, validators, routers, and more ✨

## 📝 Core Package

Core runtime and authoring types for typeweaver. This package provides the HTTP primitives,
functional spec helpers, validators, and error types that all generators and plugins build on.
Generated code imports these runtime utilities.

---

## 📥 Installation

```bash
npm install @rexeus/typeweaver-core
```

## 💡 How to use

This package is typically consumed by generated code. You also use it when authoring specs via
`defineSpec`, `defineOperation`, and `defineResponse`. To get started with generation, see
[@rexeus/typeweaver](https://github.com/rexeus/typeweaver/tree/main/packages/cli/README.md).

## 🔧 What It Provides

- **HTTP primitives**: `HttpMethod`, `HttpStatusCode`, `IHttpRequest`, `IHttpResponse`,
  `ITypedHttpResponse`.
- **Spec authoring**: `defineSpec`, `defineOperation`, `defineResponse`, `defineDerivedResponse` —
  the functional API for declaring your API contracts.
- **Type guards**: `isTypedHttpResponse` for runtime discrimination of typed response objects.
- **Validation**: `IRequestValidator`, `IResponseValidator`, plus `RequestValidationError` and
  `ResponseValidationError` with structured issues.
- **Utilities**: `UnknownResponseError` for unrecognized responses.

This package does not ship framework adapters. Use plugins like `@rexeus/typeweaver-hono` or
`@rexeus/typeweaver-aws-cdk` for routers/integrations.

## 🏷️ Naming conventions

- `operationId` should use camelCase (preferred), for example `getUser`.
- PascalCase `operationId` values are still supported.
- snake_case and kebab-case `operationId` values are not supported.
- `resourceName` should preferably be a singular noun in camelCase, for example `user` or
  `authSession`.
- Plural and PascalCase `resourceName` values are supported.
- snake_case and kebab-case `resourceName` values are not supported.

## 📄 License

Apache 2.0 © Dennis Wentzien 2026
npm package: @rexeus/typeweaver-zod-to-ts
Description: Transforms Zod v4 schemas into precise TypeScript shapes. Powered by Typeweaver 🧵✨
Author: Dennis Wentzien
Latest version: 0.10.1

# 🔄✨ @rexeus/typeweaver-zod-to-ts

[![npm version](https://img.shields.io/npm/v/@rexeus/typeweaver-zod-to-ts.svg)](https://www.npmjs.com/package/@rexeus/typeweaver-zod-to-ts)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)

This utility library provides logic for converting Zod v4 schemas into TypeScript type
representations. It is used internally by typeweaver to generate TypeScript types from Zod schemas.

---

## 📥 Installation

```bash
npm install @rexeus/typeweaver-zod-to-ts
```

## 💡 How to use

```typescript
import { TsTypeNode, TsTypePrinter } from "@rexeus/typeweaver-zod-to-ts";
import { z } from "zod";

// Define a Zod schema
const userSchema = z.object({
  id: z.string(),
  name: z.string(),
  email: z.string().email(),
  age: z.number().optional(),
});

// Convert to TypeScript AST node
const typeNode = TsTypeNode.fromZod(userSchema);

// Print as TypeScript type string
const typeString = TsTypePrinter.print(typeNode);
// Output: { id: string; name: string; email: string; age?: number | undefined; }
```

## ✏️ Zod Type Support

### ✅ Supported Types

The library provides complete TypeScript type generation for the following Zod schema types:

- **Primitives**: `z.string()`, `z.number()`, `z.boolean()`, `z.date()`, `z.bigint()`, `z.symbol()`
- **Literals**: `z.literal()`, `z.enum()`
- **Collections**: `z.array()`, `z.record()`, `z.map()`, `z.set()`, `z.tuple()`
- **Objects**: `z.object()` with nested properties and optional fields
- **Unions**: `z.union()`
- **Intersections**: `z.intersection()`
- **Modifiers**: `z.optional()`, `z.nullable()`
- **Special types**: `z.unknown()`, `z.any()`, `z.void()`, `z.never()`, `z.null()`, `z.undefined()`
- **Async types**: `z.promise()`

### ⚠️ Unsupported Types

The following Zod types are not yet implemented and will fall back to `unknown` type:

- **Advanced types**: `z.lazy()`, `z.templateLiteral()`, `z.custom()`, `z.transform()`, `z.pipe()`
- **Modifiers**: `z.nonOptional()`, `z.readonly()`, `z.default()`, `z.catch()`
- **Special types**: `z.nan()`, `z.file()`, `z.success()`

> **Note**: When encountering unsupported Zod types, the library gracefully falls back to
> TypeScript's `unknown` type to maintain type safety.

## 🧵✨ About typeweaver

Typeweaver is a type-safe HTTP API framework built for API-first development with a focus on
developer experience. Use typeweaver to specify your HTTP APIs in TypeScript and Zod, and generate
clients, validators, routers, and more ✨

See more of [typeweaver](https://github.com/rexeus/typeweaver/tree/main/packages/cli/README.md)

## 📄 License

Apache 2.0 © Dennis Wentzien 2026