Repository navigation
🪪 [3/3] feat(cli)!: multi-identifier preference uploads - #702
Draft
michaelfarrell76 wants to merge 1 commit into
Draft
michaelfarrell76 wants to merge 1 commit into
michaelfarrell76 wants to merge 1 commit into
Conversation
…ence-upload - upload-preferences: --directory only, parallel worker pool, auto-chunking, per-file receipts, requires a column-mapping config - new consent configure-preference-upload command - sdk: getPreferencesForIdentifiers requires identifier names, split-on-validation, new onProgress shape; drop FileMetadataState and PreferenceState
This was referenced Nov 1, 2026
@transcend-io/airgap.js-types
@transcend-io/cli
@transcend-io/custom-function-types
@transcend-io/design-tokens
@transcend-io/internationalization
@transcend-io/privacy-types
@transcend-io/sdk
@transcend-io/secret-value
@transcend-io/type-utils
@transcend-io/utils
commit: |
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Preference uploads need to work with more than one identifier per row (email + phone), and the old single file flow can't do that. Going to test this on the pkg.pr.new preview build and run the e2e script against a staging partition before merging, then ship it as cli 14 / sdk 3.
Stack (replaces #11)
main←michaelfarrell76/pref-upload-sdk-building-blocksmichaelfarrell76/pref-upload-sdk-building-blocks←michaelfarrell76/pref-upload-cli-statemichaelfarrell76/pref-upload-cli-state←michaelfarrell76/multi-identifier-preference-uploadsMerge in order: #700 → #701 → this PR. This is the breaking change (CLI 14.0.0, SDK 3.0.0). Migration steps are in
.changeset/multi-identifier-preference-uploads.md.Summary
transcend consent configure-preference-uploadcommand. It scans every CSV in a directory and saves a reusable column-mapping config.upload-preferencestakes--directoryonly. It runs files in a worker pool, auto-chunks files over--chunkSizeMB, and writes per-file receipts.getPreferencesForIdentifiersrequires identifier names, splits groups that fail validation, and reports{ successDelta, successTotal, fileTotal }progress.FileMetadataStateandPreferenceStateare removed.Changes vs #11
impl.tsfiles to usethis.logger,this.fs,this.process, andcreatePoolingCommandUi. The configure CSV scanner moved toconfigure-preference-upload/helpers.ts.exit(1).--uploadConcurrencydefault is 25, per theFIXME 25in [cli] multi identifier preference record uploads #11 (it was 75).--receiptFilepathflag and the--filewording in help text.loggeroptional with theNOOP_LOGGERdefault.progress.tsand the receiptstatusfield. Nothing read them.NONE_PREFERENCE_MAPnow comes from the SDK instead of a CLI copy.Test plan
pnpm -F @transcend-io/sdk typecheck test buildpnpm -F @transcend-io/cli typecheck test build(worker bundle emitted atdist/commands/consent/upload-preferences/worker.mjs)upload-preferences/tests/impl.test.ts(missing config, queue, dry run totals, chunking, regenerate, Ctrl+C exits 130) andconfigure-preference-upload/tests/helpers.test.tscodebase.test.tsconfigure-preference-uploadagainst a staging partitionupload-preferences --dryRun, real upload, then a re-run that skips unchanged rows--viewerModeworksTRANSCEND_API_KEY=… PARTITION=… bash packages/cli/scripts/e2e-test-upload-preferences.sh(now uses--directory, an email + phone config, and a re-run check)