@next-core/build-next-bricks 1.14.0 → 1.14.2
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 +8 -8
- package/src/getDocs.js +3 -2
- package/src/makeBrickManifest.js +3 -0
- package/src/scanBricks.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/build-next-bricks",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.2",
|
|
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",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"node": ">=16"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@babel/parser": "^7.22.
|
|
35
|
-
"@babel/traverse": "^7.22.
|
|
36
|
-
"@svgr/webpack": "^8.0
|
|
34
|
+
"@babel/parser": "^7.22.15",
|
|
35
|
+
"@babel/traverse": "^7.22.15",
|
|
36
|
+
"@svgr/webpack": "^8.1.0",
|
|
37
37
|
"babel-loader": "^9.1.3",
|
|
38
38
|
"css-loader": "^6.8.1",
|
|
39
39
|
"cssnano": "^6.0.1",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"doctrine": "^3.0.0",
|
|
42
42
|
"lodash": "^4.17.21",
|
|
43
43
|
"mini-css-extract-plugin": "^2.7.6",
|
|
44
|
-
"postcss": "^8.4.
|
|
44
|
+
"postcss": "^8.4.29",
|
|
45
45
|
"postcss-loader": "^7.3.3",
|
|
46
|
-
"postcss-preset-env": "^
|
|
46
|
+
"postcss-preset-env": "^9.1.3",
|
|
47
47
|
"style-loader": "^3.3.3",
|
|
48
|
-
"typescript": "^5.
|
|
48
|
+
"typescript": "^5.2.2",
|
|
49
49
|
"webpack": "^5.88.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@next-core/brick-manifest": "^0.5.1"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "70bf6b500764afe0d97a7d8360f1407b92ad54a2"
|
|
55
55
|
}
|
package/src/getDocs.js
CHANGED
|
@@ -12,8 +12,9 @@ const HTML_DELIMITER_END = "-- HTML DELIMITER end (1nbbm8) -->";
|
|
|
12
12
|
/**
|
|
13
13
|
* @param {string} markdown
|
|
14
14
|
* @param {import("@next-core/brick-manifest").PackageManifest[]} manifests
|
|
15
|
+
* @returns {Promise<string>}
|
|
15
16
|
*/
|
|
16
|
-
export function handleExamplesInMarkdown(markdown, manifests) {
|
|
17
|
+
export async function handleExamplesInMarkdown(markdown, manifests) {
|
|
17
18
|
const examples = extractExamplesInMarkdown(markdown, "");
|
|
18
19
|
let cursor = 0;
|
|
19
20
|
const chunks = [];
|
|
@@ -21,7 +22,7 @@ export function handleExamplesInMarkdown(markdown, manifests) {
|
|
|
21
22
|
const nextCursor = example.codeIndex + example.code.length;
|
|
22
23
|
chunks.push(markdown.substring(cursor, nextCursor));
|
|
23
24
|
if (example.mode === "yaml") {
|
|
24
|
-
const html = yamlToHtml(example.code, manifests);
|
|
25
|
+
const html = await yamlToHtml(example.code, manifests);
|
|
25
26
|
chunks.push(
|
|
26
27
|
`${YAML_DELIMITER}\n`,
|
|
27
28
|
html
|
package/src/makeBrickManifest.js
CHANGED
|
@@ -227,6 +227,9 @@ function scanFields(manifest, nodes, source) {
|
|
|
227
227
|
};
|
|
228
228
|
const docComment = parseDocComment(node, source);
|
|
229
229
|
if (docComment) {
|
|
230
|
+
if (findTag(docComment.tags, "internal")) {
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
230
233
|
prop.description = docComment.description;
|
|
231
234
|
prop.required = getBooleanTag(docComment.tags, "required");
|
|
232
235
|
prop.deprecated = getDeprecatedInfo(docComment.tags);
|
package/src/scanBricks.js
CHANGED
|
@@ -853,12 +853,12 @@ export default async function scanBricks(packageDir) {
|
|
|
853
853
|
/** @type {string} */
|
|
854
854
|
let brickDoc;
|
|
855
855
|
if (existsSync(srcFilePath)) {
|
|
856
|
-
brickDoc = handleExamplesInMarkdown(
|
|
856
|
+
brickDoc = await handleExamplesInMarkdown(
|
|
857
857
|
await readFile(srcFilePath, "utf-8"),
|
|
858
858
|
[manifest]
|
|
859
859
|
);
|
|
860
860
|
} else if (existsSync(srcFilePathAlt)) {
|
|
861
|
-
brickDoc = handleExamplesInMarkdown(
|
|
861
|
+
brickDoc = await handleExamplesInMarkdown(
|
|
862
862
|
await readFile(srcFilePathAlt, "utf-8"),
|
|
863
863
|
[manifest]
|
|
864
864
|
);
|