From aa0d1740ccfcfe109399dabf8d4641cc56703f8d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 13 Jul 2024 14:26:02 +0200 Subject: [PATCH] run builtin --- apps/remix-ide/src/app/files/dgitProvider.ts | 20 +- apps/remixdesktop/package.json | 2 +- apps/remixdesktop/run_ci_test.sh | 2 +- apps/remixdesktop/run_git_ui_isogit_tests.sh | 6 + apps/remixdesktop/src/plugins/isoGitPlugin.ts | 15 +- .../test/tests/app/git-ui.test.ts | 2 + .../test/tests/app/git-ui_2.test.ts | 2 + .../test/tests/app/git-ui_3.test.ts | 2 + apps/remixdesktop/test/tests/app/git.test.ts | 1 + libs/remix-git/src/isogit.ts | 18 +- libs/remix-ui/git/src/components/gitui.tsx | 3 + .../git/src/components/panels/version.tsx | 10 + libs/remix-ui/git/src/lib/listeners.ts | 8 +- libs/remix-ui/git/src/state/actions.ts | 1 + libs/remix-ui/git/src/state/gitpayload.ts | 7 + libs/remix-ui/git/src/state/gitreducer.tsx | 412 +++++++++--------- libs/remix-ui/git/src/types/index.ts | 4 +- 17 files changed, 282 insertions(+), 233 deletions(-) create mode 100755 apps/remixdesktop/run_git_ui_isogit_tests.sh create mode 100644 libs/remix-ui/git/src/components/panels/version.tsx diff --git a/apps/remix-ide/src/app/files/dgitProvider.ts b/apps/remix-ide/src/app/files/dgitProvider.ts index 5f00c676ec..1ab897f11d 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.ts +++ b/apps/remix-ide/src/app/files/dgitProvider.ts @@ -339,21 +339,13 @@ class DGitProvider extends Plugin { async clone(input: cloneInputType) { if ((Registry.getInstance().get('platform').api.isDesktop())) { - const folder = await this.call('fs', 'selectFolder', null, 'Select or create a folder to clone the repository in', 'Select as Repository Destination') - if (!folder) return false - const cmd = { - url: input.url, - singleBranch: input.singleBranch, - ref: input.branch, - depth: input.depth || 10, - dir: folder, - input - } - this.call('terminal', 'logHtml', `Cloning ${input.url}... please wait...`) try { - const result = await this.call('isogit', 'clone', cmd) - this.call('fs', 'openWindow', folder) - return result + const folder = await this.call('fs', 'selectFolder', null, 'Select or create a folder to clone the repository in', 'Select as Repository Destination') + if (!folder) return false + input.dir = folder + input.depth = input.depth || 10 + const result = await this.call('isogit', 'clone', input) + this.call('fs' as any, 'openWindow', folder) } catch (e) { this.call('notification', 'alert', { id: 'dgitAlert', diff --git a/apps/remixdesktop/package.json b/apps/remixdesktop/package.json index c5a6a1df8a..ce5f6aa51c 100644 --- a/apps/remixdesktop/package.json +++ b/apps/remixdesktop/package.json @@ -29,7 +29,7 @@ "installRipGrepMacOXarm64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=arm64 node node_modules/@vscode/ripgrep/lib/postinstall.js", "postinstall": "electron-builder install-app-deps", "test": "yarn run build:e2e && nightwatch --config build-e2e/remixdesktop/test/nighwatch.app.js", - "test:isogit": "yarn run test --useIsoGit --test build-e2e/remixdesktop/test/tests/app/git.test.js", + "test:isogit": "yarn run test --useIsoGit", "test:offline": "yarn run test --useOffline --test build-e2e/remixdesktop/test/tests/app/offline.test.js", "build:e2e": "tsc -p tsconfig.e2e.json" }, diff --git a/apps/remixdesktop/run_ci_test.sh b/apps/remixdesktop/run_ci_test.sh index 3020b0daf1..d169985146 100755 --- a/apps/remixdesktop/run_ci_test.sh +++ b/apps/remixdesktop/run_ci_test.sh @@ -8,7 +8,7 @@ for TESTFILE in $TESTFILES; do done if [ "$CIRCLE_NODE_INDEX" -eq 0 ]; then - yarn test:isogit + sh ./run_git_ui_isogit_tests.sh elif [ "$CIRCLE_NODE_INDEX" -eq 1 ]; then yarn test:offline fi diff --git a/apps/remixdesktop/run_git_ui_isogit_tests.sh b/apps/remixdesktop/run_git_ui_isogit_tests.sh new file mode 100755 index 0000000000..9333aa2498 --- /dev/null +++ b/apps/remixdesktop/run_git_ui_isogit_tests.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +for testfile in build-e2e/remixdesktop/test/tests/app/git*.js +do + yarn test:isogit --test $testfile +done \ No newline at end of file diff --git a/apps/remixdesktop/src/plugins/isoGitPlugin.ts b/apps/remixdesktop/src/plugins/isoGitPlugin.ts index afe26685ce..a3e638a116 100644 --- a/apps/remixdesktop/src/plugins/isoGitPlugin.ts +++ b/apps/remixdesktop/src/plugins/isoGitPlugin.ts @@ -44,7 +44,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { this.onload(async () => { this.on('fs' as any, 'workingDirChanged', async (path: string) => { this.workingDir = path - this.gitIsInstalled = await gitProxy.version() ? true : false + this.gitIsInstalled = await gitProxy.version() && !useIsoGit ? true : false }) this.workingDir = await this.call('fs' as any, 'getWorkingDir') this.gitIsInstalled = await gitProxy.version() && !useIsoGit ? true : false @@ -52,7 +52,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { } async version() { - return gitProxy.version() + return this.gitIsInstalled? gitProxy.version(): 'built-in' } async getGitConfig() { @@ -266,23 +266,16 @@ class IsoGitPluginClient extends ElectronBasePluginClient { if (this.gitIsInstalled) { try { + this.call('terminal' as any, 'log', 'Cloning using git... please wait.') await gitProxy.clone(cmd) } catch (e) { throw e } } else { try { - /* this.call('terminal' as any, 'log', 'Cloning using builtin git... please wait.') - const clone = await git.clone({ - ...await this.getGitConfig(), - ...cmd, - ...parseInput(cmd.input), - dir: cmd.dir || this.workingDir - }) - + const clone = await isoGit.clone(cmd, await this.getGitConfig(), this) return clone - */ } catch (e) { console.log('CLONE ERROR', e) throw e diff --git a/apps/remixdesktop/test/tests/app/git-ui.test.ts b/apps/remixdesktop/test/tests/app/git-ui.test.ts index 85cdbf8693..092f6cad57 100644 --- a/apps/remixdesktop/test/tests/app/git-ui.test.ts +++ b/apps/remixdesktop/test/tests/app/git-ui.test.ts @@ -13,6 +13,7 @@ let gitserver: ChildProcess const tests = { before: function (browser: NightwatchBrowser, done: VoidFunction) { + browser.hideToolTips() done() }, after: function (browser: NightwatchBrowser) { @@ -48,6 +49,7 @@ const tests = { console.log(result.value) browser.switchWindow(result.value[1]) .waitForElementVisible('*[data-id="treeViewLitreeViewItem.git"]') + .hideToolTips() }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME.md"]') }, diff --git a/apps/remixdesktop/test/tests/app/git-ui_2.test.ts b/apps/remixdesktop/test/tests/app/git-ui_2.test.ts index 7a176fee3e..34e2fcc694 100644 --- a/apps/remixdesktop/test/tests/app/git-ui_2.test.ts +++ b/apps/remixdesktop/test/tests/app/git-ui_2.test.ts @@ -13,6 +13,7 @@ let gitserver: ChildProcess const tests = { before: function (browser: NightwatchBrowser, done: VoidFunction) { + browser.hideToolTips() done() }, after: function (browser: NightwatchBrowser) { @@ -48,6 +49,7 @@ const tests = { console.log(result.value) browser.switchWindow(result.value[1]) .waitForElementVisible('*[data-id="treeViewLitreeViewItem.git"]') + .hideToolTips() }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME.md"]') }, diff --git a/apps/remixdesktop/test/tests/app/git-ui_3.test.ts b/apps/remixdesktop/test/tests/app/git-ui_3.test.ts index b6fa4fa969..42a401012a 100644 --- a/apps/remixdesktop/test/tests/app/git-ui_3.test.ts +++ b/apps/remixdesktop/test/tests/app/git-ui_3.test.ts @@ -13,6 +13,7 @@ let gitserver: ChildProcess const tests = { before: function (browser: NightwatchBrowser, done: VoidFunction) { + browser.hideToolTips() done() }, after: function (browser: NightwatchBrowser) { @@ -48,6 +49,7 @@ const tests = { console.log(result.value) browser.switchWindow(result.value[1]) .waitForElementVisible('*[data-id="treeViewLitreeViewItem.git"]') + .hideToolTips() }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME.md"]') }, diff --git a/apps/remixdesktop/test/tests/app/git.test.ts b/apps/remixdesktop/test/tests/app/git.test.ts index 9cc26be3d0..d52e3464e1 100644 --- a/apps/remixdesktop/test/tests/app/git.test.ts +++ b/apps/remixdesktop/test/tests/app/git.test.ts @@ -23,6 +23,7 @@ module.exports = { browser.switchWindow(result.value[1]) .waitForElementVisible('*[data-id="treeViewLitreeViewItem.git"]') }) + .pause() .end() } } \ No newline at end of file diff --git a/libs/remix-git/src/isogit.ts b/libs/remix-git/src/isogit.ts index 6e6b11bf83..c53073c4db 100644 --- a/libs/remix-git/src/isogit.ts +++ b/libs/remix-git/src/isogit.ts @@ -1,4 +1,4 @@ -import { GitHubUser, author, branch, commitChange, compareBranchesInput, currentBranchInput, fetchInputType, isoGitFSConfig, isoGitProxyConfig, pullInputType, pushInputType, remote, userEmails } from "@remix-api" +import { GitHubUser, author, branch, cloneInputType, commitChange, compareBranchesInput, currentBranchInput, fetchInputType, isoGitFSConfig, isoGitProxyConfig, pullInputType, pushInputType, remote, userEmails } from "@remix-api" import git from 'isomorphic-git' import { Plugin @@ -120,6 +120,19 @@ const fetch = async (input: fetchInputType, fsConfig: isoGitFSConfig, plugin: Pl return await git.fetch({ ...fsConfig, ...cmd, ...proxy }) } +const clone = async (input: cloneInputType, fsConfig: isoGitFSConfig, plugin: Plugin | ElectronBasePluginClient) => { + const proxy = await isoGit.addIsomorphicGitProxyConfig(input, plugin) + const cmd = { + url: input.url, + singleBranch: input.singleBranch, + ref: input.branch, + depth: input.depth || 10, + dir: input.dir, + input + } + await git.clone({ ...fsConfig, ...cmd, ...proxy }) +} + const getAuthor = async (input, plugin: any) => { const author: author = { name: '', @@ -325,5 +338,6 @@ export const isoGit = { push, pull, fetch, - getGitHubUser + getGitHubUser, + clone } \ No newline at end of file diff --git a/libs/remix-ui/git/src/components/gitui.tsx b/libs/remix-ui/git/src/components/gitui.tsx index d3b3f5dd5c..dd26b41e8e 100644 --- a/libs/remix-ui/git/src/components/gitui.tsx +++ b/libs/remix-ui/git/src/components/gitui.tsx @@ -35,6 +35,7 @@ import { CustomRemixApi } from "@remix-api"; import { Plugin } from "@remixproject/engine"; import { Disabled } from './disabled' import { platformContext } from '@remix-ui/app' +import { Version } from './panels/version' export const gitPluginContext = React.createContext(defaultGitState) export const loaderContext = React.createContext(defaultLoaderState) @@ -179,6 +180,7 @@ export const GitUI = (props: IGitUi) => { {setup && !needsInit ? : null} {needsInit ? : null} {!setup && !needsInit ? + <> @@ -239,6 +241,7 @@ export const GitUI = (props: IGitUi) => { + : null} diff --git a/libs/remix-ui/git/src/components/panels/version.tsx b/libs/remix-ui/git/src/components/panels/version.tsx new file mode 100644 index 0000000000..be8d1168d3 --- /dev/null +++ b/libs/remix-ui/git/src/components/panels/version.tsx @@ -0,0 +1,10 @@ +import React, { useEffect, useState } from 'react' +import { gitPluginContext } from '../gitui' +export const Version = () => { + const context = React.useContext(gitPluginContext) + return ( +
+

{context.version.includes('version') ? context.version : `Git version: ${context.version}` }

+
+ ) +} \ No newline at end of file diff --git a/libs/remix-ui/git/src/lib/listeners.ts b/libs/remix-ui/git/src/lib/listeners.ts index 392e5b211b..f6384873d7 100644 --- a/libs/remix-ui/git/src/lib/listeners.ts +++ b/libs/remix-ui/git/src/lib/listeners.ts @@ -1,6 +1,6 @@ import React from "react"; -import { setCanUseApp, setLoading, setRepoName, setGItHubToken, setLog, setGitHubUser, setUserEmails, setDesktopWorkingDir } from "../state/gitpayload"; +import { setCanUseApp, setLoading, setRepoName, setGItHubToken, setLog, setGitHubUser, setUserEmails, setDesktopWorkingDir, setVersion } from "../state/gitpayload"; import { gitActionDispatch } from "../types"; import { Plugin } from "@remixproject/engine"; import { getBranches, getFileStatusMatrix, loadGitHubUserFromToken, getRemotes, gitlog, setPlugin } from "./gitactions"; @@ -71,6 +71,9 @@ export const setCallBacks = (viewPlugin: Plugin, gitDispatcher: React.Dispatch { loadFiles() }) @@ -91,6 +94,9 @@ export const setCallBacks = (viewPlugin: Plugin, gitDispatcher: React.Dispatch { diff --git a/libs/remix-ui/git/src/state/gitpayload.ts b/libs/remix-ui/git/src/state/gitpayload.ts index 9e8a51dc5a..da6aef53b8 100644 --- a/libs/remix-ui/git/src/state/gitpayload.ts +++ b/libs/remix-ui/git/src/state/gitpayload.ts @@ -225,3 +225,10 @@ export const setDesktopWorkingDir = (dir: string) => { payload: dir } } + +export const setVersion = (version: string) => { + return { + type: 'SET_VERSION', + payload: version + } +} diff --git a/libs/remix-ui/git/src/state/gitreducer.tsx b/libs/remix-ui/git/src/state/gitreducer.tsx index 3a488d3a12..2821f564c2 100644 --- a/libs/remix-ui/git/src/state/gitreducer.tsx +++ b/libs/remix-ui/git/src/state/gitreducer.tsx @@ -6,208 +6,216 @@ import { Actions } from "./actions" export const gitReducer = (state: gitState = defaultGitState, action: Actions): gitState => { switch (action.type) { - case 'FILE_STATUS': - return { - ...state, - fileStatusResult: action.payload, - staged: getFilesByStatus("staged", action.payload), - modified: getFilesByStatus("modified", action.payload), - untracked: getFilesByStatus("untracked", action.payload), - deleted: getFilesByStatus("deleted", action.payload), - allchangesnotstaged: allChangedButNotStagedFiles(action.payload) - } - - case 'FILE_STATUS_MERGE': - action.payload.map((fileStatusResult: fileStatusResult) => { - const file = state.fileStatusResult.find(stateFile => { - return stateFile.filename === fileStatusResult.filename + case 'FILE_STATUS': + return { + ...state, + fileStatusResult: action.payload, + staged: getFilesByStatus("staged", action.payload), + modified: getFilesByStatus("modified", action.payload), + untracked: getFilesByStatus("untracked", action.payload), + deleted: getFilesByStatus("deleted", action.payload), + allchangesnotstaged: allChangedButNotStagedFiles(action.payload) + } + + case 'FILE_STATUS_MERGE': + action.payload.map((fileStatusResult: fileStatusResult) => { + const file = state.fileStatusResult.find(stateFile => { + return stateFile.filename === fileStatusResult.filename + }) + if (file) { + file.status = fileStatusResult.status + file.statusNames = fileStatusResult.statusNames + } }) - if (file) { - file.status = fileStatusResult.status - file.statusNames = fileStatusResult.statusNames - } - }) - - return { - ...state, - staged: getFilesByStatus("staged", state.fileStatusResult), - modified: getFilesByStatus("modified", state.fileStatusResult), - untracked: getFilesByStatus("untracked", state.fileStatusResult), - deleted: getFilesByStatus("deleted", state.fileStatusResult), - allchangesnotstaged: allChangedButNotStagedFiles(state.fileStatusResult) - } - - case 'SET_COMMITS': - return { - ...state, - commits: action.payload, - localCommitCount: action.payload.length - } - - case 'SET_BRANCHES': - return { - ...state, - branches: action.payload - } - - case 'SET_CURRENT_BRANCH': - return { - ...state, - currentBranch: action.payload - } - - case 'SET_CURRENT_HEAD': - return { - ...state, - currentHead: action.payload - } - - case 'SET_CAN_USE_APP': - return { - ...state, - canUseApp: action.payload - } - case 'SET_REPO_NAME': - return { - ...state, - reponame: action.payload - } - case 'SET_LOADING': - return { - ...state, - loading: action.payload - } - - case 'SET_REPOS': - return { - ...state, - repositories: action.payload - } - - case 'SET_REMOTE_BRANCHES': - return { - ...state, - remoteBranches: action.payload - } - - case 'SET_CAN_COMMIT': - return { - ...state, - canCommit: action.payload - } - - case 'SET_REMOTES': - return { - ...state, - remotes: action.payload - } - - case 'SET_UPSTREAM': - return { - ...state, - upstream: action.payload - } - - case 'SET_COMMIT_CHANGES': - - action.payload.forEach((change: commitChange) => { - state.commitChanges.find((c) => c.hashModified === change.hashModified && c.hashOriginal === change.hashOriginal && c.path === change.path) ? null : state.commitChanges.push(change) - }) - - return { - ...state, - commitChanges: [...state.commitChanges] - } - - case 'RESET_REMOTE_BRANCH_COMMITS': - if (state.remoteBranchCommits[action.payload.branch.name]) { - delete state.remoteBranchCommits[action.payload.branch.name] - } - return { - ...state, - remoteBranchCommits: { ...state.remoteBranchCommits } - } - - case 'SET_REMOTE_BRANCH_COMMITS': - if (state.remoteBranchCommits[action.payload.branch.name]) { - state.remoteBranchCommits[action.payload.branch.name].push(...action.payload.commits) - } else { - state.remoteBranchCommits[action.payload.branch.name] = action.payload.commits - } - return { - ...state, - remoteBranchCommits: { ...state.remoteBranchCommits } - } - - case 'SET_LOCAL_BRANCH_COMMITS': - - state.localBranchCommits[action.payload.branch.name] = action.payload.commits - return { - ...state, - localBranchCommits: { ...state.localBranchCommits } - } - - case 'SET_BRANCH_DIFFERENCES': - - state.branchDifferences[`${action.payload.remote.name}/${action.payload.branch.name}`] = action.payload.branchDifference - - return { - ...state, - branchDifferences: { ...state.branchDifferences } - } - - case 'SET_GITHUB_USER': - return { - ...state, - gitHubUser: action.payload - } - - case 'SET_GITHUB_ACCESS_TOKEN': - return { - ...state, - gitHubAccessToken: action.payload - } - - case 'SET_SCOPES': - return { - ...state, - gitHubScopes: action.payload - } - - case 'SET_USER_EMAILS': - return { - ...state, - userEmails: action.payload - } - - case 'SET_DEFAULT_REMOTE': - return { - ...state, - defaultRemote: action.payload - } - - case 'SET_LOG': - if (state.log.length > 0 && state.log[[...state.log].length - 1].message === action.payload.message) { - return { - ...state, - log: [...state.log] - } - } - return { - ...state, - log: [...state.log, action.payload] - } - - case 'CLEAR_LOG': - return { - ...state, - log: [] - } - - case 'DESKTOP_SET_WORKING_DIR': - return { - ...state, - desktopWorkingDir: action.payload - } + + return { + ...state, + staged: getFilesByStatus("staged", state.fileStatusResult), + modified: getFilesByStatus("modified", state.fileStatusResult), + untracked: getFilesByStatus("untracked", state.fileStatusResult), + deleted: getFilesByStatus("deleted", state.fileStatusResult), + allchangesnotstaged: allChangedButNotStagedFiles(state.fileStatusResult) + } + + case 'SET_COMMITS': + return { + ...state, + commits: action.payload, + localCommitCount: action.payload.length + } + + case 'SET_BRANCHES': + return { + ...state, + branches: action.payload + } + + case 'SET_CURRENT_BRANCH': + return { + ...state, + currentBranch: action.payload + } + + case 'SET_CURRENT_HEAD': + return { + ...state, + currentHead: action.payload + } + + case 'SET_CAN_USE_APP': + return { + ...state, + canUseApp: action.payload + } + case 'SET_REPO_NAME': + return { + ...state, + reponame: action.payload + } + case 'SET_LOADING': + return { + ...state, + loading: action.payload + } + + case 'SET_REPOS': + return { + ...state, + repositories: action.payload + } + + case 'SET_REMOTE_BRANCHES': + return { + ...state, + remoteBranches: action.payload + } + + case 'SET_CAN_COMMIT': + return { + ...state, + canCommit: action.payload + } + + case 'SET_REMOTES': + return { + ...state, + remotes: action.payload + } + + case 'SET_UPSTREAM': + return { + ...state, + upstream: action.payload + } + + case 'SET_COMMIT_CHANGES': + + action.payload.forEach((change: commitChange) => { + state.commitChanges.find((c) => c.hashModified === change.hashModified && c.hashOriginal === change.hashOriginal && c.path === change.path) ? null : state.commitChanges.push(change) + }) + + return { + ...state, + commitChanges: [...state.commitChanges] + } + + case 'RESET_REMOTE_BRANCH_COMMITS': + if (state.remoteBranchCommits[action.payload.branch.name]) { + delete state.remoteBranchCommits[action.payload.branch.name] + } + return { + ...state, + remoteBranchCommits: { ...state.remoteBranchCommits } + } + + case 'SET_REMOTE_BRANCH_COMMITS': + if (state.remoteBranchCommits[action.payload.branch.name]) { + state.remoteBranchCommits[action.payload.branch.name].push(...action.payload.commits) + } else { + state.remoteBranchCommits[action.payload.branch.name] = action.payload.commits + } + return { + ...state, + remoteBranchCommits: { ...state.remoteBranchCommits } + } + + case 'SET_LOCAL_BRANCH_COMMITS': + + state.localBranchCommits[action.payload.branch.name] = action.payload.commits + return { + ...state, + localBranchCommits: { ...state.localBranchCommits } + } + + case 'SET_BRANCH_DIFFERENCES': + + state.branchDifferences[`${action.payload.remote.name}/${action.payload.branch.name}`] = action.payload.branchDifference + + return { + ...state, + branchDifferences: { ...state.branchDifferences } + } + + case 'SET_GITHUB_USER': + return { + ...state, + gitHubUser: action.payload + } + + case 'SET_GITHUB_ACCESS_TOKEN': + return { + ...state, + gitHubAccessToken: action.payload + } + + case 'SET_SCOPES': + return { + ...state, + gitHubScopes: action.payload + } + + case 'SET_USER_EMAILS': + return { + ...state, + userEmails: action.payload + } + + case 'SET_DEFAULT_REMOTE': + return { + ...state, + defaultRemote: action.payload + } + + case 'SET_LOG': + if (state.log.length > 0 && state.log[[...state.log].length - 1].message === action.payload.message) { + return { + ...state, + log: [...state.log] + } + } + return { + ...state, + log: [...state.log, action.payload] + } + + case 'CLEAR_LOG': + return { + ...state, + log: [] + } + + case 'DESKTOP_SET_WORKING_DIR': + return { + ...state, + desktopWorkingDir: action.payload + } + + + case 'SET_VERSION': + return { + ...state, + version: action.payload + } + } } \ No newline at end of file diff --git a/libs/remix-ui/git/src/types/index.ts b/libs/remix-ui/git/src/types/index.ts index 6b3119a2d2..2f407ef77a 100644 --- a/libs/remix-ui/git/src/types/index.ts +++ b/libs/remix-ui/git/src/types/index.ts @@ -37,6 +37,7 @@ export type gitState = { gitHubAccessToken: string log: gitLog[] desktopWorkingDir?: string + version: string } export type gitLog = { type: 'error' | 'warning' | 'info' | 'success', @@ -87,7 +88,8 @@ export const defaultGitState: gitState = { gitHubScopes: [], gitHubAccessToken: "", log: [], - desktopWorkingDir: null + desktopWorkingDir: null, + version: "" } export const defaultLoaderState: loaderState = {