Remove bridge proto schemas and parity test
Delete proto schema modules under packages/core/src/bridge/proto (action.ts, element.ts, highway.ts, longmsg.ts, message.ts, notify.ts, oidb-action.ts, oidb.ts) and the related test packages/core/tests/proton-parity.test.ts. These files contained protobuf schema definitions for the bridge layer; remove them as part of a cleanup/refactor. Update any imports or references to these modules to their new locations or replacements.
This commit is contained in:
1 parent
02bab710b8
commit
5ea1c3a961
45 files changed
+1361
-4230
No files matched your search
@@ -3,20 +3,17 @@
|
||||
// related siblings, lift the whole group out into its own file.
|
||||
|
||||
import type { Bridge } from '../bridge';
|
||||
import { protoDecode, protoEncode } from '../../protobuf/decode';
|
||||
import { runOidb, makeOidbEnvelope } from '../bridge-oidb';
|
||||
import {
|
||||
MiniAppShareReqSchema,
|
||||
MiniAppShareRespSchema,
|
||||
} from '../proto/oidb-action';
|
||||
import type {
|
||||
MiniAppShareReq,
|
||||
MiniAppShareResp,
|
||||
Oidb0x112eReq,
|
||||
Oidb0x112eResp,
|
||||
Oidb0x990Req,
|
||||
Oidb0x990Resp,
|
||||
Oidb0xeb7Req,
|
||||
Oidb0xeb7Resp,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
|
||||
@@ -64,7 +61,7 @@ export async function getMiniAppArk(
|
||||
throw new Error(`unsupported type: ${type}, only support bili and weibo`);
|
||||
}
|
||||
|
||||
const request = protoEncode({
|
||||
const request = protobuf_encode<MiniAppShareReq>({
|
||||
sdkVersion: 'V1_PC_MINISDK_99.99.99_1_APP_A',
|
||||
body: {
|
||||
appid,
|
||||
@@ -74,7 +71,7 @@ export async function getMiniAppArk(
|
||||
jumpUrl,
|
||||
iconUrl,
|
||||
},
|
||||
}, MiniAppShareReqSchema);
|
||||
});
|
||||
|
||||
const result = await bridge.sendRawPacket('LightAppSvc.mini_app_share.AdaptShareInfo', request);
|
||||
|
||||
@@ -82,7 +79,7 @@ export async function getMiniAppArk(
|
||||
throw new Error(result.errorMessage || 'get mini app ark failed');
|
||||
}
|
||||
|
||||
const decoded = protoDecode(result.responseData, MiniAppShareRespSchema);
|
||||
const decoded = protobuf_decode<MiniAppShareResp>(result.responseData);
|
||||
const jsonStr = decoded?.body?.jsonStr;
|
||||
|
||||
if (!jsonStr) {
|
||||
|
||||
Reference in new issue
Block a user