@goliapkg/sentori-expo
v0.1.2
Published
Expo adapter for Sentori — Config Plugin marker, expo-application auto-config, EAS post-build helper. Built on @goliapkg/sentori-react-native.
Maintainers
Readme
@goliapkg/sentori-expo
Expo adapter for Sentori — Config Plugin marker, runtime init helper
that reads expo-application, and an EAS post-build hook for source
map uploads. Built on @goliapkg/sentori-react-native@>=0.2.0.
Install
bunx expo install @goliapkg/sentori-expo @goliapkg/sentori-react-native expo-applicationWire it up
1. app.json
{
"expo": {
"plugins": ["@goliapkg/sentori-expo"]
}
}The plugin is currently a marker — @goliapkg/sentori-react-native
ships its own expo-module.config.json, podspec, and Android gradle,
so Expo Modules autolinking handles the native side. The plugin entry
gives us a stable extension point for future native config (SDK
version banner, opt-in crash-handler tuning, etc.) without changing
your app.json.
2. App.tsx
import * as Application from 'expo-application'
import { initSentoriExpo } from '@goliapkg/sentori-expo'
initSentoriExpo({
application: Application,
token: process.env.EXPO_PUBLIC_SENTORI_TOKEN!,
})
export default function App() { /* ... */ }initSentoriExpo:
- Derives the release string
applicationId@version+buildfromexpo-application. - Defaults the environment to
dev/prodvia the RN__DEV__flag. - Defaults the ingest URL to the public SaaS endpoint.
You can override any of those — see InitOptions.
If you're not on Expo's managed workflow, omit application and pass
release explicitly:
initSentoriExpo({
release: '[email protected]+42',
token: process.env.EXPO_PUBLIC_SENTORI_TOKEN!,
})3. EAS source map upload (optional, recommended)
Add to eas.json:
{
"build": {
"production": {
"hooks": {
"postPublish": [
{
"config": "@goliapkg/sentori-expo/eas-post-build",
"options": {
"release": "$EAS_BUILD_RELEASE"
}
}
]
}
}
}
}The hook shells out to @goliapkg/sentori-cli upload sourcemap — install
it as a dev dep:
bun add -D @goliapkg/sentori-cliStatus: Phase 22 sub-A lands the actual
upload sourcemapandupload dsymCLI subcommands. Until then the hook logs a warning and exits 0 — adopt the wiring now and the upload works transparently when you next bump@goliapkg/sentori-cli.
What initSentoriExpo does under the hood
@goliapkg/sentori-expo
└── reads expo-application metadata
└── calls @goliapkg/sentori-react-native init({ token, release, ... })
└── starts the JS-layer global error / promise / network hooks
└── primes the native iOS / Android crash handlersThe full feature list (breadcrumbs, capture, network instrumentation,
native crash capture) lives in @goliapkg/sentori-react-native —
-expo only adds the auto-config + EAS plumbing.
