@next-core/build-next-bricks 1.13.3 → 1.13.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/build-next-bricks",
3
- "version": "1.13.3",
3
+ "version": "1.13.4",
4
4
  "description": "Build next bricks",
5
5
  "homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/build-next-bricks",
6
6
  "license": "GPL-3.0",
@@ -49,7 +49,7 @@
49
49
  "webpack": "^5.88.2"
50
50
  },
51
51
  "devDependencies": {
52
- "@next-core/brick-manifest": "^0.5.0"
52
+ "@next-core/brick-manifest": "^0.5.1"
53
53
  },
54
- "gitHead": "c0d55765acc79bbc1ca232ba899b3cae3fa7a207"
54
+ "gitHead": "d665569742958ed4bfa82db4860819c10c828c18"
55
55
  }
@@ -59,6 +59,7 @@ export default function makeBrickManifest(name, alias, nodePath, source) {
59
59
  events: [],
60
60
  slots: [],
61
61
  methods: [],
62
+ parts: [],
62
63
  types: {
63
64
  properties: [],
64
65
  events: [],
@@ -71,17 +72,33 @@ export default function makeBrickManifest(name, alias, nodePath, source) {
71
72
  manifest.description = docComment.description;
72
73
  manifest.deprecated = getDeprecatedInfo(docComment.tags);
73
74
  for (const tag of docComment.tags) {
74
- if (tag.title === "slot") {
75
- const match = tag.description.match(/^(?:([-\w]+)\s+-\s+)?(.*)$/);
76
- if (!match) {
77
- throw new Error(
78
- `Doc comment for slot is invalid: '${tag.description}'`
79
- );
75
+ switch (tag.title) {
76
+ case "slot": {
77
+ const match = tag.description.match(/^(?:([-\w]+)\s+-\s+)?(.*)$/);
78
+ if (!match) {
79
+ throw new Error(
80
+ `Doc comment for slot is invalid: '${tag.description}'`
81
+ );
82
+ }
83
+ manifest.slots.push({
84
+ name: match[1] ?? null,
85
+ description: match[2],
86
+ });
87
+ break;
88
+ }
89
+ case "part": {
90
+ const match = tag.description.match(/^([-\w]+)\s+-\s+(.*)$/);
91
+ if (!match) {
92
+ throw new Error(
93
+ `Doc comment for part is invalid: '${tag.description}'`
94
+ );
95
+ }
96
+ manifest.parts.push({
97
+ name: match[1],
98
+ description: match[2],
99
+ });
100
+ break;
80
101
  }
81
- manifest.slots.push({
82
- name: match[1] ?? null,
83
- description: match[2],
84
- });
85
102
  }
86
103
  }
87
104
  }