sesame-kit 0.4.0 → 0.4.1

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/README.ja.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  # sesame-kit — SESAME クラウド CLI & ライブラリ (非公式)
4
4
 
5
+ [![npm](https://img.shields.io/npm/v/sesame-kit)](https://www.npmjs.com/package/sesame-kit) [![license](https://img.shields.io/npm/l/sesame-kit)](./LICENSE) [![node](https://img.shields.io/node/v/sesame-kit)](https://nodejs.org)
6
+
5
7
  > English: [README.md](./README.md)
6
8
 
7
9
  > **ステータス** — pre-1.0 でありバグが残っている可能性があります。実運用で概ね安定が確認できた時点で 1.0 にします。依存する場合はバージョンを固定してください。
@@ -36,14 +38,17 @@
36
38
  要件は Node.js 18 以上 (ESM / `node:` プロトコルを使用)。
37
39
 
38
40
  ```bash
39
- git clone https://github.com/FukumotoIkuma/sesame-kit.git
40
- cd sesame-kit
41
- npm install
42
- npm link # グローバルに `sesame` コマンドを公開
43
- # あるいは: node bin/sesame.js ...
41
+ npm install -g sesame-kit # グローバル CLI: `sesame ...`
42
+ npx sesame-kit --help # インストールせず実行
43
+ npm install sesame-kit # プロジェクトにライブラリとして追加
44
44
  ```
45
45
 
46
- ライブラリとして使う場合は `npm link sesame-kit`、または `npm install /path/to/sesame-kit`。
46
+ ソースから:
47
+
48
+ ```bash
49
+ git clone https://github.com/FukumotoIkuma/sesame-kit.git
50
+ cd sesame-kit && npm install && npm link
51
+ ```
47
52
 
48
53
  ---
49
54
 
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  # sesame-kit — SESAME cloud CLI & library (unofficial)
4
4
 
5
+ [![npm](https://img.shields.io/npm/v/sesame-kit)](https://www.npmjs.com/package/sesame-kit) [![license](https://img.shields.io/npm/l/sesame-kit)](./LICENSE) [![node](https://img.shields.io/node/v/sesame-kit)](https://nodejs.org)
6
+
5
7
  A Node.js CLI and library that drives the SESAME cloud WebSocket API using the same Cognito consumer client as the official SESAME iOS / Android apps. It covers lock control, Hub3 IR (emit and learn), device management, history, and battery level. With `sesame serve` it exposes every feature as JSON-RPC so you can drive SESAME from any language.
6
8
 
7
9
  > 日本語版: [README.ja.md](./README.ja.md)
@@ -36,14 +38,17 @@ A Node.js port of the official biz3 admin web app ([CANDY-HOUSE/biz.candyhouse.c
36
38
  Requires Node.js 18+ (uses ESM and the `node:` protocol).
37
39
 
38
40
  ```bash
39
- git clone https://github.com/FukumotoIkuma/sesame-kit.git
40
- cd sesame-kit
41
- npm install
42
- npm link # expose the `sesame` command globally
43
- # or: node bin/sesame.js ...
41
+ npm install -g sesame-kit # global CLI: `sesame ...`
42
+ npx sesame-kit --help # or run without installing
43
+ npm install sesame-kit # or as a library in your project
44
44
  ```
45
45
 
46
- To use it as a library: `npm link sesame-kit`, or `npm install /path/to/sesame-kit`.
46
+ From source:
47
+
48
+ ```bash
49
+ git clone https://github.com/FukumotoIkuma/sesame-kit.git
50
+ cd sesame-kit && npm install && npm link
51
+ ```
47
52
 
48
53
  ---
49
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sesame-kit",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "SESAME cloud CLI & library (lock control + Hub3 IR + device management). Node.js port of biz3 React app with the Cognito consumer client swapped in for long-lived sessions.",
5
5
  "author": "Ikuma Fukumoto",
6
6
  "license": "MIT",
package/src/cli.js CHANGED
@@ -1508,6 +1508,10 @@ export async function run(argv = process.argv) {
1508
1508
  .name("sesame")
1509
1509
  .description("SESAME cloud CLI: lock control + Hub3 IR + device management (port of biz3 React with Consumer Cognito client)")
1510
1510
  .version(getPkgVersion(), "-V, --version")
1511
+ // 引数不足/未知オプション時に usage を出す (commander 既定はエラー1行のみで不親切)。
1512
+ // この前に設定すると後で追加する全サブコマンドへ継承される。--json 時は writeErr 側で抑止。
1513
+ .showHelpAfterError()
1514
+ .showSuggestionAfterError()
1511
1515
  .option("--config-dir <path>", "設定ディレクトリ上書き (default: ~/.config/sesame-hub3)")
1512
1516
  .option("--debug", "詳細ログ")
1513
1517
  .option("--json", "JSON 出力");
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.js"],"names":[],"mappings":"AA+9CA,oDAiQC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.js"],"names":[],"mappings":"AA+9CA,oDAqQC"}