From f2c8eed25be78681833a927b00cd2b493cdfdfac Mon Sep 17 00:00:00 2001 From: Gefei Hou Date: Mon, 16 Dec 2024 10:55:19 +0800 Subject: [PATCH] Reorganized and separate all and scoped client --- packages/telescope/src/builder.ts | 7 +- .../src/generators/create-lcd-client-all.ts | 139 ++++++++++++++ .../generators/create-lcd-client-scoped.ts | 101 ---------- .../generators/create-rpc-msg-client-all.ts | 167 +++++++++++++++++ .../create-rpc-msg-client-scoped.ts | 89 --------- .../generators/create-rpc-query-client-all.ts | 173 ++++++++++++++++++ .../create-rpc-query-client-scoped.ts | 100 ---------- .../generators/create-lcd-client-all.d.ts | 3 + .../generators/create-rpc-msg-client-all.d.ts | 3 + .../create-rpc-query-client-all.d.ts | 3 + 10 files changed, 494 insertions(+), 291 deletions(-) create mode 100644 packages/telescope/src/generators/create-lcd-client-all.ts create mode 100644 packages/telescope/src/generators/create-rpc-msg-client-all.ts create mode 100644 packages/telescope/src/generators/create-rpc-query-client-all.ts create mode 100644 packages/telescope/types/generators/create-lcd-client-all.d.ts create mode 100644 packages/telescope/types/generators/create-rpc-msg-client-all.d.ts create mode 100644 packages/telescope/types/generators/create-rpc-query-client-all.d.ts diff --git a/packages/telescope/src/builder.ts b/packages/telescope/src/builder.ts index 61ae063512..fb120f8ac2 100644 --- a/packages/telescope/src/builder.ts +++ b/packages/telescope/src/builder.ts @@ -14,8 +14,11 @@ import { plugin as createRegistries } from './generators/create-registries'; import { plugin as createLCDClients } from './generators/create-lcd-clients'; import { plugin as createAggregatedLCDClient } from './generators/create-aggregated-lcd-client'; import { plugin as createLCDClientsScoped } from './generators/create-lcd-client-scoped'; +import { plugin as createLCDClientsAll } from './generators/create-lcd-client-all'; import { plugin as createRPCQueryClientsScoped } from './generators/create-rpc-query-client-scoped'; +import { plugin as createRPCQueryClientsAll } from './generators/create-rpc-query-client-all'; import { plugin as createRPCMsgClientsScoped } from './generators/create-rpc-msg-client-scoped'; +import { plugin as createRPCMsgClientsAll } from './generators/create-rpc-msg-client-all'; import { plugin as createRPCQueryClients } from './generators/create-rpc-query-clients'; import { plugin as createRPCMsgClients } from './generators/create-rpc-msg-clients'; import { plugin as createQueryFuncs } from './generators/create-query-funcs'; @@ -190,10 +193,12 @@ export class TelescopeBuilder { // post run plugins bundles.forEach((bundler) => { + createLCDClientsAll(this, bundler); createLCDClientsScoped(this, bundler); + createRPCQueryClientsAll(this, bundler); createRPCQueryClientsScoped(this, bundler); + createRPCMsgClientsAll(this,bundler); createRPCMsgClientsScoped(this, bundler); - createBundle(this, bundler); }); diff --git a/packages/telescope/src/generators/create-lcd-client-all.ts b/packages/telescope/src/generators/create-lcd-client-all.ts new file mode 100644 index 0000000000..23a253f76f --- /dev/null +++ b/packages/telescope/src/generators/create-lcd-client-all.ts @@ -0,0 +1,139 @@ +import * as dotty from 'dotty'; +import { getNestedProto, isRefIncluded, createEmptyProtoRef } from '@cosmology/proto-parser'; +import { join } from 'path'; +import { TelescopeBuilder } from '../builder'; +import { createScopedLCDFactory } from '@cosmology/ast'; +import { ALLOWED_RPC_SERVICES, ProtoRef } from '@cosmology/types'; +import { fixlocalpaths, getRelativePath } from '../utils'; +import { Bundler } from '../bundler'; +import { TelescopeParseContext } from '../build'; +import { aggregateImports, getImportStatements } from '../imports'; + +export const plugin = ( + builder: TelescopeBuilder, + bundler: Bundler +) => { + + // if not enabled, exit + if (!builder.options?.lcdClients?.enabled) { + return; + } + + // if no scopes, do them all! + if ( + !builder.options.lcdClients.scoped || + !builder.options.lcdClients.scoped.length || + !builder.options.lcdClients.scopedIsExclusive + ) { + return createAllLCDBundles( + builder, + bundler + ); + } +}; + +const getFileName = (dir, filename) => { + const localname = join(dir, filename ?? 'lcd.ts'); + if (localname.endsWith('.ts')) return localname; + return localname + '.ts'; +}; + +const createAllLCDBundles = ( + builder: TelescopeBuilder, + bundler: Bundler +) => { + + if (!builder.options.lcdClients.bundle) return; + + const dir = bundler.bundle.base; + const filename = 'lcd.ts' + + // refs with services + const refs = builder.store.getProtos().filter((ref: ProtoRef) => { + const proto = getNestedProto(ref.traversed); + //// Anything except Msg Service OK... + const allowedRpcServices = builder.options.rpcClients.enabledServices.filter(a => a !== 'Msg'); + const found = allowedRpcServices.some(svc => { + return proto?.[svc] && + proto[svc]?.type === 'Service' + }); + + if (!found) { + return; + } + + return true; + }); + + const check = refs.filter((ref: ProtoRef) => { + const [base] = ref.proto.package.split('.'); + return base === bundler.bundle.base; + }); + + if (!check.length) { + // if there are no services + // exit the plugin + return; + } + + const packages = refs.reduce((m, ref: ProtoRef) => { + const [base] = ref.proto.package.split('.'); + if (base === 'cosmos' || base === bundler.bundle.base) + return [...new Set([...m, ref.proto.package])]; + return m; + }, []); + + const methodName = 'createLCDClient' + const localname = getFileName(dir, filename); + + const obj = {}; + builder.lcdClients.forEach(file => { + + // ADD all option + // which defaults to including cosmos + // and defaults to base for each + // if (!packages.includes(file.package)) { + if (!isRefIncluded(createEmptyProtoRef(file.package, file.proto), { + packages, + })) { + return; + } + + const f = localname; + const f2 = file.localname; + const importPath = getRelativePath(f, f2); + dotty.put(obj, file.package, importPath); + }); + + + const ctx = new TelescopeParseContext( + createEmptyProtoRef(dir, localname), + builder.store, + builder.options + ); + + const lcdast = createScopedLCDFactory( + ctx.proto, + obj, + methodName, + 'LCDQueryClient' // make option later + ); + + const imports = aggregateImports(ctx, {}, localname); + + const importStmts = getImportStatements( + localname, + [...fixlocalpaths(imports)], + builder.options + ); + + const prog = [] + .concat(importStmts) + .concat(lcdast); + + const writeFilename = bundler.getFilename(localname); + bundler.writeAst(prog, writeFilename); + + bundler.addToBundleToPackage(`${dir}.ClientFactory`, localname) + +}; \ No newline at end of file diff --git a/packages/telescope/src/generators/create-lcd-client-scoped.ts b/packages/telescope/src/generators/create-lcd-client-scoped.ts index 05611da442..80a783b283 100644 --- a/packages/telescope/src/generators/create-lcd-client-scoped.ts +++ b/packages/telescope/src/generators/create-lcd-client-scoped.ts @@ -19,30 +19,6 @@ export const plugin = ( return; } - // if no scopes, do them all! - if ( - !builder.options.lcdClients.scoped || - !builder.options.lcdClients.scoped.length - ) { - // TODO inefficient - // WE SHOULD NOT DO THIS IN A BUNDLER LOOP - // MAKE SEPARATE PLUGIN - return createAllLCDBundles( - builder, - bundler - ); - } - - if (!builder.options.lcdClients.scopedIsExclusive) { - // TODO inefficient - // WE SHOULD NOT DO THIS IN A BUNDLER LOOP - // MAKE SEPARATE PLUGIN - createAllLCDBundles( - builder, - bundler - ); - } - // we have scopes! builder.options.lcdClients.scoped.forEach(lcd => { if (lcd.dir !== bundler.bundle.base) return; @@ -131,80 +107,3 @@ const makeLCD = ( bundler.addToBundleToPackage(`${dir}.ClientFactory`, localname) } }; - -// TODO -/* - move all options for lcd into previous `lcd` prop and - clean up all these many options for one nested object full of options -*/ - -const createAllLCDBundles = ( - builder: TelescopeBuilder, - bundler: Bundler -) => { - - if (!builder.options.lcdClients.bundle) return; - - - // [x] loop through every bundle - // [x] if not cosmos, add all cosmos - // [x] call makeLCD - // [x] add to bundle - - const dir = bundler.bundle.base; - const filename = 'lcd.ts' - - /// - /// - /// - - // refs with services - const refs = builder.store.getProtos().filter((ref: ProtoRef) => { - const proto = getNestedProto(ref.traversed); - //// Anything except Msg Service OK... - const allowedRpcServices = builder.options.rpcClients.enabledServices.filter(a => a !== 'Msg'); - const found = allowedRpcServices.some(svc => { - return proto?.[svc] && - proto[svc]?.type === 'Service' - }); - - if (!found) { - return; - } - /// - - - return true; - }); - - const check = refs.filter((ref: ProtoRef) => { - const [base] = ref.proto.package.split('.'); - return base === bundler.bundle.base; - }); - - if (!check.length) { - // if there are no services - // exit the plugin - return; - } - - const packages = refs.reduce((m, ref: ProtoRef) => { - const [base] = ref.proto.package.split('.'); - if (base === 'cosmos' || base === bundler.bundle.base) - return [...new Set([...m, ref.proto.package])]; - return m; - }, []); - - makeLCD( - builder, - bundler, - { - dir, - filename, - packages, - addToBundle: true, - methodName: 'createLCDClient' - } - ); - -}; \ No newline at end of file diff --git a/packages/telescope/src/generators/create-rpc-msg-client-all.ts b/packages/telescope/src/generators/create-rpc-msg-client-all.ts new file mode 100644 index 0000000000..f66498d5fe --- /dev/null +++ b/packages/telescope/src/generators/create-rpc-msg-client-all.ts @@ -0,0 +1,167 @@ +import * as dotty from 'dotty'; +import { createEmptyProtoRef, getNestedProto } from '@cosmology/proto-parser'; +import { join } from 'path'; +import { TelescopeBuilder } from '../builder'; +import { createScopedRpcFactory, createScopedGrpcWebMsgFactory, createRpcMsgExtension, importStmt } from '@cosmology/ast'; +import { ProtoRef } from '@cosmology/types'; +import { fixlocalpaths, getRelativePath } from '../utils'; +import { Bundler } from '../bundler'; +import { aggregateImports, getDepsFromQueries, getImportStatements } from '../imports'; +import { TelescopeParseContext } from '../build'; +import { pascal } from 'case'; + +export const plugin = ( + builder: TelescopeBuilder, + bundler: Bundler +) => { + // if not enabled, exit + if (!builder.options?.rpcClients?.enabled) { + return; + } + + if (builder.options?.rpcClients?.inline) { + return; + } + + // if no scopes, do them all! + if ( + !builder.options.rpcClients.scoped || + !builder.options.rpcClients.scoped.length || + !builder.options.rpcClients.scopedIsExclusive + ) { + return makeAllRPCBundles( + builder, + bundler + ); + } +}; + +const getFileName = (dir, filename) => { + filename = filename.replace(/\.ts$/, ''); + const localname = join(dir, filename + '.tx'); + return localname + '.ts'; +}; + +const makeAllRPCBundles = ( + builder: TelescopeBuilder, + bundler: Bundler +) => { + + if (!builder.options.rpcClients.bundle) return; + + const dir = bundler.bundle.base; + const filename = 'rpc'; + + // refs with services + const refs = builder.store.getProtos().filter((ref: ProtoRef) => { + const proto = getNestedProto(ref.traversed); + if (!proto?.Msg || proto.Msg?.type !== 'Service') { + return; + } + return true; + }); + + const check = refs.filter((ref: ProtoRef) => { + const [base] = ref.proto.package.split('.'); + return base === bundler.bundle.base; + }); + + if (!check.length) { + // if there are no services + // exit the plugin + return; + } + + const packages = refs.reduce((m, ref: ProtoRef) => { + const [base] = ref.proto.package.split('.'); + if (base === 'cosmos' || base === bundler.bundle.base) + return [...new Set([...m, ref.proto.package])]; + return m; + }, []); + + const methodName = 'createRPCMsgClient' + const localname = getFileName(dir, filename ?? 'rpc'); + + const obj = {}; + builder.rpcMsgClients.forEach(file => { + + // ADD all option + // which defaults to including cosmos + // and defaults to base for each + if (!packages.includes(file.package)) { + return; + } + + const f = localname; + const f2 = file.localname; + const importPath = getRelativePath(f, f2); + dotty.put(obj, file.package, importPath); + }); + + const ctx = new TelescopeParseContext( + createEmptyProtoRef(dir, localname), + builder.store, + builder.options + ); + + let rpcast; + let msgExt: any = []; + let txRpcImport: any = []; + switch (builder.options?.rpcClients?.type) { + case "grpc-gateway": + case "tendermint": + ctx.proto.addUtil('Rpc'); + + rpcast = createScopedRpcFactory( + obj, + methodName, + 'MsgClientImpl', // make option later, + ctx.options + ); + + if (ctx.proto.pluginValue('env') === 'v-next' && ctx.proto.pluginValue('rpcClients.extensions') && ctx.proto.pluginValue('stargateClients.addGetTxRpc')) { + const txRpcName = 'getSigning' + pascal(bundler.bundle.base + 'TxRpc'); + + txRpcImport = importStmt([txRpcName], `./client${ctx.options.restoreImportExtension ?? ""}`) + + msgExt = createRpcMsgExtension(ctx.proto, txRpcName); + } + break; + case "grpc-web": + ctx.proto.addUtil('grpc'); + ctx.proto.addUtil('NodeHttpTransport'); + + rpcast = createScopedGrpcWebMsgFactory( + obj, + methodName, + 'MsgClientImpl', // make option later, + ctx.options + ); + break; + default: + break; + } + + const serviceImports = getDepsFromQueries( + ctx.queries, + localname + ); + + const imports = aggregateImports(ctx, serviceImports, localname); + + const importStmts = getImportStatements( + localname, + [...fixlocalpaths(imports)], + builder.options + ); + + const prog = [] + .concat(txRpcImport) + .concat(importStmts) + .concat(rpcast) + .concat(msgExt); + + const writeFilename = bundler.getFilename(localname); + bundler.writeAst(prog, writeFilename); + bundler.addToBundleToPackage(`${dir}.ClientFactory`, localname) +}; \ No newline at end of file diff --git a/packages/telescope/src/generators/create-rpc-msg-client-scoped.ts b/packages/telescope/src/generators/create-rpc-msg-client-scoped.ts index ad91c7acdb..ef6775d4f0 100644 --- a/packages/telescope/src/generators/create-rpc-msg-client-scoped.ts +++ b/packages/telescope/src/generators/create-rpc-msg-client-scoped.ts @@ -23,30 +23,6 @@ export const plugin = ( return; } - // if no scopes, do them all! - if ( - !builder.options.rpcClients.scoped || - !builder.options.rpcClients.scoped.length - ) { - // TODO inefficient - // WE SHOULD NOT DO THIS IN A BUNDLER LOOP - // MAKE SEPARATE PLUGIN - return makeAllRPCBundles( - builder, - bundler - ); - } - - if (!builder.options.rpcClients.scopedIsExclusive) { - // TODO inefficient - // WE SHOULD NOT DO THIS IN A BUNDLER LOOP - // MAKE SEPARATE PLUGIN - makeAllRPCBundles( - builder, - bundler - ); - } - // we have scopes! builder.options.rpcClients.scoped.forEach(rpc => { if (rpc.dir !== bundler.bundle.base) return; @@ -169,68 +145,3 @@ const makeRPC = ( bundler.addToBundleToPackage(`${dir}.ClientFactory`, localname) } }; - -// TODO -/* - move all options for rpc into previous `rpc` prop and - clean up all these many options for one nested object full of options -*/ - -const makeAllRPCBundles = ( - builder: TelescopeBuilder, - bundler: Bundler -) => { - - if (!builder.options.rpcClients.bundle) return; - - // [x] loop through every bundle - // [x] if not cosmos, add all cosmos - // [x] call makeRPC - - const dir = bundler.bundle.base; - const filename = 'rpc'; - - /// - /// - /// - - // refs with services - const refs = builder.store.getProtos().filter((ref: ProtoRef) => { - const proto = getNestedProto(ref.traversed); - if (!proto?.Msg || proto.Msg?.type !== 'Service') { - return; - } - return true; - }); - - const check = refs.filter((ref: ProtoRef) => { - const [base] = ref.proto.package.split('.'); - return base === bundler.bundle.base; - }); - - if (!check.length) { - // if there are no services - // exit the plugin - return; - } - - const packages = refs.reduce((m, ref: ProtoRef) => { - const [base] = ref.proto.package.split('.'); - if (base === 'cosmos' || base === bundler.bundle.base) - return [...new Set([...m, ref.proto.package])]; - return m; - }, []); - - makeRPC( - builder, - bundler, - { - dir, - filename, - packages, - addToBundle: true, - methodNameTx: 'createRPCMsgClient', - isAll: true - } - ); -}; \ No newline at end of file diff --git a/packages/telescope/src/generators/create-rpc-query-client-all.ts b/packages/telescope/src/generators/create-rpc-query-client-all.ts new file mode 100644 index 0000000000..f7859ae9f1 --- /dev/null +++ b/packages/telescope/src/generators/create-rpc-query-client-all.ts @@ -0,0 +1,173 @@ +import * as dotty from 'dotty'; +import { getNestedProto, isRefIncluded, createEmptyProtoRef } from '@cosmology/proto-parser'; +import { join } from 'path'; +import { TelescopeBuilder } from '../builder'; +import { createScopedRpcTmFactory, createScopedGrpcWebFactory, createScopedGrpcGatewayFactory } from '@cosmology/ast'; +import { ProtoRef } from '@cosmology/types'; +import { fixlocalpaths, getRelativePath } from '../utils'; +import { Bundler } from '../bundler'; +import { TelescopeParseContext } from '../build'; +import { aggregateImports, getDepsFromQueries, getImportStatements } from '../imports'; + +export const plugin = ( + builder: TelescopeBuilder, + bundler: Bundler +) => { + // if not enabled, exit + if (!builder.options?.rpcClients?.enabled) { + return; + } + + if (builder.options?.rpcClients?.inline) { + return; + } + + // if no scopes, do them all! + if ( + !builder.options.rpcClients.scoped || + !builder.options.rpcClients.scoped.length || + !builder.options.rpcClients.scopedIsExclusive + ) { + return makeAllRPCBundles( + builder, + bundler + ); + } + +}; + +const getFileName = (dir, filename) => { + filename = filename.replace(/\.ts$/, ''); + const localname = join(dir, filename + '.query'); + return localname + '.ts'; +}; + +const makeAllRPCBundles = ( + builder: TelescopeBuilder, + bundler: Bundler +) => { + + if (!builder.options.rpcClients.bundle) return; + + const dir = bundler.bundle.base; + const filename = 'rpc' + + // refs with services + const refs = builder.store.getProtos().filter((ref: ProtoRef) => { + const proto = getNestedProto(ref.traversed); + + //// Anything except Msg Service OK... + const allowedRpcServices = builder.options.rpcClients.enabledServices.filter(a => a !== 'Msg'); + const found = allowedRpcServices.some(svc => { + return proto?.[svc] && + proto[svc]?.type === 'Service' + }); + + if (!found) { + return; + } + + return true; + }); + + const check = refs.filter((ref: ProtoRef) => { + const [base] = ref.proto.package.split('.'); + return base === bundler.bundle.base; + }); + + if (!check.length) { + // if there are no services + // exit the plugin + return; + } + + const packages = refs.reduce((m, ref: ProtoRef) => { + const [base] = ref.proto.package.split('.'); + if (base === 'cosmos' || base === bundler.bundle.base) + return [...new Set([...m, ref.proto.package])]; + return m; + }, []); + + const methodName = 'createRPCQueryClient' + const localname = getFileName(dir, filename ?? 'rpc'); + + const obj = {}; + builder.rpcQueryClients.forEach(file => { + + // ADD all option + // which defaults to including cosmos + // and defaults to base for each + if (!isRefIncluded(createEmptyProtoRef(file.package, file.proto), { + packages, + })) { + return; + } + + const f = localname; + const f2 = file.localname; + const importPath = getRelativePath(f, f2); + dotty.put(obj, file.package, importPath); + }); + + const ctx = new TelescopeParseContext( + createEmptyProtoRef(dir, localname), + builder.store, + builder.options + ); + //based on rpc type to generate client from client factory + let rpcast; + + switch (builder.options?.rpcClients?.type) { + case "grpc-gateway": + rpcast = createScopedGrpcGatewayFactory( + ctx.proto, + obj, + "createGrpcGateWayClient" + // 'QueryClientImpl' // make option later + ); + break; + case "tendermint": + // TODO add addUtil to generic context + ctx.proto.addUtil('Rpc'); + + rpcast = createScopedRpcTmFactory( + ctx.proto, + obj, + methodName + // 'QueryClientImpl' // make option later + ); + break; + case "grpc-web": + rpcast = createScopedGrpcWebFactory( + ctx.proto, + obj, + "createGrpcWebClient" + ); + break; + default: + break; + } + + + const serviceImports = getDepsFromQueries( + ctx.queries, + localname + ); + + const imports = aggregateImports(ctx, serviceImports, localname); + + const importStmts = getImportStatements( + localname, + [...fixlocalpaths(imports)], + builder.options + ); + + const prog = [] + .concat(importStmts) + .concat(rpcast); + + const writeFilename = bundler.getFilename(localname); + bundler.writeAst(prog, writeFilename); + bundler.addToBundleToPackage(`${dir}.ClientFactory`, localname) + +}; \ No newline at end of file diff --git a/packages/telescope/src/generators/create-rpc-query-client-scoped.ts b/packages/telescope/src/generators/create-rpc-query-client-scoped.ts index a0fcc4fa17..66a371cf70 100644 --- a/packages/telescope/src/generators/create-rpc-query-client-scoped.ts +++ b/packages/telescope/src/generators/create-rpc-query-client-scoped.ts @@ -22,30 +22,6 @@ export const plugin = ( return; } - // if no scopes, do them all! - if ( - !builder.options.rpcClients.scoped || - !builder.options.rpcClients.scoped.length - ) { - // TODO inefficient - // WE SHOULD NOT DO THIS IN A BUNDLER LOOP - // MAKE SEPARATE PLUGIN - return makeAllRPCBundles( - builder, - bundler - ); - } - - if (!builder.options.rpcClients.scopedIsExclusive) { - // TODO inefficient - // WE SHOULD NOT DO THIS IN A BUNDLER LOOP - // MAKE SEPARATE PLUGIN - makeAllRPCBundles( - builder, - bundler - ); - } - // we have scopes! builder.options.rpcClients.scoped.forEach(rpc => { if (rpc.dir !== bundler.bundle.base) return; @@ -164,79 +140,3 @@ const makeRPC = ( bundler.addToBundleToPackage(`${dir}.ClientFactory`, localname) } }; - -// TODO -/* - move all options for rpc into previous `rpc` prop and - clean up all these many options for one nested object full of options -*/ - -const makeAllRPCBundles = ( - builder: TelescopeBuilder, - bundler: Bundler -) => { - - - if (!builder.options.rpcClients.bundle) return; - - // [x] loop through every bundle - // [x] if not cosmos, add all cosmos - // [x] call makeRPC - - const dir = bundler.bundle.base; - const filename = 'rpc' - - /// - /// - /// - - // refs with services - const refs = builder.store.getProtos().filter((ref: ProtoRef) => { - const proto = getNestedProto(ref.traversed); - - //// Anything except Msg Service OK... - const allowedRpcServices = builder.options.rpcClients.enabledServices.filter(a => a !== 'Msg'); - const found = allowedRpcServices.some(svc => { - return proto?.[svc] && - proto[svc]?.type === 'Service' - }); - - if (!found) { - return; - } - /// - - return true; - }); - - const check = refs.filter((ref: ProtoRef) => { - const [base] = ref.proto.package.split('.'); - return base === bundler.bundle.base; - }); - - if (!check.length) { - // if there are no services - // exit the plugin - return; - } - - const packages = refs.reduce((m, ref: ProtoRef) => { - const [base] = ref.proto.package.split('.'); - if (base === 'cosmos' || base === bundler.bundle.base) - return [...new Set([...m, ref.proto.package])]; - return m; - }, []); - - makeRPC( - builder, - bundler, - { - dir, - filename, - packages, - addToBundle: true, - methodNameQuery: 'createRPCQueryClient' - } - ); - -}; \ No newline at end of file diff --git a/packages/telescope/types/generators/create-lcd-client-all.d.ts b/packages/telescope/types/generators/create-lcd-client-all.d.ts new file mode 100644 index 0000000000..6d9b3a9fd5 --- /dev/null +++ b/packages/telescope/types/generators/create-lcd-client-all.d.ts @@ -0,0 +1,3 @@ +import { TelescopeBuilder } from '../builder'; +import { Bundler } from '../bundler'; +export declare const plugin: (builder: TelescopeBuilder, bundler: Bundler) => void; diff --git a/packages/telescope/types/generators/create-rpc-msg-client-all.d.ts b/packages/telescope/types/generators/create-rpc-msg-client-all.d.ts new file mode 100644 index 0000000000..6d9b3a9fd5 --- /dev/null +++ b/packages/telescope/types/generators/create-rpc-msg-client-all.d.ts @@ -0,0 +1,3 @@ +import { TelescopeBuilder } from '../builder'; +import { Bundler } from '../bundler'; +export declare const plugin: (builder: TelescopeBuilder, bundler: Bundler) => void; diff --git a/packages/telescope/types/generators/create-rpc-query-client-all.d.ts b/packages/telescope/types/generators/create-rpc-query-client-all.d.ts new file mode 100644 index 0000000000..6d9b3a9fd5 --- /dev/null +++ b/packages/telescope/types/generators/create-rpc-query-client-all.d.ts @@ -0,0 +1,3 @@ +import { TelescopeBuilder } from '../builder'; +import { Bundler } from '../bundler'; +export declare const plugin: (builder: TelescopeBuilder, bundler: Bundler) => void;