@aurios/mizzling 1.1.2 → 1.1.3

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.3 build /home/runner/work/mizzle/mizzle/packages/mizzling
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/cli.ts, src/index.ts
@@ -12,4 +12,4 @@
12
12
  ESM dist/cli.js 13.77 KB
13
13
  ESM dist/index.js 87.00 B
14
14
  ESM dist/chunk-DKDRM5WU.js 1.79 KB
15
- ESM ⚡️ Build success in 37ms
15
+ ESM ⚡️ Build success in 36ms
package/README.md ADDED
@@ -0,0 +1,98 @@
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
+ 🚀 Installation
5
+
6
+ You can install the CLI as a development dependency in your project using your preferred package manager:
7
+ Bash
8
+
9
+ # Using npm
10
+
11
+ npm install -D @aurios/mizzling
12
+
13
+ # Using pnpm
14
+
15
+ pnpm add -D @aurios/mizzling
16
+
17
+ The CLI is accessible via the mizzling command.
18
+ 🛠️ Commands
19
+
20
+ The CLI offers several commands to manage your DynamoDB infrastructure:
21
+
22
+ 1. mizzling init
23
+
24
+ Initializes a new Mizzle configuration in your current directory. This is an interactive command that guides you through:
25
+
26
+ Setting the path to your schema files.
27
+
28
+ Defining the output directory for migrations and snapshots.
29
+
30
+ Configuring the AWS region and optional custom endpoints (e.g., for local development with DynamoDB Local or LocalStack).
31
+
32
+ It generates a mizzle.config.ts file upon completion. 2. mizzling generate
33
+
34
+ Analyzes your current schema and compares it against the last saved snapshot to generate a new migration script.
35
+
36
+ Usage: mizzling generate [--name <name>].
37
+
38
+ It automatically detects created, deleted, or updated tables.
39
+
40
+ Creates a TypeScript migration file with up and down functions for version control.
41
+
42
+ 3. mizzling push
43
+
44
+ Directly applies schema changes to your target DynamoDB environment without generating migration files.
45
+
46
+ Usage: mizzling push [-y, --yes].
47
+
48
+ The --yes flag skips the interactive confirmation prompt.
49
+
50
+ Useful for rapid prototyping and synchronizing development environments.
51
+
52
+ 4. mizzling list
53
+
54
+ Provides a summary of all existing DynamoDB tables in the configured environment. For each table, it displays:
55
+
56
+ The table name.
57
+
58
+ Primary Key (PK) and Sort Key (SK) attributes.
59
+
60
+ A list of Global Secondary Indexes (GSIs).
61
+
62
+ 5. mizzling drop
63
+
64
+ An interactive tool to safely remove tables from your environment.
65
+
66
+ It fetches a list of remote tables and allows you to select multiple items for deletion.
67
+
68
+ Warning: This action is irreversible and requires explicit confirmation before proceeding.
69
+
70
+ ⚙️ Configuration (mizzle.config.ts)
71
+
72
+ Mizzling uses a central configuration file. You can use the defineConfig helper for full TypeScript type safety:
73
+ TypeScript
74
+
75
+ import { defineConfig } from "@aurios/mizzling";
76
+
77
+ export default defineConfig({
78
+ schema: "./src/schema.ts",
79
+ out: "./migrations",
80
+ region: "us-east-1",
81
+ // endpoint: "http://localhost:8000", // Optional for local dev
82
+ });
83
+
84
+ Environment Overrides
85
+
86
+ Configuration values can be overridden using environment variables:
87
+
88
+ MIZZLE_REGION: Overrides the AWS region.
89
+
90
+ MIZZLE_ENDPOINT: Overrides the DynamoDB endpoint.
91
+
92
+ MIZZLE_SCHEMA: Overrides the schema path.
93
+
94
+ MIZZLE_OUT: Overrides the migrations output directory.
95
+
96
+ 📄 License
97
+
98
+ 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.3",
4
4
  "description": "A CLI tool for managing Mizzle projects",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -46,9 +46,9 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "tsup": "^8.5.1",
49
- "@aurios/mizzle": "1.1.3",
50
49
  "@repo/shared": "0.0.3",
51
50
  "@repo/typescript-config": "0.0.0",
51
+ "@aurios/mizzle": "1.1.3",
52
52
  "@repo/vitest-config": "0.0.0"
53
53
  },
54
54
  "scripts": {