Files
bare-operating-system/packages/bare-os-booter/lib/bare-os-ctx-pear-host-pear-only.js
T
2026-05-26 23:18:52 +00:00

20 lines
720 B
JavaScript

/**
* 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
}