Added missing locale command support:

packages/bare-os-coreutils/src/locale.js
registered in packages/bare-os-coreutils/lib/commands.mjs
Fixed trustctl generated runtime mismatch:

added preamble wiring in packages/bare-os-coreutils/build.mjs (trustctl: ['p2p-suite.js'])
Improved help behavior:

packages/bare-os-coreutils/src/ssh-keygen.js (help, -h, --help, -?)
packages/bare-os-coreutils/src/oidc-publish.js (help detection across args)
Improved procstat empty-state UX while preserving JSON output:

packages/bare-os-coreutils/src/procstat.js
adds sourcePath and additive hint when process table is empty
Enforced stricter network behavior:

packages/bare-os-coreutils/src/whois.js
prefers ctx.httpFetch, adds bounded timeout via AbortController
clearer timeout/policy/offline error mapping
packages/bare-os-coreutils/src/telnet.js
strict-close behavior by default
--strict-close / --no-strict-close
BARE_OS_TELNET_STRICT_CLOSE env override
Implemented expected-item UX/compat updates:

packages/bare-os-coreutils/src/iconv.js: added -l/--list, improved encoding-pair error messaging
packages/bare-os-coreutils/src/crontab.js: clearer -l empty-file message
packages/bare-os-coreutils/src/getconf.js: added PAGE_SIZE / PAGESIZE aliases
packages/bare-os-coreutils/src/nproc.js: clarified help text
packages/bare-os-coreutils/src/time.js: clarified output comments/behavior
This commit is contained in:
Raven Scott
2026-04-27 08:22:57 -04:00
parent beaff551cf
commit 237e0ef63a
84 changed files with 1590 additions and 539 deletions
+13 -7
View File
@@ -152,12 +152,17 @@ function encodeFromString(s, enc, b4a) {
}
async function run(ctx, argv) {
const encList = ['utf-8', 'iso-8859-1', 'utf-16le', 'utf-16be']
let fromEnc = 'utf-8'
let toEnc = 'utf-8'
let file = null
for (let i = 1; i < argv.length; i++) {
const a = argv[i]
if (a === '--') continue
if (a === '-l' || a === '--list') {
ctx.console.log(encList.join('\n'))
return
}
if (a === '-f' || a === '--from-code') {
i++
if (i >= argv.length) {
@@ -187,15 +192,16 @@ async function run(ctx, argv) {
break
}
const supported = new Set([
'utf-8',
'iso-8859-1',
'utf-16le',
'utf-16be'
])
const supported = new Set(encList)
if (!supported.has(fromEnc) || !supported.has(toEnc)) {
ctx.console.error(
'iconv: unsupported encoding pair (supported: utf-8, iso-8859-1, utf-16le, utf-16be)'
'iconv: unsupported encoding pair ' +
fromEnc +
' -> ' +
toEnc +
' (supported: ' +
encList.join(', ') +
'; use iconv -l)'
)
ctx.exitCode = 1
return