mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 02:02:42 +00:00
* feat(plugins): enforce declared Paseo version requirements Treat manifests without a Paseo requirement as pre-0.8 plugins so the first breaking plugin release offers an explicit migration path. Check the daemon and app independently before plugin execution, and preserve installed Git revisions when updates are incompatible. * fix(nix): refresh dependency hash for plugin requirements * refactor(plugins): validate test manifest inputs and name compatibility input
17 lines
583 B
TypeScript
17 lines
583 B
TypeScript
import { expect, it } from "vitest";
|
|
import { renderError, toCommandError } from "./index.js";
|
|
|
|
it("preserves the message of an Error with an RPC code in JSON output", () => {
|
|
const error = Object.assign(new Error("Plugin requires Paseo >=0.8.0. Your daemon is 0.7.2."), {
|
|
code: "handler_error",
|
|
requestId: "request-1",
|
|
});
|
|
expect(JSON.parse(renderError(toCommandError(error), { format: "json" }))).toEqual({
|
|
error: {
|
|
code: "handler_error",
|
|
requestId: "request-1",
|
|
message: "Plugin requires Paseo >=0.8.0. Your daemon is 0.7.2.",
|
|
},
|
|
});
|
|
});
|