Commit a0aea6aa authored by nanahira's avatar nanahira

fix event name

parent a686ebd6
...@@ -20,15 +20,15 @@ declare module 'koishi' { ...@@ -20,15 +20,15 @@ declare module 'koishi' {
wecom?: WecomEventBody; wecom?: WecomEventBody;
} }
interface EventMap { interface EventMap {
'wecom/enter_agent': WecomEventFunction; 'wecom/enter-agent': WecomEventFunction;
'wecom/subscribe': WecomEventFunction; 'wecom/subscribe': WecomEventFunction;
'wecom/unsubscribe': WecomEventFunction; 'wecom/unsubscribe': WecomEventFunction;
'wecom/LOCATION': WecomEventFunction<{ 'wecom/location': WecomEventFunction<{
Latitude: number; Latitude: number;
Longitude: number; Longitude: number;
Precision: number; Precision: number;
}>; }>;
'wecom/batch_job_result': WecomEventFunction<{ 'wecom/batch-job-result': WecomEventFunction<{
BatchJob: { BatchJob: {
JobId: string; JobId: string;
JobType: string; JobType: string;
...@@ -38,12 +38,12 @@ declare module 'koishi' { ...@@ -38,12 +38,12 @@ declare module 'koishi' {
}>; }>;
'wecom/click': WecomEventFunction<EventKeyBody>; 'wecom/click': WecomEventFunction<EventKeyBody>;
'wecom/view': WecomEventFunction<EventKeyBody>; 'wecom/view': WecomEventFunction<EventKeyBody>;
'wecom/scancode_push': WecomEventFunction<ScanCodeEventBody>; 'wecom/scancode-push': WecomEventFunction<ScanCodeEventBody>;
'wecom/scancode_waitmsg': WecomEventFunction<ScanCodeEventBody>; 'wecom/scancode-waitmsg': WecomEventFunction<ScanCodeEventBody>;
'wecom/pic_sysphoto': WecomEventFunction<PhotoEventBody>; 'wecom/pic-sysphoto': WecomEventFunction<PhotoEventBody>;
'wecom/pic_photo_or_album': WecomEventFunction<PhotoEventBody>; 'wecom/pic-photo-or-album': WecomEventFunction<PhotoEventBody>;
'wecom/pic_weixin': WecomEventFunction<PhotoEventBody>; 'wecom/pic-weixin': WecomEventFunction<PhotoEventBody>;
'wecom/location_select': WecomEventFunction< 'wecom/location-select': WecomEventFunction<
EventKeyBody & { EventKeyBody & {
SendLocationInfo: { SendLocationInfo: {
Location_X: number; Location_X: number;
...@@ -54,18 +54,18 @@ declare module 'koishi' { ...@@ -54,18 +54,18 @@ declare module 'koishi' {
}; };
} }
>; >;
'wecom/share_agent_change': WecomEventFunction; 'wecom/share-agent-change': WecomEventFunction;
'wecom/share_chain_change': WecomEventFunction; 'wecom/share-chain-change': WecomEventFunction;
'wecom/template_card_event': WecomEventFunction< 'wecom/template-card-event': WecomEventFunction<
CardEvent & { CardEvent & {
SelectedItems: CardEventSelectedItems; SelectedItems: CardEventSelectedItems;
} }
>; >;
'wecom/template_card_menu_event': WecomEventFunction<CardEvent>; 'wecom/template-card-menu-event': WecomEventFunction<CardEvent>;
'wecom/open_approval_change': WecomEventFunction<{ 'wecom/open-approval-change': WecomEventFunction<{
ApprovalInfo: ApprovalInfo; ApprovalInfo: ApprovalInfo;
}>; }>;
'wecom/change_contact': WecomEventFunction<ChangeContact>; 'wecom/change-contact': WecomEventFunction<ChangeContact>;
} }
} }
......
const path = require('path'); const path = require('path');
const packgeInfo = require('./package.json'); const packgeInfo = require('./package.json');
const { ESBuildMinifyPlugin } = require('esbuild-loader');
function externalsFromDep() { function externalsFromDep() {
return Object.fromEntries( return Object.fromEntries(
...@@ -43,4 +44,11 @@ module.exports = { ...@@ -43,4 +44,11 @@ module.exports = {
koishi: 'koishi', koishi: 'koishi',
...(packAll ? {} : externalsFromDep()), ...(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