rdesktop
filip mertens 1 year ago
parent c28f72bca6
commit 881d0c1b12
  1. 4
      apps/1test/src/electron/fsPlugin.ts
  2. 4
      apps/1test/src/electron/gitPlugin.ts
  3. 2
      apps/1test/src/electron/lib/electronPluginClient.ts

@ -1,5 +1,5 @@
import { PluginClient } from "@remixproject/plugin"; import { PluginClient } from "@remixproject/plugin";
import { createClient } from "./lib/electronPluginClient" import { createElectronClient } from "./lib/electronPluginClient"
import { Plugin } from '@remixproject/engine'; import { Plugin } from '@remixproject/engine';
import fs from 'fs/promises' import fs from 'fs/promises'
import { Stats } from "fs"; import { Stats } from "fs";
@ -35,7 +35,7 @@ class FSPluginClient extends PluginClient {
constructor() { constructor() {
super() super()
this.methods = ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'exists', 'watch', 'closeWatch', 'currentPath'] this.methods = ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'exists', 'watch', 'closeWatch', 'currentPath']
createClient(this, profile) createElectronClient(this, profile)
this.onload(() => { this.onload(() => {
console.log('fsPluginClient onload') console.log('fsPluginClient onload')
}) })

@ -2,7 +2,7 @@ import { Plugin } from "@remixproject/engine";
import { PluginClient } from "@remixproject/plugin"; import { PluginClient } from "@remixproject/plugin";
import { Profile } from "@remixproject/plugin-utils"; import { Profile } from "@remixproject/plugin-utils";
import { spawn } from "child_process"; import { spawn } from "child_process";
import { createClient } from "./lib/electronPluginClient"; import { createElectronClient } from "./lib/electronPluginClient";
const profile: Profile = { const profile: Profile = {
name: 'git', name: 'git',
@ -26,7 +26,7 @@ class GitPluginClient extends PluginClient {
constructor() { constructor() {
super() 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'] 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(() => { this.onload(() => {
console.log('GitPluginClient onload') console.log('GitPluginClient onload')
}) })

@ -22,7 +22,7 @@ export class ElectronPluginClientConnector implements ClientConnector {
} }
} }
export const createClient = < export const createElectronClient = <
P extends Api, P extends Api,
App extends ApiMap = Readonly<IRemixApi> App extends ApiMap = Readonly<IRemixApi>
>(client: PluginClient<P, App> = new PluginClient(), profile: Profile): Client<P, App> => { >(client: PluginClient<P, App> = new PluginClient(), profile: Profile): Client<P, App> => {

Loading…
Cancel
Save