semanticdb-core 1.1.25 → 1.1.27

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.
@@ -37,4 +37,7 @@ export interface LogicformType {
37
37
  skip?: number;
38
38
  representation?: RepresentationType;
39
39
  entity_id?: string;
40
+ defaultAuthQuery?: {
41
+ [schemaId: string]: QueryType;
42
+ };
40
43
  }
@@ -47,11 +47,11 @@ function isSchemaValid(schema, schemasDict) {
47
47
  if (typeof schema.syno === 'string') {
48
48
  schema.syno = schema.syno.split(',');
49
49
  }
50
- const schemaNames = [schema.name, ...(schema.syno || [])];
50
+ const schemaNames = [schema.name, ...(schema.syno || [])].filter(n => n.trim().length > 0);
51
51
  let hierarchyNames = [];
52
52
  if (schema.hierarchy) {
53
53
  for (const h of schema.hierarchy) {
54
- hierarchyNames = [...hierarchyNames, h.name, ...(h.syno || [])];
54
+ hierarchyNames = [...hierarchyNames, h.name, ...(h.syno || [])].filter(n => n.trim().length > 0);
55
55
  }
56
56
  }
57
57
  // ==================== RULE: schema和hierarchy不能有名词重复 ====================
@@ -189,7 +189,7 @@ function isPropertyValid(property, schemaNames = [], hierarchyNames = []) {
189
189
  propertySyno = syno.split(',');
190
190
  }
191
191
  // RULE: 属性名或者属性syno不能和schema名和schema syno一样
192
- const propertyNames = [property.name || '', ...propertySyno];
192
+ const propertyNames = [property.name || '', ...propertySyno].filter(n => n.trim().length > 0);
193
193
  const conflicts = _intersection(schemaNames, propertyNames);
194
194
  if (conflicts.length > 0) {
195
195
  return { valid: false, message: `属性${property.name}和Schema包含相同的关键词: ${conflicts.join(',')}` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semanticdb-core",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [