bkper 4.0.1 → 4.1.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.
- package/CHANGELOG.md +51 -28
- package/README.md +52 -4
- package/lib/auth/local-auth-service.d.ts +12 -0
- package/lib/auth/local-auth-service.d.ts.map +1 -1
- package/lib/auth/local-auth-service.js +12 -0
- package/lib/auth/local-auth-service.js.map +1 -1
- package/lib/bkper-factory.d.ts.map +1 -1
- package/lib/bkper-factory.js +5 -0
- package/lib/bkper-factory.js.map +1 -1
- package/lib/cli.js +19 -881
- package/lib/cli.js.map +1 -1
- package/lib/commands/accounts/batch-create.d.ts +10 -0
- package/lib/commands/accounts/batch-create.d.ts.map +1 -0
- package/lib/commands/accounts/batch-create.js +74 -0
- package/lib/commands/accounts/batch-create.js.map +1 -0
- package/lib/commands/accounts/create.d.ts +17 -0
- package/lib/commands/accounts/create.d.ts.map +1 -1
- package/lib/commands/accounts/create.js +24 -5
- package/lib/commands/accounts/create.js.map +1 -1
- package/lib/commands/accounts/delete.d.ts +8 -0
- package/lib/commands/accounts/delete.d.ts.map +1 -1
- package/lib/commands/accounts/delete.js +8 -0
- package/lib/commands/accounts/delete.js.map +1 -1
- package/lib/commands/accounts/get.d.ts +8 -0
- package/lib/commands/accounts/get.d.ts.map +1 -1
- package/lib/commands/accounts/get.js +8 -0
- package/lib/commands/accounts/get.js.map +1 -1
- package/lib/commands/accounts/index.d.ts +2 -1
- package/lib/commands/accounts/index.d.ts.map +1 -1
- package/lib/commands/accounts/index.js +2 -1
- package/lib/commands/accounts/index.js.map +1 -1
- package/lib/commands/accounts/list.d.ts +12 -0
- package/lib/commands/accounts/list.d.ts.map +1 -1
- package/lib/commands/accounts/list.js +25 -0
- package/lib/commands/accounts/list.js.map +1 -1
- package/lib/commands/accounts/register.d.ts +3 -0
- package/lib/commands/accounts/register.d.ts.map +1 -0
- package/lib/commands/accounts/register.js +96 -0
- package/lib/commands/accounts/register.js.map +1 -0
- package/lib/commands/accounts/update.d.ts +18 -0
- package/lib/commands/accounts/update.d.ts.map +1 -1
- package/lib/commands/accounts/update.js +23 -5
- package/lib/commands/accounts/update.js.map +1 -1
- package/lib/commands/action.d.ts +21 -0
- package/lib/commands/action.d.ts.map +1 -0
- package/lib/commands/action.js +36 -0
- package/lib/commands/action.js.map +1 -0
- package/lib/commands/apps/index.d.ts +1 -1
- package/lib/commands/apps/index.d.ts.map +1 -1
- package/lib/commands/apps/index.js +1 -1
- package/lib/commands/apps/index.js.map +1 -1
- package/lib/commands/apps/install.d.ts +7 -0
- package/lib/commands/apps/install.d.ts.map +1 -1
- package/lib/commands/apps/install.js +7 -0
- package/lib/commands/apps/install.js.map +1 -1
- package/lib/commands/apps/list.d.ts +6 -0
- package/lib/commands/apps/list.d.ts.map +1 -1
- package/lib/commands/apps/list.js +20 -0
- package/lib/commands/apps/list.js.map +1 -1
- package/lib/commands/apps/register.d.ts +3 -0
- package/lib/commands/apps/register.d.ts.map +1 -0
- package/lib/commands/apps/register.js +130 -0
- package/lib/commands/apps/register.js.map +1 -0
- package/lib/commands/apps/uninstall.d.ts +8 -0
- package/lib/commands/apps/uninstall.d.ts.map +1 -1
- package/lib/commands/apps/uninstall.js +8 -0
- package/lib/commands/apps/uninstall.js.map +1 -1
- package/lib/commands/balances/list.d.ts +12 -0
- package/lib/commands/balances/list.d.ts.map +1 -1
- package/lib/commands/balances/list.js +16 -1
- package/lib/commands/balances/list.js.map +1 -1
- package/lib/commands/balances/register.d.ts +3 -0
- package/lib/commands/balances/register.d.ts.map +1 -0
- package/lib/commands/balances/register.js +35 -0
- package/lib/commands/balances/register.js.map +1 -0
- package/lib/commands/books/create.d.ts +9 -0
- package/lib/commands/books/create.d.ts.map +1 -1
- package/lib/commands/books/create.js +16 -2
- package/lib/commands/books/create.js.map +1 -1
- package/lib/commands/books/get.d.ts +6 -0
- package/lib/commands/books/get.d.ts.map +1 -1
- package/lib/commands/books/get.js +6 -0
- package/lib/commands/books/get.js.map +1 -1
- package/lib/commands/books/index.d.ts +1 -1
- package/lib/commands/books/index.d.ts.map +1 -1
- package/lib/commands/books/index.js +1 -1
- package/lib/commands/books/index.js.map +1 -1
- package/lib/commands/books/list.d.ts +13 -0
- package/lib/commands/books/list.d.ts.map +1 -1
- package/lib/commands/books/list.js +43 -0
- package/lib/commands/books/list.js.map +1 -1
- package/lib/commands/books/register.d.ts +3 -0
- package/lib/commands/books/register.d.ts.map +1 -0
- package/lib/commands/books/register.js +82 -0
- package/lib/commands/books/register.js.map +1 -0
- package/lib/commands/books/update.d.ts +11 -0
- package/lib/commands/books/update.d.ts.map +1 -1
- package/lib/commands/books/update.js +21 -5
- package/lib/commands/books/update.js.map +1 -1
- package/lib/commands/cli-helpers.d.ts +15 -0
- package/lib/commands/cli-helpers.d.ts.map +1 -0
- package/lib/commands/cli-helpers.js +29 -0
- package/lib/commands/cli-helpers.js.map +1 -0
- package/lib/commands/collections/add-book.d.ts +8 -0
- package/lib/commands/collections/add-book.d.ts.map +1 -1
- package/lib/commands/collections/add-book.js +8 -0
- package/lib/commands/collections/add-book.js.map +1 -1
- package/lib/commands/collections/create.d.ts +9 -0
- package/lib/commands/collections/create.d.ts.map +1 -1
- package/lib/commands/collections/create.js +6 -0
- package/lib/commands/collections/create.js.map +1 -1
- package/lib/commands/collections/delete.d.ts +7 -0
- package/lib/commands/collections/delete.d.ts.map +1 -1
- package/lib/commands/collections/delete.js +7 -0
- package/lib/commands/collections/delete.js.map +1 -1
- package/lib/commands/collections/get.d.ts +7 -0
- package/lib/commands/collections/get.d.ts.map +1 -1
- package/lib/commands/collections/get.js +7 -0
- package/lib/commands/collections/get.js.map +1 -1
- package/lib/commands/collections/index.d.ts +1 -1
- package/lib/commands/collections/index.d.ts.map +1 -1
- package/lib/commands/collections/index.js +1 -1
- package/lib/commands/collections/index.js.map +1 -1
- package/lib/commands/collections/list.d.ts +11 -0
- package/lib/commands/collections/list.d.ts.map +1 -1
- package/lib/commands/collections/list.js +26 -0
- package/lib/commands/collections/list.js.map +1 -1
- package/lib/commands/collections/register.d.ts +3 -0
- package/lib/commands/collections/register.d.ts.map +1 -0
- package/lib/commands/collections/register.js +86 -0
- package/lib/commands/collections/register.js.map +1 -0
- package/lib/commands/collections/remove-book.d.ts +8 -0
- package/lib/commands/collections/remove-book.d.ts.map +1 -1
- package/lib/commands/collections/remove-book.js +8 -0
- package/lib/commands/collections/remove-book.js.map +1 -1
- package/lib/commands/collections/update.d.ts +11 -0
- package/lib/commands/collections/update.d.ts.map +1 -1
- package/lib/commands/collections/update.js +8 -0
- package/lib/commands/collections/update.js.map +1 -1
- package/lib/commands/groups/batch-create.d.ts +10 -0
- package/lib/commands/groups/batch-create.d.ts.map +1 -0
- package/lib/commands/groups/batch-create.js +69 -0
- package/lib/commands/groups/batch-create.js.map +1 -0
- package/lib/commands/groups/create.d.ts +8 -0
- package/lib/commands/groups/create.d.ts.map +1 -1
- package/lib/commands/groups/create.js +23 -5
- package/lib/commands/groups/create.js.map +1 -1
- package/lib/commands/groups/delete.d.ts +7 -0
- package/lib/commands/groups/delete.d.ts.map +1 -1
- package/lib/commands/groups/delete.js +7 -0
- package/lib/commands/groups/delete.js.map +1 -1
- package/lib/commands/groups/get.d.ts +7 -0
- package/lib/commands/groups/get.d.ts.map +1 -1
- package/lib/commands/groups/get.js +7 -0
- package/lib/commands/groups/get.js.map +1 -1
- package/lib/commands/groups/index.d.ts +2 -1
- package/lib/commands/groups/index.d.ts.map +1 -1
- package/lib/commands/groups/index.js +2 -1
- package/lib/commands/groups/index.js.map +1 -1
- package/lib/commands/groups/list.d.ts +12 -0
- package/lib/commands/groups/list.d.ts.map +1 -1
- package/lib/commands/groups/list.js +25 -0
- package/lib/commands/groups/list.js.map +1 -1
- package/lib/commands/groups/register.d.ts +3 -0
- package/lib/commands/groups/register.d.ts.map +1 -0
- package/lib/commands/groups/register.js +90 -0
- package/lib/commands/groups/register.js.map +1 -0
- package/lib/commands/groups/update.d.ts +9 -0
- package/lib/commands/groups/update.d.ts.map +1 -1
- package/lib/commands/groups/update.js +21 -5
- package/lib/commands/groups/update.js.map +1 -1
- package/lib/commands/transactions/batch-create.d.ts +10 -0
- package/lib/commands/transactions/batch-create.d.ts.map +1 -0
- package/lib/commands/transactions/batch-create.js +98 -0
- package/lib/commands/transactions/batch-create.js.map +1 -0
- package/lib/commands/transactions/check.d.ts +7 -0
- package/lib/commands/transactions/check.d.ts.map +1 -1
- package/lib/commands/transactions/check.js +7 -0
- package/lib/commands/transactions/check.js.map +1 -1
- package/lib/commands/transactions/create.d.ts +10 -0
- package/lib/commands/transactions/create.d.ts.map +1 -1
- package/lib/commands/transactions/create.js +31 -9
- package/lib/commands/transactions/create.js.map +1 -1
- package/lib/commands/transactions/index.d.ts +2 -1
- package/lib/commands/transactions/index.d.ts.map +1 -1
- package/lib/commands/transactions/index.js +2 -1
- package/lib/commands/transactions/index.js.map +1 -1
- package/lib/commands/transactions/list.d.ts +20 -0
- package/lib/commands/transactions/list.d.ts.map +1 -1
- package/lib/commands/transactions/list.js +38 -0
- package/lib/commands/transactions/list.js.map +1 -1
- package/lib/commands/transactions/merge.d.ts +12 -0
- package/lib/commands/transactions/merge.d.ts.map +1 -1
- package/lib/commands/transactions/merge.js +15 -2
- package/lib/commands/transactions/merge.js.map +1 -1
- package/lib/commands/transactions/post.d.ts +7 -0
- package/lib/commands/transactions/post.d.ts.map +1 -1
- package/lib/commands/transactions/post.js +7 -0
- package/lib/commands/transactions/post.js.map +1 -1
- package/lib/commands/transactions/register.d.ts +3 -0
- package/lib/commands/transactions/register.d.ts.map +1 -0
- package/lib/commands/transactions/register.js +146 -0
- package/lib/commands/transactions/register.js.map +1 -0
- package/lib/commands/transactions/trash.d.ts +7 -0
- package/lib/commands/transactions/trash.d.ts.map +1 -1
- package/lib/commands/transactions/trash.js +7 -0
- package/lib/commands/transactions/trash.js.map +1 -1
- package/lib/commands/transactions/update.d.ts +11 -0
- package/lib/commands/transactions/update.d.ts.map +1 -1
- package/lib/commands/transactions/update.js +31 -7
- package/lib/commands/transactions/update.js.map +1 -1
- package/lib/input/csv-parser.d.ts +9 -0
- package/lib/input/csv-parser.d.ts.map +1 -0
- package/lib/input/csv-parser.js +110 -0
- package/lib/input/csv-parser.js.map +1 -0
- package/lib/input/format-detector.d.ts +12 -0
- package/lib/input/format-detector.d.ts.map +1 -0
- package/lib/input/format-detector.js +14 -0
- package/lib/input/format-detector.js.map +1 -0
- package/lib/input/index.d.ts +9 -0
- package/lib/input/index.d.ts.map +1 -0
- package/lib/input/index.js +40 -0
- package/lib/input/index.js.map +1 -0
- package/lib/input/stdin-reader.d.ts +8 -0
- package/lib/input/stdin-reader.d.ts.map +1 -0
- package/lib/input/stdin-reader.js +37 -0
- package/lib/input/stdin-reader.js.map +1 -0
- package/lib/render/csv-formatter.d.ts +15 -0
- package/lib/render/csv-formatter.d.ts.map +1 -0
- package/lib/render/csv-formatter.js +37 -0
- package/lib/render/csv-formatter.js.map +1 -0
- package/lib/render/index.d.ts +3 -1
- package/lib/render/index.d.ts.map +1 -1
- package/lib/render/index.js +2 -1
- package/lib/render/index.js.map +1 -1
- package/lib/render/output.d.ts +27 -6
- package/lib/render/output.d.ts.map +1 -1
- package/lib/render/output.js +35 -12
- package/lib/render/output.js.map +1 -1
- package/lib/render/table-formatter.d.ts.map +1 -1
- package/lib/render/table-formatter.js +22 -4
- package/lib/render/table-formatter.js.map +1 -1
- package/lib/utils/validation.d.ts +38 -0
- package/lib/utils/validation.d.ts.map +1 -0
- package/lib/utils/validation.js +46 -0
- package/lib/utils/validation.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,45 +4,68 @@
|
|
|
4
4
|
|
|
5
5
|
### **February 2026**
|
|
6
6
|
|
|
7
|
-
**CLI**
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
7
|
+
- **CLI**
|
|
8
|
+
- Added `--format` flag with `table`, `json`, and `csv` output modes — replaces the `--json` flag
|
|
9
|
+
- CSV output follows RFC 4180 — raw values, all metadata, no truncation, ideal for spreadsheets and data pipelines
|
|
10
|
+
- Batch operations via stdin — pipe JSON or CSV data into create commands for bulk processing
|
|
11
|
+
- Table-formatted output is now the default for all commands
|
|
12
|
+
- Added `-b, --book` option for scoping commands to a specific [Book](https://bkper.com/docs)
|
|
13
|
+
- Added `-p, --properties` repeatable flag for setting custom properties as `key=value` pairs
|
|
14
|
+
- [Transaction](https://bkper.com/docs) tables show formatted dates and values with IDs
|
|
15
|
+
- [Group](https://bkper.com/docs) tables render as indented trees showing hierarchy
|
|
16
|
+
- Single-item commands display as indented key-value pairs
|
|
17
|
+
- Removed MCP server — now maintained as a separate project
|
|
18
|
+
- **Data Management**
|
|
19
|
+
- Added batch create for [Account](https://bkper.com/docs)s, [Group](https://bkper.com/docs)s, and [Transaction](https://bkper.com/docs)s — accepts JSON arrays or CSV via stdin
|
|
20
|
+
- Added [Book](https://bkper.com/docs) create command
|
|
21
|
+
- Added [Collection](https://bkper.com/docs) commands: create, list, get, update, delete, add-book, remove-book
|
|
22
|
+
- Added [Transaction](https://bkper.com/docs) update command
|
|
23
|
+
- Renamed `balance get` to `balance list` for consistency
|
|
24
|
+
- **Authentication**
|
|
25
|
+
- Switched to PKCE-based OAuth flow — no client secret required
|
|
26
|
+
- Branded OAuth callback pages for a polished sign-in experience
|
|
27
|
+
- **App Development**
|
|
28
|
+
- Local development now uses Cloudflare Tunnel for event handling — no cloud deployment needed during development
|
|
29
|
+
- Renamed `dev` environment to `preview` for clarity
|
|
30
|
+
- Added `--no-open` flag to suppress automatic browser launch during dev
|
|
31
|
+
|
|
32
|
+
### **January 2026**
|
|
33
|
+
|
|
34
|
+
- **App Platform**
|
|
35
|
+
- Added [`app init`](https://bkper.com/docs) command to scaffold new apps from template
|
|
36
|
+
- Added [`app deploy`](https://bkper.com/docs) and [`app undeploy`](https://bkper.com/docs) commands for managing deployments
|
|
37
|
+
- Added [`app status`](https://bkper.com/docs) to view current deployment information
|
|
38
|
+
- Added [`app dev`](https://bkper.com/docs) and [`app build`](https://bkper.com/docs) commands for local development and build workflows
|
|
39
|
+
- Added [`app secrets`](https://bkper.com/docs) management — put, list, and delete secrets for your apps
|
|
40
|
+
- Added [`app sync`](https://bkper.com/docs) command to push `bkper.yaml` configuration to the platform
|
|
41
|
+
- Support for shared packages in monorepo setups with hot reload
|
|
42
|
+
- Asset file uploads included in deployments
|
|
43
|
+
- Migrated app configuration from `bkperapp.yaml` to `bkper.yaml`
|
|
17
44
|
|
|
18
45
|
## 2025
|
|
19
46
|
|
|
20
47
|
### **October 2025**
|
|
21
48
|
|
|
22
|
-
**MCP Server**
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- Improved transaction data responses for better AI assistant integration
|
|
49
|
+
- **MCP Server**
|
|
50
|
+
- Added smart [Transaction](https://bkper.com/docs) merging — combine multiple transactions based on date and account matching
|
|
51
|
+
- Simplified [Transaction](https://bkper.com/docs) creation — accounts are now optional for recording simple income and expenses
|
|
52
|
+
- Improved transaction data responses for better AI assistant integration
|
|
27
53
|
|
|
28
54
|
### **September 2025**
|
|
29
55
|
|
|
30
|
-
**MCP Server**
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
- Fixed credential storage to follow standard configuration directories
|
|
56
|
+
- **MCP Server**
|
|
57
|
+
- Streamlined transaction data for cleaner AI assistant responses
|
|
58
|
+
- Fixed credential storage to follow standard configuration directories
|
|
34
59
|
|
|
35
60
|
### **July 2025**
|
|
36
61
|
|
|
37
|
-
**MCP Server**
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- Added setup instructions for Claude Desktop and other AI tools
|
|
62
|
+
- **MCP Server**
|
|
63
|
+
- Added monthly and year-to-date [Balance](https://bkper.com/docs) analysis for AI assistants
|
|
64
|
+
- Improved date filtering with `before:` operator
|
|
65
|
+
- Added setup instructions for Claude Desktop and other AI tools
|
|
42
66
|
|
|
43
67
|
### **June 2025**
|
|
44
68
|
|
|
45
|
-
**
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
- Added book name filtering to quickly find specific books
|
|
69
|
+
- **CLI**
|
|
70
|
+
- Introduced MCP server — connect AI assistants to your Bkper [Books](https://bkper.com/docs) with `bkper mcp start`
|
|
71
|
+
- Added [Book](https://bkper.com/docs) name filtering to quickly find specific books
|
package/README.md
CHANGED
|
@@ -178,7 +178,7 @@ Apps are configured via a `bkper.yaml` file in the project root. See the complet
|
|
|
178
178
|
|
|
179
179
|
**Interact with books, accounts, transactions, and balances.**
|
|
180
180
|
|
|
181
|
-
All data commands that operate within a book use `-b, --book <bookId>` to specify the book context. Use `--
|
|
181
|
+
All data commands that operate within a book use `-b, --book <bookId>` to specify the book context. Use `--format` to control output (see [Output Format](#output-format)).
|
|
182
182
|
|
|
183
183
|
### Books
|
|
184
184
|
|
|
@@ -437,16 +437,64 @@ bkper collection delete col_789
|
|
|
437
437
|
|
|
438
438
|
## Output Format
|
|
439
439
|
|
|
440
|
-
All commands
|
|
440
|
+
All commands support three output formats via the `--format` global flag:
|
|
441
|
+
|
|
442
|
+
| Format | Flag | Best for |
|
|
443
|
+
| ------ | -------------------------- | --------------------------------------- |
|
|
444
|
+
| Table | `--format table` (default) | Human reading in the terminal |
|
|
445
|
+
| JSON | `--format json` | Programmatic access, single-item detail |
|
|
446
|
+
| CSV | `--format csv` | Spreadsheets, AI agents, data pipelines |
|
|
441
447
|
|
|
442
448
|
```bash
|
|
443
449
|
# Table output (default)
|
|
444
|
-
bkper
|
|
450
|
+
bkper account list -b abc123
|
|
445
451
|
|
|
446
452
|
# JSON output
|
|
447
|
-
bkper
|
|
453
|
+
bkper account list -b abc123 --format json
|
|
454
|
+
|
|
455
|
+
# CSV output -- raw data, no truncation, RFC 4180
|
|
456
|
+
bkper account list -b abc123 --format csv
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### CSV output details
|
|
460
|
+
|
|
461
|
+
CSV output is designed for machine consumption:
|
|
462
|
+
|
|
463
|
+
- **RFC 4180 compliant** -- proper quoting, CRLF line endings, no truncation
|
|
464
|
+
- **All metadata included** -- IDs, properties, hidden properties, URLs, and timestamps are enabled
|
|
465
|
+
- **Raw values** -- dates stay in ISO format, numbers are unformatted (no locale formatting)
|
|
466
|
+
- **Single-item commands** (e.g. `account get`, `transaction create`) fall back to JSON since CSV adds no value for non-tabular data
|
|
467
|
+
|
|
468
|
+
### AI agent guidance
|
|
469
|
+
|
|
470
|
+
When using the CLI from an AI agent, LLM, or automated script:
|
|
471
|
+
|
|
472
|
+
- **Use `--format csv` for list commands.** CSV is dramatically more token-efficient than JSON for tabular data -- typically 3-5x fewer tokens for the same information.
|
|
473
|
+
- **Use `--format json` for single-item commands** (`get`, `create`, `update`) where you need structured field access.
|
|
474
|
+
- **Pipe data in via stdin** for batch operations (see below).
|
|
475
|
+
|
|
476
|
+
### Stdin input (batch operations)
|
|
477
|
+
|
|
478
|
+
Write commands (`account create`, `group create`, `transaction create`) accept data piped via stdin for batch operations. The format is auto-detected (JSON or CSV).
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
# Create accounts from JSON
|
|
482
|
+
echo '[{"name":"Cash","type":"ASSET"},{"name":"Revenue","type":"INCOMING"}]' | \
|
|
483
|
+
bkper account create -b abc123
|
|
484
|
+
|
|
485
|
+
# Create transactions from CSV
|
|
486
|
+
cat transactions.csv | bkper transaction create -b abc123
|
|
487
|
+
|
|
488
|
+
# Pipe from a script
|
|
489
|
+
python export_bank.py | bkper transaction create -b abc123
|
|
448
490
|
```
|
|
449
491
|
|
|
492
|
+
**JSON input:** a single object `{}` or an array `[{}, {}]`. Field names map to CLI options (`date`, `amount`, `description`, `from`, `to`, `name`, `type`, etc.). Unknown fields become custom properties.
|
|
493
|
+
|
|
494
|
+
**CSV input:** first row is headers mapping to field names. Unknown columns become custom properties.
|
|
495
|
+
|
|
496
|
+
**Batch output:** results are streamed as NDJSON (one JSON object per line), printed as each batch completes.
|
|
497
|
+
|
|
450
498
|
---
|
|
451
499
|
|
|
452
500
|
## Library
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initiates the OAuth login flow. If already logged in, notifies the user
|
|
3
|
+
* and refreshes the token.
|
|
4
|
+
*/
|
|
1
5
|
export declare function login(): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Logs out by removing stored OAuth credentials from disk.
|
|
8
|
+
*/
|
|
2
9
|
export declare function logout(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Checks whether the user has stored OAuth credentials.
|
|
12
|
+
*
|
|
13
|
+
* @returns true if credentials are present, false otherwise
|
|
14
|
+
*/
|
|
3
15
|
export declare function isLoggedIn(): boolean;
|
|
4
16
|
/**
|
|
5
17
|
* @returns A promise that resolves to a valid OAuth token.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-auth-service.d.ts","sourceRoot":"","sources":["../../src/auth/local-auth-service.ts"],"names":[],"mappings":"AAoDA,wBAAsB,KAAK,kBAK1B;AAED,wBAAgB,MAAM,SAKrB;AAED,wBAAgB,UAAU,YAEzB;AA6HD;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAyBrD"}
|
|
1
|
+
{"version":3,"file":"local-auth-service.d.ts","sourceRoot":"","sources":["../../src/auth/local-auth-service.ts"],"names":[],"mappings":"AAoDA;;;GAGG;AACH,wBAAsB,KAAK,kBAK1B;AAED;;GAEG;AACH,wBAAgB,MAAM,SAKrB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,YAEzB;AA6HD;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAyBrD"}
|
|
@@ -55,6 +55,10 @@ try {
|
|
|
55
55
|
catch (err) {
|
|
56
56
|
// Credentials will be null if not found - no need to log during module loading
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Initiates the OAuth login flow. If already logged in, notifies the user
|
|
60
|
+
* and refreshes the token.
|
|
61
|
+
*/
|
|
58
62
|
export function login() {
|
|
59
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
64
|
if (storedCredentials) {
|
|
@@ -63,12 +67,20 @@ export function login() {
|
|
|
63
67
|
yield getOAuthToken();
|
|
64
68
|
});
|
|
65
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Logs out by removing stored OAuth credentials from disk.
|
|
72
|
+
*/
|
|
66
73
|
export function logout() {
|
|
67
74
|
if (fs.existsSync(storedCredentialsPath)) {
|
|
68
75
|
fs.rmSync(storedCredentialsPath);
|
|
69
76
|
}
|
|
70
77
|
console.log('Bkper logged out.');
|
|
71
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Checks whether the user has stored OAuth credentials.
|
|
81
|
+
*
|
|
82
|
+
* @returns true if credentials are present, false otherwise
|
|
83
|
+
*/
|
|
72
84
|
export function isLoggedIn() {
|
|
73
85
|
return storedCredentials != null;
|
|
74
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-auth-service.js","sourceRoot":"","sources":["../../src/auth/local-auth-service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAe,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,MAAM,YAAY,GAAG;IACjB,QAAQ,EAAE,0EAA0E;IACpF,YAAY,EAAE,qCAAqC;IACnD,WAAW,EAAE,sCAAsC;CACtD,CAAC;AAEF,IAAI,iBAA8B,CAAC;AAEnC,MAAM,kBAAkB,GAAG,GAAG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bkper-factory.d.ts","sourceRoot":"","sources":["../src/bkper-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjC;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAiBxC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,SAezB"}
|
package/lib/bkper-factory.js
CHANGED
|
@@ -43,6 +43,11 @@ export function setupBkper() {
|
|
|
43
43
|
Bkper.setConfig({
|
|
44
44
|
apiKeyProvider: apiKey ? () => __awaiter(this, void 0, void 0, function* () { return apiKey; }) : undefined,
|
|
45
45
|
oauthTokenProvider: () => getOAuthToken(),
|
|
46
|
+
requestHeadersProvider: () => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
return {
|
|
48
|
+
'bkper-agent-id': 'bkper-cli',
|
|
49
|
+
};
|
|
50
|
+
}),
|
|
46
51
|
//@ts-ignore
|
|
47
52
|
apiBaseUrl,
|
|
48
53
|
});
|
package/lib/bkper-factory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bkper-factory.js","sourceRoot":"","sources":["../src/bkper-factory.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,IAAI,uBAAuB,GAAsB,SAAS,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;IAC5B,8CAA8C;IAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC;QACrE,OAAQ,UAAkB,CAAC,WAAW,IAAI,KAAK,CAAC;IACpD,CAAC;IAED,+CAA+C;IAC/C,IAAI,uBAAuB,EAAE,CAAC;QAC1B,OAAO,uBAAuB,CAAC;IACnC,CAAC;IAED,sCAAsC;IACtC,UAAU,EAAE,CAAC;IACb,gCA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