diff --git a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx index d52e1ad86a..ea3821804f 100644 --- a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx +++ b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx @@ -198,7 +198,7 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => {
{ swarmSettingsTitle }
-
+
diff --git a/libs/remix-ui/terminal/src/lib/components/RenderCall.tsx b/libs/remix-ui/terminal/src/lib/components/RenderCall.tsx index acfbc0399e..7656ce2680 100644 --- a/libs/remix-ui/terminal/src/lib/components/RenderCall.tsx +++ b/libs/remix-ui/terminal/src/lib/components/RenderCall.tsx @@ -34,7 +34,7 @@ const RenderCall = ({ tx, resolvedData, logs, index, plugin, showTableHash, txDe
debug(event, tx)}>Debug
- +
{showTableHash.includes(tx.hash) ? showTable({ hash: tx.hash, diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 12f178348c..ae248d6fa8 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -256,17 +256,6 @@ export const runScript = async (path: string) => { }) } -export const runScriptWithMocha = async (path: string) => { - const provider = plugin.fileManager.currentFileProvider() - provider.get(path, (error, content: string) => { - if (error) { - return dispatch(displayPopUp(error)) - } - if (content) content = content + '\n' + 'mocha.run()' - plugin.call('scriptRunner', 'execute', content) - }) -} - export const emitContextMenuEvent = async (cmd: customAction) => { await plugin.call(cmd.id, cmd.name, cmd) } diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx index b9bad4b170..5e6518c2de 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx @@ -12,7 +12,7 @@ declare global { const _paq = window._paq = window._paq || [] //eslint-disable-line export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => { - const { actions, createNewFile, createNewFolder, deletePath, renamePath, hideContextMenu, pushChangesToGist, publishFileToGist, publishFolderToGist, copy, paste, runScript, runScriptWithMocha, emit, pageX, pageY, path, type, focus, ...otherProps } = props + const { actions, createNewFile, createNewFolder, deletePath, renamePath, hideContextMenu, pushChangesToGist, publishFileToGist, publishFolderToGist, copy, paste, runScript, emit, pageX, pageY, path, type, focus, ...otherProps } = props const contextMenuRef = useRef(null) useEffect(() => { contextMenuRef.current.focus() @@ -98,10 +98,6 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => _paq.push(['trackEvent', 'fileExplorer', 'runScript']) runScript(path) break - case 'Run with Mocha': - _paq.push(['trackEvent', 'fileExplorer', 'runScriptWithMocha']) - runScriptWithMocha(path) - break case 'Copy': copy(path, type) break diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx index d5c0fa8f75..5ae7de8d05 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx @@ -221,14 +221,6 @@ export const FileExplorer = (props: FileExplorerProps) => { } } - const runScriptWithMocha = async (path: string) => { - try { - props.dispatchRunScriptWithMocha(path) - } catch (error) { - props.toast('Run script with Mocha failed') - } - } - const emitContextMenuEvent = (cmd: customAction) => { try { props.dispatchEmitContextMenuEvent(cmd) @@ -462,7 +454,6 @@ export const FileExplorer = (props: FileExplorerProps) => { deletePath={deletePath} renamePath={editModeOn} runScript={runScript} - runScriptWithMocha={runScriptWithMocha} copy={handleCopyClick} paste={handlePasteClick} emit={emitContextMenuEvent} diff --git a/libs/remix-ui/workspace/src/lib/contexts/index.ts b/libs/remix-ui/workspace/src/lib/contexts/index.ts index 20c9b46633..1aedce98b5 100644 --- a/libs/remix-ui/workspace/src/lib/contexts/index.ts +++ b/libs/remix-ui/workspace/src/lib/contexts/index.ts @@ -25,7 +25,6 @@ export const FileSystemContext = createContext<{ dispatchCopyFile: (src: string, dest: string) => Promise, dispatchCopyFolder: (src: string, dest: string) => Promise, dispatchRunScript: (path: string) => Promise, - dispatchRunScriptWithMocha: (path: string) => Promise, dispatchEmitContextMenuEvent: (cmd: customAction) => Promise, dispatchHandleClickFile: (path: string, type: 'file' | 'folder' | 'gist') => Promise dispatchHandleExpandPath: (paths: string[]) => Promise diff --git a/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx b/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx index 330270cf5e..904ed7cade 100644 --- a/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx +++ b/libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx @@ -5,7 +5,7 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line // eslint-disable-next-line @typescript-eslint/no-unused-vars import { FileSystemContext } from '../contexts' import { browserReducer, browserInitialState } from '../reducers/workspace' -import { initWorkspace, fetchDirectory, removeInputField, deleteWorkspace, clearPopUp, publishToGist, createNewFile, setFocusElement, createNewFolder, deletePath, renamePath, copyFile, copyFolder, runScript, runScriptWithMocha, emitContextMenuEvent, handleClickFile, handleExpandPath, addInputField, createWorkspace, fetchWorkspaceDirectory, renameWorkspace, switchToWorkspace, uploadFile } from '../actions' +import { initWorkspace, fetchDirectory, removeInputField, deleteWorkspace, clearPopUp, publishToGist, createNewFile, setFocusElement, createNewFolder, deletePath, renamePath, copyFile, copyFolder, runScript, emitContextMenuEvent, handleClickFile, handleExpandPath, addInputField, createWorkspace, fetchWorkspaceDirectory, renameWorkspace, switchToWorkspace, uploadFile } from '../actions' import { Modal, WorkspaceProps } from '../types' // eslint-disable-next-line @typescript-eslint/no-unused-vars import { Workspace } from '../remix-ui-workspace' @@ -103,10 +103,6 @@ export const FileSystemProvider = (props: WorkspaceProps) => { await runScript(path) } - const dispatchRunScriptWithMocha = async (path: string) => { - await runScriptWithMocha(path) - } - const dispatchEmitContextMenuEvent = async (cmd: customAction) => { await emitContextMenuEvent(cmd) } @@ -216,7 +212,6 @@ export const FileSystemProvider = (props: WorkspaceProps) => { dispatchCopyFile, dispatchCopyFolder, dispatchRunScript, - dispatchRunScriptWithMocha, dispatchEmitContextMenuEvent, dispatchHandleClickFile, dispatchHandleExpandPath diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index a5a84e1e1f..a51224f86c 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -198,7 +198,6 @@ export function Workspace () { dispatchCopyFolder={global.dispatchCopyFolder} dispatchPublishToGist={global.dispatchPublishToGist} dispatchRunScript={global.dispatchRunScript} - dispatchRunScriptWithMocha={global.dispatchRunScriptWithMocha} dispatchEmitContextMenuEvent={global.dispatchEmitContextMenuEvent} dispatchHandleClickFile={global.dispatchHandleClickFile} dispatchSetFocusElement={global.dispatchSetFocusElement} @@ -234,7 +233,6 @@ export function Workspace () { dispatchCopyFolder={global.dispatchCopyFolder} dispatchPublishToGist={global.dispatchPublishToGist} dispatchRunScript={global.dispatchRunScript} - dispatchRunScriptWithMocha={global.dispatchRunScriptWithMocha} dispatchEmitContextMenuEvent={global.dispatchEmitContextMenuEvent} dispatchHandleClickFile={global.dispatchHandleClickFile} dispatchSetFocusElement={global.dispatchSetFocusElement} diff --git a/libs/remix-ui/workspace/src/lib/types/index.ts b/libs/remix-ui/workspace/src/lib/types/index.ts index 0db43d51dc..d7ce409d72 100644 --- a/libs/remix-ui/workspace/src/lib/types/index.ts +++ b/libs/remix-ui/workspace/src/lib/types/index.ts @@ -87,7 +87,6 @@ export interface FileExplorerProps { dispatchCopyFile: (src: string, dest: string) => Promise, dispatchCopyFolder: (src: string, dest: string) => Promise, dispatchRunScript: (path: string) => Promise, - dispatchRunScriptWithMocha: (path: string) => Promise, dispatchPublishToGist: (path?: string, type?: string) => Promise, dispatchEmitContextMenuEvent: (cmd: customAction) => Promise, dispatchHandleClickFile: (path: string, type: 'file' | 'folder' | 'gist') => Promise, @@ -118,7 +117,6 @@ export interface FileExplorerContextMenuProps { publishFolderToGist?: (path?: string, type?: string) => void, publishFileToGist?: (path?: string, type?: string) => void, runScript?: (path: string) => void, - runScriptWithMocha?: (path: string) => void, emit?: (cmd: customAction) => void, pageX: number, pageY: number, diff --git a/libs/remix-ui/workspace/src/lib/utils/index.ts b/libs/remix-ui/workspace/src/lib/utils/index.ts index f2558c1b2c..0dd70b14bc 100644 --- a/libs/remix-ui/workspace/src/lib/utils/index.ts +++ b/libs/remix-ui/workspace/src/lib/utils/index.ts @@ -30,12 +30,6 @@ export const contextMenuActions: MenuItems = [{ extension: ['.js'], multiselect: false, label: '' -}, { - id: 'runWithMocha', - name: 'Run with Mocha', - extension: ['.js'], - multiselect: false, - label: '' }, { id: 'pushChangesToGist', name: 'Push changes to gist',