fix: build js declarations (#141)
This commit is contained in:
@@ -162,6 +162,9 @@ build-declarations@tool() {
|
|||||||
json_data="$(generate-declarations@tool "$name" | jq -r '.[0]')" || {
|
json_data="$(generate-declarations@tool "$name" | jq -r '.[0]')" || {
|
||||||
build_failed_tools+=("$name")
|
build_failed_tools+=("$name")
|
||||||
}
|
}
|
||||||
|
if [[ "$json_data" == "null" ]]; then
|
||||||
|
_die "error: failed to build declartions for tool $name"
|
||||||
|
fi
|
||||||
json_list+=("$json_data")
|
json_list+=("$json_data")
|
||||||
done
|
done
|
||||||
if [[ -n "$not_found_tools" ]]; then
|
if [[ -n "$not_found_tools" ]]; then
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ function extractFunctions(contents, isTool) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (isTool) {
|
if (isTool) {
|
||||||
if (new RegExp(`function ${TOOL_ENTRY_FUNC}`).test(line)) {
|
if (new RegExp(`^export (async )?function ${TOOL_ENTRY_FUNC}|^exports\.${TOOL_ENTRY_FUNC}`).test(line)) {
|
||||||
output.push({
|
output.push({
|
||||||
funcName: TOOL_ENTRY_FUNC,
|
funcName: TOOL_ENTRY_FUNC,
|
||||||
jsdoc,
|
jsdoc,
|
||||||
|
|||||||
Reference in New Issue
Block a user