stack/packages/stack-shared/src
Mantra e0c1cc5376
Fix null-unsafe payments config validation for partial overrides (#1363)
## Summary
- Make the `branchPaymentsSchema` custom validator tolerant of partial
override objects
- Avoid crashing when `payments.products` or `payments.productLines` are
absent during validation
- Add regression tests for partial configs plus the existing
missing-line and customer-type mismatch cases

## Testing
- Added Vitest coverage for partial payments configs and validation
failures
- Lint passed for the touched schema files
- Typecheck passed for `packages/stack-shared`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved validation robustness with stricter type-safety checks for
payment-related data configurations.
  * Enhanced error messages for clearer feedback on validation failures.

* **Tests**
* Added comprehensive test coverage for edge cases including missing
configurations and type mismatches.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-12 10:08:01 -07:00
..
ai New setup (#1413) 2026-05-06 12:03:06 -07:00
apps [codex] Add TanStack Start SDK integration (#1399) 2026-05-08 10:59:16 -07:00
config Fix null-unsafe payments config validation for partial overrides (#1363) 2026-05-12 10:08:01 -07:00
helpers Move MCP server into a standalone apps/mcp app (#1405) 2026-05-07 15:22:44 -07:00
hooks Payments UX update (#863) 2025-08-27 17:28:01 -07:00
interface Improved StackAssertionError error logging 2026-05-07 13:29:01 -07:00
payments [Feat] Add payment methods page to dashboard (#1103) 2026-01-20 14:33:31 -08:00
utils fix(stack-shared): make process.env access browser-safe (#1391) 2026-04-28 10:59:49 -07:00
config-authoring.test.ts New setup (#1413) 2026-05-06 12:03:06 -07:00
config-authoring.ts New setup (#1413) 2026-05-06 12:03:06 -07:00
config-rendering.ts make config typesafe (#1254) 2026-04-06 18:31:55 +00:00
crud.tsx Config DB (#568) 2025-04-10 19:38:25 +02:00
global.d.ts Replace required() of yup schemas with defined() 2024-11-18 20:08:55 +01:00
index.ts [docs][dashboard][stack-shared] Update docs to new apps (#996) 2025-11-12 15:45:30 -06:00
known-errors.tsx Retry OAuth refreshes 2026-05-06 16:52:40 -07:00
plans.ts [Refactor][Feat] Implement Plan Limits for Hard-and-Soft Item Caps (#1215) 2026-05-04 18:25:13 -07:00
schema-fields.ts fix(stack-shared): make process.env access browser-safe (#1391) 2026-04-28 10:59:49 -07:00
sessions.ts Update AGENTS.md 2026-02-13 18:34:23 -08:00