@transcend-io/cli 8.1.0 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +70 -35
  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-YCB6J5EJ.cjs → chunk-6CS4GCJ4.cjs} +2 -2
  6. package/dist/{chunk-YCB6J5EJ.cjs.map → chunk-6CS4GCJ4.cjs.map} +1 -1
  7. package/dist/{chunk-4B22XVLO.cjs → chunk-BICC2LJL.cjs} +3 -3
  8. package/dist/{chunk-4B22XVLO.cjs.map → chunk-BICC2LJL.cjs.map} +1 -1
  9. package/dist/{chunk-2STE3YIZ.cjs → chunk-DVJLLHL3.cjs} +2 -2
  10. package/dist/{chunk-2STE3YIZ.cjs.map → chunk-DVJLLHL3.cjs.map} +1 -1
  11. package/dist/{chunk-AMP7MT7M.cjs → chunk-HI7ACKKB.cjs} +2 -2
  12. package/dist/{chunk-AMP7MT7M.cjs.map → chunk-HI7ACKKB.cjs.map} +1 -1
  13. package/dist/{chunk-MKLPDKJQ.cjs → chunk-IFAKI5FF.cjs} +2 -2
  14. package/dist/{chunk-MKLPDKJQ.cjs.map → chunk-IFAKI5FF.cjs.map} +1 -1
  15. package/dist/{chunk-GRBF73LS.cjs → chunk-MGAJ7ILD.cjs} +2 -2
  16. package/dist/{chunk-GRBF73LS.cjs.map → chunk-MGAJ7ILD.cjs.map} +1 -1
  17. package/dist/{chunk-FM3LX7FQ.cjs → chunk-MRXBJEKL.cjs} +20 -20
  18. package/dist/{chunk-FM3LX7FQ.cjs.map → chunk-MRXBJEKL.cjs.map} +1 -1
  19. package/dist/{chunk-QRBSG22E.cjs → chunk-NC5QVXJW.cjs} +2 -2
  20. package/dist/{chunk-QRBSG22E.cjs.map → chunk-NC5QVXJW.cjs.map} +1 -1
  21. package/dist/{chunk-ZVE6Y6D3.cjs → chunk-QPIUQDJ6.cjs} +4 -4
  22. package/dist/{chunk-ZVE6Y6D3.cjs.map → chunk-QPIUQDJ6.cjs.map} +1 -1
  23. package/dist/{chunk-MRJ2BRU4.cjs → chunk-QRDYTLVB.cjs} +2 -2
  24. package/dist/{chunk-MRJ2BRU4.cjs.map → chunk-QRDYTLVB.cjs.map} +1 -1
  25. package/dist/{chunk-63GGJ2XI.cjs → chunk-W6BLSHVE.cjs} +4 -4
  26. package/dist/{chunk-63GGJ2XI.cjs.map → chunk-W6BLSHVE.cjs.map} +1 -1
  27. package/dist/{chunk-PVQIV735.cjs → chunk-XKYSQSRO.cjs} +2 -2
  28. package/dist/{chunk-PVQIV735.cjs.map → chunk-XKYSQSRO.cjs.map} +1 -1
  29. package/dist/{impl-XZOJGVZ7.cjs → impl-4VPFFGGS.cjs} +2 -2
  30. package/dist/{impl-XZOJGVZ7.cjs.map → impl-4VPFFGGS.cjs.map} +1 -1
  31. package/dist/{impl-7SHEZUAI.cjs → impl-5H6DFFAS.cjs} +2 -2
  32. package/dist/{impl-7SHEZUAI.cjs.map → impl-5H6DFFAS.cjs.map} +1 -1
  33. package/dist/{impl-BCEZUJCK.cjs → impl-6JRE252A.cjs} +2 -2
  34. package/dist/{impl-BCEZUJCK.cjs.map → impl-6JRE252A.cjs.map} +1 -1
  35. package/dist/{impl-BJU7SNUT.cjs → impl-7RJYKTCZ.cjs} +6 -6
  36. package/dist/{impl-BJU7SNUT.cjs.map → impl-7RJYKTCZ.cjs.map} +1 -1
  37. package/dist/{impl-AOB56N6K.cjs → impl-BKEVLUMO.cjs} +2 -2
  38. package/dist/{impl-AOB56N6K.cjs.map → impl-BKEVLUMO.cjs.map} +1 -1
  39. package/dist/{impl-MZWGXBZH.cjs → impl-BRUSOMXU.cjs} +2 -2
  40. package/dist/{impl-MZWGXBZH.cjs.map → impl-BRUSOMXU.cjs.map} +1 -1
  41. package/dist/{impl-ZH4AWDRT.cjs → impl-BUQ2V3WM.cjs} +2 -2
  42. package/dist/{impl-ZH4AWDRT.cjs.map → impl-BUQ2V3WM.cjs.map} +1 -1
  43. package/dist/{impl-QF3LYRIM.cjs → impl-C7DRIULL.cjs} +2 -2
  44. package/dist/{impl-QF3LYRIM.cjs.map → impl-C7DRIULL.cjs.map} +1 -1
  45. package/dist/{impl-Y7C42SDM.cjs → impl-CK5QRU26.cjs} +2 -2
  46. package/dist/{impl-Y7C42SDM.cjs.map → impl-CK5QRU26.cjs.map} +1 -1
  47. package/dist/{impl-KGA7YWGV.cjs → impl-DDOPMEH6.cjs} +5 -5
  48. package/dist/{impl-KGA7YWGV.cjs.map → impl-DDOPMEH6.cjs.map} +1 -1
  49. package/dist/{impl-U6S7JMJK.cjs → impl-DYGW2VXN.cjs} +2 -2
  50. package/dist/{impl-U6S7JMJK.cjs.map → impl-DYGW2VXN.cjs.map} +1 -1
  51. package/dist/{impl-76NYSLL3.cjs → impl-ED76NZLR.cjs} +3 -3
  52. package/dist/{impl-76NYSLL3.cjs.map → impl-ED76NZLR.cjs.map} +1 -1
  53. package/dist/{impl-DZDGMNPH.cjs → impl-EL3GY7PX.cjs} +2 -2
  54. package/dist/{impl-DZDGMNPH.cjs.map → impl-EL3GY7PX.cjs.map} +1 -1
  55. package/dist/{impl-ITID6Y4N.cjs → impl-FRDPRLKI.cjs} +2 -2
  56. package/dist/{impl-ITID6Y4N.cjs.map → impl-FRDPRLKI.cjs.map} +1 -1
  57. package/dist/{impl-4VTKQJRY.cjs → impl-GDONPQQ6.cjs} +2 -2
  58. package/dist/{impl-4VTKQJRY.cjs.map → impl-GDONPQQ6.cjs.map} +1 -1
  59. package/dist/{impl-K4D7ATKB.cjs → impl-I3QZ2ZHY.cjs} +2 -2
  60. package/dist/{impl-K4D7ATKB.cjs.map → impl-I3QZ2ZHY.cjs.map} +1 -1
  61. package/dist/{impl-RTPMOLO6.cjs → impl-LBJYOQEP.cjs} +2 -2
  62. package/dist/{impl-RTPMOLO6.cjs.map → impl-LBJYOQEP.cjs.map} +1 -1
  63. package/dist/{impl-IHKKGU4K.cjs → impl-LNF5A3IV.cjs} +2 -2
  64. package/dist/{impl-IHKKGU4K.cjs.map → impl-LNF5A3IV.cjs.map} +1 -1
  65. package/dist/{impl-2QMFSSRH.cjs → impl-LV5VZGGG.cjs} +2 -2
  66. package/dist/{impl-2QMFSSRH.cjs.map → impl-LV5VZGGG.cjs.map} +1 -1
  67. package/dist/{impl-K2ZOFSCD.cjs → impl-MT4XWK25.cjs} +2 -2
  68. package/dist/{impl-K2ZOFSCD.cjs.map → impl-MT4XWK25.cjs.map} +1 -1
  69. package/dist/{impl-UKSTSUL7.cjs → impl-NOS3MDB5.cjs} +2 -2
  70. package/dist/{impl-UKSTSUL7.cjs.map → impl-NOS3MDB5.cjs.map} +1 -1
  71. package/dist/{impl-PFVHMRSW.cjs → impl-O6ZZ6G7V.cjs} +2 -2
  72. package/dist/{impl-PFVHMRSW.cjs.map → impl-O6ZZ6G7V.cjs.map} +1 -1
  73. package/dist/{impl-AKBOHO2I.cjs → impl-OXVQMF3C.cjs} +2 -2
  74. package/dist/{impl-AKBOHO2I.cjs.map → impl-OXVQMF3C.cjs.map} +1 -1
  75. package/dist/{impl-YVMZ7QMB.cjs → impl-P3ZEQOP4.cjs} +2 -2
  76. package/dist/{impl-YVMZ7QMB.cjs.map → impl-P3ZEQOP4.cjs.map} +1 -1
  77. package/dist/{impl-C3ZNAX3B.cjs → impl-PE35IGX2.cjs} +2 -2
  78. package/dist/{impl-C3ZNAX3B.cjs.map → impl-PE35IGX2.cjs.map} +1 -1
  79. package/dist/{impl-47CZEYNP.cjs → impl-PKQQUVYK.cjs} +2 -2
  80. package/dist/{impl-47CZEYNP.cjs.map → impl-PKQQUVYK.cjs.map} +1 -1
  81. package/dist/{impl-T3BWUKPN.cjs → impl-QAMYNNJD.cjs} +2 -2
  82. package/dist/{impl-T3BWUKPN.cjs.map → impl-QAMYNNJD.cjs.map} +1 -1
  83. package/dist/{impl-WQDLUVZ6.cjs → impl-QPUYYCCD.cjs} +5 -5
  84. package/dist/{impl-WQDLUVZ6.cjs.map → impl-QPUYYCCD.cjs.map} +1 -1
  85. package/dist/{impl-ZA25XTRE.cjs → impl-SC7VG3C5.cjs} +2 -2
  86. package/dist/{impl-ZA25XTRE.cjs.map → impl-SC7VG3C5.cjs.map} +1 -1
  87. package/dist/{impl-6RBT5EJC.cjs → impl-SCX5AEQB.cjs} +2 -2
  88. package/dist/{impl-6RBT5EJC.cjs.map → impl-SCX5AEQB.cjs.map} +1 -1
  89. package/dist/{impl-KQET2XDP.cjs → impl-SWFUVUV6.cjs} +2 -2
  90. package/dist/{impl-KQET2XDP.cjs.map → impl-SWFUVUV6.cjs.map} +1 -1
  91. package/dist/{impl-IEDZ4YTQ.cjs → impl-TSGEOZLY.cjs} +2 -2
  92. package/dist/{impl-IEDZ4YTQ.cjs.map → impl-TSGEOZLY.cjs.map} +1 -1
  93. package/dist/{impl-SKFVDXWS.cjs → impl-US4VOSBF.cjs} +4 -4
  94. package/dist/{impl-SKFVDXWS.cjs.map → impl-US4VOSBF.cjs.map} +1 -1
  95. package/dist/{impl-GTZ6RYJB.cjs → impl-UZE2LR6H.cjs} +2 -2
  96. package/dist/{impl-GTZ6RYJB.cjs.map → impl-UZE2LR6H.cjs.map} +1 -1
  97. package/dist/impl-UZTSGARM.cjs +2 -0
  98. package/dist/{impl-LLM4EEIP.cjs.map → impl-UZTSGARM.cjs.map} +1 -1
  99. package/dist/{impl-NZIDPNPS.cjs → impl-WO3LVKNE.cjs} +2 -2
  100. package/dist/{impl-NZIDPNPS.cjs.map → impl-WO3LVKNE.cjs.map} +1 -1
  101. package/dist/{impl-FGUGKHTG.cjs → impl-WVAGHUZI.cjs} +3 -3
  102. package/dist/{impl-FGUGKHTG.cjs.map → impl-WVAGHUZI.cjs.map} +1 -1
  103. package/dist/{impl-G2TM3DQW.cjs → impl-X2FXS267.cjs} +2 -2
  104. package/dist/{impl-G2TM3DQW.cjs.map → impl-X2FXS267.cjs.map} +1 -1
  105. package/dist/{impl-GGV7EW55.cjs → impl-ZWNKU6OC.cjs} +2 -2
  106. package/dist/{impl-GGV7EW55.cjs.map → impl-ZWNKU6OC.cjs.map} +1 -1
  107. package/dist/index.cjs +3 -3
  108. package/dist/index.d.cts +1 -1
  109. package/package.json +1 -1
  110. package/dist/impl-LLM4EEIP.cjs +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-ITID6Y4N.cjs","../src/commands/consent/update-consent-manager/impl.ts"],"names":["updateConsentManager","auth","bundleTypes","ConsentBundleType","deploy","transcendUrl","doneInputValidation","apiKeyOrList","validateTranscendAuth","updateConsentManagerVersionToLatest","logger","colors","mapSeries","apiKey"],"mappings":"AAAA,iOAAmC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCCzT,2DACe,oCACR,MAc1B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,CAACC,+BAAAA,CAAkB,UAAA,CAAYA,+BAAAA,CAAkB,IAAI,CAAA,CACnE,MAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAe,MAAMC,iCAAAA,CAA0B,CAAA,CAGjD,OAAOD,CAAAA,EAAiB,QAAA,CAAA,CAE1B,MAAME,iCAAAA,CACJ,MAAA,CAAAL,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAME,CAAAA,CACN,WAAA,CAAAL,CACF,CAAC,CAAA,CACDQ,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,KAAA,CAAM,uCAAuC,CAAC,CAAA,CAAA,CAAA,CAEjE,MAAMC,iCAAAA,CAAUL,CAAc,MAAOM,CAAAA,EAAW,CAC9CH,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,2CAAA,EAA8CE,CAAAA,CAAO,gBAAgB,CAAA,IAAA,CACvE,CACF,CAAA,CAEA,MAAMJ,iCAAAA,CACJ,MAAA,CAAAL,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAMQ,CAAAA,CAAO,MAAA,CACb,WAAA,CAAAX,CACF,CAAC,CAAA,CAEDQ,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,uDAAA,EAA0DE,CAAAA,CAAO,gBAAgB,CAAA,EAAA,CACnF,CACF,CACF,CAAC,CAAA,CACDH,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,KAAA,CAAM,wCAAwC,CAAC,CAAA,CAEtE,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-ITID6Y4N.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { ConsentBundleType } from '@transcend-io/privacy-types';\nimport { mapSeries } from 'bluebird';\n\nimport { logger } from '../../../logger';\nimport { updateConsentManagerVersionToLatest } from '../../../lib/consent-manager';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UpdateConsentManagerCommandFlags {\n auth: string;\n bundleTypes: ConsentBundleType[];\n deploy: boolean;\n transcendUrl: string;\n}\n\nexport async function updateConsentManager(\n this: LocalContext,\n {\n auth,\n bundleTypes = [ConsentBundleType.Production, ConsentBundleType.Test],\n deploy,\n transcendUrl,\n }: UpdateConsentManagerCommandFlags,\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 // Handle single update\n if (typeof apiKeyOrList === 'string') {\n // Update consent manager\n await updateConsentManagerVersionToLatest({\n deploy,\n transcendUrl,\n auth: apiKeyOrList,\n bundleTypes,\n });\n logger.info(colors.green('Successfully updated Consent Manager!'));\n } else {\n await mapSeries(apiKeyOrList, async (apiKey) => {\n logger.info(\n colors.magenta(\n `Updating Consent Manager for organization \"${apiKey.organizationName}\"...`,\n ),\n );\n\n await updateConsentManagerVersionToLatest({\n deploy,\n transcendUrl,\n auth: apiKey.apiKey,\n bundleTypes,\n });\n\n logger.info(\n colors.green(\n `Successfully updated Consent Manager for organization \"${apiKey.organizationName}\"!`,\n ),\n );\n });\n logger.info(colors.green('Successfully updated Consent Managers!'));\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-FRDPRLKI.cjs","../src/commands/consent/update-consent-manager/impl.ts"],"names":["updateConsentManager","auth","bundleTypes","ConsentBundleType","deploy","transcendUrl","doneInputValidation","apiKeyOrList","validateTranscendAuth","updateConsentManagerVersionToLatest","logger","colors","mapSeries","apiKey"],"mappings":"AAAA,iOAAmC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCCzT,2DACe,oCACR,MAc1B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,CAACC,+BAAAA,CAAkB,UAAA,CAAYA,+BAAAA,CAAkB,IAAI,CAAA,CACnE,MAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAe,MAAMC,iCAAAA,CAA0B,CAAA,CAGjD,OAAOD,CAAAA,EAAiB,QAAA,CAAA,CAE1B,MAAME,iCAAAA,CACJ,MAAA,CAAAL,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAME,CAAAA,CACN,WAAA,CAAAL,CACF,CAAC,CAAA,CACDQ,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,KAAA,CAAM,uCAAuC,CAAC,CAAA,CAAA,CAAA,CAEjE,MAAMC,iCAAAA,CAAUL,CAAc,MAAOM,CAAAA,EAAW,CAC9CH,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,2CAAA,EAA8CE,CAAAA,CAAO,gBAAgB,CAAA,IAAA,CACvE,CACF,CAAA,CAEA,MAAMJ,iCAAAA,CACJ,MAAA,CAAAL,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAMQ,CAAAA,CAAO,MAAA,CACb,WAAA,CAAAX,CACF,CAAC,CAAA,CAEDQ,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,uDAAA,EAA0DE,CAAAA,CAAO,gBAAgB,CAAA,EAAA,CACnF,CACF,CACF,CAAC,CAAA,CACDH,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,KAAA,CAAM,wCAAwC,CAAC,CAAA,CAEtE,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-FRDPRLKI.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { ConsentBundleType } from '@transcend-io/privacy-types';\nimport { mapSeries } from 'bluebird';\n\nimport { logger } from '../../../logger';\nimport { updateConsentManagerVersionToLatest } from '../../../lib/consent-manager';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UpdateConsentManagerCommandFlags {\n auth: string;\n bundleTypes: ConsentBundleType[];\n deploy: boolean;\n transcendUrl: string;\n}\n\nexport async function updateConsentManager(\n this: LocalContext,\n {\n auth,\n bundleTypes = [ConsentBundleType.Production, ConsentBundleType.Test],\n deploy,\n transcendUrl,\n }: UpdateConsentManagerCommandFlags,\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 // Handle single update\n if (typeof apiKeyOrList === 'string') {\n // Update consent manager\n await updateConsentManagerVersionToLatest({\n deploy,\n transcendUrl,\n auth: apiKeyOrList,\n bundleTypes,\n });\n logger.info(colors.green('Successfully updated Consent Manager!'));\n } else {\n await mapSeries(apiKeyOrList, async (apiKey) => {\n logger.info(\n colors.magenta(\n `Updating Consent Manager for organization \"${apiKey.organizationName}\"...`,\n ),\n );\n\n await updateConsentManagerVersionToLatest({\n deploy,\n transcendUrl,\n auth: apiKey.apiKey,\n bundleTypes,\n });\n\n logger.info(\n colors.green(\n `Successfully updated Consent Manager for organization \"${apiKey.organizationName}\"!`,\n ),\n );\n });\n logger.info(colors.green('Successfully updated Consent Managers!'));\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 }; }var _chunkMRJ2BRU4cjs = require('./chunk-MRJ2BRU4.cjs');require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _iots = require('io-ts'); var t = _interopRequireWildcard(_iots);var c=t.type({"Request Id":t.string});async function q({auth:i,dataSiloId:m,file:o,transcendUrl:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let d=_chunkZVE6Y6D3cjs.qc.call(void 0, o,c);await _chunkMRJ2BRU4cjs.f.call(void 0, {requestIds:d.map(l=>l["Request Id"]),transcendUrl:n,auth:i,dataSiloId:m})}exports.markRequestDataSilosCompleted = q;
2
- //# sourceMappingURL=impl-4VTKQJRY.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 }; }var _chunkQRDYTLVBcjs = require('./chunk-QRDYTLVB.cjs');require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _iots = require('io-ts'); var t = _interopRequireWildcard(_iots);var c=t.type({"Request Id":t.string});async function q({auth:i,dataSiloId:m,file:o,transcendUrl:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let d=_chunkQPIUQDJ6cjs.qc.call(void 0, o,c);await _chunkQRDYTLVBcjs.f.call(void 0, {requestIds:d.map(l=>l["Request Id"]),transcendUrl:n,auth:i,dataSiloId:m})}exports.markRequestDataSilosCompleted = q;
2
+ //# sourceMappingURL=impl-GDONPQQ6.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-4VTKQJRY.cjs","../src/commands/request/system/mark-request-data-silos-completed/impl.ts"],"names":["RequestIdRow","markRequestDataSilosCompleted","auth","dataSiloId","file","transcendUrl","doneInputValidation","logger","colors","activeResults","readCsv","markRequestDataSiloIdsCompleted","request"],"mappings":"AAAA,mfAAwC,gCAA6B,wDAAyC,wDAA0C,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCCrQ,qEACA,IAObA,CAAAA,CAAiB,CAAA,CAAA,IAAA,CAAK,CAC1B,YAAA,CAAgB,CAAA,CAAA,MAClB,CAAC,CAAA,CASD,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErCC,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,SAAA,EAAYJ,CAAI,CAAA,WAAA,CAAa,CAAC,CAAA,CACzD,IAAMK,CAAAA,CAAgBC,kCAAAA,CAAQN,CAAMJ,CAAY,CAAA,CAEhD,MAAMW,iCAAAA,CACJ,UAAA,CAAYF,CAAAA,CAAc,GAAA,CAAKG,CAAAA,EAAYA,CAAAA,CAAQ,YAAY,CAAC,CAAA,CAChE,YAAA,CAAAP,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,0CAAA","file":"/home/runner/work/cli/cli/dist/impl-4VTKQJRY.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport colors from 'colors';\nimport * as t from 'io-ts';\n\nimport { logger } from '../../../../logger';\nimport { markRequestDataSiloIdsCompleted } from '../../../../lib/cron';\nimport { readCsv } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nconst RequestIdRow = t.type({\n 'Request Id': t.string,\n});\n\nexport interface MarkRequestDataSilosCompletedCommandFlags {\n auth: string;\n dataSiloId: string;\n file: string;\n transcendUrl: string;\n}\n\nexport async function markRequestDataSilosCompleted(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n file,\n transcendUrl,\n }: MarkRequestDataSilosCompletedCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, RequestIdRow);\n\n await markRequestDataSiloIdsCompleted({\n requestIds: activeResults.map((request) => request['Request Id']),\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-GDONPQQ6.cjs","../src/commands/request/system/mark-request-data-silos-completed/impl.ts"],"names":["RequestIdRow","markRequestDataSilosCompleted","auth","dataSiloId","file","transcendUrl","doneInputValidation","logger","colors","activeResults","readCsv","markRequestDataSiloIdsCompleted","request"],"mappings":"AAAA,mfAAwC,gCAA6B,wDAAyC,wDAA0C,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCCrQ,qEACA,IAObA,CAAAA,CAAiB,CAAA,CAAA,IAAA,CAAK,CAC1B,YAAA,CAAgB,CAAA,CAAA,MAClB,CAAC,CAAA,CASD,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErCC,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,SAAA,EAAYJ,CAAI,CAAA,WAAA,CAAa,CAAC,CAAA,CACzD,IAAMK,CAAAA,CAAgBC,kCAAAA,CAAQN,CAAMJ,CAAY,CAAA,CAEhD,MAAMW,iCAAAA,CACJ,UAAA,CAAYF,CAAAA,CAAc,GAAA,CAAKG,CAAAA,EAAYA,CAAAA,CAAQ,YAAY,CAAC,CAAA,CAChE,YAAA,CAAAP,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,0CAAA","file":"/home/runner/work/cli/cli/dist/impl-GDONPQQ6.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport colors from 'colors';\nimport * as t from 'io-ts';\n\nimport { logger } from '../../../../logger';\nimport { markRequestDataSiloIdsCompleted } from '../../../../lib/cron';\nimport { readCsv } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nconst RequestIdRow = t.type({\n 'Request Id': t.string,\n});\n\nexport interface MarkRequestDataSilosCompletedCommandFlags {\n auth: string;\n dataSiloId: string;\n file: string;\n transcendUrl: string;\n}\n\nexport async function markRequestDataSilosCompleted(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n file,\n transcendUrl,\n }: MarkRequestDataSilosCompletedCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, RequestIdRow);\n\n await markRequestDataSiloIdsCompleted({\n requestIds: activeResults.map((request) => request['Request Id']),\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 _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.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 _chunkZVE6Y6D3cjs.zf.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-K4D7ATKB.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.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 _chunkQPIUQDJ6cjs.zf.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-I3QZ2ZHY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-K4D7ATKB.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-K4D7ATKB.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-I3QZ2ZHY.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-I3QZ2ZHY.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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.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 _chunkZVE6Y6D3cjs.Ef.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-RTPMOLO6.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.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 _chunkQPIUQDJ6cjs.Ef.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-LBJYOQEP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-RTPMOLO6.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-RTPMOLO6.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-LBJYOQEP.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-LBJYOQEP.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 _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.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 _chunkZVE6Y6D3cjs.Jf.call(void 0, {transcendUrl:p,auth:s,status:o,dataSiloId:a,requestStatuses:i})}exports.skipRequestDataSilos = n;
2
- //# sourceMappingURL=impl-IHKKGU4K.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.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 _chunkQPIUQDJ6cjs.Jf.call(void 0, {transcendUrl:p,auth:s,status:o,dataSiloId:a,requestStatuses:i})}exports.skipRequestDataSilos = n;
2
+ //# sourceMappingURL=impl-LNF5A3IV.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-IHKKGU4K.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-IHKKGU4K.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-LNF5A3IV.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-LNF5A3IV.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type {\n RequestDataSiloStatus,\n RequestStatus,\n} from '@transcend-io/privacy-types';\nimport { skipRequestDataSilos as skipRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface SkipRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n transcendUrl: string;\n statuses: RequestStatus[];\n status:\n | (typeof RequestDataSiloStatus)['Skipped']\n | (typeof RequestDataSiloStatus)['Resolved'];\n}\n\nexport async function skipRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n status,\n statuses,\n transcendUrl,\n }: SkipRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await skipRequestDataSilosHelper({\n transcendUrl,\n auth,\n status,\n dataSiloId,\n requestStatuses: statuses,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk63GGJ2XIcjs = require('./chunk-63GGJ2XI.cjs');require('./chunk-MRJ2BRU4.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkGRBF73LScjs = require('./chunk-GRBF73LS.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=_chunkZVE6Y6D3cjs.vc.call(void 0, C,y),$=await _chunk63GGJ2XIcjs.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(_chunkGRBF73LScjs.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=_chunkGRBF73LScjs.j.call(void 0, [...s,...Object.keys(n)]),n});_chunkLR3CPNDMcjs.c.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 ${_chunkGRBF73LScjs.q}`))}exports.pullDatapoints = v;
2
- //# sourceMappingURL=impl-2QMFSSRH.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 _chunkW6BLSHVEcjs = require('./chunk-W6BLSHVE.cjs');require('./chunk-QRDYTLVB.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkMGAJ7ILDcjs = require('./chunk-MGAJ7ILD.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=_chunkQPIUQDJ6cjs.vc.call(void 0, C,y),$=await _chunkW6BLSHVEcjs.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(_chunkMGAJ7ILDcjs.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=_chunkMGAJ7ILDcjs.j.call(void 0, [...s,...Object.keys(n)]),n});_chunkLR3CPNDMcjs.c.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 ${_chunkMGAJ7ILDcjs.q}`))}exports.pullDatapoints = v;
2
+ //# sourceMappingURL=impl-LV5VZGGG.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-2QMFSSRH.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,gCAA6B,wDAAyC,wDAAyC,wDAA0C,gCAA6B,wDAAyC,wDAAuD,gCAA6B,gFCIxU,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-2QMFSSRH.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 { writeCsv } from '../../../lib/cron';\nimport { DataCategoryType } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\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 writeCsv(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-LV5VZGGG.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,gCAA6B,wDAAyC,wDAAyC,wDAA0C,gCAA6B,wDAAyC,wDAAuD,gCAA6B,gFCIxU,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-LV5VZGGG.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 { writeCsv } from '../../../lib/cron';\nimport { DataCategoryType } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\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 writeCsv(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 _chunkAMP7MT7Mcjs = require('./chunk-AMP7MT7M.cjs');var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunkPVQIV735cjs = require('./chunk-PVQIV735.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function P({auth:S,dataFlowsYmlFolder:o,dataSilosYmlFolder:e,ignoreYmls:T=[],transcendUrl:v}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, o)||!_fs.lstatSync.call(void 0, o).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${o}"`)),this.process.exit(1)),(!_fs.existsSync.call(void 0, e)||!_fs.lstatSync.call(void 0, e).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${e}"`)),this.process.exit(1));let u=_chunkZVE6Y6D3cjs.vc.call(void 0, v,S),{serviceToTitle:w,serviceToSupportedIntegration:F}=await _chunkZVE6Y6D3cjs.rd.call(void 0, u);_chunkPVQIV735cjs.c.call(void 0, o).forEach(i=>{let{"data-flows":C=[]}=_chunkSW5CIF5Dcjs.d.call(void 0, _path.join.call(void 0, o,i)),{adTechDataSilos:r,siteTechDataSilos:s}=_chunkAMP7MT7Mcjs.a.call(void 0, C,{serviceToSupportedIntegration:F,serviceToTitle:w}),a=[...r,...s];_chunkZUNVPK23cjs.a.log(`Total Services: ${a.length}`),_chunkZUNVPK23cjs.a.log(`Ad Tech Services: ${r.length}`),_chunkZUNVPK23cjs.a.log(`Site Tech Services: ${s.length}`),_chunkSW5CIF5Dcjs.e.call(void 0, _path.join.call(void 0, e,i),{"data-silos":T.includes(i)?[]:a})})}exports.deriveDataSilosFromDataFlows = P;
2
- //# sourceMappingURL=impl-K2ZOFSCD.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkHI7ACKKBcjs = require('./chunk-HI7ACKKB.cjs');var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunkXKYSQSROcjs = require('./chunk-XKYSQSRO.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.cjs');require('./chunk-Q7I37FJV.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function P({auth:S,dataFlowsYmlFolder:o,dataSilosYmlFolder:e,ignoreYmls:T=[],transcendUrl:v}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, o)||!_fs.lstatSync.call(void 0, o).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${o}"`)),this.process.exit(1)),(!_fs.existsSync.call(void 0, e)||!_fs.lstatSync.call(void 0, e).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${e}"`)),this.process.exit(1));let u=_chunkQPIUQDJ6cjs.vc.call(void 0, v,S),{serviceToTitle:w,serviceToSupportedIntegration:F}=await _chunkQPIUQDJ6cjs.rd.call(void 0, u);_chunkXKYSQSROcjs.c.call(void 0, o).forEach(i=>{let{"data-flows":C=[]}=_chunkSW5CIF5Dcjs.d.call(void 0, _path.join.call(void 0, o,i)),{adTechDataSilos:r,siteTechDataSilos:s}=_chunkHI7ACKKBcjs.a.call(void 0, C,{serviceToSupportedIntegration:F,serviceToTitle:w}),a=[...r,...s];_chunkZUNVPK23cjs.a.log(`Total Services: ${a.length}`),_chunkZUNVPK23cjs.a.log(`Ad Tech Services: ${r.length}`),_chunkZUNVPK23cjs.a.log(`Site Tech Services: ${s.length}`),_chunkSW5CIF5Dcjs.e.call(void 0, _path.join.call(void 0, e,i),{"data-silos":T.includes(i)?[]:a})})}exports.deriveDataSilosFromDataFlows = P;
2
+ //# sourceMappingURL=impl-MT4XWK25.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-K2ZOFSCD.cjs","../src/commands/inventory/derive-data-silos-from-data-flows/impl.ts"],"names":["deriveDataSilosFromDataFlows","auth","dataFlowsYmlFolder","dataSilosYmlFolder","ignoreYmls","transcendUrl","doneInputValidation","existsSync","lstatSync","logger","colors","client","buildTranscendGraphQLClient","serviceToTitle","serviceToSupportedIntegration","fetchAndIndexCatalogs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","dataSilos"],"mappings":"AAAA,iOAAwC,wDAAgD,wDAAyC,gCAA6B,wDAAyC,wDAAkD,gCAA6B,wDAAyC,gCAA6B,gCAA6B,4BCKpW,gFACF,wBAImB,MAgBtC,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CAAa,CAAC,CAAA,CACd,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAAA,CAInC,CAACC,4BAAAA,CAA6B,CAAA,EAC9B,CAACC,2BAAAA,CAA4B,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAE3CC,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BR,CAAkB,CAAA,CAAA,CAAG,CAAC,CAAA,CACzE,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAKnB,CAACK,4BAAAA,CAA6B,CAAA,EAC9B,CAACC,2BAAAA,CAA4B,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAE3CC,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BP,CAAkB,CAAA,CAAA,CAAG,CAAC,CAAA,CACzE,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMQ,CAAAA,CAASC,kCAAAA,CAA4BP,CAAcJ,CAAI,CAAA,CACvD,CAAE,cAAA,CAAAY,CAAAA,CAAgB,6BAAA,CAAAC,CAA8B,CAAA,CACpD,MAAMC,kCAAAA,CAA4B,CAAA,CAGpCC,iCAAAA,CAA4B,CAAA,CAAE,OAAA,CAASC,CAAAA,EAAc,CAEnD,GAAM,CAAE,YAAA,CAAcC,CAAAA,CAAY,CAAC,CAAE,CAAA,CAAIC,iCAAAA,wBACvCC,CAAKlB,CAAoBe,CAAS,CACpC,CAAA,CAGM,CAAE,eAAA,CAAAI,CAAAA,CAAiB,iBAAA,CAAAC,CAAkB,CAAA,CAAIC,iCAAAA,CAC7CL,CACA,CACE,6BAAA,CAAAJ,CAAAA,CACA,cAAA,CAAAD,CACF,CACF,CAAA,CAGMW,CAAAA,CAAY,CAAC,GAAGH,CAAAA,CAAiB,GAAGC,CAAiB,CAAA,CAC3Db,mBAAAA,CAAO,GAAA,CAAI,CAAA,gBAAA,EAAmBe,CAAAA,CAAU,MAAM,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-K2ZOFSCD.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'node:path';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { dataFlowsToDataSilos } from '../../../lib/consent-manager/dataFlowsToDataSilos';\nimport { DataFlowInput } from '../../../codecs';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { listFiles } from '../../../lib/api-keys';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DeriveDataSilosFromDataFlowsCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n dataSilosYmlFolder: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlows(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n dataSilosYmlFolder,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(dataFlowsYmlFolder) ||\n !lstatSync(dataFlowsYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataFlowsYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Ensure folder is passed\n if (\n !existsSync(dataSilosYmlFolder) ||\n !lstatSync(dataSilosYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataSilosYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Fetch all integrations in the catalog\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { serviceToTitle, serviceToSupportedIntegration } =\n await fetchAndIndexCatalogs(client);\n\n // List of each data flow yml file\n listFiles(dataFlowsYmlFolder).forEach((directory) => {\n // read in the data flows for a specific instance\n const { 'data-flows': dataFlows = [] } = readTranscendYaml(\n join(dataFlowsYmlFolder, directory),\n );\n\n // map the data flows to data silos\n const { adTechDataSilos, siteTechDataSilos } = dataFlowsToDataSilos(\n dataFlows as DataFlowInput[],\n {\n serviceToSupportedIntegration,\n serviceToTitle,\n },\n );\n\n // combine and write to yml file\n const dataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechDataSilos.length}`);\n logger.log(`Site Tech Services: ${siteTechDataSilos.length}`);\n writeTranscendYaml(join(dataSilosYmlFolder, directory), {\n 'data-silos': ignoreYmls.includes(directory) ? [] : dataSilos,\n });\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-MT4XWK25.cjs","../src/commands/inventory/derive-data-silos-from-data-flows/impl.ts"],"names":["deriveDataSilosFromDataFlows","auth","dataFlowsYmlFolder","dataSilosYmlFolder","ignoreYmls","transcendUrl","doneInputValidation","existsSync","lstatSync","logger","colors","client","buildTranscendGraphQLClient","serviceToTitle","serviceToSupportedIntegration","fetchAndIndexCatalogs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","dataSilos"],"mappings":"AAAA,iOAAwC,wDAAgD,wDAAyC,gCAA6B,wDAAyC,wDAAkD,gCAA6B,wDAAyC,gCAA6B,gCAA6B,4BCKpW,gFACF,wBAImB,MAgBtC,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CAAa,CAAC,CAAA,CACd,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAAA,CAInC,CAACC,4BAAAA,CAA6B,CAAA,EAC9B,CAACC,2BAAAA,CAA4B,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAE3CC,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BR,CAAkB,CAAA,CAAA,CAAG,CAAC,CAAA,CACzE,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAKnB,CAACK,4BAAAA,CAA6B,CAAA,EAC9B,CAACC,2BAAAA,CAA4B,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAE3CC,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BP,CAAkB,CAAA,CAAA,CAAG,CAAC,CAAA,CACzE,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMQ,CAAAA,CAASC,kCAAAA,CAA4BP,CAAcJ,CAAI,CAAA,CACvD,CAAE,cAAA,CAAAY,CAAAA,CAAgB,6BAAA,CAAAC,CAA8B,CAAA,CACpD,MAAMC,kCAAAA,CAA4B,CAAA,CAGpCC,iCAAAA,CAA4B,CAAA,CAAE,OAAA,CAASC,CAAAA,EAAc,CAEnD,GAAM,CAAE,YAAA,CAAcC,CAAAA,CAAY,CAAC,CAAE,CAAA,CAAIC,iCAAAA,wBACvCC,CAAKlB,CAAoBe,CAAS,CACpC,CAAA,CAGM,CAAE,eAAA,CAAAI,CAAAA,CAAiB,iBAAA,CAAAC,CAAkB,CAAA,CAAIC,iCAAAA,CAC7CL,CACA,CACE,6BAAA,CAAAJ,CAAAA,CACA,cAAA,CAAAD,CACF,CACF,CAAA,CAGMW,CAAAA,CAAY,CAAC,GAAGH,CAAAA,CAAiB,GAAGC,CAAiB,CAAA,CAC3Db,mBAAAA,CAAO,GAAA,CAAI,CAAA,gBAAA,EAAmBe,CAAAA,CAAU,MAAM,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-MT4XWK25.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'node:path';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { dataFlowsToDataSilos } from '../../../lib/consent-manager/dataFlowsToDataSilos';\nimport { DataFlowInput } from '../../../codecs';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { listFiles } from '../../../lib/api-keys';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DeriveDataSilosFromDataFlowsCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n dataSilosYmlFolder: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlows(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n dataSilosYmlFolder,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(dataFlowsYmlFolder) ||\n !lstatSync(dataFlowsYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataFlowsYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Ensure folder is passed\n if (\n !existsSync(dataSilosYmlFolder) ||\n !lstatSync(dataSilosYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataSilosYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Fetch all integrations in the catalog\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { serviceToTitle, serviceToSupportedIntegration } =\n await fetchAndIndexCatalogs(client);\n\n // List of each data flow yml file\n listFiles(dataFlowsYmlFolder).forEach((directory) => {\n // read in the data flows for a specific instance\n const { 'data-flows': dataFlows = [] } = readTranscendYaml(\n join(dataFlowsYmlFolder, directory),\n );\n\n // map the data flows to data silos\n const { adTechDataSilos, siteTechDataSilos } = dataFlowsToDataSilos(\n dataFlows as DataFlowInput[],\n {\n serviceToSupportedIntegration,\n serviceToTitle,\n },\n );\n\n // combine and write to yml file\n const dataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechDataSilos.length}`);\n logger.log(`Site Tech Services: ${siteTechDataSilos.length}`);\n writeTranscendYaml(join(dataSilosYmlFolder, directory), {\n 'data-silos': ignoreYmls.includes(directory) ? [] : dataSilos,\n });\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-MRJ2BRU4.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunk4B22XVLOcjs = require('./chunk-4B22XVLO.cjs');require('./chunk-MKLPDKJQ.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');async function S({auth:m,partition:c,sombraAuth:p,file:f,transcendUrl:l,timestampBefore:e,timestampAfter:r,identifiers:n=[],concurrency:g}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let u=await _chunkZVE6Y6D3cjs.wc.call(void 0, l,m,p),C=await _chunk4B22XVLOcjs.j.call(void 0, u,{partition:c,filterBy:{...e?{timestampBefore:e.toISOString()}:{},...r?{timestampAfter:r.toISOString()}:{},...n.length>0?{identifiers:n}:{}},limit:g});_chunkLR3CPNDMcjs.c.call(void 0, f,C.map(t=>({...t,purposes:JSON.stringify(t.purposes),...t.purposes})))}exports.pullConsentPreferences = S;
2
- //# sourceMappingURL=impl-UKSTSUL7.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-QRDYTLVB.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkBICC2LJLcjs = require('./chunk-BICC2LJL.cjs');require('./chunk-IFAKI5FF.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.cjs');require('./chunk-Q7I37FJV.cjs');async function S({auth:m,partition:c,sombraAuth:p,file:f,transcendUrl:l,timestampBefore:e,timestampAfter:r,identifiers:n=[],concurrency:g}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let u=await _chunkQPIUQDJ6cjs.wc.call(void 0, l,m,p),C=await _chunkBICC2LJLcjs.j.call(void 0, u,{partition:c,filterBy:{...e?{timestampBefore:e.toISOString()}:{},...r?{timestampAfter:r.toISOString()}:{},...n.length>0?{identifiers:n}:{}},limit:g});_chunkLR3CPNDMcjs.c.call(void 0, f,C.map(t=>({...t,purposes:JSON.stringify(t.purposes),...t.purposes})))}exports.pullConsentPreferences = S;
2
+ //# sourceMappingURL=impl-NOS3MDB5.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-UKSTSUL7.cjs","../src/commands/consent/pull-consent-preferences/impl.ts"],"names":["pullConsentPreferences","auth","partition","sombraAuth","file","transcendUrl","timestampBefore","timestampAfter","identifiers","concurrency","doneInputValidation","sombra","createSombraGotInstance","preferences","fetchConsentPreferences","writeCsv","pref"],"mappings":"AAAA,yGAA4B,wDAAyC,wDAAyC,gCAA6B,gCAA6B,wDAAoC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCmB1W,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,CAAC,CAAA,CACf,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBP,CAAcJ,CAAAA,CAAME,CAAU,CAAA,CAGrEU,CAAAA,CAAc,MAAMC,iCAAAA,CAAwBH,CAAQ,CACxD,SAAA,CAAAT,CAAAA,CACA,QAAA,CAAU,CACR,GAAII,CAAAA,CACA,CAAE,eAAA,CAAiBA,CAAAA,CAAgB,WAAA,CAAY,CAAE,CAAA,CACjD,CAAC,CAAA,CACL,GAAIC,CAAAA,CACA,CAAE,cAAA,CAAgBA,CAAAA,CAAe,WAAA,CAAY,CAAE,CAAA,CAC/C,CAAC,CAAA,CACL,GAAIC,CAAAA,CAAY,MAAA,CAAS,CAAA,CAAI,CAAE,WAAA,CAAAA,CAAY,CAAA,CAAI,CAAC,CAClD,CAAA,CACA,KAAA,CAAOC,CACT,CAAC,CAAA,CAGDM,iCAAAA,CACEX,CACAS,CAAAA,CAAY,GAAA,CAAKG,CAAAA,EAAAA,CAAU,CACzB,GAAGA,CAAAA,CACH,QAAA,CAAU,IAAA,CAAK,SAAA,CAAUA,CAAAA,CAAK,QAAQ,CAAA,CACtC,GAAGA,CAAAA,CAAK,QACV,CAAA,CAAE,CACJ,CACF,CAAA,mCAAA","file":"/home/runner/work/cli/cli/dist/impl-UKSTSUL7.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { fetchConsentPreferences } from '../../../lib/consent-manager';\nimport { writeCsv } from '../../../lib/cron';\nimport { createSombraGotInstance } from '../../../lib/graphql';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface PullConsentPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n file: string;\n transcendUrl: string;\n timestampBefore?: Date;\n timestampAfter?: Date;\n identifiers?: string[];\n concurrency: number;\n}\n\nexport async function pullConsentPreferences(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n file,\n transcendUrl,\n timestampBefore,\n timestampAfter,\n identifiers = [],\n concurrency,\n }: PullConsentPreferencesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n // Fetch preferences\n const preferences = await fetchConsentPreferences(sombra, {\n partition,\n filterBy: {\n ...(timestampBefore\n ? { timestampBefore: timestampBefore.toISOString() }\n : {}),\n ...(timestampAfter\n ? { timestampAfter: timestampAfter.toISOString() }\n : {}),\n ...(identifiers.length > 0 ? { identifiers } : {}),\n },\n limit: concurrency,\n });\n\n // Write to disk\n writeCsv(\n file,\n preferences.map((pref) => ({\n ...pref,\n purposes: JSON.stringify(pref.purposes),\n ...pref.purposes,\n })),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-NOS3MDB5.cjs","../src/commands/consent/pull-consent-preferences/impl.ts"],"names":["pullConsentPreferences","auth","partition","sombraAuth","file","transcendUrl","timestampBefore","timestampAfter","identifiers","concurrency","doneInputValidation","sombra","createSombraGotInstance","preferences","fetchConsentPreferences","writeCsv","pref"],"mappings":"AAAA,yGAA4B,wDAAyC,wDAAyC,gCAA6B,gCAA6B,wDAAoC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCmB1W,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,CAAC,CAAA,CACf,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBP,CAAcJ,CAAAA,CAAME,CAAU,CAAA,CAGrEU,CAAAA,CAAc,MAAMC,iCAAAA,CAAwBH,CAAQ,CACxD,SAAA,CAAAT,CAAAA,CACA,QAAA,CAAU,CACR,GAAII,CAAAA,CACA,CAAE,eAAA,CAAiBA,CAAAA,CAAgB,WAAA,CAAY,CAAE,CAAA,CACjD,CAAC,CAAA,CACL,GAAIC,CAAAA,CACA,CAAE,cAAA,CAAgBA,CAAAA,CAAe,WAAA,CAAY,CAAE,CAAA,CAC/C,CAAC,CAAA,CACL,GAAIC,CAAAA,CAAY,MAAA,CAAS,CAAA,CAAI,CAAE,WAAA,CAAAA,CAAY,CAAA,CAAI,CAAC,CAClD,CAAA,CACA,KAAA,CAAOC,CACT,CAAC,CAAA,CAGDM,iCAAAA,CACEX,CACAS,CAAAA,CAAY,GAAA,CAAKG,CAAAA,EAAAA,CAAU,CACzB,GAAGA,CAAAA,CACH,QAAA,CAAU,IAAA,CAAK,SAAA,CAAUA,CAAAA,CAAK,QAAQ,CAAA,CACtC,GAAGA,CAAAA,CAAK,QACV,CAAA,CAAE,CACJ,CACF,CAAA,mCAAA","file":"/home/runner/work/cli/cli/dist/impl-NOS3MDB5.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { fetchConsentPreferences } from '../../../lib/consent-manager';\nimport { writeCsv } from '../../../lib/cron';\nimport { createSombraGotInstance } from '../../../lib/graphql';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface PullConsentPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n file: string;\n transcendUrl: string;\n timestampBefore?: Date;\n timestampAfter?: Date;\n identifiers?: string[];\n concurrency: number;\n}\n\nexport async function pullConsentPreferences(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n file,\n transcendUrl,\n timestampBefore,\n timestampAfter,\n identifiers = [],\n concurrency,\n }: PullConsentPreferencesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n // Fetch preferences\n const preferences = await fetchConsentPreferences(sombra, {\n partition,\n filterBy: {\n ...(timestampBefore\n ? { timestampBefore: timestampBefore.toISOString() }\n : {}),\n ...(timestampAfter\n ? { timestampAfter: timestampAfter.toISOString() }\n : {}),\n ...(identifiers.length > 0 ? { identifiers } : {}),\n },\n limit: concurrency,\n });\n\n // Write to disk\n writeCsv(\n file,\n preferences.map((pref) => ({\n ...pref,\n purposes: JSON.stringify(pref.purposes),\n ...pref.purposes,\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 }; }require('./chunk-MRJ2BRU4.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkGRBF73LScjs = require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function w({auth:a,transcendUrl:m,file:e,pageLimit:c,actions:p,sombraAuth:u,statuses:f,createdAtBefore:l,createdAtAfter:d,showTests:g}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{requestsFormattedForCsv:t}=await _chunkZVE6Y6D3cjs.If.call(void 0, {transcendUrl:m,pageLimit:c,actions:p,statuses:f,auth:a,sombraAuth:u,createdAtBefore:l,createdAtAfter:d,isTest:g}),x=_chunkGRBF73LScjs.j.call(void 0, t.map(y=>Object.keys(y)).flat());_chunkLR3CPNDMcjs.c.call(void 0, e,t,x),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${t.length} requests to file "${e}"`))}exports._export = w;
2
- //# sourceMappingURL=impl-PFVHMRSW.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-QRDYTLVB.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkMGAJ7ILDcjs = require('./chunk-MGAJ7ILD.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function w({auth:a,transcendUrl:m,file:e,pageLimit:c,actions:p,sombraAuth:u,statuses:f,createdAtBefore:l,createdAtAfter:d,showTests:g}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{requestsFormattedForCsv:t}=await _chunkQPIUQDJ6cjs.If.call(void 0, {transcendUrl:m,pageLimit:c,actions:p,statuses:f,auth:a,sombraAuth:u,createdAtBefore:l,createdAtAfter:d,isTest:g}),x=_chunkMGAJ7ILDcjs.j.call(void 0, t.map(y=>Object.keys(y)).flat());_chunkLR3CPNDMcjs.c.call(void 0, e,t,x),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${t.length} requests to file "${e}"`))}exports._export = w;
2
+ //# sourceMappingURL=impl-O6ZZ6G7V.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-PFVHMRSW.cjs","../src/commands/request/export/impl.ts"],"names":["_export","auth","transcendUrl","file","pageLimit","actions","sombraAuth","statuses","createdAtBefore","createdAtAfter","showTests","doneInputValidation","requestsFormattedForCsv","pullPrivacyRequests","headers","uniq_default","d","writeCsv","logger","colors"],"mappings":"AAAA,yMAA4B,wDAAyC,wDAAyC,wDAA0C,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCCjR,MAyBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAM,CAAE,uBAAA,CAAAC,CAAwB,CAAA,CAAI,MAAMC,kCAAAA,CACxC,YAAA,CAAAX,CAAAA,CACA,SAAA,CAAAE,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAE,CAAAA,CACA,IAAA,CAAAN,CAAAA,CACA,UAAA,CAAAK,CAAAA,CACA,eAAA,CAAAE,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,MAAA,CAAQC,CACV,CAAC,CAAA,CAGKI,CAAAA,CAAUC,iCAAAA,CACdH,CAAwB,GAAA,CAAKI,CAAAA,EAAM,MAAA,CAAO,IAAA,CAAKA,CAAC,CAAC,CAAA,CAAE,IAAA,CAAK,CAC1D,CAAA,CACAC,iCAAAA,CAASd,CAAMS,CAAAA,CAAyBE,CAAO,CAAA,CAC/CI,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBP,CAAAA,CAAwB,MAAM,CAAA,mBAAA,EAAsBT,CAAI,CAAA,CAAA,CAChF,CACF,CACF,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-PFVHMRSW.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport { logger } from '../../../logger';\nimport { uniq } from 'lodash-es';\nimport { pullPrivacyRequests } from '../../../lib/requests';\nimport { writeCsv } from '../../../lib/cron';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ExportCommandFlags {\n auth: string;\n sombraAuth?: string;\n actions?: RequestAction[];\n statuses?: RequestStatus[];\n transcendUrl: string;\n file: string;\n concurrency: number;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n showTests?: boolean;\n pageLimit: number;\n}\n\n// `export` is a reserved keyword, so we need to prefix it with an underscore\n// eslint-disable-next-line no-underscore-dangle\nexport async function _export(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n pageLimit,\n actions,\n sombraAuth,\n statuses,\n createdAtBefore,\n createdAtAfter,\n showTests,\n }: ExportCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { requestsFormattedForCsv } = await pullPrivacyRequests({\n transcendUrl,\n pageLimit,\n actions,\n statuses,\n auth,\n sombraAuth,\n createdAtBefore,\n createdAtAfter,\n isTest: showTests,\n });\n\n // Write to CSV\n const headers = uniq(\n requestsFormattedForCsv.map((d) => Object.keys(d)).flat(),\n );\n writeCsv(file, requestsFormattedForCsv, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${requestsFormattedForCsv.length} requests to file \"${file}\"`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-O6ZZ6G7V.cjs","../src/commands/request/export/impl.ts"],"names":["_export","auth","transcendUrl","file","pageLimit","actions","sombraAuth","statuses","createdAtBefore","createdAtAfter","showTests","doneInputValidation","requestsFormattedForCsv","pullPrivacyRequests","headers","uniq_default","d","writeCsv","logger","colors"],"mappings":"AAAA,yMAA4B,wDAAyC,wDAAyC,wDAA0C,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCCjR,MAyBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAM,CAAE,uBAAA,CAAAC,CAAwB,CAAA,CAAI,MAAMC,kCAAAA,CACxC,YAAA,CAAAX,CAAAA,CACA,SAAA,CAAAE,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAE,CAAAA,CACA,IAAA,CAAAN,CAAAA,CACA,UAAA,CAAAK,CAAAA,CACA,eAAA,CAAAE,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,MAAA,CAAQC,CACV,CAAC,CAAA,CAGKI,CAAAA,CAAUC,iCAAAA,CACdH,CAAwB,GAAA,CAAKI,CAAAA,EAAM,MAAA,CAAO,IAAA,CAAKA,CAAC,CAAC,CAAA,CAAE,IAAA,CAAK,CAC1D,CAAA,CACAC,iCAAAA,CAASd,CAAMS,CAAAA,CAAyBE,CAAO,CAAA,CAC/CI,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBP,CAAAA,CAAwB,MAAM,CAAA,mBAAA,EAAsBT,CAAI,CAAA,CAAA,CAChF,CACF,CACF,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-O6ZZ6G7V.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport { logger } from '../../../logger';\nimport { uniq } from 'lodash-es';\nimport { pullPrivacyRequests } from '../../../lib/requests';\nimport { writeCsv } from '../../../lib/cron';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ExportCommandFlags {\n auth: string;\n sombraAuth?: string;\n actions?: RequestAction[];\n statuses?: RequestStatus[];\n transcendUrl: string;\n file: string;\n concurrency: number;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n showTests?: boolean;\n pageLimit: number;\n}\n\n// `export` is a reserved keyword, so we need to prefix it with an underscore\n// eslint-disable-next-line no-underscore-dangle\nexport async function _export(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n pageLimit,\n actions,\n sombraAuth,\n statuses,\n createdAtBefore,\n createdAtAfter,\n showTests,\n }: ExportCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { requestsFormattedForCsv } = await pullPrivacyRequests({\n transcendUrl,\n pageLimit,\n actions,\n statuses,\n auth,\n sombraAuth,\n createdAtBefore,\n createdAtAfter,\n isTest: showTests,\n });\n\n // Write to CSV\n const headers = uniq(\n requestsFormattedForCsv.map((d) => Object.keys(d)).flat(),\n );\n writeCsv(file, requestsFormattedForCsv, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${requestsFormattedForCsv.length} requests to file \"${file}\"`,\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 _chunk63GGJ2XIcjs = require('./chunk-63GGJ2XI.cjs');require('./chunk-MRJ2BRU4.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkGRBF73LScjs = require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function j({auth:p,file:o,transcendUrl:f,dataSiloIds:g,subCategories:C,status:S,includeEncryptedSnippets:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);try{let s=_chunkZVE6Y6D3cjs.vc.call(void 0, f,p),b=await _chunk63GGJ2XIcjs.b.call(void 0, s,{dataSiloIds:g,subCategories:C,status:S,includeEncryptedSnippets:n});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing unstructured discovery files to file "${o}"...`));let i=[],h=b.map(t=>{let a={"Entry ID":t.id,"Data Silo ID":t.dataSiloId,"Object Path ID":t.scannedObjectPathId,"Object ID":t.scannedObjectId,...n?{Entry:t.name,"Context Snippet":t.contextSnippet}:{},"Data Category":`${t.dataSubCategory.category}:${t.dataSubCategory.name}`,"Classification Status":t.status,"Confidence Score":t.confidence,"Classification Method":t.classificationMethod,"Classifier Version":t.classifierVersion};return i=_chunkGRBF73LScjs.j.call(void 0, [...i,...Object.keys(a)]),a});_chunkLR3CPNDMcjs.c.call(void 0, o,h,i)}catch(s){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred syncing the unstructured discovery files: ${s.message}`)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced unstructured discovery files to disk at ${o}!`))}exports.pullUnstructuredDiscoveryFiles = j;
2
- //# sourceMappingURL=impl-AKBOHO2I.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkW6BLSHVEcjs = require('./chunk-W6BLSHVE.cjs');require('./chunk-QRDYTLVB.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkMGAJ7ILDcjs = require('./chunk-MGAJ7ILD.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function j({auth:p,file:o,transcendUrl:f,dataSiloIds:g,subCategories:C,status:S,includeEncryptedSnippets:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);try{let s=_chunkQPIUQDJ6cjs.vc.call(void 0, f,p),b=await _chunkW6BLSHVEcjs.b.call(void 0, s,{dataSiloIds:g,subCategories:C,status:S,includeEncryptedSnippets:n});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing unstructured discovery files to file "${o}"...`));let i=[],h=b.map(t=>{let a={"Entry ID":t.id,"Data Silo ID":t.dataSiloId,"Object Path ID":t.scannedObjectPathId,"Object ID":t.scannedObjectId,...n?{Entry:t.name,"Context Snippet":t.contextSnippet}:{},"Data Category":`${t.dataSubCategory.category}:${t.dataSubCategory.name}`,"Classification Status":t.status,"Confidence Score":t.confidence,"Classification Method":t.classificationMethod,"Classifier Version":t.classifierVersion};return i=_chunkMGAJ7ILDcjs.j.call(void 0, [...i,...Object.keys(a)]),a});_chunkLR3CPNDMcjs.c.call(void 0, o,h,i)}catch(s){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred syncing the unstructured discovery files: ${s.message}`)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced unstructured discovery files to disk at ${o}!`))}exports.pullUnstructuredDiscoveryFiles = j;
2
+ //# sourceMappingURL=impl-OXVQMF3C.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-AKBOHO2I.cjs","../src/commands/inventory/pull-unstructured-discovery-files/impl.ts"],"names":["pullUnstructuredDiscoveryFiles","auth","file","transcendUrl","dataSiloIds","subCategories","status","includeEncryptedSnippets","doneInputValidation","client","buildTranscendGraphQLClient","entries","pullUnstructuredSubDataPointRecommendations","logger","colors","headers","inputs","entry","result"],"mappings":"AAAA,iOAAwC,gCAA6B,wDAAyC,wDAAyC,wDAA0C,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCE1T,MAkBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAI,CAEF,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BP,CAAcF,CAAI,CAAA,CAEvDU,CAAAA,CAAU,MAAMC,iCAAAA,CAA4CH,CAAQ,CACxE,WAAA,CAAAL,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAC,CAAA,CAEDM,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,8CAAA,EAAiDZ,CAAI,CAAA,IAAA,CACvD,CACF,CAAA,CACA,IAAIa,CAAAA,CAAoB,CAAC,CAAA,CACnBC,CAAAA,CAASL,CAAAA,CAAQ,GAAA,CAAKM,CAAAA,EAAU,CACpC,IAAMC,CAAAA,CAAS,CACb,UAAA,CAAYD,CAAAA,CAAM,EAAA,CAClB,cAAA,CAAgBA,CAAAA,CAAM,UAAA,CACtB,gBAAA,CAAkBA,CAAAA,CAAM,mBAAA,CACxB,WAAA,CAAaA,CAAAA,CAAM,eAAA,CACnB,GAAIV,CAAAA,CACA,CAAE,KAAA,CAAOU,CAAAA,CAAM,IAAA,CAAM,iBAAA,CAAmBA,CAAAA,CAAM,cAAe,CAAA,CAC7D,CAAC,CAAA,CACL,eAAA,CAAiB,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-AKBOHO2I.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport type { UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';\nimport colors from 'colors';\nimport { uniq } from 'lodash-es';\nimport { writeCsv } from '../../../lib/cron';\nimport { pullUnstructuredSubDataPointRecommendations } from '../../../lib/data-inventory';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport { logger } from '../../../logger';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface PullUnstructuredDiscoveryFilesCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n subCategories?: string[];\n status?: UnstructuredSubDataPointRecommendationStatus[];\n includeEncryptedSnippets: boolean;\n}\n\nexport async function pullUnstructuredDiscoveryFiles(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n subCategories,\n status,\n includeEncryptedSnippets,\n }: PullUnstructuredDiscoveryFilesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const entries = await pullUnstructuredSubDataPointRecommendations(client, {\n dataSiloIds,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n status,\n includeEncryptedSnippets,\n });\n\n logger.info(\n colors.magenta(\n `Writing unstructured discovery files to file \"${file}\"...`,\n ),\n );\n let headers: string[] = [];\n const inputs = entries.map((entry) => {\n const result = {\n 'Entry ID': entry.id,\n 'Data Silo ID': entry.dataSiloId,\n 'Object Path ID': entry.scannedObjectPathId,\n 'Object ID': entry.scannedObjectId,\n ...(includeEncryptedSnippets\n ? { Entry: entry.name, 'Context Snippet': entry.contextSnippet }\n : {}),\n 'Data Category': `${entry.dataSubCategory.category}:${entry.dataSubCategory.name}`,\n 'Classification Status': entry.status,\n 'Confidence Score': entry.confidence,\n 'Classification Method': entry.classificationMethod,\n 'Classifier Version': entry.classifierVersion,\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n writeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(\n `An error occurred syncing the unstructured discovery files: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced unstructured discovery files to disk at ${file}!`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-OXVQMF3C.cjs","../src/commands/inventory/pull-unstructured-discovery-files/impl.ts"],"names":["pullUnstructuredDiscoveryFiles","auth","file","transcendUrl","dataSiloIds","subCategories","status","includeEncryptedSnippets","doneInputValidation","client","buildTranscendGraphQLClient","entries","pullUnstructuredSubDataPointRecommendations","logger","colors","headers","inputs","entry","result"],"mappings":"AAAA,iOAAwC,gCAA6B,wDAAyC,wDAAyC,wDAA0C,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCE1T,MAkBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAI,CAEF,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BP,CAAcF,CAAI,CAAA,CAEvDU,CAAAA,CAAU,MAAMC,iCAAAA,CAA4CH,CAAQ,CACxE,WAAA,CAAAL,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CACF,CAAC,CAAA,CAEDM,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,8CAAA,EAAiDZ,CAAI,CAAA,IAAA,CACvD,CACF,CAAA,CACA,IAAIa,CAAAA,CAAoB,CAAC,CAAA,CACnBC,CAAAA,CAASL,CAAAA,CAAQ,GAAA,CAAKM,CAAAA,EAAU,CACpC,IAAMC,CAAAA,CAAS,CACb,UAAA,CAAYD,CAAAA,CAAM,EAAA,CAClB,cAAA,CAAgBA,CAAAA,CAAM,UAAA,CACtB,gBAAA,CAAkBA,CAAAA,CAAM,mBAAA,CACxB,WAAA,CAAaA,CAAAA,CAAM,eAAA,CACnB,GAAIV,CAAAA,CACA,CAAE,KAAA,CAAOU,CAAAA,CAAM,IAAA,CAAM,iBAAA,CAAmBA,CAAAA,CAAM,cAAe,CAAA,CAC7D,CAAC,CAAA,CACL,eAAA,CAAiB,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-OXVQMF3C.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport type { UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';\nimport colors from 'colors';\nimport { uniq } from 'lodash-es';\nimport { writeCsv } from '../../../lib/cron';\nimport { pullUnstructuredSubDataPointRecommendations } from '../../../lib/data-inventory';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport { logger } from '../../../logger';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface PullUnstructuredDiscoveryFilesCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n subCategories?: string[];\n status?: UnstructuredSubDataPointRecommendationStatus[];\n includeEncryptedSnippets: boolean;\n}\n\nexport async function pullUnstructuredDiscoveryFiles(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n subCategories,\n status,\n includeEncryptedSnippets,\n }: PullUnstructuredDiscoveryFilesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const entries = await pullUnstructuredSubDataPointRecommendations(client, {\n dataSiloIds,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n status,\n includeEncryptedSnippets,\n });\n\n logger.info(\n colors.magenta(\n `Writing unstructured discovery files to file \"${file}\"...`,\n ),\n );\n let headers: string[] = [];\n const inputs = entries.map((entry) => {\n const result = {\n 'Entry ID': entry.id,\n 'Data Silo ID': entry.dataSiloId,\n 'Object Path ID': entry.scannedObjectPathId,\n 'Object ID': entry.scannedObjectId,\n ...(includeEncryptedSnippets\n ? { Entry: entry.name, 'Context Snippet': entry.contextSnippet }\n : {}),\n 'Data Category': `${entry.dataSubCategory.category}:${entry.dataSubCategory.name}`,\n 'Classification Status': entry.status,\n 'Confidence Score': entry.confidence,\n 'Classification Method': entry.classificationMethod,\n 'Classifier Version': entry.classifierVersion,\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n writeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(\n `An error occurred syncing the unstructured discovery files: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced unstructured discovery files to disk at ${file}!`,\n ),\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.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 _chunkZVE6Y6D3cjs.wf.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-YVMZ7QMB.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.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 _chunkQPIUQDJ6cjs.wf.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-P3ZEQOP4.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-YVMZ7QMB.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-YVMZ7QMB.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-P3ZEQOP4.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-P3ZEQOP4.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,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPVQIV735cjs = require('./chunk-PVQIV735.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkGRBF73LScjs = require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');var _fs = require('fs');async function N({email:o,password:r,apiKeyTitle:n,file:s,scopes:a,deleteExistingApiKey:p,createNewApiKey:m,parentOrganizationId:c,transcendUrl:l}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let g=a.map(d=>_chunkGRBF73LScjs.w[d].name),{errors:y,apiKeys:f}=await _chunkPVQIV735cjs.a.call(void 0, {transcendUrl:l,password:r,email:o,parentOrganizationId:c,deleteExistingApiKey:p,createNewApiKey:m,apiKeyTitle:n,scopes:g});_fs.writeFileSync.call(void 0, s,`${JSON.stringify(f,null,2)}
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXKYSQSROcjs = require('./chunk-XKYSQSRO.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkMGAJ7ILDcjs = require('./chunk-MGAJ7ILD.cjs');require('./chunk-Q7I37FJV.cjs');var _fs = require('fs');async function N({email:o,password:r,apiKeyTitle:n,file:s,scopes:a,deleteExistingApiKey:p,createNewApiKey:m,parentOrganizationId:c,transcendUrl:l}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let g=a.map(d=>_chunkMGAJ7ILDcjs.w[d].name),{errors:y,apiKeys:f}=await _chunkXKYSQSROcjs.a.call(void 0, {transcendUrl:l,password:r,email:o,parentOrganizationId:c,deleteExistingApiKey:p,createNewApiKey:m,apiKeyTitle:n,scopes:g});_fs.writeFileSync.call(void 0, s,`${JSON.stringify(f,null,2)}
2
2
  `),y.length>0&&this.process.exit(1)}exports.generateApiKeys = N;
3
- //# sourceMappingURL=impl-C3ZNAX3B.cjs.map
3
+ //# sourceMappingURL=impl-PE35IGX2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-C3ZNAX3B.cjs","../src/commands/admin/generate-api-keys/impl.ts"],"names":["generateApiKeys","email","password","apiKeyTitle","file","scopes","deleteExistingApiKey","createNewApiKey","parentOrganizationId","transcendUrl","doneInputValidation","scopeNames","scopeTitle","SCOPES_BY_TITLE","errors","apiKeys","generateCrossAccountApiKeys","writeFileSync"],"mappings":"AAAA,iIAAwC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,wBCC7O,MAsB9B,SAAsBA,CAAAA,CAEpB,CACE,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,IAAMC,CAAAA,CAAaN,CAAAA,CAAO,GAAA,CACvBO,CAAAA,EAAeC,mBAAAA,CAAgBD,CAAU,CAAA,CAAE,IAC9C,CAAA,CAGM,CAAE,MAAA,CAAAE,CAAAA,CAAQ,OAAA,CAAAC,CAAQ,CAAA,CAAI,MAAMC,iCAAAA,CAChC,YAAA,CAAAP,CAAAA,CACA,QAAA,CAAAP,CAAAA,CACA,KAAA,CAAAD,CAAAA,CACA,oBAAA,CAAAO,CAAAA,CACA,oBAAA,CAAAF,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,WAAA,CAAAJ,CAAAA,CACA,MAAA,CAAQQ,CACV,CAAC,CAAA,CAGDM,+BAAAA,CAAcb,CAAM,CAAA,EAAA;AAItB","file":"/home/runner/work/cli/cli/dist/impl-C3ZNAX3B.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { writeFileSync } from 'node:fs';\n\nimport { ScopeName } from '@transcend-io/privacy-types';\n\nimport { generateCrossAccountApiKeys } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { SCOPES_BY_TITLE } from '../../../constants';\n\n// Command flag interface\nexport interface GenerateApiKeysCommandFlags {\n email: string;\n password: string;\n apiKeyTitle: string;\n file: string;\n scopes: string[];\n deleteExistingApiKey: boolean;\n createNewApiKey: boolean;\n parentOrganizationId?: string;\n transcendUrl: string;\n}\n\n// Command implementation\nexport async function generateApiKeys(\n this: LocalContext,\n {\n email,\n password,\n apiKeyTitle,\n file,\n scopes,\n deleteExistingApiKey,\n createNewApiKey,\n parentOrganizationId,\n transcendUrl,\n }: GenerateApiKeysCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const scopeNames = scopes.map(\n (scopeTitle) => SCOPES_BY_TITLE[scopeTitle].name as ScopeName,\n );\n\n // Upload privacy requests\n const { errors, apiKeys } = await generateCrossAccountApiKeys({\n transcendUrl,\n password,\n email,\n parentOrganizationId,\n deleteExistingApiKey,\n createNewApiKey,\n apiKeyTitle,\n scopes: scopeNames,\n });\n\n // Write to disk\n writeFileSync(file, `${JSON.stringify(apiKeys, null, 2)}\\n`);\n if (errors.length > 0) {\n this.process.exit(1);\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-PE35IGX2.cjs","../src/commands/admin/generate-api-keys/impl.ts"],"names":["generateApiKeys","email","password","apiKeyTitle","file","scopes","deleteExistingApiKey","createNewApiKey","parentOrganizationId","transcendUrl","doneInputValidation","scopeNames","scopeTitle","SCOPES_BY_TITLE","errors","apiKeys","generateCrossAccountApiKeys","writeFileSync"],"mappings":"AAAA,iIAAwC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,wBCC7O,MAsB9B,SAAsBA,CAAAA,CAEpB,CACE,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,IAAMC,CAAAA,CAAaN,CAAAA,CAAO,GAAA,CACvBO,CAAAA,EAAeC,mBAAAA,CAAgBD,CAAU,CAAA,CAAE,IAC9C,CAAA,CAGM,CAAE,MAAA,CAAAE,CAAAA,CAAQ,OAAA,CAAAC,CAAQ,CAAA,CAAI,MAAMC,iCAAAA,CAChC,YAAA,CAAAP,CAAAA,CACA,QAAA,CAAAP,CAAAA,CACA,KAAA,CAAAD,CAAAA,CACA,oBAAA,CAAAO,CAAAA,CACA,oBAAA,CAAAF,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,WAAA,CAAAJ,CAAAA,CACA,MAAA,CAAQQ,CACV,CAAC,CAAA,CAGDM,+BAAAA,CAAcb,CAAM,CAAA,EAAA;AAItB","file":"/home/runner/work/cli/cli/dist/impl-PE35IGX2.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { writeFileSync } from 'node:fs';\n\nimport { ScopeName } from '@transcend-io/privacy-types';\n\nimport { generateCrossAccountApiKeys } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { SCOPES_BY_TITLE } from '../../../constants';\n\n// Command flag interface\nexport interface GenerateApiKeysCommandFlags {\n email: string;\n password: string;\n apiKeyTitle: string;\n file: string;\n scopes: string[];\n deleteExistingApiKey: boolean;\n createNewApiKey: boolean;\n parentOrganizationId?: string;\n transcendUrl: string;\n}\n\n// Command implementation\nexport async function generateApiKeys(\n this: LocalContext,\n {\n email,\n password,\n apiKeyTitle,\n file,\n scopes,\n deleteExistingApiKey,\n createNewApiKey,\n parentOrganizationId,\n transcendUrl,\n }: GenerateApiKeysCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const scopeNames = scopes.map(\n (scopeTitle) => SCOPES_BY_TITLE[scopeTitle].name as ScopeName,\n );\n\n // Upload privacy requests\n const { errors, apiKeys } = await generateCrossAccountApiKeys({\n transcendUrl,\n password,\n email,\n parentOrganizationId,\n deleteExistingApiKey,\n createNewApiKey,\n apiKeyTitle,\n scopes: scopeNames,\n });\n\n // Write to disk\n writeFileSync(file, `${JSON.stringify(apiKeys, null, 2)}\\n`);\n if (errors.length > 0) {\n this.process.exit(1);\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');async function l({auth:i,transcendUrl:o,createdAtBefore:n,createdAtAfter:r,actions:a,daysLeft:s,days:m,requestIds:c,emailTemplate:d,concurrency:f}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkZVE6Y6D3cjs.xf.call(void 0, {transcendUrl:o,requestActions:a,auth:i,emailTemplate:d,days:m,daysLeft:s,requestIds:c,concurrency:f,createdAtBefore:n,createdAtAfter:r})}exports.notifyAdditionalTime = l;
2
- //# sourceMappingURL=impl-47CZEYNP.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.cjs');require('./chunk-Q7I37FJV.cjs');async function l({auth:i,transcendUrl:o,createdAtBefore:n,createdAtAfter:r,actions:a,daysLeft:s,days:m,requestIds:c,emailTemplate:d,concurrency:f}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkQPIUQDJ6cjs.xf.call(void 0, {transcendUrl:o,requestActions:a,auth:i,emailTemplate:d,days:m,daysLeft:s,requestIds:c,concurrency:f,createdAtBefore:n,createdAtAfter:r})}exports.notifyAdditionalTime = l;
2
+ //# sourceMappingURL=impl-PKQQUVYK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-47CZEYNP.cjs","../src/commands/request/notify-additional-time/impl.ts"],"names":["notifyAdditionalTime","auth","transcendUrl","createdAtBefore","createdAtAfter","actions","daysLeft","days","requestIds","emailTemplate","concurrency","doneInputValidation","notifyPrivacyRequestsAdditionalTime"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAV,CAAAA,CACA,cAAA,CAAgBG,CAAAA,CAChB,IAAA,CAAAJ,CAAAA,CACA,aAAA,CAAAQ,CAAAA,CACA,IAAA,CAAAF,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,eAAA,CAAAP,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-47CZEYNP.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { notifyPrivacyRequestsAdditionalTime } from '../../../lib/requests';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface NotifyAdditionalTimeCommandFlags {\n auth: string;\n createdAtBefore: Date;\n createdAtAfter?: Date;\n actions?: RequestAction[];\n daysLeft: number;\n days: number;\n requestIds?: string[];\n emailTemplate: string;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function notifyAdditionalTime(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n createdAtBefore,\n createdAtAfter,\n actions,\n daysLeft,\n days,\n requestIds,\n emailTemplate,\n concurrency,\n }: NotifyAdditionalTimeCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await notifyPrivacyRequestsAdditionalTime({\n transcendUrl,\n requestActions: actions,\n auth,\n emailTemplate,\n days,\n daysLeft,\n requestIds,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-PKQQUVYK.cjs","../src/commands/request/notify-additional-time/impl.ts"],"names":["notifyAdditionalTime","auth","transcendUrl","createdAtBefore","createdAtAfter","actions","daysLeft","days","requestIds","emailTemplate","concurrency","doneInputValidation","notifyPrivacyRequestsAdditionalTime"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAV,CAAAA,CACA,cAAA,CAAgBG,CAAAA,CAChB,IAAA,CAAAJ,CAAAA,CACA,aAAA,CAAAQ,CAAAA,CACA,IAAA,CAAAF,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,eAAA,CAAAP,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-PKQQUVYK.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { notifyPrivacyRequestsAdditionalTime } from '../../../lib/requests';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface NotifyAdditionalTimeCommandFlags {\n auth: string;\n createdAtBefore: Date;\n createdAtAfter?: Date;\n actions?: RequestAction[];\n daysLeft: number;\n days: number;\n requestIds?: string[];\n emailTemplate: string;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function notifyAdditionalTime(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n createdAtBefore,\n createdAtAfter,\n actions,\n daysLeft,\n days,\n requestIds,\n emailTemplate,\n concurrency,\n }: NotifyAdditionalTimeCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await notifyPrivacyRequestsAdditionalTime({\n transcendUrl,\n requestActions: actions,\n auth,\n emailTemplate,\n days,\n daysLeft,\n requestIds,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunk4B22XVLOcjs = require('./chunk-4B22XVLO.cjs');require('./chunk-MKLPDKJQ.cjs');var _chunkPVQIV735cjs = require('./chunk-PVQIV735.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.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=_chunkPVQIV735cjs.c.call(void 0, s).map(i=>{let{"consent-manager":u}=_chunkSW5CIF5Dcjs.d.call(void 0, _path.join.call(void 0, s,i));return{name:i,input:u}}),e=_chunk4B22XVLOcjs.h.call(void 0, f);_chunkSW5CIF5Dcjs.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-T3BWUKPN.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunkBICC2LJLcjs = require('./chunk-BICC2LJL.cjs');require('./chunk-IFAKI5FF.cjs');var _chunkXKYSQSROcjs = require('./chunk-XKYSQSRO.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-MGAJ7ILD.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=_chunkXKYSQSROcjs.c.call(void 0, s).map(i=>{let{"consent-manager":u}=_chunkSW5CIF5Dcjs.d.call(void 0, _path.join.call(void 0, s,i));return{name:i,input:u}}),e=_chunkBICC2LJLcjs.h.call(void 0, f);_chunkSW5CIF5Dcjs.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-QAMYNNJD.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-T3BWUKPN.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-T3BWUKPN.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-QAMYNNJD.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-QAMYNNJD.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,4 +1,4 @@
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 _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkGRBF73LScjs = require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _path = require('path');var _fs = require('fs');function lt(e,t){e||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A --directory must be provided.")),t.process.exit(1));let r=[];try{r=_fs.readdirSync.call(void 0, e).filter(n=>n.endsWith(".csv")).map(n=>_path.join.call(void 0, e,n)).filter(n=>{try{return _fs.statSync.call(void 0, n).isFile()}catch (e2){return!1}})}catch(o){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${e}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(o.message)),t.process.exit(1)}return r.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No CSV files found in directory: ${e}`)),t.process.exit(1)),r}var _os = require('os');function ct(e,t){let r=Math.max(1,_nullishCoalesce(_optionalChain([_os.availableParallelism, 'optionalCall', _2 => _2()]), () => (1)));return{poolSize:typeof e=="number"&&e>0?Math.min(e,t):Math.min(r,t),cpuCount:r}}var _child_process = require('child_process');function ut(e){return`'${String(e).replace(/'/g,"'\\''")}'`}function pt(e,t,r=!1){if(r)return;let o=_os.platform.call(void 0, );try{if(o==="darwin"){let c=e.map(ut).join(" -f "),i=`
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 _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkMGAJ7ILDcjs = require('./chunk-MGAJ7ILD.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _path = require('path');var _fs = require('fs');function lt(e,t){e||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A --directory must be provided.")),t.process.exit(1));let r=[];try{r=_fs.readdirSync.call(void 0, e).filter(n=>n.endsWith(".csv")).map(n=>_path.join.call(void 0, e,n)).filter(n=>{try{return _fs.statSync.call(void 0, n).isFile()}catch (e2){return!1}})}catch(o){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${e}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(o.message)),t.process.exit(1)}return r.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No CSV files found in directory: ${e}`)),t.process.exit(1)),r}var _os = require('os');function ct(e,t){let r=Math.max(1,_nullishCoalesce(_optionalChain([_os.availableParallelism, 'optionalCall', _2 => _2()]), () => (1)));return{poolSize:typeof e=="number"&&e>0?Math.min(e,t):Math.min(r,t),cpuCount:r}}var _child_process = require('child_process');function ut(e){return`'${String(e).replace(/'/g,"'\\''")}'`}function pt(e,t,r=!1){if(r)return;let o=_os.platform.call(void 0, );try{if(o==="darwin"){let c=e.map(ut).join(" -f "),i=`
2
2
  tell application "Terminal"
3
3
  activate
4
4
  do script "printf '\\e]0;${t}\\a'; tail -n +1 -f ${c}"
@@ -14,7 +14,7 @@
14
14
  `)}
15
15
  `),process.stdout.write(`
16
16
  Press Esc/Ctrl+] to return to dashboard.
17
- `)}var _readline = require('readline'); var Tt = _interopRequireWildcard(_readline); var X = _interopRequireWildcard(_readline);async function wt(e,t,r){await new Promise(o=>{try{let n=_fs.statSync.call(void 0, e),c=Math.max(0,n.size-t),i=_fs.createReadStream.call(void 0, e,{start:c,encoding:"utf8"});i.on("data",a=>r(a)),i.on("end",o),i.on("error",o)}catch (e9){o(void 0)}})}function bt(e,t,r){if(t.ctrl&&t.name==="c")return{type:"CTRL_C"};if(r==="dashboard")return t.name&&/^[0-9]$/.test(t.name)?{type:"ATTACH",id:Number(t.name)}:t.name==="tab"&&!t.shift?{type:"CYCLE",delta:1}:t.name==="tab"&&t.shift?{type:"CYCLE",delta:-1}:t.name==="q"?{type:"QUIT"}:null;if(t.name==="escape"||t.ctrl&&t.name==="]")return{type:"DETACH"};if(t.ctrl&&t.name==="d")return{type:"CTRL_D"};let o=_nullishCoalesce(_nullishCoalesce(t.sequence, () => (e)), () => (""));return o?{type:"FORWARD",sequence:o}:null}function xt(e){return[...e.keys()].sort((t,r)=>t-r)}function St(e,t,r){if(!e.length)return null;let o=_nullishCoalesce(t, () => (e[0])),n=e.indexOf(o);return n===-1&&(n=0),n=(n+r+e.length)%e.length,e[n]}function Pt(e){let{workers:t,onAttach:r,onDetach:o,onCtrlC:n,getLogPaths:c,replayBytes:i=200*1024,replayWhich:a=["out","err"],onEnterAttachScreen:p,ports:h}=e,m=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _23 => _23.stdin]), () => (process.stdin)),d=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _24 => _24.stdout]), () => (process.stdout)),l=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _25 => _25.stderr]), () => (process.stderr)),s=(...x)=>{if(_chunkGRBF73LScjs.z)try{(_nullishCoalesce(_optionalChain([h, 'optionalAccess', _26 => _26.stderr]), () => (process.stderr))).write(`[keys] ${x.map(String).join(" ")}
17
+ `)}var _readline = require('readline'); var Tt = _interopRequireWildcard(_readline); var X = _interopRequireWildcard(_readline);async function wt(e,t,r){await new Promise(o=>{try{let n=_fs.statSync.call(void 0, e),c=Math.max(0,n.size-t),i=_fs.createReadStream.call(void 0, e,{start:c,encoding:"utf8"});i.on("data",a=>r(a)),i.on("end",o),i.on("error",o)}catch (e9){o(void 0)}})}function bt(e,t,r){if(t.ctrl&&t.name==="c")return{type:"CTRL_C"};if(r==="dashboard")return t.name&&/^[0-9]$/.test(t.name)?{type:"ATTACH",id:Number(t.name)}:t.name==="tab"&&!t.shift?{type:"CYCLE",delta:1}:t.name==="tab"&&t.shift?{type:"CYCLE",delta:-1}:t.name==="q"?{type:"QUIT"}:null;if(t.name==="escape"||t.ctrl&&t.name==="]")return{type:"DETACH"};if(t.ctrl&&t.name==="d")return{type:"CTRL_D"};let o=_nullishCoalesce(_nullishCoalesce(t.sequence, () => (e)), () => (""));return o?{type:"FORWARD",sequence:o}:null}function xt(e){return[...e.keys()].sort((t,r)=>t-r)}function St(e,t,r){if(!e.length)return null;let o=_nullishCoalesce(t, () => (e[0])),n=e.indexOf(o);return n===-1&&(n=0),n=(n+r+e.length)%e.length,e[n]}function Pt(e){let{workers:t,onAttach:r,onDetach:o,onCtrlC:n,getLogPaths:c,replayBytes:i=200*1024,replayWhich:a=["out","err"],onEnterAttachScreen:p,ports:h}=e,m=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _23 => _23.stdin]), () => (process.stdin)),d=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _24 => _24.stdout]), () => (process.stdout)),l=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _25 => _25.stderr]), () => (process.stderr)),s=(...x)=>{if(_chunkMGAJ7ILDcjs.z)try{(_nullishCoalesce(_optionalChain([h, 'optionalAccess', _26 => _26.stderr]), () => (process.stderr))).write(`[keys] ${x.map(String).join(" ")}
18
18
  `)}catch (e10){}};if(!m.isTTY)return()=>{};Tt.emitKeypressEvents(m),_optionalChain([m, 'access', _27 => _27.setRawMode, 'optionalCall', _28 => _28(!0)]);let u="dashboard",g=null,T=null,C=null;async function E(x){if(!c)return;let f=c(x);if(!f)return;let y=[];for(let b of a)b==="out"&&y.push(f.outPath),b==="err"&&y.push(f.errPath),b==="structured"&&y.push(f.structuredPath);if(y.length){d.write(`
19
19
  ------------ replay ------------
20
20
  `);for(let b of y)d.write(`
@@ -24,7 +24,7 @@ Press Esc/Ctrl+] to return to dashboard.
24
24
 
25
25
  `)}}let R=async x=>{s("attach()",`id=${x}`);let f=t.get(x);if(!f)return;u==="attached"&&P(),u="attached",g=x,_optionalChain([p, 'optionalCall', _29 => _29(x)]),_optionalChain([r, 'optionalCall', _30 => _30(x)]),await E(x),T=b=>d.write(b),C=b=>l.write(b),_optionalChain([f, 'access', _31 => _31.stdout, 'optionalAccess', _32 => _32.on, 'call', _33 => _33("data",T)]),_optionalChain([f, 'access', _34 => _34.stderr, 'optionalAccess', _35 => _35.on, 'call', _36 => _36("data",C)]);let y=()=>{g===x&&P()};f.once("exit",y)},P=()=>{if(s("detach()",`id=${g}`),g==null)return;let x=g,f=t.get(x);f&&(T&&_optionalChain([f, 'access', _37 => _37.stdout, 'optionalAccess', _38 => _38.off, 'call', _39 => _39("data",T)]),C&&_optionalChain([f, 'access', _40 => _40.stderr, 'optionalAccess', _41 => _41.off, 'call', _42 => _42("data",C)])),T=null,C=null,g=null,u="dashboard",_optionalChain([o, 'optionalCall', _43 => _43()])},S=(x,f)=>{s("keypress",JSON.stringify({str:x,name:f.name,seq:f.sequence,ctrl:f.ctrl,meta:f.meta,shift:f.shift,mode:u}));let y=bt(x,f,u);if(s("mapped",JSON.stringify(y)),!!y)switch(y.type){case"CTRL_C":{if(s("CTRL_C"),u==="attached"&&g!=null){let b=t.get(g);try{_optionalChain([b, 'optionalAccess', _44 => _44.kill, 'call', _45 => _45("SIGINT")])}catch (e11){}P();return}_optionalChain([n, 'optionalCall', _46 => _46()]);return}case"ATTACH":{if(s("ATTACH",`id=${y.id}`,`has=${t.has(y.id)}`),u!=="dashboard")return;t.has(y.id)&&R(y.id);return}case"CYCLE":{if(s("CYCLE",`delta=${y.delta}`),u!=="dashboard")return;let b=St(xt(t),g,y.delta);b!=null&&R(b);return}case"QUIT":{if(u!=="dashboard")return;_optionalChain([n, 'optionalCall', _47 => _47()]);return}case"DETACH":{s("DETACH"),u==="attached"&&P();return}case"CTRL_D":{if(u==="attached"&&g!=null){let b=t.get(g);try{_optionalChain([b, 'optionalAccess', _48 => _48.stdin, 'optionalAccess', _49 => _49.end, 'call', _50 => _50()])}catch (e12){}}return}case"FORWARD":if(u==="attached"&&g!=null){let b=t.get(g);try{_optionalChain([b, 'optionalAccess', _51 => _51.stdin, 'optionalAccess', _52 => _52.write, 'call', _53 => _53(y.sequence)])}catch (e13){}}}},M=x=>{if(u==="attached"&&g!=null){let f=t.get(g);try{_optionalChain([f, 'optionalAccess', _54 => _54.stdin, 'optionalAccess', _55 => _55.write, 'call', _56 => _56(x)])}catch (e14){}}},A=()=>{m.off("keypress",S),m.off("data",M),_optionalChain([m, 'access', _57 => _57.setRawMode, 'optionalCall', _58 => _58(!1)]),d.write("\x1B[?25h")};return m.on("keypress",S),m.on("data",M),A}var _events = require('events');var _url = require('url');var Ct="",ie=(e,t)=>{let r=Math.min(e-1,9),o=e<=1?"0":`0-${r}`,n=e>10?" (Tab/Shift+Tab for \u226510)":"";return t?_colors2.default.dim("Run complete \u2014 digits to view logs \u2022 Tab/Shift+Tab cycle \u2022 Esc/Ctrl+] detach \u2022 q to quit"):_colors2.default.dim(`Hotkeys: [${o}] attach${n} \u2022 e=errors \u2022 w=warnings \u2022 i=info \u2022 l=logs \u2022 Tab/Shift+Tab \u2022 Esc/Ctrl+] detach \u2022 Ctrl+C exit`)};function vt(e,t,r=!1){let o=[...t.renderHeader(e),"",...t.renderWorkers(e),...r?[]:["",ie(e.poolSize,e.final)],...t.renderExtras?[""].concat(t.renderExtras(e)):[]].join(`
26
26
  `);!e.final&&o===Ct||(Ct=o,e.final?process.stdout.write("\x1B[?25h"):(process.stdout.write("\x1B[?25l"),X.cursorTo(process.stdout,0,0),X.clearScreenDown(process.stdout)),process.stdout.write(`${o}
27
- `))}function Z(e,t,r){let o=t.get(e);if(F(o))try{let n=V(o);if(n!=null)return n}catch (e15){}return r.get(e)}function I(e){return typeof e=="number"?e.toLocaleString():"0"}function Lt(e,t=40){let r=Math.max(0,Math.min(100,Math.floor(e))),o=Math.floor(r/100*t);return"\u2588".repeat(o)+"\u2591".repeat(t-o)}function le(e){let t=[...e.workerState.values()].filter(n=>n.busy).length,r=e.filesCompleted+e.filesFailed,o=e.filesTotal===0?100:Math.floor(r/Math.max(1,e.filesTotal)*100);return{done:r,inProgress:t,pct:o}}function $t(e,t=[]){let{title:r,poolSize:o,cpuCount:n,filesTotal:c,filesCompleted:i,filesFailed:a,throughput:p}=e,{inProgress:h,pct:m}=le(e),d=[`${_colors2.default.bold(r)} \u2014 ${o} workers ${_colors2.default.dim(`(CPU avail: ${n})`)}`,`${_colors2.default.dim("Files")} ${I(c)} ${_colors2.default.dim("Completed")} ${I(i)} ${_colors2.default.dim("Failed")} ${a?_colors2.default.red(I(a)):I(a)} ${_colors2.default.dim("In-flight")} ${I(h)}`,`[${Lt(m)}] ${m}%`];if(p){let l=Math.round(p.r10s*3600).toLocaleString(),s=Math.round(p.r60s*3600).toLocaleString(),u=_optionalChain([e, 'access', _59 => _59.throughput, 'optionalAccess', _60 => _60.successSoFar])!=null?` Newly uploaded: ${I(e.throughput.successSoFar)}`:"";d.push(_colors2.default.cyan(`Throughput: ${l}/hr (1h: ${s}/hr)${u}`))}return t.length?d.concat(t):d}function Rt(e,t=r=>r?_path.basename.call(void 0, r):"-"){return[...e.workerState.entries()].map(([o,n])=>{let c=n.lastLevel==="error"?_colors2.default.red("ERROR "):n.lastLevel==="warn"?_colors2.default.yellow("WARN "):n.busy?_colors2.default.green("WORKING"):_colors2.default.dim("IDLE "),i=t(n.file),a=n.startedAt?`${Math.floor((Date.now()-n.startedAt)/1e3)}s`:"-",p=_nullishCoalesce(_optionalChain([n, 'access', _61 => _61.progress, 'optionalAccess', _62 => _62.processed]), () => (0)),h=_nullishCoalesce(_optionalChain([n, 'access', _63 => _63.progress, 'optionalAccess', _64 => _64.total]), () => (0)),m=h>0?Math.floor(p/h*100):0,d=h>0?Lt(m,18):" ".repeat(18),l=h>0?`${p.toLocaleString()}/${h.toLocaleString()} (${m}%)`:_colors2.default.dim("\u2014");return` [w${o}] ${c} | ${i} | ${a} | [${d}] ${l}`})}async function Et(e){let{title:t,baseDir:r,poolSize:o,cpuCount:n,render:c,childModulePath:i,hooks:a,filesTotal:p,childFlag:h,viewerMode:m=!1}=e,d=_nullishCoalesce(e.openLogWindows, () => (!m)),l=_nullishCoalesce(e.isSilent, () => (!0)),s=Date.now(),u=mt(r),g=new Map,T=new Map,C=new Map,E=new _chunkZVE6Y6D3cjs.Vf,P=_nullishCoalesce(_optionalChain([a, 'access', _65 => _65.initTotals, 'optionalCall', _66 => _66()]), () => ({})),S=0,M=0,A=0,x=null,f=!1,y=!1,b=null,L=(w=!1)=>{y||c({title:t,poolSize:o,cpuCount:n,filesTotal:p,filesCompleted:M,filesFailed:A,workerState:T,totals:P,final:w,exportStatus:_optionalChain([a, 'access', _67 => _67.exportStatus, 'optionalCall', _68 => _68()]),throughput:{successSoFar:M,r10s:E.rate(1e4),r60s:E.rate(6e4)}})},B=w=>{let $=a.nextTask();if(!$)return!1;let _=g.get(w),v=a.taskLabel($),O=_optionalChain([a, 'access', _69 => _69.initSlotProgress, 'optionalCall', _70 => _70($)]);return T.set(w,{busy:!0,file:v,startedAt:Date.now(),lastLevel:"ok",progress:O}),Q(_,{type:"task",payload:$}),L(),!0};for(let w=0;w<o;w+=1){let $=gt({id:w,modulePath:i,logDir:u,openLogWindows:d,isSilent:l,childFlag:h});g.set(w,$),T.set(w,{busy:!1,file:null,startedAt:null,lastLevel:"ok"}),C.set(w,V($)),S+=1;let _=N(v=>{let O=U(v);if(!O)return;let G=T.get(w);G.lastLevel!==O&&(T.set(w,{...G,lastLevel:O}),L())});_optionalChain([$, 'access', _71 => _71.stderr, 'optionalAccess', _72 => _72.on, 'call', _73 => _73("data",_)]),$.on("message",v=>{if(!(!v||typeof v!="object")){if(v.type==="ready"){f||(f=!0,x=setInterval(()=>L(!1),350)),B(w);return}if(v.type==="progress"){P=a.onProgress(P,v.payload);let O=T.get(w);T.set(w,{...O,progress:v.payload}),L();return}if(v.type==="result"){let O=T.get(w),{totals:G,ok:ot}=a.onResult(P,v.payload);P=G,ot?(M+=1,E.add(1)):A+=1,T.set(w,{...O,busy:!1,file:null,progress:void 0,lastLevel:ot?"ok":"error"}),!B(w)&&F($)&&Q($,{type:"shutdown"}),L()}}}),$.on("exit",()=>{S-=1,S===0&&(x&&clearInterval(x),L(!0))})}let H=()=>{},K=()=>{try{_optionalChain([process, 'access', _74 => _74.stdin, 'access', _75 => _75.setRawMode, 'optionalCall', _76 => _76(!1)])}catch (e16){}try{process.stdin.pause()}catch (e17){}},et=()=>{if(x&&clearInterval(x),_optionalChain([H, 'optionalCall', _77 => _77()]),b)try{process.stdin.off("data",b)}catch (e18){}K(),process.stdout.write(`
27
+ `))}function Z(e,t,r){let o=t.get(e);if(F(o))try{let n=V(o);if(n!=null)return n}catch (e15){}return r.get(e)}function I(e){return typeof e=="number"?e.toLocaleString():"0"}function Lt(e,t=40){let r=Math.max(0,Math.min(100,Math.floor(e))),o=Math.floor(r/100*t);return"\u2588".repeat(o)+"\u2591".repeat(t-o)}function le(e){let t=[...e.workerState.values()].filter(n=>n.busy).length,r=e.filesCompleted+e.filesFailed,o=e.filesTotal===0?100:Math.floor(r/Math.max(1,e.filesTotal)*100);return{done:r,inProgress:t,pct:o}}function $t(e,t=[]){let{title:r,poolSize:o,cpuCount:n,filesTotal:c,filesCompleted:i,filesFailed:a,throughput:p}=e,{inProgress:h,pct:m}=le(e),d=[`${_colors2.default.bold(r)} \u2014 ${o} workers ${_colors2.default.dim(`(CPU avail: ${n})`)}`,`${_colors2.default.dim("Files")} ${I(c)} ${_colors2.default.dim("Completed")} ${I(i)} ${_colors2.default.dim("Failed")} ${a?_colors2.default.red(I(a)):I(a)} ${_colors2.default.dim("In-flight")} ${I(h)}`,`[${Lt(m)}] ${m}%`];if(p){let l=Math.round(p.r10s*3600).toLocaleString(),s=Math.round(p.r60s*3600).toLocaleString(),u=_optionalChain([e, 'access', _59 => _59.throughput, 'optionalAccess', _60 => _60.successSoFar])!=null?` Newly uploaded: ${I(e.throughput.successSoFar)}`:"";d.push(_colors2.default.cyan(`Throughput: ${l}/hr (1h: ${s}/hr)${u}`))}return t.length?d.concat(t):d}function Rt(e,t=r=>r?_path.basename.call(void 0, r):"-"){return[...e.workerState.entries()].map(([o,n])=>{let c=n.lastLevel==="error"?_colors2.default.red("ERROR "):n.lastLevel==="warn"?_colors2.default.yellow("WARN "):n.busy?_colors2.default.green("WORKING"):_colors2.default.dim("IDLE "),i=t(n.file),a=n.startedAt?`${Math.floor((Date.now()-n.startedAt)/1e3)}s`:"-",p=_nullishCoalesce(_optionalChain([n, 'access', _61 => _61.progress, 'optionalAccess', _62 => _62.processed]), () => (0)),h=_nullishCoalesce(_optionalChain([n, 'access', _63 => _63.progress, 'optionalAccess', _64 => _64.total]), () => (0)),m=h>0?Math.floor(p/h*100):0,d=h>0?Lt(m,18):" ".repeat(18),l=h>0?`${p.toLocaleString()}/${h.toLocaleString()} (${m}%)`:_colors2.default.dim("\u2014");return` [w${o}] ${c} | ${i} | ${a} | [${d}] ${l}`})}async function Et(e){let{title:t,baseDir:r,poolSize:o,cpuCount:n,render:c,childModulePath:i,hooks:a,filesTotal:p,childFlag:h,viewerMode:m=!1}=e,d=_nullishCoalesce(e.openLogWindows, () => (!m)),l=_nullishCoalesce(e.isSilent, () => (!0)),s=Date.now(),u=mt(r),g=new Map,T=new Map,C=new Map,E=new _chunkQPIUQDJ6cjs.Vf,P=_nullishCoalesce(_optionalChain([a, 'access', _65 => _65.initTotals, 'optionalCall', _66 => _66()]), () => ({})),S=0,M=0,A=0,x=null,f=!1,y=!1,b=null,L=(w=!1)=>{y||c({title:t,poolSize:o,cpuCount:n,filesTotal:p,filesCompleted:M,filesFailed:A,workerState:T,totals:P,final:w,exportStatus:_optionalChain([a, 'access', _67 => _67.exportStatus, 'optionalCall', _68 => _68()]),throughput:{successSoFar:M,r10s:E.rate(1e4),r60s:E.rate(6e4)}})},B=w=>{let $=a.nextTask();if(!$)return!1;let _=g.get(w),v=a.taskLabel($),O=_optionalChain([a, 'access', _69 => _69.initSlotProgress, 'optionalCall', _70 => _70($)]);return T.set(w,{busy:!0,file:v,startedAt:Date.now(),lastLevel:"ok",progress:O}),Q(_,{type:"task",payload:$}),L(),!0};for(let w=0;w<o;w+=1){let $=gt({id:w,modulePath:i,logDir:u,openLogWindows:d,isSilent:l,childFlag:h});g.set(w,$),T.set(w,{busy:!1,file:null,startedAt:null,lastLevel:"ok"}),C.set(w,V($)),S+=1;let _=N(v=>{let O=U(v);if(!O)return;let G=T.get(w);G.lastLevel!==O&&(T.set(w,{...G,lastLevel:O}),L())});_optionalChain([$, 'access', _71 => _71.stderr, 'optionalAccess', _72 => _72.on, 'call', _73 => _73("data",_)]),$.on("message",v=>{if(!(!v||typeof v!="object")){if(v.type==="ready"){f||(f=!0,x=setInterval(()=>L(!1),350)),B(w);return}if(v.type==="progress"){P=a.onProgress(P,v.payload);let O=T.get(w);T.set(w,{...O,progress:v.payload}),L();return}if(v.type==="result"){let O=T.get(w),{totals:G,ok:ot}=a.onResult(P,v.payload);P=G,ot?(M+=1,E.add(1)):A+=1,T.set(w,{...O,busy:!1,file:null,progress:void 0,lastLevel:ot?"ok":"error"}),!B(w)&&F($)&&Q($,{type:"shutdown"}),L()}}}),$.on("exit",()=>{S-=1,S===0&&(x&&clearInterval(x),L(!0))})}let H=()=>{},K=()=>{try{_optionalChain([process, 'access', _74 => _74.stdin, 'access', _75 => _75.setRawMode, 'optionalCall', _76 => _76(!1)])}catch (e16){}try{process.stdin.pause()}catch (e17){}},et=()=>{if(x&&clearInterval(x),_optionalChain([H, 'optionalCall', _77 => _77()]),b)try{process.stdin.off("data",b)}catch (e18){}K(),process.stdout.write(`
28
28
  Stopping workers...
29
29
  `);for(let[,w]of g){F(w)&&Q(w,{type:"shutdown"});try{_optionalChain([w, 'optionalAccess', _78 => _78.kill, 'call', _79 => _79("SIGTERM")])}catch (e19){}}process.exit(130)},rt=w=>{y=!0,process.stdout.write("\x1B[2J\x1B[H"),process.stdout.write(`Attached to worker ${w}. (Esc/Ctrl+] detach \u2022 Ctrl+D EOF \u2022 Ctrl+C SIGINT)
30
30
  `)},jt=()=>{y=!1,L()};if(process.once("SIGINT",et),!m){if(process.stdin.isTTY){try{process.stdin.setRawMode(!0)}catch (e20){process.stdout.write(_colors2.default.yellow(`Warning: Unable to enable raw mode for interactive key handling.
@@ -34,5 +34,5 @@ Stopping workers...
34
34
 
35
35
  `),(async()=>{try{await yt(t,l,s)}catch (e22){h=!1,o(!1),r()}})())},d=(l,s)=>{if(n)try{let u=n.exportCombinedLogs(t,l);a(`
36
36
  Wrote combined ${s} logs to: ${u}`),p(l,u)}catch (e23){a(`
37
- Failed to write combined ${s} logs`)}};return l=>{let s=l.toString("utf8");if(s==="e"){m(["err"],"error");return}if(s==="w"){m(["warn","err"],"warn");return}if(s==="i"){m(["info"],"all");return}if(s==="l"){m(["out","err","structured"],"all");return}if(s==="E"){d("error","error");return}if(s==="W"){d("warn","warn");return}if(s==="I"){d("info","info");return}if(s==="A"){d("all","ALL");return}let u=_optionalChain([i, 'optionalAccess', _84 => _84[s]]);if(u){u({noteExport:p,say:a});return}(s==="\x1B"||s==="")&&(h=!1,o(!1),r())}}var _promises = require('fs/promises');var _promises3 = require('stream/promises');var _stream = require('stream');var _csvparse = require('csv-parse');var _fastcsv = require('fast-csv'); var Bt = _interopRequireWildcard(_fastcsv);function tt(e,t){let r=_fs.createWriteStream.call(void 0, e),o=Bt.format({headers:t,writeHeaders:!0,objectMode:!0});return o.pipe(r),{async write(n){o.write(n)||await _events.once.call(void 0, o,"drain")},async end(){let n=Promise.all([_events.once.call(void 0, r,"finish")]);o.end(),await n}}}function xe(e){return String(e).padStart(4,"0")}function Se(e){return Buffer.byteLength(Object.values(e).map(t=>t==null?"":String(t)).join(","),"utf8")}async function Dt(e){let{filePath:t,outputDir:r,clearOutputDir:o,chunkSizeMB:n,onProgress:c,reportEveryMs:i=500}=e,{size:a}=await _promises.stat.call(void 0, t),p=0;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Chunking ${t} into ~${n}MB files...`));let h=Math.floor(n*1024*1024),m=_path.basename.call(void 0, t,".csv"),d=r||_path.dirname.call(void 0, t);if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Output directory: ${d}`)),await _promises.mkdir.call(void 0, d,{recursive:!0}),o){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Clearing output directory: ${d}`));let f=await _promises.readdir.call(void 0, d);await Promise.all(f.filter(y=>y.startsWith(`${m}_chunk_`)&&y.endsWith(".csv")).map(y=>_promises.unlink.call(void 0, _path.join.call(void 0, d,y))))}let l=null,s=null,u=0,g=1,T=0,C=new (0, _csvparse.Parser)({columns:!1,skip_empty_lines:!0}),E=0,R=0,P=()=>{let f=R>0?E/R:0,y=f>0?Math.max(u,Math.ceil(a/f)):void 0;c(u,y),p=Date.now()};P();let S=null,M=()=>_path.join.call(void 0, d,`${m}_chunk_${xe(g)}.csv`),A=new (0, _stream.Transform)({objectMode:!0,async transform(f,y,b){try{if(!l){l=f.slice(0),s=l.length,S=tt(M(),l),b();return}s!==null&&f.length!==s&&_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Row has ${f.length} cols; expected ${s}`)),u+=1,u%25e4===0&&c(u);let L=Object.fromEntries(l.map((H,K)=>[H,f[K]])),B=Se(L);E+=B,R+=1,Date.now()-p>=i&&P(),S&&T>0&&T+B>h&&(await S.end(),g+=1,T=0,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Rolling to chunk ${g} after ${u.toLocaleString()} rows.`)),S=tt(M(),l)),S||(S=tt(M(),l)),await S.write(L),T+=B,b()}catch(L){b(L)}},async flush(f){try{S&&(await S.end(),S=null),P(),f()}catch(y){f(y)}}}),x=_fs.createReadStream.call(void 0, t);await _promises3.pipeline.call(void 0, x,C,A),c(u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunked ${t} into ${g} file(s); processed ${u.toLocaleString()} rows.`))}async function Ft(){let e=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${e}] ready pid=${process.pid}`),_optionalChain([process, 'access', _85 => _85.send, 'optionalCall', _86 => _86({type:"ready"})]),process.on("message",async t=>{if(!t||typeof t!="object"||(t.type==="shutdown"&&process.exit(0),t.type!=="task"))return;let{filePath:r,options:o}=t.payload,{outputDir:n,clearOutputDir:c,chunkSizeMB:i}=o;try{await Dt({filePath:r,outputDir:n,clearOutputDir:c,chunkSizeMB:i,onProgress:(a,p)=>_optionalChain([process, 'access', _87 => _87.send, 'optionalCall', _88 => _88({type:"progress",payload:{filePath:r,processed:a,total:p}})])}),_optionalChain([process, 'access', _89 => _89.send, 'optionalCall', _90 => _90({type:"result",payload:{ok:!0,filePath:r}})])}catch(a){let p=_chunkZVE6Y6D3cjs.Qf.call(void 0, a);_chunkZUNVPK23cjs.a.error(`[w${e}] ERROR ${r}: ${p}`),_optionalChain([process, 'access', _91 => _91.send, 'optionalCall', _92 => _92({type:"result",payload:{ok:!1,filePath:r,error:p}})])}}),await new Promise(()=>{})}function Te(e){return $t(e)}function Pe(e){return Rt(e)}var It={renderHeader:Te,renderWorkers:Pe};function Ce(){return typeof __filename<"u"?__filename:process.argv[1]}async function Do(e){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{directory:t,outputDir:r,clearOutputDir:o,chunkSizeMB:n,concurrency:c,viewerMode:i}=e,a=lt(t,this),{poolSize:p,cpuCount:h}=ct(c,a.length);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunking ${a.length} CSV file(s) with pool size ${p} (CPU=${h})`));let m=a.map(l=>({filePath:l,options:{outputDir:r,clearOutputDir:o,chunkSizeMB:n}})),d={nextTask:()=>m.shift(),taskLabel:l=>l.filePath,initTotals:()=>({}),initSlotProgress:()=>{},onProgress:l=>l,onResult:(l,s)=>({totals:l,ok:!!s.ok}),postProcess:async()=>{}};await Et({title:"Chunk CSV",baseDir:t||r||process.cwd(),childFlag:Y,childModulePath:Ce(),poolSize:p,cpuCount:h,filesTotal:a.length,hooks:d,viewerMode:i,render:l=>vt(l,It,i),extraKeyHandler:({logsBySlot:l,repaint:s,setPaused:u})=>Mt({logsBySlot:l,repaint:s,setPaused:u})})}process.argv.includes(Y)&&Ft().catch(e=>{_chunkZUNVPK23cjs.a.error(e),process.exit(1)});exports.chunkCsv = Do;
38
- //# sourceMappingURL=impl-WQDLUVZ6.cjs.map
37
+ Failed to write combined ${s} logs`)}};return l=>{let s=l.toString("utf8");if(s==="e"){m(["err"],"error");return}if(s==="w"){m(["warn","err"],"warn");return}if(s==="i"){m(["info"],"all");return}if(s==="l"){m(["out","err","structured"],"all");return}if(s==="E"){d("error","error");return}if(s==="W"){d("warn","warn");return}if(s==="I"){d("info","info");return}if(s==="A"){d("all","ALL");return}let u=_optionalChain([i, 'optionalAccess', _84 => _84[s]]);if(u){u({noteExport:p,say:a});return}(s==="\x1B"||s==="")&&(h=!1,o(!1),r())}}var _promises = require('fs/promises');var _promises3 = require('stream/promises');var _stream = require('stream');var _csvparse = require('csv-parse');var _fastcsv = require('fast-csv'); var Bt = _interopRequireWildcard(_fastcsv);function tt(e,t){let r=_fs.createWriteStream.call(void 0, e),o=Bt.format({headers:t,writeHeaders:!0,objectMode:!0});return o.pipe(r),{async write(n){o.write(n)||await _events.once.call(void 0, o,"drain")},async end(){let n=Promise.all([_events.once.call(void 0, r,"finish")]);o.end(),await n}}}function xe(e){return String(e).padStart(4,"0")}function Se(e){return Buffer.byteLength(Object.values(e).map(t=>t==null?"":String(t)).join(","),"utf8")}async function Dt(e){let{filePath:t,outputDir:r,clearOutputDir:o,chunkSizeMB:n,onProgress:c,reportEveryMs:i=500}=e,{size:a}=await _promises.stat.call(void 0, t),p=0;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Chunking ${t} into ~${n}MB files...`));let h=Math.floor(n*1024*1024),m=_path.basename.call(void 0, t,".csv"),d=r||_path.dirname.call(void 0, t);if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Output directory: ${d}`)),await _promises.mkdir.call(void 0, d,{recursive:!0}),o){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Clearing output directory: ${d}`));let f=await _promises.readdir.call(void 0, d);await Promise.all(f.filter(y=>y.startsWith(`${m}_chunk_`)&&y.endsWith(".csv")).map(y=>_promises.unlink.call(void 0, _path.join.call(void 0, d,y))))}let l=null,s=null,u=0,g=1,T=0,C=new (0, _csvparse.Parser)({columns:!1,skip_empty_lines:!0}),E=0,R=0,P=()=>{let f=R>0?E/R:0,y=f>0?Math.max(u,Math.ceil(a/f)):void 0;c(u,y),p=Date.now()};P();let S=null,M=()=>_path.join.call(void 0, d,`${m}_chunk_${xe(g)}.csv`),A=new (0, _stream.Transform)({objectMode:!0,async transform(f,y,b){try{if(!l){l=f.slice(0),s=l.length,S=tt(M(),l),b();return}s!==null&&f.length!==s&&_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Row has ${f.length} cols; expected ${s}`)),u+=1,u%25e4===0&&c(u);let L=Object.fromEntries(l.map((H,K)=>[H,f[K]])),B=Se(L);E+=B,R+=1,Date.now()-p>=i&&P(),S&&T>0&&T+B>h&&(await S.end(),g+=1,T=0,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Rolling to chunk ${g} after ${u.toLocaleString()} rows.`)),S=tt(M(),l)),S||(S=tt(M(),l)),await S.write(L),T+=B,b()}catch(L){b(L)}},async flush(f){try{S&&(await S.end(),S=null),P(),f()}catch(y){f(y)}}}),x=_fs.createReadStream.call(void 0, t);await _promises3.pipeline.call(void 0, x,C,A),c(u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunked ${t} into ${g} file(s); processed ${u.toLocaleString()} rows.`))}async function Ft(){let e=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${e}] ready pid=${process.pid}`),_optionalChain([process, 'access', _85 => _85.send, 'optionalCall', _86 => _86({type:"ready"})]),process.on("message",async t=>{if(!t||typeof t!="object"||(t.type==="shutdown"&&process.exit(0),t.type!=="task"))return;let{filePath:r,options:o}=t.payload,{outputDir:n,clearOutputDir:c,chunkSizeMB:i}=o;try{await Dt({filePath:r,outputDir:n,clearOutputDir:c,chunkSizeMB:i,onProgress:(a,p)=>_optionalChain([process, 'access', _87 => _87.send, 'optionalCall', _88 => _88({type:"progress",payload:{filePath:r,processed:a,total:p}})])}),_optionalChain([process, 'access', _89 => _89.send, 'optionalCall', _90 => _90({type:"result",payload:{ok:!0,filePath:r}})])}catch(a){let p=_chunkQPIUQDJ6cjs.Qf.call(void 0, a);_chunkZUNVPK23cjs.a.error(`[w${e}] ERROR ${r}: ${p}`),_optionalChain([process, 'access', _91 => _91.send, 'optionalCall', _92 => _92({type:"result",payload:{ok:!1,filePath:r,error:p}})])}}),await new Promise(()=>{})}function Te(e){return $t(e)}function Pe(e){return Rt(e)}var It={renderHeader:Te,renderWorkers:Pe};function Ce(){return typeof __filename<"u"?__filename:process.argv[1]}async function Do(e){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{directory:t,outputDir:r,clearOutputDir:o,chunkSizeMB:n,concurrency:c,viewerMode:i}=e,a=lt(t,this),{poolSize:p,cpuCount:h}=ct(c,a.length);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunking ${a.length} CSV file(s) with pool size ${p} (CPU=${h})`));let m=a.map(l=>({filePath:l,options:{outputDir:r,clearOutputDir:o,chunkSizeMB:n}})),d={nextTask:()=>m.shift(),taskLabel:l=>l.filePath,initTotals:()=>({}),initSlotProgress:()=>{},onProgress:l=>l,onResult:(l,s)=>({totals:l,ok:!!s.ok}),postProcess:async()=>{}};await Et({title:"Chunk CSV",baseDir:t||r||process.cwd(),childFlag:Y,childModulePath:Ce(),poolSize:p,cpuCount:h,filesTotal:a.length,hooks:d,viewerMode:i,render:l=>vt(l,It,i),extraKeyHandler:({logsBySlot:l,repaint:s,setPaused:u})=>Mt({logsBySlot:l,repaint:s,setPaused:u})})}process.argv.includes(Y)&&Ft().catch(e=>{_chunkZUNVPK23cjs.a.error(e),process.exit(1)});exports.chunkCsv = Do;
38
+ //# sourceMappingURL=impl-QPUYYCCD.cjs.map