From efdb0ae22796715bcb19dfe35ea8299f6f444dce Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 19 Feb 2024 19:17:49 +0100 Subject: [PATCH] move TemplateType to index --- libs/remix-ui/workspace/src/lib/actions/workspace.ts | 2 +- libs/remix-ui/workspace/src/lib/types/index.ts | 9 +++++++++ libs/remix-ui/workspace/src/lib/utils/constants.ts | 2 +- libs/remix-ui/workspace/src/lib/utils/types.ts | 8 -------- 4 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 libs/remix-ui/workspace/src/lib/utils/types.ts diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index 7649e1400d..ec3557e54d 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -2,7 +2,7 @@ import React from 'react' import { bufferToHex } from '@ethereumjs/util' import { hash } from '@remix-project/remix-lib' import { TEMPLATE_METADATA, TEMPLATE_NAMES } from '../utils/constants' -import { TemplateType } from '../utils/types' +import { TemplateType } from '../types' import IpfsHttpClient from 'ipfs-http-client' import axios, { AxiosResponse } from 'axios' import { diff --git a/libs/remix-ui/workspace/src/lib/types/index.ts b/libs/remix-ui/workspace/src/lib/types/index.ts index 8f157b9ea6..7d812c75ec 100644 --- a/libs/remix-ui/workspace/src/lib/types/index.ts +++ b/libs/remix-ui/workspace/src/lib/types/index.ts @@ -56,6 +56,15 @@ export type WorkspaceMetadata = { isGist: string } +export type TemplateType = { + type: 'git' | 'plugin' + url?: string + branch?: string + name?: string + endpoint?: string + params?: any[] +} + export interface FilePanelType extends ViewPlugin { setWorkspace: ({ name, isLocalhost }, setEvent: boolean) => void createWorkspace: (name: string, workspaceTemplateName: string) => void diff --git a/libs/remix-ui/workspace/src/lib/utils/constants.ts b/libs/remix-ui/workspace/src/lib/utils/constants.ts index e5a4b21523..823bcabdc3 100644 --- a/libs/remix-ui/workspace/src/lib/utils/constants.ts +++ b/libs/remix-ui/workspace/src/lib/utils/constants.ts @@ -1,4 +1,4 @@ -import { TemplateType } from './types' +import { TemplateType } from '../types' export const ROOT_PATH = '/' export const solTestYml = ` name: Running Solidity Unit Tests diff --git a/libs/remix-ui/workspace/src/lib/utils/types.ts b/libs/remix-ui/workspace/src/lib/utils/types.ts deleted file mode 100644 index 750001bca5..0000000000 --- a/libs/remix-ui/workspace/src/lib/utils/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type TemplateType = { - type: 'git' | 'plugin' - url?: string - branch?: string - name?: string - endpoint?: string - params?: any[] - } \ No newline at end of file