feat: move snippets, keybinding actions and macros out of core into plugins

This commit is contained in:
LukeGus committed 2026-09-29 11:39:14 -05:00
1 parent d9bba10612
commit e0c30a4e6f
262 files changed
+9091 -10744

No files matched your search

@@ -98,6 +98,28 @@ describe("snippets activate", () => {
expect(after).toHaveLength(0);
});
it("registers its host settings hooks and the variables helper", async () => {
server = await startServer();
const registry = server.mock.ctx.registry;
for (const key of [
"snippets.hostImportNormalizer",
"snippets.hostPayloadLegacy",
"snippets.hostSettingsSync",
]) {
expect(registry.consume(key), key).toBeDefined();
}
const variables = registry.consume<{
resolve: (c: string, h: { ip?: string } | null) => string;
extractInputs: (c: string) => Array<{ key: string }>;
}>("snippets.variables");
expect(variables?.resolve("ping $HOST", { ip: "10.0.0.1" })).toBe(
"ping 10.0.0.1",
);
expect(variables?.extractInputs("echo $INPUT_1")).toEqual([
{ key: "INPUT_1", label: "Input 1" },
]);
});
it("fails closed without db:own", async () => {
db = await createTestDb(pluginDir);
const mock = createMockCtx({