@basis-theory-labs/cli 2.1.0 → 4.0.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 +52 -44
- package/dist/commands/proxies/create.d.ts +3 -3
- package/dist/commands/proxies/create.js +3 -3
- package/dist/commands/proxies/update.d.ts +3 -3
- package/dist/commands/proxies/update.js +6 -6
- package/dist/commands/reactors/create.d.ts +3 -2
- package/dist/commands/reactors/create.js +14 -6
- package/dist/commands/reactors/update.d.ts +3 -2
- package/dist/commands/reactors/update.js +20 -6
- package/dist/logs/connect.js +3 -3
- package/dist/logs/http.d.ts +2 -2
- package/dist/logs/http.js +20 -10
- package/dist/logs/server.js +5 -3
- package/dist/proxies/runtime.js +1 -1
- package/dist/proxies/utils.d.ts +3 -3
- package/dist/proxies/utils.js +9 -9
- package/dist/reactors/runtime.d.ts +2 -1
- package/dist/reactors/runtime.js +8 -5
- package/dist/reactors/utils.d.ts +7 -4
- package/dist/reactors/utils.js +4 -0
- package/dist/runtime/flags.d.ts +2 -2
- package/dist/runtime/flags.js +7 -7
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +6 -1
- package/dist/runtime/state.js +20 -1
- package/dist/runtime/utils.d.ts +18 -6
- package/dist/runtime/utils.js +93 -22
- package/oclif.manifest.json +49 -37
- package/package.json +9 -10
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "4.0.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"applications:create": {
|
|
5
5
|
"id": "applications:create",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
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-
|
|
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-package-json ./request/package.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-package-json ./response/package.json --response-transform-permissions token:read"
|
|
222
222
|
}
|
|
223
223
|
],
|
|
224
224
|
"flags": {
|
|
@@ -296,16 +296,16 @@
|
|
|
296
296
|
"node22"
|
|
297
297
|
]
|
|
298
298
|
},
|
|
299
|
-
"request-transform-
|
|
300
|
-
"name": "request-transform-
|
|
299
|
+
"request-transform-package-json": {
|
|
300
|
+
"name": "request-transform-package-json",
|
|
301
301
|
"type": "option",
|
|
302
|
-
"description": "path to JSON file
|
|
302
|
+
"description": "path to runtime package.json JSON file (top-level dependencies required; supports resolutions or overrides fallback; pinned versions required) (node22 only)",
|
|
303
303
|
"multiple": false
|
|
304
304
|
},
|
|
305
305
|
"request-transform-timeout": {
|
|
306
306
|
"name": "request-transform-timeout",
|
|
307
307
|
"type": "option",
|
|
308
|
-
"description": "request-transform timeout in seconds,
|
|
308
|
+
"description": "request-transform timeout in seconds, 10-30 (node22 only)",
|
|
309
309
|
"multiple": false
|
|
310
310
|
},
|
|
311
311
|
"request-transform-warm-concurrency": {
|
|
@@ -341,16 +341,16 @@
|
|
|
341
341
|
"node22"
|
|
342
342
|
]
|
|
343
343
|
},
|
|
344
|
-
"response-transform-
|
|
345
|
-
"name": "response-transform-
|
|
344
|
+
"response-transform-package-json": {
|
|
345
|
+
"name": "response-transform-package-json",
|
|
346
346
|
"type": "option",
|
|
347
|
-
"description": "path to JSON file
|
|
347
|
+
"description": "path to runtime package.json JSON file (top-level dependencies required; supports resolutions or overrides fallback; pinned versions required) (node22 only)",
|
|
348
348
|
"multiple": false
|
|
349
349
|
},
|
|
350
350
|
"response-transform-timeout": {
|
|
351
351
|
"name": "response-transform-timeout",
|
|
352
352
|
"type": "option",
|
|
353
|
-
"description": "response-transform timeout in seconds,
|
|
353
|
+
"description": "response-transform timeout in seconds, 10-30 (node22 only)",
|
|
354
354
|
"multiple": false
|
|
355
355
|
},
|
|
356
356
|
"response-transform-warm-concurrency": {
|
|
@@ -376,8 +376,8 @@
|
|
|
376
376
|
"description": "response-transform permission to grant, repeatable (node22 only)",
|
|
377
377
|
"multiple": true
|
|
378
378
|
},
|
|
379
|
-
"
|
|
380
|
-
"name": "
|
|
379
|
+
"no-wait": {
|
|
380
|
+
"name": "no-wait",
|
|
381
381
|
"type": "boolean",
|
|
382
382
|
"description": "do not wait for proxy to be ready (requires at least one transform with node22)",
|
|
383
383
|
"allowNo": false
|
|
@@ -534,7 +534,7 @@
|
|
|
534
534
|
},
|
|
535
535
|
{
|
|
536
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-
|
|
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-package-json ./request/package.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-package-json ./response/package.json --response-transform-permissions token:read"
|
|
538
538
|
}
|
|
539
539
|
],
|
|
540
540
|
"flags": {
|
|
@@ -612,16 +612,16 @@
|
|
|
612
612
|
"node22"
|
|
613
613
|
]
|
|
614
614
|
},
|
|
615
|
-
"request-transform-
|
|
616
|
-
"name": "request-transform-
|
|
615
|
+
"request-transform-package-json": {
|
|
616
|
+
"name": "request-transform-package-json",
|
|
617
617
|
"type": "option",
|
|
618
|
-
"description": "path to JSON file
|
|
618
|
+
"description": "path to runtime package.json JSON file (top-level dependencies required; supports resolutions or overrides fallback; pinned versions required) (node22 only)",
|
|
619
619
|
"multiple": false
|
|
620
620
|
},
|
|
621
621
|
"request-transform-timeout": {
|
|
622
622
|
"name": "request-transform-timeout",
|
|
623
623
|
"type": "option",
|
|
624
|
-
"description": "request-transform timeout in seconds,
|
|
624
|
+
"description": "request-transform timeout in seconds, 10-30 (node22 only)",
|
|
625
625
|
"multiple": false
|
|
626
626
|
},
|
|
627
627
|
"request-transform-warm-concurrency": {
|
|
@@ -657,16 +657,16 @@
|
|
|
657
657
|
"node22"
|
|
658
658
|
]
|
|
659
659
|
},
|
|
660
|
-
"response-transform-
|
|
661
|
-
"name": "response-transform-
|
|
660
|
+
"response-transform-package-json": {
|
|
661
|
+
"name": "response-transform-package-json",
|
|
662
662
|
"type": "option",
|
|
663
|
-
"description": "path to JSON file
|
|
663
|
+
"description": "path to runtime package.json JSON file (top-level dependencies required; supports resolutions or overrides fallback; pinned versions required) (node22 only)",
|
|
664
664
|
"multiple": false
|
|
665
665
|
},
|
|
666
666
|
"response-transform-timeout": {
|
|
667
667
|
"name": "response-transform-timeout",
|
|
668
668
|
"type": "option",
|
|
669
|
-
"description": "response-transform timeout in seconds,
|
|
669
|
+
"description": "response-transform timeout in seconds, 10-30 (node22 only)",
|
|
670
670
|
"multiple": false
|
|
671
671
|
},
|
|
672
672
|
"response-transform-warm-concurrency": {
|
|
@@ -692,8 +692,8 @@
|
|
|
692
692
|
"description": "response-transform permission to grant, repeatable (node22 only)",
|
|
693
693
|
"multiple": true
|
|
694
694
|
},
|
|
695
|
-
"
|
|
696
|
-
"name": "
|
|
695
|
+
"no-wait": {
|
|
696
|
+
"name": "no-wait",
|
|
697
697
|
"type": "boolean",
|
|
698
698
|
"description": "do not wait for proxy to be ready (requires at least one transform with node22)",
|
|
699
699
|
"allowNo": false
|
|
@@ -742,7 +742,7 @@
|
|
|
742
742
|
},
|
|
743
743
|
{
|
|
744
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 --
|
|
745
|
+
"command": "<%= config.bin %> <%= command.id %> --name \"My Reactor\" --code ./reactor.js --configuration ./config.env --image node22 --async --timeout 10 --warm-concurrency 0 --resources standard --package-json ./package.json --permissions token:read --permissions token:create"
|
|
746
746
|
}
|
|
747
747
|
],
|
|
748
748
|
"flags": {
|
|
@@ -799,16 +799,16 @@
|
|
|
799
799
|
"node22"
|
|
800
800
|
]
|
|
801
801
|
},
|
|
802
|
-
"
|
|
803
|
-
"name": "
|
|
802
|
+
"package-json": {
|
|
803
|
+
"name": "package-json",
|
|
804
804
|
"type": "option",
|
|
805
|
-
"description": "path to JSON file
|
|
805
|
+
"description": "path to runtime package.json JSON file (top-level dependencies required; supports resolutions or overrides fallback; pinned versions required) (node22 only)",
|
|
806
806
|
"multiple": false
|
|
807
807
|
},
|
|
808
808
|
"timeout": {
|
|
809
809
|
"name": "timeout",
|
|
810
810
|
"type": "option",
|
|
811
|
-
"description": "timeout in seconds,
|
|
811
|
+
"description": "timeout in seconds, 10-900 (node22 only; maximum 30 when runtime async is disabled; default: 10)",
|
|
812
812
|
"multiple": false
|
|
813
813
|
},
|
|
814
814
|
"warm-concurrency": {
|
|
@@ -834,11 +834,17 @@
|
|
|
834
834
|
"description": "permission to grant, repeatable (node22 only)",
|
|
835
835
|
"multiple": true
|
|
836
836
|
},
|
|
837
|
+
"no-wait": {
|
|
838
|
+
"name": "no-wait",
|
|
839
|
+
"type": "boolean",
|
|
840
|
+
"description": "do not wait for resource provisioning to complete",
|
|
841
|
+
"allowNo": false
|
|
842
|
+
},
|
|
837
843
|
"async": {
|
|
838
844
|
"name": "async",
|
|
839
845
|
"type": "boolean",
|
|
840
|
-
"description": "
|
|
841
|
-
"allowNo":
|
|
846
|
+
"description": "execute Reactor invocations asynchronously (node22 only)",
|
|
847
|
+
"allowNo": true
|
|
842
848
|
}
|
|
843
849
|
},
|
|
844
850
|
"args": {}
|
|
@@ -988,7 +994,7 @@
|
|
|
988
994
|
},
|
|
989
995
|
{
|
|
990
996
|
"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 --
|
|
997
|
+
"command": "<%= config.bin %> <%= command.id %> <reactor-id> --name \"My Reactor\" --code ./reactor.js --configuration ./config.env --image node22 --async --timeout 10 --warm-concurrency 0 --resources standard --package-json ./package.json --permissions token:read --permissions token:create"
|
|
992
998
|
}
|
|
993
999
|
],
|
|
994
1000
|
"flags": {
|
|
@@ -1045,16 +1051,16 @@
|
|
|
1045
1051
|
"node22"
|
|
1046
1052
|
]
|
|
1047
1053
|
},
|
|
1048
|
-
"
|
|
1049
|
-
"name": "
|
|
1054
|
+
"package-json": {
|
|
1055
|
+
"name": "package-json",
|
|
1050
1056
|
"type": "option",
|
|
1051
|
-
"description": "path to JSON file
|
|
1057
|
+
"description": "path to runtime package.json JSON file (top-level dependencies required; supports resolutions or overrides fallback; pinned versions required) (node22 only)",
|
|
1052
1058
|
"multiple": false
|
|
1053
1059
|
},
|
|
1054
1060
|
"timeout": {
|
|
1055
1061
|
"name": "timeout",
|
|
1056
1062
|
"type": "option",
|
|
1057
|
-
"description": "timeout in seconds,
|
|
1063
|
+
"description": "timeout in seconds, 10-900 (node22 only; maximum 30 when runtime async is disabled; default: 10)",
|
|
1058
1064
|
"multiple": false
|
|
1059
1065
|
},
|
|
1060
1066
|
"warm-concurrency": {
|
|
@@ -1080,11 +1086,17 @@
|
|
|
1080
1086
|
"description": "permission to grant, repeatable (node22 only)",
|
|
1081
1087
|
"multiple": true
|
|
1082
1088
|
},
|
|
1089
|
+
"no-wait": {
|
|
1090
|
+
"name": "no-wait",
|
|
1091
|
+
"type": "boolean",
|
|
1092
|
+
"description": "do not wait for resource provisioning to complete",
|
|
1093
|
+
"allowNo": false
|
|
1094
|
+
},
|
|
1083
1095
|
"async": {
|
|
1084
1096
|
"name": "async",
|
|
1085
1097
|
"type": "boolean",
|
|
1086
|
-
"description": "
|
|
1087
|
-
"allowNo":
|
|
1098
|
+
"description": "execute Reactor invocations asynchronously (node22 only)",
|
|
1099
|
+
"allowNo": true
|
|
1088
1100
|
},
|
|
1089
1101
|
"watch": {
|
|
1090
1102
|
"name": "watch",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory-labs/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.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/node-sdk": "
|
|
20
|
+
"@basis-theory/node-sdk": "^6.1.1",
|
|
21
21
|
"@inquirer/checkbox": "^1.5.0",
|
|
22
22
|
"@inquirer/confirm": "^2.0.15",
|
|
23
23
|
"@inquirer/input": "^1.2.14",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"debug": "^4.3.4",
|
|
30
30
|
"detect-port": "^1.5.1",
|
|
31
31
|
"dotenv": "^16.3.1",
|
|
32
|
-
"fastify": "^4.19.2",
|
|
33
32
|
"lodash.debounce": "^4.0.8",
|
|
34
33
|
"lodash.groupby": "^4.6.0",
|
|
35
34
|
"pino": "^8.14.1",
|
|
@@ -41,18 +40,18 @@
|
|
|
41
40
|
"@basis-theory/eslint-config": "^1.2.0",
|
|
42
41
|
"@oclif/test": "^2.3.22",
|
|
43
42
|
"@semantic-release/changelog": "^6.0.3",
|
|
44
|
-
"@semantic-release/commit-analyzer": "^
|
|
43
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
45
44
|
"@semantic-release/git": "^10.0.1",
|
|
46
|
-
"@semantic-release/github": "^
|
|
47
|
-
"@semantic-release/npm": "^
|
|
48
|
-
"@semantic-release/release-notes-generator": "^
|
|
45
|
+
"@semantic-release/github": "^12.0.0",
|
|
46
|
+
"@semantic-release/npm": "^13.1.5",
|
|
47
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
49
48
|
"@types/chai": "^4",
|
|
50
49
|
"@types/debug": "^4.1.8",
|
|
51
50
|
"@types/detect-port": "^1.3.3",
|
|
52
51
|
"@types/lodash.debounce": "^4.0.7",
|
|
53
52
|
"@types/lodash.groupby": "^4.6.9",
|
|
54
53
|
"@types/mocha": "^9.0.0",
|
|
55
|
-
"@types/node": "^
|
|
54
|
+
"@types/node": "^18.19.0",
|
|
56
55
|
"@types/sinon": "^21.0.0",
|
|
57
56
|
"chai": "^4",
|
|
58
57
|
"eslint": "^7.32.0",
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
"mocha": "^9.2.2",
|
|
62
61
|
"oclif": "^3",
|
|
63
62
|
"prettier": "^2.8.8",
|
|
64
|
-
"semantic-release": "^
|
|
63
|
+
"semantic-release": "^25.0.7",
|
|
65
64
|
"shx": "^0.3.3",
|
|
66
65
|
"sinon": "^21.0.1",
|
|
67
66
|
"ts-node": "^10.9.1",
|
|
@@ -93,7 +92,7 @@
|
|
|
93
92
|
"release": "semantic-release"
|
|
94
93
|
},
|
|
95
94
|
"engines": {
|
|
96
|
-
"node": ">=
|
|
95
|
+
"node": ">=18.0.0"
|
|
97
96
|
},
|
|
98
97
|
"bugs": "https://github.com/Basis-Theory-Labs/basistheory-cli/issues",
|
|
99
98
|
"keywords": [
|