resolve conflicts

pull/5100/head
STetsing 2 months ago
parent 2adedaf909
commit ddfbf1bcc4
  1. 22
      apps/remix-ide/src/app.js
  2. 1
      apps/remix-ide/src/app/plugins/electron/appUpdaterPlugin.ts
  3. 2
      apps/remix-ide/src/assets/js/loader.js
  4. 1135
      apps/remix-ide/src/assets/list.json
  5. 9
      apps/remix-ide/src/remixAppManager.js
  6. 19
      apps/remixdesktop/src/engine.ts
  7. 5
      apps/remixdesktop/src/main.ts
  8. 13
      apps/remixdesktop/src/preload.ts

@ -61,10 +61,16 @@ import { remixAIDesktopPlugin } from './app/plugins/electron/remixAIDesktopPlugi
import { RemixAIPlugin } from './app/plugins/remixAIPlugin'
import { SlitherHandleDesktop } from './app/plugins/electron/slitherPlugin'
import { SlitherHandle } from './app/files/slither-handle'
import { FoundryHandle } from './app/files/foundry-handle'
import { FoundryHandleDesktop } from './app/plugins/electron/foundryPlugin'
import { HardhatHandle } from './app/files/hardhat-handle'
import { HardhatHandleDesktop } from './app/plugins/electron/hardhatPlugin'
import { SolCoder } from './app/plugins/solcoderAI'
import { GitPlugin } from './app/plugins/git'
import { Matomo } from './app/plugins/matomo'
import {SolCoder} from './app/plugins/solcoderAI'
import { TemplatesSelectionPlugin } from './app/plugins/templates-selection/templates-selection-plugin'
@ -83,6 +89,7 @@ const Config = require('./config')
const FileManager = require('./app/files/fileManager')
import FileProvider from "./app/files/fileProvider"
import { appPlatformTypes } from '@remix-ui/app'
const DGitProvider = require('./app/files/dgitProvider')
const WorkspaceFileProvider = require('./app/files/workspaceFileProvider')
@ -405,7 +412,6 @@ class AppComponent {
const remixAIDesktop = new remixAIDesktopPlugin()
this.engine.register([remixAIDesktop])
}
const remixAI = new RemixAIPlugin(isElectron())
this.engine.register([remixAI])
@ -416,6 +422,14 @@ class AppComponent {
const slitherPlugin = isElectron() ? new SlitherHandleDesktop() : new SlitherHandle()
this.engine.register([slitherPlugin])
//foundry plugin
const foundryPlugin = isElectron() ? new FoundryHandleDesktop() : new FoundryHandle()
this.engine.register([foundryPlugin])
// hardhat plugin
const hardhatPlugin = isElectron() ? new HardhatHandleDesktop() : new HardhatHandle()
this.engine.register([hardhatPlugin])
// LAYOUT & SYSTEM VIEWS
const appPanel = new MainPanel()
Registry.getInstance().put({ api: this.mainview, name: 'mainview' })
@ -470,8 +484,6 @@ class AppComponent {
analysis,
test,
filePanel.remixdHandle,
filePanel.hardhatHandle,
filePanel.foundryHandle,
filePanel.truffleHandle,
linkLibraries,
deployLibraries,
@ -540,7 +552,7 @@ class AppComponent {
await this.appManager.activatePlugin(['solidity-script', 'remix-templates'])
if (isElectron()) {
await this.appManager.activatePlugin(['isogit', 'electronconfig', 'electronTemplates', 'xterm', 'ripgrep', 'appUpdater', 'remixAID', 'slither'])
await this.appManager.activatePlugin(['isogit', 'electronconfig', 'electronTemplates', 'xterm', 'ripgrep', 'appUpdater', 'slither', 'foundry', 'hardhat', 'remixAID'])
}
this.appManager.on(

@ -8,7 +8,6 @@ const profile = {
export class appUpdaterPlugin extends ElectronPlugin {
constructor() {
console.log('appUpdaterPlugin')
super(profile)
}

@ -10,7 +10,7 @@ let domainToTrack = domains[window.location.hostname]
function trackDomain(domainToTrack) {
var _paq = window._paq = window._paq || []
console.log('Tracking domain', domainToTrack, _paq)
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setExcludedQueryParams", ["code", "gist"]]);
_paq.push(["setExcludedReferrers", ["etherscan.io"]]);

File diff suppressed because it is too large Load Diff

@ -94,6 +94,8 @@ const dependentModules = ['foundry', 'hardhat', 'truffle', 'slither']
const loadLocalPlugins = ['doc-gen', 'doc-viewer', 'etherscan', 'vyper', 'solhint', 'walletconnect', 'circuit-compiler', 'learneth', 'quick-dapp']
const partnerPlugins = ['cookbookdev']
const sensitiveCalls = {
fileManager: ['writeFile', 'copyFile', 'rename', 'copyDir'],
contentImport: ['resolveAndSave'],
@ -164,7 +166,7 @@ export class RemixAppManager extends PluginManager {
this.pluginsDirectory = 'https://raw.githubusercontent.com/ethereum/remix-plugins-directory/master/build/metadata.json'
this.pluginLoader = new PluginLoader()
if (Registry.getInstance().get('platform').api.isDesktop()) {
requiredModules = [...requiredModules, 'fs', 'electronTemplates', 'isogit', 'remix-templates', 'electronconfig', 'xterm', 'compilerloader', 'ripgrep', 'remixAID', 'slither']
requiredModules = [...requiredModules, 'fs', 'electronTemplates', 'isogit', 'remix-templates', 'electronconfig', 'xterm', 'compilerloader', 'ripgrep', 'slither', 'remixAID']
}
}
@ -207,6 +209,11 @@ export class RemixAppManager extends PluginManager {
return true
}
// skipping partner plugins' requests
if (partnerPlugins[from]) {
return true
}
// ask the user for permission
return await this.call('permissionhandler', 'askPermission', this.profiles[from], this.profiles[to], method, message, isSensitiveCall)
}

@ -12,6 +12,9 @@ import { CompilerLoaderPlugin } from './plugins/compilerLoader';
import { SlitherPlugin } from './plugins/slitherPlugin';
import { AppUpdaterPlugin } from './plugins/appUpdater';
import { RemixAIDesktopPlugin } from './plugins/remixAIDektop';
import { FoundryPlugin } from './plugins/foundryPlugin';
import { HardhatPlugin } from './plugins/hardhatPlugin';
import { isE2E } from './main';
const engine = new Engine()
const appManager = new PluginManager()
@ -24,6 +27,8 @@ const ripgrepPlugin = new RipgrepPlugin()
const compilerLoaderPlugin = new CompilerLoaderPlugin()
const slitherPlugin = new SlitherPlugin()
const appUpdaterPlugin = new AppUpdaterPlugin()
const foundryPlugin = new FoundryPlugin()
const hardhatPlugin = new HardhatPlugin()
const remixAIDesktopPlugin = new RemixAIDesktopPlugin()
engine.register(appManager)
@ -35,7 +40,9 @@ engine.register(templatesPlugin)
engine.register(ripgrepPlugin)
engine.register(compilerLoaderPlugin)
engine.register(slitherPlugin)
engine.register(foundryPlugin)
engine.register(appUpdaterPlugin)
engine.register(hardhatPlugin)
engine.register(remixAIDesktopPlugin)
appManager.activatePlugin('electronconfig')
@ -49,6 +56,18 @@ ipcMain.on('fs:openFolder', async (event, path?) => {
fsPlugin.openFolder(event, path)
})
ipcMain.handle('fs:openFolder', async (event, webContentsId, path?) => {
if(!isE2E) return
console.log('openFolder', webContentsId, path)
fsPlugin.openFolder(webContentsId, path)
})
ipcMain.handle('fs:openFolderInSameWindow', async (event, webContentsId, path?) => {
if(!isE2E) return
console.log('openFolderInSameWindow', webContentsId, path)
fsPlugin.openFolderInSameWindow(webContentsId, path)
})
ipcMain.on('terminal:new', async (event) => {
xtermPlugin.new(event)

@ -36,8 +36,8 @@ const windowSet = new Set<BrowserWindow>([]);
export const createWindow = async (dir?: string): Promise<void> => {
// Create the browser window.
const mainWindow = new BrowserWindow({
height: (isE2E ? 1440 : screen.getPrimaryDisplay().size.height * 0.8),
width: (isE2E ? 2560 : screen.getPrimaryDisplay().size.width * 0.8),
height: (isE2E ? 1140 : screen.getPrimaryDisplay().size.height * 0.8),
frame: true,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
@ -145,6 +145,9 @@ HelpMenu(commandKeys, execCommand),
if (!isE2E || isE2ELocal)
Menu.setApplicationMenu(Menu.buildFromTemplate(menu))
ipcMain.handle('logger', async (...args) => {
console.log('log:', ...args)
})
ipcMain.handle('config:isPackaged', async () => {
return isPackaged

@ -6,7 +6,7 @@ console.log('preload.ts', new Date().toLocaleTimeString())
/* preload script needs statically defined API for each plugin */
const exposedPLugins = ['fs', 'git', 'xterm', 'isogit', 'electronconfig', 'electronTemplates', 'ripgrep', 'compilerloader', 'appUpdater', 'remixAID', 'slither']
const exposedPLugins = ['fs', 'git', 'xterm', 'isogit', 'electronconfig', 'electronTemplates', 'ripgrep', 'compilerloader', 'appUpdater', 'slither', 'foundry', 'hardhat', 'remixAID']
let webContentsId: number | undefined
@ -19,7 +19,8 @@ contextBridge.exposeInMainWorld('electronAPI', {
isE2E: () => ipcRenderer.invoke('config:isE2E'),
canTrackMatomo: () => ipcRenderer.invoke('config:canTrackMatomo'),
trackEvent: (args: any[]) => ipcRenderer.invoke('matomo:trackEvent', args),
openFolder: (path: string) => ipcRenderer.invoke('fs:openFolder', webContentsId, path),
openFolderInSameWindow: (path: string) => ipcRenderer.invoke('fs:openFolderInSameWindow', webContentsId, path),
activatePlugin: (name: string) => {
return ipcRenderer.invoke('manager:activatePlugin', name)
},
@ -27,10 +28,16 @@ contextBridge.exposeInMainWorld('electronAPI', {
plugins: exposedPLugins.map(name => {
return {
name,
on: (cb:any) => ipcRenderer.on(`${name}:send`, cb),
on: (cb:any) => {
ipcRenderer.on(`${name}:send`, cb)
},
send: (message: Partial<Message>) => {
//if(name === 'isogit') console.log(name, message)
//if(name === 'isogit') ipcRenderer.invoke(`logger`, name, message)
ipcRenderer.send(`${name}:on:${webContentsId}`, message)
}
}
})
})
Loading…
Cancel
Save