Normalize imports, typings and formatting

Reorder and normalize imports, add missing type imports, and fix whitespace/formatting across multiple files. Notable updates: eslint.config.ts import ordering; core bridge APIs (group-album, misc, web) now import Json types; tests/highway pipeline import ordering and added type imports; protocol changes (element-builder, highway client/pipeline) reorganized imports and added proto type imports; many oidb service modules moved protobuf encode/decode imports for consistency; web group modules (album, essence, honor, notice, request-util) reordered imports, adjusted typings/indentation, and small whitespace fixes. These edits are stylistic and typing improvements and should not change runtime behavior.
This commit is contained in:
手瓜一十雪 committed 2026-05-24 13:39:35 +08:00
1 parent 80ee12ecc2
commit 456086599c
23 files changed
+83 -83

No files matched your search

+2 -2
View File
@@ -1,3 +1,4 @@
import type { JsonObject, JsonValue } from '@snowluma/common/json';
import type {
DeleteMediasRequest,
DeleteMediasResponse,
@@ -6,12 +7,11 @@ import type {
DoQunLikeRequest,
DoQunLikeResponse,
GetMediaListRequest,
MediaInfo,
GetMediaListResponse,
MediaInfo,
} from '@snowluma/proto-defs/oidb-actions/group-album';
import { getGroupAlbumList, uploadImageToGroupAlbum } from '@snowluma/protocol/web/group-album';
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
import type { JsonObject, JsonValue } from '@snowluma/common/json';
import type { BridgeContext } from '../bridge-context';
+1 -1
View File
@@ -1,9 +1,9 @@
import type { JsonObject, JsonValue } from '@snowluma/common/json';
import type {
MiniAppShareReq,
MiniAppShareResp,
} from '@snowluma/proto-defs/oidb-actions/base';
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
import type { JsonObject, JsonValue } from '@snowluma/common/json';
import type { BridgeContext } from '../bridge-context';
// Migrated OIDB cmds — facade methods are one-line forwarders.
import { ClickInlineKeyboardButton } from '@snowluma/protocol/oidb-services/misc/click-inline-keyboard-button';
+1 -1
View File
@@ -6,8 +6,8 @@ import {
deleteGroupNotice as deleteGroupNoticeHttp,
getGroupNoticeWebAPI,
setGroupNoticeWebAPI,
type SetNoticeRetSuccess,
uploadGroupNoticeImage,
type SetNoticeRetSuccess,
} from '@snowluma/protocol/web/group-notice';
import { RequestUtil } from '@snowluma/protocol/web/request-util';
import type { Bridge } from '../bridge';
+3 -3
View File
@@ -5,8 +5,8 @@
// The OIDB response is built with real protobuf encoding so we exercise
// the actual decode path inside the pipeline.
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
import { beforeEach, describe, expect, it, vi } from 'vitest';
vi.mock('@snowluma/protocol/highway', () => ({
fetchHighwaySession: vi.fn(async () => ({ sessionId: 'fake-session' })),
@@ -16,6 +16,8 @@ vi.mock('@snowluma/protocol/highway', () => ({
GROUP_IMAGE_CMD_ID: 1004,
}));
import type { EncodableMediaMsgInfo, NTV2UploadRichMediaReq, NTV2UploadRichMediaResp } from '@snowluma/proto-defs/highway';
import type { OidbBase } from '@snowluma/proto-defs/oidb';
import * as highway from '@snowluma/protocol/highway';
import {
finalizeMediaMsgInfo,
@@ -24,8 +26,6 @@ import {
runNtv2Upload,
type MediaSubFileUpload,
} from '@snowluma/protocol/highway/pipeline';
import type { OidbBase } from '@snowluma/proto-defs/oidb';
import type { EncodableMediaMsgInfo, NTV2UploadRichMediaReq, NTV2UploadRichMediaResp } from '@snowluma/proto-defs/highway';
interface FakeUploadResponse {
upload?: {