Updates
This commit is contained in:
+37
-10
@@ -130,17 +130,43 @@ autonomous "build Pear app → publish to my store" workflows.
|
||||
ctx.console.log('pear — Pear development tools (ctx.pear surface)')
|
||||
ctx.console.log('Bare OS version of selected Pear runtime packages.')
|
||||
ctx.console.log('')
|
||||
|
||||
const bareModulesEnabled = !ctx.env || (ctx.env.BARE_OS_BARE_MODULES !== '0' && ctx.env.BARE_OS_BARE_MODULES !== 'false')
|
||||
|
||||
if (ctx.pear && typeof ctx.pear === 'object') {
|
||||
const keys = Object.keys(ctx.pear).sort()
|
||||
ctx.console.log(`Exposed on ctx.pear (${keys.length} packages):`)
|
||||
for (const k of keys) {
|
||||
const val = ctx.pear[k]
|
||||
const type = typeof val
|
||||
ctx.console.log(` ${k.padEnd(20)} ${type}`)
|
||||
if (keys.length > 0) {
|
||||
ctx.console.log(`Exposed on ctx.pear (${keys.length} packages):`)
|
||||
for (const k of keys) {
|
||||
const val = ctx.pear[k]
|
||||
const type = typeof val
|
||||
ctx.console.log(` ${k.padEnd(20)} ${type}`)
|
||||
}
|
||||
} else {
|
||||
ctx.console.log('ctx.pear exists but is empty.')
|
||||
ctx.console.log('')
|
||||
if (!bareModulesEnabled) {
|
||||
ctx.console.log('Reason: BARE_OS_BARE_MODULES is disabled.')
|
||||
} else {
|
||||
ctx.console.log('Reason: No Pear packages were successfully imported during boot.')
|
||||
ctx.console.log(' This usually means the packages (pear-build, pear-bundle, pear-ref)')
|
||||
ctx.console.log(' are not installed in the booter\'s node_modules.')
|
||||
ctx.console.log('')
|
||||
ctx.console.log('Fix: On the machine running the booter/seeder, run:')
|
||||
ctx.console.log(' npm install')
|
||||
ctx.console.log(' Then rebuild and restage the image.')
|
||||
ctx.console.log('')
|
||||
ctx.console.log('Note: On developer machines the local mirror may provide them.')
|
||||
ctx.console.log(' On production servers they must come from npm (see optionalDependencies).')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ctx.console.log('ctx.pear is not currently populated (BARE_OS_BARE_MODULES may be disabled).')
|
||||
ctx.console.log('ctx.pear property is missing from the guest context.')
|
||||
if (!bareModulesEnabled) {
|
||||
ctx.console.log('BARE_OS_BARE_MODULES is disabled.')
|
||||
}
|
||||
}
|
||||
|
||||
ctx.console.log('')
|
||||
ctx.console.log('Run "pear list" for the same view.')
|
||||
}
|
||||
@@ -148,11 +174,13 @@ autonomous "build Pear app → publish to my store" workflows.
|
||||
async function cmdList() {
|
||||
if (!ctx.pear || typeof ctx.pear !== 'object') {
|
||||
ctx.console.log('ctx.pear is not available in this environment.')
|
||||
ctx.console.log('Run "pear info" for diagnostics.')
|
||||
return
|
||||
}
|
||||
const keys = Object.keys(ctx.pear).sort()
|
||||
if (keys.length === 0) {
|
||||
ctx.console.log('No packages currently exposed on ctx.pear.')
|
||||
ctx.console.log('ctx.pear exists but no packages loaded.')
|
||||
ctx.console.log('Run "pear info" for detailed reasons and fix instructions.')
|
||||
return
|
||||
}
|
||||
ctx.console.log(`ctx.pear — ${keys.length} package(s) available:\n`)
|
||||
@@ -213,9 +241,8 @@ autonomous "build Pear app → publish to my store" workflows.
|
||||
k.toLowerCase().includes('build') || k.toLowerCase().includes('bundle')
|
||||
))
|
||||
} else {
|
||||
ctx.console.log('pear stage / build: ctx.pear.pearBuild not yet available in this environment.')
|
||||
ctx.console.log('Current exposed packages on ctx.pear:')
|
||||
await cmdList()
|
||||
ctx.console.log('pear stage / build: ctx.pear.pearBuild not available.')
|
||||
ctx.console.log('Run "pear info" for status and instructions on making Pear build tooling available.')
|
||||
}
|
||||
break
|
||||
case 'init':
|
||||
|
||||
Reference in New Issue
Block a user