@transcend-io/cli 10.12.3 → 10.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{app-BE3aWMxQ.mjs → app-COwevfu9.mjs} +16 -16
- package/dist/app-COwevfu9.mjs.map +1 -0
- package/dist/{approvePrivacyRequests-CmtcfCPy.mjs → approvePrivacyRequests-DoYa2_1f.mjs} +2 -2
- package/dist/{approvePrivacyRequests-CmtcfCPy.mjs.map → approvePrivacyRequests-DoYa2_1f.mjs.map} +1 -1
- package/dist/bin/bash-complete.mjs +1 -1
- package/dist/bin/cli.mjs +1 -1
- package/dist/bin/deprecated-command.mjs +1 -1
- package/dist/{buildXdiSyncEndpoint-D6av0TYs.mjs → buildXdiSyncEndpoint-CEeu8sd3.mjs} +2 -2
- package/dist/{buildXdiSyncEndpoint-D6av0TYs.mjs.map → buildXdiSyncEndpoint-CEeu8sd3.mjs.map} +1 -1
- package/dist/{bulkRestartRequests-B_et9l_J.mjs → bulkRestartRequests-BaQU9mHp.mjs} +2 -2
- package/dist/{bulkRestartRequests-B_et9l_J.mjs.map → bulkRestartRequests-BaQU9mHp.mjs.map} +1 -1
- package/dist/{bulkRetryEnrichers-BHWlc3MO.mjs → bulkRetryEnrichers-Cq69X0Rv.mjs} +2 -2
- package/dist/{bulkRetryEnrichers-BHWlc3MO.mjs.map → bulkRetryEnrichers-Cq69X0Rv.mjs.map} +1 -1
- package/dist/{cancelPrivacyRequests-DG4pI_Ja.mjs → cancelPrivacyRequests-DIcDfIAv.mjs} +2 -2
- package/dist/{cancelPrivacyRequests-DG4pI_Ja.mjs.map → cancelPrivacyRequests-DIcDfIAv.mjs.map} +1 -1
- package/dist/{command-Bzo2fZC6.mjs → command-D1b9eAZ4.mjs} +2 -2
- package/dist/{command-Bzo2fZC6.mjs.map → command-D1b9eAZ4.mjs.map} +1 -1
- package/dist/{constants-CrF6sS5U.mjs → constants-Bm2lARkg.mjs} +2 -2
- package/dist/{constants-CrF6sS5U.mjs.map → constants-Bm2lARkg.mjs.map} +1 -1
- package/dist/{createExtraKeyHandler-CUbxU6DY.mjs → createExtraKeyHandler-Bv91U-rp.mjs} +2 -2
- package/dist/{createExtraKeyHandler-CUbxU6DY.mjs.map → createExtraKeyHandler-Bv91U-rp.mjs.map} +1 -1
- package/dist/{downloadPrivacyRequestFiles-CCF1RcxK.mjs → downloadPrivacyRequestFiles-CK7av_27.mjs} +2 -2
- package/dist/{downloadPrivacyRequestFiles-CCF1RcxK.mjs.map → downloadPrivacyRequestFiles-CK7av_27.mjs.map} +1 -1
- package/dist/{generateCrossAccountApiKeys-DbCmHp7d.mjs → generateCrossAccountApiKeys-D93Y_sz4.mjs} +2 -2
- package/dist/{generateCrossAccountApiKeys-DbCmHp7d.mjs.map → generateCrossAccountApiKeys-D93Y_sz4.mjs.map} +1 -1
- package/dist/{impl-oL59tlkK.mjs → impl-4rYhY-oh.mjs} +2 -2
- package/dist/{impl-oL59tlkK.mjs.map → impl-4rYhY-oh.mjs.map} +1 -1
- package/dist/{impl-DKR-IZv0.mjs → impl-B3ob6W8Q.mjs} +2 -2
- package/dist/{impl-DKR-IZv0.mjs.map → impl-B3ob6W8Q.mjs.map} +1 -1
- package/dist/{impl-lNYBH4dp.mjs → impl-B5u1rUG4.mjs} +2 -2
- package/dist/{impl-lNYBH4dp.mjs.map → impl-B5u1rUG4.mjs.map} +1 -1
- package/dist/{impl-Cm6-mdqn2.mjs → impl-BO6oor1g2.mjs} +2 -2
- package/dist/{impl-Cm6-mdqn2.mjs.map → impl-BO6oor1g2.mjs.map} +1 -1
- package/dist/{impl-Bd6Ccm7w.mjs → impl-Bg2IP5LD.mjs} +2 -2
- package/dist/{impl-Bd6Ccm7w.mjs.map → impl-Bg2IP5LD.mjs.map} +1 -1
- package/dist/{impl-Dotjhi7M.mjs → impl-Bl0oOHeJ.mjs} +2 -2
- package/dist/{impl-Dotjhi7M.mjs.map → impl-Bl0oOHeJ.mjs.map} +1 -1
- package/dist/{impl-BzqKtiAH.mjs → impl-BqpudPO5.mjs} +2 -2
- package/dist/{impl-BzqKtiAH.mjs.map → impl-BqpudPO5.mjs.map} +1 -1
- package/dist/{impl-By45wAzU.mjs → impl-C5tIzctb.mjs} +2 -2
- package/dist/{impl-By45wAzU.mjs.map → impl-C5tIzctb.mjs.map} +1 -1
- package/dist/{impl-DvOq-oCu.mjs → impl-C6NULaES.mjs} +2 -2
- package/dist/{impl-DvOq-oCu.mjs.map → impl-C6NULaES.mjs.map} +1 -1
- package/dist/{impl-1AAVAmza2.mjs → impl-C9XatkH02.mjs} +2 -2
- package/dist/{impl-1AAVAmza2.mjs.map → impl-C9XatkH02.mjs.map} +1 -1
- package/dist/{impl-DM-oHepK.mjs → impl-CLP_ybpS.mjs} +2 -2
- package/dist/{impl-DM-oHepK.mjs.map → impl-CLP_ybpS.mjs.map} +1 -1
- package/dist/{impl-D9zHcO4r.mjs → impl-CLyeizj8.mjs} +2 -2
- package/dist/{impl-D9zHcO4r.mjs.map → impl-CLyeizj8.mjs.map} +1 -1
- package/dist/{impl-C3AUCbMq.mjs → impl-CRcQ1MfD.mjs} +2 -2
- package/dist/{impl-C3AUCbMq.mjs.map → impl-CRcQ1MfD.mjs.map} +1 -1
- package/dist/{impl-CXdAUHUQ.mjs → impl-CSsGTzZ-.mjs} +2 -2
- package/dist/{impl-CXdAUHUQ.mjs.map → impl-CSsGTzZ-.mjs.map} +1 -1
- package/dist/{impl-Za9J2qm02.mjs → impl-Car-tUfy2.mjs} +2 -2
- package/dist/{impl-Za9J2qm02.mjs.map → impl-Car-tUfy2.mjs.map} +1 -1
- package/dist/{impl-B9cUce0s.mjs → impl-CelgEI-m.mjs} +2 -2
- package/dist/{impl-B9cUce0s.mjs.map → impl-CelgEI-m.mjs.map} +1 -1
- package/dist/{impl-Cvq6S4zh.mjs → impl-Cg5AEHC4.mjs} +2 -2
- package/dist/{impl-Cvq6S4zh.mjs.map → impl-Cg5AEHC4.mjs.map} +1 -1
- package/dist/{impl-BdHMX2D5.mjs → impl-Cj3c_mbc.mjs} +2 -2
- package/dist/{impl-BdHMX2D5.mjs.map → impl-Cj3c_mbc.mjs.map} +1 -1
- package/dist/{impl-BYThufhW.mjs → impl-CsqZdM8J.mjs} +2 -2
- package/dist/{impl-BYThufhW.mjs.map → impl-CsqZdM8J.mjs.map} +1 -1
- package/dist/{impl-DbhmHnEy.mjs → impl-Ct6Or23B.mjs} +2 -2
- package/dist/{impl-DbhmHnEy.mjs.map → impl-Ct6Or23B.mjs.map} +1 -1
- package/dist/{impl-DJIBVE2E2.mjs → impl-D5U-8PXp2.mjs} +2 -2
- package/dist/{impl-DJIBVE2E2.mjs.map → impl-D5U-8PXp2.mjs.map} +1 -1
- package/dist/{impl-C2J8wzV82.mjs → impl-D6pUgtJ32.mjs} +2 -2
- package/dist/{impl-C2J8wzV82.mjs.map → impl-D6pUgtJ32.mjs.map} +1 -1
- package/dist/{impl-C1gi3bv4.mjs → impl-DBNx4hNu.mjs} +2 -2
- package/dist/{impl-C1gi3bv4.mjs.map → impl-DBNx4hNu.mjs.map} +1 -1
- package/dist/impl-DDPwp1KY.mjs +2 -0
- package/dist/impl-DDPwp1KY.mjs.map +1 -0
- package/dist/{impl-DP04YXML2.mjs → impl-DE96FTDg2.mjs} +2 -2
- package/dist/{impl-DP04YXML2.mjs.map → impl-DE96FTDg2.mjs.map} +1 -1
- package/dist/{impl-DoWDuXCu.mjs → impl-DNA51g7d.mjs} +2 -2
- package/dist/{impl-DoWDuXCu.mjs.map → impl-DNA51g7d.mjs.map} +1 -1
- package/dist/{impl-DSfCiSjJ.mjs → impl-DhVo0Ynj.mjs} +2 -2
- package/dist/{impl-DSfCiSjJ.mjs.map → impl-DhVo0Ynj.mjs.map} +1 -1
- package/dist/{impl-DAZRjudV2.mjs → impl-DlA8ACpo2.mjs} +2 -2
- package/dist/{impl-DAZRjudV2.mjs.map → impl-DlA8ACpo2.mjs.map} +1 -1
- package/dist/{impl-Dsec4MgH.mjs → impl-DmnApory.mjs} +2 -2
- package/dist/{impl-Dsec4MgH.mjs.map → impl-DmnApory.mjs.map} +1 -1
- package/dist/{impl-CUiuUPdu.mjs → impl-DzQhXIle.mjs} +2 -2
- package/dist/{impl-CUiuUPdu.mjs.map → impl-DzQhXIle.mjs.map} +1 -1
- package/dist/{impl-Dd0kfYWE.mjs → impl-Ix0vCygP.mjs} +2 -2
- package/dist/{impl-Dd0kfYWE.mjs.map → impl-Ix0vCygP.mjs.map} +1 -1
- package/dist/{impl-CbWccQpU.mjs → impl-LrDzQgnX.mjs} +2 -2
- package/dist/{impl-CbWccQpU.mjs.map → impl-LrDzQgnX.mjs.map} +1 -1
- package/dist/{impl-BAwr5evv2.mjs → impl-wQ6kkilO2.mjs} +2 -2
- package/dist/{impl-BAwr5evv2.mjs.map → impl-wQ6kkilO2.mjs.map} +1 -1
- package/dist/{impl-BkbWqaj7.mjs → impl-xaZzkyC0.mjs} +2 -2
- package/dist/{impl-BkbWqaj7.mjs.map → impl-xaZzkyC0.mjs.map} +1 -1
- package/dist/index.d.mts +66 -66
- package/dist/index.mjs +1 -1
- package/dist/{markRequestDataSiloIdsCompleted-D_HvTCcW.mjs → markRequestDataSiloIdsCompleted-BwZizkcz.mjs} +2 -2
- package/dist/{markRequestDataSiloIdsCompleted-D_HvTCcW.mjs.map → markRequestDataSiloIdsCompleted-BwZizkcz.mjs.map} +1 -1
- package/dist/{markSilentPrivacyRequests-lBa57vps.mjs → markSilentPrivacyRequests-BrW_eAS5.mjs} +2 -2
- package/dist/{markSilentPrivacyRequests-lBa57vps.mjs.map → markSilentPrivacyRequests-BrW_eAS5.mjs.map} +1 -1
- package/dist/{notifyPrivacyRequestsAdditionalTime-BOMUu47k.mjs → notifyPrivacyRequestsAdditionalTime-Cx5i7SNF.mjs} +2 -2
- package/dist/{notifyPrivacyRequestsAdditionalTime-BOMUu47k.mjs.map → notifyPrivacyRequestsAdditionalTime-Cx5i7SNF.mjs.map} +1 -1
- package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-BYeL9led.mjs → pullChunkedCustomSiloOutstandingIdentifiers-BAENEoOl.mjs} +2 -2
- package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-BYeL9led.mjs.map → pullChunkedCustomSiloOutstandingIdentifiers-BAENEoOl.mjs.map} +1 -1
- package/dist/{pullManualEnrichmentIdentifiersToCsv-D10U-6F1.mjs → pullManualEnrichmentIdentifiersToCsv-BUVO8qwm.mjs} +2 -2
- package/dist/{pullManualEnrichmentIdentifiersToCsv-D10U-6F1.mjs.map → pullManualEnrichmentIdentifiersToCsv-BUVO8qwm.mjs.map} +1 -1
- package/dist/{pushCronIdentifiersFromCsv-Uq8DEuO_.mjs → pushCronIdentifiersFromCsv-16dEKjYC.mjs} +2 -2
- package/dist/{pushCronIdentifiersFromCsv-Uq8DEuO_.mjs.map → pushCronIdentifiersFromCsv-16dEKjYC.mjs.map} +1 -1
- package/dist/{pushManualEnrichmentIdentifiersFromCsv-CctdM5Yc.mjs → pushManualEnrichmentIdentifiersFromCsv-Coq8d35h.mjs} +2 -2
- package/dist/{pushManualEnrichmentIdentifiersFromCsv-CctdM5Yc.mjs.map → pushManualEnrichmentIdentifiersFromCsv-Coq8d35h.mjs.map} +1 -1
- package/dist/{removeUnverifiedRequestIdentifiers-CtK_XgEn.mjs → removeUnverifiedRequestIdentifiers-p4oI6LAH.mjs} +2 -2
- package/dist/{removeUnverifiedRequestIdentifiers-CtK_XgEn.mjs.map → removeUnverifiedRequestIdentifiers-p4oI6LAH.mjs.map} +1 -1
- package/dist/{retryRequestDataSilos-CaDygKVG.mjs → retryRequestDataSilos-B8SLN2Cl.mjs} +2 -2
- package/dist/{retryRequestDataSilos-CaDygKVG.mjs.map → retryRequestDataSilos-B8SLN2Cl.mjs.map} +1 -1
- package/dist/{skipPreflightJobs-C0B70Xp8.mjs → skipPreflightJobs-D91o271-.mjs} +2 -2
- package/dist/{skipPreflightJobs-C0B70Xp8.mjs.map → skipPreflightJobs-D91o271-.mjs.map} +1 -1
- package/dist/{skipRequestDataSilos-BuDZsxov.mjs → skipRequestDataSilos-UrL99osC.mjs} +2 -2
- package/dist/{skipRequestDataSilos-BuDZsxov.mjs.map → skipRequestDataSilos-UrL99osC.mjs.map} +1 -1
- package/dist/{streamPrivacyRequestsToCsv-Cor9OJuO.mjs → streamPrivacyRequestsToCsv-A_g3kKJa.mjs} +2 -2
- package/dist/{streamPrivacyRequestsToCsv-Cor9OJuO.mjs.map → streamPrivacyRequestsToCsv-A_g3kKJa.mjs.map} +1 -1
- package/dist/{updateConsentManagerVersionToLatest-CJwij2wV.mjs → updateConsentManagerVersionToLatest-BwlBSGxL.mjs} +2 -2
- package/dist/{updateConsentManagerVersionToLatest-CJwij2wV.mjs.map → updateConsentManagerVersionToLatest-BwlBSGxL.mjs.map} +1 -1
- package/dist/{uploadConsents-DBvY5ufP.mjs → uploadConsents-HQ40JQKh.mjs} +2 -2
- package/dist/{uploadConsents-DBvY5ufP.mjs.map → uploadConsents-HQ40JQKh.mjs.map} +1 -1
- package/dist/{uploadCookiesFromCsv-lpyJdcYa.mjs → uploadCookiesFromCsv-dRh8myVO.mjs} +2 -2
- package/dist/{uploadCookiesFromCsv-lpyJdcYa.mjs.map → uploadCookiesFromCsv-dRh8myVO.mjs.map} +1 -1
- package/dist/{uploadDataFlowsFromCsv-CrEyJ_ZK.mjs → uploadDataFlowsFromCsv-DuZGco4v.mjs} +2 -2
- package/dist/{uploadDataFlowsFromCsv-CrEyJ_ZK.mjs.map → uploadDataFlowsFromCsv-DuZGco4v.mjs.map} +1 -1
- package/dist/{uploadPrivacyRequestsFromCsv-CqOWmtXb.mjs → uploadPrivacyRequestsFromCsv-Bw7n6pGX.mjs} +2 -2
- package/dist/{uploadPrivacyRequestsFromCsv-CqOWmtXb.mjs.map → uploadPrivacyRequestsFromCsv-Bw7n6pGX.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/app-BE3aWMxQ.mjs.map +0 -1
- package/dist/impl-CmPkzyZT.mjs +0 -2
- package/dist/impl-CmPkzyZT.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-Ix0vCygP.mjs","names":[],"sources":["../src/commands/admin/chunk-csv/ui/plugin.ts","../src/commands/admin/chunk-csv/impl.ts"],"sourcesContent":["import {\n makeHeader,\n makeWorkerRows,\n type ChunkSlotProgress,\n type CommonCtx,\n type DashboardPlugin,\n} from '../../../../lib/pooling/index.js';\n\n/**\n * Header for chunk-csv (no extra totals block).\n *\n * @param ctx - Dashboard context.\n * @returns Header lines.\n */\nfunction renderHeader<TTotals>(ctx: CommonCtx<TTotals, ChunkSlotProgress>): string[] {\n // no extra lines — reuse the shared header as-is\n return makeHeader(ctx);\n}\n\n/**\n * Worker rows for chunk-csv — share the generic row renderer.\n *\n * @param ctx - Dashboard context.\n * @returns Array of strings, each representing one worker row.\n */\nfunction renderWorkers<TTotals>(ctx: CommonCtx<TTotals, ChunkSlotProgress>): string[] {\n return makeWorkerRows(ctx);\n}\n\nexport const chunkCsvPlugin: DashboardPlugin<unknown, ChunkSlotProgress> = {\n renderHeader,\n renderWorkers,\n // no extras\n};\n","import {\n CHILD_FLAG,\n type PoolHooks,\n runPool,\n computePoolSize,\n PoolCancelledError,\n resolveWorkerPath,\n} from '@transcend-io/utils';\nimport colors from 'colors';\n\nimport type { LocalContext } from '../../../context.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { collectCsvFilesOrExit } from '../../../lib/helpers/collectCsvFilesOrExit.js';\nimport {\n createExtraKeyHandler,\n dashboardPlugin,\n installInteractiveSwitcher,\n} from '../../../lib/pooling/index.js';\nimport { logger } from '../../../logger.js';\nimport { chunkCsvPlugin } from './ui/index.js';\nimport type { ChunkProgress, ChunkResult, ChunkTask } from './worker.js';\n\n/**\n * Totals aggregate for this command.\n * We don’t need custom counters since the runner already tracks\n * completed/failed counts in its header — so we just use an empty record.\n */\ntype Totals = Record<string, never>;\n\n/**\n * CLI flags accepted by the `chunk-csv` command.\n *\n * These are passed down from the CLI parser into the parent process.\n */\nexport type ChunkCsvCommandFlags = {\n directory: string;\n outputDir?: string;\n clearOutputDir: boolean;\n chunkSizeMB: number;\n concurrency?: number;\n viewerMode: boolean;\n};\n\n/**\n * Parent entrypoint for chunking many CSVs in parallel using the worker pool runner.\n *\n * Lifecycle:\n * 1) Discover CSV inputs (exit if none).\n * 2) Compute pool size (CPU-count heuristic or --concurrency).\n * 3) Build a FIFO queue of `ChunkTask`s.\n * 4) Define pool hooks to drive task assignment, progress, and result handling.\n * 5) Launch the pool with `runPool`, rendering via the `chunkCsvPlugin`.\n *\n * @param this - Bound CLI context (provides process exit + logging).\n * @param flags - CLI options for the run.\n */\nexport async function chunkCsv(this: LocalContext, flags: ChunkCsvCommandFlags): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { directory, outputDir, clearOutputDir, chunkSizeMB, concurrency, viewerMode } = flags;\n\n /* 1) Discover CSV inputs */\n const files = collectCsvFilesOrExit(directory, this);\n\n /* 2) Size the pool */\n const { poolSize, cpuCount } = computePoolSize(concurrency, files.length);\n\n logger.info(\n colors.green(\n `Chunking ${files.length} CSV file(s) with pool size ${poolSize} (CPU=${cpuCount})`,\n ),\n );\n\n /* 3) Prepare a simple FIFO queue of tasks (one per file). */\n const queue = files.map<ChunkTask>((filePath) => ({\n filePath,\n options: { outputDir, clearOutputDir, chunkSizeMB },\n }));\n\n /* 4) Define pool hooks to adapt runner to this command. */\n const hooks: PoolHooks<ChunkTask, ChunkProgress, ChunkResult, Totals> = {\n nextTask: () => queue.shift(),\n taskLabel: (t) => t.filePath,\n initTotals: () => ({}) as Totals,\n initSlotProgress: () => undefined,\n onProgress: (totals) => totals,\n onResult: (totals, res) => ({ totals, ok: !!res.ok }),\n // postProcess receives log context when viewerMode=true — we don’t need it here.\n postProcess: async () => {\n // nothing extra for chunk-csv\n },\n };\n\n /* 5) Launch the pool runner with our hooks and custom dashboard plugin. */\n await runPool({\n title: `Chunk CSV - ${directory}`,\n baseDir: directory || outputDir || process.cwd(),\n childFlag: CHILD_FLAG,\n childModulePath: resolveWorkerPath(import.meta.url, 'commands/admin/chunk-csv/worker.mjs'),\n poolSize,\n cpuCount,\n filesTotal: files.length,\n hooks,\n viewerMode,\n render: (input) => dashboardPlugin(input, chunkCsvPlugin, viewerMode),\n installInteractiveSwitcher: viewerMode\n ? undefined\n : ({\n workers,\n onCtrlC,\n getLogPaths,\n replayBytes: rb,\n replayWhich: rw,\n setPaused,\n repaint: rp,\n }) =>\n installInteractiveSwitcher({\n workers,\n onCtrlC,\n getLogPaths,\n replayBytes: rb,\n replayWhich: rw,\n onAttach: () => setPaused(true),\n onDetach: () => {\n setPaused(false);\n rp();\n },\n onEnterAttachScreen: (id) => {\n setPaused(true);\n process.stdout.write('\\x1b[2J\\x1b[H');\n process.stdout.write(\n `Attached to worker ${id}. (Esc/Ctrl+] detach \\u2022 Ctrl+D EOF \\u2022 Ctrl+C SIGINT)\\n`,\n );\n },\n }),\n extraKeyHandler: ({ logsBySlot, repaint, setPaused }) =>\n createExtraKeyHandler({\n logsBySlot,\n repaint,\n setPaused,\n }),\n }).catch((err) => {\n if (err instanceof PoolCancelledError) {\n process.exit(130);\n }\n throw err;\n });\n}\n"],"mappings":"+XAcA,SAAS,EAAsB,EAAsD,CAEnF,OAAO,EAAW,EAAI,CASxB,SAAS,EAAuB,EAAsD,CACpF,OAAO,EAAe,EAAI,CAG5B,MAAa,EAA8D,CACzE,eACA,gBAED,CCuBD,eAAsB,EAA6B,EAA4C,CAC7F,EAAoB,KAAK,QAAQ,KAAK,CAEtC,GAAM,CAAE,YAAW,YAAW,iBAAgB,cAAa,cAAa,cAAe,EAGjF,EAAQ,EAAsB,EAAW,KAAK,CAG9C,CAAE,WAAU,YAAa,EAAgB,EAAa,EAAM,OAAO,CAEzE,EAAO,KACL,EAAO,MACL,YAAY,EAAM,OAAO,8BAA8B,EAAS,QAAQ,EAAS,GAClF,CACF,CAGD,IAAM,EAAQ,EAAM,IAAgB,IAAc,CAChD,WACA,QAAS,CAAE,YAAW,iBAAgB,cAAa,CACpD,EAAE,CAiBH,MAAM,EAAQ,CACZ,MAAO,eAAe,IACtB,QAAS,GAAa,GAAa,QAAQ,KAAK,CAChD,UAAW,EACX,gBAAiB,EAAkB,OAAO,KAAK,IAAK,sCAAsC,CAC1F,WACA,WACA,WAAY,EAAM,OAClB,MAAA,CArBA,aAAgB,EAAM,OAAO,CAC7B,UAAY,GAAM,EAAE,SACpB,gBAAmB,EAAE,EACrB,qBAAwB,IAAA,GACxB,WAAa,GAAW,EACxB,UAAW,EAAQ,KAAS,CAAE,SAAQ,GAAI,CAAC,CAAC,EAAI,GAAI,EAEpD,YAAa,SAAY,GAcpB,CACL,aACA,OAAS,GAAU,EAAgB,EAAO,EAAgB,EAAW,CACrE,2BAA4B,EACxB,IAAA,IACC,CACC,UACA,UACA,cACA,YAAa,EACb,YAAa,EACb,YACA,QAAS,KAET,EAA2B,CACzB,UACA,UACA,cACA,YAAa,EACb,YAAa,EACb,aAAgB,EAAU,GAAK,CAC/B,aAAgB,CACd,EAAU,GAAM,CAChB,GAAI,EAEN,oBAAsB,GAAO,CAC3B,EAAU,GAAK,CACf,QAAQ,OAAO,MAAM,gBAAgB,CACrC,QAAQ,OAAO,MACb,sBAAsB,EAAG,gEAC1B,EAEJ,CAAC,CACR,iBAAkB,CAAE,aAAY,UAAS,eACvC,EAAsB,CACpB,aACA,UACA,YACD,CAAC,CACL,CAAC,CAAC,MAAO,GAAQ,CAIhB,MAHI,aAAe,GACjB,QAAQ,KAAK,IAAI,CAEb,GACN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./logger-B-LXIf3U.mjs";import{n as t}from"./buildXdiSyncEndpoint-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
import{t as e}from"./logger-B-LXIf3U.mjs";import{n as t}from"./buildXdiSyncEndpoint-CEeu8sd3.mjs";import{t as n}from"./validateTranscendAuth-CXcE-oTu.mjs";import{t as r}from"./done-input-validation-CvwjeRWr.mjs";import{writeFileSync as i}from"node:fs";import a from"colors";async function o({auth:o,xdiLocation:s,file:c,removeIpAddresses:l,domainBlockList:u,xdiAllowedCommands:d,transcendUrl:f}){r(this.process.exit);let{syncGroups:p,html:m}=await t(await n(o),{xdiLocation:s,transcendUrl:f,removeIpAddresses:l,domainBlockList:u.length>0?u:void 0,xdiAllowedCommands:d});e.info(a.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(p,null,2)}`)),i(c,m),e.info(a.green(`Wrote configuration to file "${c}"!`))}export{o as buildXdiSyncEndpoint};
|
|
2
|
+
//# sourceMappingURL=impl-LrDzQgnX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-LrDzQgnX.mjs","names":["buildXdiSyncEndpointHelper"],"sources":["../src/commands/consent/build-xdi-sync-endpoint/impl.ts"],"sourcesContent":["import { writeFileSync } from 'node:fs';\n\nimport colors from 'colors';\n\nimport type { LocalContext } from '../../../context.js';\nimport { validateTranscendAuth } from '../../../lib/api-keys/index.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { buildXdiSyncEndpoint as buildXdiSyncEndpointHelper } from '../../../lib/consent-manager/index.js';\nimport { logger } from '../../../logger.js';\n\nexport interface BuildXdiSyncEndpointCommandFlags {\n auth: string;\n xdiLocation: string;\n file: string;\n removeIpAddresses: boolean;\n domainBlockList: string[];\n xdiAllowedCommands: string;\n transcendUrl: string;\n}\n\nexport async function buildXdiSyncEndpoint(\n this: LocalContext,\n {\n auth,\n xdiLocation,\n file,\n removeIpAddresses,\n domainBlockList,\n xdiAllowedCommands,\n transcendUrl,\n }: BuildXdiSyncEndpointCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Build the sync endpoint\n const { syncGroups, html } = await buildXdiSyncEndpointHelper(apiKeyOrList, {\n xdiLocation,\n transcendUrl,\n removeIpAddresses,\n domainBlockList: domainBlockList.length > 0 ? domainBlockList : undefined,\n xdiAllowedCommands,\n });\n\n // Log success\n logger.info(\n colors.green(\n `Successfully constructed sync endpoint for sync groups: ${JSON.stringify(\n syncGroups,\n null,\n 2,\n )}`,\n ),\n );\n\n // Write to disk\n writeFileSync(file, html);\n logger.info(colors.green(`Wrote configuration to file \"${file}\"!`));\n}\n"],"mappings":"kRAoBA,eAAsB,EAEpB,CACE,OACA,cACA,OACA,oBACA,kBACA,qBACA,gBAEa,CACf,EAAoB,KAAK,QAAQ,KAAK,CAMtC,GAAM,CAAE,aAAY,QAAS,MAAMA,EAA2B,MAHnC,EAAsB,EAAK,CAGsB,CAC1E,cACA,eACA,oBACA,gBAAiB,EAAgB,OAAS,EAAI,EAAkB,IAAA,GAChE,qBACD,CAAC,CAGF,EAAO,KACL,EAAO,MACL,2DAA2D,KAAK,UAC9D,EACA,KACA,EACD,GACF,CACF,CAGD,EAAc,EAAM,EAAK,CACzB,EAAO,KAAK,EAAO,MAAM,gCAAgC,EAAK,IAAI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./removeUnverifiedRequestIdentifiers-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
import{t as e}from"./removeUnverifiedRequestIdentifiers-p4oI6LAH.mjs";import{t}from"./done-input-validation-CvwjeRWr.mjs";async function n({auth:n,transcendUrl:r,identifierNames:i,actions:a=[]}){t(this.process.exit),await e({requestActions:a,transcendUrl:r,auth:n,identifierNames:i})}export{n as rejectUnverifiedIdentifiers};
|
|
2
|
+
//# sourceMappingURL=impl-wQ6kkilO2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-wQ6kkilO2.mjs","names":[],"sources":["../src/commands/request/reject-unverified-identifiers/impl.ts"],"sourcesContent":["import type { RequestAction } from '@transcend-io/privacy-types';\n\nimport type { LocalContext } from '../../../context.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { removeUnverifiedRequestIdentifiers } from '../../../lib/requests/index.js';\n\nexport interface RejectUnverifiedIdentifiersCommandFlags {\n auth: string;\n identifierNames: string[];\n actions?: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function rejectUnverifiedIdentifiers(\n this: LocalContext,\n { auth, transcendUrl, identifierNames, actions = [] }: RejectUnverifiedIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await removeUnverifiedRequestIdentifiers({\n requestActions: actions,\n transcendUrl,\n auth,\n identifierNames,\n });\n}\n"],"mappings":"0HAaA,eAAsB,EAEpB,CAAE,OAAM,eAAc,kBAAiB,UAAU,EAAE,EACpC,CACf,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAM,EAAmC,CACvC,eAAgB,EAChB,eACA,OACA,kBACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./logger-B-LXIf3U.mjs";import{t}from"./collectParquetFilesOrExit-BJ-GciNy.mjs";import{t as n}from"./done-input-validation-CvwjeRWr.mjs";import{a as r,i,n as a,r as o,t as s}from"./createExtraKeyHandler-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
import{t as e}from"./logger-B-LXIf3U.mjs";import{t}from"./collectParquetFilesOrExit-BJ-GciNy.mjs";import{t as n}from"./done-input-validation-CvwjeRWr.mjs";import{a as r,i,n as a,r as o,t as s}from"./createExtraKeyHandler-Bv91U-rp.mjs";import c from"colors";import{CHILD_FLAG as l,PoolCancelledError as u,computePoolSize as d,resolveWorkerPath as f,runPool as p}from"@transcend-io/utils";function m(e){return a(e)}function h(e){return o(e)}const g={renderHeader:m,renderWorkers:h};async function _(a){n(this.process.exit);let{directory:o,outputDir:m,clearOutputDir:h,concurrency:_,viewerMode:v}=a,y=t(o,this),{poolSize:b,cpuCount:x}=d(_,y.length);e.info(c.green(`Converting ${y.length} Parquet file(s) → CSV with pool size ${b} (CPU=${x})`));let S=y.map(e=>({filePath:e,options:{outputDir:m,clearOutputDir:h}}));await p({title:`Parquet → CSV - ${o}`,baseDir:o||m||process.cwd(),childFlag:l,childModulePath:f(import.meta.url,`commands/admin/parquet-to-csv/worker.mjs`),poolSize:b,cpuCount:x,filesTotal:y.length,hooks:{nextTask:()=>S.shift(),taskLabel:e=>e.filePath,initTotals:()=>({}),initSlotProgress:()=>void 0,onProgress:e=>e,onResult:(e,t)=>({totals:e,ok:!!t.ok}),postProcess:async()=>{}},viewerMode:v,render:e=>i(e,g,v),installInteractiveSwitcher:v?void 0:({workers:e,onCtrlC:t,getLogPaths:n,replayBytes:i,replayWhich:a,setPaused:o,repaint:s})=>r({workers:e,onCtrlC:t,getLogPaths:n,replayBytes:i,replayWhich:a,onAttach:()=>o(!0),onDetach:()=>{o(!1),s()},onEnterAttachScreen:e=>{o(!0),process.stdout.write(`\x1B[2J\x1B[H`),process.stdout.write(`Attached to worker ${e}. (Esc/Ctrl+] detach \u2022 Ctrl+D EOF \u2022 Ctrl+C SIGINT)\n`)}}),extraKeyHandler:({logsBySlot:e,repaint:t,setPaused:n})=>s({logsBySlot:e,repaint:t,setPaused:n})}).catch(e=>{throw e instanceof u&&process.exit(130),e})}export{_ as parquetToCsv};
|
|
2
|
+
//# sourceMappingURL=impl-xaZzkyC0.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-xaZzkyC0.mjs","names":[],"sources":["../src/commands/admin/parquet-to-csv/ui/plugin.ts","../src/commands/admin/parquet-to-csv/impl.ts"],"sourcesContent":["import {\n makeHeader,\n makeWorkerRows,\n type ChunkSlotProgress,\n type CommonCtx,\n type DashboardPlugin,\n} from '../../../../lib/pooling/index.js';\n\n/**\n * Header for parquet-to-csv (no extra totals block).\n *\n * @param ctx - Dashboard context.\n * @returns Header lines.\n */\nfunction renderHeader<TTotals>(ctx: CommonCtx<TTotals, ChunkSlotProgress>): string[] {\n // no extra lines — reuse the shared header as-is\n return makeHeader(ctx);\n}\n\n/**\n * Worker rows for parquet-to-csv — share the generic row renderer.\n *\n * @param ctx - Dashboard context.\n * @returns Array of strings, each representing one worker row.\n */\nfunction renderWorkers<TTotals>(ctx: CommonCtx<TTotals, ChunkSlotProgress>): string[] {\n return makeWorkerRows(ctx);\n}\n\nexport const parquetToCsvPlugin: DashboardPlugin<unknown, ChunkSlotProgress> = {\n renderHeader,\n renderWorkers,\n // no extras\n};\n","import {\n CHILD_FLAG,\n type PoolHooks,\n runPool,\n computePoolSize,\n PoolCancelledError,\n resolveWorkerPath,\n} from '@transcend-io/utils';\nimport colors from 'colors';\n\nimport type { LocalContext } from '../../../context.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { collectParquetFilesOrExit } from '../../../lib/helpers/index.js';\nimport {\n createExtraKeyHandler,\n dashboardPlugin,\n installInteractiveSwitcher,\n} from '../../../lib/pooling/index.js';\nimport { logger } from '../../../logger.js';\nimport { parquetToCsvPlugin } from './ui/index.js';\nimport type { ParquetProgress, ParquetResult, ParquetTask } from './worker.js';\n\n/** No custom totals for the header; the runner’s built-ins suffice. */\ntype Totals = Record<string, never>;\n\nexport type ParquetToCsvCommandFlags = {\n directory: string;\n outputDir?: string;\n clearOutputDir: boolean;\n concurrency?: number;\n viewerMode: boolean;\n};\n\n/**\n * Convert all Parquet files in a directory to CSV, in parallel.\n *\n * @param flags - The command flags.\n */\nexport async function parquetToCsv(\n this: LocalContext,\n flags: ParquetToCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { directory, outputDir, clearOutputDir, concurrency, viewerMode } = flags;\n\n /* 1) Discover .parquet inputs */\n const files = collectParquetFilesOrExit(directory, this);\n\n /* 2) Size the pool */\n const { poolSize, cpuCount } = computePoolSize(concurrency, files.length);\n\n logger.info(\n colors.green(\n `Converting ${files.length} Parquet file(s) → CSV with pool size ${poolSize} (CPU=${cpuCount})`,\n ),\n );\n\n /* 3) Build FIFO queue of tasks (one per file) */\n const queue = files.map<ParquetTask>((filePath) => ({\n filePath,\n options: { outputDir, clearOutputDir },\n }));\n\n /* 4) Pool hooks */\n const hooks: PoolHooks<ParquetTask, ParquetProgress, ParquetResult, Totals> = {\n nextTask: () => queue.shift(),\n taskLabel: (t) => t.filePath,\n initTotals: () => ({}) as Totals,\n initSlotProgress: () => undefined,\n onProgress: (totals) => totals,\n onResult: (totals, res) => ({ totals, ok: !!res.ok }),\n postProcess: async () => {\n // nothing special post-run\n },\n };\n\n /* 5) Launch the pool runner with custom dashboard plugin */\n await runPool({\n title: `Parquet → CSV - ${directory}`,\n baseDir: directory || outputDir || process.cwd(),\n childFlag: CHILD_FLAG,\n childModulePath: resolveWorkerPath(import.meta.url, 'commands/admin/parquet-to-csv/worker.mjs'),\n poolSize,\n cpuCount,\n filesTotal: files.length,\n hooks,\n viewerMode,\n render: (input) => dashboardPlugin(input, parquetToCsvPlugin, viewerMode),\n installInteractiveSwitcher: viewerMode\n ? undefined\n : ({\n workers,\n onCtrlC,\n getLogPaths,\n replayBytes: rb,\n replayWhich: rw,\n setPaused,\n repaint: rp,\n }) =>\n installInteractiveSwitcher({\n workers,\n onCtrlC,\n getLogPaths,\n replayBytes: rb,\n replayWhich: rw,\n onAttach: () => setPaused(true),\n onDetach: () => {\n setPaused(false);\n rp();\n },\n onEnterAttachScreen: (id) => {\n setPaused(true);\n process.stdout.write('\\x1b[2J\\x1b[H');\n process.stdout.write(\n `Attached to worker ${id}. (Esc/Ctrl+] detach \\u2022 Ctrl+D EOF \\u2022 Ctrl+C SIGINT)\\n`,\n );\n },\n }),\n extraKeyHandler: ({ logsBySlot, repaint, setPaused }) =>\n createExtraKeyHandler({ logsBySlot, repaint, setPaused }),\n }).catch((err) => {\n if (err instanceof PoolCancelledError) {\n process.exit(130);\n }\n throw err;\n });\n}\n"],"mappings":"mYAcA,SAAS,EAAsB,EAAsD,CAEnF,OAAO,EAAW,EAAI,CASxB,SAAS,EAAuB,EAAsD,CACpF,OAAO,EAAe,EAAI,CAG5B,MAAa,EAAkE,CAC7E,eACA,gBAED,CCKD,eAAsB,EAEpB,EACe,CACf,EAAoB,KAAK,QAAQ,KAAK,CAEtC,GAAM,CAAE,YAAW,YAAW,iBAAgB,cAAa,cAAe,EAGpE,EAAQ,EAA0B,EAAW,KAAK,CAGlD,CAAE,WAAU,YAAa,EAAgB,EAAa,EAAM,OAAO,CAEzE,EAAO,KACL,EAAO,MACL,cAAc,EAAM,OAAO,wCAAwC,EAAS,QAAQ,EAAS,GAC9F,CACF,CAGD,IAAM,EAAQ,EAAM,IAAkB,IAAc,CAClD,WACA,QAAS,CAAE,YAAW,iBAAgB,CACvC,EAAE,CAgBH,MAAM,EAAQ,CACZ,MAAO,mBAAmB,IAC1B,QAAS,GAAa,GAAa,QAAQ,KAAK,CAChD,UAAW,EACX,gBAAiB,EAAkB,OAAO,KAAK,IAAK,2CAA2C,CAC/F,WACA,WACA,WAAY,EAAM,OAClB,MAAA,CApBA,aAAgB,EAAM,OAAO,CAC7B,UAAY,GAAM,EAAE,SACpB,gBAAmB,EAAE,EACrB,qBAAwB,IAAA,GACxB,WAAa,GAAW,EACxB,UAAW,EAAQ,KAAS,CAAE,SAAQ,GAAI,CAAC,CAAC,EAAI,GAAI,EACpD,YAAa,SAAY,GAcpB,CACL,aACA,OAAS,GAAU,EAAgB,EAAO,EAAoB,EAAW,CACzE,2BAA4B,EACxB,IAAA,IACC,CACC,UACA,UACA,cACA,YAAa,EACb,YAAa,EACb,YACA,QAAS,KAET,EAA2B,CACzB,UACA,UACA,cACA,YAAa,EACb,YAAa,EACb,aAAgB,EAAU,GAAK,CAC/B,aAAgB,CACd,EAAU,GAAM,CAChB,GAAI,EAEN,oBAAsB,GAAO,CAC3B,EAAU,GAAK,CACf,QAAQ,OAAO,MAAM,gBAAgB,CACrC,QAAQ,OAAO,MACb,sBAAsB,EAAG,gEAC1B,EAEJ,CAAC,CACR,iBAAkB,CAAE,aAAY,UAAS,eACvC,EAAsB,CAAE,aAAY,UAAS,YAAW,CAAC,CAC5D,CAAC,CAAC,MAAO,GAAQ,CAIhB,MAHI,aAAe,GACjB,QAAQ,KAAK,IAAI,CAEb,GACN"}
|