[WIP] Refactor to NPM workspaces (#104)

This commit is contained in:
Gregory Schier
2024-09-22 21:27:10 -07:00
committed by GitHub
parent 93633875ac
commit 101b6284d6
176 changed files with 1983 additions and 1249 deletions

View File

@@ -1,6 +1,6 @@
import { convertFileSrc } from '@tauri-apps/api/core';
import React from 'react';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
interface Props {
response: HttpResponse;

View File

@@ -1,5 +1,5 @@
import { useSaveResponse } from '../../hooks/useSaveResponse';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
import { getContentTypeHeader } from '../../lib/model_util';
import { Banner } from '../core/Banner';
import { Button } from '../core/Button';

View File

@@ -2,7 +2,7 @@ import classNames from 'classnames';
import Papa from 'papaparse';
import { useMemo } from 'react';
import { useResponseBodyText } from '../../hooks/useResponseBodyText';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
interface Props {
response: HttpResponse;

View File

@@ -1,4 +1,4 @@
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
import { useContentTypeFromHeaders } from '../../hooks/useContentTypeFromHeaders';
import { useResponseBodyText } from '../../hooks/useResponseBodyText';
import { isJSON, languageFromContentType } from '../../lib/contentType';

View File

@@ -1,7 +1,7 @@
import { convertFileSrc } from '@tauri-apps/api/core';
import classNames from 'classnames';
import { useState } from 'react';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
interface Props {
response: HttpResponse;

View File

@@ -1,6 +1,6 @@
import classNames from 'classnames';
import { useResponseBodyText } from '../../hooks/useResponseBodyText';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
import { JsonAttributeTree } from '../core/JsonAttributeTree';
interface Props {

View File

@@ -6,7 +6,7 @@ import type { PDFDocumentProxy } from 'pdfjs-dist';
import React, { useRef, useState } from 'react';
import { Document, Page } from 'react-pdf';
import { useDebouncedState } from '../../hooks/useDebouncedState';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
import './PdfViewer.css';
interface Props {

View File

@@ -1,4 +1,4 @@
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
import classNames from 'classnames';
import type { ReactNode } from 'react';
import { useCallback, useMemo } from 'react';
@@ -161,8 +161,8 @@ export function TextViewer({ response, pretty, className }: Props) {
pretty && language === 'json'
? tryFormatJson(rawBody.data)
: pretty && (language === 'xml' || language === 'html')
? tryFormatXml(rawBody.data)
: rawBody.data;
? tryFormatXml(rawBody.data)
: rawBody.data;
let body;
if (isSearching && filterText?.length > 0) {

View File

@@ -1,6 +1,6 @@
import { convertFileSrc } from '@tauri-apps/api/core';
import React from 'react';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
interface Props {
response: HttpResponse;

View File

@@ -1,6 +1,6 @@
import { useMemo } from 'react';
import { useResponseBodyText } from '../../hooks/useResponseBodyText';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
interface Props {
response: HttpResponse;