i-repo 1.0.0 → 1.0.2
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.md +89 -92
- package/dist/bin/irepo.d.ts.map +1 -1
- package/dist/bin/irepo.js +22 -6
- package/dist/bin/irepo.js.map +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +120 -16
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/config.d.ts +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +94 -22
- package/dist/commands/config.js.map +1 -1
- package/dist/config/client.d.ts +7 -6
- package/dist/config/client.d.ts.map +1 -1
- package/dist/config/client.js +10 -9
- package/dist/config/client.js.map +1 -1
- package/dist/config/index.d.ts +5 -3
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +4 -2
- package/dist/config/index.js.map +1 -1
- package/dist/config/migrate.d.ts +10 -0
- package/dist/config/migrate.d.ts.map +1 -0
- package/dist/config/migrate.js +75 -0
- package/dist/config/migrate.js.map +1 -0
- package/dist/config/scoped-store.d.ts +55 -0
- package/dist/config/scoped-store.d.ts.map +1 -0
- package/dist/config/scoped-store.js +180 -0
- package/dist/config/scoped-store.js.map +1 -0
- package/dist/config/store.d.ts +10 -11
- package/dist/config/store.d.ts.map +1 -1
- package/dist/config/store.js +19 -27
- package/dist/config/store.js.map +1 -1
- package/dist/ink/App.d.ts.map +1 -1
- package/dist/ink/App.js +2 -1
- package/dist/ink/App.js.map +1 -1
- package/dist/ink/components/OptionForm.d.ts.map +1 -1
- package/dist/ink/components/OptionForm.js +7 -3
- package/dist/ink/components/OptionForm.js.map +1 -1
- package/dist/ink/components/ResultView.d.ts.map +1 -1
- package/dist/ink/components/ResultView.js +4 -0
- package/dist/ink/components/ResultView.js.map +1 -1
- package/dist/ink/registry/commands.d.ts.map +1 -1
- package/dist/ink/registry/commands.js +45 -3
- package/dist/ink/registry/commands.js.map +1 -1
- package/dist/ink/registry/executors.d.ts.map +1 -1
- package/dist/ink/registry/executors.js +95 -19
- package/dist/ink/registry/executors.js.map +1 -1
- package/dist/ink/screens/AuthLoginScreen.d.ts.map +1 -1
- package/dist/ink/screens/AuthLoginScreen.js +54 -14
- package/dist/ink/screens/AuthLoginScreen.js.map +1 -1
- package/dist/ink/screens/CommandScreen.js +2 -2
- package/dist/ink/screens/CommandScreen.js.map +1 -1
- package/dist/ink/screens/HomeScreen.d.ts.map +1 -1
- package/dist/ink/screens/HomeScreen.js +1 -1
- package/dist/ink/screens/HomeScreen.js.map +1 -1
- package/dist/ink/types.d.ts +13 -2
- package/dist/ink/types.d.ts.map +1 -1
- package/dist/utils/constants.d.ts +6 -7
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +6 -7
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -7,10 +7,26 @@
|
|
|
7
7
|
╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═════╝
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Overview
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
i-Repo CLI は、i-Reporter のデータ取得・エクスポート・運用自動化を
|
|
13
|
+
コマンドラインからシンプルに実行できるツールです。
|
|
14
|
+
|
|
15
|
+
従来の API 直接連携とは異なり、
|
|
16
|
+
運用フローに組み込みやすく、AI からも安全に扱える接続点として設計されています。
|
|
17
|
+
|
|
18
|
+
Why i-Repo CLI?
|
|
19
|
+
1. 運用フローに自然に組み込める
|
|
20
|
+
|
|
21
|
+
バッチ取得
|
|
22
|
+
|
|
23
|
+
日次エクスポート
|
|
24
|
+
|
|
25
|
+
cron / CI 連携
|
|
26
|
+
|
|
27
|
+
シェルスクリプトやパイプラインとの統合
|
|
28
|
+
|
|
29
|
+
既存の自動化基盤に、そのまま組み込めます。
|
|
14
30
|
|
|
15
31
|
## Install
|
|
16
32
|
|
|
@@ -21,45 +37,45 @@ npm install -g i-repo
|
|
|
21
37
|
## Quick Start
|
|
22
38
|
|
|
23
39
|
```bash
|
|
24
|
-
# 1.
|
|
25
|
-
|
|
26
|
-
export IREPO_USER="admin"
|
|
27
|
-
export IREPO_PASSWORD="secret"
|
|
40
|
+
# 1. 起動(対話形式でエンドポイント・ID・パスワードを入力)
|
|
41
|
+
i-repo
|
|
28
42
|
|
|
29
43
|
# 2. 帳票を一覧
|
|
30
|
-
i-repo
|
|
44
|
+
i-repo rep list
|
|
31
45
|
|
|
32
46
|
# 3. PDF をダウンロード
|
|
33
|
-
i-repo
|
|
47
|
+
i-repo rep download REP-001 --file-type pdf
|
|
34
48
|
```
|
|
35
49
|
|
|
36
|
-
|
|
50
|
+
これだけ。初回起動時に接続情報を保存すれば、以降はそのまま使える。
|
|
37
51
|
|
|
38
52
|
---
|
|
39
53
|
|
|
40
54
|
## Setup
|
|
41
55
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
1. **CLI フラグ**: `--endpoint`, `--user`, `-p`
|
|
45
|
-
2. **環境変数**: `IREPO_ENDPOINT`, `IREPO_USER`, `IREPO_PASSWORD`
|
|
46
|
-
3. **Config ファイル**: `i-repo config set ...`
|
|
47
|
-
|
|
48
|
-
> パスワードはセキュリティ上 **ディスクに保存しない**。環境変数か `-p` フラグで渡す。
|
|
49
|
-
|
|
50
|
-
### 対話的セットアップ
|
|
56
|
+
### 対話的セットアップ(推奨)
|
|
51
57
|
|
|
52
58
|
```bash
|
|
53
|
-
i-repo
|
|
59
|
+
i-repo
|
|
60
|
+
# › AUTH > login を選択
|
|
54
61
|
# ? API Endpoint URL: https://example.com/ConMasAPI/Rests/APIExecute.aspx
|
|
55
62
|
# ? Username: admin
|
|
56
63
|
# ? Password: ****
|
|
57
64
|
# ✔ Authenticated successfully
|
|
58
|
-
#
|
|
59
|
-
#
|
|
65
|
+
# ? Where to save config? › User config / Project config / Local config / Don't save
|
|
66
|
+
# ? Also save password? › No
|
|
67
|
+
# ℹ Saved to ~/.i-repo/i-repo.json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
認証成功後、保存先とパスワード保存の有無を選べる。
|
|
71
|
+
パスワードも保存すれば、以降は直接コマンドを実行できる:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
i-repo rep list
|
|
75
|
+
i-repo rep download REP-001 --file-type pdf
|
|
60
76
|
```
|
|
61
77
|
|
|
62
|
-
###
|
|
78
|
+
### 環境変数
|
|
63
79
|
|
|
64
80
|
```bash
|
|
65
81
|
export IREPO_ENDPOINT="https://example.com/ConMasAPI/Rests/APIExecute.aspx"
|
|
@@ -69,14 +85,43 @@ export IREPO_PASSWORD="secret"
|
|
|
69
85
|
|
|
70
86
|
`.bashrc` / `.zshrc` に書いておけば毎回入力不要。
|
|
71
87
|
|
|
72
|
-
|
|
88
|
+
---
|
|
73
89
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
90
|
+
## Configuration
|
|
91
|
+
|
|
92
|
+
### スコープシステム
|
|
93
|
+
|
|
94
|
+
3 層のスコープ付き設定。上のスコープが下より優先される。
|
|
95
|
+
|
|
96
|
+
| スコープ | ファイルパス | Git 対象 | 用途 |
|
|
97
|
+
|---------|-------------|---------|------|
|
|
98
|
+
| **User** | `~/.i-repo/i-repo.json` | N/A | 個人のデフォルト設定 |
|
|
99
|
+
| **Project** | `<repo>/.i-repo/i-repo.json` | Yes | チーム共有(endpoint 等) |
|
|
100
|
+
| **Local** | `<repo>/.i-repo/i-repo.local.json` | No | 個人の上書き(user, password 等) |
|
|
101
|
+
|
|
102
|
+
### 設定の解決順序
|
|
103
|
+
|
|
104
|
+
全キー共通で以下の順に解決される。上が優先:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
CLI フラグ → 環境変数 → Local config → Project config → User config → デフォルト値
|
|
78
108
|
```
|
|
79
109
|
|
|
110
|
+
### 環境変数
|
|
111
|
+
|
|
112
|
+
| 変数 | 説明 |
|
|
113
|
+
|------|------|
|
|
114
|
+
| `IREPO_ENDPOINT` | API エンドポイント URL |
|
|
115
|
+
| `IREPO_USER` | ログインユーザー名 |
|
|
116
|
+
| `IREPO_PASSWORD` | パスワード |
|
|
117
|
+
|
|
118
|
+
### セキュリティベストプラクティス
|
|
119
|
+
|
|
120
|
+
1. **環境変数を推奨**: パスワードは `IREPO_PASSWORD` 環境変数で渡すのが最も安全
|
|
121
|
+
2. **Local スコープを使う**: パスワードを設定する場合は Local スコープを使う(`.gitignore` 対象)
|
|
122
|
+
3. **CI/CD ではシークレットを使う**: GitHub Secrets 等の仕組みを活用
|
|
123
|
+
4. **ファイルパーミッション**: 設定ファイルは自動的に `0600` で作成される
|
|
124
|
+
|
|
80
125
|
---
|
|
81
126
|
|
|
82
127
|
## Commands
|
|
@@ -108,7 +153,7 @@ i-repo def labels download -t csv # ラベル情報取得
|
|
|
108
153
|
```bash
|
|
109
154
|
i-repo rep list # レポート一覧
|
|
110
155
|
i-repo rep list -e completed # 完了済みのみ
|
|
111
|
-
i-repo rep list -d DEF-001
|
|
156
|
+
i-repo rep list -d DEF-001 # 定義IDで絞り込み
|
|
112
157
|
i-repo rep get REP-001 # 詳細表示
|
|
113
158
|
i-repo rep download REP-001 --file-type pdf # PDF取得
|
|
114
159
|
i-repo rep download REP-001 --file-type excel # Excel取得
|
|
@@ -228,45 +273,6 @@ i-Reporter の操作には `i-repo` CLI を使用する。
|
|
|
228
273
|
- ファイル操作は `-o` で保存先を明示すること
|
|
229
274
|
```
|
|
230
275
|
|
|
231
|
-
### OpenAI (ChatGPT / Function Calling)
|
|
232
|
-
|
|
233
|
-
```python
|
|
234
|
-
import subprocess, json
|
|
235
|
-
|
|
236
|
-
def i_repo(args: str) -> dict:
|
|
237
|
-
"""i-Reporter CLI を実行して JSON で結果を返す"""
|
|
238
|
-
result = subprocess.run(
|
|
239
|
-
f"i-repo {args} --format json",
|
|
240
|
-
shell=True, capture_output=True, text=True
|
|
241
|
-
)
|
|
242
|
-
return json.loads(result.stdout) if result.returncode == 0 else {
|
|
243
|
-
"error": result.stderr, "exit_code": result.returncode
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
# Function Calling で tools に登録
|
|
247
|
-
tools = [{
|
|
248
|
-
"type": "function",
|
|
249
|
-
"function": {
|
|
250
|
-
"name": "i_repo",
|
|
251
|
-
"description": "ConMas i-Reporter を操作する",
|
|
252
|
-
"parameters": {
|
|
253
|
-
"type": "object",
|
|
254
|
-
"properties": {
|
|
255
|
-
"args": {
|
|
256
|
-
"type": "string",
|
|
257
|
-
"description": "i-repo コマンドの引数。例: 'rep list -e completed'"
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
"required": ["args"]
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}]
|
|
264
|
-
|
|
265
|
-
# 使用例
|
|
266
|
-
reports = i_repo("rep list -d DEF-001")
|
|
267
|
-
detail = i_repo(f"rep get {reports[0]['topId']}")
|
|
268
|
-
```
|
|
269
|
-
|
|
270
276
|
### CLI からパイプで AI に渡す
|
|
271
277
|
|
|
272
278
|
```bash
|
|
@@ -284,15 +290,6 @@ i-repo rep list --format json | openai api chat.completions.create \
|
|
|
284
290
|
claude "$(i-repo rep list --format json | head -50) このデータから未完了レポートを教えて"
|
|
285
291
|
```
|
|
286
292
|
|
|
287
|
-
### Dify / LangChain / その他エージェント
|
|
288
|
-
|
|
289
|
-
```bash
|
|
290
|
-
# シェルツール として登録する場合
|
|
291
|
-
command: i-repo rep list --format json
|
|
292
|
-
command: i-repo rep get {{report_id}} --format json
|
|
293
|
-
command: i-repo repb download -d {{definition_id}} -o {{output_path}}
|
|
294
|
-
```
|
|
295
|
-
|
|
296
293
|
---
|
|
297
294
|
|
|
298
295
|
## Batch / CI/CD
|
|
@@ -343,6 +340,21 @@ echo "Exported to ${OUTDIR}"
|
|
|
343
340
|
|
|
344
341
|
---
|
|
345
342
|
|
|
343
|
+
## Global Options
|
|
344
|
+
|
|
345
|
+
| Option | Short | Description |
|
|
346
|
+
|--------|-------|-------------|
|
|
347
|
+
| `--format <format>` | `-f` | 出力形式: `table` / `json` / `csv` |
|
|
348
|
+
| `--quiet` | `-q` | ID のみ出力(パイプ向け) |
|
|
349
|
+
| `--endpoint <url>` | `-e` | API エンドポイント |
|
|
350
|
+
| `--user <user>` | `-u` | ユーザー名 |
|
|
351
|
+
| `--password <pw>` | `-p` | パスワード |
|
|
352
|
+
| `--timeout <seconds>` | | タイムアウト(秒、例: `60`) |
|
|
353
|
+
| `--version` | `-v` | バージョン表示 |
|
|
354
|
+
| `--help` | `-h` | ヘルプ表示 |
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
346
358
|
## Exit Codes
|
|
347
359
|
|
|
348
360
|
| Code | 意味 |
|
|
@@ -362,21 +374,6 @@ i-repo rep list || echo "Failed with exit code: $?"
|
|
|
362
374
|
|
|
363
375
|
---
|
|
364
376
|
|
|
365
|
-
## Global Options
|
|
366
|
-
|
|
367
|
-
| Option | Short | Description |
|
|
368
|
-
|--------|-------|-------------|
|
|
369
|
-
| `--format <format>` | `-f` | 出力形式: `table` / `json` / `csv` |
|
|
370
|
-
| `--quiet` | `-q` | ID のみ出力(パイプ向け) |
|
|
371
|
-
| `--verbose` | | 詳細出力 |
|
|
372
|
-
| `--endpoint <url>` | `-e` | API エンドポイント |
|
|
373
|
-
| `--user <user>` | `-u` | ユーザー名 |
|
|
374
|
-
| `--password <pw>` | `-p` | パスワード |
|
|
375
|
-
| `--version` | `-v` | バージョン表示 |
|
|
376
|
-
| `--help` | `-h` | ヘルプ表示 |
|
|
377
|
-
|
|
378
|
-
---
|
|
379
|
-
|
|
380
377
|
## License
|
|
381
378
|
|
|
382
379
|
MIT
|
package/dist/bin/irepo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irepo.d.ts","sourceRoot":"","sources":["../../src/bin/irepo.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"irepo.d.ts","sourceRoot":"","sources":["../../src/bin/irepo.ts"],"names":[],"mappings":";AA8FA;;GAEG;AACH,wBAAsB,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBxD"}
|
package/dist/bin/irepo.js
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { Command, CommanderError } from "commander";
|
|
8
8
|
import { printError, t, setDefaultTimeout } from "../ui/index.js";
|
|
9
|
+
import { migrateFromConf } from "../config/migrate.js";
|
|
10
|
+
import { getConfig } from "../config/store.js";
|
|
9
11
|
import { authCommand } from "../commands/auth.js";
|
|
10
12
|
import { configCommand } from "../commands/config.js";
|
|
11
13
|
import { definitionsCommand } from "../commands/definitions/index.js";
|
|
@@ -19,13 +21,12 @@ program
|
|
|
19
21
|
.name("i-repo")
|
|
20
22
|
.description("Modern CLI for ConMas i-Reporter")
|
|
21
23
|
.version(VERSION, "-v, --version")
|
|
22
|
-
.option("-f, --format <format>", "Output format (table|json|csv)"
|
|
23
|
-
.option("-q, --quiet", "
|
|
24
|
-
.option("--verbose", "Show detailed output including debug info")
|
|
24
|
+
.option("-f, --format <format>", "Output format (table|json|csv)")
|
|
25
|
+
.option("-q, --quiet", "IDs only for piping (config: quiet)")
|
|
25
26
|
.option("-e, --endpoint <url>", "API endpoint URL (overrides config)")
|
|
26
27
|
.option("-u, --user <user>", "Username (overrides config)")
|
|
27
28
|
.option("-p, --password <password>", "Password")
|
|
28
|
-
.option("--timeout <seconds>", "Request timeout in seconds (
|
|
29
|
+
.option("--timeout <seconds>", "Request timeout in seconds (e.g. 60)");
|
|
29
30
|
// Help footer with tips for CLI beginners
|
|
30
31
|
const tips = [
|
|
31
32
|
["Ctrl+C", "Cancel any operation"],
|
|
@@ -41,9 +42,22 @@ program.addHelpText("after", "\n" +
|
|
|
41
42
|
.map(([k, v]) => ` ${t.muted(k.padEnd(pad))}${t.dim(v)}`)
|
|
42
43
|
.join("\n") +
|
|
43
44
|
"\n");
|
|
44
|
-
// Apply global
|
|
45
|
+
// Apply global options before subcommands run
|
|
45
46
|
program.hook("preAction", (thisCommand) => {
|
|
46
|
-
const
|
|
47
|
+
const opts = thisCommand.opts();
|
|
48
|
+
// Resolve --format: CLI flag → config defaultFormat → "table"
|
|
49
|
+
if (!opts.format) {
|
|
50
|
+
opts.format = getConfig("defaultFormat") ?? "table";
|
|
51
|
+
thisCommand.setOptionValue("format", opts.format);
|
|
52
|
+
}
|
|
53
|
+
// Resolve --quiet: CLI flag → config quiet → false
|
|
54
|
+
if (opts.quiet === undefined && getConfig("quiet")) {
|
|
55
|
+
opts.quiet = true;
|
|
56
|
+
thisCommand.setOptionValue("quiet", true);
|
|
57
|
+
}
|
|
58
|
+
// Resolve --timeout: CLI flag → config timeout → 30
|
|
59
|
+
const rawTimeout = opts.timeout != null ? Number(opts.timeout) : undefined;
|
|
60
|
+
const timeout = rawTimeout ?? getConfig("timeout") ?? 30;
|
|
47
61
|
if (timeout > 0)
|
|
48
62
|
setDefaultTimeout(timeout);
|
|
49
63
|
});
|
|
@@ -73,6 +87,8 @@ function applyExitOverride(cmd) {
|
|
|
73
87
|
*/
|
|
74
88
|
export async function run(argv) {
|
|
75
89
|
try {
|
|
90
|
+
// Migrate legacy conf settings on first run
|
|
91
|
+
migrateFromConf();
|
|
76
92
|
applyExitOverride(program);
|
|
77
93
|
await program.parseAsync(argv ?? process.argv);
|
|
78
94
|
}
|
package/dist/bin/irepo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irepo.js","sourceRoot":"","sources":["../../src/bin/irepo.ts"],"names":[],"mappings":";AACA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,CAAC,EAA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C,OAAO,CAAC,KAAK,CACX,oEAAoE;oBACpE,gDAAgD;oBAChD,gDAAgD,CACjD,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QACD,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,mBAAmB;AACnB,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+CpC,eAAO,MAAM,WAAW,SACmB,CAAC"}
|
package/dist/commands/auth.js
CHANGED
|
@@ -4,10 +4,23 @@
|
|
|
4
4
|
* Login, logout, and connection status.
|
|
5
5
|
*/
|
|
6
6
|
import { Command } from "commander";
|
|
7
|
-
import { input, password as passwordPrompt } from "@inquirer/prompts";
|
|
7
|
+
import { input, password as passwordPrompt, select, confirm } from "@inquirer/prompts";
|
|
8
8
|
import { IReporterClient } from "i-repo-sdk";
|
|
9
|
-
import { getConfig, setConfig, deleteConfig, } from "../config/store.js";
|
|
10
|
-
import {
|
|
9
|
+
import { getConfig, getConfigWithSource, setConfig, deleteConfig, } from "../config/store.js";
|
|
10
|
+
import { getUserConfigPath, getProjectConfigPath, getLocalConfigPath, getConfigPath, findProjectRoot, } from "../config/scoped-store.js";
|
|
11
|
+
import { printSuccess, printError, printWarning, printInfo, printDetails, printInteractionHint, withSpinner, t, } from "../ui/index.js";
|
|
12
|
+
function saveCredentials(endpoint, user, password, scope, savePassword) {
|
|
13
|
+
setConfig("endpoint", endpoint, scope);
|
|
14
|
+
setConfig("user", user, scope);
|
|
15
|
+
if (savePassword) {
|
|
16
|
+
setConfig("password", password, scope);
|
|
17
|
+
}
|
|
18
|
+
const savedPath = getConfigPath(scope);
|
|
19
|
+
printInfo(`Saved to ${savedPath}`);
|
|
20
|
+
if (!savePassword) {
|
|
21
|
+
printInfo("Password is NOT stored. Set IREPO_PASSWORD env var,\n pass -p each time, or run: i-repo config set password <password>");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
11
24
|
export const authCommand = new Command("auth")
|
|
12
25
|
.description("Authentication management");
|
|
13
26
|
// ── auth login ───────────────────────────────────────────────
|
|
@@ -17,6 +30,8 @@ authCommand
|
|
|
17
30
|
.option("-u, --user <user>", "Username")
|
|
18
31
|
.option("-p, --password <password>", "Password")
|
|
19
32
|
.option("-e, --endpoint <url>", "API endpoint URL")
|
|
33
|
+
.option("--scope <scope>", "Save destination: user | project | local | none")
|
|
34
|
+
.option("--save-password", "Also save password to config")
|
|
20
35
|
.action(async (opts) => {
|
|
21
36
|
try {
|
|
22
37
|
let { user, password, endpoint } = opts;
|
|
@@ -58,12 +73,42 @@ authCommand
|
|
|
58
73
|
successText: "Authenticated successfully",
|
|
59
74
|
failText: "Authentication failed",
|
|
60
75
|
});
|
|
61
|
-
// Save endpoint and user (password is NOT stored for security)
|
|
62
|
-
setConfig("endpoint", endpoint);
|
|
63
|
-
setConfig("user", user);
|
|
64
76
|
printSuccess(`Logged in as ${user}`);
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
// Determine save scope
|
|
78
|
+
let scope = opts.scope;
|
|
79
|
+
if (scope === "none") {
|
|
80
|
+
// --scope none: skip saving
|
|
81
|
+
printInfo("Config not saved.");
|
|
82
|
+
}
|
|
83
|
+
else if (scope) {
|
|
84
|
+
// --scope user|project|local: save without prompt
|
|
85
|
+
saveCredentials(endpoint, user, password, scope, !!opts.savePassword);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
// Interactive: ask where to save
|
|
89
|
+
const projectRoot = findProjectRoot();
|
|
90
|
+
const choices = [
|
|
91
|
+
{ name: "User config", value: "user", description: getUserConfigPath() },
|
|
92
|
+
];
|
|
93
|
+
if (projectRoot) {
|
|
94
|
+
choices.push({ name: "Project config", value: "project", description: getProjectConfigPath() }, { name: "Local config", value: "local", description: getLocalConfigPath() });
|
|
95
|
+
}
|
|
96
|
+
choices.push({ name: "Don't save", value: "none" });
|
|
97
|
+
const selected = await select({
|
|
98
|
+
message: "Where to save config?",
|
|
99
|
+
choices,
|
|
100
|
+
});
|
|
101
|
+
if (selected === "none") {
|
|
102
|
+
printInfo("Config not saved.");
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
const savePass = await confirm({
|
|
106
|
+
message: "Also save password?",
|
|
107
|
+
default: false,
|
|
108
|
+
});
|
|
109
|
+
saveCredentials(endpoint, user, password, selected, savePass);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
67
112
|
}
|
|
68
113
|
catch (error) {
|
|
69
114
|
printError(error);
|
|
@@ -85,22 +130,81 @@ authCommand
|
|
|
85
130
|
}
|
|
86
131
|
});
|
|
87
132
|
// ── auth status (alias: whoami) ──────────────────────────────
|
|
133
|
+
function resolveSource(key, flagValue) {
|
|
134
|
+
if (flagValue)
|
|
135
|
+
return "flag";
|
|
136
|
+
const envMap = {
|
|
137
|
+
endpoint: process.env.IREPO_ENDPOINT,
|
|
138
|
+
user: process.env.IREPO_USER,
|
|
139
|
+
password: process.env.IREPO_PASSWORD,
|
|
140
|
+
};
|
|
141
|
+
if (envMap[key])
|
|
142
|
+
return "env";
|
|
143
|
+
const info = getConfigWithSource(key);
|
|
144
|
+
if (info.source) {
|
|
145
|
+
const scopeLabels = {
|
|
146
|
+
local: "local-config",
|
|
147
|
+
project: "project-config",
|
|
148
|
+
user: "user-config",
|
|
149
|
+
};
|
|
150
|
+
return scopeLabels[info.source] ?? info.source;
|
|
151
|
+
}
|
|
152
|
+
return "";
|
|
153
|
+
}
|
|
88
154
|
authCommand
|
|
89
155
|
.command("status")
|
|
90
156
|
.alias("whoami")
|
|
91
|
-
.description("Show current connection info")
|
|
92
|
-
.
|
|
157
|
+
.description("Show current connection info and credential sources")
|
|
158
|
+
.option("--verify", "Test connection to the server")
|
|
159
|
+
.action(async (opts) => {
|
|
93
160
|
try {
|
|
94
|
-
const endpoint = getConfig("endpoint");
|
|
95
|
-
const user = getConfig("user");
|
|
161
|
+
const endpoint = process.env.IREPO_ENDPOINT || getConfig("endpoint");
|
|
162
|
+
const user = process.env.IREPO_USER || getConfig("user");
|
|
163
|
+
const hasPassword = !!(process.env.IREPO_PASSWORD || getConfig("password"));
|
|
96
164
|
if (!endpoint && !user) {
|
|
97
165
|
printWarning("Not configured. Run \"i-repo auth login\" to get started.");
|
|
98
166
|
return;
|
|
99
167
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
168
|
+
const endpointSrc = resolveSource("endpoint");
|
|
169
|
+
const userSrc = resolveSource("user");
|
|
170
|
+
const passwordSrc = resolveSource("password");
|
|
171
|
+
const display = {
|
|
172
|
+
"Endpoint": endpoint
|
|
173
|
+
? `${endpoint} ${t.dim(`[${endpointSrc}]`)}`
|
|
174
|
+
: t.muted("(not set)"),
|
|
175
|
+
"User": user
|
|
176
|
+
? `${user} ${t.dim(`[${userSrc}]`)}`
|
|
177
|
+
: t.muted("(not set)"),
|
|
178
|
+
"Password": hasPassword
|
|
179
|
+
? `Available ${t.dim(`[${passwordSrc}]`)}`
|
|
180
|
+
: t.muted("Not set"),
|
|
181
|
+
};
|
|
182
|
+
// Config file paths
|
|
183
|
+
display["User config"] = getUserConfigPath();
|
|
184
|
+
const projPath = getProjectConfigPath();
|
|
185
|
+
if (projPath)
|
|
186
|
+
display["Project config"] = projPath;
|
|
187
|
+
const localPath = getLocalConfigPath();
|
|
188
|
+
if (localPath)
|
|
189
|
+
display["Local config"] = localPath;
|
|
190
|
+
printDetails("Connection Info", display);
|
|
191
|
+
// Optional connection test
|
|
192
|
+
if (opts.verify) {
|
|
193
|
+
if (!endpoint || !user) {
|
|
194
|
+
printWarning("Cannot verify: endpoint and user must be configured.");
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const { createClient } = await import("../config/client.js");
|
|
198
|
+
try {
|
|
199
|
+
const client = await createClient({ endpoint, user });
|
|
200
|
+
await client.systems.getUrlScheme();
|
|
201
|
+
printSuccess("Connection verified successfully.");
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
printError(error);
|
|
205
|
+
process.exitCode = 1;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
104
208
|
}
|
|
105
209
|
catch (error) {
|
|
106
210
|
printError(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,SAAS,EACT,YAAY,E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C;QAClB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6DpC,eAAO,MAAM,aAAa,SACoB,CAAC"}
|