@transcend-io/cli 7.0.1 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1817 -159
- package/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/deprecated-command.cjs +2 -2
- package/dist/{chunk-RPJHDKU6.cjs → chunk-2DLJ3BDD.cjs} +2 -2
- package/dist/{chunk-RPJHDKU6.cjs.map → chunk-2DLJ3BDD.cjs.map} +1 -1
- package/dist/chunk-3L4DLV6F.cjs +3 -0
- package/dist/chunk-3L4DLV6F.cjs.map +1 -0
- package/dist/chunk-6VV64JQD.cjs +2 -0
- package/dist/chunk-6VV64JQD.cjs.map +1 -0
- package/dist/chunk-A57ZB6XS.cjs +113 -0
- package/dist/chunk-A57ZB6XS.cjs.map +1 -0
- package/dist/chunk-DFOLIGJP.cjs +2 -0
- package/dist/chunk-DFOLIGJP.cjs.map +1 -0
- package/dist/chunk-DM7WURT2.cjs +2 -0
- package/dist/chunk-DM7WURT2.cjs.map +1 -0
- package/dist/{chunk-QUYFJVAC.cjs → chunk-GF4AD4KW.cjs} +2 -2
- package/dist/{chunk-QUYFJVAC.cjs.map → chunk-GF4AD4KW.cjs.map} +1 -1
- package/dist/chunk-JQ7LX2L3.cjs +12 -0
- package/dist/chunk-JQ7LX2L3.cjs.map +1 -0
- package/dist/{chunk-KOV2SQO2.cjs → chunk-L7NHDBBN.cjs} +3 -3
- package/dist/{chunk-KOV2SQO2.cjs.map → chunk-L7NHDBBN.cjs.map} +1 -1
- package/dist/{chunk-SDZR3H23.cjs → chunk-LD6RM4JJ.cjs} +2 -2
- package/dist/{chunk-SDZR3H23.cjs.map → chunk-LD6RM4JJ.cjs.map} +1 -1
- package/dist/{chunk-J72CSV4R.cjs → chunk-MYCE3NIE.cjs} +2 -2
- package/dist/{chunk-J72CSV4R.cjs.map → chunk-MYCE3NIE.cjs.map} +1 -1
- package/dist/{chunk-LL7YE3LT.cjs → chunk-S27CXPPN.cjs} +2 -2
- package/dist/{chunk-LL7YE3LT.cjs.map → chunk-S27CXPPN.cjs.map} +1 -1
- package/dist/chunk-T66BMKXU.cjs +2830 -0
- package/dist/chunk-T66BMKXU.cjs.map +1 -0
- package/dist/chunk-UM5F6R4I.cjs +15 -0
- package/dist/chunk-UM5F6R4I.cjs.map +1 -0
- package/dist/chunk-VBCQ7F34.cjs +75 -0
- package/dist/chunk-VBCQ7F34.cjs.map +1 -0
- package/dist/chunk-WKCTKYN4.cjs +2 -0
- package/dist/chunk-WKCTKYN4.cjs.map +1 -0
- package/dist/chunk-WLVJQVRU.cjs +2 -0
- package/dist/{chunk-MQNOIHZN.cjs.map → chunk-WLVJQVRU.cjs.map} +1 -1
- package/dist/chunk-ZD2HOHJI.cjs +2 -0
- package/dist/chunk-ZD2HOHJI.cjs.map +1 -0
- package/dist/impl-24MFRX5R.cjs +2 -0
- package/dist/impl-24MFRX5R.cjs.map +1 -0
- package/dist/impl-2FABITOO.cjs +2 -0
- package/dist/impl-2FABITOO.cjs.map +1 -0
- package/dist/impl-2WTVQZVH.cjs +4 -0
- package/dist/impl-2WTVQZVH.cjs.map +1 -0
- package/dist/impl-45GI5GBX.cjs +2 -0
- package/dist/impl-45GI5GBX.cjs.map +1 -0
- package/dist/impl-4CKKKZSW.cjs +2 -0
- package/dist/impl-4CKKKZSW.cjs.map +1 -0
- package/dist/impl-4GWAH2JR.cjs +2 -0
- package/dist/impl-4GWAH2JR.cjs.map +1 -0
- package/dist/impl-4JIOV3X6.cjs +2 -0
- package/dist/impl-4JIOV3X6.cjs.map +1 -0
- package/dist/impl-52VR3GDJ.cjs +2 -0
- package/dist/impl-52VR3GDJ.cjs.map +1 -0
- package/dist/impl-5R7QQLXX.cjs +2 -0
- package/dist/impl-5R7QQLXX.cjs.map +1 -0
- package/dist/impl-6WSGLEVR.cjs +2 -0
- package/dist/impl-6WSGLEVR.cjs.map +1 -0
- package/dist/impl-7TE6HP4S.cjs +2 -0
- package/dist/impl-7TE6HP4S.cjs.map +1 -0
- package/dist/impl-BJNS6ODX.cjs +2 -0
- package/dist/impl-BJNS6ODX.cjs.map +1 -0
- package/dist/impl-CEZKH3XW.cjs +2 -0
- package/dist/impl-CEZKH3XW.cjs.map +1 -0
- package/dist/impl-CTN3RH3H.cjs +2 -0
- package/dist/impl-CTN3RH3H.cjs.map +1 -0
- package/dist/impl-DNQUVLSW.cjs +6 -0
- package/dist/impl-DNQUVLSW.cjs.map +1 -0
- package/dist/impl-EHZWLIEN.cjs +2 -0
- package/dist/impl-EHZWLIEN.cjs.map +1 -0
- package/dist/impl-EJWCZU32.cjs +2 -0
- package/dist/impl-EJWCZU32.cjs.map +1 -0
- package/dist/impl-HBRGW4FK.cjs +2 -0
- package/dist/impl-HBRGW4FK.cjs.map +1 -0
- package/dist/impl-I7IZGNDD.cjs +2 -0
- package/dist/impl-I7IZGNDD.cjs.map +1 -0
- package/dist/impl-IVH7T3MG.cjs +2 -0
- package/dist/impl-IVH7T3MG.cjs.map +1 -0
- package/dist/impl-KCK7ESJ2.cjs +2 -0
- package/dist/impl-KCK7ESJ2.cjs.map +1 -0
- package/dist/impl-KHC6VQQ3.cjs +12 -0
- package/dist/impl-KHC6VQQ3.cjs.map +1 -0
- package/dist/impl-LAY6PG5S.cjs +2 -0
- package/dist/impl-LAY6PG5S.cjs.map +1 -0
- package/dist/impl-LEPYMCRL.cjs +3 -0
- package/dist/impl-LEPYMCRL.cjs.map +1 -0
- package/dist/impl-LGMUBZ3P.cjs +9 -0
- package/dist/impl-LGMUBZ3P.cjs.map +1 -0
- package/dist/impl-O72S3ARJ.cjs +2 -0
- package/dist/impl-O72S3ARJ.cjs.map +1 -0
- package/dist/impl-OIRM2C3D.cjs +7 -0
- package/dist/{impl-NZFTTWVH.cjs.map → impl-OIRM2C3D.cjs.map} +1 -1
- package/dist/impl-OOVHRMYF.cjs +2 -0
- package/dist/impl-OOVHRMYF.cjs.map +1 -0
- package/dist/impl-OUBX3UFM.cjs +2 -0
- package/dist/impl-OUBX3UFM.cjs.map +1 -0
- package/dist/impl-P64XABL2.cjs +2 -0
- package/dist/impl-P64XABL2.cjs.map +1 -0
- package/dist/impl-PBCOYUN3.cjs +2 -0
- package/dist/impl-PBCOYUN3.cjs.map +1 -0
- package/dist/impl-RBCLAU3L.cjs +6 -0
- package/dist/impl-RBCLAU3L.cjs.map +1 -0
- package/dist/impl-S4J44FBI.cjs +2 -0
- package/dist/impl-S4J44FBI.cjs.map +1 -0
- package/dist/impl-TIOK6UX4.cjs +2 -0
- package/dist/impl-TIOK6UX4.cjs.map +1 -0
- package/dist/impl-TSBZWYSU.cjs +2 -0
- package/dist/impl-TSBZWYSU.cjs.map +1 -0
- package/dist/impl-U5LM6TOR.cjs +2 -0
- package/dist/impl-U5LM6TOR.cjs.map +1 -0
- package/dist/impl-U7KRGFYL.cjs +2 -0
- package/dist/impl-U7KRGFYL.cjs.map +1 -0
- package/dist/impl-XSP2L4A3.cjs +2 -0
- package/dist/impl-XSP2L4A3.cjs.map +1 -0
- package/dist/impl-YST7YAME.cjs +2 -0
- package/dist/impl-YST7YAME.cjs.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -16
- package/package.json +2 -1
- package/dist/chunk-4J2KYJVS.cjs +0 -2
- package/dist/chunk-4J2KYJVS.cjs.map +0 -1
- package/dist/chunk-5SI74STE.cjs +0 -12
- package/dist/chunk-5SI74STE.cjs.map +0 -1
- package/dist/chunk-DF4YVZJQ.cjs +0 -94
- package/dist/chunk-DF4YVZJQ.cjs.map +0 -1
- package/dist/chunk-E4Y3D2JZ.cjs +0 -75
- package/dist/chunk-E4Y3D2JZ.cjs.map +0 -1
- package/dist/chunk-EG4L6YAJ.cjs +0 -2
- package/dist/chunk-EG4L6YAJ.cjs.map +0 -1
- package/dist/chunk-MQNOIHZN.cjs +0 -2
- package/dist/chunk-OL2YE5SK.cjs +0 -2
- package/dist/chunk-OL2YE5SK.cjs.map +0 -1
- package/dist/chunk-P6ZHBB6P.cjs +0 -3
- package/dist/chunk-P6ZHBB6P.cjs.map +0 -1
- package/dist/chunk-UEGX6GZ2.cjs +0 -2
- package/dist/chunk-UEGX6GZ2.cjs.map +0 -1
- package/dist/chunk-XXGX7FUC.cjs +0 -2
- package/dist/chunk-XXGX7FUC.cjs.map +0 -1
- package/dist/chunk-YVY4TZ2O.cjs +0 -2844
- package/dist/chunk-YVY4TZ2O.cjs.map +0 -1
- package/dist/impl-4WA4CEB2.cjs +0 -2
- package/dist/impl-4WA4CEB2.cjs.map +0 -1
- package/dist/impl-7K57DEDR.cjs +0 -2
- package/dist/impl-7K57DEDR.cjs.map +0 -1
- package/dist/impl-AC2WQUNH.cjs +0 -2
- package/dist/impl-AC2WQUNH.cjs.map +0 -1
- package/dist/impl-B7WQMB3O.cjs +0 -2
- package/dist/impl-B7WQMB3O.cjs.map +0 -1
- package/dist/impl-DCTVGKDZ.cjs +0 -2
- package/dist/impl-DCTVGKDZ.cjs.map +0 -1
- package/dist/impl-DTFM3SWD.cjs +0 -2
- package/dist/impl-DTFM3SWD.cjs.map +0 -1
- package/dist/impl-GBTW2VLR.cjs +0 -2
- package/dist/impl-GBTW2VLR.cjs.map +0 -1
- package/dist/impl-HI27O5MJ.cjs +0 -4
- package/dist/impl-HI27O5MJ.cjs.map +0 -1
- package/dist/impl-I3RNGLKH.cjs +0 -2
- package/dist/impl-I3RNGLKH.cjs.map +0 -1
- package/dist/impl-IXNKRWC7.cjs +0 -2
- package/dist/impl-IXNKRWC7.cjs.map +0 -1
- package/dist/impl-IY2QSXYK.cjs +0 -2
- package/dist/impl-IY2QSXYK.cjs.map +0 -1
- package/dist/impl-KLXVHSVI.cjs +0 -2
- package/dist/impl-KLXVHSVI.cjs.map +0 -1
- package/dist/impl-L63MYKIO.cjs +0 -2
- package/dist/impl-L63MYKIO.cjs.map +0 -1
- package/dist/impl-LBZ5KQCA.cjs +0 -2
- package/dist/impl-LBZ5KQCA.cjs.map +0 -1
- package/dist/impl-LCGB6L6S.cjs +0 -2
- package/dist/impl-LCGB6L6S.cjs.map +0 -1
- package/dist/impl-MHMLFQYV.cjs +0 -2
- package/dist/impl-MHMLFQYV.cjs.map +0 -1
- package/dist/impl-MP7KOII5.cjs +0 -2
- package/dist/impl-MP7KOII5.cjs.map +0 -1
- package/dist/impl-MZEAMC6V.cjs +0 -2
- package/dist/impl-MZEAMC6V.cjs.map +0 -1
- package/dist/impl-N2Q4635G.cjs +0 -2
- package/dist/impl-N2Q4635G.cjs.map +0 -1
- package/dist/impl-NIMCX7UC.cjs +0 -2
- package/dist/impl-NIMCX7UC.cjs.map +0 -1
- package/dist/impl-NURZ5XJQ.cjs +0 -2
- package/dist/impl-NURZ5XJQ.cjs.map +0 -1
- package/dist/impl-NZFTTWVH.cjs +0 -7
- package/dist/impl-O5UHTMMM.cjs +0 -6
- package/dist/impl-O5UHTMMM.cjs.map +0 -1
- package/dist/impl-PRYWCT7Y.cjs +0 -12
- package/dist/impl-PRYWCT7Y.cjs.map +0 -1
- package/dist/impl-RKMMHSRM.cjs +0 -2
- package/dist/impl-RKMMHSRM.cjs.map +0 -1
- package/dist/impl-RWHAQHPT.cjs +0 -2
- package/dist/impl-RWHAQHPT.cjs.map +0 -1
- package/dist/impl-SBE23MJO.cjs +0 -2
- package/dist/impl-SBE23MJO.cjs.map +0 -1
- package/dist/impl-SC4TK2TM.cjs +0 -2
- package/dist/impl-SC4TK2TM.cjs.map +0 -1
- package/dist/impl-TIBNP5YM.cjs +0 -6
- package/dist/impl-TIBNP5YM.cjs.map +0 -1
- package/dist/impl-UNB3DZOL.cjs +0 -2
- package/dist/impl-UNB3DZOL.cjs.map +0 -1
- package/dist/impl-V4UKISVS.cjs +0 -2
- package/dist/impl-V4UKISVS.cjs.map +0 -1
- package/dist/impl-V5ICYKCT.cjs +0 -6
- package/dist/impl-V5ICYKCT.cjs.map +0 -1
- package/dist/impl-VQGXD5O3.cjs +0 -2
- package/dist/impl-VQGXD5O3.cjs.map +0 -1
- package/dist/impl-X2YAN6YV.cjs +0 -9
- package/dist/impl-X2YAN6YV.cjs.map +0 -1
- package/dist/impl-XKATFWGB.cjs +0 -2
- package/dist/impl-XKATFWGB.cjs.map +0 -1
- package/dist/impl-XRRNIJUK.cjs +0 -2
- package/dist/impl-XRRNIJUK.cjs.map +0 -1
- package/dist/impl-Y3ZMWRT7.cjs +0 -2
- package/dist/impl-Y3ZMWRT7.cjs.map +0 -1
- package/dist/impl-YDPROAJW.cjs +0 -2
- package/dist/impl-YDPROAJW.cjs.map +0 -1
- package/dist/impl-YTAZCQDL.cjs +0 -2
- package/dist/impl-YTAZCQDL.cjs.map +0 -1
package/dist/impl-4WA4CEB2.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSDZR3H23cjs = require('./chunk-SDZR3H23.cjs');var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function d({base64EncryptionKey:o,base64SigningKey:t,partition:s,file:i,consentUrl:a,concurrency:c}){let m=_chunk4J2KYJVScjs.q.call(void 0, i,_chunkSDZR3H23cjs.b);await _chunkSDZR3H23cjs.f.call(void 0, {base64EncryptionKey:o,base64SigningKey:t,preferences:m,partition:s,concurrency:c,transcendUrl:a})}exports.uploadConsentPreferences = d;
|
|
2
|
-
//# sourceMappingURL=impl-4WA4CEB2.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-4WA4CEB2.cjs","../src/commands/consent/upload-consent-preferences/impl.ts"],"names":["uploadConsentPreferences","base64EncryptionKey","base64SigningKey","partition","file","consentUrl","concurrency","preferences","readCsv","ConsentPreferenceUpload","uploadConsents"],"mappings":"AAAA,iIAA+C,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCezO,SAAsBA,CAAAA,CAEpB,CACE,mBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CAEf,IAAMC,CAAAA,CAAcC,iCAAAA,CAAQJ,CAAMK,mBAAuB,CAAA,CAGzD,MAAMC,iCAAAA,CACJ,mBAAA,CAAAT,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,WAAA,CAAAK,CAAAA,CACA,SAAA,CAAAJ,CAAAA,CACA,WAAA,CAAAG,CAAAA,CACA,YAAA,CAAcD,CAChB,CAAC,CACH,CAAA,qCAAA","file":"/home/runner/work/cli/cli/dist/impl-4WA4CEB2.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { uploadConsents } from '../../../lib/consent-manager/uploadConsents';\nimport { ConsentPreferenceUpload } from '../../../lib/consent-manager/types';\nimport { readCsv } from '../../../lib/requests';\n\ninterface UploadConsentPreferencesCommandFlags {\n base64EncryptionKey: string;\n base64SigningKey: string;\n partition: string;\n file: string;\n consentUrl: string;\n concurrency: number;\n}\n\nexport async function uploadConsentPreferences(\n this: LocalContext,\n {\n base64EncryptionKey,\n base64SigningKey,\n partition,\n file,\n consentUrl,\n concurrency,\n }: UploadConsentPreferencesCommandFlags,\n): Promise<void> {\n // Load in preferences from csv\n const preferences = readCsv(file, ConsentPreferenceUpload);\n\n // Upload cookies\n await uploadConsents({\n base64EncryptionKey,\n base64SigningKey,\n preferences,\n partition,\n concurrency,\n transcendUrl: consentUrl,\n });\n}\n"]}
|
package/dist/impl-7K57DEDR.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkKOV2SQO2cjs = require('./chunk-KOV2SQO2.cjs');var _chunkJ72CSV4Rcjs = require('./chunk-J72CSV4R.cjs');var _chunk5SI74STEcjs = require('./chunk-5SI74STE.cjs');require('./chunk-SDZR3H23.cjs');require('./chunk-4J2KYJVS.cjs');require('./chunk-UEGX6GZ2.cjs');require('./chunk-SAEKBZGF.cjs');require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');function b({consentManagerYmlFolder:s,output:n}){(!_fs.existsSync.call(void 0, s)||!_fs.lstatSync.call(void 0, s).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${s}"`)),process.exit(1));let p=_chunkJ72CSV4Rcjs.c.call(void 0, s).map(i=>{let{"consent-manager":f}=_chunkKOV2SQO2cjs.d.call(void 0, _path.join.call(void 0, s,i));return{name:i,input:f}}),e=_chunk5SI74STEcjs.h.call(void 0, p);_chunkKOV2SQO2cjs.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 = b;
|
|
2
|
-
//# sourceMappingURL=impl-7K57DEDR.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-7K57DEDR.cjs","../src/commands/inventory/consent-managers-to-business-entities/impl.ts"],"names":["consentManagersToBusinessEntities","consentManagerYmlFolder","output","existsSync","lstatSync","logger","colors","inputs","listFiles","directory","consentManager","readTranscendYaml","join","businessEntities","writeTranscendYaml"],"mappings":"AAAA,iOAA+C,wDAAyC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,4BCO7X,gFAEF,wBAEmB,SAOtBA,CAAAA,CAEd,CACE,uBAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CACM,CAAA,CAGJ,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,EAA2BL,CAAuB,CAAA,CAAA,CAAG,CAClE,CAAA,CACA,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIhB,IAAMM,CAAAA,CAASC,iCAAAA,CAAiC,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAc,CACnE,GAAM,CAAE,iBAAA,CAAmBC,CAAe,CAAA,CAAIC,iCAAAA,wBAC5CC,CAAKX,CAAyBQ,CAAS,CACzC,CAAA,CACA,MAAO,CAAE,IAAA,CAAMA,CAAAA,CAAW,KAAA,CAAOC,CAAe,CAClD,CAAC,CAAA,CAGKG,CAAAA,CAAmBb,iCAAAA,CAA8C,CAAA,CAGvEc,iCAAAA,CAAmBZ,CAAQ,CACzB,mBAAA,CAAqBW,CACvB,CAAC,CAAA,CAEDR,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBO,CAAAA,CAAiB,MAAM,CAAA,4BAAA,EAA+BX,CAAM,CAAA,CAAA,CACpF,CACF,CACF,CAAA,8CAAA","file":"/home/runner/work/cli/cli/dist/impl-7K57DEDR.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 'path';\n\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { existsSync, lstatSync } from 'fs';\n\ninterface 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 // 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 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"]}
|
package/dist/impl-AC2WQUNH.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP6ZHBB6Pcjs = require('./chunk-P6ZHBB6P.cjs');require('./chunk-ZVK4HIDF.cjs');require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function c({auth:n,transcendUrl:e,file:i,concurrency:r,actions:o,sombraAuth:s}){await _chunkP6ZHBB6Pcjs.a.call(void 0, {file:i,transcendUrl:e,concurrency:r,requestActions:o,auth:n,sombraAuth:s})}exports.pullIdentifiers = c;
|
|
2
|
-
//# sourceMappingURL=impl-AC2WQUNH.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-AC2WQUNH.cjs","../src/commands/request/preflight/pull-identifiers/impl.ts"],"names":["pullIdentifiers","auth","transcendUrl","file","concurrency","actions","sombraAuth","pullManualEnrichmentIdentifiersToCsv"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCanP,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACf,MAAMC,iCAAAA,CACJ,IAAA,CAAAJ,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,IAAA,CAAAJ,CAAAA,CACA,UAAA,CAAAK,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-AC2WQUNH.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pullManualEnrichmentIdentifiersToCsv } from '../../../../lib/manual-enrichment';\nimport type { RequestAction } from '@transcend-io/privacy-types';\n\ninterface PullIdentifiersCommandFlags {\n auth: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n actions?: RequestAction[];\n concurrency: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n concurrency,\n actions,\n sombraAuth,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n await pullManualEnrichmentIdentifiersToCsv({\n file,\n transcendUrl,\n concurrency,\n requestActions: actions,\n auth,\n sombraAuth,\n });\n}\n"]}
|
package/dist/impl-B7WQMB3O.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function m({auth:s,actions:o,statuses:r=[],requestIds:c,silentModeBefore:e,createdAtBefore:t,createdAtAfter:n,cancellationTitle:i,transcendUrl:u,concurrency:d}){await _chunk4J2KYJVScjs.L.call(void 0, {transcendUrl:u,requestActions:o,auth:s,cancellationTitle:i,requestIds:c,statuses:r,concurrency:d,silentModeBefore:e?new Date(e):void 0,createdAtBefore:t?new Date(t):void 0,createdAtAfter:n?new Date(n):void 0})}exports.cancel = m;
|
|
2
|
-
//# sourceMappingURL=impl-B7WQMB3O.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-B7WQMB3O.cjs","../src/commands/request/cancel/impl.ts"],"names":["cancel","auth","actions","statuses","requestIds","silentModeBefore","createdAtBefore","createdAtAfter","cancellationTitle","transcendUrl","concurrency","cancelPrivacyRequests"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCiBzL,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,CACf,MAAMC,iCAAAA,CACJ,YAAA,CAAAF,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-B7WQMB3O.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { cancelPrivacyRequests } from '../../../lib/requests';\n\ninterface 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 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"]}
|
package/dist/impl-DCTVGKDZ.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkJ72CSV4Rcjs = require('./chunk-J72CSV4R.cjs');var _chunk5SI74STEcjs = require('./chunk-5SI74STE.cjs');require('./chunk-SDZR3H23.cjs');require('./chunk-4J2KYJVS.cjs');require('./chunk-UEGX6GZ2.cjs');require('./chunk-SAEKBZGF.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _privacytypes = require('@transcend-io/privacy-types');async function M({auth:f,bundleTypes:r=[_privacytypes.ConsentBundleType.Production,_privacytypes.ConsentBundleType.Test],deploy:i,transcendUrl:s}){let e=await _chunkJ72CSV4Rcjs.b.call(void 0, f);typeof e=="string"?(await _chunk5SI74STEcjs.a.call(void 0, {deploy:i,transcendUrl:s,auth:e,bundleTypes:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green("Successfully updated Consent Manager!"))):(await _chunkYVY4TZ2Ocjs.a.call(void 0, e,async o=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating Consent Manager for organization "${o.organizationName}"...`)),await _chunk5SI74STEcjs.a.call(void 0, {deploy:i,transcendUrl:s,auth:o.apiKey,bundleTypes:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated Consent Manager for organization "${o.organizationName}"!`))}),_chunkZUNVPK23cjs.a.info(_colors2.default.green("Successfully updated Consent Managers!")))}exports.updateConsentManager = M;
|
|
2
|
-
//# sourceMappingURL=impl-DCTVGKDZ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-DCTVGKDZ.cjs","../src/commands/consent/update-consent-manager/impl.ts"],"names":["updateConsentManager","auth","bundleTypes","ConsentBundleType","deploy","transcendUrl","apiKeyOrList","validateTranscendAuth","updateConsentManagerVersionToLatest","logger","colors","mapSeries","apiKey"],"mappings":"AAAA,iOAAwC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gFCC3V,2DACe,MAclC,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,CAEf,IAAMC,CAAAA,CAAe,MAAMC,iCAAAA,CAA0B,CAAA,CAGjD,OAAOD,CAAAA,EAAiB,QAAA,CAAA,CAE1B,MAAME,iCAAAA,CACJ,MAAA,CAAAJ,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAMC,CAAAA,CACN,WAAA,CAAAJ,CACF,CAAC,CAAA,CACDO,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,CAAAJ,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAMO,CAAAA,CAAO,MAAA,CACb,WAAA,CAAAV,CACF,CAAC,CAAA,CAEDO,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-DCTVGKDZ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { ConsentBundleType } from '@transcend-io/privacy-types';\nimport { mapSeries } from '../../../lib/bluebird-replace';\n\nimport { logger } from '../../../logger';\nimport { updateConsentManagerVersionToLatest } from '../../../lib/consent-manager';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\n\ninterface 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 // 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"]}
|
package/dist/impl-DTFM3SWD.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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 _chunkMQNOIHZNcjs = require('./chunk-MQNOIHZN.cjs');var _chunkKOV2SQO2cjs = require('./chunk-KOV2SQO2.cjs');var _chunkJ72CSV4Rcjs = require('./chunk-J72CSV4R.cjs');require('./chunk-UEGX6GZ2.cjs');require('./chunk-SAEKBZGF.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function Q({auth:F,dataFlowsYmlFolder:a,output:x,ignoreYmls:C=[],transcendUrl:k}){a||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Missing required arg: --dataFlowsYmlFolder=./working/data-flows/")),process.exit(1)),(!_fs.existsSync.call(void 0, a)||!_fs.lstatSync.call(void 0, a).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${a}"`)),process.exit(1));let N=C.map(t=>t.split(".")[0]),l=_chunkJ72CSV4Rcjs.c.call(void 0, a).map(t=>{let{"data-flows":o=[]}=_chunkKOV2SQO2cjs.d.call(void 0, _path.join.call(void 0, a,t)),{adTechDataSilos:m,siteTechDataSilos:r}=_chunkMQNOIHZNcjs.a.call(void 0, o,{serviceToSupportedIntegration:d,serviceToTitle:u});return{adTechDataSilos:m,siteTechDataSilos:r,organizationName:t.split(".")[0]}}),s={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o,organizationName:m})=>{[...t,...o].forEach(e=>{let n=e["outer-type"]||e.integrationName;s[n]||(s[n]=[]),s[n].push(m),s[n]=[...new Set(s[n])]})});let p=[...new Set(l.map(({adTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],f=_chunkYVY4TZ2Ocjs.$b.call(void 0, [...new Set(l.map(({siteTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],p),i={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o})=>{[...t,...o].forEach(r=>{let e=r["outer-type"]||r.integrationName,n=_optionalChain([r, 'access', _ => _.attributes, 'optionalAccess', _2 => _2.find, 'call', _3 => _3(E=>E.key==="Found On Domain")]);i[e]||(i[e]=[]),i[e].push(..._optionalChain([n, 'optionalAccess', _4 => _4.values])||[]),i[e]=[...new Set(i[e])]})});let A=_chunkYVY4TZ2Ocjs.xe.call(void 0, k,F),{serviceToTitle:u,serviceToSupportedIntegration:d}=await _chunkYVY4TZ2Ocjs.ve.call(void 0, A),D=[...p,...f].map(t=>({title:u[t],...d[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Business Units",values:_chunkYVY4TZ2Ocjs.$b.call(void 0, s[t]||[],N)},{key:"Found On Domain",values:i[t]||[]}]}));_chunkZUNVPK23cjs.a.log(`Total Services: ${D.length}`),_chunkZUNVPK23cjs.a.log(`Ad Tech Services: ${p.length}`),_chunkZUNVPK23cjs.a.log(`Site Tech Services: ${f.length}`),_chunkKOV2SQO2cjs.e.call(void 0, x,{"data-silos":D})}exports.deriveDataSilosFromDataFlowsCrossInstance = Q;
|
|
2
|
-
//# sourceMappingURL=impl-DTFM3SWD.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-DTFM3SWD.cjs","../src/commands/inventory/derive-data-silos-from-data-flows-cross-instance/impl.ts"],"names":["deriveDataSilosFromDataFlowsCrossInstance","auth","dataFlowsYmlFolder","output","ignoreYmls","transcendUrl","logger","colors","existsSync","lstatSync","instancesToIgnore","x","dataSiloInputs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","serviceToSupportedIntegration","serviceToTitle","serviceToInstance","organizationName","dataSilo","service","adTechIntegrations","silo","siteTechIntegrations","difference_default","serviceToFoundOnDomain","foundOnDomain","attr","client","buildTranscendGraphQLClient","fetchAndIndexCatalogs","dataSilos"],"mappings":"AAAA,quBAAwC,wDAAgD,wDAAyC,gCAA6B,gCAA6B,wDAA0D,wDAAyC,gCAA6B,gCAA6B,gCAA6B,4BCKhW,gFAEF,wBAImB,MAetC,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CAAa,CAAC,CAAA,CACd,YAAA,CAAAC,CACF,CAAA,CACe,CAEVH,CAAAA,EAAAA,CACHI,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,kEACF,CACF,CAAA,CACA,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAKd,CAACC,4BAAAA,CAA6B,CAAA,EAC9B,CAACC,2BAAAA,CAA4B,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAE3CH,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BL,CAAkB,CAAA,CAAA,CAAG,CAAC,CAAA,CACzE,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIhB,IAAMQ,CAAAA,CAAoBN,CAAAA,CAAW,GAAA,CAAKO,CAAAA,EAAMA,CAAAA,CAAE,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAC,CAAA,CAGzDC,CAAAA,CAAiBC,iCAAAA,CAA4B,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAc,CAEtE,GAAM,CAAE,YAAA,CAAcC,CAAAA,CAAY,CAAC,CAAE,CAAA,CAAIC,iCAAAA,wBACvCC,CAAKf,CAAoBY,CAAS,CACpC,CAAA,CAGM,CAAE,eAAA,CAAAI,CAAAA,CAAiB,iBAAA,CAAAC,CAAkB,CAAA,CAAIC,iCAAAA,CAC7CL,CACA,CACE,6BAAA,CAAAM,CAAAA,CACA,cAAA,CAAAC,CACF,CACF,CAAA,CAEA,MAAO,CACL,eAAA,CAAAJ,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAkBL,CAAAA,CAAU,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAC1C,CACF,CAAC,CAAA,CAGKS,CAAAA,CAAiD,CAAC,CAAA,CACxDX,CAAAA,CAAe,OAAA,CACb,CAAC,CAAE,eAAA,CAAAM,CAAAA,CAAiB,iBAAA,CAAAC,CAAAA,CAAmB,gBAAA,CAAAK,CAAiB,CAAA,CAAA,EAAM,CACvC,CAAC,GAAGN,CAAAA,CAAiB,GAAGC,CAAiB,CAAA,CACjD,OAAA,CAASM,CAAAA,EAAa,CACjC,IAAMC,CAAAA,CAAUD,CAAAA,CAAS,YAAY,CAAA,EAAKA,CAAAA,CAAS,eAAA,CAE9CF,CAAAA,CAAkBG,CAAO,CAAA,EAAA,CAC5BH,CAAAA,CAAkBG,CAAO,CAAA,CAAI,CAAC,CAAA,CAAA,CAEhCH,CAAAA,CAAkBG,CAAO,CAAA,CAAG,IAAA,CAAKF,CAAgB,CAAA,CACjDD,CAAAA,CAAkBG,CAAO,CAAA,CAAI,CAAC,GAAG,IAAI,GAAA,CAAIH,CAAAA,CAAkBG,CAAO,CAAC,CAAC,CACtE,CAAC,CACH,CACF,CAAA,CAGA,IAAMC,CAAAA,CAAqB,CACzB,GAAG,IAAI,GAAA,CACLf,CAAAA,CACG,GAAA,CAAI,CAAC,CAAE,eAAA,CAAAM,CAAgB,CAAA,CAAA,EACtBA,CAAAA,CAAgB,GAAA,CACbU,CAAAA,EAASA,CAAAA,CAAK,YAAY,CAAA,EAAKA,CAAAA,CAAK,eACvC,CACF,CAAA,CACC,IAAA,CAAK,CACV,CACF,CAAA,CAGMC,CAAAA,CAAuBC,kCAAAA,CAEzB,GAAG,IAAI,GAAA,CACLlB,CAAAA,CACG,GAAA,CAAI,CAAC,CAAE,iBAAA,CAAAO,CAAkB,CAAA,CAAA,EACxBA,CAAAA,CAAkB,GAAA,CACfS,CAAAA,EAASA,CAAAA,CAAK,YAAY,CAAA,EAAKA,CAAAA,CAAK,eACvC,CACF,CAAA,CACC,IAAA,CAAK,CACV,CACF,CAAA,CACAD,CACF,CAAA,CAGMI,CAAAA,CAAsD,CAAC,CAAA,CAC7DnB,CAAAA,CAAe,OAAA,CAAQ,CAAC,CAAE,eAAA,CAAAM,CAAAA,CAAiB,iBAAA,CAAAC,CAAkB,CAAA,CAAA,EAAM,CAC5C,CAAC,GAAGD,CAAAA,CAAiB,GAAGC,CAAiB,CAAA,CACjD,OAAA,CAASM,CAAAA,EAAa,CACjC,IAAMC,CAAAA,CAAUD,CAAAA,CAAS,YAAY,CAAA,EAAKA,CAAAA,CAAS,eAAA,CAC7CO,CAAAA,iBAAgBP,CAAAA,mBAAS,UAAA,6BAAY,IAAA,mBACxCQ,CAAAA,EAASA,CAAAA,CAAK,GAAA,GAAQ,iBACzB,GAAA,CAEKF,CAAAA,CAAuBL,CAAO,CAAA,EAAA,CACjCK,CAAAA,CAAuBL,CAAO,CAAA,CAAI,CAAC,CAAA,CAAA,CAErCK,CAAAA,CAAuBL,CAAO,CAAA,CAAG,IAAA,CAAK,mBAAIM,CAAAA,6BAAe,QAAA,EAAU,CAAC,CAAE,CAAA,CACtED,CAAAA,CAAuBL,CAAO,CAAA,CAAI,CAChC,GAAG,IAAI,GAAA,CAAIK,CAAAA,CAAuBL,CAAO,CAAC,CAC5C,CACF,CAAC,CACH,CAAC,CAAA,CAGD,IAAMQ,CAAAA,CAASC,kCAAAA,CAA4B9B,CAAcJ,CAAI,CAAA,CACvD,CAAE,cAAA,CAAAqB,CAAAA,CAAgB,6BAAA,CAAAD,CAA8B,CAAA,CACpD,MAAMe,kCAAAA,CAA4B,CAAA,CAG9BC,CAAAA,CAAY,CAAC,GAAGV,CAAAA,CAAoB,GAAGE,CAAoB,CAAA,CAAE,GAAA,CAChEH,CAAAA,EAAAA,CAAa,CACZ,KAAA,CAAOJ,CAAAA,CAAeI,CAAO,CAAA,CAC7B,GAAIL,CAAAA,CAA8BK,CAAO,CAAA,CACrC,CAAE,eAAA,CAAiBA,CAAQ,CAAA,CAC3B,CAAE,eAAA,CAAiB,eAAA,CAAiB,YAAA,CAAcA,CAAQ,CAAA,CAC9D,UAAA,CAAY,CACV,CACE,GAAA,CAAK,WAAA,CACL,MAAA,CAAQ,CAAC,SAAS,CACpB,CAAA,CACA,CACE,GAAA,CAAK,gBAAA,CACL,MAAA,CAAQI,kCAAAA,CACNP,CAAkBG,CAAO,CAAA,EAAK,CAAC,CAAA,CAC/BhB,CACF,CACF,CAAA,CACA,CACE,GAAA,CAAK,iBAAA,CACL,MAAA,CAAQqB,CAAAA,CAAuBL,CAAO,CAAA,EAAK,CAAC,CAC9C,CACF,CACF,CAAA,CACF,CAAA,CAGApB,mBAAAA,CAAO,GAAA,CAAI,CAAA,gBAAA,EAAmB+B,CAAAA,CAAU,MAAM,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-DTFM3SWD.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'path';\nimport { difference } from 'lodash-es';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { dataFlowsToDataSilos } from '../../../lib/consent-manager/dataFlowsToDataSilos';\nimport { DataFlowInput } from '../../../codecs';\nimport { existsSync, lstatSync } from 'fs';\nimport { listFiles } from '../../../lib/api-keys';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\n\ninterface DeriveDataSilosFromDataFlowsCrossInstanceCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n output: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlowsCrossInstance(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n output,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCrossInstanceCommandFlags,\n): Promise<void> {\n // Ensure folder is passed to dataFlowsYmlFolder\n if (!dataFlowsYmlFolder) {\n logger.error(\n colors.red(\n 'Missing required arg: --dataFlowsYmlFolder=./working/data-flows/',\n ),\n );\n process.exit(1);\n }\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 process.exit(1);\n }\n\n // Ignore the data flows in these yml files\n const instancesToIgnore = ignoreYmls.map((x) => x.split('.')[0]);\n\n // Map over each data flow yml file and convert to data silo configurations\n const dataSiloInputs = listFiles(dataFlowsYmlFolder).map((directory) => {\n // read in the data flows for a specific instance\n const { 'data-flows': dataFlows = [] } = readTranscendYaml(\n join(dataFlowsYmlFolder, directory),\n );\n\n // map the data flows to data silos\n const { adTechDataSilos, siteTechDataSilos } = dataFlowsToDataSilos(\n dataFlows as DataFlowInput[],\n {\n serviceToSupportedIntegration,\n serviceToTitle,\n },\n );\n\n return {\n adTechDataSilos,\n siteTechDataSilos,\n organizationName: directory.split('.')[0],\n };\n });\n\n // Mapping from service name to instances that have that service\n const serviceToInstance: { [k in string]: string[] } = {};\n dataSiloInputs.forEach(\n ({ adTechDataSilos, siteTechDataSilos, organizationName }) => {\n const allDataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n allDataSilos.forEach((dataSilo) => {\n const service = dataSilo['outer-type'] || dataSilo.integrationName;\n // create mapping to instance\n if (!serviceToInstance[service]) {\n serviceToInstance[service] = [];\n }\n serviceToInstance[service]!.push(organizationName);\n serviceToInstance[service] = [...new Set(serviceToInstance[service])];\n });\n },\n );\n\n // List of ad tech integrations\n const adTechIntegrations = [\n ...new Set(\n dataSiloInputs\n .map(({ adTechDataSilos }) =>\n adTechDataSilos.map(\n (silo) => silo['outer-type'] || silo.integrationName,\n ),\n )\n .flat(),\n ),\n ];\n\n // List of site tech integrations\n const siteTechIntegrations = difference(\n [\n ...new Set(\n dataSiloInputs\n .map(({ siteTechDataSilos }) =>\n siteTechDataSilos.map(\n (silo) => silo['outer-type'] || silo.integrationName,\n ),\n )\n .flat(),\n ),\n ],\n adTechIntegrations,\n );\n\n // Mapping from service name to list of\n const serviceToFoundOnDomain: { [k in string]: string[] } = {};\n dataSiloInputs.forEach(({ adTechDataSilos, siteTechDataSilos }) => {\n const allDataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n allDataSilos.forEach((dataSilo) => {\n const service = dataSilo['outer-type'] || dataSilo.integrationName;\n const foundOnDomain = dataSilo.attributes?.find(\n (attr) => attr.key === 'Found On Domain',\n );\n // create mapping to instance\n if (!serviceToFoundOnDomain[service]) {\n serviceToFoundOnDomain[service] = [];\n }\n serviceToFoundOnDomain[service]!.push(...(foundOnDomain?.values || []));\n serviceToFoundOnDomain[service] = [\n ...new Set(serviceToFoundOnDomain[service]),\n ];\n });\n });\n\n // Fetch all integrations in the catalog\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { serviceToTitle, serviceToSupportedIntegration } =\n await fetchAndIndexCatalogs(client);\n\n // construct the aggregated data silo inputs\n const dataSilos = [...adTechIntegrations, ...siteTechIntegrations].map(\n (service) => ({\n title: serviceToTitle[service],\n ...(serviceToSupportedIntegration[service]\n ? { integrationName: service }\n : { integrationName: 'promptAPerson', 'outer-type': service }),\n attributes: [\n {\n key: 'Tech Type',\n values: ['Ad Tech'],\n },\n {\n key: 'Business Units',\n values: difference(\n serviceToInstance[service] || [],\n instancesToIgnore,\n ),\n },\n {\n key: 'Found On Domain',\n values: serviceToFoundOnDomain[service] || [],\n },\n ],\n }),\n );\n\n // Log output\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechIntegrations.length}`);\n logger.log(`Site Tech Services: ${siteTechIntegrations.length}`);\n\n // Write to yaml\n writeTranscendYaml(output, {\n 'data-silos': dataSilos,\n });\n}\n"]}
|
package/dist/impl-GBTW2VLR.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkXXGX7FUCcjs = require('./chunk-XXGX7FUC.cjs');var _chunkZVK4HIDFcjs = require('./chunk-ZVK4HIDF.cjs');require('./chunk-4J2KYJVS.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function N({file:u,transcendUrl:p,auth:g,sombraAuth:c,dataSiloId:v,actions:b,pageLimit:r,skipRequestCount:n,chunkSize:e}){n&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(e)||e<=0||e%r!==0)&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Invalid chunk size: "${e}". Must be a positive integer that is a multiple of ${r}.`)),process.exit(1));let{baseName:C,extension:$}=_chunkZVK4HIDFcjs.d.call(void 0, u),a=0;await _chunkXXGX7FUCcjs.g.call(void 0, {transcendUrl:p,apiPageSize:r,savePageSize:e,onSave:i=>{let s=`${C}-${a}${$}`;_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Saving ${i.length} identifiers to file "${s}"`));let I=_chunkYVY4TZ2Ocjs.fc.call(void 0, i.map(P=>Object.keys(P)).flat());return _chunkZVK4HIDFcjs.c.call(void 0, s,i,I),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${i.length} identifiers to file "${s}"`)),a+=1,Promise.resolve()},actions:b,auth:g,sombraAuth:c,dataSiloId:v,skipRequestCount:n})}exports.pullIdentifiers = N;
|
|
2
|
-
//# sourceMappingURL=impl-GBTW2VLR.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-GBTW2VLR.cjs","../src/commands/request/cron/pull-identifiers/impl.ts"],"names":["pullIdentifiers","file","transcendUrl","auth","sombraAuth","dataSiloId","actions","pageLimit","skipRequestCount","chunkSize","logger","colors","baseName","extension","parseFilePath","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunk","numberedFileName"],"mappings":"AAAA,iOAAwC,wDAAgD,gCAA6B,wDAA0C,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gFCC5Q,MAwBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACXD,CAAAA,EACFE,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,uEACF,CACF,CAAA,CAAA,CAIA,MAAA,CAAO,KAAA,CAAMF,CAAS,CAAA,EACtBA,CAAAA,EAAa,CAAA,EACbA,CAAAA,CAAYF,CAAAA,GAAc,CAAA,CAAA,EAAA,CAE1BG,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,qBAAA,EAAwBF,CAAS,CAAA,oDAAA,EAAuDF,CAAS,CAAA,CAAA,CACnG,CACF,CAAA,CACA,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,GAAM,CAAE,QAAA,CAAAK,CAAAA,CAAU,SAAA,CAAAC,CAAU,CAAA,CAAIC,iCAAAA,CAAkB,CAAA,CAC9CC,CAAAA,CAAY,CAAA,CAsBhB,MAAMC,iCAAAA,CACJ,YAAA,CAAAd,CAAAA,CACA,WAAA,CAAaK,CAAAA,CACb,YAAA,CAAcE,CAAAA,CACd,MAAA,CAxBcQ,CAAAA,EAAmD,CACjE,IAAMC,CAAAA,CAAmB,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-GBTW2VLR.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport colors from 'colors';\n\nimport { logger } from '../../../../logger';\nimport { uniq } from 'lodash-es';\nimport {\n CsvFormattedIdentifier,\n parseFilePath,\n pullChunkedCustomSiloOutstandingIdentifiers,\n writeCsv,\n} from '../../../../lib/cron';\nimport { RequestAction } from '@transcend-io/privacy-types';\n\ninterface PullIdentifiersCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n actions: RequestAction[];\n pageLimit: number;\n skipRequestCount: boolean;\n chunkSize: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n actions,\n pageLimit,\n skipRequestCount,\n chunkSize,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n process.exit(1);\n }\n\n const { baseName, extension } = parseFilePath(file);\n let fileCount = 0;\n\n const onSave = (chunk: CsvFormattedIdentifier[]): Promise<void> => {\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n logger.info(\n colors.blue(\n `Saving ${chunk.length} identifiers to file \"${numberedFileName}\"`,\n ),\n );\n\n const headers = uniq(chunk.map((d) => Object.keys(d)).flat());\n writeCsv(numberedFileName, chunk, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunk.length} identifiers to file \"${numberedFileName}\"`,\n ),\n );\n fileCount += 1;\n return Promise.resolve();\n };\n\n // Pull down outstanding identifiers\n await pullChunkedCustomSiloOutstandingIdentifiers({\n transcendUrl,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n actions,\n auth,\n sombraAuth,\n dataSiloId,\n skipRequestCount,\n });\n}\n"]}
|
package/dist/impl-HI27O5MJ.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkRPJHDKU6cjs = require('./chunk-RPJHDKU6.cjs');require('./chunk-J72CSV4R.cjs');require('./chunk-UEGX6GZ2.cjs');require('./chunk-SAEKBZGF.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkEG4L6YAJcjs = require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _querystring = require('query-string');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);async function m({scanPath:t,fileGlobs:e,ignoreDirs:g,config:p}){let{ignoreDirs:f,supportedFiles:s,scanFunction:a}=p,n=e===""?s:s.concat(e.split(",")),l=[...g.split(","),...f].filter(o=>o.length>0);try{let o=await _fastglob2.default.call(void 0, `${t}/**/${n.join("|")}`,{ignore:l.map(i=>`${t}/**/${i}`),unique:!0,onlyFiles:!0});_chunkZUNVPK23cjs.a.info(`Scanning: ${o.length} files`);let $=o.map(i=>a(i)).flat().map(i=>i.softwareDevelopmentKits||[]).flat(),d=[...new Set($.map(i=>i.name))];return _chunkZUNVPK23cjs.a.info(`Found: ${d.length} unique dependencies`),d.map(i=>({name:i,resourceId:`${t}/**/${i}`,useStrictClassifier:!0}))}catch(o){throw new Error(`Error scanning globs ${m} with error: ${o}`)}}async function k({scanPath:t,dataSiloId:e,auth:g,fileGlobs:p,ignoreDirs:f,transcendUrl:s}){let a=_chunkYVY4TZ2Ocjs.xe.call(void 0, s,g),n=await _chunkYVY4TZ2Ocjs.Wd.call(void 0, a,e),l=_chunkRPJHDKU6cjs.a[n.dataSilo.type];l||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`This plugin "${n.dataSilo.type}" is not supported for offline silo discovery.`)),process.exit(1));let o=await m({scanPath:t,fileGlobs:p,ignoreDirs:f,config:l});await _chunkYVY4TZ2Ocjs.te.call(void 0, a,n.id,o);let c=new URL(_chunkEG4L6YAJcjs.b);c.pathname="/data-map/data-inventory/silo-discovery/triage",c.search=_querystring.stringify.call(void 0, {filters:JSON.stringify({pluginIds:[n.id]})}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Scan found ${o.length} potential data silos at ${t}! View at '${c.href}'
|
|
2
|
-
|
|
3
|
-
NOTE: it may take 2-3 minutes for scan results to appear in the UI.`))}exports.discoverSilos = k;
|
|
4
|
-
//# sourceMappingURL=impl-HI27O5MJ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-HI27O5MJ.cjs","../src/commands/inventory/discover-silos/impl.ts","../src/lib/code-scanning/findFilesToScan.ts"],"names":["findFilesToScan","scanPath","fileGlobs","ignoreDirs","config","IGNORE_DIRS","supportedFiles","scanFunction","globsToSupport","dirsToIgnore","dir","filesToScan","fastGlob"],"mappings":"AAAA,iOAAwC,gCAA6B,gCAA6B,gCAA6B,wDAA0D,wDAAyC,wDAAyC,gCAA6B,gCAA6B,2CCC3S,gFAEP,yFCHE,MAsBrB,SAAsBA,CAAAA,CAAgB,CACpC,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CASuC,CACrC,GAAM,CAAE,UAAA,CAAYC,CAAAA,CAAa,cAAA,CAAAC,CAAAA,CAAgB,YAAA,CAAAC,CAAa,CAAA,CAAIH,CAAAA,CAC5DI,CAAAA,CACJN,CAAAA,GAAc,EAAA,CACVI,CAAAA,CACAA,CAAAA,CAAe,MAAA,CAAOJ,CAAAA,CAAU,KAAA,CAAM,GAAG,CAAC,CAAA,CAC1CO,CAAAA,CAAe,CAAC,GAAGN,CAAAA,CAAW,KAAA,CAAM,GAAG,CAAA,CAAG,GAAGE,CAAW,CAAA,CAAE,MAAA,CAC7DK,CAAAA,EAAQA,CAAAA,CAAI,MAAA,CAAS,CACxB,CAAA,CACA,GAAI,CACF,IAAMC,CAAAA,CAAwB,MAAMC,gCAAAA,CAClC,EAAA;ADoByB;AAI/B,oEAAA","file":"/home/runner/work/cli/cli/dist/impl-HI27O5MJ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { stringify } from 'query-string';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { ADMIN_DASH } from '../../../constants';\nimport {\n fetchActiveSiloDiscoPlugin,\n buildTranscendGraphQLClient,\n uploadSiloDiscoveryResults,\n} from '../../../lib/graphql';\nimport { findFilesToScan } from '../../../lib/code-scanning/findFilesToScan';\nimport { SILO_DISCOVERY_CONFIGS } from '../../../lib/code-scanning';\n\ninterface DiscoverSilosCommandFlags {\n scanPath: string;\n dataSiloId: string;\n auth: string;\n fileGlobs: string;\n ignoreDirs: string;\n transcendUrl: string;\n}\n\nexport async function discoverSilos(\n this: LocalContext,\n {\n scanPath,\n dataSiloId,\n auth,\n fileGlobs,\n ignoreDirs,\n transcendUrl,\n }: DiscoverSilosCommandFlags,\n): Promise<void> {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const plugin = await fetchActiveSiloDiscoPlugin(client, dataSiloId);\n\n const config = SILO_DISCOVERY_CONFIGS[plugin.dataSilo.type];\n if (!config) {\n logger.error(\n colors.red(\n `This plugin \"${plugin.dataSilo.type}\" is not supported for offline silo discovery.`,\n ),\n );\n process.exit(1);\n }\n\n const results = await findFilesToScan({\n scanPath,\n fileGlobs,\n ignoreDirs,\n config,\n });\n\n await uploadSiloDiscoveryResults(client, plugin.id, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/data-map/data-inventory/silo-discovery/triage';\n newUrl.search = stringify({\n filters: JSON.stringify({ pluginIds: [plugin.id] }),\n });\n\n // Indicate success\n logger.info(\n colors.green(\n `Scan found ${results.length} potential data silos at ${scanPath}! ` +\n `View at '${newUrl.href}' ` +\n '\\n\\n NOTE: it may take 2-3 minutes for scan results to appear in the UI.',\n ),\n );\n}\n","import fastGlob from 'fast-glob';\nimport { logger } from '../../logger';\nimport { CodeScanningConfig } from './types';\n\nexport interface SiloDiscoveryRawResults {\n /** The name of the potential data silo entry */\n name: string;\n /** A unique UUID (represents the same resource across different silo discovery runs) */\n resourceId: string;\n /** Any hosts associated with the entry */\n host?: string;\n /** Type of data silo */\n type?: string | undefined;\n}\n\n/**\n * Helper to scan for data silos in all package.json files that it can find in a directory\n *\n * @deprecated TODO: https://transcend.height.app/T-32325 - use code scanning instead\n * @param options - Options\n * @returns the list of integrations\n */\nexport async function findFilesToScan({\n scanPath,\n fileGlobs,\n ignoreDirs,\n config,\n}: {\n /** Where to look for package.json files */\n scanPath: string;\n /** Globs to look for */\n fileGlobs: string;\n /** The directories to ignore (excludes node_modules and serverless-build) */\n ignoreDirs: string;\n /** Silo Discovery configuration */\n config: CodeScanningConfig;\n}): Promise<SiloDiscoveryRawResults[]> {\n const { ignoreDirs: IGNORE_DIRS, supportedFiles, scanFunction } = config;\n const globsToSupport =\n fileGlobs === ''\n ? supportedFiles\n : supportedFiles.concat(fileGlobs.split(','));\n const dirsToIgnore = [...ignoreDirs.split(','), ...IGNORE_DIRS].filter(\n (dir) => dir.length > 0,\n );\n try {\n const filesToScan: string[] = await fastGlob(\n `${scanPath}/**/${globsToSupport.join('|')}`,\n {\n ignore: dirsToIgnore.map((dir: string) => `${scanPath}/**/${dir}`),\n unique: true,\n onlyFiles: true,\n },\n );\n logger.info(`Scanning: ${filesToScan.length} files`);\n const allPackages = filesToScan\n .map((filePath: string) => scanFunction(filePath))\n .flat();\n const allSdks = allPackages\n .map((appPackage) => appPackage.softwareDevelopmentKits || [])\n .flat();\n const uniqueDeps = new Set(allSdks.map((sdk) => sdk.name));\n const deps = [...uniqueDeps];\n logger.info(`Found: ${deps.length} unique dependencies`);\n return deps.map((dep) => ({\n name: dep,\n resourceId: `${scanPath}/**/${dep}`,\n useStrictClassifier: true,\n }));\n } catch (error) {\n throw new Error(\n `Error scanning globs ${findFilesToScan} with error: ${error}`,\n );\n }\n}\n"]}
|
package/dist/impl-I3RNGLKH.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP6ZHBB6Pcjs = require('./chunk-P6ZHBB6P.cjs');require('./chunk-ZVK4HIDF.cjs');require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function c({auth:t,transcendUrl:r,file:e,enricherId:i,concurrency:s,markSilent:o,sombraAuth:a}){await _chunkP6ZHBB6Pcjs.d.call(void 0, {file:e,transcendUrl:r,enricherId:i,concurrency:s,markSilent:o,auth:t,sombraAuth:a})}exports.pushIdentifiers = c;
|
|
2
|
-
//# sourceMappingURL=impl-I3RNGLKH.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-I3RNGLKH.cjs","../src/commands/request/preflight/push-identifiers/impl.ts"],"names":["pushIdentifiers","auth","transcendUrl","file","enricherId","concurrency","markSilent","sombraAuth","pushManualEnrichmentIdentifiersFromCsv"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCanP,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACf,MAAMC,iCAAAA,CACJ,IAAA,CAAAL,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAL,CAAAA,CACA,UAAA,CAAAM,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-I3RNGLKH.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pushManualEnrichmentIdentifiersFromCsv } from '../../../../lib/manual-enrichment';\n\ninterface PushIdentifiersCommandFlags {\n auth: string;\n enricherId: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n markSilent: boolean;\n concurrency: number;\n}\n\nexport async function pushIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n enricherId,\n concurrency,\n markSilent,\n sombraAuth,\n }: PushIdentifiersCommandFlags,\n): Promise<void> {\n await pushManualEnrichmentIdentifiersFromCsv({\n file,\n transcendUrl,\n enricherId,\n concurrency,\n markSilent,\n auth,\n sombraAuth,\n });\n}\n"]}
|
package/dist/impl-IXNKRWC7.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-XXGX7FUC.cjs');var _chunkZVK4HIDFcjs = require('./chunk-ZVK4HIDF.cjs');var _chunk5SI74STEcjs = require('./chunk-5SI74STE.cjs');require('./chunk-SDZR3H23.cjs');require('./chunk-4J2KYJVS.cjs');require('./chunk-UEGX6GZ2.cjs');require('./chunk-SAEKBZGF.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function h({auth:a,partition:m,sombraAuth:c,file:p,transcendUrl:f,timestampBefore:e,timestampAfter:r,identifiers:n=[],concurrency:l}){let g=await _chunkYVY4TZ2Ocjs.ye.call(void 0, f,a,c),u=await _chunk5SI74STEcjs.j.call(void 0, g,{partition:m,filterBy:{...e?{timestampBefore:e.toISOString()}:{},...r?{timestampAfter:r.toISOString()}:{},...n.length>0?{identifiers:n}:{}},limit:l});_chunkZVK4HIDFcjs.c.call(void 0, p,u.map(t=>({...t,purposes:JSON.stringify(t.purposes),...t.purposes})))}exports.pullConsentPreferences = h;
|
|
2
|
-
//# sourceMappingURL=impl-IXNKRWC7.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-IXNKRWC7.cjs","../src/commands/consent/pull-consent-preferences/impl.ts"],"names":["pullConsentPreferences","auth","partition","sombraAuth","file","transcendUrl","timestampBefore","timestampAfter","identifiers","concurrency","sombra","createSombraGotInstance","preferences","fetchConsentPreferences","writeCsv","pref"],"mappings":"AAAA,yGAA4B,wDAAyC,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCkBhY,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,CAEf,IAAMC,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBN,CAAcJ,CAAAA,CAAME,CAAU,CAAA,CAGrES,CAAAA,CAAc,MAAMC,iCAAAA,CAAwBH,CAAQ,CACxD,SAAA,CAAAR,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,CAGDK,iCAAAA,CACEV,CACAQ,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-IXNKRWC7.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';\n\ninterface 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 // 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"]}
|
package/dist/impl-IY2QSXYK.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkRPJHDKU6cjs = require('./chunk-RPJHDKU6.cjs');require('./chunk-J72CSV4R.cjs');require('./chunk-UEGX6GZ2.cjs');require('./chunk-SAEKBZGF.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkEG4L6YAJcjs = require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _child_process = require('child_process');var l='A repository name must be provided. You can specify using --repositoryName=$REPO_NAME or by ensuring the command "git config --get remote.origin.url" returns the name of the repository';async function S({auth:d,scanPath:o,ignoreDirs:f,repositoryName:u,transcendUrl:y}){let e=u;if(!e)try{let t=_child_process.execSync.call(void 0, `cd ${o} && git config --get remote.origin.url`).toString("utf-8").trim();[e]=t.includes("https:")?t.split("/").slice(3).join("/").split("."):(t.split(":").pop()||"").split("."),e||(_chunkZUNVPK23cjs.a.error(_colors2.default.red(l)),process.exit(1))}catch(a){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${l} - Got error: ${a.message}`)),process.exit(1)}let h=_chunkYVY4TZ2Ocjs.xe.call(void 0, y,d),i=await _chunkRPJHDKU6cjs.b.call(void 0, {scanPath:o,ignoreDirs:f,repositoryName:e});await _chunkYVY4TZ2Ocjs.se.call(void 0, h,i);let s=new URL(_chunkEG4L6YAJcjs.b);s.pathname="/code-scanning/code-packages",_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Scan found ${i.length} packages at ${o}! View results at '${s.href}'`))}exports.scanPackages = S;
|
|
2
|
-
//# sourceMappingURL=impl-IY2QSXYK.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-IY2QSXYK.cjs","../src/commands/inventory/scan-packages/impl.ts"],"names":["REPO_ERROR","scanPackages","auth","scanPath","ignoreDirs","repositoryName","transcendUrl","gitRepositoryName","url","execSync","logger","colors","err"],"mappings":"AAAA,iOAAwC,gCAA6B,gCAA6B,gCAA6B,wDAAkD,wDAAyC,wDAAyC,gCAA6B,gCAA6B,gFCE1S,8CAOM,IAEnBA,CAAAA,CACJ,0LAAA,CAYF,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CAEf,IAAIC,CAAAA,CAAoBF,CAAAA,CACxB,EAAA,CAAI,CAACE,CAAAA,CACH,GAAI,CAKF,IAAMC,CAAAA,CAJOC,qCAAAA,CACX,GAAA,EAAMN,CAAQ,CAAA,sCAAA,CAChB,CAAA,CAEiB,QAAA,CAAS,OAAO,CAAA,CAAE,IAAA,CAAK,CAAA,CACxC,CAACI,CAAiB,CAAA,CAAKC,CAAAA,CAAI,QAAA,CAAS,QAAQ,CAAA,CAExCA,CAAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAAE,KAAA,CAAM,CAAC,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA,CAAE,KAAA,CAAM,GAAG,CAAA,CAAA,CAD1CA,CAAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAAE,GAAA,CAAI,CAAA,EAAK,EAAA,CAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAErCD,CAAAA,EAAAA,CACHG,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAIX,CAAU,CAAC,CAAA,CACnC,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAElB,CAAA,KAAA,CAASY,CAAAA,CAAK,CACZF,mBAAAA,CAAO,KAAA,CAAMC,gBAAAA,CAAO,GAAA,CAAI,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-IY2QSXYK.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { ADMIN_DASH } from '../../../constants';\nimport { findCodePackagesInFolder } from '../../../lib/code-scanning';\nimport {\n buildTranscendGraphQLClient,\n syncCodePackages,\n} from '../../../lib/graphql';\nimport { execSync } from 'child_process';\n\nconst REPO_ERROR =\n 'A repository name must be provided. ' +\n 'You can specify using --repositoryName=$REPO_NAME or by ensuring the ' +\n 'command \"git config --get remote.origin.url\" returns the name of the repository';\n\ninterface ScanPackagesCommandFlags {\n auth: string;\n scanPath: string;\n ignoreDirs?: string[];\n repositoryName?: string;\n transcendUrl: string;\n}\n\nexport async function scanPackages(\n this: LocalContext,\n {\n auth,\n scanPath,\n ignoreDirs,\n repositoryName,\n transcendUrl,\n }: ScanPackagesCommandFlags,\n): Promise<void> {\n // Ensure repository name is specified\n let gitRepositoryName = repositoryName;\n if (!gitRepositoryName) {\n try {\n const name = execSync(\n `cd ${scanPath} && git config --get remote.origin.url`,\n );\n // Trim and parse the URL\n const url = name.toString('utf-8').trim();\n [gitRepositoryName] = !url.includes('https:')\n ? (url.split(':').pop() || '').split('.')\n : url.split('/').slice(3).join('/').split('.');\n if (!gitRepositoryName) {\n logger.error(colors.red(REPO_ERROR));\n process.exit(1);\n }\n } catch (err) {\n logger.error(colors.red(`${REPO_ERROR} - Got error: ${err.message}`));\n process.exit(1);\n }\n }\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Scan the codebase to discovery packages\n const results = await findCodePackagesInFolder({\n scanPath,\n ignoreDirs,\n repositoryName: gitRepositoryName,\n });\n\n // Report scan to Transcend\n await syncCodePackages(client, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/code-scanning/code-packages';\n\n // Indicate success\n logger.info(\n colors.green(\n `Scan found ${results.length} packages at ${scanPath}! ` +\n `View results at '${newUrl.href}'`,\n ),\n );\n}\n"]}
|
package/dist/impl-KLXVHSVI.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function u({auth:e,transcendUrl:r,actions:a,statuses:n,requestIds:s,createdAtBefore:o,createdAtAfter:i,concurrency:c}){await _chunk4J2KYJVScjs.t.call(void 0, {transcendUrl:r,requestActions:a,auth:e,requestIds:s,statuses:n,concurrency:c,createdAtBefore:o,createdAtAfter:i})}exports.markSilent = u;
|
|
2
|
-
//# sourceMappingURL=impl-KLXVHSVI.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-KLXVHSVI.cjs","../src/commands/request/mark-silent/impl.ts"],"names":["markSilent","auth","transcendUrl","actions","statuses","requestIds","createdAtBefore","createdAtAfter","concurrency","markSilentPrivacyRequests"],"mappings":"AAAA,iIAAmC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCepL,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACf,MAAMC,iCAAAA,CACJ,YAAA,CAAAP,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,IAAA,CAAAF,CAAAA,CACA,UAAA,CAAAI,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,WAAA,CAAAI,CAAAA,CACA,eAAA,CAAAF,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,uBAAA","file":"/home/runner/work/cli/cli/dist/impl-KLXVHSVI.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { markSilentPrivacyRequests } from '../../../lib/requests';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\n\ninterface MarkSilentCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses?: RequestStatus[];\n requestIds?: string[];\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function markSilent(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n actions,\n statuses,\n requestIds,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n }: MarkSilentCommandFlags,\n): Promise<void> {\n await markSilentPrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestIds,\n statuses,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
|
package/dist/impl-L63MYKIO.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5SI74STEcjs = require('./chunk-5SI74STE.cjs');require('./chunk-SDZR3H23.cjs');require('./chunk-4J2KYJVS.cjs');require('./chunk-UEGX6GZ2.cjs');require('./chunk-SAEKBZGF.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function n({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e}){await _chunk5SI74STEcjs.b.call(void 0, {auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e})}exports.uploadDataFlowsFromCsv = n;
|
|
2
|
-
//# sourceMappingURL=impl-L63MYKIO.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-L63MYKIO.cjs","../src/commands/consent/upload-data-flows-from-csv/impl.ts"],"names":["uploadDataFlowsFromCsv","auth","trackerStatus","file","classifyService","transcendUrl"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCY7S,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACf,MAAML,iCAAAA,CACJ,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,mCAAA","file":"/home/runner/work/cli/cli/dist/impl-L63MYKIO.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { uploadDataFlowsFromCsv as uploadDataFlowsFromCsvHelper } from '../../../lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\n\ninterface UploadDataFlowsFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n classifyService: boolean;\n transcendUrl: string;\n}\n\nexport async function uploadDataFlowsFromCsv(\n this: LocalContext,\n {\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n }: UploadDataFlowsFromCsvCommandFlags,\n): Promise<void> {\n await uploadDataFlowsFromCsvHelper({\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n });\n}\n"]}
|
package/dist/impl-LBZ5KQCA.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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 _chunkXXGX7FUCcjs = require('./chunk-XXGX7FUC.cjs');require('./chunk-ZVK4HIDF.cjs');var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _iots = require('io-ts'); var t = _interopRequireWildcard(_iots);var p=t.type({"Request Id":t.string});async function R({auth:r,dataSiloId:i,file:e,transcendUrl:m}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${e}" from disk`));let n=_chunk4J2KYJVScjs.q.call(void 0, e,p);await _chunkXXGX7FUCcjs.f.call(void 0, {requestIds:n.map(d=>d["Request Id"]),transcendUrl:m,auth:r,dataSiloId:i})}exports.markRequestDataSilosCompleted = R;
|
|
2
|
-
//# sourceMappingURL=impl-LBZ5KQCA.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-LBZ5KQCA.cjs","../src/commands/request/system/mark-request-data-silos-completed/impl.ts"],"names":["RequestIdRow","markRequestDataSilosCompleted","auth","dataSiloId","file","transcendUrl","logger","colors","activeResults","readCsv","markRequestDataSiloIdsCompleted","request"],"mappings":"AAAA,mfAAwC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gFCCxP,qEACA,IAMbA,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,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,SAAA,EAAYH,CAAI,CAAA,WAAA,CAAa,CAAC,CAAA,CACzD,IAAMI,CAAAA,CAAgBC,iCAAAA,CAAQL,CAAMJ,CAAY,CAAA,CAEhD,MAAMU,iCAAAA,CACJ,UAAA,CAAYF,CAAAA,CAAc,GAAA,CAAKG,CAAAA,EAAYA,CAAAA,CAAQ,YAAY,CAAC,CAAA,CAChE,YAAA,CAAAN,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,0CAAA","file":"/home/runner/work/cli/cli/dist/impl-LBZ5KQCA.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';\n\nconst RequestIdRow = t.type({\n 'Request Id': t.string,\n});\n\ninterface 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 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"]}
|
package/dist/impl-LCGB6L6S.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-XXGX7FUC.cjs');var _chunkZVK4HIDFcjs = require('./chunk-ZVK4HIDF.cjs');var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function v({auth:a,transcendUrl:i,file:e,pageLimit:m,actions:c,sombraAuth:u,statuses:p,createdAtBefore:f,createdAtAfter:l,showTests:g}){let{requestsFormattedForCsv:t}=await _chunk4J2KYJVScjs.U.call(void 0, {transcendUrl:i,pageLimit:m,actions:c,statuses:p,auth:a,sombraAuth:u,createdAtBefore:f,createdAtAfter:l,isTest:g}),d=_chunkYVY4TZ2Ocjs.fc.call(void 0, t.map(y=>Object.keys(y)).flat());_chunkZVK4HIDFcjs.c.call(void 0, e,t,d),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${t.length} requests to file "${e}"`))}exports._export = v;
|
|
2
|
-
//# sourceMappingURL=impl-LCGB6L6S.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-LCGB6L6S.cjs","../src/commands/request/export/impl.ts"],"names":["_export","auth","transcendUrl","file","pageLimit","actions","sombraAuth","statuses","createdAtBefore","createdAtAfter","showTests","requestsFormattedForCsv","pullPrivacyRequests","headers","uniq_default","d","writeCsv","logger","colors"],"mappings":"AAAA,yMAA4B,wDAAyC,wDAAyC,wDAA0C,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gFCCrQ,MAwBnB,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,CACf,GAAM,CAAE,uBAAA,CAAAC,CAAwB,CAAA,CAAI,MAAMC,iCAAAA,CACxC,YAAA,CAAAV,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,CAGKG,CAAAA,CAAUC,kCAAAA,CACdH,CAAwB,GAAA,CAAKI,CAAAA,EAAM,MAAA,CAAO,IAAA,CAAKA,CAAC,CAAC,CAAA,CAAE,IAAA,CAAK,CAC1D,CAAA,CACAC,iCAAAA,CAASb,CAAMQ,CAAAA,CAAyBE,CAAO,CAAA,CAC/CI,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBP,CAAAA,CAAwB,MAAM,CAAA,mBAAA,EAAsBR,CAAI,CAAA,CAAA,CAChF,CACF,CACF,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-LCGB6L6S.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';\n\ninterface 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 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"]}
|
package/dist/impl-MHMLFQYV.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function e({auth:i,transcendUrl:o,enricherIds:r}){await _chunk4J2KYJVScjs.R.call(void 0, {transcendUrl:o,auth:i,enricherIds:r})}exports.skipPreflightJobs = e;
|
|
2
|
-
//# sourceMappingURL=impl-MHMLFQYV.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-MHMLFQYV.cjs","../src/commands/request/skip-preflight-jobs/impl.ts"],"names":["skipPreflightJobs","auth","transcendUrl","enricherIds"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCSzL,SAAsBA,CAAAA,CAEpB,CAAE,IAAA,CAAAC,CAAAA,CAAM,YAAA,CAAAC,CAAAA,CAAc,WAAA,CAAAC,CAAY,CAAA,CACnB,CACf,MAAMH,iCAAAA,CACJ,YAAA,CAAAE,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,WAAA,CAAAE,CACF,CAAC,CACH,CAAA,8BAAA","file":"/home/runner/work/cli/cli/dist/impl-MHMLFQYV.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { skipPreflightJobs as skipPreflightJobsHelper } from '../../../lib/requests';\n\ninterface SkipPreflightJobsCommandFlags {\n auth: string;\n enricherIds: string[];\n transcendUrl: string;\n}\n\nexport async function skipPreflightJobs(\n this: LocalContext,\n { auth, transcendUrl, enricherIds }: SkipPreflightJobsCommandFlags,\n): Promise<void> {\n await skipPreflightJobsHelper({\n transcendUrl,\n auth,\n enricherIds,\n });\n}\n"]}
|
package/dist/impl-MP7KOII5.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXXGX7FUCcjs = require('./chunk-XXGX7FUC.cjs');require('./chunk-ZVK4HIDF.cjs');require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function s({file:e,transcendUrl:r,auth:i,sombraAuth:o,dataSiloId:n}){await _chunkXXGX7FUCcjs.e.call(void 0, {file:e,transcendUrl:r,auth:i,sombraAuth:o,dataSiloId:n})}exports.markIdentifiersCompleted = s;
|
|
2
|
-
//# sourceMappingURL=impl-MP7KOII5.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-MP7KOII5.cjs","../src/commands/request/cron/mark-identifiers-completed/impl.ts"],"names":["markIdentifiersCompleted","file","transcendUrl","auth","sombraAuth","dataSiloId","pushCronIdentifiersFromCsv"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCWnP,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACf,MAAMC,iCAAAA,CACJ,IAAA,CAAAL,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,qCAAA","file":"/home/runner/work/cli/cli/dist/impl-MP7KOII5.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pushCronIdentifiersFromCsv } from '../../../../lib/cron';\n\ninterface MarkIdentifiersCompletedCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n}\n\nexport async function markIdentifiersCompleted(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n }: MarkIdentifiersCompletedCommandFlags,\n): Promise<void> {\n await pushCronIdentifiersFromCsv({\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n });\n}\n"]}
|
package/dist/impl-MZEAMC6V.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function y({auth:o,file:i,transcendUrl:n,cacheFilepath:a,requestReceiptFolder:r,sombraAuth:s,concurrency:l,attributes:c,isTest:d,isSilent:p,skipSendingReceipt:u,emailIsVerified:m,skipFilterStep:b,dryRun:g,debug:C,defaultPhoneCountryCode:f}){await _chunk4J2KYJVScjs.O.call(void 0, {cacheFilepath:a,requestReceiptFolder:r,file:i,auth:o,sombraAuth:s,concurrency:l,transcendUrl:n,defaultPhoneCountryCode:f,attributes:_chunk4J2KYJVScjs.n.call(void 0, c),debug:C,skipFilterStep:b,isSilent:p,skipSendingReceipt:u,emailIsVerified:m,isTest:d,dryRun:g})}exports.upload = y;
|
|
2
|
-
//# sourceMappingURL=impl-MZEAMC6V.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-MZEAMC6V.cjs","../src/commands/request/upload/impl.ts"],"names":["upload","auth","file","transcendUrl","cacheFilepath","requestReceiptFolder","sombraAuth","concurrency","attributes","isTest","isSilent","skipSendingReceipt","emailIsVerified","skipFilterStep","dryRun","debug","defaultPhoneCountryCode","uploadPrivacyRequestsFromCsv","splitCsvToList"],"mappings":"AAAA,iIAA+C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCyBhM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CACF,CAAA,CACe,CACf,MAAMC,iCAAAA,CACJ,aAAA,CAAAb,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAK,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAJ,CAAAA,CACA,uBAAA,CAAAa,CAAAA,CACA,UAAA,CAAYE,iCAAAA,CAAyB,CAAA,CACrC,KAAA,CAAAH,CAAAA,CACA,cAAA,CAAAF,CAAAA,CACA,QAAA,CAAAH,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,MAAA,CAAAH,CAAAA,CACA,MAAA,CAAAK,CACF,CAAC,CACH,CAAA,mBAAA","file":"/home/runner/work/cli/cli/dist/impl-MZEAMC6V.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport {\n splitCsvToList,\n uploadPrivacyRequestsFromCsv,\n} from '../../../lib/requests';\n\ninterface UploadCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n cacheFilepath: string;\n requestReceiptFolder: string;\n sombraAuth?: string;\n concurrency: number;\n attributes: string;\n isTest: boolean;\n isSilent: boolean;\n skipSendingReceipt: boolean;\n emailIsVerified: boolean;\n skipFilterStep: boolean;\n dryRun: boolean;\n debug: boolean;\n defaultPhoneCountryCode: string;\n}\n\nexport async function upload(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n cacheFilepath,\n requestReceiptFolder,\n sombraAuth,\n concurrency,\n attributes,\n isTest,\n isSilent,\n skipSendingReceipt,\n emailIsVerified,\n skipFilterStep,\n dryRun,\n debug,\n defaultPhoneCountryCode,\n }: UploadCommandFlags,\n): Promise<void> {\n await uploadPrivacyRequestsFromCsv({\n cacheFilepath,\n requestReceiptFolder,\n file,\n auth,\n sombraAuth,\n concurrency,\n transcendUrl,\n defaultPhoneCountryCode,\n attributes: splitCsvToList(attributes),\n debug,\n skipFilterStep,\n isSilent,\n skipSendingReceipt,\n emailIsVerified,\n isTest,\n dryRun,\n });\n}\n"]}
|
package/dist/impl-N2Q4635G.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _privacytypes = require('@transcend-io/privacy-types');async function f({auth:o,transcendUrl:a,folderPath:r,requestIds:n,statuses:s=[_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Downloadable],concurrency:i,createdAtBefore:l,createdAtAfter:d,approveAfterDownload:c}){await _chunk4J2KYJVScjs.F.call(void 0, {transcendUrl:a,auth:o,folderPath:r,requestIds:n,statuses:s,concurrency:i,createdAtBefore:l,createdAtAfter:d,approveAfterDownload:c})}exports.downloadFiles = f;
|
|
2
|
-
//# sourceMappingURL=impl-N2Q4635G.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-N2Q4635G.cjs","../src/commands/request/download-files/impl.ts"],"names":["downloadFiles","auth","transcendUrl","folderPath","requestIds","statuses","RequestStatus","concurrency","createdAtBefore","createdAtAfter","approveAfterDownload","downloadPrivacyRequestFiles"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,2DCE3J,MAe9B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,CAACC,2BAAAA,CAAc,SAAA,CAAWA,2BAAAA,CAAc,YAAY,CAAA,CAC/D,WAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CACF,CAAA,CACe,CACf,MAAMC,iCAAAA,CACJ,YAAA,CAAAT,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CACF,CAAC,CACH,CAAA,0BAAA","file":"/home/runner/work/cli/cli/dist/impl-N2Q4635G.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { downloadPrivacyRequestFiles } from '../../../lib/requests';\nimport { RequestStatus } from '@transcend-io/privacy-types';\n\ninterface DownloadFilesCommandFlags {\n auth: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n statuses?: RequestStatus[];\n folderPath: string;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n approveAfterDownload: boolean;\n transcendUrl: string;\n}\n\nexport async function downloadFiles(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n folderPath,\n requestIds,\n statuses = [RequestStatus.Approving, RequestStatus.Downloadable],\n concurrency,\n createdAtBefore,\n createdAtAfter,\n approveAfterDownload,\n }: DownloadFilesCommandFlags,\n): Promise<void> {\n await downloadPrivacyRequestFiles({\n transcendUrl,\n auth,\n folderPath,\n requestIds,\n statuses,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n approveAfterDownload,\n });\n}\n"]}
|
package/dist/impl-NIMCX7UC.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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 _chunkXXGX7FUCcjs = require('./chunk-XXGX7FUC.cjs');var _chunkZVK4HIDFcjs = require('./chunk-ZVK4HIDF.cjs');require('./chunk-4J2KYJVS.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function W({file:a,fileTarget:l,transcendUrl:m,auth:p,sombraAuth:P,cronDataSiloId:S,targetDataSiloId:F,actions:x,skipRequestCount:g,pageLimit:f,chunkSize:s}){g&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(s)||s<=0||s%f!==0)&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Invalid chunk size: "${s}". Must be a positive integer that is a multiple of ${f}.`)),process.exit(1));let N=_chunkYVY4TZ2Ocjs.xe.call(void 0, m,p),{baseName:R,extension:T}=_chunkZVK4HIDFcjs.d.call(void 0, a),{baseName:j,extension:O}=_chunkZVK4HIDFcjs.d.call(void 0, l),$=0,b=0,d=0;await _chunkXXGX7FUCcjs.g.call(void 0, {dataSiloId:S,auth:p,sombraAuth:P,actions:x,apiPageSize:f,savePageSize:s,onSave:async o=>{$+=o.length;let A=o.map(e=>e.requestId),D=_chunkYVY4TZ2Ocjs.fc.call(void 0, A),y=await _chunkYVY4TZ2Ocjs.b.call(void 0, D,async e=>(await _chunkYVY4TZ2Ocjs.Se.call(void 0, N,{requestId:e,dataSiloId:F})).map(({fileName:C,remoteId:I})=>{if(!I)throw new Error(`Failed to find remoteId for ${C} request: ${e}`);return{RecordId:I,Object:_optionalChain([C, 'access', _ => _.replace, 'call', _2 => _2(".json",""), 'access', _3 => _3.split, 'call', _4 => _4("/"), 'access', _5 => _5.pop, 'call', _6 => _6(), 'optionalAccess', _7 => _7.replace, 'call', _8 => _8(" Information","")]),Comment:"Customer data deletion request submitted via transcend.io"}}),{concurrency:10});b+=y.flat().length;let L=_chunkYVY4TZ2Ocjs.fc.call(void 0, o.map(e=>Object.keys(e)).flat()),E=`${R}-${d}${T}`,G=`${j}-${d}${O}`;_chunkZVK4HIDFcjs.c.call(void 0, E,o,L),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${o.length} identifiers to file "${a}"`));let r=y.flat(),M=_chunkYVY4TZ2Ocjs.fc.call(void 0, r.map(e=>Object.keys(e)).flat());_chunkZVK4HIDFcjs.c.call(void 0, G,r,M),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${r.length} identifiers to file "${l}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processed chunk of ${o.length} identifiers, found ${r.length} target identifiers`)),d+=1},transcendUrl:m,skipRequestCount:g}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${$} identifiers to file "${a}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${b} identifiers to file "${l}"`))}exports.pullProfiles = W;
|
|
2
|
-
//# sourceMappingURL=impl-NIMCX7UC.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-NIMCX7UC.cjs","../src/commands/request/cron/pull-profiles/impl.ts"],"names":["pullProfiles","file","fileTarget","transcendUrl","auth","sombraAuth","cronDataSiloId","targetDataSiloId","actions","skipRequestCount","pageLimit","chunkSize","logger","colors","client","buildTranscendGraphQLClient","baseName","extension","parseFilePath","baseNameTarget","extensionTarget","allIdentifiersCount","allTargetIdentifiersCount","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunk","requestIds","d","uniqueRequestIds","uniq_default","results","map","requestId","fetchRequestFilesForRequest","fileName","remoteId"],"mappings":"AAAA,quBAAwC,wDAA2C,gCAA6B,wDAAiE,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gFCE9R,MA6BnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACXF,CAAAA,EACFG,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,uEACF,CACF,CAAA,CAAA,CAIA,MAAA,CAAO,KAAA,CAAMF,CAAS,CAAA,EACtBA,CAAAA,EAAa,CAAA,EACbA,CAAAA,CAAYD,CAAAA,GAAc,CAAA,CAAA,EAAA,CAE1BE,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,qBAAA,EAAwBF,CAAS,CAAA,oDAAA,EAAuDD,CAAS,CAAA,CAAA,CACnG,CACF,CAAA,CACA,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIhB,IAAMI,CAAAA,CAASC,kCAAAA,CAA4BZ,CAAcC,CAAI,CAAA,CACvD,CAAE,QAAA,CAAAY,CAAAA,CAAU,SAAA,CAAAC,CAAU,CAAA,CAAIC,iCAAAA,CAAkB,CAAA,CAC5C,CAAE,QAAA,CAAUC,CAAAA,CAAgB,SAAA,CAAWC,CAAgB,CAAA,CAC3DF,iCAAAA,CAAwB,CAAA,CAEtBG,CAAAA,CAAsB,CAAA,CACtBC,CAAAA,CAA4B,CAAA,CAC5BC,CAAAA,CAAY,CAAA,CAwEhB,MAAMC,iCAAAA,CACJ,UAAA,CAAYlB,CAAAA,CACZ,IAAA,CAAAF,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAG,CAAAA,CACA,WAAA,CAAaE,CAAAA,CACb,YAAA,CAAcC,CAAAA,CACd,MAAA,CA7Ea,MAAOc,CAAAA,EAAmD,CAEvEJ,CAAAA,EAAuBI,CAAAA,CAAM,MAAA,CAG7B,IAAMC,CAAAA,CAAaD,CAAAA,CAAM,GAAA,CAAKE,CAAAA,EAAMA,CAAAA,CAAE,SAAmB,CAAA,CACnDC,CAAAA,CAAmBC,kCAAAA,CAAe,CAAA,CAGlCC,CAAAA,CAAU,MAAMC,iCAAAA,CACpBH,CACA,MAAOI,CAAAA,EAAAA,CACW,MAAMC,kCAAAA,CAA4BnB,CAAQ,CACxD,SAAA,CAAAkB,CAAAA,CACA,UAAA,CAAYzB,CACd,CAAC,CAAA,CAAA,CACc,GAAA,CAAI,CAAC,CAAE,QAAA,CAAA2B,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAA,EAAM,CAC7C,EAAA,CAAI,CAACA,CAAAA,CACH,MAAM,IAAI,KAAA,CACR,CAAA,4BAAA,EAA+BD,CAAQ,CAAA,UAAA,EAAaF,CAAS,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-NIMCX7UC.cjs","sourcesContent":[null,"import type { RequestAction } from '@transcend-io/privacy-types';\nimport { logger } from '../../../../logger';\nimport colors from 'colors';\nimport { uniq } from 'lodash-es';\nimport { map } from '../../../../lib/bluebird-replace';\nimport {\n buildTranscendGraphQLClient,\n fetchRequestFilesForRequest,\n} from '../../../../lib/graphql';\nimport type { LocalContext } from '../../../../context';\nimport {\n parseFilePath,\n pullChunkedCustomSiloOutstandingIdentifiers,\n writeCsv,\n type CsvFormattedIdentifier,\n} from '../../../../lib/cron';\n\ninterface PullProfilesCommandFlags {\n file: string;\n fileTarget: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n cronDataSiloId: string;\n targetDataSiloId: string;\n actions: RequestAction[];\n skipRequestCount: boolean;\n pageLimit: number;\n chunkSize: number;\n}\n\nexport async function pullProfiles(\n this: LocalContext,\n {\n file,\n fileTarget,\n transcendUrl,\n auth,\n sombraAuth,\n cronDataSiloId,\n targetDataSiloId,\n actions,\n skipRequestCount,\n pageLimit,\n chunkSize,\n }: PullProfilesCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n process.exit(1);\n }\n\n // Create GraphQL client to connect to Transcend backend\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { baseName, extension } = parseFilePath(file);\n const { baseName: baseNameTarget, extension: extensionTarget } =\n parseFilePath(fileTarget);\n\n let allIdentifiersCount = 0;\n let allTargetIdentifiersCount = 0;\n let fileCount = 0;\n // Create onSave callback to handle chunked processing\n const onSave = async (chunk: CsvFormattedIdentifier[]): Promise<void> => {\n // Add to all identifiers\n allIdentifiersCount += chunk.length;\n\n // Get unique request IDs from this chunk\n const requestIds = chunk.map((d) => d.requestId as string);\n const uniqueRequestIds = uniq(requestIds);\n\n // Pull down target identifiers for this chunk\n const results = await map(\n uniqueRequestIds,\n async (requestId) => {\n const results = await fetchRequestFilesForRequest(client, {\n requestId,\n dataSiloId: targetDataSiloId,\n });\n return results.map(({ fileName, remoteId }) => {\n if (!remoteId) {\n throw new Error(\n `Failed to find remoteId for ${fileName} request: ${requestId}`,\n );\n }\n return {\n RecordId: remoteId,\n Object: fileName\n .replace('.json', '')\n .split('/')\n .pop()\n ?.replace(' Information', ''),\n Comment:\n 'Customer data deletion request submitted via transcend.io',\n };\n });\n },\n {\n concurrency: 10,\n },\n );\n\n allTargetIdentifiersCount += results.flat().length;\n\n // Write the identifiers and target identifiers to CSV\n const headers = uniq(chunk.map((d) => Object.keys(d)).flat());\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n const numberedFileNameTarget = `${baseNameTarget}-${fileCount}${extensionTarget}`;\n writeCsv(numberedFileName, chunk, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunk.length} identifiers to file \"${file}\"`,\n ),\n );\n\n const targetIdentifiers = results.flat();\n const headers2 = uniq(targetIdentifiers.map((d) => Object.keys(d)).flat());\n writeCsv(numberedFileNameTarget, targetIdentifiers, headers2);\n logger.info(\n colors.green(\n `Successfully wrote ${targetIdentifiers.length} identifiers to file \"${fileTarget}\"`,\n ),\n );\n\n logger.info(\n colors.blue(\n `Processed chunk of ${chunk.length} identifiers, found ${targetIdentifiers.length} target identifiers`,\n ),\n );\n fileCount += 1;\n };\n\n // Pull down outstanding identifiers using the new chunked function\n await pullChunkedCustomSiloOutstandingIdentifiers({\n dataSiloId: cronDataSiloId,\n auth,\n sombraAuth,\n actions,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n transcendUrl,\n skipRequestCount,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${allIdentifiersCount} identifiers to file \"${file}\"`,\n ),\n );\n logger.info(\n colors.green(\n `Successfully wrote ${allTargetIdentifiersCount} identifiers to file \"${fileTarget}\"`,\n ),\n );\n}\n"]}
|
package/dist/impl-NURZ5XJQ.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-YVY4TZ2O.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');async function i({auth:e,dataSiloId:a,actions:o,transcendUrl:s}){await _chunk4J2KYJVScjs.T.call(void 0, {requestActions:o,transcendUrl:s,auth:e,dataSiloId:a})}exports.retryRequestDataSilos = i;
|
|
2
|
-
//# sourceMappingURL=impl-NURZ5XJQ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-NURZ5XJQ.cjs","../src/commands/request/system/retry-request-data-silos/impl.ts"],"names":["retryRequestDataSilos","auth","dataSiloId","actions","transcendUrl"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCWzL,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACf,MAAMJ,iCAAAA,CACJ,cAAA,CAAgBG,CAAAA,CAChB,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,kCAAA","file":"/home/runner/work/cli/cli/dist/impl-NURZ5XJQ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { retryRequestDataSilos as retryRequestDataSilosHelper } from '../../../../lib/requests';\n\ninterface RetryRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n actions: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function retryRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n actions,\n transcendUrl,\n }: RetryRequestDataSilosCommandFlags,\n): Promise<void> {\n await retryRequestDataSilosHelper({\n requestActions: actions,\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
|
package/dist/impl-NZFTTWVH.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-OL2YE5SK.cjs');var _chunkBY7W4UQFcjs = require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _got = require('got'); var _got2 = _interopRequireDefault(_got);var j=({hostname:t,auth:e})=>_got2.default.extend({prefixUrl:`https://${t}`,headers:{accept:"application/json","content-type":"application/json",authorization:`Bearer ${e}`}});var _yargsparser = require('yargs-parser'); var _yargsparser2 = _interopRequireDefault(_yargsparser);var Ge=Object.values(_chunkBY7W4UQFcjs.b);var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);var w=({assessment:t,index:e,total:s,wrap:r=!0})=>{let n="";(e===0||r)&&(n=`[
|
|
2
|
-
`);let m=JSON.stringify(t),o=s&&e<s-1&&!r?",":"";return n=`${n+m+o}
|
|
3
|
-
`,(s&&e===s-1||r)&&(n+=`
|
|
4
|
-
]`),n};var q=({file:t,assessment:e,index:s,total:r})=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing enriched assessment ${s+1} of ${r} to file "${t}"...`)),s===0?_fs2.default.writeFileSync(t,w({assessment:e,index:s,total:r,wrap:!1})):_fs2.default.appendFileSync(t,w({assessment:e,index:s,total:r,wrap:!1}))};var _typeutils = require('@transcend-io/type-utils');var _privacytypes = require('@transcend-io/privacy-types');var J=async({oneTrust:t})=>{let e=0,s=1,r=0,n=[];for(;e<s;){let{body:m}=await t.get(`api/assessment/v2/assessments?page=${e}&size=2000`),{page:o,content:u}=_typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetListOfAssessmentsResponse,m);n.push(..._nullishCoalesce(u, () => ([]))),e===0&&(s=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _2 => _2.totalPages]), () => (0)),r=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _3 => _3.totalElements]), () => (0))),e+=1,_chunkZUNVPK23cjs.a.info(`Fetched ${n.length} of ${r} assessments.`)}return n};var K=async({oneTrust:t,assessmentId:e})=>{let{body:s}=await t.get(`api/assessment/v2/assessments/${e}/export?ExcludeSkippedQuestions=false`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetAssessmentResponse,s)};var W=async({oneTrust:t,riskId:e})=>{let{body:s}=await t.get(`api/risk/v2/risks/${e}`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetRiskResponse,s)};var k=async({oneTrust:t,userId:e})=>{let{body:s}=await t.get(`api/scim/v2/Users/${e}`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetUserResponse,s)};var H=({assessment:t,assessmentDetails:e,riskDetails:s,creatorDetails:r,approversDetails:n,respondentsDetails:m})=>{let o=_chunkYVY4TZ2Ocjs.bc.call(void 0, s,"id"),{sections:u,createdBy:g,...h}=e,O=u.map(i=>{let{questions:A,...$}=i,x=A.map(E=>{let{risks:U,...G}=E,v=(_nullishCoalesce(U, () => ([]))).map(y=>{let S=o[y.riskId];return{...y,...S,level:y.level,impactLevel:_nullishCoalesce(y.impactLevel, () => (0))}});return{...G,risks:v}});return{...$,questions:x}}),p={...g,active:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _4 => _4.active]), () => (!1)),userType:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _5 => _5.userType]), () => ("Internal")),emails:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _6 => _6.emails]), () => ([])),title:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _7 => _7.title]), () => (null)),givenName:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _8 => _8.name, 'access', _9 => _9.givenName]), () => (null)),familyName:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _10 => _10.name, 'access', _11 => _11.familyName]), () => (null))},d=_chunkYVY4TZ2Ocjs.bc.call(void 0, n,"id"),l=e.approvers.flatMap(i=>d[i.id]?[{...i,approver:{...i.approver,active:d[i.id].active,userType:d[i.id].userType,emails:d[i.id].emails,title:d[i.id].title,givenName:_nullishCoalesce(d[i.id].name.givenName, () => (null)),familyName:_nullishCoalesce(d[i.id].name.familyName, () => (null))}}]:[]),T=_chunkYVY4TZ2Ocjs.bc.call(void 0, m,"id"),C=e.respondents.filter(i=>!i.name.includes("@")).flatMap(i=>T[i.id]?[{...i,active:T[i.id].active,userType:T[i.id].userType,emails:T[i.id].emails,title:T[i.id].title,givenName:_nullishCoalesce(T[i.id].name.givenName, () => (null)),familyName:_nullishCoalesce(T[i.id].name.familyName, () => (null))}]:[]);return{...t,...h,approvers:l,respondents:C,createdBy:p,sections:O}};var F=async({transcend:t,assessment:e,total:s,index:r})=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing enriched assessment ${r+1} ${s?`of ${s} `:" "}to Transcend...`));let m={json:w({assessment:e,index:r,total:s})};try{await _chunkYVY4TZ2Ocjs.gc.call(void 0, t,_chunkYVY4TZ2Ocjs.ha,{input:m})}catch (e2){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to sync assessment ${r+1} ${s?`of ${s} `:" "}to Transcend.
|
|
5
|
-
Assessment Title: ${e.name}. Template Title: ${e.template.name}
|
|
6
|
-
`))}};var Y=async({oneTrust:t,file:e,dryRun:s,transcend:r})=>{_chunkZUNVPK23cjs.a.info("Getting list of all assessments from OneTrust...");let n=await J({oneTrust:t}),m={},o=5,u=Array.from({length:Math.ceil(n.length/o)},(g,h)=>n.slice(h*o,(h+1)*o));await _chunkYVY4TZ2Ocjs.a.call(void 0, u,async(g,h)=>{let O=[];await _chunkYVY4TZ2Ocjs.b.call(void 0, g,async(p,d)=>{let l=o*h+d+1;_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching details...`);let{templateName:T,assessmentId:C}=p,i=await K({oneTrust:t,assessmentId:C}),A=i.createdBy.id,$=m[A];if(!$){_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching creator...`);try{$=await k({oneTrust:t,userId:A}),m[A]=$}catch (e3){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch form creator. creatorId: ${A}. Assessment Title: ${p.name}. Template Title: ${T}`))}}let{approvers:x}=i,E=[];x.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching approvers...`),E=await _chunkYVY4TZ2Ocjs.b.call(void 0, x.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await k({oneTrust:t,userId:c}),m[c]=f),[f]}catch (e4){return _chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a form approver. approverId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let{respondents:U}=i,G=U.filter(c=>!c.name.includes("@")),v=[];G.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching respondents...`),v=await _chunkYVY4TZ2Ocjs.b.call(void 0, G.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await k({oneTrust:t,userId:c}),m[c]=f),[f]}catch (e5){return _chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a respondent. respondentId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let y=[],S=_chunkYVY4TZ2Ocjs.fc.call(void 0, i.sections.flatMap(c=>c.questions.flatMap(f=>(_nullishCoalesce(f.risks, () => ([]))).flatMap(X=>X.riskId))));S.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching risks...`),y=await _chunkYVY4TZ2Ocjs.b.call(void 0, S,c=>W({oneTrust:t,riskId:c}),{concurrency:5}));let Z=H({assessment:p,assessmentDetails:i,riskDetails:y,creatorDetails:$,approversDetails:E.flat(),respondentsDetails:v.flat()});O.push(Z)},{concurrency:o}),await _chunkYVY4TZ2Ocjs.a.call(void 0, O,async(p,d)=>{let l=h*o+d;s&&e?q({assessment:p,index:l,total:n.length,file:e}):r&&await F({assessment:p,transcend:r,total:n.length,index:l})})})};var _JSONStream = require('JSONStream'); var _JSONStream2 = _interopRequireDefault(_JSONStream);var V=({transcend:t,file:e})=>(_chunkZUNVPK23cjs.a.info(`Getting list of all assessments from file ${e}...`),new Promise((s,r)=>{let n=_fs.createReadStream.call(void 0, e,{encoding:"utf-8",highWaterMark:65536}),m=_JSONStream2.default.parse("*"),o=0;n.pipe(m),m.on("data",async u=>{try{m.pause();let g=_typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustEnrichedAssessment,u);await F({assessment:g,transcend:t,index:o}),o+=1,m.resume()}catch(g){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to parse the assessment ${o} from file '${e}': ${g.message}.`))}}),m.on("end",()=>{_chunkZUNVPK23cjs.a.info(`Finished processing ${o} assessments from file ${e}`),s()}),m.on("error",u=>{_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error parsing file '${e}': ${u.message}`)),r(u)}),n.on("error",u=>{_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error reading file '${e}': ${u.message}`)),r(u)})}));async function _s({hostname:t,oneTrustAuth:e,source:s,transcendAuth:r,transcendUrl:n,resource:m,file:o,dryRun:u,debug:g}){if(!u&&!r)throw new Error('Must specify a "transcendAuth" parameter to sync resources to Transcend. e.g. --transcendAuth=${TRANSCEND_API_KEY}');if(u&&!o)throw new Error('Must set a "file" parameter when "dryRun" is "true". e.g. --file=./oneTrustAssessments.json');if(o){let p=o.split(".");if(p.length<2)throw new Error('The "file" parameter has an invalid format. Expected a path with extensions. e.g. --file=./pathToFile.json.');if(p.at(-1)!=="json")throw new Error(`Expected the format of the "file" parameters '${o}' to be 'json', but got '${p.at(-1)}'.`)}if(s==="oneTrust"){if(!t)throw new Error('Missing required parameter "hostname". e.g. --hostname=customer.my.onetrust.com');if(!e)throw new Error('Missing required parameter "oneTrustAuth". e.g. --oneTrustAuth=$ONE_TRUST_AUTH_TOKEN')}else{if(!o)throw new Error('Must specify a "file" parameter to read the OneTrust assessments from. e.g. --source=./oneTrustAssessments.json');if(u)throw new Error('Cannot read and write to a file simultaneously. Emit the "source" parameter or set it to oneTrust if "dryRun" is enabled.')}let h=t&&e?j({hostname:t,auth:e}):void 0,O=n&&r?_chunkYVY4TZ2Ocjs.xe.call(void 0, n,r):void 0;try{m==="assessments"&&(s==="oneTrust"&&h?await Y({oneTrust:h,file:o,dryRun:u,...O&&{transcend:O}}):s==="file"&&o&&O&&await V({file:o,transcend:O}))}catch(p){throw new Error(`An error occurred syncing the resource ${m} from OneTrust: ${g?p.stack:p.message}`)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced OneTrust ${m} to ${u?`disk at "${o}"`:"Transcend"}!`))}exports.syncOt = _s;
|
|
7
|
-
//# sourceMappingURL=impl-NZFTTWVH.cjs.map
|
package/dist/impl-O5UHTMMM.cjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkJ72CSV4Rcjs = require('./chunk-J72CSV4R.cjs');require('./chunk-UEGX6GZ2.cjs');require('./chunk-SAEKBZGF.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');var _privacytypes = require('@transcend-io/privacy-types');var i=_chunkYVY4TZ2Ocjs.bc.call(void 0, Object.entries(_privacytypes.TRANSCEND_SCOPES).map(([t,o])=>({...o,name:t})),"title"),N=Object.keys(i);async function P({email:t,password:o,apiKeyTitle:c,file:m,scopes:l,deleteExistingApiKey:g,createNewApiKey:f,parentOrganizationId:y,transcendUrl:S}){let r=l.map(e=>e.trim()),s=r.filter(e=>!i[e]);s.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to parse scopes:"${s.join(",")}".
|
|
2
|
-
Expected one of:
|
|
3
|
-
${N.join(`
|
|
4
|
-
`)}`)),process.exit(1));let d=r.map(e=>i[e].name),{errors:C,apiKeys:x}=await _chunkJ72CSV4Rcjs.a.call(void 0, {transcendUrl:S,password:o,email:t,parentOrganizationId:y,deleteExistingApiKey:g,createNewApiKey:f,apiKeyTitle:c,scopes:d});_fs.writeFileSync.call(void 0, m,`${JSON.stringify(x,null,2)}
|
|
5
|
-
`),C.length>0&&process.exit(1)}exports.generateApiKeys = P;
|
|
6
|
-
//# sourceMappingURL=impl-O5UHTMMM.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-O5UHTMMM.cjs","../src/commands/admin/generate-api-keys/impl.ts"],"names":["SCOPES_BY_TITLE","keyBy_default","TRANSCEND_SCOPES","name","value","SCOPE_TITLES","generateApiKeys","email","password","apiKeyTitle","file","scopes","deleteExistingApiKey","createNewApiKey","parentOrganizationId","transcendUrl","splitScopes","x","invalidScopes","scopeTitle","logger","colors","errors"],"mappings":"AAAA,iOAAwC,gCAA6B,gCAA6B,wDAA0C,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gFCCzP,wBACW,2DAEc,IAMtCA,CAAAA,CAAkBC,kCAAAA,MACtB,CAAO,OAAA,CAAQC,8BAAgB,CAAA,CAAE,GAAA,CAAI,CAAC,CAACC,CAAAA,CAAMC,CAAK,CAAA,CAAA,EAAA,CAAO,CACvD,GAAGA,CAAAA,CACH,IAAA,CAAAD,CACF,CAAA,CAAE,CAAA,CACF,OACF,CAAA,CACME,CAAAA,CAAe,MAAA,CAAO,IAAA,CAAKL,CAAe,CAAA,CAgBhD,MAAA,SAAsBM,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,CAEf,IAAMC,CAAAA,CAAcL,CAAAA,CAAO,GAAA,CAAKM,CAAAA,EAAMA,CAAAA,CAAE,IAAA,CAAK,CAAC,CAAA,CACxCC,CAAAA,CAAgBF,CAAAA,CAAY,MAAA,CAC/BG,CAAAA,EAAe,CAACnB,CAAAA,CAAgBmB,CAAU,CAC7C,CAAA,CACID,CAAAA,CAAc,MAAA,CAAS,CAAA,EAAA,CACzBE,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,wBAAA,EAA2BH,CAAAA,CAAc,IAAA,CAAK,GAAG,CAAC,CAAA;AAAA;AAAA,EAC1Bb,CAAAA,CAAa,IAAA,CAAK,CAAA;AAAA,CAAI,CAAC,CAAA,CAAA;AAwBjDiB","file":"/home/runner/work/cli/cli/dist/impl-O5UHTMMM.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { writeFileSync } from 'fs';\n\nimport { ScopeName, TRANSCEND_SCOPES } from '@transcend-io/privacy-types';\n\nimport { logger } from '../../../logger';\nimport { generateCrossAccountApiKeys } from '../../../lib/api-keys';\nimport { keyBy } from 'lodash-es';\n\nconst SCOPES_BY_TITLE = keyBy(\n Object.entries(TRANSCEND_SCOPES).map(([name, value]) => ({\n ...value,\n name,\n })),\n 'title',\n);\nconst SCOPE_TITLES = Object.keys(SCOPES_BY_TITLE);\n\n// Command flag interface\ninterface 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 // Validate scopes\n const splitScopes = scopes.map((x) => x.trim());\n const invalidScopes = splitScopes.filter(\n (scopeTitle) => !SCOPES_BY_TITLE[scopeTitle],\n );\n if (invalidScopes.length > 0) {\n logger.error(\n colors.red(\n `Failed to parse scopes:\"${invalidScopes.join(',')}\".\\n` +\n `Expected one of: \\n${SCOPE_TITLES.join('\\n')}`,\n ),\n );\n process.exit(1);\n }\n\n const scopeNames = splitScopes.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 process.exit(1);\n }\n}\n"]}
|
package/dist/impl-PRYWCT7Y.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkLL7YE3LTcjs = require('./chunk-LL7YE3LT.cjs');require('./chunk-TD7ADMVO.cjs');var _chunk4J2KYJVScjs = require('./chunk-4J2KYJVS.cjs');require('./chunk-SAEKBZGF.cjs');var _chunkYVY4TZ2Ocjs = require('./chunk-YVY4TZ2O.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkEG4L6YAJcjs = require('./chunk-EG4L6YAJ.cjs');require('./chunk-OL2YE5SK.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var _persistedstate = require('@transcend-io/persisted-state');var _iots = require('io-ts'); var A = _interopRequireWildcard(_iots); var T = _interopRequireWildcard(_iots); var o = _interopRequireWildcard(_iots);var _privacytypes = require('@transcend-io/privacy-types');var _typeutils = require('@transcend-io/type-utils');var Se=T.intersection([T.type({nodes:T.array(_privacytypes.PreferenceQueryResponseItem)}),T.partial({cursor:T.string})]),Ee=["ENOTFOUND","ETIMEDOUT","504 Gateway Time-out","Task timed out after"];async function fe(m,{identifiers:n,partitionKey:h,skipLogging:d=!1}){let s=[],u=_chunkYVY4TZ2Ocjs._b.call(void 0, n,100),i=new Date().getTime(),t=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);d||t.start(n.length,0);let c=0;await _chunkYVY4TZ2Ocjs.b.call(void 0, u,async e=>{let a=0,g=3;for(;a<g;)try{let p=await m.post(`v1/preferences/${h}/query`,{json:{filter:{identifiers:e},limit:e.length}}).json(),w=_typeutils.decodeCodec.call(void 0, Se,p);s.push(...w.nodes),c+=e.length,t.update(c);break}catch(p){a+=1;let w=_optionalChain([p, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||_optionalChain([p, 'optionalAccess', _4 => _4.message])||"";if(a>=g||!Ee.some(P=>w.includes(P)))throw new Error(`Received an error from server after ${a} attempts: ${w}`);_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[RETRYING FAILED REQUEST - Attempt ${a}] Failed to fetch ${e.length} user preferences from partition ${h}: ${w}`))}},{concurrency:40}),t.stop();let r=new Date().getTime()-i;return d||_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed download in "${r/1e3}" seconds.`)),s}function L({row:m,columnToPurposeName:n,purposeSlugs:h,preferenceTopics:d}){let s={};return Object.entries(n).forEach(([u,{purpose:i,preference:t,valueMapping:c}])=>{if(!h.includes(i))throw new Error(`Invalid purpose slug: ${i}, expected: ${h.join(", ")}`);if(t){let f=d.find(g=>g.slug===t&&g.purpose.trackingType===i);if(!f){let g=d.filter(p=>p.purpose.trackingType===i).map(p=>p.slug);throw new Error(`Invalid preference slug: ${t} for purpose: ${i}. Allowed preference slugs for purpose are: ${g.join(",")}`)}s[i]||(s[i]={preferences:[]}),s[i].preferences||(s[i].preferences=[]);let r=m[u],e=c[r],a=typeof e=="string"&&e.trim()||null;switch(f.type){case _privacytypes.PreferenceTopicType.Boolean:if(typeof e!="boolean")throw new Error(`Invalid value for boolean preference: ${t}, expected boolean, got: ${r}`);s[i].preferences.push({topic:t,choice:{booleanValue:e}});break;case _privacytypes.PreferenceTopicType.Select:if(typeof e!="string"&&e!==null)throw new Error(`Invalid value for select preference: ${t}, expected string or null, got: ${r}`);if(a&&!f.preferenceOptionValues.map(({slug:g})=>g).includes(a))throw new Error(`Invalid value for select preference: ${t}, expected one of: ${f.preferenceOptionValues.map(({slug:g})=>g).join(", ")}, got: ${r}`);s[i].preferences.push({topic:t,choice:{selectValue:a}});break;case _privacytypes.PreferenceTopicType.MultiSelect:if(typeof r!="string")throw new Error(`Invalid value for multi select preference: ${t}, expected string, got: ${r}`);s[i].preferences.push({topic:t,choice:{selectValues:_chunk4J2KYJVScjs.n.call(void 0, r).map(g=>{let p=c[g];if(typeof p!="string")throw new Error(`Invalid value for multi select preference: ${t}, expected one of: ${f.preferenceOptionValues.map(({slug:w})=>w).join(", ")}, got: ${g}`);return p}).sort((g,p)=>g.localeCompare(p))}});break;default:throw new Error(`Unknown preference type: ${f.type}`)}}else s[i]?s[i].enabled=c[m[u]]===!0:s[i]={enabled:c[m[u]]===!0}}),_typeutils.apply.call(void 0, s,(u,i)=>{if(typeof u.enabled!="boolean")throw new Error(`No mapping provided for purpose.enabled=true/false value: ${i}`);return{...u,enabled:u.enabled}})}var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var Q="[NONE]";async function ue(m,n){let h=_chunkYVY4TZ2Ocjs.fc.call(void 0, m.map(s=>Object.keys(s)).flat()),d=_chunkYVY4TZ2Ocjs.$b.call(void 0, h,[...n.identifierColumn?[n.identifierColumn]:[],...Object.keys(n.columnToPurposeName)]);if(!n.timestampColum){let{timestampName:s}=await _inquirer2.default.prompt([{name:"timestampName",message:"Choose the column that will be used as the timestamp of last preference update",type:"list",default:d.find(u=>u.toLowerCase().includes("date"))||d.find(u=>u.toLowerCase().includes("time"))||d[0],choices:[...d,Q]}]);n.timestampColum=s}if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Using timestamp column "${n.timestampColum}"`)),n.timestampColum!==Q){let s=m.map((u,i)=>u[n.timestampColum]?null:[i]).filter(u=>!!u).flat();if(s.length>0)throw new Error(`The timestamp column "${n.timestampColum}" is missing a value for the following rows: ${s.join(`
|
|
2
|
-
`)}`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`The timestamp column "${n.timestampColum}" is present for all row`))}return n}async function de(m,n){let h=_chunkYVY4TZ2Ocjs.fc.call(void 0, m.map(t=>Object.keys(t)).flat()),d=_chunkYVY4TZ2Ocjs.$b.call(void 0, h,[...n.identifierColumn?[n.identifierColumn]:[],...Object.keys(n.columnToPurposeName)]);if(!n.identifierColumn){let{identifierName:t}=await _inquirer2.default.prompt([{name:"identifierName",message:"Choose the column that will be used as the identifier to upload consent preferences by",type:"list",default:d.find(c=>c.toLowerCase().includes("email"))||d[0],choices:d}]);n.identifierColumn=t}_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Using identifier column "${n.identifierColumn}"`));let s=m.map((t,c)=>t[n.identifierColumn]?null:[c]).filter(t=>!!t).flat();if(s.length>0){let t=`The identifier column "${n.identifierColumn}" is missing a value for the following rows: ${s.join(", ")}`;if(_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(t)),!await _chunkLL7YE3LTcjs.a.call(void 0, {message:"Would you like to skip rows missing an identifier?"}))throw new Error(t);let f=m.length;m=m.filter(r=>r[n.identifierColumn]),_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Skipped ${f-m.length} rows missing an identifier`))}_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`The identifier column "${n.identifierColumn}" is present for all rows`));let u=_chunkYVY4TZ2Ocjs.ac.call(void 0, m,n.identifierColumn),i=Object.entries(u).filter(([,t])=>t.length>1);if(i.length>0){let t=`The identifier column "${n.identifierColumn}" has duplicate values for the following rows: ${i.slice(0,10).map(([f,r])=>`${f} (${r.length})`).join(`
|
|
3
|
-
`)}`;if(_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(t)),!await _chunkLL7YE3LTcjs.a.call(void 0, {message:"Would you like to automatically take the latest update?"}))throw new Error(t);m=Object.entries(u).map(([,f])=>f.sort((e,a)=>new Date(a[n.timestampColum]).getTime()-new Date(e[n.timestampColum]).getTime())[0]).filter(f=>f)}return{currentState:n,preferences:m}}async function ge(m,n,{purposeSlugs:h,preferenceTopics:d,forceTriggerWorkflows:s}){let u=_chunkYVY4TZ2Ocjs.fc.call(void 0, m.map(c=>Object.keys(c)).flat()),i=_chunkYVY4TZ2Ocjs.$b.call(void 0, u,[...n.identifierColumn?[n.identifierColumn]:[],...n.timestampColum?[n.timestampColum]:[]]);if(i.length===0){if(s)return n;throw new Error("No other columns to process")}let t=[...h,...d.map(c=>`${c.purpose.trackingType}->${c.slug}`)];return await _chunkYVY4TZ2Ocjs.a.call(void 0, i,async c=>{let f=_chunkYVY4TZ2Ocjs.fc.call(void 0, m.map(e=>e[c])),r=n.columnToPurposeName[c];if(r)_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Column "${c}" is associated with purpose "${r.purpose}"`));else{let{purposeName:e}=await _inquirer2.default.prompt([{name:"purposeName",message:`Choose the purpose that column ${c} is associated with`,type:"list",default:t.find(p=>p.startsWith(h[0])),choices:t}]),[a,g]=e.split("->");r={purpose:a,preference:g||null,valueMapping:{}}}await _chunkYVY4TZ2Ocjs.a.call(void 0, f,async e=>{if(r.valueMapping[e]!==void 0){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Value "${e}" is associated with purpose value "${r.valueMapping[e]}"`));return}if(r.preference===null){let{purposeValue:a}=await _inquirer2.default.prompt([{name:"purposeValue",message:`Choose the purpose value for value "${e}" associated with purpose "${r.purpose}"`,type:"confirm",default:e!=="false"}]);r.valueMapping[e]=a}if(r.preference!==null){let a=d.find(p=>p.slug===r.preference);if(!a){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Preference topic "${r.preference}" not found`));return}let g=a.preferenceOptionValues.map(({slug:p})=>p);if(a.type===_privacytypes.PreferenceTopicType.Boolean){let{preferenceValue:p}=await _inquirer2.default.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${e}" associated with purpose "${r.purpose}"`,type:"confirm",default:e!=="false"}]);r.valueMapping[e]=p;return}if(a.type===_privacytypes.PreferenceTopicType.Select){let{preferenceValue:p}=await _inquirer2.default.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${e}" associated with purpose "${r.purpose}"`,type:"list",choices:g,default:g.find(w=>w===e)}]);r.valueMapping[e]=p;return}if(a.type===_privacytypes.PreferenceTopicType.MultiSelect){let p=_chunk4J2KYJVScjs.n.call(void 0, e);await _chunkYVY4TZ2Ocjs.a.call(void 0, p,async w=>{if(r.valueMapping[w]!==void 0)return;let{preferenceValue:P}=await _inquirer2.default.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${w}" associated with purpose "${r.purpose}"`,type:"list",choices:g,default:g.find(y=>y===w)}]);r.valueMapping[w]=P});return}throw new Error(`Unknown preference topic type: ${a.type}`)}}),n.columnToPurposeName[c]=r}),n}function we({currentConsentRecord:m,pendingUpdates:n,preferenceTopics:h}){return Object.entries(n).every(([d,{preferences:s=[],enabled:u}])=>{let i=m.purposes.find(c=>c.purpose===d);return!!i&&i.enabled===u?s.every(({topic:c,choice:f})=>i.preferences&&i.preferences.find(r=>{if(r.topic!==c)return!1;let e=h.find(a=>a.slug===c&&a.purpose.trackingType===d);if(!e)throw new Error(`Could not find preference topic for ${c}`);switch(e.type){case _privacytypes.PreferenceTopicType.Boolean:return r.choice.booleanValue===f.booleanValue;case _privacytypes.PreferenceTopicType.Select:return r.choice.selectValue===f.selectValue;case _privacytypes.PreferenceTopicType.MultiSelect:let a=(r.choice.selectValues||[]).sort(),g=(f.selectValues||[]).sort();return a.length===g.length&&a.every((p,w)=>p===g[w]);default:throw new Error(`Unknown preference topic type: ${e.type}`)}})):!1})}function he({currentConsentRecord:m,pendingUpdates:n,preferenceTopics:h}){return!!Object.entries(n).find(([d,{preferences:s=[],enabled:u}])=>{let i=m.purposes.find(t=>t.purpose===d);return i?i.enabled!==u?!0:!!s.find(({topic:t,choice:c})=>{let f=(i.preferences||[]).find(e=>e.topic===t);if(!f)return!1;let r=h.find(e=>e.slug===t&&e.purpose.trackingType===d);if(!r)throw new Error(`Could not find preference topic for ${t}`);switch(r.type){case _privacytypes.PreferenceTopicType.Boolean:return f.choice.booleanValue!==c.booleanValue;case _privacytypes.PreferenceTopicType.Select:return f.choice.selectValue!==c.selectValue;case _privacytypes.PreferenceTopicType.MultiSelect:let e=(f.choice.selectValues||[]).sort(),a=(c.selectValues||[]).sort();return e.length!==a.length||!e.every((g,p)=>g===a[p]);default:throw new Error(`Unknown preference topic type: ${r.type}`)}}):!1})}async function Pe({file:m,sombra:n,purposeSlugs:h,preferenceTopics:d,partitionKey:s,skipExistingRecordCheck:u,forceTriggerWorkflows:i},t){let c=new Date().getTime(),f=t.getValue("fileMetadata");_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading in file: "${m}"`));let r=_chunk4J2KYJVScjs.q.call(void 0, m,A.record(A.string,A.string)),e={columnToPurposeName:{},pendingSafeUpdates:{},pendingConflictUpdates:{},skippedUpdates:{},...f[m]||{},lastFetchedAt:new Date().toISOString()};e=await ue(r,e),f[m]=e,await t.setValue(f,"fileMetadata");let a=await de(r,e);e=a.currentState,r=a.preferences,f[m]=e,await t.setValue(f,"fileMetadata"),e=await ge(r,e,{preferenceTopics:d,purposeSlugs:h,forceTriggerWorkflows:i}),f[m]=e,await t.setValue(f,"fileMetadata");let g=r.map(y=>y[e.identifierColumn]),p=u?[]:await fe(n,{identifiers:g.map(y=>({value:y})),partitionKey:s}),w=_chunkYVY4TZ2Ocjs.bc.call(void 0, p,"userId");e.pendingConflictUpdates={},e.pendingSafeUpdates={},e.skippedUpdates={},r.forEach(y=>{let C=y[e.identifierColumn],I=L({row:y,columnToPurposeName:e.columnToPurposeName,preferenceTopics:d,purposeSlugs:h}),U=w[C];if(i&&!U)throw new Error(`No existing consent record found for user with id: ${C}.
|
|
4
|
-
When 'forceTriggerWorkflows' is set all the user identifiers should contain a consent record`);if(U&&we({currentConsentRecord:U,pendingUpdates:I,preferenceTopics:d})&&!i){e.skippedUpdates[C]=y;return}if(U&&he({currentConsentRecord:U,pendingUpdates:I,preferenceTopics:d})){e.pendingConflictUpdates[C]={row:y,record:U};return}e.pendingSafeUpdates[C]=y}),f[m]=e,await t.setValue(f,"fileMetadata");let P=new Date().getTime();_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pre-processed file: "${m}" in ${(P-c)/1e3}s`))}var je=o.type({purpose:o.string,preference:o.union([o.string,o.null]),valueMapping:o.record(o.string,o.union([o.string,o.boolean,o.null]))}),Ae=o.intersection([o.type({columnToPurposeName:o.record(o.string,je),lastFetchedAt:o.string,pendingSafeUpdates:o.record(o.string,o.record(o.string,o.string)),pendingConflictUpdates:o.record(o.string,o.type({record:_privacytypes.PreferenceQueryResponseItem,row:o.record(o.string,o.string)})),skippedUpdates:o.record(o.string,o.record(o.string,o.string))}),o.partial({identifierColumn:o.string,timestampColum:o.string})]),Ce=o.type({fileMetadata:o.record(o.string,Ae),failingUpdates:o.record(o.string,o.type({uploadedAt:o.string,error:o.string,update:_privacytypes.PreferenceUpdateItem})),pendingUpdates:o.record(o.string,_privacytypes.PreferenceUpdateItem)});async function Te({auth:m,sombraAuth:n,receiptFilepath:h,file:d,partition:s,isSilent:u=!0,dryRun:i=!1,skipWorkflowTriggers:t=!1,skipConflictUpdates:c=!1,skipExistingRecordCheck:f=!1,attributes:r=[],transcendUrl:e=_chunkEG4L6YAJcjs.f,forceTriggerWorkflows:a=!1}){let g=_chunk4J2KYJVScjs.p.call(void 0, r),p=new (0, _persistedstate.PersistedState)(h,Ce,{fileMetadata:{},failingUpdates:{},pendingUpdates:{}}),w=p.getValue("failingUpdates"),P=p.getValue("pendingUpdates"),y=p.getValue("fileMetadata");_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Restored cache, there are:
|
|
5
|
-
${Object.values(w).length} failing requests to be retried
|
|
6
|
-
${Object.values(P).length} pending requests to be processed
|
|
7
|
-
The following files are stored in cache and will be used:
|
|
8
|
-
${Object.keys(y).map(b=>b).join(`
|
|
9
|
-
`)}
|
|
10
|
-
The following file will be processed: ${d}
|
|
11
|
-
`));let C=_chunkYVY4TZ2Ocjs.xe.call(void 0, e,m),[I,U,X]=await Promise.all([_chunkYVY4TZ2Ocjs.ye.call(void 0, e,m,n),a?Promise.resolve([]):_chunkYVY4TZ2Ocjs.Yc.call(void 0, C),a?Promise.resolve([]):_chunkYVY4TZ2Ocjs.ge.call(void 0, C)]);await Pe({file:d,purposeSlugs:U.map(b=>b.trackingType),preferenceTopics:X,sombra:I,partitionKey:s,skipExistingRecordCheck:f,forceTriggerWorkflows:a},p);let N={};y=p.getValue("fileMetadata");let R=y[d];if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Found ${Object.entries(R.pendingSafeUpdates).length} safe updates in ${d}`)),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Found ${Object.entries(R.pendingConflictUpdates).length} conflict updates in ${d}`)),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Found ${Object.entries(R.skippedUpdates).length} skipped updates in ${d}`)),Object.entries({...R.pendingSafeUpdates,...c?{}:_typeutils.apply.call(void 0, R.pendingConflictUpdates,({row:b})=>b)}).forEach(([b,$])=>{let D=R.timestampColum===Q?new Date:new Date($[R.timestampColum]),M=L({row:$,columnToPurposeName:R.columnToPurposeName,preferenceTopics:X,purposeSlugs:U.map(O=>O.trackingType)});N[b]={userId:b,partition:s,timestamp:D.toISOString(),purposes:Object.entries(M).map(([O,Me])=>({...Me,purpose:O,workflowSettings:{attributes:g,isSilent:u,skipWorkflowTrigger:t}}))}}),await p.setValue(N,"pendingUpdates"),await p.setValue({},"failingUpdates"),i){_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Dry run complete, exiting. ${Object.values(N).length} pending updates. Check file: ${h}`));return}_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Uploading ${Object.values(N).length} preferences to partition: ${s}`));let Ue=new Date().getTime(),G=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),Z=0,W=Object.entries(N),ke=_chunkYVY4TZ2Ocjs._b.call(void 0, W,t?100:10);G.start(W.length,0),await _chunkYVY4TZ2Ocjs.b.call(void 0, ke,async b=>{try{await I.put("v1/preferences",{json:{records:b.map(([,$])=>$),skipWorkflowTriggers:t,forceTriggerWorkflows:a}}).json()}catch($){try{let M=JSON.parse(_optionalChain([$, 'optionalAccess', _5 => _5.response, 'optionalAccess', _6 => _6.body])||"{}");M.error&&_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error: ${M.error}`))}catch (e2){}_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to upload ${b.length} user preferences to partition ${s}: ${_optionalChain([$, 'optionalAccess', _7 => _7.response, 'optionalAccess', _8 => _8.body])||_optionalChain([$, 'optionalAccess', _9 => _9.message])}`));let D=p.getValue("failingUpdates");b.forEach(([M,O])=>{D[M]={uploadedAt:new Date().toISOString(),update:O,error:_optionalChain([$, 'optionalAccess', _10 => _10.response, 'optionalAccess', _11 => _11.body])||_optionalChain([$, 'optionalAccess', _12 => _12.message])||"Unknown error"}}),await p.setValue(D,"failingUpdates")}Z+=b.length,G.update(Z)},{concurrency:40}),G.stop();let Re=new Date().getTime()-Ue;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully uploaded ${W.length} user preferences to partition ${s} in "${Re/1e3}" seconds!`))}var _fs = require('fs');var _path = require('path');async function kr({auth:m,partition:n,sombraAuth:h,consentUrl:d,file:s="",directory:u,dryRun:i,skipExistingRecordCheck:t,receiptFileDir:c,skipWorkflowTriggers:f,forceTriggerWorkflows:r,skipConflictUpdates:e,isSilent:a,attributes:g,concurrency:p}){u&&s&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Cannot provide both a directory and a file. Please provide only one.")),process.exit(1)),!s&&!u&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences")),process.exit(1));let w=[];if(u)try{let y=_fs.readdirSync.call(void 0, u).filter(C=>C.endsWith(".csv"));y.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No CSV files found in directory: ${u}`)),process.exit(1)),w.push(...y.map(C=>_path.join.call(void 0, u,C)))}catch(P){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${u}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(P.message)),process.exit(1)}else try{s.endsWith(".csv")||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("File must be a CSV file")),process.exit(1)),w.push(s)}catch(P){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to access file: ${s}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(P.message)),process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Processing ${w.length} consent preferences files for partition: ${n}`)),_chunkZUNVPK23cjs.a.debug(`Files to process: ${w.join(", ")}`),t&&_chunkZUNVPK23cjs.a.info(_colors2.default.bgYellow(`Skipping existing record check: ${t}`)),await _chunkYVY4TZ2Ocjs.b.call(void 0, w,async P=>{let y=_path.basename.call(void 0, P).replace(".csv","");await Te({receiptFilepath:_path.join.call(void 0, c,`${y}-receipts.json`),auth:m,sombraAuth:h,file:P,partition:n,transcendUrl:d,skipConflictUpdates:e,skipWorkflowTriggers:f,skipExistingRecordCheck:t,isSilent:a,dryRun:i,attributes:_chunk4J2KYJVScjs.n.call(void 0, g),forceTriggerWorkflows:r})},{concurrency:p})}exports.uploadPreferences = kr;
|
|
12
|
-
//# sourceMappingURL=impl-PRYWCT7Y.cjs.map
|