Commit a0aea6aa authored by nanahira's avatar nanahira

fix event name

parent a686ebd6
......@@ -20,15 +20,15 @@ declare module 'koishi' {
wecom?: WecomEventBody;
}
interface EventMap {
'wecom/enter_agent': WecomEventFunction;
'wecom/enter-agent': WecomEventFunction;
'wecom/subscribe': WecomEventFunction;
'wecom/unsubscribe': WecomEventFunction;
'wecom/LOCATION': WecomEventFunction<{
'wecom/location': WecomEventFunction<{
Latitude: number;
Longitude: number;
Precision: number;
}>;
'wecom/batch_job_result': WecomEventFunction<{
'wecom/batch-job-result': WecomEventFunction<{
BatchJob: {
JobId: string;
JobType: string;
......@@ -38,12 +38,12 @@ declare module 'koishi' {
}>;
'wecom/click': WecomEventFunction<EventKeyBody>;
'wecom/view': WecomEventFunction<EventKeyBody>;
'wecom/scancode_push': WecomEventFunction<ScanCodeEventBody>;
'wecom/scancode_waitmsg': WecomEventFunction<ScanCodeEventBody>;
'wecom/pic_sysphoto': WecomEventFunction<PhotoEventBody>;
'wecom/pic_photo_or_album': WecomEventFunction<PhotoEventBody>;
'wecom/pic_weixin': WecomEventFunction<PhotoEventBody>;
'wecom/location_select': WecomEventFunction<
'wecom/scancode-push': WecomEventFunction<ScanCodeEventBody>;
'wecom/scancode-waitmsg': WecomEventFunction<ScanCodeEventBody>;
'wecom/pic-sysphoto': WecomEventFunction<PhotoEventBody>;
'wecom/pic-photo-or-album': WecomEventFunction<PhotoEventBody>;
'wecom/pic-weixin': WecomEventFunction<PhotoEventBody>;
'wecom/location-select': WecomEventFunction<
EventKeyBody & {
SendLocationInfo: {
Location_X: number;
......@@ -54,18 +54,18 @@ declare module 'koishi' {
};
}
>;
'wecom/share_agent_change': WecomEventFunction;
'wecom/share_chain_change': WecomEventFunction;
'wecom/template_card_event': WecomEventFunction<
'wecom/share-agent-change': WecomEventFunction;
'wecom/share-chain-change': WecomEventFunction;
'wecom/template-card-event': WecomEventFunction<
CardEvent & {
SelectedItems: CardEventSelectedItems;
}
>;
'wecom/template_card_menu_event': WecomEventFunction<CardEvent>;
'wecom/open_approval_change': WecomEventFunction<{
'wecom/template-card-menu-event': WecomEventFunction<CardEvent>;
'wecom/open-approval-change': WecomEventFunction<{
ApprovalInfo: ApprovalInfo;
}>;
'wecom/change_contact': WecomEventFunction<ChangeContact>;
'wecom/change-contact': WecomEventFunction<ChangeContact>;
}
}
......
const path = require('path');
const packgeInfo = require('./package.json');
const { ESBuildMinifyPlugin } = require('esbuild-loader');
function externalsFromDep() {
return Object.fromEntries(
......@@ -43,4 +44,11 @@ module.exports = {
koishi: 'koishi',
...(packAll ? {} : externalsFromDep()),
},
optimization: {
minimizer: [
new ESBuildMinifyPlugin({
keepNames: true,
}),
],
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment