Fix pear
This commit is contained in:
@@ -97,47 +97,46 @@ async function cmdInit(ctx, targetDir = '.') {
|
||||
}
|
||||
}
|
||||
|
||||
export async function main(ctx, argv = []) {
|
||||
const sub = (argv[1] || 'help').toLowerCase()
|
||||
// The coreutils runner executes this file body with `ctx` in scope.
|
||||
// We run the command logic directly at the bottom (consistent with other commands like appstore).
|
||||
|
||||
switch (sub) {
|
||||
case 'help':
|
||||
case '--help':
|
||||
case '-h':
|
||||
printHelp(argv[0] || 'pear')
|
||||
break
|
||||
case 'info':
|
||||
await cmdInfo(ctx)
|
||||
break
|
||||
case 'list':
|
||||
case 'ls':
|
||||
await cmdList(ctx)
|
||||
break
|
||||
case 'stage':
|
||||
case 'build':
|
||||
const target = argv[2] || '.'
|
||||
if (ctx.pear && ctx.pear.pearBuild) {
|
||||
console.log(`Attempting stage of ${target} using ctx.pear.pearBuild (early integration)...`)
|
||||
try {
|
||||
// In a fuller implementation this would call the build API with proper options.
|
||||
// For now we surface that the capability exists on ctx.pear.
|
||||
console.log('ctx.pear.pearBuild is available. Full stage pipeline landing in upcoming plan items.')
|
||||
console.log('Exposed Pear build surface:', Object.keys(ctx.pear).filter(k => k.toLowerCase().includes('build') || k.toLowerCase().includes('bundle')))
|
||||
} catch (e) {
|
||||
console.error('Stage attempt error:', e?.message || e)
|
||||
}
|
||||
} else {
|
||||
console.log('pear stage / build: advanced integration in progress (ctx.pear.pearBuild available).')
|
||||
console.log('Current exposed packages on ctx.pear:')
|
||||
await cmdList(ctx)
|
||||
const sub = (typeof argv !== 'undefined' && argv[1] ? argv[1] : 'help').toLowerCase()
|
||||
|
||||
switch (sub) {
|
||||
case 'help':
|
||||
case '--help':
|
||||
case '-h':
|
||||
printHelp(typeof argv !== 'undefined' ? argv[0] : 'pear')
|
||||
break
|
||||
case 'info':
|
||||
await cmdInfo(ctx)
|
||||
break
|
||||
case 'list':
|
||||
case 'ls':
|
||||
await cmdList(ctx)
|
||||
break
|
||||
case 'stage':
|
||||
case 'build':
|
||||
const target = (typeof argv !== 'undefined' ? argv[2] : null) || '.'
|
||||
if (ctx.pear && ctx.pear.pearBuild) {
|
||||
console.log(`Attempting stage of ${target} using ctx.pear.pearBuild (early integration)...`)
|
||||
try {
|
||||
console.log('ctx.pear.pearBuild is available. Full stage pipeline landing in upcoming plan items.')
|
||||
console.log('Exposed Pear build surface:', Object.keys(ctx.pear).filter(k => k.toLowerCase().includes('build') || k.toLowerCase().includes('bundle')))
|
||||
} catch (e) {
|
||||
console.error('Stage attempt error:', e?.message || e)
|
||||
}
|
||||
break
|
||||
case 'init':
|
||||
await cmdInit(ctx, argv[2])
|
||||
break
|
||||
default:
|
||||
console.error(`Unknown subcommand: ${sub}`)
|
||||
printHelp(argv[0] || 'pear')
|
||||
break
|
||||
}
|
||||
} else {
|
||||
console.log('pear stage / build: advanced integration in progress (ctx.pear.pearBuild available).')
|
||||
console.log('Current exposed packages on ctx.pear:')
|
||||
await cmdList(ctx)
|
||||
}
|
||||
break
|
||||
case 'init':
|
||||
await cmdInit(ctx, (typeof argv !== 'undefined' ? argv[2] : null))
|
||||
break
|
||||
default:
|
||||
console.error(`Unknown subcommand: ${sub}`)
|
||||
printHelp(typeof argv !== 'undefined' ? argv[0] : 'pear')
|
||||
break
|
||||
}
|
||||
@@ -186,47 +186,46 @@ async function cmdInit(ctx, targetDir = '.') {
|
||||
}
|
||||
}
|
||||
|
||||
export async function main(ctx, argv = []) {
|
||||
const sub = (argv[1] || 'help').toLowerCase()
|
||||
// The coreutils runner executes this file body with `ctx` in scope.
|
||||
// We run the command logic directly at the bottom (consistent with other commands like appstore).
|
||||
|
||||
switch (sub) {
|
||||
case 'help':
|
||||
case '--help':
|
||||
case '-h':
|
||||
printHelp(argv[0] || 'pear')
|
||||
break
|
||||
case 'info':
|
||||
await cmdInfo(ctx)
|
||||
break
|
||||
case 'list':
|
||||
case 'ls':
|
||||
await cmdList(ctx)
|
||||
break
|
||||
case 'stage':
|
||||
case 'build':
|
||||
const target = argv[2] || '.'
|
||||
if (ctx.pear && ctx.pear.pearBuild) {
|
||||
console.log(`Attempting stage of ${target} using ctx.pear.pearBuild (early integration)...`)
|
||||
try {
|
||||
// In a fuller implementation this would call the build API with proper options.
|
||||
// For now we surface that the capability exists on ctx.pear.
|
||||
console.log('ctx.pear.pearBuild is available. Full stage pipeline landing in upcoming plan items.')
|
||||
console.log('Exposed Pear build surface:', Object.keys(ctx.pear).filter(k => k.toLowerCase().includes('build') || k.toLowerCase().includes('bundle')))
|
||||
} catch (e) {
|
||||
console.error('Stage attempt error:', e?.message || e)
|
||||
}
|
||||
} else {
|
||||
console.log('pear stage / build: advanced integration in progress (ctx.pear.pearBuild available).')
|
||||
console.log('Current exposed packages on ctx.pear:')
|
||||
await cmdList(ctx)
|
||||
const sub = (typeof argv !== 'undefined' && argv[1] ? argv[1] : 'help').toLowerCase()
|
||||
|
||||
switch (sub) {
|
||||
case 'help':
|
||||
case '--help':
|
||||
case '-h':
|
||||
printHelp(typeof argv !== 'undefined' ? argv[0] : 'pear')
|
||||
break
|
||||
case 'info':
|
||||
await cmdInfo(ctx)
|
||||
break
|
||||
case 'list':
|
||||
case 'ls':
|
||||
await cmdList(ctx)
|
||||
break
|
||||
case 'stage':
|
||||
case 'build':
|
||||
const target = (typeof argv !== 'undefined' ? argv[2] : null) || '.'
|
||||
if (ctx.pear && ctx.pear.pearBuild) {
|
||||
console.log(`Attempting stage of ${target} using ctx.pear.pearBuild (early integration)...`)
|
||||
try {
|
||||
console.log('ctx.pear.pearBuild is available. Full stage pipeline landing in upcoming plan items.')
|
||||
console.log('Exposed Pear build surface:', Object.keys(ctx.pear).filter(k => k.toLowerCase().includes('build') || k.toLowerCase().includes('bundle')))
|
||||
} catch (e) {
|
||||
console.error('Stage attempt error:', e?.message || e)
|
||||
}
|
||||
break
|
||||
case 'init':
|
||||
await cmdInit(ctx, argv[2])
|
||||
break
|
||||
default:
|
||||
console.error(`Unknown subcommand: ${sub}`)
|
||||
printHelp(argv[0] || 'pear')
|
||||
break
|
||||
}
|
||||
} else {
|
||||
console.log('pear stage / build: advanced integration in progress (ctx.pear.pearBuild available).')
|
||||
console.log('Current exposed packages on ctx.pear:')
|
||||
await cmdList(ctx)
|
||||
}
|
||||
break
|
||||
case 'init':
|
||||
await cmdInit(ctx, (typeof argv !== 'undefined' ? argv[2] : null))
|
||||
break
|
||||
default:
|
||||
console.error(`Unknown subcommand: ${sub}`)
|
||||
printHelp(typeof argv !== 'undefined' ? argv[0] : 'pear')
|
||||
break
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema": 2,
|
||||
"profileId": "bare-os-posix-like",
|
||||
"generatedAt": "2026-05-26T21:52:36.328Z",
|
||||
"generatedAt": "2026-05-26T21:57:58.462Z",
|
||||
"note": "Sparse POSIX Issue 7 coverage hints for /bin utilities. Omitted command names are not yet profiled here.",
|
||||
"commandIndex": [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"atMs": 1779832356327,
|
||||
"atMs": 1779832678462,
|
||||
"commands": [
|
||||
"agent",
|
||||
"appctl",
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user