Split rpc augmentation (#4349)

* Split rpc augmentation

* CC

* Split augmentation trigger

* Exports
This commit is contained in:
Jaco
2021-12-18 13:15:15 +02:00
committed by GitHub
parent 6518166252
commit 6d1b9cbfb2
36 changed files with 365 additions and 49 deletions
+1
View File
@@ -34,6 +34,7 @@
"@babel/register": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@polkadot/api": "6.12.2-13",
"@polkadot/rpc-augment": "6.12.2-13",
"@polkadot/rpc-provider": "6.12.2-13",
"@polkadot/types": "6.12.2-13",
"@polkadot/types-codec": "6.12.2-13",
+1
View File
@@ -9,6 +9,7 @@ module.exports = {
'^@polkadot/api-base(.*)': './packages/api-base/src\\1',
'^@polkadot/api-derive(.*)': './packages/api-derive/src\\1',
'^@polkadot/api(.*)': './packages/api/src/\\1',
'^@polkadot/rpc-augment(.*)': './packages/rpc-augment/src\\1',
'^@polkadot/rpc-core(.*)': './packages/rpc-core/src\\1',
'^@polkadot/rpc-provider(.*)': './packages/rpc-provider/src\\1',
'^@polkadot/types-codec(.*)': './packages/types-codec/src\\1',
+2 -2
View File
@@ -135,7 +135,7 @@ export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Rec
types: Object.keys(imports.localTypes[packagePath])
})),
{
file: '@polkadot/rpc-core/types',
file: '@polkadot/rpc-augment/types',
types: ['AugmentedRpc']
}
]
@@ -143,7 +143,7 @@ export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Rec
});
}
export function generateDefaultRpc (dest = 'packages/api-augment/src/augment/rpc.ts', extraTypes: ExtraTypes = {}): void {
export function generateDefaultRpc (dest = 'packages/rpc-augment/src/augment/rpc.ts', extraTypes: ExtraTypes = {}): void {
const { registry } = initMeta(undefined, extraTypes);
generateRpcTypes(
+1 -1
View File
@@ -2,7 +2,7 @@
{{{ importsRelative }}}
declare module '@polkadot/rpc-core/types.jsonrpc' {
declare module '@polkadot/rpc-augment/rpc' {
{{{ importsPackage }}}
export interface RpcInterface {