koishi-plugin-echo-cave 1.18.3 → 1.18.4

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/lib/index.cjs CHANGED
@@ -29,8 +29,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  ));
30
30
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
31
 
32
- // src/locales/zh-CN.json
32
+ // src/config/locales/zh-CN.json
33
33
  var require_zh_CN = __commonJS({
34
+ "src/config/locales/zh-CN.json"(exports2, module2) {
35
+ module2.exports = {
36
+ adminMessageProtection: "\u5F00\u542F\u7BA1\u7406\u5458\u6D88\u606F\u4FDD\u62A4\uFF0C\u5F00\u542F\u540E\u7BA1\u7406\u5458\u53D1\u5E03\u7684\u6D88\u606F\u53EA\u80FD\u7531\u7BA1\u7406\u5458\u5220\u9664",
37
+ allowContributorDelete: "\u5141\u8BB8\u6295\u7A3F\u8005\u5220\u9664\u81EA\u5DF1\u6295\u7A3F\u7684\u56DE\u58F0\u6D1E",
38
+ allowSenderDelete: "\u5141\u8BB8\u539F\u59CB\u53D1\u9001\u8005\u5220\u9664\u88AB\u6295\u7A3F\u7684\u56DE\u58F0\u6D1E",
39
+ deleteMediaWhenDeletingMsg: "\u5220\u9664\u56DE\u58F0\u6D1E\u6D88\u606F\u65F6\u662F\u5426\u540C\u65F6\u5220\u9664\u5173\u8054\u7684\u5A92\u4F53\u6587\u4EF6",
40
+ enableSizeLimit: "\u662F\u5426\u542F\u7528\u5A92\u4F53\u6587\u4EF6\u5927\u5C0F\u9650\u5236",
41
+ maxImageSize: "\u6700\u5927\u56FE\u7247\u5927\u5C0F (MB)",
42
+ maxVideoSize: "\u6700\u5927\u89C6\u9891\u5927\u5C0F (MB)",
43
+ maxFileSize: "\u6700\u5927\u6587\u4EF6\u5927\u5C0F (MB)",
44
+ maxRecordSize: "\u6700\u5927\u5F55\u97F3\u5927\u5C0F (MB)",
45
+ useBase64ForMedia: "\u662F\u5426\u4F7F\u7528 Base64 \u7F16\u7801\u53D1\u9001\u5A92\u4F53\u6587\u4EF6\uFF0C\u5F00\u542F\u540E\u5C06\u8BFB\u53D6 base64 \u7F16\u7801\u53D1\u9001\u800C\u4E0D\u662F\u4F7F\u7528 file uri"
46
+ };
47
+ }
48
+ });
49
+
50
+ // src/locales/zh-CN.json
51
+ var require_zh_CN2 = __commonJS({
34
52
  "src/locales/zh-CN.json"(exports2, module2) {
35
53
  module2.exports = {
36
54
  _config: {
@@ -166,6 +184,7 @@ var require_zh_CN = __commonJS({
166
184
  // src/index.ts
167
185
  var index_exports = {};
168
186
  __export(index_exports, {
187
+ Config: () => Config,
169
188
  apply: () => apply,
170
189
  inject: () => inject,
171
190
  name: () => name
@@ -853,11 +872,28 @@ async function searchCave(ctx, session, userIds) {
853
872
  return session.text(".searchResult", [count, caveIds]);
854
873
  }
855
874
 
875
+ // src/config/config.ts
876
+ var import_koishi2 = require("koishi");
877
+ var Config = import_koishi2.Schema.object({
878
+ adminMessageProtection: import_koishi2.Schema.boolean().default(false),
879
+ allowContributorDelete: import_koishi2.Schema.boolean().default(true),
880
+ allowSenderDelete: import_koishi2.Schema.boolean().default(true),
881
+ deleteMediaWhenDeletingMsg: import_koishi2.Schema.boolean().default(true),
882
+ enableSizeLimit: import_koishi2.Schema.boolean().default(false),
883
+ maxImageSize: import_koishi2.Schema.number().default(2048),
884
+ maxVideoSize: import_koishi2.Schema.number().default(512),
885
+ maxFileSize: import_koishi2.Schema.number().default(512),
886
+ maxRecordSize: import_koishi2.Schema.number().default(512),
887
+ useBase64ForMedia: import_koishi2.Schema.boolean().default(false)
888
+ }).i18n({
889
+ "zh-CN": require_zh_CN()
890
+ });
891
+
856
892
  // src/index.ts
857
893
  var name = "echo-cave";
858
894
  var inject = ["database"];
859
895
  function apply(ctx, cfg) {
860
- ctx.i18n.define("zh-CN", require_zh_CN());
896
+ ctx.i18n.define("zh-CN", require_zh_CN2());
861
897
  ctx.model.extend(
862
898
  "echo_cave",
863
899
  {
@@ -900,6 +936,7 @@ function apply(ctx, cfg) {
900
936
  }
901
937
  // Annotate the CommonJS export names for ESM import in node:
902
938
  0 && (module.exports = {
939
+ Config,
903
940
  apply,
904
941
  inject,
905
942
  name
package/lib/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Config } from './config/config';
3
3
  import { Context } from 'koishi';
4
4
  export declare const name = "echo-cave";
5
5
  export declare const inject: string[];
6
+ export * from './config/config';
6
7
  export interface EchoCave {
7
8
  id: number;
8
9
  channelId: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-echo-cave",
3
3
  "description": "Group echo cave",
4
- "version": "1.18.3",
4
+ "version": "1.18.4",
5
5
  "main": "lib/index.cjs",
6
6
  "typings": "lib/index.d.ts",
7
7
  "type": "module",