perf(bundle): replace broad storage and utils imports
This commit is contained in:
@@ -9,7 +9,9 @@ import { getAuthRepository } from "@/data/repositories/auth_repository";
|
||||
import { fetchFacebookUserData } from "@/data/services";
|
||||
import { AuthStorage } from "@/data/storage/auth/auth_storage";
|
||||
import { UserStorage } from "@/data/storage/user/user_storage";
|
||||
import { deviceIdentifier, Logger, Result } from "@/utils";
|
||||
import { deviceIdentifier } from "@/utils/device_identifier";
|
||||
import { Logger } from "@/utils/logger";
|
||||
import { Result } from "@/utils/result";
|
||||
import { hasCompleteBusinessAuthSession } from "@/lib/auth/auth_session";
|
||||
|
||||
import { readGuestId, readPsid } from "./auth-helpers";
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
*/
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { runStorageMigrations } from "@/data/storage";
|
||||
import { runStorageMigrations } from "@/data/storage/storage_migration";
|
||||
import { useAuthDispatch } from "./auth-context";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const log = new Logger("StoresAuthAuthStatusChecker");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fromCallback } from "xstate";
|
||||
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
import {
|
||||
readLocalHistorySnapshot,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { UiMessage } from "@/data/dto/chat";
|
||||
import { resolveChatCacheOwnerKey } from "@/data/repositories/chat_cache_identity";
|
||||
import { getChatRepository } from "@/data/repositories/chat_repository";
|
||||
import { Logger, Result, todayString } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
import { Result } from "@/utils/result";
|
||||
import { todayString } from "@/utils/date";
|
||||
|
||||
import {
|
||||
CHAT_HISTORY_LIMIT,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Logger, todayString } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
import { todayString } from "@/utils/date";
|
||||
|
||||
import { chatAssign, type ChatActionArgs } from "./chat-flow-actions";
|
||||
import { beginPendingReply } from "./chat-machine.helpers";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { type ChatSendResponse, type UiMessage } from "@/data/dto/chat";
|
||||
import type { ChatLockDetailData } from "@/data/schemas/chat";
|
||||
import { todayString } from "@/utils";
|
||||
import { todayString } from "@/utils/date";
|
||||
|
||||
/**
|
||||
* ChatMessage[] -> UiMessage[].
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { UiMessage } from "@/data/dto/chat";
|
||||
import type { PendingChatPromotion } from "@/data/storage/navigation";
|
||||
import { todayString } from "@/utils";
|
||||
import { todayString } from "@/utils/date";
|
||||
|
||||
import {
|
||||
applySingleUnlockOutput,
|
||||
|
||||
@@ -5,7 +5,9 @@ import { MessageQueue } from "@/core/net/message-queue";
|
||||
import type { ChatSendResponse } from "@/data/dto/chat";
|
||||
import { getChatRepository } from "@/data/repositories/chat_repository";
|
||||
import { resolveChatCacheOwnerKey } from "@/data/repositories/chat_cache_identity";
|
||||
import { Logger, Result, todayString } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
import { Result } from "@/utils/result";
|
||||
import { todayString } from "@/utils/date";
|
||||
|
||||
import type { ChatEvent } from "./chat-events";
|
||||
import {
|
||||
|
||||
@@ -2,7 +2,8 @@ import { fromPromise } from "xstate";
|
||||
|
||||
import { getChatRepository } from "@/data/repositories/chat_repository";
|
||||
import { resolveChatCacheOwnerKey } from "@/data/repositories/chat_cache_identity";
|
||||
import { Logger, Result } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
import { Result } from "@/utils/result";
|
||||
|
||||
import {
|
||||
chatAssign,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
PaymentPlansResponse,
|
||||
} from "@/data/dto/payment";
|
||||
import { getPaymentRepository } from "@/data/repositories/payment_repository";
|
||||
import { Result } from "@/utils";
|
||||
import { Result } from "@/utils/result";
|
||||
|
||||
import type { PaymentPlanCatalog } from "./payment-state";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
PrivateAlbumUnlockResponse,
|
||||
} from "@/data/dto/private-room";
|
||||
import { getPrivateRoomRepository } from "@/data/repositories/private_room_repository";
|
||||
import { Result } from "@/utils";
|
||||
import { Result } from "@/utils/result";
|
||||
|
||||
import {
|
||||
PRIVATE_ROOM_CHARACTER,
|
||||
|
||||
@@ -16,7 +16,7 @@ import { fromPromise } from "xstate";
|
||||
|
||||
import { getUserRepository } from "@/data/repositories/user_repository";
|
||||
import { getAuthRepository } from "@/data/repositories/auth_repository";
|
||||
import { Result } from "@/utils";
|
||||
import { Result } from "@/utils/result";
|
||||
|
||||
import {
|
||||
applyEntitlementSnapshotToView,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import type { UserView } from "@/data/dto/user";
|
||||
import type { UserEntitlementSnapshotData } from "@/data/schemas/user";
|
||||
import { UserStorage } from "@/data/storage/user/user_storage";
|
||||
import { Result } from "@/utils";
|
||||
import { Result } from "@/utils/result";
|
||||
|
||||
// ============================================================
|
||||
// Storage singleton
|
||||
|
||||
Reference in New Issue
Block a user