@aurios/mizzling 1.1.4 → 1.1.6

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.4 build /home/runner/work/mizzle/mizzle/packages/mizzling
2
+ > @aurios/mizzling@1.1.6 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,10 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  ESM dist/cli.js 13.77 KB
13
- ESM dist/chunk-DKDRM5WU.js 1.79 KB
14
13
  ESM dist/index.js 87.00 B
15
- ESM ⚡️ Build success in 36ms
14
+ ESM dist/chunk-DKDRM5WU.js 1.79 KB
15
+ ESM ⚡️ Build success in 58ms
16
+ DTS Build start
17
+ DTS ⚡️ Build success in 4820ms
18
+ DTS dist/cli.d.ts 13.00 B
19
+ DTS dist/index.d.ts 2.07 KB
package/README.md CHANGED
@@ -1,4 +1,9 @@
1
- # 🌧️ Mizzling CLI
1
+ # 🌧️ mizzling CLI
2
+
3
+ ![NPM Last Update](https://img.shields.io/npm/last-update/%40aurios%2Fmizzling?style=flat&color=0EA5E9)
4
+ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/realfakenerd/mizzle/release.yml?style=flat&color=0EA5E9)
5
+ ![NPM Downloads](https://img.shields.io/npm/dw/%40aurios%2Fmizzling?style=flat&color=0EA5E9)
6
+ ![GitHub License](https://img.shields.io/github/license/realfakenerd/mizzle?style=flat&color=0EA5E9)
2
7
 
3
8
  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
9
 
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Configuration for Mizzle ORM.
3
+ */
4
+ interface MizzleConfig {
5
+ /**
6
+ * Path or glob pattern(s) to the schema files.
7
+ */
8
+ schema: string | string[];
9
+ /**
10
+ * Directory where generated migrations and snapshots will be stored.
11
+ */
12
+ out: string;
13
+ /**
14
+ * AWS Region to connect to. Defaults to "us-east-1" if not specified.
15
+ * Can be overridden by MIZZLE_REGION environment variable.
16
+ */
17
+ region?: string;
18
+ /**
19
+ * Optional custom endpoint for DynamoDB (e.g., for local development).
20
+ * Can be overridden by MIZZLE_ENDPOINT environment variable.
21
+ */
22
+ endpoint?: string;
23
+ /**
24
+ * Explicit AWS credentials. If provided, these will be used instead of the
25
+ * default credential provider chain or profile.
26
+ */
27
+ credentials?: {
28
+ /**
29
+ * AWS Access Key ID.
30
+ */
31
+ accessKeyId: string;
32
+ /**
33
+ * AWS Secret Access Key.
34
+ */
35
+ secretAccessKey: string;
36
+ /**
37
+ * Optional AWS Session Token.
38
+ */
39
+ sessionToken?: string;
40
+ };
41
+ /**
42
+ * AWS Profile name to use for credentials.
43
+ */
44
+ profile?: string;
45
+ /**
46
+ * Maximum number of retry attempts for DynamoDB requests.
47
+ */
48
+ maxAttempts?: number;
49
+ /**
50
+ * Print all SQL statements (or DynamoDB commands) and their execution time.
51
+ */
52
+ verbose?: boolean;
53
+ /**
54
+ * Require user confirmation before pushing any changes to the database.
55
+ */
56
+ strict?: boolean;
57
+ }
58
+ /**
59
+ * Helper function to define the Mizzle CLI configuration with type safety and autocompletion.
60
+ *
61
+ * Typically used in a `mizzle.config.ts` file at the root of your project.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * import { defineConfig } from "@aurios/mizzling";
66
+ *
67
+ * export default defineConfig({
68
+ * schema: "./src/schema.ts",
69
+ * out: "./mizzle",
70
+ * region: "us-east-1",
71
+ * });
72
+ * ```
73
+ *
74
+ * @param config The Mizzle configuration object.
75
+ * @returns The same configuration object, validated by TypeScript.
76
+ */
77
+ declare function defineConfig(config: MizzleConfig): MizzleConfig;
78
+
79
+ export { type MizzleConfig, defineConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurios/mizzling",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "A CLI tool for managing Mizzle projects",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -33,7 +33,10 @@
33
33
  },
34
34
  "type": "module",
35
35
  "exports": {
36
- ".": "./dist/index.js"
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "import": "./dist/index.js"
39
+ }
37
40
  },
38
41
  "dependencies": {
39
42
  "@aws-sdk/client-dynamodb": "3.962.0",
@@ -47,9 +50,9 @@
47
50
  "devDependencies": {
48
51
  "tsup": "^8.5.1",
49
52
  "@repo/shared": "0.0.3",
50
- "@aurios/mizzle": "1.1.3",
51
53
  "@repo/typescript-config": "0.0.0",
52
- "@repo/vitest-config": "0.0.0"
54
+ "@repo/vitest-config": "0.0.0",
55
+ "@aurios/mizzle": "1.1.5"
53
56
  },
54
57
  "scripts": {
55
58
  "check": "tsc --noEmit",
package/tsup.config.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  import { defineConfig } from "tsup";
2
2
 
3
3
  export default defineConfig({
4
- entry: ["src/cli.ts", "src/index.ts"],
5
- format: ["esm"],
6
- clean: true,
7
- noExternal: ["@repo/shared", "mizzle"],
8
- minify: true,
9
- banner: {
10
- js: "#!/usr/bin/env node",
11
- },
4
+ entry: ["src/cli.ts", "src/index.ts"],
5
+ format: ["esm"],
6
+ clean: true,
7
+ noExternal: ["@repo/shared", "mizzle"],
8
+ minify: true,
9
+ banner: {
10
+ js: "#!/usr/bin/env node",
11
+ },
12
+ dts: true
12
13
  });