desktop-master-git2
bunsenstraat 3 months ago
parent 3181e66e6b
commit 34530fbd03
  1. 25
      apps/remixdesktop/src/plugins/isoGitPlugin.ts
  2. 4
      libs/remix-git/src/isogit.ts

@ -62,7 +62,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async status(cmd: statusInput) { async status(cmd: statusInput) {
console.log('status', cmd)
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
throw new Error('No working directory') throw new Error('No working directory')
} }
@ -80,14 +80,13 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
...(await this.getGitConfig()), ...(await this.getGitConfig()),
...cmd, ...cmd,
}) })
//console.log('STATUS', status, await this.getGitConfig())
return status return status
} }
async log(cmd: logInputType) { async log(cmd: logInputType) {
console.log('LOG', cmd)
const token = await this.call('config' as any, 'getAppParameter', 'settings/gist-access-token') const token = await this.call('config' as any, 'getAppParameter', 'settings/gist-access-token')
console.log('LOG', token)
if (this.workingDir === '') { if (this.workingDir === '') {
return [] return []
@ -98,7 +97,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
...cmd, ...cmd,
depth: cmd.depth || 10, depth: cmd.depth || 10,
}) })
console.log('LOG')
return log return log
} }
@ -173,7 +172,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async resolveref(cmd: resolveRefInput) { async resolveref(cmd: resolveRefInput) {
console.log('RESOLVE REF', cmd)
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
return null return null
} }
@ -182,7 +181,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
...(await this.getGitConfig()), ...(await this.getGitConfig()),
...cmd, ...cmd,
}) })
console.log('RESOLVE REF', resolveref)
return resolveref return resolveref
} }
@ -200,7 +199,6 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async checkout(cmd: checkoutInputType) { async checkout(cmd: checkoutInputType) {
console.log('CHECKOUT', cmd)
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
throw new Error('No working directory') throw new Error('No working directory')
@ -217,7 +215,6 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async push(input: pushInputType) { async push(input: pushInputType) {
console.log('PUSH', input, this.gitIsInstalled)
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
throw new Error('No working directory') throw new Error('No working directory')
} }
@ -231,7 +228,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async pull(input: pullInputType) { async pull(input: pullInputType) {
console.log('PULL', input)
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
throw new Error('No working directory') throw new Error('No working directory')
} }
@ -245,7 +242,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async fetch(input: fetchInputType) { async fetch(input: fetchInputType) {
console.log('FETCH', input)
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
throw new Error('No working directory') throw new Error('No working directory')
} }
@ -298,7 +295,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async remotes() { async remotes() {
console.log('REMOTES')
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
return [] return []
} }
@ -307,7 +304,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async currentbranch(input: currentBranchInput) { async currentbranch(input: currentBranchInput) {
console.log('CURRENT BRANCH', input)
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
return '' return ''
} }
@ -316,7 +313,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient {
} }
async branches(config: any) { async branches(config: any) {
console.log('BRANCHES')
if (!this.workingDir || this.workingDir === '') { if (!this.workingDir || this.workingDir === '') {
return [] return []
} }

@ -8,7 +8,6 @@ import http from 'isomorphic-git/http/web'
import { Octokit } from "octokit" import { Octokit } from "octokit"
import { ElectronBasePluginClient } from "@remixproject/plugin-electron" import { ElectronBasePluginClient } from "@remixproject/plugin-electron"
const currentbranch = async (input: currentBranchInput, fsConfig: isoGitFSConfig) => { const currentbranch = async (input: currentBranchInput, fsConfig: isoGitFSConfig) => {
console.log('CURRENT BRANCH', input)
try { try {
const cmd = input ? fsConfig ? { ...fsConfig, ...input } : input : fsConfig const cmd = input ? fsConfig ? { ...fsConfig, ...input } : input : fsConfig
@ -31,8 +30,6 @@ const currentbranch = async (input: currentBranchInput, fsConfig: isoGitFSConfig
} catch (e) { } catch (e) {
// do nothing // do nothing
} }
console.log('NAME', name)
console.log('REMOTE', remote)
return { return {
remote: remote, remote: remote,
@ -201,7 +198,6 @@ const addIsomorphicGitProxyConfig = async (input: {
}, plugin: any) => { }, plugin: any) => {
const token = await plugin.call('config' as any, 'getAppParameter', 'settings/gist-access-token') const token = await plugin.call('config' as any, 'getAppParameter', 'settings/gist-access-token')
console.log('TOKEN', token)
let config: isoGitProxyConfig = { let config: isoGitProxyConfig = {
corsProxy: 'https://corsproxy.remixproject.org/', corsProxy: 'https://corsproxy.remixproject.org/',

Loading…
Cancel
Save