refactor: use relative TS path

This commit is contained in:
Manuel
2023-09-03 16:23:40 +02:00
parent a2738111b5
commit c14fad680d
85 changed files with 162 additions and 162 deletions

View File

@@ -1,4 +1,4 @@
import { ConfigAppType, IntegrationField, IntegrationType } from '../../types/app';
import { ConfigAppType, IntegrationField, IntegrationType } from '~/types/app';
export const findAppProperty = (app: ConfigAppType, key: IntegrationField) =>
app.integration?.properties.find((prop) => prop.field === key)?.value ?? '';

View File

@@ -1,7 +1,7 @@
import Consola from 'consola';
import { v4 as uuidv4 } from 'uuid';
import { BackendConfigType, ConfigType } from '../../types/config';
import { BackendConfigType, ConfigType } from '~/types/config';
import { configExists } from './configExists';
import { getFallbackConfig } from './getFallbackConfig';
import { readConfig } from './readConfig';

View File

@@ -3,7 +3,7 @@ import fs from 'fs';
import { fetchCity } from '~/server/api/routers/weather';
import { IntegrationField } from '~/types/app';
import { BackendConfigType, ConfigType } from '../../types/config';
import { BackendConfigType, ConfigType } from '~/types/config';
import { getConfig } from './getConfig';
export const getFrontendConfig = async (name: string): Promise<ConfigType> => {

View File

@@ -1,6 +1,6 @@
import fs from 'fs';
import { BackendConfigType } from '../../types/config';
import { BackendConfigType } from '~/types/config';
import { generateConfigPath } from './generateConfigPath';
export function writeConfig(config: BackendConfigType) {

View File

@@ -1,5 +1,5 @@
import { z } from 'zod';
import { trimStringEnding } from '../../../shared/strings';
import { trimStringEnding } from '~/tools/shared/strings';
import {
adGuardApiFilteringStatusSchema,
adGuardApiStatsResponseSchema,

View File

@@ -1,4 +1,4 @@
import { trimStringEnding } from '../../../shared/strings';
import { trimStringEnding } from '~/tools/shared/strings';
import { PiHoleApiStatusChangeResponse, PiHoleApiSummaryResponse } from './piHole.type';
export class PiHoleClient {

View File

@@ -3,7 +3,7 @@ import { Element, xml2js } from 'xml-js';
import {
GenericCurrentlyPlaying,
GenericSessionInfo,
} from '../../../../types/api/media-server/session-info';
} from '~/types/api/media-server/session-info';
export class PlexClient {
constructor(