Split rpc augmentation (#4349)
* Split rpc augmentation * CC * Split augmentation trigger * Exports
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{{{ importsRelative }}}
|
||||
|
||||
declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
declare module '@polkadot/rpc-augment/rpc' {
|
||||
{{{ importsPackage }}}
|
||||
|
||||
export interface RpcInterface {
|
||||
|
||||
Reference in New Issue
Block a user