verteilen-core 1.4.12 → 1.4.13

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.
@@ -1,8 +1,11 @@
1
1
  import { DatabaseContainer, DataTime, Project } from "./base";
2
2
  import { ACLType, LocalPermission } from "./server";
3
- import { KeyValue } from "./struct";
4
3
  type ProjectCall = (p: Project) => Project;
5
4
  type DatabaseCall = () => Array<DatabaseContainer>;
5
+ export interface PluginI18N {
6
+ key: string;
7
+ value: any;
8
+ }
6
9
  export interface PluginContent {
7
10
  filename: string;
8
11
  url: string;
@@ -12,8 +15,8 @@ export interface PluginContent {
12
15
  }
13
16
  export interface Plugin {
14
17
  icon?: string;
15
- name: string | any;
16
- description: string | any;
18
+ name: string;
19
+ description: string;
17
20
  requireVersion: string;
18
21
  version?: string;
19
22
  progress?: number;
@@ -29,7 +32,7 @@ export interface PluginContainer extends DataTime {
29
32
  thumbnail?: string;
30
33
  icon?: string;
31
34
  owner?: string;
32
- title?: string | any;
35
+ title?: string;
33
36
  description?: string;
34
37
  url?: string;
35
38
  plugins: Array<Plugin>;
@@ -38,7 +41,7 @@ export interface PluginContainer extends DataTime {
38
41
  gen_projects?: Array<TemplateGroup_Project>;
39
42
  gen_databases?: Array<TemplateGroup_Database>;
40
43
  version: string;
41
- i18n: Array<KeyValue>;
44
+ i18n: Array<PluginI18N>;
42
45
  permission?: LocalPermission;
43
46
  acl?: ACLType;
44
47
  }
@@ -46,19 +49,19 @@ export interface PluginPageData {
46
49
  plugins: Array<PluginContainer>;
47
50
  }
48
51
  export interface PluginState {
49
- name: string | any;
52
+ name: string;
50
53
  url: string;
51
54
  installed: boolean;
52
55
  supported: boolean;
53
56
  }
54
57
  export interface TemplateData_Project {
55
- title: string | any;
58
+ title: string;
56
59
  filename: string;
57
60
  group: string;
58
61
  value: number;
59
62
  }
60
63
  export interface TemplateData_Database {
61
- title: string | any;
64
+ title: string;
62
65
  filename: string;
63
66
  group: string;
64
67
  value: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verteilen-core",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "license": "MIT",
5
5
  "homepage": "https://verteilen.github.io/wiki/",
6
6
  "author": "Elly",
@@ -16,6 +16,11 @@ type ProjectCall = (p:Project) => Project
16
16
  */
17
17
  type DatabaseCall = () => Array<DatabaseContainer>
18
18
 
19
+ export interface PluginI18N {
20
+ key: string
21
+ value: any
22
+ }
23
+
19
24
  /**
20
25
  * **Plugin Content**\
21
26
  * For single file specification
@@ -46,12 +51,12 @@ export interface Plugin {
46
51
  * **Plugin Title**\
47
52
  * Support i18n config
48
53
  */
49
- name: string | any
54
+ name: string
50
55
  /**
51
56
  * **Plugin Description**\
52
57
  * Support i18n config
53
58
  */
54
- description: string | any
59
+ description: string
55
60
  /**
56
61
  * **Minimum Require Application Version**
57
62
  */
@@ -117,7 +122,7 @@ export interface PluginContainer extends DataTime {
117
122
  * **Plugin Group Name**\
118
123
  * Support i18n config
119
124
  */
120
- title?: string | any
125
+ title?: string
121
126
  /**
122
127
  * **Plugin Group Description**
123
128
  */
@@ -155,9 +160,24 @@ export interface PluginContainer extends DataTime {
155
160
  */
156
161
  version: string
157
162
  /**
158
- * **Language key value set**
159
- */
160
- i18n: Array<KeyValue>
163
+ * **Language key value set**\
164
+ * @example
165
+ * [
166
+ * {
167
+ * key: "en",
168
+ * value: [
169
+ * "Key1": "KEY ONE"
170
+ * ]
171
+ * },
172
+ * {
173
+ * key: "zh-TW",
174
+ * value: [
175
+ * "Key1": "金鑰一"
176
+ * ]
177
+ * }
178
+ * ]
179
+ */
180
+ i18n: Array<PluginI18N>
161
181
  /**
162
182
  * **Local Permission**\
163
183
  * Client-side only permission field\
@@ -193,7 +213,7 @@ export interface PluginState {
193
213
  * **Plugin Name**\
194
214
  * Support i18n config
195
215
  */
196
- name: string | any
216
+ name: string
197
217
  /**
198
218
  * **Plugin Manifest URL Name**
199
219
  */
@@ -216,7 +236,7 @@ export interface TemplateData_Project {
216
236
  * **Project Template Name**\
217
237
  * Support i18n config
218
238
  */
219
- title: string | any
239
+ title: string
220
240
  /**
221
241
  * **Filename Name**
222
242
  */
@@ -239,7 +259,7 @@ export interface TemplateData_Database {
239
259
  * **Database Template Name**\
240
260
  * Support i18n config
241
261
  */
242
- title: string | any
262
+ title: string
243
263
  /**
244
264
  * **Filename Name**
245
265
  */