embark/tsconfig.json
Pascal Precht 947ea23c35
refactor(stack/proxy): make rpc-manager stack component
This commit refactors the `rpc-manager` to be a stack component and therefore
making it available to a variaty of plugins that might need access to its APIs
so they can register new RPC interceptors.

RpcModifiers have been renamed to `rpc-interceptors` and extracted from the `rpc-manager`
source into their own plugin. The reason for the renaming was that modifiers aren't always
modifying RPC APIs, but potentially introduce brand new ones.

There are a bunch of new APIs that can be used to register new RPC APIs:

```
events.request('rpc:request:interceptor:register', 'method_name',  requestInterceptorFn);
events.request('rpc:response:interceptor:register', 'method_name',  responseInterceptorFn);

function requestInterceptorFn(params: ProxyRequestParams<T>) {
  // mutate `params` here
  return params;
}

function responseInterceptorFn(params: ProxyResponseParams<T, S>) {
  // mutate `params` here
  return params;
}
```

A few things to note here:

- `method_name` is either `string`, `string[]`, or `Regex`. This make registering custom RPC
  APIs extremely flexible.
- A `requestInterceptorFn()` gets access to `ProxyRequestParams<T>` where `T` is the type of the
  params being send to the RPC API.
- A `responseInterceptorFn()` gets access to `ProxyResponseParams<T, S>` where `T` is the type of the
  original request parameters and `S` the type of the response coming from the RPC API.

These APIs are used by all `rpc-interceptors` and can be used the same way by any oother plugin
that aims to create new or intercept existing APIs.
2020-04-09 12:25:37 +02:00

210 lines
3.7 KiB
JSON

{
"files": [],
"references": [
{
"path": "packages/cockpit/api-client"
},
{
"path": "packages/core/code-runner"
},
{
"path": "packages/core/console"
},
{
"path": "packages/core/core"
},
{
"path": "packages/core/engine"
},
{
"path": "packages/core/i18n"
},
{
"path": "packages/core/logger"
},
{
"path": "packages/core/reset"
},
{
"path": "packages/core/utils"
},
{
"path": "packages/embark"
},
{
"path": "packages/embarkjs/embarkjs"
},
{
"path": "packages/embarkjs/ens"
},
{
"path": "packages/embarkjs/ipfs"
},
{
"path": "packages/embarkjs/snark"
},
{
"path": "packages/embarkjs/swarm"
},
{
"path": "packages/embarkjs/web3"
},
{
"path": "packages/embarkjs/whisper"
},
{
"path": "packages/plugins/accounts-manager"
},
{
"path": "packages/plugins/basic-pipeline"
},
{
"path": "packages/plugins/coverage"
},
{
"path": "packages/plugins/debugger"
},
{
"path": "packages/plugins/deploy-tracker"
},
{
"path": "packages/plugins/embarkjs"
},
{
"path": "packages/plugins/ens"
},
{
"path": "packages/plugins/ethereum-blockchain-client"
},
{
"path": "packages/plugins/ganache"
},
{
"path": "packages/plugins/geth"
},
{
"path": "packages/plugins/graph"
},
{
"path": "packages/plugins/ipfs"
},
{
"path": "packages/plugins/mocha-tests"
},
{
"path": "packages/plugins/nethermind"
},
{
"path": "packages/plugins/parity"
},
{
"path": "packages/plugins/plugin-cmd"
},
{
"path": "packages/plugins/profiler"
},
{
"path": "packages/plugins/quorum"
},
{
"path": "packages/plugins/rpc-interceptors"
},
{
"path": "packages/plugins/scaffolding"
},
{
"path": "packages/plugins/scripts-runner"
},
{
"path": "packages/plugins/snark"
},
{
"path": "packages/plugins/solc"
},
{
"path": "packages/plugins/solidity"
},
{
"path": "packages/plugins/solidity-tests"
},
{
"path": "packages/plugins/specialconfigs"
},
{
"path": "packages/plugins/suggestions"
},
{
"path": "packages/plugins/swarm"
},
{
"path": "packages/plugins/transaction-logger"
},
{
"path": "packages/plugins/transaction-tracker"
},
{
"path": "packages/plugins/vyper"
},
{
"path": "packages/plugins/web3"
},
{
"path": "packages/plugins/whisper-geth"
},
{
"path": "packages/plugins/whisper-parity"
},
{
"path": "packages/stack/api"
},
{
"path": "packages/stack/authenticator"
},
{
"path": "packages/stack/blockchain"
},
{
"path": "packages/stack/communication"
},
{
"path": "packages/stack/compiler"
},
{
"path": "packages/stack/contracts-manager"
},
{
"path": "packages/stack/deployment"
},
{
"path": "packages/stack/library-manager"
},
{
"path": "packages/stack/namesystem"
},
{
"path": "packages/stack/pipeline"
},
{
"path": "packages/stack/process-logs-api-manager"
},
{
"path": "packages/stack/proxy"
},
{
"path": "packages/stack/storage"
},
{
"path": "packages/stack/test-runner"
},
{
"path": "packages/stack/watcher"
},
{
"path": "packages/stack/webserver"
},
{
"path": "packages/utils/testing"
}
]
}