@k-msg/cli 0.6.1 → 0.7.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +40 -2
  3. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @k-msg/cli
2
2
 
3
+ ## 0.7.0 — 2026-02-19
4
+
5
+ ### Minor changes
6
+
7
+ - [6a1562f](https://github.com/k-otp/k-msg/commit/6a1562f9e276b16e9125c94e71513b34888a976e) Add Cloudflare SQL schema generation APIs and Drizzle adapter helpers to `@k-msg/messaging`, including reusable SQL/Drizzle schema renderers and improved retry-safe lazy initialization for SQL-backed tracking stores and job queues.
8
+
9
+ Add `k-msg db schema print` and `k-msg db schema generate` commands to `@k-msg/cli`, using `@k-msg/messaging/adapters/cloudflare` as the single source of truth for generated SQL and Drizzle schema output. — Thanks @imjlk!
10
+
11
+ ### Patch changes
12
+
13
+ - Updated dependencies: core@0.19.0, messaging@0.19.0, provider@0.19.0, k-msg@0.19.0
14
+
15
+ ## 0.6.2 — 2026-02-19
16
+
17
+ ### Patch changes
18
+
19
+ - [7797dc8](https://github.com/k-otp/k-msg/commit/7797dc8dacc4024a2b825fe46c6f266e271e822d) - Fix provider balance CLI exit code semantics: return exit code 3 only for provider errors and 4 when capability is unsupported.
20
+ - Update CLI/README docs to use the correct `providers list --config ...` usage and clarify capability-not-supported exit code.
21
+ - Add GitHub repository button to docs home pages (KO/EN). — Thanks @imjlk!
22
+
3
23
  ## 0.6.1 — 2026-02-18
4
24
 
5
25
  ### Patch changes
package/README.md CHANGED
@@ -94,9 +94,11 @@ Default config path:
94
94
  Override:
95
95
 
96
96
  ```bash
97
- k-msg --config /path/to/k-msg.config.json providers list
97
+ k-msg providers list --config /path/to/k-msg.config.json
98
98
  ```
99
99
 
100
+ Note: `--config` is a subcommand option in the current CLI (for example: `providers`, `sms`, `alimtalk`).
101
+
100
102
  Example file: `apps/cli/k-msg.config.example.json`
101
103
 
102
104
  Schema URLs:
@@ -175,9 +177,45 @@ Required values by provider/channel:
175
177
  - `k-msg sms send`
176
178
  - `k-msg alimtalk preflight|send`
177
179
  - `k-msg send --input <json> | --file <path> | --stdin` (advanced/raw JSON only)
180
+ - `k-msg db schema print|generate`
178
181
  - `k-msg kakao channel categories|list|auth|add`
179
182
  - `k-msg kakao template list|get|create|update|delete|request`
180
183
 
184
+ ## DB schema generator
185
+
186
+ Generate canonical SQL DDL and/or Drizzle schema source from the same
187
+ `@k-msg/messaging/adapters/cloudflare` schema utilities.
188
+
189
+ ```bash
190
+ # Print both drizzle+sql to stdout
191
+ k-msg db schema print --dialect postgres
192
+
193
+ # Print only SQL for queue schema
194
+ k-msg db schema print --dialect postgres --target queue --format sql
195
+
196
+ # Generate both files in cwd
197
+ k-msg db schema generate --dialect postgres
198
+
199
+ # Generate SQL only to a custom path
200
+ k-msg db schema generate \
201
+ --dialect mysql \
202
+ --target tracking \
203
+ --format sql \
204
+ --out-dir ./db \
205
+ --sql-file tracking.sql
206
+ ```
207
+
208
+ Flags:
209
+
210
+ - `--dialect <postgres|mysql|sqlite>`: required
211
+ - `--target <tracking|queue|both>`: default `both`
212
+ - `--format <drizzle|sql|both>`: default `both`
213
+ - `generate` only:
214
+ - `--out-dir <path>` default current directory
215
+ - `--drizzle-file <name>` default `kmsg.schema.ts`
216
+ - `--sql-file <name>` default `kmsg.schema.sql`
217
+ - `--force` default `false` (without it, generation fails if file exists)
218
+
181
219
  ## Recommended AlimTalk flow
182
220
 
183
221
  1. Run provider-level diagnostics.
@@ -323,7 +361,7 @@ k-msg kakao template request --template-id TPL_001 --channel main
323
361
  - `0`: success
324
362
  - `2`: input/config error
325
363
  - `3`: provider/network error
326
- - `4`: capability not supported
364
+ - `4`: unsupported capability (for example, provider does not support `balance`)
327
365
 
328
366
  ## Manual Check Config Example
329
367
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k-msg/cli",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "description": "k-msg CLI (prebuilt binaries via GitHub Releases)",
6
6
  "type": "module",
@@ -33,16 +33,16 @@
33
33
  "clean": "rm -rf dist"
34
34
  },
35
35
  "devDependencies": {
36
- "@k-msg/core": "0.17.0",
37
- "@k-msg/messaging": "0.17.0",
38
- "@k-msg/provider": "0.17.0",
36
+ "@k-msg/core": "0.18.2",
37
+ "@k-msg/messaging": "0.18.2",
38
+ "@k-msg/provider": "0.18.2",
39
39
  "@bunli/core": "^0.5.4",
40
40
  "@bunli/plugin-ai-detect": "^0.5.2",
41
41
  "@bunli/test": "^0.3.2",
42
42
  "@types/bun": "^1.3.9",
43
43
  "@types/node": "^22.0.0",
44
44
  "bunli": "^0.5.3",
45
- "k-msg": "0.17.0",
45
+ "k-msg": "0.18.2",
46
46
  "solapi": "^5.5.4",
47
47
  "typescript": "^5.7.2",
48
48
  "zod": "^4.0.14"