@aurios/mizzling 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/README.md +81 -0
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @aurios/mizzling@1.1.
|
|
2
|
+
> @aurios/mizzling@1.1.4 build /home/runner/work/mizzle/mizzle/packages/mizzling
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[32mESM[39m [1mdist/cli.js [22m[32m13.77 KB[39m
|
|
13
|
-
[32mESM[39m [1mdist/index.js [22m[32m87.00 B[39m
|
|
14
13
|
[32mESM[39m [1mdist/chunk-DKDRM5WU.js [22m[32m1.79 KB[39m
|
|
15
|
-
[32mESM[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.js [22m[32m87.00 B[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 36ms
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# 🌧️ Mizzling CLI
|
|
2
|
+
|
|
3
|
+
Mizzling is the official command-line interface for the Mizzle ORM, designed to manage DynamoDB migrations and schemas with ease. It provides a streamlined workflow for initializing projects, detecting schema changes, and applying them to your AWS environment.
|
|
4
|
+
|
|
5
|
+
You can skip this and see a better documentation [here](https://mizzle-docs.vercel.app)
|
|
6
|
+
|
|
7
|
+
## 🚀 Installation
|
|
8
|
+
|
|
9
|
+
You can install the CLI as a development dependency in your project using your preferred package manager, so let's get started:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @aurios/mizzling
|
|
13
|
+
# or
|
|
14
|
+
bun add @aurios/mizzling
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 🛠️ Commands
|
|
18
|
+
|
|
19
|
+
The CLI offers several commands to manage your DynamoDB infrastructure:
|
|
20
|
+
|
|
21
|
+
1. `bunx mizzling init`: Initializes a new Mizzle configuration in your current directory. This is an interactive command that guides you through:
|
|
22
|
+
|
|
23
|
+
- Setting the path to your schema files.
|
|
24
|
+
- Defining the output directory for migrations and snapshots.
|
|
25
|
+
- Configuring the AWS region and optional custom endpoints (e.g., for local development with DynamoDB Local or LocalStack).
|
|
26
|
+
|
|
27
|
+
It generates a mizzle.config.ts file upon completion.
|
|
28
|
+
|
|
29
|
+
2. `bunx mizzling generate [--name <name>]`: Analyzes your current schema and compares it against the last saved snapshot to generate a new migration script.
|
|
30
|
+
|
|
31
|
+
It automatically detects created, deleted, or updated tables.
|
|
32
|
+
|
|
33
|
+
Creates a TypeScript migration file with up and down functions for version control.
|
|
34
|
+
|
|
35
|
+
3. `bunx mizzling push [-y, --yes]`: Directly applies schema changes to your target DynamoDB environment without generating migration files.
|
|
36
|
+
|
|
37
|
+
The `--yes` flag skips the interactive confirmation prompt. Useful for rapid prototyping and synchronizing development environments.
|
|
38
|
+
|
|
39
|
+
4. `bunx mizzling list`: Provides a summary of all existing DynamoDB tables in the configured environment.
|
|
40
|
+
|
|
41
|
+
For each table, it displays:
|
|
42
|
+
|
|
43
|
+
- The table name.
|
|
44
|
+
- Primary Key (PK) and Sort Key (SK) attributes.
|
|
45
|
+
- A list of Global Secondary Indexes (GSIs).
|
|
46
|
+
|
|
47
|
+
5. `bunx mizzling drop`: An interactive tool to safely remove tables from your environment.
|
|
48
|
+
|
|
49
|
+
It fetches a list of remote tables and allows you to select multiple items for deletion.
|
|
50
|
+
|
|
51
|
+
> Warning: This action is irreversible and requires explicit
|
|
52
|
+
> confirmation before proceeding.
|
|
53
|
+
|
|
54
|
+
## ⚙️ Configuration (mizzle.config.ts)
|
|
55
|
+
|
|
56
|
+
Mizzling uses a central configuration file. You can use the defineConfig helper for full TypeScript type safety:
|
|
57
|
+
TypeScript
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { defineConfig } from "@aurios/mizzling";
|
|
61
|
+
|
|
62
|
+
export default defineConfig({
|
|
63
|
+
schema: "./src/schema.ts",
|
|
64
|
+
out: "./migrations",
|
|
65
|
+
region: "us-east-1",
|
|
66
|
+
// endpoint: "http://localhost:8000", // Optional for local dev
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Environment Overrides
|
|
71
|
+
|
|
72
|
+
Configuration values can be overridden using environment variables:
|
|
73
|
+
|
|
74
|
+
- MIZZLE_REGION: Overrides the AWS region.
|
|
75
|
+
- MIZZLE_ENDPOINT: Overrides the DynamoDB endpoint.
|
|
76
|
+
- MIZZLE_SCHEMA: Overrides the schema path.
|
|
77
|
+
- MIZZLE_OUT: Overrides the migrations output directory.
|
|
78
|
+
|
|
79
|
+
## 📄 License
|
|
80
|
+
|
|
81
|
+
This project is licensed under the MIT License.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurios/mizzling",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "A CLI tool for managing Mizzle projects",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"tsup": "^8.5.1",
|
|
49
|
-
"@aurios/mizzle": "1.1.3",
|
|
50
49
|
"@repo/shared": "0.0.3",
|
|
50
|
+
"@aurios/mizzle": "1.1.3",
|
|
51
51
|
"@repo/typescript-config": "0.0.0",
|
|
52
52
|
"@repo/vitest-config": "0.0.0"
|
|
53
53
|
},
|