@next-core/build-config-factory 2.22.0 → 2.23.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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.23.0](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.22.0...@next-core/build-config-factory@2.23.0) (2022-07-12)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **generateBrickDocs:** filter inherited properties ([38daaff](https://github.com/easyops-cn/next-core/commit/38daaffa0dcb5c4ef66cc3d846e525db2ea3ba95))
12
+
13
+
14
+ ### Features
15
+
16
+ * **generateBrickDocs:** support typle types ([148ad87](https://github.com/easyops-cn/next-core/commit/148ad87935a8deac87c69fd4d60828a2aef7723f))
17
+
18
+
19
+
20
+
21
+
6
22
  # [2.22.0](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.21.0...@next-core/build-config-factory@2.22.0) (2022-07-11)
7
23
 
8
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/build-config-factory",
3
- "version": "2.22.0",
3
+ "version": "2.23.0",
4
4
  "description": "build config factory",
5
5
  "homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/build-config-factory",
6
6
  "license": "GPL-3.0",
@@ -37,5 +37,5 @@
37
37
  "typedoc": "^0.19.2",
38
38
  "typedoc-plugin-no-inherit": "^1.2.2"
39
39
  },
40
- "gitHead": "42bab4e94fbac369b5e9953272d568ba5cfb15e8"
40
+ "gitHead": "c8dfe32cac64f85af7aa55e420d6b5182d1c1505"
41
41
  }
@@ -397,6 +397,10 @@ function extractRealInterfaceType(typeData, parentType) {
397
397
  return "object";
398
398
  }
399
399
  }
400
+ case "tuple":
401
+ return `[${typeData.elements
402
+ ?.map((element) => element.name)
403
+ .join(", ")}]`;
400
404
  default:
401
405
  return "";
402
406
  }
@@ -466,14 +470,20 @@ function extractBrickDocInterface(typeIds, references) {
466
470
  extendedTypes: finder.extendedTypes,
467
471
  description: finder?.comment?.shortText?.trim(),
468
472
  children:
469
- finder.children?.map((child) => {
470
- return {
471
- name: child.name,
472
- type: extractRealInterfaceType(child.type),
473
- required: !get(child, ["flags", "isOptional"], false),
474
- description: get(child, ["comment", "shortText"], "").trim(),
475
- };
476
- }) || [],
473
+ finder.children
474
+ ?.filter((child) => !child.inheritedFrom)
475
+ .map((child) => {
476
+ return {
477
+ name: child.name,
478
+ type: extractRealInterfaceType(child.type),
479
+ required: !get(child, ["flags", "isOptional"], false),
480
+ description: get(
481
+ child,
482
+ ["comment", "shortText"],
483
+ ""
484
+ ).trim(),
485
+ };
486
+ }) || [],
477
487
  indexSignature:
478
488
  finder.indexSignature?.map((child) => {
479
489
  return {
@@ -484,7 +494,6 @@ function extractBrickDocInterface(typeIds, references) {
484
494
  })),
485
495
  type: extractRealInterfaceType(child.type),
486
496
  required: !get(child, ["flags", "isOptional"], false),
487
- description: get(child, ["comment", "shortText"], "").trim(),
488
497
  };
489
498
  }) || [],
490
499
  };
@@ -691,6 +700,17 @@ function traverseUsedReferenceIdsByType(
691
700
  );
692
701
  });
693
702
  }
703
+ break;
704
+ case "tuple":
705
+ type.elements?.forEach((element) =>
706
+ traverseUsedReferenceIdsByType(
707
+ element,
708
+ usedReferenceIds,
709
+ references,
710
+ traversedTypeSet
711
+ )
712
+ );
713
+ break;
694
714
  }
695
715
  }
696
716