node-karin 1.3.10 → 1.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # 更新日志
2
2
 
3
+ ## [1.3.11](https://github.com/KarinJS/Karin/compare/core-v1.3.10...core-v1.3.11) (2025-02-15)
4
+
5
+
6
+ ### 🐛 Bug Fixes
7
+
8
+ * `web.config` save方法给予默认值 ([c5f8539](https://github.com/KarinJS/Karin/commit/c5f853995a3ed0ac285a7031a595b26f2e27ccbb))
9
+ * 修正后端传递组件包含正则处理错误的问题 ([dc3a2ae](https://github.com/KarinJS/Karin/commit/dc3a2aebdfd7d685ecab27cfa1fc18093579933d))
10
+ * 组件save函数返回值处理 ([452c725](https://github.com/KarinJS/Karin/commit/452c725c815827d8ceb9189dbb974ce49f89de13))
11
+ * 补上组件注释 ([7885de6](https://github.com/KarinJS/Karin/commit/7885de68cd86d32f170074ae04605012dbc444aa))
12
+
13
+
14
+ ### 🎫 Chores
15
+
16
+ * 格式化 ([800d1de](https://github.com/KarinJS/Karin/commit/800d1de2c29c1e2fbedb870dcf5c659d774ff533))
17
+
18
+
19
+ ### 🎡 Continuous Integration
20
+
21
+ * build.js ([c6bc6c1](https://github.com/KarinJS/Karin/commit/c6bc6c1a92acb57bf5048e355ed78732d887eb33))
22
+
3
23
  ## [1.3.10](https://github.com/KarinJS/Karin/compare/core-v1.3.9...core-v1.3.10) (2025-02-14)
4
24
 
5
25
 
package/dist/index.d.ts CHANGED
@@ -10734,73 +10734,139 @@ declare const divider: {
10734
10734
  vertical: (key: string, config?: Partial<Omit<DividerProps, "key" | "componentType">>) => DividerProps;
10735
10735
  };
10736
10736
 
10737
- declare const components: {
10737
+ /**
10738
+ * 单选框
10739
+ */
10740
+ declare const radio: {
10741
+ /**
10742
+ * 创建基础单选框
10743
+ * @param key 唯一标识符
10744
+ * @param options 单选框配置
10745
+ */
10746
+ create: (key: string, options: Omit<Radio, "key" | "componentType" | "className">) => Radio;
10747
+ /**
10748
+ * 创建单选框组
10749
+ * @param key 唯一标识符
10750
+ * @param options 单选框组配置
10751
+ */
10752
+ group: (key: string, options: Omit<RadioGroupProps, "key" | "componentType">) => RadioGroupProps;
10753
+ /**
10754
+ * 默认单选框组
10755
+ * @param key 唯一标识符
10756
+ * @param config 单选框组配置
10757
+ */
10758
+ defaultGroup: (key: string, config?: Partial<Omit<RadioGroupProps, "key" | "componentType">>) => RadioGroupProps;
10759
+ /**
10760
+ * 默认单选框
10761
+ * @param key 唯一标识符
10762
+ * @param config 单选框配置
10763
+ */
10764
+ default: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10765
+ /**
10766
+ * 必选单选框
10767
+ * @param key 唯一标识符
10768
+ * @param config 单选框配置
10769
+ */
10770
+ required: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10771
+ /**
10772
+ * 禁用单选框
10773
+ * @param key 唯一标识符
10774
+ * @param config 单选框配置
10775
+ */
10776
+ disabled: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10777
+ /**
10778
+ * 只读单选框
10779
+ * @param key 唯一标识符
10780
+ * @param config 单选框配置
10781
+ */
10782
+ readonly: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10783
+ /**
10784
+ * 错误状态单选框
10785
+ * @param key 唯一标识符
10786
+ * @param config 单选框配置
10787
+ */
10788
+ invalid: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10789
+ };
10790
+
10791
+ /**
10792
+ * 复选框
10793
+ */
10794
+ declare const checkbox: {
10795
+ /**
10796
+ * 创建基础复选框
10797
+ * @param key 唯一标识符
10798
+ * @param options 复选框配置
10799
+ */
10800
+ create: (key: string, options: Omit<CheckboxProps, "key" | "componentType" | "className">) => CheckboxProps;
10801
+ /**
10802
+ * 创建复选框组
10803
+ * @param key 唯一标识符
10804
+ * @param options 复选框组配置
10805
+ */
10806
+ group: (key: string, options: Omit<CheckboxGroupProps, "key" | "componentType">) => CheckboxGroupProps;
10807
+ /**
10808
+ * 默认复选框组
10809
+ * @param key 唯一标识符
10810
+ * @param config 复选框组配置
10811
+ */
10812
+ defaultGroup: (key: string, config?: Partial<Omit<CheckboxGroupProps, "key" | "componentType">>) => CheckboxGroupProps;
10813
+ /**
10814
+ * 默认复选框
10815
+ * @param key 唯一标识符
10816
+ * @param config 复选框配置
10817
+ */
10818
+ default: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10819
+ /**
10820
+ * 必选复选框
10821
+ * @param key 唯一标识符
10822
+ * @param config 复选框配置
10823
+ */
10824
+ required: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10825
+ /**
10826
+ * 禁用复选框
10827
+ * @param key 唯一标识符
10828
+ * @param config 复选框配置
10829
+ */
10830
+ disabled: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10831
+ /**
10832
+ * 只读复选框
10833
+ * @param key 唯一标识符
10834
+ * @param config 复选框配置
10835
+ */
10836
+ readonly: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10837
+ /**
10838
+ * 不确定状态复选框
10839
+ * @param key 唯一标识符
10840
+ * @param config 复选框配置
10841
+ */
10842
+ indeterminate: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10843
+ /**
10844
+ * 错误状态复选框
10845
+ * @param key 唯一标识符
10846
+ * @param config 复选框配置
10847
+ */
10848
+ invalid: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10849
+ };
10850
+
10851
+ type Components = {
10738
10852
  /** 分隔线 */
10739
- divider: {
10740
- create: (key: string, options?: Omit<DividerProps, "key" | "componentType">) => DividerProps;
10741
- horizontal: (key: string, config?: Partial<Omit<DividerProps, "key" | "componentType">>) => DividerProps;
10742
- vertical: (key: string, config?: Partial<Omit<DividerProps, "key" | "componentType">>) => DividerProps;
10743
- };
10853
+ divider: typeof divider;
10744
10854
  /** 输入框 */
10745
- input: {
10746
- create: (key: string, options: Omit<InputProps, "key" | "componentType">) => InputProps;
10747
- string: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10748
- number: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10749
- boolean: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10750
- date: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10751
- time: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10752
- datetime: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10753
- email: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10754
- url: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10755
- tel: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10756
- password: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10757
- color: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10758
- json: (key: string, config?: Partial<Omit<InputProps, "key" | "componentType">>) => InputProps;
10759
- };
10855
+ input: typeof input;
10760
10856
  /** 开关 */
10761
- switch: {
10762
- create: (key: string, options?: Omit<SwitchProps, "key" | "componentType">) => SwitchProps;
10763
- options: (key: string, config?: Partial<Omit<SwitchProps, "key" | "componentType">>) => SwitchProps;
10764
- };
10857
+ switch: typeof switchComponent;
10765
10858
  /** 手风琴 */
10766
- accordion: {
10767
- create: (key: string, options?: Omit<AccordionProps, "key" | "componentType">) => AccordionProps;
10768
- default: (key: string) => AccordionProps;
10769
- createItem: (key: string, options?: Omit<AccordionItemProps, "key" | "componentType">) => AccordionItemProps;
10770
- };
10859
+ accordion: typeof accordion;
10771
10860
  /** 手风琴Pro */
10772
- accordionPro: {
10773
- create: (key: string, data: Record<string, any>[], options?: Omit<AccordionProProps, "key" | "componentType" | "data">) => AccordionProProps;
10774
- };
10861
+ accordionPro: typeof accordionPro;
10775
10862
  /** 手风琴项 */
10776
- accordionItem: {
10777
- create: (key: string, options?: Omit<AccordionItemProps, "key" | "componentType">) => AccordionItemProps;
10778
- default: (key: string, title: string, children?: Children[]) => AccordionItemProps;
10779
- };
10863
+ accordionItem: typeof accordionItem;
10780
10864
  /** 单选框 */
10781
- radio: {
10782
- create: (key: string, options: Omit<Radio, "key" | "componentType" | "className">) => Radio;
10783
- group: (key: string, options: Omit<RadioGroupProps, "key" | "componentType">) => RadioGroupProps;
10784
- defaultGroup: (key: string, config?: Partial<Omit<RadioGroupProps, "key" | "componentType">>) => RadioGroupProps;
10785
- default: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10786
- required: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10787
- disabled: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10788
- readonly: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10789
- invalid: (key: string, config?: Partial<Omit<Radio, "key" | "componentType" | "className">>) => Radio;
10790
- };
10865
+ radio: typeof radio;
10791
10866
  /** 多选框 */
10792
- checkbox: {
10793
- create: (key: string, options: Omit<CheckboxProps, "key" | "componentType" | "className">) => CheckboxProps;
10794
- group: (key: string, options: Omit<CheckboxGroupProps, "key" | "componentType">) => CheckboxGroupProps;
10795
- defaultGroup: (key: string, config?: Partial<Omit<CheckboxGroupProps, "key" | "componentType">>) => CheckboxGroupProps;
10796
- default: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10797
- required: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10798
- disabled: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10799
- readonly: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10800
- indeterminate: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10801
- invalid: (key: string, config?: Partial<Omit<CheckboxProps, "key" | "componentType" | "className">>) => CheckboxProps;
10802
- };
10867
+ checkbox: typeof checkbox;
10803
10868
  };
10869
+ declare const components: Components;
10804
10870
  type ComponentsClass = typeof divider | ReturnType<typeof input.create> | ReturnType<typeof switchComponent.create>;
10805
10871
 
10806
10872
  /**
@@ -11063,4 +11129,4 @@ declare let level: ReturnType<typeof createLevelDB>;
11063
11129
  */
11064
11130
  declare const start: () => Promise<void>;
11065
11131
 
11066
- export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentProps, type ComponentType, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileOptions, type DownloadFileResponse, EVENT_COUNT, type ElementTypes, type Elements, type Env, type Event, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, type GetAtAllCountResponse, type GetBot, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginReturn, type GetPluginType, type GiftElement, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type ImageElement, type ImageSegment, InputDataType, type InputProps, type InputResult, type JsonElement, type JsonSegment, type KarinButton, type KeyboardElement, type LocationElement, type LocationSegment, type Log, type Logger, type LoggerExpand, type LoggerLevel, type LoggerOptions, type LongMsgElement, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NodeElement, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type OnlinePluginInfo, type Option, type Options, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PkgData, type PkgInfo, Plugin, type PluginFile, type PluginFncTypes, type PluginLists, type PluginOptions, type PluginRule, type PluginUpdateInfo, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type Render, type RenderResult, Renderer, type Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SEND_MSG, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type SrcReply, type SwitchField, type SwitchProps, type SwitchResult, type Task, type TextElement, type TextField, type TextSegment, type TitleField, type UnregisterBot, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, base64, buffer, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createDirectMessage, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createInnerLogger, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, debug, karin as default, divider, downFile, errorToString, exec, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getBot, getBotCount, getCommit, getFiles, getHash, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTime, handler$1 as handler, importModule, initOneBot, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPlugin, isRoot, isStatic, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, level, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, pkgRoot, qqbotToKarin, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, render, renderHtml, renderMultiHtml, requireFile, requireFileSync, restart, restartDirect, rmSync, save, type screenshot, segment, sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
11132
+ export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileOptions, type DownloadFileResponse, EVENT_COUNT, type ElementTypes, type Elements, type Env, type Event, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, type GetAtAllCountResponse, type GetBot, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginReturn, type GetPluginType, type GiftElement, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type ImageElement, type ImageSegment, InputDataType, type InputProps, type InputResult, type JsonElement, type JsonSegment, type KarinButton, type KeyboardElement, type LocationElement, type LocationSegment, type Log, type Logger, type LoggerExpand, type LoggerLevel, type LoggerOptions, type LongMsgElement, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NodeElement, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type OnlinePluginInfo, type Option, type Options, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PkgData, type PkgInfo, Plugin, type PluginFile, type PluginFncTypes, type PluginLists, type PluginOptions, type PluginRule, type PluginUpdateInfo, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type Render, type RenderResult, Renderer, type Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SEND_MSG, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type SrcReply, type SwitchField, type SwitchProps, type SwitchResult, type Task, type TextElement, type TextField, type TextSegment, type TitleField, type UnregisterBot, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, base64, buffer, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createDirectMessage, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createInnerLogger, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, debug, karin as default, divider, downFile, errorToString, exec, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getBot, getBotCount, getCommit, getFiles, getHash, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTime, handler$1 as handler, importModule, initOneBot, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPlugin, isRoot, isStatic, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, level, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, pkgRoot, qqbotToKarin, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, render, renderHtml, renderMultiHtml, requireFile, requireFileSync, restart, restartDirect, rmSync, save, type screenshot, segment, sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
package/dist/index.js CHANGED
@@ -10115,8 +10115,9 @@ var init_config3 = __esm({
10115
10115
  const configPath2 = getConfigPath(options);
10116
10116
  if (!configPath2) return;
10117
10117
  const { save: save2 } = await loadConfig(configPath2);
10118
- save2(options.config);
10119
- createSuccessResponse(res, null);
10118
+ const result = save2(options.config);
10119
+ const response = util3.types.isPromise(result) ? await result : result;
10120
+ createSuccessResponse(res, response || { success: true, message: "\u6CA1\u6709\u8FD4\u56DE\u503C\u54E6 \u03C6(>\u03C9<*) " });
10120
10121
  };
10121
10122
  isConfigExist = async (req, res) => {
10122
10123
  const options = req.body;
@@ -13680,6 +13681,8 @@ function AdapterConvertKarin(data = []) {
13680
13681
  }
13681
13682
  }
13682
13683
  } catch (error) {
13684
+ logger.error("[AdapterConvertKarin] \u8F6C\u6362\u9519\u8BEF");
13685
+ logger.error(error);
13683
13686
  return elements;
13684
13687
  }
13685
13688
  return elements;
@@ -16783,11 +16786,22 @@ var init_input = __esm({
16783
16786
  "src/components/input.ts"() {
16784
16787
  "use strict";
16785
16788
  init_esm_shims();
16786
- createInput = (key, config2 = {}) => ({
16787
- ...config2,
16788
- key,
16789
- componentType: "input"
16790
- });
16789
+ createInput = (key, config2 = {}) => {
16790
+ const data = {
16791
+ ...config2,
16792
+ key,
16793
+ componentType: "input"
16794
+ };
16795
+ if (config2.rules) {
16796
+ data.rules = config2.rules.map((rule) => {
16797
+ return {
16798
+ ...rule,
16799
+ regex: rule.regex instanceof RegExp ? rule.regex.source : rule.regex
16800
+ };
16801
+ });
16802
+ }
16803
+ return data;
16804
+ };
16791
16805
  input = {
16792
16806
  /**
16793
16807
  * 创建基础输入框
@@ -0,0 +1 @@
1
+ import{d as a}from"./index-VSbX3cF-.js";var r=a;export{r as default};
@@ -0,0 +1 @@
1
+ import{d as a}from"./index-VSbX3cF-.js";var r=a;export{r as default};