postboy-tui 1.3.2 → 1.3.3
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 -4
- package/dist/cli.js +67 -61
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ bun i -g postboy-tui@latest
|
|
|
67
67
|
|
|
68
68
|
### 1. Intuitive TUI
|
|
69
69
|
|
|
70
|
-
A clean, keyboard-driven interface designed for productivity. Navigate between panels, compose requests
|
|
70
|
+
A clean, keyboard-driven interface designed for productivity. Navigate between panels, compose requests and view responses without leaving your terminal.
|
|
71
71
|
|
|
72
72
|
<img width="1111" height="649" alt="image" src="https://github.com/user-attachments/assets/de940869-4bfe-4349-a1bd-2259d46f2fde" />
|
|
73
73
|
|
|
@@ -75,7 +75,7 @@ A clean, keyboard-driven interface designed for productivity. Navigate between p
|
|
|
75
75
|
|
|
76
76
|
### 2. Request Composer
|
|
77
77
|
|
|
78
|
-
Create and edit HTTP requests with support for all major methods. Add headers, body
|
|
78
|
+
Create and edit HTTP requests with support for all major methods. Add headers, body and query parameters with ease.
|
|
79
79
|
|
|
80
80
|
<img width="643" height="428" alt="image" src="https://github.com/user-attachments/assets/304c5903-f3c1-4470-85d2-39eebb184c63" />
|
|
81
81
|
|
|
@@ -84,7 +84,7 @@ Create and edit HTTP requests with support for all major methods. Add headers, b
|
|
|
84
84
|
|
|
85
85
|
### 3. History Management
|
|
86
86
|
|
|
87
|
-
Automatically saves every request you make. Browse, search
|
|
87
|
+
Automatically saves every request you make. Browse, search and re-run previous requests.
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
<img width="427" height="440" alt="image" src="https://github.com/user-attachments/assets/cf055710-5701-490c-bfc6-a9afbbea223d" />
|
|
@@ -94,7 +94,7 @@ Automatically saves every request you make. Browse, search, and re-run previous
|
|
|
94
94
|
|
|
95
95
|
### 4. Response Viewer
|
|
96
96
|
|
|
97
|
-
View responses in a pretty-printed format. Supports JSON, XML
|
|
97
|
+
View responses in a pretty-printed format. Supports JSON, XML and raw text. Syntax highlighting for easy reading.
|
|
98
98
|
|
|
99
99
|
<img width="646" height="692" alt="image" src="https://github.com/user-attachments/assets/d5c60702-c71e-410c-bfbd-2643f78403f3" />
|
|
100
100
|
|
package/dist/cli.js
CHANGED
|
@@ -4428,7 +4428,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
4428
4428
|
|
|
4429
4429
|
// node_modules/react/index.js
|
|
4430
4430
|
var require_react = __commonJS((exports, module) => {
|
|
4431
|
-
var react_development = __toESM(require_react_development()
|
|
4431
|
+
var react_development = __toESM(require_react_development());
|
|
4432
4432
|
if (false) {} else {
|
|
4433
4433
|
module.exports = react_development;
|
|
4434
4434
|
}
|
|
@@ -4873,7 +4873,7 @@ var require_scheduler_development = __commonJS((exports) => {
|
|
|
4873
4873
|
|
|
4874
4874
|
// node_modules/react-reconciler/node_modules/scheduler/index.js
|
|
4875
4875
|
var require_scheduler = __commonJS((exports, module) => {
|
|
4876
|
-
var scheduler_development = __toESM(require_scheduler_development()
|
|
4876
|
+
var scheduler_development = __toESM(require_scheduler_development());
|
|
4877
4877
|
if (false) {} else {
|
|
4878
4878
|
module.exports = scheduler_development;
|
|
4879
4879
|
}
|
|
@@ -4881,8 +4881,8 @@ var require_scheduler = __commonJS((exports, module) => {
|
|
|
4881
4881
|
|
|
4882
4882
|
// node_modules/react-reconciler/cjs/react-reconciler.development.js
|
|
4883
4883
|
var require_react_reconciler_development = __commonJS((exports, module) => {
|
|
4884
|
-
var React = __toESM(require_react()
|
|
4885
|
-
var Scheduler = __toESM(require_scheduler()
|
|
4884
|
+
var React = __toESM(require_react());
|
|
4885
|
+
var Scheduler = __toESM(require_scheduler());
|
|
4886
4886
|
module.exports = function($$$config) {
|
|
4887
4887
|
function findHook(fiber, id) {
|
|
4888
4888
|
for (fiber = fiber.memoizedState;fiber !== null && 0 < id; )
|
|
@@ -31695,7 +31695,7 @@ var require_stack_utils = __commonJS((exports, module) => {
|
|
|
31695
31695
|
|
|
31696
31696
|
// node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
|
31697
31697
|
var require_react_jsx_dev_runtime_development = __commonJS((exports) => {
|
|
31698
|
-
var React10 = __toESM(require_react()
|
|
31698
|
+
var React10 = __toESM(require_react());
|
|
31699
31699
|
(function() {
|
|
31700
31700
|
function getComponentNameFromType(type) {
|
|
31701
31701
|
if (type == null)
|
|
@@ -31909,7 +31909,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
31909
31909
|
|
|
31910
31910
|
// node_modules/react/jsx-dev-runtime.js
|
|
31911
31911
|
var require_jsx_dev_runtime = __commonJS((exports, module) => {
|
|
31912
|
-
var react_jsx_dev_runtime_development = __toESM(require_react_jsx_dev_runtime_development()
|
|
31912
|
+
var react_jsx_dev_runtime_development = __toESM(require_react_jsx_dev_runtime_development());
|
|
31913
31913
|
if (false) {} else {
|
|
31914
31914
|
module.exports = react_jsx_dev_runtime_development;
|
|
31915
31915
|
}
|
|
@@ -67644,17 +67644,26 @@ function sendRequest({ method, url, headers = {}, body }) {
|
|
|
67644
67644
|
data += chunk;
|
|
67645
67645
|
});
|
|
67646
67646
|
res.on("end", () => {
|
|
67647
|
-
|
|
67648
|
-
|
|
67649
|
-
|
|
67650
|
-
|
|
67651
|
-
|
|
67652
|
-
|
|
67647
|
+
try {
|
|
67648
|
+
resolve({
|
|
67649
|
+
status: res.statusCode || 0,
|
|
67650
|
+
statusText: res.statusMessage || "",
|
|
67651
|
+
headers: Object.fromEntries(Object.entries(res.headers).map(([k, v]) => [k, Array.isArray(v) ? v.join(", ") : v || ""])),
|
|
67652
|
+
body: data
|
|
67653
|
+
});
|
|
67654
|
+
} catch (err) {
|
|
67655
|
+
reject(err);
|
|
67656
|
+
}
|
|
67653
67657
|
});
|
|
67654
67658
|
});
|
|
67655
67659
|
req.on("error", reject);
|
|
67656
|
-
if (body)
|
|
67657
|
-
|
|
67660
|
+
if (body) {
|
|
67661
|
+
try {
|
|
67662
|
+
req.write(body);
|
|
67663
|
+
} catch (err) {
|
|
67664
|
+
reject(err);
|
|
67665
|
+
}
|
|
67666
|
+
}
|
|
67658
67667
|
req.end();
|
|
67659
67668
|
});
|
|
67660
67669
|
}
|
|
@@ -68351,12 +68360,15 @@ var JsonSyntaxHighlight = import_react29.default.memo(({ jsonString, theme }) =>
|
|
|
68351
68360
|
// src/ui/app/components/responsepanel.tsx
|
|
68352
68361
|
var import_react30 = __toESM(require_react(), 1);
|
|
68353
68362
|
var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
|
|
68354
|
-
var ResponsePanel = import_react30.default.memo(({ response, theme }) =>
|
|
68355
|
-
|
|
68363
|
+
var ResponsePanel = import_react30.default.memo(({ response, theme }) => {
|
|
68364
|
+
const [activeTab, setActiveTab] = import_react30.useState("body");
|
|
68365
|
+
const tabs = [{ name: "headers", label: "Headers" }, { name: "body", label: "Body" }];
|
|
68366
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
68356
68367
|
flexDirection: "column",
|
|
68357
|
-
|
|
68368
|
+
flexGrow: 1,
|
|
68358
68369
|
children: [
|
|
68359
68370
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
68371
|
+
marginBottom: 1,
|
|
68360
68372
|
children: [
|
|
68361
68373
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
68362
68374
|
width: 8,
|
|
@@ -68376,58 +68388,52 @@ var ResponsePanel = import_react30.default.memo(({ response, theme }) => /* @__P
|
|
|
68376
68388
|
}, undefined, true, undefined, this)
|
|
68377
68389
|
]
|
|
68378
68390
|
}, undefined, true, undefined, this),
|
|
68391
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Tabs, {
|
|
68392
|
+
tabs,
|
|
68393
|
+
activeTab,
|
|
68394
|
+
onChange: setActiveTab,
|
|
68395
|
+
theme
|
|
68396
|
+
}, undefined, false, undefined, this),
|
|
68379
68397
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
68398
|
+
marginTop: 1,
|
|
68399
|
+
flexGrow: 1,
|
|
68380
68400
|
children: [
|
|
68381
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(
|
|
68382
|
-
|
|
68383
|
-
|
|
68384
|
-
|
|
68385
|
-
|
|
68386
|
-
|
|
68387
|
-
|
|
68388
|
-
|
|
68389
|
-
|
|
68390
|
-
|
|
68391
|
-
|
|
68392
|
-
|
|
68393
|
-
|
|
68394
|
-
|
|
68395
|
-
|
|
68396
|
-
|
|
68397
|
-
|
|
68398
|
-
|
|
68399
|
-
|
|
68400
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
68401
|
-
color: theme.colors.success,
|
|
68402
|
-
children: String(value)
|
|
68403
|
-
}, undefined, false, undefined, this)
|
|
68404
|
-
]
|
|
68405
|
-
}, key, true, undefined, this))
|
|
68406
|
-
}, undefined, false, undefined, this)
|
|
68407
|
-
]
|
|
68408
|
-
}, undefined, true, undefined, this),
|
|
68409
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
68410
|
-
children: [
|
|
68411
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
68412
|
-
width: 8,
|
|
68413
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
68414
|
-
color: theme.colors.primary,
|
|
68415
|
-
children: "PAYLOAD:"
|
|
68401
|
+
activeTab === "headers" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ScrollableBox, {
|
|
68402
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
68403
|
+
flexDirection: "column",
|
|
68404
|
+
children: Object.entries(JSON.parse(response.headers || "{}")).map(([key, value]) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
68405
|
+
children: [
|
|
68406
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
68407
|
+
color: theme.colors.accent,
|
|
68408
|
+
children: key
|
|
68409
|
+
}, undefined, false, undefined, this),
|
|
68410
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
68411
|
+
color: theme.colors.muted,
|
|
68412
|
+
children: ": "
|
|
68413
|
+
}, undefined, false, undefined, this),
|
|
68414
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
68415
|
+
color: theme.colors.success,
|
|
68416
|
+
children: String(value)
|
|
68417
|
+
}, undefined, false, undefined, this)
|
|
68418
|
+
]
|
|
68419
|
+
}, key, true, undefined, this))
|
|
68416
68420
|
}, undefined, false, undefined, this)
|
|
68417
68421
|
}, undefined, false, undefined, this),
|
|
68418
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(
|
|
68419
|
-
|
|
68420
|
-
|
|
68421
|
-
|
|
68422
|
-
|
|
68423
|
-
|
|
68422
|
+
activeTab === "body" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ScrollableBox, {
|
|
68423
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
68424
|
+
flexDirection: "column",
|
|
68425
|
+
flexGrow: 1,
|
|
68426
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(JsonSyntaxHighlight, {
|
|
68427
|
+
jsonString: response.body,
|
|
68428
|
+
theme
|
|
68429
|
+
}, undefined, false, undefined, this)
|
|
68424
68430
|
}, undefined, false, undefined, this)
|
|
68425
68431
|
}, undefined, false, undefined, this)
|
|
68426
68432
|
]
|
|
68427
68433
|
}, undefined, true, undefined, this)
|
|
68428
68434
|
]
|
|
68429
|
-
}, undefined, true, undefined, this)
|
|
68430
|
-
}
|
|
68435
|
+
}, undefined, true, undefined, this);
|
|
68436
|
+
});
|
|
68431
68437
|
|
|
68432
68438
|
// src/utils/themeManager.ts
|
|
68433
68439
|
import { promises as fs3 } from "fs";
|
|
@@ -69065,7 +69071,7 @@ async function mockApis() {
|
|
|
69065
69071
|
|
|
69066
69072
|
// src/index.ts
|
|
69067
69073
|
var program2 = new Command;
|
|
69068
|
-
program2.version("1.3.
|
|
69074
|
+
program2.version("1.3.3").description(import_chalk8.default.yellow("PostBoy CLI - Test your APIs with ease"));
|
|
69069
69075
|
program2.command("run").description("Run a test API request").action(testCommand);
|
|
69070
69076
|
program2.command("mock-list").description("List the mock API servers").action(mockApis);
|
|
69071
69077
|
program2.command("ui").description("UI for PostBoy").action(uiCommand);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postboy-tui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"main": "dist/cli.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"postboy-tui": "dist/cli.js"
|
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
"keywords": [
|
|
12
|
+
"postboy",
|
|
13
|
+
"tui",
|
|
14
|
+
"cli",
|
|
15
|
+
"terminal",
|
|
16
|
+
"interface",
|
|
17
|
+
"developer-tool",
|
|
18
|
+
"api-testing"
|
|
19
|
+
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"start": "bun run src/index.ts",
|
|
22
22
|
"build": "bun build src/index.ts --outfile=dist/cli.js --target node",
|
|
23
23
|
"dev": "bun run --watch src/index.ts"
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
"repository": "https://github.com/Postboy-tui/app",
|
|
26
|
+
"homepage": "httsps://github.com/Postboy-tui/app#readme",
|
|
27
27
|
"module": "src/index.ts",
|
|
28
28
|
"type": "module",
|
|
29
29
|
"private": false,
|