You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core,sdk): TriggerClient falls back to env vars at construction
`new TriggerClient()` with no constructor config now resolves
accessToken, previewBranch, and baseURL from the process env
(TRIGGER_SECRET_KEY / TRIGGER_PREVIEW_BRANCH / TRIGGER_API_URL /
VERCEL_GIT_COMMIT_REF / TRIGGER_ACCESS_TOKEN). Explicit constructor
values still win, so multiple instances pointing at different
projects stay isolated. Matches conventions of other env-var-backed
SDKs (OpenAI, Anthropic, Stripe) and removes friction of forcing
\`accessToken: process.env.TRIGGER_SECRET_KEY!\` everywhere.
Mechanics: new \`apiClientManager.resolveApiClientConfig(partial)\`
helper resolves env-derived defaults for missing fields. Both the
TriggerClient constructor and \`apiClientManager.runWithConfig\` (used
by auth.withAuth) feed their config through it before opening a
scope, so the resolution happens once at scope creation and the
scoped getters in apiClientManager just read scope values directly.
Single source of truth replaces the inheritContext-gated env fallback
that was previously sprinkled across the scoped getters.
Constructor early throw dropped — missing auth now surfaces via
ApiClientMissingError at first API call, same as the global API path.
0 commit comments