semanticdb-core 1.1.10 → 1.1.11

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.
@@ -13,8 +13,6 @@ export interface PredItemProperty extends PropertyType {
13
13
  baseProperty?: PropertyType | null;
14
14
  auth?: boolean;
15
15
  is_delta?: boolean;
16
- components?: any[];
17
- componentProperties?: (PredItemProperty | undefined)[];
18
16
  from?: string;
19
17
  }
20
18
  /**
@@ -209,16 +209,14 @@ const propertyForPredItem = (predItem, s, ctx) => {
209
209
  // 递归处理componentProperties
210
210
  if (targetProperty.components) {
211
211
  targetProperty.componentProperties = targetProperty.components.map((c) => {
212
- try {
213
- if (!c.name) {
214
- c.name = (0, nameForPredItem_1.nameForPredItem)(c, schema, ctx);
215
- }
216
- return (0, exports.propertyForPredItem)(c, schema, ctx);
212
+ if (!c.name) {
213
+ c.name = (0, nameForPredItem_1.nameForPredItem)(c, schema, ctx);
217
214
  }
218
- catch (error) {
219
- console.error('in propertyForPredItem componentProperties', error);
220
- return undefined;
215
+ const property = (0, exports.propertyForPredItem)(c, schema, ctx);
216
+ if (!property) {
217
+ throw new Error(`生成property失败:${JSON.stringify(c)}`);
221
218
  }
219
+ return property;
222
220
  });
223
221
  }
224
222
  // 清理不需要的字段
@@ -70,6 +70,8 @@ export interface PropertyTypeDraft {
70
70
  copyable?: boolean;
71
71
  };
72
72
  can_drilldown?: boolean;
73
+ components?: any[];
74
+ componentProperties?: PropertyType[];
73
75
  unit?: string;
74
76
  level?: string;
75
77
  versioned?: boolean;
@@ -78,7 +80,6 @@ export interface PropertyTypeDraft {
78
80
  drilldown?: any[];
79
81
  };
80
82
  recommend_kpis?: any[];
81
- components?: any[];
82
83
  quantifier?: string;
83
84
  quantifiers?: Record<string, number>;
84
85
  }
@@ -7,6 +7,8 @@ export interface HierarchyType {
7
7
  use_full_length?: boolean;
8
8
  }
9
9
  export interface SchemaTypeDraft {
10
+ sid?: string;
11
+ id?: string;
10
12
  _id: string;
11
13
  name: string;
12
14
  type: 'entity' | 'event';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semanticdb-core",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [