Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix package.json fetch and build command resolution.
Use the GitHub raw contents API instead of base64 decoding, and read
processmaker.command from package.json in the cloned repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
  • Loading branch information
nolanpro and cursoragent committed Sep 22, 2026
commit 2a2573a9678cdb4dbe2fb984c8c0c48a2ac089e2
12 changes: 7 additions & 5 deletions .github/scripts/js-stack-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ is_known_package() {
fetch_package_json() {
local repo="$1"
local ref="$2"
local content
ref=$(normalize_ref "$ref")
content=$(gh api "repos/${GH_ORG}/${repo}/contents/package.json?ref=${ref}" --jq '.content' 2>/dev/null) || return 1
[[ -n "$content" && "$content" != "null" ]] || return 1
echo "$content" | base64 -d
gh api "repos/${GH_ORG}/${repo}/contents/package.json?ref=${ref}" \
-H "Accept: application/vnd.github.raw" 2>/dev/null
}

default_branch() {
Expand Down Expand Up @@ -258,7 +256,11 @@ build_package() {
fi

local build_cmd
build_cmd=$(get_build_command)
build_cmd=$(jq -r '.processmaker.command // empty' package.json)
if [[ -z "$build_cmd" || "$build_cmd" == "null" ]]; then
echo "::error::processmaker.command is required in package.json" >&2
exit 1
fi

if uses_yarn; then
yarn run "$build_cmd"
Expand Down