@antigenic-oss/paint 0.3.0 → 0.3.2
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/bin/paint.js +35 -3
- package/package.json +1 -1
package/bin/paint.js
CHANGED
|
@@ -253,6 +253,40 @@ function parseArgs(argv) {
|
|
|
253
253
|
return parsed
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
function printBanner(host, port) {
|
|
257
|
+
const reset = '\x1b[0m'
|
|
258
|
+
const dim = '\x1b[2m'
|
|
259
|
+
const bold = '\x1b[1m'
|
|
260
|
+
const cyan = '\x1b[36m'
|
|
261
|
+
const yellow = '\x1b[33m'
|
|
262
|
+
const magenta = '\x1b[35m'
|
|
263
|
+
const white = '\x1b[97m'
|
|
264
|
+
|
|
265
|
+
const logo = [
|
|
266
|
+
`${yellow} ██████${reset}`,
|
|
267
|
+
`${yellow} ██${white}░░${yellow}██${white}░░${yellow}██${reset}`,
|
|
268
|
+
`${yellow} ██${white}░░${yellow}██${white}░░${yellow}██${reset}`,
|
|
269
|
+
`${yellow} ████████${reset}`,
|
|
270
|
+
`${yellow} ██${magenta}▓▓${yellow}████${reset}`,
|
|
271
|
+
`${yellow} ████████${reset}`,
|
|
272
|
+
]
|
|
273
|
+
|
|
274
|
+
const info = [
|
|
275
|
+
'',
|
|
276
|
+
`${bold}${white}pAInt${reset} ${dim}v${APP_VERSION}${reset}`,
|
|
277
|
+
`${dim}http://${host}:${port}${reset}`,
|
|
278
|
+
`${dim}${process.cwd()}${reset}`,
|
|
279
|
+
'',
|
|
280
|
+
'',
|
|
281
|
+
]
|
|
282
|
+
|
|
283
|
+
console.log()
|
|
284
|
+
for (let i = 0; i < logo.length; i++) {
|
|
285
|
+
console.log(` ${logo[i]} ${info[i]}`)
|
|
286
|
+
}
|
|
287
|
+
console.log()
|
|
288
|
+
}
|
|
289
|
+
|
|
256
290
|
function readState(filePath) {
|
|
257
291
|
try {
|
|
258
292
|
return JSON.parse(fs.readFileSync(filePath, 'utf8'))
|
|
@@ -488,9 +522,7 @@ async function startApp(options) {
|
|
|
488
522
|
},
|
|
489
523
|
})
|
|
490
524
|
|
|
491
|
-
|
|
492
|
-
console.log(`Web pid: ${webChild.pid}`)
|
|
493
|
-
console.log(`Web logs: ${WEB_LOG_FILE}`)
|
|
525
|
+
printBanner(options.host, options.port)
|
|
494
526
|
|
|
495
527
|
checkForUpdate()
|
|
496
528
|
}
|
package/package.json
CHANGED