Skip to content

[cli] Support cursor pagination for fetching requestIdentifiers#12

Draft
bencmbrook wants to merge 2 commits intomainfrom
bencmbrook/migrate-cli-pr-533
Draft

[cli] Support cursor pagination for fetching requestIdentifiers#12
bencmbrook wants to merge 2 commits intomainfrom
bencmbrook/migrate-cli-pr-533

Conversation

@bencmbrook
Copy link
Copy Markdown
Member

@bencmbrook bencmbrook commented Mar 19, 2026

Port of transcend-io/cli#533

Summary

  • port the request identifier pagination changes from transcend-io/cli#533 into packages/cli
  • switch request identifier fetching from offset/per-request calls to cursor-based pagination plus batched Sombra lookups, and thread that through request export, request restart, and manual enrichment flows
  • add the shared splitDateRange helper and a patch changeset for the CLI package

Context

Test plan

  • pnpm -F @transcend-io/cli typecheck
  • pnpm -F @transcend-io/cli build
  • pnpm -F @transcend-io/cli test
  • pnpm -F @transcend-io/cli check-exports
  • pnpm quality

Made with Cursor

Switch request identifier lookups to cursor-based batch fetching so request export, request restarts, and manual enrichment flows avoid per-request Sombra calls and scale better for large result sets.

Made-with: Cursor
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/transcend-io/tools/@transcend-io/cli@12
npm i https://pkg.pr.new/transcend-io/tools/@transcend-io/core@12
npm i https://pkg.pr.new/transcend-io/tools/@transcend-io/utils@12

commit: 34ef1ad

@bencmbrook bencmbrook changed the title Improve request identifier pagination in monorepo CLI Support cursor pagination for fetching requestIdentifiers Mar 19, 2026
@bencmbrook bencmbrook changed the title Support cursor pagination for fetching requestIdentifiers [cli] Support cursor pagination for fetching requestIdentifiers Mar 19, 2026
@bencmbrook
Copy link
Copy Markdown
Member Author

bencmbrook commented Mar 19, 2026

Summary comparing the original transcend-io/cli#533 to the monorepo port tools#12:

Area Original cli#533 Monorepo port tools#12 Notes
RequestIdentifier GraphQL query Already used cursor pagination via after + pageInfo Preserved This behavior was not introduced during the port
fetchAllRequestIdentifierMetadata() Already cursor-paginated Preserved Carried over with monorepo import/path normalization only
fetchAllRequestIdentifiers() Already cursor-paginated Preserved Carried over
fetchRequestIdentifiersBatch() Present in original PR Preserved Carried over so downstream flows can batch Sombra lookups
pullPrivacyRequests() Batch-fetched identifiers across returned requests Preserved Still avoids one Sombra request per request
streamPrivacyRequestsToCsv() Batch-fetched identifiers per page/chunk Preserved Still uses batched identifier lookup during streaming export
pullManualEnrichmentIdentifiersToCsv() Fetched enrichers first, then batch-fetched identifiers for qualifying requests Preserved Output behavior stays aligned with original PR
bulkRestartRequests() Prefetched identifiers in batch when copyIdentifiers was enabled Preserved Same behavior in monorepo
splitDateRange.ts Introduced as a shared helper in the original PR Preserved Added to packages/cli/src/lib/requests/splitDateRange.ts
requests/index.ts export Exported splitDateRange Preserved Added to the monorepo requests barrel as well
Monorepo-only adjustment Reason
Files moved from src/** to packages/cli/src/** Fit the monorepo layout
Relative imports normalized to .js ESM specifiers Match this repo’s TypeScript/NodeNext conventions
Added .changeset/rude-steaks-jam.md Required for the monorepo release process
Category Dropped in port? Notes
Functional source changes from original cli#533 No All 9 source-file changes from the original PR were carried over
Cursor pagination / batched identifier fetching behavior No Preserved as implemented in the original PR
Docs / README work None needed Original PR was effectively code-only, and the port remained code-only aside from the changeset
Repo config / workflow changes None No extra repo-level changes were needed for this port

Validation on the monorepo port:

  • pnpm -F @transcend-io/cli typecheck
  • pnpm -F @transcend-io/cli build
  • pnpm -F @transcend-io/cli test
  • pnpm -F @transcend-io/cli check-exports
  • pnpm quality

Bottom line: the port preserved the original cli#533 behavior. The only intentional differences were monorepo-specific adaptations such as file relocation, ESM import normalization, and adding a changeset.

@bencmbrook bencmbrook marked this pull request as draft March 29, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants