@basis-theory-labs/cli 4.1.0 → 4.3.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 +235 -65
- package/dist/commands/proxies/logs/read.d.ts +14 -0
- package/dist/commands/proxies/logs/read.js +56 -0
- package/dist/commands/proxies/logs/tail.d.ts +13 -0
- package/dist/commands/proxies/logs/tail.js +50 -0
- package/dist/commands/proxies/logs.js +1 -1
- package/dist/commands/proxies/update.js +1 -1
- package/dist/commands/reactors/logs/read.d.ts +14 -0
- package/dist/commands/reactors/logs/read.js +56 -0
- package/dist/commands/reactors/logs/tail.d.ts +13 -0
- package/dist/commands/reactors/logs/tail.js +50 -0
- package/dist/commands/reactors/logs.js +1 -1
- package/dist/logs/events.d.ts +56 -0
- package/dist/logs/events.js +571 -0
- package/dist/logs/format.d.ts +10 -0
- package/dist/logs/format.js +162 -0
- package/dist/logs/index.js +17 -0
- package/dist/logs/runtime.d.ts +18 -0
- package/dist/logs/runtime.js +362 -0
- package/dist/logs/time.d.ts +16 -0
- package/dist/logs/time.js +74 -0
- package/dist/proxies/runtime.js +1 -1
- package/dist/proxies/utils.js +13 -13
- package/dist/reactors/runtime.js +2 -2
- package/dist/reactors/utils.d.ts +3 -3
- package/dist/reactors/utils.js +1 -1
- package/dist/runtime/flags.js +6 -6
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +3 -1
- package/dist/runtime/utils.d.ts +5 -3
- package/dist/runtime/utils.js +6 -2
- package/oclif.manifest.json +287 -49
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ $ npm install -g @basis-theory-labs/cli
|
|
|
19
19
|
$ bt COMMAND
|
|
20
20
|
running command...
|
|
21
21
|
$ bt (--version)
|
|
22
|
-
@basis-theory-labs/cli/4.
|
|
22
|
+
@basis-theory-labs/cli/4.3.0 linux-x64 node-v22.23.3
|
|
23
23
|
$ bt --help [COMMAND]
|
|
24
24
|
USAGE
|
|
25
25
|
$ bt COMMAND
|
|
@@ -36,11 +36,15 @@ USAGE
|
|
|
36
36
|
* [`bt proxies create`](#bt-proxies-create)
|
|
37
37
|
* [`bt proxies delete ID`](#bt-proxies-delete-id)
|
|
38
38
|
* [`bt proxies logs [ID]`](#bt-proxies-logs-id)
|
|
39
|
+
* [`bt proxies logs read ID`](#bt-proxies-logs-read-id)
|
|
40
|
+
* [`bt proxies logs tail ID`](#bt-proxies-logs-tail-id)
|
|
39
41
|
* [`bt proxies update ID`](#bt-proxies-update-id)
|
|
40
42
|
* [`bt reactors`](#bt-reactors)
|
|
41
43
|
* [`bt reactors create`](#bt-reactors-create)
|
|
42
44
|
* [`bt reactors delete ID`](#bt-reactors-delete-id)
|
|
43
45
|
* [`bt reactors logs [ID]`](#bt-reactors-logs-id)
|
|
46
|
+
* [`bt reactors logs read ID`](#bt-reactors-logs-read-id)
|
|
47
|
+
* [`bt reactors logs tail ID`](#bt-reactors-logs-tail-id)
|
|
44
48
|
* [`bt reactors update ID`](#bt-reactors-update-id)
|
|
45
49
|
|
|
46
50
|
## `bt applications`
|
|
@@ -62,7 +66,7 @@ EXAMPLES
|
|
|
62
66
|
$ bt applications
|
|
63
67
|
```
|
|
64
68
|
|
|
65
|
-
_See code: [dist/commands/applications/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.
|
|
69
|
+
_See code: [dist/commands/applications/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.3.0/dist/commands/applications/index.ts)_
|
|
66
70
|
|
|
67
71
|
## `bt applications create`
|
|
68
72
|
|
|
@@ -151,7 +155,7 @@ EXAMPLES
|
|
|
151
155
|
$ bt proxies
|
|
152
156
|
```
|
|
153
157
|
|
|
154
|
-
_See code: [dist/commands/proxies/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.
|
|
158
|
+
_See code: [dist/commands/proxies/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.3.0/dist/commands/proxies/index.ts)_
|
|
155
159
|
|
|
156
160
|
## `bt proxies create`
|
|
157
161
|
|
|
@@ -160,9 +164,9 @@ Creates a new Pre-Configured Proxy. Requires `proxy:create` Management Applicati
|
|
|
160
164
|
```
|
|
161
165
|
USAGE
|
|
162
166
|
$ bt proxies create -x <value> [-n <value>] [-u <value>] [-q <value>] [-s <value>] [-i <value>] [-c <value>] [-a]
|
|
163
|
-
[--request-transform-image node-bt|node22] [--request-transform-package-json <value>]
|
|
164
|
-
<value>] [--request-transform-warm-concurrency <value>] [--request-transform-resources
|
|
165
|
-
[--request-transform-permissions <value>] [--response-transform-image node-bt|node22]
|
|
167
|
+
[--request-transform-image node-bt|node22|node24] [--request-transform-package-json <value>]
|
|
168
|
+
[--request-transform-timeout <value>] [--request-transform-warm-concurrency <value>] [--request-transform-resources
|
|
169
|
+
standard|large|xlarge] [--request-transform-permissions <value>] [--response-transform-image node-bt|node22|node24]
|
|
166
170
|
[--response-transform-package-json <value>] [--response-transform-timeout <value>]
|
|
167
171
|
[--response-transform-warm-concurrency <value>] [--response-transform-resources standard|large|xlarge]
|
|
168
172
|
[--response-transform-permissions <value>] [--no-wait]
|
|
@@ -178,27 +182,29 @@ FLAGS
|
|
|
178
182
|
-u, --destination-url=<value> URL to which requests will be proxied
|
|
179
183
|
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
180
184
|
--no-wait do not wait for proxy to be ready (requires at least one transform with
|
|
181
|
-
node22)
|
|
182
|
-
--request-transform-image=<option> request-transform runtime image (node-bt|node22)
|
|
183
|
-
<options: node-bt|node22>
|
|
185
|
+
node22 | node24)
|
|
186
|
+
--request-transform-image=<option> request-transform runtime image (node-bt|node22|node24)
|
|
187
|
+
<options: node-bt|node22|node24>
|
|
184
188
|
--request-transform-package-json=<value> path to runtime package.json JSON file (top-level dependencies
|
|
185
189
|
required; supports resolutions or overrides fallback; pinned versions
|
|
186
|
-
required) (node22 only)
|
|
187
|
-
--request-transform-permissions=<value>... request-transform permission to grant, repeatable (node22
|
|
188
|
-
|
|
190
|
+
required) (node22 | node24 only)
|
|
191
|
+
--request-transform-permissions=<value>... request-transform permission to grant, repeatable (node22 | node24
|
|
192
|
+
only)
|
|
193
|
+
--request-transform-resources=<option> request-transform resource tier (node22 | node24 only)
|
|
189
194
|
<options: standard|large|xlarge>
|
|
190
|
-
--request-transform-timeout=<value> request-transform timeout in seconds, 10-30 (node22 only)
|
|
191
|
-
--request-transform-warm-concurrency=<value> request-transform warm concurrency, 0-1 (node22 only)
|
|
192
|
-
--response-transform-image=<option> response-transform runtime image (node-bt|node22)
|
|
193
|
-
<options: node-bt|node22>
|
|
195
|
+
--request-transform-timeout=<value> request-transform timeout in seconds, 10-30 (node22 | node24 only)
|
|
196
|
+
--request-transform-warm-concurrency=<value> request-transform warm concurrency, 0-1 (node22 | node24 only)
|
|
197
|
+
--response-transform-image=<option> response-transform runtime image (node-bt|node22|node24)
|
|
198
|
+
<options: node-bt|node22|node24>
|
|
194
199
|
--response-transform-package-json=<value> path to runtime package.json JSON file (top-level dependencies
|
|
195
200
|
required; supports resolutions or overrides fallback; pinned versions
|
|
196
|
-
required) (node22 only)
|
|
197
|
-
--response-transform-permissions=<value>... response-transform permission to grant, repeatable (node22
|
|
198
|
-
|
|
201
|
+
required) (node22 | node24 only)
|
|
202
|
+
--response-transform-permissions=<value>... response-transform permission to grant, repeatable (node22 | node24
|
|
203
|
+
only)
|
|
204
|
+
--response-transform-resources=<option> response-transform resource tier (node22 | node24 only)
|
|
199
205
|
<options: standard|large|xlarge>
|
|
200
|
-
--response-transform-timeout=<value> response-transform timeout in seconds, 10-30 (node22 only)
|
|
201
|
-
--response-transform-warm-concurrency=<value> response-transform warm concurrency, 0-1 (node22 only)
|
|
206
|
+
--response-transform-timeout=<value> response-transform timeout in seconds, 10-30 (node22 | node24 only)
|
|
207
|
+
--response-transform-warm-concurrency=<value> response-transform warm concurrency, 0-1 (node22 | node24 only)
|
|
202
208
|
|
|
203
209
|
DESCRIPTION
|
|
204
210
|
Creates a new Pre-Configured Proxy. Requires `proxy:create` Management Application permission
|
|
@@ -254,7 +260,7 @@ EXAMPLES
|
|
|
254
260
|
|
|
255
261
|
## `bt proxies logs [ID]`
|
|
256
262
|
|
|
257
|
-
|
|
263
|
+
Legacy tunnel-based Proxy Transform logs. Opens a local tunnel and updates logging configuration. For v2/runtime debugging, use `bt proxies logs tail <id>` or `bt proxies logs read <id>`. Requires `proxy:update` Management Application permissions
|
|
258
264
|
|
|
259
265
|
```
|
|
260
266
|
USAGE
|
|
@@ -268,7 +274,9 @@ FLAGS
|
|
|
268
274
|
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
269
275
|
|
|
270
276
|
DESCRIPTION
|
|
271
|
-
|
|
277
|
+
Legacy tunnel-based Proxy Transform logs. Opens a local tunnel and updates logging configuration. For v2/runtime
|
|
278
|
+
debugging, use `bt proxies logs tail <id>` or `bt proxies logs read <id>`. Requires `proxy:update` Management
|
|
279
|
+
Application permissions
|
|
272
280
|
|
|
273
281
|
EXAMPLES
|
|
274
282
|
$ bt proxies logs
|
|
@@ -278,6 +286,86 @@ EXAMPLES
|
|
|
278
286
|
$ bt proxies logs 03858bf5-32d3-4a2e-b74b-daeea0883bca -p 3000
|
|
279
287
|
```
|
|
280
288
|
|
|
289
|
+
## `bt proxies logs read ID`
|
|
290
|
+
|
|
291
|
+
Read a fixed window of Proxy runtime logs through Events and exit. Requires `event:read` and runtime logging already enabled.
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
USAGE
|
|
295
|
+
$ bt proxies logs read ID -x <value> [--since <value>] [--until <value>] [--format pretty|json|json-pretty]
|
|
296
|
+
|
|
297
|
+
ARGUMENTS
|
|
298
|
+
ID Proxy id
|
|
299
|
+
|
|
300
|
+
FLAGS
|
|
301
|
+
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
302
|
+
--format=<option> [default: pretty] pretty: readable logs; json: compact objects; json-pretty: indented
|
|
303
|
+
objects. Entries are separated by blank lines; colors are enabled in terminals
|
|
304
|
+
<options: pretty|json|json-pretty>
|
|
305
|
+
--since=<value> window start: positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone;
|
|
306
|
+
defaults to five minutes before the end
|
|
307
|
+
--until=<value> window end (exclusive): positive duration or ISO timestamp with timezone; defaults to
|
|
308
|
+
command start
|
|
309
|
+
|
|
310
|
+
DESCRIPTION
|
|
311
|
+
Read a fixed window of Proxy runtime logs through Events and exit. Requires `event:read` and runtime logging already
|
|
312
|
+
enabled.
|
|
313
|
+
|
|
314
|
+
Defaults to the five minutes preceding --until, or command start when --until is omitted. Explicit relative values use
|
|
315
|
+
command-start time. Both request and response transforms are included and distinguished. Windows include their start
|
|
316
|
+
and exclude their end, filtering event batch timestamps rather than individual record occurrence times. Each matching
|
|
317
|
+
batch is expanded in record sequence; flattened output has no global chronological ordering. History is tenant-limited
|
|
318
|
+
(24 hours by default, at most 30 days); the API clamps unavailable history. Indexing is asynchronous and pagination is
|
|
319
|
+
not a snapshot, so empty or exhausted results do not prove complete coverage. Large windows may hit bounded work
|
|
320
|
+
limits and fail with partial output. Application logs come from the injected `logger`, not arbitrary stdout or
|
|
321
|
+
`console.log`; collection requires resource opt-in and the platform runtime-log gate. Does not enable logging or open
|
|
322
|
+
a tunnel.
|
|
323
|
+
|
|
324
|
+
EXAMPLES
|
|
325
|
+
$ bt proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 1h --until 30m
|
|
326
|
+
|
|
327
|
+
$ bt proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z --format json
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## `bt proxies logs tail ID`
|
|
331
|
+
|
|
332
|
+
Tail Proxy runtime logs through Events. Requires `event:read` and runtime logging already enabled.
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
USAGE
|
|
336
|
+
$ bt proxies logs tail ID -x <value> [--since <value>] [--format pretty|json|json-pretty]
|
|
337
|
+
|
|
338
|
+
ARGUMENTS
|
|
339
|
+
ID Proxy id
|
|
340
|
+
|
|
341
|
+
FLAGS
|
|
342
|
+
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
343
|
+
--format=<option> [default: pretty] pretty: readable logs; json: compact objects; json-pretty: indented
|
|
344
|
+
objects. Entries are separated by blank lines; colors are enabled in terminals
|
|
345
|
+
<options: pretty|json|json-pretty>
|
|
346
|
+
--since=<value> include initial history from a positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp
|
|
347
|
+
with timezone; omitted means watch from command start
|
|
348
|
+
|
|
349
|
+
DESCRIPTION
|
|
350
|
+
Tail Proxy runtime logs through Events. Requires `event:read` and runtime logging already enabled.
|
|
351
|
+
|
|
352
|
+
Starts watching from command time. Supply --since to retrieve initial history before following new logs. Polls every
|
|
353
|
+
five seconds with a rolling five-minute overlap that never reaches before the requested start. Both request and
|
|
354
|
+
response transforms are included and distinguished. Time windows filter event batches, not individual record
|
|
355
|
+
occurrence times; a newly arriving batch can contain records that occurred before command start. History is
|
|
356
|
+
tenant-limited (24 hours by default, at most 30 days); the API clamps unavailable history. Large initial windows may
|
|
357
|
+
hit bounded work limits and fail with partial output. Visibility is delayed and best-effort; output has no durable
|
|
358
|
+
resume or global chronological ordering. Application logs come from the injected `logger`, not arbitrary stdout or
|
|
359
|
+
`console.log`; collection requires resource opt-in and the platform runtime-log gate. Silence does not distinguish an
|
|
360
|
+
idle resource, a wrong ID, disabled collection, or delayed indexing. Runs until interrupted, output closes, or an
|
|
361
|
+
error occurs.
|
|
362
|
+
|
|
363
|
+
EXAMPLES
|
|
364
|
+
$ bt proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca
|
|
365
|
+
|
|
366
|
+
$ bt proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 30m --format json
|
|
367
|
+
```
|
|
368
|
+
|
|
281
369
|
## `bt proxies update ID`
|
|
282
370
|
|
|
283
371
|
Updates an existing Pre-Configured Proxy. Requires `proxy:update` Management Application permission
|
|
@@ -285,9 +373,9 @@ Updates an existing Pre-Configured Proxy. Requires `proxy:update` Management App
|
|
|
285
373
|
```
|
|
286
374
|
USAGE
|
|
287
375
|
$ bt proxies update ID -x <value> [-n <value>] [-u <value>] [-q <value>] [-s <value>] [-i <value>] [-c <value>]
|
|
288
|
-
[-a] [--request-transform-image node-bt|node22] [--request-transform-package-json <value>]
|
|
376
|
+
[-a] [--request-transform-image node-bt|node22|node24] [--request-transform-package-json <value>]
|
|
289
377
|
[--request-transform-timeout <value>] [--request-transform-warm-concurrency <value>] [--request-transform-resources
|
|
290
|
-
standard|large|xlarge] [--request-transform-permissions <value>] [--response-transform-image node-bt|node22]
|
|
378
|
+
standard|large|xlarge] [--request-transform-permissions <value>] [--response-transform-image node-bt|node22|node24]
|
|
291
379
|
[--response-transform-package-json <value>] [--response-transform-timeout <value>]
|
|
292
380
|
[--response-transform-warm-concurrency <value>] [--response-transform-resources standard|large|xlarge]
|
|
293
381
|
[--response-transform-permissions <value>] [--no-wait] [-w] [-l]
|
|
@@ -308,27 +396,29 @@ FLAGS
|
|
|
308
396
|
-w, --watch Watch for changes in informed files
|
|
309
397
|
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
310
398
|
--no-wait do not wait for proxy to be ready (requires at least one transform with
|
|
311
|
-
node22)
|
|
312
|
-
--request-transform-image=<option> request-transform runtime image (node-bt|node22)
|
|
313
|
-
<options: node-bt|node22>
|
|
399
|
+
node22 | node24)
|
|
400
|
+
--request-transform-image=<option> request-transform runtime image (node-bt|node22|node24)
|
|
401
|
+
<options: node-bt|node22|node24>
|
|
314
402
|
--request-transform-package-json=<value> path to runtime package.json JSON file (top-level dependencies
|
|
315
403
|
required; supports resolutions or overrides fallback; pinned versions
|
|
316
|
-
required) (node22 only)
|
|
317
|
-
--request-transform-permissions=<value>... request-transform permission to grant, repeatable (node22
|
|
318
|
-
|
|
404
|
+
required) (node22 | node24 only)
|
|
405
|
+
--request-transform-permissions=<value>... request-transform permission to grant, repeatable (node22 | node24
|
|
406
|
+
only)
|
|
407
|
+
--request-transform-resources=<option> request-transform resource tier (node22 | node24 only)
|
|
319
408
|
<options: standard|large|xlarge>
|
|
320
|
-
--request-transform-timeout=<value> request-transform timeout in seconds, 10-30 (node22 only)
|
|
321
|
-
--request-transform-warm-concurrency=<value> request-transform warm concurrency, 0-1 (node22 only)
|
|
322
|
-
--response-transform-image=<option> response-transform runtime image (node-bt|node22)
|
|
323
|
-
<options: node-bt|node22>
|
|
409
|
+
--request-transform-timeout=<value> request-transform timeout in seconds, 10-30 (node22 | node24 only)
|
|
410
|
+
--request-transform-warm-concurrency=<value> request-transform warm concurrency, 0-1 (node22 | node24 only)
|
|
411
|
+
--response-transform-image=<option> response-transform runtime image (node-bt|node22|node24)
|
|
412
|
+
<options: node-bt|node22|node24>
|
|
324
413
|
--response-transform-package-json=<value> path to runtime package.json JSON file (top-level dependencies
|
|
325
414
|
required; supports resolutions or overrides fallback; pinned versions
|
|
326
|
-
required) (node22 only)
|
|
327
|
-
--response-transform-permissions=<value>... response-transform permission to grant, repeatable (node22
|
|
328
|
-
|
|
415
|
+
required) (node22 | node24 only)
|
|
416
|
+
--response-transform-permissions=<value>... response-transform permission to grant, repeatable (node22 | node24
|
|
417
|
+
only)
|
|
418
|
+
--response-transform-resources=<option> response-transform resource tier (node22 | node24 only)
|
|
329
419
|
<options: standard|large|xlarge>
|
|
330
|
-
--response-transform-timeout=<value> response-transform timeout in seconds, 10-30 (node22 only)
|
|
331
|
-
--response-transform-warm-concurrency=<value> response-transform warm concurrency, 0-1 (node22 only)
|
|
420
|
+
--response-transform-timeout=<value> response-transform timeout in seconds, 10-30 (node22 | node24 only)
|
|
421
|
+
--response-transform-warm-concurrency=<value> response-transform warm concurrency, 0-1 (node22 | node24 only)
|
|
332
422
|
|
|
333
423
|
DESCRIPTION
|
|
334
424
|
Updates an existing Pre-Configured Proxy. Requires `proxy:update` Management Application permission
|
|
@@ -378,7 +468,7 @@ EXAMPLES
|
|
|
378
468
|
$ bt reactors
|
|
379
469
|
```
|
|
380
470
|
|
|
381
|
-
_See code: [dist/commands/reactors/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.
|
|
471
|
+
_See code: [dist/commands/reactors/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v4.3.0/dist/commands/reactors/index.ts)_
|
|
382
472
|
|
|
383
473
|
## `bt reactors create`
|
|
384
474
|
|
|
@@ -386,7 +476,7 @@ Creates a new Reactor. Requires `reactor:create` Management Application permissi
|
|
|
386
476
|
|
|
387
477
|
```
|
|
388
478
|
USAGE
|
|
389
|
-
$ bt reactors create -x <value> [-n <value>] [-c <value>] [-i <value>] [-r <value>] [--image node-bt|node22]
|
|
479
|
+
$ bt reactors create -x <value> [-n <value>] [-c <value>] [-i <value>] [-r <value>] [--image node-bt|node22|node24]
|
|
390
480
|
[--package-json <value>] [--timeout <value>] [--warm-concurrency <value>] [--resources standard|large|xlarge]
|
|
391
481
|
[--permissions <value>] [--no-wait] [--async]
|
|
392
482
|
|
|
@@ -396,18 +486,18 @@ FLAGS
|
|
|
396
486
|
-n, --name=<value> name of the Reactor
|
|
397
487
|
-r, --code=<value> path to JavaScript file containing the Reactor code
|
|
398
488
|
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
399
|
-
--[no-]async execute Reactor invocations asynchronously (node22 only)
|
|
400
|
-
--image=<option> runtime image (node-bt|node22)
|
|
401
|
-
<options: node-bt|node22>
|
|
489
|
+
--[no-]async execute Reactor invocations asynchronously (node22 | node24 only)
|
|
490
|
+
--image=<option> runtime image (node-bt|node22|node24)
|
|
491
|
+
<options: node-bt|node22|node24>
|
|
402
492
|
--no-wait do not wait for resource provisioning to complete
|
|
403
493
|
--package-json=<value> path to runtime package.json JSON file (top-level dependencies required; supports
|
|
404
|
-
resolutions or overrides fallback; pinned versions required) (node22 only)
|
|
405
|
-
--permissions=<value>... permission to grant, repeatable (node22 only)
|
|
406
|
-
--resources=<option> resource tier (node22 only, default: standard)
|
|
494
|
+
resolutions or overrides fallback; pinned versions required) (node22 | node24 only)
|
|
495
|
+
--permissions=<value>... permission to grant, repeatable (node22 | node24 only)
|
|
496
|
+
--resources=<option> resource tier (node22 | node24 only, default: standard)
|
|
407
497
|
<options: standard|large|xlarge>
|
|
408
|
-
--timeout=<value> timeout in seconds, 10-900 (node22 only; maximum 30 when runtime async is
|
|
409
|
-
default: 10)
|
|
410
|
-
--warm-concurrency=<value> number of warm instances, 0-1 (node22 only, default: 0)
|
|
498
|
+
--timeout=<value> timeout in seconds, 10-900 (node22 | node24 only; maximum 30 when runtime async is
|
|
499
|
+
disabled; default: 10)
|
|
500
|
+
--warm-concurrency=<value> number of warm instances, 0-1 (node22 | node24 only, default: 0)
|
|
411
501
|
|
|
412
502
|
DESCRIPTION
|
|
413
503
|
Creates a new Reactor. Requires `reactor:create` Management Application permission
|
|
@@ -452,7 +542,7 @@ EXAMPLES
|
|
|
452
542
|
|
|
453
543
|
## `bt reactors logs [ID]`
|
|
454
544
|
|
|
455
|
-
|
|
545
|
+
Legacy tunnel-based Reactor logs. Opens a local tunnel and updates logging configuration. For v2/runtime debugging, use `bt reactors logs tail <id>` or `bt reactors logs read <id>`. Requires `reactor:update` Management Application permissions
|
|
456
546
|
|
|
457
547
|
```
|
|
458
548
|
USAGE
|
|
@@ -466,7 +556,9 @@ FLAGS
|
|
|
466
556
|
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
467
557
|
|
|
468
558
|
DESCRIPTION
|
|
469
|
-
|
|
559
|
+
Legacy tunnel-based Reactor logs. Opens a local tunnel and updates logging configuration. For v2/runtime debugging,
|
|
560
|
+
use `bt reactors logs tail <id>` or `bt reactors logs read <id>`. Requires `reactor:update` Management Application
|
|
561
|
+
permissions
|
|
470
562
|
|
|
471
563
|
EXAMPLES
|
|
472
564
|
$ bt reactors logs
|
|
@@ -476,15 +568,93 @@ EXAMPLES
|
|
|
476
568
|
$ bt reactors logs 03858bf5-32d3-4a2e-b74b-daeea0883bca -p 3000
|
|
477
569
|
```
|
|
478
570
|
|
|
571
|
+
## `bt reactors logs read ID`
|
|
572
|
+
|
|
573
|
+
Read a fixed window of Reactor runtime logs through Events and exit. Requires `event:read` and runtime logging already enabled.
|
|
574
|
+
|
|
575
|
+
```
|
|
576
|
+
USAGE
|
|
577
|
+
$ bt reactors logs read ID -x <value> [--since <value>] [--until <value>] [--format pretty|json|json-pretty]
|
|
578
|
+
|
|
579
|
+
ARGUMENTS
|
|
580
|
+
ID Reactor id
|
|
581
|
+
|
|
582
|
+
FLAGS
|
|
583
|
+
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
584
|
+
--format=<option> [default: pretty] pretty: readable logs; json: compact objects; json-pretty: indented
|
|
585
|
+
objects. Entries are separated by blank lines; colors are enabled in terminals
|
|
586
|
+
<options: pretty|json|json-pretty>
|
|
587
|
+
--since=<value> window start: positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone;
|
|
588
|
+
defaults to five minutes before the end
|
|
589
|
+
--until=<value> window end (exclusive): positive duration or ISO timestamp with timezone; defaults to
|
|
590
|
+
command start
|
|
591
|
+
|
|
592
|
+
DESCRIPTION
|
|
593
|
+
Read a fixed window of Reactor runtime logs through Events and exit. Requires `event:read` and runtime logging already
|
|
594
|
+
enabled.
|
|
595
|
+
|
|
596
|
+
Defaults to the five minutes preceding --until, or command start when --until is omitted. Explicit relative values use
|
|
597
|
+
command-start time. Windows include their start and exclude their end, filtering event batch timestamps rather than
|
|
598
|
+
individual record occurrence times. Each matching batch is expanded in record sequence; flattened output has no global
|
|
599
|
+
chronological ordering. History is tenant-limited (24 hours by default, at most 30 days); the API clamps unavailable
|
|
600
|
+
history. Indexing is asynchronous and pagination is not a snapshot, so empty or exhausted results do not prove
|
|
601
|
+
complete coverage. Large windows may hit bounded work limits and fail with partial output. Application logs come from
|
|
602
|
+
the injected `logger`, not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform
|
|
603
|
+
runtime-log gate. Does not enable logging or open a tunnel.
|
|
604
|
+
|
|
605
|
+
EXAMPLES
|
|
606
|
+
$ bt reactors logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 1h --until 30m
|
|
607
|
+
|
|
608
|
+
$ bt reactors logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z --format json
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
## `bt reactors logs tail ID`
|
|
612
|
+
|
|
613
|
+
Tail Reactor runtime logs through Events. Requires `event:read` and runtime logging already enabled.
|
|
614
|
+
|
|
615
|
+
```
|
|
616
|
+
USAGE
|
|
617
|
+
$ bt reactors logs tail ID -x <value> [--since <value>] [--format pretty|json|json-pretty]
|
|
618
|
+
|
|
619
|
+
ARGUMENTS
|
|
620
|
+
ID Reactor id
|
|
621
|
+
|
|
622
|
+
FLAGS
|
|
623
|
+
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
624
|
+
--format=<option> [default: pretty] pretty: readable logs; json: compact objects; json-pretty: indented
|
|
625
|
+
objects. Entries are separated by blank lines; colors are enabled in terminals
|
|
626
|
+
<options: pretty|json|json-pretty>
|
|
627
|
+
--since=<value> include initial history from a positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp
|
|
628
|
+
with timezone; omitted means watch from command start
|
|
629
|
+
|
|
630
|
+
DESCRIPTION
|
|
631
|
+
Tail Reactor runtime logs through Events. Requires `event:read` and runtime logging already enabled.
|
|
632
|
+
|
|
633
|
+
Starts watching from command time. Supply --since to retrieve initial history before following new logs. Polls every
|
|
634
|
+
five seconds with a rolling five-minute overlap that never reaches before the requested start. Time windows filter
|
|
635
|
+
event batches, not individual record occurrence times; a newly arriving batch can contain records that occurred before
|
|
636
|
+
command start. History is tenant-limited (24 hours by default, at most 30 days); the API clamps unavailable history.
|
|
637
|
+
Large initial windows may hit bounded work limits and fail with partial output. Visibility is delayed and best-effort;
|
|
638
|
+
output has no durable resume or global chronological ordering. Application logs come from the injected `logger`, not
|
|
639
|
+
arbitrary stdout or `console.log`; collection requires resource opt-in and the platform runtime-log gate. Silence does
|
|
640
|
+
not distinguish an idle resource, a wrong ID, disabled collection, or delayed indexing. Runs until interrupted, output
|
|
641
|
+
closes, or an error occurs.
|
|
642
|
+
|
|
643
|
+
EXAMPLES
|
|
644
|
+
$ bt reactors logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca
|
|
645
|
+
|
|
646
|
+
$ bt reactors logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 30m --format json
|
|
647
|
+
```
|
|
648
|
+
|
|
479
649
|
## `bt reactors update ID`
|
|
480
650
|
|
|
481
651
|
Updates an existing Reactor. Requires `reactor:update` Management Application permission
|
|
482
652
|
|
|
483
653
|
```
|
|
484
654
|
USAGE
|
|
485
|
-
$ bt reactors update ID -x <value> [-n <value>] [-c <value>] [-i <value>] [-r <value>] [--image
|
|
486
|
-
[--package-json <value>] [--timeout <value>] [--warm-concurrency <value>] [--resources
|
|
487
|
-
[--permissions <value>] [--no-wait] [--async] [-w] [-l]
|
|
655
|
+
$ bt reactors update ID -x <value> [-n <value>] [-c <value>] [-i <value>] [-r <value>] [--image
|
|
656
|
+
node-bt|node22|node24] [--package-json <value>] [--timeout <value>] [--warm-concurrency <value>] [--resources
|
|
657
|
+
standard|large|xlarge] [--permissions <value>] [--no-wait] [--async] [-w] [-l]
|
|
488
658
|
|
|
489
659
|
ARGUMENTS
|
|
490
660
|
ID Reactor id to update
|
|
@@ -497,18 +667,18 @@ FLAGS
|
|
|
497
667
|
-r, --code=<value> path to JavaScript file containing the Reactor code
|
|
498
668
|
-w, --watch Watch for changes in supplied code, configuration, and runtime package files
|
|
499
669
|
-x, --management-key=<value> (required) management key used for connecting with the reactor / proxy
|
|
500
|
-
--[no-]async execute Reactor invocations asynchronously (node22 only)
|
|
501
|
-
--image=<option> runtime image (node-bt|node22)
|
|
502
|
-
<options: node-bt|node22>
|
|
670
|
+
--[no-]async execute Reactor invocations asynchronously (node22 | node24 only)
|
|
671
|
+
--image=<option> runtime image (node-bt|node22|node24)
|
|
672
|
+
<options: node-bt|node22|node24>
|
|
503
673
|
--no-wait do not wait for resource provisioning to complete
|
|
504
674
|
--package-json=<value> path to runtime package.json JSON file (top-level dependencies required; supports
|
|
505
|
-
resolutions or overrides fallback; pinned versions required) (node22 only)
|
|
506
|
-
--permissions=<value>... permission to grant, repeatable (node22 only)
|
|
507
|
-
--resources=<option> resource tier (node22 only, default: standard)
|
|
675
|
+
resolutions or overrides fallback; pinned versions required) (node22 | node24 only)
|
|
676
|
+
--permissions=<value>... permission to grant, repeatable (node22 | node24 only)
|
|
677
|
+
--resources=<option> resource tier (node22 | node24 only, default: standard)
|
|
508
678
|
<options: standard|large|xlarge>
|
|
509
|
-
--timeout=<value> timeout in seconds, 10-900 (node22 only; maximum 30 when runtime async is
|
|
510
|
-
default: 10)
|
|
511
|
-
--warm-concurrency=<value> number of warm instances, 0-1 (node22 only, default: 0)
|
|
679
|
+
--timeout=<value> timeout in seconds, 10-900 (node22 | node24 only; maximum 30 when runtime async is
|
|
680
|
+
disabled; default: 10)
|
|
681
|
+
--warm-concurrency=<value> number of warm instances, 0-1 (node22 | node24 only, default: 0)
|
|
512
682
|
|
|
513
683
|
DESCRIPTION
|
|
514
684
|
Updates an existing Reactor. Requires `reactor:update` Management Application permission
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class Read extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
since: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
until: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
format: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../../base");
|
|
5
|
+
const runtime_1 = require("../../../logs/runtime");
|
|
6
|
+
const time_1 = require("../../../logs/time");
|
|
7
|
+
class Read extends base_1.BaseCommand {
|
|
8
|
+
async run() {
|
|
9
|
+
const now = Date.now();
|
|
10
|
+
const { flags: { 'management-key': apiKey, 'api-base-url': apiBaseUrl, format, since, until, }, args: { id }, } = await this.parse(Read);
|
|
11
|
+
if (!id.trim()) {
|
|
12
|
+
this.error('Proxy id must not be blank');
|
|
13
|
+
}
|
|
14
|
+
await (0, runtime_1.readEventLogs)({
|
|
15
|
+
apiKey,
|
|
16
|
+
apiBaseUrl,
|
|
17
|
+
resourceType: 'proxy',
|
|
18
|
+
resourceId: id,
|
|
19
|
+
format: format,
|
|
20
|
+
window: (0, time_1.resolveLogWindow)({
|
|
21
|
+
since,
|
|
22
|
+
until,
|
|
23
|
+
}, now),
|
|
24
|
+
});
|
|
25
|
+
// Cleanup has completed. Oclif's final flush would stall on a pending write.
|
|
26
|
+
if (process.stdout.writableLength > 0 && process.exitCode !== undefined) {
|
|
27
|
+
this.exit(process.exitCode);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.default = Read;
|
|
32
|
+
Read.description = 'Read a fixed window of Proxy runtime logs through Events and exit. Requires `event:read` and runtime logging already enabled.\n\n' +
|
|
33
|
+
'Defaults to the five minutes preceding --until, or command start when --until is omitted. Explicit relative values use command-start time. Both request and response transforms are included and distinguished. Windows include their start and exclude their end, filtering event batch timestamps rather than individual record occurrence times. Each matching batch is expanded in record sequence; flattened output has no global chronological ordering. History is tenant-limited (24 hours by default, at most 30 days); the API clamps unavailable history. Indexing is asynchronous and pagination is not a snapshot, so empty or exhausted results do not prove complete coverage. Large windows may hit bounded work limits and fail with partial output. Application logs come from the injected `logger`, not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform runtime-log gate. Does not enable logging or open a tunnel.';
|
|
34
|
+
Read.examples = [
|
|
35
|
+
'<%= config.bin %> proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 1h --until 30m',
|
|
36
|
+
'<%= config.bin %> proxies logs read 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z --format json',
|
|
37
|
+
];
|
|
38
|
+
Read.args = {
|
|
39
|
+
id: core_1.Args.string({
|
|
40
|
+
description: 'Proxy id',
|
|
41
|
+
required: true,
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
Read.flags = {
|
|
45
|
+
since: core_1.Flags.string({
|
|
46
|
+
description: 'window start: positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone; defaults to five minutes before the end',
|
|
47
|
+
}),
|
|
48
|
+
until: core_1.Flags.string({
|
|
49
|
+
description: 'window end (exclusive): positive duration or ISO timestamp with timezone; defaults to command start',
|
|
50
|
+
}),
|
|
51
|
+
format: core_1.Flags.string({
|
|
52
|
+
description: 'pretty: readable logs; json: compact objects; json-pretty: indented objects. Entries are separated by blank lines; colors are enabled in terminals',
|
|
53
|
+
options: ['pretty', 'json', 'json-pretty'],
|
|
54
|
+
default: 'pretty',
|
|
55
|
+
}),
|
|
56
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class Tail extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
since: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
format: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../../base");
|
|
5
|
+
const runtime_1 = require("../../../logs/runtime");
|
|
6
|
+
const time_1 = require("../../../logs/time");
|
|
7
|
+
class Tail extends base_1.BaseCommand {
|
|
8
|
+
async run() {
|
|
9
|
+
const now = Date.now();
|
|
10
|
+
const { flags: { 'management-key': apiKey, 'api-base-url': apiBaseUrl, format, since, }, args: { id }, } = await this.parse(Tail);
|
|
11
|
+
if (!id.trim()) {
|
|
12
|
+
this.error('Proxy id must not be blank');
|
|
13
|
+
}
|
|
14
|
+
await (0, runtime_1.followEventLogs)({
|
|
15
|
+
apiKey,
|
|
16
|
+
apiBaseUrl,
|
|
17
|
+
resourceType: 'proxy',
|
|
18
|
+
resourceId: id,
|
|
19
|
+
format: format,
|
|
20
|
+
window: (0, time_1.resolveTailWindow)({ since }, now),
|
|
21
|
+
});
|
|
22
|
+
// Cleanup has completed. Oclif's final flush would stall on a pending write.
|
|
23
|
+
if (process.stdout.writableLength > 0 && process.exitCode !== undefined) {
|
|
24
|
+
this.exit(process.exitCode);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = Tail;
|
|
29
|
+
Tail.description = 'Tail Proxy runtime logs through Events. Requires `event:read` and runtime logging already enabled.\n\n' +
|
|
30
|
+
'Starts watching from command time. Supply --since to retrieve initial history before following new logs. Polls every five seconds with a rolling five-minute overlap that never reaches before the requested start. Both request and response transforms are included and distinguished. Time windows filter event batches, not individual record occurrence times; a newly arriving batch can contain records that occurred before command start. History is tenant-limited (24 hours by default, at most 30 days); the API clamps unavailable history. Large initial windows may hit bounded work limits and fail with partial output. Visibility is delayed and best-effort; output has no durable resume or global chronological ordering. Application logs come from the injected `logger`, not arbitrary stdout or `console.log`; collection requires resource opt-in and the platform runtime-log gate. Silence does not distinguish an idle resource, a wrong ID, disabled collection, or delayed indexing. Runs until interrupted, output closes, or an error occurs.';
|
|
31
|
+
Tail.examples = [
|
|
32
|
+
'<%= config.bin %> proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca',
|
|
33
|
+
'<%= config.bin %> proxies logs tail 03858bf5-32d3-4a2e-b74b-daeea0883bca --since 30m --format json',
|
|
34
|
+
];
|
|
35
|
+
Tail.args = {
|
|
36
|
+
id: core_1.Args.string({
|
|
37
|
+
description: 'Proxy id',
|
|
38
|
+
required: true,
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
Tail.flags = {
|
|
42
|
+
since: core_1.Flags.string({
|
|
43
|
+
description: 'include initial history from a positive duration (30s, 5m, 2h, 1d, 1w) or ISO timestamp with timezone; omitted means watch from command start',
|
|
44
|
+
}),
|
|
45
|
+
format: core_1.Flags.string({
|
|
46
|
+
description: 'pretty: readable logs; json: compact objects; json-pretty: indented objects. Entries are separated by blank lines; colors are enabled in terminals',
|
|
47
|
+
options: ['pretty', 'json', 'json-pretty'],
|
|
48
|
+
default: 'pretty',
|
|
49
|
+
}),
|
|
50
|
+
};
|
|
@@ -19,7 +19,7 @@ class Logs extends base_1.BaseCommand {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.default = Logs;
|
|
22
|
-
Logs.description = '
|
|
22
|
+
Logs.description = 'Legacy tunnel-based Proxy Transform logs. Opens a local tunnel and updates logging configuration. For v2/runtime debugging, use `bt proxies logs tail <id>` or `bt proxies logs read <id>`. Requires `proxy:update` Management Application permissions';
|
|
23
23
|
Logs.examples = [
|
|
24
24
|
'<%= config.bin %> <%= command.id %>',
|
|
25
25
|
'<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca',
|
|
@@ -54,7 +54,7 @@ class Update extends base_1.BaseCommand {
|
|
|
54
54
|
await (0, logs_1.showProxyLogs)(bt, id);
|
|
55
55
|
}
|
|
56
56
|
if (watch && isConfigurableRuntime) {
|
|
57
|
-
this.warn(`--watch is not supported for configurable runtimes (${runtime_2.
|
|
57
|
+
this.warn(`--watch is not supported for configurable runtimes (${runtime_2.CONFIGURABLE_RUNTIME_IMAGES_LABEL}). Skipping watch.`);
|
|
58
58
|
}
|
|
59
59
|
else if (watch) {
|
|
60
60
|
const entries = Object.entries({
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base';
|
|
2
|
+
export default class Read extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
since: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
until: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
format: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|