Extensions: provide `PhylumApi` mocks for testing extensions through the CLI
We need to test extensions against API mocks, and figure out whether it is best to try and reuse the mocks already present in other tests or whether we may need to expand those/go in a different direction.
I'm not sure we need a complete mock here (at least not for MVP). We definitely need a test that executes something with the deno API though (as @cd-work mentioned here)
Maybe that just means updating our sample extension so that it calls back into the rust code to do something trivial?
Maybe that just means updating our sample extension so that it calls back into the rust code to do something trivial?
In this way we can test that we can reach that functionality (which sort of just works anyway) but we won't get a proper idea of the coverage for the serialization layer which is what concerns me -- i.e. having a solid, well-understood and non-surprising translation between V8 types and Rust types so that the API can cooperate effectively. This should also just work on the Rust side but I don't have enough experience with Deno to tell what caveats there may be in forming types on that side.