diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index eaf49a9bdb..1131b4bef5 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -1,46 +1,46 @@ 'use strict' - -import { RunTab, makeUdapp } from './app/udapp' -import { RemixEngine } from './remixEngine' -import { RemixAppManager } from './remixAppManager' -import { ThemeModule } from './app/tabs/theme-module' -import { LocaleModule } from './app/tabs/locale-module' -import { NetworkModule } from './app/tabs/network-module' -import { Web3ProviderModule } from './app/tabs/web3-provider' -import { CompileAndRun } from './app/tabs/compile-and-run' -import { PluginStateLogger } from './app/tabs/state-logger' -import { SidePanel } from './app/components/side-panel' -import { StatusBar } from './app/components/status-bar' -import { HiddenPanel } from './app/components/hidden-panel' -import { PinnedPanel } from './app/components/pinned-panel' -import { VerticalIcons } from './app/components/vertical-icons' -import { LandingPage } from './app/ui/landing-page/landing-page' -import { MainPanel } from './app/components/main-panel' -import { PermissionHandlerPlugin } from './app/plugins/permission-handler-plugin' -import { AstWalker } from '@remix-project/remix-astwalker' -import { LinkLibraries, DeployLibraries, OpenZeppelinProxy } from '@remix-project/core-plugin' -import { CodeParser } from './app/plugins/parser/code-parser' -import { SolidityScript } from './app/plugins/solidity-script' - -import { WalkthroughService } from './walkthroughService' - -import { OffsetToLineColumnConverter, CompilerMetadata, CompilerArtefacts, FetchAndCompile, CompilerImports, GistHandler } from '@remix-project/core-plugin' - -import { Registry } from '@remix-project/remix-lib' -import { ConfigPlugin } from './app/plugins/config' -import { StoragePlugin } from './app/plugins/storage' -import { Layout } from './app/panels/layout' -import { NotificationPlugin } from './app/plugins/notification' -import { Blockchain } from './blockchain/blockchain' -import { MergeVMProvider, LondonVMProvider, BerlinVMProvider, ShanghaiVMProvider, CancunVMProvider } from './app/providers/vm-provider' -import { MainnetForkVMProvider } from './app/providers/mainnet-vm-fork-provider' -import { SepoliaForkVMProvider } from './app/providers/sepolia-vm-fork-provider' -import { GoerliForkVMProvider } from './app/providers/goerli-vm-fork-provider' -import { CustomForkVMProvider } from './app/providers/custom-vm-fork-provider' -import { HardhatProvider } from './app/providers/hardhat-provider' -import { GanacheProvider } from './app/providers/ganache-provider' -import { FoundryProvider } from './app/providers/foundry-provider' -import { ExternalHttpProvider } from './app/providers/external-http-provider' +import {RunTab, makeUdapp} from './app/udapp' +import {RemixEngine} from './remixEngine' +import {RemixAppManager} from './remixAppManager' +import {ThemeModule} from './app/tabs/theme-module' +import {LocaleModule} from './app/tabs/locale-module' +import {NetworkModule} from './app/tabs/network-module' +import {Web3ProviderModule} from './app/tabs/web3-provider' +import {CompileAndRun} from './app/tabs/compile-and-run' +import {PluginStateLogger} from './app/tabs/state-logger' +import {SidePanel} from './app/components/side-panel' +import {StatusBar} from './app/components/status-bar' +import {HiddenPanel} from './app/components/hidden-panel' +import {PinnedPanel} from './app/components/pinned-panel' +import {VerticalIcons} from './app/components/vertical-icons' +import {LandingPage} from './app/ui/landing-page/landing-page' +import {MainPanel} from './app/components/main-panel' +import {PermissionHandlerPlugin} from './app/plugins/permission-handler-plugin' +import {AstWalker} from '@remix-project/remix-astwalker' +import {LinkLibraries, DeployLibraries, OpenZeppelinProxy} from '@remix-project/core-plugin' +import {CodeParser} from './app/plugins/parser/code-parser' +import {SolidityScript} from './app/plugins/solidity-script' + +import {WalkthroughService} from './walkthroughService' + +import {OffsetToLineColumnConverter, CompilerMetadata, CompilerArtefacts, FetchAndCompile, CompilerImports, GistHandler} from '@remix-project/core-plugin' + +import {Registry} from '@remix-project/remix-lib' +import {ConfigPlugin} from './app/plugins/config' +import {StoragePlugin} from './app/plugins/storage' +import {Layout} from './app/panels/layout' +import {NotificationPlugin} from './app/plugins/notification' +import {Blockchain} from './blockchain/blockchain' +import {MergeVMProvider, LondonVMProvider, BerlinVMProvider, ShanghaiVMProvider, CancunVMProvider} from './app/providers/vm-provider' +import {MainnetForkVMProvider} from './app/providers/mainnet-vm-fork-provider' +import {SepoliaForkVMProvider} from './app/providers/sepolia-vm-fork-provider' +import {GoerliForkVMProvider} from './app/providers/goerli-vm-fork-provider' +import {CustomForkVMProvider} from './app/providers/custom-vm-fork-provider' +import {HardhatProvider} from './app/providers/hardhat-provider' +import {GanacheProvider} from './app/providers/ganache-provider' +import {FoundryProvider} from './app/providers/foundry-provider' +import {ExternalHttpProvider} from './app/providers/external-http-provider' +import { EnvironmentExplorer } from './app/providers/environment-explorer' import { FileDecorator } from './app/plugins/file-decorator' import { CodeFormat } from './app/plugins/code-format' import { SolidityUmlGen } from './app/plugins/solidity-umlgen' @@ -61,10 +61,10 @@ 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 { 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,7 +83,6 @@ 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') @@ -92,19 +91,19 @@ const PluginManagerComponent = require('./app/components/plugin-manager-componen const CompileTab = require('./app/tabs/compile-tab') const SettingsTab = require('./app/tabs/settings-tab') const AnalysisTab = require('./app/tabs/analysis-tab') -const { DebuggerTab } = require('./app/tabs/debugger-tab') +const {DebuggerTab} = require('./app/tabs/debugger-tab') const TestTab = require('./app/tabs/test-tab') const FilePanel = require('./app/panels/file-panel') const Editor = require('./app/editor/editor') const Terminal = require('./app/panels/terminal') -const { TabProxy } = require('./app/panels/tab-proxy.js') +const {TabProxy} = require('./app/panels/tab-proxy.js') export class platformApi { - get name() { + get name () { return isElectron() ? appPlatformTypes.desktop : appPlatformTypes.web } - isDesktop() { + isDesktop () { return isElectron() } } @@ -124,7 +123,7 @@ class AppComponent { // load app config const config = new Config(configStorage) - Registry.getInstance().put({ api: config, name: 'config' }) + Registry.getInstance().put({api: config, name: 'config'}) // load file system this._components.filesProviders = {} @@ -205,12 +204,12 @@ class AppComponent { this.themeModule = new ThemeModule() // ----------------- locale service --------------------------------- this.localeModule = new LocaleModule() - Registry.getInstance().put({ api: this.themeModule, name: 'themeModule' }) - Registry.getInstance().put({ api: this.localeModule, name: 'localeModule' }) + Registry.getInstance().put({api: this.themeModule, name: 'themeModule'}) + Registry.getInstance().put({api: this.localeModule, name: 'localeModule'}) // ----------------- editor service ---------------------------- const editor = new Editor() // wrapper around ace editor - Registry.getInstance().put({ api: editor, name: 'editor' }) + Registry.getInstance().put({api: editor, name: 'editor'}) editor.event.register('requiringToSaveCurrentfile', (currentFile) => { fileManager.saveCurrentFile() if (currentFile.endsWith('.circom')) this.appManager.activatePlugin(['circuit-compiler']) @@ -218,7 +217,7 @@ class AppComponent { // ----------------- fileManager service ---------------------------- const fileManager = new FileManager(editor, appManager) - Registry.getInstance().put({ api: fileManager, name: 'filemanager' }) + Registry.getInstance().put({api: fileManager, name: 'filemanager'}) // ----------------- dGit provider --------------------------------- const dGitProvider = new DGitProvider() @@ -305,7 +304,7 @@ class AppComponent { // -------------------Terminal---------------------------------------- makeUdapp(blockchain, compilersArtefacts, (domEl) => terminal.logHtml(domEl)) const terminal = new Terminal( - { appManager, blockchain }, + {appManager, blockchain}, { getPosition: (event) => { const limitUp = 36 @@ -410,24 +409,16 @@ class AppComponent { const remixAI = new RemixAIPlugin(isElectron()) this.engine.register([remixAI]) - const compilerloader = isElectron() ? new compilerLoaderPluginDesktop() : new compilerLoaderPlugin() + const compilerloader = isElectron()? new compilerLoaderPluginDesktop(): new compilerLoaderPlugin() this.engine.register([compilerloader]) // slither analyzer plugin (remixd / desktop) 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' }) + Registry.getInstance().put({api: this.mainview, name: 'mainview'}) const tabProxy = new TabProxy(fileManager, editor) this.engine.register([appPanel, tabProxy]) @@ -479,6 +470,8 @@ class AppComponent { analysis, test, filePanel.remixdHandle, + filePanel.hardhatHandle, + filePanel.foundryHandle, filePanel.truffleHandle, linkLibraries, deployLibraries, @@ -487,10 +480,10 @@ class AppComponent { ]) this.layout.panels = { - tabs: { plugin: tabProxy, active: true }, - editor: { plugin: editor, active: true }, - main: { plugin: appPanel, active: false }, - terminal: { plugin: terminal, active: true, minimized: false } + tabs: {plugin: tabProxy, active: true}, + editor: {plugin: editor, active: true}, + main: {plugin: appPanel, active: false}, + terminal: {plugin: terminal, active: true, minimized: false} } } @@ -503,7 +496,7 @@ class AppComponent { } catch (e) { console.log("couldn't register iframe plugins", e.message) } - if (isElectron()) { + if (isElectron()){ await this.appManager.activatePlugin(['fs']) } await this.appManager.activatePlugin(['layout']) @@ -546,8 +539,8 @@ class AppComponent { await this.appManager.activatePlugin(['walkthrough', 'storage', 'search', 'compileAndRun', 'recorder', 'dgitApi', 'dgit']) await this.appManager.activatePlugin(['solidity-script', 'remix-templates']) - if (isElectron()) { - await this.appManager.activatePlugin(['isogit', 'electronconfig', 'electronTemplates', 'xterm', 'ripgrep', 'appUpdater', 'remixAID', 'slither', 'foundry', 'hardhat']) + if (isElectron()){ + await this.appManager.activatePlugin(['isogit', 'electronconfig', 'electronTemplates', 'xterm', 'ripgrep', 'appUpdater', 'remixAID', 'slither']) } this.appManager.on( @@ -562,6 +555,7 @@ class AppComponent { } ) await this.appManager.activatePlugin(['solidity-script']) + await this.appManager.activatePlugin(['solcoder']) await this.appManager.activatePlugin(['filePanel']) // Set workspace after initial activation diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 2b3946bca1..1a8cd8be47 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -6,6 +6,8 @@ import { FileSystemProvider } from '@remix-ui/workspace' // eslint-disable-line import {Registry} from '@remix-project/remix-lib' import { RemixdHandle } from '../plugins/remixd-handle' import {PluginViewWrapper} from '@remix-ui/helper' +const { HardhatHandle } = require('../files/hardhat-handle.js') +const { FoundryHandle } = require('../files/foundry-handle.js') const { TruffleHandle } = require('../files/truffle-handle.js') /* @@ -66,6 +68,8 @@ module.exports = class Filepanel extends ViewPlugin { this.el.setAttribute('id', 'fileExplorerView') this.remixdHandle = new RemixdHandle(this.fileProviders.localhost, appManager) + this.hardhatHandle = new HardhatHandle() + this.foundryHandle = new FoundryHandle() this.truffleHandle = new TruffleHandle() this.contentImport = contentImport this.workspaces = [] diff --git a/apps/remix-ide/src/app/plugins/electron/foundryPlugin.ts b/apps/remix-ide/src/app/plugins/electron/foundryPlugin.ts deleted file mode 100644 index 1655681697..0000000000 --- a/apps/remix-ide/src/app/plugins/electron/foundryPlugin.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ElectronPlugin } from '@remixproject/engine-electron'; - -export class FoundryHandleDesktop extends ElectronPlugin { - constructor() { - super({ - displayName: 'foundry', - name: 'foundry', - description: 'electron foundry', - methods: ['sync', 'compile'] - }) - this.methods = ['sync', 'compile'] - } -} diff --git a/apps/remix-ide/src/app/plugins/electron/hardhatPlugin.ts b/apps/remix-ide/src/app/plugins/electron/hardhatPlugin.ts deleted file mode 100644 index fad7190df4..0000000000 --- a/apps/remix-ide/src/app/plugins/electron/hardhatPlugin.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ElectronPlugin } from '@remixproject/engine-electron'; - -export class HardhatHandleDesktop extends ElectronPlugin { - constructor() { - super({ - displayName: 'hardhat', - name: 'hardhat', - description: 'electron hardhat', - methods: ['sync', 'compile'] - }) - this.methods = ['sync', 'compile'] - } -} diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index 1fb7dea231..e3505358af 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -9,7 +9,7 @@ import { QueryParams } from '@remix-project/remix-lib' import * as packageJson from '../../../../../package.json' import { compilerConfigChangedToastMsg, compileToastMsg } from '@remix-ui/helper' import { isNative } from '../../remixAppManager' -import { Registry } from '@remix-project/remix-lib' + const profile = { name: 'solidity', displayName: 'Solidity compiler', @@ -90,10 +90,6 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA return this.fileManager.mode } - isDesktop () { - return Registry.getInstance().get('platform').api.isDesktop() - } - /** * set the compiler configuration * This function is used by remix-plugin compiler API. diff --git a/apps/remixdesktop/package.json b/apps/remixdesktop/package.json index cf451cbbff..ad879a6278 100644 --- a/apps/remixdesktop/package.json +++ b/apps/remixdesktop/package.json @@ -1,7 +1,7 @@ { "name": "remixdesktop", - "version": "1.0.7-insiders", - "main": "build/main.js", + "version": "1.0.5-insiders", + "main": "build/apps/remixdesktop/src/main.js", "license": "MIT", "type": "commonjs", "description": "Remix IDE Desktop", @@ -22,9 +22,9 @@ "category": "public.app-category.productivity" }, "scripts": { - "start:dev": "yarn webpack --config webpack.config.js && electron --inspect=5858 .", - "start:production": "cross-env NODE_ENV=production yarn webpack --config webpack.config.js && electron .", - "dist": "cross-env NODE_ENV=production yarn webpack --config webpack.config.js && electron-builder -p never", + "start:dev": "tsc && cp -R node_modules/yarn build/tools/ && cross-env NODE_ENV=development electron --inspect=5858 .", + "start:production": "tsc && && cp -R node_modules/yarn build/tools/ && cross-env NODE_ENV=production electron .", + "dist": "tsc && cp -R node_modules/yarn build/tools/ && electron-builder -p never", "installRipGrepMacOXx64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=x64 node node_modules/@vscode/ripgrep/lib/postinstall.js", "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", @@ -49,13 +49,7 @@ "node-fetch": "2.6.1", "onnxruntime-web": "^1.18.0", "selenium-standalone": "^9.3.1", - "ts-loader": "^9.5.1", - "tsconfig-paths-webpack-plugin": "^4.1.0", "typescript": "^5.1.3", - "webpack": "^5.92.1", - "webpack-cli": "^5.1.4", - "webpack-merge": "^6.0.1", - "webpack-node-externals": "^3.0.0", "yarn": "^1.22.21" }, "dependencies": { diff --git a/apps/remixdesktop/src/engine.ts b/apps/remixdesktop/src/engine.ts index ce6cfce9bf..f65ad2fae7 100644 --- a/apps/remixdesktop/src/engine.ts +++ b/apps/remixdesktop/src/engine.ts @@ -12,9 +12,6 @@ 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() @@ -28,8 +25,6 @@ const compilerLoaderPlugin = new CompilerLoaderPlugin() const slitherPlugin = new SlitherPlugin() const appUpdaterPlugin = new AppUpdaterPlugin() const remixAIDesktopPlugin = new RemixAIDesktopPlugin() -const foundryPlugin = new FoundryPlugin() -const hardhatPlugin = new HardhatPlugin() engine.register(appManager) engine.register(fsPlugin) @@ -40,10 +35,8 @@ engine.register(templatesPlugin) engine.register(ripgrepPlugin) engine.register(compilerLoaderPlugin) engine.register(slitherPlugin) -engine.register(foundryPlugin) engine.register(appUpdaterPlugin) engine.register(remixAIDesktopPlugin) -engine.register(hardhatPlugin) appManager.activatePlugin('electronconfig') appManager.activatePlugin('fs') @@ -56,18 +49,6 @@ 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) diff --git a/apps/remixdesktop/src/lib/remixd.ts b/apps/remixdesktop/src/lib/remixd.ts index ea3c2afd2b..4315da2880 100644 --- a/apps/remixdesktop/src/lib/remixd.ts +++ b/apps/remixdesktop/src/lib/remixd.ts @@ -28,7 +28,6 @@ export class ElectronBasePluginRemixdClient extends ElectronBasePluginClient { this.onload(async () => { this.on('fs' as any, 'workingDirChanged', async (path: string) => { - console.log('workingDirChanged base remixd', path) this.currentSharedFolder = path }) this.currentSharedFolder = await this.call('fs' as any, 'getWorkingDir') diff --git a/apps/remixdesktop/src/lib/slither.ts b/apps/remixdesktop/src/lib/slither.ts new file mode 100644 index 0000000000..3ff55f80dd --- /dev/null +++ b/apps/remixdesktop/src/lib/slither.ts @@ -0,0 +1,193 @@ +import { existsSync, readFileSync, readdirSync, unlinkSync } from 'fs' +import * as utils from './utils' +const { spawn, execSync } = require('child_process') // eslint-disable-line +export interface OutputStandard { + description: string + title: string + confidence: string + severity: string + sourceMap: any + category?: string + reference?: string + example?: any + [key: string]: any +} + +export const SlitherClientMixin = (Base) => class extends Base { + methods: Array + currentSharedFolder: string + + constructor(...args: any[]) { + super(...args); // Ensure the parent constructor is called + } + + + log(...message: any) { + if (this.log) { + this.log(...message) + } else { + console.log(...message) + } + } + + error(...message: any) { + if (this.error) { + this.error(...message) + } else { + console.error(...message) + } + } + + + mapNpmDepsDir(list) { + const remixNpmDepsPath = utils.absolutePath('.deps/npm', this.currentSharedFolder) + const localNpmDepsPath = utils.absolutePath('node_modules', this.currentSharedFolder) + const npmDepsExists = existsSync(remixNpmDepsPath) + const nodeModulesExists = existsSync(localNpmDepsPath) + let isLocalDep = false + let isRemixDep = false + let allowPathString = '' + let remapString = '' + + for (const e of list) { + const importPath = e.replace(/import ['"]/g, '').trim() + const packageName = importPath.split('/')[0] + if (nodeModulesExists && readdirSync(localNpmDepsPath).includes(packageName)) { + isLocalDep = true + remapString += `${packageName}=./node_modules/${packageName} ` + } else if (npmDepsExists && readdirSync(remixNpmDepsPath).includes(packageName)) { + isRemixDep = true + remapString += `${packageName}=./.deps/npm/${packageName} ` + } + } + if (isLocalDep) allowPathString += './node_modules,' + if (isRemixDep) allowPathString += './.deps/npm,' + + return { remapString, allowPathString } + } + + transform(detectors: Record[]): OutputStandard[] { + const standardReport: OutputStandard[] = [] + for (const e of detectors) { + const obj = {} as OutputStandard + obj.description = e.description + obj.title = e.check + obj.confidence = e.confidence + obj.severity = e.impact + obj.sourceMap = e.elements.map((element) => { + delete element.source_mapping.filename_used + delete element.source_mapping.filename_absolute + return element + }) + standardReport.push(obj) + } + return standardReport + } + + analyse(filePath: string, compilerConfig: Record) { + return new Promise((resolve, reject) => { + const options = { cwd: this.currentSharedFolder, shell: true } + + const { currentVersion, optimize, evmVersion } = compilerConfig + if (currentVersion && currentVersion.includes('+commit')) { + // Get compiler version with commit id e.g: 0.8.2+commit.661d110 + const versionString: string = currentVersion.substring(0, currentVersion.indexOf('+commit') + 16) + this.log(`[Slither Analysis]: Compiler version is ${versionString}`) + let solcOutput: Buffer + // Check solc current installed version + try { + solcOutput = execSync('solc --version', options) + } catch (err) { + this.error(err) + reject(new Error('Error in running solc command')) + } + if (!solcOutput.toString().includes(versionString)) { + this.log('[Slither Analysis]: Compiler version is different from installed solc version') + // Get compiler version without commit id e.g: 0.8.2 + const version: string = versionString.substring(0, versionString.indexOf('+commit')) + // List solc versions installed using solc-select + try { + const solcSelectInstalledVersions: Buffer = execSync('solc-select versions', options) + // Check if required version is already installed + if (!solcSelectInstalledVersions.toString().includes(version)) { + this.log(`[Slither Analysis]: Installing ${version} using solc-select`) + // Install required version + execSync(`solc-select install ${version}`, options) + } + this.log(`[Slither Analysis]: Setting ${version} as current solc version using solc-select`) + // Set solc current version as required version + execSync(`solc-select use ${version}`, options) + } catch (err) { + this.error(err) + reject(new Error('Error in running solc-select command')) + } + } else this.log('[Slither Analysis]: Compiler version is same as installed solc version') + } + // Allow paths and set solc remapping for import URLs + const fileContent = readFileSync(utils.absolutePath(filePath, this.currentSharedFolder), 'utf8') + const importsArr = fileContent.match(/import ['"][^.|..](.+?)['"];/g) + let remaps = '' + if (importsArr?.length) { + const { remapString } = this.mapNpmDepsDir(importsArr) + remaps = remapString.trim() + } + const optimizeOption: string = optimize ? '--optimize' : '' + const evmOption: string = evmVersion ? `--evm-version ${evmVersion}` : '' + let solcArgs = '' + if (optimizeOption) { + solcArgs += optimizeOption + ' ' + } + if (evmOption) { + if (!solcArgs.endsWith(' ')) solcArgs += ' ' + solcArgs += evmOption + } + if (solcArgs) { + solcArgs = `--solc-args "${solcArgs.trimStart()}"` + } + const solcRemaps = remaps ? `--solc-remaps "${remaps}"` : '' + + const outputFile = 'remix-slither-report.json' + try { + // We don't keep the previous analysis + const outputFilePath = utils.absolutePath(outputFile, this.currentSharedFolder) + if (existsSync(outputFilePath)) unlinkSync(outputFilePath) + } catch (e) { + this.error('unable to remove the output file') + this.error(e.message) + } + const cmd = `slither ${filePath} ${solcArgs} ${solcRemaps} --json ${outputFile}` + this.log('[Slither Analysis]: Running Slither...') + // Added `stdio: 'ignore'` as for contract with NPM imports analysis which is exported in 'stderr' + // get too big and hangs the process. We process analysis from the report file only + const child = spawn(cmd, { cwd: this.currentSharedFolder, shell: true, stdio: 'ignore' }) + + const response = {} + child.on('close', () => { + const outputFileAbsPath: string = utils.absolutePath(outputFile, this.currentSharedFolder) + // Check if slither report file exists + if (existsSync(outputFileAbsPath)) { + let report = readFileSync(outputFileAbsPath, 'utf8') + report = JSON.parse(report) + if (report['success']) { + response['status'] = true + if (!report['results'] || !report['results'].detectors || !report['results'].detectors.length) { + response['count'] = 0 + } else { + const { detectors } = report['results'] + response['count'] = detectors.length + response['data'] = this.transform(detectors) + } + + resolve(response) + } else { + this.log(report['error']) + reject(new Error('Error in running Slither Analysis.')) + } + } else { + this.error('Error in generating Slither Analysis Report. Make sure Slither is properly installed.') + reject(new Error('Error in generating Slither Analysis Report. Make sure Slither is properly installed.')) + } + }) + }) + } +} diff --git a/apps/remixdesktop/src/lib/utils.ts b/apps/remixdesktop/src/lib/utils.ts index 1520915d8b..e406b647b9 100644 --- a/apps/remixdesktop/src/lib/utils.ts +++ b/apps/remixdesktop/src/lib/utils.ts @@ -19,6 +19,6 @@ function normalizePath (path) { return path } -export { absolutePath, normalizePath } +export { absolutePath } diff --git a/apps/remixdesktop/src/plugins/foundryPlugin.ts b/apps/remixdesktop/src/plugins/foundryPlugin.ts deleted file mode 100644 index 71a24c58b8..0000000000 --- a/apps/remixdesktop/src/plugins/foundryPlugin.ts +++ /dev/null @@ -1,248 +0,0 @@ -import { Profile } from "@remixproject/plugin-utils"; -import { ElectronBasePlugin, ElectronBasePluginClient } from "@remixproject/plugin-electron" -import chokidar from 'chokidar' -import { ElectronBasePluginRemixdClient } from "../lib/remixd" -import fs from 'fs' -import * as utils from '../lib/utils' - -import { basename, join } from "path"; -import { spawn } from "child_process"; -const profile: Profile = { - name: 'foundry', - displayName: 'electron foundry', - description: 'electron foundry', -} - -export class FoundryPlugin extends ElectronBasePlugin { - clients: any[] - constructor() { - super(profile, clientProfile, FoundryPluginClient) - this.methods = [...super.methods] - } -} - -const clientProfile: Profile = { - name: 'foundry', - displayName: 'electron foundry', - description: 'electron foundry', - methods: ['sync', 'compile'] -} - - -class FoundryPluginClient extends ElectronBasePluginRemixdClient { - - watcher: chokidar.FSWatcher - warnlog: boolean - buildPath: string - cachePath: string - logTimeout: NodeJS.Timeout - processingTimeout: NodeJS.Timeout - - async onActivation(): Promise { - console.log('Foundry plugin activated') - this.call('terminal', 'log', { type: 'log', value: 'Foundry plugin activated' }) - this.on('fs' as any, 'workingDirChanged', async (path: string) => { - console.log('workingDirChanged foundry', path) - this.currentSharedFolder = path - this.startListening() - }) - this.currentSharedFolder = await this.call('fs' as any, 'getWorkingDir') - if(this.currentSharedFolder) this.startListening() - } - - startListening() { - this.buildPath = utils.absolutePath('out', this.currentSharedFolder) - this.cachePath = utils.absolutePath('cache', this.currentSharedFolder) - console.log('Foundry plugin checking for', this.buildPath, this.cachePath) - if (fs.existsSync(this.buildPath) && fs.existsSync(this.cachePath)) { - this.listenOnFoundryCompilation() - } else { - this.listenOnFoundryFolder() - } - } - - listenOnFoundryFolder() { - console.log('Foundry out folder doesn\'t exist... waiting for the compilation.') - try { - if (this.watcher) this.watcher.close() - this.watcher = chokidar.watch(this.currentSharedFolder, { depth: 1, ignorePermissionErrors: true, ignoreInitial: true }) - // watch for new folders - this.watcher.on('addDir', (path: string) => { - console.log('add dir foundry', path) - if (fs.existsSync(this.buildPath) && fs.existsSync(this.cachePath)) { - this.listenOnFoundryCompilation() - } - }) - } catch (e) { - console.log(e) - } - } - - compile() { - return new Promise((resolve, reject) => { - const cmd = `forge build` - const options = { cwd: this.currentSharedFolder, shell: true } - const child = spawn(cmd, options) - let result = '' - let error = '' - child.stdout.on('data', (data) => { - const msg = `[Foundry Compilation]: ${data.toString()}` - console.log('\x1b[32m%s\x1b[0m', msg) - result += msg + '\n' - }) - child.stderr.on('data', (err) => { - error += `[Foundry Compilation]: ${err.toString()} \n` - }) - child.on('close', () => { - if (error && result) resolve(error + result) - else if (error) reject(error) - else resolve(result) - }) - }) - } - - checkPath() { - if (!fs.existsSync(this.buildPath) || !fs.existsSync(this.cachePath)) { - this.listenOnFoundryFolder() - return false - } - if (!fs.existsSync(join(this.cachePath, 'solidity-files-cache.json'))) return false - return true - } - - private async processArtifact() { - if (!this.checkPath()) return - const folderFiles = await fs.promises.readdir(this.buildPath) // "out" folder - try { - const cache = JSON.parse(await fs.promises.readFile(join(this.cachePath, 'solidity-files-cache.json'), { encoding: 'utf-8' })) - // name of folders are file names - for (const file of folderFiles) { - const path = join(this.buildPath, file) // out/Counter.sol/ - const compilationResult = { - input: {}, - output: { - contracts: {}, - sources: {} - }, - inputSources: { sources: {}, target: '' }, - solcVersion: null, - compilationTarget: null - } - compilationResult.inputSources.target = file - await this.readContract(path, compilationResult, cache) - this.emit('compilationFinished', compilationResult.compilationTarget, { sources: compilationResult.input }, 'soljson', compilationResult.output, compilationResult.solcVersion) - } - - clearTimeout(this.logTimeout) - this.logTimeout = setTimeout(() => { - // @ts-ignore - this.call('terminal', 'log', { type: 'log', value: `receiving compilation result from Foundry. Select a file to populate the contract interaction interface.` }) - console.log('Syncing compilation result from Foundry') - }, 1000) - - } catch (e) { - console.log(e) - } - } - - async triggerProcessArtifact() { - // prevent multiple calls - clearTimeout(this.processingTimeout) - this.processingTimeout = setTimeout(async () => await this.processArtifact(), 1000) - } - - listenOnFoundryCompilation() { - try { - console.log('Foundry out folder exists... processing the artifact.') - if (this.watcher) this.watcher.close() - this.watcher = chokidar.watch(this.cachePath, { depth: 0, ignorePermissionErrors: true, ignoreInitial: true }) - this.watcher.on('change', async () => await this.triggerProcessArtifact()) - this.watcher.on('add', async () => await this.triggerProcessArtifact()) - this.watcher.on('unlink', async () => await this.triggerProcessArtifact()) - // process the artifact on activation - this.triggerProcessArtifact() - } catch (e) { - console.log(e) - } - } - - async readContract(contractFolder, compilationResultPart, cache) { - const files = await fs.promises.readdir(contractFolder) - for (const file of files) { - const path = join(contractFolder, file) - const content = await fs.promises.readFile(path, { encoding: 'utf-8' }) - compilationResultPart.inputSources.sources[file] = { content } - await this.feedContractArtifactFile(file, content, compilationResultPart, cache) - } - } - - async feedContractArtifactFile(path, content, compilationResultPart, cache) { - const contentJSON = JSON.parse(content) - const contractName = basename(path).replace('.json', '') - - let sourcePath = '' - if (contentJSON?.metadata?.settings?.compilationTarget) { - for (const key in contentJSON.metadata.settings.compilationTarget) { - if (contentJSON.metadata.settings.compilationTarget[key] === contractName) { - sourcePath = key - break - } - } - } - - if (!sourcePath) return - - const currentCache = cache.files[sourcePath] - if (!currentCache.artifacts[contractName]) return - - // extract source and version - const metadata = contentJSON.metadata - if (metadata.compiler && metadata.compiler.version) { - compilationResultPart.solcVersion = metadata.compiler.version - } else { - compilationResultPart.solcVersion = '' - console.log('\x1b[32m%s\x1b[0m', 'compiler version not found, please update Foundry to the latest version.') - } - - if (metadata.sources) { - for (const path in metadata.sources) { - const absPath = utils.absolutePath(path, this.currentSharedFolder) - try { - const content = await fs.promises.readFile(absPath, { encoding: 'utf-8' }) - compilationResultPart.input[path] = { content } - } catch (e) { - compilationResultPart.input[path] = { content: '' } - } - } - } else { - console.log('\x1b[32m%s\x1b[0m', 'sources input not found, please update Foundry to the latest version.') - } - - compilationResultPart.compilationTarget = sourcePath - // extract data - if (!compilationResultPart.output['sources'][sourcePath]) compilationResultPart.output['sources'][sourcePath] = {} - compilationResultPart.output['sources'][sourcePath] = { - ast: contentJSON['ast'], - id: contentJSON['id'] - } - if (!compilationResultPart.output['contracts'][sourcePath]) compilationResultPart.output['contracts'][sourcePath] = {} - - contentJSON.bytecode.object = contentJSON.bytecode.object.replace('0x', '') - contentJSON.deployedBytecode.object = contentJSON.deployedBytecode.object.replace('0x', '') - compilationResultPart.output['contracts'][sourcePath][contractName] = { - abi: contentJSON.abi, - evm: { - bytecode: contentJSON.bytecode, - deployedBytecode: contentJSON.deployedBytecode, - methodIdentifiers: contentJSON.methodIdentifiers - } - } - } - - async sync() { - console.log('syncing Foundry with Remix...') - this.processArtifact() - } -} - - diff --git a/apps/remixdesktop/src/plugins/fsPlugin.ts b/apps/remixdesktop/src/plugins/fsPlugin.ts index 0f45727066..d01235de66 100644 --- a/apps/remixdesktop/src/plugins/fsPlugin.ts +++ b/apps/remixdesktop/src/plugins/fsPlugin.ts @@ -32,15 +32,6 @@ const getBaseName = (pathName: string): string => { return path.basename(pathName) } -function onlyUnique(value: recentFolder, index: number, self: recentFolder[]) { - console.log(index, value) - return self.findIndex((rc, index) => rc.path === value.path) === index -} - -const deplucateFolderList = (list: recentFolder[]): recentFolder[] => { - return list.filter(onlyUnique) -} - export class FSPlugin extends ElectronBasePlugin { clients: FSPluginClient[] = [] constructor() { @@ -49,28 +40,28 @@ export class FSPlugin extends ElectronBasePlugin { } async onActivation(): Promise { - const config = await this.call('electronconfig', 'readConfig') + const config = await this.call('electronconfig' as any, 'readConfig') const openedFolders = (config && config.openedFolders) || [] - const recentFolders: recentFolder[] = (config && config.recentFolders) || [] + const recentFolders = (config && config.recentFolders) || [] this.call('electronconfig', 'writeConfig', {...config, - recentFolders: deplucateFolderList(recentFolders), + recentFolders: recentFolders, openedFolders: openedFolders}) const foldersToDelete: string[] = [] - if (recentFolders && recentFolders.length) { - for (const folder of recentFolders) { + if (openedFolders && openedFolders.length) { + for (const folder of openedFolders) { try { - const stat = await fs.stat(folder.path); + const stat = await fs.stat(folder) if (stat.isDirectory()) { // do nothing } } catch (e) { console.log('error opening folder', folder, e) - foldersToDelete.push(folder.path) + foldersToDelete.push(folder) } } if (foldersToDelete.length) { - const newFolders = recentFolders.filter((f: recentFolder) => !foldersToDelete.includes(f.path)) - this.call('electronconfig', 'writeConfig', {recentFolders: deplucateFolderList(newFolders)}) + const newFolders = openedFolders.filter((f: string) => !foldersToDelete.includes(f)) + this.call('electronconfig', 'writeConfig', {recentFolders: newFolders}) } } createWindow() @@ -94,13 +85,6 @@ export class FSPlugin extends ElectronBasePlugin { client.openFolder(path) } } - - openFolderInSameWindow(webContentsId: any, path?: string): void { - const client = this.clients.find((c) => c.webContentsId === webContentsId) - if (client) { - client.openFolderInSameWindow(path) - } - } } const clientProfile: Profile = { @@ -362,7 +346,6 @@ class FSPluginClient extends ElectronBasePluginClient { path, timestamp, }) - config.recentFolders = deplucateFolderList(config.recentFolders) writeConfig(config) } diff --git a/apps/remixdesktop/src/plugins/hardhatPlugin.ts b/apps/remixdesktop/src/plugins/hardhatPlugin.ts deleted file mode 100644 index ffef08e1c7..0000000000 --- a/apps/remixdesktop/src/plugins/hardhatPlugin.ts +++ /dev/null @@ -1,220 +0,0 @@ -import { Profile } from "@remixproject/plugin-utils"; -import { ElectronBasePlugin, ElectronBasePluginClient } from "@remixproject/plugin-electron" -import chokidar from 'chokidar' -import { ElectronBasePluginRemixdClient } from "../lib/remixd" -import fs from 'fs' -import * as utils from '../lib/utils' - -import { basename, join } from "path"; -import { spawn } from "child_process"; -const profile: Profile = { - name: 'hardhat', - displayName: 'electron slither', - description: 'electron slither', -} - -export class HardhatPlugin extends ElectronBasePlugin { - clients: any[] - constructor() { - super(profile, clientProfile, HardhatPluginClient) - this.methods = [...super.methods] - } -} - -const clientProfile: Profile = { - name: 'hardhat', - displayName: 'electron hardhat', - description: 'electron hardhat', - methods: ['sync', 'compile'] -} - - -class HardhatPluginClient extends ElectronBasePluginRemixdClient { - watcher: chokidar.FSWatcher - warnlog: boolean - buildPath: string - cachePath: string - logTimeout: NodeJS.Timeout - processingTimeout: NodeJS.Timeout - - async onActivation(): Promise { - console.log('Hardhat plugin activated') - this.call('terminal', 'log', { type: 'log', value: 'Hardhat plugin activated' }) - - this.on('fs' as any, 'workingDirChanged', async (path: string) => { - console.log('workingDirChanged hardhat', path) - this.currentSharedFolder = path - this.startListening() - }) - this.currentSharedFolder = await this.call('fs' as any, 'getWorkingDir') - if(this.currentSharedFolder) this.startListening() - } - - startListening() { - this.buildPath = utils.absolutePath('artifacts/contracts', this.currentSharedFolder) - if (fs.existsSync(this.buildPath)) { - this.listenOnHardhatCompilation() - } else { - console.log('If you are using Hardhat, run `npx hardhat compile` or run the compilation with `Enable Hardhat Compilation` checked from the Remix IDE.') - this.listenOnHardHatFolder() - } - } - - compile(configPath: string) { - return new Promise((resolve, reject) => { - const cmd = `npx hardhat compile --config ${utils.normalizePath(configPath)}` - const options = { cwd: this.currentSharedFolder, shell: true } - const child = spawn(cmd, options) - let result = '' - let error = '' - child.stdout.on('data', (data) => { - const msg = `[Hardhat Compilation]: ${data.toString()}` - console.log('\x1b[32m%s\x1b[0m', msg) - result += msg + '\n' - }) - child.stderr.on('data', (err) => { - error += `[Hardhat Compilation]: ${err.toString()} \n` - }) - child.on('close', () => { - if (error && result) resolve(error + result) - else if (error) reject(error) - else resolve(result) - }) - }) - } - - checkPath() { - if (!fs.existsSync(this.buildPath)) { - this.listenOnHardHatFolder() - return false - } - return true - } - - private async processArtifact() { - console.log('processing artifact') - if (!this.checkPath()) return - // resolving the files - const folderFiles = await fs.promises.readdir(this.buildPath) - const targetsSynced = [] - // name of folders are file names - for (const file of folderFiles) { // ["artifacts/contracts/Greeter.sol/"] - const contractFilePath = join(this.buildPath, file) - const stat = await fs.promises.stat(contractFilePath) - if (!stat.isDirectory()) continue - const files = await fs.promises.readdir(contractFilePath) - const compilationResult = { - input: {}, - output: { - contracts: {}, - sources: {} - }, - solcVersion: null, - target: null - } - for (const file of files) { - if (file.endsWith('.dbg.json')) { // "artifacts/contracts/Greeter.sol/Greeter.dbg.json" - const stdFile = file.replace('.dbg.json', '.json') - const contentStd = await fs.promises.readFile(join(contractFilePath, stdFile), { encoding: 'utf-8' }) - const contentDbg = await fs.promises.readFile(join(contractFilePath, file), { encoding: 'utf-8' }) - const jsonDbg = JSON.parse(contentDbg) - const jsonStd = JSON.parse(contentStd) - compilationResult.target = jsonStd.sourceName - - targetsSynced.push(compilationResult.target) - const path = join(contractFilePath, jsonDbg.buildInfo) - const content = await fs.promises.readFile(path, { encoding: 'utf-8' }) - - await this.feedContractArtifactFile(content, compilationResult) - } - if (compilationResult.target) { - // we are only interested in the contracts that are in the target of the compilation - compilationResult.output = { - ...compilationResult.output, - contracts: { [compilationResult.target]: compilationResult.output.contracts[compilationResult.target] } - } - this.emit('compilationFinished', compilationResult.target, { sources: compilationResult.input }, 'soljson', compilationResult.output, compilationResult.solcVersion) - } - } - } - - clearTimeout(this.logTimeout) - this.logTimeout = setTimeout(() => { - this.call('terminal', 'log', { value: 'receiving compilation result from Hardhat. Select a file to populate the contract interaction interface.', type: 'log' }) - if (targetsSynced.length) { - console.log(`Processing artifacts for files: ${[...new Set(targetsSynced)].join(', ')}`) - // @ts-ignore - this.call('terminal', 'log', { type: 'log', value: `synced with Hardhat: ${[...new Set(targetsSynced)].join(', ')}` }) - } else { - console.log('No artifacts to process') - // @ts-ignore - this.call('terminal', 'log', { type: 'log', value: 'No artifacts from Hardhat to process' }) - } - }, 1000) - - } - - listenOnHardHatFolder() { - console.log('Hardhat artifacts folder doesn\'t exist... waiting for the compilation.') - try { - if (this.watcher) this.watcher.close() - this.watcher = chokidar.watch(this.currentSharedFolder, { depth: 2, ignorePermissionErrors: true, ignoreInitial: true }) - // watch for new folders - this.watcher.on('addDir', (path: string) => { - console.log('add dir hardhat', path) - if (fs.existsSync(this.buildPath)) { - this.listenOnHardhatCompilation() - } - }) - } catch (e) { - console.log('listenOnHardHatFolder', e) - } - } - - async triggerProcessArtifact() { - console.log('triggerProcessArtifact') - // prevent multiple calls - clearTimeout(this.processingTimeout) - this.processingTimeout = setTimeout(async () => await this.processArtifact(), 1000) - } - - listenOnHardhatCompilation() { - try { - console.log('listening on Hardhat compilation...', this.buildPath) - if (this.watcher) this.watcher.close() - this.watcher = chokidar.watch(this.buildPath, { depth: 1, ignorePermissionErrors: true, ignoreInitial: true }) - this.watcher.on('change', async () => await this.triggerProcessArtifact()) - this.watcher.on('add', async () => await this.triggerProcessArtifact()) - this.watcher.on('unlink', async () => await this.triggerProcessArtifact()) - // process the artifact on activation - this.processArtifact() - } catch (e) { - console.log('listenOnHardhatCompilation', e) - } - } - - async sync() { - console.log('syncing from Hardhat') - this.processArtifact() - } - - async feedContractArtifactFile(artifactContent, compilationResultPart) { - const contentJSON = JSON.parse(artifactContent) - compilationResultPart.solcVersion = contentJSON.solcVersion - for (const file in contentJSON.input.sources) { - const source = contentJSON.input.sources[file] - const absPath = join(this.currentSharedFolder, file) - if (fs.existsSync(absPath)) { // if not that is a lib - const contentOnDisk = await fs.promises.readFile(absPath, { encoding: 'utf-8' }) - if (contentOnDisk === source.content) { - compilationResultPart.input[file] = source - compilationResultPart.output['sources'][file] = contentJSON.output.sources[file] - compilationResultPart.output['contracts'][file] = contentJSON.output.contracts[file] - if (contentJSON.output.errors && contentJSON.output.errors.length) { - compilationResultPart.output['errors'] = contentJSON.output.errors.filter(error => error.sourceLocation.file === file) - } - } - } - } - } -} \ No newline at end of file diff --git a/apps/remixdesktop/src/plugins/slitherPlugin.ts b/apps/remixdesktop/src/plugins/slitherPlugin.ts index abf7971e30..5819e0a46b 100644 --- a/apps/remixdesktop/src/plugins/slitherPlugin.ts +++ b/apps/remixdesktop/src/plugins/slitherPlugin.ts @@ -2,22 +2,7 @@ import { Profile } from "@remixproject/plugin-utils"; import { ElectronBasePlugin, ElectronBasePluginClient } from "@remixproject/plugin-electron" import { ElectronBasePluginRemixdClient } from "../lib/remixd" -import * as utils from '../lib/utils' -import { existsSync, readdirSync, readFileSync, unlinkSync } from "fs-extra"; - -export interface OutputStandard { - description: string - title: string - confidence: string - severity: string - sourceMap: any - category?: string - reference?: string - example?: any - [key: string]: any -} - -const { spawn, execSync } = require('child_process') // eslint-disable-line +import { SlitherClientMixin } from "../lib/slither"; const profile: Profile = { name: 'slither', displayName: 'electron slither', @@ -25,9 +10,9 @@ const profile: Profile = { } export class SlitherPlugin extends ElectronBasePlugin { - clients: any[] + clients: any [] constructor() { - super(profile, clientProfile, SlitherPluginClient) + super(profile, clientProfile, SlitherClientMixin(SlitherPluginClient)) this.methods = [...super.methods] } } @@ -39,158 +24,10 @@ const clientProfile: Profile = { methods: ['analyse'] } -class SlitherPluginClient extends ElectronBasePluginRemixdClient { - - mapNpmDepsDir(list) { - const remixNpmDepsPath = utils.absolutePath('.deps/npm', this.currentSharedFolder) - const localNpmDepsPath = utils.absolutePath('node_modules', this.currentSharedFolder) - const npmDepsExists = existsSync(remixNpmDepsPath) - const nodeModulesExists = existsSync(localNpmDepsPath) - let isLocalDep = false - let isRemixDep = false - let allowPathString = '' - let remapString = '' - - for (const e of list) { - const importPath = e.replace(/import ['"]/g, '').trim() - const packageName = importPath.split('/')[0] - if (nodeModulesExists && readdirSync(localNpmDepsPath).includes(packageName)) { - isLocalDep = true - remapString += `${packageName}=./node_modules/${packageName} ` - } else if (npmDepsExists && readdirSync(remixNpmDepsPath).includes(packageName)) { - isRemixDep = true - remapString += `${packageName}=./.deps/npm/${packageName} ` - } - } - if (isLocalDep) allowPathString += './node_modules,' - if (isRemixDep) allowPathString += './.deps/npm,' - - return { remapString, allowPathString } - } - transform(detectors: Record[]): OutputStandard[] { - const standardReport: OutputStandard[] = [] - for (const e of detectors) { - const obj = {} as OutputStandard - obj.description = e.description - obj.title = e.check - obj.confidence = e.confidence - obj.severity = e.impact - obj.sourceMap = e.elements.map((element) => { - delete element.source_mapping.filename_used - delete element.source_mapping.filename_absolute - return element - }) - standardReport.push(obj) - } - return standardReport - } - - analyse(filePath: string, compilerConfig: Record) { - return new Promise((resolve, reject) => { - const options = { cwd: this.currentSharedFolder, shell: true } - - const { currentVersion, optimize, evmVersion } = compilerConfig - if (currentVersion && currentVersion.includes('+commit')) { - // Get compiler version with commit id e.g: 0.8.2+commit.661d110 - const versionString: string = currentVersion.substring(0, currentVersion.indexOf('+commit') + 16) - this.log(`[Slither Analysis]: Compiler version is ${versionString}`) - let solcOutput: Buffer - // Check solc current installed version - try { - solcOutput = execSync('solc --version', options) - } catch (err) { - this.error(err) - reject(new Error('Error in running solc command')) - } - if (!solcOutput.toString().includes(versionString)) { - this.log('[Slither Analysis]: Compiler version is different from installed solc version') - // Get compiler version without commit id e.g: 0.8.2 - const version: string = versionString.substring(0, versionString.indexOf('+commit')) - // List solc versions installed using solc-select - try { - const solcSelectInstalledVersions: Buffer = execSync('solc-select versions', options) - // Check if required version is already installed - if (!solcSelectInstalledVersions.toString().includes(version)) { - this.log(`[Slither Analysis]: Installing ${version} using solc-select`) - // Install required version - execSync(`solc-select install ${version}`, options) - } - this.log(`[Slither Analysis]: Setting ${version} as current solc version using solc-select`) - // Set solc current version as required version - execSync(`solc-select use ${version}`, options) - } catch (err) { - this.error(err) - reject(new Error('Error in running solc-select command')) - } - } else this.log('[Slither Analysis]: Compiler version is same as installed solc version') - } - // Allow paths and set solc remapping for import URLs - const fileContent = readFileSync(utils.absolutePath(filePath, this.currentSharedFolder), 'utf8') - const importsArr = fileContent.match(/import ['"][^.|..](.+?)['"];/g) - let remaps = '' - if (importsArr?.length) { - const { remapString } = this.mapNpmDepsDir(importsArr) - remaps = remapString.trim() - } - const optimizeOption: string = optimize ? '--optimize' : '' - const evmOption: string = evmVersion ? `--evm-version ${evmVersion}` : '' - let solcArgs = '' - if (optimizeOption) { - solcArgs += optimizeOption + ' ' - } - if (evmOption) { - if (!solcArgs.endsWith(' ')) solcArgs += ' ' - solcArgs += evmOption - } - if (solcArgs) { - solcArgs = `--solc-args "${solcArgs.trimStart()}"` - } - const solcRemaps = remaps ? `--solc-remaps "${remaps}"` : '' - - const outputFile = 'remix-slither-report.json' - try { - // We don't keep the previous analysis - const outputFilePath = utils.absolutePath(outputFile, this.currentSharedFolder) - if (existsSync(outputFilePath)) unlinkSync(outputFilePath) - } catch (e) { - this.error('unable to remove the output file') - this.error(e.message) - } - const cmd = `slither ${filePath} ${solcArgs} ${solcRemaps} --json ${outputFile}` - this.log('[Slither Analysis]: Running Slither...') - // Added `stdio: 'ignore'` as for contract with NPM imports analysis which is exported in 'stderr' - // get too big and hangs the process. We process analysis from the report file only - const child = spawn(cmd, { cwd: this.currentSharedFolder, shell: true, stdio: 'ignore' }) - - const response = {} - child.on('close', () => { - const outputFileAbsPath: string = utils.absolutePath(outputFile, this.currentSharedFolder) - // Check if slither report file exists - if (existsSync(outputFileAbsPath)) { - let report = readFileSync(outputFileAbsPath, 'utf8') - report = JSON.parse(report) - if (report['success']) { - response['status'] = true - if (!report['results'] || !report['results'].detectors || !report['results'].detectors.length) { - response['count'] = 0 - } else { - const { detectors } = report['results'] - response['count'] = detectors.length - response['data'] = this.transform(detectors) - } - - resolve(response) - } else { - this.log(report['error']) - reject(new Error('Error in running Slither Analysis.')) - } - } else { - this.error('Error in generating Slither Analysis Report. Make sure Slither is properly installed.') - reject(new Error('Error in generating Slither Analysis Report. Make sure Slither is properly installed.')) - } - }) - }) +class SlitherPluginClient extends ElectronBasePluginRemixdClient { + constructor(webContentsId: number, profile: Profile) { + super(webContentsId, profile); } } diff --git a/apps/remixdesktop/src/preload.ts b/apps/remixdesktop/src/preload.ts index f0e8e156a2..4e4d80a986 100644 --- a/apps/remixdesktop/src/preload.ts +++ b/apps/remixdesktop/src/preload.ts @@ -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', 'foundry', 'hardhat'] +const exposedPLugins = ['fs', 'git', 'xterm', 'isogit', 'electronconfig', 'electronTemplates', 'ripgrep', 'compilerloader', 'appUpdater', 'remixAID', 'slither'] let webContentsId: number | undefined @@ -20,9 +20,6 @@ contextBridge.exposeInMainWorld('electronAPI', { canTrackMatomo: () => ipcRenderer.invoke('config:canTrackMatomo'), trackEvent: (args: any[]) => ipcRenderer.invoke('matomo:trackEvent', args), - 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) }, diff --git a/apps/remixdesktop/test/tests/app/foundry.test.ts b/apps/remixdesktop/test/tests/app/foundry.test.ts deleted file mode 100644 index c525d900ff..0000000000 --- a/apps/remixdesktop/test/tests/app/foundry.test.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { NightwatchBrowser } from 'nightwatch' -import { ChildProcess, spawn, execSync } from 'child_process' -import { homedir } from 'os' -import path from 'path' -import os from 'os' - -const projectDir = path.join('remix-desktop-test-' + Date.now().toString()) -const dir = '/tmp/' + projectDir - -const tests = { - before: function (browser: NightwatchBrowser, done: VoidFunction) { - done() - }, - installFoundry: function (browser: NightwatchBrowser) { - browser.perform(async (done) => { - await downloadFoundry() - await installFoundry() - await initFoundryProject() - done() - }) - }, - addScript: function (browser: NightwatchBrowser) { - // run script in console - browser.executeAsync(function (dir, done) { - (window as any).electronAPI.openFolderInSameWindow(dir + '/hello_foundry/').then(done) - }, [dir], () => { - console.log('done window opened') - }) - .waitForElementVisible('*[data-id="treeViewDivDraggableItemfoundry.toml"]', 10000) - }, - compile: function (browser: NightwatchBrowser) { - browser.perform(async (done) => { - console.log('generating compilation result') - await buildFoundryProject() - done() - }) - .expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from Foundry').before(60000) - - let contractAaddress - browser.clickLaunchIcon('filePanel') - .openFile('src') - .openFile('src/Counter.sol') - .clickLaunchIcon('udapp') - .selectContract('Counter') - .createContract('') - .getAddressAtPosition(0, (address) => { - console.log(contractAaddress) - contractAaddress = address - }) - .clickInstance(0) - .clickFunction('increment - transact (not payable)') - .perform((done) => { - browser.testConstantFunction(contractAaddress, 'number - call', null, '0:\nuint256: 1').perform(() => { - done() - }) - }) - } -} -async function downloadFoundry(): Promise { - console.log('downloadFoundry', process.cwd()) - try { - const server = spawn('curl -L https://foundry.paradigm.xyz | bash', [], { cwd: process.cwd(), shell: true, detached: true }) - return new Promise((resolve, reject) => { - server.stdout.on('data', function (data) { - console.log(data.toString()) - if ( - data.toString().includes("simply run 'foundryup' to install Foundry") - || data.toString().includes("foundryup: could not detect shell, manually add") - ) { - console.log('resolving') - resolve() - } - }) - server.stderr.on('err', function (data) { - console.log(data.toString()) - reject(data.toString()) - }) - }) - } catch (e) { - console.log(e) - } -} - -async function installFoundry(): Promise { - console.log('installFoundry', process.cwd()) - try { - const server = spawn('export PATH="' + homedir() + '/.foundry/bin:$PATH" && foundryup', [], { cwd: process.cwd(), shell: true, detached: true }) - return new Promise((resolve, reject) => { - server.stdout.on('data', function (data) { - console.log(data.toString()) - if ( - data.toString().includes("foundryup: done!") - ) { - console.log('resolving') - resolve() - } - }) - server.stderr.on('err', function (data) { - console.log(data.toString()) - reject(data.toString()) - }) - }) - } catch (e) { - console.log(e) - } -} - -async function initFoundryProject(): Promise { - console.log('initFoundryProject', homedir()) - try { - if (process.env.CIRCLECI) { - spawn('git config --global user.email \"you@example.com\"', [], { cwd: homedir(), shell: true, detached: true }) - spawn('git config --global user.name \"Your Name\"', [], { cwd: homedir(), shell: true, detached: true }) - } - spawn('mkdir ' + projectDir, [], { cwd: '/tmp/', shell: true, detached: true }) - const server = spawn('export PATH="' + homedir() + '/.foundry/bin:$PATH" && forge init hello_foundry', [], { cwd: dir, shell: true, detached: true }) - server.stdout.pipe(process.stdout) - return new Promise((resolve, reject) => { - server.on('exit', function (exitCode) { - console.log("Child exited with code: " + exitCode); - console.log('end') - resolve() - }) - server.stderr.on('err', function (data) { - console.log('err', data.toString()) - }) - server.stdout.on('data', function (data) { - console.log('data', data.toString()) - }) - }) - } catch (e) { - console.log(e) - } -} - -async function buildFoundryProject(): Promise { - console.log('buildFoundryProject', homedir()) - try { - const server = spawn('export PATH="' + homedir() + '/.foundry/bin:$PATH" && forge build', [], { cwd: dir + '/hello_foundry', shell: true, detached: true }) - server.stdout.pipe(process.stdout) - return new Promise((resolve, reject) => { - server.on('exit', function (exitCode) { - console.log("Child exited with code: " + exitCode); - console.log('end') - resolve() - }) - }) - } catch (e) { - console.log(e) - } -} - - - -module.exports = { - ...process.platform.startsWith('linux') ? tests : {} -} \ No newline at end of file diff --git a/apps/remixdesktop/test/tests/app/hardhat.test.ts b/apps/remixdesktop/test/tests/app/hardhat.test.ts deleted file mode 100644 index f8c093102e..0000000000 --- a/apps/remixdesktop/test/tests/app/hardhat.test.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { NightwatchBrowser } from 'nightwatch' -import { ChildProcess, spawn, execSync } from 'child_process' -import { homedir } from 'os' -import path from 'path' -import os from 'os' - -const dir = path.join('remix-desktop-test-' + Date.now().toString()) - -const tests = { - before: function (browser: NightwatchBrowser, done: VoidFunction) { - done() - }, - setuphardhat: function (browser: NightwatchBrowser) { - browser.perform(async (done) => { - await setupHardhatProject() - done() - }) - }, - addScript: function (browser: NightwatchBrowser) { - // run script in console - browser.executeAsync(function (dir, done) { - (window as any).electronAPI.openFolderInSameWindow('/tmp/' + dir).then(done) - }, [dir], () => { - console.log('done window opened') - }) - .waitForElementVisible('*[data-id="treeViewDivDraggableItemhardhat.config.js"]', 10000) - }, - compile: function (browser: NightwatchBrowser) { - browser.perform(async (done) => { - console.log('generating compilation result') - await compileHardhatProject() - done() - }) - .expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from Hardhat').before(60000) - let addressRef - browser.clickLaunchIcon('filePanel') - .openFile('contracts') - .openFile('contracts/Token.sol') - .clickLaunchIcon('udapp') - .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') - .selectContract('Token') - .createContract('') - .clickInstance(0) - .clickFunction('balanceOf - call', { types: 'address account', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' }) - .getAddressAtPosition(0, (address) => { - addressRef = address - }) - .perform((done) => { - browser.verifyCallReturnValue(addressRef, ['0:uint256: 1000000']) - .perform(() => done()) - }) - } -} - -async function compileHardhatProject(): Promise { - console.log(process.cwd()) - try { - const server = spawn('npx hardhat compile', [], { cwd: '/tmp/' + dir, shell: true, detached: true }) - return new Promise((resolve, reject) => { - server.on('exit', function (exitCode) { - console.log("Child exited with code: " + exitCode); - console.log('end') - resolve() - }) - }) - } catch (e) { - console.log(e) - } -} - -async function setupHardhatProject(): Promise { - console.log('setup hardhat project', dir) - try { - const server = spawn(`git clone https://github.com/NomicFoundation/hardhat-boilerplate ${dir} && cd ${dir} && yarn install && yarn add "@typechain/ethers-v5@^10.1.0" && yarn add "@typechain/hardhat@^6.1.2" && yarn add "typechain@^8.1.0" && echo "END"`, [], { cwd: '/tmp/', shell: true, detached: true }) - return new Promise((resolve, reject) => { - server.on('exit', function (exitCode) { - console.log("Child exited with code: " + exitCode); - console.log('end') - resolve() - }) - }) - } catch (e) { - console.log(e) - } -} - - -module.exports = { - ...tests -} \ No newline at end of file diff --git a/apps/remixdesktop/tsconfig.json b/apps/remixdesktop/tsconfig.json index 070ab134fa..d080360276 100644 --- a/apps/remixdesktop/tsconfig.json +++ b/apps/remixdesktop/tsconfig.json @@ -1,8 +1,9 @@ { "compilerOptions": { + "jsx": "react-jsx", "target": "ES6", "allowJs": true, - "module": "CommonJS", + "module": "commonjs", "skipLibCheck": true, "esModuleInterop": true, "noImplicitAny": false, diff --git a/apps/remixdesktop/webpack.config.js b/apps/remixdesktop/webpack.config.js deleted file mode 100644 index 4b2c1a5bf8..0000000000 --- a/apps/remixdesktop/webpack.config.js +++ /dev/null @@ -1,40 +0,0 @@ -const path = require('path'); -const nodeExternals = require('webpack-node-externals'); -const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); -const mode = process.env.NODE_ENV || 'development'; -const webpack = require('webpack'); -module.exports = { - mode, - entry: { - main: './src/main.ts', - preload: './src/preload.ts', - }, - target: 'electron-main', - externals: [nodeExternals()], - module: { - rules: [ - { - test: /\.ts$/, - include: /src/, - use: [{ loader: 'ts-loader' }] - } - ] - }, - resolve: { - extensions: ['.ts', '.js'], - plugins: [new TsconfigPathsPlugin({ configFile: './tsconfig.json' })] - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || mode) - }) - ], - output: { - path: path.resolve(__dirname, 'build'), - filename: '[name].js' - }, - node: { - __dirname: false, - __filename: false - } -} diff --git a/apps/remixdesktop/yarn.lock b/apps/remixdesktop/yarn.lock index b4614111f3..7c1fc2ad09 100644 --- a/apps/remixdesktop/yarn.lock +++ b/apps/remixdesktop/yarn.lock @@ -22,11 +22,6 @@ ajv "^6.12.0" ajv-keywords "^3.4.1" -"@discoveryjs/json-ext@^0.5.0": - version "0.5.7" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" - integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== - "@electron/asar@^3.2.1": version "3.2.8" resolved "https://registry.npmjs.org/@electron/asar/-/asar-3.2.8.tgz" @@ -501,45 +496,45 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" -"@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" +"@isaacs/string-locale-compare@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz" + integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ== -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== +"@kwsites/file-exists@^1.1.1": + version "1.1.1" + resolved "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz" + integrity sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw== + dependencies: + debug "^4.1.1" -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== +"@kwsites/promise-deferred@^1.1.1": + version "1.1.1" + resolved "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz" + integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== -"@jridgewell/source-map@^0.3.3": - version "0.3.6" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" - integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== +"@llama-node/cli@0.1.6": + version "0.1.6" + resolved "https://registry.npmjs.org/@llama-node/cli/-/cli-0.1.6.tgz" + integrity sha512-cTlSHfGgBBTPtieX5bd6SvtY0Xp/IcXTzaCKWoMgCQprnwpe/UyMadW15lOPjByXf/Fxo6O+hH5l/QucxJK6dQ== dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" + "@llama-node/core" "0.1.6" + yargs "^17.7.1" -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@llama-node/core@0.1.6": + version "0.1.6" + resolved "https://registry.npmjs.org/@llama-node/core/-/core-0.1.6.tgz" + integrity sha512-Mg6lZ0jjOhK2AhvUOPZ4WDb0Rap02gwUbcm4Q4gIV1WsLpB/bGlgxq0z7uXF+3NExAvkcv3/bb1MujrE6re34g== -"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" +"@llama-node/llama-cpp@0.1.6": + version "0.1.6" + resolved "https://registry.npmjs.org/@llama-node/llama-cpp/-/llama-cpp-0.1.6.tgz" + integrity sha512-AzU2Gc5bX5V74SnO9E17IA5N/Rbd8trd7qkzp/H4zmmz/Chh7MmaiUhAewUt7kPuk3/LahGiDxxAOjiKtMJiNQ== + +"@llama-node/rwkv-cpp@0.1.6": + version "0.1.6" + resolved "https://registry.npmjs.org/@llama-node/rwkv-cpp/-/rwkv-cpp-0.1.6.tgz" + integrity sha512-kaB01kfwthz/euHE67MWDzrZacFL9CSPsDcQx4ZLJii98HQCiuQ24g6CU8cVFYRm45a/o0qCjR4G/j1TyPIl8g== "@malept/cross-spawn-promise@^1.1.0": version "1.1.1" @@ -1324,27 +1319,6 @@ dependencies: "@types/ms" "*" -"@types/eslint-scope@^3.7.3": - version "3.7.7" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" - integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.56.10" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.10.tgz#eb2370a73bf04a901eeba8f22595c7ee0f7eb58d" - integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== - "@types/express-serve-static-core@^4.17.33": version "4.17.41" resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz" @@ -1382,11 +1356,12 @@ resolved "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz" integrity sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA== - -"@types/json-schema@*", "@types/json-schema@^7.0.8": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== +"@types/jsonwebtoken@^9.0.0": + version "9.0.6" + resolved "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.6.tgz" + integrity sha512-/5hndP5dCjloafCXns6SZyESp3Ldq7YjH3zwzwczYnjxIT0Fqzk5ROSYVGfFyczIue7IUEj8hkvLbPoLQ18vQw== + dependencies: + "@types/node" "*" "@types/keyv@^3.1.4": version "3.1.4" @@ -1534,157 +1509,26 @@ https-proxy-agent "^7.0.2" proxy-from-env "^1.1.0" -"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" - integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - -"@webassemblyjs/floating-point-hex-parser@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" - integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== - -"@webassemblyjs/helper-api-error@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" - integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== - -"@webassemblyjs/helper-buffer@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" - integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== - -"@webassemblyjs/helper-numbers@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" - integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.6" - "@webassemblyjs/helper-api-error" "1.11.6" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" - integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== - -"@webassemblyjs/helper-wasm-section@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" - integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.12.1" - -"@webassemblyjs/ieee754@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" - integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" - integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" - integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== - -"@webassemblyjs/wasm-edit@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" - integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.12.1" - "@webassemblyjs/wasm-gen" "1.12.1" - "@webassemblyjs/wasm-opt" "1.12.1" - "@webassemblyjs/wasm-parser" "1.12.1" - "@webassemblyjs/wast-printer" "1.12.1" - -"@webassemblyjs/wasm-gen@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" - integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wasm-opt@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" - integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/wasm-gen" "1.12.1" - "@webassemblyjs/wasm-parser" "1.12.1" - -"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" - integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-api-error" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wast-printer@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" - integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@xtuc/long" "4.2.2" - -"@webpack-cli/configtest@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" - integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== - -"@webpack-cli/info@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" - integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== - -"@webpack-cli/serve@^2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" - integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== +"@xenova/transformers@^2.17.2": + version "2.17.2" + resolved "https://registry.npmjs.org/@xenova/transformers/-/transformers-2.17.2.tgz" + integrity sha512-lZmHqzrVIkSvZdKZEx7IYY51TK0WDrC8eR0c5IMnBsO8di8are1zzw8BlLhyO2TklZKLN5UffNGs1IJwT6oOqQ== + dependencies: + "@huggingface/jinja" "^0.2.2" + onnxruntime-web "1.14.0" + sharp "^0.32.0" + optionalDependencies: + onnxruntime-node "1.14.0" "@xmldom/xmldom@^0.8.8": version "0.8.10" resolved "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz" integrity sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw== - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== +abbrev@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz" + integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== abortcontroller-polyfill@^1.7.5: version "1.7.5" @@ -1699,16 +1543,6 @@ accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" -acorn-import-attributes@^1.9.5: - version "1.9.5" - resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" - integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== - -acorn@^8.7.1, acorn@^8.8.2: - version "8.12.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" - integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== - add@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/add/-/add-2.0.6.tgz" @@ -1748,12 +1582,12 @@ aggregate-error@^3.0.0, aggregate-error@^3.1.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: +ajv-keywords@^3.4.1: version "3.5.2" resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.10.0, ajv@^6.12.0, ajv@^6.12.3, ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.0, ajv@^6.12.3: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2217,13 +2051,6 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - braces@~3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" @@ -2253,16 +2080,6 @@ browserify-aes@^1.2.0: inherits "^2.0.1" safe-buffer "^5.0.1" -browserslist@^4.21.10: - version "4.23.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" - integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== - dependencies: - caniuse-lite "^1.0.30001629" - electron-to-chromium "^1.4.796" - node-releases "^2.0.14" - update-browserslist-db "^1.0.16" - bs58@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" @@ -2443,11 +2260,6 @@ camelcase@^6.0.0, camelcase@^6.2.0: resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001629: - version "1.0.30001640" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001640.tgz#32c467d4bf1f1a0faa63fc793c2ba81169e7652f" - integrity sha512-lA4VMpW0PSUrFnkmVuEKBUovSWKhj7puyCg8StBChgu298N1AtuF1sKWEvfDuimSEDbhlb/KqPKC3fs1HbuQUA== - caseless@~0.12.0: version "0.12.0" resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" @@ -2513,11 +2325,6 @@ chownr@^2.0.0: resolved "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -chrome-trace-event@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" - integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== - chromedriver@116: version "116.0.0" resolved "https://registry.npmjs.org/chromedriver/-/chromedriver-116.0.0.tgz" @@ -2657,15 +2464,6 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - clone-response@^1.0.2: version "1.0.3" resolved "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz" @@ -2714,10 +2512,26 @@ color-name@^1.0.0, color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^2.0.14: - version "2.0.20" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" - integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== +color-string@^1.9.0: + version "1.9.1" + resolved "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz" + integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + +color@^4.2.3: + version "4.2.3" + resolved "https://registry.npmjs.org/color/-/color-4.2.3.tgz" + integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== + dependencies: + color-convert "^2.0.1" + color-string "^1.9.0" combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" @@ -2726,16 +2540,6 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" - integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - commander@^5.0.0, commander@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz" @@ -3256,11 +3060,6 @@ electron-publish@24.8.1: lazy-val "^1.0.5" mime "^2.5.2" -electron-to-chromium@^1.4.796: - version "1.4.819" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.819.tgz#b1bf73d71748a44c3b719cfe7b351d75268c9044" - integrity sha512-8RwI6gKUokbHWcN3iRij/qpvf/wCbIVY5slODi85werwqUQwpFXM+dvUBND93Qh7SB0pW3Hlq3/wZsqQ3M9Jaw== - electron-updater@^6.1.8: version "6.1.8" resolved "https://registry.npmjs.org/electron-updater/-/electron-updater-6.1.8.tgz" @@ -3331,14 +3130,6 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.0, enhanced-resolve@^5.7.0: - version "5.17.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz#d037603789dd9555b89aaec7eb78845c49089bc5" - integrity sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - entities@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz" @@ -3359,11 +3150,6 @@ envinfo@7.8.1: resolved "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== -envinfo@^7.7.3: - version "7.13.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" - integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== - err-code@^2.0.2: version "2.0.3" resolved "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz" @@ -3441,11 +3227,6 @@ es-get-iterator@^1.1.3: isarray "^2.0.5" stop-iteration-iterator "^1.0.0" -es-module-lexer@^1.2.1: - version "1.5.4" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" - integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== - es-set-tostringtag@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz" @@ -3513,11 +3294,6 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" @@ -3528,14 +3304,10 @@ escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" +esm@^3.2.25: + version "3.2.25" + resolved "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz" + integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== esniff@^2.0.1: version "2.0.1" @@ -3547,23 +3319,6 @@ esniff@^2.0.1: event-emitter "^0.3.5" type "^2.7.2" -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - etag@~1.8.1: version "1.8.1" resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" @@ -3709,11 +3464,6 @@ events@3.2.0: resolved "https://registry.npmjs.org/events/-/events-3.2.0.tgz" integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== -events@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" @@ -3848,10 +3598,9 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fastest-levenshtein@^1.0.12: +fastest-levenshtein@^1.0.16: version "1.0.16" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== fd-slicer@~1.1.0: @@ -3875,13 +3624,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - finalhandler@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz" @@ -3912,14 +3654,6 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - fkill@^7.2.1: version "7.2.1" resolved "https://registry.npmjs.org/fkill/-/fkill-7.2.1.tgz" @@ -4216,11 +3950,6 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - glob@7.2.0: version "7.2.0" resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" @@ -4338,7 +4067,7 @@ got@^11.8.5, got@^11.8.6: p-cancelable "^2.0.0" responselike "^2.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -4443,13 +4172,6 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" -hasown@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - he@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" @@ -4631,14 +4353,10 @@ immediate@~3.0.5: resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== indent-string@^4.0.0: version "4.0.0" @@ -4699,10 +4417,13 @@ internal-slot@^1.0.5: hasown "^2.0.0" side-channel "^1.0.4" -interpret@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" - integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" ip-regex@^4.1.0: version "4.3.0" @@ -4780,12 +4501,12 @@ is-ci@^3.0.0: dependencies: ci-info "^3.2.0" -is-core-module@^2.13.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.14.0.tgz#43b8ef9f46a6a08888db67b1ffd4ec9e3dfd59d1" - integrity sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A== +is-cidr@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/is-cidr/-/is-cidr-5.1.0.tgz" + integrity sha512-OkVS+Ht2ssF27d48gZdB+ho1yND1VbkJRKKS6Pc1/Cw7uqkd9IOJg8/bTwBDQL6tfBhSdguPRnlGiE8pU/X5NQ== dependencies: - hasown "^2.0.2" + cidr-regex "^4.1.1" is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" @@ -4875,13 +4596,6 @@ is-plain-obj@^2.1.0: resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== -is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - is-port-reachable@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-3.1.0.tgz" @@ -5014,11 +4728,10 @@ isexe@^2.0.0: resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isexe@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz" + integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== isomorphic-git@^1.24.2: version "1.24.2" @@ -5070,15 +4783,6 @@ jake@^10.8.5: filelist "^1.0.4" minimatch "^3.1.2" -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz" @@ -5111,11 +4815,10 @@ json-buffer@3.0.1: resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-parse-even-better-errors@^3.0.0, json-parse-even-better-errors@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz" + integrity sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ== json-schema-traverse@^0.4.1: version "0.4.1" @@ -5137,7 +4840,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@^2.2.0, json5@^2.2.2: +json5@^2.2.0: version "2.2.3" resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -5242,11 +4945,6 @@ keyv@^4.0.0: dependencies: json-buffer "3.0.1" -kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - lazy-val@^1.0.4, lazy-val@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.5.tgz" @@ -5370,18 +5068,16 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" - -loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== +llama-node@^0.1.6: + version "0.1.6" + resolved "https://registry.npmjs.org/llama-node/-/llama-node-0.1.6.tgz" + integrity sha512-LZIEG0RNyqX21C5Ms8kc40syy2ZMYR5plRFkw9flziEx9y659k16HvB+2Dt3dJfhsqJB2Ji/QFfRJ6DUb0Trcg== dependencies: - p-locate "^4.1.0" + "@llama-node/cli" "0.1.6" + optionalDependencies: + "@llama-node/core" "0.1.6" + "@llama-node/llama-cpp" "0.1.6" + "@llama-node/rwkv-cpp" "0.1.6" locate-path@^6.0.0: version "6.0.0" @@ -5688,20 +5384,12 @@ micro-ftch@^0.3.1: resolved "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz" integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== -micromatch@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" - integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== - dependencies: - braces "^3.0.3" - picomatch "^2.3.1" - mime-db@1.52.0: version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@^2.1.27, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -6045,11 +5733,6 @@ negotiator@0.6.3, negotiator@^0.6.3: resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - next-tick@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz" @@ -6190,10 +5873,21 @@ node-pty@^0.10.1: dependencies: nan "^2.14.0" -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +nopt@^7.0.0, nopt@^7.2.1: + version "7.2.1" + resolved "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz" + integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w== + dependencies: + abbrev "^2.0.0" + +normalize-package-data@^6.0.0, normalize-package-data@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.2.tgz#a7bc22167fe24025412bcff0a9651eb768b03506" + integrity sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g== + dependencies: + hosted-git-info "^7.0.0" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -6566,13 +6260,6 @@ p-finally@^2.0.0: resolved "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz" integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - p-limit@^3.0.2: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" @@ -6580,13 +6267,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" @@ -6594,11 +6274,40 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + +pacote@^18.0.0, pacote@^18.0.6: + version "18.0.6" + resolved "https://registry.npmjs.org/pacote/-/pacote-18.0.6.tgz" + integrity sha512-+eK3G27SMwsB8kLIuj4h1FUhHtwiEUo21Tw8wNjmvdlpOEr613edv+8FUsTj/4F/VN5ywGE19X18N7CC2EJk6A== + dependencies: + "@npmcli/git" "^5.0.0" + "@npmcli/installed-package-contents" "^2.0.1" + "@npmcli/package-json" "^5.1.0" + "@npmcli/promise-spawn" "^7.0.0" + "@npmcli/run-script" "^8.0.0" + cacache "^18.0.0" + fs-minipass "^3.0.0" + minipass "^7.0.2" + npm-package-arg "^11.0.0" + npm-packlist "^8.0.0" + npm-pick-manifest "^9.0.0" + npm-registry-fetch "^17.0.0" + proc-log "^4.0.0" + promise-retry "^2.0.1" + sigstore "^2.2.0" + ssri "^10.0.0" + tar "^6.1.11" pako@^1.0.10, pako@~1.0.2: version "1.0.11" @@ -6639,11 +6348,6 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - path-scurry@^1.10.1: version "1.10.1" resolved "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz" @@ -6691,12 +6395,7 @@ performance-now@^2.1.0: resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== -picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -6713,12 +6412,10 @@ pify@^4.0.1: resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" +platform@^1.3.6: + version "1.3.6" + resolved "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz" + integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== plist@^3.0.4: version "3.0.6" @@ -7054,13 +6751,6 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -rechoir@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" - integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== - dependencies: - resolve "^1.20.0" - regenerator-runtime@^0.14.0: version "0.14.0" resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz" @@ -7111,27 +6801,6 @@ resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: resolved "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz" integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve@^1.20.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - responselike@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz" @@ -7240,15 +6909,6 @@ sax@^1.2.4: resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -schema-utils@^3.1.1, schema-utils@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" - integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz" @@ -7332,11 +6992,6 @@ semver@^7.3.2: dependencies: lru-cache "^6.0.0" -semver@^7.3.4: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== - send@0.18.0: version "0.18.0" resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" @@ -7370,13 +7025,6 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" -serialize-javascript@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" - integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== - dependencies: - randombytes "^2.1.0" - serve-static@1.15.0: version "1.15.0" resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" @@ -7452,12 +7100,19 @@ sha.js@^2.4.0, sha.js@^2.4.8, sha.js@^2.4.9: inherits "^2.0.1" safe-buffer "^5.0.1" -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== +sharp@^0.32.0: + version "0.32.6" + resolved "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz" + integrity sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w== dependencies: - kind-of "^6.0.2" + color "^4.2.3" + detect-libc "^2.0.2" + node-addon-api "^6.1.0" + prebuild-install "^7.1.1" + semver "^7.5.4" + simple-get "^4.0.1" + tar-fs "^3.0.4" + tunnel-agent "^0.6.0" shebang-command@^2.0.0: version "2.0.0" @@ -7562,7 +7217,24 @@ smart-buffer@^4.0.2, smart-buffer@^4.2.0: resolved "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== -source-map-support@^0.5.19, source-map-support@~0.5.20: +socks-proxy-agent@^8.0.3: + version "8.0.4" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" + integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== + dependencies: + agent-base "^7.1.1" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + +source-map-support@^0.5.19: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -7573,11 +7245,41 @@ source-map-support@^0.5.19, source-map-support@~0.5.20: source-map@^0.6.0: version "0.6.1" resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.5.0" + resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz" + integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-expression-parse@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz" + integrity sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" -source-map@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== +spdx-license-ids@^3.0.0: + version "3.0.18" + resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz" + integrity sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ== sprintf-js@^1.1.2: version "1.1.2" @@ -7756,11 +7458,6 @@ strip-ansi@^7.0.1, strip-ansi@^7.1.0: dependencies: ansi-regex "^6.0.1" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" @@ -7790,7 +7487,7 @@ sumchecker@^3.0.1: dependencies: debug "^4.1.0" -supports-color@8.1.1, supports-color@^8.0.0: +supports-color@8.1.1: version "8.1.1" resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -7804,10 +7501,10 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +supports-color@^9.4.0: + version "9.4.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz" + integrity sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw== swarm-js@^0.1.40: version "0.1.42" @@ -7826,13 +7523,28 @@ swarm-js@^0.1.40: tar "^4.0.2" xhr-request "^1.0.1" +tar-fs@^2.0.0: + version "2.1.1" + resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" -tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== +tar-fs@^3.0.4: + version "3.0.6" + resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz" + integrity sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w== + dependencies: + pump "^3.0.0" + tar-stream "^3.1.5" + optionalDependencies: + bare-fs "^2.1.1" + bare-path "^2.1.0" -tar-stream@3.1.6: +tar-stream@3.1.6, tar-stream@^3.1.5: version "3.1.6" resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz" integrity sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg== @@ -7913,26 +7625,17 @@ temp-file@^3.4.0: async-exit-hook "^2.0.1" fs-extra "^10.0.0" -terser-webpack-plugin@^5.3.10: - version "5.3.10" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" - integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== +text-decoder@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/text-decoder/-/text-decoder-1.1.0.tgz" + integrity sha512-TmLJNj6UgX8xcUZo4UDStGQtDiTzF7BzWlzn9g7UWrjkpHr5uJTK1ld16wZ3LXb2vb6jH8qU89dW5whuMdXYdw== dependencies: - "@jridgewell/trace-mapping" "^0.3.20" - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.26.0" + b4a "^1.6.4" -terser@^5.26.0: - version "5.31.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.1.tgz#735de3c987dd671e95190e6b98cfe2f07f3cf0d4" - integrity sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== timed-out@^4.0.1: version "4.0.1" @@ -8000,35 +7703,6 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" -ts-loader@^9.5.1: - version "9.5.1" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89" - integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - source-map "^0.7.4" - -tsconfig-paths-webpack-plugin@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.1.0.tgz#3c6892c5e7319c146eee1e7302ed9e6f2be4f763" - integrity sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.7.0" - tsconfig-paths "^4.1.2" - -tsconfig-paths@^4.1.2: - version "4.2.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" - integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== - dependencies: - json5 "^2.2.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - tslib@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz" @@ -8220,14 +7894,6 @@ unzip-crx-3@^0.2.0: mkdirp "^0.5.1" yaku "^0.16.6" -update-browserslist-db@^1.0.16: - version "1.1.0" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" - integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== - dependencies: - escalade "^3.1.2" - picocolors "^1.0.1" - uri-js@^4.2.2: version "4.4.1" resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" @@ -8352,13 +8018,10 @@ verror@^1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -watchpack@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.1.tgz#29308f2cac150fa8e4c92f90e0ec954a9fed7fff" - integrity sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" +walk-up-path@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz" + integrity sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA== wcwidth@^1.0.1: version "1.0.1" @@ -8602,83 +8265,6 @@ webidl-conversions@^3.0.0: resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -webpack-cli@^5.1.4: - version "5.1.4" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" - integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== - dependencies: - "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^2.1.1" - "@webpack-cli/info" "^2.0.2" - "@webpack-cli/serve" "^2.0.5" - colorette "^2.0.14" - commander "^10.0.1" - cross-spawn "^7.0.3" - envinfo "^7.7.3" - fastest-levenshtein "^1.0.12" - import-local "^3.0.2" - interpret "^3.1.1" - rechoir "^0.8.0" - webpack-merge "^5.7.3" - -webpack-merge@^5.7.3: - version "5.10.0" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" - integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== - dependencies: - clone-deep "^4.0.1" - flat "^5.0.2" - wildcard "^2.0.0" - -webpack-merge@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-6.0.1.tgz#50c776868e080574725abc5869bd6e4ef0a16c6a" - integrity sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg== - dependencies: - clone-deep "^4.0.1" - flat "^5.0.2" - wildcard "^2.0.1" - -webpack-node-externals@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-3.0.0.tgz#1a3407c158d547a9feb4229a9e3385b7b60c9917" - integrity sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ== - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack@^5.92.1: - version "5.92.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.92.1.tgz#eca5c1725b9e189cffbd86e8b6c3c7400efc5788" - integrity sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-attributes "^1.9.5" - browserslist "^4.21.10" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.0" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.2.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.10" - watchpack "^2.4.1" - webpack-sources "^3.2.3" - websocket@^1.0.32: version "1.0.34" resolved "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz" @@ -8759,11 +8345,6 @@ widest-line@^3.1.0: dependencies: string-width "^4.0.0" -wildcard@^2.0.0, wildcard@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" - integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== - workerpool@6.2.0: version "6.2.0" resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz" diff --git a/apps/solidity-compiler/src/app/compiler.ts b/apps/solidity-compiler/src/app/compiler.ts index d20f8db8d8..d86d5322cb 100644 --- a/apps/solidity-compiler/src/app/compiler.ts +++ b/apps/solidity-compiler/src/app/compiler.ts @@ -55,8 +55,4 @@ export class CompilerClientApi extends CompilerApiMixin(PluginClient) implements getFileManagerMode () { return 'browser' } - - isDesktop() { - return false - } } diff --git a/libs/remix-lib/src/types/ICompilerApi.ts b/libs/remix-lib/src/types/ICompilerApi.ts index cfb4ce832f..da8dc3b694 100644 --- a/libs/remix-lib/src/types/ICompilerApi.ts +++ b/libs/remix-lib/src/types/ICompilerApi.ts @@ -18,7 +18,6 @@ export interface ICompilerApi { setAppParameter: (name: string, value: string | boolean) => void getFileManagerMode: () => string - isDesktop: () => boolean setCompilerConfig: (settings: any) => void getCompilationResult: () => any diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts index 0c5800a46e..49aad01d31 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts @@ -129,27 +129,26 @@ export class CompileTabLogic { } async isHardhatProject () { - if (this.api.getFileManagerMode() === ('localhost') || this.api.isDesktop()) { - console.log('checking hardhat project') + if (this.api.getFileManagerMode() === 'localhost') { return await this.api.fileExists('hardhat.config.js') || await this.api.fileExists('hardhat.config.ts') } else return false } async isTruffleProject () { - if (this.api.getFileManagerMode() === ('localhost') || this.api.isDesktop()) { + if (this.api.getFileManagerMode() === 'localhost') { return await this.api.fileExists('truffle-config.js') } else return false } async isFoundryProject () { - if (this.api.getFileManagerMode() === ('localhost') || this.api.isDesktop()) { + if (this.api.getFileManagerMode() === 'localhost') { return await this.api.fileExists('foundry.toml') } else return false } runCompiler (externalCompType) { try { - if (this.api.getFileManagerMode() === 'localhost' || this.api.isDesktop()) { + if (this.api.getFileManagerMode() === 'localhost') { if (externalCompType === 'hardhat') { const { currentVersion, optimize, runs } = this.compiler.state if (currentVersion) { diff --git a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx index 04908c35ec..46f13d3047 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useState } from 'react' // eslint-disable-line +import React, { useEffect, useState } from 'react' // eslint-disable-line import { CompileErrors, ContractsFile, SolidityCompilerProps } from './types' import { CompilerContainer } from './compiler-container' // eslint-disable-line import { ContractSelection } from './contract-selection' // eslint-disable-line @@ -9,7 +9,6 @@ import { baseURLBin, baseURLWasm, pathToURL } from '@remix-project/remix-solidit import * as packageJson from '../../../../../package.json' import './css/style.css' import { iSolJsonBinData, iSolJsonBinDataBuild } from '@remix-project/remix-lib' -import { appPlatformTypes, platformContext } from '@remix-ui/app' export const SolidityCompiler = (props: SolidityCompilerProps) => { const { @@ -48,7 +47,6 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => { const [compileErrors, setCompileErrors] = useState>({ [currentFile]: api.compileErrors }) const [badgeStatus, setBadgeStatus] = useState>({}) const [contractsFile, setContractsFile] = useState({}) - const platform = useContext(platformContext) useEffect(() => { ; (async () => { @@ -79,12 +77,9 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => { } api.onSetWorkspace = async (isLocalhost: boolean, workspaceName: string) => { - const isDesktop = platform === appPlatformTypes.desktop - console.log('onSetWorkspace', workspaceName, isLocalhost, isDesktop, workspaceName) - const isHardhat = (isLocalhost || isDesktop) && (await compileTabLogic.isHardhatProject()) - const isTruffle = (isLocalhost || isDesktop) && (await compileTabLogic.isTruffleProject()) - const isFoundry = (isLocalhost || isDesktop) && (await compileTabLogic.isFoundryProject()) - console.log(isFoundry, isHardhat, isTruffle) + const isHardhat = isLocalhost && (await compileTabLogic.isHardhatProject()) + const isTruffle = isLocalhost && (await compileTabLogic.isTruffleProject()) + const isFoundry = isLocalhost && (await compileTabLogic.isFoundryProject()) setState((prevState) => { return { ...prevState,