mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-25 10:51:26 +01:00
[WIP] Refactor to NPM workspaces (#104)
This commit is contained in:
@@ -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 '';
|
||||
|
||||
@@ -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>({
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user