message: fix: remove cherry-pick debris
diff: @@ -4,8 +4,7 @@ const { validate } = require("@patternplate/validate-config");
  const WebSocket = require("ws");
  const loadConfig = require("@patternplate/load-config");
  -const createCompiler = require("./compiler");
  -const { PluginApi } = require("./plugin-api");
  +const createCompiler = require("./create-compiler");
  const debug = require("util").debuglog("PATTERNPLATE");
  @@ -24,56 +23,6 @@ module.exports.createSubscription = function createSubscription(context) {
  }
  console.error(err);
  });
  -
  - ws.on("message", async envelope => {
  - const message = ARSON.parse(envelope);
  - switch (message.type) {
  - case "plugin": {
  - const plugins = Array.isArray(config.plugins)
  - ? await loadPlugins(config.plugins, { cwd, validate: true })
  - : [];
  -
  - const target = plugins.find(p => p.id === message.payload.plugin);
  -
  - if (!target) {
  - console.log(
  - `Received message for unknown plugin: ${message.payload.id}`
  - );
  - return;
  - }
  -
  - const { plugin } = target;
  -
  - if (!plugin.commands.hasOwnProperty(message.payload.command)) {
  - console.log(
  - `Received unknown command: ${
  - message.payload.command
  - } for plugin ${target.id}. Available commands: ${Object.keys(
  - target.plugin.commands || {}
  - ).join(", ")}`
  - );
  - return;
  - }
  -
  - const command = plugin.commands[message.payload.command];
  -
  - if (typeof command.command !== "function") {
  - console.log(
  - `Command: ${message.payload.command} for plugin ${
  - target.id
  - } is malformed.`
  - );
  - return;
  - }
  -
  - const address = server.address();
  - command.command(PluginApi.from(message.state, { config, cwd, address }));
  - return;
  - }
  - default:
  - console.log(`Received unknown message from client: ${message.type}`);
  - }
  - });
  });
  const send = getSender(wss, handler);
  