Fixes for pear bin

This commit is contained in:
2026-05-26 23:18:52 +00:00
parent d7b019d3c3
commit ab3f091671
33 changed files with 46116 additions and 1100 deletions
@@ -0,0 +1,19 @@
/**
* Pear-runtime-only ctx.pear host imports (pear-bundle → pear-ref).
* Statically imported from bare-os-ctx-bare.js so Pear registers the referrer;
* pear-bundle/pear-ref load only when globalThis.Pear is present (Bare-only runs skip).
*/
/** @type {Record<string, unknown>} */
export const pearCtxPearOnlyHostByPackage = {}
if (globalThis.Pear) {
const [pearBundleMod, pearRefMod] = await Promise.all([
import('pear-bundle'),
import('pear-ref')
])
pearCtxPearOnlyHostByPackage['pear-bundle'] =
pearBundleMod?.default !== undefined ? pearBundleMod.default : pearBundleMod
pearCtxPearOnlyHostByPackage['pear-ref'] =
pearRefMod?.default !== undefined ? pearRefMod.default : pearRefMod
}