[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,4 +1,4 @@
import type { GrpcRequest, HttpRequest } from '@yaakapp/api';
import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models';
export function fallbackRequestName(r: HttpRequest | GrpcRequest | null): string {
if (r == null) return '';

View File

@@ -1,4 +1,4 @@
import type { KeyValue } from '@yaakapp/api';
import type { KeyValue } from '@yaakapp-internal/models';
import { invokeCmd } from './tauri';
export async function setKeyValue<T>({

View File

@@ -1,4 +1,10 @@
import type { Cookie, GrpcConnection, HttpResponse, HttpResponseHeader, Model } from '@yaakapp/api';
import type {
AnyModel,
Cookie,
GrpcConnection,
HttpResponse,
HttpResponseHeader,
} from '@yaakapp-internal/models';
export const BODY_TYPE_NONE = null;
export const BODY_TYPE_GRAPHQL = 'graphql';
@@ -30,7 +36,7 @@ export function isResponseLoading(response: HttpResponse | GrpcConnection): bool
return response.elapsed === 0;
}
export function modelsEq(a: Model, b: Model) {
export function modelsEq(a: AnyModel, b: AnyModel) {
if (a.model != b.model) {
return false;
}

View File

@@ -1,5 +1,5 @@
import { readFile } from '@tauri-apps/plugin-fs';
import type { HttpResponse } from '@yaakapp/api';
import type { HttpResponse } from '@yaakapp-internal/models';
import { getCharsetFromContentType } from './model_util';
export async function getResponseBodyText(response: HttpResponse): Promise<string | null> {

View File

@@ -1,4 +1,4 @@
import type { HttpRequest, HttpResponse } from '@yaakapp/api';
import type { HttpRequest, HttpResponse } from '@yaakapp-internal/models';
import { invokeCmd } from './tauri';
export async function sendEphemeralRequest(

View File

@@ -7,7 +7,7 @@ import type {
Plugin,
Settings,
Workspace,
} from '@yaakapp/api';
} from '@yaakapp-internal/models';
import { invokeCmd } from './tauri';
export async function getSettings(): Promise<Settings> {