bkper 4.16.10 → 4.17.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/README.md +4 -3
- package/lib/agent/run-agent-mode.d.ts +2 -0
- package/lib/agent/run-agent-mode.d.ts.map +1 -1
- package/lib/agent/run-agent-mode.js +33 -1
- package/lib/agent/run-agent-mode.js.map +1 -1
- package/lib/commands/accounts/list.js +1 -1
- package/lib/commands/accounts/list.js.map +1 -1
- package/lib/commands/agent-command.d.ts +5 -0
- package/lib/commands/agent-command.d.ts.map +1 -1
- package/lib/commands/agent-command.js +23 -3
- package/lib/commands/agent-command.js.map +1 -1
- package/lib/commands/apps/list.js +1 -1
- package/lib/commands/apps/list.js.map +1 -1
- package/lib/commands/books/list.js +1 -1
- package/lib/commands/books/list.js.map +1 -1
- package/lib/commands/cli-helpers.d.ts +4 -0
- package/lib/commands/cli-helpers.d.ts.map +1 -1
- package/lib/commands/cli-helpers.js +10 -0
- package/lib/commands/cli-helpers.js.map +1 -1
- package/lib/commands/collections/list.js +1 -1
- package/lib/commands/collections/list.js.map +1 -1
- package/lib/commands/files/index.d.ts +1 -0
- package/lib/commands/files/index.d.ts.map +1 -1
- package/lib/commands/files/index.js +1 -0
- package/lib/commands/files/index.js.map +1 -1
- package/lib/commands/files/list.d.ts +24 -0
- package/lib/commands/files/list.d.ts.map +1 -0
- package/lib/commands/files/list.js +102 -0
- package/lib/commands/files/list.js.map +1 -0
- package/lib/commands/files/register.d.ts.map +1 -1
- package/lib/commands/files/register.js +14 -3
- package/lib/commands/files/register.js.map +1 -1
- package/lib/commands/groups/list.js +1 -1
- package/lib/commands/groups/list.js.map +1 -1
- package/lib/commands/transactions/list.d.ts +4 -0
- package/lib/commands/transactions/list.d.ts.map +1 -1
- package/lib/commands/transactions/list.js +43 -2
- package/lib/commands/transactions/list.js.map +1 -1
- package/lib/commands/transactions/register.d.ts.map +1 -1
- package/lib/commands/transactions/register.js +5 -1
- package/lib/commands/transactions/register.js.map +1 -1
- package/lib/docs/app-management.md +5 -3
- package/lib/docs/bkper-js.md +3 -1
- package/lib/docs/cli-reference.md +4 -3
- package/lib/docs/data-management.md +30 -4
- package/lib/docs-compliance/rules.d.ts.map +1 -1
- package/lib/docs-compliance/rules.js +31 -11
- package/lib/docs-compliance/rules.js.map +1 -1
- package/lib/render/output.d.ts +2 -1
- package/lib/render/output.d.ts.map +1 -1
- package/lib/render/output.js +2 -1
- package/lib/render/output.js.map +1 -1
- package/lib/utils/shell-quote.d.ts +8 -0
- package/lib/utils/shell-quote.d.ts.map +1 -0
- package/lib/utils/shell-quote.js +10 -0
- package/lib/utils/shell-quote.js.map +1 -0
- package/package.json +4 -4
|
@@ -34,7 +34,7 @@ export function listGroupsFormatted(bookId, format) {
|
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
const groups = yield listGroups(bookId);
|
|
36
36
|
if (format === 'json') {
|
|
37
|
-
return { kind: 'json',
|
|
37
|
+
return { kind: 'json', items: groups.map(g => g.json()) };
|
|
38
38
|
}
|
|
39
39
|
const builder = new GroupsDataTableBuilder(groups).ids(true).tree(true);
|
|
40
40
|
if (format === 'csv') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/groups/list.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAS,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGzD;;;;;;;;GAQG;AACH,MAAM,UAAgB,UAAU,CAAC,MAAc;;QAC3C,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,OAAO,MAAM,IAA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AE,CAAC;YACnB,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACtC,CAAC;CAAA"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Book, Transaction, Account } from 'bkper-js';
|
|
2
2
|
import type { OutputFormat, ListResult } from '../../render/output.js';
|
|
3
|
+
export declare const DEFAULT_TRANSACTION_LIST_LIMIT = 100;
|
|
3
4
|
/**
|
|
4
5
|
* Options for querying transactions from a book.
|
|
5
6
|
*/
|
|
6
7
|
export interface ListTransactionsOptions {
|
|
7
8
|
query: string;
|
|
8
9
|
properties?: boolean;
|
|
10
|
+
limit?: number;
|
|
11
|
+
cursor?: string;
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
11
14
|
* Result of a transaction listing query, including the book context.
|
|
@@ -14,6 +17,7 @@ export interface ListTransactionsResult {
|
|
|
14
17
|
book: Book;
|
|
15
18
|
items: Transaction[];
|
|
16
19
|
account?: Account;
|
|
20
|
+
cursor?: string;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* Queries transactions from a book, automatically paginating through all
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/transactions/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/transactions/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIvE,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAqBlD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,GACjC,OAAO,CAAC,sBAAsB,CAAC,CAkDjC;AAED;;;GAGG;AACH,wBAAsB,yBAAyB,CAC3C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,YAAY,GACrB,OAAO,CAAC,UAAU,CAAC,CA+BrB"}
|
|
@@ -8,7 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { getBkperInstance } from '../../bkper-factory.js';
|
|
11
|
+
import { quoteShellArg } from '../../utils/shell-quote.js';
|
|
11
12
|
import { warnIfSuspiciousDateVariableQuery } from '../../utils/query-warning.js';
|
|
13
|
+
export const DEFAULT_TRANSACTION_LIST_LIMIT = 100;
|
|
14
|
+
function buildTransactionListFooter(bookId, options, cursor) {
|
|
15
|
+
var _a;
|
|
16
|
+
if (!cursor) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
const pageLimit = (_a = options.limit) !== null && _a !== void 0 ? _a : DEFAULT_TRANSACTION_LIST_LIMIT;
|
|
20
|
+
const propertiesFlag = options.properties ? ' -p' : '';
|
|
21
|
+
return [
|
|
22
|
+
`Next cursor: ${cursor}`,
|
|
23
|
+
`Next page: bkper transaction list -b ${quoteShellArg(bookId)} -q ${quoteShellArg(options.query)} --limit ${pageLimit} --cursor ${quoteShellArg(cursor)}${propertiesFlag}`,
|
|
24
|
+
].join('\n');
|
|
25
|
+
}
|
|
12
26
|
/**
|
|
13
27
|
* Queries transactions from a book, automatically paginating through all
|
|
14
28
|
* results until no more pages remain.
|
|
@@ -24,9 +38,25 @@ import { warnIfSuspiciousDateVariableQuery } from '../../utils/query-warning.js'
|
|
|
24
38
|
*/
|
|
25
39
|
export function listTransactions(bookId, options) {
|
|
26
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
var _a;
|
|
27
42
|
warnIfSuspiciousDateVariableQuery(options.query);
|
|
28
43
|
const bkper = getBkperInstance();
|
|
29
44
|
const book = yield bkper.getBook(bookId, true);
|
|
45
|
+
const explicitPagination = options.limit !== undefined || options.cursor !== undefined;
|
|
46
|
+
if (explicitPagination) {
|
|
47
|
+
const pageLimit = (_a = options.limit) !== null && _a !== void 0 ? _a : DEFAULT_TRANSACTION_LIST_LIMIT;
|
|
48
|
+
const result = yield book.listTransactions(options.query, pageLimit, options.cursor);
|
|
49
|
+
const page = {
|
|
50
|
+
book,
|
|
51
|
+
items: result.getItems() || [],
|
|
52
|
+
account: yield result.getAccount(),
|
|
53
|
+
};
|
|
54
|
+
const nextCursor = result.getCursor();
|
|
55
|
+
if (nextCursor) {
|
|
56
|
+
page.cursor = nextCursor;
|
|
57
|
+
}
|
|
58
|
+
return page;
|
|
59
|
+
}
|
|
30
60
|
const allItems = [];
|
|
31
61
|
let account;
|
|
32
62
|
let cursor;
|
|
@@ -62,7 +92,14 @@ export function listTransactionsFormatted(bookId, options, format) {
|
|
|
62
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
93
|
const result = yield listTransactions(bookId, options);
|
|
64
94
|
if (format === 'json') {
|
|
65
|
-
|
|
95
|
+
const jsonResult = {
|
|
96
|
+
kind: 'json',
|
|
97
|
+
items: result.items.map(tx => tx.json()),
|
|
98
|
+
};
|
|
99
|
+
if (result.cursor) {
|
|
100
|
+
jsonResult.cursor = result.cursor;
|
|
101
|
+
}
|
|
102
|
+
return jsonResult;
|
|
66
103
|
}
|
|
67
104
|
const builder = result.book.createTransactionsDataTable(result.items, result.account).ids(true);
|
|
68
105
|
if (format === 'csv') {
|
|
@@ -75,7 +112,11 @@ export function listTransactionsFormatted(bookId, options, format) {
|
|
|
75
112
|
}
|
|
76
113
|
}
|
|
77
114
|
const matrix = yield builder.build();
|
|
78
|
-
return {
|
|
115
|
+
return {
|
|
116
|
+
kind: 'matrix',
|
|
117
|
+
matrix,
|
|
118
|
+
footer: buildTransactionListFooter(bookId, options, result.cursor),
|
|
119
|
+
};
|
|
79
120
|
});
|
|
80
121
|
}
|
|
81
122
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/transactions/list.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/transactions/list.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAEjF,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAElD,SAAS,0BAA0B,CAC/B,MAAc,EACd,OAAgC,EAChC,MAA0B;;IAE1B,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,SAAS,GAAG,MAAA,OAAO,CAAC,KAAK,mCAAI,8BAA8B,C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AC,EAAE,CAAC,IAAI,EAAE,CAAC;aAC3C,CAAC;YACF,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBAChB,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;YACtC,CAAC;YACD,OAAO,UAAU,CAAC;QACtB,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEhG,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;YACnB,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAChF,CAAC;aAAM,CAAC;YACJ,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAC/D,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBACrB,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC7B,CAAC;QACL,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACrC,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,MAAM;YACN,MAAM,EAAE,0BAA0B,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;SACrE,CAAC;IACN,CAAC;CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/commands/transactions/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/commands/transactions/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiMlE"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { withAction } from '../action.js';
|
|
11
|
-
import { collectProperty, collectRepeatable } from '../cli-helpers.js';
|
|
11
|
+
import { collectProperty, collectRepeatable, parsePositiveInteger } from '../cli-helpers.js';
|
|
12
12
|
import { renderListResult, renderItem } from '../../render/index.js';
|
|
13
13
|
import { validateRequiredOptions, throwIfErrors } from '../../utils/validation.js';
|
|
14
14
|
import { parseStdinItems } from '../../input/index.js';
|
|
@@ -20,6 +20,8 @@ export function registerTransactionCommands(program) {
|
|
|
20
20
|
.description('List transactions in a book')
|
|
21
21
|
.option('-b, --book <bookId>', 'Book ID')
|
|
22
22
|
.option('-q, --query <query>', 'Search query')
|
|
23
|
+
.option('--limit <limit>', 'Fetch one page with up to this many transactions', parsePositiveInteger)
|
|
24
|
+
.option('--cursor <cursor>', 'Cursor for fetching the next page')
|
|
23
25
|
.option('-p, --properties', 'Include custom properties')
|
|
24
26
|
.action(options => withAction('listing transactions', (format) => __awaiter(this, void 0, void 0, function* () {
|
|
25
27
|
throwIfErrors(validateRequiredOptions(options, [
|
|
@@ -29,6 +31,8 @@ export function registerTransactionCommands(program) {
|
|
|
29
31
|
const result = yield listTransactionsFormatted(options.book, {
|
|
30
32
|
query: options.query,
|
|
31
33
|
properties: options.properties,
|
|
34
|
+
limit: options.limit,
|
|
35
|
+
cursor: options.cursor,
|
|
32
36
|
}, format);
|
|
33
37
|
renderListResult(result, format);
|
|
34
38
|
}))());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/commands/transactions/register.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/commands/transactions/register.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACH,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,gCAAgC,GACnC,MAAM,YAAY,CAAC;AAEpB,MAAM,UAAU,2BAA2B,CAAC,OAAgB;IACxD,MAAM,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAE7F,kBAAkB;SACb,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,6BAA6B,CAAC;SAC1C,MAAM,CAAC,qBAAqB,EAAE,SAAS,CAAC;SACxC,MAAM,CAAC,qBAAqB,EAAE,cAAc,CAAC;SAC7C,MAAM,CACH,iBAAiB,EACjB,kDAAkD,EAClD,oBAAoB,CACvB;SACA,MAAM,CAAC,mBAAmB,EAAE,mCAAmC,CAAC;SAChE,MAAM,CAAC,kBAAkB,EAAE,2BAA2B,CAAC;SACvD,MAAM,CAAC,OAAO,CAAC,EAAE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C,CAAC;QACpF,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QACxE,UAAU,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC,CAAA,CAAC,EAAE,CACP,CAAC;IAEN,kBAAkB;SACb,OAAO,CAAC,yCAAyC,CAAC;SAClD,WAAW,CAAC,wBAAwB,CAAC;SACrC,MAAM,CAAC,qBAAqB,EAAE,SAAS,CAAC;SACxC,MAAM,CAAC,CAAC,cAAsB,EAAE,cAAsB,EAAE,OAAO,EAAE,EAAE,CAChE,UAAU,CAAC,sBAAsB,EAAE,CAAM,MAAM,EAAC,EAAE;QAC9C,aAAa,CAAC,uBAAuB,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;QACpF,MAAM,WAAW,GAAG,MAAM,iBAAiB,CACvC,OAAO,CAAC,IAAI,EACZ,cAAc,EACd,cAAc,CACjB,CAAC;QACF,UAAU,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC,CAAA,CAAC,EAAE,CACP,CAAC;AACV,CAAC"}
|
|
@@ -392,9 +392,9 @@ deployment:
|
|
|
392
392
|
|
|
393
393
|
### Authentication
|
|
394
394
|
|
|
395
|
-
- `auth login` -
|
|
396
|
-
- `auth logout` - Revoke the stored refresh token and clear local credentials
|
|
397
|
-
- `auth token` - Print the current OAuth access token to stdout (requires prior login)
|
|
395
|
+
- `auth login` - Connect the CLI to your Bkper account, storing credentials locally
|
|
396
|
+
- `auth logout` - Revoke the stored Bkper refresh token and clear local credentials
|
|
397
|
+
- `auth token` - Print the current Bkper OAuth access token to stdout (requires prior login)
|
|
398
398
|
|
|
399
399
|
### Agent
|
|
400
400
|
|
|
@@ -402,6 +402,8 @@ deployment:
|
|
|
402
402
|
- `agent` - Start the interactive Bkper Agent
|
|
403
403
|
- `agent <pi-args...>` - Run Pi CLI with Bkper defaults (system prompt/resources)
|
|
404
404
|
|
|
405
|
+
Inside the interactive agent, `/login` connects an AI model provider; it is separate from `bkper auth login`, which connects the CLI to your Bkper account.
|
|
406
|
+
|
|
405
407
|
### App Lifecycle
|
|
406
408
|
|
|
407
409
|
- `app init <name>` - Scaffold a new app from the template
|
package/lib/docs/bkper-js.md
CHANGED
|
@@ -843,6 +843,7 @@ This class defines a Connection from an `User` to an external service.
|
|
|
843
843
|
- `getUUID()` / `setUUID(uuid: string)` → `string | undefined (set: string)` — Gets the universal unique identifier of this Connection.
|
|
844
844
|
- `json()` → `bkper.Connection` — Gets an immutable copy of the JSON payload for this resource.
|
|
845
845
|
- `remove()` → `Promise<Connection>` — Performs remove Connection.
|
|
846
|
+
- `update()` → `Promise<Connection>` — Performs update Connection.
|
|
846
847
|
|
|
847
848
|
*Standard property methods (deleteProperty, getProperties, getProperty, getPropertyKeys, getVisibleProperties, setProperties, setProperty, setVisibleProperties, setVisibleProperty) — see Account.*
|
|
848
849
|
|
|
@@ -1006,9 +1007,10 @@ This class defines a Integration from an `User` to an external service.
|
|
|
1006
1007
|
- `getLogo()` → `string | undefined` — ~~Deprecated: Use getLogoUrl instead.~~ Gets the logo of the Integration.
|
|
1007
1008
|
- `getLogoUrl()` → `string | undefined` — Gets the logo url of this Integration.
|
|
1008
1009
|
- `getLogoUrlDark()` → `string | undefined` — Gets the logo url of this Integration in dark mode.
|
|
1009
|
-
- `getName()` → `string | undefined` — Gets the name of the Integration.
|
|
1010
|
+
- `getName()` / `setName(name: string)` → `string | undefined (set: string)` — Gets the name of the Integration.
|
|
1010
1011
|
- `json()` → `bkper.Integration` — Gets an immutable copy of the JSON payload for this resource.
|
|
1011
1012
|
- `remove()` → `Promise<Integration>` — Performs remove Integration.
|
|
1013
|
+
- `update()` → `Promise<Integration>` — Performs update Integration.
|
|
1012
1014
|
|
|
1013
1015
|
*Standard property methods (deleteProperty, getProperties, getProperty, getPropertyKeys, getVisibleProperties, setProperties, setProperty, setVisibleProperties, setVisibleProperty) — see Account.*
|
|
1014
1016
|
|
|
@@ -35,13 +35,13 @@ pnpm add -g bkper
|
|
|
35
35
|
yarn global add bkper
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
### Authenticate
|
|
38
|
+
### Authenticate with Bkper
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
bkper auth login
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
`bkper auth login` connects the CLI to your Bkper account. It prints a Google verification URL and one-time code. Open the URL in any browser, enter the code, and the CLI stores credentials locally. When you are done working, run `bkper auth logout` to clear local credentials.
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -57,7 +57,7 @@ bkper
|
|
|
57
57
|
|
|
58
58
|

|
|
59
59
|
|
|
60
|
-
On first launch, type `/login` and select a provider. We recommend [OpenCode Go](https://opencode.ai/go) for open-weights models and [OpenCode Zen](https://opencode.ai/zen) for frontier models — both give you access to high-quality models with no extra setup.
|
|
60
|
+
On first launch, type `/login` and select a provider. `/login` connects the agent to an AI model provider; it is separate from `bkper auth login`, which connects the CLI to your Bkper account. We recommend [OpenCode Go](https://opencode.ai/go) for open-weights models and [OpenCode Zen](https://opencode.ai/zen) for frontier models — both give you access to high-quality models with no extra setup.
|
|
61
61
|
|
|
62
62
|
Good starting prompts:
|
|
63
63
|
|
|
@@ -139,6 +139,7 @@ Manage books, files, accounts, transactions, and balances.
|
|
|
139
139
|
```bash
|
|
140
140
|
bkper book list
|
|
141
141
|
bkper account list -b <bookId>
|
|
142
|
+
bkper file list -b <bookId> --limit 100
|
|
142
143
|
bkper transaction list -b <bookId> -q 'on:2025' --format csv
|
|
143
144
|
bkper balance list -b <bookId> -q 'on:2025-12-31' --format csv
|
|
144
145
|
```
|
|
@@ -175,6 +175,12 @@ Avoid using the same name for a Group and an Account in the same Book.
|
|
|
175
175
|
Upload local files to a book and optionally route them with properties.
|
|
176
176
|
|
|
177
177
|
```bash
|
|
178
|
+
# List the first page of files in a book
|
|
179
|
+
bkper file list -b abc123
|
|
180
|
+
|
|
181
|
+
# Fetch the next page using the cursor shown in table output or JSON
|
|
182
|
+
bkper file list -b abc123 --limit 100 --cursor cursor_123
|
|
183
|
+
|
|
178
184
|
# Upload a file to a book
|
|
179
185
|
bkper file upload ./receipt.jpg -b abc123
|
|
180
186
|
|
|
@@ -194,6 +200,9 @@ Use `-p group_id=...` for group-based routing. The CLI infers `contentType` from
|
|
|
194
200
|
<details>
|
|
195
201
|
<summary>Command reference</summary>
|
|
196
202
|
|
|
203
|
+
- `file list -b <bookId>` - List one page of files in a book
|
|
204
|
+
- `--limit <number>` - Page size (default `100`)
|
|
205
|
+
- `--cursor <cursor>` - Cursor for fetching the next page
|
|
197
206
|
- `file get <fileId> -b <bookId>` - Get a file by ID
|
|
198
207
|
- `file upload <path> -b <bookId>` - Upload a local file to a book
|
|
199
208
|
- `--account <accountIdOrName>` - Resolve an account by name or id and persist canonical `account_id=<resolvedAccountId>`
|
|
@@ -231,6 +240,12 @@ bkper transaction list -b abc123 -q 'on:2025-01'
|
|
|
231
240
|
# List with custom properties included
|
|
232
241
|
bkper transaction list -b abc123 -q 'account:Sales' -p
|
|
233
242
|
|
|
243
|
+
# Fetch one page of transactions explicitly
|
|
244
|
+
bkper transaction list -b abc123 -q 'on:2025' --limit 100
|
|
245
|
+
|
|
246
|
+
# Fetch the next transaction page
|
|
247
|
+
bkper transaction list -b abc123 -q 'on:2025' --limit 100 --cursor cursor_123
|
|
248
|
+
|
|
234
249
|
# Update a transaction
|
|
235
250
|
bkper transaction update tx_456 -b abc123 --amount 120.00 --description "Printer paper (corrected)"
|
|
236
251
|
|
|
@@ -250,7 +265,9 @@ bkper transaction merge tx_123 tx_456 -b abc123
|
|
|
250
265
|
<details>
|
|
251
266
|
<summary>Command reference</summary>
|
|
252
267
|
|
|
253
|
-
- `transaction list -b <bookId> -q <query>` - List transactions matching a query (auto-paginates through all results)
|
|
268
|
+
- `transaction list -b <bookId> -q <query>` - List transactions matching a query (auto-paginates through all results unless `--limit` or `--cursor` is provided)
|
|
269
|
+
- `--limit <number>` - Fetch one page with up to this many transactions
|
|
270
|
+
- `--cursor <cursor>` - Cursor for fetching the next page
|
|
254
271
|
- `-p, --properties` - Include custom properties in the output
|
|
255
272
|
- `transaction create -b <bookId>` - Create a transaction
|
|
256
273
|
- `--date <date>` - Transaction date
|
|
@@ -382,7 +399,7 @@ All commands support three output formats via the `--format` global flag:
|
|
|
382
399
|
| Format | Flag | Best for |
|
|
383
400
|
| ------ | -------------------------- | ------------------------------------------- |
|
|
384
401
|
| Table | `--format table` (default) | Human reading in the terminal |
|
|
385
|
-
| JSON | `--format json` | Programmatic access, single-item detail
|
|
402
|
+
| JSON | `--format json` | Programmatic access, cursors, single-item detail |
|
|
386
403
|
| CSV | `--format csv` | LLM consumption, spreadsheets, list reports |
|
|
387
404
|
|
|
388
405
|
```bash
|
|
@@ -391,11 +408,18 @@ bkper account list -b abc123
|
|
|
391
408
|
|
|
392
409
|
# JSON output
|
|
393
410
|
bkper account list -b abc123 --format json
|
|
411
|
+
# { "items": [...] }
|
|
394
412
|
|
|
395
413
|
# CSV output -- raw data, no truncation, RFC 4180
|
|
396
414
|
bkper account list -b abc123 --format csv
|
|
397
415
|
```
|
|
398
416
|
|
|
417
|
+
**JSON list output details:**
|
|
418
|
+
|
|
419
|
+
- Resource list commands return an object with an `items` array: `{ "items": [...] }`.
|
|
420
|
+
- Paginated list commands include `cursor` only when another page is available: `{ "items": [...], "cursor": "..." }`.
|
|
421
|
+
- Use `jq '.items[]'` to iterate list output.
|
|
422
|
+
|
|
399
423
|
**CSV output details:**
|
|
400
424
|
|
|
401
425
|
- **RFC 4180 compliant** -- proper quoting, CRLF line endings, no truncation
|
|
@@ -408,7 +432,7 @@ bkper account list -b abc123 --format csv
|
|
|
408
432
|
When command output will be loaded into an LLM context (chat, prompt, memory, or agent reasoning), prefer:
|
|
409
433
|
|
|
410
434
|
- **`--format csv` for list commands** (`balance list`, `transaction list`, `account list`, etc.).
|
|
411
|
-
- **`--format json` for single-item commands** (`get`, `create`, `update`) and CLI-to-CLI pipelines.
|
|
435
|
+
- **`--format json` for single-item commands** (`get`, `create`, `update`), cursor pagination, and CLI-to-CLI pipelines.
|
|
412
436
|
|
|
413
437
|
CSV is significantly more token-efficient than JSON for tabular data, and for wide balance outputs it can reduce token usage by up to **95%**.
|
|
414
438
|
|
|
@@ -456,13 +480,15 @@ echo '[{"name":"Cash","type":"ASSET"}]' | \
|
|
|
456
480
|
bkper account create -b abc123 -p "region=LATAM"
|
|
457
481
|
```
|
|
458
482
|
|
|
459
|
-
**Batch output:**
|
|
483
|
+
**Batch output:** write commands output created or updated resources as a flat JSON array:
|
|
460
484
|
|
|
461
485
|
```bash
|
|
462
486
|
bkper account create -b abc123 < accounts.json
|
|
463
487
|
# Output: [{"id":"acc-abc","name":"Cash",...}, {"id":"acc-def","name":"Revenue",...}]
|
|
464
488
|
```
|
|
465
489
|
|
|
490
|
+
List JSON output uses an `{ "items": [...] }` envelope, and stdin batch commands unwrap that envelope automatically for CLI-to-CLI pipes.
|
|
491
|
+
|
|
466
492
|
**Piping between commands:**
|
|
467
493
|
|
|
468
494
|
For resources that support stdin creation, JSON output can be piped directly into create or update commands:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/docs-compliance/rules.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,eAAe,EAAE,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/docs-compliance/rules.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,eAAe,EAAE,CAAC;CAC7B;AAoDD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CA2J1E"}
|
|
@@ -17,6 +17,25 @@ function findMissingQueryErrors(content, commandPattern, code, message) {
|
|
|
17
17
|
}
|
|
18
18
|
return errors;
|
|
19
19
|
}
|
|
20
|
+
function hasHeading(content, heading) {
|
|
21
|
+
return heading.test(content);
|
|
22
|
+
}
|
|
23
|
+
function containsAll(content, terms) {
|
|
24
|
+
const lowerContent = content.toLowerCase();
|
|
25
|
+
return terms.every(term => lowerContent.includes(term.toLowerCase()));
|
|
26
|
+
}
|
|
27
|
+
function containsSequence(content, terms) {
|
|
28
|
+
const lowerContent = content.toLowerCase();
|
|
29
|
+
let startIndex = 0;
|
|
30
|
+
for (const term of terms) {
|
|
31
|
+
const index = lowerContent.indexOf(term.toLowerCase(), startIndex);
|
|
32
|
+
if (index < 0) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
startIndex = index + term.length;
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
20
39
|
export function evaluateReadmeCompliance(content) {
|
|
21
40
|
const errors = [];
|
|
22
41
|
errors.push(...findMissingQueryErrors(content, /^\s*bkper\s+transaction\s+list\b.*$/gm, 'transaction-list-missing-query', 'Found `bkper transaction list` example without `-q/--query`.'));
|
|
@@ -48,49 +67,50 @@ export function evaluateReadmeCompliance(content) {
|
|
|
48
67
|
line: getLineNumber(content, doubleQuotedDateVariableMatch.index),
|
|
49
68
|
});
|
|
50
69
|
}
|
|
51
|
-
if (!content
|
|
70
|
+
if (!hasHeading(content, /^#{2,6}\s+Book setup guidance\b/im)) {
|
|
52
71
|
errors.push({
|
|
53
72
|
code: 'missing-book-setup-guidance-title',
|
|
54
|
-
message: 'Missing `Book setup guidance
|
|
73
|
+
message: 'Missing `Book setup guidance` section.',
|
|
55
74
|
});
|
|
56
75
|
}
|
|
57
|
-
if (!content
|
|
76
|
+
if (!containsSequence(content, ['top-level groups', 'child groups', 'accounts']) ||
|
|
77
|
+
!containsAll(content, ['--parent', '--groups'])) {
|
|
58
78
|
errors.push({
|
|
59
79
|
code: 'missing-book-setup-order-guidance',
|
|
60
80
|
message: 'Missing guidance to create top-level groups first, then child groups, then accounts.',
|
|
61
81
|
});
|
|
62
82
|
}
|
|
63
|
-
if (!content
|
|
83
|
+
if (!containsAll(content, ['verify', 'hierarchy', 'account membership'])) {
|
|
64
84
|
errors.push({
|
|
65
85
|
code: 'missing-book-setup-verification-guidance',
|
|
66
86
|
message: 'Missing guidance to verify hierarchy and account memberships before success.',
|
|
67
87
|
});
|
|
68
88
|
}
|
|
69
|
-
if (
|
|
89
|
+
if (!/LLM[-\s]first output guidance/i.test(content)) {
|
|
70
90
|
errors.push({
|
|
71
91
|
code: 'missing-llm-guidance-title',
|
|
72
|
-
message: 'Missing `LLM-first output guidance
|
|
92
|
+
message: 'Missing `LLM-first output guidance` section.',
|
|
73
93
|
});
|
|
74
94
|
}
|
|
75
|
-
if (
|
|
95
|
+
if (!/LLM[\s\S]*(?:lists|reports)[\s\S]*CSV/i.test(content)) {
|
|
76
96
|
errors.push({
|
|
77
97
|
code: 'missing-csv-guidance',
|
|
78
98
|
message: 'Missing guidance mapping LLM list/report consumption to CSV.',
|
|
79
99
|
});
|
|
80
100
|
}
|
|
81
|
-
if (
|
|
101
|
+
if (!/(?:programmatic|pipelines)[\s\S]*JSON/i.test(content)) {
|
|
82
102
|
errors.push({
|
|
83
103
|
code: 'missing-json-guidance',
|
|
84
104
|
message: 'Missing guidance mapping programmatic pipelines to JSON.',
|
|
85
105
|
});
|
|
86
106
|
}
|
|
87
|
-
if (!content
|
|
107
|
+
if (!hasHeading(content, /^#{2,6}\s+Query semantics\b/im)) {
|
|
88
108
|
errors.push({
|
|
89
109
|
code: 'missing-query-semantics-section',
|
|
90
|
-
message: 'Missing `Query semantics
|
|
110
|
+
message: 'Missing `Query semantics` section.',
|
|
91
111
|
});
|
|
92
112
|
}
|
|
93
|
-
if (!content
|
|
113
|
+
if (!containsAll(content, ['after:', 'inclusive', 'before:', 'exclusive'])) {
|
|
94
114
|
errors.push({
|
|
95
115
|
code: 'missing-after-before-semantics',
|
|
96
116
|
message: 'Missing explicit semantics for `after:` and `before:`.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/docs-compliance/rules.ts"],"names":[],"mappings":"AAUA,SAAS,aAAa,CAAC,OAAe,EAAE,KAAa;IACjD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;AACtD,CAAC;AAED,SAAS,sBAAsB,CAC3B,OAAe,EACf,cAAsB,EACtB,IAAY,EACZ,OAAe;IAEf,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrD,IAAI,KAA6B,CAAC;IAClC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5D,MAAM,CAAC,IAAI,CAAC;gBACR,IAAI;gBACJ,OAAO;gBACP,IAAI,EAAE,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC;aAC5C,CAAC,CAAC;QACP,CAAC;IACL,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CAAC,IAAI,CAAC;YACR,IAAI,EAAE,+BAA+B;YACrC,OAAO,EAAE,qEAAqE;SACjF,CAAC,CAAC;IACP,CAAC;IAED,MAAM,gBAAgB,GAAG,uDAAuD,CAAC;IACjF,IAAI,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,8BAA8B;YACpC,OAAO,EAAE,mEAAmE;SAC/E,CAAC,CAAC;IACP,CAAC;IAED,IAAI,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,CAAC;QAChD,MAAM,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,+BAA+B;YACrC,OAAO,EAAE,qEAAqE;SACjF,CAAC,CAAC;IACP,CAAC;IAED,MAAM,4BAA4B,GAC9B,kJAAkJ,CAAC;IACvJ,MAAM,0BAA0B,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9E,IAAI,0BAA0B,EAAE,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,qCAAqC;YAC3C,OAAO,EACH,iGAAiG;YACrG,IAAI,EAAE,aAAa,CAAC,OAAO,EAAE,0BAA0B,CAAC,KAAK,CAAC;SACjE,CAAC,CAAC;IACP,CAAC;IAED,OAAO,EAAC,MAAM,EAAC,CAAC;AACpB,CAAC"}
|
package/lib/render/output.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/render/output.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/render/output.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAU/E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAe3E;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAQnE"}
|
package/lib/render/output.js
CHANGED
|
@@ -5,7 +5,8 @@ import { formatCsv } from './csv-formatter.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export function renderListResult(result, format) {
|
|
7
7
|
if (result.kind === 'json') {
|
|
8
|
-
|
|
8
|
+
const payload = result.cursor ? { items: result.items, cursor: result.cursor } : result.items;
|
|
9
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
9
10
|
return;
|
|
10
11
|
}
|
|
11
12
|
renderTable(result.matrix, format);
|
package/lib/render/output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/render/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAe/C;;GAEG;AACH,MAAM,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AC,MAAM,CAAC,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,mBAAmB,CAAC,CAAC;YACxC,OAAO;QACX,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACN,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,mBAAmB,CAAC,CAAC;QAClD,CAAC;IACL,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,MAAoB;IACzD,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3C,OAAO;IACX,CAAC;IAED,MAAM,SAAS,GAAG,UAAU,CAAC,IAA+B,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,mBAAmB,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quotes a value for display in copy-pasteable POSIX shell commands.
|
|
3
|
+
*
|
|
4
|
+
* @param value - Raw argument value
|
|
5
|
+
* @returns A single-quoted shell argument
|
|
6
|
+
*/
|
|
7
|
+
export declare function quoteShellArg(value: string): string;
|
|
8
|
+
//# sourceMappingURL=shell-quote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-quote.d.ts","sourceRoot":"","sources":["../../src/utils/shell-quote.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quotes a value for display in copy-pasteable POSIX shell commands.
|
|
3
|
+
*
|
|
4
|
+
* @param value - Raw argument value
|
|
5
|
+
* @returns A single-quoted shell argument
|
|
6
|
+
*/
|
|
7
|
+
export function quoteShellArg(value) {
|
|
8
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=shell-quote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-quote.js","sourceRoot":"","sources":["../../src/utils/shell-quote.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IACvC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;AAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bkper",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.0",
|
|
4
4
|
"description": "Command line client for Bkper",
|
|
5
5
|
"bin": {
|
|
6
6
|
"bkper": "./lib/cli.js"
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"upgrade:api": "bun update @bkper/bkper-api-types --latest && bun update bkper-js --latest"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@earendil-works/pi-coding-agent": "0.79.
|
|
55
|
-
"bkper-js": "^2.
|
|
54
|
+
"@earendil-works/pi-coding-agent": "0.79.6",
|
|
55
|
+
"bkper-js": "^2.37.0",
|
|
56
56
|
"commander": "^13.1.0",
|
|
57
57
|
"dotenv": "^8.2.0",
|
|
58
58
|
"esbuild": "^0.27.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"yaml": "^2.5.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@bkper/bkper-api-types": "^5.
|
|
66
|
+
"@bkper/bkper-api-types": "^5.41.0",
|
|
67
67
|
"@types/chai": "^4.3.0",
|
|
68
68
|
"@types/mocha": "^10.0.0",
|
|
69
69
|
"@types/node": "^22.5.1",
|