@transcend-io/cli 8.36.1 → 8.37.1
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 +68 -19
- package/dist/{api-keys-DB0BZSh5.cjs → api-keys-Bb2BbZQe.cjs} +2 -2
- package/dist/{api-keys-DB0BZSh5.cjs.map → api-keys-Bb2BbZQe.cjs.map} +1 -1
- package/dist/app-C9jD-f87.cjs +131 -0
- package/dist/app-C9jD-f87.cjs.map +1 -0
- package/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/bash-complete.cjs.map +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/cli.cjs.map +1 -1
- package/dist/bin/deprecated-command.cjs +1 -1
- package/dist/bin/deprecated-command.cjs.map +1 -1
- package/dist/buildAIIntegrationType-BwuCYR-o.cjs +2 -0
- package/dist/{buildAIIntegrationType-n_Qlv8wG.cjs.map → buildAIIntegrationType-BwuCYR-o.cjs.map} +1 -1
- package/dist/chunk-Bmb41Sf3.cjs +1 -0
- package/dist/{code-scanning-Yc7rgoTY.cjs → code-scanning-4d0zlFxk.cjs} +2 -2
- package/dist/{code-scanning-Yc7rgoTY.cjs.map → code-scanning-4d0zlFxk.cjs.map} +1 -1
- package/dist/codecs-Bvmb8o9R.cjs +2 -0
- package/dist/{codecs-JSDJgtyL.cjs.map → codecs-Bvmb8o9R.cjs.map} +1 -1
- package/dist/command-XJ7XPQ04.cjs +9 -0
- package/dist/{command-41dUPvEa.cjs.map → command-XJ7XPQ04.cjs.map} +1 -1
- package/dist/{consent-manager-BNMaKHId.cjs → consent-manager-CCyvzvY5.cjs} +2 -2
- package/dist/{consent-manager-BNMaKHId.cjs.map → consent-manager-CCyvzvY5.cjs.map} +1 -1
- package/dist/constants-wkuhlP8d.cjs +2 -0
- package/dist/{constants-JoCDv9ym.cjs.map → constants-wkuhlP8d.cjs.map} +1 -1
- package/dist/context-_8xfl0dt.cjs +2 -0
- package/dist/{context-Bw1xk9Q_.cjs.map → context-_8xfl0dt.cjs.map} +1 -1
- package/dist/{cron-ClvgH2uD.cjs → cron-DfEGA7Rf.cjs} +2 -2
- package/dist/{cron-ClvgH2uD.cjs.map → cron-DfEGA7Rf.cjs.map} +1 -1
- package/dist/{data-inventory-BzEYoxaa.cjs → data-inventory-C1eqZk1M.cjs} +2 -2
- package/dist/{data-inventory-BzEYoxaa.cjs.map → data-inventory-C1eqZk1M.cjs.map} +1 -1
- package/dist/{dataFlowsToDataSilos-daBgPi7V.cjs → dataFlowsToDataSilos-DXlFFHMV.cjs} +2 -2
- package/dist/{dataFlowsToDataSilos-daBgPi7V.cjs.map → dataFlowsToDataSilos-DXlFFHMV.cjs.map} +1 -1
- package/dist/{done-input-validation-Cgk5kNBs.cjs → done-input-validation-DGckEJ5a.cjs} +1 -1
- package/dist/{done-input-validation-Cgk5kNBs.cjs.map → done-input-validation-DGckEJ5a.cjs.map} +1 -1
- package/dist/enums-BZulhPFa.cjs +2 -0
- package/dist/{enums-CBXlBJii.cjs.map → enums-BZulhPFa.cjs.map} +1 -1
- package/dist/impl-6TmoWv0o.cjs +2 -0
- package/dist/{impl-ClDXxODZ.cjs.map → impl-6TmoWv0o.cjs.map} +1 -1
- package/dist/impl-73q3K0b_.cjs +2 -0
- package/dist/{impl-BN61r-PG.cjs.map → impl-73q3K0b_.cjs.map} +1 -1
- package/dist/{impl-DjVmOb9T.cjs → impl-7LAuV25D.cjs} +2 -2
- package/dist/{impl-DjVmOb9T.cjs.map → impl-7LAuV25D.cjs.map} +1 -1
- package/dist/impl-B04CctrY.cjs +12 -0
- package/dist/{impl-BMxxKrNz.cjs.map → impl-B04CctrY.cjs.map} +1 -1
- package/dist/impl-BGoAnVJu.cjs +4 -0
- package/dist/{impl-FlZPR0yd.cjs.map → impl-BGoAnVJu.cjs.map} +1 -1
- package/dist/impl-BOEjB3fo.cjs +2 -0
- package/dist/impl-BOEjB3fo.cjs.map +1 -0
- package/dist/impl-BOEoFzcB.cjs +4 -0
- package/dist/{impl-8bci0gd2.cjs.map → impl-BOEoFzcB.cjs.map} +1 -1
- package/dist/impl-B_2CdctV.cjs +2 -0
- package/dist/{impl-CCOEjRnr.cjs.map → impl-B_2CdctV.cjs.map} +1 -1
- package/dist/impl-BfC5CRRX.cjs +2 -0
- package/dist/{impl-hGu8uCC4.cjs.map → impl-BfC5CRRX.cjs.map} +1 -1
- package/dist/impl-C-aKX3zu.cjs +2 -0
- package/dist/{impl-DU-WTXTY.cjs.map → impl-C-aKX3zu.cjs.map} +1 -1
- package/dist/impl-C4q9xHFr.cjs +2 -0
- package/dist/{impl-BIqdEXRo.cjs.map → impl-C4q9xHFr.cjs.map} +1 -1
- package/dist/impl-C6JjApDI.cjs +2 -0
- package/dist/{impl-Bv4gPikD.cjs.map → impl-C6JjApDI.cjs.map} +1 -1
- package/dist/impl-CKYwKeLz.cjs +2 -0
- package/dist/{impl-4pmSDQvA.cjs.map → impl-CKYwKeLz.cjs.map} +1 -1
- package/dist/impl-CLcnbVfj.cjs +2 -0
- package/dist/impl-CLcnbVfj.cjs.map +1 -0
- package/dist/impl-CR-wyJSg.cjs +2 -0
- package/dist/impl-CR-wyJSg.cjs.map +1 -0
- package/dist/impl-CV3axMeT.cjs +2 -0
- package/dist/{impl-cfDtPbS9.cjs.map → impl-CV3axMeT.cjs.map} +1 -1
- package/dist/impl-CgKn47V9.cjs +2 -0
- package/dist/{impl-DpdGWdrr.cjs.map → impl-CgKn47V9.cjs.map} +1 -1
- package/dist/impl-CmEsmnYZ.cjs +2 -0
- package/dist/{impl-Cp12F9tr.cjs.map → impl-CmEsmnYZ.cjs.map} +1 -1
- package/dist/impl-CnRqR4kw.cjs +2 -0
- package/dist/{impl-C4D1tHjp.cjs.map → impl-CnRqR4kw.cjs.map} +1 -1
- package/dist/impl-Cp7-Tctr.cjs +2 -0
- package/dist/{impl-_dGu54cO.cjs.map → impl-Cp7-Tctr.cjs.map} +1 -1
- package/dist/impl-CqadSQOh.cjs +2 -0
- package/dist/impl-CqadSQOh.cjs.map +1 -0
- package/dist/impl-Cru4riTc.cjs +5 -0
- package/dist/impl-Cru4riTc.cjs.map +1 -0
- package/dist/impl-CsKfLxov.cjs +2 -0
- package/dist/impl-CsKfLxov.cjs.map +1 -0
- package/dist/impl-CyzGdwB1.cjs +2 -0
- package/dist/impl-CyzGdwB1.cjs.map +1 -0
- package/dist/impl-DC_YquN8.cjs +2 -0
- package/dist/{impl-BwAnSxkP.cjs.map → impl-DC_YquN8.cjs.map} +1 -1
- package/dist/impl-DHuguAlW.cjs +2 -0
- package/dist/{impl-BRuqPhJU.cjs.map → impl-DHuguAlW.cjs.map} +1 -1
- package/dist/impl-DNRsFfbU.cjs +2 -0
- package/dist/{impl-8zottXEQ.cjs.map → impl-DNRsFfbU.cjs.map} +1 -1
- package/dist/impl-DQ8rr7Fv.cjs +2 -0
- package/dist/{impl-ay7i0K_5.cjs.map → impl-DQ8rr7Fv.cjs.map} +1 -1
- package/dist/impl-DetfC7CT.cjs +2 -0
- package/dist/impl-DetfC7CT.cjs.map +1 -0
- package/dist/impl-DhbV3bBZ.cjs +2 -0
- package/dist/impl-DhbV3bBZ.cjs.map +1 -0
- package/dist/impl-DjP2MJNK.cjs +2 -0
- package/dist/{impl-CSZwdpH-.cjs.map → impl-DjP2MJNK.cjs.map} +1 -1
- package/dist/impl-DmXYpp-M.cjs +2 -0
- package/dist/{impl-J5fV8gbh.cjs.map → impl-DmXYpp-M.cjs.map} +1 -1
- package/dist/impl-Dp3-sA6b.cjs +2 -0
- package/dist/{impl-yHutqfbd.cjs.map → impl-Dp3-sA6b.cjs.map} +1 -1
- package/dist/{impl-KgEJvOhE.cjs → impl-DqfyWyoV.cjs} +2 -2
- package/dist/{impl-KgEJvOhE.cjs.map → impl-DqfyWyoV.cjs.map} +1 -1
- package/dist/impl-DrJj-l3s.cjs +2 -0
- package/dist/{impl-BXMfTm4K.cjs.map → impl-DrJj-l3s.cjs.map} +1 -1
- package/dist/impl-Dvoj_snk.cjs +2 -0
- package/dist/{impl-BouHRicT.cjs.map → impl-Dvoj_snk.cjs.map} +1 -1
- package/dist/impl-DwWoAbT_.cjs +2 -0
- package/dist/{impl-DhdY6lbj.cjs.map → impl-DwWoAbT_.cjs.map} +1 -1
- package/dist/impl-DxhyqjcY.cjs +2 -0
- package/dist/{impl-CFmFCVt8.cjs.map → impl-DxhyqjcY.cjs.map} +1 -1
- package/dist/impl-Dzq0t6mX.cjs +2 -0
- package/dist/{impl-BH0HWnIY.cjs.map → impl-Dzq0t6mX.cjs.map} +1 -1
- package/dist/impl-LgUGDTQK.cjs +2 -0
- package/dist/{impl-BS8t24Z7.cjs.map → impl-LgUGDTQK.cjs.map} +1 -1
- package/dist/impl-XyWPUpvw.cjs +2 -0
- package/dist/{impl-BWiNjS6v.cjs.map → impl-XyWPUpvw.cjs.map} +1 -1
- package/dist/impl-_QrpPIPw.cjs +2 -0
- package/dist/{impl-D3sI4I1g.cjs.map → impl-_QrpPIPw.cjs.map} +1 -1
- package/dist/impl-kxwq3OMk.cjs +2 -0
- package/dist/{impl-CoxOrlXu.cjs.map → impl-kxwq3OMk.cjs.map} +1 -1
- package/dist/impl-u8o3S8w2.cjs +2 -0
- package/dist/{impl-SkiG9sWb.cjs.map → impl-u8o3S8w2.cjs.map} +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -2
- package/dist/{logger-BaHHbWVd.cjs → logger-DQwEYtSS.cjs} +2 -2
- package/dist/{logger-BaHHbWVd.cjs.map → logger-DQwEYtSS.cjs.map} +1 -1
- package/dist/{manual-enrichment-D-0rM9KN.cjs → manual-enrichment-CzTpv-mM.cjs} +2 -2
- package/dist/{manual-enrichment-D-0rM9KN.cjs.map → manual-enrichment-CzTpv-mM.cjs.map} +1 -1
- package/dist/{mergeTranscendInputs-PPpGbYgG.cjs → mergeTranscendInputs-BIBCYbug.cjs} +2 -2
- package/dist/{mergeTranscendInputs-PPpGbYgG.cjs.map → mergeTranscendInputs-BIBCYbug.cjs.map} +1 -1
- package/dist/{pooling-DbIx6-i7.cjs → pooling-DA_LwUEp.cjs} +2 -2
- package/dist/{pooling-DbIx6-i7.cjs.map → pooling-DA_LwUEp.cjs.map} +1 -1
- package/dist/{preference-management-Dapt3Li3.cjs → preference-management-aOhuZCuE.cjs} +2 -2
- package/dist/{preference-management-Dapt3Li3.cjs.map → preference-management-aOhuZCuE.cjs.map} +1 -1
- package/dist/{readTranscendYaml-CL9nujUr.cjs → readTranscendYaml-Cycz6RxW.cjs} +2 -2
- package/dist/{readTranscendYaml-CL9nujUr.cjs.map → readTranscendYaml-Cycz6RxW.cjs.map} +1 -1
- package/dist/syncConfigurationToTranscend-DuTZKIG8.cjs +3000 -0
- package/dist/syncConfigurationToTranscend-DuTZKIG8.cjs.map +1 -0
- package/dist/{uploadConsents-CN1JucL3.cjs → uploadConsents-C9Pv8Awr.cjs} +2 -2
- package/dist/{uploadConsents-CN1JucL3.cjs.map → uploadConsents-C9Pv8Awr.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/app-BOlZhpYh.cjs +0 -118
- package/dist/app-BOlZhpYh.cjs.map +0 -1
- package/dist/buildAIIntegrationType-n_Qlv8wG.cjs +0 -2
- package/dist/codecs-JSDJgtyL.cjs +0 -2
- package/dist/command-41dUPvEa.cjs +0 -9
- package/dist/constants-JoCDv9ym.cjs +0 -2
- package/dist/context-Bw1xk9Q_.cjs +0 -2
- package/dist/enums-CBXlBJii.cjs +0 -2
- package/dist/impl-4pmSDQvA.cjs +0 -2
- package/dist/impl-8bci0gd2.cjs +0 -4
- package/dist/impl-8zottXEQ.cjs +0 -2
- package/dist/impl-BFOghVmx.cjs +0 -2
- package/dist/impl-BFOghVmx.cjs.map +0 -1
- package/dist/impl-BH0HWnIY.cjs +0 -2
- package/dist/impl-BIqdEXRo.cjs +0 -2
- package/dist/impl-BMxxKrNz.cjs +0 -12
- package/dist/impl-BN61r-PG.cjs +0 -2
- package/dist/impl-BRuqPhJU.cjs +0 -2
- package/dist/impl-BS8t24Z7.cjs +0 -2
- package/dist/impl-BWiNjS6v.cjs +0 -2
- package/dist/impl-BXMfTm4K.cjs +0 -2
- package/dist/impl-BYK9pQs0.cjs +0 -2
- package/dist/impl-BYK9pQs0.cjs.map +0 -1
- package/dist/impl-BjOFvm4E.cjs +0 -2
- package/dist/impl-BjOFvm4E.cjs.map +0 -1
- package/dist/impl-BouHRicT.cjs +0 -2
- package/dist/impl-Bv4gPikD.cjs +0 -2
- package/dist/impl-BwAnSxkP.cjs +0 -2
- package/dist/impl-C-_9uRms.cjs +0 -2
- package/dist/impl-C-_9uRms.cjs.map +0 -1
- package/dist/impl-C4D1tHjp.cjs +0 -2
- package/dist/impl-CA_CO88W.cjs +0 -2
- package/dist/impl-CA_CO88W.cjs.map +0 -1
- package/dist/impl-CCOEjRnr.cjs +0 -2
- package/dist/impl-CFmFCVt8.cjs +0 -2
- package/dist/impl-CSZwdpH-.cjs +0 -2
- package/dist/impl-ChNLuyNq.cjs +0 -2
- package/dist/impl-ChNLuyNq.cjs.map +0 -1
- package/dist/impl-ClDXxODZ.cjs +0 -2
- package/dist/impl-CoxOrlXu.cjs +0 -2
- package/dist/impl-Cp12F9tr.cjs +0 -2
- package/dist/impl-D3sI4I1g.cjs +0 -2
- package/dist/impl-D7WBmmHb.cjs +0 -2
- package/dist/impl-D7WBmmHb.cjs.map +0 -1
- package/dist/impl-DU-WTXTY.cjs +0 -2
- package/dist/impl-DhdY6lbj.cjs +0 -2
- package/dist/impl-DpdGWdrr.cjs +0 -2
- package/dist/impl-FlZPR0yd.cjs +0 -4
- package/dist/impl-J5fV8gbh.cjs +0 -2
- package/dist/impl-NLEQuKnT.cjs +0 -2
- package/dist/impl-NLEQuKnT.cjs.map +0 -1
- package/dist/impl-SkiG9sWb.cjs +0 -2
- package/dist/impl-_dGu54cO.cjs +0 -2
- package/dist/impl-ay7i0K_5.cjs +0 -2
- package/dist/impl-cfDtPbS9.cjs +0 -2
- package/dist/impl-hGu8uCC4.cjs +0 -2
- package/dist/impl-yHutqfbd.cjs +0 -2
- package/dist/syncConfigurationToTranscend-D4PLA70C.cjs +0 -2994
- package/dist/syncConfigurationToTranscend-D4PLA70C.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-Dvoj_snk.cjs","names":["listFiles","readTranscendYaml","dataFlowsToDataSilos","difference","fetchAndIndexCatalogs","buildTranscendGraphQLClient"],"sources":["../src/commands/inventory/derive-data-silos-from-data-flows-cross-instance/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'node:path';\nimport { difference } from 'lodash-es';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { dataFlowsToDataSilos } from '../../../lib/consent-manager/dataFlowsToDataSilos';\nimport { DataFlowInput } from '../../../codecs';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { listFiles } from '../../../lib/api-keys';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DeriveDataSilosFromDataFlowsCrossInstanceCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n output: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlowsCrossInstance(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n output,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCrossInstanceCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(dataFlowsYmlFolder) ||\n !lstatSync(dataFlowsYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataFlowsYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Ignore the data flows in these yml files\n const instancesToIgnore = ignoreYmls.map((x) => x.split('.')[0]);\n\n // Map over each data flow yml file and convert to data silo configurations\n const dataSiloInputs = listFiles(dataFlowsYmlFolder).map((directory) => {\n // read in the data flows for a specific instance\n const { 'data-flows': dataFlows = [] } = readTranscendYaml(\n join(dataFlowsYmlFolder, directory),\n );\n\n // map the data flows to data silos\n const { adTechDataSilos, siteTechDataSilos } = dataFlowsToDataSilos(\n dataFlows as DataFlowInput[],\n {\n serviceToSupportedIntegration,\n serviceToTitle,\n },\n );\n\n return {\n adTechDataSilos,\n siteTechDataSilos,\n organizationName: directory.split('.')[0],\n };\n });\n\n // Mapping from service name to instances that have that service\n const serviceToInstance: { [k in string]: string[] } = {};\n dataSiloInputs.forEach(\n ({ adTechDataSilos, siteTechDataSilos, organizationName }) => {\n const allDataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n allDataSilos.forEach((dataSilo) => {\n const service = dataSilo['outer-type'] || dataSilo.integrationName;\n // create mapping to instance\n if (!serviceToInstance[service]) {\n serviceToInstance[service] = [];\n }\n serviceToInstance[service]!.push(organizationName);\n serviceToInstance[service] = [...new Set(serviceToInstance[service])];\n });\n },\n );\n\n // List of ad tech integrations\n const adTechIntegrations = [\n ...new Set(\n dataSiloInputs\n .map(({ adTechDataSilos }) =>\n adTechDataSilos.map(\n (silo) => silo['outer-type'] || silo.integrationName,\n ),\n )\n .flat(),\n ),\n ];\n\n // List of site tech integrations\n const siteTechIntegrations = difference(\n [\n ...new Set(\n dataSiloInputs\n .map(({ siteTechDataSilos }) =>\n siteTechDataSilos.map(\n (silo) => silo['outer-type'] || silo.integrationName,\n ),\n )\n .flat(),\n ),\n ],\n adTechIntegrations,\n );\n\n // Mapping from service name to list of\n const serviceToFoundOnDomain: { [k in string]: string[] } = {};\n dataSiloInputs.forEach(({ adTechDataSilos, siteTechDataSilos }) => {\n const allDataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n allDataSilos.forEach((dataSilo) => {\n const service = dataSilo['outer-type'] || dataSilo.integrationName;\n const foundOnDomain = dataSilo.attributes?.find(\n (attr) => attr.key === 'Found On Domain',\n );\n // create mapping to instance\n if (!serviceToFoundOnDomain[service]) {\n serviceToFoundOnDomain[service] = [];\n }\n serviceToFoundOnDomain[service]!.push(...(foundOnDomain?.values || []));\n serviceToFoundOnDomain[service] = [\n ...new Set(serviceToFoundOnDomain[service]),\n ];\n });\n });\n\n // Fetch all integrations in the catalog\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { serviceToTitle, serviceToSupportedIntegration } =\n await fetchAndIndexCatalogs(client);\n\n // construct the aggregated data silo inputs\n const dataSilos = [...adTechIntegrations, ...siteTechIntegrations].map(\n (service) => ({\n title: serviceToTitle[service],\n ...(serviceToSupportedIntegration[service]\n ? { integrationName: service }\n : { integrationName: 'promptAPerson', 'outer-type': service }),\n attributes: [\n {\n key: 'Tech Type',\n values: ['Ad Tech'],\n },\n {\n key: 'Business Units',\n values: difference(\n serviceToInstance[service] || [],\n instancesToIgnore,\n ),\n },\n {\n key: 'Found On Domain',\n values: serviceToFoundOnDomain[service] || [],\n },\n ],\n }),\n );\n\n // Log output\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechIntegrations.length}`);\n logger.log(`Site Tech Services: ${siteTechIntegrations.length}`);\n\n // Write to yaml\n writeTranscendYaml(output, {\n 'data-silos': dataSilos,\n });\n}\n"],"mappings":"+iBA2BA,eAAsB,EAEpB,CACE,OACA,qBACA,SACA,aAAa,EAAE,CACf,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,EAIpC,EAAA,EAAA,EAAA,YAAY,EAAmB,EAC/B,EAAA,EAAA,EAAA,WAAW,EAAmB,CAAC,aAAa,IAE5C,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,2BAA2B,EAAmB,GAAG,CAAC,CAC1E,KAAK,QAAQ,KAAK,EAAE,EAItB,IAAM,EAAoB,EAAW,IAAK,GAAM,EAAE,MAAM,IAAI,CAAC,GAAG,C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AAG,IAAI,IAAI,EAAuB,GAAS,CAC5C,EACD,EACF,CAIF,GAAM,CAAE,iBAAgB,iCACtB,MAAMC,EAAAA,GAFOC,EAAAA,GAA4B,EAAc,EAAK,CAEzB,CAG/B,EAAY,CAAC,GAAG,EAAoB,GAAG,EAAqB,CAAC,IAChE,IAAa,CACZ,MAAO,EAAe,GACtB,GAAI,EAA8B,GAC9B,CAAE,gBAAiB,EAAS,CAC5B,CAAE,gBAAiB,gBAAiB,aAAc,EAAS,CAC/D,WAAY,CACV,CACE,IAAK,YACL,OAAQ,CAAC,UAAU,CACpB,CACD,CACE,IAAK,iBACL,OAAQF,EAAAA,GACN,EAAkB,IAAY,EAAE,CAChC,EACD,CACF,CACD,CACE,IAAK,kBACL,OAAQ,EAAuB,IAAY,EAAE,CAC9C,CACF,CACF,EACF,CAGD,EAAA,EAAO,IAAI,mBAAmB,EAAU,SAAS,CACjD,EAAA,EAAO,IAAI,qBAAqB,EAAmB,SAAS,CAC5D,EAAA,EAAO,IAAI,uBAAuB,EAAqB,SAAS,CAGhE,EAAA,EAAmB,EAAQ,CACzB,aAAc,EACf,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-wkuhlP8d.cjs`);const t=require(`./syncConfigurationToTranscend-DuTZKIG8.cjs`);require(`./enums-BZulhPFa.cjs`);const n=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const r=require(`./cron-DfEGA7Rf.cjs`),i=require(`./done-input-validation-DGckEJ5a.cjs`);let a=require(`colors`);a=e.t(a);async function o({file:e,fileTarget:o,transcendUrl:s,auth:c,sombraAuth:l,cronDataSiloId:u,targetDataSiloId:d,actions:f,skipRequestCount:p,pageLimit:m,chunkSize:h}){p&&n.t.info(a.default.yellow(`Skipping request count as requested. This may help speed up the call.`)),(Number.isNaN(h)||h<=0||h%m!==0)&&(n.t.error(a.default.red(`Invalid chunk size: "${h}". Must be a positive integer that is a multiple of ${m}.`)),this.process.exit(1)),i.t(this.process.exit);let g=t.ti(s,c),{baseName:_,extension:v}=t.c(e),{baseName:y,extension:b}=t.c(o),x=0,S=0,C=0;await r.t({dataSiloId:u,auth:c,sombraAuth:l,actions:f,apiPageSize:m,savePageSize:h,onSave:async r=>{x+=r.length;let i=await t.Ts(t.Ns(t.Ds(r.map(e=>e.requestId)),m),async e=>(n.t.info(a.default.magenta(`Fetching target identifiers for ${e.length} requests`)),(await t.Un(g,m*2,{requestIds:e,dataSiloIds:[d]})).map(({fileName:e,remoteId:t})=>{if(!t)throw Error(`Failed to find remoteId for ${e}`);return{RecordId:t,Object:e.replace(`.json`,``).split(`/`).pop()?.replace(` Information`,``),Comment:`Customer data deletion request submitted via transcend.io`}})),{concurrency:1});S+=i.flat().length;let s=t.Ds(r.map(e=>Object.keys(e)).flat()),c=`${_}-${C}${v}`,l=`${y}-${C}${b}`;await t.d(c,r,s),n.t.info(a.default.green(`Successfully wrote ${r.length} identifiers to file "${e}"`));let u=i.flat();await t.d(l,u,t.Ds(u.map(e=>Object.keys(e)).flat())),n.t.info(a.default.green(`Successfully wrote ${u.length} identifiers to file "${o}"`)),n.t.info(a.default.blue(`Processed chunk of ${t.Ns.length} identifiers, found ${u.length} target identifiers`)),C+=1},transcendUrl:s,skipRequestCount:p}),n.t.info(a.default.green(`Successfully wrote ${x} identifiers to file "${e}"`)),n.t.info(a.default.green(`Successfully wrote ${S} identifiers to file "${o}"`))}exports.pullProfiles=o;
|
|
2
|
+
//# sourceMappingURL=impl-DwWoAbT_.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-DwWoAbT_.cjs","names":["buildTranscendGraphQLClient","parseFilePath","map","chunk","uniq","fetchRequestFilesForRequest","writeLargeCsv","pullChunkedCustomSiloOutstandingIdentifiers"],"sources":["../src/commands/request/cron/pull-profiles/impl.ts"],"sourcesContent":["import type { RequestAction } from '@transcend-io/privacy-types';\nimport { logger } from '../../../../logger';\nimport colors from 'colors';\nimport { uniq, chunk } from 'lodash-es';\nimport { map } from '../../../../lib/bluebird';\nimport {\n buildTranscendGraphQLClient,\n fetchRequestFilesForRequest,\n} from '../../../../lib/graphql';\nimport type { LocalContext } from '../../../../context';\nimport {\n pullChunkedCustomSiloOutstandingIdentifiers,\n type CsvFormattedIdentifier,\n} from '../../../../lib/cron';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\nimport { parseFilePath, writeLargeCsv } from '../../../../lib/helpers';\n\nexport interface PullProfilesCommandFlags {\n file: string;\n fileTarget: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n cronDataSiloId: string;\n targetDataSiloId: string;\n actions: RequestAction[];\n skipRequestCount: boolean;\n pageLimit: number;\n chunkSize: number;\n}\n\nexport async function pullProfiles(\n this: LocalContext,\n {\n file,\n fileTarget,\n transcendUrl,\n auth,\n sombraAuth,\n cronDataSiloId,\n targetDataSiloId,\n actions,\n skipRequestCount,\n pageLimit,\n chunkSize,\n }: PullProfilesCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n // Create GraphQL client to connect to Transcend backend\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { baseName, extension } = parseFilePath(file);\n const { baseName: baseNameTarget, extension: extensionTarget } =\n parseFilePath(fileTarget);\n\n let allIdentifiersCount = 0;\n let allTargetIdentifiersCount = 0;\n let fileCount = 0;\n // Create onSave callback to handle chunked processing\n const onSave = async (\n chunkToSave: CsvFormattedIdentifier[],\n ): Promise<void> => {\n // Add to all identifiers\n allIdentifiersCount += chunkToSave.length;\n\n // Get unique request IDs from this chunk\n const requestIds = chunkToSave.map((d) => d.requestId as string);\n const uniqueRequestIds = uniq(requestIds);\n\n // Pull down target identifiers for this chunk\n const chunkedRequestIds = chunk(uniqueRequestIds, pageLimit);\n const results = await map(\n chunkedRequestIds,\n async (requestIds) => {\n logger.info(\n colors.magenta(\n `Fetching target identifiers for ${requestIds.length} requests`,\n ),\n );\n const results = await fetchRequestFilesForRequest(\n client,\n pageLimit * 2,\n {\n requestIds,\n dataSiloIds: [targetDataSiloId],\n },\n );\n return results.map(({ fileName, remoteId }) => {\n if (!remoteId) {\n throw new Error(`Failed to find remoteId for ${fileName}`);\n }\n return {\n RecordId: remoteId,\n Object: fileName\n .replace('.json', '')\n .split('/')\n .pop()\n ?.replace(' Information', ''),\n Comment:\n 'Customer data deletion request submitted via transcend.io',\n };\n });\n },\n // We are grabbing all the request files for the 'pageLimit' # of requests at a time\n {\n concurrency: 1,\n },\n );\n\n allTargetIdentifiersCount += results.flat().length;\n\n // Write the identifiers and target identifiers to CSV\n const headers = uniq(chunkToSave.map((d) => Object.keys(d)).flat());\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n const numberedFileNameTarget = `${baseNameTarget}-${fileCount}${extensionTarget}`;\n await writeLargeCsv(numberedFileName, chunkToSave, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunkToSave.length} identifiers to file \"${file}\"`,\n ),\n );\n\n const targetIdentifiers = results.flat();\n const headers2 = uniq(targetIdentifiers.map((d) => Object.keys(d)).flat());\n await writeLargeCsv(numberedFileNameTarget, targetIdentifiers, headers2);\n logger.info(\n colors.green(\n `Successfully wrote ${targetIdentifiers.length} identifiers to file \"${fileTarget}\"`,\n ),\n );\n\n logger.info(\n colors.blue(\n `Processed chunk of ${chunk.length} identifiers, found ${targetIdentifiers.length} target identifiers`,\n ),\n );\n fileCount += 1;\n };\n\n // Pull down outstanding identifiers using the new chunked function\n await pullChunkedCustomSiloOutstandingIdentifiers({\n dataSiloId: cronDataSiloId,\n auth,\n sombraAuth,\n actions,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n transcendUrl,\n skipRequestCount,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${allIdentifiersCount} identifiers to file \"${file}\"`,\n ),\n );\n logger.info(\n colors.green(\n `Successfully wrote ${allTargetIdentifiersCount} identifiers to file \"${fileTarget}\"`,\n ),\n );\n}\n"],"mappings":"+XA+BA,eAAsB,EAEpB,CACE,OACA,aACA,eACA,OACA,aACA,iBACA,mBACA,UACA,mBACA,YACA,aAEa,CACX,GACF,EAAA,EAAO,KACL,EAAA,QAAO,OACL,wEACD,CACF,EAID,OAAO,MAAM,EAAU,EACvB,GAAa,GACb,EAAY,IAAc,KAE1B,EAAA,EAAO,MACL,EAAA,QAAO,IACL,wBAAwB,EAAU,sDAAsD,EAAU,GACnG,CACF,CACD,KAAK,QAAQ,KAAK,EAAE,EAGtB,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAGtC,IAAM,EAASA,EAAAA,GAA4B,EAAc,EAAK,CACxD,CAAE,WAAU,aAAcC,EAAAA,EAAc,EAAK,CAC7C,CAAE,SAAU,EAAgB,UAAW,GAC3CA,EAAAA,EAAc,EAAW,CAEvB,EAAsB,EACtB,EAA4B,EAC5B,EAAY,EAmFhB,MAAMM,EAAAA,EAA4C,CAChD,WAAY,EACZ,OACA,aACA,UACA,YAAa,EACb,aAAc,EACd,OAxFa,KACb,IACkB,CAElB,GAAuB,EAAY,OAQnC,IAAM,EAAU,MAAML,EAAAA,GADIC,EAAAA,GAHDC,EAAAA,GADN,EAAY,IAAK,GAAM,EAAE,UAAoB,CACvB,CAGS,EAAU,CAG1D,KAAO,KACL,EAAA,EAAO,KACL,EAAA,QAAO,QACL,mCAAmC,EAAW,OAAO,WACtD,CACF,EACe,MAAMC,EAAAA,GACpB,EACA,EAAY,EACZ,CACE,aACA,YAAa,CAAC,EAAiB,CAChC,CACF,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scend-DuTZKIG8.cjs`);require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const n=require(`./uploadConsents-C9Pv8Awr.cjs`),r=require(`./done-input-validation-DGckEJ5a.cjs`);let i=require(`io-ts`);i=e.t(i);const a=i.intersection([i.type({userId:i.string,timestamp:i.string}),i.partial({confirmed:i.union([i.literal(`true`),i.literal(`false`)]),updated:i.union([i.literal(`true`),i.literal(`false`)]),prompted:i.union([i.literal(`true`),i.literal(`false`)]),metadata:i.string,usp:i.union([i.string,i.null]),gpp:i.union([i.string,i.null]),purposes:i.string})]);async function o({base64EncryptionKey:e,base64SigningKey:i,partition:o,file:s,consentUrl:c,concurrency:l}){r.t(this.process.exit),await n.r({base64EncryptionKey:e,base64SigningKey:i,preferences:t.oi(s,a),partition:o,concurrency:l,transcendUrl:c})}exports.uploadConsentPreferences=o;
|
|
2
|
+
//# sourceMappingURL=impl-DxhyqjcY.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-DxhyqjcY.cjs","names":["t","uploadConsents","readCsv"],"sources":["../src/lib/consent-manager/types.ts","../src/commands/consent/upload-consent-preferences/impl.ts"],"sourcesContent":["import * as t from 'io-ts';\n\nexport const ConsentPreferenceUpload = t.intersection([\n t.type({\n /** User ID */\n userId: t.string,\n /** Has the consent been updated (including no-change confirmation) since default resolution */\n timestamp: t.string,\n }),\n t.partial({\n /** Was tracking consent confirmed by the user? If this is false, the consent was resolved from defaults & is not yet confirmed */\n confirmed: t.union([t.literal('true'), t.literal('false')]),\n /**\n * Has the consent been updated (including no-change confirmation) since default resolution\n */\n updated: t.union([t.literal('true'), t.literal('false')]),\n /**\n * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)\n */\n prompted: t.union([t.literal('true'), t.literal('false')]),\n /** Consent metadata */\n metadata: t.string,\n /** US Privacy (USP) String */\n usp: t.union([t.string, t.null]),\n /** IAB GPP String */\n gpp: t.union([t.string, t.null]),\n /**\n * Purpose map\n * This is a stringified JSON object with keys as purpose names and values as booleans or 'Auto'\n */\n purposes: t.string,\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceUpload = t.TypeOf<typeof ConsentPreferenceUpload>;\n","import type { LocalContext } from '../../../context';\n\nimport { uploadConsents } from '../../../lib/consent-manager/uploadConsents';\nimport { ConsentPreferenceUpload } from '../../../lib/consent-manager/types';\nimport { readCsv } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadConsentPreferencesCommandFlags {\n base64EncryptionKey: string;\n base64SigningKey: string;\n partition: string;\n file: string;\n consentUrl: string;\n concurrency: number;\n}\n\nexport async function uploadConsentPreferences(\n this: LocalContext,\n {\n base64EncryptionKey,\n base64SigningKey,\n partition,\n file,\n consentUrl,\n concurrency,\n }: UploadConsentPreferencesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Load in preferences from csv\n const preferences = readCsv(file, ConsentPreferenceUpload);\n\n // Upload cookies\n await uploadConsents({\n base64EncryptionKey,\n base64SigningKey,\n preferences,\n partition,\n concurrency,\n transcendUrl: consentUrl,\n });\n}\n"],"mappings":"gYAEA,MAAa,EAA0BA,EAAE,aAAa,CACpDA,EAAE,KAAK,CAEL,OAAQA,EAAE,OAEV,UAAWA,EAAE,OACd,CAAC,CACFA,EAAE,QAAQ,CAER,UAAWA,EAAE,MAAM,CAACA,EAAE,QAAQ,OAAO,CAAEA,EAAE,QAAQ,QAAQ,CAAC,CAAC,CAI3D,QAASA,EAAE,MAAM,CAACA,EAAE,QAAQ,OAAO,CAAEA,EAAE,QAAQ,QAAQ,CAAC,CAAC,CAIzD,SAAUA,EAAE,MAAM,CAACA,EAAE,QAAQ,OAAO,CAAEA,EAAE,QAAQ,QAAQ,CAAC,CAAC,CAE1D,SAAUA,EAAE,OAEZ,IAAKA,EAAE,MAAM,CAACA,EAAE,OAAQA,EAAE,KAAK,CAAC,CAEhC,IAAKA,EAAE,MAAM,CAACA,EAAE,OAAQA,EAAE,KAAK,CAAC,CAKhC,SAAUA,EAAE,OACb,CAAC,CACH,CAAC,CChBF,eAAsB,EAEpB,CACE,sBACA,mBACA,YACA,OACA,aACA,eAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAMtC,MAAMC,EAAAA,EAAe,CACnB,sBACA,mBACA,YANkBC,EAAAA,GAAQ,EAAM,EAAwB,CAOxD,YACA,cACA,aAAc,EACf,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`./constants-wkuhlP8d.cjs`);const e=require(`./syncConfigurationToTranscend-DuTZKIG8.cjs`);require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,transcendUrl:r,enricherIds:i}){t.t(this.process.exit),await e.z({transcendUrl:r,auth:n,enricherIds:i})}exports.skipPreflightJobs=n;
|
|
2
|
+
//# sourceMappingURL=impl-Dzq0t6mX.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-Dzq0t6mX.cjs","names":["skipPreflightJobsHelper"],"sources":["../src/commands/request/skip-preflight-jobs/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { skipPreflightJobs as skipPreflightJobsHelper } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface SkipPreflightJobsCommandFlags {\n auth: string;\n enricherIds: string[];\n transcendUrl: string;\n}\n\nexport async function skipPreflightJobs(\n this: LocalContext,\n { auth, transcendUrl, enricherIds }: SkipPreflightJobsCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await skipPreflightJobsHelper({\n transcendUrl,\n auth,\n enricherIds,\n });\n}\n"],"mappings":"6QAUA,eAAsB,EAEpB,CAAE,OAAM,eAAc,eACP,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAwB,CAC5B,eACA,OACA,cACD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`./constants-wkuhlP8d.cjs`);const e=require(`./syncConfigurationToTranscend-DuTZKIG8.cjs`);require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,transcendUrl:r,identifierNames:i,actions:a=[]}){t.t(this.process.exit),await e.P({requestActions:a,transcendUrl:r,auth:n,identifierNames:i})}exports.rejectUnverifiedIdentifiers=n;
|
|
2
|
+
//# sourceMappingURL=impl-LgUGDTQK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-LgUGDTQK.cjs","names":["removeUnverifiedRequestIdentifiers"],"sources":["../src/commands/request/reject-unverified-identifiers/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { removeUnverifiedRequestIdentifiers } from '../../../lib/requests';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\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 {\n auth,\n transcendUrl,\n identifierNames,\n actions = [],\n }: 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":"6QAYA,eAAsB,EAEpB,CACE,OACA,eACA,kBACA,UAAU,EAAE,EAEC,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAmC,CACvC,eAAgB,EAChB,eACA,OACA,kBACD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-wkuhlP8d.cjs`),require(`./syncConfigurationToTranscend-DuTZKIG8.cjs`),require(`./enums-BZulhPFa.cjs`);const t=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const n=require(`./readTranscendYaml-Cycz6RxW.cjs`),r=require(`./consent-manager-CCyvzvY5.cjs`);require(`./uploadConsents-C9Pv8Awr.cjs`);const i=require(`./api-keys-Bb2BbZQe.cjs`),a=require(`./done-input-validation-DGckEJ5a.cjs`);let o=require(`node:fs`),s=require(`node:path`),c=require(`colors`);c=e.t(c);function l({consentManagerYmlFolder:e,output:l}){a.t(this.process.exit),(!(0,o.existsSync)(e)||!(0,o.lstatSync)(e).isDirectory())&&(t.t.error(c.default.red(`Folder does not exist: "${e}"`)),this.process.exit(1));let u=r.t(i.n(e).map(t=>{let{"consent-manager":r}=n.r((0,s.join)(e,t));return{name:t,input:r}}));n.a(l,{"business-entities":u}),t.t.info(c.default.green(`Successfully wrote ${u.length} business entities to file "${l}"`))}exports.consentManagersToBusinessEntities=l;
|
|
2
|
+
//# sourceMappingURL=impl-XyWPUpvw.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-XyWPUpvw.cjs","names":["consentManagersToBusinessEntitiesHelper","listFiles","readTranscendYaml"],"sources":["../src/commands/inventory/consent-managers-to-business-entities/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { listFiles } from '../../../lib/api-keys';\nimport { consentManagersToBusinessEntities as consentManagersToBusinessEntitiesHelper } from '../../../lib/consent-manager';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { join } from 'node:path';\n\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ConsentManagersToBusinessEntitiesCommandFlags {\n consentManagerYmlFolder: string;\n output: string;\n}\n\nexport function consentManagersToBusinessEntities(\n this: LocalContext,\n {\n consentManagerYmlFolder,\n output,\n }: ConsentManagersToBusinessEntitiesCommandFlags,\n): void {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(consentManagerYmlFolder) ||\n !lstatSync(consentManagerYmlFolder).isDirectory()\n ) {\n logger.error(\n colors.red(`Folder does not exist: \"${consentManagerYmlFolder}\"`),\n );\n this.process.exit(1);\n }\n\n // Read in each consent manager configuration\n const inputs = listFiles(consentManagerYmlFolder).map((directory) => {\n const { 'consent-manager': consentManager } = readTranscendYaml(\n join(consentManagerYmlFolder, directory),\n );\n return { name: directory, input: consentManager };\n });\n\n // Convert to business entities\n const businessEntities = consentManagersToBusinessEntitiesHelper(inputs);\n\n // write to disk\n writeTranscendYaml(output, {\n 'business-entities': businessEntities,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${businessEntities.length} business entities to file \"${output}\"`,\n ),\n );\n}\n"],"mappings":"ilBAmBA,SAAgB,EAEd,CACE,0BACA,UAEI,CACN,EAAA,EAAoB,KAAK,QAAQ,KAAK,EAIpC,EAAA,EAAA,EAAA,YAAY,EAAwB,EACpC,EAAA,EAAA,EAAA,WAAW,EAAwB,CAAC,aAAa,IAEjD,EAAA,EAAO,MACL,EAAA,QAAO,IAAI,2BAA2B,EAAwB,GAAG,CAClE,CACD,KAAK,QAAQ,KAAK,EAAE,EAYtB,IAAM,EAAmBA,EAAAA,EARVC,EAAAA,EAAU,EAAwB,CAAC,IAAK,GAAc,CACnE,GAAM,CAAE,kBAAmB,GAAmBC,EAAAA,GAAAA,EAAAA,EAAAA,MACvC,EAAyB,EAAU,CACzC,CACD,MAAO,CAAE,KAAM,EAAW,MAAO,EAAgB,EACjD,CAGsE,CAGxE,EAAA,EAAmB,EAAQ,CACzB,oBAAqB,EACtB,CAAC,CAEF,EAAA,EAAO,KACL,EAAA,QAAO,MACL,sBAAsB,EAAiB,OAAO,8BAA8B,EAAO,GACpF,CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./constants-wkuhlP8d.cjs`);require(`./syncConfigurationToTranscend-DuTZKIG8.cjs`),require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const n=require(`./api-keys-Bb2BbZQe.cjs`),r=require(`./done-input-validation-DGckEJ5a.cjs`);let i=require(`node:fs`);async function a({email:e,password:a,apiKeyTitle:o,file:s,scopes:c,deleteExistingApiKey:l,createNewApiKey:u,parentOrganizationId:d,transcendUrl:f}){r.t(this.process.exit);let{errors:p,apiKeys:m}=await n.i({transcendUrl:f,password:a,email:e,parentOrganizationId:d,deleteExistingApiKey:l,createNewApiKey:u,apiKeyTitle:o,scopes:c.map(e=>t.c[e].name)});(0,i.writeFileSync)(s,`${JSON.stringify(m,null,2)}\n`),p.length>0&&this.process.exit(1)}exports.generateApiKeys=a;
|
|
2
|
+
//# sourceMappingURL=impl-_QrpPIPw.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-_QrpPIPw.cjs","names":["generateCrossAccountApiKeys","SCOPES_BY_TITLE"],"sources":["../src/commands/admin/generate-api-keys/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { writeFileSync } from 'node:fs';\n\nimport { ScopeName } from '@transcend-io/privacy-types';\n\nimport { generateCrossAccountApiKeys } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { SCOPES_BY_TITLE } from '../../../constants';\n\n// Command flag interface\nexport interface GenerateApiKeysCommandFlags {\n email: string;\n password: string;\n apiKeyTitle: string;\n file: string;\n scopes: string[];\n deleteExistingApiKey: boolean;\n createNewApiKey: boolean;\n parentOrganizationId?: string;\n transcendUrl: string;\n}\n\n// Command implementation\nexport async function generateApiKeys(\n this: LocalContext,\n {\n email,\n password,\n apiKeyTitle,\n file,\n scopes,\n deleteExistingApiKey,\n createNewApiKey,\n parentOrganizationId,\n transcendUrl,\n }: GenerateApiKeysCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const scopeNames = scopes.map(\n (scopeTitle) => SCOPES_BY_TITLE[scopeTitle].name as ScopeName,\n );\n\n // Upload privacy requests\n const { errors, apiKeys } = await generateCrossAccountApiKeys({\n transcendUrl,\n password,\n email,\n parentOrganizationId,\n deleteExistingApiKey,\n createNewApiKey,\n apiKeyTitle,\n scopes: scopeNames,\n });\n\n // Write to disk\n writeFileSync(file, `${JSON.stringify(apiKeys, null, 2)}\\n`);\n if (errors.length > 0) {\n this.process.exit(1);\n }\n}\n"],"mappings":"8YAuBA,eAAsB,EAEpB,CACE,QACA,WACA,cACA,OACA,SACA,uBACA,kBACA,uBACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAOtC,GAAM,CAAE,SAAQ,WAAY,MAAMA,EAAAA,EAA4B,CAC5D,eACA,WACA,QACA,uBACA,uBACA,kBACA,cACA,OAbiB,EAAO,IACvB,GAAeC,EAAAA,EAAgB,GAAY,KAC7C,CAYA,CAAC,EAGF,EAAA,EAAA,eAAc,EAAM,GAAG,KAAK,UAAU,EAAS,KAAM,EAAE,CAAC,IAAI,CACxD,EAAO,OAAS,GAClB,KAAK,QAAQ,KAAK,EAAE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`./constants-wkuhlP8d.cjs`),require(`./syncConfigurationToTranscend-DuTZKIG8.cjs`),require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const e=require(`./consent-manager-CCyvzvY5.cjs`);require(`./uploadConsents-C9Pv8Awr.cjs`);const t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,trackerStatus:r,file:i,classifyService:a,transcendUrl:o}){t.t(this.process.exit),await e.s({auth:n,trackerStatus:r,file:i,classifyService:a,transcendUrl:o})}exports.uploadDataFlowsFromCsv=n;
|
|
2
|
+
//# sourceMappingURL=impl-kxwq3OMk.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-kxwq3OMk.cjs","names":["uploadDataFlowsFromCsvHelper"],"sources":["../src/commands/consent/upload-data-flows-from-csv/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { uploadDataFlowsFromCsv as uploadDataFlowsFromCsvHelper } from '../../../lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadDataFlowsFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n classifyService: boolean;\n transcendUrl: string;\n}\n\nexport async function uploadDataFlowsFromCsv(\n this: LocalContext,\n {\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n }: UploadDataFlowsFromCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await uploadDataFlowsFromCsvHelper({\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n });\n}\n"],"mappings":"iYAaA,eAAsB,EAEpB,CACE,OACA,gBACA,OACA,kBACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAA6B,CACjC,OACA,gBACA,OACA,kBACA,eACD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-wkuhlP8d.cjs`);const t=require(`./syncConfigurationToTranscend-DuTZKIG8.cjs`);require(`./enums-BZulhPFa.cjs`);const n=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const r=require(`./pooling-DA_LwUEp.cjs`),i=require(`./done-input-validation-DGckEJ5a.cjs`);let a=require(`node:fs`),o=require(`node:path`),s=require(`colors`);s=e.t(s);let c=require(`fast-csv`);c=e.t(c);let l=require(`node:events`),u=require(`node:fs/promises`),d=require(`node:stream/promises`),f=require(`node:stream`),p=require(`csv-parse`);function m(e,t){e||(n.t.error(s.default.red(`A --directory must be provided.`)),t.process.exit(1));let r=[];try{r=(0,a.readdirSync)(e).filter(e=>e.endsWith(`.csv`)).map(t=>(0,o.join)(e,t)).filter(e=>{try{return(0,a.statSync)(e).isFile()}catch{return!1}})}catch(r){n.t.error(s.default.red(`Failed to read directory: ${e}`)),n.t.error(s.default.red(r.message)),t.process.exit(1)}return r.length===0&&(n.t.error(s.default.red(`No CSV files found in directory: ${e}`)),t.process.exit(1)),n.t.info(s.default.green(`Found: ${r.join(`, `)} CSV files`)),r}function h(e,t){let n=(0,a.createWriteStream)(e),r=c.format({headers:t,writeHeaders:!0,objectMode:!0});return r.pipe(n),{async write(e){r.write(e)||await(0,l.once)(r,`drain`)},async end(){let e=Promise.all([(0,l.once)(n,`finish`)]);r.end(),await e}}}function g(e){return String(e).padStart(4,`0`)}function _(e){return Buffer.byteLength(Object.values(e).map(e=>e==null?``:String(e)).join(`,`),`utf8`)}async function v(e){let{filePath:t,outputDir:r,clearOutputDir:i,chunkSizeMB:c,onProgress:l,reportEveryMs:m=500}=e,{size:v}=await(0,u.stat)(t),y=0;n.t.info(s.default.magenta(`Chunking ${t} into ~${c}MB files...`));let b=Math.floor(c*1024*1024),x=(0,o.basename)(t,`.csv`),S=r||(0,o.dirname)(t);if(n.t.info(s.default.magenta(`Output directory: ${S}`)),await(0,u.mkdir)(S,{recursive:!0}),i){n.t.warn(s.default.yellow(`Clearing output directory: ${S}`));let e=await(0,u.readdir)(S);await Promise.all(e.filter(e=>e.startsWith(`${x}_chunk_`)&&e.endsWith(`.csv`)).map(e=>(0,u.unlink)((0,o.join)(S,e))))}let C=null,w=null,T=0,E=1,D=0,O=new p.Parser({columns:!1,skip_empty_lines:!0}),k=0,A=0,j=()=>{let e=A>0?k/A:0,t=e>0?Math.max(T,Math.ceil(v/e)):void 0;l(T,t),y=Date.now()};j();let M=null,N=()=>(0,o.join)(S,`${x}_chunk_${g(E)}.csv`),P=new f.Transform({objectMode:!0,async transform(e,t,r){try{if(!C){C=e.slice(0),w=C.length,M=h(N(),C),r();return}w!==null&&e.length!==w&&n.t.warn(s.default.yellow(`Row has ${e.length} cols; expected ${w}`)),T+=1,T%25e4==0&&l(T);let t=Object.fromEntries(C.map((t,n)=>[t,e[n]])),i=_(t);k+=i,A+=1,Date.now()-y>=m&&j(),M&&D>0&&D+i>b&&(await M.end(),E+=1,D=0,n.t.info(s.default.green(`Rolling to chunk ${E} after ${T.toLocaleString()} rows.`)),M=h(N(),C)),M||=h(N(),C),await M.write(t),D+=i,r()}catch(e){r(e)}},async flush(e){try{M&&=(await M.end(),null),j(),e()}catch(t){e(t)}}});await(0,d.pipeline)((0,a.createReadStream)(t),O,P),l(T),n.t.info(s.default.green(`Chunked ${t} into ${E} file(s); processed ${T.toLocaleString()} rows.`))}async function y(){let e=Number(process.env.WORKER_ID||`0`);n.t.info(`[w${e}] ready pid=${process.pid}`),process.send?.({type:`ready`}),process.on(`message`,async r=>{if(!r||typeof r!=`object`||(r.type===`shutdown`&&process.exit(0),r.type!==`task`))return;let{filePath:i,options:a}=r.payload,{outputDir:o,clearOutputDir:s,chunkSizeMB:c}=a;try{await v({filePath:i,outputDir:o,clearOutputDir:s,chunkSizeMB:c,onProgress:(e,t)=>process.send?.({type:`progress`,payload:{filePath:i,processed:e,total:t}})}),process.send?.({type:`result`,payload:{ok:!0,filePath:i}})}catch(r){let a=t.O(r);n.t.error(`[w${e}] ERROR ${i}: ${a}`),process.send?.({type:`result`,payload:{ok:!1,filePath:i,error:a}})}}),await new Promise(()=>{})}function b(e){return r.r(e)}function x(e){return r.i(e)}const S={renderHeader:b,renderWorkers:x};function C(){return typeof __filename<`u`?__filename:process.argv[1]}async function w(e){i.t(this.process.exit);let{directory:t,outputDir:a,clearOutputDir:o,chunkSizeMB:c,concurrency:l,viewerMode:u}=e,d=m(t,this),{poolSize:f,cpuCount:p}=r.s(l,d.length);n.t.info(s.default.green(`Chunking ${d.length} CSV file(s) with pool size ${f} (CPU=${p})`));let h=d.map(e=>({filePath:e,options:{outputDir:a,clearOutputDir:o,chunkSizeMB:c}}));await r.n({title:`Chunk CSV - ${t}`,baseDir:t||a||process.cwd(),childFlag:r.o,childModulePath:C(),poolSize:f,cpuCount:p,filesTotal:d.length,hooks:{nextTask:()=>h.shift(),taskLabel:e=>e.filePath,initTotals:()=>({}),initSlotProgress:()=>void 0,onProgress:e=>e,onResult:(e,t)=>({totals:e,ok:!!t.ok}),postProcess:async()=>{}},viewerMode:u,render:e=>r.a(e,S,u),extraKeyHandler:({logsBySlot:e,repaint:t,setPaused:n})=>r.t({logsBySlot:e,repaint:t,setPaused:n})})}process.argv.includes(r.o)&&y().catch(e=>{n.t.error(e),process.exit(1)}),exports.chunkCsv=w;
|
|
2
|
+
//# sourceMappingURL=impl-u8o3S8w2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-SkiG9sWb.cjs","names":["fastcsv","Parser","Transform","extractErrorMessage","makeHeader","makeWorkerRows","computePoolSize","runPool","CHILD_FLAG","dashboardPlugin","createExtraKeyHandler"],"sources":["../src/lib/helpers/collectCsvFilesOrExit.ts","../src/lib/helpers/chunkOneCsvFile.ts","../src/commands/admin/chunk-csv/worker.ts","../src/commands/admin/chunk-csv/ui/plugin.ts","../src/commands/admin/chunk-csv/impl.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { readdirSync, statSync } from 'node:fs';\nimport colors from 'colors';\nimport { logger } from '../../logger';\nimport type { LocalContext } from '../../context';\n\n/**\n * Validate flags and collect CSV file paths from a directory.\n * On validation error, the provided `exit` function is called.\n *\n * @param directory - the directory containing CSV files\n * @param localContext - the context of the command, used for logging and exit\n * @returns an array of valid CSV file paths\n */\nexport function collectCsvFilesOrExit(\n directory: string | undefined,\n localContext: LocalContext,\n): string[] {\n if (!directory) {\n logger.error(colors.red('A --directory must be provided.'));\n localContext.process.exit(1);\n }\n\n let files: string[] = [];\n try {\n const entries = readdirSync(directory);\n files = entries\n .filter((f) => f.endsWith('.csv'))\n .map((f) => join(directory, f))\n .filter((p) => {\n try {\n return statSync(p).isFile();\n } catch {\n return false;\n }\n });\n } catch (err) {\n logger.error(colors.red(`Failed to read directory: ${directory}`));\n logger.error(colors.red((err as Error).message));\n localContext.process.exit(1);\n }\n\n if (files.length === 0) {\n logger.error(colors.red(`No CSV files found in directory: ${directory}`));\n localContext.process.exit(1);\n }\n logger.info(colors.green(`Found: ${files.join(', ')} CSV files`));\n return files;\n}\n","import { createReadStream, createWriteStream } from 'node:fs';\nimport { mkdir, readdir, unlink, stat } from 'node:fs/promises';\nimport { pipeline } from 'node:stream/promises';\nimport { Transform } from 'node:stream';\nimport { once } from 'node:events';\nimport { Parser } from 'csv-parse';\nimport { basename, dirname, join } from 'node:path';\nimport colors from 'colors';\nimport * as fastcsv from 'fast-csv';\nimport { logger } from '../../logger';\n\n/**\n * Options for chunking a single CSV file\n */\nexport type ChunkOpts = {\n /** Path to the CSV file to chunk */\n filePath: string;\n /** Output directory for chunk files; defaults to the same directory as the input file */\n outputDir?: string;\n /** Clear output directory before starting */\n clearOutputDir: boolean;\n /** Chunk size in MB */\n chunkSizeMB: number;\n /** Optional report interval in milliseconds for progress updates */\n reportEveryMs?: number;\n /** Callback for progress updates */\n onProgress: (processed: number, total?: number) => void;\n};\n\n/**\n * Create a CSV writer (fast-csv formatter piped to a write stream) that writes\n * a header line first, and then accepts object rows. Returns a tiny API to\n * write rows with backpressure handling and to close the file cleanly.\n *\n * @param filePath - The path to the output CSV file\n * @param headers - The headers for the CSV file\n * @returns An object with `write` and `end` methods\n */\nfunction createCsvChunkWriter(\n filePath: string,\n headers: string[],\n): {\n /** Write a row object to the CSV file */\n write: (row: Record<string, unknown>) => Promise<void>;\n /** Close the CSV file, ensuring all data is flushed */\n end: () => Promise<void>;\n} {\n const ws = createWriteStream(filePath);\n const csv = fastcsv.format({ headers, writeHeaders: true, objectMode: true });\n // Pipe csv → file stream\n csv.pipe(ws);\n\n return {\n /**\n * Write a row object to the CSV file.\n *\n * @param row - The row data as an object\n */\n async write(row) {\n // Respect backpressure from fast-csv formatter\n const ok = csv.write(row);\n if (!ok) {\n await once(csv, 'drain');\n }\n },\n /**\n * Close the CSV file, ensuring all data is flushed.\n */\n async end() {\n // End formatter; wait for underlying file stream to finish flush/close\n const finished = Promise.all([once(ws, 'finish')]);\n csv.end();\n await finished;\n },\n };\n}\n\n/**\n * Zero-pad chunk numbers to four digits (e.g., 1 → \"0001\").\n *\n * @param n - The chunk number to pad\n * @returns The padded chunk number as a string\n */\nfunction pad4(n: number): string {\n return String(n).padStart(4, '0');\n}\n\n/**\n * Approximate row size in bytes using comma-joined field values.\n *\n * @param obj - The row object to estimate size for\n * @returns Approximate byte size of the row when serialized as CSV\n */\nfunction approxRowBytes(obj: Record<string, unknown>): number {\n // naive but fast; adequate for chunk rollover thresholding\n return Buffer.byteLength(\n Object.values(obj)\n .map((v) => (v == null ? '' : String(v)))\n .join(','),\n 'utf8',\n );\n}\n\n/**\n * Stream a single CSV file and write chunk files of roughly chunkSizeMB.\n * - Writes header to each chunk.\n * - Logs periodic progress via onProgress.\n *\n * @param opts - Options for chunking the file\n * @returns Promise that resolves when done\n */\nexport async function chunkOneCsvFile(opts: ChunkOpts): Promise<void> {\n const {\n filePath,\n outputDir,\n clearOutputDir,\n chunkSizeMB,\n onProgress,\n reportEveryMs = 500,\n } = opts;\n const { size: fileBytes } = await stat(filePath); // total bytes on disk\n let lastTick = 0;\n\n logger.info(\n colors.magenta(`Chunking ${filePath} into ~${chunkSizeMB}MB files...`),\n );\n\n const chunkSizeBytes = Math.floor(chunkSizeMB * 1024 * 1024);\n const baseName = basename(filePath, '.csv');\n const outDir = outputDir || dirname(filePath);\n logger.info(colors.magenta(`Output directory: ${outDir}`));\n await mkdir(outDir, { recursive: true });\n\n // Clear previous chunk files for this base\n if (clearOutputDir) {\n logger.warn(colors.yellow(`Clearing output directory: ${outDir}`));\n const files = await readdir(outDir);\n await Promise.all(\n files\n .filter((f) => f.startsWith(`${baseName}_chunk_`) && f.endsWith('.csv'))\n .map((f) => unlink(join(outDir, f))),\n );\n }\n\n let headerRow: string[] | null = null;\n let expectedCols: number | null = null;\n let totalLines = 0;\n let currentChunk = 1;\n let currentSize = 0;\n\n const parser = new Parser({\n columns: false,\n skip_empty_lines: true,\n });\n\n // running sample to estimate avg row bytes\n let sampleBytes = 0;\n let sampleRows = 0;\n\n const emit = (): void => {\n const avg = sampleRows > 0 ? sampleBytes / sampleRows : 0;\n const estTotal =\n avg > 0 ? Math.max(totalLines, Math.ceil(fileBytes / avg)) : undefined;\n onProgress(totalLines, estTotal); // <-- now has total\n lastTick = Date.now();\n };\n\n // seed an initial 0/N as soon as we start\n emit();\n\n // Current active chunk writer; created after we know headers\n let writer: {\n /** Write a row object to the current chunk file */\n write: (row: Record<string, unknown>) => Promise<void>;\n /** Close the current chunk file */\n end: () => Promise<void>;\n } | null = null;\n\n // Returns current chunk file path — chunk number is always 4-digit padded\n const currentChunkPath = (): string =>\n join(outDir, `${baseName}_chunk_${pad4(currentChunk)}.csv`);\n\n const t = new Transform({\n objectMode: true,\n /**\n * Transform each row of the CSV file into a chunk.\n *\n * @param row - The current row being processed\n * @param _enc - Encoding (not used)\n * @param cb - Callback to signal completion or error\n */\n async transform(row: string[], _enc, cb) {\n try {\n // First row is the header\n if (!headerRow) {\n headerRow = row.slice(0);\n expectedCols = headerRow.length;\n\n // Open first chunk with header asynchronously\n writer = createCsvChunkWriter(currentChunkPath(), headerRow);\n cb();\n return;\n }\n\n // sanity check rows (non-fatal)\n if (expectedCols !== null && row.length !== expectedCols) {\n // optionally log a warning or collect metrics\n logger.warn(\n colors.yellow(\n `Row has ${row.length} cols; expected ${expectedCols}`,\n ),\n );\n }\n\n totalLines += 1;\n if (totalLines % 250_000 === 0) {\n onProgress(totalLines);\n }\n\n // Build row object using the original header\n const obj = Object.fromEntries(headerRow!.map((h, i) => [h, row[i]]));\n\n // Determine the row size up-front\n const rowBytes = approxRowBytes(obj);\n sampleBytes += rowBytes;\n sampleRows += 1;\n\n // time-based throttle for UI updates\n if (Date.now() - lastTick >= reportEveryMs) emit();\n\n // If adding this row would exceed the threshold, roll first,\n // so this row becomes the first row in the next chunk.\n if (\n writer &&\n currentSize > 0 &&\n currentSize + rowBytes > chunkSizeBytes\n ) {\n await writer.end();\n currentChunk += 1;\n currentSize = 0;\n logger.info(\n colors.green(\n `Rolling to chunk ${currentChunk} after ${totalLines.toLocaleString()} rows.`,\n ),\n );\n writer = createCsvChunkWriter(currentChunkPath(), headerRow!);\n }\n\n // Ensure writer exists (should after header)\n if (!writer) {\n writer = createCsvChunkWriter(currentChunkPath(), headerRow!);\n }\n\n // Write row and update approximate size\n await writer.write(obj);\n currentSize += rowBytes;\n\n cb();\n } catch (e) {\n cb(e as Error);\n }\n },\n\n // Ensure final file is closed\n /**\n * Flush is called when the readable has ended; we close any open writer.\n *\n * @param cb - Callback to signal completion or error\n */\n async flush(cb) {\n try {\n if (writer) {\n await writer.end();\n writer = null;\n }\n emit(); // Final progress tick\n cb();\n } catch (e) {\n cb(e as Error);\n }\n },\n });\n\n const rs = createReadStream(filePath);\n await pipeline(rs, parser, t);\n\n // Final progress tick\n onProgress(totalLines);\n logger.info(\n colors.green(\n `Chunked ${filePath} into ${currentChunk} file(s); processed ${totalLines.toLocaleString()} rows.`,\n ),\n );\n}\n","import { extractErrorMessage } from '../../../lib/helpers';\nimport { chunkOneCsvFile } from '../../../lib/helpers/chunkOneCsvFile';\nimport type { ToWorker } from '../../../lib/pooling';\nimport { logger } from '../../../logger';\n\n/**\n * A unit of work: instructs a worker to chunk a single CSV file.\n */\nexport type ChunkTask = {\n /** Absolute path of the CSV file to chunk. */\n filePath: string;\n /** Options controlling output and chunk size. */\n options: {\n /** Optional directory where chunked output files should be written. */\n outputDir?: string;\n /** Whether to clear any pre-existing output chunks before writing new ones. */\n clearOutputDir: boolean;\n /** Approximate target chunk size in MB (well under Node’s string size limits). */\n chunkSizeMB: number;\n };\n};\n\n/**\n * Per-worker progress snapshot for the chunk-csv command.\n */\nexport type ChunkProgress = {\n /** File being processed by the worker. */\n filePath: string;\n /** Number of rows processed so far. */\n processed: number;\n /** Optional total rows in the file (not always known). */\n total?: number;\n};\n\n/**\n * Worker result message once a file has finished processing.\n */\nexport type ChunkResult = {\n /** Whether the file completed successfully. */\n ok: boolean;\n /** File path for which this result applies. */\n filePath: string;\n /** Optional error message if the file failed to chunk. */\n error?: string;\n};\n\n/**\n * Worker entrypoint.\n *\n * Lifecycle:\n * 1) Announce readiness to the parent via `{ type: 'ready' }`.\n * 2) Wait for `{ type: 'task' }` messages; for each, call `chunkOneCsvFile(...)`.\n * - While chunking, forward progress to the parent via `{ type: 'progress' }`.\n * - On completion, send `{ type: 'result', ok: true }`.\n * - On error, send `{ type: 'result', ok: false, error }` and exit(1).\n * 3) On `{ type: 'shutdown' }`, exit(0) gracefully.\n *\n * Notes:\n * - This process is typically spawned by a pool manager that assigns file paths to workers.\n * - The long-lived promise at the end keeps the worker alive between tasks until the parent\n * sends an explicit shutdown.\n */\nexport async function runChild(): Promise<void> {\n const workerId = Number(process.env.WORKER_ID || '0');\n logger.info(`[w${workerId}] ready pid=${process.pid}`);\n\n // Notify the parent that the worker is ready to receive tasks.\n process.send?.({ type: 'ready' });\n\n // Main message loop: receive tasks and shutdown requests from the parent.\n process.on('message', async (msg: ToWorker<ChunkTask>) => {\n if (!msg || typeof msg !== 'object') return;\n\n // Graceful shutdown: let the parent control lifecycle.\n if (msg.type === 'shutdown') {\n process.exit(0);\n }\n\n // Only handle task messages here.\n if (msg.type !== 'task') return;\n\n const { filePath, options } = msg.payload;\n const { outputDir, clearOutputDir, chunkSizeMB } = options;\n\n try {\n // Stream the input CSV and write chunk files asynchronously.\n await chunkOneCsvFile({\n filePath,\n outputDir,\n clearOutputDir,\n chunkSizeMB,\n // Propagate incremental progress to the parent.\n onProgress: (processed, total) =>\n process.send?.({\n type: 'progress',\n payload: { filePath, processed, total },\n }),\n });\n\n // Report success to the parent.\n process.send?.({\n type: 'result',\n payload: { ok: true, filePath },\n });\n } catch (err) {\n // Log locally and report failure upstream; exit the worker with error code.\n const message = extractErrorMessage(err);\n logger.error(`[w${workerId}] ERROR ${filePath}: ${message}`);\n process.send?.({\n type: 'result',\n payload: { ok: false, filePath, error: message },\n });\n }\n });\n\n // keep alive\n await new Promise<never>(() => {\n // This promise never resolves, keeping the worker alive indefinitely\n // until the parent process instructs shutdown.\n });\n}\n","import {\n makeHeader,\n makeWorkerRows,\n type ChunkSlotProgress,\n type CommonCtx,\n type DashboardPlugin,\n} from '../../../../lib/pooling';\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>(\n ctx: CommonCtx<TTotals, ChunkSlotProgress>,\n): 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>(\n ctx: CommonCtx<TTotals, ChunkSlotProgress>,\n): string[] {\n return makeWorkerRows(ctx);\n}\n\nexport const chunkCsvPlugin: DashboardPlugin<unknown, ChunkSlotProgress> = {\n renderHeader,\n renderWorkers,\n // no extras\n};\n","import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { collectCsvFilesOrExit } from '../../../lib/helpers/collectCsvFilesOrExit';\nimport {\n computePoolSize,\n createExtraKeyHandler,\n CHILD_FLAG,\n type PoolHooks,\n runPool,\n dashboardPlugin,\n} from '../../../lib/pooling';\nimport {\n runChild,\n type ChunkProgress,\n type ChunkResult,\n type ChunkTask,\n} from './worker';\nimport { chunkCsvPlugin } from './ui';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Returns the current module's path so the worker pool knows what file to re-exec.\n * In Node ESM, __filename is undefined, so we fall back to argv[1].\n *\n * @returns The current module's path as a string\n */\nfunction getCurrentModulePath(): string {\n if (typeof __filename !== 'undefined') {\n return __filename as unknown as string;\n }\n return process.argv[1];\n}\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(\n this: LocalContext,\n flags: ChunkCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const {\n directory,\n outputDir,\n clearOutputDir,\n chunkSizeMB,\n concurrency,\n viewerMode,\n } = 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: getCurrentModulePath(),\n poolSize,\n cpuCount,\n filesTotal: files.length,\n hooks,\n viewerMode,\n render: (input) => dashboardPlugin(input, chunkCsvPlugin, viewerMode),\n extraKeyHandler: ({ logsBySlot, repaint, setPaused }) =>\n createExtraKeyHandler({\n logsBySlot,\n repaint,\n setPaused,\n }),\n });\n}\n\n/* -------------------------------------------------------------------------------------------------\n * If invoked directly as a child process, enter worker loop\n * ------------------------------------------------------------------------------------------------- */\nif (process.argv.includes(CHILD_FLAG)) {\n runChild().catch((err) => {\n logger.error(err);\n process.exit(1);\n });\n}\n"],"mappings":"wjBAcA,SAAgB,EACd,EACA,EACU,CACL,IACH,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,kCAAkC,CAAC,CAC3D,EAAa,QAAQ,KAAK,EAAE,EAG9B,IAAI,EAAkB,EAAE,CACxB,GAAI,CAEF,GAAA,EAAA,EAAA,aAD4B,EAAU,CAEnC,OAAQ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,EAAW,KAAK,CAG9C,CAAE,WAAU,YAAaC,EAAAA,EAAgB,EAAa,EAAM,OAAO,CAEzE,EAAA,EAAO,KACL,EAAA,QAAO,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,MAAMC,EAAAA,EAAQ,CACZ,MAAO,eAAe,IACtB,QAAS,GAAa,GAAa,QAAQ,KAAK,CAChD,UAAWC,EAAAA,EACX,gBAAiB,GAAsB,CACvC,WACA,WACA,WAAY,EAAM,OAClB,MAtBsE,CACtE,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,GAG1B,CAYC,aACA,OAAS,GAAUC,EAAAA,EAAgB,EAAO,EAAgB,EAAW,CACrE,iBAAkB,CAAE,aAAY,UAAS,eACvCC,EAAAA,EAAsB,CACpB,aACA,UACA,YACD,CAAC,CACL,CAAC,CAMA,QAAQ,KAAK,SAASF,EAAAA,EAAW,EACnC,GAAU,CAAC,MAAO,GAAQ,CACxB,EAAA,EAAO,MAAM,EAAI,CACjB,QAAQ,KAAK,EAAE,EACf"}
|
|
1
|
+
{"version":3,"file":"impl-u8o3S8w2.cjs","names":["fastcsv","Parser","Transform","extractErrorMessage","makeHeader","makeWorkerRows","computePoolSize","runPool","CHILD_FLAG","dashboardPlugin","createExtraKeyHandler"],"sources":["../src/lib/helpers/collectCsvFilesOrExit.ts","../src/lib/helpers/chunkOneCsvFile.ts","../src/commands/admin/chunk-csv/worker.ts","../src/commands/admin/chunk-csv/ui/plugin.ts","../src/commands/admin/chunk-csv/impl.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { readdirSync, statSync } from 'node:fs';\nimport colors from 'colors';\nimport { logger } from '../../logger';\nimport type { LocalContext } from '../../context';\n\n/**\n * Validate flags and collect CSV file paths from a directory.\n * On validation error, the provided `exit` function is called.\n *\n * @param directory - the directory containing CSV files\n * @param localContext - the context of the command, used for logging and exit\n * @returns an array of valid CSV file paths\n */\nexport function collectCsvFilesOrExit(\n directory: string | undefined,\n localContext: LocalContext,\n): string[] {\n if (!directory) {\n logger.error(colors.red('A --directory must be provided.'));\n localContext.process.exit(1);\n }\n\n let files: string[] = [];\n try {\n const entries = readdirSync(directory);\n files = entries\n .filter((f) => f.endsWith('.csv'))\n .map((f) => join(directory, f))\n .filter((p) => {\n try {\n return statSync(p).isFile();\n } catch {\n return false;\n }\n });\n } catch (err) {\n logger.error(colors.red(`Failed to read directory: ${directory}`));\n logger.error(colors.red((err as Error).message));\n localContext.process.exit(1);\n }\n\n if (files.length === 0) {\n logger.error(colors.red(`No CSV files found in directory: ${directory}`));\n localContext.process.exit(1);\n }\n logger.info(colors.green(`Found: ${files.join(', ')} CSV files`));\n return files;\n}\n","import { createReadStream, createWriteStream } from 'node:fs';\nimport { mkdir, readdir, unlink, stat } from 'node:fs/promises';\nimport { pipeline } from 'node:stream/promises';\nimport { Transform } from 'node:stream';\nimport { once } from 'node:events';\nimport { Parser } from 'csv-parse';\nimport { basename, dirname, join } from 'node:path';\nimport colors from 'colors';\nimport * as fastcsv from 'fast-csv';\nimport { logger } from '../../logger';\n\n/**\n * Options for chunking a single CSV file\n */\nexport type ChunkOpts = {\n /** Path to the CSV file to chunk */\n filePath: string;\n /** Output directory for chunk files; defaults to the same directory as the input file */\n outputDir?: string;\n /** Clear output directory before starting */\n clearOutputDir: boolean;\n /** Chunk size in MB */\n chunkSizeMB: number;\n /** Optional report interval in milliseconds for progress updates */\n reportEveryMs?: number;\n /** Callback for progress updates */\n onProgress: (processed: number, total?: number) => void;\n};\n\n/**\n * Create a CSV writer (fast-csv formatter piped to a write stream) that writes\n * a header line first, and then accepts object rows. Returns a tiny API to\n * write rows with backpressure handling and to close the file cleanly.\n *\n * @param filePath - The path to the output CSV file\n * @param headers - The headers for the CSV file\n * @returns An object with `write` and `end` methods\n */\nfunction createCsvChunkWriter(\n filePath: string,\n headers: string[],\n): {\n /** Write a row object to the CSV file */\n write: (row: Record<string, unknown>) => Promise<void>;\n /** Close the CSV file, ensuring all data is flushed */\n end: () => Promise<void>;\n} {\n const ws = createWriteStream(filePath);\n const csv = fastcsv.format({ headers, writeHeaders: true, objectMode: true });\n // Pipe csv → file stream\n csv.pipe(ws);\n\n return {\n /**\n * Write a row object to the CSV file.\n *\n * @param row - The row data as an object\n */\n async write(row) {\n // Respect backpressure from fast-csv formatter\n const ok = csv.write(row);\n if (!ok) {\n await once(csv, 'drain');\n }\n },\n /**\n * Close the CSV file, ensuring all data is flushed.\n */\n async end() {\n // End formatter; wait for underlying file stream to finish flush/close\n const finished = Promise.all([once(ws, 'finish')]);\n csv.end();\n await finished;\n },\n };\n}\n\n/**\n * Zero-pad chunk numbers to four digits (e.g., 1 → \"0001\").\n *\n * @param n - The chunk number to pad\n * @returns The padded chunk number as a string\n */\nfunction pad4(n: number): string {\n return String(n).padStart(4, '0');\n}\n\n/**\n * Approximate row size in bytes using comma-joined field values.\n *\n * @param obj - The row object to estimate size for\n * @returns Approximate byte size of the row when serialized as CSV\n */\nfunction approxRowBytes(obj: Record<string, unknown>): number {\n // naive but fast; adequate for chunk rollover thresholding\n return Buffer.byteLength(\n Object.values(obj)\n .map((v) => (v == null ? '' : String(v)))\n .join(','),\n 'utf8',\n );\n}\n\n/**\n * Stream a single CSV file and write chunk files of roughly chunkSizeMB.\n * - Writes header to each chunk.\n * - Logs periodic progress via onProgress.\n *\n * @param opts - Options for chunking the file\n * @returns Promise that resolves when done\n */\nexport async function chunkOneCsvFile(opts: ChunkOpts): Promise<void> {\n const {\n filePath,\n outputDir,\n clearOutputDir,\n chunkSizeMB,\n onProgress,\n reportEveryMs = 500,\n } = opts;\n const { size: fileBytes } = await stat(filePath); // total bytes on disk\n let lastTick = 0;\n\n logger.info(\n colors.magenta(`Chunking ${filePath} into ~${chunkSizeMB}MB files...`),\n );\n\n const chunkSizeBytes = Math.floor(chunkSizeMB * 1024 * 1024);\n const baseName = basename(filePath, '.csv');\n const outDir = outputDir || dirname(filePath);\n logger.info(colors.magenta(`Output directory: ${outDir}`));\n await mkdir(outDir, { recursive: true });\n\n // Clear previous chunk files for this base\n if (clearOutputDir) {\n logger.warn(colors.yellow(`Clearing output directory: ${outDir}`));\n const files = await readdir(outDir);\n await Promise.all(\n files\n .filter((f) => f.startsWith(`${baseName}_chunk_`) && f.endsWith('.csv'))\n .map((f) => unlink(join(outDir, f))),\n );\n }\n\n let headerRow: string[] | null = null;\n let expectedCols: number | null = null;\n let totalLines = 0;\n let currentChunk = 1;\n let currentSize = 0;\n\n const parser = new Parser({\n columns: false,\n skip_empty_lines: true,\n });\n\n // running sample to estimate avg row bytes\n let sampleBytes = 0;\n let sampleRows = 0;\n\n const emit = (): void => {\n const avg = sampleRows > 0 ? sampleBytes / sampleRows : 0;\n const estTotal =\n avg > 0 ? Math.max(totalLines, Math.ceil(fileBytes / avg)) : undefined;\n onProgress(totalLines, estTotal); // <-- now has total\n lastTick = Date.now();\n };\n\n // seed an initial 0/N as soon as we start\n emit();\n\n // Current active chunk writer; created after we know headers\n let writer: {\n /** Write a row object to the current chunk file */\n write: (row: Record<string, unknown>) => Promise<void>;\n /** Close the current chunk file */\n end: () => Promise<void>;\n } | null = null;\n\n // Returns current chunk file path — chunk number is always 4-digit padded\n const currentChunkPath = (): string =>\n join(outDir, `${baseName}_chunk_${pad4(currentChunk)}.csv`);\n\n const t = new Transform({\n objectMode: true,\n /**\n * Transform each row of the CSV file into a chunk.\n *\n * @param row - The current row being processed\n * @param _enc - Encoding (not used)\n * @param cb - Callback to signal completion or error\n */\n async transform(row: string[], _enc, cb) {\n try {\n // First row is the header\n if (!headerRow) {\n headerRow = row.slice(0);\n expectedCols = headerRow.length;\n\n // Open first chunk with header asynchronously\n writer = createCsvChunkWriter(currentChunkPath(), headerRow);\n cb();\n return;\n }\n\n // sanity check rows (non-fatal)\n if (expectedCols !== null && row.length !== expectedCols) {\n // optionally log a warning or collect metrics\n logger.warn(\n colors.yellow(\n `Row has ${row.length} cols; expected ${expectedCols}`,\n ),\n );\n }\n\n totalLines += 1;\n if (totalLines % 250_000 === 0) {\n onProgress(totalLines);\n }\n\n // Build row object using the original header\n const obj = Object.fromEntries(headerRow!.map((h, i) => [h, row[i]]));\n\n // Determine the row size up-front\n const rowBytes = approxRowBytes(obj);\n sampleBytes += rowBytes;\n sampleRows += 1;\n\n // time-based throttle for UI updates\n if (Date.now() - lastTick >= reportEveryMs) emit();\n\n // If adding this row would exceed the threshold, roll first,\n // so this row becomes the first row in the next chunk.\n if (\n writer &&\n currentSize > 0 &&\n currentSize + rowBytes > chunkSizeBytes\n ) {\n await writer.end();\n currentChunk += 1;\n currentSize = 0;\n logger.info(\n colors.green(\n `Rolling to chunk ${currentChunk} after ${totalLines.toLocaleString()} rows.`,\n ),\n );\n writer = createCsvChunkWriter(currentChunkPath(), headerRow!);\n }\n\n // Ensure writer exists (should after header)\n if (!writer) {\n writer = createCsvChunkWriter(currentChunkPath(), headerRow!);\n }\n\n // Write row and update approximate size\n await writer.write(obj);\n currentSize += rowBytes;\n\n cb();\n } catch (e) {\n cb(e as Error);\n }\n },\n\n // Ensure final file is closed\n /**\n * Flush is called when the readable has ended; we close any open writer.\n *\n * @param cb - Callback to signal completion or error\n */\n async flush(cb) {\n try {\n if (writer) {\n await writer.end();\n writer = null;\n }\n emit(); // Final progress tick\n cb();\n } catch (e) {\n cb(e as Error);\n }\n },\n });\n\n const rs = createReadStream(filePath);\n await pipeline(rs, parser, t);\n\n // Final progress tick\n onProgress(totalLines);\n logger.info(\n colors.green(\n `Chunked ${filePath} into ${currentChunk} file(s); processed ${totalLines.toLocaleString()} rows.`,\n ),\n );\n}\n","import { extractErrorMessage } from '../../../lib/helpers';\nimport { chunkOneCsvFile } from '../../../lib/helpers/chunkOneCsvFile';\nimport type { ToWorker } from '../../../lib/pooling';\nimport { logger } from '../../../logger';\n\n/**\n * A unit of work: instructs a worker to chunk a single CSV file.\n */\nexport type ChunkTask = {\n /** Absolute path of the CSV file to chunk. */\n filePath: string;\n /** Options controlling output and chunk size. */\n options: {\n /** Optional directory where chunked output files should be written. */\n outputDir?: string;\n /** Whether to clear any pre-existing output chunks before writing new ones. */\n clearOutputDir: boolean;\n /** Approximate target chunk size in MB (well under Node’s string size limits). */\n chunkSizeMB: number;\n };\n};\n\n/**\n * Per-worker progress snapshot for the chunk-csv command.\n */\nexport type ChunkProgress = {\n /** File being processed by the worker. */\n filePath: string;\n /** Number of rows processed so far. */\n processed: number;\n /** Optional total rows in the file (not always known). */\n total?: number;\n};\n\n/**\n * Worker result message once a file has finished processing.\n */\nexport type ChunkResult = {\n /** Whether the file completed successfully. */\n ok: boolean;\n /** File path for which this result applies. */\n filePath: string;\n /** Optional error message if the file failed to chunk. */\n error?: string;\n};\n\n/**\n * Worker entrypoint.\n *\n * Lifecycle:\n * 1) Announce readiness to the parent via `{ type: 'ready' }`.\n * 2) Wait for `{ type: 'task' }` messages; for each, call `chunkOneCsvFile(...)`.\n * - While chunking, forward progress to the parent via `{ type: 'progress' }`.\n * - On completion, send `{ type: 'result', ok: true }`.\n * - On error, send `{ type: 'result', ok: false, error }` and exit(1).\n * 3) On `{ type: 'shutdown' }`, exit(0) gracefully.\n *\n * Notes:\n * - This process is typically spawned by a pool manager that assigns file paths to workers.\n * - The long-lived promise at the end keeps the worker alive between tasks until the parent\n * sends an explicit shutdown.\n */\nexport async function runChild(): Promise<void> {\n const workerId = Number(process.env.WORKER_ID || '0');\n logger.info(`[w${workerId}] ready pid=${process.pid}`);\n\n // Notify the parent that the worker is ready to receive tasks.\n process.send?.({ type: 'ready' });\n\n // Main message loop: receive tasks and shutdown requests from the parent.\n process.on('message', async (msg: ToWorker<ChunkTask>) => {\n if (!msg || typeof msg !== 'object') return;\n\n // Graceful shutdown: let the parent control lifecycle.\n if (msg.type === 'shutdown') {\n process.exit(0);\n }\n\n // Only handle task messages here.\n if (msg.type !== 'task') return;\n\n const { filePath, options } = msg.payload;\n const { outputDir, clearOutputDir, chunkSizeMB } = options;\n\n try {\n // Stream the input CSV and write chunk files asynchronously.\n await chunkOneCsvFile({\n filePath,\n outputDir,\n clearOutputDir,\n chunkSizeMB,\n // Propagate incremental progress to the parent.\n onProgress: (processed, total) =>\n process.send?.({\n type: 'progress',\n payload: { filePath, processed, total },\n }),\n });\n\n // Report success to the parent.\n process.send?.({\n type: 'result',\n payload: { ok: true, filePath },\n });\n } catch (err) {\n // Log locally and report failure upstream; exit the worker with error code.\n const message = extractErrorMessage(err);\n logger.error(`[w${workerId}] ERROR ${filePath}: ${message}`);\n process.send?.({\n type: 'result',\n payload: { ok: false, filePath, error: message },\n });\n }\n });\n\n // keep alive\n await new Promise<never>(() => {\n // This promise never resolves, keeping the worker alive indefinitely\n // until the parent process instructs shutdown.\n });\n}\n","import {\n makeHeader,\n makeWorkerRows,\n type ChunkSlotProgress,\n type CommonCtx,\n type DashboardPlugin,\n} from '../../../../lib/pooling';\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>(\n ctx: CommonCtx<TTotals, ChunkSlotProgress>,\n): 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>(\n ctx: CommonCtx<TTotals, ChunkSlotProgress>,\n): string[] {\n return makeWorkerRows(ctx);\n}\n\nexport const chunkCsvPlugin: DashboardPlugin<unknown, ChunkSlotProgress> = {\n renderHeader,\n renderWorkers,\n // no extras\n};\n","import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { collectCsvFilesOrExit } from '../../../lib/helpers/collectCsvFilesOrExit';\nimport {\n computePoolSize,\n createExtraKeyHandler,\n CHILD_FLAG,\n type PoolHooks,\n runPool,\n dashboardPlugin,\n} from '../../../lib/pooling';\nimport {\n runChild,\n type ChunkProgress,\n type ChunkResult,\n type ChunkTask,\n} from './worker';\nimport { chunkCsvPlugin } from './ui';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Returns the current module's path so the worker pool knows what file to re-exec.\n * In Node ESM, __filename is undefined, so we fall back to argv[1].\n *\n * @returns The current module's path as a string\n */\nfunction getCurrentModulePath(): string {\n if (typeof __filename !== 'undefined') {\n return __filename as unknown as string;\n }\n return process.argv[1];\n}\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(\n this: LocalContext,\n flags: ChunkCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const {\n directory,\n outputDir,\n clearOutputDir,\n chunkSizeMB,\n concurrency,\n viewerMode,\n } = 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: getCurrentModulePath(),\n poolSize,\n cpuCount,\n filesTotal: files.length,\n hooks,\n viewerMode,\n render: (input) => dashboardPlugin(input, chunkCsvPlugin, viewerMode),\n extraKeyHandler: ({ logsBySlot, repaint, setPaused }) =>\n createExtraKeyHandler({\n logsBySlot,\n repaint,\n setPaused,\n }),\n });\n}\n\n/* -------------------------------------------------------------------------------------------------\n * If invoked directly as a child process, enter worker loop\n * ------------------------------------------------------------------------------------------------- */\nif (process.argv.includes(CHILD_FLAG)) {\n runChild().catch((err) => {\n logger.error(err);\n process.exit(1);\n });\n}\n"],"mappings":"8lBAcA,SAAgB,EACd,EACA,EACU,CACL,IACH,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,kCAAkC,CAAC,CAC3D,EAAa,QAAQ,KAAK,EAAE,EAG9B,IAAI,EAAkB,EAAE,CACxB,GAAI,CAEF,GAAA,EAAA,EAAA,aAD4B,EAAU,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AAQ,EAAsB,EAAW,KAAK,CAG9C,CAAE,WAAU,YAAaC,EAAAA,EAAgB,EAAa,EAAM,OAAO,CAEzE,EAAA,EAAO,KACL,EAAA,QAAO,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,MAAMC,EAAAA,EAAQ,CACZ,MAAO,eAAe,IACtB,QAAS,GAAa,GAAa,QAAQ,KAAK,CAChD,UAAWC,EAAAA,EACX,gBAAiB,GAAsB,CACvC,WACA,WACA,WAAY,EAAM,OAClB,MAtBsE,CACtE,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,GAG1B,CAYC,aACA,OAAS,GAAUC,EAAAA,EAAgB,EAAO,EAAgB,EAAW,CACrE,iBAAkB,CAAE,aAAY,UAAS,eACvCC,EAAAA,EAAsB,CACpB,aACA,UACA,YACD,CAAC,CACL,CAAC,CAMA,QAAQ,KAAK,SAASF,EAAAA,EAAW,EACnC,GAAU,CAAC,MAAO,GAAQ,CACxB,EAAA,EAAO,MAAM,EAAI,CACjB,QAAQ,KAAK,EAAE,EACf"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const e=require(`./
|
|
2
|
-
`)[0],s=(0,
|
|
3
|
-
`)[0];if(!o||!s)throw Error(`FAILED TO FIND COMMIT RANGE`);let c=n.js((0,
|
|
4
|
-
`).filter(e=>e),a),l=i.length>0?g.default.sync(c,{ignore:i}):c,u={};return l.forEach(e=>{u[e]=(0,_.execSync)(`git show ${s}:${e}`,{encoding:`utf-8`})}),{changedFiles:c,fileDiffs:u,repoName:r.split(`/`).pop().split(`.`)[0],commit:s}}exports.ACTIONS=n.ra,exports.ADD_MESSAGES_TO_PROMPT_RUN=n.Ga,exports.ADD_SILO_DISCOVERY_RESULTS=n.Wo,exports.ADMIN_DASH=t.t,exports.ADMIN_DASH_DATAPOINTS=t.n,exports.ADMIN_DASH_INTEGRATIONS=t.r,exports.AGENTS=n.Ui,exports.AGENT_FILES=n.Bi,exports.AGENT_FUNCTIONS=n.Li,exports.API_KEYS=n.qo,exports.APPROVE_PRIVACY_REQUEST=n.Eo,exports.ASSESSMENTS=n.vo,exports.ASSESSMENT_SECTION_FIELDS=n.yo,exports.ASSESSMENT_TEMPLATES=n.ho,exports.ASSUME_ROLE=n.qi,exports.ATTRIBUTES=n.Pa,exports.ATTRIBUTE_KEYS_REQUESTS=n.Bo,exports.ATTRIBUTE_VALUES=n.Fa,exports.ActionInput=i.t,exports.ActionItemCollectionInput=i.n,exports.ActionItemInput=i.r,exports.AgentFileInput=i.i,exports.AgentFunctionInput=i.a,exports.AgentInput=i.o,exports.ApiKeyInput=i.s,exports.AssessmentAction=n.Nn,exports.AssessmentAnswerOptionInput=i.c,exports.AssessmentDisplayLogicInput=i.l,exports.AssessmentInput=i.u,exports.AssessmentNestedRule=n.Pn,exports.AssessmentNestedRuleInput=i.d,exports.AssessmentResourceInput=i.f,exports.AssessmentRetentionScheduleInput=i.p,exports.AssessmentRiskLogic=n.jn,exports.AssessmentRule=n.Fn,exports.AssessmentRuleInput=i.m,exports.AssessmentRuleWithOperands=n.In,exports.AssessmentRuleWithoutOperands=n.Ln,exports.AssessmentSectionInput=i.h,exports.AssessmentSectionQuestionInput=i.g,exports.AssessmentTemplateInput=i._,exports.AttestedExtraIdentifiers=n.rt,exports.AttributeInput=i.v,exports.AttributePreview=i.y,exports.AttributeValueInput=i.b,exports.BLANK=n.pi,exports.BULK_APPLY=n.mi,exports.BULK_REQUEST_FILES=n.qa,exports.BUSINESS_ENTITIES=n.aa,exports.BusinessEntityInput=i.x,exports.CANCEL_PRIVACY_REQUEST=n.Do,exports.CAN_APPLY_IN_BULK=n.hi,exports.CATALOGS=n.ss,exports.CHANGE_REQUEST_DATA_SILO_STATUS=n.to,exports.CODE_PACKAGES=n.Po,exports.CONSENT_MANAGER_ANALYTICS_DATA=n.ca,exports.CONSENT_PARTITIONS=n.la,exports.COOKIES=n.ua,exports.CREATE_ACTION_ITEMS=n.ea,exports.CREATE_ACTION_ITEM_COLLECTION=n.Ha,exports.CREATE_AGENT=n.Wi,exports.CREATE_AGENT_FILE=n.Vi,exports.CREATE_AGENT_FUNCTION=n.Ri,exports.CREATE_API_KEY=n.Jo,exports.CREATE_ATTRIBUTE=n.Ia,exports.CREATE_ATTRIBUTE_VALUES=n.La,exports.CREATE_BUSINESS_ENTITY=n.oa,exports.CREATE_CODE_PACKAGE=n.Fo,exports.CREATE_CONSENT_EXPERIENCE=n.da,exports.CREATE_CONSENT_MANAGER=n.fa,exports.CREATE_CONSENT_PARTITION=n.pa,exports.CREATE_DATA_FLOWS=n.ma,exports.CREATE_DATA_SILOS=n.fs,exports.CREATE_DATA_SUBJECT=n.$o,exports.CREATE_DATA_SUB_CATEGORY=n.ji,exports.CREATE_ENRICHER=n.cs,exports.CREATE_IDENTIFIER=n.rs,exports.CREATE_PREFERENCE_ACCESS_TOKENS=n.Ko,exports.CREATE_PROCESSING_ACTIVITY=n.Ti,exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY=n.Oi,exports.CREATE_PROMPT=n.ao,exports.CREATE_PROMPT_GROUP=n.oo,exports.CREATE_PROMPT_PARTIAL=n.so,exports.CREATE_REPOSITORY=n.Xo,exports.CREATE_SOFTWARE_DEVELOPMENT_KIT=n.Lo,exports.CREATE_TEAM=n.Qa,exports.CREATE_TEMPLATE=n.Ho,exports.CREATE_VENDOR=n.Pi,exports.CachedFileState=n.gi,exports.CachedRequestState=n._i,exports.CodePackageInput=i.S,exports.CodePackageSdk=i.C,exports.ColumnName=n.vi,exports.ConsentManageExperienceInput=i.w,exports.ConsentManagerInput=i.T,exports.ConsentManagerMetricBin=n.jr,exports.ConsentManagerServiceMetadata=i.E,exports.ConsentPreferenceTopic=i.D,exports.ConsentPreferenceTopicOptionValue=i.O,exports.ConsentPurpose=i.k,exports.CookieCsvInput=i.A,exports.CookieInput=i.j,exports.CronIdentifier=l.o,exports.CronIdentifierPush=l.i,exports.DATAPOINT_EXPORT=n.vs,exports.DATA_FLOWS=n.ha,exports.DATA_POINTS=n.ys,exports.DATA_POINT_COUNT=n.bs,exports.DATA_SILOS=n.ps,exports.DATA_SILOS_ENRICHED=n.ms,exports.DATA_SILO_EXPORT=n.hs,exports.DATA_SUBJECTS=n.es,exports.DATA_SUB_CATEGORIES=n.Mi,exports.DAY_MS=n.f,exports.DEBUG=t.i,exports.DEFAULT_TRANSCEND_API=t.a,exports.DEFAULT_TRANSCEND_CONSENT_API=t.o,exports.DEFAULT_TRANSCEND_PULL_RESOURCES=n.gn,exports.DELETE_API_KEY=n.Yo,exports.DELETE_ATTRIBUTE_VALUE=n.Ra,exports.DEPLOYED_PRIVACY_CENTER_URL=n.Xi,exports.DEPLOY_CONSENT_MANAGER=n.ga,exports.DETERMINE_LOGIN_METHOD=n.Ji,exports.DataCategoryGuessInput=i.M,exports.DataCategoryInput=i.N,exports.DataCategoryPreviewInput=i.P,exports.DataCategoryRecommendationInput=i.F,exports.DataFlowCsvInput=i.I,exports.DataFlowInput=i.L,exports.DataSiloInput=i.R,exports.DataSubjectInput=i.z,exports.DatapointInput=i.B,exports.ENABLED_PLUGINS=n.Go,exports.ENRICHERS=n.ls,exports.ENTRY_COUNT=n._s,exports.EXPERIENCES=n._a,exports.EnrichPrivacyRequest=f.n,exports.EnricherInput=i.V,exports.FETCH_CONSENT_MANAGER=n.va,exports.FETCH_CONSENT_MANAGER_ID=n.ya,exports.FETCH_CONSENT_MANAGER_THEME=n.ba,exports.FETCH_PRIVACY_CENTER_ID=n.Zi,exports.FIVE_MIN_MS=n.p,exports.FieldInput=i.H,exports.GLOBAL_ACTION_ITEMS=n.ta,exports.GLOBAL_ACTION_ITEM_COLLECTIONS=n.Ua,exports.HOUR_MS=n.m,exports.IDENTIFIERS=n.is,exports.IDENTIFIER_BLOCK_LIST=n.yi,exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS=n.bo,exports.INITIALIZER=n.us,exports.IP_ADDRESS_REGEX=s.n,exports.IS_REQUIRED=n.bi,exports.IdentifierInput=i.U,exports.ImportOnetrustAssessmentsInput=i.W,exports.IntlMessage=n.$,exports.IntlMessageInput=i.G,exports.LARGE_LANGUAGE_MODELS=n.Ki,exports.LOGIN=n.Yi,exports.MESSAGES=n.wo,exports.NEW_IDENTIFIER_TYPES=n.as,exports.NONE=n.xi,exports.NOTIFY_ADDITIONAL_TIME=n.Oo,exports.ORGANIZATION=n.Vo,exports.OneTrustFileFormat=e.t,exports.OneTrustPullResource=e.n,exports.OneTrustPullSource=e.r,exports.OpenAIEnabledRoute=i.K,exports.OpenAIEnabledRoutes=i.q,exports.OpenAIIntegration=i.J,exports.OpenAIRouteName=e.i,exports.POLICIES=n.jo,exports.PREFERENCE_TOPICS=n.go,exports.PRIVACY_CENTER=n.Qi,exports.PROCESSING_ACTIVITIES=n.Ei,exports.PROCESSING_PURPOSE_SUB_CATEGORIES=n.ki,exports.PROMPTS=n.co,exports.PROMPTS_WITH_VARIABLES=n.lo,exports.PROMPT_GROUPS=n.uo,exports.PROMPT_PARTIALS=n.do,exports.PROMPT_THREADS=n.No,exports.PURPOSES=n._o,exports.ParsedAttributeInput=n.si,exports.PartitionInput=i.Y,exports.PathfinderPolicy=i.X,exports.PathfinderPolicyName=e.a,exports.PathfinderPolicyNameC=i.Z,exports.PathfinderPromptRunMetadata=i.Q,exports.PolicyInput=i.$,exports.PrivacyCenterInput=i.et,exports.PrivacyRequest=n.ur,exports.PrivacyRequestInput=n.it,exports.PrivacyRequestResponse=n.Y,exports.ProcessingActivityInput=i.tt,exports.ProcessingPurposeInput=i.nt,exports.ProcessingPurposePreviewInput=i.rt,exports.PromptAVendorEmailSettings=i.it,exports.PromptGroupInput=i.at,exports.PromptInput=i.ot,exports.PromptPartialInput=i.st,exports.PurposeMap=c.t,exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT=n.no,exports.REMOVE_REQUEST_IDENTIFIERS=n.Xa,exports.REPORT_PROMPT_RUN=n.Ka,exports.REPOSITORIES=n.Zo,exports.REQUESTS=n.ko,exports.REQUEST_DATA_SILOS=n.ro,exports.REQUEST_ENRICHERS=n.xo,exports.REQUEST_FILES=n.Ja,exports.REQUEST_IDENTIFIERS=n.Za,exports.RETRYABLE_BATCH_STATUSES=t.s,exports.RETRY_REQUEST_DATA_SILO=n.io,exports.RETRY_REQUEST_ENRICHER=n.So,exports.RateCounter=n.C,exports.RegionInput=i.ct,exports.RepositoryInput=i.lt,exports.RequestFileMetadata=n.et,exports.RequestFileMetadataResponse=n.tt,exports.RequestIdentifiersResponse=n.pr,exports.RequestPurposeTrigger=n.dr,exports.RiskAssignmentInput=i.ut,exports.RiskLogicInput=i.dt,exports.SCOPES_BY_TITLE=t.c,exports.SCOPE_TITLES=t.l,exports.SET_RESOURCE_ATTRIBUTES=n.za,exports.SILO_DISCOVERY_RESULTS=n.Ci,exports.SKIP_REQUEST_ENRICHER=n.Co,exports.SOFTWARE_DEVELOPMENT_KITS=n.Ro,exports.SOMBRA_VERSION=n.wi,exports.SUB_DATA_POINTS=n.xs,exports.SUB_DATA_POINTS_COUNT=n.Ss,exports.SUB_DATA_POINTS_WITH_GUESSES=n.Cs,exports.SYNC_ATTRIBUTE_TYPES=n.Rr,exports.SiloDiscoveryResultInput=i.ft,exports.SoftwareDevelopmentKitInput=i.pt,exports.StoredApiKey=i.mt,exports.SuccessfulRequest=n.Si,exports.TEAMS=n.$a,exports.TEMPLATES=n.Uo,exports.TOGGLE_CONSENT_PRECEDENCE=n.xa,exports.TOGGLE_DATA_SUBJECT=n.ts,exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY=n.Sa,exports.TOGGLE_UNKNOWN_COOKIE_POLICY=n.Ca,exports.TOGGLE_UNKNOWN_REQUEST_POLICY=n.wa,exports.TR_PULL_RESOURCE_SCOPE_MAP=t.u,exports.TR_PUSH_RESOURCE_SCOPE_MAP=t.d,exports.TR_YML_RESOURCE_TO_FIELD_NAME=t.f,exports.TeamInput=i.ht,exports.TemplateInput=i.gt,exports.TranscendInput=i._t,exports.TranscendPromptManager=C,exports.TranscendPullResource=e.o,exports.UPDATE_ACTION=n.ia,exports.UPDATE_ACTION_ITEMS=n.na,exports.UPDATE_ACTION_ITEM_COLLECTION=n.Wa,exports.UPDATE_AGENTS=n.Gi,exports.UPDATE_AGENT_FILES=n.Hi,exports.UPDATE_AGENT_FUNCTIONS=n.zi,exports.UPDATE_ATTRIBUTE=n.Ba,exports.UPDATE_ATTRIBUTE_VALUES=n.Va,exports.UPDATE_BUSINESS_ENTITIES=n.sa,exports.UPDATE_CODE_PACKAGES=n.Io,exports.UPDATE_CONSENT_EXPERIENCE=n.Ta,exports.UPDATE_CONSENT_MANAGER_DOMAINS=n.Ea,exports.UPDATE_CONSENT_MANAGER_PARTITION=n.Da,exports.UPDATE_CONSENT_MANAGER_THEME=n.Oa,exports.UPDATE_CONSENT_MANAGER_TO_LATEST=n.ka,exports.UPDATE_CONSENT_MANAGER_VERSION=n.Aa,exports.UPDATE_DATA_FLOWS=n.ja,exports.UPDATE_DATA_SILOS=n.gs,exports.UPDATE_DATA_SUBJECT=n.ns,exports.UPDATE_DATA_SUB_CATEGORIES=n.Ni,exports.UPDATE_ENRICHER=n.ds,exports.UPDATE_IDENTIFIER=n.os,exports.UPDATE_INTL_MESSAGES=n.To,exports.UPDATE_LOAD_OPTIONS=n.Ma,exports.UPDATE_OR_CREATE_COOKIES=n.Na,exports.UPDATE_OR_CREATE_DATA_POINT=n.ws,exports.UPDATE_POLICIES=n.Mo,exports.UPDATE_PRIVACY_CENTER=n.$i,exports.UPDATE_PRIVACY_REQUEST=n.Ao,exports.UPDATE_PROCESSING_ACTIVITIES=n.Di,exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES=n.Ai,exports.UPDATE_PROMPTS=n.fo,exports.UPDATE_PROMPT_GROUPS=n.po,exports.UPDATE_PROMPT_PARTIALS=n.mo,exports.UPDATE_REPOSITORIES=n.Qo,exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS=n.zo,exports.UPDATE_TEAM=n.eo,exports.UPDATE_VENDORS=n.Fi,exports.USERS=n.Ya,exports.USP_STRING_REGEX=c.n,exports.VARIABLE_PARAMETERS_NAME=a.t,exports.VARIABLE_PARAMETERS_REGEXP=a.n,exports.VENDORS=n.Ii,exports.VendorInput=i.vt,exports.WebhookHeader=i.yt,exports.addDaysUtc=n.h,exports.addMessagesToPromptRun=n.ri,exports.addMs=n.g,exports.appendCsvRowsOrdered=n.a,exports.appendCsvSync=n.o,exports.approvePrivacyRequests=n.J,exports.assumeRole=n.Vn,exports.buildAIIntegrationType=r.t,exports.buildEnabledRouteType=r.n,exports.buildTranscendGraphQLClient=n.ti,exports.buildTranscendGraphQLClientGeneric=n.ni,exports.buildXdiSyncEndpoint=s.r,exports.bulkRestartRequests=n.B,exports.bulkRetryEnrichers=n.R,exports.cancelPrivacyRequests=n.G,exports.clampPageSize=n._,exports.collectParquetFilesOrExit=n.x,exports.consentManagersToBusinessEntities=s.t,exports.convertToDataSubjectAllowlist=n.$n,exports.convertToDataSubjectBlockList=n.er,exports.createActionItemCollection=n.ln,exports.createActionItems=n.on,exports.createAgent=n.Zt,exports.createAgentFile=n.rn,exports.createAgentFunction=n.en,exports.createApiKey=n.zn,exports.createBusinessEntity=n.qt,exports.createCodePackage=n.Rt,exports.createConsentToken=c.i,exports.createDataCategory=n.jt,exports.createDataFlows=n.Ot,exports.createPreferenceAccessTokens=n.Hr,exports.createProcessingPurpose=n._t,exports.createPrompt=n.mt,exports.createRegexForTag=b,exports.createRepository=n.Vt,exports.createSoftwareDevelopmentKit=n.Wt,exports.createSombraGotInstance=n.ei,exports.createTranscendConsentGotInstance=n.$r,exports.createVendor=n.dt,exports.defineTranscendPrompts=x,exports.deleteApiKey=n.Bn,exports.deployConsentManager=n.Zr,Object.defineProperty(exports,`description`,{enumerable:!0,get:function(){return t.m}}),exports.domainToHost=s.i,exports.downloadPrivacyRequestFiles=n.Z,exports.enrichPrivacyRequest=f.r,exports.ensureAllDataSubjectsExist=n.tr,exports.extractClientError=n.U,exports.extractErrorMessage=n.O,exports.fetchActiveSiloDiscoPlugin=n.Xr,exports.fetchAllActionItems=n.Yr,exports.fetchAllActions=n.Jr,exports.fetchAllAgentFiles=n.qr,exports.fetchAllAgentFunctions=n.Kr,exports.fetchAllAgents=n.Gr,exports.fetchAllApiKeys=n.ar,exports.fetchAllAssessmentTemplates=n.Ur,exports.fetchAllAssessments=n.Wr,exports.fetchAllAttributeValues=n.zr,exports.fetchAllAttributes=n.Br,exports.fetchAllBusinessEntities=n.Lr,exports.fetchAllCatalogs=n.rr,exports.fetchAllCookies=n.Ar,exports.fetchAllDataCategories=n.kr,exports.fetchAllDataFlows=n.Or,exports.fetchAllDataPoints=n.Tn,exports.fetchAllDataSilos=n.En,exports.fetchAllDataSubjects=n.nr,exports.fetchAllEnrichers=n.Cn,exports.fetchAllIdentifiers=n.n,exports.fetchAllMessages=n.Dr,exports.fetchAllPolicies=n.wr,exports.fetchAllPreferenceTopics=n.Sr,exports.fetchAllPrivacyCenters=n.xr,exports.fetchAllProcessingActivities=n.br,exports.fetchAllProcessingPurposes=n.yr,exports.fetchAllPromptGroups=n.Qn,exports.fetchAllPromptPartials=n.Zn,exports.fetchAllPromptThreads=n.Jn,exports.fetchAllPrompts=n.Yn,exports.fetchAllPurposes=n.vr,exports.fetchAllPurposesAndPreferences=n._r,exports.fetchAllRequestAttributeKeys=n.Vr,exports.fetchAllRequestEnrichers=n.gr,exports.fetchAllRequestIdentifierMetadata=n.hr,exports.fetchAllRequestIdentifiers=n.mr,exports.fetchAllRequests=n.fr,exports.fetchAllSiloDiscoveryResults=n.vn,exports.fetchAllSubDataPoints=n.Dn,exports.fetchAllTeams=n.lr,exports.fetchAllTemplates=n.xn,exports.fetchAllUsers=n.cr,exports.fetchAllVendors=n.sr,exports.fetchAndIndexCatalogs=n.ir,exports.fetchApiKeys=n.or,exports.fetchConsentManager=n.Mr,exports.fetchConsentManagerAnalyticsData=n.Nr,exports.fetchConsentManagerExperiences=n.Pr,exports.fetchConsentManagerId=n.Fr,exports.fetchConsentManagerTheme=n.Ir,exports.fetchEnrichedDataSilos=n.On,exports.fetchIdentifiersAndCreateMissing=n.r,exports.fetchPartitions=n.yn,exports.fetchPrivacyCenterId=n.Tr,exports.fetchPrivacyCenterUrl=n.Er,exports.fetchPromptsWithVariables=n.Xn,exports.fetchRequestDataSilo=n.Gn,exports.fetchRequestDataSiloActiveCount=n.Wn,exports.fetchRequestDataSilos=n.Kn,exports.fetchRequestDataSilosCount=n.qn,exports.fetchRequestFilesForRequest=n.Un,exports.filterNullishValuesFromObject=T,exports.filterRows=n.ii,exports.formatAttributeValues=n.Cr,exports.fuzzyMatchColumns=n.di,exports.fuzzySearch=n.fi,exports.generateCrossAccountApiKeys=u.i,exports.getErrorStatus=n.k,exports.getFileMetadataForPrivacyRequests=n.nt,exports.getGitFilesThatChanged=E,exports.getUniqueValuesForColumn=n.ai,exports.initCsvFile=n.s,exports.inquirerAutoComplete=n.j,exports.inquirerConfirmBoolean=n.M,exports.inquirerConfirmText=n.N,exports.limitRecords=n.w,exports.listDirectories=u.t,exports.listFiles=u.n,exports.loginUser=n.Hn,exports.makeGraphQLRequest=n.i,exports.mapColumnsToAttributes=n.W,exports.mapColumnsToIdentifiers=n.K,exports.mapCsvColumnsToApi=n.ct,exports.mapCsvRowsToRequestInputs=n.at,exports.mapEnumValues=n.ui,exports.mapRequestEnumValues=n.st,exports.markCronIdentifierCompleted=l.a,exports.markRequestDataSiloIdsCompleted=l.n,exports.markSilentPrivacyRequests=n.lt,exports.mergeTranscendInputs=o.t,exports.name=t.p,exports.normalizeIdentifierValue=n.ot,exports.notifyPrivacyRequestsAdditionalTime=n.q,exports.parquetToCsvOneFile=n.b,exports.parseAssessmentDisplayLogic=n.Rn,exports.parseAssessmentRiskLogic=n.Mn,exports.parseAttributesFromString=n.ci,exports.parseFilePath=n.c,exports.parseVariablesFromString=n.A,exports.pullAllDatapoints=d.n,exports.pullChunkedCustomSiloOutstandingIdentifiers=l.t,exports.pullConsentManagerMetrics=s.a,exports.pullCronPageOfIdentifiers=l.s,exports.pullManualEnrichmentIdentifiersToCsv=f.i,exports.pullPrivacyRequests=n.I,exports.pullTranscendConfiguration=n._n,exports.pullUnstructuredSubDataPointRecommendations=d.t,exports.pushCronIdentifiersFromCsv=l.r,exports.pushManualEnrichmentIdentifiersFromCsv=f.t,exports.readCsv=n.oi,exports.readSafe=n.S,exports.readTranscendYaml=a.r,exports.removeLinks=w,exports.removeUnverifiedRequestIdentifiers=n.P,exports.replaceVariablesInYaml=a.i,exports.reportPromptRun=n.hn,exports.restartPrivacyRequest=n.V,exports.retryRequestDataSilos=n.L,exports.retryRequestEnricher=n.mn,exports.retrySamePromise=n.T,exports.setResourceAttributes=n.pn,exports.skipPreflightJobs=n.z,exports.skipRequestDataSilos=n.F,exports.sleepPromise=n.D,exports.splitCsvToList=n.li,exports.splitInHalf=n.E,exports.startOfHour=n.v,exports.startOfUtcDay=n.y,exports.streamPrivacyRequestFiles=n.Q,exports.submitPrivacyRequest=n.X,exports.syncAction=n.fn,exports.syncActionItemCollections=n.un,exports.syncActionItems=n.sn,exports.syncAgentFiles=n.in,exports.syncAgentFunctions=n.tn,exports.syncAgents=n.Qt,exports.syncAttribute=n.Xt,exports.syncBusinessEntities=n.Jt,exports.syncCodePackages=n.zt,exports.syncConfigurationToTranscend=n.t,exports.syncConsentManager=n.It,exports.syncConsentManagerExperiences=n.Lt,exports.syncCookies=n.Pt,exports.syncDataCategories=n.Mt,exports.syncDataFlows=n.kt,exports.syncDataSiloDependencies=n.kn,exports.syncDataSilos=n.An,exports.syncDataSubject=n.Dt,exports.syncEnricher=n.wn,exports.syncIdentifier=n.Et,exports.syncIntlMessages=n.wt,exports.syncPartitions=n.bn,exports.syncPolicies=n.St,exports.syncPrivacyCenter=n.xt,exports.syncProcessingActivities=n.bt,exports.syncProcessingPurposes=n.vt,exports.syncPrompts=n.ht,exports.syncRepositories=n.Ht,exports.syncSoftwareDevelopmentKits=n.Gt,exports.syncTemplate=n.Sn,exports.syncVendors=n.ft,exports.updateActionItem=n.cn,exports.updateActionItemCollection=n.dn,exports.updateAgentFiles=n.an,exports.updateAgentFunctions=n.nn,exports.updateAgents=n.$t,exports.updateBusinessEntities=n.Yt,exports.updateCodePackages=n.Bt,exports.updateConsentManagerToLatest=n.Qr,exports.updateConsentManagerVersionToLatest=s.c,exports.updateDataCategories=n.Nt,exports.updateDataFlows=n.At,exports.updateIntlMessages=n.Tt,exports.updateOrCreateCookies=n.Ft,exports.updatePolicies=n.Ct,exports.updateProcessingPurposes=n.yt,exports.updatePrompts=n.gt,exports.updateRepositories=n.Ut,exports.updateSoftwareDevelopmentKits=n.Kt,exports.updateVendors=n.pt,exports.uploadConsents=c.r,exports.uploadCookiesFromCsv=s.o,exports.uploadDataFlowsFromCsv=s.s,exports.uploadPrivacyRequestsFromCsv=n.H,exports.uploadSiloDiscoveryResults=n.ut,exports.validateTranscendAuth=u.r,Object.defineProperty(exports,`version`,{enumerable:!0,get:function(){return t.h}}),exports.writeCsv=n.l,exports.writeCsvSync=n.u,exports.writeLargeCsv=n.d,exports.writeTranscendYaml=a.a;
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./constants-wkuhlP8d.cjs`),n=require(`./syncConfigurationToTranscend-DuTZKIG8.cjs`),r=require(`./enums-BZulhPFa.cjs`);require(`./logger-DQwEYtSS.cjs`);const i=require(`./buildAIIntegrationType-BwuCYR-o.cjs`),a=require(`./codecs-Bvmb8o9R.cjs`),o=require(`./readTranscendYaml-Cycz6RxW.cjs`),s=require(`./mergeTranscendInputs-BIBCYbug.cjs`),c=require(`./consent-manager-CCyvzvY5.cjs`),l=require(`./uploadConsents-C9Pv8Awr.cjs`),u=require(`./cron-DfEGA7Rf.cjs`),d=require(`./api-keys-Bb2BbZQe.cjs`),f=require(`./data-inventory-C1eqZk1M.cjs`),p=require(`./manual-enrichment-CzTpv-mM.cjs`);let m=require(`@transcend-io/privacy-types`),h=require(`@transcend-io/type-utils`),g=require(`@transcend-io/handlebars-utils`),_=require(`fast-glob`);_=e.t(_);let v=require(`child_process`);const y=20;async function b(e){let t=[],r=0,i=!1;do{let{largeLanguageModels:{nodes:a}}=await n.i(e,n.Ki,{first:20,offset:r});t.push(...a),r+=20,i=a.length===20}while(i);return t.sort((e,t)=>e.name.localeCompare(t.name))}function x(e){return RegExp(`<${e}>([\\s\\S]+?)<\\/${e}>`)}function S(e){return e}const C=e=>{try{return JSON.parse(e)}catch{return e}};var w=class{prompts;handlebarsOptions;promptContentMap;largeLanguageModels=[];agentsByName={};agentsByAgentId={};graphQLClient;defaultVariables;variables;handlebars;transcendApiKey;transcendUrl;requireApproval;cacheDuration;lastUpdatedAt;constructor({prompts:e,handlebarsOptions:r={},transcendUrl:i=t.a,transcendApiKey:a,requireApproval:o=!0,cacheDuration:s,defaultVariables:c={}}){this.prompts=e,this.transcendUrl=i,this.transcendApiKey=a,this.variables=c,this.defaultVariables=c,this.graphQLClient=n.ti(i,typeof a==`object`?a.release():a),this.requireApproval=o,this.cacheDuration=s,this.handlebarsOptions=r,this.handlebars=(0,g.createHandlebarsWithHelpers)(r)}async fetchPromptsAndMetadata(){let e=(0,h.getValues)(this.prompts),r=e.map(({id:e})=>e).filter(e=>!!e),i=e.map(({title:e})=>e).filter(e=>!!e),a=n.Ds(e.map(({agentNames:e})=>e||[]).flat()),[o,s,c]=await Promise.all([n.Xn(this.graphQLClient,{promptIds:r,promptTitles:i}),b(this.graphQLClient),n.Gr(this.graphQLClient,{names:a})]);this.agentsByName=t.g(c,`name`),this.agentsByAgentId=t.g(c,`agentId`),this.largeLanguageModels=s.filter(e=>e.isTranscendHosted===!1);let l=t.g(o.prompts,`title`),u=t.g(o.prompts,`id`);return this.variables={...o.calculatedVariables.reduce((e,t)=>Object.assign(e,{[t.name]:t.data?JSON.parse(t.data):t.data}),{}),...this.defaultVariables},this.handlebars=(0,g.createHandlebarsWithHelpers)({...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(e=>({name:e.slug,content:e.content}))]}),this.promptContentMap=(0,h.apply)(this.prompts,({id:e,title:t})=>{let n=e?u[e]:t?l[t]:void 0;if(!n)throw Error(`Failed to find prompt with title: "${t}" and id: "${e}"`);return n}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let t=this.agentsByName[e];if(t)return t;let[r]=await n.Gr(this.graphQLClient,{names:[e]});if(r)return this.agentsByName[r.name]=r,this.agentsByAgentId[r.agentId]=r,r}async getPromptThreadBySlackTs(e){let[t]=await n.Jn(this.graphQLClient,{slackMessageTs:[e]});return t}async getAgentsByName(e){if(e.length<1)throw Error(`Expected at least one name to be provided`);let{hasCache:t=[],missingCache:r=[]}=n.As(e,e=>this.agentsByName[e]?`hasCache`:`missingCache`),i=t.map(e=>this.agentsByName[e]);if(r.length===0)return i;let a=n.Ns(r,50),o=[];return await n.Es(a,async e=>{let t=await n.Gr(this.graphQLClient,{names:e});t.forEach(e=>{this.agentsByName[e.name]=e,this.agentsByAgentId[e.agentId]=e}),o.push(...t)}),[...i,...o]}getAgentFiles(e){return n.qr(this.graphQLClient,e)}getLargeLanguageModel(e){let t=this.largeLanguageModels.find(t=>typeof e==`string`?t.id===e:t.name===e.name&&t.client===e.client);if(!t)throw Error(`Failed to find model matching: ${typeof e==`string`?e:JSON.stringify(e)}`);return t}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:t}=this;if(!t)throw Error(`Expected this.promptContentMap to be defined`);let n=t[e];if(!n)throw Error(`Expected this.promptContentMap[${e}] to be defined`);return n}async compilePrompt(e,t){let n=await this.getPromptDefinition(e),r=this.prompts[e];if(!r)throw Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&n.status!==m.PromptStatus.Approved)throw Error(`Assessment "${n.title}" cannot be used because its in status: "${n.status}"`);if(n.status===m.PromptStatus.Rejected)throw Error(`Assessment "${n.title}" cannot be used because it's in status: "${n.status}"`);return(0,h.decodeCodec)(r.paramCodec,t),this.handlebars.compile(n.content)({currentDate:new Date().toISOString(),...this.variables,...t})}parseAiResponse(e,t){let n=this.prompts[e];if(!n)throw Error(`Expected this.prompts[${e}] to be defined`);let r=n.extractFromTag&&(x(n.extractFromTag).exec(t)||[])[1]||t;return(0,h.decodeCodec)(n.outputCodec,C(r),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:t,...r}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let i=r.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw Error(`Expected this.promptContentMap to be defined`);let a=this.promptContentMap[e];if(!a)throw Error(`Expected this.prompts[${e}] to be defined`);if(r.promptRunMessages.length===0)throw Error(`promptRunMessages is expected to have length > 0`);if(r.promptRunMessages[0].role!==m.ChatCompletionRole.System)throw Error(`promptRunMessages[0].role is expected to be = ${m.ChatCompletionRole.System}`);if(r.promptRunMessages[r.promptRunMessages.length-1].role!==m.ChatCompletionRole.Assistant)throw Error(`promptRunMessages[${r.promptRunMessages.length-1}].role is expected to be = ${m.ChatCompletionRole.Assistant}`);let o=r.promptRunMessages[r.promptRunMessages.length-1].content,s;try{s=this.parseAiResponse(e,o)}catch(e){throw await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,error:e.message,status:m.QueueStatus.Error,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))}),e}let c=await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,status:m.QueueStatus.Resolved,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))});return{result:s,promptRunId:c,promptRunUrl:`https://app.transcend.io/prompts/runs/${c}`}}async reportPromptRunError(e,{largeLanguageModel:t,...r}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let i=r.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw Error(`Expected this.promptContentMap to be defined`);let a=this.promptContentMap[e];if(!a)throw Error(`Expected this.prompts[${e}] to be defined`);if(r.promptRunMessages.length===0)throw Error(`promptRunMessages is expected to have length > 0`);if(r.promptRunMessages[0].role!==m.ChatCompletionRole.System)throw Error(`promptRunMessages[0].role is expected to be = ${m.ChatCompletionRole.System}`);let o=await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,status:m.QueueStatus.Error,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))});return{promptRunId:o,promptRunUrl:`https://app.transcend.io/prompts/runs/${o}`}}};function T(e){return e.replace(/(https?:\/\/[^\s]+)/g,`<link-omitted>`)}function E(e){return Object.entries(e).reduce((e,[t,n])=>n!=null&&n!==``&&!(Array.isArray(n)&&n.length===0)&&!(typeof n==`object`&&Object.keys(n).length===0)?Object.assign(e,{[t]:n}):e,{})}function D({baseBranch:e,rootDirectory:t,githubRepo:r,excludedGlob:i=[],fileBlockList:a=[]}){(0,v.execSync)(`git fetch origin ${e}`);let o=(0,v.execSync)(`git ls-remote ${r} "refs/heads/${e}" | cut -f 1`,{encoding:`utf-8`}).split(`
|
|
2
|
+
`)[0],s=(0,v.execSync)(`git rev-parse HEAD`,{encoding:`utf-8`}).split(`
|
|
3
|
+
`)[0];if(!o||!s)throw Error(`FAILED TO FIND COMMIT RANGE`);let c=n.js((0,v.execSync)(`git fetch && git diff --name-only "${e||o}...${s}" -- ${t}`,{encoding:`utf-8`}).split(`
|
|
4
|
+
`).filter(e=>e),a),l=i.length>0?_.default.sync(c,{ignore:i}):c,u={};return l.forEach(e=>{u[e]=(0,v.execSync)(`git show ${s}:${e}`,{encoding:`utf-8`})}),{changedFiles:c,fileDiffs:u,repoName:r.split(`/`).pop().split(`.`)[0],commit:s}}exports.ACTIONS=n.ra,exports.ADD_MESSAGES_TO_PROMPT_RUN=n.Ga,exports.ADD_SILO_DISCOVERY_RESULTS=n.Wo,exports.ADMIN_DASH=t.t,exports.ADMIN_DASH_DATAPOINTS=t.n,exports.ADMIN_DASH_INTEGRATIONS=t.r,exports.AGENTS=n.Ui,exports.AGENT_FILES=n.Bi,exports.AGENT_FUNCTIONS=n.Li,exports.API_KEYS=n.qo,exports.APPROVE_PRIVACY_REQUEST=n.Eo,exports.ASSESSMENTS=n.vo,exports.ASSESSMENT_SECTION_FIELDS=n.yo,exports.ASSESSMENT_TEMPLATES=n.ho,exports.ASSUME_ROLE=n.qi,exports.ATTRIBUTES=n.Pa,exports.ATTRIBUTE_KEYS_REQUESTS=n.Bo,exports.ATTRIBUTE_VALUES=n.Fa,exports.ActionInput=a.t,exports.ActionItemCollectionInput=a.n,exports.ActionItemInput=a.r,exports.AgentFileInput=a.i,exports.AgentFunctionInput=a.a,exports.AgentInput=a.o,exports.ApiKeyInput=a.s,exports.AssessmentAction=n.Nn,exports.AssessmentAnswerOptionInput=a.c,exports.AssessmentDisplayLogicInput=a.l,exports.AssessmentInput=a.u,exports.AssessmentNestedRule=n.Pn,exports.AssessmentNestedRuleInput=a.d,exports.AssessmentResourceInput=a.f,exports.AssessmentRetentionScheduleInput=a.p,exports.AssessmentRiskLogic=n.jn,exports.AssessmentRule=n.Fn,exports.AssessmentRuleInput=a.m,exports.AssessmentRuleWithOperands=n.In,exports.AssessmentRuleWithoutOperands=n.Ln,exports.AssessmentSectionInput=a.h,exports.AssessmentSectionQuestionInput=a.g,exports.AssessmentTemplateInput=a._,exports.AttestedExtraIdentifiers=n.rt,exports.AttributeInput=a.v,exports.AttributePreview=a.y,exports.AttributeValueInput=a.b,exports.BLANK=n.pi,exports.BULK_APPLY=n.mi,exports.BULK_REQUEST_FILES=n.qa,exports.BUSINESS_ENTITIES=n.aa,exports.BusinessEntityInput=a.x,exports.CANCEL_PRIVACY_REQUEST=n.Do,exports.CAN_APPLY_IN_BULK=n.hi,exports.CATALOGS=n.ss,exports.CHANGE_REQUEST_DATA_SILO_STATUS=n.to,exports.CODE_PACKAGES=n.Po,exports.CONSENT_MANAGER_ANALYTICS_DATA=n.ca,exports.CONSENT_PARTITIONS=n.la,exports.COOKIES=n.ua,exports.CREATE_ACTION_ITEMS=n.ea,exports.CREATE_ACTION_ITEM_COLLECTION=n.Ha,exports.CREATE_AGENT=n.Wi,exports.CREATE_AGENT_FILE=n.Vi,exports.CREATE_AGENT_FUNCTION=n.Ri,exports.CREATE_API_KEY=n.Jo,exports.CREATE_ATTRIBUTE=n.Ia,exports.CREATE_ATTRIBUTE_VALUES=n.La,exports.CREATE_BUSINESS_ENTITY=n.oa,exports.CREATE_CODE_PACKAGE=n.Fo,exports.CREATE_CONSENT_EXPERIENCE=n.da,exports.CREATE_CONSENT_MANAGER=n.fa,exports.CREATE_CONSENT_PARTITION=n.pa,exports.CREATE_DATA_FLOWS=n.ma,exports.CREATE_DATA_SILOS=n.fs,exports.CREATE_DATA_SUBJECT=n.$o,exports.CREATE_DATA_SUB_CATEGORY=n.ji,exports.CREATE_ENRICHER=n.cs,exports.CREATE_IDENTIFIER=n.rs,exports.CREATE_PREFERENCE_ACCESS_TOKENS=n.Ko,exports.CREATE_PROCESSING_ACTIVITY=n.Ti,exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY=n.Oi,exports.CREATE_PROMPT=n.ao,exports.CREATE_PROMPT_GROUP=n.oo,exports.CREATE_PROMPT_PARTIAL=n.so,exports.CREATE_REPOSITORY=n.Xo,exports.CREATE_SOFTWARE_DEVELOPMENT_KIT=n.Lo,exports.CREATE_TEAM=n.Qa,exports.CREATE_TEMPLATE=n.Ho,exports.CREATE_VENDOR=n.Pi,exports.CachedFileState=n.gi,exports.CachedRequestState=n._i,exports.CodePackageInput=a.S,exports.CodePackageSdk=a.C,exports.ColumnName=n.vi,exports.ConsentManageExperienceInput=a.w,exports.ConsentManagerInput=a.T,exports.ConsentManagerMetricBin=n.jr,exports.ConsentManagerServiceMetadata=a.E,exports.ConsentPreferenceTopic=a.D,exports.ConsentPreferenceTopicOptionValue=a.O,exports.ConsentPurpose=a.k,exports.CookieCsvInput=a.A,exports.CookieInput=a.j,exports.CronIdentifier=u.o,exports.CronIdentifierPush=u.i,exports.DATAPOINT_EXPORT=n.vs,exports.DATA_FLOWS=n.ha,exports.DATA_POINTS=n.ys,exports.DATA_POINT_COUNT=n.bs,exports.DATA_SILOS=n.ps,exports.DATA_SILOS_ENRICHED=n.ms,exports.DATA_SILO_EXPORT=n.hs,exports.DATA_SUBJECTS=n.es,exports.DATA_SUB_CATEGORIES=n.Mi,exports.DAY_MS=n.f,exports.DEBUG=t.i,exports.DEFAULT_TRANSCEND_API=t.a,exports.DEFAULT_TRANSCEND_CONSENT_API=t.o,exports.DEFAULT_TRANSCEND_PULL_RESOURCES=n.gn,exports.DELETE_API_KEY=n.Yo,exports.DELETE_ATTRIBUTE_VALUE=n.Ra,exports.DEPLOYED_PRIVACY_CENTER_URL=n.Xi,exports.DEPLOY_CONSENT_MANAGER=n.ga,exports.DETERMINE_LOGIN_METHOD=n.Ji,exports.DataCategoryGuessInput=a.M,exports.DataCategoryInput=a.N,exports.DataCategoryPreviewInput=a.P,exports.DataCategoryRecommendationInput=a.F,exports.DataFlowCsvInput=a.I,exports.DataFlowInput=a.L,exports.DataSiloInput=a.R,exports.DataSubjectInput=a.z,exports.DatapointInput=a.B,exports.ENABLED_PLUGINS=n.Go,exports.ENRICHERS=n.ls,exports.ENTRY_COUNT=n._s,exports.EXPERIENCES=n._a,exports.EnrichPrivacyRequest=p.n,exports.EnricherInput=a.V,exports.FETCH_CONSENT_MANAGER=n.va,exports.FETCH_CONSENT_MANAGER_ID=n.ya,exports.FETCH_CONSENT_MANAGER_THEME=n.ba,exports.FETCH_PRIVACY_CENTER_ID=n.Zi,exports.FIVE_MIN_MS=n.p,exports.FieldInput=a.H,exports.GLOBAL_ACTION_ITEMS=n.ta,exports.GLOBAL_ACTION_ITEM_COLLECTIONS=n.Ua,exports.HOUR_MS=n.m,exports.IDENTIFIERS=n.is,exports.IDENTIFIER_BLOCK_LIST=n.yi,exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS=n.bo,exports.INITIALIZER=n.us,exports.IP_ADDRESS_REGEX=c.n,exports.IS_REQUIRED=n.bi,exports.IdentifierInput=a.U,exports.ImportOnetrustAssessmentsInput=a.W,exports.IntlMessage=n.$,exports.IntlMessageInput=a.G,exports.LARGE_LANGUAGE_MODELS=n.Ki,exports.LOGIN=n.Yi,exports.MESSAGES=n.wo,exports.NEW_IDENTIFIER_TYPES=n.as,exports.NONE=n.xi,exports.NOTIFY_ADDITIONAL_TIME=n.Oo,exports.ORGANIZATION=n.Vo,exports.OneTrustFileFormat=r.t,exports.OneTrustPullResource=r.n,exports.OneTrustPullSource=r.r,exports.OpenAIEnabledRoute=a.K,exports.OpenAIEnabledRoutes=a.q,exports.OpenAIIntegration=a.J,exports.OpenAIRouteName=r.i,exports.POLICIES=n.jo,exports.PREFERENCE_TOPICS=n.go,exports.PRIVACY_CENTER=n.Qi,exports.PROCESSING_ACTIVITIES=n.Ei,exports.PROCESSING_PURPOSE_SUB_CATEGORIES=n.ki,exports.PROMPTS=n.co,exports.PROMPTS_WITH_VARIABLES=n.lo,exports.PROMPT_GROUPS=n.uo,exports.PROMPT_PARTIALS=n.do,exports.PROMPT_THREADS=n.No,exports.PURPOSES=n._o,exports.ParsedAttributeInput=n.si,exports.PartitionInput=a.Y,exports.PathfinderPolicy=a.X,exports.PathfinderPolicyName=r.a,exports.PathfinderPolicyNameC=a.Z,exports.PathfinderPromptRunMetadata=a.Q,exports.PolicyInput=a.$,exports.PrivacyCenterInput=a.et,exports.PrivacyRequest=n.ur,exports.PrivacyRequestInput=n.it,exports.PrivacyRequestResponse=n.Y,exports.ProcessingActivityInput=a.tt,exports.ProcessingPurposeInput=a.nt,exports.ProcessingPurposePreviewInput=a.rt,exports.PromptAVendorEmailSettings=a.it,exports.PromptGroupInput=a.at,exports.PromptInput=a.ot,exports.PromptPartialInput=a.st,exports.PurposeMap=l.t,exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT=n.no,exports.REMOVE_REQUEST_IDENTIFIERS=n.Xa,exports.REPORT_PROMPT_RUN=n.Ka,exports.REPOSITORIES=n.Zo,exports.REQUESTS=n.ko,exports.REQUEST_DATA_SILOS=n.ro,exports.REQUEST_ENRICHERS=n.xo,exports.REQUEST_FILES=n.Ja,exports.REQUEST_IDENTIFIERS=n.Za,exports.RETRYABLE_BATCH_STATUSES=t.s,exports.RETRY_REQUEST_DATA_SILO=n.io,exports.RETRY_REQUEST_ENRICHER=n.So,exports.RateCounter=n.C,exports.RegionInput=a.ct,exports.RepositoryInput=a.lt,exports.RequestFileMetadata=n.et,exports.RequestFileMetadataResponse=n.tt,exports.RequestIdentifiersResponse=n.pr,exports.RequestPurposeTrigger=n.dr,exports.RiskAssignmentInput=a.ut,exports.RiskLogicInput=a.dt,exports.SCOPES_BY_TITLE=t.c,exports.SCOPE_TITLES=t.l,exports.SET_RESOURCE_ATTRIBUTES=n.za,exports.SILO_DISCOVERY_RESULTS=n.Ci,exports.SKIP_REQUEST_ENRICHER=n.Co,exports.SOFTWARE_DEVELOPMENT_KITS=n.Ro,exports.SOMBRA_VERSION=n.wi,exports.SUB_DATA_POINTS=n.xs,exports.SUB_DATA_POINTS_COUNT=n.Ss,exports.SUB_DATA_POINTS_WITH_GUESSES=n.Cs,exports.SYNC_ATTRIBUTE_TYPES=n.Rr,exports.SiloDiscoveryResultInput=a.ft,exports.SoftwareDevelopmentKitInput=a.pt,exports.StoredApiKey=a.mt,exports.SuccessfulRequest=n.Si,exports.TEAMS=n.$a,exports.TEMPLATES=n.Uo,exports.TOGGLE_CONSENT_PRECEDENCE=n.xa,exports.TOGGLE_DATA_SUBJECT=n.ts,exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY=n.Sa,exports.TOGGLE_UNKNOWN_COOKIE_POLICY=n.Ca,exports.TOGGLE_UNKNOWN_REQUEST_POLICY=n.wa,exports.TR_PULL_RESOURCE_SCOPE_MAP=t.u,exports.TR_PUSH_RESOURCE_SCOPE_MAP=t.d,exports.TR_YML_RESOURCE_TO_FIELD_NAME=t.f,exports.TeamInput=a.ht,exports.TemplateInput=a.gt,exports.TranscendInput=a._t,exports.TranscendPromptManager=w,exports.TranscendPullResource=r.o,exports.UPDATE_ACTION=n.ia,exports.UPDATE_ACTION_ITEMS=n.na,exports.UPDATE_ACTION_ITEM_COLLECTION=n.Wa,exports.UPDATE_AGENTS=n.Gi,exports.UPDATE_AGENT_FILES=n.Hi,exports.UPDATE_AGENT_FUNCTIONS=n.zi,exports.UPDATE_ATTRIBUTE=n.Ba,exports.UPDATE_ATTRIBUTE_VALUES=n.Va,exports.UPDATE_BUSINESS_ENTITIES=n.sa,exports.UPDATE_CODE_PACKAGES=n.Io,exports.UPDATE_CONSENT_EXPERIENCE=n.Ta,exports.UPDATE_CONSENT_MANAGER_DOMAINS=n.Ea,exports.UPDATE_CONSENT_MANAGER_PARTITION=n.Da,exports.UPDATE_CONSENT_MANAGER_THEME=n.Oa,exports.UPDATE_CONSENT_MANAGER_TO_LATEST=n.ka,exports.UPDATE_CONSENT_MANAGER_VERSION=n.Aa,exports.UPDATE_DATA_FLOWS=n.ja,exports.UPDATE_DATA_SILOS=n.gs,exports.UPDATE_DATA_SUBJECT=n.ns,exports.UPDATE_DATA_SUB_CATEGORIES=n.Ni,exports.UPDATE_ENRICHER=n.ds,exports.UPDATE_IDENTIFIER=n.os,exports.UPDATE_INTL_MESSAGES=n.To,exports.UPDATE_LOAD_OPTIONS=n.Ma,exports.UPDATE_OR_CREATE_COOKIES=n.Na,exports.UPDATE_OR_CREATE_DATA_POINT=n.ws,exports.UPDATE_POLICIES=n.Mo,exports.UPDATE_PRIVACY_CENTER=n.$i,exports.UPDATE_PRIVACY_REQUEST=n.Ao,exports.UPDATE_PROCESSING_ACTIVITIES=n.Di,exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES=n.Ai,exports.UPDATE_PROMPTS=n.fo,exports.UPDATE_PROMPT_GROUPS=n.po,exports.UPDATE_PROMPT_PARTIALS=n.mo,exports.UPDATE_REPOSITORIES=n.Qo,exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS=n.zo,exports.UPDATE_TEAM=n.eo,exports.UPDATE_VENDORS=n.Fi,exports.USERS=n.Ya,exports.USP_STRING_REGEX=l.n,exports.VARIABLE_PARAMETERS_NAME=o.t,exports.VARIABLE_PARAMETERS_REGEXP=o.n,exports.VENDORS=n.Ii,exports.VendorInput=a.vt,exports.WebhookHeader=a.yt,exports.addDaysUtc=n.h,exports.addMessagesToPromptRun=n.ri,exports.addMs=n.g,exports.appendCsvRowsOrdered=n.a,exports.appendCsvSync=n.o,exports.approvePrivacyRequests=n.J,exports.assumeRole=n.Vn,exports.buildAIIntegrationType=i.t,exports.buildEnabledRouteType=i.n,exports.buildTranscendGraphQLClient=n.ti,exports.buildTranscendGraphQLClientGeneric=n.ni,exports.buildXdiSyncEndpoint=c.r,exports.bulkRestartRequests=n.B,exports.bulkRetryEnrichers=n.R,exports.cancelPrivacyRequests=n.G,exports.clampPageSize=n._,exports.collectParquetFilesOrExit=n.x,exports.consentManagersToBusinessEntities=c.t,exports.convertToDataSubjectAllowlist=n.$n,exports.convertToDataSubjectBlockList=n.er,exports.createActionItemCollection=n.ln,exports.createActionItems=n.on,exports.createAgent=n.Zt,exports.createAgentFile=n.rn,exports.createAgentFunction=n.en,exports.createApiKey=n.zn,exports.createBusinessEntity=n.qt,exports.createCodePackage=n.Rt,exports.createConsentToken=l.i,exports.createDataCategory=n.jt,exports.createDataFlows=n.Ot,exports.createPreferenceAccessTokens=n.Hr,exports.createProcessingPurpose=n._t,exports.createPrompt=n.mt,exports.createRegexForTag=x,exports.createRepository=n.Vt,exports.createSoftwareDevelopmentKit=n.Wt,exports.createSombraGotInstance=n.ei,exports.createTranscendConsentGotInstance=n.$r,exports.createVendor=n.dt,exports.defineTranscendPrompts=S,exports.deleteApiKey=n.Bn,exports.deployConsentManager=n.Zr,Object.defineProperty(exports,`description`,{enumerable:!0,get:function(){return t.m}}),exports.domainToHost=c.i,exports.downloadPrivacyRequestFiles=n.Z,exports.enrichPrivacyRequest=p.r,exports.ensureAllDataSubjectsExist=n.tr,exports.extractClientError=n.U,exports.extractErrorMessage=n.O,exports.fetchActiveSiloDiscoPlugin=n.Xr,exports.fetchAllActionItems=n.Yr,exports.fetchAllActions=n.Jr,exports.fetchAllAgentFiles=n.qr,exports.fetchAllAgentFunctions=n.Kr,exports.fetchAllAgents=n.Gr,exports.fetchAllApiKeys=n.ar,exports.fetchAllAssessmentTemplates=n.Ur,exports.fetchAllAssessments=n.Wr,exports.fetchAllAttributeValues=n.zr,exports.fetchAllAttributes=n.Br,exports.fetchAllBusinessEntities=n.Lr,exports.fetchAllCatalogs=n.rr,exports.fetchAllCookies=n.Ar,exports.fetchAllDataCategories=n.kr,exports.fetchAllDataFlows=n.Or,exports.fetchAllDataPoints=n.Tn,exports.fetchAllDataSilos=n.En,exports.fetchAllDataSubjects=n.nr,exports.fetchAllEnrichers=n.Cn,exports.fetchAllIdentifiers=n.n,exports.fetchAllMessages=n.Dr,exports.fetchAllPolicies=n.wr,exports.fetchAllPreferenceTopics=n.Sr,exports.fetchAllPrivacyCenters=n.xr,exports.fetchAllProcessingActivities=n.br,exports.fetchAllProcessingPurposes=n.yr,exports.fetchAllPromptGroups=n.Qn,exports.fetchAllPromptPartials=n.Zn,exports.fetchAllPromptThreads=n.Jn,exports.fetchAllPrompts=n.Yn,exports.fetchAllPurposes=n.vr,exports.fetchAllPurposesAndPreferences=n._r,exports.fetchAllRequestAttributeKeys=n.Vr,exports.fetchAllRequestEnrichers=n.gr,exports.fetchAllRequestIdentifierMetadata=n.hr,exports.fetchAllRequestIdentifiers=n.mr,exports.fetchAllRequests=n.fr,exports.fetchAllSiloDiscoveryResults=n.vn,exports.fetchAllSubDataPoints=n.Dn,exports.fetchAllTeams=n.lr,exports.fetchAllTemplates=n.xn,exports.fetchAllUsers=n.cr,exports.fetchAllVendors=n.sr,exports.fetchAndIndexCatalogs=n.ir,exports.fetchApiKeys=n.or,exports.fetchConsentManager=n.Mr,exports.fetchConsentManagerAnalyticsData=n.Nr,exports.fetchConsentManagerExperiences=n.Pr,exports.fetchConsentManagerId=n.Fr,exports.fetchConsentManagerTheme=n.Ir,exports.fetchEnrichedDataSilos=n.On,exports.fetchIdentifiersAndCreateMissing=n.r,exports.fetchPartitions=n.yn,exports.fetchPrivacyCenterId=n.Tr,exports.fetchPrivacyCenterUrl=n.Er,exports.fetchPromptsWithVariables=n.Xn,exports.fetchRequestDataSilo=n.Gn,exports.fetchRequestDataSiloActiveCount=n.Wn,exports.fetchRequestDataSilos=n.Kn,exports.fetchRequestDataSilosCount=n.qn,exports.fetchRequestFilesForRequest=n.Un,exports.filterNullishValuesFromObject=E,exports.filterRows=n.ii,exports.formatAttributeValues=n.Cr,exports.fuzzyMatchColumns=n.di,exports.fuzzySearch=n.fi,exports.generateCrossAccountApiKeys=d.i,exports.getErrorStatus=n.k,exports.getFileMetadataForPrivacyRequests=n.nt,exports.getGitFilesThatChanged=D,exports.getUniqueValuesForColumn=n.ai,exports.initCsvFile=n.s,exports.inquirerAutoComplete=n.j,exports.inquirerConfirmBoolean=n.M,exports.inquirerConfirmText=n.N,exports.limitRecords=n.w,exports.listDirectories=d.t,exports.listFiles=d.n,exports.loginUser=n.Hn,exports.makeGraphQLRequest=n.i,exports.mapColumnsToAttributes=n.W,exports.mapColumnsToIdentifiers=n.K,exports.mapCsvColumnsToApi=n.ct,exports.mapCsvRowsToRequestInputs=n.at,exports.mapEnumValues=n.ui,exports.mapRequestEnumValues=n.st,exports.markCronIdentifierCompleted=u.a,exports.markRequestDataSiloIdsCompleted=u.n,exports.markSilentPrivacyRequests=n.lt,exports.mergeTranscendInputs=s.t,exports.name=t.p,exports.normalizeIdentifierValue=n.ot,exports.notifyPrivacyRequestsAdditionalTime=n.q,exports.parquetToCsvOneFile=n.b,exports.parseAssessmentDisplayLogic=n.Rn,exports.parseAssessmentRiskLogic=n.Mn,exports.parseAttributesFromString=n.ci,exports.parseFilePath=n.c,exports.parseVariablesFromString=n.A,exports.pullAllDatapoints=f.n,exports.pullChunkedCustomSiloOutstandingIdentifiers=u.t,exports.pullConsentManagerMetrics=c.a,exports.pullCronPageOfIdentifiers=u.s,exports.pullManualEnrichmentIdentifiersToCsv=p.i,exports.pullPrivacyRequests=n.I,exports.pullTranscendConfiguration=n._n,exports.pullUnstructuredSubDataPointRecommendations=f.t,exports.pushCronIdentifiersFromCsv=u.r,exports.pushManualEnrichmentIdentifiersFromCsv=p.t,exports.readCsv=n.oi,exports.readSafe=n.S,exports.readTranscendYaml=o.r,exports.removeLinks=T,exports.removeUnverifiedRequestIdentifiers=n.P,exports.replaceVariablesInYaml=o.i,exports.reportPromptRun=n.hn,exports.restartPrivacyRequest=n.V,exports.retryRequestDataSilos=n.L,exports.retryRequestEnricher=n.mn,exports.retrySamePromise=n.T,exports.setResourceAttributes=n.pn,exports.skipPreflightJobs=n.z,exports.skipRequestDataSilos=n.F,exports.sleepPromise=n.D,exports.splitCsvToList=n.li,exports.splitInHalf=n.E,exports.startOfHour=n.v,exports.startOfUtcDay=n.y,exports.streamPrivacyRequestFiles=n.Q,exports.submitPrivacyRequest=n.X,exports.syncAction=n.fn,exports.syncActionItemCollections=n.un,exports.syncActionItems=n.sn,exports.syncAgentFiles=n.in,exports.syncAgentFunctions=n.tn,exports.syncAgents=n.Qt,exports.syncAttribute=n.Xt,exports.syncBusinessEntities=n.Jt,exports.syncCodePackages=n.zt,exports.syncConfigurationToTranscend=n.t,exports.syncConsentManager=n.It,exports.syncConsentManagerExperiences=n.Lt,exports.syncCookies=n.Pt,exports.syncDataCategories=n.Mt,exports.syncDataFlows=n.kt,exports.syncDataSiloDependencies=n.kn,exports.syncDataSilos=n.An,exports.syncDataSubject=n.Dt,exports.syncEnricher=n.wn,exports.syncIdentifier=n.Et,exports.syncIntlMessages=n.wt,exports.syncPartitions=n.bn,exports.syncPolicies=n.St,exports.syncPrivacyCenter=n.xt,exports.syncProcessingActivities=n.bt,exports.syncProcessingPurposes=n.vt,exports.syncPrompts=n.ht,exports.syncRepositories=n.Ht,exports.syncSoftwareDevelopmentKits=n.Gt,exports.syncTemplate=n.Sn,exports.syncVendors=n.ft,exports.updateActionItem=n.cn,exports.updateActionItemCollection=n.dn,exports.updateAgentFiles=n.an,exports.updateAgentFunctions=n.nn,exports.updateAgents=n.$t,exports.updateBusinessEntities=n.Yt,exports.updateCodePackages=n.Bt,exports.updateConsentManagerToLatest=n.Qr,exports.updateConsentManagerVersionToLatest=c.c,exports.updateDataCategories=n.Nt,exports.updateDataFlows=n.At,exports.updateIntlMessages=n.Tt,exports.updateOrCreateCookies=n.Ft,exports.updatePolicies=n.Ct,exports.updateProcessingPurposes=n.yt,exports.updatePrompts=n.gt,exports.updateRepositories=n.Ut,exports.updateSoftwareDevelopmentKits=n.Kt,exports.updateVendors=n.pt,exports.uploadConsents=l.r,exports.uploadCookiesFromCsv=c.o,exports.uploadDataFlowsFromCsv=c.s,exports.uploadPrivacyRequestsFromCsv=n.H,exports.uploadSiloDiscoveryResults=n.ut,exports.validateTranscendAuth=d.r,Object.defineProperty(exports,`version`,{enumerable:!0,get:function(){return t.h}}),exports.writeCsv=n.l,exports.writeCsvSync=n.u,exports.writeLargeCsv=n.d,exports.writeTranscendYaml=o.a;
|
|
5
5
|
//# sourceMappingURL=index.cjs.map
|