@basis-theory-labs/cli 1.10.0 → 1.13.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 +5 -5
- package/dist/logs/server.js +11 -6
- package/oclif.manifest.json +1 -1
- 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/1.
|
|
22
|
+
@basis-theory-labs/cli/1.13.0 linux-x64 node-v18.20.7
|
|
23
23
|
$ bt --help [COMMAND]
|
|
24
24
|
USAGE
|
|
25
25
|
$ bt COMMAND
|
|
@@ -64,7 +64,7 @@ EXAMPLES
|
|
|
64
64
|
$ bt applications
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
_See code: [dist/commands/applications/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v1.
|
|
67
|
+
_See code: [dist/commands/applications/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v1.13.0/dist/commands/applications/index.ts)_
|
|
68
68
|
|
|
69
69
|
## `bt applications create`
|
|
70
70
|
|
|
@@ -153,7 +153,7 @@ EXAMPLES
|
|
|
153
153
|
$ bt proxies
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
_See code: [dist/commands/proxies/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v1.
|
|
156
|
+
_See code: [dist/commands/proxies/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v1.13.0/dist/commands/proxies/index.ts)_
|
|
157
157
|
|
|
158
158
|
## `bt proxies create`
|
|
159
159
|
|
|
@@ -286,7 +286,7 @@ EXAMPLES
|
|
|
286
286
|
$ bt reactorFormulas
|
|
287
287
|
```
|
|
288
288
|
|
|
289
|
-
_See code: [dist/commands/reactorFormulas/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v1.
|
|
289
|
+
_See code: [dist/commands/reactorFormulas/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v1.13.0/dist/commands/reactorFormulas/index.ts)_
|
|
290
290
|
|
|
291
291
|
## `bt reactorFormulas update ID`
|
|
292
292
|
|
|
@@ -339,7 +339,7 @@ EXAMPLES
|
|
|
339
339
|
$ bt reactors
|
|
340
340
|
```
|
|
341
341
|
|
|
342
|
-
_See code: [dist/commands/reactors/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v1.
|
|
342
|
+
_See code: [dist/commands/reactors/index.ts](https://github.com/Basis-Theory-Labs/basistheory-cli/blob/v1.13.0/dist/commands/reactors/index.ts)_
|
|
343
343
|
|
|
344
344
|
## `bt reactors create`
|
|
345
345
|
|
package/dist/logs/server.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createLogServer = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
// eslint-disable-next-line eslint-comments/disable-enable-pair
|
|
6
|
+
/* eslint-disable no-promise-executor-return */
|
|
5
7
|
const core_1 = require("@oclif/core");
|
|
6
8
|
const cloudflared_1 = require("cloudflared");
|
|
7
9
|
const detect_port_1 = tslib_1.__importDefault(require("detect-port"));
|
|
@@ -15,11 +17,11 @@ const runTunnel = async (port) => {
|
|
|
15
17
|
await (0, cloudflared_1.install)(cloudflared_1.bin);
|
|
16
18
|
}
|
|
17
19
|
debug('starting tunnel');
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
const url = await urlPromise;
|
|
20
|
+
const tunnel = cloudflared_1.Tunnel.quick(`localhost:${port}`);
|
|
21
|
+
const url = await new Promise((resolve) => tunnel.once('url', resolve));
|
|
22
22
|
debug(`tunnel started at ${url}`);
|
|
23
|
+
const connection = await new Promise((resolve) => tunnel.once('connected', resolve));
|
|
24
|
+
debug(`tunnel connection is ready`, connection);
|
|
23
25
|
return url;
|
|
24
26
|
};
|
|
25
27
|
const createLogServer = async (_port) => {
|
|
@@ -45,9 +47,12 @@ const createLogServer = async (_port) => {
|
|
|
45
47
|
debug(`server listening on port ${port}`);
|
|
46
48
|
await fastify.listen({ port });
|
|
47
49
|
core_1.ux.action.stop(`✅\tListening at http://localhost:${port}`);
|
|
48
|
-
core_1.ux.action.start('
|
|
50
|
+
core_1.ux.action.start('Creating tunnel');
|
|
49
51
|
const url = await runTunnel(port);
|
|
50
|
-
core_1.ux.action.stop(`✅\t\
|
|
52
|
+
core_1.ux.action.stop(`✅\t\tTunnel created at ${url}`);
|
|
53
|
+
core_1.ux.action.start('Waiting for tunnel to be ready (this may take 5 seconds)');
|
|
54
|
+
await new Promise((resolve) => setTimeout(resolve, 5000));
|
|
55
|
+
core_1.ux.action.stop('✅\t\tTunnel is now ready');
|
|
51
56
|
return url;
|
|
52
57
|
};
|
|
53
58
|
exports.createLogServer = createLogServer;
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory-labs/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Basis Theory CLI tool",
|
|
5
5
|
"author": "Davi Aquino @djejaquino",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@oclif/core": "^2",
|
|
26
26
|
"@oclif/plugin-help": "^5",
|
|
27
27
|
"@oclif/plugin-plugins": "^2.4.7",
|
|
28
|
-
"cloudflared": "^0.
|
|
28
|
+
"cloudflared": "^0.7.0",
|
|
29
29
|
"debug": "^4.3.4",
|
|
30
30
|
"detect-port": "^1.5.1",
|
|
31
31
|
"dotenv": "^16.3.1",
|