import {
  Plugable
} from "./chunk-OCBQBG4J.mjs";

// src/proxy.ts
import debug from "debug";
var log = debug("@tomrpc/core/fn");
var ProxyDefaultConfig = {
  proxy: {
    inject: "before",
    //init | load | before | after
    before: []
  }
};
var Proxy = class extends Plugable {
  constructor(cfg) {
    super(Object.assign(ProxyDefaultConfig, cfg));
  }
  proxy() {
    return async (ctx, next) => {
      log("proxy default");
      await next();
      log("proxy default end");
    };
  }
};

export {
  Proxy
};
