@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @aurios/mizzling@1.1.2 build /home/runner/work/mizzle/mizzle/packages/mizzling
2
+ > @aurios/mizzling@1.1.4 build /home/runner/work/mizzle/mizzle/packages/mizzling
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/cli.ts, src/index.ts
@@ -10,6 +10,6 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  ESM dist/cli.js 13.77 KB
13
- ESM dist/index.js 87.00 B
14
13
  ESM dist/chunk-DKDRM5WU.js 1.79 KB
15
- ESM ⚡️ Build success in 37ms
14
+ ESM dist/index.js 87.00 B
15
+ ESM ⚡️ 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.2",
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
  },