mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
7a47187e37
* feat(plugins): add isolated plugin host runtime * test(plugins): build runtime dependencies before tests * fix(plugins): harden runtime lifecycle and recovery * fix(plugins): harden runtime extension boundaries * fix(plugins): enforce runtime integrity boundaries * fix(plugins): await utility process exit * fix(plugins): harden utility process containment * fix(plugins): close runtime recovery gaps * fix(plugins): harden runtime lifecycle boundaries
12 lines
328 B
JavaScript
12 lines
328 B
JavaScript
let mappings = new Map();
|
|
|
|
export function initialize(data) {
|
|
mappings = new Map(Object.entries(data?.mappings ?? {}));
|
|
}
|
|
|
|
export function resolve(specifier, context, nextResolve) {
|
|
const mapped = mappings.get(specifier);
|
|
if (mapped) return { url: mapped, shortCircuit: true };
|
|
return nextResolve(specifier, context);
|
|
}
|