Skip to content

Commit

Permalink
feat(build and clean): add build and clean commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jharlow committed Oct 10, 2024
1 parent e7fb671 commit 9e1871c
Show file tree
Hide file tree
Showing 9 changed files with 340 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
dist
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Auto-generate `dynamodb-onetable` model schemas using `zod`, with best-in-class

## Rationale

`dyanmodb-onetable` provides a fantastic API for building and interacting with DynamoDB single-table designs. In using it, I've come to appreciate a couple of areas I wanted something slightly different:
`dyanmodb-onetable` provides a fantastic API for building and interacting with DynamoDB single-table designs. In using it, I've come to appreciate a couple of areas where I wanted something slightly different:

1. The validation option offers a single regex pattern per field [(and we all know how regex goes)](https://regex.info/blog/2006-09-15/247)
2. Defining the schema can be tricky because using the supplied types clobbers the library's ability to infer your specific models
Expand All @@ -35,4 +35,3 @@ const accountSchema = z.object({
```

You can add it to your

12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "0.0.0",
"description": "Build your `dynamodb-onetable` schema using your existing `zod` schemas",
"main": "index.ts",
"files": [
"dist/**/*"
],
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc",
"clean": "tsc --build --clean && rm -rf dist",
"lint": "eslint src",
"lint-fix": "eslint src --fix",
"test": "vitest"
Expand All @@ -13,8 +20,10 @@
"devDependencies": {
"@aws-sdk/client-dynamodb": "^3.666.0",
"@eslint/js": "^9.12.0",
"@types/aws-lambda": "^8.10.145",
"@types/eslint__js": "^8.42.3",
"@types/node": "^22.7.5",
"aws-lambda": "^1.0.7",
"dynamo-db-local": "^9.2.1",
"dynamodb-onetable": "^2.7.5",
"eslint": "^9.12.0",
Expand All @@ -26,6 +35,5 @@
"wait-port": "^1.1.0",
"winston": "^3.15.0",
"zod": "^3.23.8"
},
"dependencies": {}
}
}
Loading

0 comments on commit 9e1871c

Please sign in to comment.