@transcend-io/cli 8.31.1 → 8.32.6

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 (152) hide show
  1. package/README.md +121 -0
  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-5UWKWV3X.cjs +2 -0
  6. package/dist/chunk-5UWKWV3X.cjs.map +1 -0
  7. package/dist/chunk-CDX243U3.cjs +2 -0
  8. package/dist/{chunk-Q2RJZGYW.cjs.map → chunk-CDX243U3.cjs.map} +1 -1
  9. package/dist/{chunk-XXFLFF7Q.cjs → chunk-GJ6V5BHG.cjs} +2 -2
  10. package/dist/{chunk-XXFLFF7Q.cjs.map → chunk-GJ6V5BHG.cjs.map} +1 -1
  11. package/dist/{chunk-ALOB5SWZ.cjs → chunk-I6GMLKI6.cjs} +2 -2
  12. package/dist/{chunk-ALOB5SWZ.cjs.map → chunk-I6GMLKI6.cjs.map} +1 -1
  13. package/dist/chunk-LE6FS55Q.cjs +12 -0
  14. package/dist/chunk-LE6FS55Q.cjs.map +1 -0
  15. package/dist/chunk-MLH6KKUK.cjs +12 -0
  16. package/dist/chunk-MLH6KKUK.cjs.map +1 -0
  17. package/dist/chunk-NZEATKWL.cjs +2 -0
  18. package/dist/chunk-NZEATKWL.cjs.map +1 -0
  19. package/dist/chunk-O7SJYOEK.cjs +3 -0
  20. package/dist/chunk-O7SJYOEK.cjs.map +1 -0
  21. package/dist/{chunk-M7OVJJGB.cjs → chunk-PCK2N4IA.cjs} +4 -4
  22. package/dist/{chunk-M7OVJJGB.cjs.map → chunk-PCK2N4IA.cjs.map} +1 -1
  23. package/dist/{chunk-7H4ALAHC.cjs → chunk-SFPZ6GEN.cjs} +4 -4
  24. package/dist/chunk-SFPZ6GEN.cjs.map +1 -0
  25. package/dist/chunk-SZ7K447J.cjs +4 -0
  26. package/dist/{chunk-SKOTYI3A.cjs.map → chunk-SZ7K447J.cjs.map} +1 -1
  27. package/dist/chunk-VWN5MN3U.cjs +3001 -0
  28. package/dist/chunk-VWN5MN3U.cjs.map +1 -0
  29. package/dist/{chunk-DIB7IOEX.cjs → chunk-WJ3RFUZV.cjs} +2 -2
  30. package/dist/{chunk-DIB7IOEX.cjs.map → chunk-WJ3RFUZV.cjs.map} +1 -1
  31. package/dist/{chunk-MXT7N555.cjs → chunk-X2P2BWT7.cjs} +22 -22
  32. package/dist/chunk-X2P2BWT7.cjs.map +1 -0
  33. package/dist/impl-56QEHP2B.cjs +6 -0
  34. package/dist/impl-56QEHP2B.cjs.map +1 -0
  35. package/dist/{impl-JQVCW52V.cjs → impl-575YOEHZ.cjs} +2 -2
  36. package/dist/{impl-JQVCW52V.cjs.map → impl-575YOEHZ.cjs.map} +1 -1
  37. package/dist/{impl-PHBUSAGS.cjs → impl-5LMTXEQA.cjs} +2 -2
  38. package/dist/{impl-PHBUSAGS.cjs.map → impl-5LMTXEQA.cjs.map} +1 -1
  39. package/dist/impl-7DIFXY6N.cjs +6 -0
  40. package/dist/impl-7DIFXY6N.cjs.map +1 -0
  41. package/dist/{impl-WMI46UXI.cjs → impl-C6TDBSVQ.cjs} +2 -2
  42. package/dist/{impl-WMI46UXI.cjs.map → impl-C6TDBSVQ.cjs.map} +1 -1
  43. package/dist/impl-CL5OTH3R.cjs +2 -0
  44. package/dist/impl-CL5OTH3R.cjs.map +1 -0
  45. package/dist/{impl-VXOHC45F.cjs → impl-CV6MBTAL.cjs} +2 -2
  46. package/dist/{impl-VXOHC45F.cjs.map → impl-CV6MBTAL.cjs.map} +1 -1
  47. package/dist/{impl-Q3P6DGHG.cjs → impl-D7RH4J5E.cjs} +2 -2
  48. package/dist/{impl-Q3P6DGHG.cjs.map → impl-D7RH4J5E.cjs.map} +1 -1
  49. package/dist/{impl-NK42TN4C.cjs → impl-DGZB5IDM.cjs} +2 -2
  50. package/dist/{impl-NK42TN4C.cjs.map → impl-DGZB5IDM.cjs.map} +1 -1
  51. package/dist/impl-DNVWNGPJ.cjs +2 -0
  52. package/dist/{impl-SRI65ZIC.cjs.map → impl-DNVWNGPJ.cjs.map} +1 -1
  53. package/dist/{impl-YGVW4RTA.cjs → impl-DVIXGQJR.cjs} +2 -2
  54. package/dist/{impl-YGVW4RTA.cjs.map → impl-DVIXGQJR.cjs.map} +1 -1
  55. package/dist/impl-EAI3VXKU.cjs +7 -0
  56. package/dist/{impl-BQNXMBQ4.cjs.map → impl-EAI3VXKU.cjs.map} +1 -1
  57. package/dist/impl-G422JWSA.cjs +16 -0
  58. package/dist/impl-G422JWSA.cjs.map +1 -0
  59. package/dist/{impl-VT3C6SP4.cjs → impl-G7YD5U53.cjs} +2 -2
  60. package/dist/{impl-VT3C6SP4.cjs.map → impl-G7YD5U53.cjs.map} +1 -1
  61. package/dist/impl-IC4KAL33.cjs +2 -0
  62. package/dist/impl-IC4KAL33.cjs.map +1 -0
  63. package/dist/impl-JT7MI4YS.cjs +2 -0
  64. package/dist/impl-JT7MI4YS.cjs.map +1 -0
  65. package/dist/{impl-542SIWQ2.cjs → impl-LJBAH4YS.cjs} +2 -2
  66. package/dist/{impl-542SIWQ2.cjs.map → impl-LJBAH4YS.cjs.map} +1 -1
  67. package/dist/{impl-GEEPG7OH.cjs → impl-M2JWCIOX.cjs} +2 -2
  68. package/dist/{impl-GEEPG7OH.cjs.map → impl-M2JWCIOX.cjs.map} +1 -1
  69. package/dist/impl-MCIWWT2M.cjs +2 -0
  70. package/dist/{impl-V3MXFXZF.cjs.map → impl-MCIWWT2M.cjs.map} +1 -1
  71. package/dist/{impl-6ANYWCOV.cjs → impl-MO2EAW2B.cjs} +2 -2
  72. package/dist/{impl-6ANYWCOV.cjs.map → impl-MO2EAW2B.cjs.map} +1 -1
  73. package/dist/{impl-5VMEZB7F.cjs → impl-PHHRQWTE.cjs} +2 -2
  74. package/dist/{impl-5VMEZB7F.cjs.map → impl-PHHRQWTE.cjs.map} +1 -1
  75. package/dist/{impl-KQYINEBI.cjs → impl-PHXT2QG7.cjs} +2 -2
  76. package/dist/{impl-KQYINEBI.cjs.map → impl-PHXT2QG7.cjs.map} +1 -1
  77. package/dist/{impl-T67PUM7X.cjs → impl-QMDXFUAO.cjs} +2 -2
  78. package/dist/{impl-T67PUM7X.cjs.map → impl-QMDXFUAO.cjs.map} +1 -1
  79. package/dist/impl-R5PX6MIE.cjs +9 -0
  80. package/dist/impl-R5PX6MIE.cjs.map +1 -0
  81. package/dist/{impl-PKWSORXX.cjs → impl-RAZVKALS.cjs} +2 -2
  82. package/dist/{impl-PKWSORXX.cjs.map → impl-RAZVKALS.cjs.map} +1 -1
  83. package/dist/{impl-XLL66FXK.cjs → impl-RZSXBVAC.cjs} +2 -2
  84. package/dist/{impl-XLL66FXK.cjs.map → impl-RZSXBVAC.cjs.map} +1 -1
  85. package/dist/{impl-VUAC7AYF.cjs → impl-SA4YQJID.cjs} +2 -2
  86. package/dist/{impl-VUAC7AYF.cjs.map → impl-SA4YQJID.cjs.map} +1 -1
  87. package/dist/{impl-55GTRVMZ.cjs → impl-SUS5VKKB.cjs} +2 -2
  88. package/dist/{impl-55GTRVMZ.cjs.map → impl-SUS5VKKB.cjs.map} +1 -1
  89. package/dist/{impl-K2D3GTZG.cjs → impl-T3KGRFUR.cjs} +2 -2
  90. package/dist/{impl-K2D3GTZG.cjs.map → impl-T3KGRFUR.cjs.map} +1 -1
  91. package/dist/{impl-4CWCLU5Z.cjs → impl-T6FTWSLY.cjs} +2 -2
  92. package/dist/{impl-4CWCLU5Z.cjs.map → impl-T6FTWSLY.cjs.map} +1 -1
  93. package/dist/{impl-JFYHXSOV.cjs → impl-TXBSRO6N.cjs} +2 -2
  94. package/dist/{impl-JFYHXSOV.cjs.map → impl-TXBSRO6N.cjs.map} +1 -1
  95. package/dist/{impl-PWYKAVK4.cjs → impl-UKTKLJSZ.cjs} +2 -2
  96. package/dist/{impl-PWYKAVK4.cjs.map → impl-UKTKLJSZ.cjs.map} +1 -1
  97. package/dist/{impl-A7XL5O4W.cjs → impl-UU5CW4E4.cjs} +2 -2
  98. package/dist/{impl-A7XL5O4W.cjs.map → impl-UU5CW4E4.cjs.map} +1 -1
  99. package/dist/{impl-REKQO7ZI.cjs → impl-UYKI3NKQ.cjs} +2 -2
  100. package/dist/{impl-REKQO7ZI.cjs.map → impl-UYKI3NKQ.cjs.map} +1 -1
  101. package/dist/{impl-RD5UOJY6.cjs → impl-VVICNSEP.cjs} +2 -2
  102. package/dist/{impl-RD5UOJY6.cjs.map → impl-VVICNSEP.cjs.map} +1 -1
  103. package/dist/impl-WY3A5X7O.cjs +2 -0
  104. package/dist/{impl-JSXYZHX4.cjs.map → impl-WY3A5X7O.cjs.map} +1 -1
  105. package/dist/{impl-OQAP7YDW.cjs → impl-XOHK7EPT.cjs} +2 -2
  106. package/dist/{impl-OQAP7YDW.cjs.map → impl-XOHK7EPT.cjs.map} +1 -1
  107. package/dist/{impl-XJBUIDZP.cjs → impl-XT4Q54W2.cjs} +2 -2
  108. package/dist/{impl-XJBUIDZP.cjs.map → impl-XT4Q54W2.cjs.map} +1 -1
  109. package/dist/{impl-D2HENZNO.cjs → impl-Y6ENZCUI.cjs} +2 -2
  110. package/dist/{impl-D2HENZNO.cjs.map → impl-Y6ENZCUI.cjs.map} +1 -1
  111. package/dist/{impl-KRJNBGJ6.cjs → impl-YQXGFOOO.cjs} +2 -2
  112. package/dist/{impl-KRJNBGJ6.cjs.map → impl-YQXGFOOO.cjs.map} +1 -1
  113. package/dist/{impl-TCR3Y3J2.cjs → impl-ZUAB2R6X.cjs} +2 -2
  114. package/dist/{impl-TCR3Y3J2.cjs.map → impl-ZUAB2R6X.cjs.map} +1 -1
  115. package/dist/{impl-VL3CJ2OT.cjs → impl-ZV7OZ5BN.cjs} +2 -2
  116. package/dist/{impl-VL3CJ2OT.cjs.map → impl-ZV7OZ5BN.cjs.map} +1 -1
  117. package/dist/index.cjs +3 -3
  118. package/dist/index.cjs.map +1 -1
  119. package/dist/index.d.cts +1 -1
  120. package/package.json +2 -2
  121. package/dist/chunk-52MA7ZLS.cjs +0 -12
  122. package/dist/chunk-52MA7ZLS.cjs.map +0 -1
  123. package/dist/chunk-55B57ZAY.cjs +0 -3001
  124. package/dist/chunk-55B57ZAY.cjs.map +0 -1
  125. package/dist/chunk-7H4ALAHC.cjs.map +0 -1
  126. package/dist/chunk-G522ZIHS.cjs +0 -3
  127. package/dist/chunk-G522ZIHS.cjs.map +0 -1
  128. package/dist/chunk-HCEZRZHV.cjs +0 -12
  129. package/dist/chunk-HCEZRZHV.cjs.map +0 -1
  130. package/dist/chunk-M3Y6JH6I.cjs +0 -2
  131. package/dist/chunk-M3Y6JH6I.cjs.map +0 -1
  132. package/dist/chunk-MXT7N555.cjs.map +0 -1
  133. package/dist/chunk-NC6VWOMN.cjs +0 -2
  134. package/dist/chunk-NC6VWOMN.cjs.map +0 -1
  135. package/dist/chunk-Q2RJZGYW.cjs +0 -2
  136. package/dist/chunk-SKOTYI3A.cjs +0 -4
  137. package/dist/impl-BQNXMBQ4.cjs +0 -7
  138. package/dist/impl-CFYRFABZ.cjs +0 -9
  139. package/dist/impl-CFYRFABZ.cjs.map +0 -1
  140. package/dist/impl-JSXYZHX4.cjs +0 -2
  141. package/dist/impl-RI3WQFOE.cjs +0 -6
  142. package/dist/impl-RI3WQFOE.cjs.map +0 -1
  143. package/dist/impl-SRI65ZIC.cjs +0 -2
  144. package/dist/impl-U46BMUFL.cjs +0 -2
  145. package/dist/impl-U46BMUFL.cjs.map +0 -1
  146. package/dist/impl-UVQJ7HSK.cjs +0 -6
  147. package/dist/impl-UVQJ7HSK.cjs.map +0 -1
  148. package/dist/impl-V3MXFXZF.cjs +0 -2
  149. package/dist/impl-ZAKPYQ32.cjs +0 -2
  150. package/dist/impl-ZAKPYQ32.cjs.map +0 -1
  151. package/dist/impl-ZTYQ3IB5.cjs +0 -2
  152. package/dist/impl-ZTYQ3IB5.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-5VMEZB7F.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-5VMEZB7F.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-PHHRQWTE.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-PHHRQWTE.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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.cjs');require('./chunk-7PB6LVSE.cjs');var _privacytypes = require('@transcend-io/privacy-types');async function g({auth:r,transcendUrl:a,folderPath:n,requestIds:s,statuses:i=[_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Downloadable],concurrency:l,createdAtBefore:d,createdAtAfter:m,approveAfterDownload:c}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk55B57ZAYcjs.Bf.call(void 0, {transcendUrl:a,auth:r,folderPath:n,requestIds:s,statuses:i,concurrency:l,createdAtBefore:d,createdAtAfter:m,approveAfterDownload:c})}exports.downloadFiles = g;
2
- //# sourceMappingURL=impl-KQYINEBI.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.cjs');require('./chunk-7PB6LVSE.cjs');var _privacytypes = require('@transcend-io/privacy-types');async function g({auth:r,transcendUrl:a,folderPath:n,requestIds:s,statuses:i=[_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Downloadable],concurrency:l,createdAtBefore:d,createdAtAfter:m,approveAfterDownload:c}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkVWN5MN3Ucjs.Df.call(void 0, {transcendUrl:a,auth:r,folderPath:n,requestIds:s,statuses:i,concurrency:l,createdAtBefore:d,createdAtAfter:m,approveAfterDownload:c})}exports.downloadFiles = g;
2
+ //# sourceMappingURL=impl-PHXT2QG7.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-KQYINEBI.cjs","../src/commands/request/download-files/impl.ts"],"names":["downloadFiles","auth","transcendUrl","folderPath","requestIds","statuses","RequestStatus","concurrency","createdAtBefore","createdAtAfter","approveAfterDownload","doneInputValidation","downloadPrivacyRequestFiles"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,2DCExK,MAgB9B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,CAACC,2BAAAA,CAAc,SAAA,CAAWA,2BAAAA,CAAc,YAAY,CAAA,CAC/D,WAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAV,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CACF,CAAC,CACH,CAAA,0BAAA","file":"/home/runner/work/cli/cli/dist/impl-KQYINEBI.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { downloadPrivacyRequestFiles } from '../../../lib/requests';\nimport { RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DownloadFilesCommandFlags {\n auth: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n statuses?: RequestStatus[];\n folderPath: string;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n approveAfterDownload: boolean;\n transcendUrl: string;\n}\n\nexport async function downloadFiles(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n folderPath,\n requestIds,\n statuses = [RequestStatus.Approving, RequestStatus.Downloadable],\n concurrency,\n createdAtBefore,\n createdAtAfter,\n approveAfterDownload,\n }: DownloadFilesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await downloadPrivacyRequestFiles({\n transcendUrl,\n auth,\n folderPath,\n requestIds,\n statuses,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n approveAfterDownload,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-PHXT2QG7.cjs","../src/commands/request/download-files/impl.ts"],"names":["downloadFiles","auth","transcendUrl","folderPath","requestIds","statuses","RequestStatus","concurrency","createdAtBefore","createdAtAfter","approveAfterDownload","doneInputValidation","downloadPrivacyRequestFiles"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,2DCExK,MAgB9B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,CAACC,2BAAAA,CAAc,SAAA,CAAWA,2BAAAA,CAAc,YAAY,CAAA,CAC/D,WAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAV,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CACF,CAAC,CACH,CAAA,0BAAA","file":"/home/runner/work/cli/cli/dist/impl-PHXT2QG7.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { downloadPrivacyRequestFiles } from '../../../lib/requests';\nimport { RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DownloadFilesCommandFlags {\n auth: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n statuses?: RequestStatus[];\n folderPath: string;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n approveAfterDownload: boolean;\n transcendUrl: string;\n}\n\nexport async function downloadFiles(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n folderPath,\n requestIds,\n statuses = [RequestStatus.Approving, RequestStatus.Downloadable],\n concurrency,\n createdAtBefore,\n createdAtAfter,\n approveAfterDownload,\n }: DownloadFilesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await downloadPrivacyRequestFiles({\n transcendUrl,\n auth,\n folderPath,\n requestIds,\n statuses,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n approveAfterDownload,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.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 _chunk55B57ZAYcjs.Ff.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-T67PUM7X.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.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 _chunkVWN5MN3Ucjs.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-QMDXFUAO.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-T67PUM7X.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-T67PUM7X.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-QMDXFUAO.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-QMDXFUAO.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"]}
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMLH6KKUKcjs = require('./chunk-MLH6KKUK.cjs');require('./chunk-NZEATKWL.cjs');var _chunk5UWKWV3Xcjs = require('./chunk-5UWKWV3X.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkGJ6V5BHGcjs = require('./chunk-GJ6V5BHG.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _path = require('path');var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);async function X({auth:F,start:N,end:f,folder:r,bin:p,transcendUrl:D}){let l=p;Object.values(_chunkVWN5MN3Ucjs.Vc).includes(l)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to parse argument "bin" with value "${p}"
2
+ Expected one of:
3
+ ${Object.values(_chunkVWN5MN3Ucjs.Vc).join(`
4
+ `)}`)),this.process.exit(1));let i=new Date(N),o=f?new Date(f):new Date;Number.isNaN(i.getTime())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Start date provided is invalid date. Got --start="${N}" expected --start="01/01/2023"`)),this.process.exit(1)),Number.isNaN(o.getTime())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`End date provided is invalid date. Got --end="${f}" expected --end="01/01/2023"`)),this.process.exit(1)),i>o&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Got a start date "${i.toISOString()}" that was larger than the end date "${o.toISOString()}". Start date must be before end date.`)),this.process.exit(1)),_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let m=await _chunk5UWKWV3Xcjs.b.call(void 0, F);if(_fs2.default.existsSync(r)&&!_fs2.default.lstatSync(r).isDirectory()&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red('The provided argument "folder" was passed a file. expected: folder="./consent-metrics/"')),this.process.exit(1)),_fs.existsSync.call(void 0, r)||_fs.mkdirSync.call(void 0, r),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling consent metrics from start=${i.toString()} to end=${o.toISOString()} with bin size "${p}"`)),typeof m=="string"){try{let n=_chunkVWN5MN3Ucjs.zc.call(void 0, D,m),s=await _chunkMLH6KKUKcjs.d.call(void 0, n,{bin:l,start:i,end:o});await _chunkVWN5MN3Ucjs.a.call(void 0, Object.entries(s),async([g,c])=>{await _chunkVWN5MN3Ucjs.a.call(void 0, c,async({points:u,name:d})=>{let a=_path.join.call(void 0, r,`${g}_${d}.csv`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing configuration to file "${a}"...`)),await _chunkVWN5MN3Ucjs.tg.call(void 0, a,u.map(({key:h,value:$})=>({timestamp:h,value:$})))},{concurrency:5})},{concurrency:5})}catch(n){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred syncing the schema: ${n.message}`)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced consent metrics to disk in folder "${r}"! View at ${_chunkGJ6V5BHGcjs.p}`))}else{let n=[];await _chunkVWN5MN3Ucjs.b.call(void 0, m,async(s,g)=>{let c=`[${g+1}/${m.length}][${s.organizationName}] `;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`~~~
5
+
6
+ ${c}Attempting to pull consent metrics...
7
+
8
+ ~~~`));let u=_chunkVWN5MN3Ucjs.zc.call(void 0, D,s.apiKey);try{let d=await _chunkMLH6KKUKcjs.d.call(void 0, u,{bin:l,start:i,end:o}),a=_path.join.call(void 0, r,s.organizationName);_fs.existsSync.call(void 0, a)||_fs.mkdirSync.call(void 0, a),Object.entries(d).forEach(([h,$])=>{$.forEach(({points:G,name:z})=>{let M=_path.join.call(void 0, a,`${h}_${z}.csv`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing configuration to file "${M}"...`)),_chunkVWN5MN3Ucjs.tg.call(void 0, M,G.map(({key:L,value:P})=>({timestamp:L,value:P})))})}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`${c}Successfully pulled configuration!`))}catch (e2){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${c}Failed to sync configuration.`)),n.push(s.organizationName)}}),n.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors for "${n.join(",")}". View output above for more information, or check out ${_chunkGJ6V5BHGcjs.p}`)),this.process.exit(1))}}exports.pullConsentMetrics = X;
9
+ //# sourceMappingURL=impl-R5PX6MIE.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-R5PX6MIE.cjs","../src/commands/consent/pull-consent-metrics/impl.ts"],"names":["pullConsentMetrics","auth","start","end","folder","bin","transcendUrl","parsedBin","ConsentManagerMetricBin","logger","colors"],"mappings":"AAAA,iOAAwC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,wDAAwE,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCErX,4BAEE,gEACqB,MAoB1C,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,GAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,GAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CAEf,IAAMC,CAAAA,CAAYF,CAAAA,CACb,MAAA,CAAO,MAAA,CAAOG,oBAAuB,CAAA,CAAE,QAAA,CAASD,CAAS,CAAA,EAAA,CAC5DE,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,2CAAA,EAA8CL,CAAG,CAAA;AAAA;AAAA,EACzB,MAAA,CAAO,MAAA,CAAOG,oBAAuB,CAAA,CAAE,IAAA,CAC3D,CAAA;AAAA,CACF,CAAC,CAAA,CAAA;AAyHD;AAAgB;AAAA;AAAA,GAAA","file":"/home/runner/work/cli/cli/dist/impl-R5PX6MIE.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { map, mapSeries } from '../../../lib/bluebird';\nimport { join } from 'node:path';\nimport fs, { existsSync, mkdirSync } from 'node:fs';\nimport {\n buildTranscendGraphQLClient,\n ConsentManagerMetricBin,\n} from '../../../lib/graphql';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { pullConsentManagerMetrics } from '../../../lib/consent-manager';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { writeCsv } from '../../../lib/helpers';\n\nexport interface PullConsentMetricsCommandFlags {\n auth: string;\n start: Date;\n end?: Date;\n folder: string;\n bin: string;\n transcendUrl: string;\n}\n\nexport async function pullConsentMetrics(\n this: LocalContext,\n {\n auth,\n start,\n end,\n folder,\n bin,\n transcendUrl,\n }: PullConsentMetricsCommandFlags,\n): Promise<void> {\n // Validate bin\n const parsedBin = bin as ConsentManagerMetricBin;\n if (!Object.values(ConsentManagerMetricBin).includes(parsedBin)) {\n logger.error(\n colors.red(\n `Failed to parse argument \"bin\" with value \"${bin}\"\\n` +\n `Expected one of: \\n${Object.values(ConsentManagerMetricBin).join(\n '\\n',\n )}`,\n ),\n );\n this.process.exit(1);\n }\n\n // Parse the dates\n const startDate = new Date(start);\n const endDate = end ? new Date(end) : new Date();\n if (Number.isNaN(startDate.getTime())) {\n logger.error(\n colors.red(\n `Start date provided is invalid date. Got --start=\"${start}\" expected --start=\"01/01/2023\"`,\n ),\n );\n this.process.exit(1);\n }\n if (Number.isNaN(endDate.getTime())) {\n logger.error(\n colors.red(\n `End date provided is invalid date. Got --end=\"${end}\" expected --end=\"01/01/2023\"`,\n ),\n );\n this.process.exit(1);\n }\n if (startDate > endDate) {\n logger.error(\n colors.red(\n `Got a start date \"${startDate.toISOString()}\" that was larger than the end date \"${endDate.toISOString()}\". ` +\n 'Start date must be before end date.',\n ),\n );\n this.process.exit(1);\n }\n\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 // Ensure folder either does not exist or is not a file\n if (fs.existsSync(folder) && !fs.lstatSync(folder).isDirectory()) {\n logger.error(\n colors.red(\n 'The provided argument \"folder\" was passed a file. expected: folder=\"./consent-metrics/\"',\n ),\n );\n this.process.exit(1);\n }\n\n // Create the folder if it does not exist\n if (!existsSync(folder)) {\n mkdirSync(folder);\n }\n\n logger.info(\n colors.magenta(\n `Pulling consent metrics from start=${startDate.toString()} to end=${endDate.toISOString()} with bin size \"${bin}\"`,\n ),\n );\n\n // Sync to Disk\n if (typeof apiKeyOrList === 'string') {\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKeyOrList);\n\n // Pull the metrics\n const configuration = await pullConsentManagerMetrics(client, {\n bin: parsedBin,\n start: startDate,\n end: endDate,\n });\n\n // Write to file\n await map(\n Object.entries(configuration),\n async ([metricName, metrics]) => {\n await map(\n metrics,\n async ({ points, name }) => {\n const file = join(folder, `${metricName}_${name}.csv`);\n logger.info(\n colors.magenta(`Writing configuration to file \"${file}\"...`),\n );\n await writeCsv(\n file,\n points.map(({ key, value }) => ({\n timestamp: key,\n value,\n })),\n );\n },\n {\n concurrency: 5,\n },\n );\n },\n { concurrency: 5 },\n );\n } catch (err) {\n logger.error(\n colors.red(`An error occurred syncing the schema: ${err.message}`),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced consent metrics to disk in folder \"${folder}\"! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n } else {\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to pull consent metrics...\\n\\n~~~`,\n ),\n );\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKey.apiKey);\n\n try {\n const configuration = await pullConsentManagerMetrics(client, {\n bin: parsedBin,\n start: startDate,\n end: endDate,\n });\n\n // ensure folder exists for that organization\n const subFolder = join(folder, apiKey.organizationName);\n if (!existsSync(subFolder)) {\n mkdirSync(subFolder);\n }\n\n // Write to file\n Object.entries(configuration).forEach(([metricName, metrics]) => {\n metrics.forEach(({ points, name }) => {\n const file = join(subFolder, `${metricName}_${name}.csv`);\n logger.info(\n colors.magenta(`Writing configuration to file \"${file}\"...`),\n );\n writeCsv(\n file,\n points.map(({ key, value }) => ({\n timestamp: key,\n value,\n })),\n );\n });\n });\n\n logger.info(\n colors.green(`${prefix}Successfully pulled configuration!`),\n );\n } catch (err) {\n logger.error(colors.red(`${prefix}Failed to sync configuration.`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkSKOTYI3Acjs = require('./chunk-SKOTYI3A.cjs');require('./chunk-NC6VWOMN.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkXXFLFF7Qcjs = require('./chunk-XXFLFF7Q.cjs');require('./chunk-7PB6LVSE.cjs');var _querystring = require('query-string');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);async function m({scanPath:t,fileGlobs:e,ignoreDirs:g,config:p}){let{ignoreDirs:f,supportedFiles:s,scanFunction:a}=p,n=e===""?s:s.concat(e.split(",")),l=[...g.split(","),...f].filter(o=>o.length>0);try{let o=await _fastglob2.default.call(void 0, `${t}/**/${n.join("|")}`,{ignore:l.map(i=>`${t}/**/${i}`),unique:!0,onlyFiles:!0});_chunkZUNVPK23cjs.a.info(`Scanning: ${o.length} files`);let I=o.map(i=>a(i)).flat().map(i=>i.softwareDevelopmentKits||[]).flat(),d=[...new Set(I.map(i=>i.name))];return _chunkZUNVPK23cjs.a.info(`Found: ${d.length} unique dependencies`),d.map(i=>({name:i,resourceId:`${t}/**/${i}`,useStrictClassifier:!0}))}catch(o){throw new Error(`Error scanning globs ${m} with error: ${o}`)}}async function P({scanPath:t,dataSiloId:e,auth:g,fileGlobs:p,ignoreDirs:f,transcendUrl:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let a=_chunk55B57ZAYcjs.xc.call(void 0, s,g),n=await _chunk55B57ZAYcjs.Cc.call(void 0, a,e),l=_chunkSKOTYI3Acjs.a[n.dataSilo.type];l||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`This plugin "${n.dataSilo.type}" is not supported for offline silo discovery.`)),this.process.exit(1));let o=await m({scanPath:t,fileGlobs:p,ignoreDirs:f,config:l});await _chunk55B57ZAYcjs.of.call(void 0, a,n.id,o);let c=new URL(_chunkXXFLFF7Qcjs.o);c.pathname="/data-map/data-inventory/silo-discovery/triage",c.search=_querystring.stringify.call(void 0, {filters:JSON.stringify({pluginIds:[n.id]})}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Scan found ${o.length} potential data silos at ${t}! View at '${c.href}'
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkSZ7K447Jcjs = require('./chunk-SZ7K447J.cjs');require('./chunk-5UWKWV3X.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkGJ6V5BHGcjs = require('./chunk-GJ6V5BHG.cjs');require('./chunk-7PB6LVSE.cjs');var _querystring = require('query-string');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);async function m({scanPath:t,fileGlobs:e,ignoreDirs:g,config:p}){let{ignoreDirs:f,supportedFiles:s,scanFunction:a}=p,n=e===""?s:s.concat(e.split(",")),l=[...g.split(","),...f].filter(o=>o.length>0);try{let o=await _fastglob2.default.call(void 0, `${t}/**/${n.join("|")}`,{ignore:l.map(i=>`${t}/**/${i}`),unique:!0,onlyFiles:!0});_chunkZUNVPK23cjs.a.info(`Scanning: ${o.length} files`);let I=o.map(i=>a(i)).flat().map(i=>i.softwareDevelopmentKits||[]).flat(),d=[...new Set(I.map(i=>i.name))];return _chunkZUNVPK23cjs.a.info(`Found: ${d.length} unique dependencies`),d.map(i=>({name:i,resourceId:`${t}/**/${i}`,useStrictClassifier:!0}))}catch(o){throw new Error(`Error scanning globs ${m} with error: ${o}`)}}async function P({scanPath:t,dataSiloId:e,auth:g,fileGlobs:p,ignoreDirs:f,transcendUrl:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let a=_chunkVWN5MN3Ucjs.zc.call(void 0, s,g),n=await _chunkVWN5MN3Ucjs.Ec.call(void 0, a,e),l=_chunkSZ7K447Jcjs.a[n.dataSilo.type];l||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`This plugin "${n.dataSilo.type}" is not supported for offline silo discovery.`)),this.process.exit(1));let o=await m({scanPath:t,fileGlobs:p,ignoreDirs:f,config:l});await _chunkVWN5MN3Ucjs.qf.call(void 0, a,n.id,o);let c=new URL(_chunkGJ6V5BHGcjs.o);c.pathname="/data-map/data-inventory/silo-discovery/triage",c.search=_querystring.stringify.call(void 0, {filters:JSON.stringify({pluginIds:[n.id]})}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Scan found ${o.length} potential data silos at ${t}! View at '${c.href}'
2
2
 
3
3
  NOTE: it may take 2-3 minutes for scan results to appear in the UI.`))}exports.discoverSilos = P;
4
- //# sourceMappingURL=impl-PKWSORXX.cjs.map
4
+ //# sourceMappingURL=impl-RAZVKALS.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-PKWSORXX.cjs","../src/commands/inventory/discover-silos/impl.ts","../src/lib/code-scanning/findFilesToScan.ts"],"names":["findFilesToScan","scanPath","fileGlobs","ignoreDirs","config","IGNORE_DIRS","supportedFiles","scanFunction","globsToSupport","dirsToIgnore","dir","filesToScan","fastGlob"],"mappings":"AAAA,iOAAwC,gCAA6B,gCAA6B,wDAAyC,wDAA0D,gCAA6B,wDAAyC,wDAAyC,gCAA6B,2CCCvT,gFAEP,yFCHE,MAsBrB,SAAsBA,CAAAA,CAAgB,CACpC,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CASuC,CACrC,GAAM,CAAE,UAAA,CAAYC,CAAAA,CAAa,cAAA,CAAAC,CAAAA,CAAgB,YAAA,CAAAC,CAAa,CAAA,CAAIH,CAAAA,CAC5DI,CAAAA,CACJN,CAAAA,GAAc,EAAA,CACVI,CAAAA,CACAA,CAAAA,CAAe,MAAA,CAAOJ,CAAAA,CAAU,KAAA,CAAM,GAAG,CAAC,CAAA,CAC1CO,CAAAA,CAAe,CAAC,GAAGN,CAAAA,CAAW,KAAA,CAAM,GAAG,CAAA,CAAG,GAAGE,CAAW,CAAA,CAAE,MAAA,CAC7DK,CAAAA,EAAQA,CAAAA,CAAI,MAAA,CAAS,CACxB,CAAA,CACA,GAAI,CACF,IAAMC,CAAAA,CAAwB,MAAMC,gCAAAA,CAClC,EAAA;ADuByB;AAI/B,oEAAA","file":"/home/runner/work/cli/cli/dist/impl-PKWSORXX.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { stringify } from 'query-string';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { ADMIN_DASH } from '../../../constants';\nimport {\n fetchActiveSiloDiscoPlugin,\n buildTranscendGraphQLClient,\n uploadSiloDiscoveryResults,\n} from '../../../lib/graphql';\nimport { findFilesToScan } from '../../../lib/code-scanning/findFilesToScan';\nimport { SILO_DISCOVERY_CONFIGS } from '../../../lib/code-scanning';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DiscoverSilosCommandFlags {\n scanPath: string;\n dataSiloId: string;\n auth: string;\n fileGlobs: string;\n ignoreDirs: string;\n transcendUrl: string;\n}\n\nexport async function discoverSilos(\n this: LocalContext,\n {\n scanPath,\n dataSiloId,\n auth,\n fileGlobs,\n ignoreDirs,\n transcendUrl,\n }: DiscoverSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const plugin = await fetchActiveSiloDiscoPlugin(client, dataSiloId);\n\n const config = SILO_DISCOVERY_CONFIGS[plugin.dataSilo.type];\n if (!config) {\n logger.error(\n colors.red(\n `This plugin \"${plugin.dataSilo.type}\" is not supported for offline silo discovery.`,\n ),\n );\n this.process.exit(1);\n }\n\n const results = await findFilesToScan({\n scanPath,\n fileGlobs,\n ignoreDirs,\n config,\n });\n\n await uploadSiloDiscoveryResults(client, plugin.id, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/data-map/data-inventory/silo-discovery/triage';\n newUrl.search = stringify({\n filters: JSON.stringify({ pluginIds: [plugin.id] }),\n });\n\n // Indicate success\n logger.info(\n colors.green(\n `Scan found ${results.length} potential data silos at ${scanPath}! ` +\n `View at '${newUrl.href}' ` +\n '\\n\\n NOTE: it may take 2-3 minutes for scan results to appear in the UI.',\n ),\n );\n}\n","import fastGlob from 'fast-glob';\nimport { logger } from '../../logger';\nimport { CodeScanningConfig } from './types';\n\nexport interface SiloDiscoveryRawResults {\n /** The name of the potential data silo entry */\n name: string;\n /** A unique UUID (represents the same resource across different silo discovery runs) */\n resourceId: string;\n /** Any hosts associated with the entry */\n host?: string;\n /** Type of data silo */\n type?: string | undefined;\n}\n\n/**\n * Helper to scan for data silos in all package.json files that it can find in a directory\n *\n * @deprecated TODO: https://transcend.height.app/T-32325 - use code scanning instead\n * @param options - Options\n * @returns the list of integrations\n */\nexport async function findFilesToScan({\n scanPath,\n fileGlobs,\n ignoreDirs,\n config,\n}: {\n /** Where to look for package.json files */\n scanPath: string;\n /** Globs to look for */\n fileGlobs: string;\n /** The directories to ignore (excludes node_modules and serverless-build) */\n ignoreDirs: string;\n /** Silo Discovery configuration */\n config: CodeScanningConfig;\n}): Promise<SiloDiscoveryRawResults[]> {\n const { ignoreDirs: IGNORE_DIRS, supportedFiles, scanFunction } = config;\n const globsToSupport =\n fileGlobs === ''\n ? supportedFiles\n : supportedFiles.concat(fileGlobs.split(','));\n const dirsToIgnore = [...ignoreDirs.split(','), ...IGNORE_DIRS].filter(\n (dir) => dir.length > 0,\n );\n try {\n const filesToScan: string[] = await fastGlob(\n `${scanPath}/**/${globsToSupport.join('|')}`,\n {\n ignore: dirsToIgnore.map((dir: string) => `${scanPath}/**/${dir}`),\n unique: true,\n onlyFiles: true,\n },\n );\n logger.info(`Scanning: ${filesToScan.length} files`);\n const allPackages = filesToScan\n .map((filePath: string) => scanFunction(filePath))\n .flat();\n const allSdks = allPackages\n .map((appPackage) => appPackage.softwareDevelopmentKits || [])\n .flat();\n const uniqueDeps = new Set(allSdks.map((sdk) => sdk.name));\n const deps = [...uniqueDeps];\n logger.info(`Found: ${deps.length} unique dependencies`);\n return deps.map((dep) => ({\n name: dep,\n resourceId: `${scanPath}/**/${dep}`,\n useStrictClassifier: true,\n }));\n } catch (error) {\n throw new Error(\n `Error scanning globs ${findFilesToScan} with error: ${error}`,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-RAZVKALS.cjs","../src/commands/inventory/discover-silos/impl.ts","../src/lib/code-scanning/findFilesToScan.ts"],"names":["findFilesToScan","scanPath","fileGlobs","ignoreDirs","config","IGNORE_DIRS","supportedFiles","scanFunction","globsToSupport","dirsToIgnore","dir","filesToScan","fastGlob"],"mappings":"AAAA,iOAAwC,gCAA6B,gCAA6B,wDAAyC,wDAA0D,gCAA6B,wDAAyC,wDAAyC,gCAA6B,2CCCvT,gFAEP,yFCHE,MAsBrB,SAAsBA,CAAAA,CAAgB,CACpC,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CASuC,CACrC,GAAM,CAAE,UAAA,CAAYC,CAAAA,CAAa,cAAA,CAAAC,CAAAA,CAAgB,YAAA,CAAAC,CAAa,CAAA,CAAIH,CAAAA,CAC5DI,CAAAA,CACJN,CAAAA,GAAc,EAAA,CACVI,CAAAA,CACAA,CAAAA,CAAe,MAAA,CAAOJ,CAAAA,CAAU,KAAA,CAAM,GAAG,CAAC,CAAA,CAC1CO,CAAAA,CAAe,CAAC,GAAGN,CAAAA,CAAW,KAAA,CAAM,GAAG,CAAA,CAAG,GAAGE,CAAW,CAAA,CAAE,MAAA,CAC7DK,CAAAA,EAAQA,CAAAA,CAAI,MAAA,CAAS,CACxB,CAAA,CACA,GAAI,CACF,IAAMC,CAAAA,CAAwB,MAAMC,gCAAAA,CAClC,EAAA;ADuByB;AAI/B,oEAAA","file":"/home/runner/work/cli/cli/dist/impl-RAZVKALS.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { stringify } from 'query-string';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { ADMIN_DASH } from '../../../constants';\nimport {\n fetchActiveSiloDiscoPlugin,\n buildTranscendGraphQLClient,\n uploadSiloDiscoveryResults,\n} from '../../../lib/graphql';\nimport { findFilesToScan } from '../../../lib/code-scanning/findFilesToScan';\nimport { SILO_DISCOVERY_CONFIGS } from '../../../lib/code-scanning';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DiscoverSilosCommandFlags {\n scanPath: string;\n dataSiloId: string;\n auth: string;\n fileGlobs: string;\n ignoreDirs: string;\n transcendUrl: string;\n}\n\nexport async function discoverSilos(\n this: LocalContext,\n {\n scanPath,\n dataSiloId,\n auth,\n fileGlobs,\n ignoreDirs,\n transcendUrl,\n }: DiscoverSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const plugin = await fetchActiveSiloDiscoPlugin(client, dataSiloId);\n\n const config = SILO_DISCOVERY_CONFIGS[plugin.dataSilo.type];\n if (!config) {\n logger.error(\n colors.red(\n `This plugin \"${plugin.dataSilo.type}\" is not supported for offline silo discovery.`,\n ),\n );\n this.process.exit(1);\n }\n\n const results = await findFilesToScan({\n scanPath,\n fileGlobs,\n ignoreDirs,\n config,\n });\n\n await uploadSiloDiscoveryResults(client, plugin.id, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/data-map/data-inventory/silo-discovery/triage';\n newUrl.search = stringify({\n filters: JSON.stringify({ pluginIds: [plugin.id] }),\n });\n\n // Indicate success\n logger.info(\n colors.green(\n `Scan found ${results.length} potential data silos at ${scanPath}! ` +\n `View at '${newUrl.href}' ` +\n '\\n\\n NOTE: it may take 2-3 minutes for scan results to appear in the UI.',\n ),\n );\n}\n","import fastGlob from 'fast-glob';\nimport { logger } from '../../logger';\nimport { CodeScanningConfig } from './types';\n\nexport interface SiloDiscoveryRawResults {\n /** The name of the potential data silo entry */\n name: string;\n /** A unique UUID (represents the same resource across different silo discovery runs) */\n resourceId: string;\n /** Any hosts associated with the entry */\n host?: string;\n /** Type of data silo */\n type?: string | undefined;\n}\n\n/**\n * Helper to scan for data silos in all package.json files that it can find in a directory\n *\n * @deprecated TODO: https://transcend.height.app/T-32325 - use code scanning instead\n * @param options - Options\n * @returns the list of integrations\n */\nexport async function findFilesToScan({\n scanPath,\n fileGlobs,\n ignoreDirs,\n config,\n}: {\n /** Where to look for package.json files */\n scanPath: string;\n /** Globs to look for */\n fileGlobs: string;\n /** The directories to ignore (excludes node_modules and serverless-build) */\n ignoreDirs: string;\n /** Silo Discovery configuration */\n config: CodeScanningConfig;\n}): Promise<SiloDiscoveryRawResults[]> {\n const { ignoreDirs: IGNORE_DIRS, supportedFiles, scanFunction } = config;\n const globsToSupport =\n fileGlobs === ''\n ? supportedFiles\n : supportedFiles.concat(fileGlobs.split(','));\n const dirsToIgnore = [...ignoreDirs.split(','), ...IGNORE_DIRS].filter(\n (dir) => dir.length > 0,\n );\n try {\n const filesToScan: string[] = await fastGlob(\n `${scanPath}/**/${globsToSupport.join('|')}`,\n {\n ignore: dirsToIgnore.map((dir: string) => `${scanPath}/**/${dir}`),\n unique: true,\n onlyFiles: true,\n },\n );\n logger.info(`Scanning: ${filesToScan.length} files`);\n const allPackages = filesToScan\n .map((filePath: string) => scanFunction(filePath))\n .flat();\n const allSdks = allPackages\n .map((appPackage) => appPackage.softwareDevelopmentKits || [])\n .flat();\n const uniqueDeps = new Set(allSdks.map((sdk) => sdk.name));\n const deps = [...uniqueDeps];\n logger.info(`Found: ${deps.length} unique dependencies`);\n return deps.map((dep) => ({\n name: dep,\n resourceId: `${scanPath}/**/${dep}`,\n useStrictClassifier: true,\n }));\n } catch (error) {\n throw new Error(\n `Error scanning globs ${findFilesToScan} with error: ${error}`,\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk52MA7ZLScjs = require('./chunk-52MA7ZLS.cjs');require('./chunk-M3Y6JH6I.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.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 _chunk52MA7ZLScjs.b.call(void 0, {auth:a,trackerStatus:r,file:s,classifyService:e,transcendUrl:n})}exports.uploadDataFlowsFromCsv = m;
2
- //# sourceMappingURL=impl-XLL66FXK.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMLH6KKUKcjs = require('./chunk-MLH6KKUK.cjs');require('./chunk-NZEATKWL.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.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 _chunkMLH6KKUKcjs.b.call(void 0, {auth:a,trackerStatus:r,file:s,classifyService:e,transcendUrl:n})}exports.uploadDataFlowsFromCsv = m;
2
+ //# sourceMappingURL=impl-RZSXBVAC.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-XLL66FXK.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-XLL66FXK.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-RZSXBVAC.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-RZSXBVAC.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}); 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 _chunk7H4ALAHCcjs = require('./chunk-7H4ALAHC.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkXXFLFF7Qcjs = require('./chunk-XXFLFF7Q.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=_chunk55B57ZAYcjs.xc.call(void 0, C,y),$=await _chunk7H4ALAHCcjs.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(_chunkXXFLFF7Qcjs.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=_chunkXXFLFF7Qcjs.j.call(void 0, [...s,...Object.keys(n)]),n});await _chunk55B57ZAYcjs.tg.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 ${_chunkXXFLFF7Qcjs.q}`))}exports.pullDatapoints = v;
2
- //# sourceMappingURL=impl-VUAC7AYF.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 _chunkSFPZ6GENcjs = require('./chunk-SFPZ6GEN.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkGJ6V5BHGcjs = require('./chunk-GJ6V5BHG.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=_chunkVWN5MN3Ucjs.zc.call(void 0, C,y),$=await _chunkSFPZ6GENcjs.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(_chunkGJ6V5BHGcjs.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=_chunkGJ6V5BHGcjs.j.call(void 0, [...s,...Object.keys(n)]),n});await _chunkVWN5MN3Ucjs.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 ${_chunkGJ6V5BHGcjs.q}`))}exports.pullDatapoints = v;
2
+ //# sourceMappingURL=impl-SA4YQJID.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-VUAC7AYF.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-VUAC7AYF.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-SA4YQJID.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-SA4YQJID.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});var _chunkQ2RJZGYWcjs = require('./chunk-Q2RJZGYW.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.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 _chunkQ2RJZGYWcjs.e.call(void 0, {file:i,transcendUrl:o,auth:r,sombraAuth:n,dataSiloId:s})}exports.markIdentifiersCompleted = d;
2
- //# sourceMappingURL=impl-55GTRVMZ.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCDX243U3cjs = require('./chunk-CDX243U3.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.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 _chunkCDX243U3cjs.e.call(void 0, {file:i,transcendUrl:o,auth:r,sombraAuth:n,dataSiloId:s})}exports.markIdentifiersCompleted = d;
2
+ //# sourceMappingURL=impl-SUS5VKKB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-55GTRVMZ.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-55GTRVMZ.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-SUS5VKKB.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-SUS5VKKB.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 _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.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 _chunk55B57ZAYcjs.Mf.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-K2D3GTZG.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.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 _chunkVWN5MN3Ucjs.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-T3KGRFUR.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-K2D3GTZG.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-K2D3GTZG.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-T3KGRFUR.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-T3KGRFUR.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});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.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 _chunk55B57ZAYcjs.Pf.call(void 0, {requestActions:r,transcendUrl:s,auth:o,dataSiloId:a})}exports.retryRequestDataSilos = c;
2
- //# sourceMappingURL=impl-4CWCLU5Z.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.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 _chunkVWN5MN3Ucjs.Rf.call(void 0, {requestActions:r,transcendUrl:s,auth:o,dataSiloId:a})}exports.retryRequestDataSilos = c;
2
+ //# sourceMappingURL=impl-T6FTWSLY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-4CWCLU5Z.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-4CWCLU5Z.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-T6FTWSLY.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-T6FTWSLY.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}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk52MA7ZLScjs = require('./chunk-52MA7ZLS.cjs');require('./chunk-M3Y6JH6I.cjs');var _chunkNC6VWOMNcjs = require('./chunk-NC6VWOMN.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.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 _chunkNC6VWOMNcjs.b.call(void 0, d),{syncGroups:f,html:u}=await _chunk52MA7ZLScjs.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-JFYHXSOV.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMLH6KKUKcjs = require('./chunk-MLH6KKUK.cjs');require('./chunk-NZEATKWL.cjs');var _chunk5UWKWV3Xcjs = require('./chunk-5UWKWV3X.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.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 _chunk5UWKWV3Xcjs.b.call(void 0, d),{syncGroups:f,html:u}=await _chunkMLH6KKUKcjs.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-TXBSRO6N.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-JFYHXSOV.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-JFYHXSOV.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-TXBSRO6N.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-TXBSRO6N.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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkALOB5SWZcjs = require('./chunk-ALOB5SWZ.cjs');var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunkNC6VWOMNcjs = require('./chunk-NC6VWOMN.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.cjs');require('./chunk-7PB6LVSE.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function P({auth:S,dataFlowsYmlFolder:o,dataSilosYmlFolder:e,ignoreYmls:T=[],transcendUrl:v}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, o)||!_fs.lstatSync.call(void 0, o).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${o}"`)),this.process.exit(1)),(!_fs.existsSync.call(void 0, e)||!_fs.lstatSync.call(void 0, e).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${e}"`)),this.process.exit(1));let u=_chunk55B57ZAYcjs.xc.call(void 0, v,S),{serviceToTitle:w,serviceToSupportedIntegration:F}=await _chunk55B57ZAYcjs.vd.call(void 0, u);_chunkNC6VWOMNcjs.c.call(void 0, o).forEach(i=>{let{"data-flows":C=[]}=_chunkJH5HRI6Dcjs.d.call(void 0, _path.join.call(void 0, o,i)),{adTechDataSilos:r,siteTechDataSilos:s}=_chunkALOB5SWZcjs.a.call(void 0, C,{serviceToSupportedIntegration:F,serviceToTitle:w}),a=[...r,...s];_chunkZUNVPK23cjs.a.log(`Total Services: ${a.length}`),_chunkZUNVPK23cjs.a.log(`Ad Tech Services: ${r.length}`),_chunkZUNVPK23cjs.a.log(`Site Tech Services: ${s.length}`),_chunkJH5HRI6Dcjs.e.call(void 0, _path.join.call(void 0, e,i),{"data-silos":T.includes(i)?[]:a})})}exports.deriveDataSilosFromDataFlows = P;
2
- //# sourceMappingURL=impl-PWYKAVK4.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkI6GMLKI6cjs = require('./chunk-I6GMLKI6.cjs');var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunk5UWKWV3Xcjs = require('./chunk-5UWKWV3X.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.cjs');require('./chunk-7PB6LVSE.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function P({auth:S,dataFlowsYmlFolder:o,dataSilosYmlFolder:e,ignoreYmls:T=[],transcendUrl:v}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, o)||!_fs.lstatSync.call(void 0, o).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${o}"`)),this.process.exit(1)),(!_fs.existsSync.call(void 0, e)||!_fs.lstatSync.call(void 0, e).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${e}"`)),this.process.exit(1));let u=_chunkVWN5MN3Ucjs.zc.call(void 0, v,S),{serviceToTitle:w,serviceToSupportedIntegration:F}=await _chunkVWN5MN3Ucjs.xd.call(void 0, u);_chunk5UWKWV3Xcjs.c.call(void 0, o).forEach(i=>{let{"data-flows":C=[]}=_chunkJH5HRI6Dcjs.d.call(void 0, _path.join.call(void 0, o,i)),{adTechDataSilos:r,siteTechDataSilos:s}=_chunkI6GMLKI6cjs.a.call(void 0, C,{serviceToSupportedIntegration:F,serviceToTitle:w}),a=[...r,...s];_chunkZUNVPK23cjs.a.log(`Total Services: ${a.length}`),_chunkZUNVPK23cjs.a.log(`Ad Tech Services: ${r.length}`),_chunkZUNVPK23cjs.a.log(`Site Tech Services: ${s.length}`),_chunkJH5HRI6Dcjs.e.call(void 0, _path.join.call(void 0, e,i),{"data-silos":T.includes(i)?[]:a})})}exports.deriveDataSilosFromDataFlows = P;
2
+ //# sourceMappingURL=impl-UKTKLJSZ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-PWYKAVK4.cjs","../src/commands/inventory/derive-data-silos-from-data-flows/impl.ts"],"names":["deriveDataSilosFromDataFlows","auth","dataFlowsYmlFolder","dataSilosYmlFolder","ignoreYmls","transcendUrl","doneInputValidation","existsSync","lstatSync","logger","colors","client","buildTranscendGraphQLClient","serviceToTitle","serviceToSupportedIntegration","fetchAndIndexCatalogs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","dataSilos"],"mappings":"AAAA,iOAAwC,wDAAgD,wDAAyC,gCAA6B,wDAAyC,wDAAkD,gCAA6B,wDAAyC,gCAA6B,gCAA6B,4BCKpW,gFACF,wBAImB,MAgBtC,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,kBAAA,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,CAAA,CAKnB,CAACK,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,EAA2BP,CAAkB,CAAA,CAAA,CAAG,CAAC,CAAA,CACzE,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMQ,CAAAA,CAASC,kCAAAA,CAA4BP,CAAcJ,CAAI,CAAA,CACvD,CAAE,cAAA,CAAAY,CAAAA,CAAgB,6BAAA,CAAAC,CAA8B,CAAA,CACpD,MAAMC,kCAAAA,CAA4B,CAAA,CAGpCC,iCAAAA,CAA4B,CAAA,CAAE,OAAA,CAASC,CAAAA,EAAc,CAEnD,GAAM,CAAE,YAAA,CAAcC,CAAAA,CAAY,CAAC,CAAE,CAAA,CAAIC,iCAAAA,wBACvCC,CAAKlB,CAAoBe,CAAS,CACpC,CAAA,CAGM,CAAE,eAAA,CAAAI,CAAAA,CAAiB,iBAAA,CAAAC,CAAkB,CAAA,CAAIC,iCAAAA,CAC7CL,CACA,CACE,6BAAA,CAAAJ,CAAAA,CACA,cAAA,CAAAD,CACF,CACF,CAAA,CAGMW,CAAAA,CAAY,CAAC,GAAGH,CAAAA,CAAiB,GAAGC,CAAiB,CAAA,CAC3Db,mBAAAA,CAAO,GAAA,CAAI,CAAA,gBAAA,EAAmBe,CAAAA,CAAU,MAAM,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-PWYKAVK4.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'node:path';\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 DeriveDataSilosFromDataFlowsCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n dataSilosYmlFolder: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlows(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n dataSilosYmlFolder,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCommandFlags,\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 // Ensure folder is passed\n if (\n !existsSync(dataSilosYmlFolder) ||\n !lstatSync(dataSilosYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataSilosYmlFolder}\"`));\n this.process.exit(1);\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 // List of each data flow yml file\n listFiles(dataFlowsYmlFolder).forEach((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 // combine and write to yml file\n const dataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechDataSilos.length}`);\n logger.log(`Site Tech Services: ${siteTechDataSilos.length}`);\n writeTranscendYaml(join(dataSilosYmlFolder, directory), {\n 'data-silos': ignoreYmls.includes(directory) ? [] : dataSilos,\n });\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-UKTKLJSZ.cjs","../src/commands/inventory/derive-data-silos-from-data-flows/impl.ts"],"names":["deriveDataSilosFromDataFlows","auth","dataFlowsYmlFolder","dataSilosYmlFolder","ignoreYmls","transcendUrl","doneInputValidation","existsSync","lstatSync","logger","colors","client","buildTranscendGraphQLClient","serviceToTitle","serviceToSupportedIntegration","fetchAndIndexCatalogs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","dataSilos"],"mappings":"AAAA,iOAAwC,wDAAgD,wDAAyC,gCAA6B,wDAAyC,wDAAkD,gCAA6B,wDAAyC,gCAA6B,gCAA6B,4BCKpW,gFACF,wBAImB,MAgBtC,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,kBAAA,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,CAAA,CAKnB,CAACK,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,EAA2BP,CAAkB,CAAA,CAAA,CAAG,CAAC,CAAA,CACzE,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMQ,CAAAA,CAASC,kCAAAA,CAA4BP,CAAcJ,CAAI,CAAA,CACvD,CAAE,cAAA,CAAAY,CAAAA,CAAgB,6BAAA,CAAAC,CAA8B,CAAA,CACpD,MAAMC,kCAAAA,CAA4B,CAAA,CAGpCC,iCAAAA,CAA4B,CAAA,CAAE,OAAA,CAASC,CAAAA,EAAc,CAEnD,GAAM,CAAE,YAAA,CAAcC,CAAAA,CAAY,CAAC,CAAE,CAAA,CAAIC,iCAAAA,wBACvCC,CAAKlB,CAAoBe,CAAS,CACpC,CAAA,CAGM,CAAE,eAAA,CAAAI,CAAAA,CAAiB,iBAAA,CAAAC,CAAkB,CAAA,CAAIC,iCAAAA,CAC7CL,CACA,CACE,6BAAA,CAAAJ,CAAAA,CACA,cAAA,CAAAD,CACF,CACF,CAAA,CAGMW,CAAAA,CAAY,CAAC,GAAGH,CAAAA,CAAiB,GAAGC,CAAiB,CAAA,CAC3Db,mBAAAA,CAAO,GAAA,CAAI,CAAA,gBAAA,EAAmBe,CAAAA,CAAU,MAAM,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-UKTKLJSZ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'node:path';\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 DeriveDataSilosFromDataFlowsCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n dataSilosYmlFolder: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlows(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n dataSilosYmlFolder,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCommandFlags,\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 // Ensure folder is passed\n if (\n !existsSync(dataSilosYmlFolder) ||\n !lstatSync(dataSilosYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataSilosYmlFolder}\"`));\n this.process.exit(1);\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 // List of each data flow yml file\n listFiles(dataFlowsYmlFolder).forEach((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 // combine and write to yml file\n const dataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechDataSilos.length}`);\n logger.log(`Site Tech Services: ${siteTechDataSilos.length}`);\n writeTranscendYaml(join(dataSilosYmlFolder, directory), {\n 'data-silos': ignoreYmls.includes(directory) ? [] : dataSilos,\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 _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunkHCEZRZHVcjs = require('./chunk-HCEZRZHV.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var W=["userId","timestamp","partition","decryptionStatus","updatedAt","usp","gpp","tcf","airgapVersion","metadata","metadataTimestamp"];async function Y({auth:f,partition:o,sombraAuth:V,file:r,transcendUrl:l,timestampBefore:d,timestampAfter:u,updatedBefore:s,updatedAfter:i,identifiers:Q=[],concurrency:g,shouldChunk:C,windowConcurrency:B,maxChunks:G,maxLookbackDays:H}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let h=await _chunk55B57ZAYcjs.yc.call(void 0, l,f,V),y=_chunk55B57ZAYcjs.xc.call(void 0, l,f),P=Q.map(e=>{if(!e.includes(":"))return{name:"email",value:e};let[t,m]=e.split(":");return{name:t,value:m}}),S={...d?{timestampBefore:d.toISOString()}:{},...u?{timestampAfter:u.toISOString()}:{},...i||s?{system:{...s?{updatedBefore:s.toISOString()}:{},...i?{updatedAfter:i.toISOString()}:{}}}:{},...P.length>0?{identifiers:P}:{}};_chunkZUNVPK23cjs.a.info(`Fetching consent preferences from partition ${o}, using mode=${C?"chunked-stream":"paged-stream"}...`),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Preparing CSV at: ${r}`));let[w,_]=await Promise.all([_chunk55B57ZAYcjs.hd.call(void 0, y),_chunk55B57ZAYcjs.vg.call(void 0, y)]),j=_.map(e=>e.name),E=Array.from(new Set(w.flatMap(e=>_nullishCoalesce(_optionalChain([e, 'access', _2 => _2.topics, 'optionalAccess', _3 => _3.map, 'call', _4 => _4(t=>`${e.trackingType}_${t.slug}`)]), () => ([]))))).sort((e,t)=>e.localeCompare(t)),K=Array.from(new Set(w.map(e=>e.trackingType))).sort((e,t)=>e.localeCompare(t)),M=[...W,...j,...K,...E],a=null,I=!1,b=e=>{if(!e||e.length===0)return;let t=e.map(_chunkHCEZRZHVcjs.b);if(!I){let m=Object.keys(_nullishCoalesce(t[0], () => ({}))),O=new Set;a=[...M,...m].filter(c=>c===void 0||O.has(c)?!1:(O.add(c),!0)),_chunk55B57ZAYcjs.og.call(void 0, r,a),I=!0}_chunk55B57ZAYcjs.pg.call(void 0, r,t,a)};if(C){await _chunkHCEZRZHVcjs.c.call(void 0, h,{partition:o,filterBy:S,limit:g,windowConcurrency:B,maxChunks:G,maxLookbackDays:H,onItems:e=>b(e)}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Finished writing CSV to ${r}`));return}await _chunkHCEZRZHVcjs.d.call(void 0, h,{partition:o,filterBy:S,limit:g,onItems:e=>b(e)}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Finished writing CSV to ${r}`))}exports.pullConsentPreferences = Y;
2
- //# sourceMappingURL=impl-A7XL5O4W.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunkLE6FS55Qcjs = require('./chunk-LE6FS55Q.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var W=["userId","timestamp","partition","decryptionStatus","updatedAt","usp","gpp","tcf","airgapVersion","metadata","metadataTimestamp"];async function Y({auth:f,partition:o,sombraAuth:V,file:r,transcendUrl:l,timestampBefore:d,timestampAfter:u,updatedBefore:s,updatedAfter:i,identifiers:Q=[],concurrency:g,shouldChunk:C,windowConcurrency:B,maxChunks:G,maxLookbackDays:H}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let h=await _chunkVWN5MN3Ucjs.Ac.call(void 0, l,f,V),y=_chunkVWN5MN3Ucjs.zc.call(void 0, l,f),P=Q.map(e=>{if(!e.includes(":"))return{name:"email",value:e};let[t,m]=e.split(":");return{name:t,value:m}}),S={...d?{timestampBefore:d.toISOString()}:{},...u?{timestampAfter:u.toISOString()}:{},...i||s?{system:{...s?{updatedBefore:s.toISOString()}:{},...i?{updatedAfter:i.toISOString()}:{}}}:{},...P.length>0?{identifiers:P}:{}};_chunkZUNVPK23cjs.a.info(`Fetching consent preferences from partition ${o}, using mode=${C?"chunked-stream":"paged-stream"}...`),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Preparing CSV at: ${r}`));let[w,_]=await Promise.all([_chunkVWN5MN3Ucjs.jd.call(void 0, y),_chunkVWN5MN3Ucjs.xg.call(void 0, y)]),j=_.map(e=>e.name),E=Array.from(new Set(w.flatMap(e=>_nullishCoalesce(_optionalChain([e, 'access', _2 => _2.topics, 'optionalAccess', _3 => _3.map, 'call', _4 => _4(t=>`${e.trackingType}_${t.slug}`)]), () => ([]))))).sort((e,t)=>e.localeCompare(t)),K=Array.from(new Set(w.map(e=>e.trackingType))).sort((e,t)=>e.localeCompare(t)),M=[...W,...j,...K,...E],a=null,I=!1,b=e=>{if(!e||e.length===0)return;let t=e.map(_chunkLE6FS55Qcjs.b);if(!I){let m=Object.keys(_nullishCoalesce(t[0], () => ({}))),O=new Set;a=[...M,...m].filter(c=>c===void 0||O.has(c)?!1:(O.add(c),!0)),_chunkVWN5MN3Ucjs.qg.call(void 0, r,a),I=!0}_chunkVWN5MN3Ucjs.rg.call(void 0, r,t,a)};if(C){await _chunkLE6FS55Qcjs.c.call(void 0, h,{partition:o,filterBy:S,limit:g,windowConcurrency:B,maxChunks:G,maxLookbackDays:H,onItems:e=>b(e)}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Finished writing CSV to ${r}`));return}await _chunkLE6FS55Qcjs.d.call(void 0, h,{partition:o,filterBy:S,limit:g,onItems:e=>b(e)}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Finished writing CSV to ${r}`))}exports.pullConsentPreferences = Y;
2
+ //# sourceMappingURL=impl-UU5CW4E4.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-A7XL5O4W.cjs","../src/commands/consent/pull-consent-preferences/impl.ts"],"names":["CORE_COLS","pullConsentPreferences","auth","partition","sombraAuth","file","transcendUrl","timestampBefore","timestampAfter","updatedBefore","updatedAfter","identifiers","concurrency","shouldChunk","windowConcurrency","maxChunks","maxLookbackDays","doneInputValidation","sombra","createSombraGotInstance","client","buildTranscendGraphQLClient","parsedIdentifiers","identifier","name","value","filterBy","logger","colors"],"mappings":"AAAA,y0BAAsD,wDAAyC,wDAAkF,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCC9R,IAqBbA,CAAAA,CAAY,CAChB,QAAA,CACA,WAAA,CACA,WAAA,CACA,kBAAA,CACA,WAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,eAAA,CACA,UAAA,CACA,mBACF,CAAA,CAoBA,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,CAAC,CAAA,CACf,WAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBb,CAAcJ,CAAAA,CAAME,CAAU,CAAA,CACrEgB,CAAAA,CAASC,kCAAAA,CAA4Bf,CAAcJ,CAAI,CAAA,CAGvDoB,CAAAA,CAAoBX,CAAAA,CAAY,GAAA,CACnCY,CAAAA,EAAqC,CACpC,EAAA,CAAI,CAACA,CAAAA,CAAW,QAAA,CAAS,GAAG,CAAA,CAC1B,MAAO,CACL,IAAA,CAAM,OAAA,CACN,KAAA,CAAOA,CACT,CAAA,CAEF,GAAM,CAACC,CAAAA,CAAMC,CAAK,CAAA,CAAIF,CAAAA,CAAW,KAAA,CAAM,GAAG,CAAA,CAC1C,MAAO,CAAE,IAAA,CAAAC,CAAAA,CAAM,KAAA,CAAAC,CAAM,CACvB,CACF,CAAA,CAGMC,CAAAA,CAAW,CACf,GAAInB,CAAAA,CACA,CAAE,eAAA,CAAiBA,CAAAA,CAAgB,WAAA,CAAY,CAAE,CAAA,CACjD,CAAC,CAAA,CACL,GAAIC,CAAAA,CAAiB,CAAE,cAAA,CAAgBA,CAAAA,CAAe,WAAA,CAAY,CAAE,CAAA,CAAI,CAAC,CAAA,CACzE,GAAIE,CAAAA,EAAgBD,CAAAA,CAChB,CACE,MAAA,CAAQ,CACN,GAAIA,CAAAA,CACA,CAAE,aAAA,CAAeA,CAAAA,CAAc,WAAA,CAAY,CAAE,CAAA,CAC7C,CAAC,CAAA,CACL,GAAIC,CAAAA,CACA,CAAE,YAAA,CAAcA,CAAAA,CAAa,WAAA,CAAY,CAAE,CAAA,CAC3C,CAAC,CACP,CACF,CAAA,CACA,CAAC,CAAA,CACL,GAAIY,CAAAA,CAAkB,MAAA,CAAS,CAAA,CAAI,CAAE,WAAA,CAAaA,CAAkB,CAAA,CAAI,CAAC,CAC3E,CAAA,CAEAK,mBAAAA,CAAO,IAAA,CACL,CAAA,4CAAA,EAA+CxB,CAAS,CAAA,aAAA,EACtDU,CAAAA,CAAc,gBAAA,CAAmB,cACnC,CAAA,GAAA,CACF,CAAA,CAEAc,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,kBAAA,EAAqBvB,CAAI,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-A7XL5O4W.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport {\n fetchConsentPreferences,\n fetchConsentPreferencesChunked,\n transformPreferenceRecordToCsv,\n type PreferenceIdentifier,\n} from '../../../lib/preference-management';\nimport {\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllIdentifiers,\n fetchAllPurposesAndPreferences,\n} from '../../../lib/graphql';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { logger } from '../../../logger';\nimport { initCsvFile, appendCsvRowsOrdered } from '../../../lib/helpers';\nimport type { PreferenceQueryResponseItem } from '@transcend-io/privacy-types';\n\n// Known “core” columns your transformer usually produces up front.\n// Leave this list conservative; we’ll still union with transformer keys.\nconst CORE_COLS = [\n 'userId',\n 'timestamp',\n 'partition',\n 'decryptionStatus',\n 'updatedAt',\n 'usp',\n 'gpp',\n 'tcf',\n 'airgapVersion',\n 'metadata',\n 'metadataTimestamp',\n];\n\nexport interface PullConsentPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n file: string;\n transcendUrl: string;\n timestampBefore?: Date;\n timestampAfter?: Date;\n updatedBefore?: Date;\n updatedAfter?: Date;\n identifiers?: string[];\n concurrency: number;\n shouldChunk: boolean;\n windowConcurrency: number;\n maxChunks: number;\n maxLookbackDays: number;\n}\n\nexport async function pullConsentPreferences(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n file,\n transcendUrl,\n timestampBefore,\n timestampAfter,\n updatedBefore,\n updatedAfter,\n identifiers = [],\n concurrency,\n shouldChunk,\n windowConcurrency,\n maxChunks,\n maxLookbackDays,\n }: PullConsentPreferencesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Identifiers are key:value, parse to PreferenceIdentifier[]\n const parsedIdentifiers = identifiers.map(\n (identifier): PreferenceIdentifier => {\n if (!identifier.includes(':')) {\n return {\n name: 'email',\n value: identifier,\n };\n }\n const [name, value] = identifier.split(':');\n return { name, value };\n },\n );\n\n // Build filter\n const filterBy = {\n ...(timestampBefore\n ? { timestampBefore: timestampBefore.toISOString() }\n : {}),\n ...(timestampAfter ? { timestampAfter: timestampAfter.toISOString() } : {}),\n ...(updatedAfter || updatedBefore\n ? {\n system: {\n ...(updatedBefore\n ? { updatedBefore: updatedBefore.toISOString() }\n : {}),\n ...(updatedAfter\n ? { updatedAfter: updatedAfter.toISOString() }\n : {}),\n },\n }\n : {}),\n ...(parsedIdentifiers.length > 0 ? { identifiers: parsedIdentifiers } : {}),\n };\n\n logger.info(\n `Fetching consent preferences from partition ${partition}, using mode=${\n shouldChunk ? 'chunked-stream' : 'paged-stream'\n }...`,\n );\n\n logger.info(colors.magenta(`Preparing CSV at: ${file}`));\n\n // Fetch full sets (purposes+topics, identifiers) to ensure header completeness\n const [purposesWithTopics, allIdentifiers] = await Promise.all([\n fetchAllPurposesAndPreferences(client),\n fetchAllIdentifiers(client),\n ]);\n\n // Identifier columns: exactly the identifier names\n const identifierCols = allIdentifiers.map((i) => i.name);\n\n // Preference topic columns: topic names (de-duped)\n const topicCols = Array.from(\n new Set(\n purposesWithTopics.flatMap(\n (p) => p.topics?.map((t) => `${p.trackingType}_${t.slug}`) ?? [],\n ),\n ),\n ).sort((a, b) => a.localeCompare(b));\n\n // Some setups also want a per-purpose boolean column (e.g., “Email”, “Sms”).\n // If your transformer includes those, list them here, derived from purposes:\n const purposeCols = Array.from(\n new Set(purposesWithTopics.map((p) => p.trackingType)),\n ).sort((a, b) => a.localeCompare(b));\n\n // Build the complete header skeleton.\n // We’ll still union with the first transformed row’s keys to be safe.\n const completeHeadersList = [\n ...CORE_COLS,\n ...identifierCols,\n ...purposeCols,\n ...topicCols,\n ];\n\n // Lazily initialize CSV header order from the first transformed row.\n let headerOrder: string[] | null = null;\n let wroteHeader = false;\n const writeRows = (items: PreferenceQueryResponseItem[]): void => {\n if (!items || items.length === 0) return;\n const rows = items.map(transformPreferenceRecordToCsv);\n if (!wroteHeader) {\n const firstKeys = Object.keys(rows[0] ?? {});\n const seen = new Set<string>();\n headerOrder = [...completeHeadersList, ...firstKeys].filter((k) => {\n if (k === undefined) return false;\n if (seen.has(k)) return false;\n seen.add(k);\n return true;\n });\n initCsvFile(file, headerOrder);\n wroteHeader = true;\n }\n appendCsvRowsOrdered(file, rows, headerOrder!);\n };\n\n if (shouldChunk) {\n // Stream via chunked fetcher with page callback\n await fetchConsentPreferencesChunked(sombra, {\n partition,\n filterBy,\n limit: concurrency,\n windowConcurrency,\n maxChunks,\n maxLookbackDays,\n onItems: (items) => writeRows(items),\n });\n\n logger.info(colors.green(`Finished writing CSV to ${file}`));\n return;\n }\n\n // Non-chunked path: still stream page-by-page via onItems (no in-memory accumulation)\n await fetchConsentPreferences(sombra, {\n partition,\n filterBy,\n limit: concurrency, // page size (API max 50 enforced internally)\n onItems: (items) => writeRows(items),\n });\n\n logger.info(colors.green(`Finished writing CSV to ${file}`));\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-UU5CW4E4.cjs","../src/commands/consent/pull-consent-preferences/impl.ts"],"names":["CORE_COLS","pullConsentPreferences","auth","partition","sombraAuth","file","transcendUrl","timestampBefore","timestampAfter","updatedBefore","updatedAfter","identifiers","concurrency","shouldChunk","windowConcurrency","maxChunks","maxLookbackDays","doneInputValidation","sombra","createSombraGotInstance","client","buildTranscendGraphQLClient","parsedIdentifiers","identifier","name","value","filterBy","logger","colors"],"mappings":"AAAA,y0BAAsD,wDAAyC,wDAAkF,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCC9R,IAqBbA,CAAAA,CAAY,CAChB,QAAA,CACA,WAAA,CACA,WAAA,CACA,kBAAA,CACA,WAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,eAAA,CACA,UAAA,CACA,mBACF,CAAA,CAoBA,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,CAAC,CAAA,CACf,WAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBb,CAAcJ,CAAAA,CAAME,CAAU,CAAA,CACrEgB,CAAAA,CAASC,kCAAAA,CAA4Bf,CAAcJ,CAAI,CAAA,CAGvDoB,CAAAA,CAAoBX,CAAAA,CAAY,GAAA,CACnCY,CAAAA,EAAqC,CACpC,EAAA,CAAI,CAACA,CAAAA,CAAW,QAAA,CAAS,GAAG,CAAA,CAC1B,MAAO,CACL,IAAA,CAAM,OAAA,CACN,KAAA,CAAOA,CACT,CAAA,CAEF,GAAM,CAACC,CAAAA,CAAMC,CAAK,CAAA,CAAIF,CAAAA,CAAW,KAAA,CAAM,GAAG,CAAA,CAC1C,MAAO,CAAE,IAAA,CAAAC,CAAAA,CAAM,KAAA,CAAAC,CAAM,CACvB,CACF,CAAA,CAGMC,CAAAA,CAAW,CACf,GAAInB,CAAAA,CACA,CAAE,eAAA,CAAiBA,CAAAA,CAAgB,WAAA,CAAY,CAAE,CAAA,CACjD,CAAC,CAAA,CACL,GAAIC,CAAAA,CAAiB,CAAE,cAAA,CAAgBA,CAAAA,CAAe,WAAA,CAAY,CAAE,CAAA,CAAI,CAAC,CAAA,CACzE,GAAIE,CAAAA,EAAgBD,CAAAA,CAChB,CACE,MAAA,CAAQ,CACN,GAAIA,CAAAA,CACA,CAAE,aAAA,CAAeA,CAAAA,CAAc,WAAA,CAAY,CAAE,CAAA,CAC7C,CAAC,CAAA,CACL,GAAIC,CAAAA,CACA,CAAE,YAAA,CAAcA,CAAAA,CAAa,WAAA,CAAY,CAAE,CAAA,CAC3C,CAAC,CACP,CACF,CAAA,CACA,CAAC,CAAA,CACL,GAAIY,CAAAA,CAAkB,MAAA,CAAS,CAAA,CAAI,CAAE,WAAA,CAAaA,CAAkB,CAAA,CAAI,CAAC,CAC3E,CAAA,CAEAK,mBAAAA,CAAO,IAAA,CACL,CAAA,4CAAA,EAA+CxB,CAAS,CAAA,aAAA,EACtDU,CAAAA,CAAc,gBAAA,CAAmB,cACnC,CAAA,GAAA,CACF,CAAA,CAEAc,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,kBAAA,EAAqBvB,CAAI,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-UU5CW4E4.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport {\n fetchConsentPreferences,\n fetchConsentPreferencesChunked,\n transformPreferenceRecordToCsv,\n type PreferenceIdentifier,\n} from '../../../lib/preference-management';\nimport {\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllIdentifiers,\n fetchAllPurposesAndPreferences,\n} from '../../../lib/graphql';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { logger } from '../../../logger';\nimport { initCsvFile, appendCsvRowsOrdered } from '../../../lib/helpers';\nimport type { PreferenceQueryResponseItem } from '@transcend-io/privacy-types';\n\n// Known “core” columns your transformer usually produces up front.\n// Leave this list conservative; we’ll still union with transformer keys.\nconst CORE_COLS = [\n 'userId',\n 'timestamp',\n 'partition',\n 'decryptionStatus',\n 'updatedAt',\n 'usp',\n 'gpp',\n 'tcf',\n 'airgapVersion',\n 'metadata',\n 'metadataTimestamp',\n];\n\nexport interface PullConsentPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n file: string;\n transcendUrl: string;\n timestampBefore?: Date;\n timestampAfter?: Date;\n updatedBefore?: Date;\n updatedAfter?: Date;\n identifiers?: string[];\n concurrency: number;\n shouldChunk: boolean;\n windowConcurrency: number;\n maxChunks: number;\n maxLookbackDays: number;\n}\n\nexport async function pullConsentPreferences(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n file,\n transcendUrl,\n timestampBefore,\n timestampAfter,\n updatedBefore,\n updatedAfter,\n identifiers = [],\n concurrency,\n shouldChunk,\n windowConcurrency,\n maxChunks,\n maxLookbackDays,\n }: PullConsentPreferencesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Identifiers are key:value, parse to PreferenceIdentifier[]\n const parsedIdentifiers = identifiers.map(\n (identifier): PreferenceIdentifier => {\n if (!identifier.includes(':')) {\n return {\n name: 'email',\n value: identifier,\n };\n }\n const [name, value] = identifier.split(':');\n return { name, value };\n },\n );\n\n // Build filter\n const filterBy = {\n ...(timestampBefore\n ? { timestampBefore: timestampBefore.toISOString() }\n : {}),\n ...(timestampAfter ? { timestampAfter: timestampAfter.toISOString() } : {}),\n ...(updatedAfter || updatedBefore\n ? {\n system: {\n ...(updatedBefore\n ? { updatedBefore: updatedBefore.toISOString() }\n : {}),\n ...(updatedAfter\n ? { updatedAfter: updatedAfter.toISOString() }\n : {}),\n },\n }\n : {}),\n ...(parsedIdentifiers.length > 0 ? { identifiers: parsedIdentifiers } : {}),\n };\n\n logger.info(\n `Fetching consent preferences from partition ${partition}, using mode=${\n shouldChunk ? 'chunked-stream' : 'paged-stream'\n }...`,\n );\n\n logger.info(colors.magenta(`Preparing CSV at: ${file}`));\n\n // Fetch full sets (purposes+topics, identifiers) to ensure header completeness\n const [purposesWithTopics, allIdentifiers] = await Promise.all([\n fetchAllPurposesAndPreferences(client),\n fetchAllIdentifiers(client),\n ]);\n\n // Identifier columns: exactly the identifier names\n const identifierCols = allIdentifiers.map((i) => i.name);\n\n // Preference topic columns: topic names (de-duped)\n const topicCols = Array.from(\n new Set(\n purposesWithTopics.flatMap(\n (p) => p.topics?.map((t) => `${p.trackingType}_${t.slug}`) ?? [],\n ),\n ),\n ).sort((a, b) => a.localeCompare(b));\n\n // Some setups also want a per-purpose boolean column (e.g., “Email”, “Sms”).\n // If your transformer includes those, list them here, derived from purposes:\n const purposeCols = Array.from(\n new Set(purposesWithTopics.map((p) => p.trackingType)),\n ).sort((a, b) => a.localeCompare(b));\n\n // Build the complete header skeleton.\n // We’ll still union with the first transformed row’s keys to be safe.\n const completeHeadersList = [\n ...CORE_COLS,\n ...identifierCols,\n ...purposeCols,\n ...topicCols,\n ];\n\n // Lazily initialize CSV header order from the first transformed row.\n let headerOrder: string[] | null = null;\n let wroteHeader = false;\n const writeRows = (items: PreferenceQueryResponseItem[]): void => {\n if (!items || items.length === 0) return;\n const rows = items.map(transformPreferenceRecordToCsv);\n if (!wroteHeader) {\n const firstKeys = Object.keys(rows[0] ?? {});\n const seen = new Set<string>();\n headerOrder = [...completeHeadersList, ...firstKeys].filter((k) => {\n if (k === undefined) return false;\n if (seen.has(k)) return false;\n seen.add(k);\n return true;\n });\n initCsvFile(file, headerOrder);\n wroteHeader = true;\n }\n appendCsvRowsOrdered(file, rows, headerOrder!);\n };\n\n if (shouldChunk) {\n // Stream via chunked fetcher with page callback\n await fetchConsentPreferencesChunked(sombra, {\n partition,\n filterBy,\n limit: concurrency,\n windowConcurrency,\n maxChunks,\n maxLookbackDays,\n onItems: (items) => writeRows(items),\n });\n\n logger.info(colors.green(`Finished writing CSV to ${file}`));\n return;\n }\n\n // Non-chunked path: still stream page-by-page via onItems (no in-memory accumulation)\n await fetchConsentPreferences(sombra, {\n partition,\n filterBy,\n limit: concurrency, // page size (API max 50 enforced internally)\n onItems: (items) => writeRows(items),\n });\n\n logger.info(colors.green(`Finished writing CSV to ${file}`));\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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 _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.cjs');require('./chunk-7PB6LVSE.cjs');var _iots = require('io-ts'); var c = _interopRequireWildcard(_iots);var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var _privacytypes = require('@transcend-io/privacy-types');async function U({auth:k,file:s,transcendUrl:$,duration:A,subjectType:P,emailColumnName:a,coreIdentifierColumnName:r}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),_fs.existsSync.call(void 0, s)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`File does not exist: "${s}". Please provide a valid path to a CSV file.`)),this.process.exit(1));try{let p=_chunk55B57ZAYcjs.xc.call(void 0, $,k),b=c.type({[a]:c.string,...r?{[r]:c.string}:{}}),n=_chunk55B57ZAYcjs.sc.call(void 0, s,b);if(!n.length)throw new Error("Input CSV is empty.");let h=n.map((e,t)=>[e,t]).filter(([e])=>!_optionalChain([e, 'access', _ => _[a], 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]));if(h.length){let e=h.map(([,t])=>t+2).join(", ");throw new Error(`The following rows are missing the required "${a}" column: ${e}`)}if(r){let e=n.map((t,o)=>[t,o]).filter(([t])=>!_optionalChain([t, 'access', _4 => _4[r], 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]));if(e.length){let t=e.map(([,o])=>o+2).join(", ");throw new Error(`The following rows are missing the required "${r}" column: ${t}`)}}let I=Math.max(1,Math.floor(A/1e3)),d=n.map((e,t)=>{let o=e[a].trim(),f=r?_optionalChain([e, 'access', _7 => _7[r], 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]):void 0,j=[_privacytypes.SombraStandardScope.PreferenceManagement];return{subjectType:P,scopes:j,expiresIn:I,email:o,...f?{coreIdentifier:f}:{},index:t}}),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);m.start(d.length,0);let v=Date.now(),l=await _chunk55B57ZAYcjs.Kc.call(void 0, p,d,e=>{m.update(e)});m.update(d.length),m.stop();let E=l.map(({accessToken:e,input:t})=>{if(typeof t.index!="number")throw new Error("Internal error: missing input index.");return{...n[t.index],token:e}});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing access tokens to file "${s}"...`)),await _chunk55B57ZAYcjs.rg.call(void 0, s,E,!0);let M=Math.round((Date.now()-v)/1e3);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully generated ${l.length} access tokens to "${s}" in ${M}s!`))}catch(p){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred while generating access tokens: ${_optionalChain([p, 'optionalAccess', _10 => _10.message])||String(p)}`)),this.process.exit(1)}}exports.generateAccessTokens = U;
2
- //# sourceMappingURL=impl-REKQO7ZI.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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 _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.cjs');require('./chunk-7PB6LVSE.cjs');var _iots = require('io-ts'); var c = _interopRequireWildcard(_iots);var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var _privacytypes = require('@transcend-io/privacy-types');async function U({auth:k,file:s,transcendUrl:$,duration:A,subjectType:P,emailColumnName:a,coreIdentifierColumnName:r}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),_fs.existsSync.call(void 0, s)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`File does not exist: "${s}". Please provide a valid path to a CSV file.`)),this.process.exit(1));try{let p=_chunkVWN5MN3Ucjs.zc.call(void 0, $,k),b=c.type({[a]:c.string,...r?{[r]:c.string}:{}}),n=_chunkVWN5MN3Ucjs.uc.call(void 0, s,b);if(!n.length)throw new Error("Input CSV is empty.");let h=n.map((e,t)=>[e,t]).filter(([e])=>!_optionalChain([e, 'access', _ => _[a], 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]));if(h.length){let e=h.map(([,t])=>t+2).join(", ");throw new Error(`The following rows are missing the required "${a}" column: ${e}`)}if(r){let e=n.map((t,o)=>[t,o]).filter(([t])=>!_optionalChain([t, 'access', _4 => _4[r], 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]));if(e.length){let t=e.map(([,o])=>o+2).join(", ");throw new Error(`The following rows are missing the required "${r}" column: ${t}`)}}let I=Math.max(1,Math.floor(A/1e3)),d=n.map((e,t)=>{let o=e[a].trim(),f=r?_optionalChain([e, 'access', _7 => _7[r], 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]):void 0,j=[_privacytypes.SombraStandardScope.PreferenceManagement];return{subjectType:P,scopes:j,expiresIn:I,email:o,...f?{coreIdentifier:f}:{},index:t}}),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);m.start(d.length,0);let v=Date.now(),l=await _chunkVWN5MN3Ucjs.Mc.call(void 0, p,d,e=>{m.update(e)});m.update(d.length),m.stop();let E=l.map(({accessToken:e,input:t})=>{if(typeof t.index!="number")throw new Error("Internal error: missing input index.");return{...n[t.index],token:e}});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing access tokens to file "${s}"...`)),await _chunkVWN5MN3Ucjs.tg.call(void 0, s,E,!0);let M=Math.round((Date.now()-v)/1e3);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully generated ${l.length} access tokens to "${s}" in ${M}s!`))}catch(p){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred while generating access tokens: ${_optionalChain([p, 'optionalAccess', _10 => _10.message])||String(p)}`)),this.process.exit(1)}}exports.generateAccessTokens = U;
2
+ //# sourceMappingURL=impl-UYKI3NKQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-REKQO7ZI.cjs","../src/commands/consent/generate-access-tokens/impl.ts"],"names":["generateAccessTokens","auth","file","transcendUrl","duration","subjectType","emailColumnName","coreIdentifierColumnName","doneInputValidation","existsSync","logger","colors","client","buildTranscendGraphQLClient","codec","rows","readCsv","missingEmail","r","i","rowNumbers"],"mappings":"AAAA,u/BAAwC,wDAAkE,gCAA6B,wDAAyC,gCAA6B,gCAA6B,qECCvN,gFACA,wBAGQ,qGACH,2DAOY,MA4BpC,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAChCC,4BAAAA,CAAe,CAAA,EAAA,CAClBC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,sBAAA,EAAyBT,CAAI,CAAA,6CAAA,CAC/B,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrB,GAAI,CAEF,IAAMU,CAAAA,CAASC,kCAAAA,CAA4BV,CAAcF,CAAI,CAAA,CAGvDa,CAAAA,CAAU,CAAA,CAAA,IAAA,CAAK,CACnB,CAACR,CAAe,CAAA,CAAK,CAAA,CAAA,MAAA,CACrB,GAAIC,CAAAA,CACA,CAAE,CAACA,CAAwB,CAAA,CAAK,CAAA,CAAA,MAAO,CAAA,CACvC,CAAC,CACP,CAAC,CAAA,CACKQ,CAAAA,CAAsCC,kCAAAA,CAAQd,CAAMY,CAAK,CAAA,CAC/D,EAAA,CAAI,CAACC,CAAAA,CAAK,MAAA,CACR,MAAM,IAAI,KAAA,CAAM,qBAAqB,CAAA,CAIvC,IAAME,CAAAA,CAAeF,CAAAA,CAClB,GAAA,CAAI,CAACG,CAAAA,CAAGC,CAAAA,CAAAA,EAAM,CAACD,CAAAA,CAAGC,CAAC,CAAU,CAAA,CAC7B,MAAA,CAAO,CAAC,CAACD,CAAC,CAAA,CAAA,EAAM,iBAACA,CAAAA,mBAAEZ,CAAe,CAAA,6BAAG,IAAA,mBAAK,GAAC,CAAA,CAC9C,EAAA,CAAIW,CAAAA,CAAa,MAAA,CAAQ,CACvB,IAAMG,CAAAA,CAAaH,CAAAA,CAChB,GAAA,CAAI,CAAC,CAAC,CAAEE,CAAC,CAAA,CAAA,EAAMA,CAAAA,CAAI,CAAC,CAAA,CACpB,IAAA,CAAK,IAAI,CAAA,CACZ,MAAM,IAAI,KAAA,CACR,CAAA,6CAAA,EAAgDb,CAAe,CAAA,UAAA,EAAac,CAAU,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-REKQO7ZI.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport * as t from 'io-ts';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { existsSync } from 'node:fs';\nimport cliProgress from 'cli-progress';\nimport {\n buildTranscendGraphQLClient,\n createPreferenceAccessTokens,\n type PreferenceAccessTokenInputWithIndex,\n} from '../../../lib/graphql';\nimport { readCsv } from '../../../lib/requests';\nimport { SombraStandardScope } from '@transcend-io/privacy-types';\nimport { writeCsv } from '../../../lib/helpers';\n\n/**\n * CLI flags accepted by the `generate-access-tokens` command.\n *\n * These are passed down from the CLI parser into the parent process.\n */\nexport type GenerateAccessTokenCommandFlags = {\n auth: string;\n file: string;\n duration: number;\n transcendUrl: string;\n subjectType: string;\n emailColumnName: string;\n coreIdentifierColumnName?: string;\n};\n\n/**\n * Take in a CSV of user identifiers and generate access tokens for each user.\n *\n * Expected CSV columns:\n * - [emailColumnName] (required)\n * - [coreIdentifierColumnName] (optional)\n *\n * @param this - Bound CLI context (provides process exit + logging).\n * @param flags - CLI options for the run.\n */\nexport async function generateAccessTokens(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n duration,\n subjectType,\n emailColumnName,\n coreIdentifierColumnName,\n }: GenerateAccessTokenCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n if (!existsSync(file)) {\n logger.error(\n colors.red(\n `File does not exist: \"${file}\". Please provide a valid path to a CSV file.`,\n ),\n );\n this.process.exit(1);\n }\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read + parse CSV\n const codec = t.type({\n [emailColumnName]: t.string,\n ...(coreIdentifierColumnName\n ? { [coreIdentifierColumnName]: t.string }\n : {}),\n });\n const rows: Array<Record<string, string>> = readCsv(file, codec);\n if (!rows.length) {\n throw new Error('Input CSV is empty.');\n }\n\n // Ensure emails and core identifiers exist\n const missingEmail = rows\n .map((r, i) => [r, i] as const)\n .filter(([r]) => !r[emailColumnName]?.trim());\n if (missingEmail.length) {\n const rowNumbers = missingEmail\n .map(([, i]) => i + 2) // +2 to account for header row and 0-indexing\n .join(', ');\n throw new Error(\n `The following rows are missing the required \"${emailColumnName}\" column: ${rowNumbers}`,\n );\n }\n if (coreIdentifierColumnName) {\n const missingCoreId = rows\n .map((r, i) => [r, i] as const)\n .filter(([r]) => !r[coreIdentifierColumnName]?.trim());\n if (missingCoreId.length) {\n const rowNumbers = missingCoreId\n .map(([, i]) => i + 2) // +2 to account for header row and 0-indexing\n .join(', ');\n throw new Error(\n `The following rows are missing the required \"${coreIdentifierColumnName}\" column: ${rowNumbers}`,\n );\n }\n }\n\n // Duration provided by CLI is in ms; GraphQL expects seconds\n const expiresInSeconds = Math.max(1, Math.floor(duration / 1000));\n\n // Build inputs for GraphQL\n const inputs = rows.map((r, index): PreferenceAccessTokenInputWithIndex => {\n const email = r[emailColumnName].trim();\n const coreIdentifier = coreIdentifierColumnName\n ? r[coreIdentifierColumnName]?.trim()\n : undefined;\n const scopes = [SombraStandardScope.PreferenceManagement];\n return {\n subjectType,\n scopes,\n expiresIn: expiresInSeconds,\n email,\n ...(coreIdentifier ? { coreIdentifier } : {}),\n index,\n };\n });\n\n // Progress bar\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n progressBar.start(inputs.length, 0);\n\n // Kick off token creation (batched internally)\n const t0 = Date.now();\n const results = await createPreferenceAccessTokens(\n client,\n inputs,\n (progress) => {\n progressBar.update(progress);\n },\n );\n progressBar.update(inputs.length);\n progressBar.stop();\n\n // Prepare output CSV rows\n const outputRows = results.map(({ accessToken, input }) => {\n if (typeof input.index !== 'number') {\n throw new Error('Internal error: missing input index.');\n }\n return {\n ...rows[input.index],\n token: accessToken,\n };\n });\n\n logger.info(colors.magenta(`Writing access tokens to file \"${file}\"...`));\n await writeCsv(file, outputRows, true);\n\n const totalTimeSec = Math.round((Date.now() - t0) / 1000);\n logger.info(\n colors.green(\n `Successfully generated ${results.length} access tokens to \"${file}\" in ${totalTimeSec}s!`,\n ),\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (err: any) {\n logger.error(\n colors.red(\n `An error occurred while generating access tokens: ${\n err?.message || String(err)\n }`,\n ),\n );\n this.process.exit(1);\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-UYKI3NKQ.cjs","../src/commands/consent/generate-access-tokens/impl.ts"],"names":["generateAccessTokens","auth","file","transcendUrl","duration","subjectType","emailColumnName","coreIdentifierColumnName","doneInputValidation","existsSync","logger","colors","client","buildTranscendGraphQLClient","codec","rows","readCsv","missingEmail","r","i","rowNumbers"],"mappings":"AAAA,u/BAAwC,wDAAkE,gCAA6B,wDAAyC,gCAA6B,gCAA6B,qECCvN,gFACA,wBAGQ,qGACH,2DAOY,MA4BpC,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAChCC,4BAAAA,CAAe,CAAA,EAAA,CAClBC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,sBAAA,EAAyBT,CAAI,CAAA,6CAAA,CAC/B,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrB,GAAI,CAEF,IAAMU,CAAAA,CAASC,kCAAAA,CAA4BV,CAAcF,CAAI,CAAA,CAGvDa,CAAAA,CAAU,CAAA,CAAA,IAAA,CAAK,CACnB,CAACR,CAAe,CAAA,CAAK,CAAA,CAAA,MAAA,CACrB,GAAIC,CAAAA,CACA,CAAE,CAACA,CAAwB,CAAA,CAAK,CAAA,CAAA,MAAO,CAAA,CACvC,CAAC,CACP,CAAC,CAAA,CACKQ,CAAAA,CAAsCC,kCAAAA,CAAQd,CAAMY,CAAK,CAAA,CAC/D,EAAA,CAAI,CAACC,CAAAA,CAAK,MAAA,CACR,MAAM,IAAI,KAAA,CAAM,qBAAqB,CAAA,CAIvC,IAAME,CAAAA,CAAeF,CAAAA,CAClB,GAAA,CAAI,CAACG,CAAAA,CAAGC,CAAAA,CAAAA,EAAM,CAACD,CAAAA,CAAGC,CAAC,CAAU,CAAA,CAC7B,MAAA,CAAO,CAAC,CAACD,CAAC,CAAA,CAAA,EAAM,iBAACA,CAAAA,mBAAEZ,CAAe,CAAA,6BAAG,IAAA,mBAAK,GAAC,CAAA,CAC9C,EAAA,CAAIW,CAAAA,CAAa,MAAA,CAAQ,CACvB,IAAMG,CAAAA,CAAaH,CAAAA,CAChB,GAAA,CAAI,CAAC,CAAC,CAAEE,CAAC,CAAA,CAAA,EAAMA,CAAAA,CAAI,CAAC,CAAA,CACpB,IAAA,CAAK,IAAI,CAAA,CACZ,MAAM,IAAI,KAAA,CACR,CAAA,6CAAA,EAAgDb,CAAe,CAAA,UAAA,EAAac,CAAU,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-UYKI3NKQ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport * as t from 'io-ts';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { existsSync } from 'node:fs';\nimport cliProgress from 'cli-progress';\nimport {\n buildTranscendGraphQLClient,\n createPreferenceAccessTokens,\n type PreferenceAccessTokenInputWithIndex,\n} from '../../../lib/graphql';\nimport { readCsv } from '../../../lib/requests';\nimport { SombraStandardScope } from '@transcend-io/privacy-types';\nimport { writeCsv } from '../../../lib/helpers';\n\n/**\n * CLI flags accepted by the `generate-access-tokens` command.\n *\n * These are passed down from the CLI parser into the parent process.\n */\nexport type GenerateAccessTokenCommandFlags = {\n auth: string;\n file: string;\n duration: number;\n transcendUrl: string;\n subjectType: string;\n emailColumnName: string;\n coreIdentifierColumnName?: string;\n};\n\n/**\n * Take in a CSV of user identifiers and generate access tokens for each user.\n *\n * Expected CSV columns:\n * - [emailColumnName] (required)\n * - [coreIdentifierColumnName] (optional)\n *\n * @param this - Bound CLI context (provides process exit + logging).\n * @param flags - CLI options for the run.\n */\nexport async function generateAccessTokens(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n duration,\n subjectType,\n emailColumnName,\n coreIdentifierColumnName,\n }: GenerateAccessTokenCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n if (!existsSync(file)) {\n logger.error(\n colors.red(\n `File does not exist: \"${file}\". Please provide a valid path to a CSV file.`,\n ),\n );\n this.process.exit(1);\n }\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read + parse CSV\n const codec = t.type({\n [emailColumnName]: t.string,\n ...(coreIdentifierColumnName\n ? { [coreIdentifierColumnName]: t.string }\n : {}),\n });\n const rows: Array<Record<string, string>> = readCsv(file, codec);\n if (!rows.length) {\n throw new Error('Input CSV is empty.');\n }\n\n // Ensure emails and core identifiers exist\n const missingEmail = rows\n .map((r, i) => [r, i] as const)\n .filter(([r]) => !r[emailColumnName]?.trim());\n if (missingEmail.length) {\n const rowNumbers = missingEmail\n .map(([, i]) => i + 2) // +2 to account for header row and 0-indexing\n .join(', ');\n throw new Error(\n `The following rows are missing the required \"${emailColumnName}\" column: ${rowNumbers}`,\n );\n }\n if (coreIdentifierColumnName) {\n const missingCoreId = rows\n .map((r, i) => [r, i] as const)\n .filter(([r]) => !r[coreIdentifierColumnName]?.trim());\n if (missingCoreId.length) {\n const rowNumbers = missingCoreId\n .map(([, i]) => i + 2) // +2 to account for header row and 0-indexing\n .join(', ');\n throw new Error(\n `The following rows are missing the required \"${coreIdentifierColumnName}\" column: ${rowNumbers}`,\n );\n }\n }\n\n // Duration provided by CLI is in ms; GraphQL expects seconds\n const expiresInSeconds = Math.max(1, Math.floor(duration / 1000));\n\n // Build inputs for GraphQL\n const inputs = rows.map((r, index): PreferenceAccessTokenInputWithIndex => {\n const email = r[emailColumnName].trim();\n const coreIdentifier = coreIdentifierColumnName\n ? r[coreIdentifierColumnName]?.trim()\n : undefined;\n const scopes = [SombraStandardScope.PreferenceManagement];\n return {\n subjectType,\n scopes,\n expiresIn: expiresInSeconds,\n email,\n ...(coreIdentifier ? { coreIdentifier } : {}),\n index,\n };\n });\n\n // Progress bar\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n progressBar.start(inputs.length, 0);\n\n // Kick off token creation (batched internally)\n const t0 = Date.now();\n const results = await createPreferenceAccessTokens(\n client,\n inputs,\n (progress) => {\n progressBar.update(progress);\n },\n );\n progressBar.update(inputs.length);\n progressBar.stop();\n\n // Prepare output CSV rows\n const outputRows = results.map(({ accessToken, input }) => {\n if (typeof input.index !== 'number') {\n throw new Error('Internal error: missing input index.');\n }\n return {\n ...rows[input.index],\n token: accessToken,\n };\n });\n\n logger.info(colors.magenta(`Writing access tokens to file \"${file}\"...`));\n await writeCsv(file, outputRows, true);\n\n const totalTimeSec = Math.round((Date.now() - t0) / 1000);\n logger.info(\n colors.green(\n `Successfully generated ${results.length} access tokens to \"${file}\" in ${totalTimeSec}s!`,\n ),\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (err: any) {\n logger.error(\n colors.red(\n `An error occurred while generating access tokens: ${\n err?.message || String(err)\n }`,\n ),\n );\n this.process.exit(1);\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-XXFLFF7Q.cjs');require('./chunk-7PB6LVSE.cjs');async function h({auth:i,enricherId:s,actions:o,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e,createdAtAfter:t,concurrency:u,transcendUrl:d}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk55B57ZAYcjs.Of.call(void 0, {auth:i,enricherId:s,requestActions:o,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e?new Date(e):void 0,createdAtAfter:t?new Date(t):void 0,concurrency:u,transcendUrl:d})}exports.enricherRestart = h;
2
- //# sourceMappingURL=impl-RD5UOJY6.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkVWN5MN3Ucjs = require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.cjs');require('./chunk-7PB6LVSE.cjs');async function h({auth:i,enricherId:s,actions:o,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e,createdAtAfter:t,concurrency:u,transcendUrl:d}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkVWN5MN3Ucjs.Qf.call(void 0, {auth:i,enricherId:s,requestActions:o,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e?new Date(e):void 0,createdAtAfter:t?new Date(t):void 0,concurrency:u,transcendUrl:d})}exports.enricherRestart = h;
2
+ //# sourceMappingURL=impl-VVICNSEP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-RD5UOJY6.cjs","../src/commands/request/enricher-restart/impl.ts"],"names":["enricherRestart","auth","enricherId","actions","requestEnricherStatuses","requestIds","createdAtBefore","createdAtAfter","concurrency","transcendUrl","doneInputValidation","bulkRetryEnrichers"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCoBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CAAAA,CACA,UAAA,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,IAAA,CAAAV,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,uBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAiBC,CAAAA,CAAkB,IAAI,IAAA,CAAKA,CAAe,CAAA,CAAI,KAAA,CAAA,CAC/D,cAAA,CAAgBC,CAAAA,CAAiB,IAAI,IAAA,CAAKA,CAAc,CAAA,CAAI,KAAA,CAAA,CAC5D,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-RD5UOJY6.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { bulkRetryEnrichers } from '../../../lib/requests';\nimport type {\n RequestAction,\n RequestEnricherStatus,\n} from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface EnricherRestartCommandFlags {\n auth: string;\n enricherId: string;\n actions?: RequestAction[];\n requestEnricherStatuses?: RequestEnricherStatus[];\n transcendUrl: string;\n concurrency: number;\n requestIds?: string[];\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n}\n\nexport async function enricherRestart(\n this: LocalContext,\n {\n auth,\n enricherId,\n actions,\n requestEnricherStatuses,\n requestIds,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n }: EnricherRestartCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await bulkRetryEnrichers({\n auth,\n enricherId,\n requestActions: actions,\n requestEnricherStatuses,\n requestIds,\n createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,\n createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,\n concurrency,\n transcendUrl,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-VVICNSEP.cjs","../src/commands/request/enricher-restart/impl.ts"],"names":["enricherRestart","auth","enricherId","actions","requestEnricherStatuses","requestIds","createdAtBefore","createdAtAfter","concurrency","transcendUrl","doneInputValidation","bulkRetryEnrichers"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCoBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CAAAA,CACA,UAAA,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,IAAA,CAAAV,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,uBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAiBC,CAAAA,CAAkB,IAAI,IAAA,CAAKA,CAAe,CAAA,CAAI,KAAA,CAAA,CAC/D,cAAA,CAAgBC,CAAAA,CAAiB,IAAI,IAAA,CAAKA,CAAc,CAAA,CAAI,KAAA,CAAA,CAC5D,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-VVICNSEP.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { bulkRetryEnrichers } from '../../../lib/requests';\nimport type {\n RequestAction,\n RequestEnricherStatus,\n} from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface EnricherRestartCommandFlags {\n auth: string;\n enricherId: string;\n actions?: RequestAction[];\n requestEnricherStatuses?: RequestEnricherStatus[];\n transcendUrl: string;\n concurrency: number;\n requestIds?: string[];\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n}\n\nexport async function enricherRestart(\n this: LocalContext,\n {\n auth,\n enricherId,\n actions,\n requestEnricherStatuses,\n requestIds,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n }: EnricherRestartCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await bulkRetryEnrichers({\n auth,\n enricherId,\n requestActions: actions,\n requestEnricherStatuses,\n requestIds,\n createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,\n createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,\n concurrency,\n transcendUrl,\n });\n}\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMLH6KKUKcjs = require('./chunk-MLH6KKUK.cjs');require('./chunk-NZEATKWL.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-VWN5MN3U.cjs');require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GJ6V5BHG.cjs');require('./chunk-7PB6LVSE.cjs');async function m({auth:r,trackerStatus:s,file:a,transcendUrl:e}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkMLH6KKUKcjs.c.call(void 0, {auth:r,trackerStatus:s,file:a,transcendUrl:e})}exports.uploadCookiesFromCsv = m;
2
+ //# sourceMappingURL=impl-WY3A5X7O.cjs.map