refactor: 🚚 Explicitely add extensions to all imports

This commit is contained in:
Jesse Wierzbinski 2024-10-04 15:22:48 +02:00
parent b5b7014c00
commit b53307c824
No known key found for this signature in database
99 changed files with 168 additions and 169 deletions

View file

@ -5,7 +5,7 @@ import { db } from "~/drizzle/db";
import { Applications } from "~/drizzle/schema";
import { config } from "~/packages/config-manager";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, deleteUsers, passwords } = await getTestUsers(1);

View file

@ -5,7 +5,7 @@ import { db } from "~/drizzle/db";
import { Applications } from "~/drizzle/schema";
import { config } from "~/packages/config-manager";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, deleteUsers, passwords } = await getTestUsers(1);
const token = randomString(32, "hex");

View file

@ -1,7 +1,7 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Relationship as ApiRelationship } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./block";
import { meta } from "./block.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);

View file

@ -1,7 +1,7 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Relationship as ApiRelationship } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./follow";
import { meta } from "./follow.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Account as ApiAccount } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./followers";
import { meta } from "./followers.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Account as ApiAccount } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./following";
import { meta } from "./following.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Account as ApiAccount } from "@versia/client/types";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);
const timeline = (await getTestStatuses(40, users[0])).toReversed();

View file

@ -1,7 +1,7 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Relationship as ApiRelationship } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./mute";
import { meta } from "./mute.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Status as ApiStatus } from "@versia/client/types";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./statuses";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils.ts";
import { meta } from "./statuses.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);
const timeline = (await getTestStatuses(40, users[1])).toReversed();

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Relationship as ApiRelationship } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./unmute";
import { meta } from "./unmute.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);

View file

@ -1,7 +1,7 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Account as ApiAccount } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, deleteUsers } = await getTestUsers(5);

View file

@ -4,7 +4,7 @@ import { eq } from "drizzle-orm";
import { db } from "~/drizzle/db";
import { Users } from "~/drizzle/schema";
import { fakeRequest, getSolvedChallenge } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const username = randomString(10, "hex");
const username2 = randomString(10, "hex");

View file

@ -1,7 +1,7 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Account as ApiAccount } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);

View file

@ -3,7 +3,7 @@ import { eq } from "drizzle-orm";
import { db } from "~/drizzle/db";
import { Users } from "~/drizzle/schema";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);

View file

@ -1,7 +1,7 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Account as ApiAccount } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);

View file

@ -8,7 +8,7 @@ import { contentToHtml } from "~/classes/functions/status";
import { MediaManager } from "~/classes/media/media-manager";
import { db } from "~/drizzle/db";
import { EmojiToUser, RolePermissions, Users } from "~/drizzle/schema";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { Attachment } from "~/packages/database-interface/attachment";
import { Emoji } from "~/packages/database-interface/emoji";
import { User } from "~/packages/database-interface/user";

View file

@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { fakeRequest } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
// /api/v1/challenges
describe(meta.route, () => {

View file

@ -3,7 +3,7 @@ import { inArray } from "drizzle-orm";
import { db } from "~/drizzle/db";
import { Emojis } from "~/drizzle/schema";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);

View file

@ -3,7 +3,7 @@ import { inArray } from "drizzle-orm";
import { db } from "~/drizzle/db";
import { Emojis } from "~/drizzle/schema";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);
let id = "";

View file

@ -4,7 +4,7 @@ import sharp from "sharp";
import { db } from "~/drizzle/db";
import { Emojis } from "~/drizzle/schema";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(3);

View file

@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { fakeRequest } from "~/tests/utils";
import { meta } from "./extended_description";
import { meta } from "./extended_description.ts";
// /api/v1/instance/extended_description
describe(meta.route, () => {

View file

@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { fakeRequest } from "~/tests/utils";
import { meta } from "./privacy_policy";
import { meta } from "./privacy_policy.ts";
// /api/v1/instance/privacy_policy
describe(meta.route, () => {

View file

@ -1,7 +1,7 @@
import { describe, expect, test } from "bun:test";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { fakeRequest } from "~/tests/utils";
import { meta } from "./rules";
import { meta } from "./rules.ts";
// /api/v1/instance/rules
describe(meta.route, () => {

View file

@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { fakeRequest } from "~/tests/utils";
import { meta } from "./tos";
import { meta } from "./tos.ts";
// /api/v1/instance/tos
describe(meta.route, () => {

View file

@ -1,6 +1,6 @@
import { afterAll, describe, expect, test } from "bun:test";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(1);
const timeline = await getTestStatuses(10, users[0]);

View file

@ -3,7 +3,7 @@ import { createRoute } from "@hono/zod-openapi";
import { z } from "zod";
import { MediaManager } from "~/classes/media/media-manager";
import { RolePermissions } from "~/drizzle/schema";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { Attachment } from "~/packages/database-interface/attachment";
import { ErrorSchema } from "~/types/api";

View file

@ -4,7 +4,7 @@ import sharp from "sharp";
import { z } from "zod";
import { MediaManager } from "~/classes/media/media-manager";
import { RolePermissions } from "~/drizzle/schema";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { Attachment } from "~/packages/database-interface/attachment";
import { ErrorSchema } from "~/types/api";

View file

@ -1,6 +1,6 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(3);

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Notification as ApiNotification } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./dismiss";
import { meta } from "./dismiss.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);
let notifications: ApiNotification[] = [];

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Notification as ApiNotification } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);
let notifications: ApiNotification[] = [];

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Notification as ApiNotification } from "@versia/client/types";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);
let notifications: ApiNotification[] = [];

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Notification as ApiNotification } from "@versia/client/types";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(2);
const statuses = await getTestStatuses(40, users[0]);

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Notification as ApiNotification } from "@versia/client/types";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const getFormData = (object: Record<string, string | number | boolean>) =>
Object.keys(object).reduce((formData, key) => {

View file

@ -2,7 +2,7 @@ import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import { ADMIN_ROLES, DEFAULT_ROLES, RolePermissions } from "~/drizzle/schema";
import { Role } from "~/packages/database-interface/role";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(1);
let role: Role;

View file

@ -1,9 +1,9 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import { ADMIN_ROLES } from "~/drizzle/schema";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { Role } from "~/packages/database-interface/role";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, deleteUsers, tokens } = await getTestUsers(1);
let role: Role;

View file

@ -1,7 +1,7 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Status as ApiStatus } from "@versia/client/types";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./favourite";
import { meta } from "./favourite.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);
const timeline = (await getTestStatuses(2, users[0])).toReversed();

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Account as ApiAccount } from "@versia/client/types";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./favourited_by";
import { meta } from "./favourited_by.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);
const timeline = (await getTestStatuses(40, users[0])).toReversed();

View file

@ -3,7 +3,7 @@ import { createRoute } from "@hono/zod-openapi";
import ISO6391 from "iso-639-1";
import { z } from "zod";
import { RolePermissions } from "~/drizzle/schema";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { Attachment } from "~/packages/database-interface/attachment";
import { Note } from "~/packages/database-interface/note";
import { ErrorSchema } from "~/types/api";

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Account as ApiAccount } from "@versia/client/types";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./reblogged_by";
import { meta } from "./reblogged_by.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);
const timeline = (await getTestStatuses(40, users[0])).toReversed();

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Status as ApiStatus } from "@versia/client/types";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./unfavourite";
import { meta } from "./unfavourite.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);
const timeline = (await getTestStatuses(2, users[0])).toReversed();

View file

@ -3,9 +3,9 @@ import type { Status as ApiStatus } from "@versia/client/types";
import { eq } from "drizzle-orm";
import { db } from "~/drizzle/db";
import { Emojis } from "~/drizzle/schema";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);

View file

@ -3,7 +3,7 @@ import { createRoute } from "@hono/zod-openapi";
import ISO6391 from "iso-639-1";
import { z } from "zod";
import { RolePermissions } from "~/drizzle/schema";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { Attachment } from "~/packages/database-interface/attachment";
import { Note } from "~/packages/database-interface/note";
import { ErrorSchema } from "~/types/api";

View file

@ -1,8 +1,8 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Status as ApiStatus } from "@versia/client/types";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./home";
import { meta } from "./home.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);
const timeline = (await getTestStatuses(40, users[0])).toReversed();

View file

@ -1,8 +1,8 @@
import { afterAll, describe, expect, test } from "bun:test";
import type { Status as ApiStatus } from "@versia/client/types";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { fakeRequest, getTestStatuses, getTestUsers } from "~/tests/utils";
import { meta } from "./public";
import { meta } from "./public.ts";
const { users, tokens, deleteUsers } = await getTestUsers(5);
const timeline = (await getTestStatuses(40, users[0])).toReversed();

View file

@ -1,6 +1,6 @@
import { afterAll, describe, expect, test } from "bun:test";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { tokens, deleteUsers } = await getTestUsers(2);

View file

@ -1,6 +1,6 @@
import { afterAll, describe, expect, test } from "bun:test";
import { fakeRequest, getTestUsers } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
const { tokens, deleteUsers } = await getTestUsers(2);

View file

@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { fakeRequest } from "~/tests/utils";
import { meta } from "./index";
import { meta } from "./index.ts";
// /api/v2/instance
describe(meta.route, () => {

View file

@ -4,7 +4,7 @@ import sharp from "sharp";
import { z } from "zod";
import { MediaManager } from "~/classes/media/media-manager";
import { RolePermissions } from "~/drizzle/schema";
import { config } from "~/packages/config-manager/index";
import { config } from "~/packages/config-manager/index.ts";
import { Attachment } from "~/packages/database-interface/attachment";
import { ErrorSchema } from "~/types/api";