refactor: manually write like 3,000 import statements because i must test my willpower

This commit is contained in:
Xylight committed 2025-09-24 21:19:19 -07:00
1 parent 75f907743e
commit 0479aba095
274 files changed
+1222 -1702

No files matched your search

+4 -4
View File
@@ -1,11 +1,11 @@
import { profile } from '$lib/app/auth.svelte'
import { DEFAULT_INSTANCE_URL } from '$lib/instance.svelte.js'
import { instanceToURL } from '$lib/util.svelte'
import { DEFAULT_INSTANCE_URL } from '$lib/app/instance.svelte'
import { instanceToURL } from '$lib/app/util.svelte'
import { error } from '@sveltejs/kit'
import { type GetSiteResponse } from '$lib/client/types'
import { BaseClient, DEFAULT_CLIENT_TYPE, type ClientType } from './base'
import { LemmyClient } from './lemmy/adapter'
import { PiefedClient } from './piefed/adapter'
import { DEFAULT_CLIENT_TYPE, type ClientType, BaseClient } from './base'
import type { GetSiteResponse } from './types'
class SiteData {
#data = $state<GetSiteResponse>()
-1
View File
@@ -1,4 +1,3 @@
import { LemmyHttp } from 'lemmy-js-client'
import type { BaseClient, ClientType } from '../base'
import { fromGetPosts, toListingType } from './rewrite'
+1 -1
View File
@@ -1,5 +1,5 @@
import * as lemmy from 'lemmy-js-client'
import type { GetPosts, ListingType } from '../types'
import * as lemmy from '../types'
export function fromGetPosts(getPosts: GetPosts): lemmy.GetPosts {
return {
+5 -5
View File
@@ -1,10 +1,11 @@
import createClient from 'openapi-fetch'
import type {
import {
BaseClient,
ClientType,
NullableFnArg,
NullableFnReturn,
type ClientType,
type NullableFnArg,
type NullableFnReturn,
} from '../base'
import type { SubscribedType } from '../types'
import {
fromCreateComment,
fromCreatePost,
@@ -33,7 +34,6 @@ import {
toTopicView,
} from './rewrite'
import type { paths } from './schema'
import type { SubscribedType } from '../types'
export class PiefedClient implements BaseClient {
type: ClientType = { name: 'piefed', baseUrl: '/api/alpha' }
+2 -3
View File
@@ -1,5 +1,6 @@
import { Post } from '$lib/feature/post'
import { Search } from 'mono-svelte'
import type {
Comment,
CommentReplyView,
CommentSortType,
CommentView,
@@ -18,10 +19,8 @@ import type {
Person,
PersonMentionView,
PersonView,
Post,
PostView,
PrivateMessageView,
Search,
SortType,
SubscribedType,
TopicView,