refactor: organize imports

This commit is contained in:
jamesgeorge007
2023-12-19 11:30:52 +05:30
parent e23bc2d864
commit ae57e7b5b5
4 changed files with 12 additions and 10 deletions

View File

@@ -9,7 +9,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { HoppCollection } from "@hoppscotch/data"
import * as E from "fp-ts/Either" import * as E from "fp-ts/Either"
import { PropType, computed, ref } from "vue"
import { FileSource } from "~/helpers/import-export/import/import-sources/FileSource" import { FileSource } from "~/helpers/import-export/import/import-sources/FileSource"
import { UrlSource } from "~/helpers/import-export/import/import-sources/UrlSource" import { UrlSource } from "~/helpers/import-export/import/import-sources/UrlSource"
@@ -24,11 +27,9 @@ import {
} from "~/helpers/import-export/import/importers" } from "~/helpers/import-export/import/importers"
import { defineStep } from "~/composables/step-components" import { defineStep } from "~/composables/step-components"
import { PropType, computed, ref } from "vue"
import { useI18n } from "~/composables/i18n" import { useI18n } from "~/composables/i18n"
import { useToast } from "~/composables/toast" import { useToast } from "~/composables/toast"
import { HoppCollection } from "@hoppscotch/data"
import { appendRESTCollections, restCollections$ } from "~/newstore/collections" import { appendRESTCollections, restCollections$ } from "~/newstore/collections"
import MyCollectionImport from "~/components/importExport/ImportExportSteps/MyCollectionImport.vue" import MyCollectionImport from "~/components/importExport/ImportExportSteps/MyCollectionImport.vue"
import { GetMyTeamsQuery } from "~/helpers/backend/graphql" import { GetMyTeamsQuery } from "~/helpers/backend/graphql"

View File

@@ -9,15 +9,15 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { HoppCollection } from "@hoppscotch/data"
import * as E from "fp-ts/Either"
import { ref } from "vue"
import { useI18n } from "~/composables/i18n" import { useI18n } from "~/composables/i18n"
import { useToast } from "~/composables/toast" import { useToast } from "~/composables/toast"
import { HoppCollection } from "@hoppscotch/data"
import { ImporterOrExporter } from "~/components/importExport/types" import { ImporterOrExporter } from "~/components/importExport/types"
import { FileSource } from "~/helpers/import-export/import/import-sources/FileSource" import { FileSource } from "~/helpers/import-export/import/import-sources/FileSource"
import { GistSource } from "~/helpers/import-export/import/import-sources/GistSource" import { GistSource } from "~/helpers/import-export/import/import-sources/GistSource"
import { ref } from "vue"
import * as E from "fp-ts/Either"
import IconFolderPlus from "~icons/lucide/folder-plus" import IconFolderPlus from "~icons/lucide/folder-plus"
import IconUser from "~icons/lucide/user" import IconUser from "~icons/lucide/user"

View File

@@ -9,15 +9,17 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { Environment } from "@hoppscotch/data"
import * as E from "fp-ts/Either"
import { ref } from "vue"
import { useI18n } from "~/composables/i18n" import { useI18n } from "~/composables/i18n"
import { useToast } from "~/composables/toast" import { useToast } from "~/composables/toast"
import { Environment } from "@hoppscotch/data"
import { ImporterOrExporter } from "~/components/importExport/types" import { ImporterOrExporter } from "~/components/importExport/types"
import { FileSource } from "~/helpers/import-export/import/import-sources/FileSource" import { FileSource } from "~/helpers/import-export/import/import-sources/FileSource"
import { GistSource } from "~/helpers/import-export/import/import-sources/GistSource" import { GistSource } from "~/helpers/import-export/import/import-sources/GistSource"
import { hoppEnvImporter } from "~/helpers/import-export/import/hoppEnv" import { hoppEnvImporter } from "~/helpers/import-export/import/hoppEnv"
import * as E from "fp-ts/Either"
import { import {
appendEnvironments, appendEnvironments,
addGlobalEnvVariable, addGlobalEnvVariable,
@@ -30,7 +32,6 @@ import { GQLError } from "~/helpers/backend/GQLClient"
import { CreateTeamEnvironmentMutation } from "~/helpers/backend/graphql" import { CreateTeamEnvironmentMutation } from "~/helpers/backend/graphql"
import { postmanEnvImporter } from "~/helpers/import-export/import/postmanEnv" import { postmanEnvImporter } from "~/helpers/import-export/import/postmanEnv"
import { insomniaEnvImporter } from "~/helpers/import-export/import/insomniaEnv" import { insomniaEnvImporter } from "~/helpers/import-export/import/insomniaEnv"
import { ref } from "vue"
import IconFolderPlus from "~icons/lucide/folder-plus" import IconFolderPlus from "~icons/lucide/folder-plus"
import IconPostman from "~icons/hopp/postman" import IconPostman from "~icons/hopp/postman"

View File

@@ -1,5 +1,5 @@
import { createGist } from "~/helpers/gist"
import * as E from "fp-ts/Either" import * as E from "fp-ts/Either"
import { createGist } from "~/helpers/gist"
export const gistExporter = async ( export const gistExporter = async (
JSONFileContents: string, JSONFileContents: string,