@transcend-io/cli 8.32.4 → 8.32.7

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.
Files changed (121) hide show
  1. package/README.md +46 -46
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-22KX2NM4.cjs → chunk-4GILGOAM.cjs} +4 -4
  6. package/dist/{chunk-22KX2NM4.cjs.map → chunk-4GILGOAM.cjs.map} +1 -1
  7. package/dist/{chunk-PGO2YKRX.cjs → chunk-4NEO6Q2F.cjs} +2 -2
  8. package/dist/{chunk-PGO2YKRX.cjs.map → chunk-4NEO6Q2F.cjs.map} +1 -1
  9. package/dist/{chunk-DYBVUGHH.cjs → chunk-4OEVQFNG.cjs} +21 -21
  10. package/dist/{chunk-DYBVUGHH.cjs.map → chunk-4OEVQFNG.cjs.map} +1 -1
  11. package/dist/{chunk-DQCPGPXG.cjs → chunk-5MG2CEZV.cjs} +2 -2
  12. package/dist/{chunk-DQCPGPXG.cjs.map → chunk-5MG2CEZV.cjs.map} +1 -1
  13. package/dist/{chunk-CM7VJEOY.cjs → chunk-ATEDOYYC.cjs} +2 -2
  14. package/dist/{chunk-CM7VJEOY.cjs.map → chunk-ATEDOYYC.cjs.map} +1 -1
  15. package/dist/{chunk-VUQAH7YK.cjs → chunk-EMLESF76.cjs} +6 -6
  16. package/dist/{chunk-VUQAH7YK.cjs.map → chunk-EMLESF76.cjs.map} +1 -1
  17. package/dist/{chunk-VCPZG4FJ.cjs → chunk-ETSLJPTD.cjs} +2 -2
  18. package/dist/{chunk-VCPZG4FJ.cjs.map → chunk-ETSLJPTD.cjs.map} +1 -1
  19. package/dist/{chunk-LQUVB4MI.cjs → chunk-GCTE43TS.cjs} +4 -4
  20. package/dist/{chunk-LQUVB4MI.cjs.map → chunk-GCTE43TS.cjs.map} +1 -1
  21. package/dist/{chunk-IHUCIK5T.cjs → chunk-H3EBIKX6.cjs} +2 -2
  22. package/dist/{chunk-IHUCIK5T.cjs.map → chunk-H3EBIKX6.cjs.map} +1 -1
  23. package/dist/{chunk-D3VRD5F5.cjs → chunk-HZU3YROT.cjs} +2 -2
  24. package/dist/{chunk-D3VRD5F5.cjs.map → chunk-HZU3YROT.cjs.map} +1 -1
  25. package/dist/{chunk-6TKTYQIF.cjs → chunk-ILBF5XZN.cjs} +2 -2
  26. package/dist/{chunk-6TKTYQIF.cjs.map → chunk-ILBF5XZN.cjs.map} +1 -1
  27. package/dist/{chunk-BPOXNSPY.cjs → chunk-JRYG6ZXI.cjs} +2 -2
  28. package/dist/{chunk-BPOXNSPY.cjs.map → chunk-JRYG6ZXI.cjs.map} +1 -1
  29. package/dist/{chunk-56QKBG2R.cjs → chunk-KYOQWIIS.cjs} +4 -4
  30. package/dist/{chunk-56QKBG2R.cjs.map → chunk-KYOQWIIS.cjs.map} +1 -1
  31. package/dist/{chunk-P5GD5LAK.cjs → chunk-ZNTCC7Y7.cjs} +2 -2
  32. package/dist/{chunk-P5GD5LAK.cjs.map → chunk-ZNTCC7Y7.cjs.map} +1 -1
  33. package/dist/{impl-SSBP4ONX.cjs → impl-2NLTX2DX.cjs} +2 -2
  34. package/dist/{impl-SSBP4ONX.cjs.map → impl-2NLTX2DX.cjs.map} +1 -1
  35. package/dist/{impl-LKX6OLE2.cjs → impl-2Z37FQLH.cjs} +2 -2
  36. package/dist/{impl-LKX6OLE2.cjs.map → impl-2Z37FQLH.cjs.map} +1 -1
  37. package/dist/{impl-X23VUODX.cjs → impl-3G7CA7V7.cjs} +2 -2
  38. package/dist/{impl-X23VUODX.cjs.map → impl-3G7CA7V7.cjs.map} +1 -1
  39. package/dist/{impl-RMPDHVAH.cjs → impl-43DHFRH3.cjs} +2 -2
  40. package/dist/{impl-RMPDHVAH.cjs.map → impl-43DHFRH3.cjs.map} +1 -1
  41. package/dist/{impl-J5PWNHKL.cjs → impl-4GESIKYG.cjs} +2 -2
  42. package/dist/{impl-J5PWNHKL.cjs.map → impl-4GESIKYG.cjs.map} +1 -1
  43. package/dist/{impl-NW57RBBR.cjs → impl-4LNG6EWX.cjs} +2 -2
  44. package/dist/{impl-NW57RBBR.cjs.map → impl-4LNG6EWX.cjs.map} +1 -1
  45. package/dist/{impl-GZNNNSYW.cjs → impl-5BSN73TG.cjs} +4 -4
  46. package/dist/{impl-GZNNNSYW.cjs.map → impl-5BSN73TG.cjs.map} +1 -1
  47. package/dist/{impl-4AI7T6RD.cjs → impl-AB7CBUNN.cjs} +2 -2
  48. package/dist/{impl-4AI7T6RD.cjs.map → impl-AB7CBUNN.cjs.map} +1 -1
  49. package/dist/{impl-GA6T4SCB.cjs → impl-ANZ5Q2QW.cjs} +2 -2
  50. package/dist/{impl-GA6T4SCB.cjs.map → impl-ANZ5Q2QW.cjs.map} +1 -1
  51. package/dist/{impl-S64WVKSC.cjs → impl-B2KHIHOI.cjs} +2 -2
  52. package/dist/{impl-S64WVKSC.cjs.map → impl-B2KHIHOI.cjs.map} +1 -1
  53. package/dist/{impl-WVOFYJLG.cjs → impl-BCRCUBC6.cjs} +2 -2
  54. package/dist/{impl-WVOFYJLG.cjs.map → impl-BCRCUBC6.cjs.map} +1 -1
  55. package/dist/{impl-SE32ARTN.cjs → impl-BFSM3FLJ.cjs} +2 -2
  56. package/dist/{impl-SE32ARTN.cjs.map → impl-BFSM3FLJ.cjs.map} +1 -1
  57. package/dist/{impl-UA7V6YEM.cjs → impl-C3RL4PL5.cjs} +2 -2
  58. package/dist/{impl-UA7V6YEM.cjs.map → impl-C3RL4PL5.cjs.map} +1 -1
  59. package/dist/{impl-IOS3QLTX.cjs → impl-C3YOETUJ.cjs} +2 -2
  60. package/dist/{impl-IOS3QLTX.cjs.map → impl-C3YOETUJ.cjs.map} +1 -1
  61. package/dist/{impl-2JA6BPE7.cjs → impl-CUQGOWYL.cjs} +2 -2
  62. package/dist/{impl-2JA6BPE7.cjs.map → impl-CUQGOWYL.cjs.map} +1 -1
  63. package/dist/{impl-JY7YM3QH.cjs → impl-CWWJOV4W.cjs} +2 -2
  64. package/dist/{impl-JY7YM3QH.cjs.map → impl-CWWJOV4W.cjs.map} +1 -1
  65. package/dist/{impl-QPLTL2SO.cjs → impl-D27XUTVP.cjs} +2 -2
  66. package/dist/{impl-QPLTL2SO.cjs.map → impl-D27XUTVP.cjs.map} +1 -1
  67. package/dist/{impl-MRC5UI22.cjs → impl-D6D7MZ4F.cjs} +2 -2
  68. package/dist/{impl-MRC5UI22.cjs.map → impl-D6D7MZ4F.cjs.map} +1 -1
  69. package/dist/{impl-Z54SB7SM.cjs → impl-EOWKDUEB.cjs} +2 -2
  70. package/dist/{impl-Z54SB7SM.cjs.map → impl-EOWKDUEB.cjs.map} +1 -1
  71. package/dist/impl-EQL4NORJ.cjs +2 -0
  72. package/dist/{impl-JI6COVDW.cjs.map → impl-EQL4NORJ.cjs.map} +1 -1
  73. package/dist/{impl-4YFJOKCA.cjs → impl-FAE3G5FE.cjs} +2 -2
  74. package/dist/{impl-4YFJOKCA.cjs.map → impl-FAE3G5FE.cjs.map} +1 -1
  75. package/dist/{impl-WTGAAEUZ.cjs → impl-FVEGOBQM.cjs} +2 -2
  76. package/dist/{impl-WTGAAEUZ.cjs.map → impl-FVEGOBQM.cjs.map} +1 -1
  77. package/dist/{impl-66CDS7IN.cjs → impl-HNWZZEKE.cjs} +2 -2
  78. package/dist/{impl-66CDS7IN.cjs.map → impl-HNWZZEKE.cjs.map} +1 -1
  79. package/dist/{impl-IQGUF37H.cjs → impl-JJ56CQTW.cjs} +2 -2
  80. package/dist/{impl-IQGUF37H.cjs.map → impl-JJ56CQTW.cjs.map} +1 -1
  81. package/dist/{impl-XYHIS7X5.cjs → impl-JNDENIQD.cjs} +2 -2
  82. package/dist/{impl-XYHIS7X5.cjs.map → impl-JNDENIQD.cjs.map} +1 -1
  83. package/dist/{impl-DA7AASRR.cjs → impl-JOK5WPTD.cjs} +2 -2
  84. package/dist/{impl-DA7AASRR.cjs.map → impl-JOK5WPTD.cjs.map} +1 -1
  85. package/dist/{impl-4LAJNPQ4.cjs → impl-KJTD4WO2.cjs} +3 -3
  86. package/dist/{impl-4LAJNPQ4.cjs.map → impl-KJTD4WO2.cjs.map} +1 -1
  87. package/dist/{impl-B6DTQRYV.cjs → impl-KRMOTRYI.cjs} +2 -2
  88. package/dist/{impl-B6DTQRYV.cjs.map → impl-KRMOTRYI.cjs.map} +1 -1
  89. package/dist/{impl-ZTEP5CYM.cjs → impl-LX4ZUDUY.cjs} +2 -2
  90. package/dist/{impl-ZTEP5CYM.cjs.map → impl-LX4ZUDUY.cjs.map} +1 -1
  91. package/dist/{impl-FRWZLZ2V.cjs → impl-MBWE7OAC.cjs} +2 -2
  92. package/dist/{impl-FRWZLZ2V.cjs.map → impl-MBWE7OAC.cjs.map} +1 -1
  93. package/dist/{impl-Y3MY5EKD.cjs → impl-O4WDS4V2.cjs} +2 -2
  94. package/dist/{impl-Y3MY5EKD.cjs.map → impl-O4WDS4V2.cjs.map} +1 -1
  95. package/dist/{impl-5RX3NB6C.cjs → impl-PISNT2E4.cjs} +2 -2
  96. package/dist/{impl-5RX3NB6C.cjs.map → impl-PISNT2E4.cjs.map} +1 -1
  97. package/dist/{impl-GG3S2VBT.cjs → impl-PS3WRA65.cjs} +2 -2
  98. package/dist/{impl-GG3S2VBT.cjs.map → impl-PS3WRA65.cjs.map} +1 -1
  99. package/dist/{impl-R35FW4U7.cjs → impl-TBYACXLK.cjs} +5 -5
  100. package/dist/{impl-R35FW4U7.cjs.map → impl-TBYACXLK.cjs.map} +1 -1
  101. package/dist/{impl-XU54KM62.cjs → impl-TD5BKXIH.cjs} +2 -2
  102. package/dist/{impl-XU54KM62.cjs.map → impl-TD5BKXIH.cjs.map} +1 -1
  103. package/dist/{impl-EXHOBCQW.cjs → impl-VBS6LHXD.cjs} +2 -2
  104. package/dist/{impl-EXHOBCQW.cjs.map → impl-VBS6LHXD.cjs.map} +1 -1
  105. package/dist/impl-WPM2STGX.cjs +2 -0
  106. package/dist/{impl-QOCEM2K5.cjs.map → impl-WPM2STGX.cjs.map} +1 -1
  107. package/dist/{impl-YIPC6MAR.cjs → impl-WQF6YIDK.cjs} +3 -3
  108. package/dist/{impl-YIPC6MAR.cjs.map → impl-WQF6YIDK.cjs.map} +1 -1
  109. package/dist/{impl-ADPBEB3N.cjs → impl-WWYWKXMK.cjs} +2 -2
  110. package/dist/{impl-ADPBEB3N.cjs.map → impl-WWYWKXMK.cjs.map} +1 -1
  111. package/dist/{impl-IZIXOMMN.cjs → impl-Y5TP56IB.cjs} +2 -2
  112. package/dist/{impl-IZIXOMMN.cjs.map → impl-Y5TP56IB.cjs.map} +1 -1
  113. package/dist/{impl-BLGX7DMN.cjs → impl-YOSAEFO2.cjs} +3 -3
  114. package/dist/{impl-BLGX7DMN.cjs.map → impl-YOSAEFO2.cjs.map} +1 -1
  115. package/dist/{impl-BHA2L6BP.cjs → impl-ZIBUPJJN.cjs} +2 -2
  116. package/dist/{impl-BHA2L6BP.cjs.map → impl-ZIBUPJJN.cjs.map} +1 -1
  117. package/dist/index.cjs +3 -3
  118. package/dist/index.d.cts +1 -1
  119. package/package.json +1 -1
  120. package/dist/impl-JI6COVDW.cjs +0 -2
  121. package/dist/impl-QOCEM2K5.cjs +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-GA6T4SCB.cjs","../src/commands/request/cron/pull-profiles/impl.ts"],"names":["pullProfiles","file","fileTarget","transcendUrl","auth","sombraAuth","cronDataSiloId","targetDataSiloId","actions","skipRequestCount","pageLimit","chunkSize","logger","colors","doneInputValidation","client","buildTranscendGraphQLClient","baseName","extension","parseFilePath","baseNameTarget","extensionTarget","allIdentifiersCount","allTargetIdentifiersCount","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunkToSave","requestIds","d","uniqueRequestIds","uniq_default","chunkedRequestIds","chunk_default","results","map","fetchRequestFilesForRequest","fileName","remoteId"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAyE,gCAA6B,wDAAyC,wDAAgD,gCAA6B,gFCE1R,MA6BnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACXF,CAAAA,EACFG,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,uEACF,CACF,CAAA,CAAA,CAIA,MAAA,CAAO,KAAA,CAAMF,CAAS,CAAA,EACtBA,CAAAA,EAAa,CAAA,EACbA,CAAAA,CAAYD,CAAAA,GAAc,CAAA,CAAA,EAAA,CAE1BE,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,qBAAA,EAAwBF,CAAS,CAAA,oDAAA,EAAuDD,CAAS,CAAA,CAAA,CACnG,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrBI,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAASC,kCAAAA,CAA4Bb,CAAcC,CAAI,CAAA,CACvD,CAAE,QAAA,CAAAa,CAAAA,CAAU,SAAA,CAAAC,CAAU,CAAA,CAAIC,kCAAAA,CAAkB,CAAA,CAC5C,CAAE,QAAA,CAAUC,CAAAA,CAAgB,SAAA,CAAWC,CAAgB,CAAA,CAC3DF,kCAAAA,CAAwB,CAAA,CAEtBG,CAAAA,CAAsB,CAAA,CACtBC,CAAAA,CAA4B,CAAA,CAC5BC,CAAAA,CAAY,CAAA,CAmFhB,MAAMC,iCAAAA,CACJ,UAAA,CAAYnB,CAAAA,CACZ,IAAA,CAAAF,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAG,CAAAA,CACA,WAAA,CAAaE,CAAAA,CACb,YAAA,CAAcC,CAAAA,CACd,MAAA,CAxFa,MACbe,CAAAA,EACkB,CAElBJ,CAAAA,EAAuBI,CAAAA,CAAY,MAAA,CAGnC,IAAMC,CAAAA,CAAaD,CAAAA,CAAY,GAAA,CAAKE,CAAAA,EAAMA,CAAAA,CAAE,SAAmB,CAAA,CACzDC,CAAAA,CAAmBC,iCAAAA,CAAe,CAAA,CAGlCC,CAAAA,CAAoBC,iCAAAA,CAAMH,CAAkBnB,CAAS,CAAA,CACrDuB,CAAAA,CAAU,MAAMC,iCAAAA,CACpBH,CACA,MAAOJ,CAAAA,EAAAA,CACLf,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,gCAAA,EAAmCc,CAAAA,CAAW,MAAM,CAAA,SAAA,CACtD,CACF,CAAA,CAAA,CACgB,MAAMQ,kCAAAA,CACpBpB,CACAL,CAAAA,CAAY,CAAA,CACZ,CACE,UAAA,CAAAiB,CAAAA,CACA,WAAA,CAAa,CAACpB,CAAgB,CAChC,CACF,CAAA,CAAA,CACe,GAAA,CAAI,CAAC,CAAE,QAAA,CAAA6B,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAA,EAAM,CAC7C,EAAA,CAAI,CAACA,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,CAAA,4BAAA,EAA+BD,CAAQ,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-GA6T4SCB.cjs","sourcesContent":[null,"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"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-ANZ5Q2QW.cjs","../src/commands/request/cron/pull-profiles/impl.ts"],"names":["pullProfiles","file","fileTarget","transcendUrl","auth","sombraAuth","cronDataSiloId","targetDataSiloId","actions","skipRequestCount","pageLimit","chunkSize","logger","colors","doneInputValidation","client","buildTranscendGraphQLClient","baseName","extension","parseFilePath","baseNameTarget","extensionTarget","allIdentifiersCount","allTargetIdentifiersCount","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunkToSave","requestIds","d","uniqueRequestIds","uniq_default","chunkedRequestIds","chunk_default","results","map","fetchRequestFilesForRequest","fileName","remoteId"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAyE,gCAA6B,wDAAyC,wDAAgD,gCAA6B,gFCE1R,MA6BnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACXF,CAAAA,EACFG,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,uEACF,CACF,CAAA,CAAA,CAIA,MAAA,CAAO,KAAA,CAAMF,CAAS,CAAA,EACtBA,CAAAA,EAAa,CAAA,EACbA,CAAAA,CAAYD,CAAAA,GAAc,CAAA,CAAA,EAAA,CAE1BE,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,qBAAA,EAAwBF,CAAS,CAAA,oDAAA,EAAuDD,CAAS,CAAA,CAAA,CACnG,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrBI,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAASC,kCAAAA,CAA4Bb,CAAcC,CAAI,CAAA,CACvD,CAAE,QAAA,CAAAa,CAAAA,CAAU,SAAA,CAAAC,CAAU,CAAA,CAAIC,kCAAAA,CAAkB,CAAA,CAC5C,CAAE,QAAA,CAAUC,CAAAA,CAAgB,SAAA,CAAWC,CAAgB,CAAA,CAC3DF,kCAAAA,CAAwB,CAAA,CAEtBG,CAAAA,CAAsB,CAAA,CACtBC,CAAAA,CAA4B,CAAA,CAC5BC,CAAAA,CAAY,CAAA,CAmFhB,MAAMC,iCAAAA,CACJ,UAAA,CAAYnB,CAAAA,CACZ,IAAA,CAAAF,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAG,CAAAA,CACA,WAAA,CAAaE,CAAAA,CACb,YAAA,CAAcC,CAAAA,CACd,MAAA,CAxFa,MACbe,CAAAA,EACkB,CAElBJ,CAAAA,EAAuBI,CAAAA,CAAY,MAAA,CAGnC,IAAMC,CAAAA,CAAaD,CAAAA,CAAY,GAAA,CAAKE,CAAAA,EAAMA,CAAAA,CAAE,SAAmB,CAAA,CACzDC,CAAAA,CAAmBC,iCAAAA,CAAe,CAAA,CAGlCC,CAAAA,CAAoBC,iCAAAA,CAAMH,CAAkBnB,CAAS,CAAA,CACrDuB,CAAAA,CAAU,MAAMC,iCAAAA,CACpBH,CACA,MAAOJ,CAAAA,EAAAA,CACLf,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,gCAAA,EAAmCc,CAAAA,CAAW,MAAM,CAAA,SAAA,CACtD,CACF,CAAA,CAAA,CACgB,MAAMQ,kCAAAA,CACpBpB,CACAL,CAAAA,CAAY,CAAA,CACZ,CACE,UAAA,CAAAiB,CAAAA,CACA,WAAA,CAAa,CAACpB,CAAgB,CAChC,CACF,CAAA,CAAA,CACe,GAAA,CAAI,CAAC,CAAE,QAAA,CAAA6B,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAA,EAAM,CAC7C,EAAA,CAAI,CAACA,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,CAAA,4BAAA,EAA+BD,CAAQ,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-ANZ5Q2QW.cjs","sourcesContent":[null,"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"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6TKTYQIFcjs = require('./chunk-6TKTYQIF.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');async function m({auth:i,transcendUrl:n,file:o,concurrency:r,actions:s,sombraAuth:a}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk6TKTYQIFcjs.a.call(void 0, {file:o,transcendUrl:n,concurrency:r,requestActions:s,auth:i,sombraAuth:a})}exports.pullIdentifiers = m;
2
- //# sourceMappingURL=impl-S64WVKSC.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkILBF5XZNcjs = require('./chunk-ILBF5XZN.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');async function m({auth:i,transcendUrl:n,file:o,concurrency:r,actions:s,sombraAuth:a}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkILBF5XZNcjs.a.call(void 0, {file:o,transcendUrl:n,concurrency:r,requestActions:s,auth:i,sombraAuth:a})}exports.pullIdentifiers = m;
2
+ //# sourceMappingURL=impl-B2KHIHOI.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-S64WVKSC.cjs","../src/commands/request/preflight/pull-identifiers/impl.ts"],"names":["pullIdentifiers","auth","transcendUrl","file","concurrency","actions","sombraAuth","doneInputValidation","pullManualEnrichmentIdentifiersToCsv"],"mappings":"AAAA,iIAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCclO,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAL,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,IAAA,CAAAJ,CAAAA,CACA,UAAA,CAAAK,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-S64WVKSC.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pullManualEnrichmentIdentifiersToCsv } from '../../../../lib/manual-enrichment';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PullIdentifiersCommandFlags {\n auth: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n actions?: RequestAction[];\n concurrency: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n concurrency,\n actions,\n sombraAuth,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pullManualEnrichmentIdentifiersToCsv({\n file,\n transcendUrl,\n concurrency,\n requestActions: actions,\n auth,\n sombraAuth,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-B2KHIHOI.cjs","../src/commands/request/preflight/pull-identifiers/impl.ts"],"names":["pullIdentifiers","auth","transcendUrl","file","concurrency","actions","sombraAuth","doneInputValidation","pullManualEnrichmentIdentifiersToCsv"],"mappings":"AAAA,iIAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCclO,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAL,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,IAAA,CAAAJ,CAAAA,CACA,UAAA,CAAAK,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-B2KHIHOI.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pullManualEnrichmentIdentifiersToCsv } from '../../../../lib/manual-enrichment';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PullIdentifiersCommandFlags {\n auth: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n actions?: RequestAction[];\n concurrency: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n concurrency,\n actions,\n sombraAuth,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pullManualEnrichmentIdentifiersToCsv({\n file,\n transcendUrl,\n concurrency,\n requestActions: actions,\n auth,\n sombraAuth,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunkPGO2YKRXcjs = require('./chunk-PGO2YKRX.cjs');require('./chunk-D3VRD5F5.cjs');var _chunkP5GD5LAKcjs = require('./chunk-P5GD5LAK.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');function M({consentManagerYmlFolder:s,output:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, s)||!_fs.lstatSync.call(void 0, s).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${s}"`)),this.process.exit(1));let f=_chunkP5GD5LAKcjs.c.call(void 0, s).map(i=>{let{"consent-manager":u}=_chunkJH5HRI6Dcjs.d.call(void 0, _path.join.call(void 0, s,i));return{name:i,input:u}}),e=_chunkPGO2YKRXcjs.h.call(void 0, f);_chunkJH5HRI6Dcjs.e.call(void 0, n,{"business-entities":e}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${e.length} business entities to file "${n}"`))}exports.consentManagersToBusinessEntities = M;
2
- //# sourceMappingURL=impl-WVOFYJLG.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunk4NEO6Q2Fcjs = require('./chunk-4NEO6Q2F.cjs');require('./chunk-HZU3YROT.cjs');var _chunkZNTCC7Y7cjs = require('./chunk-ZNTCC7Y7.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');function M({consentManagerYmlFolder:s,output:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, s)||!_fs.lstatSync.call(void 0, s).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${s}"`)),this.process.exit(1));let f=_chunkZNTCC7Y7cjs.c.call(void 0, s).map(i=>{let{"consent-manager":u}=_chunkJH5HRI6Dcjs.d.call(void 0, _path.join.call(void 0, s,i));return{name:i,input:u}}),e=_chunk4NEO6Q2Fcjs.h.call(void 0, f);_chunkJH5HRI6Dcjs.e.call(void 0, n,{"business-entities":e}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${e.length} business entities to file "${n}"`))}exports.consentManagersToBusinessEntities = M;
2
+ //# sourceMappingURL=impl-BCRCUBC6.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-WVOFYJLG.cjs","../src/commands/inventory/consent-managers-to-business-entities/impl.ts"],"names":["consentManagersToBusinessEntities","consentManagerYmlFolder","output","doneInputValidation","existsSync","lstatSync","logger","colors","inputs","listFiles","directory","consentManager","readTranscendYaml","join","businessEntities","writeTranscendYaml"],"mappings":"AAAA,iOAA+C,wDAAyC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,4BCO5W,gFAEF,wBAEmB,SAQtBA,CAAAA,CAEd,CACE,uBAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CACM,CACNC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAAA,CAInC,CAACC,4BAAAA,CAAkC,CAAA,EACnC,CAACC,2BAAAA,CAAiC,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAEhDC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BN,CAAuB,CAAA,CAAA,CAAG,CAClE,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMO,CAAAA,CAASC,iCAAAA,CAAiC,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAc,CACnE,GAAM,CAAE,iBAAA,CAAmBC,CAAe,CAAA,CAAIC,iCAAAA,wBAC5CC,CAAKZ,CAAyBS,CAAS,CACzC,CAAA,CACA,MAAO,CAAE,IAAA,CAAMA,CAAAA,CAAW,KAAA,CAAOC,CAAe,CAClD,CAAC,CAAA,CAGKG,CAAAA,CAAmBd,iCAAAA,CAA8C,CAAA,CAGvEe,iCAAAA,CAAmBb,CAAQ,CACzB,mBAAA,CAAqBY,CACvB,CAAC,CAAA,CAEDR,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBO,CAAAA,CAAiB,MAAM,CAAA,4BAAA,EAA+BZ,CAAM,CAAA,CAAA,CACpF,CACF,CACF,CAAA,8CAAA","file":"/home/runner/work/cli/cli/dist/impl-WVOFYJLG.cjs","sourcesContent":[null,"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"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-BCRCUBC6.cjs","../src/commands/inventory/consent-managers-to-business-entities/impl.ts"],"names":["consentManagersToBusinessEntities","consentManagerYmlFolder","output","doneInputValidation","existsSync","lstatSync","logger","colors","inputs","listFiles","directory","consentManager","readTranscendYaml","join","businessEntities","writeTranscendYaml"],"mappings":"AAAA,iOAA+C,wDAAyC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,4BCO5W,gFAEF,wBAEmB,SAQtBA,CAAAA,CAEd,CACE,uBAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CACM,CACNC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAAA,CAInC,CAACC,4BAAAA,CAAkC,CAAA,EACnC,CAACC,2BAAAA,CAAiC,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAEhDC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BN,CAAuB,CAAA,CAAA,CAAG,CAClE,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMO,CAAAA,CAASC,iCAAAA,CAAiC,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAc,CACnE,GAAM,CAAE,iBAAA,CAAmBC,CAAe,CAAA,CAAIC,iCAAAA,wBAC5CC,CAAKZ,CAAyBS,CAAS,CACzC,CAAA,CACA,MAAO,CAAE,IAAA,CAAMA,CAAAA,CAAW,KAAA,CAAOC,CAAe,CAClD,CAAC,CAAA,CAGKG,CAAAA,CAAmBd,iCAAAA,CAA8C,CAAA,CAGvEe,iCAAAA,CAAmBb,CAAQ,CACzB,mBAAA,CAAqBY,CACvB,CAAC,CAAA,CAEDR,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBO,CAAAA,CAAiB,MAAM,CAAA,4BAAA,EAA+BZ,CAAM,CAAA,CAAA,CACpF,CACF,CACF,CAAA,8CAAA","file":"/home/runner/work/cli/cli/dist/impl-BCRCUBC6.cjs","sourcesContent":[null,"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"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIHUCIK5Tcjs = require('./chunk-IHUCIK5T.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');async function d({file:i,transcendUrl:o,auth:r,sombraAuth:n,dataSiloId:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkIHUCIK5Tcjs.e.call(void 0, {file:i,transcendUrl:o,auth:r,sombraAuth:n,dataSiloId:s})}exports.markIdentifiersCompleted = d;
2
- //# sourceMappingURL=impl-SE32ARTN.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkH3EBIKX6cjs = require('./chunk-H3EBIKX6.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');async function d({file:i,transcendUrl:o,auth:r,sombraAuth:n,dataSiloId:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkH3EBIKX6cjs.e.call(void 0, {file:i,transcendUrl:o,auth:r,sombraAuth:n,dataSiloId:s})}exports.markIdentifiersCompleted = d;
2
+ //# sourceMappingURL=impl-BFSM3FLJ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-SE32ARTN.cjs","../src/commands/request/cron/mark-identifiers-completed/impl.ts"],"names":["markIdentifiersCompleted","file","transcendUrl","auth","sombraAuth","dataSiloId","doneInputValidation","pushCronIdentifiersFromCsv"],"mappings":"AAAA,iIAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCYlO,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAN,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,qCAAA","file":"/home/runner/work/cli/cli/dist/impl-SE32ARTN.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pushCronIdentifiersFromCsv } from '../../../../lib/cron';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface MarkIdentifiersCompletedCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n}\n\nexport async function markIdentifiersCompleted(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n }: MarkIdentifiersCompletedCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pushCronIdentifiersFromCsv({\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-BFSM3FLJ.cjs","../src/commands/request/cron/mark-identifiers-completed/impl.ts"],"names":["markIdentifiersCompleted","file","transcendUrl","auth","sombraAuth","dataSiloId","doneInputValidation","pushCronIdentifiersFromCsv"],"mappings":"AAAA,iIAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCYlO,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAN,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,qCAAA","file":"/home/runner/work/cli/cli/dist/impl-BFSM3FLJ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pushCronIdentifiersFromCsv } from '../../../../lib/cron';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface MarkIdentifiersCompletedCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n}\n\nexport async function markIdentifiersCompleted(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n }: MarkIdentifiersCompletedCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pushCronIdentifiersFromCsv({\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');async function l({auth:i,transcendUrl:o,createdAtBefore:n,createdAtAfter:r,actions:a,daysLeft:s,days:m,requestIds:c,emailTemplate:d,concurrency:f}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk56QKBG2Rcjs.Hf.call(void 0, {transcendUrl:o,requestActions:a,auth:i,emailTemplate:d,days:m,daysLeft:s,requestIds:c,concurrency:f,createdAtBefore:n,createdAtAfter:r})}exports.notifyAdditionalTime = l;
2
- //# sourceMappingURL=impl-UA7V6YEM.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkKYOQWIIScjs = require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');async function l({auth:i,transcendUrl:o,createdAtBefore:n,createdAtAfter:r,actions:a,daysLeft:s,days:m,requestIds:c,emailTemplate:d,concurrency:f}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkKYOQWIIScjs.Hf.call(void 0, {transcendUrl:o,requestActions:a,auth:i,emailTemplate:d,days:m,daysLeft:s,requestIds:c,concurrency:f,createdAtBefore:n,createdAtAfter:r})}exports.notifyAdditionalTime = l;
2
+ //# sourceMappingURL=impl-C3RL4PL5.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-UA7V6YEM.cjs","../src/commands/request/notify-additional-time/impl.ts"],"names":["notifyAdditionalTime","auth","transcendUrl","createdAtBefore","createdAtAfter","actions","daysLeft","days","requestIds","emailTemplate","concurrency","doneInputValidation","notifyPrivacyRequestsAdditionalTime"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAV,CAAAA,CACA,cAAA,CAAgBG,CAAAA,CAChB,IAAA,CAAAJ,CAAAA,CACA,aAAA,CAAAQ,CAAAA,CACA,IAAA,CAAAF,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,eAAA,CAAAP,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-UA7V6YEM.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { notifyPrivacyRequestsAdditionalTime } from '../../../lib/requests';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface NotifyAdditionalTimeCommandFlags {\n auth: string;\n createdAtBefore: Date;\n createdAtAfter?: Date;\n actions?: RequestAction[];\n daysLeft: number;\n days: number;\n requestIds?: string[];\n emailTemplate: string;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function notifyAdditionalTime(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n createdAtBefore,\n createdAtAfter,\n actions,\n daysLeft,\n days,\n requestIds,\n emailTemplate,\n concurrency,\n }: NotifyAdditionalTimeCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await notifyPrivacyRequestsAdditionalTime({\n transcendUrl,\n requestActions: actions,\n auth,\n emailTemplate,\n days,\n daysLeft,\n requestIds,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-C3RL4PL5.cjs","../src/commands/request/notify-additional-time/impl.ts"],"names":["notifyAdditionalTime","auth","transcendUrl","createdAtBefore","createdAtAfter","actions","daysLeft","days","requestIds","emailTemplate","concurrency","doneInputValidation","notifyPrivacyRequestsAdditionalTime"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAV,CAAAA,CACA,cAAA,CAAgBG,CAAAA,CAChB,IAAA,CAAAJ,CAAAA,CACA,aAAA,CAAAQ,CAAAA,CACA,IAAA,CAAAF,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,eAAA,CAAAP,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-C3RL4PL5.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { notifyPrivacyRequestsAdditionalTime } from '../../../lib/requests';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface NotifyAdditionalTimeCommandFlags {\n auth: string;\n createdAtBefore: Date;\n createdAtAfter?: Date;\n actions?: RequestAction[];\n daysLeft: number;\n days: number;\n requestIds?: string[];\n emailTemplate: string;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function notifyAdditionalTime(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n createdAtBefore,\n createdAtAfter,\n actions,\n daysLeft,\n days,\n requestIds,\n emailTemplate,\n concurrency,\n }: NotifyAdditionalTimeCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await notifyPrivacyRequestsAdditionalTime({\n transcendUrl,\n requestActions: actions,\n auth,\n emailTemplate,\n days,\n daysLeft,\n requestIds,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkLQUVB4MIcjs = require('./chunk-LQUVB4MI.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkDQCPGPXGcjs = require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function j({auth:p,file:o,transcendUrl:f,dataSiloIds:g,subCategories:C,status:S,includeEncryptedSnippets:a}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);try{let i=_chunk56QKBG2Rcjs.zc.call(void 0, f,p),b=await _chunkLQUVB4MIcjs.b.call(void 0, i,{dataSiloIds:g,subCategories:C,status:S,includeEncryptedSnippets:a});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing unstructured discovery files to file "${o}"...`));let s=[],h=b.map(t=>{let n={"Entry ID":t.id,"Data Silo ID":t.dataSiloId,"Object Path ID":t.scannedObjectPathId,"Object ID":t.scannedObjectId,...a?{Entry:t.name,"Context Snippet":t.contextSnippet}:{},"Data Category":`${t.dataSubCategory.category}:${t.dataSubCategory.name}`,"Classification Status":t.status,"Confidence Score":t.confidence,"Classification Method":t.classificationMethod,"Classifier Version":t.classifierVersion};return s=_chunkDQCPGPXGcjs.j.call(void 0, [...s,...Object.keys(n)]),n});await _chunk56QKBG2Rcjs.vg.call(void 0, o,h,s)}catch(i){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred syncing the unstructured discovery files: ${i.message}`)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced unstructured discovery files to disk at ${o}!`))}exports.pullUnstructuredDiscoveryFiles = j;
2
- //# sourceMappingURL=impl-IOS3QLTX.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkGCTE43TScjs = require('./chunk-GCTE43TS.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkKYOQWIIScjs = require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunk5MG2CEZVcjs = require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function j({auth:p,file:o,transcendUrl:f,dataSiloIds:g,subCategories:C,status:S,includeEncryptedSnippets:a}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);try{let i=_chunkKYOQWIIScjs.zc.call(void 0, f,p),b=await _chunkGCTE43TScjs.b.call(void 0, i,{dataSiloIds:g,subCategories:C,status:S,includeEncryptedSnippets:a});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing unstructured discovery files to file "${o}"...`));let s=[],h=b.map(t=>{let n={"Entry ID":t.id,"Data Silo ID":t.dataSiloId,"Object Path ID":t.scannedObjectPathId,"Object ID":t.scannedObjectId,...a?{Entry:t.name,"Context Snippet":t.contextSnippet}:{},"Data Category":`${t.dataSubCategory.category}:${t.dataSubCategory.name}`,"Classification Status":t.status,"Confidence Score":t.confidence,"Classification Method":t.classificationMethod,"Classifier Version":t.classifierVersion};return s=_chunk5MG2CEZVcjs.j.call(void 0, [...s,...Object.keys(n)]),n});await _chunkKYOQWIIScjs.vg.call(void 0, o,h,s)}catch(i){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred syncing the unstructured discovery files: ${i.message}`)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced unstructured discovery files to disk at ${o}!`))}exports.pullUnstructuredDiscoveryFiles = j;
2
+ //# sourceMappingURL=impl-C3YOETUJ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-IOS3QLTX.cjs","../src/commands/inventory/pull-unstructured-discovery-files/impl.ts"],"names":["pullUnstructuredDiscoveryFiles","auth","file","transcendUrl","dataSiloIds","subCategories","status","includeEncryptedSnippets","doneInputValidation","client","buildTranscendGraphQLClient","entries","pullUnstructuredSubDataPointRecommendations","logger","colors","headers","inputs","entry","result"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCE5P,MAkBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAI,CAEF,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BP,CAAcF,CAAI,CAAA,CAEvDU,CAAAA,CAAU,MAAMC,iCAAAA,CAA4CH,CAAQ,CACxE,WAAA,CAAAL,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAC,CAAA,CAEDM,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,8CAAA,EAAiDZ,CAAI,CAAA,IAAA,CACvD,CACF,CAAA,CACA,IAAIa,CAAAA,CAAoB,CAAC,CAAA,CACnBC,CAAAA,CAASL,CAAAA,CAAQ,GAAA,CAAKM,CAAAA,EAAU,CACpC,IAAMC,CAAAA,CAAS,CACb,UAAA,CAAYD,CAAAA,CAAM,EAAA,CAClB,cAAA,CAAgBA,CAAAA,CAAM,UAAA,CACtB,gBAAA,CAAkBA,CAAAA,CAAM,mBAAA,CACxB,WAAA,CAAaA,CAAAA,CAAM,eAAA,CACnB,GAAIV,CAAAA,CACA,CAAE,KAAA,CAAOU,CAAAA,CAAM,IAAA,CAAM,iBAAA,CAAmBA,CAAAA,CAAM,cAAe,CAAA,CAC7D,CAAC,CAAA,CACL,eAAA,CAAiB,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-IOS3QLTX.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport type { UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';\nimport colors from 'colors';\nimport { uniq } from 'lodash-es';\nimport { pullUnstructuredSubDataPointRecommendations } from '../../../lib/data-inventory';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport { logger } from '../../../logger';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { writeLargeCsv } from '../../../lib/helpers';\n\nexport interface PullUnstructuredDiscoveryFilesCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n subCategories?: string[];\n status?: UnstructuredSubDataPointRecommendationStatus[];\n includeEncryptedSnippets: boolean;\n}\n\nexport async function pullUnstructuredDiscoveryFiles(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n subCategories,\n status,\n includeEncryptedSnippets,\n }: PullUnstructuredDiscoveryFilesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const entries = await pullUnstructuredSubDataPointRecommendations(client, {\n dataSiloIds,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n status,\n includeEncryptedSnippets,\n });\n\n logger.info(\n colors.magenta(\n `Writing unstructured discovery files to file \"${file}\"...`,\n ),\n );\n let headers: string[] = [];\n const inputs = entries.map((entry) => {\n const result = {\n 'Entry ID': entry.id,\n 'Data Silo ID': entry.dataSiloId,\n 'Object Path ID': entry.scannedObjectPathId,\n 'Object ID': entry.scannedObjectId,\n ...(includeEncryptedSnippets\n ? { Entry: entry.name, 'Context Snippet': entry.contextSnippet }\n : {}),\n 'Data Category': `${entry.dataSubCategory.category}:${entry.dataSubCategory.name}`,\n 'Classification Status': entry.status,\n 'Confidence Score': entry.confidence,\n 'Classification Method': entry.classificationMethod,\n 'Classifier Version': entry.classifierVersion,\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n await writeLargeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(\n `An error occurred syncing the unstructured discovery files: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced unstructured discovery files to disk at ${file}!`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-C3YOETUJ.cjs","../src/commands/inventory/pull-unstructured-discovery-files/impl.ts"],"names":["pullUnstructuredDiscoveryFiles","auth","file","transcendUrl","dataSiloIds","subCategories","status","includeEncryptedSnippets","doneInputValidation","client","buildTranscendGraphQLClient","entries","pullUnstructuredSubDataPointRecommendations","logger","colors","headers","inputs","entry","result"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCE5P,MAkBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAI,CAEF,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BP,CAAcF,CAAI,CAAA,CAEvDU,CAAAA,CAAU,MAAMC,iCAAAA,CAA4CH,CAAQ,CACxE,WAAA,CAAAL,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAC,CAAA,CAEDM,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,8CAAA,EAAiDZ,CAAI,CAAA,IAAA,CACvD,CACF,CAAA,CACA,IAAIa,CAAAA,CAAoB,CAAC,CAAA,CACnBC,CAAAA,CAASL,CAAAA,CAAQ,GAAA,CAAKM,CAAAA,EAAU,CACpC,IAAMC,CAAAA,CAAS,CACb,UAAA,CAAYD,CAAAA,CAAM,EAAA,CAClB,cAAA,CAAgBA,CAAAA,CAAM,UAAA,CACtB,gBAAA,CAAkBA,CAAAA,CAAM,mBAAA,CACxB,WAAA,CAAaA,CAAAA,CAAM,eAAA,CACnB,GAAIV,CAAAA,CACA,CAAE,KAAA,CAAOU,CAAAA,CAAM,IAAA,CAAM,iBAAA,CAAmBA,CAAAA,CAAM,cAAe,CAAA,CAC7D,CAAC,CAAA,CACL,eAAA,CAAiB,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-C3YOETUJ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport type { UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';\nimport colors from 'colors';\nimport { uniq } from 'lodash-es';\nimport { pullUnstructuredSubDataPointRecommendations } from '../../../lib/data-inventory';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport { logger } from '../../../logger';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { writeLargeCsv } from '../../../lib/helpers';\n\nexport interface PullUnstructuredDiscoveryFilesCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n subCategories?: string[];\n status?: UnstructuredSubDataPointRecommendationStatus[];\n includeEncryptedSnippets: boolean;\n}\n\nexport async function pullUnstructuredDiscoveryFiles(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n subCategories,\n status,\n includeEncryptedSnippets,\n }: PullUnstructuredDiscoveryFilesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const entries = await pullUnstructuredSubDataPointRecommendations(client, {\n dataSiloIds,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n status,\n includeEncryptedSnippets,\n });\n\n logger.info(\n colors.magenta(\n `Writing unstructured discovery files to file \"${file}\"...`,\n ),\n );\n let headers: string[] = [];\n const inputs = entries.map((entry) => {\n const result = {\n 'Entry ID': entry.id,\n 'Data Silo ID': entry.dataSiloId,\n 'Object Path ID': entry.scannedObjectPathId,\n 'Object ID': entry.scannedObjectId,\n ...(includeEncryptedSnippets\n ? { Entry: entry.name, 'Context Snippet': entry.contextSnippet }\n : {}),\n 'Data Category': `${entry.dataSubCategory.category}:${entry.dataSubCategory.name}`,\n 'Classification Status': entry.status,\n 'Confidence Score': entry.confidence,\n 'Classification Method': entry.classificationMethod,\n 'Classifier Version': entry.classifierVersion,\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n await writeLargeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(\n `An error occurred syncing the unstructured discovery files: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced unstructured discovery files to disk at ${file}!`,\n ),\n );\n}\n"]}
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP5GD5LAKcjs = require('./chunk-P5GD5LAK.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkDQCPGPXGcjs = require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _fs = require('fs');async function N({email:o,password:r,apiKeyTitle:n,file:s,scopes:a,deleteExistingApiKey:p,createNewApiKey:m,parentOrganizationId:c,transcendUrl:l}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let g=a.map(d=>_chunkDQCPGPXGcjs.w[d].name),{errors:y,apiKeys:f}=await _chunkP5GD5LAKcjs.a.call(void 0, {transcendUrl:l,password:r,email:o,parentOrganizationId:c,deleteExistingApiKey:p,createNewApiKey:m,apiKeyTitle:n,scopes:g});_fs.writeFileSync.call(void 0, s,`${JSON.stringify(f,null,2)}
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZNTCC7Y7cjs = require('./chunk-ZNTCC7Y7.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');var _chunk5MG2CEZVcjs = require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');var _fs = require('fs');async function N({email:o,password:r,apiKeyTitle:n,file:s,scopes:a,deleteExistingApiKey:p,createNewApiKey:m,parentOrganizationId:c,transcendUrl:l}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let g=a.map(d=>_chunk5MG2CEZVcjs.w[d].name),{errors:y,apiKeys:f}=await _chunkZNTCC7Y7cjs.a.call(void 0, {transcendUrl:l,password:r,email:o,parentOrganizationId:c,deleteExistingApiKey:p,createNewApiKey:m,apiKeyTitle:n,scopes:g});_fs.writeFileSync.call(void 0, s,`${JSON.stringify(f,null,2)}
2
2
  `),y.length>0&&this.process.exit(1)}exports.generateApiKeys = N;
3
- //# sourceMappingURL=impl-2JA6BPE7.cjs.map
3
+ //# sourceMappingURL=impl-CUQGOWYL.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-2JA6BPE7.cjs","../src/commands/admin/generate-api-keys/impl.ts"],"names":["generateApiKeys","email","password","apiKeyTitle","file","scopes","deleteExistingApiKey","createNewApiKey","parentOrganizationId","transcendUrl","doneInputValidation","scopeNames","scopeTitle","SCOPES_BY_TITLE","errors","apiKeys","generateCrossAccountApiKeys","writeFileSync"],"mappings":"AAAA,iIAAwC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,wBCC7O,MAsB9B,SAAsBA,CAAAA,CAEpB,CACE,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,IAAMC,CAAAA,CAAaN,CAAAA,CAAO,GAAA,CACvBO,CAAAA,EAAeC,mBAAAA,CAAgBD,CAAU,CAAA,CAAE,IAC9C,CAAA,CAGM,CAAE,MAAA,CAAAE,CAAAA,CAAQ,OAAA,CAAAC,CAAQ,CAAA,CAAI,MAAMC,iCAAAA,CAChC,YAAA,CAAAP,CAAAA,CACA,QAAA,CAAAP,CAAAA,CACA,KAAA,CAAAD,CAAAA,CACA,oBAAA,CAAAO,CAAAA,CACA,oBAAA,CAAAF,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,WAAA,CAAAJ,CAAAA,CACA,MAAA,CAAQQ,CACV,CAAC,CAAA,CAGDM,+BAAAA,CAAcb,CAAM,CAAA,EAAA;AAItB","file":"/home/runner/work/cli/cli/dist/impl-2JA6BPE7.cjs","sourcesContent":[null,"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"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-CUQGOWYL.cjs","../src/commands/admin/generate-api-keys/impl.ts"],"names":["generateApiKeys","email","password","apiKeyTitle","file","scopes","deleteExistingApiKey","createNewApiKey","parentOrganizationId","transcendUrl","doneInputValidation","scopeNames","scopeTitle","SCOPES_BY_TITLE","errors","apiKeys","generateCrossAccountApiKeys","writeFileSync"],"mappings":"AAAA,iIAAwC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,wBCC7O,MAsB9B,SAAsBA,CAAAA,CAEpB,CACE,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,IAAMC,CAAAA,CAAaN,CAAAA,CAAO,GAAA,CACvBO,CAAAA,EAAeC,mBAAAA,CAAgBD,CAAU,CAAA,CAAE,IAC9C,CAAA,CAGM,CAAE,MAAA,CAAAE,CAAAA,CAAQ,OAAA,CAAAC,CAAQ,CAAA,CAAI,MAAMC,iCAAAA,CAChC,YAAA,CAAAP,CAAAA,CACA,QAAA,CAAAP,CAAAA,CACA,KAAA,CAAAD,CAAAA,CACA,oBAAA,CAAAO,CAAAA,CACA,oBAAA,CAAAF,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,WAAA,CAAAJ,CAAAA,CACA,MAAA,CAAQQ,CACV,CAAC,CAAA,CAGDM,+BAAAA,CAAcb,CAAM,CAAA,EAAA;AAItB","file":"/home/runner/work/cli/cli/dist/impl-CUQGOWYL.cjs","sourcesContent":[null,"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"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPGO2YKRXcjs = require('./chunk-PGO2YKRX.cjs');require('./chunk-D3VRD5F5.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');async function m({auth:a,trackerStatus:r,file:s,classifyService:e,transcendUrl:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkPGO2YKRXcjs.b.call(void 0, {auth:a,trackerStatus:r,file:s,classifyService:e,transcendUrl:n})}exports.uploadDataFlowsFromCsv = m;
2
- //# sourceMappingURL=impl-JY7YM3QH.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4NEO6Q2Fcjs = require('./chunk-4NEO6Q2F.cjs');require('./chunk-HZU3YROT.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');async function m({auth:a,trackerStatus:r,file:s,classifyService:e,transcendUrl:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk4NEO6Q2Fcjs.b.call(void 0, {auth:a,trackerStatus:r,file:s,classifyService:e,transcendUrl:n})}exports.uploadDataFlowsFromCsv = m;
2
+ //# sourceMappingURL=impl-CWWJOV4W.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-JY7YM3QH.cjs","../src/commands/consent/upload-data-flows-from-csv/impl.ts"],"names":["uploadDataFlowsFromCsv","auth","trackerStatus","file","classifyService","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCa5R,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMN,iCAAAA,CACJ,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,mCAAA","file":"/home/runner/work/cli/cli/dist/impl-JY7YM3QH.cjs","sourcesContent":[null,"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"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-CWWJOV4W.cjs","../src/commands/consent/upload-data-flows-from-csv/impl.ts"],"names":["uploadDataFlowsFromCsv","auth","trackerStatus","file","classifyService","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCa5R,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMN,iCAAAA,CACJ,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,mCAAA","file":"/home/runner/work/cli/cli/dist/impl-CWWJOV4W.cjs","sourcesContent":[null,"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"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');async function y({auth:s,requestReceiptFolder:r,sombraAuth:o,actions:a,statuses:i,requestIds:n,createdAt:c,emailIsVerified:u,silentModeBefore:d,sendEmailReceipt:m,copyIdentifiers:p,skipWaitingPeriod:l,createdAtBefore:f,createdAtAfter:R,concurrency:q,transcendUrl:g}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk56QKBG2Rcjs.Of.call(void 0, {requestReceiptFolder:r,auth:s,sombraAuth:o,requestActions:a,requestStatuses:i,requestIds:n,createdAt:c,emailIsVerified:u,silentModeBefore:d,sendEmailReceipt:m,copyIdentifiers:p,skipWaitingPeriod:l,createdAtBefore:f,createdAtAfter:R,concurrency:q,transcendUrl:g})}exports.restart = y;
2
- //# sourceMappingURL=impl-QPLTL2SO.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkKYOQWIIScjs = require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');async function y({auth:s,requestReceiptFolder:r,sombraAuth:o,actions:a,statuses:i,requestIds:n,createdAt:c,emailIsVerified:u,silentModeBefore:d,sendEmailReceipt:m,copyIdentifiers:p,skipWaitingPeriod:l,createdAtBefore:f,createdAtAfter:R,concurrency:q,transcendUrl:g}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkKYOQWIIScjs.Of.call(void 0, {requestReceiptFolder:r,auth:s,sombraAuth:o,requestActions:a,requestStatuses:i,requestIds:n,createdAt:c,emailIsVerified:u,silentModeBefore:d,sendEmailReceipt:m,copyIdentifiers:p,skipWaitingPeriod:l,createdAtBefore:f,createdAtAfter:R,concurrency:q,transcendUrl:g})}exports.restart = y;
2
+ //# sourceMappingURL=impl-D27XUTVP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-QPLTL2SO.cjs","../src/commands/request/restart/impl.ts"],"names":["restart","auth","requestReceiptFolder","sombraAuth","actions","statuses","requestIds","createdAt","emailIsVerified","silentModeBefore","sendEmailReceipt","copyIdentifiers","skipWaitingPeriod","createdAtBefore","createdAtAfter","concurrency","transcendUrl","doneInputValidation","bulkRestartRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCwBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,oBAAA,CAAAhB,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,eAAA,CAAiBC,CAAAA,CACjB,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-QPLTL2SO.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { bulkRestartRequests } from '../../../lib/requests';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface RestartCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses: RequestStatus[];\n transcendUrl: string;\n requestReceiptFolder: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n emailIsVerified: boolean;\n createdAt?: Date;\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n sendEmailReceipt: boolean;\n copyIdentifiers: boolean;\n skipWaitingPeriod: boolean;\n}\n\nexport async function restart(\n this: LocalContext,\n {\n auth,\n requestReceiptFolder,\n sombraAuth,\n actions,\n statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n }: RestartCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await bulkRestartRequests({\n requestReceiptFolder,\n auth,\n sombraAuth,\n requestActions: actions,\n requestStatuses: statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-D27XUTVP.cjs","../src/commands/request/restart/impl.ts"],"names":["restart","auth","requestReceiptFolder","sombraAuth","actions","statuses","requestIds","createdAt","emailIsVerified","silentModeBefore","sendEmailReceipt","copyIdentifiers","skipWaitingPeriod","createdAtBefore","createdAtAfter","concurrency","transcendUrl","doneInputValidation","bulkRestartRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCwBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,oBAAA,CAAAhB,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,eAAA,CAAiBC,CAAAA,CACjB,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-D27XUTVP.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { bulkRestartRequests } from '../../../lib/requests';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface RestartCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses: RequestStatus[];\n transcendUrl: string;\n requestReceiptFolder: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n emailIsVerified: boolean;\n createdAt?: Date;\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n sendEmailReceipt: boolean;\n copyIdentifiers: boolean;\n skipWaitingPeriod: boolean;\n}\n\nexport async function restart(\n this: LocalContext,\n {\n auth,\n requestReceiptFolder,\n sombraAuth,\n actions,\n statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n }: RestartCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await bulkRestartRequests({\n requestReceiptFolder,\n auth,\n sombraAuth,\n requestActions: actions,\n requestStatuses: statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkVUQAH7YKcjs = require('./chunk-VUQAH7YK.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');var _path = require('path');async function A({auth:h,partition:l,sombraAuth:u,transcendUrl:b,file:s="",directory:o,dryRun:v,skipExistingRecordCheck:a,receiptFileDir:x,skipWorkflowTriggers:y,forceTriggerWorkflows:F,skipConflictUpdates:C,isSilent:P,attributes:$,concurrency:w}){o&&s&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Cannot provide both a directory and a file. Please provide only one.")),this.process.exit(1)),!s&&!o&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences")),this.process.exit(1)),_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let t=[];if(o)try{let n=_fs.readdirSync.call(void 0, o).filter(c=>c.endsWith(".csv"));n.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No CSV files found in directory: ${o}`)),this.process.exit(1)),t.push(...n.map(c=>_path.join.call(void 0, o,c)))}catch(i){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${o}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(i.message)),this.process.exit(1)}else try{s.endsWith(".csv")||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("File must be a CSV file")),this.process.exit(1)),t.push(s)}catch(i){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to access file: ${s}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(i.message)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Processing ${t.length} consent preferences files for partition: ${l}`)),_chunkZUNVPK23cjs.a.debug(`Files to process: ${t.join(", ")}`),a&&_chunkZUNVPK23cjs.a.info(_colors2.default.bgYellow(`Skipping existing record check: ${a}`)),await _chunk56QKBG2Rcjs.a.call(void 0, t,async i=>{let n=_path.basename.call(void 0, i).replace(".csv","");await _chunkVUQAH7YKcjs.a.call(void 0, {receiptFilepath:_path.join.call(void 0, x,`${n}-receipts.json`),auth:h,sombraAuth:u,file:i,partition:l,transcendUrl:b,skipConflictUpdates:C,skipWorkflowTriggers:y,skipExistingRecordCheck:a,isSilent:P,dryRun:v,attributes:_chunk56QKBG2Rcjs.rc.call(void 0, $),forceTriggerWorkflows:F})},{concurrency:w})}exports.uploadPreferences = A;
2
- //# sourceMappingURL=impl-MRC5UI22.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkEMLESF76cjs = require('./chunk-EMLESF76.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkKYOQWIIScjs = require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');var _path = require('path');async function A({auth:h,partition:l,sombraAuth:u,transcendUrl:b,file:s="",directory:o,dryRun:v,skipExistingRecordCheck:a,receiptFileDir:x,skipWorkflowTriggers:y,forceTriggerWorkflows:F,skipConflictUpdates:C,isSilent:P,attributes:$,concurrency:w}){o&&s&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Cannot provide both a directory and a file. Please provide only one.")),this.process.exit(1)),!s&&!o&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences")),this.process.exit(1)),_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let t=[];if(o)try{let n=_fs.readdirSync.call(void 0, o).filter(c=>c.endsWith(".csv"));n.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No CSV files found in directory: ${o}`)),this.process.exit(1)),t.push(...n.map(c=>_path.join.call(void 0, o,c)))}catch(i){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${o}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(i.message)),this.process.exit(1)}else try{s.endsWith(".csv")||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("File must be a CSV file")),this.process.exit(1)),t.push(s)}catch(i){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to access file: ${s}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(i.message)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Processing ${t.length} consent preferences files for partition: ${l}`)),_chunkZUNVPK23cjs.a.debug(`Files to process: ${t.join(", ")}`),a&&_chunkZUNVPK23cjs.a.info(_colors2.default.bgYellow(`Skipping existing record check: ${a}`)),await _chunkKYOQWIIScjs.a.call(void 0, t,async i=>{let n=_path.basename.call(void 0, i).replace(".csv","");await _chunkEMLESF76cjs.a.call(void 0, {receiptFilepath:_path.join.call(void 0, x,`${n}-receipts.json`),auth:h,sombraAuth:u,file:i,partition:l,transcendUrl:b,skipConflictUpdates:C,skipWorkflowTriggers:y,skipExistingRecordCheck:a,isSilent:P,dryRun:v,attributes:_chunkKYOQWIIScjs.rc.call(void 0, $),forceTriggerWorkflows:F})},{concurrency:w})}exports.uploadPreferences = A;
2
+ //# sourceMappingURL=impl-D6D7MZ4F.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-MRC5UI22.cjs","../src/commands/consent/upload-preferences/impl.ts"],"names":["uploadPreferences","auth","partition","sombraAuth","transcendUrl","file","directory","dryRun","skipExistingRecordCheck","receiptFileDir","skipWorkflowTriggers","forceTriggerWorkflows","skipConflictUpdates","isSilent","attributes","concurrency","logger","colors","doneInputValidation","files","csvFiles","readdirSync"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAiD,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCC/O,wBAKS,4BAEG,MAsB/B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CAAO,EAAA,CACP,SAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,qBAAA,CAAAC,CAAAA,CACA,mBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACTT,CAAAA,EAAeD,CAAAA,EAAAA,CACnBW,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,sEACF,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGjB,CAACZ,CAAAA,EAAQ,CAACC,CAAAA,EAAAA,CACZU,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,sHACF,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrBC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,IAAMC,CAAAA,CAAkB,CAAC,CAAA,CAEzB,EAAA,CAAIb,CAAAA,CACF,GAAI,CAEF,IAAMc,CAAAA,CADmBC,6BAAAA,CAAqB,CAAA,CACZ,MAAA,CAAQhB,CAAAA,EAASA,CAAAA,CAAK,QAAA,CAAS,MAAM,CAAC,CAAA,CAEpEe,CAAAA,CAAS,MAAA,GAAW,CAAA,EAAA,CACtBJ,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CAAI,CAAA,iCAAA,EAAoCX,CAAS,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-MRC5UI22.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport { logger } from '../../../logger';\nimport { uploadPreferenceManagementPreferencesInteractive } from '../../../lib/preference-management';\nimport { splitCsvToList } from '../../../lib/requests';\nimport { readdirSync } from 'node:fs';\nimport { map } from '../../../lib/bluebird';\nimport { basename, join } from 'node:path';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n transcendUrl: string;\n file?: string;\n directory?: string;\n dryRun: boolean;\n skipExistingRecordCheck: boolean;\n receiptFileDir: string;\n skipWorkflowTriggers: boolean;\n forceTriggerWorkflows: boolean;\n skipConflictUpdates: boolean;\n isSilent: boolean;\n attributes: string;\n receiptFilepath: string;\n concurrency: number;\n}\n\nexport async function uploadPreferences(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n transcendUrl,\n file = '',\n directory,\n dryRun,\n skipExistingRecordCheck,\n receiptFileDir,\n skipWorkflowTriggers,\n forceTriggerWorkflows,\n skipConflictUpdates,\n isSilent,\n attributes,\n concurrency,\n }: UploadPreferencesCommandFlags,\n): Promise<void> {\n if (!!directory && !!file) {\n logger.error(\n colors.red(\n 'Cannot provide both a directory and a file. Please provide only one.',\n ),\n );\n this.process.exit(1);\n }\n\n if (!file && !directory) {\n logger.error(\n colors.red(\n 'A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences',\n ),\n );\n this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n const files: string[] = [];\n\n if (directory) {\n try {\n const filesInDirectory = readdirSync(directory);\n const csvFiles = filesInDirectory.filter((file) => file.endsWith('.csv'));\n\n if (csvFiles.length === 0) {\n logger.error(\n colors.red(`No CSV files found in directory: ${directory}`),\n );\n this.process.exit(1);\n }\n\n // Add full paths for each CSV file\n files.push(...csvFiles.map((file) => join(directory, file)));\n } catch (err) {\n logger.error(colors.red(`Failed to read directory: ${directory}`));\n logger.error(colors.red((err as Error).message));\n this.process.exit(1);\n }\n } else {\n try {\n // Verify file exists and is a CSV\n if (!file.endsWith('.csv')) {\n logger.error(colors.red('File must be a CSV file'));\n this.process.exit(1);\n }\n files.push(file);\n } catch (err) {\n logger.error(colors.red(`Failed to access file: ${file}`));\n logger.error(colors.red((err as Error).message));\n this.process.exit(1);\n }\n }\n\n logger.info(\n colors.green(\n `Processing ${files.length} consent preferences files for partition: ${partition}`,\n ),\n );\n logger.debug(`Files to process: ${files.join(', ')}`);\n\n if (skipExistingRecordCheck) {\n logger.info(\n colors.bgYellow(\n `Skipping existing record check: ${skipExistingRecordCheck}`,\n ),\n );\n }\n\n await map(\n files,\n async (filePath) => {\n const fileName = basename(filePath).replace('.csv', '');\n await uploadPreferenceManagementPreferencesInteractive({\n receiptFilepath: join(receiptFileDir, `${fileName}-receipts.json`),\n auth,\n sombraAuth,\n file: filePath,\n partition,\n transcendUrl,\n skipConflictUpdates,\n skipWorkflowTriggers,\n skipExistingRecordCheck,\n isSilent,\n dryRun,\n attributes: splitCsvToList(attributes),\n forceTriggerWorkflows,\n });\n },\n { concurrency },\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-D6D7MZ4F.cjs","../src/commands/consent/upload-preferences/impl.ts"],"names":["uploadPreferences","auth","partition","sombraAuth","transcendUrl","file","directory","dryRun","skipExistingRecordCheck","receiptFileDir","skipWorkflowTriggers","forceTriggerWorkflows","skipConflictUpdates","isSilent","attributes","concurrency","logger","colors","doneInputValidation","files","csvFiles","readdirSync"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAiD,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCC/O,wBAKS,4BAEG,MAsB/B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CAAO,EAAA,CACP,SAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,qBAAA,CAAAC,CAAAA,CACA,mBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACTT,CAAAA,EAAeD,CAAAA,EAAAA,CACnBW,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,sEACF,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGjB,CAACZ,CAAAA,EAAQ,CAACC,CAAAA,EAAAA,CACZU,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,sHACF,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrBC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,IAAMC,CAAAA,CAAkB,CAAC,CAAA,CAEzB,EAAA,CAAIb,CAAAA,CACF,GAAI,CAEF,IAAMc,CAAAA,CADmBC,6BAAAA,CAAqB,CAAA,CACZ,MAAA,CAAQhB,CAAAA,EAASA,CAAAA,CAAK,QAAA,CAAS,MAAM,CAAC,CAAA,CAEpEe,CAAAA,CAAS,MAAA,GAAW,CAAA,EAAA,CACtBJ,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CAAI,CAAA,iCAAA,EAAoCX,CAAS,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-D6D7MZ4F.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport { logger } from '../../../logger';\nimport { uploadPreferenceManagementPreferencesInteractive } from '../../../lib/preference-management';\nimport { splitCsvToList } from '../../../lib/requests';\nimport { readdirSync } from 'node:fs';\nimport { map } from '../../../lib/bluebird';\nimport { basename, join } from 'node:path';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n transcendUrl: string;\n file?: string;\n directory?: string;\n dryRun: boolean;\n skipExistingRecordCheck: boolean;\n receiptFileDir: string;\n skipWorkflowTriggers: boolean;\n forceTriggerWorkflows: boolean;\n skipConflictUpdates: boolean;\n isSilent: boolean;\n attributes: string;\n receiptFilepath: string;\n concurrency: number;\n}\n\nexport async function uploadPreferences(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n transcendUrl,\n file = '',\n directory,\n dryRun,\n skipExistingRecordCheck,\n receiptFileDir,\n skipWorkflowTriggers,\n forceTriggerWorkflows,\n skipConflictUpdates,\n isSilent,\n attributes,\n concurrency,\n }: UploadPreferencesCommandFlags,\n): Promise<void> {\n if (!!directory && !!file) {\n logger.error(\n colors.red(\n 'Cannot provide both a directory and a file. Please provide only one.',\n ),\n );\n this.process.exit(1);\n }\n\n if (!file && !directory) {\n logger.error(\n colors.red(\n 'A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences',\n ),\n );\n this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n const files: string[] = [];\n\n if (directory) {\n try {\n const filesInDirectory = readdirSync(directory);\n const csvFiles = filesInDirectory.filter((file) => file.endsWith('.csv'));\n\n if (csvFiles.length === 0) {\n logger.error(\n colors.red(`No CSV files found in directory: ${directory}`),\n );\n this.process.exit(1);\n }\n\n // Add full paths for each CSV file\n files.push(...csvFiles.map((file) => join(directory, file)));\n } catch (err) {\n logger.error(colors.red(`Failed to read directory: ${directory}`));\n logger.error(colors.red((err as Error).message));\n this.process.exit(1);\n }\n } else {\n try {\n // Verify file exists and is a CSV\n if (!file.endsWith('.csv')) {\n logger.error(colors.red('File must be a CSV file'));\n this.process.exit(1);\n }\n files.push(file);\n } catch (err) {\n logger.error(colors.red(`Failed to access file: ${file}`));\n logger.error(colors.red((err as Error).message));\n this.process.exit(1);\n }\n }\n\n logger.info(\n colors.green(\n `Processing ${files.length} consent preferences files for partition: ${partition}`,\n ),\n );\n logger.debug(`Files to process: ${files.join(', ')}`);\n\n if (skipExistingRecordCheck) {\n logger.info(\n colors.bgYellow(\n `Skipping existing record check: ${skipExistingRecordCheck}`,\n ),\n );\n }\n\n await map(\n files,\n async (filePath) => {\n const fileName = basename(filePath).replace('.csv', '');\n await uploadPreferenceManagementPreferencesInteractive({\n receiptFilepath: join(receiptFileDir, `${fileName}-receipts.json`),\n auth,\n sombraAuth,\n file: filePath,\n partition,\n transcendUrl,\n skipConflictUpdates,\n skipWorkflowTriggers,\n skipExistingRecordCheck,\n isSilent,\n dryRun,\n attributes: splitCsvToList(attributes),\n forceTriggerWorkflows,\n });\n },\n { concurrency },\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkPGO2YKRXcjs = require('./chunk-PGO2YKRX.cjs');require('./chunk-D3VRD5F5.cjs');var _chunkP5GD5LAKcjs = require('./chunk-P5GD5LAK.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function L({auth:d,xdiLocation:c,file:o,removeIpAddresses:l,domainBlockList:i,xdiAllowedCommands:a,transcendUrl:m}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let p=await _chunkP5GD5LAKcjs.b.call(void 0, d),{syncGroups:f,html:u}=await _chunkPGO2YKRXcjs.g.call(void 0, p,{xdiLocation:c,transcendUrl:m,removeIpAddresses:l,domainBlockList:i.length>0?i:void 0,xdiAllowedCommands:a});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(f,null,2)}`)),_fs.writeFileSync.call(void 0, o,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Wrote configuration to file "${o}"!`))}exports.buildXdiSyncEndpoint = L;
2
- //# sourceMappingURL=impl-Z54SB7SM.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk4NEO6Q2Fcjs = require('./chunk-4NEO6Q2F.cjs');require('./chunk-HZU3YROT.cjs');var _chunkZNTCC7Y7cjs = require('./chunk-ZNTCC7Y7.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function L({auth:d,xdiLocation:c,file:o,removeIpAddresses:l,domainBlockList:i,xdiAllowedCommands:a,transcendUrl:m}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let p=await _chunkZNTCC7Y7cjs.b.call(void 0, d),{syncGroups:f,html:u}=await _chunk4NEO6Q2Fcjs.g.call(void 0, p,{xdiLocation:c,transcendUrl:m,removeIpAddresses:l,domainBlockList:i.length>0?i:void 0,xdiAllowedCommands:a});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(f,null,2)}`)),_fs.writeFileSync.call(void 0, o,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Wrote configuration to file "${o}"!`))}exports.buildXdiSyncEndpoint = L;
2
+ //# sourceMappingURL=impl-EOWKDUEB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-Z54SB7SM.cjs","../src/commands/consent/build-xdi-sync-endpoint/impl.ts"],"names":["buildXdiSyncEndpoint","auth","xdiLocation","file","removeIpAddresses","domainBlockList","xdiAllowedCommands","transcendUrl","doneInputValidation","apiKeyOrList","validateTranscendAuth","syncGroups","html","logger","colors"],"mappings":"AAAA,iOAAwC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCE9T,wBACW,MAe9B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAe,MAAMC,iCAAAA,CAA0B,CAAA,CAG/C,CAAE,UAAA,CAAAC,CAAAA,CAAY,IAAA,CAAAC,CAAK,CAAA,CAAI,MAAMZ,iCAAAA,CAA2BS,CAAc,CAC1E,WAAA,CAAAP,CAAAA,CACA,YAAA,CAAAK,CAAAA,CACA,iBAAA,CAAAH,CAAAA,CACA,eAAA,CAAiBC,CAAAA,CAAgB,MAAA,CAAS,CAAA,CAAIA,CAAAA,CAAkB,KAAA,CAAA,CAChE,kBAAA,CAAAC,CACF,CAAC,CAAA,CAGDO,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,wDAAA,EAA2D,IAAA,CAAK,SAAA,CAC9DH,CAAAA,CACA,IAAA,CACA,CACF,CAAC,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-Z54SB7SM.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { writeFileSync } from 'node:fs';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { buildXdiSyncEndpoint as buildXdiSyncEndpointHelper } from '../../../lib/consent-manager';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface BuildXdiSyncEndpointCommandFlags {\n auth: string;\n xdiLocation: string;\n file: string;\n removeIpAddresses: boolean;\n domainBlockList: string[];\n xdiAllowedCommands: string;\n transcendUrl: string;\n}\n\nexport async function buildXdiSyncEndpoint(\n this: LocalContext,\n {\n auth,\n xdiLocation,\n file,\n removeIpAddresses,\n domainBlockList,\n xdiAllowedCommands,\n transcendUrl,\n }: BuildXdiSyncEndpointCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Build the sync endpoint\n const { syncGroups, html } = await buildXdiSyncEndpointHelper(apiKeyOrList, {\n xdiLocation,\n transcendUrl,\n removeIpAddresses,\n domainBlockList: domainBlockList.length > 0 ? domainBlockList : undefined,\n xdiAllowedCommands,\n });\n\n // Log success\n logger.info(\n colors.green(\n `Successfully constructed sync endpoint for sync groups: ${JSON.stringify(\n syncGroups,\n null,\n 2,\n )}`,\n ),\n );\n\n // Write to disk\n writeFileSync(file, html);\n logger.info(colors.green(`Wrote configuration to file \"${file}\"!`));\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-EOWKDUEB.cjs","../src/commands/consent/build-xdi-sync-endpoint/impl.ts"],"names":["buildXdiSyncEndpoint","auth","xdiLocation","file","removeIpAddresses","domainBlockList","xdiAllowedCommands","transcendUrl","doneInputValidation","apiKeyOrList","validateTranscendAuth","syncGroups","html","logger","colors"],"mappings":"AAAA,iOAAwC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCE9T,wBACW,MAe9B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAe,MAAMC,iCAAAA,CAA0B,CAAA,CAG/C,CAAE,UAAA,CAAAC,CAAAA,CAAY,IAAA,CAAAC,CAAK,CAAA,CAAI,MAAMZ,iCAAAA,CAA2BS,CAAc,CAC1E,WAAA,CAAAP,CAAAA,CACA,YAAA,CAAAK,CAAAA,CACA,iBAAA,CAAAH,CAAAA,CACA,eAAA,CAAiBC,CAAAA,CAAgB,MAAA,CAAS,CAAA,CAAIA,CAAAA,CAAkB,KAAA,CAAA,CAChE,kBAAA,CAAAC,CACF,CAAC,CAAA,CAGDO,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,wDAAA,EAA2D,IAAA,CAAK,SAAA,CAC9DH,CAAAA,CACA,IAAA,CACA,CACF,CAAC,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-EOWKDUEB.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { writeFileSync } from 'node:fs';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { buildXdiSyncEndpoint as buildXdiSyncEndpointHelper } from '../../../lib/consent-manager';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface BuildXdiSyncEndpointCommandFlags {\n auth: string;\n xdiLocation: string;\n file: string;\n removeIpAddresses: boolean;\n domainBlockList: string[];\n xdiAllowedCommands: string;\n transcendUrl: string;\n}\n\nexport async function buildXdiSyncEndpoint(\n this: LocalContext,\n {\n auth,\n xdiLocation,\n file,\n removeIpAddresses,\n domainBlockList,\n xdiAllowedCommands,\n transcendUrl,\n }: BuildXdiSyncEndpointCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Build the sync endpoint\n const { syncGroups, html } = await buildXdiSyncEndpointHelper(apiKeyOrList, {\n xdiLocation,\n transcendUrl,\n removeIpAddresses,\n domainBlockList: domainBlockList.length > 0 ? domainBlockList : undefined,\n xdiAllowedCommands,\n });\n\n // Log success\n logger.info(\n colors.green(\n `Successfully constructed sync endpoint for sync groups: ${JSON.stringify(\n syncGroups,\n null,\n 2,\n )}`,\n ),\n );\n\n // Write to disk\n writeFileSync(file, html);\n logger.info(colors.green(`Wrote configuration to file \"${file}\"!`));\n}\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkILBF5XZNcjs = require('./chunk-ILBF5XZN.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');async function u({auth:r,transcendUrl:i,file:e,enricherId:o,concurrency:s,markSilent:a,sombraAuth:m}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkILBF5XZNcjs.d.call(void 0, {file:e,transcendUrl:i,enricherId:o,concurrency:s,markSilent:a,auth:r,sombraAuth:m})}exports.pushIdentifiers = u;
2
+ //# sourceMappingURL=impl-EQL4NORJ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-JI6COVDW.cjs","../src/commands/request/preflight/push-identifiers/impl.ts"],"names":["pushIdentifiers","auth","transcendUrl","file","enricherId","concurrency","markSilent","sombraAuth","doneInputValidation","pushManualEnrichmentIdentifiersFromCsv"],"mappings":"AAAA,iIAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCclO,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAN,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAL,CAAAA,CACA,UAAA,CAAAM,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-JI6COVDW.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pushManualEnrichmentIdentifiersFromCsv } from '../../../../lib/manual-enrichment';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PushIdentifiersCommandFlags {\n auth: string;\n enricherId: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n markSilent: boolean;\n concurrency: number;\n}\n\nexport async function pushIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n enricherId,\n concurrency,\n markSilent,\n sombraAuth,\n }: PushIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pushManualEnrichmentIdentifiersFromCsv({\n file,\n transcendUrl,\n enricherId,\n concurrency,\n markSilent,\n auth,\n sombraAuth,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-EQL4NORJ.cjs","../src/commands/request/preflight/push-identifiers/impl.ts"],"names":["pushIdentifiers","auth","transcendUrl","file","enricherId","concurrency","markSilent","sombraAuth","doneInputValidation","pushManualEnrichmentIdentifiersFromCsv"],"mappings":"AAAA,iIAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCclO,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAN,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAL,CAAAA,CACA,UAAA,CAAAM,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-EQL4NORJ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pushManualEnrichmentIdentifiersFromCsv } from '../../../../lib/manual-enrichment';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PushIdentifiersCommandFlags {\n auth: string;\n enricherId: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n markSilent: boolean;\n concurrency: number;\n}\n\nexport async function pushIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n enricherId,\n concurrency,\n markSilent,\n sombraAuth,\n }: PushIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pushManualEnrichmentIdentifiersFromCsv({\n file,\n transcendUrl,\n enricherId,\n concurrency,\n markSilent,\n auth,\n sombraAuth,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');async function c({auth:o,dataSiloId:a,actions:r,transcendUrl:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk56QKBG2Rcjs.Rf.call(void 0, {requestActions:r,transcendUrl:s,auth:o,dataSiloId:a})}exports.retryRequestDataSilos = c;
2
- //# sourceMappingURL=impl-4YFJOKCA.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkKYOQWIIScjs = require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');async function c({auth:o,dataSiloId:a,actions:r,transcendUrl:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkKYOQWIIScjs.Rf.call(void 0, {requestActions:r,transcendUrl:s,auth:o,dataSiloId:a})}exports.retryRequestDataSilos = c;
2
+ //# sourceMappingURL=impl-FAE3G5FE.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-4YFJOKCA.cjs","../src/commands/request/system/retry-request-data-silos/impl.ts"],"names":["retryRequestDataSilos","auth","dataSiloId","actions","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCYtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAML,kCAAAA,CACJ,cAAA,CAAgBG,CAAAA,CAChB,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,kCAAA","file":"/home/runner/work/cli/cli/dist/impl-4YFJOKCA.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { retryRequestDataSilos as retryRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface RetryRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n actions: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function retryRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n actions,\n transcendUrl,\n }: RetryRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await retryRequestDataSilosHelper({\n requestActions: actions,\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-FAE3G5FE.cjs","../src/commands/request/system/retry-request-data-silos/impl.ts"],"names":["retryRequestDataSilos","auth","dataSiloId","actions","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCYtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAML,kCAAAA,CACJ,cAAA,CAAgBG,CAAAA,CAChB,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,kCAAA","file":"/home/runner/work/cli/cli/dist/impl-FAE3G5FE.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { retryRequestDataSilos as retryRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface RetryRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n actions: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function retryRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n actions,\n transcendUrl,\n }: RetryRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await retryRequestDataSilosHelper({\n requestActions: actions,\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');async function n({auth:s,dataSiloId:a,status:o,statuses:i,transcendUrl:p}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk56QKBG2Rcjs.Tf.call(void 0, {transcendUrl:p,auth:s,status:o,dataSiloId:a,requestStatuses:i})}exports.skipRequestDataSilos = n;
2
- //# sourceMappingURL=impl-WTGAAEUZ.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkKYOQWIIScjs = require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');async function n({auth:s,dataSiloId:a,status:o,statuses:i,transcendUrl:p}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkKYOQWIIScjs.Tf.call(void 0, {transcendUrl:p,auth:s,status:o,dataSiloId:a,requestStatuses:i})}exports.skipRequestDataSilos = n;
2
+ //# sourceMappingURL=impl-FVEGOBQM.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-WTGAAEUZ.cjs","../src/commands/request/system/skip-request-data-silos/impl.ts"],"names":["skipRequestDataSilos","auth","dataSiloId","status","statuses","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMN,kCAAAA,CACJ,YAAA,CAAAK,CAAAA,CACA,IAAA,CAAAJ,CAAAA,CACA,MAAA,CAAAE,CAAAA,CACA,UAAA,CAAAD,CAAAA,CACA,eAAA,CAAiBE,CACnB,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-WTGAAEUZ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type {\n RequestDataSiloStatus,\n RequestStatus,\n} from '@transcend-io/privacy-types';\nimport { skipRequestDataSilos as skipRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface SkipRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n transcendUrl: string;\n statuses: RequestStatus[];\n status:\n | (typeof RequestDataSiloStatus)['Skipped']\n | (typeof RequestDataSiloStatus)['Resolved'];\n}\n\nexport async function skipRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n status,\n statuses,\n transcendUrl,\n }: SkipRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await skipRequestDataSilosHelper({\n transcendUrl,\n auth,\n status,\n dataSiloId,\n requestStatuses: statuses,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-FVEGOBQM.cjs","../src/commands/request/system/skip-request-data-silos/impl.ts"],"names":["skipRequestDataSilos","auth","dataSiloId","status","statuses","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMN,kCAAAA,CACJ,YAAA,CAAAK,CAAAA,CACA,IAAA,CAAAJ,CAAAA,CACA,MAAA,CAAAE,CAAAA,CACA,UAAA,CAAAD,CAAAA,CACA,eAAA,CAAiBE,CACnB,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-FVEGOBQM.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type {\n RequestDataSiloStatus,\n RequestStatus,\n} from '@transcend-io/privacy-types';\nimport { skipRequestDataSilos as skipRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface SkipRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n transcendUrl: string;\n statuses: RequestStatus[];\n status:\n | (typeof RequestDataSiloStatus)['Skipped']\n | (typeof RequestDataSiloStatus)['Resolved'];\n}\n\nexport async function skipRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n status,\n statuses,\n transcendUrl,\n }: SkipRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await skipRequestDataSilosHelper({\n transcendUrl,\n auth,\n status,\n dataSiloId,\n requestStatuses: statuses,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkLQUVB4MIcjs = require('./chunk-LQUVB4MI.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkDQCPGPXGcjs = require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function v({auth:y,file:a,transcendUrl:C,dataSiloIds:f,includeAttributes:D,includeGuessedCategories:P,parentCategories:b,subCategories:h=[]}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);try{let o=_chunk56QKBG2Rcjs.zc.call(void 0, C,y),$=await _chunkLQUVB4MIcjs.a.call(void 0, o,{dataSiloIds:f,includeGuessedCategories:P,parentCategories:b,includeAttributes:D,subCategories:h});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing datapoints to file "${a}"...`));let s=[],j=$.map(t=>{let n={"Property ID":t.id,"Data Silo":t.dataSilo.title,Object:t.dataPoint.name,"Object Path":t.dataPoint.path.join("."),Property:t.name,"Property Description":t.description,"Data Categories":t.categories.map(e=>`${e.category}:${e.name}`).join(", "),"Guessed Category":_optionalChain([t, 'access', _ => _.pendingCategoryGuesses, 'optionalAccess', _2 => _2[0]])?`${t.pendingCategoryGuesses[0].category.category}:${t.pendingCategoryGuesses[0].category.name}`:"","Processing Purposes":t.purposes.map(e=>`${e.purpose}:${e.name}`).join(", "),...Object.entries(_chunkDQCPGPXGcjs.d.call(void 0, t.attributeValues||[],({attributeKey:e})=>e.name)).reduce((e,[x,A])=>(e[x]=A.map(G=>G.name).join(","),e),{})};return s=_chunkDQCPGPXGcjs.j.call(void 0, [...s,...Object.keys(n)]),n});await _chunk56QKBG2Rcjs.vg.call(void 0, a,j,s)}catch(o){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred syncing the datapoints: ${o.message}`)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced datapoints to disk at ${a}! View at ${_chunkDQCPGPXGcjs.q}`))}exports.pullDatapoints = v;
2
- //# sourceMappingURL=impl-66CDS7IN.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGCTE43TScjs = require('./chunk-GCTE43TS.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkKYOQWIIScjs = require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunk5MG2CEZVcjs = require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function v({auth:y,file:a,transcendUrl:C,dataSiloIds:f,includeAttributes:D,includeGuessedCategories:P,parentCategories:b,subCategories:h=[]}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);try{let o=_chunkKYOQWIIScjs.zc.call(void 0, C,y),$=await _chunkGCTE43TScjs.a.call(void 0, o,{dataSiloIds:f,includeGuessedCategories:P,parentCategories:b,includeAttributes:D,subCategories:h});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing datapoints to file "${a}"...`));let s=[],j=$.map(t=>{let n={"Property ID":t.id,"Data Silo":t.dataSilo.title,Object:t.dataPoint.name,"Object Path":t.dataPoint.path.join("."),Property:t.name,"Property Description":t.description,"Data Categories":t.categories.map(e=>`${e.category}:${e.name}`).join(", "),"Guessed Category":_optionalChain([t, 'access', _ => _.pendingCategoryGuesses, 'optionalAccess', _2 => _2[0]])?`${t.pendingCategoryGuesses[0].category.category}:${t.pendingCategoryGuesses[0].category.name}`:"","Processing Purposes":t.purposes.map(e=>`${e.purpose}:${e.name}`).join(", "),...Object.entries(_chunk5MG2CEZVcjs.d.call(void 0, t.attributeValues||[],({attributeKey:e})=>e.name)).reduce((e,[x,A])=>(e[x]=A.map(G=>G.name).join(","),e),{})};return s=_chunk5MG2CEZVcjs.j.call(void 0, [...s,...Object.keys(n)]),n});await _chunkKYOQWIIScjs.vg.call(void 0, a,j,s)}catch(o){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred syncing the datapoints: ${o.message}`)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced datapoints to disk at ${a}! View at ${_chunk5MG2CEZVcjs.q}`))}exports.pullDatapoints = v;
2
+ //# sourceMappingURL=impl-HNWZZEKE.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-66CDS7IN.cjs","../src/commands/inventory/pull-datapoints/impl.ts"],"names":["pullDatapoints","auth","file","transcendUrl","dataSiloIds","includeAttributes","includeGuessedCategories","parentCategories","subCategories","doneInputValidation","client","buildTranscendGraphQLClient","dataPoints","pullAllDatapoints","logger","colors","headers","inputs","point","result","category"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAuD,gCAA6B,gFCI1Q,MAmBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CAAgB,CAAC,CACnB,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAI,CAEF,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BR,CAAcF,CAAI,CAAA,CAEvDW,CAAAA,CAAa,MAAMC,iCAAAA,CAAkBH,CAAQ,CACjD,WAAA,CAAAN,CAAAA,CACA,wBAAA,CAAAE,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAF,CAAAA,CACA,aAAA,CAAAG,CACF,CAAC,CAAA,CAEDM,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,4BAAA,EAA+Bb,CAAI,CAAA,IAAA,CAAM,CAAC,CAAA,CACrE,IAAIc,CAAAA,CAAoB,CAAC,CAAA,CACnBC,CAAAA,CAASL,CAAAA,CAAW,GAAA,CAAKM,CAAAA,EAAU,CACvC,IAAMC,CAAAA,CAAS,CACb,aAAA,CAAeD,CAAAA,CAAM,EAAA,CACrB,WAAA,CAAaA,CAAAA,CAAM,QAAA,CAAS,KAAA,CAC5B,MAAA,CAAQA,CAAAA,CAAM,SAAA,CAAU,IAAA,CACxB,aAAA,CAAeA,CAAAA,CAAM,SAAA,CAAU,IAAA,CAAK,IAAA,CAAK,GAAG,CAAA,CAC5C,QAAA,CAAUA,CAAAA,CAAM,IAAA,CAChB,sBAAA,CAAwBA,CAAAA,CAAM,WAAA,CAC9B,iBAAA,CAAmBA,CAAAA,CAAM,UAAA,CACtB,GAAA,CAAKE,CAAAA,EAAa,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-66CDS7IN.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { uniq, groupBy } from 'lodash-es';\n\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport { ADMIN_DASH_DATAPOINTS } from '../../../constants';\nimport { pullAllDatapoints } from '../../../lib/data-inventory';\nimport { DataCategoryType } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { writeLargeCsv } from '../../../lib/helpers';\n\nexport interface PullDatapointsCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n includeAttributes: boolean;\n includeGuessedCategories: boolean;\n parentCategories?: DataCategoryType[];\n subCategories?: string[];\n}\n\nexport async function pullDatapoints(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n includeAttributes,\n includeGuessedCategories,\n parentCategories,\n subCategories = [],\n }: PullDatapointsCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const dataPoints = await pullAllDatapoints(client, {\n dataSiloIds,\n includeGuessedCategories,\n parentCategories,\n includeAttributes,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n });\n\n logger.info(colors.magenta(`Writing datapoints to file \"${file}\"...`));\n let headers: string[] = [];\n const inputs = dataPoints.map((point) => {\n const result = {\n 'Property ID': point.id,\n 'Data Silo': point.dataSilo.title,\n Object: point.dataPoint.name,\n 'Object Path': point.dataPoint.path.join('.'),\n Property: point.name,\n 'Property Description': point.description,\n 'Data Categories': point.categories\n .map((category) => `${category.category}:${category.name}`)\n .join(', '),\n 'Guessed Category': point.pendingCategoryGuesses?.[0]\n ? `${point.pendingCategoryGuesses![0]!.category.category}:${\n point.pendingCategoryGuesses![0]!.category.name\n }`\n : '',\n 'Processing Purposes': point.purposes\n .map((purpose) => `${purpose.purpose}:${purpose.name}`)\n .join(', '),\n ...Object.entries(\n groupBy(\n point.attributeValues || [],\n ({ attributeKey }) => attributeKey.name,\n ),\n ).reduce((acc, [key, values]) => {\n acc[key] = values.map((value) => value.name).join(',');\n return acc;\n }, {} as Record<string, string>),\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n await writeLargeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(`An error occurred syncing the datapoints: ${err.message}`),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced datapoints to disk at ${file}! View at ${ADMIN_DASH_DATAPOINTS}`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-HNWZZEKE.cjs","../src/commands/inventory/pull-datapoints/impl.ts"],"names":["pullDatapoints","auth","file","transcendUrl","dataSiloIds","includeAttributes","includeGuessedCategories","parentCategories","subCategories","doneInputValidation","client","buildTranscendGraphQLClient","dataPoints","pullAllDatapoints","logger","colors","headers","inputs","point","result","category"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAuD,gCAA6B,gFCI1Q,MAmBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CAAgB,CAAC,CACnB,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAI,CAEF,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BR,CAAcF,CAAI,CAAA,CAEvDW,CAAAA,CAAa,MAAMC,iCAAAA,CAAkBH,CAAQ,CACjD,WAAA,CAAAN,CAAAA,CACA,wBAAA,CAAAE,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAF,CAAAA,CACA,aAAA,CAAAG,CACF,CAAC,CAAA,CAEDM,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,4BAAA,EAA+Bb,CAAI,CAAA,IAAA,CAAM,CAAC,CAAA,CACrE,IAAIc,CAAAA,CAAoB,CAAC,CAAA,CACnBC,CAAAA,CAASL,CAAAA,CAAW,GAAA,CAAKM,CAAAA,EAAU,CACvC,IAAMC,CAAAA,CAAS,CACb,aAAA,CAAeD,CAAAA,CAAM,EAAA,CACrB,WAAA,CAAaA,CAAAA,CAAM,QAAA,CAAS,KAAA,CAC5B,MAAA,CAAQA,CAAAA,CAAM,SAAA,CAAU,IAAA,CACxB,aAAA,CAAeA,CAAAA,CAAM,SAAA,CAAU,IAAA,CAAK,IAAA,CAAK,GAAG,CAAA,CAC5C,QAAA,CAAUA,CAAAA,CAAM,IAAA,CAChB,sBAAA,CAAwBA,CAAAA,CAAM,WAAA,CAC9B,iBAAA,CAAmBA,CAAAA,CAAM,UAAA,CACtB,GAAA,CAAKE,CAAAA,EAAa,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-HNWZZEKE.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { uniq, groupBy } from 'lodash-es';\n\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport { ADMIN_DASH_DATAPOINTS } from '../../../constants';\nimport { pullAllDatapoints } from '../../../lib/data-inventory';\nimport { DataCategoryType } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { writeLargeCsv } from '../../../lib/helpers';\n\nexport interface PullDatapointsCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n includeAttributes: boolean;\n includeGuessedCategories: boolean;\n parentCategories?: DataCategoryType[];\n subCategories?: string[];\n}\n\nexport async function pullDatapoints(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n includeAttributes,\n includeGuessedCategories,\n parentCategories,\n subCategories = [],\n }: PullDatapointsCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const dataPoints = await pullAllDatapoints(client, {\n dataSiloIds,\n includeGuessedCategories,\n parentCategories,\n includeAttributes,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n });\n\n logger.info(colors.magenta(`Writing datapoints to file \"${file}\"...`));\n let headers: string[] = [];\n const inputs = dataPoints.map((point) => {\n const result = {\n 'Property ID': point.id,\n 'Data Silo': point.dataSilo.title,\n Object: point.dataPoint.name,\n 'Object Path': point.dataPoint.path.join('.'),\n Property: point.name,\n 'Property Description': point.description,\n 'Data Categories': point.categories\n .map((category) => `${category.category}:${category.name}`)\n .join(', '),\n 'Guessed Category': point.pendingCategoryGuesses?.[0]\n ? `${point.pendingCategoryGuesses![0]!.category.category}:${\n point.pendingCategoryGuesses![0]!.category.name\n }`\n : '',\n 'Processing Purposes': point.purposes\n .map((purpose) => `${purpose.purpose}:${purpose.name}`)\n .join(', '),\n ...Object.entries(\n groupBy(\n point.attributeValues || [],\n ({ attributeKey }) => attributeKey.name,\n ),\n ).reduce((acc, [key, values]) => {\n acc[key] = values.map((value) => value.name).join(',');\n return acc;\n }, {} as Record<string, string>),\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n await writeLargeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(`An error occurred syncing the datapoints: ${err.message}`),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced datapoints to disk at ${file}! View at ${ADMIN_DASH_DATAPOINTS}`,\n ),\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkVCPZG4FJcjs = require('./chunk-VCPZG4FJ.cjs');var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunkP5GD5LAKcjs = require('./chunk-P5GD5LAK.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkDQCPGPXGcjs = require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function J({auth:F,dataFlowsYmlFolder:r,output:x,ignoreYmls:C=[],transcendUrl:N}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, r)||!_fs.lstatSync.call(void 0, r).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${r}"`)),this.process.exit(1));let k=C.map(t=>t.split(".")[0]),l=_chunkP5GD5LAKcjs.c.call(void 0, r).map(t=>{let{"data-flows":o=[]}=_chunkJH5HRI6Dcjs.d.call(void 0, _path.join.call(void 0, r,t)),{adTechDataSilos:m,siteTechDataSilos:i}=_chunkVCPZG4FJcjs.a.call(void 0, o,{serviceToSupportedIntegration:d,serviceToTitle:u});return{adTechDataSilos:m,siteTechDataSilos:i,organizationName:t.split(".")[0]}}),a={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o,organizationName:m})=>{[...t,...o].forEach(e=>{let n=e["outer-type"]||e.integrationName;a[n]||(a[n]=[]),a[n].push(m),a[n]=[...new Set(a[n])]})});let p=[...new Set(l.map(({adTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],f=_chunkDQCPGPXGcjs.c.call(void 0, [...new Set(l.map(({siteTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],p),s={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o})=>{[...t,...o].forEach(i=>{let e=i["outer-type"]||i.integrationName,n=_optionalChain([i, 'access', _ => _.attributes, 'optionalAccess', _2 => _2.find, 'call', _3 => _3(E=>E.key==="Found On Domain")]);s[e]||(s[e]=[]),s[e].push(..._optionalChain([n, 'optionalAccess', _4 => _4.values])||[]),s[e]=[...new Set(s[e])]})});let A=_chunk56QKBG2Rcjs.zc.call(void 0, N,F),{serviceToTitle:u,serviceToSupportedIntegration:d}=await _chunk56QKBG2Rcjs.xd.call(void 0, A),h=[...p,...f].map(t=>({title:u[t],...d[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Business Units",values:_chunkDQCPGPXGcjs.c.call(void 0, a[t]||[],k)},{key:"Found On Domain",values:s[t]||[]}]}));_chunkZUNVPK23cjs.a.log(`Total Services: ${h.length}`),_chunkZUNVPK23cjs.a.log(`Ad Tech Services: ${p.length}`),_chunkZUNVPK23cjs.a.log(`Site Tech Services: ${f.length}`),_chunkJH5HRI6Dcjs.e.call(void 0, x,{"data-silos":h})}exports.deriveDataSilosFromDataFlowsCrossInstance = J;
2
- //# sourceMappingURL=impl-IQGUF37H.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkETSLJPTDcjs = require('./chunk-ETSLJPTD.cjs');var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunkZNTCC7Y7cjs = require('./chunk-ZNTCC7Y7.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkKYOQWIIScjs = require('./chunk-KYOQWIIS.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunk5MG2CEZVcjs = require('./chunk-5MG2CEZV.cjs');require('./chunk-7PB6LVSE.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function J({auth:F,dataFlowsYmlFolder:r,output:x,ignoreYmls:C=[],transcendUrl:N}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, r)||!_fs.lstatSync.call(void 0, r).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${r}"`)),this.process.exit(1));let k=C.map(t=>t.split(".")[0]),l=_chunkZNTCC7Y7cjs.c.call(void 0, r).map(t=>{let{"data-flows":o=[]}=_chunkJH5HRI6Dcjs.d.call(void 0, _path.join.call(void 0, r,t)),{adTechDataSilos:m,siteTechDataSilos:i}=_chunkETSLJPTDcjs.a.call(void 0, o,{serviceToSupportedIntegration:d,serviceToTitle:u});return{adTechDataSilos:m,siteTechDataSilos:i,organizationName:t.split(".")[0]}}),a={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o,organizationName:m})=>{[...t,...o].forEach(e=>{let n=e["outer-type"]||e.integrationName;a[n]||(a[n]=[]),a[n].push(m),a[n]=[...new Set(a[n])]})});let p=[...new Set(l.map(({adTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],f=_chunk5MG2CEZVcjs.c.call(void 0, [...new Set(l.map(({siteTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],p),s={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o})=>{[...t,...o].forEach(i=>{let e=i["outer-type"]||i.integrationName,n=_optionalChain([i, 'access', _ => _.attributes, 'optionalAccess', _2 => _2.find, 'call', _3 => _3(E=>E.key==="Found On Domain")]);s[e]||(s[e]=[]),s[e].push(..._optionalChain([n, 'optionalAccess', _4 => _4.values])||[]),s[e]=[...new Set(s[e])]})});let A=_chunkKYOQWIIScjs.zc.call(void 0, N,F),{serviceToTitle:u,serviceToSupportedIntegration:d}=await _chunkKYOQWIIScjs.xd.call(void 0, A),h=[...p,...f].map(t=>({title:u[t],...d[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Business Units",values:_chunk5MG2CEZVcjs.c.call(void 0, a[t]||[],k)},{key:"Found On Domain",values:s[t]||[]}]}));_chunkZUNVPK23cjs.a.log(`Total Services: ${h.length}`),_chunkZUNVPK23cjs.a.log(`Ad Tech Services: ${p.length}`),_chunkZUNVPK23cjs.a.log(`Site Tech Services: ${f.length}`),_chunkJH5HRI6Dcjs.e.call(void 0, x,{"data-silos":h})}exports.deriveDataSilosFromDataFlowsCrossInstance = J;
2
+ //# sourceMappingURL=impl-JJ56CQTW.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-IQGUF37H.cjs","../src/commands/inventory/derive-data-silos-from-data-flows-cross-instance/impl.ts"],"names":["deriveDataSilosFromDataFlowsCrossInstance","auth","dataFlowsYmlFolder","output","ignoreYmls","transcendUrl","doneInputValidation","existsSync","lstatSync","logger","colors","instancesToIgnore","x","dataSiloInputs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","serviceToSupportedIntegration","serviceToTitle","serviceToInstance","organizationName","dataSilo","service","adTechIntegrations","silo","siteTechIntegrations","difference_default","serviceToFoundOnDomain","foundOnDomain","attr","client","buildTranscendGraphQLClient","fetchAndIndexCatalogs","dataSilos"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/impl-IQGUF37H.cjs","sourcesContent":[null,"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"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-JJ56CQTW.cjs","../src/commands/inventory/derive-data-silos-from-data-flows-cross-instance/impl.ts"],"names":["deriveDataSilosFromDataFlowsCrossInstance","auth","dataFlowsYmlFolder","output","ignoreYmls","transcendUrl","doneInputValidation","existsSync","lstatSync","logger","colors","instancesToIgnore","x","dataSiloInputs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","serviceToSupportedIntegration","serviceToTitle","serviceToInstance","organizationName","dataSilo","service","adTechIntegrations","silo","siteTechIntegrations","difference_default","serviceToFoundOnDomain","foundOnDomain","attr","client","buildTranscendGraphQLClient","fetchAndIndexCatalogs","dataSilos"],"mappings":"AAAA,quBAAwC,wDAAgD,wDAAyC,gCAA6B,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAyC,gCAA6B,4BCKhX,gFAEF,wBAImB,MAgBtC,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CAAa,CAAC,CAAA,CACd,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAAA,CAInC,CAACC,4BAAAA,CAA6B,CAAA,EAC9B,CAACC,2BAAAA,CAA4B,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAE3CC,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BR,CAAkB,CAAA,CAAA,CAAG,CAAC,CAAA,CACzE,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMS,CAAAA,CAAoBP,CAAAA,CAAW,GAAA,CAAKQ,CAAAA,EAAMA,CAAAA,CAAE,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAC,CAAA,CAGzDC,CAAAA,CAAiBC,iCAAAA,CAA4B,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAc,CAEtE,GAAM,CAAE,YAAA,CAAcC,CAAAA,CAAY,CAAC,CAAE,CAAA,CAAIC,iCAAAA,wBACvCC,CAAKhB,CAAoBa,CAAS,CACpC,CAAA,CAGM,CAAE,eAAA,CAAAI,CAAAA,CAAiB,iBAAA,CAAAC,CAAkB,CAAA,CAAIC,iCAAAA,CAC7CL,CACA,CACE,6BAAA,CAAAM,CAAAA,CACA,cAAA,CAAAC,CACF,CACF,CAAA,CAEA,MAAO,CACL,eAAA,CAAAJ,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAkBL,CAAAA,CAAU,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAC1C,CACF,CAAC,CAAA,CAGKS,CAAAA,CAAiD,CAAC,CAAA,CACxDX,CAAAA,CAAe,OAAA,CACb,CAAC,CAAE,eAAA,CAAAM,CAAAA,CAAiB,iBAAA,CAAAC,CAAAA,CAAmB,gBAAA,CAAAK,CAAiB,CAAA,CAAA,EAAM,CACvC,CAAC,GAAGN,CAAAA,CAAiB,GAAGC,CAAiB,CAAA,CACjD,OAAA,CAASM,CAAAA,EAAa,CACjC,IAAMC,CAAAA,CAAUD,CAAAA,CAAS,YAAY,CAAA,EAAKA,CAAAA,CAAS,eAAA,CAE9CF,CAAAA,CAAkBG,CAAO,CAAA,EAAA,CAC5BH,CAAAA,CAAkBG,CAAO,CAAA,CAAI,CAAC,CAAA,CAAA,CAEhCH,CAAAA,CAAkBG,CAAO,CAAA,CAAG,IAAA,CAAKF,CAAgB,CAAA,CACjDD,CAAAA,CAAkBG,CAAO,CAAA,CAAI,CAAC,GAAG,IAAI,GAAA,CAAIH,CAAAA,CAAkBG,CAAO,CAAC,CAAC,CACtE,CAAC,CACH,CACF,CAAA,CAGA,IAAMC,CAAAA,CAAqB,CACzB,GAAG,IAAI,GAAA,CACLf,CAAAA,CACG,GAAA,CAAI,CAAC,CAAE,eAAA,CAAAM,CAAgB,CAAA,CAAA,EACtBA,CAAAA,CAAgB,GAAA,CACbU,CAAAA,EAASA,CAAAA,CAAK,YAAY,CAAA,EAAKA,CAAAA,CAAK,eACvC,CACF,CAAA,CACC,IAAA,CAAK,CACV,CACF,CAAA,CAGMC,CAAAA,CAAuBC,iCAAAA,CAEzB,GAAG,IAAI,GAAA,CACLlB,CAAAA,CACG,GAAA,CAAI,CAAC,CAAE,iBAAA,CAAAO,CAAkB,CAAA,CAAA,EACxBA,CAAAA,CAAkB,GAAA,CACfS,CAAAA,EAASA,CAAAA,CAAK,YAAY,CAAA,EAAKA,CAAAA,CAAK,eACvC,CACF,CAAA,CACC,IAAA,CAAK,CACV,CACF,CAAA,CACAD,CACF,CAAA,CAGMI,CAAAA,CAAsD,CAAC,CAAA,CAC7DnB,CAAAA,CAAe,OAAA,CAAQ,CAAC,CAAE,eAAA,CAAAM,CAAAA,CAAiB,iBAAA,CAAAC,CAAkB,CAAA,CAAA,EAAM,CAC5C,CAAC,GAAGD,CAAAA,CAAiB,GAAGC,CAAiB,CAAA,CACjD,OAAA,CAASM,CAAAA,EAAa,CACjC,IAAMC,CAAAA,CAAUD,CAAAA,CAAS,YAAY,CAAA,EAAKA,CAAAA,CAAS,eAAA,CAC7CO,CAAAA,iBAAgBP,CAAAA,mBAAS,UAAA,6BAAY,IAAA,mBACxCQ,CAAAA,EAASA,CAAAA,CAAK,GAAA,GAAQ,iBACzB,GAAA,CAEKF,CAAAA,CAAuBL,CAAO,CAAA,EAAA,CACjCK,CAAAA,CAAuBL,CAAO,CAAA,CAAI,CAAC,CAAA,CAAA,CAErCK,CAAAA,CAAuBL,CAAO,CAAA,CAAG,IAAA,CAAK,mBAAIM,CAAAA,6BAAe,QAAA,EAAU,CAAC,CAAE,CAAA,CACtED,CAAAA,CAAuBL,CAAO,CAAA,CAAI,CAChC,GAAG,IAAI,GAAA,CAAIK,CAAAA,CAAuBL,CAAO,CAAC,CAC5C,CACF,CAAC,CACH,CAAC,CAAA,CAGD,IAAMQ,CAAAA,CAASC,kCAAAA,CAA4B/B,CAAcJ,CAAI,CAAA,CACvD,CAAE,cAAA,CAAAsB,CAAAA,CAAgB,6BAAA,CAAAD,CAA8B,CAAA,CACpD,MAAMe,kCAAAA,CAA4B,CAAA,CAG9BC,CAAAA,CAAY,CAAC,GAAGV,CAAAA,CAAoB,GAAGE,CAAoB,CAAA,CAAE,GAAA,CAChEH,CAAAA,EAAAA,CAAa,CACZ,KAAA,CAAOJ,CAAAA,CAAeI,CAAO,CAAA,CAC7B,GAAIL,CAAAA,CAA8BK,CAAO,CAAA,CACrC,CAAE,eAAA,CAAiBA,CAAQ,CAAA,CAC3B,CAAE,eAAA,CAAiB,eAAA,CAAiB,YAAA,CAAcA,CAAQ,CAAA,CAC9D,UAAA,CAAY,CACV,CACE,GAAA,CAAK,WAAA,CACL,MAAA,CAAQ,CAAC,SAAS,CACpB,CAAA,CACA,CACE,GAAA,CAAK,gBAAA,CACL,MAAA,CAAQI,iCAAAA,CACNP,CAAkBG,CAAO,CAAA,EAAK,CAAC,CAAA,CAC/BhB,CACF,CACF,CAAA,CACA,CACE,GAAA,CAAK,iBAAA,CACL,MAAA,CAAQqB,CAAAA,CAAuBL,CAAO,CAAA,EAAK,CAAC,CAC9C,CACF,CACF,CAAA,CACF,CAAA,CAGAlB,mBAAAA,CAAO,GAAA,CAAI,CAAA,gBAAA,EAAmB6B,CAAAA,CAAU,MAAM,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-JJ56CQTW.cjs","sourcesContent":[null,"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"]}