diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 4475228c86..60d76fed6b 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -67,7 +67,7 @@ const RemixDProvider = require('./app/files/remixDProvider') const Config = require('./config') const FileManager = require('./app/files/fileManager') -const FileProvider = require('./app/files/fileProvider') +import FileProvider from "./app/files/fileProvider" const DGitProvider = require('./app/files/dgitProvider') const WorkspaceFileProvider = require('./app/files/workspaceFileProvider') diff --git a/apps/remix-ide/src/app/files/dgitProvider.ts b/apps/remix-ide/src/app/files/dgitProvider.ts index ff05c483f4..aa14683a77 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.ts +++ b/apps/remix-ide/src/app/files/dgitProvider.ts @@ -22,7 +22,7 @@ const profile = { description: 'Decentralized git provider', icon: 'assets/img/fileManager.webp', version: '0.0.1', - methods: ['init', 'localStorageUsed', 'addremote', 'delremote', 'remotes', 'fetch', 'clone', 'export', 'import', 'status', 'log', 'commit', 'add', 'remove', 'reset', 'rm', 'lsfiles', 'readblob', 'resolveref', 'branches', 'branch', 'checkout', 'currentbranch', 'push', 'pin', 'pull', 'pinList', 'unPin', 'setIpfsConfig', 'zip', 'setItem', 'getItem'], + methods: ['init', 'localStorageUsed', 'addremote', 'delremote', 'remotes', 'fetch', 'clone', 'export', 'import', 'status', 'log', 'commit', 'add', 'remove', 'reset', 'rm', 'lsfiles', 'readblob', 'resolveref', 'branches', 'branch', 'checkout', 'currentbranch', 'push', 'pin', 'pull', 'pinList', 'unPin', 'setIpfsConfig', 'zip', 'setItem', 'getItem', 'version'], kind: 'file-system' } class DGitProvider extends Plugin { @@ -104,6 +104,15 @@ class DGitProvider extends Plugin { this.emit('init') } + async version() { + if (isElectron()) { + return await this.call('isogit', 'version') + } + + const version = 'built-in' + return version + } + async status(cmd) { if (isElectron()) { diff --git a/apps/remix-ide/src/app/files/electronProvider.ts b/apps/remix-ide/src/app/files/electronProvider.ts index 90cadeae49..3543f756a4 100644 --- a/apps/remix-ide/src/app/files/electronProvider.ts +++ b/apps/remix-ide/src/app/files/electronProvider.ts @@ -1,4 +1,4 @@ -import { FileProvider } from "./fileProvider" +import FileProvider from "./fileProvider" declare global { diff --git a/apps/remix-ide/src/app/files/fileProvider.ts b/apps/remix-ide/src/app/files/fileProvider.ts index 6b74763208..6f82421f61 100644 --- a/apps/remix-ide/src/app/files/fileProvider.ts +++ b/apps/remix-ide/src/app/files/fileProvider.ts @@ -6,7 +6,7 @@ import { Storage } from '@remix-project/remix-lib' import pathModule from 'path' -export class FileProvider { +export default class FileProvider { event: any type: any providerExternalsStorage: any @@ -327,4 +327,3 @@ export class FileProvider { } } -module.exports = FileProvider diff --git a/apps/remix-ide/src/app/files/remixDProvider.js b/apps/remix-ide/src/app/files/remixDProvider.js index c52055e04f..62171fdc5b 100644 --- a/apps/remix-ide/src/app/files/remixDProvider.js +++ b/apps/remix-ide/src/app/files/remixDProvider.js @@ -1,5 +1,5 @@ 'use strict' -const FileProvider = require('./fileProvider') +import FileProvider from "./fileProvider" module.exports = class RemixDProvider extends FileProvider { constructor (appManager) { diff --git a/apps/remix-ide/src/app/files/workspaceFileProvider.js b/apps/remix-ide/src/app/files/workspaceFileProvider.js index 6193e7b486..3b3981cb47 100644 --- a/apps/remix-ide/src/app/files/workspaceFileProvider.js +++ b/apps/remix-ide/src/app/files/workspaceFileProvider.js @@ -1,7 +1,7 @@ 'use strict' const EventManager = require('events') -const FileProvider = require('./fileProvider') +import FileProvider from "./fileProvider" class WorkspaceFileProvider extends FileProvider { constructor () {