diff --git a/apps/1test/src/electron/fsPlugin.ts b/apps/1test/src/electron/fsPlugin.ts index af2b13b3c1..e82b21285b 100644 --- a/apps/1test/src/electron/fsPlugin.ts +++ b/apps/1test/src/electron/fsPlugin.ts @@ -1,5 +1,5 @@ import { PluginClient } from "@remixproject/plugin"; -import { createClient } from "./lib/electronPluginClient" +import { createElectronClient } from "./lib/electronPluginClient" import { Plugin } from '@remixproject/engine'; import fs from 'fs/promises' import { Stats } from "fs"; @@ -35,7 +35,7 @@ class FSPluginClient extends PluginClient { constructor() { super() this.methods = ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'exists', 'watch', 'closeWatch', 'currentPath'] - createClient(this, profile) + createElectronClient(this, profile) this.onload(() => { console.log('fsPluginClient onload') }) diff --git a/apps/1test/src/electron/gitPlugin.ts b/apps/1test/src/electron/gitPlugin.ts index 404cc4e961..ab2a68b491 100644 --- a/apps/1test/src/electron/gitPlugin.ts +++ b/apps/1test/src/electron/gitPlugin.ts @@ -2,7 +2,7 @@ import { Plugin } from "@remixproject/engine"; import { PluginClient } from "@remixproject/plugin"; import { Profile } from "@remixproject/plugin-utils"; import { spawn } from "child_process"; -import { createClient } from "./lib/electronPluginClient"; +import { createElectronClient } from "./lib/electronPluginClient"; const profile: Profile = { name: 'git', @@ -26,7 +26,7 @@ class GitPluginClient extends PluginClient { constructor() { super() this.methods = ['log', 'status', 'add', 'commit', 'push', 'pull', 'clone', 'checkout', 'branch', 'merge', 'reset', 'revert', 'diff', 'stash', 'apply', 'cherryPick', 'rebase', 'tag', 'fetch', 'remote', 'config', 'show', 'init', 'help', 'version'] - createClient(this, profile) + createElectronClient(this, profile) this.onload(() => { console.log('GitPluginClient onload') }) diff --git a/apps/1test/src/electron/lib/electronPluginClient.ts b/apps/1test/src/electron/lib/electronPluginClient.ts index ef0670878e..6dd1c6d18e 100644 --- a/apps/1test/src/electron/lib/electronPluginClient.ts +++ b/apps/1test/src/electron/lib/electronPluginClient.ts @@ -22,7 +22,7 @@ export class ElectronPluginClientConnector implements ClientConnector { } } -export const createClient = < +export const createElectronClient = < P extends Api, App extends ApiMap = Readonly >(client: PluginClient = new PluginClient(), profile: Profile): Client => {