Files
Netcatty/examples/plugins/database-host/host.js
T
陈大猫 d4a39ad2c6 feat(plugins): add bounded SSH host byte streams (network.hostStream) (#4297)
* feat(plugins): add bounded SSH host byte streams (network.hostStream)

* fix(plugins): route plugin-stream SSH host-key verification and cancel on abort
2026-11-23 18:42:03 +08:00

17 lines
612 B
JavaScript

import { registerHostDomView } from '@netcatty/plugin-sdk/host-dom';
import plugin from './index.js';
import { mount } from './view.js';
import html from './view.html';
import css from './view.css';
import manifest from './netcatty.plugin.json';
export default {
async activate(context) {
await plugin.activate(context);
for (const view of manifest.contributes.views) context.subscriptions.add(registerHostDomView(context.views, view.id, (root, stateScope) => {
root.innerHTML = html;
return mount(root, context, view.id, stateScope);
}, css));
},
deactivate: plugin.deactivate,
};