Skip to content

Commit 94f9a44

Browse files
committed
💄 Update console output.
1 parent 62d79ee commit 94f9a44

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/run.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,15 @@ function run(urlStr, body, options) {
2222
// See: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
2323
fetch(urlStr, opts)
2424
.then(res => {
25-
console.log()
2625
const apiUrl = urlStr.replace(/\/$/, '')
2726
url = new URL(apiUrl);
2827
cfg = loadConfig(url, cliOpts.config)
2928
path = buildPath(url, cliOpts.config)
3029

31-
console.log(`API Info:`)
32-
if (cfg?.["docs"] !== undefined) console.log(` Docs: ${cfg?.["docs"]}`)
33-
if (path.path.pathFormat) console.log(` Format: ${path.path.pathFormat}`)
34-
console.log(` Request: ${opts.method} ${url}`)
35-
console.log(` Response: ${res.status} ${res.statusText}`)
30+
console.log(`Status: ${res.status} ${res.statusText}`)
31+
console.log(`Request: ${opts.method} ${url}`)
32+
if (path.path.pathFormat) console.log(`Format: ${path.path.pathFormat}`)
33+
if (cfg?.["docs"] !== undefined) console.log(`Docs: ${cfg?.["docs"]}`)
3634

3735
comment = buildComment(url, path, opts.method, res)
3836
return res.json()
@@ -58,8 +56,8 @@ function write(json, path, content) {
5856
});
5957
console.log()
6058
console.log("Generated Files:")
61-
console.log(` Struct: ${path.goFilePath}`)
62-
console.log(` Payload: ${path.jsonFilePath}`)
59+
console.log(` - ${path.goFilePath}`)
60+
console.log(` - ${path.jsonFilePath}`)
6361
}
6462

6563
function buildOpts(body, cliOpts) {

0 commit comments

Comments
 (0)