@transcend-io/cli 8.27.0 → 8.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/README.md +4 -2
  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-GMTBHFZV.cjs → chunk-2CAMTEJY.cjs} +4 -4
  6. package/dist/{chunk-GMTBHFZV.cjs.map → chunk-2CAMTEJY.cjs.map} +1 -1
  7. package/dist/{chunk-FQESEVCX.cjs → chunk-4AOZYIVR.cjs} +2 -2
  8. package/dist/{chunk-FQESEVCX.cjs.map → chunk-4AOZYIVR.cjs.map} +1 -1
  9. package/dist/{chunk-LSZQ3OFG.cjs → chunk-57L3G2BH.cjs} +2 -2
  10. package/dist/{chunk-LSZQ3OFG.cjs.map → chunk-57L3G2BH.cjs.map} +1 -1
  11. package/dist/{chunk-LIFHKHUG.cjs → chunk-BBIQYUL2.cjs} +2 -2
  12. package/dist/{chunk-LIFHKHUG.cjs.map → chunk-BBIQYUL2.cjs.map} +1 -1
  13. package/dist/{chunk-BL2UJW5C.cjs → chunk-BO6JY2EM.cjs} +2 -2
  14. package/dist/{chunk-BL2UJW5C.cjs.map → chunk-BO6JY2EM.cjs.map} +1 -1
  15. package/dist/{chunk-JFZPP4VV.cjs → chunk-BQSBPO63.cjs} +3 -3
  16. package/dist/{chunk-JFZPP4VV.cjs.map → chunk-BQSBPO63.cjs.map} +1 -1
  17. package/dist/{chunk-THCW2SNW.cjs → chunk-F7QE6D3T.cjs} +2 -2
  18. package/dist/{chunk-THCW2SNW.cjs.map → chunk-F7QE6D3T.cjs.map} +1 -1
  19. package/dist/{chunk-LCDYXJN6.cjs → chunk-FHUHBSLE.cjs} +2 -2
  20. package/dist/{chunk-LCDYXJN6.cjs.map → chunk-FHUHBSLE.cjs.map} +1 -1
  21. package/dist/{chunk-AD5RNQ4J.cjs → chunk-GDNSAJQN.cjs} +2 -2
  22. package/dist/{chunk-AD5RNQ4J.cjs.map → chunk-GDNSAJQN.cjs.map} +1 -1
  23. package/dist/{chunk-G3LZCX5D.cjs → chunk-HCPNMNS3.cjs} +6 -6
  24. package/dist/{chunk-G3LZCX5D.cjs.map → chunk-HCPNMNS3.cjs.map} +1 -1
  25. package/dist/{chunk-JXUIQS5T.cjs → chunk-ID7MP3QD.cjs} +2 -2
  26. package/dist/{chunk-JXUIQS5T.cjs.map → chunk-ID7MP3QD.cjs.map} +1 -1
  27. package/dist/{chunk-NXWJFTTG.cjs → chunk-K4IBAM5Z.cjs} +4 -4
  28. package/dist/{chunk-NXWJFTTG.cjs.map → chunk-K4IBAM5Z.cjs.map} +1 -1
  29. package/dist/{chunk-ECGHWDVP.cjs → chunk-LU3DKRNK.cjs} +2 -2
  30. package/dist/chunk-LU3DKRNK.cjs.map +1 -0
  31. package/dist/{chunk-IG445VJR.cjs → chunk-LWPX5LJB.cjs} +2 -2
  32. package/dist/{chunk-IG445VJR.cjs.map → chunk-LWPX5LJB.cjs.map} +1 -1
  33. package/dist/{chunk-HBI4MFHE.cjs → chunk-N25PPQY4.cjs} +21 -21
  34. package/dist/{chunk-HBI4MFHE.cjs.map → chunk-N25PPQY4.cjs.map} +1 -1
  35. package/dist/chunk-NBXAOUWC.cjs +3001 -0
  36. package/dist/chunk-NBXAOUWC.cjs.map +1 -0
  37. package/dist/{chunk-Q7I37FJV.cjs → chunk-T3BBQIRY.cjs} +2 -2
  38. package/dist/chunk-T3BBQIRY.cjs.map +1 -0
  39. package/dist/{chunk-DZ5KTF7W.cjs → chunk-UXYKFAP7.cjs} +2 -2
  40. package/dist/{chunk-DZ5KTF7W.cjs.map → chunk-UXYKFAP7.cjs.map} +1 -1
  41. package/dist/{impl-FKFSISLZ.cjs → impl-333FTGNJ.cjs} +2 -2
  42. package/dist/{impl-FKFSISLZ.cjs.map → impl-333FTGNJ.cjs.map} +1 -1
  43. package/dist/{impl-HULEYZA3.cjs → impl-3HWWFZLZ.cjs} +2 -2
  44. package/dist/{impl-HULEYZA3.cjs.map → impl-3HWWFZLZ.cjs.map} +1 -1
  45. package/dist/{impl-P7VE347W.cjs → impl-5IR5JVEX.cjs} +2 -2
  46. package/dist/{impl-P7VE347W.cjs.map → impl-5IR5JVEX.cjs.map} +1 -1
  47. package/dist/{impl-WWVVPFM7.cjs → impl-5JKO562Z.cjs} +2 -2
  48. package/dist/{impl-WWVVPFM7.cjs.map → impl-5JKO562Z.cjs.map} +1 -1
  49. package/dist/impl-5NEL56EQ.cjs +2 -0
  50. package/dist/{impl-YGX4NQLZ.cjs.map → impl-5NEL56EQ.cjs.map} +1 -1
  51. package/dist/impl-6O4FILGB.cjs +2 -0
  52. package/dist/{impl-3SWF4GZZ.cjs.map → impl-6O4FILGB.cjs.map} +1 -1
  53. package/dist/impl-7NYN6PNG.cjs +2 -0
  54. package/dist/{impl-WUHP3P5R.cjs.map → impl-7NYN6PNG.cjs.map} +1 -1
  55. package/dist/impl-ATMXXGUO.cjs +2 -0
  56. package/dist/{impl-BGLZ6S7A.cjs.map → impl-ATMXXGUO.cjs.map} +1 -1
  57. package/dist/{impl-OYWTY4Q7.cjs → impl-B5HWJ3KK.cjs} +2 -2
  58. package/dist/{impl-OYWTY4Q7.cjs.map → impl-B5HWJ3KK.cjs.map} +1 -1
  59. package/dist/{impl-JID5BHDK.cjs → impl-CGX5RD4A.cjs} +2 -2
  60. package/dist/{impl-JID5BHDK.cjs.map → impl-CGX5RD4A.cjs.map} +1 -1
  61. package/dist/{impl-IOI72RK7.cjs → impl-D2C22UEC.cjs} +2 -2
  62. package/dist/{impl-IOI72RK7.cjs.map → impl-D2C22UEC.cjs.map} +1 -1
  63. package/dist/{impl-3YAJ7ZV3.cjs → impl-EE3BM53W.cjs} +2 -2
  64. package/dist/{impl-3YAJ7ZV3.cjs.map → impl-EE3BM53W.cjs.map} +1 -1
  65. package/dist/{impl-X3NI5ITC.cjs → impl-FTRCRS7H.cjs} +2 -2
  66. package/dist/{impl-X3NI5ITC.cjs.map → impl-FTRCRS7H.cjs.map} +1 -1
  67. package/dist/impl-FXVXRV6Q.cjs +3 -0
  68. package/dist/{impl-ABBOINXS.cjs.map → impl-FXVXRV6Q.cjs.map} +1 -1
  69. package/dist/{impl-6X6QOXM3.cjs → impl-GJB4EKPW.cjs} +3 -3
  70. package/dist/{impl-6X6QOXM3.cjs.map → impl-GJB4EKPW.cjs.map} +1 -1
  71. package/dist/{impl-WWL2A2T2.cjs → impl-HBJ7BPEI.cjs} +2 -2
  72. package/dist/{impl-WWL2A2T2.cjs.map → impl-HBJ7BPEI.cjs.map} +1 -1
  73. package/dist/{impl-3NXCEUTZ.cjs → impl-HQICWTNR.cjs} +5 -5
  74. package/dist/{impl-3NXCEUTZ.cjs.map → impl-HQICWTNR.cjs.map} +1 -1
  75. package/dist/{impl-2KMLK6S2.cjs → impl-HSD25CEC.cjs} +2 -2
  76. package/dist/{impl-2KMLK6S2.cjs.map → impl-HSD25CEC.cjs.map} +1 -1
  77. package/dist/{impl-GZIWCS6D.cjs → impl-HXH7SZDU.cjs} +2 -2
  78. package/dist/{impl-GZIWCS6D.cjs.map → impl-HXH7SZDU.cjs.map} +1 -1
  79. package/dist/impl-ITV3PGFS.cjs +2 -0
  80. package/dist/{impl-XMOEYUIG.cjs.map → impl-ITV3PGFS.cjs.map} +1 -1
  81. package/dist/impl-IWMRKBYP.cjs +2 -0
  82. package/dist/{impl-5LT5ZA7K.cjs.map → impl-IWMRKBYP.cjs.map} +1 -1
  83. package/dist/{impl-OQKJR3OY.cjs → impl-J5DLFX22.cjs} +4 -4
  84. package/dist/{impl-OQKJR3OY.cjs.map → impl-J5DLFX22.cjs.map} +1 -1
  85. package/dist/{impl-HIZHI4CT.cjs → impl-JYAU26KS.cjs} +2 -2
  86. package/dist/{impl-HIZHI4CT.cjs.map → impl-JYAU26KS.cjs.map} +1 -1
  87. package/dist/{impl-KFQWJU6D.cjs → impl-LVPOYO4A.cjs} +2 -2
  88. package/dist/{impl-KFQWJU6D.cjs.map → impl-LVPOYO4A.cjs.map} +1 -1
  89. package/dist/{impl-6VNSS7JY.cjs → impl-M3AZLM3Y.cjs} +2 -2
  90. package/dist/{impl-6VNSS7JY.cjs.map → impl-M3AZLM3Y.cjs.map} +1 -1
  91. package/dist/{impl-QOGUZMYD.cjs → impl-OCDURTBG.cjs} +2 -2
  92. package/dist/{impl-QOGUZMYD.cjs.map → impl-OCDURTBG.cjs.map} +1 -1
  93. package/dist/impl-OMCKSCEI.cjs +2 -0
  94. package/dist/{impl-D3IADLFZ.cjs.map → impl-OMCKSCEI.cjs.map} +1 -1
  95. package/dist/{impl-5LRIZL6Q.cjs → impl-PHYCAOK7.cjs} +2 -2
  96. package/dist/{impl-5LRIZL6Q.cjs.map → impl-PHYCAOK7.cjs.map} +1 -1
  97. package/dist/{impl-OGVRZFXA.cjs → impl-QT2HKTCP.cjs} +2 -2
  98. package/dist/{impl-OGVRZFXA.cjs.map → impl-QT2HKTCP.cjs.map} +1 -1
  99. package/dist/{impl-5BIEQWSB.cjs → impl-SQHP2SZ4.cjs} +2 -2
  100. package/dist/{impl-5BIEQWSB.cjs.map → impl-SQHP2SZ4.cjs.map} +1 -1
  101. package/dist/{impl-W75S6XUS.cjs → impl-TJFUBDML.cjs} +2 -2
  102. package/dist/{impl-W75S6XUS.cjs.map → impl-TJFUBDML.cjs.map} +1 -1
  103. package/dist/{impl-5AU5GNSB.cjs → impl-TU3DSCLK.cjs} +2 -2
  104. package/dist/{impl-5AU5GNSB.cjs.map → impl-TU3DSCLK.cjs.map} +1 -1
  105. package/dist/{impl-LLP7IXWK.cjs → impl-VV3UMWFG.cjs} +2 -2
  106. package/dist/{impl-LLP7IXWK.cjs.map → impl-VV3UMWFG.cjs.map} +1 -1
  107. package/dist/{impl-5D3TCFK7.cjs → impl-VYNKYTB5.cjs} +2 -2
  108. package/dist/{impl-5D3TCFK7.cjs.map → impl-VYNKYTB5.cjs.map} +1 -1
  109. package/dist/{impl-BIB6PUGE.cjs → impl-W7AB7VQY.cjs} +2 -2
  110. package/dist/{impl-BIB6PUGE.cjs.map → impl-W7AB7VQY.cjs.map} +1 -1
  111. package/dist/{impl-GE54DKYZ.cjs → impl-WGVGJV2F.cjs} +3 -3
  112. package/dist/{impl-GE54DKYZ.cjs.map → impl-WGVGJV2F.cjs.map} +1 -1
  113. package/dist/{impl-J23ILBH7.cjs → impl-XUD5VFQX.cjs} +2 -2
  114. package/dist/{impl-J23ILBH7.cjs.map → impl-XUD5VFQX.cjs.map} +1 -1
  115. package/dist/{impl-BSODHREX.cjs → impl-Y3WZAMYW.cjs} +2 -2
  116. package/dist/{impl-BSODHREX.cjs.map → impl-Y3WZAMYW.cjs.map} +1 -1
  117. package/dist/{impl-6ZJOSWUH.cjs → impl-Z4GNVM3V.cjs} +2 -2
  118. package/dist/{impl-6ZJOSWUH.cjs.map → impl-Z4GNVM3V.cjs.map} +1 -1
  119. package/dist/impl-ZMX57RSP.cjs +2 -0
  120. package/dist/{impl-U4GMJYRH.cjs.map → impl-ZMX57RSP.cjs.map} +1 -1
  121. package/dist/{impl-YOB7AAQJ.cjs → impl-ZSNYO6VH.cjs} +2 -2
  122. package/dist/{impl-YOB7AAQJ.cjs.map → impl-ZSNYO6VH.cjs.map} +1 -1
  123. package/dist/{impl-OVRVC7X5.cjs → impl-ZWLFLVPK.cjs} +2 -2
  124. package/dist/{impl-OVRVC7X5.cjs.map → impl-ZWLFLVPK.cjs.map} +1 -1
  125. package/dist/index.cjs +3 -3
  126. package/dist/index.cjs.map +1 -1
  127. package/dist/index.d.cts +10878 -5
  128. package/package.json +3 -3
  129. package/dist/chunk-ECGHWDVP.cjs.map +0 -1
  130. package/dist/chunk-OPHHRNLH.cjs +0 -2979
  131. package/dist/chunk-OPHHRNLH.cjs.map +0 -1
  132. package/dist/chunk-Q7I37FJV.cjs.map +0 -1
  133. package/dist/impl-3SWF4GZZ.cjs +0 -2
  134. package/dist/impl-5LT5ZA7K.cjs +0 -2
  135. package/dist/impl-ABBOINXS.cjs +0 -3
  136. package/dist/impl-BGLZ6S7A.cjs +0 -2
  137. package/dist/impl-D3IADLFZ.cjs +0 -2
  138. package/dist/impl-U4GMJYRH.cjs +0 -2
  139. package/dist/impl-WUHP3P5R.cjs +0 -2
  140. package/dist/impl-XMOEYUIG.cjs +0 -2
  141. package/dist/impl-YGX4NQLZ.cjs +0 -2
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');async function c({auth:o,dataSiloId:a,actions:r,transcendUrl:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkNBXAOUWCcjs.Pf.call(void 0, {requestActions:r,transcendUrl:s,auth:o,dataSiloId:a})}exports.retryRequestDataSilos = c;
2
+ //# sourceMappingURL=impl-OMCKSCEI.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-D3IADLFZ.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-D3IADLFZ.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-OMCKSCEI.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-OMCKSCEI.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { retryRequestDataSilos as retryRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface RetryRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n actions: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function retryRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n actions,\n transcendUrl,\n }: RetryRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await retryRequestDataSilosHelper({\n requestActions: actions,\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.cjs');async function d({auth:o,actions:r,origins:i,silentModeBefore:n,createdAtBefore:s,createdAtAfter:a,transcendUrl:c,concurrency:p}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkOPHHRNLHcjs.Cf.call(void 0, {transcendUrl:c,requestActions:r,auth:o,requestOrigins:i,concurrency:p,silentModeBefore:n,createdAtBefore:s,createdAtAfter:a})}exports.approve = d;
2
- //# sourceMappingURL=impl-5LRIZL6Q.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');async function d({auth:o,actions:r,origins:i,silentModeBefore:n,createdAtBefore:s,createdAtAfter:a,transcendUrl:c,concurrency:p}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkNBXAOUWCcjs.Ef.call(void 0, {transcendUrl:c,requestActions:r,auth:o,requestOrigins:i,concurrency:p,silentModeBefore:n,createdAtBefore:s,createdAtAfter:a})}exports.approve = d;
2
+ //# sourceMappingURL=impl-PHYCAOK7.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-5LRIZL6Q.cjs","../src/commands/request/approve/impl.ts"],"names":["approve","auth","actions","origins","silentModeBefore","createdAtBefore","createdAtAfter","transcendUrl","concurrency","doneInputValidation","approvePrivacyRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCiBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAH,CAAAA,CACA,cAAA,CAAgBL,CAAAA,CAChB,IAAA,CAAAD,CAAAA,CACA,cAAA,CAAgBE,CAAAA,CAChB,WAAA,CAAAK,CAAAA,CACA,gBAAA,CAAAJ,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-5LRIZL6Q.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { RequestAction, RequestOrigin } from '@transcend-io/privacy-types';\nimport { approvePrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ApproveCommandFlags {\n auth: string;\n actions: RequestAction[];\n origins?: RequestOrigin[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function approve(\n this: LocalContext,\n {\n auth,\n actions,\n origins,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n transcendUrl,\n concurrency,\n }: ApproveCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await approvePrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestOrigins: origins,\n concurrency,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-PHYCAOK7.cjs","../src/commands/request/approve/impl.ts"],"names":["approve","auth","actions","origins","silentModeBefore","createdAtBefore","createdAtAfter","transcendUrl","concurrency","doneInputValidation","approvePrivacyRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCiBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAH,CAAAA,CACA,cAAA,CAAgBL,CAAAA,CAChB,IAAA,CAAAD,CAAAA,CACA,cAAA,CAAgBE,CAAAA,CAChB,WAAA,CAAAK,CAAAA,CACA,gBAAA,CAAAJ,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-PHYCAOK7.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { RequestAction, RequestOrigin } from '@transcend-io/privacy-types';\nimport { approvePrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ApproveCommandFlags {\n auth: string;\n actions: RequestAction[];\n origins?: RequestOrigin[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function approve(\n this: LocalContext,\n {\n auth,\n actions,\n origins,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n transcendUrl,\n concurrency,\n }: ApproveCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await approvePrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestOrigins: origins,\n concurrency,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.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 _chunkOPHHRNLHcjs.Mf.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-OGVRZFXA.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.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 _chunkNBXAOUWCcjs.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-QT2HKTCP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-OGVRZFXA.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-OGVRZFXA.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-QT2HKTCP.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-QT2HKTCP.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,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkLSZQ3OFGcjs = require('./chunk-LSZQ3OFG.cjs');require('./chunk-AD5RNQ4J.cjs');require('./chunk-ECGHWDVP.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkTHCW2SNWcjs = require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.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=_chunkOPHHRNLHcjs.wc.call(void 0, s,g),n=await _chunkOPHHRNLHcjs.Bc.call(void 0, a,e),l=_chunkLSZQ3OFGcjs.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 _chunkOPHHRNLHcjs.mf.call(void 0, a,n.id,o);let c=new URL(_chunkTHCW2SNWcjs.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 _chunk57L3G2BHcjs = require('./chunk-57L3G2BH.cjs');require('./chunk-GDNSAJQN.cjs');require('./chunk-LU3DKRNK.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkF7QE6D3Tcjs = require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.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=_chunkNBXAOUWCcjs.xc.call(void 0, s,g),n=await _chunkNBXAOUWCcjs.Cc.call(void 0, a,e),l=_chunk57L3G2BHcjs.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 _chunkNBXAOUWCcjs.of.call(void 0, a,n.id,o);let c=new URL(_chunkF7QE6D3Tcjs.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-5BIEQWSB.cjs.map
4
+ //# sourceMappingURL=impl-SQHP2SZ4.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-5BIEQWSB.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-5BIEQWSB.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-SQHP2SZ4.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-SQHP2SZ4.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}); 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 _chunkNXWJFTTGcjs = require('./chunk-NXWJFTTG.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkTHCW2SNWcjs = require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.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=_chunkOPHHRNLHcjs.wc.call(void 0, C,y),$=await _chunkNXWJFTTGcjs.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(_chunkTHCW2SNWcjs.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=_chunkTHCW2SNWcjs.j.call(void 0, [...s,...Object.keys(n)]),n});await _chunkOPHHRNLHcjs.rg.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 ${_chunkTHCW2SNWcjs.q}`))}exports.pullDatapoints = v;
2
- //# sourceMappingURL=impl-W75S6XUS.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 _chunkK4IBAM5Zcjs = require('./chunk-K4IBAM5Z.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkF7QE6D3Tcjs = require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.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=_chunkNBXAOUWCcjs.xc.call(void 0, C,y),$=await _chunkK4IBAM5Zcjs.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(_chunkF7QE6D3Tcjs.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=_chunkF7QE6D3Tcjs.j.call(void 0, [...s,...Object.keys(n)]),n});await _chunkNBXAOUWCcjs.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 ${_chunkF7QE6D3Tcjs.q}`))}exports.pullDatapoints = v;
2
+ //# sourceMappingURL=impl-TJFUBDML.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-W75S6XUS.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-W75S6XUS.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-TJFUBDML.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-TJFUBDML.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { uniq, groupBy } from 'lodash-es';\n\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport { ADMIN_DASH_DATAPOINTS } from '../../../constants';\nimport { pullAllDatapoints } from '../../../lib/data-inventory';\nimport { DataCategoryType } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { writeLargeCsv } from '../../../lib/helpers';\n\nexport interface PullDatapointsCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n includeAttributes: boolean;\n includeGuessedCategories: boolean;\n parentCategories?: DataCategoryType[];\n subCategories?: string[];\n}\n\nexport async function pullDatapoints(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n includeAttributes,\n includeGuessedCategories,\n parentCategories,\n subCategories = [],\n }: PullDatapointsCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const dataPoints = await pullAllDatapoints(client, {\n dataSiloIds,\n includeGuessedCategories,\n parentCategories,\n includeAttributes,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n });\n\n logger.info(colors.magenta(`Writing datapoints to file \"${file}\"...`));\n let headers: string[] = [];\n const inputs = dataPoints.map((point) => {\n const result = {\n 'Property ID': point.id,\n 'Data Silo': point.dataSilo.title,\n Object: point.dataPoint.name,\n 'Object Path': point.dataPoint.path.join('.'),\n Property: point.name,\n 'Property Description': point.description,\n 'Data Categories': point.categories\n .map((category) => `${category.category}:${category.name}`)\n .join(', '),\n 'Guessed Category': point.pendingCategoryGuesses?.[0]\n ? `${point.pendingCategoryGuesses![0]!.category.category}:${\n point.pendingCategoryGuesses![0]!.category.name\n }`\n : '',\n 'Processing Purposes': point.purposes\n .map((purpose) => `${purpose.purpose}:${purpose.name}`)\n .join(', '),\n ...Object.entries(\n groupBy(\n point.attributeValues || [],\n ({ attributeKey }) => attributeKey.name,\n ),\n ).reduce((acc, [key, values]) => {\n acc[key] = values.map((value) => value.name).join(',');\n return acc;\n }, {} as Record<string, string>),\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n await writeLargeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(`An error occurred syncing the datapoints: ${err.message}`),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced datapoints to disk at ${file}! View at ${ADMIN_DASH_DATAPOINTS}`,\n ),\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkJFZPP4VVcjs = require('./chunk-JFZPP4VV.cjs');var _chunkJXUIQS5Tcjs = require('./chunk-JXUIQS5T.cjs');require('./chunk-IG445VJR.cjs');var _chunkAD5RNQ4Jcjs = require('./chunk-AD5RNQ4J.cjs');require('./chunk-ECGHWDVP.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');function M({consentManagerYmlFolder:s,output:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, s)||!_fs.lstatSync.call(void 0, s).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${s}"`)),this.process.exit(1));let f=_chunkAD5RNQ4Jcjs.c.call(void 0, s).map(i=>{let{"consent-manager":u}=_chunkJFZPP4VVcjs.d.call(void 0, _path.join.call(void 0, s,i));return{name:i,input:u}}),e=_chunkJXUIQS5Tcjs.h.call(void 0, f);_chunkJFZPP4VVcjs.e.call(void 0, n,{"business-entities":e}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${e.length} business entities to file "${n}"`))}exports.consentManagersToBusinessEntities = M;
2
- //# sourceMappingURL=impl-5AU5GNSB.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkBQSBPO63cjs = require('./chunk-BQSBPO63.cjs');var _chunkID7MP3QDcjs = require('./chunk-ID7MP3QD.cjs');require('./chunk-LWPX5LJB.cjs');var _chunkGDNSAJQNcjs = require('./chunk-GDNSAJQN.cjs');require('./chunk-LU3DKRNK.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');function M({consentManagerYmlFolder:s,output:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, s)||!_fs.lstatSync.call(void 0, s).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${s}"`)),this.process.exit(1));let f=_chunkGDNSAJQNcjs.c.call(void 0, s).map(i=>{let{"consent-manager":u}=_chunkBQSBPO63cjs.d.call(void 0, _path.join.call(void 0, s,i));return{name:i,input:u}}),e=_chunkID7MP3QDcjs.h.call(void 0, f);_chunkBQSBPO63cjs.e.call(void 0, n,{"business-entities":e}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${e.length} business entities to file "${n}"`))}exports.consentManagersToBusinessEntities = M;
2
+ //# sourceMappingURL=impl-TU3DSCLK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-5AU5GNSB.cjs","../src/commands/inventory/consent-managers-to-business-entities/impl.ts"],"names":["consentManagersToBusinessEntities","consentManagerYmlFolder","output","doneInputValidation","existsSync","lstatSync","logger","colors","inputs","listFiles","directory","consentManager","readTranscendYaml","join","businessEntities","writeTranscendYaml"],"mappings":"AAAA,iOAA+C,wDAAyC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,4BCO5W,gFAEF,wBAEmB,SAQtBA,CAAAA,CAEd,CACE,uBAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CACM,CACNC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAAA,CAInC,CAACC,4BAAAA,CAAkC,CAAA,EACnC,CAACC,2BAAAA,CAAiC,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAEhDC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BN,CAAuB,CAAA,CAAA,CAAG,CAClE,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMO,CAAAA,CAASC,iCAAAA,CAAiC,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAc,CACnE,GAAM,CAAE,iBAAA,CAAmBC,CAAe,CAAA,CAAIC,iCAAAA,wBAC5CC,CAAKZ,CAAyBS,CAAS,CACzC,CAAA,CACA,MAAO,CAAE,IAAA,CAAMA,CAAAA,CAAW,KAAA,CAAOC,CAAe,CAClD,CAAC,CAAA,CAGKG,CAAAA,CAAmBd,iCAAAA,CAA8C,CAAA,CAGvEe,iCAAAA,CAAmBb,CAAQ,CACzB,mBAAA,CAAqBY,CACvB,CAAC,CAAA,CAEDR,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBO,CAAAA,CAAiB,MAAM,CAAA,4BAAA,EAA+BZ,CAAM,CAAA,CAAA,CACpF,CACF,CACF,CAAA,8CAAA","file":"/home/runner/work/cli/cli/dist/impl-5AU5GNSB.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { listFiles } from '../../../lib/api-keys';\nimport { consentManagersToBusinessEntities as consentManagersToBusinessEntitiesHelper } from '../../../lib/consent-manager';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { join } from 'node:path';\n\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ConsentManagersToBusinessEntitiesCommandFlags {\n consentManagerYmlFolder: string;\n output: string;\n}\n\nexport function consentManagersToBusinessEntities(\n this: LocalContext,\n {\n consentManagerYmlFolder,\n output,\n }: ConsentManagersToBusinessEntitiesCommandFlags,\n): void {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(consentManagerYmlFolder) ||\n !lstatSync(consentManagerYmlFolder).isDirectory()\n ) {\n logger.error(\n colors.red(`Folder does not exist: \"${consentManagerYmlFolder}\"`),\n );\n this.process.exit(1);\n }\n\n // Read in each consent manager configuration\n const inputs = listFiles(consentManagerYmlFolder).map((directory) => {\n const { 'consent-manager': consentManager } = readTranscendYaml(\n join(consentManagerYmlFolder, directory),\n );\n return { name: directory, input: consentManager };\n });\n\n // Convert to business entities\n const businessEntities = consentManagersToBusinessEntitiesHelper(inputs);\n\n // write to disk\n writeTranscendYaml(output, {\n 'business-entities': businessEntities,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${businessEntities.length} business entities to file \"${output}\"`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-TU3DSCLK.cjs","../src/commands/inventory/consent-managers-to-business-entities/impl.ts"],"names":["consentManagersToBusinessEntities","consentManagerYmlFolder","output","doneInputValidation","existsSync","lstatSync","logger","colors","inputs","listFiles","directory","consentManager","readTranscendYaml","join","businessEntities","writeTranscendYaml"],"mappings":"AAAA,iOAA+C,wDAAyC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,4BCO5W,gFAEF,wBAEmB,SAQtBA,CAAAA,CAEd,CACE,uBAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CACM,CACNC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAAA,CAInC,CAACC,4BAAAA,CAAkC,CAAA,EACnC,CAACC,2BAAAA,CAAiC,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAEhDC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BN,CAAuB,CAAA,CAAA,CAAG,CAClE,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMO,CAAAA,CAASC,iCAAAA,CAAiC,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAc,CACnE,GAAM,CAAE,iBAAA,CAAmBC,CAAe,CAAA,CAAIC,iCAAAA,wBAC5CC,CAAKZ,CAAyBS,CAAS,CACzC,CAAA,CACA,MAAO,CAAE,IAAA,CAAMA,CAAAA,CAAW,KAAA,CAAOC,CAAe,CAClD,CAAC,CAAA,CAGKG,CAAAA,CAAmBd,iCAAAA,CAA8C,CAAA,CAGvEe,iCAAAA,CAAmBb,CAAQ,CACzB,mBAAA,CAAqBY,CACvB,CAAC,CAAA,CAEDR,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBO,CAAAA,CAAiB,MAAM,CAAA,4BAAA,EAA+BZ,CAAM,CAAA,CAAA,CACpF,CACF,CACF,CAAA,8CAAA","file":"/home/runner/work/cli/cli/dist/impl-TU3DSCLK.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { listFiles } from '../../../lib/api-keys';\nimport { consentManagersToBusinessEntities as consentManagersToBusinessEntitiesHelper } from '../../../lib/consent-manager';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { join } from 'node:path';\n\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ConsentManagersToBusinessEntitiesCommandFlags {\n consentManagerYmlFolder: string;\n output: string;\n}\n\nexport function consentManagersToBusinessEntities(\n this: LocalContext,\n {\n consentManagerYmlFolder,\n output,\n }: ConsentManagersToBusinessEntitiesCommandFlags,\n): void {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(consentManagerYmlFolder) ||\n !lstatSync(consentManagerYmlFolder).isDirectory()\n ) {\n logger.error(\n colors.red(`Folder does not exist: \"${consentManagerYmlFolder}\"`),\n );\n this.process.exit(1);\n }\n\n // Read in each consent manager configuration\n const inputs = listFiles(consentManagerYmlFolder).map((directory) => {\n const { 'consent-manager': consentManager } = readTranscendYaml(\n join(consentManagerYmlFolder, directory),\n );\n return { name: directory, input: consentManager };\n });\n\n // Convert to business entities\n const businessEntities = consentManagersToBusinessEntitiesHelper(inputs);\n\n // write to disk\n writeTranscendYaml(output, {\n 'business-entities': businessEntities,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${businessEntities.length} business entities to file \"${output}\"`,\n ),\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.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 _chunkOPHHRNLHcjs.Kf.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-LLP7IXWK.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.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 _chunkNBXAOUWCcjs.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-VV3UMWFG.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-LLP7IXWK.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-LLP7IXWK.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-VV3UMWFG.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-VV3UMWFG.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 _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.cjs');async function n({auth:s,dataSiloId:a,status:o,statuses:i,transcendUrl:p}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkOPHHRNLHcjs.Pf.call(void 0, {transcendUrl:p,auth:s,status:o,dataSiloId:a,requestStatuses:i})}exports.skipRequestDataSilos = n;
2
- //# sourceMappingURL=impl-5D3TCFK7.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');async function n({auth:s,dataSiloId:a,status:o,statuses:i,transcendUrl:p}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkNBXAOUWCcjs.Rf.call(void 0, {transcendUrl:p,auth:s,status:o,dataSiloId:a,requestStatuses:i})}exports.skipRequestDataSilos = n;
2
+ //# sourceMappingURL=impl-VYNKYTB5.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-5D3TCFK7.cjs","../src/commands/request/system/skip-request-data-silos/impl.ts"],"names":["skipRequestDataSilos","auth","dataSiloId","status","statuses","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMN,kCAAAA,CACJ,YAAA,CAAAK,CAAAA,CACA,IAAA,CAAAJ,CAAAA,CACA,MAAA,CAAAE,CAAAA,CACA,UAAA,CAAAD,CAAAA,CACA,eAAA,CAAiBE,CACnB,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-5D3TCFK7.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type {\n RequestDataSiloStatus,\n RequestStatus,\n} from '@transcend-io/privacy-types';\nimport { skipRequestDataSilos as skipRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface SkipRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n transcendUrl: string;\n statuses: RequestStatus[];\n status:\n | (typeof RequestDataSiloStatus)['Skipped']\n | (typeof RequestDataSiloStatus)['Resolved'];\n}\n\nexport async function skipRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n status,\n statuses,\n transcendUrl,\n }: SkipRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await skipRequestDataSilosHelper({\n transcendUrl,\n auth,\n status,\n dataSiloId,\n requestStatuses: statuses,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-VYNKYTB5.cjs","../src/commands/request/system/skip-request-data-silos/impl.ts"],"names":["skipRequestDataSilos","auth","dataSiloId","status","statuses","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMN,kCAAAA,CACJ,YAAA,CAAAK,CAAAA,CACA,IAAA,CAAAJ,CAAAA,CACA,MAAA,CAAAE,CAAAA,CACA,UAAA,CAAAD,CAAAA,CACA,eAAA,CAAiBE,CACnB,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-VYNKYTB5.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type {\n RequestDataSiloStatus,\n RequestStatus,\n} from '@transcend-io/privacy-types';\nimport { skipRequestDataSilos as skipRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface SkipRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n transcendUrl: string;\n statuses: RequestStatus[];\n status:\n | (typeof RequestDataSiloStatus)['Skipped']\n | (typeof RequestDataSiloStatus)['Resolved'];\n}\n\nexport async function skipRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n status,\n statuses,\n transcendUrl,\n }: SkipRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await skipRequestDataSilosHelper({\n transcendUrl,\n auth,\n status,\n dataSiloId,\n requestStatuses: statuses,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.cjs');async function p({auth:r,actions:s,statuses:i=[],requestIds:c,silentModeBefore:e,createdAtBefore:t,createdAtAfter:n,cancellationTitle:u,transcendUrl:d,concurrency:l}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkOPHHRNLHcjs.Ff.call(void 0, {transcendUrl:d,requestActions:s,auth:r,cancellationTitle:u,requestIds:c,statuses:i,concurrency:l,silentModeBefore:e?new Date(e):void 0,createdAtBefore:t?new Date(t):void 0,createdAtAfter:n?new Date(n):void 0})}exports.cancel = p;
2
- //# sourceMappingURL=impl-BIB6PUGE.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');async function p({auth:r,actions:s,statuses:i=[],requestIds:c,silentModeBefore:e,createdAtBefore:t,createdAtAfter:n,cancellationTitle:u,transcendUrl:d,concurrency:l}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkNBXAOUWCcjs.Hf.call(void 0, {transcendUrl:d,requestActions:s,auth:r,cancellationTitle:u,requestIds:c,statuses:i,concurrency:l,silentModeBefore:e?new Date(e):void 0,createdAtBefore:t?new Date(t):void 0,createdAtAfter:n?new Date(n):void 0})}exports.cancel = p;
2
+ //# sourceMappingURL=impl-W7AB7VQY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-BIB6PUGE.cjs","../src/commands/request/cancel/impl.ts"],"names":["cancel","auth","actions","statuses","requestIds","silentModeBefore","createdAtBefore","createdAtAfter","cancellationTitle","transcendUrl","concurrency","doneInputValidation","cancelPrivacyRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,CAAC,CAAA,CACZ,UAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAH,CAAAA,CACA,cAAA,CAAgBP,CAAAA,CAChB,IAAA,CAAAD,CAAAA,CACA,iBAAA,CAAAO,CAAAA,CACA,UAAA,CAAAJ,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,WAAA,CAAAO,CAAAA,CACA,gBAAA,CAAkBL,CAAAA,CAAmB,IAAI,IAAA,CAAKA,CAAgB,CAAA,CAAI,KAAA,CAAA,CAClE,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,CAC9D,CAAC,CACH,CAAA,mBAAA","file":"/home/runner/work/cli/cli/dist/impl-BIB6PUGE.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { cancelPrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface CancelCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses?: RequestStatus[];\n requestIds?: string[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n cancellationTitle: string;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function cancel(\n this: LocalContext,\n {\n auth,\n actions,\n statuses = [],\n requestIds,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n cancellationTitle,\n transcendUrl,\n concurrency,\n }: CancelCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await cancelPrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n cancellationTitle,\n requestIds,\n statuses,\n concurrency,\n silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,\n createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,\n createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-W7AB7VQY.cjs","../src/commands/request/cancel/impl.ts"],"names":["cancel","auth","actions","statuses","requestIds","silentModeBefore","createdAtBefore","createdAtAfter","cancellationTitle","transcendUrl","concurrency","doneInputValidation","cancelPrivacyRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,CAAC,CAAA,CACZ,UAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAH,CAAAA,CACA,cAAA,CAAgBP,CAAAA,CAChB,IAAA,CAAAD,CAAAA,CACA,iBAAA,CAAAO,CAAAA,CACA,UAAA,CAAAJ,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,WAAA,CAAAO,CAAAA,CACA,gBAAA,CAAkBL,CAAAA,CAAmB,IAAI,IAAA,CAAKA,CAAgB,CAAA,CAAI,KAAA,CAAA,CAClE,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,CAC9D,CAAC,CACH,CAAA,mBAAA","file":"/home/runner/work/cli/cli/dist/impl-W7AB7VQY.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { cancelPrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface CancelCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses?: RequestStatus[];\n requestIds?: string[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n cancellationTitle: string;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function cancel(\n this: LocalContext,\n {\n auth,\n actions,\n statuses = [],\n requestIds,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n cancellationTitle,\n transcendUrl,\n concurrency,\n }: CancelCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await cancelPrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n cancellationTitle,\n requestIds,\n statuses,\n concurrency,\n silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,\n createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,\n createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,\n });\n}\n"]}
@@ -1,6 +1,6 @@
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 _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkJFZPP4VVcjs = require('./chunk-JFZPP4VV.cjs');var _chunkAD5RNQ4Jcjs = require('./chunk-AD5RNQ4J.cjs');require('./chunk-ECGHWDVP.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkTHCW2SNWcjs = require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.cjs');var _bluebird = require('bluebird');var _fs = require('fs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function I({transcendUrl:i,auth:c,pageSize:h,publishToPrivacyCenter:y,contents:l,deleteExtraAttributeValues:m=!1,classifyService:f=!1}){let u=_chunkOPHHRNLHcjs.wc.call(void 0, i,c);try{return!await _chunkOPHHRNLHcjs.vg.call(void 0, l,u,{pageSize:h,publishToPrivacyCenter:y,classifyService:f,deleteExtraAttributeValues:m})}catch(o){return _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An unexpected error occurred syncing the schema: ${o.message}`)),!1}}async function U({file:i="./transcend.yml",transcendUrl:c,auth:h,variables:y,pageSize:l,publishToPrivacyCenter:m,classifyService:f,deleteExtraAttributeValues:u}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let o=await _chunkAD5RNQ4Jcjs.b.call(void 0, h),N=_chunkOPHHRNLHcjs.Uf.call(void 0, y),p;if(Array.isArray(o)&&_fs.lstatSync.call(void 0, i).isDirectory()?p=_chunkAD5RNQ4Jcjs.c.call(void 0, i).map(e=>_path.join.call(void 0, i,e)):p=i.split(","),p.length<1)throw new Error("No file specified!");let s=p.map(e=>{_fs.existsSync.call(void 0, e)?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading file "${e}"...`)):(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),this.process.exit(1));try{let r=_chunkJFZPP4VVcjs.d.call(void 0, e,N);return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully read in "${e}"`)),{content:r,name:e.split("/").pop().replace(".yml","")}}catch(r){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`The shape of your yaml file is invalid with the following errors: ${r.message}`)),this.process.exit(1)}});if(typeof o=="string"){let[e,...r]=s.map(({content:d})=>d),$=_chunkIBTP5OXEcjs.a.call(void 0, e,...r);await I({transcendUrl:c,auth:o,contents:$,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,pageSize:l,classifyService:!!f})||(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors. View output above for more information, or check out ${_chunkTHCW2SNWcjs.p}`)),this.process.exit(1))}else{if(s.length!==1&&s.length!==o.length)throw new Error(`Expected list of yml files to be equal to the list of API keys.Got ${s.length} YML file${s.length===1?"":"s"} and ${o.length} API key${o.length===1?"":"s"}`);let e=[];await _bluebird.mapSeries.call(void 0, o,async(r,$)=>{let a=`[${$+1}/${o.length}][${r.organizationName}] `;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`~~~
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 _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkBQSBPO63cjs = require('./chunk-BQSBPO63.cjs');var _chunkGDNSAJQNcjs = require('./chunk-GDNSAJQN.cjs');require('./chunk-LU3DKRNK.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkF7QE6D3Tcjs = require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');var _bluebird = require('bluebird');var _fs = require('fs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function I({transcendUrl:i,auth:c,pageSize:h,publishToPrivacyCenter:y,contents:l,deleteExtraAttributeValues:m=!1,classifyService:f=!1}){let u=_chunkNBXAOUWCcjs.xc.call(void 0, i,c);try{return!await _chunkNBXAOUWCcjs.xg.call(void 0, l,u,{pageSize:h,publishToPrivacyCenter:y,classifyService:f,deleteExtraAttributeValues:m})}catch(o){return _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An unexpected error occurred syncing the schema: ${o.message}`)),!1}}async function U({file:i="./transcend.yml",transcendUrl:c,auth:h,variables:y,pageSize:l,publishToPrivacyCenter:m,classifyService:f,deleteExtraAttributeValues:u}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let o=await _chunkGDNSAJQNcjs.b.call(void 0, h),N=_chunkNBXAOUWCcjs.Wf.call(void 0, y),p;if(Array.isArray(o)&&_fs.lstatSync.call(void 0, i).isDirectory()?p=_chunkGDNSAJQNcjs.c.call(void 0, i).map(e=>_path.join.call(void 0, i,e)):p=i.split(","),p.length<1)throw new Error("No file specified!");let s=p.map(e=>{_fs.existsSync.call(void 0, e)?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading file "${e}"...`)):(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),this.process.exit(1));try{let r=_chunkBQSBPO63cjs.d.call(void 0, e,N);return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully read in "${e}"`)),{content:r,name:e.split("/").pop().replace(".yml","")}}catch(r){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`The shape of your yaml file is invalid with the following errors: ${r.message}`)),this.process.exit(1)}});if(typeof o=="string"){let[e,...r]=s.map(({content:d})=>d),$=_chunkIBTP5OXEcjs.a.call(void 0, e,...r);await I({transcendUrl:c,auth:o,contents:$,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,pageSize:l,classifyService:!!f})||(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors. View output above for more information, or check out ${_chunkF7QE6D3Tcjs.p}`)),this.process.exit(1))}else{if(s.length!==1&&s.length!==o.length)throw new Error(`Expected list of yml files to be equal to the list of API keys.Got ${s.length} YML file${s.length===1?"":"s"} and ${o.length} API key${o.length===1?"":"s"}`);let e=[];await _bluebird.mapSeries.call(void 0, o,async(r,$)=>{let a=`[${$+1}/${o.length}][${r.organizationName}] `;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`~~~
2
2
 
3
3
  ${a}Attempting to push configuration...
4
4
 
5
- ~~~`));let d=s.length===1?s[0].content:_optionalChain([s, 'access', _ => _.find, 'call', _2 => _2(E=>E.name===r.organizationName), 'optionalAccess', _3 => _3.content]);if(!d){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to find transcend.yml file for organization: "${r.organizationName}".`)),e.push(r.organizationName);return}await I({transcendUrl:c,auth:r.apiKey,contents:d,pageSize:l,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,classifyService:f})?_chunkZUNVPK23cjs.a.info(_colors2.default.green(`${a}Successfully pushed configuration!`)):(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to sync configuration.`)),e.push(r.organizationName))}),e.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors for "${e.join(",")}". View output above for more information, or check out ${_chunkTHCW2SNWcjs.p}`)),this.process.exit(1))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced yaml file to Transcend! View at ${_chunkTHCW2SNWcjs.p}`))}exports.push = U;
6
- //# sourceMappingURL=impl-GE54DKYZ.cjs.map
5
+ ~~~`));let d=s.length===1?s[0].content:_optionalChain([s, 'access', _ => _.find, 'call', _2 => _2(E=>E.name===r.organizationName), 'optionalAccess', _3 => _3.content]);if(!d){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to find transcend.yml file for organization: "${r.organizationName}".`)),e.push(r.organizationName);return}await I({transcendUrl:c,auth:r.apiKey,contents:d,pageSize:l,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,classifyService:f})?_chunkZUNVPK23cjs.a.info(_colors2.default.green(`${a}Successfully pushed configuration!`)):(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to sync configuration.`)),e.push(r.organizationName))}),e.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors for "${e.join(",")}". View output above for more information, or check out ${_chunkF7QE6D3Tcjs.p}`)),this.process.exit(1))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced yaml file to Transcend! View at ${_chunkF7QE6D3Tcjs.p}`))}exports.push = U;
6
+ //# sourceMappingURL=impl-WGVGJV2F.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-GE54DKYZ.cjs","../src/commands/inventory/push/impl.ts"],"names":["syncConfiguration","transcendUrl","auth","pageSize","publishToPrivacyCenter","contents","deleteExtraAttributeValues","classifyService","client","buildTranscendGraphQLClient","syncConfigurationToTranscend","err","logger","colors"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAgD,gCAA6B,wDAAyC,wDAA0D,gCAA6B,wDAAyC,wDAAyC,gCAA6B,oCCGnX,wBACY,4BACjB,gFAEF,MAmBnB,SAAeA,CAAAA,CAAkB,CAC/B,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,0BAAA,CAAAC,CAAAA,CAA6B,CAAA,CAAA,CAC7B,eAAA,CAAAC,CAAAA,CAAkB,CAAA,CACpB,CAAA,CAeqB,CACnB,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BR,CAAcC,CAAI,CAAA,CAG7D,GAAI,CAWF,MAAO,CAVkB,MAAMQ,kCAAAA,CAC7BL,CACAG,CAAAA,CACA,CACE,QAAA,CAAAL,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAG,CAAAA,CACA,0BAAA,CAAAD,CACF,CACF,CAEF,CAAA,KAAA,CAASK,CAAAA,CAAK,CACZ,OAAAC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,iDAAA,EAAoDF,CAAAA,CAAI,OAAO,CAAA,CAAA;AAsI7D;AAAgB;AAAA;AA8D1B,GAAA","file":"/home/runner/work/cli/cli/dist/impl-GE54DKYZ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { logger } from '../../../logger';\nimport { mapSeries } from 'bluebird';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { readTranscendYaml } from '../../../lib/readTranscendYaml';\nimport colors from 'colors';\nimport {\n buildTranscendGraphQLClient,\n syncConfigurationToTranscend,\n} from '../../../lib/graphql';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { TranscendInput } from '../../../codecs';\nimport { validateTranscendAuth, listFiles } from '../../../lib/api-keys';\nimport { mergeTranscendInputs } from '../../../lib/mergeTranscendInputs';\nimport { parseVariablesFromString } from '../../../lib/helpers/parseVariablesFromString';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Sync configuration to Transcend\n *\n * @param options - Options\n * @returns True if synced successfully, false if error occurs\n */\nasync function syncConfiguration({\n transcendUrl,\n auth,\n pageSize,\n publishToPrivacyCenter,\n contents,\n deleteExtraAttributeValues = false,\n classifyService = false,\n}: {\n /** Transcend YAML */\n contents: TranscendInput;\n /** Transcend URL */\n transcendUrl: string;\n /** API key */\n auth: string;\n /** Page size */\n pageSize: number;\n /** Skip privacy center publish step */\n publishToPrivacyCenter: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Delete attributes when syncing */\n deleteExtraAttributeValues?: boolean;\n}): Promise<boolean> {\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Sync to Transcend\n try {\n const encounteredError = await syncConfigurationToTranscend(\n contents,\n client,\n {\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n },\n );\n return !encounteredError;\n } catch (err) {\n logger.error(\n colors.red(\n `An unexpected error occurred syncing the schema: ${err.message}`,\n ),\n );\n return false;\n }\n}\n\nexport interface PushCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n pageSize: number;\n variables: string;\n publishToPrivacyCenter: boolean;\n classifyService: boolean;\n deleteExtraAttributeValues: boolean;\n}\n\nexport async function push(\n this: LocalContext,\n {\n file = './transcend.yml',\n transcendUrl,\n auth,\n variables,\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n }: PushCommandFlags,\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 // Parse out the variables\n const vars = parseVariablesFromString(variables);\n\n // check if we are being passed a list of API keys and a list of files\n let fileList: string[];\n if (Array.isArray(apiKeyOrList) && lstatSync(file).isDirectory()) {\n fileList = listFiles(file).map((filePath) => join(file, filePath));\n } else {\n fileList = file.split(',');\n }\n\n // Ensure at least one file is parsed\n if (fileList.length < 1) {\n throw new Error('No file specified!');\n }\n\n // eslint-disable-next-line array-callback-return,consistent-return\n const transcendInputs = fileList.map((filePath) => {\n // Ensure yaml file exists on disk\n if (!existsSync(filePath)) {\n logger.error(\n colors.red(\n `The file path does not exist on disk: ${filePath}. You can specify the filepath using --file=./examples/transcend.yml`,\n ),\n );\n this.process.exit(1);\n } else {\n logger.info(colors.magenta(`Reading file \"${filePath}\"...`));\n }\n\n try {\n // Read in the yaml file and validate it's shape\n const newContents = readTranscendYaml(filePath, vars);\n logger.info(colors.green(`Successfully read in \"${filePath}\"`));\n return {\n content: newContents,\n name: filePath.split('/').pop()!.replace('.yml', ''),\n };\n } catch (err) {\n logger.error(\n colors.red(\n `The shape of your yaml file is invalid with the following errors: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n });\n\n // process a single API key\n if (typeof apiKeyOrList === 'string') {\n // if passed multiple inputs, merge them together\n const [base, ...rest] = transcendInputs.map(({ content }) => content);\n const contents = mergeTranscendInputs(base, ...rest);\n\n // sync the configuration\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKeyOrList,\n contents,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n pageSize,\n classifyService: !!classifyService,\n });\n\n // exist with error code\n if (!success) {\n logger.info(\n colors.red(\n `Sync encountered errors. View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n } else {\n // if passed multiple inputs, expect them to be one per instance\n if (\n transcendInputs.length !== 1 &&\n transcendInputs.length !== apiKeyOrList.length\n ) {\n throw new Error(\n 'Expected list of yml files to be equal to the list of API keys.' +\n `Got ${transcendInputs.length} YML file${\n transcendInputs.length === 1 ? '' : 's'\n } and ${apiKeyOrList.length} API key${\n apiKeyOrList.length === 1 ? '' : 's'\n }`,\n );\n }\n\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 push configuration...\\n\\n~~~`,\n ),\n );\n\n // use the merged contents if 1 yml passed, else use the contents that map to that organization\n const useContents =\n transcendInputs.length === 1\n ? transcendInputs[0].content\n : transcendInputs.find(\n (input) => input.name === apiKey.organizationName,\n )?.content;\n\n // Throw error if cannot find a yml file matching that organization name\n if (!useContents) {\n logger.error(\n colors.red(\n `${prefix}Failed to find transcend.yml file for organization: \"${apiKey.organizationName}\".`,\n ),\n );\n encounteredErrors.push(apiKey.organizationName);\n return;\n }\n\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKey.apiKey,\n contents: useContents,\n pageSize,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n classifyService,\n });\n\n if (success) {\n logger.info(\n colors.green(`${prefix}Successfully pushed configuration!`),\n );\n } else {\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 // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to Transcend! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-WGVGJV2F.cjs","../src/commands/inventory/push/impl.ts"],"names":["syncConfiguration","transcendUrl","auth","pageSize","publishToPrivacyCenter","contents","deleteExtraAttributeValues","classifyService","client","buildTranscendGraphQLClient","syncConfigurationToTranscend","err","logger","colors"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAgD,gCAA6B,wDAAyC,wDAA0D,gCAA6B,wDAAyC,wDAAyC,gCAA6B,oCCGnX,wBACY,4BACjB,gFAEF,MAmBnB,SAAeA,CAAAA,CAAkB,CAC/B,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,0BAAA,CAAAC,CAAAA,CAA6B,CAAA,CAAA,CAC7B,eAAA,CAAAC,CAAAA,CAAkB,CAAA,CACpB,CAAA,CAeqB,CACnB,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BR,CAAcC,CAAI,CAAA,CAG7D,GAAI,CAWF,MAAO,CAVkB,MAAMQ,kCAAAA,CAC7BL,CACAG,CAAAA,CACA,CACE,QAAA,CAAAL,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAG,CAAAA,CACA,0BAAA,CAAAD,CACF,CACF,CAEF,CAAA,KAAA,CAASK,CAAAA,CAAK,CACZ,OAAAC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,iDAAA,EAAoDF,CAAAA,CAAI,OAAO,CAAA,CAAA;AAsI7D;AAAgB;AAAA;AA8D1B,GAAA","file":"/home/runner/work/cli/cli/dist/impl-WGVGJV2F.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { logger } from '../../../logger';\nimport { mapSeries } from 'bluebird';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { readTranscendYaml } from '../../../lib/readTranscendYaml';\nimport colors from 'colors';\nimport {\n buildTranscendGraphQLClient,\n syncConfigurationToTranscend,\n} from '../../../lib/graphql';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { TranscendInput } from '../../../codecs';\nimport { validateTranscendAuth, listFiles } from '../../../lib/api-keys';\nimport { mergeTranscendInputs } from '../../../lib/mergeTranscendInputs';\nimport { parseVariablesFromString } from '../../../lib/helpers/parseVariablesFromString';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Sync configuration to Transcend\n *\n * @param options - Options\n * @returns True if synced successfully, false if error occurs\n */\nasync function syncConfiguration({\n transcendUrl,\n auth,\n pageSize,\n publishToPrivacyCenter,\n contents,\n deleteExtraAttributeValues = false,\n classifyService = false,\n}: {\n /** Transcend YAML */\n contents: TranscendInput;\n /** Transcend URL */\n transcendUrl: string;\n /** API key */\n auth: string;\n /** Page size */\n pageSize: number;\n /** Skip privacy center publish step */\n publishToPrivacyCenter: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Delete attributes when syncing */\n deleteExtraAttributeValues?: boolean;\n}): Promise<boolean> {\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Sync to Transcend\n try {\n const encounteredError = await syncConfigurationToTranscend(\n contents,\n client,\n {\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n },\n );\n return !encounteredError;\n } catch (err) {\n logger.error(\n colors.red(\n `An unexpected error occurred syncing the schema: ${err.message}`,\n ),\n );\n return false;\n }\n}\n\nexport interface PushCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n pageSize: number;\n variables: string;\n publishToPrivacyCenter: boolean;\n classifyService: boolean;\n deleteExtraAttributeValues: boolean;\n}\n\nexport async function push(\n this: LocalContext,\n {\n file = './transcend.yml',\n transcendUrl,\n auth,\n variables,\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n }: PushCommandFlags,\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 // Parse out the variables\n const vars = parseVariablesFromString(variables);\n\n // check if we are being passed a list of API keys and a list of files\n let fileList: string[];\n if (Array.isArray(apiKeyOrList) && lstatSync(file).isDirectory()) {\n fileList = listFiles(file).map((filePath) => join(file, filePath));\n } else {\n fileList = file.split(',');\n }\n\n // Ensure at least one file is parsed\n if (fileList.length < 1) {\n throw new Error('No file specified!');\n }\n\n // eslint-disable-next-line array-callback-return,consistent-return\n const transcendInputs = fileList.map((filePath) => {\n // Ensure yaml file exists on disk\n if (!existsSync(filePath)) {\n logger.error(\n colors.red(\n `The file path does not exist on disk: ${filePath}. You can specify the filepath using --file=./examples/transcend.yml`,\n ),\n );\n this.process.exit(1);\n } else {\n logger.info(colors.magenta(`Reading file \"${filePath}\"...`));\n }\n\n try {\n // Read in the yaml file and validate it's shape\n const newContents = readTranscendYaml(filePath, vars);\n logger.info(colors.green(`Successfully read in \"${filePath}\"`));\n return {\n content: newContents,\n name: filePath.split('/').pop()!.replace('.yml', ''),\n };\n } catch (err) {\n logger.error(\n colors.red(\n `The shape of your yaml file is invalid with the following errors: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n });\n\n // process a single API key\n if (typeof apiKeyOrList === 'string') {\n // if passed multiple inputs, merge them together\n const [base, ...rest] = transcendInputs.map(({ content }) => content);\n const contents = mergeTranscendInputs(base, ...rest);\n\n // sync the configuration\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKeyOrList,\n contents,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n pageSize,\n classifyService: !!classifyService,\n });\n\n // exist with error code\n if (!success) {\n logger.info(\n colors.red(\n `Sync encountered errors. View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n } else {\n // if passed multiple inputs, expect them to be one per instance\n if (\n transcendInputs.length !== 1 &&\n transcendInputs.length !== apiKeyOrList.length\n ) {\n throw new Error(\n 'Expected list of yml files to be equal to the list of API keys.' +\n `Got ${transcendInputs.length} YML file${\n transcendInputs.length === 1 ? '' : 's'\n } and ${apiKeyOrList.length} API key${\n apiKeyOrList.length === 1 ? '' : 's'\n }`,\n );\n }\n\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 push configuration...\\n\\n~~~`,\n ),\n );\n\n // use the merged contents if 1 yml passed, else use the contents that map to that organization\n const useContents =\n transcendInputs.length === 1\n ? transcendInputs[0].content\n : transcendInputs.find(\n (input) => input.name === apiKey.organizationName,\n )?.content;\n\n // Throw error if cannot find a yml file matching that organization name\n if (!useContents) {\n logger.error(\n colors.red(\n `${prefix}Failed to find transcend.yml file for organization: \"${apiKey.organizationName}\".`,\n ),\n );\n encounteredErrors.push(apiKey.organizationName);\n return;\n }\n\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKey.apiKey,\n contents: useContents,\n pageSize,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n classifyService,\n });\n\n if (success) {\n logger.info(\n colors.green(`${prefix}Successfully pushed configuration!`),\n );\n } else {\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 // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to Transcend! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGMTBHFZVcjs = require('./chunk-GMTBHFZV.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function q(){let e=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${e}] ready pid=${process.pid}`),_optionalChain([process, 'access', _ => _.send, 'optionalCall', _2 => _2({type:"ready"})]),process.on("message",async o=>{if(!o||typeof o!="object"||(o.type==="shutdown"&&process.exit(0),o.type!=="task"))return;let{filePath:t,options:p}=o.payload,{outputDir:u,clearOutputDir:i}=p;try{_chunkZUNVPK23cjs.a.info(`[w${e}] processing ${t}`),await _chunkOPHHRNLHcjs.cg.call(void 0, {filePath:t,outputDir:u,clearOutputDir:i,onProgress:(s,n)=>_optionalChain([process, 'access', _3 => _3.send, 'optionalCall', _4 => _4({type:"progress",payload:{filePath:t,processed:s,total:n}})])}),_optionalChain([process, 'access', _5 => _5.send, 'optionalCall', _6 => _6({type:"result",payload:{ok:!0,filePath:t}})])}catch(s){let n=_chunkOPHHRNLHcjs.Wf.call(void 0, s);_chunkZUNVPK23cjs.a.error(`[w${e}] ERROR ${t}: ${s.stack||n}`),_optionalChain([process, 'access', _7 => _7.send, 'optionalCall', _8 => _8({type:"result",payload:{ok:!1,filePath:t,error:n}})])}}),await new Promise(()=>{})}function R(e){return _chunkGMTBHFZVcjs.d.call(void 0, e)}function $(e){return _chunkGMTBHFZVcjs.e.call(void 0, e)}var v={renderHeader:R,renderWorkers:$};function O(){return typeof __filename<"u"?__filename:process.argv[1]}async function N(e){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{directory:o,outputDir:t,clearOutputDir:p,concurrency:u,viewerMode:i}=e,s=_chunkOPHHRNLHcjs.bg.call(void 0, o,this),{poolSize:n,cpuCount:d}=_chunkGMTBHFZVcjs.a.call(void 0, u,s.length);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Converting ${s.length} Parquet file(s) \u2192 CSV with pool size ${n} (CPU=${d})`));let w=s.map(r=>({filePath:r,options:{outputDir:t,clearOutputDir:p}})),b={nextTask:()=>w.shift(),taskLabel:r=>r.filePath,initTotals:()=>({}),initSlotProgress:()=>{},onProgress:r=>r,onResult:(r,l)=>({totals:r,ok:!!l.ok}),postProcess:async()=>{}};await _chunkGMTBHFZVcjs.f.call(void 0, {title:`Parquet \u2192 CSV - ${o}`,baseDir:o||t||process.cwd(),childFlag:_chunkGMTBHFZVcjs.b,childModulePath:O(),poolSize:n,cpuCount:d,filesTotal:s.length,hooks:b,viewerMode:i,render:r=>_chunkGMTBHFZVcjs.c.call(void 0, r,v,i),extraKeyHandler:({logsBySlot:r,repaint:l,setPaused:D})=>_chunkGMTBHFZVcjs.g.call(void 0, {logsBySlot:r,repaint:l,setPaused:D})})}process.argv.includes(_chunkGMTBHFZVcjs.b)&&q().catch(e=>{_chunkZUNVPK23cjs.a.error(e),process.exit(1)});exports.parquetToCsv = N;
2
- //# sourceMappingURL=impl-J23ILBH7.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 _chunk2CAMTEJYcjs = require('./chunk-2CAMTEJY.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function q(){let e=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${e}] ready pid=${process.pid}`),_optionalChain([process, 'access', _ => _.send, 'optionalCall', _2 => _2({type:"ready"})]),process.on("message",async o=>{if(!o||typeof o!="object"||(o.type==="shutdown"&&process.exit(0),o.type!=="task"))return;let{filePath:t,options:p}=o.payload,{outputDir:u,clearOutputDir:i}=p;try{_chunkZUNVPK23cjs.a.info(`[w${e}] processing ${t}`),await _chunkNBXAOUWCcjs.eg.call(void 0, {filePath:t,outputDir:u,clearOutputDir:i,onProgress:(s,n)=>_optionalChain([process, 'access', _3 => _3.send, 'optionalCall', _4 => _4({type:"progress",payload:{filePath:t,processed:s,total:n}})])}),_optionalChain([process, 'access', _5 => _5.send, 'optionalCall', _6 => _6({type:"result",payload:{ok:!0,filePath:t}})])}catch(s){let n=_chunkNBXAOUWCcjs.Yf.call(void 0, s);_chunkZUNVPK23cjs.a.error(`[w${e}] ERROR ${t}: ${s.stack||n}`),_optionalChain([process, 'access', _7 => _7.send, 'optionalCall', _8 => _8({type:"result",payload:{ok:!1,filePath:t,error:n}})])}}),await new Promise(()=>{})}function R(e){return _chunk2CAMTEJYcjs.d.call(void 0, e)}function $(e){return _chunk2CAMTEJYcjs.e.call(void 0, e)}var v={renderHeader:R,renderWorkers:$};function O(){return typeof __filename<"u"?__filename:process.argv[1]}async function N(e){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{directory:o,outputDir:t,clearOutputDir:p,concurrency:u,viewerMode:i}=e,s=_chunkNBXAOUWCcjs.dg.call(void 0, o,this),{poolSize:n,cpuCount:d}=_chunk2CAMTEJYcjs.a.call(void 0, u,s.length);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Converting ${s.length} Parquet file(s) \u2192 CSV with pool size ${n} (CPU=${d})`));let w=s.map(r=>({filePath:r,options:{outputDir:t,clearOutputDir:p}})),b={nextTask:()=>w.shift(),taskLabel:r=>r.filePath,initTotals:()=>({}),initSlotProgress:()=>{},onProgress:r=>r,onResult:(r,l)=>({totals:r,ok:!!l.ok}),postProcess:async()=>{}};await _chunk2CAMTEJYcjs.f.call(void 0, {title:`Parquet \u2192 CSV - ${o}`,baseDir:o||t||process.cwd(),childFlag:_chunk2CAMTEJYcjs.b,childModulePath:O(),poolSize:n,cpuCount:d,filesTotal:s.length,hooks:b,viewerMode:i,render:r=>_chunk2CAMTEJYcjs.c.call(void 0, r,v,i),extraKeyHandler:({logsBySlot:r,repaint:l,setPaused:D})=>_chunk2CAMTEJYcjs.g.call(void 0, {logsBySlot:r,repaint:l,setPaused:D})})}process.argv.includes(_chunk2CAMTEJYcjs.b)&&q().catch(e=>{_chunkZUNVPK23cjs.a.error(e),process.exit(1)});exports.parquetToCsv = N;
2
+ //# sourceMappingURL=impl-XUD5VFQX.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-J23ILBH7.cjs","../src/commands/admin/parquet-to-csv/impl.ts","../src/commands/admin/parquet-to-csv/worker.ts"],"names":["runChild","workerId","logger"],"mappings":"AAAA,quBAAkF,wDAAyC,wDAA0D,gCAA6B,wDAAoC,gCAA6B,gCAA6B,gFCC7R,MCgCnB,SAAsBA,CAAAA,CAAAA,CAA0B,CAC9C,IAAMC,CAAAA,CAAW,MAAA,CAAO,OAAA,CAAQ,GAAA,CAAI,SAAA,EAAa,GAAG,CAAA,CACpDC,mBAAAA,CAAO,IAAA,CAAK,CAAA,EAAA,EAAKD,CAAQ,CAAA,YAAA,EAAe,OAAA,CAAQ,GAAG,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-J23ILBH7.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { collectParquetFilesOrExit } from '../../../lib/helpers';\nimport {\n computePoolSize,\n createExtraKeyHandler,\n CHILD_FLAG,\n type PoolHooks,\n runPool,\n dashboardPlugin,\n} from '../../../lib/pooling';\nimport {\n runChild,\n type ParquetProgress,\n type ParquetResult,\n type ParquetTask,\n} from './worker';\nimport { parquetToCsvPlugin } from './ui';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Returns the current module's path so the worker pool knows what file to re-exec.\n * In Node ESM, __filename is undefined, so we fall back to argv[1].\n *\n * @returns The current module's path.\n */\nfunction getCurrentModulePath(): string {\n if (typeof __filename !== 'undefined') {\n return __filename as unknown as string;\n }\n return process.argv[1];\n}\n\n/** No custom totals for the header; the runner’s built-ins suffice. */\ntype Totals = Record<string, never>;\n\nexport type ParquetToCsvCommandFlags = {\n directory: string;\n outputDir?: string;\n clearOutputDir: boolean;\n concurrency?: number;\n viewerMode: boolean;\n};\n\n/**\n * Convert all Parquet files in a directory to CSV, in parallel.\n *\n * @param flags - The command flags.\n */\nexport async function parquetToCsv(\n this: LocalContext,\n flags: ParquetToCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { directory, outputDir, clearOutputDir, concurrency, viewerMode } =\n flags;\n\n /* 1) Discover .parquet inputs */\n const files = collectParquetFilesOrExit(directory, this);\n\n /* 2) Size the pool */\n const { poolSize, cpuCount } = computePoolSize(concurrency, files.length);\n\n logger.info(\n colors.green(\n `Converting ${files.length} Parquet file(s) → CSV with pool size ${poolSize} (CPU=${cpuCount})`,\n ),\n );\n\n /* 3) Build FIFO queue of tasks (one per file) */\n const queue = files.map<ParquetTask>((filePath) => ({\n filePath,\n options: { outputDir, clearOutputDir },\n }));\n\n /* 4) Pool hooks */\n const hooks: PoolHooks<ParquetTask, ParquetProgress, ParquetResult, Totals> =\n {\n nextTask: () => queue.shift(),\n taskLabel: (t) => t.filePath,\n initTotals: () => ({} as Totals),\n initSlotProgress: () => undefined,\n onProgress: (totals) => totals,\n onResult: (totals, res) => ({ totals, ok: !!res.ok }),\n postProcess: async () => {\n // nothing special post-run\n },\n };\n\n /* 5) Launch the pool runner with custom dashboard plugin */\n await runPool({\n title: `Parquet → CSV - ${directory}`,\n baseDir: directory || outputDir || process.cwd(),\n childFlag: CHILD_FLAG,\n childModulePath: getCurrentModulePath(),\n poolSize,\n cpuCount,\n filesTotal: files.length,\n hooks,\n viewerMode,\n render: (input) => dashboardPlugin(input, parquetToCsvPlugin, viewerMode),\n extraKeyHandler: ({ logsBySlot, repaint, setPaused }) =>\n createExtraKeyHandler({ logsBySlot, repaint, setPaused }),\n });\n}\n\n/* -------------------------------------------------------------------------------------------------\n * If invoked directly as a child process, enter worker loop\n * ------------------------------------------------------------------------------------------------- */\nif (process.argv.includes(CHILD_FLAG)) {\n runChild().catch((err) => {\n logger.error(err);\n process.exit(1);\n });\n}\n","import { parquetToCsvOneFile, extractErrorMessage } from '../../../lib/helpers';\nimport type { ToWorker } from '../../../lib/pooling';\nimport { logger } from '../../../logger';\n\nexport type ParquetTask = {\n /** Absolute path of the Parquet file to convert. */\n filePath: string;\n options: {\n /** Optional directory where CSV output files should be written. */\n outputDir?: string;\n /** Whether to clear any pre-existing output before writing new ones. */\n clearOutputDir: boolean;\n };\n};\n\nexport type ParquetProgress = {\n /** File being processed by the worker. */\n filePath: string;\n /** Rows processed so far. */\n processed: number;\n /** Optional known total rows (not always available). */\n total?: number;\n};\n\nexport type ParquetResult = {\n ok: boolean;\n filePath: string;\n error?: string;\n};\n\n/**\n * Worker loop: convert a single Parquet file to one or more CSV files.\n */\nexport async function runChild(): Promise<void> {\n const workerId = Number(process.env.WORKER_ID || '0');\n logger.info(`[w${workerId}] ready pid=${process.pid}`);\n process.send?.({ type: 'ready' });\n\n process.on('message', async (msg: ToWorker<ParquetTask>) => {\n if (!msg || typeof msg !== 'object') return;\n\n if (msg.type === 'shutdown') {\n process.exit(0);\n }\n if (msg.type !== 'task') return;\n\n const { filePath, options } = msg.payload;\n const { outputDir, clearOutputDir } = options;\n\n try {\n logger.info(`[w${workerId}] processing ${filePath}`);\n await parquetToCsvOneFile({\n filePath,\n outputDir,\n clearOutputDir,\n onProgress: (processed, total) =>\n process.send?.({\n type: 'progress',\n payload: { filePath, processed, total },\n }),\n });\n\n process.send?.({\n type: 'result',\n payload: { ok: true, filePath },\n });\n } catch (err) {\n const message = extractErrorMessage(err);\n logger.error(`[w${workerId}] ERROR ${filePath}: ${err.stack || message}`);\n process.send?.({\n type: 'result',\n payload: { ok: false, filePath, error: message },\n });\n }\n });\n\n // keep alive until shutdown\n await new Promise<never>(() => {\n // Do nothing\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-XUD5VFQX.cjs","../src/commands/admin/parquet-to-csv/impl.ts","../src/commands/admin/parquet-to-csv/worker.ts"],"names":["runChild","workerId","logger"],"mappings":"AAAA,quBAAkF,wDAAyC,wDAA0D,gCAA6B,wDAAoC,gCAA6B,gCAA6B,gFCC7R,MCgCnB,SAAsBA,CAAAA,CAAAA,CAA0B,CAC9C,IAAMC,CAAAA,CAAW,MAAA,CAAO,OAAA,CAAQ,GAAA,CAAI,SAAA,EAAa,GAAG,CAAA,CACpDC,mBAAAA,CAAO,IAAA,CAAK,CAAA,EAAA,EAAKD,CAAQ,CAAA,YAAA,EAAe,OAAA,CAAQ,GAAG,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-XUD5VFQX.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { collectParquetFilesOrExit } from '../../../lib/helpers';\nimport {\n computePoolSize,\n createExtraKeyHandler,\n CHILD_FLAG,\n type PoolHooks,\n runPool,\n dashboardPlugin,\n} from '../../../lib/pooling';\nimport {\n runChild,\n type ParquetProgress,\n type ParquetResult,\n type ParquetTask,\n} from './worker';\nimport { parquetToCsvPlugin } from './ui';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Returns the current module's path so the worker pool knows what file to re-exec.\n * In Node ESM, __filename is undefined, so we fall back to argv[1].\n *\n * @returns The current module's path.\n */\nfunction getCurrentModulePath(): string {\n if (typeof __filename !== 'undefined') {\n return __filename as unknown as string;\n }\n return process.argv[1];\n}\n\n/** No custom totals for the header; the runner’s built-ins suffice. */\ntype Totals = Record<string, never>;\n\nexport type ParquetToCsvCommandFlags = {\n directory: string;\n outputDir?: string;\n clearOutputDir: boolean;\n concurrency?: number;\n viewerMode: boolean;\n};\n\n/**\n * Convert all Parquet files in a directory to CSV, in parallel.\n *\n * @param flags - The command flags.\n */\nexport async function parquetToCsv(\n this: LocalContext,\n flags: ParquetToCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { directory, outputDir, clearOutputDir, concurrency, viewerMode } =\n flags;\n\n /* 1) Discover .parquet inputs */\n const files = collectParquetFilesOrExit(directory, this);\n\n /* 2) Size the pool */\n const { poolSize, cpuCount } = computePoolSize(concurrency, files.length);\n\n logger.info(\n colors.green(\n `Converting ${files.length} Parquet file(s) → CSV with pool size ${poolSize} (CPU=${cpuCount})`,\n ),\n );\n\n /* 3) Build FIFO queue of tasks (one per file) */\n const queue = files.map<ParquetTask>((filePath) => ({\n filePath,\n options: { outputDir, clearOutputDir },\n }));\n\n /* 4) Pool hooks */\n const hooks: PoolHooks<ParquetTask, ParquetProgress, ParquetResult, Totals> =\n {\n nextTask: () => queue.shift(),\n taskLabel: (t) => t.filePath,\n initTotals: () => ({} as Totals),\n initSlotProgress: () => undefined,\n onProgress: (totals) => totals,\n onResult: (totals, res) => ({ totals, ok: !!res.ok }),\n postProcess: async () => {\n // nothing special post-run\n },\n };\n\n /* 5) Launch the pool runner with custom dashboard plugin */\n await runPool({\n title: `Parquet → CSV - ${directory}`,\n baseDir: directory || outputDir || process.cwd(),\n childFlag: CHILD_FLAG,\n childModulePath: getCurrentModulePath(),\n poolSize,\n cpuCount,\n filesTotal: files.length,\n hooks,\n viewerMode,\n render: (input) => dashboardPlugin(input, parquetToCsvPlugin, viewerMode),\n extraKeyHandler: ({ logsBySlot, repaint, setPaused }) =>\n createExtraKeyHandler({ logsBySlot, repaint, setPaused }),\n });\n}\n\n/* -------------------------------------------------------------------------------------------------\n * If invoked directly as a child process, enter worker loop\n * ------------------------------------------------------------------------------------------------- */\nif (process.argv.includes(CHILD_FLAG)) {\n runChild().catch((err) => {\n logger.error(err);\n process.exit(1);\n });\n}\n","import { parquetToCsvOneFile, extractErrorMessage } from '../../../lib/helpers';\nimport type { ToWorker } from '../../../lib/pooling';\nimport { logger } from '../../../logger';\n\nexport type ParquetTask = {\n /** Absolute path of the Parquet file to convert. */\n filePath: string;\n options: {\n /** Optional directory where CSV output files should be written. */\n outputDir?: string;\n /** Whether to clear any pre-existing output before writing new ones. */\n clearOutputDir: boolean;\n };\n};\n\nexport type ParquetProgress = {\n /** File being processed by the worker. */\n filePath: string;\n /** Rows processed so far. */\n processed: number;\n /** Optional known total rows (not always available). */\n total?: number;\n};\n\nexport type ParquetResult = {\n ok: boolean;\n filePath: string;\n error?: string;\n};\n\n/**\n * Worker loop: convert a single Parquet file to one or more CSV files.\n */\nexport async function runChild(): Promise<void> {\n const workerId = Number(process.env.WORKER_ID || '0');\n logger.info(`[w${workerId}] ready pid=${process.pid}`);\n process.send?.({ type: 'ready' });\n\n process.on('message', async (msg: ToWorker<ParquetTask>) => {\n if (!msg || typeof msg !== 'object') return;\n\n if (msg.type === 'shutdown') {\n process.exit(0);\n }\n if (msg.type !== 'task') return;\n\n const { filePath, options } = msg.payload;\n const { outputDir, clearOutputDir } = options;\n\n try {\n logger.info(`[w${workerId}] processing ${filePath}`);\n await parquetToCsvOneFile({\n filePath,\n outputDir,\n clearOutputDir,\n onProgress: (processed, total) =>\n process.send?.({\n type: 'progress',\n payload: { filePath, processed, total },\n }),\n });\n\n process.send?.({\n type: 'result',\n payload: { ok: true, filePath },\n });\n } catch (err) {\n const message = extractErrorMessage(err);\n logger.error(`[w${workerId}] ERROR ${filePath}: ${err.stack || message}`);\n process.send?.({\n type: 'result',\n payload: { ok: false, filePath, error: message },\n });\n }\n });\n\n // keep alive until shutdown\n await new Promise<never>(() => {\n // Do nothing\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.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 _chunkOPHHRNLHcjs.zf.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-BSODHREX.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.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 _chunkNBXAOUWCcjs.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-Y3WZAMYW.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-BSODHREX.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-BSODHREX.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-Y3WZAMYW.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-Y3WZAMYW.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}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkLSZQ3OFGcjs = require('./chunk-LSZQ3OFG.cjs');require('./chunk-AD5RNQ4J.cjs');require('./chunk-ECGHWDVP.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkTHCW2SNWcjs = require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _child_process = require('child_process');var d='A repository name must be provided. You can specify using --repositoryName=$REPO_NAME or by ensuring the command "git config --get remote.origin.url" returns the name of the repository';async function A({auth:f,scanPath:r,ignoreDirs:u,repositoryName:h,transcendUrl:y}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let e=h;if(!e)try{let o=_child_process.execSync.call(void 0, `cd ${r} && git config --get remote.origin.url`).toString("utf-8").trim();[e]=o.includes("https:")?o.split("/").slice(3).join("/").split("."):(o.split(":").pop()||"").split("."),e||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(d)),this.process.exit(1))}catch(a){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${d} - Got error: ${a.message}`)),this.process.exit(1)}let x=_chunkOPHHRNLHcjs.wc.call(void 0, y,f),n=await _chunkLSZQ3OFGcjs.b.call(void 0, {scanPath:r,ignoreDirs:u,repositoryName:e});await _chunkOPHHRNLHcjs.Me.call(void 0, x,n);let s=new URL(_chunkTHCW2SNWcjs.o);s.pathname="/code-scanning/code-packages",_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Scan found ${n.length} packages at ${r}! View results at '${s.href}'`))}exports.scanPackages = A;
2
- //# sourceMappingURL=impl-6ZJOSWUH.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk57L3G2BHcjs = require('./chunk-57L3G2BH.cjs');require('./chunk-GDNSAJQN.cjs');require('./chunk-LU3DKRNK.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkF7QE6D3Tcjs = require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _child_process = require('child_process');var d='A repository name must be provided. You can specify using --repositoryName=$REPO_NAME or by ensuring the command "git config --get remote.origin.url" returns the name of the repository';async function A({auth:f,scanPath:r,ignoreDirs:u,repositoryName:h,transcendUrl:y}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let e=h;if(!e)try{let o=_child_process.execSync.call(void 0, `cd ${r} && git config --get remote.origin.url`).toString("utf-8").trim();[e]=o.includes("https:")?o.split("/").slice(3).join("/").split("."):(o.split(":").pop()||"").split("."),e||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(d)),this.process.exit(1))}catch(a){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${d} - Got error: ${a.message}`)),this.process.exit(1)}let x=_chunkNBXAOUWCcjs.xc.call(void 0, y,f),n=await _chunk57L3G2BHcjs.b.call(void 0, {scanPath:r,ignoreDirs:u,repositoryName:e});await _chunkNBXAOUWCcjs.Oe.call(void 0, x,n);let s=new URL(_chunkF7QE6D3Tcjs.o);s.pathname="/code-scanning/code-packages",_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Scan found ${n.length} packages at ${r}! View results at '${s.href}'`))}exports.scanPackages = A;
2
+ //# sourceMappingURL=impl-Z4GNVM3V.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-6ZJOSWUH.cjs","../src/commands/inventory/scan-packages/impl.ts"],"names":["REPO_ERROR","scanPackages","auth","scanPath","ignoreDirs","repositoryName","transcendUrl","doneInputValidation","gitRepositoryName","url","execSync","logger","colors","err"],"mappings":"AAAA,iOAAwC,gCAA6B,gCAA6B,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCEtT,8CAOM,IAGnBA,CAAAA,CACJ,0LAAA,CAYF,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAIC,CAAAA,CAAoBH,CAAAA,CACxB,EAAA,CAAI,CAACG,CAAAA,CACH,GAAI,CAKF,IAAMC,CAAAA,CAJOC,qCAAAA,CACX,GAAA,EAAMP,CAAQ,CAAA,sCAAA,CAChB,CAAA,CAEiB,QAAA,CAAS,OAAO,CAAA,CAAE,IAAA,CAAK,CAAA,CACxC,CAACK,CAAiB,CAAA,CAAKC,CAAAA,CAAI,QAAA,CAAS,QAAQ,CAAA,CAExCA,CAAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAAE,KAAA,CAAM,CAAC,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA,CAAE,KAAA,CAAM,GAAG,CAAA,CAAA,CAD1CA,CAAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAAE,GAAA,CAAI,CAAA,EAAK,EAAA,CAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAErCD,CAAAA,EAAAA,CACHG,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAIZ,CAAU,CAAC,CAAA,CACnC,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAEvB,CAAA,KAAA,CAASa,CAAAA,CAAK,CACZF,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-6ZJOSWUH.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { ADMIN_DASH } from '../../../constants';\nimport { findCodePackagesInFolder } from '../../../lib/code-scanning';\nimport {\n buildTranscendGraphQLClient,\n syncCodePackages,\n} from '../../../lib/graphql';\nimport { execSync } from 'child_process';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nconst REPO_ERROR =\n 'A repository name must be provided. ' +\n 'You can specify using --repositoryName=$REPO_NAME or by ensuring the ' +\n 'command \"git config --get remote.origin.url\" returns the name of the repository';\n\nexport interface ScanPackagesCommandFlags {\n auth: string;\n scanPath: string;\n ignoreDirs?: string[];\n repositoryName?: string;\n transcendUrl: string;\n}\n\nexport async function scanPackages(\n this: LocalContext,\n {\n auth,\n scanPath,\n ignoreDirs,\n repositoryName,\n transcendUrl,\n }: ScanPackagesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Ensure repository name is specified\n let gitRepositoryName = repositoryName;\n if (!gitRepositoryName) {\n try {\n const name = execSync(\n `cd ${scanPath} && git config --get remote.origin.url`,\n );\n // Trim and parse the URL\n const url = name.toString('utf-8').trim();\n [gitRepositoryName] = !url.includes('https:')\n ? (url.split(':').pop() || '').split('.')\n : url.split('/').slice(3).join('/').split('.');\n if (!gitRepositoryName) {\n logger.error(colors.red(REPO_ERROR));\n this.process.exit(1);\n }\n } catch (err) {\n logger.error(colors.red(`${REPO_ERROR} - Got error: ${err.message}`));\n this.process.exit(1);\n }\n }\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Scan the codebase to discovery packages\n const results = await findCodePackagesInFolder({\n scanPath,\n ignoreDirs,\n repositoryName: gitRepositoryName,\n });\n\n // Report scan to Transcend\n await syncCodePackages(client, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/code-scanning/code-packages';\n\n // Indicate success\n logger.info(\n colors.green(\n `Scan found ${results.length} packages at ${scanPath}! ` +\n `View results at '${newUrl.href}'`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-Z4GNVM3V.cjs","../src/commands/inventory/scan-packages/impl.ts"],"names":["REPO_ERROR","scanPackages","auth","scanPath","ignoreDirs","repositoryName","transcendUrl","doneInputValidation","gitRepositoryName","url","execSync","logger","colors","err"],"mappings":"AAAA,iOAAwC,gCAA6B,gCAA6B,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCEtT,8CAOM,IAGnBA,CAAAA,CACJ,0LAAA,CAYF,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAIC,CAAAA,CAAoBH,CAAAA,CACxB,EAAA,CAAI,CAACG,CAAAA,CACH,GAAI,CAKF,IAAMC,CAAAA,CAJOC,qCAAAA,CACX,GAAA,EAAMP,CAAQ,CAAA,sCAAA,CAChB,CAAA,CAEiB,QAAA,CAAS,OAAO,CAAA,CAAE,IAAA,CAAK,CAAA,CACxC,CAACK,CAAiB,CAAA,CAAKC,CAAAA,CAAI,QAAA,CAAS,QAAQ,CAAA,CAExCA,CAAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAAE,KAAA,CAAM,CAAC,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA,CAAE,KAAA,CAAM,GAAG,CAAA,CAAA,CAD1CA,CAAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAAE,GAAA,CAAI,CAAA,EAAK,EAAA,CAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAErCD,CAAAA,EAAAA,CACHG,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAIZ,CAAU,CAAC,CAAA,CACnC,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAEvB,CAAA,KAAA,CAASa,CAAAA,CAAK,CACZF,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-Z4GNVM3V.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { ADMIN_DASH } from '../../../constants';\nimport { findCodePackagesInFolder } from '../../../lib/code-scanning';\nimport {\n buildTranscendGraphQLClient,\n syncCodePackages,\n} from '../../../lib/graphql';\nimport { execSync } from 'child_process';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nconst REPO_ERROR =\n 'A repository name must be provided. ' +\n 'You can specify using --repositoryName=$REPO_NAME or by ensuring the ' +\n 'command \"git config --get remote.origin.url\" returns the name of the repository';\n\nexport interface ScanPackagesCommandFlags {\n auth: string;\n scanPath: string;\n ignoreDirs?: string[];\n repositoryName?: string;\n transcendUrl: string;\n}\n\nexport async function scanPackages(\n this: LocalContext,\n {\n auth,\n scanPath,\n ignoreDirs,\n repositoryName,\n transcendUrl,\n }: ScanPackagesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Ensure repository name is specified\n let gitRepositoryName = repositoryName;\n if (!gitRepositoryName) {\n try {\n const name = execSync(\n `cd ${scanPath} && git config --get remote.origin.url`,\n );\n // Trim and parse the URL\n const url = name.toString('utf-8').trim();\n [gitRepositoryName] = !url.includes('https:')\n ? (url.split(':').pop() || '').split('.')\n : url.split('/').slice(3).join('/').split('.');\n if (!gitRepositoryName) {\n logger.error(colors.red(REPO_ERROR));\n this.process.exit(1);\n }\n } catch (err) {\n logger.error(colors.red(`${REPO_ERROR} - Got error: ${err.message}`));\n this.process.exit(1);\n }\n }\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Scan the codebase to discovery packages\n const results = await findCodePackagesInFolder({\n scanPath,\n ignoreDirs,\n repositoryName: gitRepositoryName,\n });\n\n // Report scan to Transcend\n await syncCodePackages(client, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/code-scanning/code-packages';\n\n // Indicate success\n logger.info(\n colors.green(\n `Scan found ${results.length} packages at ${scanPath}! ` +\n `View results at '${newUrl.href}'`,\n ),\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBO6JY2EMcjs = require('./chunk-BO6JY2EM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');async function u({auth:r,transcendUrl:i,file:e,enricherId:o,concurrency:s,markSilent:a,sombraAuth:m}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkBO6JY2EMcjs.d.call(void 0, {file:e,transcendUrl:i,enricherId:o,concurrency:s,markSilent:a,auth:r,sombraAuth:m})}exports.pushIdentifiers = u;
2
+ //# sourceMappingURL=impl-ZMX57RSP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-U4GMJYRH.cjs","../src/commands/request/preflight/push-identifiers/impl.ts"],"names":["pushIdentifiers","auth","transcendUrl","file","enricherId","concurrency","markSilent","sombraAuth","doneInputValidation","pushManualEnrichmentIdentifiersFromCsv"],"mappings":"AAAA,iIAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCclO,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAN,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAL,CAAAA,CACA,UAAA,CAAAM,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-U4GMJYRH.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pushManualEnrichmentIdentifiersFromCsv } from '../../../../lib/manual-enrichment';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PushIdentifiersCommandFlags {\n auth: string;\n enricherId: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n markSilent: boolean;\n concurrency: number;\n}\n\nexport async function pushIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n enricherId,\n concurrency,\n markSilent,\n sombraAuth,\n }: PushIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pushManualEnrichmentIdentifiersFromCsv({\n file,\n transcendUrl,\n enricherId,\n concurrency,\n markSilent,\n auth,\n sombraAuth,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-ZMX57RSP.cjs","../src/commands/request/preflight/push-identifiers/impl.ts"],"names":["pushIdentifiers","auth","transcendUrl","file","enricherId","concurrency","markSilent","sombraAuth","doneInputValidation","pushManualEnrichmentIdentifiersFromCsv"],"mappings":"AAAA,iIAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCclO,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAN,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAL,CAAAA,CACA,UAAA,CAAAM,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-ZMX57RSP.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pushManualEnrichmentIdentifiersFromCsv } from '../../../../lib/manual-enrichment';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PushIdentifiersCommandFlags {\n auth: string;\n enricherId: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n markSilent: boolean;\n concurrency: number;\n}\n\nexport async function pushIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n enricherId,\n concurrency,\n markSilent,\n sombraAuth,\n }: PushIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pushManualEnrichmentIdentifiersFromCsv({\n file,\n transcendUrl,\n enricherId,\n concurrency,\n markSilent,\n auth,\n sombraAuth,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkGMTBHFZVcjs = require('./chunk-GMTBHFZV.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-THCW2SNW.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _path = require('path');var _fs = require('fs');function H(r,e){r||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A --directory must be provided.")),e.process.exit(1));let n=[];try{n=_fs.readdirSync.call(void 0, r).filter(s=>s.endsWith(".csv")).map(s=>_path.join.call(void 0, r,s)).filter(s=>{try{return _fs.statSync.call(void 0, s).isFile()}catch (e2){return!1}})}catch(i){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${r}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(i.message)),e.process.exit(1)}return n.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No CSV files found in directory: ${r}`)),e.process.exit(1)),n}var _promises = require('fs/promises');var _promises3 = require('stream/promises');var _stream = require('stream');var _events = require('events');var _csvparse = require('csv-parse');var _fastcsv = require('fast-csv'); var K = _interopRequireWildcard(_fastcsv);function M(r,e){let n=_fs.createWriteStream.call(void 0, r),i=K.format({headers:e,writeHeaders:!0,objectMode:!0});return i.pipe(n),{async write(s){i.write(s)||await _events.once.call(void 0, i,"drain")},async end(){let s=Promise.all([_events.once.call(void 0, n,"finish")]);i.end(),await s}}}function me(r){return String(r).padStart(4,"0")}function fe(r){return Buffer.byteLength(Object.values(r).map(e=>e==null?"":String(e)).join(","),"utf8")}async function N(r){let{filePath:e,outputDir:n,clearOutputDir:i,chunkSizeMB:s,onProgress:f,reportEveryMs:g=500}=r,{size:l}=await _promises.stat.call(void 0, e),u=0;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Chunking ${e} into ~${s}MB files...`));let y=Math.floor(s*1024*1024),C=_path.basename.call(void 0, e,".csv"),d=n||_path.dirname.call(void 0, e);if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Output directory: ${d}`)),await _promises.mkdir.call(void 0, d,{recursive:!0}),i){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Clearing output directory: ${d}`));let a=await _promises.readdir.call(void 0, d);await Promise.all(a.filter(m=>m.startsWith(`${C}_chunk_`)&&m.endsWith(".csv")).map(m=>_promises.unlink.call(void 0, _path.join.call(void 0, d,m))))}let t=null,h=null,c=0,w=1,P=0,G=new (0, _csvparse.Parser)({columns:!1,skip_empty_lines:!0}),O=0,b=0,S=()=>{let a=b>0?O/b:0,m=a>0?Math.max(c,Math.ceil(l/a)):void 0;f(c,m),u=Date.now()};S();let p=null,$=()=>_path.join.call(void 0, d,`${C}_chunk_${me(w)}.csv`),U=new (0, _stream.Transform)({objectMode:!0,async transform(a,m,T){try{if(!t){t=a.slice(0),h=t.length,p=M($(),t),T();return}h!==null&&a.length!==h&&_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Row has ${a.length} cols; expected ${h}`)),c+=1,c%25e4===0&&f(c);let v=Object.fromEntries(t.map((Q,X)=>[Q,a[X]])),D=fe(v);O+=D,b+=1,Date.now()-u>=g&&S(),p&&P>0&&P+D>y&&(await p.end(),w+=1,P=0,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Rolling to chunk ${w} after ${c.toLocaleString()} rows.`)),p=M($(),t)),p||(p=M($(),t)),await p.write(v),P+=D,T()}catch(v){T(v)}},async flush(a){try{p&&(await p.end(),p=null),S(),a()}catch(m){a(m)}}}),J=_fs.createReadStream.call(void 0, e);await _promises3.pipeline.call(void 0, J,G,U),f(c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunked ${e} into ${w} file(s); processed ${c.toLocaleString()} rows.`))}async function A(){let r=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${r}] ready pid=${process.pid}`),_optionalChain([process, 'access', _2 => _2.send, 'optionalCall', _3 => _3({type:"ready"})]),process.on("message",async e=>{if(!e||typeof e!="object"||(e.type==="shutdown"&&process.exit(0),e.type!=="task"))return;let{filePath:n,options:i}=e.payload,{outputDir:s,clearOutputDir:f,chunkSizeMB:g}=i;try{await N({filePath:n,outputDir:s,clearOutputDir:f,chunkSizeMB:g,onProgress:(l,u)=>_optionalChain([process, 'access', _4 => _4.send, 'optionalCall', _5 => _5({type:"progress",payload:{filePath:n,processed:l,total:u}})])}),_optionalChain([process, 'access', _6 => _6.send, 'optionalCall', _7 => _7({type:"result",payload:{ok:!0,filePath:n}})])}catch(l){let u=_chunkOPHHRNLHcjs.Wf.call(void 0, l);_chunkZUNVPK23cjs.a.error(`[w${r}] ERROR ${n}: ${u}`),_optionalChain([process, 'access', _8 => _8.send, 'optionalCall', _9 => _9({type:"result",payload:{ok:!1,filePath:n,error:u}})])}}),await new Promise(()=>{})}function de(r){return _chunkGMTBHFZVcjs.d.call(void 0, r)}function he(r){return _chunkGMTBHFZVcjs.e.call(void 0, r)}var q={renderHeader:de,renderWorkers:he};function ke(){return typeof __filename<"u"?__filename:process.argv[1]}async function Ue(r){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{directory:e,outputDir:n,clearOutputDir:i,chunkSizeMB:s,concurrency:f,viewerMode:g}=r,l=H(e,this),{poolSize:u,cpuCount:y}=_chunkGMTBHFZVcjs.a.call(void 0, f,l.length);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunking ${l.length} CSV file(s) with pool size ${u} (CPU=${y})`));let C=l.map(t=>({filePath:t,options:{outputDir:n,clearOutputDir:i,chunkSizeMB:s}})),d={nextTask:()=>C.shift(),taskLabel:t=>t.filePath,initTotals:()=>({}),initSlotProgress:()=>{},onProgress:t=>t,onResult:(t,h)=>({totals:t,ok:!!h.ok}),postProcess:async()=>{}};await _chunkGMTBHFZVcjs.f.call(void 0, {title:`Chunk CSV - ${e}`,baseDir:e||n||process.cwd(),childFlag:_chunkGMTBHFZVcjs.b,childModulePath:ke(),poolSize:u,cpuCount:y,filesTotal:l.length,hooks:d,viewerMode:g,render:t=>_chunkGMTBHFZVcjs.c.call(void 0, t,q,g),extraKeyHandler:({logsBySlot:t,repaint:h,setPaused:c})=>_chunkGMTBHFZVcjs.g.call(void 0, {logsBySlot:t,repaint:h,setPaused:c})})}process.argv.includes(_chunkGMTBHFZVcjs.b)&&A().catch(r=>{_chunkZUNVPK23cjs.a.error(r),process.exit(1)});exports.chunkCsv = Ue;
2
- //# sourceMappingURL=impl-YOB7AAQJ.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 _chunk2CAMTEJYcjs = require('./chunk-2CAMTEJY.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkNBXAOUWCcjs = require('./chunk-NBXAOUWC.cjs');require('./chunk-FHUHBSLE.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-F7QE6D3T.cjs');require('./chunk-T3BBQIRY.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _path = require('path');var _fs = require('fs');function H(r,e){r||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A --directory must be provided.")),e.process.exit(1));let n=[];try{n=_fs.readdirSync.call(void 0, r).filter(s=>s.endsWith(".csv")).map(s=>_path.join.call(void 0, r,s)).filter(s=>{try{return _fs.statSync.call(void 0, s).isFile()}catch (e2){return!1}})}catch(i){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${r}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(i.message)),e.process.exit(1)}return n.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No CSV files found in directory: ${r}`)),e.process.exit(1)),n}var _promises = require('fs/promises');var _promises3 = require('stream/promises');var _stream = require('stream');var _events = require('events');var _csvparse = require('csv-parse');var _fastcsv = require('fast-csv'); var K = _interopRequireWildcard(_fastcsv);function M(r,e){let n=_fs.createWriteStream.call(void 0, r),i=K.format({headers:e,writeHeaders:!0,objectMode:!0});return i.pipe(n),{async write(s){i.write(s)||await _events.once.call(void 0, i,"drain")},async end(){let s=Promise.all([_events.once.call(void 0, n,"finish")]);i.end(),await s}}}function me(r){return String(r).padStart(4,"0")}function fe(r){return Buffer.byteLength(Object.values(r).map(e=>e==null?"":String(e)).join(","),"utf8")}async function N(r){let{filePath:e,outputDir:n,clearOutputDir:i,chunkSizeMB:s,onProgress:f,reportEveryMs:g=500}=r,{size:l}=await _promises.stat.call(void 0, e),u=0;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Chunking ${e} into ~${s}MB files...`));let y=Math.floor(s*1024*1024),C=_path.basename.call(void 0, e,".csv"),d=n||_path.dirname.call(void 0, e);if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Output directory: ${d}`)),await _promises.mkdir.call(void 0, d,{recursive:!0}),i){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Clearing output directory: ${d}`));let a=await _promises.readdir.call(void 0, d);await Promise.all(a.filter(m=>m.startsWith(`${C}_chunk_`)&&m.endsWith(".csv")).map(m=>_promises.unlink.call(void 0, _path.join.call(void 0, d,m))))}let t=null,h=null,c=0,w=1,P=0,G=new (0, _csvparse.Parser)({columns:!1,skip_empty_lines:!0}),O=0,b=0,S=()=>{let a=b>0?O/b:0,m=a>0?Math.max(c,Math.ceil(l/a)):void 0;f(c,m),u=Date.now()};S();let p=null,$=()=>_path.join.call(void 0, d,`${C}_chunk_${me(w)}.csv`),U=new (0, _stream.Transform)({objectMode:!0,async transform(a,m,T){try{if(!t){t=a.slice(0),h=t.length,p=M($(),t),T();return}h!==null&&a.length!==h&&_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Row has ${a.length} cols; expected ${h}`)),c+=1,c%25e4===0&&f(c);let v=Object.fromEntries(t.map((Q,X)=>[Q,a[X]])),D=fe(v);O+=D,b+=1,Date.now()-u>=g&&S(),p&&P>0&&P+D>y&&(await p.end(),w+=1,P=0,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Rolling to chunk ${w} after ${c.toLocaleString()} rows.`)),p=M($(),t)),p||(p=M($(),t)),await p.write(v),P+=D,T()}catch(v){T(v)}},async flush(a){try{p&&(await p.end(),p=null),S(),a()}catch(m){a(m)}}}),J=_fs.createReadStream.call(void 0, e);await _promises3.pipeline.call(void 0, J,G,U),f(c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunked ${e} into ${w} file(s); processed ${c.toLocaleString()} rows.`))}async function A(){let r=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${r}] ready pid=${process.pid}`),_optionalChain([process, 'access', _2 => _2.send, 'optionalCall', _3 => _3({type:"ready"})]),process.on("message",async e=>{if(!e||typeof e!="object"||(e.type==="shutdown"&&process.exit(0),e.type!=="task"))return;let{filePath:n,options:i}=e.payload,{outputDir:s,clearOutputDir:f,chunkSizeMB:g}=i;try{await N({filePath:n,outputDir:s,clearOutputDir:f,chunkSizeMB:g,onProgress:(l,u)=>_optionalChain([process, 'access', _4 => _4.send, 'optionalCall', _5 => _5({type:"progress",payload:{filePath:n,processed:l,total:u}})])}),_optionalChain([process, 'access', _6 => _6.send, 'optionalCall', _7 => _7({type:"result",payload:{ok:!0,filePath:n}})])}catch(l){let u=_chunkNBXAOUWCcjs.Yf.call(void 0, l);_chunkZUNVPK23cjs.a.error(`[w${r}] ERROR ${n}: ${u}`),_optionalChain([process, 'access', _8 => _8.send, 'optionalCall', _9 => _9({type:"result",payload:{ok:!1,filePath:n,error:u}})])}}),await new Promise(()=>{})}function de(r){return _chunk2CAMTEJYcjs.d.call(void 0, r)}function he(r){return _chunk2CAMTEJYcjs.e.call(void 0, r)}var q={renderHeader:de,renderWorkers:he};function ke(){return typeof __filename<"u"?__filename:process.argv[1]}async function Ue(r){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{directory:e,outputDir:n,clearOutputDir:i,chunkSizeMB:s,concurrency:f,viewerMode:g}=r,l=H(e,this),{poolSize:u,cpuCount:y}=_chunk2CAMTEJYcjs.a.call(void 0, f,l.length);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunking ${l.length} CSV file(s) with pool size ${u} (CPU=${y})`));let C=l.map(t=>({filePath:t,options:{outputDir:n,clearOutputDir:i,chunkSizeMB:s}})),d={nextTask:()=>C.shift(),taskLabel:t=>t.filePath,initTotals:()=>({}),initSlotProgress:()=>{},onProgress:t=>t,onResult:(t,h)=>({totals:t,ok:!!h.ok}),postProcess:async()=>{}};await _chunk2CAMTEJYcjs.f.call(void 0, {title:`Chunk CSV - ${e}`,baseDir:e||n||process.cwd(),childFlag:_chunk2CAMTEJYcjs.b,childModulePath:ke(),poolSize:u,cpuCount:y,filesTotal:l.length,hooks:d,viewerMode:g,render:t=>_chunk2CAMTEJYcjs.c.call(void 0, t,q,g),extraKeyHandler:({logsBySlot:t,repaint:h,setPaused:c})=>_chunk2CAMTEJYcjs.g.call(void 0, {logsBySlot:t,repaint:h,setPaused:c})})}process.argv.includes(_chunk2CAMTEJYcjs.b)&&A().catch(r=>{_chunkZUNVPK23cjs.a.error(r),process.exit(1)});exports.chunkCsv = Ue;
2
+ //# sourceMappingURL=impl-ZSNYO6VH.cjs.map