forked from baron/baron-sso
fix(adminfront): fix TS error and CI dependency resolution
- Fix 'unknown' to 'string' type mismatch in UserBulkUploadModal.tsx - Update CI script to install from workspace root (common) for proper dependency resolution - Use 'env CI=true' for better shell compatibility
This commit is contained in:
@@ -333,7 +333,7 @@ export function UserBulkUploadModal({
|
|||||||
finalUser.jobTitle = firstAdditional.jobTitle;
|
finalUser.jobTitle = firstAdditional.jobTitle;
|
||||||
if (finalUser.metadata) {
|
if (finalUser.metadata) {
|
||||||
finalUser.metadata.employee_id =
|
finalUser.metadata.employee_id =
|
||||||
firstAdditional.metadata?.employee_id;
|
(firstAdditional.metadata?.employee_id as string) || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
finalUser.additionalAppointments = [
|
finalUser.additionalAppointments = [
|
||||||
|
|||||||
@@ -196,12 +196,17 @@ fi
|
|||||||
|
|
||||||
set +e
|
set +e
|
||||||
(
|
(
|
||||||
cd "$tmp_dir/adminfront"
|
# [Fix] Dependency resolution fails when installing from sub-app in isolated CI.
|
||||||
|
# We must install from the workspace root (common) and ensure the workspace config
|
||||||
|
# only points to available directories (adminfront & common).
|
||||||
|
cd "$tmp_dir/common"
|
||||||
|
echo "packages: ['.', '../adminfront']" > pnpm-workspace.yaml
|
||||||
|
|
||||||
if [ "$reuse_seed_node_modules" -eq 0 ]; then
|
if [ "$reuse_seed_node_modules" -eq 0 ]; then
|
||||||
if ! command -v pnpm >/dev/null 2>&1; then
|
if ! command -v pnpm >/dev/null 2>&1; then
|
||||||
run_with_retry 3 npm install -g pnpm
|
run_with_retry 3 npm install -g pnpm
|
||||||
fi
|
fi
|
||||||
run_with_retry 3 CI=true pnpm install -C ../common --no-frozen-lockfile --store-dir "$pnpm_store_dir"
|
run_with_retry 3 env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist --store-dir "$pnpm_store_dir"
|
||||||
fi
|
fi
|
||||||
) 2>&1 | tee reports/adminfront-install.log
|
) 2>&1 | tee reports/adminfront-install.log
|
||||||
install_exit_code=${PIPESTATUS[0]}
|
install_exit_code=${PIPESTATUS[0]}
|
||||||
@@ -217,7 +222,7 @@ if [ "$install_exit_code" -ne 0 ]; then
|
|||||||
echo "- Exit Code: \`$install_exit_code\`"
|
echo "- Exit Code: \`$install_exit_code\`"
|
||||||
echo
|
echo
|
||||||
echo "## Command"
|
echo "## Command"
|
||||||
echo "\`cd adminfront && if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install -C ../common --no-frozen-lockfile --store-dir \"\$TMPDIR/pnpm-store\"; fi\`"
|
echo "\`cd common && echo \"packages: ['.', '../adminfront']\" > pnpm-workspace.yaml && env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist\`"
|
||||||
echo
|
echo
|
||||||
echo "## Install Log Tail (last 200 lines)"
|
echo "## Install Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
@@ -283,10 +288,9 @@ if [ "$test_exit_code" -ne 0 ]; then
|
|||||||
echo "- Exit Code: \`$test_exit_code\`"
|
echo "- Exit Code: \`$test_exit_code\`"
|
||||||
echo
|
echo
|
||||||
echo "## Commands"
|
echo "## Commands"
|
||||||
echo "1. \`cd adminfront\`"
|
echo "1. \`cd common && echo \"packages: ['.', '../adminfront']\" > pnpm-workspace.yaml && env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist\`"
|
||||||
echo "2. \`if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install -C ../common --no-frozen-lockfile --store-dir \"\$TMPDIR/pnpm-store\"; fi\`"
|
echo "2. \`${playwright_install_desc}\`"
|
||||||
echo "3. \`${playwright_install_desc}\`"
|
echo "3. \`pnpm exec playwright test\`"
|
||||||
echo "4. \`npx playwright test\`"
|
|
||||||
echo
|
echo
|
||||||
echo "## Log Tail (last 200 lines)"
|
echo "## Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
|
|||||||
Reference in New Issue
Block a user