stack/packages/stack-shared/src/utils
Mantra bb277d33c9
Backend fallback (cloud run) (#1306)
- Added support for `@opentelemetry/sdk-node` in the backend.
- Updated various dependencies including AWS SDK and OpenTelemetry
packages.
- Implemented graceful shutdown handling for non-Vercel runtimes in
`prisma-client.tsx`.
- Enhanced AWS credentials retrieval to support GCP Workload Identity
Federation.
- Introduced a Dockerfile for Cloud Run deployment, optimizing the
backend build process.
- Updated `.gitignore` to include Terraform runtime files and secrets.

This commit improves the backend's observability and deployment
flexibility, particularly for Cloud Run environments.

<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->


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

* **New Features**
* OpenTelemetry observability with dynamic provider selection per
deployment.
  * Cloud Run trusted-proxy support for accurate client IP handling.
  * Graceful shutdown that waits for in-flight background work.
* New background-task handling to improve async webhook/email delivery
reliability.
* AWS credential providers added (Vercel OIDC & GCP Workload Identity
Federation).
  * Dockerized backend image for Cloud Run / self-host deployments.

* **Chores**
  * Updated dependencies for OpenTelemetry and AWS SDK support.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Konstantin Wohlwend <n2d4xc@gmail.com>
2026-04-11 00:57:37 +00:00
..
api-keys.tsx Upgrade TypeScript 2026-02-27 00:28:35 -08:00
arrays.tsx batch sending (#875) 2025-09-11 15:42:51 -07:00
auth-methods.ts Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
base64.tsx Add inline unit tests to utility functions in stack-shared (#467) 2025-02-26 16:11:30 -08:00
booleans.tsx Add inline unit tests to utility functions in stack-shared (#467) 2025-02-26 16:11:30 -08:00
browser-compat.tsx Better specs for Docker GH Action 2024-12-11 19:02:49 -08:00
bytes.tsx Upgrade TypeScript 2026-02-27 00:28:35 -08:00
caches.tsx Fix potential memory leak in Stack App cache 2025-11-06 14:31:14 -08:00
cel-fields.ts Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
compile-time.tsx Split stack-app.ts file into multiple files (#492) 2025-03-02 21:20:42 -08:00
country-codes.ts Enhance error handling and logging in Emailable response validation (#1292) 2026-04-01 09:21:43 -07:00
crypto.tsx Upgrade TypeScript 2026-02-27 00:28:35 -08:00
currencies.tsx payments schema changes, ledger algo, stackable items (#862) 2025-08-27 20:13:22 +00:00
currency-constants.tsx payments schema changes, ledger algo, stackable items (#862) 2025-08-27 20:13:22 +00:00
dates.tsx payments schema changes, ledger algo, stackable items (#862) 2025-08-27 20:13:22 +00:00
dom.tsx Fix lint errors 2024-06-06 13:35:29 +02:00
env.tsx Environment variables for disabling email queue 2025-12-15 10:48:00 -08:00
errors.tsx Even more better error messages 2025-07-30 13:16:14 -07:00
esbuild.tsx Rename stack-backend to backend and stack-dashboard to dashboard 2026-02-26 22:22:49 -08:00
featurebase.tsx Feature/stack companion (#769) 2025-08-12 15:12:20 -05:00
fs.tsx added writeFileSyncIfChanged to all the codegen 2025-02-19 12:11:17 -08:00
functions.tsx [DEVIN: Konsti] Add in-source unit tests to stack-shared utilities (#485) 2025-02-28 01:47:37 +00:00
geo.tsx Active Sessions Page (#528) 2025-03-12 22:35:32 +01:00
globals.tsx Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00
hashes.tsx Upgrade TypeScript 2026-02-27 00:28:35 -08:00
html.tsx Fix lint 2026-02-27 09:59:26 -08:00
http.tsx [DEVIN: Konsti] Add in-source unit tests to stack-shared utilities (#485) 2025-02-28 01:47:37 +00:00
ips.tsx Cookie subdomain sharing (#971) 2025-11-05 18:12:31 -08:00
json.tsx Widget subgrids 2025-07-13 22:16:42 -07:00
jsx-editable-transpiler.test.ts Emails redesign (#1076) 2026-02-16 14:57:17 -08:00
jsx-editable-transpiler.tsx Emails redesign (#1076) 2026-02-16 14:57:17 -08:00
jwt.tsx Even better JWT info 2025-09-12 18:13:57 -07:00
locks.tsx Added sign out lock (#374) 2024-12-20 18:38:04 +01:00
maps.tsx [DEVIN: Konsti] Add in-source unit tests to stack-shared utilities (#485) 2025-02-28 01:47:37 +00:00
math.tsx Add inline unit tests to utility functions in stack-shared (#467) 2025-02-26 16:11:30 -08:00
monkey-patch.tsx Hosted components (#1229) 2026-03-10 11:29:05 -07:00
node-http.tsx Force dynamic 2024-12-01 01:31:22 -08:00
numbers.tsx Workflows (#873) 2025-09-03 01:22:08 -07:00
oauth.tsx "Require publishable client key" toggle (#1158) 2026-02-19 10:23:16 -08:00
objects.tsx Fix bug where defaults sometimes wouldn't apply 2026-01-26 21:27:06 -08:00
paginated-lists.test.ts Paginated list tests (#1088) 2026-01-07 13:13:11 -08:00
paginated-lists.tsx Paginated list tests (#1088) 2026-01-07 13:13:11 -08:00
passkey.tsx Passkey support (#321) 2024-10-28 16:56:46 -07:00
promises.tsx Workflows (#873) 2025-09-03 01:22:08 -07:00
proxies.tsx Email outbox backend (#1030) 2025-12-12 10:26:38 -08:00
react.tsx Custom dashboards and unified ai no playground (#1243) 2026-03-13 20:24:40 +00:00
regex.tsx Page transition prefetching 2025-10-16 12:02:46 -07:00
results.tsx Email outbox backend (#1030) 2025-12-12 10:26:38 -08:00
sentry.tsx Upgrade TypeScript 2026-02-27 00:28:35 -08:00
stores.tsx Fix potential memory leak in Stack App cache 2025-11-06 14:31:14 -08:00
strings.nicify.test.ts Customizable ports (#962) 2025-10-20 15:24:47 -07:00
strings.tsx Customizable ports (#962) 2025-10-20 15:24:47 -07:00
telemetry.tsx Add tracing to ESBuild 2025-07-31 16:22:55 -07:00
turnstile-browser.ts Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
turnstile-flow.test.ts Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
turnstile-flow.ts Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
turnstile.ts Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
typed-arrays.tsx Upgrade TypeScript 2026-02-27 00:28:35 -08:00
types.tsx Sign up rules (#1138) 2026-02-03 11:08:24 -08:00
unicode.tsx Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
urls.tsx Backend fallback (cloud run) (#1306) 2026-04-11 00:57:37 +00:00
uuids.tsx [DEVIN: Konsti] Add in-source unit tests to stack-shared utilities (#485) 2025-02-28 01:47:37 +00:00