owl-cli 6.152.0 → 6.154.0
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/bin/owl.js
CHANGED
|
@@ -67,9 +67,11 @@ function mkdir(path) {
|
|
|
67
67
|
function getIndexMapping(flatternedSpecs){
|
|
68
68
|
var allFields = flatternedSpecs.allFields;
|
|
69
69
|
var propMappings = {};
|
|
70
|
+
var stockFields = ["owl_createTime","m","_t","_v","_orgIds","_orgId","del","owl_createUserId","owl_lastModifiedUserId","owl_modifyTime","owl_createTime"];
|
|
70
71
|
for(var i=0; i<allFields.length; i++){
|
|
71
72
|
var field = allFields[i];
|
|
72
|
-
|
|
73
|
+
|
|
74
|
+
if(stockFields.indexOf(field.key)>=0){
|
|
73
75
|
continue;
|
|
74
76
|
}
|
|
75
77
|
if(field.fieldType == 'date'){
|
|
@@ -78,7 +80,7 @@ function getIndexMapping(flatternedSpecs){
|
|
|
78
80
|
};
|
|
79
81
|
|
|
80
82
|
}
|
|
81
|
-
else if(field.fieldType == 'string'){
|
|
83
|
+
else if(field.fieldType == 'string' || field.fieldType == 'choice'){
|
|
82
84
|
propMappings[field.key] = {
|
|
83
85
|
"type":"text",
|
|
84
86
|
"fields": {
|
|
@@ -89,6 +91,11 @@ function getIndexMapping(flatternedSpecs){
|
|
|
89
91
|
}
|
|
90
92
|
};
|
|
91
93
|
}
|
|
94
|
+
else if(field.fieldType=='number'){
|
|
95
|
+
propMappings[field.key] = {
|
|
96
|
+
"type":"double"
|
|
97
|
+
};
|
|
98
|
+
}
|
|
92
99
|
}
|
|
93
100
|
if(Object.keys(propMappings).length>0){
|
|
94
101
|
var s = JSON.stringify(propMappings);
|
|
@@ -262,6 +269,9 @@ function processOwlFile(dir,name, outdir, templatePath, buildType, modelDir,proj
|
|
|
262
269
|
|
|
263
270
|
function processInputDir(dir, outdir, templatePath, buildType, project) {
|
|
264
271
|
readdirSync(resolve(cwd, dir)).map(name => {
|
|
272
|
+
if(name == 'api' || name=='sql'){
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
265
275
|
if (isDirectory(resolve(dir, name))) {
|
|
266
276
|
try {
|
|
267
277
|
fs.mkdirSync(resolve(outdir, name))
|
|
@@ -12,40 +12,73 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
|
|
16
15
|
"mappings": {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
"dynamic": "false",
|
|
17
|
+
"properties": {
|
|
18
|
+
"m": {
|
|
19
|
+
"type": "keyword"
|
|
20
|
+
},
|
|
21
|
+
"_t": {
|
|
22
|
+
"type": "keyword"
|
|
23
|
+
},
|
|
24
|
+
"_v": {
|
|
25
|
+
"type": "integer"
|
|
26
|
+
},
|
|
27
|
+
"_orgIds": {
|
|
28
|
+
"type": "text",
|
|
29
|
+
"fields": {
|
|
30
|
+
"keyword": {
|
|
31
|
+
"type": "keyword",
|
|
32
|
+
"ignore_above": 256
|
|
24
33
|
}
|
|
25
|
-
},{
|
|
26
|
-
"geo_point": {
|
|
27
|
-
"match_mapping_type": "object",
|
|
28
|
-
"match": "*_geo_point",
|
|
29
|
-
"mapping": {
|
|
30
|
-
"type": "geo_point"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"owl_createTime":{
|
|
43
|
-
"type":"date"
|
|
35
|
+
},
|
|
36
|
+
"_orgId": {
|
|
37
|
+
"type": "text",
|
|
38
|
+
"fields": {
|
|
39
|
+
"keyword": {
|
|
40
|
+
"type": "keyword",
|
|
41
|
+
"ignore_above": 256
|
|
42
|
+
}
|
|
44
43
|
}
|
|
45
|
-
|
|
44
|
+
},
|
|
45
|
+
"del": {
|
|
46
|
+
"type": "text",
|
|
47
|
+
"fields": {
|
|
48
|
+
"keyword": {
|
|
49
|
+
"type": "keyword",
|
|
50
|
+
"ignore_above": 256
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"owl_createUserId": {
|
|
55
|
+
"type": "text",
|
|
56
|
+
"fields": {
|
|
57
|
+
"keyword": {
|
|
58
|
+
"type": "keyword",
|
|
59
|
+
"ignore_above": 256
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"owl_lastModifiedUserId": {
|
|
64
|
+
"type": "text",
|
|
65
|
+
"fields": {
|
|
66
|
+
"keyword": {
|
|
67
|
+
"type": "keyword",
|
|
68
|
+
"ignore_above": 256
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"owl_modifyTime": {
|
|
73
|
+
"type": "date"
|
|
74
|
+
},
|
|
75
|
+
"owl_createTime": {
|
|
76
|
+
"type": "date"
|
|
46
77
|
}
|
|
78
|
+
@fieldMappings
|
|
79
|
+
}
|
|
47
80
|
},
|
|
48
|
-
"aliases"
|
|
81
|
+
"aliases": {
|
|
49
82
|
"@projectCode": {}
|
|
50
83
|
}
|
|
51
84
|
}
|