Fix wrong type

import, make auth and chat work
This commit is contained in:
Wuesteon 2025-12-04 23:25:25 +01:00
parent b8f9bc107c
commit 9c47119535
261 changed files with 24453 additions and 443 deletions

View file

@ -11,7 +11,8 @@ import {
NotFoundException,
} from '@nestjs/common';
import { AuthGuard, CurrentUser } from '@mana-core/nestjs-integration';
import { LinksService, type CreateLinkDto, type UpdateLinkDto } from '../services/links.service';
import { LinksService } from '../services/links.service';
import type { CreateLinkDto, UpdateLinkDto } from '../services/links.service';
@Controller('api/links')
@UseGuards(AuthGuard)

View file

@ -1,5 +1,6 @@
import { Module, Global, OnModuleDestroy, Logger } from '@nestjs/common';
import { getDb, closeDb, type Database } from '@manacore/uload-database';
import { getDb, closeDb } from '@manacore/uload-database';
import type { Database } from '@manacore/uload-database';
export const DATABASE_TOKEN = 'DATABASE';

View file

@ -1,16 +1,8 @@
import { Injectable, Inject, Logger } from '@nestjs/common';
import { DATABASE_TOKEN, type Database } from '../database.module';
import {
clicks,
type Click,
type NewClick,
eq,
desc,
sql,
and,
gte,
lte,
} from '@manacore/uload-database';
import { DATABASE_TOKEN } from '../database.module';
import type { Database } from '../database.module';
import { clicks, eq, desc, sql, and, gte, lte } from '@manacore/uload-database';
import type { Click, NewClick } from '@manacore/uload-database';
export interface ClickStats {
totalClicks: number;

View file

@ -1,16 +1,8 @@
import { Injectable, Inject, Logger } from '@nestjs/common';
import { DATABASE_TOKEN, type Database } from '../database.module';
import {
links,
type Link,
type NewLink,
eq,
and,
desc,
sql,
or,
ilike,
} from '@manacore/uload-database';
import { DATABASE_TOKEN } from '../database.module';
import type { Database } from '../database.module';
import { links, eq, and, desc, sql, or, ilike } from '@manacore/uload-database';
import type { Link, NewLink } from '@manacore/uload-database';
export interface ListLinksOptions {
page?: number;

View file

@ -1,6 +1,7 @@
import { Injectable, Logger } from '@nestjs/common';
import * as UAParser from 'ua-parser-js';
import { ClickRepository, type ClickStats } from '../database/repositories';
import { ClickRepository } from '../database/repositories';
import type { ClickStats } from '../database/repositories';
import { RedirectService } from './redirect.service';
import type { NewClick } from '@manacore/uload-database';

View file

@ -1,7 +1,8 @@
import { Injectable, Logger, BadRequestException } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { nanoid } from 'nanoid';
import { LinkRepository, type ListLinksOptions } from '../database/repositories';
import { LinkRepository } from '../database/repositories';
import type { ListLinksOptions } from '../database/repositories';
import type { Link, NewLink } from '@manacore/uload-database';
export interface CreateLinkDto {

View file

@ -1,6 +1,7 @@
---
import BaseLayout from '../../layouts/BaseLayout.astro';
import { getCollection, type CollectionEntry } from 'astro:content';
import { getCollection } from 'astro:content';
import type { CollectionEntry } from 'astro:content';
export async function getStaticPaths() {
const posts = await getCollection('blog');

View file

@ -1,5 +1,6 @@
import { browser } from '$app/environment';
import { themes, defaultTheme, type ThemePreset } from './presets';
import { themes, defaultTheme } from './presets';
import type { ThemePreset } from './presets';
import { writable, derived, get } from 'svelte/store';
export type ThemeMode = 'light' | 'dark' | 'system';

View file

@ -1,5 +1,6 @@
import { fail } from '@sveltejs/kit';
import { pb, generateTagSlug, DEFAULT_TAG_COLORS, type Tag } from '$lib/pocketbase';
import { pb, generateTagSlug, DEFAULT_TAG_COLORS } from '$lib/pocketbase';
import type { Tag } from '$lib/pocketbase';
import type { Actions, PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ locals }) => {

View file

@ -1,5 +1,6 @@
import { fail } from '@sveltejs/kit';
import { pb, generateShortCode, type Link, type Click, type User } from '$lib/pocketbase';
import { pb, generateShortCode } from '$lib/pocketbase';
import type { Link, Click, User } from '$lib/pocketbase';
import { getCollection } from '$lib/content';
import type { BlogPostWithMeta } from '../content/config';
import type { Actions, PageServerLoad } from './$types';

View file

@ -1,5 +1,6 @@
import { redirect, error, fail } from '@sveltejs/kit';
import { parseUserAgent, type Link } from '$lib/pocketbase';
import { parseUserAgent } from '$lib/pocketbase';
import type { Link } from '$lib/pocketbase';
import { linkCache } from '$lib/server/linkCache';
import type { PageServerLoad, Actions } from './$types';

View file

@ -1,5 +1,6 @@
import { error } from '@sveltejs/kit';
import { pb, type User, type Link } from '$lib/pocketbase';
import { pb } from '$lib/pocketbase';
import type { User, Link } from '$lib/pocketbase';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ params }) => {