@basis-theory-labs/cli 1.13.0 → 2.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.
Files changed (55) hide show
  1. package/README.md +166 -87
  2. package/dist/applications/management.d.ts +8 -10
  3. package/dist/applications/management.js +14 -10
  4. package/dist/base.d.ts +2 -2
  5. package/dist/base.js +27 -14
  6. package/dist/commands/applications/create.js +6 -3
  7. package/dist/commands/applications/index.js +3 -1
  8. package/dist/commands/proxies/create.d.ts +17 -1
  9. package/dist/commands/proxies/create.js +84 -8
  10. package/dist/commands/proxies/index.js +3 -2
  11. package/dist/commands/proxies/logs.js +2 -1
  12. package/dist/commands/proxies/update.d.ts +17 -1
  13. package/dist/commands/proxies/update.js +66 -6
  14. package/dist/commands/reactors/create.d.ts +11 -1
  15. package/dist/commands/reactors/create.js +70 -8
  16. package/dist/commands/reactors/index.js +3 -2
  17. package/dist/commands/reactors/logs.js +2 -1
  18. package/dist/commands/reactors/update.d.ts +11 -1
  19. package/dist/commands/reactors/update.js +45 -5
  20. package/dist/logs/connect.d.ts +5 -5
  21. package/dist/logs/connect.js +1 -2
  22. package/dist/logs/index.d.ts +3 -3
  23. package/dist/logs/server.js +1 -2
  24. package/dist/proxies/management.d.ts +7 -7
  25. package/dist/proxies/management.js +16 -9
  26. package/dist/proxies/runtime.d.ts +5 -0
  27. package/dist/proxies/runtime.js +66 -0
  28. package/dist/proxies/utils.d.ts +26 -5
  29. package/dist/proxies/utils.js +78 -7
  30. package/dist/reactors/management.d.ts +7 -7
  31. package/dist/reactors/management.js +16 -9
  32. package/dist/reactors/runtime.d.ts +3 -0
  33. package/dist/reactors/runtime.js +27 -0
  34. package/dist/reactors/utils.d.ts +16 -5
  35. package/dist/reactors/utils.js +4 -1
  36. package/dist/runtime/flags.d.ts +10 -0
  37. package/dist/runtime/flags.js +37 -0
  38. package/dist/runtime/index.d.ts +3 -0
  39. package/dist/runtime/index.js +20 -0
  40. package/dist/runtime/state.d.ts +6 -0
  41. package/dist/runtime/state.js +86 -0
  42. package/dist/runtime/utils.d.ts +34 -0
  43. package/dist/runtime/utils.js +132 -0
  44. package/dist/utils.d.ts +12 -2
  45. package/dist/utils.js +44 -4
  46. package/oclif.manifest.json +333 -122
  47. package/package.json +4 -3
  48. package/dist/commands/reactorFormulas/index.d.ts +0 -10
  49. package/dist/commands/reactorFormulas/index.js +0 -27
  50. package/dist/commands/reactorFormulas/update.d.ts +0 -18
  51. package/dist/commands/reactorFormulas/update.js +0 -71
  52. package/dist/reactorFormulas/management.d.ts +0 -5
  53. package/dist/reactorFormulas/management.js +0 -54
  54. package/dist/reactorFormulas/utils.d.ts +0 -26
  55. package/dist/reactorFormulas/utils.js +0 -49
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.13.0",
2
+ "version": "2.1.0",
3
3
  "commands": {
4
4
  "applications:create": {
5
5
  "id": "applications:create",
@@ -204,7 +204,22 @@
204
204
  "pluginType": "core",
205
205
  "aliases": [],
206
206
  "examples": [
207
- "<%= config.bin %> <%= command.id %> "
207
+ {
208
+ "description": "Create a proxy without transforms",
209
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Proxy\" --destination-url https://api.example.com"
210
+ },
211
+ {
212
+ "description": "Create a proxy with legacy runtime transforms",
213
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Proxy\" --destination-url https://api.example.com --request-transform-code ./request.js --request-transform-image node-bt --application-id <application-id>"
214
+ },
215
+ {
216
+ "description": "Create a proxy with node22 transforms",
217
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Proxy\" --destination-url https://api.example.com --request-transform-code ./request.js --request-transform-image node22 --response-transform-code ./response.js --response-transform-image node22"
218
+ },
219
+ {
220
+ "description": "Create a proxy with node22 transforms and all runtime options",
221
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Proxy\" --destination-url https://api.example.com --configuration ./config.env --require-auth --request-transform-code ./request.js --request-transform-image node22 --request-transform-timeout 10 --request-transform-warm-concurrency 0 --request-transform-resources standard --request-transform-dependencies ./deps.json --request-transform-permissions token:read --response-transform-code ./response.js --response-transform-image node22 --response-transform-timeout 10 --response-transform-warm-concurrency 0 --response-transform-resources standard --response-transform-dependencies ./deps.json --response-transform-permissions token:read"
222
+ }
208
223
  ],
209
224
  "flags": {
210
225
  "management-key": {
@@ -270,6 +285,102 @@
270
285
  "char": "a",
271
286
  "description": "whether the Proxy requires Basis Theory authentication to be invoked. Default: true",
272
287
  "allowNo": true
288
+ },
289
+ "request-transform-image": {
290
+ "name": "request-transform-image",
291
+ "type": "option",
292
+ "description": "request-transform runtime image (node-bt|node22)",
293
+ "multiple": false,
294
+ "options": [
295
+ "node-bt",
296
+ "node22"
297
+ ]
298
+ },
299
+ "request-transform-dependencies": {
300
+ "name": "request-transform-dependencies",
301
+ "type": "option",
302
+ "description": "path to JSON file with npm dependencies, e.g. {\"axios\": \"1.7.9\", \"lodash\": \"4.17.21\"} (node22 only)",
303
+ "multiple": false
304
+ },
305
+ "request-transform-timeout": {
306
+ "name": "request-transform-timeout",
307
+ "type": "option",
308
+ "description": "request-transform timeout in seconds, 1-30 (node22 only)",
309
+ "multiple": false
310
+ },
311
+ "request-transform-warm-concurrency": {
312
+ "name": "request-transform-warm-concurrency",
313
+ "type": "option",
314
+ "description": "request-transform warm concurrency, 0-1 (node22 only)",
315
+ "multiple": false
316
+ },
317
+ "request-transform-resources": {
318
+ "name": "request-transform-resources",
319
+ "type": "option",
320
+ "description": "request-transform resource tier (node22 only)",
321
+ "multiple": false,
322
+ "options": [
323
+ "standard",
324
+ "large",
325
+ "xlarge"
326
+ ]
327
+ },
328
+ "request-transform-permissions": {
329
+ "name": "request-transform-permissions",
330
+ "type": "option",
331
+ "description": "request-transform permission to grant, repeatable (node22 only)",
332
+ "multiple": true
333
+ },
334
+ "response-transform-image": {
335
+ "name": "response-transform-image",
336
+ "type": "option",
337
+ "description": "response-transform runtime image (node-bt|node22)",
338
+ "multiple": false,
339
+ "options": [
340
+ "node-bt",
341
+ "node22"
342
+ ]
343
+ },
344
+ "response-transform-dependencies": {
345
+ "name": "response-transform-dependencies",
346
+ "type": "option",
347
+ "description": "path to JSON file with npm dependencies, e.g. {\"axios\": \"1.7.9\", \"lodash\": \"4.17.21\"} (node22 only)",
348
+ "multiple": false
349
+ },
350
+ "response-transform-timeout": {
351
+ "name": "response-transform-timeout",
352
+ "type": "option",
353
+ "description": "response-transform timeout in seconds, 1-30 (node22 only)",
354
+ "multiple": false
355
+ },
356
+ "response-transform-warm-concurrency": {
357
+ "name": "response-transform-warm-concurrency",
358
+ "type": "option",
359
+ "description": "response-transform warm concurrency, 0-1 (node22 only)",
360
+ "multiple": false
361
+ },
362
+ "response-transform-resources": {
363
+ "name": "response-transform-resources",
364
+ "type": "option",
365
+ "description": "response-transform resource tier (node22 only)",
366
+ "multiple": false,
367
+ "options": [
368
+ "standard",
369
+ "large",
370
+ "xlarge"
371
+ ]
372
+ },
373
+ "response-transform-permissions": {
374
+ "name": "response-transform-permissions",
375
+ "type": "option",
376
+ "description": "response-transform permission to grant, repeatable (node22 only)",
377
+ "multiple": true
378
+ },
379
+ "async": {
380
+ "name": "async",
381
+ "type": "boolean",
382
+ "description": "do not wait for proxy to be ready (requires at least one transform with node22)",
383
+ "allowNo": false
273
384
  }
274
385
  },
275
386
  "args": {}
@@ -409,10 +520,22 @@
409
520
  "pluginType": "core",
410
521
  "aliases": [],
411
522
  "examples": [
412
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca",
413
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca --destination-url https://echo.basistheory.com",
414
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca --request-transform-code ./myRequestTransform.js",
415
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca --configuration ./.env.proxy"
523
+ {
524
+ "description": "Update a proxy destination URL",
525
+ "command": "<%= config.bin %> <%= command.id %> <proxy-id> --destination-url https://api.example.com"
526
+ },
527
+ {
528
+ "description": "Update a proxy with legacy runtime transforms",
529
+ "command": "<%= config.bin %> <%= command.id %> <proxy-id> --request-transform-code ./request.js --request-transform-image node-bt --application-id <application-id>"
530
+ },
531
+ {
532
+ "description": "Update a proxy with node22 transforms",
533
+ "command": "<%= config.bin %> <%= command.id %> <proxy-id> --request-transform-code ./request.js --request-transform-image node22 --response-transform-code ./response.js --response-transform-image node22"
534
+ },
535
+ {
536
+ "description": "Update a proxy with node22 transforms and all runtime options",
537
+ "command": "<%= config.bin %> <%= command.id %> <proxy-id> --name \"My Proxy\" --destination-url https://api.example.com --configuration ./config.env --require-auth --request-transform-code ./request.js --request-transform-image node22 --request-transform-timeout 10 --request-transform-warm-concurrency 0 --request-transform-resources standard --request-transform-dependencies ./deps.json --request-transform-permissions token:read --response-transform-code ./response.js --response-transform-image node22 --response-transform-timeout 10 --response-transform-warm-concurrency 0 --response-transform-resources standard --response-transform-dependencies ./deps.json --response-transform-permissions token:read"
538
+ }
416
539
  ],
417
540
  "flags": {
418
541
  "management-key": {
@@ -479,143 +602,101 @@
479
602
  "description": "whether the Proxy requires Basis Theory authentication to be invoked. Default: true",
480
603
  "allowNo": true
481
604
  },
482
- "watch": {
483
- "name": "watch",
484
- "type": "boolean",
485
- "char": "w",
486
- "description": "Watch for changes in informed files",
487
- "required": false,
488
- "allowNo": false
605
+ "request-transform-image": {
606
+ "name": "request-transform-image",
607
+ "type": "option",
608
+ "description": "request-transform runtime image (node-bt|node22)",
609
+ "multiple": false,
610
+ "options": [
611
+ "node-bt",
612
+ "node22"
613
+ ]
489
614
  },
490
- "logs": {
491
- "name": "logs",
492
- "type": "boolean",
493
- "char": "l",
494
- "description": "Start logs server after update",
495
- "required": false,
496
- "allowNo": false
497
- }
498
- },
499
- "args": {
500
- "id": {
501
- "name": "id",
502
- "description": "Proxy id to update",
503
- "required": true
504
- }
505
- }
506
- },
507
- "reactorFormulas": {
508
- "id": "reactorFormulas",
509
- "description": "[Deprecated] List Reactor Formulas. Requires `reactor:read` Management Application permission",
510
- "strict": true,
511
- "pluginName": "@basis-theory-labs/cli",
512
- "pluginAlias": "@basis-theory-labs/cli",
513
- "pluginType": "core",
514
- "aliases": [],
515
- "examples": [
516
- "<%= config.bin %> <%= command.id %>"
517
- ],
518
- "flags": {
519
- "management-key": {
520
- "name": "management-key",
615
+ "request-transform-dependencies": {
616
+ "name": "request-transform-dependencies",
521
617
  "type": "option",
522
- "char": "x",
523
- "description": "management key used for connecting with the reactor / proxy",
524
- "required": true,
618
+ "description": "path to JSON file with npm dependencies, e.g. {\"axios\": \"1.7.9\", \"lodash\": \"4.17.21\"} (node22 only)",
525
619
  "multiple": false
526
620
  },
527
- "api-base-url": {
528
- "name": "api-base-url",
621
+ "request-transform-timeout": {
622
+ "name": "request-transform-timeout",
529
623
  "type": "option",
530
- "description": "base API URL to use in Basis Theory SDK",
531
- "hidden": true,
624
+ "description": "request-transform timeout in seconds, 1-30 (node22 only)",
532
625
  "multiple": false
533
626
  },
534
- "page": {
535
- "name": "page",
627
+ "request-transform-warm-concurrency": {
628
+ "name": "request-transform-warm-concurrency",
536
629
  "type": "option",
537
- "char": "p",
538
- "description": "Reactors formulas list page to fetch",
539
- "multiple": false,
540
- "default": 1
541
- }
542
- },
543
- "args": {}
544
- },
545
- "reactorFormulas:update": {
546
- "id": "reactorFormulas:update",
547
- "description": "[Deprecated] Updates an existing Reactor Formula. Requires `reactor:update` Management Application permission",
548
- "strict": true,
549
- "pluginName": "@basis-theory-labs/cli",
550
- "pluginAlias": "@basis-theory-labs/cli",
551
- "pluginType": "core",
552
- "aliases": [],
553
- "examples": [
554
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca",
555
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca --code ./formula.js",
556
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca --code ./formula.js -w"
557
- ],
558
- "flags": {
559
- "management-key": {
560
- "name": "management-key",
561
- "type": "option",
562
- "char": "x",
563
- "description": "management key used for connecting with the reactor / proxy",
564
- "required": true,
630
+ "description": "request-transform warm concurrency, 0-1 (node22 only)",
565
631
  "multiple": false
566
632
  },
567
- "api-base-url": {
568
- "name": "api-base-url",
633
+ "request-transform-resources": {
634
+ "name": "request-transform-resources",
569
635
  "type": "option",
570
- "description": "base API URL to use in Basis Theory SDK",
571
- "hidden": true,
572
- "multiple": false
636
+ "description": "request-transform resource tier (node22 only)",
637
+ "multiple": false,
638
+ "options": [
639
+ "standard",
640
+ "large",
641
+ "xlarge"
642
+ ]
573
643
  },
574
- "name": {
575
- "name": "name",
644
+ "request-transform-permissions": {
645
+ "name": "request-transform-permissions",
576
646
  "type": "option",
577
- "char": "n",
578
- "description": "name of the Reactor Formula",
579
- "required": true,
580
- "multiple": false
647
+ "description": "request-transform permission to grant, repeatable (node22 only)",
648
+ "multiple": true
581
649
  },
582
- "description": {
583
- "name": "description",
650
+ "response-transform-image": {
651
+ "name": "response-transform-image",
584
652
  "type": "option",
585
- "char": "d",
586
- "description": "description of the Reactor Formula",
587
- "multiple": false
653
+ "description": "response-transform runtime image (node-bt|node22)",
654
+ "multiple": false,
655
+ "options": [
656
+ "node-bt",
657
+ "node22"
658
+ ]
588
659
  },
589
- "icon": {
590
- "name": "icon",
660
+ "response-transform-dependencies": {
661
+ "name": "response-transform-dependencies",
591
662
  "type": "option",
592
- "char": "i",
593
- "description": "icon of the Reactor Formula",
663
+ "description": "path to JSON file with npm dependencies, e.g. {\"axios\": \"1.7.9\", \"lodash\": \"4.17.21\"} (node22 only)",
594
664
  "multiple": false
595
665
  },
596
- "code": {
597
- "name": "code",
666
+ "response-transform-timeout": {
667
+ "name": "response-transform-timeout",
598
668
  "type": "option",
599
- "char": "s",
600
- "description": "path to JavaScript file containing code",
601
- "required": true,
669
+ "description": "response-transform timeout in seconds, 1-30 (node22 only)",
602
670
  "multiple": false
603
671
  },
604
- "configuration": {
605
- "name": "configuration",
672
+ "response-transform-warm-concurrency": {
673
+ "name": "response-transform-warm-concurrency",
606
674
  "type": "option",
607
- "char": "c",
608
- "description": "path to configuration definition to use in the Reactor Formula",
609
- "required": true,
675
+ "description": "response-transform warm concurrency, 0-1 (node22 only)",
610
676
  "multiple": false
611
677
  },
612
- "request-parameters": {
613
- "name": "request-parameters",
678
+ "response-transform-resources": {
679
+ "name": "response-transform-resources",
614
680
  "type": "option",
615
- "char": "p",
616
- "description": "path to request params definition to use in the Reactor Formula",
617
- "required": true,
618
- "multiple": false
681
+ "description": "response-transform resource tier (node22 only)",
682
+ "multiple": false,
683
+ "options": [
684
+ "standard",
685
+ "large",
686
+ "xlarge"
687
+ ]
688
+ },
689
+ "response-transform-permissions": {
690
+ "name": "response-transform-permissions",
691
+ "type": "option",
692
+ "description": "response-transform permission to grant, repeatable (node22 only)",
693
+ "multiple": true
694
+ },
695
+ "async": {
696
+ "name": "async",
697
+ "type": "boolean",
698
+ "description": "do not wait for proxy to be ready (requires at least one transform with node22)",
699
+ "allowNo": false
619
700
  },
620
701
  "watch": {
621
702
  "name": "watch",
@@ -624,12 +705,20 @@
624
705
  "description": "Watch for changes in informed files",
625
706
  "required": false,
626
707
  "allowNo": false
708
+ },
709
+ "logs": {
710
+ "name": "logs",
711
+ "type": "boolean",
712
+ "char": "l",
713
+ "description": "Start logs server after update",
714
+ "required": false,
715
+ "allowNo": false
627
716
  }
628
717
  },
629
718
  "args": {
630
719
  "id": {
631
720
  "name": "id",
632
- "description": "Reactor Formula id to update",
721
+ "description": "Proxy id to update",
633
722
  "required": true
634
723
  }
635
724
  }
@@ -643,7 +732,18 @@
643
732
  "pluginType": "core",
644
733
  "aliases": [],
645
734
  "examples": [
646
- "<%= config.bin %> <%= command.id %> "
735
+ {
736
+ "description": "Create a reactor with legacy runtime",
737
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Reactor\" --code ./reactor.js --image node-bt --application-id <application-id>"
738
+ },
739
+ {
740
+ "description": "Create a reactor with node22 runtime",
741
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Reactor\" --code ./reactor.js --image node22"
742
+ },
743
+ {
744
+ "description": "Create a reactor with node22 and all runtime options",
745
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Reactor\" --code ./reactor.js --configuration ./config.env --image node22 --timeout 10 --warm-concurrency 0 --resources standard --dependencies ./deps.json --permissions token:read --permissions token:create"
746
+ }
647
747
  ],
648
748
  "flags": {
649
749
  "management-key": {
@@ -688,6 +788,57 @@
688
788
  "char": "r",
689
789
  "description": "path to JavaScript file containing the Reactor code",
690
790
  "multiple": false
791
+ },
792
+ "image": {
793
+ "name": "image",
794
+ "type": "option",
795
+ "description": "runtime image (node-bt|node22)",
796
+ "multiple": false,
797
+ "options": [
798
+ "node-bt",
799
+ "node22"
800
+ ]
801
+ },
802
+ "dependencies": {
803
+ "name": "dependencies",
804
+ "type": "option",
805
+ "description": "path to JSON file with npm dependencies, e.g. {\"axios\": \"1.7.9\", \"lodash\": \"4.17.21\"} (node22 only)",
806
+ "multiple": false
807
+ },
808
+ "timeout": {
809
+ "name": "timeout",
810
+ "type": "option",
811
+ "description": "timeout in seconds, 1-30 (node22 only, default: 10)",
812
+ "multiple": false
813
+ },
814
+ "warm-concurrency": {
815
+ "name": "warm-concurrency",
816
+ "type": "option",
817
+ "description": "number of warm instances, 0-1 (node22 only, default: 0)",
818
+ "multiple": false
819
+ },
820
+ "resources": {
821
+ "name": "resources",
822
+ "type": "option",
823
+ "description": "resource tier (node22 only, default: standard)",
824
+ "multiple": false,
825
+ "options": [
826
+ "standard",
827
+ "large",
828
+ "xlarge"
829
+ ]
830
+ },
831
+ "permissions": {
832
+ "name": "permissions",
833
+ "type": "option",
834
+ "description": "permission to grant, repeatable (node22 only)",
835
+ "multiple": true
836
+ },
837
+ "async": {
838
+ "name": "async",
839
+ "type": "boolean",
840
+ "description": "do not wait for resource to be ready (node22 only)",
841
+ "allowNo": false
691
842
  }
692
843
  },
693
844
  "args": {}
@@ -827,9 +978,18 @@
827
978
  "pluginType": "core",
828
979
  "aliases": [],
829
980
  "examples": [
830
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca",
831
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca --code ./reactor.js",
832
- "<%= config.bin %> <%= command.id %> 03858bf5-32d3-4a2e-b74b-daeea0883bca --configuration ./.env.reactor"
981
+ {
982
+ "description": "Update a reactor with legacy runtime",
983
+ "command": "<%= config.bin %> <%= command.id %> <reactor-id> --code ./reactor.js --image node-bt --application-id <application-id>"
984
+ },
985
+ {
986
+ "description": "Update a reactor with node22 runtime",
987
+ "command": "<%= config.bin %> <%= command.id %> <reactor-id> --code ./reactor.js --image node22"
988
+ },
989
+ {
990
+ "description": "Update a reactor with node22 and all runtime options",
991
+ "command": "<%= config.bin %> <%= command.id %> <reactor-id> --name \"My Reactor\" --code ./reactor.js --configuration ./config.env --image node22 --timeout 10 --warm-concurrency 0 --resources standard --dependencies ./deps.json --permissions token:read --permissions token:create"
992
+ }
833
993
  ],
834
994
  "flags": {
835
995
  "management-key": {
@@ -875,6 +1035,57 @@
875
1035
  "description": "path to JavaScript file containing the Reactor code",
876
1036
  "multiple": false
877
1037
  },
1038
+ "image": {
1039
+ "name": "image",
1040
+ "type": "option",
1041
+ "description": "runtime image (node-bt|node22)",
1042
+ "multiple": false,
1043
+ "options": [
1044
+ "node-bt",
1045
+ "node22"
1046
+ ]
1047
+ },
1048
+ "dependencies": {
1049
+ "name": "dependencies",
1050
+ "type": "option",
1051
+ "description": "path to JSON file with npm dependencies, e.g. {\"axios\": \"1.7.9\", \"lodash\": \"4.17.21\"} (node22 only)",
1052
+ "multiple": false
1053
+ },
1054
+ "timeout": {
1055
+ "name": "timeout",
1056
+ "type": "option",
1057
+ "description": "timeout in seconds, 1-30 (node22 only, default: 10)",
1058
+ "multiple": false
1059
+ },
1060
+ "warm-concurrency": {
1061
+ "name": "warm-concurrency",
1062
+ "type": "option",
1063
+ "description": "number of warm instances, 0-1 (node22 only, default: 0)",
1064
+ "multiple": false
1065
+ },
1066
+ "resources": {
1067
+ "name": "resources",
1068
+ "type": "option",
1069
+ "description": "resource tier (node22 only, default: standard)",
1070
+ "multiple": false,
1071
+ "options": [
1072
+ "standard",
1073
+ "large",
1074
+ "xlarge"
1075
+ ]
1076
+ },
1077
+ "permissions": {
1078
+ "name": "permissions",
1079
+ "type": "option",
1080
+ "description": "permission to grant, repeatable (node22 only)",
1081
+ "multiple": true
1082
+ },
1083
+ "async": {
1084
+ "name": "async",
1085
+ "type": "boolean",
1086
+ "description": "do not wait for resource to be ready (node22 only)",
1087
+ "allowNo": false
1088
+ },
878
1089
  "watch": {
879
1090
  "name": "watch",
880
1091
  "type": "boolean",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory-labs/cli",
3
- "version": "1.13.0",
3
+ "version": "2.1.0",
4
4
  "description": "Basis Theory CLI tool",
5
5
  "author": "Davi Aquino @djejaquino",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  "/oclif.manifest.json"
18
18
  ],
19
19
  "dependencies": {
20
- "@basis-theory/basis-theory-js": "^2.7.0",
20
+ "@basis-theory/node-sdk": "5.0.0",
21
21
  "@inquirer/checkbox": "^1.5.0",
22
22
  "@inquirer/confirm": "^2.0.15",
23
23
  "@inquirer/input": "^1.2.14",
@@ -53,6 +53,7 @@
53
53
  "@types/lodash.groupby": "^4.6.9",
54
54
  "@types/mocha": "^9.0.0",
55
55
  "@types/node": "^16.18.36",
56
+ "@types/sinon": "^21.0.0",
56
57
  "chai": "^4",
57
58
  "eslint": "^7.32.0",
58
59
  "eslint-config-oclif": "^4",
@@ -62,6 +63,7 @@
62
63
  "prettier": "^2.8.8",
63
64
  "semantic-release": "^21.0.5",
64
65
  "shx": "^0.3.3",
66
+ "sinon": "^21.0.1",
65
67
  "ts-node": "^10.9.1",
66
68
  "tslib": "^2.5.3",
67
69
  "typescript": "^4.9.5"
@@ -85,7 +87,6 @@
85
87
  "build": "shx rm -rf dist && tsc -b",
86
88
  "lint": "eslint . --ext .ts --config .eslintrc",
87
89
  "postpack": "shx rm -f oclif.manifest.json",
88
- "posttest": "yarn lint",
89
90
  "prepack": "yarn build && oclif manifest && oclif readme",
90
91
  "version": "yarn build && oclif readme",
91
92
  "test": "mocha --forbid-only \"test/**/*.test.ts\"",
@@ -1,10 +0,0 @@
1
- import { BaseCommand } from '../../base';
2
- export default class ReactorFormulas extends BaseCommand {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- page: import("@oclif/core/lib/interfaces/parser").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
- };
8
- static args: {};
9
- run(): Promise<void>;
10
- }
@@ -1,27 +0,0 @@
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 management_1 = require("../../reactorFormulas/management");
6
- class ReactorFormulas extends base_1.BaseCommand {
7
- async run() {
8
- this.log('WARNING: Reactor Formulas are being deprecated and will be removed in a future release.');
9
- const { bt, flags: { page }, } = await this.parse(ReactorFormulas);
10
- const formula = await (0, management_1.selectReactorFormula)(bt, page);
11
- if (!formula) {
12
- return undefined;
13
- }
14
- return undefined;
15
- }
16
- }
17
- exports.default = ReactorFormulas;
18
- ReactorFormulas.description = '[Deprecated] List Reactor Formulas. Requires `reactor:read` Management Application permission';
19
- ReactorFormulas.examples = ['<%= config.bin %> <%= command.id %>'];
20
- ReactorFormulas.flags = {
21
- page: core_1.Flags.integer({
22
- char: 'p',
23
- description: 'Reactors formulas list page to fetch',
24
- default: 1,
25
- }),
26
- };
27
- ReactorFormulas.args = {};
@@ -1,18 +0,0 @@
1
- import { BaseCommand } from '../../base';
2
- export default class Update extends BaseCommand {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- watch: import("@oclif/core/lib/interfaces/parser").BooleanFlag<boolean>;
7
- name: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
- description: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
- icon: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
- code: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
- configuration: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
- 'request-parameters': import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
- };
14
- static args: {
15
- id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
16
- };
17
- run(): Promise<void>;
18
- }