@giteeteam/apps-manifest 0.5.0 → 0.5.2
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/manifest.d.ts +3 -0
- package/lib/manifest.js +9 -0
- package/lib/schema/storage.json +7 -1
- package/lib/types.d.ts +4 -1
- package/package.json +1 -1
package/lib/manifest.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export declare class Manifest {
|
|
|
6
6
|
get resources(): import("./types").IManifestResource[] | undefined;
|
|
7
7
|
get app(): import("./types").IManifestApp;
|
|
8
8
|
get tables(): any;
|
|
9
|
+
get modules(): import("./types").TManifestModules;
|
|
10
|
+
get storage(): import("./types").IStorage | undefined;
|
|
11
|
+
get locales(): import("./types").TManifestLocales | undefined;
|
|
9
12
|
getManifest(): IManifest;
|
|
10
13
|
getManifestString(): string;
|
|
11
14
|
/**
|
package/lib/manifest.js
CHANGED
|
@@ -17,6 +17,15 @@ class Manifest {
|
|
|
17
17
|
get tables() {
|
|
18
18
|
return this.manifest.tables;
|
|
19
19
|
}
|
|
20
|
+
get modules() {
|
|
21
|
+
return this.manifest.modules;
|
|
22
|
+
}
|
|
23
|
+
get storage() {
|
|
24
|
+
return this.manifest.storage;
|
|
25
|
+
}
|
|
26
|
+
get locales() {
|
|
27
|
+
return this.manifest.locales;
|
|
28
|
+
}
|
|
20
29
|
getManifest() {
|
|
21
30
|
return this.manifest;
|
|
22
31
|
}
|
package/lib/schema/storage.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"String",
|
|
33
33
|
"Boolean",
|
|
34
34
|
"Date",
|
|
35
|
-
"
|
|
35
|
+
"Float"
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
38
|
"required": {
|
|
@@ -46,6 +46,12 @@
|
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
+
},
|
|
50
|
+
"indexes": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
49
55
|
}
|
|
50
56
|
},
|
|
51
57
|
"required": [
|
package/lib/types.d.ts
CHANGED
|
@@ -71,13 +71,16 @@ export type TManifestLocalesItem = Record<string, string>;
|
|
|
71
71
|
export type TManifestLocalesItems = Record<string, TManifestLocalesItem>;
|
|
72
72
|
export type TManifestLocales = Record<TManifestLanguage, TManifestLocalesItems>;
|
|
73
73
|
export type TDependVersion = Record<TDependProduct, string[]>;
|
|
74
|
-
export type TStorageAttributeType = 'String' | '
|
|
74
|
+
export type TStorageAttributeType = 'String' | 'Float' | 'Date' | 'Boolean';
|
|
75
75
|
export interface IStorageAttribute {
|
|
76
76
|
type: TStorageAttributeType;
|
|
77
|
+
required?: boolean;
|
|
78
|
+
defaultValue?: any;
|
|
77
79
|
}
|
|
78
80
|
export interface IStorageEntity {
|
|
79
81
|
name: string;
|
|
80
82
|
attributes: Record<string, IStorageAttribute>;
|
|
83
|
+
indexes?: string[];
|
|
81
84
|
}
|
|
82
85
|
export interface IStorage {
|
|
83
86
|
entities: IStorageEntity[];
|