@mshick/dyno
v1.0.0
Published
A simple DynamoDB client.
Downloads
260
Readme
@mshick/dyno
A simple DynamoDB client, inspired by dyno.
Install
pnpm add @mshick/dynoExample
import { Dyno } from '@mshick/dyno';
const table = new Dyno({ table: 'my-table', region: 'us-east-1' });
await table.ensureTable({
AttributeDefinitions: [{ AttributeName: 'id', AttributeType: 'S' }],
KeySchema: [{ AttributeName: 'id', KeyType: 'HASH' }],
});
await table.batchPutAll([{ id: 'a' }, { id: 'b' }]).sendAll();
const { Items } = await table.scan({ Pages: Infinity });
console.log(Items); // [{id: 'a'}, {id: 'b'}]For supported methods and more examples, see the Dyno tests.
Development
This project uses pnpm. Tests use a local DynamoDB via
Docker (docker-compose.yml), so make sure Docker is running.
pnpm install
pnpm test # spins up DynamoDB, runs vitest
pnpm check # tsc --noEmit
pnpm lint # biome check
pnpm build # emits dist/Release
Releases are driven by release-please
on the main branch. PR titles and the first commit on a branch must follow
Conventional Commits (e.g.
feat: add new method, fix: handle empty batch). Subsequent commits on a
branch can use plain descriptive messages.
