Enforce no-explicit-any; allow in tests
Enable @typescript-eslint/no-explicit-any as an error in the ESLint config to tighten typing across the codebase, and add an override to disable this rule for test files. Also apply non-functional cleanup in packages/proton/src/runtime.ts: reorder/imports and adjust formatting/indentation and string alignment for readability — no behavioral changes.
This commit is contained in:
1 parent
acc5084647
commit
80ee12ecc2
36 files changed
+229
-147
No files matched your search
@@ -31,7 +31,7 @@ export namespace GetGroupPttUrl {
|
||||
client: { agentType: 2 },
|
||||
},
|
||||
download: {
|
||||
node: normalizeMediaNode(p.node) as any,
|
||||
node: normalizeMediaNode(p.node),
|
||||
download: { video: { busiType: 0, sceneType: 0 } },
|
||||
},
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ export namespace GetGroupVideoUrl {
|
||||
client: { agentType: 2 },
|
||||
},
|
||||
download: {
|
||||
node: normalizeMediaNode(p.node) as any,
|
||||
node: normalizeMediaNode(p.node),
|
||||
download: { video: { busiType: 0, sceneType: 0 } },
|
||||
},
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ export namespace GetPrivatePttUrl {
|
||||
client: { agentType: 2 },
|
||||
},
|
||||
download: {
|
||||
node: normalizeMediaNode(p.node) as any,
|
||||
node: normalizeMediaNode(p.node),
|
||||
download: { video: { busiType: 0, sceneType: 0 } },
|
||||
},
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ export namespace GetPrivateVideoUrl {
|
||||
client: { agentType: 2 },
|
||||
},
|
||||
download: {
|
||||
node: normalizeMediaNode(p.node) as any,
|
||||
node: normalizeMediaNode(p.node),
|
||||
download: { video: { busiType: 0, sceneType: 0 } },
|
||||
},
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// differ. The response is parsed into a `domain + urlPath +
|
||||
// rKeyParam` triple → composed into `https://<domain><path><rKey>`.
|
||||
|
||||
import type { NTV2RichMediaResp } from '@snowluma/proto-defs/oidb-actions/media';
|
||||
import type { NTV2IndexNode, NTV2RichMediaResp } from '@snowluma/proto-defs/oidb-actions/media';
|
||||
import { ensureRetCodeZero } from '../shared';
|
||||
|
||||
export function parseNtv2DownloadUrl(body: NTV2RichMediaResp): string {
|
||||
@@ -24,7 +24,7 @@ export function parseNtv2DownloadUrl(body: NTV2RichMediaResp): string {
|
||||
/** Normalize a MediaIndexNode-shaped object into the wire-fields the
|
||||
* NTV2RichMedia `download.node` slot expects: `info{...}` /
|
||||
* `fileUuid` / `storeId` / `uploadTime` / `ttl` / `subType`. */
|
||||
export function normalizeMediaNode(node: NtMediaIndex): Record<string, unknown> {
|
||||
export function normalizeMediaNode(node: NtMediaIndex): NTV2IndexNode {
|
||||
const fileUuid = typeof node.fileUuid === 'string' ? node.fileUuid : '';
|
||||
if (!fileUuid) throw new Error('media node fileUuid is required');
|
||||
|
||||
|
||||
Reference in new issue
Block a user