@transcend-io/cli 8.33.1 → 8.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -17
- package/dist/{api-keys-BY5LoEwO.cjs → api-keys-CQHYfnKg.cjs} +2 -2
- package/dist/{api-keys-BY5LoEwO.cjs.map → api-keys-CQHYfnKg.cjs.map} +1 -1
- package/dist/{app-BlzWBy2v.cjs → app-DMYdPEeE.cjs} +18 -18
- package/dist/app-DMYdPEeE.cjs.map +1 -0
- package/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/deprecated-command.cjs +1 -1
- package/dist/{code-scanning-Bvs5QHcn.cjs → code-scanning-DjzRqe2Q.cjs} +2 -2
- package/dist/{code-scanning-Bvs5QHcn.cjs.map → code-scanning-DjzRqe2Q.cjs.map} +1 -1
- package/dist/{command-d4zv2BeF.cjs → command-CQS4sg_3.cjs} +2 -2
- package/dist/{command-d4zv2BeF.cjs.map → command-CQS4sg_3.cjs.map} +1 -1
- package/dist/{consent-manager-BjsU0NzZ.cjs → consent-manager-BplE7hDG.cjs} +2 -2
- package/dist/{consent-manager-BjsU0NzZ.cjs.map → consent-manager-BplE7hDG.cjs.map} +1 -1
- package/dist/{constants-KUUI8R0B.cjs → constants-C2Ve1XaG.cjs} +2 -2
- package/dist/{constants-KUUI8R0B.cjs.map → constants-C2Ve1XaG.cjs.map} +1 -1
- package/dist/{cron-trHmh4Ul.cjs → cron-BU5K5zwR.cjs} +2 -2
- package/dist/{cron-trHmh4Ul.cjs.map → cron-BU5K5zwR.cjs.map} +1 -1
- package/dist/{data-inventory-CTgo5IAK.cjs → data-inventory-CoAdyyxS.cjs} +2 -2
- package/dist/{data-inventory-CTgo5IAK.cjs.map → data-inventory-CoAdyyxS.cjs.map} +1 -1
- package/dist/{dataFlowsToDataSilos-CKr7XUmU.cjs → dataFlowsToDataSilos-DNzVrcGl.cjs} +2 -2
- package/dist/{dataFlowsToDataSilos-CKr7XUmU.cjs.map → dataFlowsToDataSilos-DNzVrcGl.cjs.map} +1 -1
- package/dist/{impl-oSvrDwzY.cjs → impl-7ZiJ8tQR.cjs} +2 -2
- package/dist/{impl-oSvrDwzY.cjs.map → impl-7ZiJ8tQR.cjs.map} +1 -1
- package/dist/{impl-DGql4qi2.cjs → impl-B36KTjnJ.cjs} +2 -2
- package/dist/{impl-DGql4qi2.cjs.map → impl-B36KTjnJ.cjs.map} +1 -1
- package/dist/{impl-CQ1Eg1Gs.cjs → impl-B4z6A2Aa.cjs} +2 -2
- package/dist/{impl-CQ1Eg1Gs.cjs.map → impl-B4z6A2Aa.cjs.map} +1 -1
- package/dist/{impl-DrBeb50_.cjs → impl-BBntVWRD.cjs} +2 -2
- package/dist/{impl-DrBeb50_.cjs.map → impl-BBntVWRD.cjs.map} +1 -1
- package/dist/{impl-D5zl_Mu5.cjs → impl-BIlbiOgY.cjs} +2 -2
- package/dist/{impl-D5zl_Mu5.cjs.map → impl-BIlbiOgY.cjs.map} +1 -1
- package/dist/{impl-BdqGR4Db.cjs → impl-BKkiE384.cjs} +2 -2
- package/dist/{impl-BdqGR4Db.cjs.map → impl-BKkiE384.cjs.map} +1 -1
- package/dist/{impl-CL4UPQTF.cjs → impl-BOaq2MA8.cjs} +2 -2
- package/dist/{impl-CL4UPQTF.cjs.map → impl-BOaq2MA8.cjs.map} +1 -1
- package/dist/{impl-D2Rar4JL.cjs → impl-BWunvHHR.cjs} +2 -2
- package/dist/{impl-D2Rar4JL.cjs.map → impl-BWunvHHR.cjs.map} +1 -1
- package/dist/{impl-k_N4BSHb.cjs → impl-BYr3VngT.cjs} +2 -2
- package/dist/{impl-k_N4BSHb.cjs.map → impl-BYr3VngT.cjs.map} +1 -1
- package/dist/{impl-DlHm8Nk9.cjs → impl-Bbzjk8q9.cjs} +2 -2
- package/dist/{impl-DlHm8Nk9.cjs.map → impl-Bbzjk8q9.cjs.map} +1 -1
- package/dist/{impl-wBfm0THj.cjs → impl-BcviCK8B.cjs} +2 -2
- package/dist/{impl-wBfm0THj.cjs.map → impl-BcviCK8B.cjs.map} +1 -1
- package/dist/{impl-d01YGIfB.cjs → impl-BiiO-h6Y.cjs} +2 -2
- package/dist/{impl-d01YGIfB.cjs.map → impl-BiiO-h6Y.cjs.map} +1 -1
- package/dist/{impl-wC9NKk7V.cjs → impl-BosASPXe.cjs} +2 -2
- package/dist/{impl-wC9NKk7V.cjs.map → impl-BosASPXe.cjs.map} +1 -1
- package/dist/{impl-CSfCo7EY.cjs → impl-C4ss2ucp.cjs} +2 -2
- package/dist/{impl-CSfCo7EY.cjs.map → impl-C4ss2ucp.cjs.map} +1 -1
- package/dist/{impl-DQ67TBSS.cjs → impl-C9s0TQEw.cjs} +2 -2
- package/dist/{impl-DQ67TBSS.cjs.map → impl-C9s0TQEw.cjs.map} +1 -1
- package/dist/{impl-BMnyINiQ.cjs → impl-CA0qacrn.cjs} +2 -2
- package/dist/{impl-BMnyINiQ.cjs.map → impl-CA0qacrn.cjs.map} +1 -1
- package/dist/{impl-GBzXG1_z.cjs → impl-CCk0wXqs.cjs} +2 -2
- package/dist/{impl-GBzXG1_z.cjs.map → impl-CCk0wXqs.cjs.map} +1 -1
- package/dist/{impl-CIkV6OPL.cjs → impl-CH3uHqRx.cjs} +2 -2
- package/dist/{impl-CIkV6OPL.cjs.map → impl-CH3uHqRx.cjs.map} +1 -1
- package/dist/{impl-BATmiMYN.cjs → impl-CIlOM3O6.cjs} +2 -2
- package/dist/{impl-BATmiMYN.cjs.map → impl-CIlOM3O6.cjs.map} +1 -1
- package/dist/{impl-BQuhNgNA.cjs → impl-CSMb-dkf.cjs} +2 -2
- package/dist/{impl-BQuhNgNA.cjs.map → impl-CSMb-dkf.cjs.map} +1 -1
- package/dist/{impl-Bks9LY66.cjs → impl-CXeNJIcH.cjs} +2 -2
- package/dist/{impl-Bks9LY66.cjs.map → impl-CXeNJIcH.cjs.map} +1 -1
- package/dist/{impl-DuaKD2ga.cjs → impl-CXuqOTan.cjs} +2 -2
- package/dist/{impl-DuaKD2ga.cjs.map → impl-CXuqOTan.cjs.map} +1 -1
- package/dist/impl-CYLFESAX.cjs +2 -0
- package/dist/impl-CYLFESAX.cjs.map +1 -0
- package/dist/{impl-DLlHf0f5.cjs → impl-Cb8Eeujp.cjs} +2 -2
- package/dist/{impl-DLlHf0f5.cjs.map → impl-Cb8Eeujp.cjs.map} +1 -1
- package/dist/{impl-BkoQZksU.cjs → impl-CeV8WYuh.cjs} +2 -2
- package/dist/{impl-BkoQZksU.cjs.map → impl-CeV8WYuh.cjs.map} +1 -1
- package/dist/{impl-BrjAmeGI.cjs → impl-CkmSG5-u.cjs} +2 -2
- package/dist/{impl-BrjAmeGI.cjs.map → impl-CkmSG5-u.cjs.map} +1 -1
- package/dist/{impl-D9degodL.cjs → impl-CpL-FXaD.cjs} +2 -2
- package/dist/{impl-D9degodL.cjs.map → impl-CpL-FXaD.cjs.map} +1 -1
- package/dist/{impl-Bthcogve.cjs → impl-CuXmpSTK.cjs} +2 -2
- package/dist/{impl-Bthcogve.cjs.map → impl-CuXmpSTK.cjs.map} +1 -1
- package/dist/{impl-_pb_69kE.cjs → impl-CudBe_Op.cjs} +2 -2
- package/dist/{impl-_pb_69kE.cjs.map → impl-CudBe_Op.cjs.map} +1 -1
- package/dist/{impl-3m5kiYs0.cjs → impl-Cvpx0VQw.cjs} +2 -2
- package/dist/{impl-3m5kiYs0.cjs.map → impl-Cvpx0VQw.cjs.map} +1 -1
- package/dist/{impl-l01EW7nc.cjs → impl-D28UvIJR.cjs} +2 -2
- package/dist/{impl-l01EW7nc.cjs.map → impl-D28UvIJR.cjs.map} +1 -1
- package/dist/{impl-DPzcKPpu.cjs → impl-D3PocYdg.cjs} +2 -2
- package/dist/{impl-DPzcKPpu.cjs.map → impl-D3PocYdg.cjs.map} +1 -1
- package/dist/{impl-BVXrPQ1G.cjs → impl-DHHbDwM6.cjs} +2 -2
- package/dist/{impl-BVXrPQ1G.cjs.map → impl-DHHbDwM6.cjs.map} +1 -1
- package/dist/{impl-BTXtq2nD.cjs → impl-DLUb2c_k.cjs} +2 -2
- package/dist/{impl-BTXtq2nD.cjs.map → impl-DLUb2c_k.cjs.map} +1 -1
- package/dist/{impl-NxZOP7L7.cjs → impl-DZPUKAOh.cjs} +2 -2
- package/dist/{impl-NxZOP7L7.cjs.map → impl-DZPUKAOh.cjs.map} +1 -1
- package/dist/{impl-DZWafiRw.cjs → impl-Dbvahnag.cjs} +2 -2
- package/dist/{impl-DZWafiRw.cjs.map → impl-Dbvahnag.cjs.map} +1 -1
- package/dist/impl-DyUn0CY0.cjs +2 -0
- package/dist/impl-DyUn0CY0.cjs.map +1 -0
- package/dist/{impl-ECqWmX0a.cjs → impl-HxQkbH-v.cjs} +2 -2
- package/dist/{impl-ECqWmX0a.cjs.map → impl-HxQkbH-v.cjs.map} +1 -1
- package/dist/{impl-DBAX5Mjz.cjs → impl-XGErHk8S.cjs} +2 -2
- package/dist/{impl-DBAX5Mjz.cjs.map → impl-XGErHk8S.cjs.map} +1 -1
- package/dist/{impl-BicjL2jn.cjs → impl-gZA9IzRe.cjs} +2 -2
- package/dist/{impl-BicjL2jn.cjs.map → impl-gZA9IzRe.cjs.map} +1 -1
- package/dist/{impl-DB2kHDaA.cjs → impl-l4-zrJDk.cjs} +2 -2
- package/dist/{impl-DB2kHDaA.cjs.map → impl-l4-zrJDk.cjs.map} +1 -1
- package/dist/{impl-BJCXAnkF.cjs → impl-mn91PHXE.cjs} +2 -2
- package/dist/{impl-BJCXAnkF.cjs.map → impl-mn91PHXE.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -10
- package/dist/{manual-enrichment-D0Bhyycl.cjs → manual-enrichment-NFVrfdss.cjs} +2 -2
- package/dist/{manual-enrichment-D0Bhyycl.cjs.map → manual-enrichment-NFVrfdss.cjs.map} +1 -1
- package/dist/{pooling-CWVm4ilp.cjs → pooling-EYc9IiSf.cjs} +2 -2
- package/dist/{pooling-CWVm4ilp.cjs.map → pooling-EYc9IiSf.cjs.map} +1 -1
- package/dist/{preference-management-Dhmm0sgq.cjs → preference-management-BvvoySGZ.cjs} +3 -3
- package/dist/{preference-management-Dhmm0sgq.cjs.map → preference-management-BvvoySGZ.cjs.map} +1 -1
- package/dist/{syncConfigurationToTranscend-DWM5Kkl4.cjs → syncConfigurationToTranscend-CpoC4raI.cjs} +176 -176
- package/dist/syncConfigurationToTranscend-CpoC4raI.cjs.map +1 -0
- package/dist/{uploadConsents-BhsOWa3P.cjs → uploadConsents-BVjLnCTQ.cjs} +2 -2
- package/dist/{uploadConsents-BhsOWa3P.cjs.map → uploadConsents-BVjLnCTQ.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/app-BlzWBy2v.cjs.map +0 -1
- package/dist/impl-BdrUgBNn.cjs +0 -2
- package/dist/impl-BdrUgBNn.cjs.map +0 -1
- package/dist/impl-hWCNtvcN.cjs +0 -2
- package/dist/impl-hWCNtvcN.cjs.map +0 -1
- package/dist/syncConfigurationToTranscend-DWM5Kkl4.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-BKkiE384.cjs","names":["fetchAndIndexCatalogs","buildTranscendGraphQLClient","readTranscendYaml","dataFlowsToDataSilos"],"sources":["../src/commands/inventory/derive-data-silos-from-data-flows/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'node:path';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { dataFlowsToDataSilos } from '../../../lib/consent-manager/dataFlowsToDataSilos';\nimport { DataFlowInput } from '../../../codecs';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { listFiles } from '../../../lib/api-keys';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DeriveDataSilosFromDataFlowsCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n dataSilosYmlFolder: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlows(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n dataSilosYmlFolder,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(dataFlowsYmlFolder) ||\n !lstatSync(dataFlowsYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataFlowsYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Ensure folder is passed\n if (\n !existsSync(dataSilosYmlFolder) ||\n !lstatSync(dataSilosYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataSilosYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Fetch all integrations in the catalog\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { serviceToTitle, serviceToSupportedIntegration } =\n await fetchAndIndexCatalogs(client);\n\n // List of each data flow yml file\n listFiles(dataFlowsYmlFolder).forEach((directory) => {\n // read in the data flows for a specific instance\n const { 'data-flows': dataFlows = [] } = readTranscendYaml(\n join(dataFlowsYmlFolder, directory),\n );\n\n // map the data flows to data silos\n const { adTechDataSilos, siteTechDataSilos } = dataFlowsToDataSilos(\n dataFlows as DataFlowInput[],\n {\n serviceToSupportedIntegration,\n serviceToTitle,\n },\n );\n\n // combine and write to yml file\n const dataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechDataSilos.length}`);\n logger.log(`Site Tech Services: ${siteTechDataSilos.length}`);\n writeTranscendYaml(join(dataSilosYmlFolder, directory), {\n 'data-silos': ignoreYmls.includes(directory) ? [] : dataSilos,\n });\n });\n}\n"],"mappings":"ygBA0BA,eAAsB,EAEpB,CACE,OACA,qBACA,qBACA,aAAa,EAAE,CACf,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,EAIpC,EAAA,EAAA,EAAA,YAAY,EAAmB,EAC/B,EAAA,EAAA,EAAA,WAAW,EAAmB,CAAC,aAAa,IAE5C,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,2BAA2B,EAAmB,GAAG,CAAC,CAC1E,KAAK,QAAQ,KAAK,EAAE,GAKpB,EAAA,EAAA,EAAA,YAAY,EAAmB,EAC/B,EAAA,EAAA,EAAA,WAAW,EAAmB,CAAC,aAAa,IAE5C,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,2BAA2B,EAAmB,GAAG,CAAC,CAC1E,KAAK,QAAQ,KAAK,EAAE,EAKtB,GAAM,CAAE,iBAAgB,iCACtB,MAAMA,EAAAA,GAFOC,EAAAA,GAA4B,EAAc,EAAK,CAEzB,CAGrC,EAAA,EAAU,EAAmB,CAAC,QAAS,GAAc,CAEnD,GAAM,CAAE,aAAc,EAAY,EAAE,EAAKC,EAAAA,GAAAA,EAAAA,EAAAA,MAClC,EAAoB,EAAU,CACpC,CAGK,CAAE,kBAAiB,qBAAsBC,EAAAA,EAC7C,EACA,CACE,gCACA,iBACD,CACF,CAGK,EAAY,CAAC,GAAG,EAAiB,GAAG,EAAkB,CAC5D,EAAA,EAAO,IAAI,mBAAmB,EAAU,SAAS,CACjD,EAAA,EAAO,IAAI,qBAAqB,EAAgB,SAAS,CACzD,EAAA,EAAO,IAAI,uBAAuB,EAAkB,SAAS,CAC7D,EAAA,GAAA,EAAA,EAAA,MAAwB,EAAoB,EAAU,CAAE,CACtD,aAAc,EAAW,SAAS,EAAU,CAAG,EAAE,CAAG,EACrD,CAAC,EACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`);const e=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`);require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({auth:n,transcendUrl:r,actions:i,statuses:a,requestIds:o,createdAtBefore:s,createdAtAfter:c,concurrency:l}){t.t(this.process.exit),await e.lt({transcendUrl:r,requestActions:i,auth:n,requestIds:o,statuses:a,concurrency:l,createdAtBefore:s,createdAtAfter:c})}exports.markSilent=n;
|
|
2
|
+
//# sourceMappingURL=impl-BOaq2MA8.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-BOaq2MA8.cjs","names":["markSilentPrivacyRequests"],"sources":["../src/commands/request/mark-silent/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { markSilentPrivacyRequests } from '../../../lib/requests';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\n await markSilentPrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestIds,\n statuses,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"],"mappings":"6QAgBA,eAAsB,EAEpB,CACE,OACA,eACA,UACA,WACA,aACA,kBACA,iBACA,eAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,GAA0B,CAC9B,eACA,eAAgB,EAChB,OACA,aACA,WACA,cACA,kBACA,iBACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-C2Ve1XaG.cjs`);const t=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`);require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const n=require(`./uploadConsents-BVjLnCTQ.cjs`),r=require(`./done-input-validation-Cgk5kNBs.cjs`);let i=require(`io-ts`);i=e.s(i);const a=i.intersection([i.type({userId:i.string,timestamp:i.string}),i.partial({confirmed:i.union([i.literal(`true`),i.literal(`false`)]),updated:i.union([i.literal(`true`),i.literal(`false`)]),prompted:i.union([i.literal(`true`),i.literal(`false`)]),metadata:i.string,usp:i.union([i.string,i.null]),gpp:i.union([i.string,i.null]),purposes:i.string})]);async function o({base64EncryptionKey:e,base64SigningKey:i,partition:o,file:s,consentUrl:c,concurrency:l}){r.t(this.process.exit),await n.r({base64EncryptionKey:e,base64SigningKey:i,preferences:t.oi(s,a),partition:o,concurrency:l,transcendUrl:c})}exports.uploadConsentPreferences=o;
|
|
2
|
+
//# sourceMappingURL=impl-BWunvHHR.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-BWunvHHR.cjs","names":["t","uploadConsents","readCsv"],"sources":["../src/lib/consent-manager/types.ts","../src/commands/consent/upload-consent-preferences/impl.ts"],"sourcesContent":["import * as t from 'io-ts';\n\nexport const ConsentPreferenceUpload = t.intersection([\n t.type({\n /** User ID */\n userId: t.string,\n /** Has the consent been updated (including no-change confirmation) since default resolution */\n timestamp: t.string,\n }),\n t.partial({\n /** Was tracking consent confirmed by the user? If this is false, the consent was resolved from defaults & is not yet confirmed */\n confirmed: t.union([t.literal('true'), t.literal('false')]),\n /**\n * Has the consent been updated (including no-change confirmation) since default resolution\n */\n updated: t.union([t.literal('true'), t.literal('false')]),\n /**\n * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)\n */\n prompted: t.union([t.literal('true'), t.literal('false')]),\n /** Consent metadata */\n metadata: t.string,\n /** US Privacy (USP) String */\n usp: t.union([t.string, t.null]),\n /** IAB GPP String */\n gpp: t.union([t.string, t.null]),\n /**\n * Purpose map\n * This is a stringified JSON object with keys as purpose names and values as booleans or 'Auto'\n */\n purposes: t.string,\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceUpload = t.TypeOf<typeof ConsentPreferenceUpload>;\n","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';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\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"],"mappings":"gWAEA,MAAa,EAA0BA,EAAE,aAAa,CACpDA,EAAE,KAAK,CAEL,OAAQA,EAAE,OAEV,UAAWA,EAAE,OACd,CAAC,CACFA,EAAE,QAAQ,CAER,UAAWA,EAAE,MAAM,CAACA,EAAE,QAAQ,OAAO,CAAEA,EAAE,QAAQ,QAAQ,CAAC,CAAC,CAI3D,QAASA,EAAE,MAAM,CAACA,EAAE,QAAQ,OAAO,CAAEA,EAAE,QAAQ,QAAQ,CAAC,CAAC,CAIzD,SAAUA,EAAE,MAAM,CAACA,EAAE,QAAQ,OAAO,CAAEA,EAAE,QAAQ,QAAQ,CAAC,CAAC,CAE1D,SAAUA,EAAE,OAEZ,IAAKA,EAAE,MAAM,CAACA,EAAE,OAAQA,EAAE,KAAK,CAAC,CAEhC,IAAKA,EAAE,MAAM,CAACA,EAAE,OAAQA,EAAE,KAAK,CAAC,CAKhC,SAAUA,EAAE,OACb,CAAC,CACH,CAAC,CChBF,eAAsB,EAEpB,CACE,sBACA,mBACA,YACA,OACA,aACA,eAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAMtC,MAAMC,EAAAA,EAAe,CACnB,sBACA,mBACA,YANkBC,EAAAA,GAAQ,EAAM,EAAwB,CAOxD,YACA,cACA,aAAc,EACf,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./enums-CBXlBJii.cjs`),t=require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`),t=require(`./constants-C2Ve1XaG.cjs`);require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`),require(`./codecs-JSDJgtyL.cjs`);const n=require(`./api-keys-CQHYfnKg.cjs`),r=require(`./done-input-validation-Cgk5kNBs.cjs`);let i=require(`node:fs`);async function a({email:e,password:a,apiKeyTitle:o,file:s,scopes:c,deleteExistingApiKey:l,createNewApiKey:u,parentOrganizationId:d,transcendUrl:f}){r.t(this.process.exit);let{errors:p,apiKeys:m}=await n.i({transcendUrl:f,password:a,email:e,parentOrganizationId:d,deleteExistingApiKey:l,createNewApiKey:u,apiKeyTitle:o,scopes:c.map(e=>t.c[e].name)});(0,i.writeFileSync)(s,`${JSON.stringify(m,null,2)}\n`),p.length>0&&this.process.exit(1)}exports.generateApiKeys=a;
|
|
2
|
+
//# sourceMappingURL=impl-BYr3VngT.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-BYr3VngT.cjs","names":["generateCrossAccountApiKeys","SCOPES_BY_TITLE"],"sources":["../src/commands/admin/generate-api-keys/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { writeFileSync } from 'node:fs';\n\nimport { ScopeName } from '@transcend-io/privacy-types';\n\nimport { generateCrossAccountApiKeys } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { SCOPES_BY_TITLE } from '../../../constants';\n\n// Command flag interface\nexport interface GenerateApiKeysCommandFlags {\n email: string;\n password: string;\n apiKeyTitle: string;\n file: string;\n scopes: string[];\n deleteExistingApiKey: boolean;\n createNewApiKey: boolean;\n parentOrganizationId?: string;\n transcendUrl: string;\n}\n\n// Command implementation\nexport async function generateApiKeys(\n this: LocalContext,\n {\n email,\n password,\n apiKeyTitle,\n file,\n scopes,\n deleteExistingApiKey,\n createNewApiKey,\n parentOrganizationId,\n transcendUrl,\n }: GenerateApiKeysCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const scopeNames = scopes.map(\n (scopeTitle) => SCOPES_BY_TITLE[scopeTitle].name as ScopeName,\n );\n\n // Upload privacy requests\n const { errors, apiKeys } = await generateCrossAccountApiKeys({\n transcendUrl,\n password,\n email,\n parentOrganizationId,\n deleteExistingApiKey,\n createNewApiKey,\n apiKeyTitle,\n scopes: scopeNames,\n });\n\n // Write to disk\n writeFileSync(file, `${JSON.stringify(apiKeys, null, 2)}\\n`);\n if (errors.length > 0) {\n this.process.exit(1);\n }\n}\n"],"mappings":"8WAuBA,eAAsB,EAEpB,CACE,QACA,WACA,cACA,OACA,SACA,uBACA,kBACA,uBACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAOtC,GAAM,CAAE,SAAQ,WAAY,MAAMA,EAAAA,EAA4B,CAC5D,eACA,WACA,QACA,uBACA,uBACA,kBACA,cACA,OAbiB,EAAO,IACvB,GAAeC,EAAAA,EAAgB,GAAY,KAC7C,CAYA,CAAC,EAGF,EAAA,EAAA,eAAc,EAAM,GAAG,KAAK,UAAU,EAAS,KAAM,EAAE,CAAC,IAAI,CACxD,EAAO,OAAS,GAClB,KAAK,QAAQ,KAAK,EAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`);const e=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`);require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({auth:n,transcendUrl:r,identifierNames:i,actions:a=[]}){t.t(this.process.exit),await e.P({requestActions:a,transcendUrl:r,auth:n,identifierNames:i})}exports.rejectUnverifiedIdentifiers=n;
|
|
2
|
+
//# sourceMappingURL=impl-Bbzjk8q9.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-Bbzjk8q9.cjs","names":["removeUnverifiedRequestIdentifiers"],"sources":["../src/commands/request/reject-unverified-identifiers/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { removeUnverifiedRequestIdentifiers } from '../../../lib/requests';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface RejectUnverifiedIdentifiersCommandFlags {\n auth: string;\n identifierNames: string[];\n actions?: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function rejectUnverifiedIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n identifierNames,\n actions = [],\n }: RejectUnverifiedIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await removeUnverifiedRequestIdentifiers({\n requestActions: actions,\n transcendUrl,\n auth,\n identifierNames,\n });\n}\n"],"mappings":"6QAYA,eAAsB,EAEpB,CACE,OACA,eACA,kBACA,UAAU,EAAE,EAEC,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAmC,CACvC,eAAgB,EAChB,eACA,OACA,kBACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-C2Ve1XaG.cjs`);const t=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),n=require(`./logger-BaHHbWVd.cjs`);require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const r=require(`./done-input-validation-Cgk5kNBs.cjs`),i=require(`./preference-management-BvvoySGZ.cjs`);let a=require(`node:fs`),o=require(`node:path`),s=require(`colors`);s=e.s(s);let c=require(`cli-progress`);c=e.s(c);async function l({auth:e,partition:l,sombraAuth:u,file:d=``,directory:f,transcendUrl:p,timestamp:m,maxConcurrency:h,maxItemsInChunk:g,receiptDirectory:_,fileConcurrency:v}){f&&d&&(n.t.error(s.default.red(`Cannot provide both a directory and a file. Please provide only one.`)),this.process.exit(1)),!d&&!f&&(n.t.error(s.default.red(`A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences`)),this.process.exit(1)),r.t(this.process.exit);let y=[];if(f)try{let e=(0,a.readdirSync)(f).filter(e=>e.endsWith(`.csv`));e.length===0&&(n.t.error(s.default.red(`No CSV files found in directory: ${f}`)),this.process.exit(1)),y.push(...e.map(e=>(0,o.join)(f,e)))}catch(e){n.t.error(s.default.red(`Failed to read directory: ${f}`)),n.t.error(s.default.red(e.message)),this.process.exit(1)}else try{d.endsWith(`.csv`)||(n.t.error(s.default.red(`File must be a CSV file`)),this.process.exit(1)),y.push(d)}catch(e){n.t.error(s.default.red(`Failed to access file: ${d}`)),n.t.error(s.default.red(e.message)),this.process.exit(1)}n.t.debug(s.default.green(`Processing ${y.length} consent preferences files for partition: ${l}`)),n.t.debug(`\nFiles to process: ${y.join(`, `)}\n`);let b=await t.ei(p,e,u),x=new c.default.SingleBar({format:`Deletion Progress |${s.default.cyan(`[{bar}]`)}| Duration: ${s.default.red(`{duration_formatted}`)} | {value}/{total} Files Processed `},c.default.Presets.shades_classic);x.start(y.length,0);let S=await t.Ts(y,async e=>{let t=await i.t(b,{partition:l,filePath:e,timestamp:m,maxItemsInChunk:g,maxConcurrency:h});return x.increment(),t},{concurrency:v});x.stop();let C=S.flat(),w=``;C.length>0&&(w=(0,o.join)(_,`deletion-failures-${Date.now()}.csv`),t.l(w,C,!0)),n.t.info(s.default.green(`
|
|
2
2
|
|
|
3
3
|
==================================
|
|
4
4
|
|
|
@@ -9,4 +9,4 @@ const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-KUUI8R0B.cjs`);cons
|
|
|
9
9
|
==================================
|
|
10
10
|
|
|
11
11
|
`))}exports.deletePreferenceRecords=l;
|
|
12
|
-
//# sourceMappingURL=impl-
|
|
12
|
+
//# sourceMappingURL=impl-BcviCK8B.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-BcviCK8B.cjs","names":["file","createSombraGotInstance","cliProgress","map","bulkDeletePreferenceRecords"],"sources":["../src/commands/consent/delete-preference-records/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport { createSombraGotInstance } from '../../../lib/graphql';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { logger } from '../../../logger';\nimport { readdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { map } from '../../../lib/bluebird';\nimport { bulkDeletePreferenceRecords } from '../../../lib/preference-management';\nimport cliProgress from 'cli-progress';\nimport { writeCsv } from '../../../lib/helpers';\n\nexport interface DeletePreferenceRecordsCommandFlags {\n /** Transcend API key for authentication */\n auth: string;\n /** Partition ID to delete preference records from */\n partition: string;\n /** Optional Sombra internal key for self-hosted instances */\n sombraAuth?: string;\n /** Path to the CSV file used to identify preference records to delete */\n file?: string;\n /** Path to the directory of CSV files to load preferences from */\n directory?: string;\n /** Base URL for the Transcend API */\n transcendUrl: string;\n /** The timestamp when the deletion operation is made. Used for logging purposes. */\n timestamp: Date;\n /** Maximum items to include in each deletion chunk */\n maxItemsInChunk: number;\n /** Maximum concurrency for deletion requests */\n maxConcurrency: number;\n /** Directory to write receipts of failed deletions to */\n receiptDirectory: string;\n /** Number of files to process concurrently when deleting preference records from multiple files */\n fileConcurrency: number;\n}\n\nexport async function deletePreferenceRecords(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n file = '',\n directory,\n transcendUrl,\n timestamp,\n maxConcurrency,\n maxItemsInChunk,\n receiptDirectory,\n fileConcurrency,\n }: DeletePreferenceRecordsCommandFlags,\n): Promise<void> {\n if (!!directory && !!file) {\n logger.error(\n colors.red(\n 'Cannot provide both a directory and a file. Please provide only one.',\n ),\n );\n this.process.exit(1);\n }\n\n if (!file && !directory) {\n logger.error(\n colors.red(\n 'A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences',\n ),\n );\n this.process.exit(1);\n }\n doneInputValidation(this.process.exit);\n\n const files: string[] = [];\n\n if (directory) {\n try {\n const filesInDirectory = readdirSync(directory);\n const csvFiles = filesInDirectory.filter((file) => file.endsWith('.csv'));\n\n if (csvFiles.length === 0) {\n logger.error(\n colors.red(`No CSV files found in directory: ${directory}`),\n );\n this.process.exit(1);\n }\n\n // Add full paths for each CSV file\n files.push(...csvFiles.map((file) => join(directory, file)));\n } catch (err) {\n logger.error(colors.red(`Failed to read directory: ${directory}`));\n logger.error(colors.red((err as Error).message));\n this.process.exit(1);\n }\n } else {\n try {\n // Verify file exists and is a CSV\n if (!file.endsWith('.csv')) {\n logger.error(colors.red('File must be a CSV file'));\n this.process.exit(1);\n }\n files.push(file);\n } catch (err) {\n logger.error(colors.red(`Failed to access file: ${file}`));\n logger.error(colors.red((err as Error).message));\n this.process.exit(1);\n }\n }\n\n logger.debug(\n colors.green(\n `Processing ${files.length} consent preferences files for partition: ${partition}`,\n ),\n );\n logger.debug(`\\nFiles to process: ${files.join(', ')}\\n`);\n\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const globalProgressBar = new cliProgress.SingleBar(\n {\n format: `Deletion Progress |${colors.cyan(\n '[{bar}]',\n )}| Duration: ${colors.red(\n '{duration_formatted}',\n )} | {value}/{total} Files Processed `,\n },\n cliProgress.Presets.shades_classic,\n );\n globalProgressBar.start(files.length, 0);\n\n // Process batch of files with concurrency\n const failedResultsArrays = await map(\n files,\n async (filePath) => {\n const result = await bulkDeletePreferenceRecords(sombra, {\n partition,\n filePath,\n timestamp,\n maxItemsInChunk,\n maxConcurrency,\n });\n globalProgressBar.increment();\n return result;\n },\n { concurrency: fileConcurrency },\n );\n globalProgressBar.stop();\n const failedResults = failedResultsArrays.flat();\n\n // Check for failed results and write receipt if any\n let receiptPath = '';\n if (failedResults.length > 0) {\n receiptPath = join(receiptDirectory, `deletion-failures-${Date.now()}.csv`);\n writeCsv(receiptPath, failedResults, true);\n }\n\n logger.info(colors.green('\\n\\n ================================== \\n\\n'));\n logger.info(colors.green('\\n#### Deletion Summary Report #####\\n'));\n logger.info(\n colors.green(\n `📁 Total Files Processed: ${files.length} \\n` +\n `❌ Errors: ${failedResults.length} \\n` +\n `📝 Receipt Path: ${receiptPath || 'N/A'}`,\n ),\n );\n logger.info(colors.green('\\n\\n==================================\\n\\n'));\n}\n"],"mappings":"6bAsCA,eAAsB,EAEpB,CACE,OACA,YACA,aACA,OAAO,GACP,YACA,eACA,YACA,iBACA,kBACA,mBACA,mBAEa,CACT,GAAe,IACnB,EAAA,EAAO,MACL,EAAA,QAAO,IACL,uEACD,CACF,CACD,KAAK,QAAQ,KAAK,EAAE,EAGlB,CAAC,GAAQ,CAAC,IACZ,EAAA,EAAO,MACL,EAAA,QAAO,IACL,uHACD,CACF,CACD,KAAK,QAAQ,KAAK,EAAE,EAEtB,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,IAAM,EAAkB,EAAE,CAE1B,GAAI,EACF,GAAI,CAEF,IAAM,GAAA,EAAA,EAAA,aAD+B,EAAU,CACb,OAAQ,GAASA,EAAK,SAAS,OAAO,CAAC,CAErE,EAAS,SAAW,IACtB,EAAA,EAAO,MACL,EAAA,QAAO,IAAI,oCAAoC,IAAY,CAC5D,CACD,KAAK,QAAQ,KAAK,EAAE,EAItB,EAAM,KAAK,GAAG,EAAS,IAAK,IAAA,EAAA,EAAA,MAAc,EAAWA,EAAK,CAAC,CAAC,OACrD,EAAK,CACZ,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,6BAA6B,IAAY,CAAC,CAClE,EAAA,EAAO,MAAM,EAAA,QAAO,IAAK,EAAc,QAAQ,CAAC,CAChD,KAAK,QAAQ,KAAK,EAAE,MAGtB,GAAI,CAEG,EAAK,SAAS,OAAO,GACxB,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,0BAA0B,CAAC,CACnD,KAAK,QAAQ,KAAK,EAAE,EAEtB,EAAM,KAAK,EAAK,OACT,EAAK,CACZ,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,0BAA0B,IAAO,CAAC,CAC1D,EAAA,EAAO,MAAM,EAAA,QAAO,IAAK,EAAc,QAAQ,CAAC,CAChD,KAAK,QAAQ,KAAK,EAAE,CAIxB,EAAA,EAAO,MACL,EAAA,QAAO,MACL,cAAc,EAAM,OAAO,4CAA4C,IACxE,CACF,CACD,EAAA,EAAO,MAAM,uBAAuB,EAAM,KAAK,KAAK,CAAC,IAAI,CAGzD,IAAM,EAAS,MAAMC,EAAAA,GAAwB,EAAc,EAAM,EAAW,CACtE,EAAoB,IAAIC,EAAAA,QAAY,UACxC,CACE,OAAQ,sBAAsB,EAAA,QAAO,KACnC,UACD,CAAC,cAAc,EAAA,QAAO,IACrB,uBACD,CAAC,qCACH,CACDA,EAAAA,QAAY,QAAQ,eACrB,CACD,EAAkB,MAAM,EAAM,OAAQ,EAAE,CAGxC,IAAM,EAAsB,MAAMC,EAAAA,GAChC,EACA,KAAO,IAAa,CAClB,IAAM,EAAS,MAAMC,EAAAA,EAA4B,EAAQ,CACvD,YACA,WACA,YACA,kBACA,iBACD,CAAC,CAEF,OADA,EAAkB,WAAW,CACtB,GAET,CAAE,YAAa,EAAiB,CACjC,CACD,EAAkB,MAAM,CACxB,IAAM,EAAgB,EAAoB,MAAM,CAG5C,EAAc,GACd,EAAc,OAAS,IACzB,GAAA,EAAA,EAAA,MAAmB,EAAkB,qBAAqB,KAAK,KAAK,CAAC,MAAM,CAC3E,EAAA,EAAS,EAAa,EAAe,GAAK,EAG5C,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM;;;;EAA+C,CAAC,CACzE,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM;;EAAyC,CAAC,CACnE,EAAA,EAAO,KACL,EAAA,QAAO,MACL,6BAA6B,EAAM,OAAO,eAC3B,EAAc,OAAO,sBACd,GAAe,QACtC,CACF,CACD,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM;;;;EAA6C,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`);const e=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`);require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({auth:n,transcendUrl:r,createdAtBefore:i,createdAtAfter:a,actions:o,daysLeft:s,days:c,requestIds:l,emailTemplate:u,concurrency:d}){t.t(this.process.exit),await e.q({transcendUrl:r,requestActions:o,auth:n,emailTemplate:u,days:c,daysLeft:s,requestIds:l,concurrency:d,createdAtBefore:i,createdAtAfter:a})}exports.notifyAdditionalTime=n;
|
|
2
|
+
//# sourceMappingURL=impl-BiiO-h6Y.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-BiiO-h6Y.cjs","names":["notifyPrivacyRequestsAdditionalTime"],"sources":["../src/commands/request/notify-additional-time/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { notifyPrivacyRequestsAdditionalTime } from '../../../lib/requests';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface NotifyAdditionalTimeCommandFlags {\n auth: string;\n createdAtBefore: Date;\n createdAtAfter?: Date;\n actions?: RequestAction[];\n daysLeft: number;\n days: number;\n requestIds?: string[];\n emailTemplate: string;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function notifyAdditionalTime(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n createdAtBefore,\n createdAtAfter,\n actions,\n daysLeft,\n days,\n requestIds,\n emailTemplate,\n concurrency,\n }: NotifyAdditionalTimeCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await notifyPrivacyRequestsAdditionalTime({\n transcendUrl,\n requestActions: actions,\n auth,\n emailTemplate,\n days,\n daysLeft,\n requestIds,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"],"mappings":"6QAkBA,eAAsB,EAEpB,CACE,OACA,eACA,kBACA,iBACA,UACA,WACA,OACA,aACA,gBACA,eAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAoC,CACxC,eACA,eAAgB,EAChB,OACA,gBACA,OACA,WACA,aACA,cACA,kBACA,iBACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./enums-CBXlBJii.cjs`),t=require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`),t=require(`./constants-C2Ve1XaG.cjs`),n=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),r=require(`./logger-BaHHbWVd.cjs`);require(`./buildAIIntegrationType-n_Qlv8wG.cjs`),require(`./codecs-JSDJgtyL.cjs`),require(`./api-keys-CQHYfnKg.cjs`);const i=require(`./done-input-validation-Cgk5kNBs.cjs`),a=require(`./code-scanning-DjzRqe2Q.cjs`);let o=require(`colors`);o=e.s(o);let s=require(`child_process`);const c=`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 l({auth:e,scanPath:l,ignoreDirs:u,repositoryName:d,transcendUrl:f}){i.t(this.process.exit);let p=d;if(!p)try{let e=(0,s.execSync)(`cd ${l} && git config --get remote.origin.url`).toString(`utf-8`).trim();[p]=e.includes(`https:`)?e.split(`/`).slice(3).join(`/`).split(`.`):(e.split(`:`).pop()||``).split(`.`),p||(r.t.error(o.default.red(c)),this.process.exit(1))}catch(e){r.t.error(o.default.red(`${c} - Got error: ${e.message}`)),this.process.exit(1)}let m=n.ti(f,e),h=await a.t({scanPath:l,ignoreDirs:u,repositoryName:p});await n.zt(m,h);let g=new URL(t.t);g.pathname=`/code-scanning/code-packages`,r.t.info(o.default.green(`Scan found ${h.length} packages at ${l}! View results at '${g.href}'`))}exports.scanPackages=l;
|
|
2
|
+
//# sourceMappingURL=impl-BosASPXe.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-BosASPXe.cjs","names":["buildTranscendGraphQLClient","findCodePackagesInFolder","syncCodePackages","ADMIN_DASH"],"sources":["../src/commands/inventory/scan-packages/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { ADMIN_DASH } from '../../../constants';\nimport { findCodePackagesInFolder } from '../../../lib/code-scanning';\nimport {\n buildTranscendGraphQLClient,\n syncCodePackages,\n} from '../../../lib/graphql';\nimport { execSync } from 'child_process';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nconst REPO_ERROR =\n 'A repository name must be provided. ' +\n 'You can specify using --repositoryName=$REPO_NAME or by ensuring the ' +\n 'command \"git config --get remote.origin.url\" returns the name of the repository';\n\nexport interface ScanPackagesCommandFlags {\n auth: string;\n scanPath: string;\n ignoreDirs?: string[];\n repositoryName?: string;\n transcendUrl: string;\n}\n\nexport async function scanPackages(\n this: LocalContext,\n {\n auth,\n scanPath,\n ignoreDirs,\n repositoryName,\n transcendUrl,\n }: ScanPackagesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Ensure repository name is specified\n let gitRepositoryName = repositoryName;\n if (!gitRepositoryName) {\n try {\n const name = execSync(\n `cd ${scanPath} && git config --get remote.origin.url`,\n );\n // Trim and parse the URL\n const url = name.toString('utf-8').trim();\n [gitRepositoryName] = !url.includes('https:')\n ? (url.split(':').pop() || '').split('.')\n : url.split('/').slice(3).join('/').split('.');\n if (!gitRepositoryName) {\n logger.error(colors.red(REPO_ERROR));\n this.process.exit(1);\n }\n } catch (err) {\n logger.error(colors.red(`${REPO_ERROR} - Got error: ${err.message}`));\n this.process.exit(1);\n }\n }\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Scan the codebase to discovery packages\n const results = await findCodePackagesInFolder({\n scanPath,\n ignoreDirs,\n repositoryName: gitRepositoryName,\n });\n\n // Report scan to Transcend\n await syncCodePackages(client, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/code-scanning/code-packages';\n\n // Indicate success\n logger.info(\n colors.green(\n `Scan found ${results.length} packages at ${scanPath}! ` +\n `View results at '${newUrl.href}'`,\n ),\n );\n}\n"],"mappings":"icAYA,MAAM,EACJ,2LAYF,eAAsB,EAEpB,CACE,OACA,WACA,aACA,iBACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAGtC,IAAI,EAAoB,EACxB,GAAI,CAAC,EACH,GAAI,CAKF,IAAM,GAAA,EAAA,EAAA,UAHJ,MAAM,EAAS,wCAChB,CAEgB,SAAS,QAAQ,CAAC,MAAM,CACzC,CAAC,GAAsB,EAAI,SAAS,SAAS,CAEzC,EAAI,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,EAD3C,EAAI,MAAM,IAAI,CAAC,KAAK,EAAI,IAAI,MAAM,IAAI,CAEtC,IACH,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,EAAW,CAAC,CACpC,KAAK,QAAQ,KAAK,EAAE,QAEf,EAAK,CACZ,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,GAAG,EAAW,gBAAgB,EAAI,UAAU,CAAC,CACrE,KAAK,QAAQ,KAAK,EAAE,CAKxB,IAAM,EAASA,EAAAA,GAA4B,EAAc,EAAK,CAGxD,EAAU,MAAMC,EAAAA,EAAyB,CAC7C,WACA,aACA,eAAgB,EACjB,CAAC,CAGF,MAAMC,EAAAA,GAAiB,EAAQ,EAAQ,CAEvC,IAAM,EAAS,IAAI,IAAIC,EAAAA,EAAW,CAClC,EAAO,SAAW,+BAGlB,EAAA,EAAO,KACL,EAAA,QAAO,MACL,cAAc,EAAQ,OAAO,eAAe,EAAS,qBAC/B,EAAO,KAAK,GACnC,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`),require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const e=require(`./cron-BU5K5zwR.cjs`),t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({file:n,transcendUrl:r,auth:i,sombraAuth:a,dataSiloId:o}){t.t(this.process.exit),await e.r({file:n,transcendUrl:r,auth:i,sombraAuth:a,dataSiloId:o})}exports.markIdentifiersCompleted=n;
|
|
2
|
+
//# sourceMappingURL=impl-C4ss2ucp.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-C4ss2ucp.cjs","names":["pushCronIdentifiersFromCsv"],"sources":["../src/commands/request/cron/mark-identifiers-completed/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../../context';\nimport { pushCronIdentifiersFromCsv } from '../../../../lib/cron';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface MarkIdentifiersCompletedCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n}\n\nexport async function markIdentifiersCompleted(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n }: MarkIdentifiersCompletedCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pushCronIdentifiersFromCsv({\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n });\n}\n"],"mappings":"sSAYA,eAAsB,EAEpB,CACE,OACA,eACA,OACA,aACA,cAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAA2B,CAC/B,OACA,eACA,OACA,aACA,aACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-C2Ve1XaG.cjs`);const t=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),n=require(`./logger-BaHHbWVd.cjs`);require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const r=require(`./done-input-validation-Cgk5kNBs.cjs`);let i=require(`colors`);i=e.s(i);async function a({auth:e,transcendUrl:a,file:o,pageLimit:s,actions:c,sombraAuth:l,skipRequestIdentifiers:u,statuses:d,createdAtBefore:f,createdAtAfter:p,showTests:m}){r.t(this.process.exit);let{requestsFormattedForCsv:h}=await t.I({transcendUrl:a,pageLimit:s,actions:c,skipRequestIdentifiers:u,statuses:d,auth:e,sombraAuth:l,createdAtBefore:f,createdAtAfter:p,isTest:m});await t.d(o,h,t.Ds(h.map(e=>Object.keys(e)).flat())),n.t.info(i.default.green(`Successfully wrote ${h.length} requests to file "${o}"`))}exports._export=a;
|
|
2
|
+
//# sourceMappingURL=impl-C9s0TQEw.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-C9s0TQEw.cjs","names":["pullPrivacyRequests","writeLargeCsv","uniq"],"sources":["../src/commands/request/export/impl.ts"],"sourcesContent":["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 { writeLargeCsv } from '../../../lib/helpers';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ExportCommandFlags {\n auth: string;\n sombraAuth?: string;\n actions?: RequestAction[];\n statuses?: RequestStatus[];\n transcendUrl: string;\n file: string;\n concurrency: number;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n showTests?: boolean;\n skipRequestIdentifiers?: 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 skipRequestIdentifiers,\n statuses,\n createdAtBefore,\n createdAtAfter,\n showTests,\n }: ExportCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { requestsFormattedForCsv } = await pullPrivacyRequests({\n transcendUrl,\n pageLimit,\n actions,\n skipRequestIdentifiers,\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 await writeLargeCsv(file, requestsFormattedForCsv, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${requestsFormattedForCsv.length} requests to file \"${file}\"`,\n ),\n );\n}\n"],"mappings":"wTA2BA,eAAsB,EAEpB,CACE,OACA,eACA,OACA,YACA,UACA,aACA,yBACA,WACA,kBACA,iBACA,aAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,GAAM,CAAE,2BAA4B,MAAMA,EAAAA,EAAoB,CAC5D,eACA,YACA,UACA,yBACA,WACA,OACA,aACA,kBACA,iBACA,OAAQ,EACT,CAAC,CAMF,MAAMC,EAAAA,EAAc,EAAM,EAHVC,EAAAA,GACd,EAAwB,IAAK,GAAM,OAAO,KAAK,EAAE,CAAC,CAAC,MAAM,CAC1D,CAC0D,CAC3D,EAAA,EAAO,KACL,EAAA,QAAO,MACL,sBAAsB,EAAwB,OAAO,qBAAqB,EAAK,GAChF,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`);const e=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`);require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({auth:n,actions:r,origins:i,silentModeBefore:a,createdAtBefore:o,createdAtAfter:s,transcendUrl:c,concurrency:l}){t.t(this.process.exit),await e.J({transcendUrl:c,requestActions:r,auth:n,requestOrigins:i,concurrency:l,silentModeBefore:a,createdAtBefore:o,createdAtAfter:s})}exports.approve=n;
|
|
2
|
+
//# sourceMappingURL=impl-CA0qacrn.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-CA0qacrn.cjs","names":["approvePrivacyRequests"],"sources":["../src/commands/request/approve/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\n\nimport { RequestAction, RequestOrigin } from '@transcend-io/privacy-types';\nimport { approvePrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ApproveCommandFlags {\n auth: string;\n actions: RequestAction[];\n origins?: RequestOrigin[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function approve(\n this: LocalContext,\n {\n auth,\n actions,\n origins,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n transcendUrl,\n concurrency,\n }: ApproveCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await approvePrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestOrigins: origins,\n concurrency,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"],"mappings":"6QAiBA,eAAsB,EAEpB,CACE,OACA,UACA,UACA,mBACA,kBACA,iBACA,eACA,eAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAuB,CAC3B,eACA,eAAgB,EAChB,OACA,eAAgB,EAChB,cACA,mBACA,kBACA,iBACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-C2Ve1XaG.cjs`);const t=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),n=require(`./logger-BaHHbWVd.cjs`);require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const r=require(`./done-input-validation-Cgk5kNBs.cjs`),i=require(`./preference-management-BvvoySGZ.cjs`);let a=require(`node:fs`),o=require(`node:path`),s=require(`colors`);s=e.s(s);async function c({auth:e,partition:c,sombraAuth:l,transcendUrl:u,file:d=``,directory:f,dryRun:p,skipExistingRecordCheck:m,receiptFileDir:h,skipWorkflowTriggers:g,forceTriggerWorkflows:_,skipConflictUpdates:v,isSilent:y,attributes:b,concurrency:x}){f&&d&&(n.t.error(s.default.red(`Cannot provide both a directory and a file. Please provide only one.`)),this.process.exit(1)),!d&&!f&&(n.t.error(s.default.red(`A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences`)),this.process.exit(1)),r.t(this.process.exit);let S=[];if(f)try{let e=(0,a.readdirSync)(f).filter(e=>e.endsWith(`.csv`));e.length===0&&(n.t.error(s.default.red(`No CSV files found in directory: ${f}`)),this.process.exit(1)),S.push(...e.map(e=>(0,o.join)(f,e)))}catch(e){n.t.error(s.default.red(`Failed to read directory: ${f}`)),n.t.error(s.default.red(e.message)),this.process.exit(1)}else try{d.endsWith(`.csv`)||(n.t.error(s.default.red(`File must be a CSV file`)),this.process.exit(1)),S.push(d)}catch(e){n.t.error(s.default.red(`Failed to access file: ${d}`)),n.t.error(s.default.red(e.message)),this.process.exit(1)}n.t.info(s.default.green(`Processing ${S.length} consent preferences files for partition: ${c}`)),n.t.debug(`Files to process: ${S.join(`, `)}`),m&&n.t.info(s.default.bgYellow(`Skipping existing record check: ${m}`)),await t.Ts(S,async n=>{await i.a({receiptFilepath:(0,o.join)(h,`${(0,o.basename)(n).replace(`.csv`,``)}-receipts.json`),auth:e,sombraAuth:l,file:n,partition:c,transcendUrl:u,skipConflictUpdates:v,skipWorkflowTriggers:g,skipExistingRecordCheck:m,isSilent:y,dryRun:p,attributes:t.li(b),forceTriggerWorkflows:_})},{concurrency:x})}exports.uploadPreferences=c;
|
|
2
|
+
//# sourceMappingURL=impl-CCk0wXqs.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-CCk0wXqs.cjs","names":["file","map","uploadPreferenceManagementPreferencesInteractive","splitCsvToList"],"sources":["../src/commands/consent/upload-preferences/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport { logger } from '../../../logger';\nimport { uploadPreferenceManagementPreferencesInteractive } from '../../../lib/preference-management';\nimport { splitCsvToList } from '../../../lib/requests';\nimport { readdirSync } from 'node:fs';\nimport { map } from '../../../lib/bluebird';\nimport { basename, join } from 'node:path';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n transcendUrl: string;\n file?: string;\n directory?: string;\n dryRun: boolean;\n skipExistingRecordCheck: boolean;\n receiptFileDir: string;\n skipWorkflowTriggers: boolean;\n forceTriggerWorkflows: boolean;\n skipConflictUpdates: boolean;\n isSilent: boolean;\n attributes: string;\n receiptFilepath: string;\n concurrency: number;\n}\n\nexport async function uploadPreferences(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n transcendUrl,\n file = '',\n directory,\n dryRun,\n skipExistingRecordCheck,\n receiptFileDir,\n skipWorkflowTriggers,\n forceTriggerWorkflows,\n skipConflictUpdates,\n isSilent,\n attributes,\n concurrency,\n }: UploadPreferencesCommandFlags,\n): Promise<void> {\n if (!!directory && !!file) {\n logger.error(\n colors.red(\n 'Cannot provide both a directory and a file. Please provide only one.',\n ),\n );\n this.process.exit(1);\n }\n\n if (!file && !directory) {\n logger.error(\n colors.red(\n 'A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences',\n ),\n );\n this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n const files: string[] = [];\n\n if (directory) {\n try {\n const filesInDirectory = readdirSync(directory);\n const csvFiles = filesInDirectory.filter((file) => file.endsWith('.csv'));\n\n if (csvFiles.length === 0) {\n logger.error(\n colors.red(`No CSV files found in directory: ${directory}`),\n );\n this.process.exit(1);\n }\n\n // Add full paths for each CSV file\n files.push(...csvFiles.map((file) => join(directory, file)));\n } catch (err) {\n logger.error(colors.red(`Failed to read directory: ${directory}`));\n logger.error(colors.red((err as Error).message));\n this.process.exit(1);\n }\n } else {\n try {\n // Verify file exists and is a CSV\n if (!file.endsWith('.csv')) {\n logger.error(colors.red('File must be a CSV file'));\n this.process.exit(1);\n }\n files.push(file);\n } catch (err) {\n logger.error(colors.red(`Failed to access file: ${file}`));\n logger.error(colors.red((err as Error).message));\n this.process.exit(1);\n }\n }\n\n logger.info(\n colors.green(\n `Processing ${files.length} consent preferences files for partition: ${partition}`,\n ),\n );\n logger.debug(`Files to process: ${files.join(', ')}`);\n\n if (skipExistingRecordCheck) {\n logger.info(\n colors.bgYellow(\n `Skipping existing record check: ${skipExistingRecordCheck}`,\n ),\n );\n }\n\n await map(\n files,\n async (filePath) => {\n const fileName = basename(filePath).replace('.csv', '');\n await uploadPreferenceManagementPreferencesInteractive({\n receiptFilepath: join(receiptFileDir, `${fileName}-receipts.json`),\n auth,\n sombraAuth,\n file: filePath,\n partition,\n transcendUrl,\n skipConflictUpdates,\n skipWorkflowTriggers,\n skipExistingRecordCheck,\n isSilent,\n dryRun,\n attributes: splitCsvToList(attributes),\n forceTriggerWorkflows,\n });\n },\n { concurrency },\n );\n}\n"],"mappings":"sZA8BA,eAAsB,EAEpB,CACE,OACA,YACA,aACA,eACA,OAAO,GACP,YACA,SACA,0BACA,iBACA,uBACA,wBACA,sBACA,WACA,aACA,eAEa,CACT,GAAe,IACnB,EAAA,EAAO,MACL,EAAA,QAAO,IACL,uEACD,CACF,CACD,KAAK,QAAQ,KAAK,EAAE,EAGlB,CAAC,GAAQ,CAAC,IACZ,EAAA,EAAO,MACL,EAAA,QAAO,IACL,uHACD,CACF,CACD,KAAK,QAAQ,KAAK,EAAE,EAGtB,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,IAAM,EAAkB,EAAE,CAE1B,GAAI,EACF,GAAI,CAEF,IAAM,GAAA,EAAA,EAAA,aAD+B,EAAU,CACb,OAAQ,GAASA,EAAK,SAAS,OAAO,CAAC,CAErE,EAAS,SAAW,IACtB,EAAA,EAAO,MACL,EAAA,QAAO,IAAI,oCAAoC,IAAY,CAC5D,CACD,KAAK,QAAQ,KAAK,EAAE,EAItB,EAAM,KAAK,GAAG,EAAS,IAAK,IAAA,EAAA,EAAA,MAAc,EAAWA,EAAK,CAAC,CAAC,OACrD,EAAK,CACZ,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,6BAA6B,IAAY,CAAC,CAClE,EAAA,EAAO,MAAM,EAAA,QAAO,IAAK,EAAc,QAAQ,CAAC,CAChD,KAAK,QAAQ,KAAK,EAAE,MAGtB,GAAI,CAEG,EAAK,SAAS,OAAO,GACxB,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,0BAA0B,CAAC,CACnD,KAAK,QAAQ,KAAK,EAAE,EAEtB,EAAM,KAAK,EAAK,OACT,EAAK,CACZ,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,0BAA0B,IAAO,CAAC,CAC1D,EAAA,EAAO,MAAM,EAAA,QAAO,IAAK,EAAc,QAAQ,CAAC,CAChD,KAAK,QAAQ,KAAK,EAAE,CAIxB,EAAA,EAAO,KACL,EAAA,QAAO,MACL,cAAc,EAAM,OAAO,4CAA4C,IACxE,CACF,CACD,EAAA,EAAO,MAAM,qBAAqB,EAAM,KAAK,KAAK,GAAG,CAEjD,GACF,EAAA,EAAO,KACL,EAAA,QAAO,SACL,mCAAmC,IACpC,CACF,CAGH,MAAMC,EAAAA,GACJ,EACA,KAAO,IAAa,CAElB,MAAMC,EAAAA,EAAiD,CACrD,iBAAA,EAAA,EAAA,MAAsB,EAAgB,IAAA,EAAA,EAAA,UAFd,EAAS,CAAC,QAAQ,OAAQ,GAAG,CAEH,gBAAgB,CAClE,OACA,aACA,KAAM,EACN,YACA,eACA,sBACA,uBACA,0BACA,WACA,SACA,WAAYC,EAAAA,GAAe,EAAW,CACtC,wBACD,CAAC,EAEJ,CAAE,cAAa,CAChB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`);const e=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`);require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({auth:n,file:r,transcendUrl:i,cacheFilepath:a,requestReceiptFolder:o,sombraAuth:s,concurrency:c,attributes:l,isTest:u,isSilent:d,skipSendingReceipt:f,emailIsVerified:p,skipFilterStep:m,dryRun:h,debug:g,defaultPhoneCountryCode:_}){t.t(this.process.exit),await e.H({cacheFilepath:a,requestReceiptFolder:o,file:r,auth:n,sombraAuth:s,concurrency:c,transcendUrl:i,defaultPhoneCountryCode:_,attributes:e.li(l),debug:g,skipFilterStep:m,isSilent:d,skipSendingReceipt:f,emailIsVerified:p,isTest:u,dryRun:h})}exports.upload=n;
|
|
2
|
+
//# sourceMappingURL=impl-CH3uHqRx.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-CH3uHqRx.cjs","names":["uploadPrivacyRequestsFromCsv","splitCsvToList"],"sources":["../src/commands/request/upload/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport {\n splitCsvToList,\n uploadPrivacyRequestsFromCsv,\n} from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\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"],"mappings":"6QA0BA,eAAsB,EAEpB,CACE,OACA,OACA,eACA,gBACA,uBACA,aACA,cACA,aACA,SACA,WACA,qBACA,kBACA,iBACA,SACA,QACA,2BAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAA6B,CACjC,gBACA,uBACA,OACA,OACA,aACA,cACA,eACA,0BACA,WAAYC,EAAAA,GAAe,EAAW,CACtC,QACA,iBACA,WACA,qBACA,kBACA,SACA,SACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`),require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`),require(`./codecs-JSDJgtyL.cjs`);const e=require(`./consent-manager-BplE7hDG.cjs`);require(`./uploadConsents-BVjLnCTQ.cjs`);const t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({auth:n,trackerStatus:r,file:i,transcendUrl:a}){t.t(this.process.exit),await e.o({auth:n,trackerStatus:r,file:i,transcendUrl:a})}exports.uploadCookiesFromCsv=n;
|
|
2
|
+
//# sourceMappingURL=impl-CIlOM3O6.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-CIlOM3O6.cjs","names":["uploadCookiesFromCsvHelper"],"sources":["../src/commands/consent/upload-cookies-from-csv/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { uploadCookiesFromCsv as uploadCookiesFromCsvHelper } from '../../../lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadCookiesFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n transcendUrl: string;\n}\n\nexport async function uploadCookiesFromCsv(\n this: LocalContext,\n { auth, trackerStatus, file, transcendUrl }: UploadCookiesFromCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Upload cookies\n await uploadCookiesFromCsvHelper({\n auth,\n trackerStatus,\n file,\n transcendUrl,\n });\n}\n"],"mappings":"iYAYA,eAAsB,EAEpB,CAAE,OAAM,gBAAe,OAAM,gBACd,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAGtC,MAAMA,EAAAA,EAA2B,CAC/B,OACA,gBACA,OACA,eACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`),require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`),require(`./codecs-JSDJgtyL.cjs`);const e=require(`./consent-manager-BplE7hDG.cjs`);require(`./uploadConsents-BVjLnCTQ.cjs`);const t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({auth:n,trackerStatus:r,file:i,classifyService:a,transcendUrl:o}){t.t(this.process.exit),await e.s({auth:n,trackerStatus:r,file:i,classifyService:a,transcendUrl:o})}exports.uploadDataFlowsFromCsv=n;
|
|
2
|
+
//# sourceMappingURL=impl-CSMb-dkf.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-CSMb-dkf.cjs","names":["uploadDataFlowsFromCsvHelper"],"sources":["../src/commands/consent/upload-data-flows-from-csv/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { uploadDataFlowsFromCsv as uploadDataFlowsFromCsvHelper } from '../../../lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadDataFlowsFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n classifyService: boolean;\n transcendUrl: string;\n}\n\nexport async function uploadDataFlowsFromCsv(\n this: LocalContext,\n {\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n }: UploadDataFlowsFromCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await uploadDataFlowsFromCsvHelper({\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n });\n}\n"],"mappings":"iYAaA,eAAsB,EAEpB,CACE,OACA,gBACA,OACA,kBACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAA6B,CACjC,OACA,gBACA,OACA,kBACA,eACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-C2Ve1XaG.cjs`),require(`./syncConfigurationToTranscend-CpoC4raI.cjs`);const t=require(`./logger-BaHHbWVd.cjs`);require(`./buildAIIntegrationType-n_Qlv8wG.cjs`),require(`./codecs-JSDJgtyL.cjs`);const n=require(`./readTranscendYaml-CL9nujUr.cjs`),r=require(`./consent-manager-BplE7hDG.cjs`);require(`./uploadConsents-BVjLnCTQ.cjs`);const i=require(`./api-keys-CQHYfnKg.cjs`),a=require(`./done-input-validation-Cgk5kNBs.cjs`);let o=require(`node:fs`),s=require(`node:path`),c=require(`colors`);c=e.s(c);function l({consentManagerYmlFolder:e,output:l}){a.t(this.process.exit),(!(0,o.existsSync)(e)||!(0,o.lstatSync)(e).isDirectory())&&(t.t.error(c.default.red(`Folder does not exist: "${e}"`)),this.process.exit(1));let u=r.t(i.n(e).map(t=>{let{"consent-manager":r}=n.r((0,s.join)(e,t));return{name:t,input:r}}));n.a(l,{"business-entities":u}),t.t.info(c.default.green(`Successfully wrote ${u.length} business entities to file "${l}"`))}exports.consentManagersToBusinessEntities=l;
|
|
2
|
+
//# sourceMappingURL=impl-CXeNJIcH.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-CXeNJIcH.cjs","names":["consentManagersToBusinessEntitiesHelper","listFiles","readTranscendYaml"],"sources":["../src/commands/inventory/consent-managers-to-business-entities/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { listFiles } from '../../../lib/api-keys';\nimport { consentManagersToBusinessEntities as consentManagersToBusinessEntitiesHelper } from '../../../lib/consent-manager';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { join } from 'node:path';\n\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ConsentManagersToBusinessEntitiesCommandFlags {\n consentManagerYmlFolder: string;\n output: string;\n}\n\nexport function consentManagersToBusinessEntities(\n this: LocalContext,\n {\n consentManagerYmlFolder,\n output,\n }: ConsentManagersToBusinessEntitiesCommandFlags,\n): void {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(consentManagerYmlFolder) ||\n !lstatSync(consentManagerYmlFolder).isDirectory()\n ) {\n logger.error(\n colors.red(`Folder does not exist: \"${consentManagerYmlFolder}\"`),\n );\n this.process.exit(1);\n }\n\n // Read in each consent manager configuration\n const inputs = listFiles(consentManagerYmlFolder).map((directory) => {\n const { 'consent-manager': consentManager } = readTranscendYaml(\n join(consentManagerYmlFolder, directory),\n );\n return { name: directory, input: consentManager };\n });\n\n // Convert to business entities\n const businessEntities = consentManagersToBusinessEntitiesHelper(inputs);\n\n // write to disk\n writeTranscendYaml(output, {\n 'business-entities': businessEntities,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${businessEntities.length} business entities to file \"${output}\"`,\n ),\n );\n}\n"],"mappings":"ijBAmBA,SAAgB,EAEd,CACE,0BACA,UAEI,CACN,EAAA,EAAoB,KAAK,QAAQ,KAAK,EAIpC,EAAA,EAAA,EAAA,YAAY,EAAwB,EACpC,EAAA,EAAA,EAAA,WAAW,EAAwB,CAAC,aAAa,IAEjD,EAAA,EAAO,MACL,EAAA,QAAO,IAAI,2BAA2B,EAAwB,GAAG,CAClE,CACD,KAAK,QAAQ,KAAK,EAAE,EAYtB,IAAM,EAAmBA,EAAAA,EARVC,EAAAA,EAAU,EAAwB,CAAC,IAAK,GAAc,CACnE,GAAM,CAAE,kBAAmB,GAAmBC,EAAAA,GAAAA,EAAAA,EAAAA,MACvC,EAAyB,EAAU,CACzC,CACD,MAAO,CAAE,KAAM,EAAW,MAAO,EAAgB,EACjD,CAGsE,CAGxE,EAAA,EAAmB,EAAQ,CACzB,oBAAqB,EACtB,CAAC,CAEF,EAAA,EAAO,KACL,EAAA,QAAO,MACL,sBAAsB,EAAiB,OAAO,8BAA8B,EAAO,GACpF,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./enums-CBXlBJii.cjs`),require(`./constants-
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
require(`./enums-CBXlBJii.cjs`),require(`./constants-C2Ve1XaG.cjs`);const e=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`);require(`./logger-BaHHbWVd.cjs`),require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const t=require(`./done-input-validation-Cgk5kNBs.cjs`);async function n({auth:n,actions:r,statuses:i=[],requestIds:a,silentModeBefore:o,createdAtBefore:s,createdAtAfter:c,cancellationTitle:l,transcendUrl:u,concurrency:d}){t.t(this.process.exit),await e.G({transcendUrl:u,requestActions:r,auth:n,cancellationTitle:l,requestIds:a,statuses:i,concurrency:d,silentModeBefore:o?new Date(o):void 0,createdAtBefore:s?new Date(s):void 0,createdAtAfter:c?new Date(c):void 0})}exports.cancel=n;
|
|
2
|
+
//# sourceMappingURL=impl-CXuqOTan.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl-
|
|
1
|
+
{"version":3,"file":"impl-CXuqOTan.cjs","names":["cancelPrivacyRequests"],"sources":["../src/commands/request/cancel/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { cancelPrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface CancelCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses?: RequestStatus[];\n requestIds?: string[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n cancellationTitle: string;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function cancel(\n this: LocalContext,\n {\n auth,\n actions,\n statuses = [],\n requestIds,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n cancellationTitle,\n transcendUrl,\n concurrency,\n }: CancelCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await cancelPrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n cancellationTitle,\n requestIds,\n statuses,\n concurrency,\n silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,\n createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,\n createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,\n });\n}\n"],"mappings":"6QAkBA,eAAsB,EAEpB,CACE,OACA,UACA,WAAW,EAAE,CACb,aACA,mBACA,kBACA,iBACA,oBACA,eACA,eAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAsB,CAC1B,eACA,eAAgB,EAChB,OACA,oBACA,aACA,WACA,cACA,iBAAkB,EAAmB,IAAI,KAAK,EAAiB,CAAG,IAAA,GAClE,gBAAiB,EAAkB,IAAI,KAAK,EAAgB,CAAG,IAAA,GAC/D,eAAgB,EAAiB,IAAI,KAAK,EAAe,CAAG,IAAA,GAC7D,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`);require(`./constants-C2Ve1XaG.cjs`);const t=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),n=require(`./logger-BaHHbWVd.cjs`);require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const r=require(`./pooling-EYc9IiSf.cjs`),i=require(`./done-input-validation-Cgk5kNBs.cjs`);let a=require(`colors`);a=e.s(a);async function o(){let e=Number(process.env.WORKER_ID||`0`);n.t.info(`[w${e}] ready pid=${process.pid}`),process.send?.({type:`ready`}),process.on(`message`,async r=>{if(!r||typeof r!=`object`||(r.type===`shutdown`&&process.exit(0),r.type!==`task`))return;let{filePath:i,options:a}=r.payload,{outputDir:o,clearOutputDir:s}=a;try{n.t.info(`[w${e}] processing ${i}`);let{DuckDBInstance:r}=await import(`@duckdb/node-api`);await t.b({filePath:i,outputDir:o,clearOutputDir:s,onProgress:(e,t)=>process.send?.({type:`progress`,payload:{filePath:i,processed:e,total:t}})},r),process.send?.({type:`result`,payload:{ok:!0,filePath:i}})}catch(r){let a=t.O(r);n.t.error(`[w${e}] ERROR ${i}: ${r.stack||a}`),process.send?.({type:`result`,payload:{ok:!1,filePath:i,error:a}})}}),await new Promise(()=>{})}function s(e){return r.r(e)}function c(e){return r.i(e)}const l={renderHeader:s,renderWorkers:c};function u(){return typeof __filename<`u`?__filename:process.argv[1]}async function d(e){i.t(this.process.exit);let{directory:o,outputDir:s,clearOutputDir:c,concurrency:d,viewerMode:f}=e,p=t.x(o,this),{poolSize:m,cpuCount:h}=r.s(d,p.length);n.t.info(a.default.green(`Converting ${p.length} Parquet file(s) → CSV with pool size ${m} (CPU=${h})`));let g=p.map(e=>({filePath:e,options:{outputDir:s,clearOutputDir:c}}));await r.n({title:`Parquet → CSV - ${o}`,baseDir:o||s||process.cwd(),childFlag:r.o,childModulePath:u(),poolSize:m,cpuCount:h,filesTotal:p.length,hooks:{nextTask:()=>g.shift(),taskLabel:e=>e.filePath,initTotals:()=>({}),initSlotProgress:()=>void 0,onProgress:e=>e,onResult:(e,t)=>({totals:e,ok:!!t.ok}),postProcess:async()=>{}},viewerMode:f,render:e=>r.a(e,l,f),extraKeyHandler:({logsBySlot:e,repaint:t,setPaused:n})=>r.t({logsBySlot:e,repaint:t,setPaused:n})})}process.argv.includes(r.o)&&o().catch(e=>{n.t.error(e),process.exit(1)}),exports.parquetToCsv=d;
|
|
2
|
+
//# sourceMappingURL=impl-CYLFESAX.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impl-CYLFESAX.cjs","names":["parquetToCsvOneFile","extractErrorMessage","makeHeader","makeWorkerRows","collectParquetFilesOrExit","computePoolSize","runPool","CHILD_FLAG","dashboardPlugin","createExtraKeyHandler"],"sources":["../src/commands/admin/parquet-to-csv/worker.ts","../src/commands/admin/parquet-to-csv/ui/plugin.ts","../src/commands/admin/parquet-to-csv/impl.ts"],"sourcesContent":["import { parquetToCsvOneFile, extractErrorMessage } from '../../../lib/helpers';\nimport type { ToWorker } from '../../../lib/pooling';\nimport { logger } from '../../../logger';\n\nexport type ParquetTask = {\n /** Absolute path of the Parquet file to convert. */\n filePath: string;\n options: {\n /** Optional directory where CSV output files should be written. */\n outputDir?: string;\n /** Whether to clear any pre-existing output before writing new ones. */\n clearOutputDir: boolean;\n };\n};\n\nexport type ParquetProgress = {\n /** File being processed by the worker. */\n filePath: string;\n /** Rows processed so far. */\n processed: number;\n /** Optional known total rows (not always available). */\n total?: number;\n};\n\nexport type ParquetResult = {\n ok: boolean;\n filePath: string;\n error?: string;\n};\n\n/**\n * Worker loop: convert a single Parquet file to one or more CSV files.\n */\nexport async function runChild(): Promise<void> {\n const workerId = Number(process.env.WORKER_ID || '0');\n logger.info(`[w${workerId}] ready pid=${process.pid}`);\n process.send?.({ type: 'ready' });\n\n process.on('message', async (msg: ToWorker<ParquetTask>) => {\n if (!msg || typeof msg !== 'object') return;\n\n if (msg.type === 'shutdown') {\n process.exit(0);\n }\n if (msg.type !== 'task') return;\n\n const { filePath, options } = msg.payload;\n const { outputDir, clearOutputDir } = options;\n\n try {\n logger.info(`[w${workerId}] processing ${filePath}`);\n const { DuckDBInstance } = await import('@duckdb/node-api');\n await parquetToCsvOneFile(\n {\n filePath,\n outputDir,\n clearOutputDir,\n onProgress: (processed, total) =>\n process.send?.({\n type: 'progress',\n payload: { filePath, processed, total },\n }),\n },\n DuckDBInstance,\n );\n\n process.send?.({\n type: 'result',\n payload: { ok: true, filePath },\n });\n } catch (err) {\n const message = extractErrorMessage(err);\n logger.error(`[w${workerId}] ERROR ${filePath}: ${err.stack || message}`);\n process.send?.({\n type: 'result',\n payload: { ok: false, filePath, error: message },\n });\n }\n });\n\n // keep alive until shutdown\n await new Promise<never>(() => {\n // Do nothing\n });\n}\n","import {\n makeHeader,\n makeWorkerRows,\n type ChunkSlotProgress,\n type CommonCtx,\n type DashboardPlugin,\n} from '../../../../lib/pooling';\n\n/**\n * Header for parquet-to-csv (no extra totals block).\n *\n * @param ctx - Dashboard context.\n * @returns Header lines.\n */\nfunction renderHeader<TTotals>(\n ctx: CommonCtx<TTotals, ChunkSlotProgress>,\n): string[] {\n // no extra lines — reuse the shared header as-is\n return makeHeader(ctx);\n}\n\n/**\n * Worker rows for parquet-to-csv — share the generic row renderer.\n *\n * @param ctx - Dashboard context.\n * @returns Array of strings, each representing one worker row.\n */\nfunction renderWorkers<TTotals>(\n ctx: CommonCtx<TTotals, ChunkSlotProgress>,\n): string[] {\n return makeWorkerRows(ctx);\n}\n\nexport const parquetToCsvPlugin: DashboardPlugin<unknown, ChunkSlotProgress> = {\n renderHeader,\n renderWorkers,\n // no extras\n};\n","import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { collectParquetFilesOrExit } from '../../../lib/helpers';\nimport {\n computePoolSize,\n createExtraKeyHandler,\n CHILD_FLAG,\n type PoolHooks,\n runPool,\n dashboardPlugin,\n} from '../../../lib/pooling';\nimport {\n runChild,\n type ParquetProgress,\n type ParquetResult,\n type ParquetTask,\n} from './worker';\nimport { parquetToCsvPlugin } from './ui';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Returns the current module's path so the worker pool knows what file to re-exec.\n * In Node ESM, __filename is undefined, so we fall back to argv[1].\n *\n * @returns The current module's path.\n */\nfunction getCurrentModulePath(): string {\n if (typeof __filename !== 'undefined') {\n return __filename as unknown as string;\n }\n return process.argv[1];\n}\n\n/** No custom totals for the header; the runner’s built-ins suffice. */\ntype Totals = Record<string, never>;\n\nexport type ParquetToCsvCommandFlags = {\n directory: string;\n outputDir?: string;\n clearOutputDir: boolean;\n concurrency?: number;\n viewerMode: boolean;\n};\n\n/**\n * Convert all Parquet files in a directory to CSV, in parallel.\n *\n * @param flags - The command flags.\n */\nexport async function parquetToCsv(\n this: LocalContext,\n flags: ParquetToCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { directory, outputDir, clearOutputDir, concurrency, viewerMode } =\n flags;\n\n /* 1) Discover .parquet inputs */\n const files = collectParquetFilesOrExit(directory, this);\n\n /* 2) Size the pool */\n const { poolSize, cpuCount } = computePoolSize(concurrency, files.length);\n\n logger.info(\n colors.green(\n `Converting ${files.length} Parquet file(s) → CSV with pool size ${poolSize} (CPU=${cpuCount})`,\n ),\n );\n\n /* 3) Build FIFO queue of tasks (one per file) */\n const queue = files.map<ParquetTask>((filePath) => ({\n filePath,\n options: { outputDir, clearOutputDir },\n }));\n\n /* 4) Pool hooks */\n const hooks: PoolHooks<ParquetTask, ParquetProgress, ParquetResult, Totals> =\n {\n nextTask: () => queue.shift(),\n taskLabel: (t) => t.filePath,\n initTotals: () => ({} as Totals),\n initSlotProgress: () => undefined,\n onProgress: (totals) => totals,\n onResult: (totals, res) => ({ totals, ok: !!res.ok }),\n postProcess: async () => {\n // nothing special post-run\n },\n };\n\n /* 5) Launch the pool runner with custom dashboard plugin */\n await runPool({\n title: `Parquet → CSV - ${directory}`,\n baseDir: directory || outputDir || process.cwd(),\n childFlag: CHILD_FLAG,\n childModulePath: getCurrentModulePath(),\n poolSize,\n cpuCount,\n filesTotal: files.length,\n hooks,\n viewerMode,\n render: (input) => dashboardPlugin(input, parquetToCsvPlugin, viewerMode),\n extraKeyHandler: ({ logsBySlot, repaint, setPaused }) =>\n createExtraKeyHandler({ logsBySlot, repaint, setPaused }),\n });\n}\n\n/* -------------------------------------------------------------------------------------------------\n * If invoked directly as a child process, enter worker loop\n * ------------------------------------------------------------------------------------------------- */\nif (process.argv.includes(CHILD_FLAG)) {\n runChild().catch((err) => {\n logger.error(err);\n process.exit(1);\n });\n}\n"],"mappings":"4VAiCA,eAAsB,GAA0B,CAC9C,IAAM,EAAW,OAAO,QAAQ,IAAI,WAAa,IAAI,CACrD,EAAA,EAAO,KAAK,KAAK,EAAS,cAAc,QAAQ,MAAM,CACtD,QAAQ,OAAO,CAAE,KAAM,QAAS,CAAC,CAEjC,QAAQ,GAAG,UAAW,KAAO,IAA+B,CAM1D,GALI,CAAC,GAAO,OAAO,GAAQ,WAEvB,EAAI,OAAS,YACf,QAAQ,KAAK,EAAE,CAEb,EAAI,OAAS,QAAQ,OAEzB,GAAM,CAAE,WAAU,WAAY,EAAI,QAC5B,CAAE,YAAW,kBAAmB,EAEtC,GAAI,CACF,EAAA,EAAO,KAAK,KAAK,EAAS,eAAe,IAAW,CACpD,GAAM,CAAE,kBAAmB,MAAM,OAAO,oBACxC,MAAMA,EAAAA,EACJ,CACE,WACA,YACA,iBACA,YAAa,EAAW,IACtB,QAAQ,OAAO,CACb,KAAM,WACN,QAAS,CAAE,WAAU,YAAW,QAAO,CACxC,CAAC,CACL,CACD,EACD,CAED,QAAQ,OAAO,CACb,KAAM,SACN,QAAS,CAAE,GAAI,GAAM,WAAU,CAChC,CAAC,OACK,EAAK,CACZ,IAAM,EAAUC,EAAAA,EAAoB,EAAI,CACxC,EAAA,EAAO,MAAM,KAAK,EAAS,UAAU,EAAS,IAAI,EAAI,OAAS,IAAU,CACzE,QAAQ,OAAO,CACb,KAAM,SACN,QAAS,CAAE,GAAI,GAAO,WAAU,MAAO,EAAS,CACjD,CAAC,GAEJ,CAGF,MAAM,IAAI,YAAqB,GAE7B,CCrEJ,SAAS,EACP,EACU,CAEV,OAAOC,EAAAA,EAAW,EAAI,CASxB,SAAS,EACP,EACU,CACV,OAAOC,EAAAA,EAAe,EAAI,CAG5B,MAAa,EAAkE,CAC7E,eACA,gBAED,CCVD,SAAS,GAA+B,CAItC,OAHI,OAAO,WAAe,IACjB,WAEF,QAAQ,KAAK,GAmBtB,eAAsB,EAEpB,EACe,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,GAAM,CAAE,YAAW,YAAW,iBAAgB,cAAa,cACzD,EAGI,EAAQC,EAAAA,EAA0B,EAAW,KAAK,CAGlD,CAAE,WAAU,YAAaC,EAAAA,EAAgB,EAAa,EAAM,OAAO,CAEzE,EAAA,EAAO,KACL,EAAA,QAAO,MACL,cAAc,EAAM,OAAO,wCAAwC,EAAS,QAAQ,EAAS,GAC9F,CACF,CAGD,IAAM,EAAQ,EAAM,IAAkB,IAAc,CAClD,WACA,QAAS,CAAE,YAAW,iBAAgB,CACvC,EAAE,CAiBH,MAAMC,EAAAA,EAAQ,CACZ,MAAO,mBAAmB,IAC1B,QAAS,GAAa,GAAa,QAAQ,KAAK,CAChD,UAAWC,EAAAA,EACX,gBAAiB,GAAsB,CACvC,WACA,WACA,WAAY,EAAM,OAClB,MArBA,CACE,aAAgB,EAAM,OAAO,CAC7B,UAAY,GAAM,EAAE,SACpB,gBAAmB,EAAE,EACrB,qBAAwB,IAAA,GACxB,WAAa,GAAW,EACxB,UAAW,EAAQ,KAAS,CAAE,SAAQ,GAAI,CAAC,CAAC,EAAI,GAAI,EACpD,YAAa,SAAY,GAG1B,CAYD,aACA,OAAS,GAAUC,EAAAA,EAAgB,EAAO,EAAoB,EAAW,CACzE,iBAAkB,CAAE,aAAY,UAAS,eACvCC,EAAAA,EAAsB,CAAE,aAAY,UAAS,YAAW,CAAC,CAC5D,CAAC,CAMA,QAAQ,KAAK,SAASF,EAAAA,EAAW,EACnC,GAAU,CAAC,MAAO,GAAQ,CACxB,EAAA,EAAO,MAAM,EAAI,CACjB,QAAQ,KAAK,EAAE,EACf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`./enums-CBXlBJii.cjs`),t=require(`./constants-
|
|
1
|
+
const e=require(`./enums-CBXlBJii.cjs`),t=require(`./constants-C2Ve1XaG.cjs`),n=require(`./syncConfigurationToTranscend-CpoC4raI.cjs`),r=require(`./logger-BaHHbWVd.cjs`);require(`./buildAIIntegrationType-n_Qlv8wG.cjs`);const i=require(`./done-input-validation-Cgk5kNBs.cjs`);let a=require(`@transcend-io/privacy-types`),o=require(`@transcend-io/type-utils`),s=require(`node:fs`);s=e.s(s);let c=require(`colors`);c=e.s(c);let l=require(`yargs-parser`);l=e.s(l);let u=require(`got`);u=e.s(u);let d=require(`JSONStream`);d=e.s(d);const f=({hostname:e,auth:t})=>u.default.extend({prefixUrl:`https://${e}`,headers:{accept:`application/json`,"content-type":`application/json`,authorization:`Bearer ${t}`}}),p=Object.values(e.n),m=({assessment:e,index:t,total:n,wrap:r=!0})=>{let i=``;(t===0||r)&&(i=`[
|
|
2
2
|
`);let a=JSON.stringify(e),o=n&&t<n-1&&!r?`,`:``;return i=`${i+a+o}\n`,(n&&t===n-1||r)&&(i+=`
|
|
3
3
|
]`),i},h=({file:e,assessment:t,index:n,total:i})=>{r.t.info(c.default.magenta(`Writing enriched assessment ${n+1} of ${i} to file "${e}"...`)),n===0?s.default.writeFileSync(e,m({assessment:t,index:n,total:i,wrap:!1})):s.default.appendFileSync(e,m({assessment:t,index:n,total:i,wrap:!1}))},g=async({oneTrust:e})=>{let t=0,n=1,i=0,s=[];for(;t<n;){let{body:c}=await e.get(`api/assessment/v2/assessments?page=${t}&size=2000`),{page:l,content:u}=(0,o.decodeCodec)(a.OneTrustGetListOfAssessmentsResponse,c);s.push(...u??[]),t===0&&(n=l?.totalPages??0,i=l?.totalElements??0),t+=1,r.t.info(`Fetched ${s.length} of ${i} assessments.`)}return s},_=async({oneTrust:e,assessmentId:t})=>{let{body:n}=await e.get(`api/assessment/v2/assessments/${t}/export?ExcludeSkippedQuestions=false`);return(0,o.decodeCodec)(a.OneTrustGetAssessmentResponse,n)},v=async({oneTrust:e,riskId:t})=>{let{body:n}=await e.get(`api/risk/v2/risks/${t}`);return(0,o.decodeCodec)(a.OneTrustGetRiskResponse,n)},y=async({oneTrust:e,userId:t})=>{let{body:n}=await e.get(`api/scim/v2/Users/${t}`);return(0,o.decodeCodec)(a.OneTrustGetUserResponse,n)},b=({assessment:e,assessmentDetails:n,riskDetails:r,creatorDetails:i,approversDetails:a,respondentsDetails:o})=>{let s=t.g(r,`id`),{sections:c,createdBy:l,...u}=n,d=c.map(e=>{let{questions:t,...n}=e,r=t.map(e=>{let{risks:t,...n}=e,r=(t??[]).map(e=>{let t=s[e.riskId];return{...e,...t,level:e.level,impactLevel:e.impactLevel??0}});return{...n,risks:r}});return{...n,questions:r}}),f={...l,active:i?.active??!1,userType:i?.userType??`Internal`,emails:i?.emails??[],title:i?.title??null,givenName:i?.name.givenName??null,familyName:i?.name.familyName??null},p=t.g(a,`id`),m=n.approvers.flatMap(e=>p[e.id]?[{...e,approver:{...e.approver,active:p[e.id].active,userType:p[e.id].userType,emails:p[e.id].emails,title:p[e.id].title,givenName:p[e.id].name.givenName??null,familyName:p[e.id].name.familyName??null}}]:[]),h=t.g(o,`id`),g=n.respondents.filter(e=>!e.name.includes(`@`)).flatMap(e=>h[e.id]?[{...e,active:h[e.id].active,userType:h[e.id].userType,emails:h[e.id].emails,title:h[e.id].title,givenName:h[e.id].name.givenName??null,familyName:h[e.id].name.familyName??null}]:[]);return{...e,...u,approvers:m,respondents:g,createdBy:f,sections:d}},x=async({transcend:e,assessment:t,total:i,index:a})=>{r.t.info(c.default.magenta(`Writing enriched assessment ${a+1} ${i?`of ${i} `:` `}to Transcend...`));let o={json:m({assessment:t,index:a,total:i})};try{await n.i(e,n.bo,{input:o})}catch{r.t.error(c.default.red(`Failed to sync assessment ${a+1} ${i?`of ${i} `:` `}to Transcend.\n\tAssessment Title: ${t.name}. Template Title: ${t.template.name}\n`))}},S=async({oneTrust:e,file:t,dryRun:i,transcend:a})=>{r.t.info(`Getting list of all assessments from OneTrust...`);let o=await g({oneTrust:e}),s={};await n.Es(Array.from({length:Math.ceil(o.length/5)},(e,t)=>o.slice(t*5,(t+1)*5)),async(l,u)=>{let d=[];await n.Ts(l,async(t,i)=>{let a=5*u+i+1;r.t.info(`[assessment ${a} of ${o.length}]: fetching details...`);let{templateName:l,assessmentId:f}=t,p=await _({oneTrust:e,assessmentId:f}),m=p.createdBy.id,h=s[m];if(!h){r.t.info(`[assessment ${a} of ${o.length}]: fetching creator...`);try{h=await y({oneTrust:e,userId:m}),s[m]=h}catch{r.t.warn(c.default.yellow(`[assessment ${a} of ${o.length}]: failed to fetch form creator.\tcreatorId: ${m}. Assessment Title: ${t.name}. Template Title: ${l}`))}}let{approvers:g}=p,x=[];g.length>0&&(r.t.info(`[assessment ${a} of ${o.length}]: fetching approvers...`),x=await n.Ts(g.map(({id:e})=>e),async n=>{try{let t=s[n];return t||(t=await y({oneTrust:e,userId:n}),s[n]=t),[t]}catch{return r.t.warn(c.default.yellow(`[assessment ${a} of ${o.length}]: failed to fetch a form approver.\tapproverId: ${n}. Assessment Title: ${t.name}. Template Title: ${l}`)),[]}},{concurrency:5}));let{respondents:S}=p,C=S.filter(e=>!e.name.includes(`@`)),w=[];C.length>0&&(r.t.info(`[assessment ${a} of ${o.length}]: fetching respondents...`),w=await n.Ts(C.map(({id:e})=>e),async n=>{try{let t=s[n];return t||(t=await y({oneTrust:e,userId:n}),s[n]=t),[t]}catch{return r.t.warn(c.default.yellow(`[assessment ${a} of ${o.length}]: failed to fetch a respondent.\trespondentId: ${n}. Assessment Title: ${t.name}. Template Title: ${l}`)),[]}},{concurrency:5}));let T=[],E=n.Ds(p.sections.flatMap(e=>e.questions.flatMap(e=>(e.risks??[]).flatMap(e=>e.riskId))));E.length>0&&(r.t.info(`[assessment ${a} of ${o.length}]: fetching risks...`),T=await n.Ts(E,t=>v({oneTrust:e,riskId:t}),{concurrency:5}));let D=b({assessment:t,assessmentDetails:p,riskDetails:T,creatorDetails:h,approversDetails:x.flat(),respondentsDetails:w.flat()});d.push(D)},{concurrency:5}),await n.Es(d,async(e,n)=>{let r=u*5+n;i&&t?h({assessment:e,index:r,total:o.length,file:t}):a&&await x({assessment:e,transcend:a,total:o.length,index:r})})})},C=({transcend:e,file:t})=>(r.t.info(`Getting list of all assessments from file ${t}...`),new Promise((n,i)=>{let l=(0,s.createReadStream)(t,{encoding:`utf-8`,highWaterMark:64*1024}),u=d.default.parse(`*`),f=0;l.pipe(u),u.on(`data`,async n=>{try{u.pause(),await x({assessment:(0,o.decodeCodec)(a.OneTrustEnrichedAssessment,n),transcend:e,index:f}),f+=1,u.resume()}catch(e){r.t.error(c.default.red(`Failed to parse the assessment ${f} from file '${t}': ${e.message}.`))}}),u.on(`end`,()=>{r.t.info(`Finished processing ${f} assessments from file ${t}`),n()}),u.on(`error`,e=>{r.t.error(c.default.red(`Error parsing file '${t}': ${e.message}`)),i(e)}),l.on(`error`,e=>{r.t.error(c.default.red(`Error reading file '${t}': ${e.message}`)),i(e)})}));async function w({hostname:t,oneTrustAuth:a,source:o,transcendAuth:s,transcendUrl:l,resource:u,file:d,dryRun:p,debug:m}){if(!p&&!s)throw Error('Must specify a "transcendAuth" parameter to sync resources to Transcend. e.g. --transcendAuth=${TRANSCEND_API_KEY}');if(p&&!d)throw Error(`Must set a "file" parameter when "dryRun" is "true". e.g. --file=./oneTrustAssessments.json`);if(d){let t=d.split(`.`);if(t.length<2)throw Error(`The "file" parameter has an invalid format. Expected a path with extensions. e.g. --file=./pathToFile.json.`);if(t.at(-1)!==e.t.Json)throw Error(`Expected the format of the "file" parameters '${d}' to be '${e.t.Json}', but got '${t.at(-1)}'.`)}if(o===e.r.OneTrust){if(!t)throw Error(`Missing required parameter "hostname". e.g. --hostname=customer.my.onetrust.com`);if(!a)throw Error(`Missing required parameter "oneTrustAuth". e.g. --oneTrustAuth=$ONE_TRUST_AUTH_TOKEN`)}else{if(!d)throw Error(`Must specify a "file" parameter to read the OneTrust assessments from. e.g. --source=./oneTrustAssessments.json`);if(p)throw Error(`Cannot read and write to a file simultaneously. Emit the "source" parameter or set it to ${e.r.OneTrust} if "dryRun" is enabled.`)}i.t(this.process.exit);let h=t&&a?f({hostname:t,auth:a}):void 0,g=l&&s?n.ti(l,s):void 0;try{u===e.n.Assessments&&(o===e.r.OneTrust&&h?await S({oneTrust:h,file:d,dryRun:p,...g&&{transcend:g}}):o===e.r.File&&d&&g&&await C({file:d,transcend:g}))}catch(e){throw Error(`An error occurred syncing the resource ${u} from OneTrust: ${m?e.stack:e.message}`)}r.t.info(c.default.green(`Successfully synced OneTrust ${u} to ${p?`disk at "${d}"`:`Transcend`}!`))}exports.syncOt=w;
|
|
4
|
-
//# sourceMappingURL=impl-
|
|
4
|
+
//# sourceMappingURL=impl-Cb8Eeujp.cjs.map
|