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: AsyncIterable streaming support for library SDK
Streaming commands (log list --follow, dashboard view --refresh) now
return AsyncIterable instead of throwing. Consumer break and AbortSignal
both wire through to command abort for clean shutdown.
Closes#585
* **AsyncIterable streaming for SDK blocked by four structural concerns**: Full \`AsyncIterable\` streaming for SDK (GitHub #585) has four blockers: (1) \`setEnv\` is global mutable state — \`finally\` cleanup can't run until consumer finishes iterating; concurrent streams corrupt each other. (2) \`withTelemetry\` uses callback pattern — streaming needs handle-based spans with deferred \`span.end()\`. (3) Streaming commands use \`process.once('SIGINT')\` for teardown — library mode needs AbortController wired to AsyncGenerator \`return()\`. (4) Codegen needs function overloads for streaming-capable commands (\`log list --follow\`, \`dashboard view --refresh\`). Only two commands currently support streaming. Estimated ~500 lines across ~12 files.
* **Bundle uses esbuild with bun:sqlite polyfill plugin for Node.js compatibility**: \`script/bundle.ts\` uses esbuild to produce \`dist/index.cjs\` from \`src/index.ts\`. A \`bunSqlitePlugin\` replaces \`bun:sqlite\` imports with a polyfill. Build defines \`SENTRY\_CLI\_VERSION\` and \`SENTRY\_CLIENT\_ID\_BUILD\`, externalizes \`node:\*\` builtins. \`sentrySourcemapPlugin\` handles debug ID injection and sourcemap upload. After the main build, writes: (1) \`dist/bin.cjs\` — CLI wrapper with shebang/Node version check/warning suppression, (2) \`dist/index.d.cts\` — type declarations read from pre-built \`src/sdk.generated.d.cts\`. Both \`sdk.generated.\*\` files are gitignored and regenerated via \`generate:sdk\` script chained before \`bundle\` in \`package.json\`. Debug IDs solve sourcemap deduplication between npm bundle and bun compile builds.
0 commit comments