perf(bundle): replace broad storage and utils imports
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
*/
|
||||
import { getApiConfig } from "@/core/net/config/api_config";
|
||||
import { ExceptionHandler } from "@/core/errors";
|
||||
import { AppEnvUtil, Logger } from "@/utils";
|
||||
import { AppEnvUtil } from "@/utils/app-env";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const log = new Logger("ChatWebSocket");
|
||||
const RECONNECT_DELAY_MS = 3000;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 通过环境变量配置后端服务地址与超时时间。
|
||||
*
|
||||
*/
|
||||
import { AppEnvUtil, type AppEnv } from "@/utils";
|
||||
import { AppEnvUtil, type AppEnv } from "@/utils/app-env";
|
||||
|
||||
export type { AppEnv };
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@ import type { FetchHook } from "ofetch";
|
||||
import { ApiPath } from "../../../data/services/api/api_path";
|
||||
import { ApiError, ErrorCode } from "../../../data/services/api/api_result";
|
||||
import { AuthStorage } from "@/data/storage/auth/auth_storage";
|
||||
import { AppEnvUtil, deviceIdentifier, Result } from "@/utils";
|
||||
import { AppEnvUtil } from "@/utils/app-env";
|
||||
import { deviceIdentifier } from "@/utils/device_identifier";
|
||||
import { Result } from "@/utils/result";
|
||||
|
||||
/**
|
||||
* 不需要 auth token 刷新的路径
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
*/
|
||||
import type { FetchHook } from "ofetch";
|
||||
|
||||
import { AppEnvUtil, Logger } from "@/utils";
|
||||
import { AppEnvUtil } from "@/utils/app-env";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const log = new Logger("ApiLoggingInterceptor");
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*/
|
||||
import type { FetchHook } from "ofetch";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
import { ApiPath } from "../../../data/services/api/api_path";
|
||||
import { AuthStorage } from "../../../data/storage/auth/auth_storage";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* - 队列只负责发送节奏,不关心每批消息是否成功消费
|
||||
* - 队列可在任意时刻清空(dispose)
|
||||
*/
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
export type MessageConsumer = (content: string) => void | Promise<void>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user