From 1387251797b6131c57813a800da404994b7763e5 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 27 Aug 2021 15:25:31 +0200 Subject: [PATCH 001/119] github integration --- apps/remix-ide/src/app/files/dgitProvider.js | 147 +++++++++++++++++-- apps/remix-ide/src/remixAppManager.js | 6 + 2 files changed, 139 insertions(+), 14 deletions(-) diff --git a/apps/remix-ide/src/app/files/dgitProvider.js b/apps/remix-ide/src/app/files/dgitProvider.js index 7ebe2f4236..48e962ce0b 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.js +++ b/apps/remix-ide/src/app/files/dgitProvider.js @@ -8,6 +8,7 @@ import IpfsHttpClient from 'ipfs-http-client' import { saveAs } from 'file-saver' +import http from 'isomorphic-git/http/web' const JSZip = require('jszip') const path = require('path') @@ -20,7 +21,7 @@ const profile = { description: '', icon: 'assets/img/fileManager.webp', version: '0.0.1', - methods: ['init', 'status', 'log', 'commit', 'add', 'remove', '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', 'rm', 'lsfiles', 'readblob', 'resolveref', 'branches', 'branch', 'checkout', 'currentbranch', 'push', 'pin', 'pull', 'pinList', 'unPin', 'setIpfsConfig', 'zip', 'setItem', 'getItem'], kind: 'file-system' } class DGitProvider extends Plugin { @@ -55,10 +56,24 @@ class DGitProvider extends Plugin { } } - async init () { + async parseInput (input) { + return { + corsProxy: 'http://static.220.14.12.49.clients.your-server.de:3001', + http, + onAuth: url => { + const auth = { + username: input.token, + password: '' + } + return auth + } + } + } + + async init (input) { await git.init({ ...await this.getGitConfig(), - defaultBranch: 'main' + defaultBranch: (input && input.branch) || 'main' }) } @@ -91,7 +106,7 @@ class DGitProvider extends Plugin { ...await this.getGitConfig(), ...cmd }) - this.call('fileManager', 'refresh') + await this.call('fileManager', 'refresh') } async log (cmd) { @@ -102,6 +117,15 @@ class DGitProvider extends Plugin { return status } + async remotes () { + let remotes = [] + try { + remotes = await git.listRemotes({ ...await this.getGitConfig() }) + } catch (e) { + } + return remotes + } + async branch (cmd) { const status = await git.branch({ ...await this.getGitConfig(), @@ -118,10 +142,18 @@ class DGitProvider extends Plugin { return name } - async branches () { - const branches = await git.listBranches({ + async branches (input) { + const cmd = { ...await this.getGitConfig() - }) + } + const remotes = await this.remotes() + let branches = [] + branches = (await git.listBranches(cmd)).map((branch) => { return { remote: undefined, name: branch } }) + for (const remote of remotes) { + cmd.remote = remote.remote + const remotebranches = (await git.listBranches(cmd)).map((branch) => { return { remote: remote.remote, name: branch } }) + branches = [...branches, ...remotebranches] + } return branches } @@ -133,7 +165,7 @@ class DGitProvider extends Plugin { ...cmd }) return sha - } catch (e) {} + } catch (e) { } } async lsfiles (cmd) { @@ -177,7 +209,94 @@ class DGitProvider extends Plugin { } } - async push () { + async addremote (input) { + await git.addRemote({ ...await this.getGitConfig(), url: input.url, remote: input.remote }) + } + + async delremote (input) { + await git.deleteRemote({ ...await this.getGitConfig(), remote: input.remote }) + } + + async localStorageUsed () { + return this.calculateLocalStorage() + } + + async clone (input) { + const permission = await this.askUserPermission('clone', 'Import multiple files into your workspaces.') + if (!permission) return false + if (this.calculateLocalStorage() > 10000) throw new Error('Local browser storage is full.') + await this.call('filePanel', 'createWorkspace', `workspace_${Date.now()}`, false) + + const cmd = { + url: input.url, + singleBranch: input.singleBranch, + ref: input.branch, + depth: input.depth || 10, + ...await this.parseInput(input), + ...await this.getGitConfig() + } + console.log(cmd) + + const result = await git.clone(cmd) + await this.call('fileManager', 'refresh') + return result + } + + async push (input) { + console.log('push') + const cmd = { + force: input.force, + ref: input.ref, + remoteRef: input.remoteRef, + remote: input.remote, + author: { + name: input.name, + email: input.email + }, + ...await this.parseInput(input), + ...await this.getGitConfig() + } + console.log(cmd) + return await git.push(cmd) + } + + async pull (input) { + const cmd = { + ref: input.ref, + remoteRef: input.remoteRef, + author: { + name: input.name, + email: input.email + }, + remote: input.remote, + ...await this.parseInput(input), + ...await this.getGitConfig() + } + console.log(cmd) + const result = await git.pull(cmd) + await this.call('fileManager', 'refresh') + return result + } + + async fetch (input) { + const cmd = { + ref: input.ref, + remoteRef: input.remoteRef, + author: { + name: input.name, + email: input.email + }, + remote: input.remote, + ...await this.parseInput(input), + ...await this.getGitConfig() + } + console.log(cmd) + const result = await git.fetch(cmd) + await this.call('fileManager', 'refresh') + return result + } + + async export () { if (!this.checkIpfsConfig()) return false const workspace = await this.call('filePanel', 'getCurrentWorkspace') const files = await this.getDirectory('/') @@ -312,10 +431,10 @@ class DGitProvider extends Plugin { const dir = path.dirname(file.path) try { this.createDirectories(`${workspace.absolutePath}/${dir}`) - } catch (e) {} + } catch (e) { } try { window.remixFileSystem.writeFileSync(`${workspace.absolutePath}/${file.path}`, Buffer.concat(content) || new Uint8Array()) - } catch (e) {} + } catch (e) { } } } catch (e) { } @@ -336,8 +455,8 @@ class DGitProvider extends Plugin { return (_lsTotal / 1024).toFixed(2) } - async pull (cmd) { - const permission = await this.askUserPermission('pull', 'Import multiple files into your workspaces.') + async import (cmd) { + const permission = await this.askUserPermission('import', 'Import multiple files into your workspaces.') if (!permission) return false if (this.calculateLocalStorage() > 10000) throw new Error('Local browser storage is full.') const cid = cmd.cid @@ -392,7 +511,7 @@ class DGitProvider extends Plugin { const finalPath = previouspath + '/' + directories[i] try { window.remixFileSystem.mkdirSync(finalPath) - } catch (e) {} + } catch (e) { } } } diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 8f4187cc98..2038a75f8b 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -117,6 +117,12 @@ export class RemixAppManager extends PluginManager { } return true }) + // temp dgit hack + for (const profile of plugins) { + if (profile.name === 'dgit') { + profile.url = 'https://dgit3remix.web.app/' + } + } localStorage.setItem('plugins-directory', JSON.stringify(plugins)) } catch (e) { console.log('getting plugins list from localstorage...') From 097a281e3817c64962fa99e4b0c6e55fc8fd36ce Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sat, 28 Aug 2021 12:50:48 +0200 Subject: [PATCH 002/119] update proxy --- apps/remix-ide/src/app/files/dgitProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/files/dgitProvider.js b/apps/remix-ide/src/app/files/dgitProvider.js index 48e962ce0b..278f837486 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.js +++ b/apps/remix-ide/src/app/files/dgitProvider.js @@ -58,7 +58,7 @@ class DGitProvider extends Plugin { async parseInput (input) { return { - corsProxy: 'http://static.220.14.12.49.clients.your-server.de:3001', + corsProxy: 'https://corsproxy.remixproject.org/', http, onAuth: url => { const auth = { From 23a0a3cf194bc402635ceae2606d9af69c3482aa Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sat, 28 Aug 2021 13:12:57 +0200 Subject: [PATCH 003/119] await refresh --- apps/remix-ide/src/app/files/dgitProvider.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/files/dgitProvider.js b/apps/remix-ide/src/app/files/dgitProvider.js index 278f837486..78e64df8e0 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.js +++ b/apps/remix-ide/src/app/files/dgitProvider.js @@ -90,7 +90,7 @@ class DGitProvider extends Plugin { ...await this.getGitConfig(), ...cmd }) - this.call('fileManager', 'refresh') + await this.call('fileManager', 'refresh') } async rm (cmd) { @@ -98,7 +98,7 @@ class DGitProvider extends Plugin { ...await this.getGitConfig(), ...cmd }) - this.call('fileManager', 'refresh') + await this.call('fileManager', 'refresh') } async checkout (cmd) { @@ -131,7 +131,7 @@ class DGitProvider extends Plugin { ...await this.getGitConfig(), ...cmd }) - this.call('fileManager', 'refresh') + await this.call('fileManager', 'refresh') return status } From cdbf2d02d4627ff5835131645de71650b7d7a325 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sat, 28 Aug 2021 13:44:24 +0200 Subject: [PATCH 004/119] changed event for refresh --- apps/remix-ide/src/app/files/fileManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/files/fileManager.js b/apps/remix-ide/src/app/files/fileManager.js index a378c46cb6..7c4998c716 100644 --- a/apps/remix-ide/src/app/files/fileManager.js +++ b/apps/remix-ide/src/app/files/fileManager.js @@ -134,8 +134,8 @@ class FileManager extends Plugin { */ refresh () { const provider = this.fileProviderOf('/') - // emit folderAdded so that File Explorer reloads the file tree - provider.event.emit('folderAdded', '/') + // emit rootFolderChanged so that File Explorer reloads the file tree + provider.event.emit('rootFolderChanged') } /** From 543b931f154bf5bece39cd7a8c1453f6a200e067 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sat, 28 Aug 2021 18:58:47 +0200 Subject: [PATCH 005/119] add github app temp --- apps/remix-ide/src/remixAppManager.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 2038a75f8b..79368344d7 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -123,6 +123,21 @@ export class RemixAppManager extends PluginManager { profile.url = 'https://dgit3remix.web.app/' } } + const github = { + name: 'GitHub', + displayName: 'GITHUB', + methods: [], + version: '0.0.1', + documentation: 'https://github.com/bunsenstraat/remix-storage-plugin', + url: 'https://dgit3remix.web.app/?compact', + description: 'Manage workspaces in a git repository.', + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1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yLjc1NC0yLjc1LTcuMjEsMC05Ljk1OQ0KCQljMC42OC0wLjY3OSwxLjQ2Ny0xLjE5MywyLjMwNy0xLjUzN1YzNi4zNjljLTAuODQtMC4zNDQtMS42MjUtMC44NTMtMi4zMDctMS41MzdjLTIuMDgzLTIuMDgyLTIuNTg0LTUuMTQtMS41MTYtNy42OTgNCgkJTDMxLjc5OCwxNi43MTVMNC4yODgsNDQuMjIyYy0yLjMxMSwyLjMxMy0yLjMxMSw2LjA2LDAsOC4zNzFsNDAuMTIxLDQwLjExOGMyLjMxLDIuMzExLDYuMDU2LDIuMzExLDguMzY5LDBMOTIuNzEsNTIuNzc5DQoJCUM5NS4wMjEsNTAuNDY4LDk1LjAyMSw0Ni43MTksOTIuNzEsNDQuNDA4eiIvPg0KPC9nPg0KPC9zdmc+DQo=', + location: 'sidePanel', + canActivate: [ + 'dGitProvider' + ] + } + plugins.push(github) localStorage.setItem('plugins-directory', JSON.stringify(plugins)) } catch (e) { console.log('getting plugins list from localstorage...') From fe4664f03d6600b4867fd741454be9500114b9da Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sat, 28 Aug 2021 19:42:07 +0200 Subject: [PATCH 006/119] dgitcompact test --- apps/remix-ide/src/remixAppManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 79368344d7..eb2e504150 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -124,8 +124,8 @@ export class RemixAppManager extends PluginManager { } } const github = { - name: 'GitHub', - displayName: 'GITHUB', + name: 'dgitcompact', + displayName: 'dGit Compact', methods: [], version: '0.0.1', documentation: 'https://github.com/bunsenstraat/remix-storage-plugin', From c1967dd61dad853e776048b556d8ca26a5591d6c Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sun, 29 Aug 2021 14:00:13 +0200 Subject: [PATCH 007/119] diff test --- apps/remix-ide/src/remixAppManager.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index eb2e504150..9d026e480f 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -133,11 +133,25 @@ export class RemixAppManager extends PluginManager { description: 'Manage workspaces in a git repository.', icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOTdweCIgaGVpZ2h0PSI5N3B4IiB2aWV3Qm94PSIwIDAgOTcgOTciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDk3IDk3IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGZpbGw9IiNGMDUxMzMiIGQ9Ik05Mi43MSw0NC40MDhMNTIuNTkxLDQuMjkxYy0yLjMxLTIuMzExLTYuMDU3LTIuMzExLTguMzY5LDBsLTguMzMsOC4zMzJMNDYuNDU5LDIzLjE5DQoJCWMyLjQ1Ni0wLjgzLDUuMjcyLTAuMjczLDcuMjI5LDEuNjg1YzEuOTY5LDEuOTcsMi41MjEsNC44MSwxLjY3LDcuMjc1bDEwLjE4NiwxMC4xODVjMi40NjUtMC44NSw1LjMwNy0wLjMsNy4yNzUsMS42NzENCgkJYzIuNzUsMi43NSwyLjc1LDcuMjA2LDAsOS45NThjLTIuNzUyLDIuNzUxLTcuMjA4LDIuNzUxLTkuOTYxLDBjLTIuMDY4LTIuMDctMi41OC01LjExLTEuNTMxLTcuNjU4bC05LjUtOS40OTl2MjQuOTk3DQoJCWMwLjY3LDAuMzMyLDEuMzAzLDAuNzc0LDEuODYxLDEuMzMyYzIuNzUsMi43NSwyLjc1LDcuMjA2LDAsOS45NTljLTIuNzUsMi43NDktNy4yMDksMi43NDktOS45NTcsMGMtMi43NS0yLjc1NC0yLjc1LTcuMjEsMC05Ljk1OQ0KCQljMC42OC0wLjY3OSwxLjQ2Ny0xLjE5MywyLjMwNy0xLjUzN1YzNi4zNjljLTAuODQtMC4zNDQtMS42MjUtMC44NTMtMi4zMDctMS41MzdjLTIuMDgzLTIuMDgyLTIuNTg0LTUuMTQtMS41MTYtNy42OTgNCgkJTDMxLjc5OCwxNi43MTVMNC4yODgsNDQuMjIyYy0yLjMxMSwyLjMxMy0yLjMxMSw2LjA2LDAsOC4zNzFsNDAuMTIxLDQwLjExOGMyLjMxLDIuMzExLDYuMDU2LDIuMzExLDguMzY5LDBMOTIuNzEsNTIuNzc5DQoJCUM5NS4wMjEsNTAuNDY4LDk1LjAyMSw0Ni43MTksOTIuNzEsNDQuNDA4eiIvPg0KPC9nPg0KPC9zdmc+DQo=', location: 'sidePanel', + canActivate: [ + 'dGitProvider', 'gitdiff' + ] + } + const diff = { + name: 'gitdiff', + displayName: 'dGit diff viewer', + methods: ['diff'], + version: '0.0.1', + documentation: 'https://github.com/bunsenstraat/remix-storage-plugin', + url: 'https://dgit3remix.web.app/?diff', + description: 'Manage workspaces in a git repository.', + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNv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QoJCWMwLjY3LDAuMzMyLDEuMzAzLDAuNzc0LDEuODYxLDEuMzMyYzIuNzUsMi43NSwyLjc1LDcuMjA2LDAsOS45NTljLTIuNzUsMi43NDktNy4yMDksMi43NDktOS45NTcsMGMtMi43NS0yLjc1NC0yLjc1LTcuMjEsMC05Ljk1OQ0KCQljMC42OC0wLjY3OSwxLjQ2Ny0xLjE5MywyLjMwNy0xLjUzN1YzNi4zNjljLTAuODQtMC4zNDQtMS42MjUtMC44NTMtMi4zMDctMS41MzdjLTIuMDgzLTIuMDgyLTIuNTg0LTUuMTQtMS41MTYtNy42OTgNCgkJTDMxLjc5OCwxNi43MTVMNC4yODgsNDQuMjIyYy0yLjMxMSwyLjMxMy0yLjMxMSw2LjA2LDAsOC4zNzFsNDAuMTIxLDQwLjExOGMyLjMxLDIuMzExLDYuMDU2LDIuMzExLDguMzY5LDBMOTIuNzEsNTIuNzc5DQoJCUM5NS4wMjEsNTAuNDY4LDk1LjAyMSw0Ni43MTksOTIuNzEsNDQuNDA4eiIvPg0KPC9nPg0KPC9zdmc+DQo=', + location: 'mainPanel', canActivate: [ 'dGitProvider' ] } - plugins.push(github) + plugins.push(github, diff) localStorage.setItem('plugins-directory', JSON.stringify(plugins)) } catch (e) { console.log('getting plugins list from localstorage...') From 1aa113bcfd64b07c96f62e1f31dcdbfcd4d83389 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sun, 29 Aug 2021 14:09:05 +0200 Subject: [PATCH 008/119] change profile dgit --- apps/remix-ide/src/remixAppManager.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 9d026e480f..ac2736a691 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -121,6 +121,9 @@ export class RemixAppManager extends PluginManager { for (const profile of plugins) { if (profile.name === 'dgit') { profile.url = 'https://dgit3remix.web.app/' + profile.canActivate = [ + 'dGitProvider', 'gitdiff' + ] } } const github = { From c8fc9fc18c3f9699db57c38f59e5c1fc6c3eced1 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sun, 29 Aug 2021 14:22:20 +0200 Subject: [PATCH 009/119] only compact dgit --- apps/remix-ide/src/remixAppManager.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index ac2736a691..f551b4aded 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -120,26 +120,13 @@ export class RemixAppManager extends PluginManager { // temp dgit hack for (const profile of plugins) { if (profile.name === 'dgit') { - profile.url = 'https://dgit3remix.web.app/' + profile.url = 'https://dgit3remix.web.app/?compact' profile.canActivate = [ 'dGitProvider', 'gitdiff' ] + profile.location = 'sidePanel' } } - const github = { - name: 'dgitcompact', - displayName: 'dGit Compact', - methods: [], - version: '0.0.1', - documentation: 'https://github.com/bunsenstraat/remix-storage-plugin', - url: 'https://dgit3remix.web.app/?compact', - description: 'Manage workspaces in a git repository.', - icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiI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LjMxLDIuMzExLDYuMDU2LDIuMzExLDguMzY5LDBMOTIuNzEsNTIuNzc5DQoJCUM5NS4wMjEsNTAuNDY4LDk1LjAyMSw0Ni43MTksOTIuNzEsNDQuNDA4eiIvPg0KPC9nPg0KPC9zdmc+DQo=', - location: 'sidePanel', - canActivate: [ - 'dGitProvider', 'gitdiff' - ] - } const diff = { name: 'gitdiff', displayName: 'dGit diff viewer', @@ -154,7 +141,7 @@ export class RemixAppManager extends PluginManager { 'dGitProvide