@rhizogrip/spore-cli 1.34.0 → 1.35.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/package.json +2 -2
- package/src/hooks.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhizogrip/spore-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Christophe Le Bars",
|
|
6
6
|
"email": "clb@toort.net"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"tui": "node bin/spore.js tui"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@rhizogrip/spore": "1.
|
|
53
|
+
"@rhizogrip/spore": "1.35.0",
|
|
54
54
|
"chalk": "^6.0.1",
|
|
55
55
|
"minimist": "^1.2.8"
|
|
56
56
|
},
|
package/src/hooks.js
CHANGED
|
@@ -8,7 +8,7 @@ const UNAVAILABLE = new Set(['SERVICE_NO_SYSTEMD', 'SERVICE_NOT_DEFINED'])
|
|
|
8
8
|
|
|
9
9
|
const kb = (bytes) => bytes >= 1024 * 1024 ? `${(bytes / 1024 / 1024).toFixed(1)}MB` : `${Math.round(bytes / 1024)}KB`
|
|
10
10
|
|
|
11
|
-
const verifyText = ({ method, header }) =>
|
|
11
|
+
const verifyText = ({ method, header }) => header ? `${method} on ${header}` : method
|
|
12
12
|
|
|
13
13
|
const acceptText = (accept) => [
|
|
14
14
|
accept.header ? `${accept.header} in ${accept.values.join(', ')}` : null,
|
|
@@ -49,7 +49,7 @@ function renderHook (hook) {
|
|
|
49
49
|
console.log(` bounds ${kb(hook.maxBytes)} a request · ${hook.perHour} turns an hour · ${hook.maxWait ? `waits up to ${durationText(hook.maxWait)} · ${hook.perDay} triage cells a day` : 'released at once'}`)
|
|
50
50
|
if (hook.owner) {
|
|
51
51
|
const { plugin, name, timeoutMs, attach, reads } = hook.owner
|
|
52
|
-
console.log(` router ${plugin}/${name}, the owner's: attaches up to ${attach.files} files and ${kb(attach.bytes)} within ${durationText(timeoutMs)}${reads.length ? `, reading ${reads.join(', ')}` : ''}`)
|
|
52
|
+
console.log(` router ${plugin}/${name}, the owner's: attaches up to ${attach.files} files and ${kb(attach.bytes)} within ${durationText(timeoutMs)}${reads === 'spore' ? ', reading what the spore\'s reads: grant' : reads.length ? `, reading ${reads.join(', ')}` : ''}`)
|
|
53
53
|
}
|
|
54
54
|
for (const spore of hook.spores) {
|
|
55
55
|
console.log(`\n${sporeLine(spore, spore.name.length)}`)
|