@transcend-io/cli 7.0.0-alpha.15 → 7.0.0-alpha.17
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 +6 -2
- package/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/deprecated-command.cjs +3 -3
- package/dist/bin/deprecated-command.cjs.map +1 -1
- package/dist/{chunk-RPT6OXNL.cjs → chunk-2QSJ4MCG.cjs} +2 -2
- package/dist/chunk-2QSJ4MCG.cjs.map +1 -0
- package/dist/{chunk-6HKJGDAM.cjs → chunk-6SJ73MQ3.cjs} +2 -2
- package/dist/chunk-6SJ73MQ3.cjs.map +1 -0
- package/dist/{chunk-ZFZPE5BJ.cjs → chunk-AO3PNDFX.cjs} +2 -2
- package/dist/chunk-AO3PNDFX.cjs.map +1 -0
- package/dist/{chunk-5TWQU6YF.cjs → chunk-FI52H3TN.cjs} +3 -3
- package/dist/{chunk-5TWQU6YF.cjs.map → chunk-FI52H3TN.cjs.map} +1 -1
- package/dist/{chunk-YGYXLCPI.cjs → chunk-ITOED6PZ.cjs} +2 -2
- package/dist/{chunk-YGYXLCPI.cjs.map → chunk-ITOED6PZ.cjs.map} +1 -1
- package/dist/{chunk-XWRWKB4H.cjs → chunk-J7T7IIXE.cjs} +3 -3
- package/dist/chunk-J7T7IIXE.cjs.map +1 -0
- package/dist/{chunk-KXRTLA5U.cjs → chunk-JOXVN7NL.cjs} +18 -18
- package/dist/chunk-JOXVN7NL.cjs.map +1 -0
- package/dist/{chunk-PBT4YWG7.cjs → chunk-JT2MPL2S.cjs} +3 -3
- package/dist/chunk-JT2MPL2S.cjs.map +1 -0
- package/dist/{chunk-SR7OAEWS.cjs → chunk-PI5KBGV2.cjs} +2 -2
- package/dist/{chunk-SR7OAEWS.cjs.map → chunk-PI5KBGV2.cjs.map} +1 -1
- package/dist/{chunk-LZZZALF3.cjs → chunk-PZ7EJWTP.cjs} +2 -2
- package/dist/{chunk-LZZZALF3.cjs.map → chunk-PZ7EJWTP.cjs.map} +1 -1
- package/dist/{chunk-ABQQ23HK.cjs → chunk-RGX6LSIS.cjs} +2 -2
- package/dist/chunk-RGX6LSIS.cjs.map +1 -0
- package/dist/{chunk-SEJ2UCU4.cjs → chunk-RYDN7XHU.cjs} +2 -2
- package/dist/{chunk-SEJ2UCU4.cjs.map → chunk-RYDN7XHU.cjs.map} +1 -1
- package/dist/{chunk-PUWWHSAM.cjs → chunk-VFNVW4DQ.cjs} +2 -2
- package/dist/{chunk-PUWWHSAM.cjs.map → chunk-VFNVW4DQ.cjs.map} +1 -1
- package/dist/{chunk-KEH7CZKK.cjs → chunk-VZW3HYB2.cjs} +4 -4
- package/dist/chunk-VZW3HYB2.cjs.map +1 -0
- package/dist/{impl-WDYARUUL.cjs → impl-2AZIJABO.cjs} +4 -4
- package/dist/impl-2AZIJABO.cjs.map +1 -0
- package/dist/impl-2RWRR3MI.cjs +2 -0
- package/dist/impl-2RWRR3MI.cjs.map +1 -0
- package/dist/{impl-W5XYDQXZ.cjs → impl-2WDJT2Q2.cjs} +3 -3
- package/dist/impl-2WDJT2Q2.cjs.map +1 -0
- package/dist/{impl-7H4CBYYB.cjs → impl-3JNSTXDZ.cjs} +6 -6
- package/dist/impl-3JNSTXDZ.cjs.map +1 -0
- package/dist/impl-3SXWEDB4.cjs +2 -0
- package/dist/impl-3SXWEDB4.cjs.map +1 -0
- package/dist/{impl-BDRTVVF2.cjs → impl-3ZAPAWXO.cjs} +2 -2
- package/dist/impl-3ZAPAWXO.cjs.map +1 -0
- package/dist/impl-4ABLQOYK.cjs +2 -0
- package/dist/impl-4ABLQOYK.cjs.map +1 -0
- package/dist/{impl-2I7MIYNB.cjs → impl-5T2EKHDA.cjs} +2 -2
- package/dist/impl-5T2EKHDA.cjs.map +1 -0
- package/dist/impl-6OC3FLK7.cjs +2 -0
- package/dist/impl-6OC3FLK7.cjs.map +1 -0
- package/dist/{impl-7M4OQEYH.cjs → impl-BI4QQAA7.cjs} +2 -2
- package/dist/impl-BI4QQAA7.cjs.map +1 -0
- package/dist/{impl-AHGBQO5E.cjs → impl-CKDNEFW2.cjs} +2 -2
- package/dist/impl-CKDNEFW2.cjs.map +1 -0
- package/dist/{impl-S3OTWWYU.cjs → impl-DSIRRIAF.cjs} +2 -2
- package/dist/impl-DSIRRIAF.cjs.map +1 -0
- package/dist/{impl-WYJHZILF.cjs → impl-E3NLQD2N.cjs} +5 -5
- package/dist/impl-E3NLQD2N.cjs.map +1 -0
- package/dist/{impl-7KOHW25M.cjs → impl-EJYIRESZ.cjs} +3 -3
- package/dist/impl-EJYIRESZ.cjs.map +1 -0
- package/dist/{impl-HEGJOPZK.cjs → impl-FAEAEOAF.cjs} +2 -2
- package/dist/impl-FAEAEOAF.cjs.map +1 -0
- package/dist/impl-FK6Q3MKX.cjs +2 -0
- package/dist/impl-FK6Q3MKX.cjs.map +1 -0
- package/dist/{impl-WMHBCVAN.cjs → impl-H4P5W6SI.cjs} +2 -2
- package/dist/impl-H4P5W6SI.cjs.map +1 -0
- package/dist/{impl-TFECR52S.cjs → impl-J76MXHVV.cjs} +2 -2
- package/dist/impl-J76MXHVV.cjs.map +1 -0
- package/dist/{impl-FQF3AWHR.cjs → impl-JS5NA5LB.cjs} +2 -2
- package/dist/impl-JS5NA5LB.cjs.map +1 -0
- package/dist/{impl-VBCRH4YN.cjs → impl-K2C4VARC.cjs} +2 -2
- package/dist/impl-K2C4VARC.cjs.map +1 -0
- package/dist/{impl-DI7FIYZI.cjs → impl-KTJJ5N2W.cjs} +2 -2
- package/dist/impl-KTJJ5N2W.cjs.map +1 -0
- package/dist/{impl-QTYOX6E5.cjs → impl-M25V32F5.cjs} +2 -2
- package/dist/impl-M25V32F5.cjs.map +1 -0
- package/dist/{impl-WBDBDZHE.cjs → impl-OFKKJKDV.cjs} +2 -2
- package/dist/impl-OFKKJKDV.cjs.map +1 -0
- package/dist/{impl-CBBAWKT7.cjs → impl-OLWLO32B.cjs} +2 -2
- package/dist/impl-OLWLO32B.cjs.map +1 -0
- package/dist/impl-OMR2QAUH.cjs +2 -0
- package/dist/impl-OMR2QAUH.cjs.map +1 -0
- package/dist/{impl-2E3PAZHM.cjs → impl-RMLOU67G.cjs} +2 -2
- package/dist/impl-RMLOU67G.cjs.map +1 -0
- package/dist/impl-RZTJXYKH.cjs +2 -0
- package/dist/impl-RZTJXYKH.cjs.map +1 -0
- package/dist/{impl-FQYT2XK3.cjs → impl-SL56KMR6.cjs} +2 -2
- package/dist/impl-SL56KMR6.cjs.map +1 -0
- package/dist/impl-SVOWCRTT.cjs +2 -0
- package/dist/impl-SVOWCRTT.cjs.map +1 -0
- package/dist/{impl-NFRFFLXM.cjs → impl-T2L7XH3I.cjs} +2 -2
- package/dist/impl-T2L7XH3I.cjs.map +1 -0
- package/dist/{impl-ZSFEQ5UA.cjs → impl-UXFJYLNS.cjs} +2 -2
- package/dist/impl-UXFJYLNS.cjs.map +1 -0
- package/dist/{impl-WJ7VUNYC.cjs → impl-WID63NF4.cjs} +2 -2
- package/dist/impl-WID63NF4.cjs.map +1 -0
- package/dist/{impl-PKVWUYYX.cjs → impl-XRRNIJUK.cjs} +1 -1
- package/dist/impl-XRRNIJUK.cjs.map +1 -0
- package/dist/{impl-DPLGIVNZ.cjs → impl-XSSDVV3V.cjs} +2 -2
- package/dist/impl-XSSDVV3V.cjs.map +1 -0
- package/dist/impl-Y34WNCJH.cjs +2 -0
- package/dist/impl-Y34WNCJH.cjs.map +1 -0
- package/dist/impl-YF52HSOP.cjs +2 -0
- package/dist/impl-YF52HSOP.cjs.map +1 -0
- package/dist/{impl-OBZFKR4D.cjs → impl-Z2HSVZEO.cjs} +2 -2
- package/dist/impl-Z2HSVZEO.cjs.map +1 -0
- package/dist/{impl-HDVI2F6D.cjs → impl-ZR2W2W3L.cjs} +2 -2
- package/dist/impl-ZR2W2W3L.cjs.map +1 -0
- package/dist/impl-ZWY23IKD.cjs +2 -0
- package/dist/impl-ZWY23IKD.cjs.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -5
- package/package.json +7 -6
- package/dist/chunk-6HKJGDAM.cjs.map +0 -1
- package/dist/chunk-ABQQ23HK.cjs.map +0 -1
- package/dist/chunk-KEH7CZKK.cjs.map +0 -1
- package/dist/chunk-KXRTLA5U.cjs.map +0 -1
- package/dist/chunk-PBT4YWG7.cjs.map +0 -1
- package/dist/chunk-RPT6OXNL.cjs.map +0 -1
- package/dist/chunk-XWRWKB4H.cjs.map +0 -1
- package/dist/chunk-ZFZPE5BJ.cjs.map +0 -1
- package/dist/impl-2E3PAZHM.cjs.map +0 -1
- package/dist/impl-2I7MIYNB.cjs.map +0 -1
- package/dist/impl-7H4CBYYB.cjs.map +0 -1
- package/dist/impl-7KOHW25M.cjs.map +0 -1
- package/dist/impl-7M4OQEYH.cjs.map +0 -1
- package/dist/impl-AHGBQO5E.cjs.map +0 -1
- package/dist/impl-AJB3VAJO.cjs +0 -2
- package/dist/impl-AJB3VAJO.cjs.map +0 -1
- package/dist/impl-B3EPOCAJ.cjs +0 -2
- package/dist/impl-B3EPOCAJ.cjs.map +0 -1
- package/dist/impl-BDRTVVF2.cjs.map +0 -1
- package/dist/impl-CBBAWKT7.cjs.map +0 -1
- package/dist/impl-DI7FIYZI.cjs.map +0 -1
- package/dist/impl-DPLGIVNZ.cjs.map +0 -1
- package/dist/impl-DRJ7E2FN.cjs +0 -2
- package/dist/impl-DRJ7E2FN.cjs.map +0 -1
- package/dist/impl-F3CYEECC.cjs +0 -2
- package/dist/impl-F3CYEECC.cjs.map +0 -1
- package/dist/impl-FQF3AWHR.cjs.map +0 -1
- package/dist/impl-FQYT2XK3.cjs.map +0 -1
- package/dist/impl-HDVI2F6D.cjs.map +0 -1
- package/dist/impl-HEGJOPZK.cjs.map +0 -1
- package/dist/impl-ITBKGH3N.cjs +0 -2
- package/dist/impl-ITBKGH3N.cjs.map +0 -1
- package/dist/impl-K7CHXRVJ.cjs +0 -2
- package/dist/impl-K7CHXRVJ.cjs.map +0 -1
- package/dist/impl-NFRFFLXM.cjs.map +0 -1
- package/dist/impl-NIMVACZO.cjs +0 -2
- package/dist/impl-NIMVACZO.cjs.map +0 -1
- package/dist/impl-OBZFKR4D.cjs.map +0 -1
- package/dist/impl-P7P4PHKK.cjs +0 -2
- package/dist/impl-P7P4PHKK.cjs.map +0 -1
- package/dist/impl-PKVWUYYX.cjs.map +0 -1
- package/dist/impl-PUU55WCF.cjs +0 -2
- package/dist/impl-PUU55WCF.cjs.map +0 -1
- package/dist/impl-QTYOX6E5.cjs.map +0 -1
- package/dist/impl-RNWZPIFE.cjs +0 -2
- package/dist/impl-RNWZPIFE.cjs.map +0 -1
- package/dist/impl-S3OTWWYU.cjs.map +0 -1
- package/dist/impl-TFECR52S.cjs.map +0 -1
- package/dist/impl-VBCRH4YN.cjs.map +0 -1
- package/dist/impl-W5XYDQXZ.cjs.map +0 -1
- package/dist/impl-WBDBDZHE.cjs.map +0 -1
- package/dist/impl-WDYARUUL.cjs.map +0 -1
- package/dist/impl-WJ7VUNYC.cjs.map +0 -1
- package/dist/impl-WMHBCVAN.cjs.map +0 -1
- package/dist/impl-WYJHZILF.cjs.map +0 -1
- package/dist/impl-ZBKQ6GRT.cjs +0 -2
- package/dist/impl-ZBKQ6GRT.cjs.map +0 -1
- package/dist/impl-ZSFEQ5UA.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
# Transcend CLI
|
|
2
|
+
|
|
1
3
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
2
4
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
3
5
|
|
|
6
|
+
## Table of Contents
|
|
7
|
+
|
|
4
8
|
- [Changelog](#changelog)
|
|
5
9
|
- [Overview](#overview)
|
|
6
10
|
- [Installation](#installation)
|
|
@@ -715,7 +719,7 @@ FLAGS
|
|
|
715
719
|
--base64SigningKey The signing key used to prove authentication of consent request
|
|
716
720
|
--partition The partition key to download consent preferences to
|
|
717
721
|
[--file] The file to pull consent preferences from [default = ./preferences.csv]
|
|
718
|
-
[--consentUrl] URL of the Transcend
|
|
722
|
+
[--consentUrl] URL of the Transcend consent backend. Use https://consent.us.transcend.io for US hosting [default = https://consent.transcend.io]
|
|
719
723
|
[--concurrency] The concurrency to use when uploading requests in parallel [default = 100]
|
|
720
724
|
-h --help Print help information and exit
|
|
721
725
|
```
|
|
@@ -798,7 +802,7 @@ FLAGS
|
|
|
798
802
|
--auth The Transcend API key. Requires scopes: "Modify User Stored Preferences", "View Managed Consent Database Admin API", "View Preference Store Settings"
|
|
799
803
|
--partition The partition key to download consent preferences to
|
|
800
804
|
[--sombraAuth] The Sombra internal key, use for additional authentication when self-hosting Sombra
|
|
801
|
-
[--consentUrl] URL of the Transcend backend. Use https://consent.us.transcend.io for US hosting
|
|
805
|
+
[--consentUrl] URL of the Transcend consent backend. Use https://consent.us.transcend.io for US hosting [default = https://consent.transcend.io]
|
|
802
806
|
[--file] Path to the CSV file to load preferences from
|
|
803
807
|
[--directory] Path to the directory of CSV files to load preferences from
|
|
804
808
|
[--dryRun] Whether to do a dry run only - will write results to receiptFilepath without updating Transcend [default = false]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict"; 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 _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var
|
|
2
|
+
"use strict"; 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 _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkJOXVN7NLcjs = require('../chunk-JOXVN7NL.cjs');require('../chunk-JT2MPL2S.cjs');require('../chunk-EG4L6YAJ.cjs');require('../chunk-6SJ73MQ3.cjs');require('../chunk-BY7W4UQF.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunkJOXVN7NLcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunkJOXVN7NLcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
|
|
3
3
|
`)}catch (e2){}}e();
|
|
4
4
|
//# sourceMappingURL=bash-complete.cjs.map
|
package/dist/bin/cli.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var
|
|
2
|
+
"use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkJOXVN7NLcjs = require('../chunk-JOXVN7NL.cjs');require('../chunk-JT2MPL2S.cjs');require('../chunk-EG4L6YAJ.cjs');require('../chunk-6SJ73MQ3.cjs');require('../chunk-BY7W4UQF.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunkJOXVN7NLcjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
|
|
3
3
|
//# sourceMappingURL=cli.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict"; 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
|
|
2
|
+
"use strict"; 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 _chunkJOXVN7NLcjs = require('../chunk-JOXVN7NL.cjs');require('../chunk-JT2MPL2S.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-EG4L6YAJ.cjs');require('../chunk-6SJ73MQ3.cjs');require('../chunk-BY7W4UQF.cjs');var _core = require('@stricli/core');var o={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunkJOXVN7NLcjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunkJOXVN7NLcjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunkJOXVN7NLcjs.a.config.name} ${d.join(" ")}\``).join(`
|
|
3
3
|
`);_chunkZUNVPK23cjs.a.log(`This command is deprecated as of v7.0.0. Here is a list of new commands, mapped to their legacy command names:
|
|
4
4
|
${a}`);return}_chunkZUNVPK23cjs.a.log(`\`${t}\` is deprecated as of v7.0.0.
|
|
5
|
-
Use \`${
|
|
6
|
-
`);let
|
|
5
|
+
Use \`${_chunkJOXVN7NLcjs.a.config.name} ${e.join(" ")}\` instead.
|
|
6
|
+
`);let s=p(e);if(!s)throw new Error(`Failed to get help text for command: \`${e.join(" ")}\``);_chunkZUNVPK23cjs.a.log(s)}function m(){let e=_optionalChain([process, 'access', _4 => _4.argv, 'access', _5 => _5.at, 'call', _6 => _6(-1), 'optionalAccess', _7 => _7.split, 'call', _8 => _8("/"), 'access', _9 => _9.pop, 'call', _10 => _10(), 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()]);if(e)i(e);else throw new Error("Deprecated command");process.exit(1)}m();
|
|
7
7
|
//# sourceMappingURL=deprecated-command.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/benbrook/transcend/cli/dist/bin/deprecated-command.cjs","../../src/cli/legacy-commands.ts","../../src/bin/deprecated-command.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["/Users/benbrook/transcend/cli/dist/bin/deprecated-command.cjs","../../src/lib/cli/legacy-commands.ts","../../src/bin/deprecated-command.ts"],"names":["LEGACY_COMMAND_TO_MODERN_COMMAND_MAP","getHelpTextForCommand","command","generateHelpTextForAllCommands","x"],"mappings":"AAAA;AACA,0kBAAyC,iCAA8B,yDAA0C,iCAA8B,iCAA8B,iCAA8B,qCCGpM,IAKMA,CAAAA,CAAiE,CAC5E,4BAAA,CAA8B,CAAC,SAAA,CAAW,yBAAyB,CAAA,CACnE,wCAAA,CAA0C,CACxC,WAAA,CACA,qCACF,CAAA,CACA,0CAAA,CAA4C,CAC1C,WAAA,CACA,uCACF,CAAA,CACA,oCAAA,CAAsC,CACpC,SAAA,CACA,MAAA,CACA,4BACF,CAAA,CACA,0BAAA,CAA4B,CAAC,SAAA,CAAW,MAAA,CAAQ,kBAAkB,CAAA,CAClE,sCAAA,CAAwC,CACtC,WAAA,CACA,mCACF,CAAA,CACA,qDAAA,CAAuD,CACrD,WAAA,CACA,kDACF,CAAA,CACA,mBAAA,CAAqB,CAAC,WAAA,CAAa,gBAAgB,CAAA,CACnD,sBAAA,CAAwB,CAAC,OAAA,CAAS,mBAAmB,CAAA,CACrD,uCAAA,CAAyC,CACvC,SAAA,CACA,WAAA,CACA,kBACF,CAAA,CACA,uCAAA,CAAyC,CACvC,SAAA,CACA,WAAA,CACA,kBACF,CAAA,CACA,sCAAA,CAAwC,CACtC,SAAA,CACA,QAAA,CACA,mCACF,CAAA,CACA,SAAA,CAAW,CAAC,WAAA,CAAa,MAAM,CAAA,CAC/B,yBAAA,CAA2B,CAAC,SAAA,CAAW,sBAAsB,CAAA,CAC7D,6BAAA,CAA+B,CAAC,SAAA,CAAW,0BAA0B,CAAA,CACrE,oBAAA,CAAsB,CAAC,WAAA,CAAa,iBAAiB,CAAA,CACrD,2CAAA,CAA6C,CAC3C,WAAA,CACA,mCACF,CAAA,CACA,SAAA,CAAW,CAAC,WAAA,CAAa,MAAM,CAAA,CAC/B,oBAAA,CAAsB,CAAC,SAAA,CAAW,SAAS,CAAA,CAC3C,mBAAA,CAAqB,CAAC,SAAA,CAAW,QAAQ,CAAA,CACzC,2BAAA,CAA6B,CAAC,SAAA,CAAW,gBAAgB,CAAA,CACzD,6BAAA,CAA+B,CAAC,SAAA,CAAW,kBAAkB,CAAA,CAC7D,mBAAA,CAAqB,CAAC,SAAA,CAAW,QAAQ,CAAA,CACzC,wBAAA,CAA0B,CAAC,SAAA,CAAW,aAAa,CAAA,CACnD,mCAAA,CAAqC,CAAC,SAAA,CAAW,wBAAwB,CAAA,CACzE,0CAAA,CAA4C,CAC1C,SAAA,CACA,+BACF,CAAA,CACA,oBAAA,CAAsB,CAAC,SAAA,CAAW,SAAS,CAAA,CAC3C,mBAAA,CAAqB,CAAC,SAAA,CAAW,QAAQ,CAAA,CACzC,6BAAA,CAA+B,CAC7B,SAAA,CACA,QAAA,CACA,0BACF,CAAA,CACA,kBAAA,CAAoB,CAAC,WAAA,CAAa,eAAe,CAAA,CACjD,wBAAA,CAA0B,CAAC,SAAA,CAAW,qBAAqB,CAAA,CAC3D,4BAAA,CAA8B,CAC5B,SAAA,CACA,QAAA,CACA,yBACF,CAAA,CACA,YAAA,CAAc,CAAC,WAAA,CAAa,SAAS,CAAA,CACrC,2BAAA,CAA6B,CAAC,SAAA,CAAW,wBAAwB,CAAA,CACjE,+BAAA,CAAiC,CAAC,SAAA,CAAW,4BAA4B,CAAA,CACzE,4BAAA,CAA8B,CAAC,SAAA,CAAW,yBAAyB,CAAA,CACnE,+BAAA,CAAiC,CAAC,SAAA,CAAW,4BAA4B,CAAA,CACzE,uBAAA,CAAyB,CAAC,SAAA,CAAW,oBAAoB,CAC3D,CAAA,CAUO,SAASC,CAAAA,CAAsBC,CAAAA,CAAuC,CAK3E,uBAJ+BC,kDAAAA,mBAE/B,CAAA,mBAE8B,IAAA,mBAC3BC,CAAAA,EAAMA,CAAAA,CAAE,CAAC,CAAA,GAAM,CAAA,EAAA;AA6Bd;AAQgB;AAES,MAAA;AC/H1B","file":"/Users/benbrook/transcend/cli/dist/bin/deprecated-command.cjs","sourcesContent":[null,"import {\n generateHelpTextForAllCommands,\n type Application,\n type CommandContext,\n} from '@stricli/core';\nimport { app } from '../../app';\nimport { logger } from '../../logger';\n\n// Maps legacy (<7.0.0) command names to their modern command structure\nexport const LEGACY_COMMAND_TO_MODERN_COMMAND_MAP: Record<string, string[]> = {\n 'tr-build-xdi-sync-endpoint': ['consent', 'build-xdi-sync-endpoint'],\n 'tr-consent-manager-service-json-to-yml': [\n 'inventory',\n 'consent-manager-service-json-to-yml',\n ],\n 'tr-consent-managers-to-business-entities': [\n 'inventory',\n 'consent-managers-to-business-entities',\n ],\n 'tr-cron-mark-identifiers-completed': [\n 'request',\n 'cron',\n 'mark-identifiers-completed',\n ],\n 'tr-cron-pull-identifiers': ['request', 'cron', 'pull-identifiers'],\n 'tr-derive-data-silos-from-data-flows': [\n 'inventory',\n 'derive-data-silos-from-data-flows',\n ],\n 'tr-derive-data-silos-from-data-flows-cross-instance': [\n 'inventory',\n 'derive-data-silos-from-data-flows-cross-instance',\n ],\n 'tr-discover-silos': ['inventory', 'discover-silos'],\n 'tr-generate-api-keys': ['admin', 'generate-api-keys'],\n 'tr-manual-enrichment-pull-identifiers': [\n 'request',\n 'preflight',\n 'pull-identifiers',\n ],\n 'tr-manual-enrichment-push-identifiers': [\n 'request',\n 'preflight',\n 'push-identifiers',\n ],\n 'tr-mark-request-data-silos-completed': [\n 'request',\n 'system',\n 'mark-request-data-silos-completed',\n ],\n 'tr-pull': ['inventory', 'pull'],\n 'tr-pull-consent-metrics': ['consent', 'pull-consent-metrics'],\n 'tr-pull-consent-preferences': ['consent', 'pull-consent-preferences'],\n 'tr-pull-datapoints': ['inventory', 'pull-datapoints'],\n 'tr-pull-pull-unstructured-discovery-files': [\n 'inventory',\n 'pull-unstructured-discovery-files',\n ],\n 'tr-push': ['inventory', 'push'],\n 'tr-request-approve': ['request', 'approve'],\n 'tr-request-cancel': ['request', 'cancel'],\n 'tr-request-download-files': ['request', 'download-files'],\n 'tr-request-enricher-restart': ['request', 'enricher-restart'],\n 'tr-request-export': ['request', 'export'],\n 'tr-request-mark-silent': ['request', 'mark-silent'],\n 'tr-request-notify-additional-time': ['request', 'notify-additional-time'],\n 'tr-request-reject-unverified-identifiers': [\n 'request',\n 'reject-unverified-identifiers',\n ],\n 'tr-request-restart': ['request', 'restart'],\n 'tr-request-upload': ['request', 'upload'],\n 'tr-retry-request-data-silos': [\n 'request',\n 'system',\n 'retry-request-data-silos',\n ],\n 'tr-scan-packages': ['inventory', 'scan-packages'],\n 'tr-skip-preflight-jobs': ['request', 'skip-preflight-jobs'],\n 'tr-skip-request-data-silos': [\n 'request',\n 'system',\n 'skip-request-data-silos',\n ],\n 'tr-sync-ot': ['migration', 'sync-ot'],\n 'tr-update-consent-manager': ['consent', 'update-consent-manager'],\n 'tr-upload-consent-preferences': ['consent', 'upload-consent-preferences'],\n 'tr-upload-cookies-from-csv': ['consent', 'upload-cookies-from-csv'],\n 'tr-upload-data-flows-from-csv': ['consent', 'upload-data-flows-from-csv'],\n 'tr-upload-preferences': ['consent', 'upload-preferences'],\n};\n\n// All commands have been migrated to the modern command structure\n\n/**\n * Gets the help text for a command\n *\n * @param command - The command to get help text for\n * @returns The help text for the command\n */\nexport function getHelpTextForCommand(command: string[]): string | undefined {\n const helpTextForAllCommands = generateHelpTextForAllCommands(\n app as Application<CommandContext>,\n );\n\n return helpTextForAllCommands.find(\n (x) => x[0] === `${app.config.name} ${command.join(' ')}`,\n )?.[1];\n}\n\n/**\n * Logs a modern command recommendation for a legacy command\n *\n * @param legacyCommand - The legacy command to log a modern command recommendation for\n * @example\n * logModernCommandRecommendation('tr-cron-mark-identifiers-completed');\n */\nexport function logModernCommandRecommendation(\n legacyCommand: keyof typeof LEGACY_COMMAND_TO_MODERN_COMMAND_MAP,\n): void {\n logger.log('[DEPRECATION NOTICE]');\n\n const modernCommand = LEGACY_COMMAND_TO_MODERN_COMMAND_MAP[legacyCommand];\n if (!modernCommand) {\n const modernCommandString = Object.entries(\n LEGACY_COMMAND_TO_MODERN_COMMAND_MAP,\n )\n .map(\n ([legacyCommand, modernCommand]) =>\n `\\`${legacyCommand}\\` -> \\`${app.config.name} ${modernCommand.join(\n ' ',\n )}\\``,\n )\n .join('\\n');\n logger.log(\n 'This command is deprecated as of v7.0.0.' +\n ` Here is a list of new commands, mapped to their legacy command names:\n${modernCommandString}`,\n );\n return;\n }\n\n logger.log(\n `\\`${legacyCommand}\\` is deprecated as of v7.0.0.\\nUse \\`${\n app.config.name\n } ${modernCommand.join(' ')}\\` instead.\\n`,\n );\n\n const helpText = getHelpTextForCommand(modernCommand);\n if (!helpText) {\n throw new Error(\n `Failed to get help text for command: \\`${modernCommand.join(' ')}\\``,\n );\n }\n\n logger.log(helpText);\n}\n","#!/usr/bin/env node\nimport { logModernCommandRecommendation } from '../lib/cli/legacy-commands';\n\n/**\n * Runs when a deprecated command is called.\n */\nfunction main(): void {\n const command = process.argv.at(-1);\n const legacyCommand = command?.split('/').pop()?.trim();\n if (legacyCommand) {\n logModernCommandRecommendation(legacyCommand);\n } else {\n throw new Error('Deprecated command');\n }\n\n process.exit(1);\n}\n\nmain();\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
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 _chunkZVK4HIDFcjs = require('./chunk-ZVK4HIDF.cjs');var
|
|
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 _chunkZVK4HIDFcjs = require('./chunk-ZVK4HIDF.cjs');var _chunkITOED6PZcjs = require('./chunk-ITOED6PZ.cjs');var _chunkFI52H3TNcjs = require('./chunk-FI52H3TN.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkEG4L6YAJcjs = require('./chunk-EG4L6YAJ.cjs');var _privacytypes = require('@transcend-io/privacy-types');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function re({file:u,auth:s,sombraAuth:g,requestActions:f=[],concurrency:p=100,transcendUrl:n=_chunkEG4L6YAJcjs.e}){let o=_chunkFI52H3TNcjs.xe.call(void 0, n,s),e=await _chunkFI52H3TNcjs.ye.call(void 0, n,s,g);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling manual enrichment requests, filtered for actions: ${f.join(",")}`));let d=await _chunkFI52H3TNcjs.Ge.call(void 0, o,{actions:f,statuses:[_privacytypes.RequestStatus.Enriching]}),i=[];await _chunkFI52H3TNcjs.b.call(void 0, d,async t=>{let c=await _chunkFI52H3TNcjs.Je.call(void 0, o,{requestId:t.id});if(c.filter(({status:m})=>m==="ACTION_REQUIRED")){let m=await _chunkFI52H3TNcjs.Ie.call(void 0, o,e,{requestId:t.id});i.push({...t,requestIdentifiers:m,requestEnrichers:c})}},{concurrency:p});let l=i.map(({attributeValues:t,requestIdentifiers:c,requestEnrichers:w,...m})=>({...m,...Object.entries(_chunkFI52H3TNcjs.ac.call(void 0, c,"name")).reduce((P,[$,C])=>Object.assign(P,{[$]:C.map(({value:A})=>A).join(",")}),{}),...Object.entries(_chunkFI52H3TNcjs.ac.call(void 0, t,"attributeKey.name")).reduce((P,[$,C])=>Object.assign(P,{[$]:C.map(({name:A})=>A).join(",")}),{})})),a=_chunkFI52H3TNcjs.fc.call(void 0, l.map(t=>Object.keys(t)).flat());return _chunkZVK4HIDFcjs.c.call(void 0, u,l,a),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${i.length} requests to file "${u}"`)),i}var _iots = require('io-ts'); var R = _interopRequireWildcard(_iots);var j="https://app.transcend.io/privacy-requests/incoming-requests/",M= exports.b =R.record(R.string,R.string);async function N(u,{id:s,...g},f,p){if(!s){let e=`Request ID must be provided to enricher request.${p?` Found error in row: ${p}`:""}`;throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(e)),new Error(e)}let n=s.toLowerCase(),o=Object.entries(g).reduce((e,[d,i])=>_chunkFI52H3TNcjs.fc.call(void 0, _chunkITOED6PZcjs.n.call(void 0, i)).length===0?e:Object.assign(e,{[d]:_chunkFI52H3TNcjs.fc.call(void 0, _chunkITOED6PZcjs.n.call(void 0, i)).map(a=>({value:d==="email"?a.toLowerCase():a}))}),{});try{return await u.post("v1/enrich-identifiers",{headers:{"x-transcend-request-id":n,"x-transcend-enricher-id":f},json:{enrichedIdentifiers:o}}).json(),_chunkZUNVPK23cjs.a.error(_colors2.default.green(`Successfully enriched request: ${j}${n}`)),!0}catch(e){if(typeof e.response.body=="string"&&e.response.body.includes("Cannot update a resolved RequestEnricher"))return _chunkZUNVPK23cjs.a.warn(_colors2.default.magenta(`Skipped enrichment for request: ${j}${n}, request is no longer in the enriching phase.`)),!1;throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to enricher identifiers for request with id: ${j}${n} - ${e.message} - ${e.response.body}`)),e}}async function he({file:u,auth:s,sombraAuth:g,enricherId:f,markSilent:p,concurrency:n=100,transcendUrl:o=_chunkEG4L6YAJcjs.e}){let e=await _chunkFI52H3TNcjs.ye.call(void 0, o,s,g),d=_chunkFI52H3TNcjs.xe.call(void 0, o,s);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${u}" from disk`));let i=_chunkITOED6PZcjs.q.call(void 0, u,M);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Enriching "${i.length}" privacy requests.`));let l=0,a=0,t=0;if(await _chunkFI52H3TNcjs.b.call(void 0, i,async(c,w)=>{try{p&&(await _chunkFI52H3TNcjs.gc.call(void 0, d,_chunkFI52H3TNcjs._,{input:{id:c.id,isSilent:!0}}),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Mark request as silent mode - ${c.id}`))),await N(e,c,f,w)?l+=1:a+=1}catch (e2){t+=1}},{concurrency:n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend!
|
|
2
2
|
Success count: ${l}.`)),a>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Skipped count: ${a}.`)),t>0)throw _chunkZUNVPK23cjs.a.info(_colors2.default.red(`Error Count: ${t}.`)),new Error(`Failed to enrich: ${t} requests.`);return i.length}exports.a = re; exports.b = M; exports.c = N; exports.d = he;
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-2QSJ4MCG.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/benbrook/transcend/cli/dist/chunk-2QSJ4MCG.cjs","../src/lib/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.ts","../src/lib/manual-enrichment/pushManualEnrichmentIdentifiersFromCsv.ts"],"names":["pullManualEnrichmentIdentifiersToCsv","file","auth","sombraAuth","requestActions","concurrency","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClient","sombra","createSombraGotInstance","logger","colors"],"mappings":"AAAA,mfAAwC,wDAAgD,wDAAgH,wDAAyC,wDAAyC,2DCA7O,gFAE1B,MA6BnB,SAAsBA,EAAAA,CAAqC,CACzD,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,CAAC,CAAA,CAClB,WAAA,CAAAC,CAAAA,CAAc,GAAA,CACd,YAAA,CAAAC,CAAAA,CAAeC,mBACjB,CAAA,CAa6C,CAE3C,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BH,CAAcJ,CAAI,CAAA,CACvDQ,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBL,CAAcJ,CAAAA,CAAMC,CAAU,CAAA,CAE3ES,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,0DAAA,EAA6DT,CAAAA,CAAe,IAAA,CAC1E,GACF,CAAC,CAAA,CAAA;ACuDP,gBAAA","file":"/Users/benbrook/transcend/cli/dist/chunk-2QSJ4MCG.cjs","sourcesContent":[null,"import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { map } from '../bluebird-replace';\nimport colors from 'colors';\nimport { groupBy, uniq } from 'lodash-es';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport { writeCsv } from '../cron/writeCsv';\nimport {\n PrivacyRequest,\n RequestEnricher,\n RequestIdentifier,\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllRequestEnrichers,\n fetchAllRequestIdentifiers,\n fetchAllRequests,\n} from '../graphql';\nimport { logger } from '../../logger';\n\nexport interface PrivacyRequestWithIdentifiers extends PrivacyRequest {\n /** Request Enrichers */\n requestEnrichers: RequestEnricher[];\n /** Request Identifiers */\n requestIdentifiers: RequestIdentifier[];\n}\n\n/**\n * Pull the set of manual enrichment jobs to CSV\n *\n * @param options - Options\n * @returns List of requests with identifiers\n */\nexport async function pullManualEnrichmentIdentifiersToCsv({\n file,\n auth,\n sombraAuth,\n requestActions = [],\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Sombra API key */\n sombraAuth?: string;\n /** Concurrency */\n concurrency?: number;\n /** The request actions to fetch */\n requestActions?: RequestAction[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<PrivacyRequestWithIdentifiers[]> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n logger.info(\n colors.magenta(\n `Pulling manual enrichment requests, filtered for actions: ${requestActions.join(\n ',',\n )}`,\n ),\n );\n\n // Pull all privacy requests\n const allRequests = await fetchAllRequests(client, {\n actions: requestActions,\n statuses: [RequestStatus.Enriching],\n });\n\n // Requests to save\n const savedRequests: PrivacyRequestWithIdentifiers[] = [];\n\n // Filter down requests to what is needed\n await map(\n allRequests,\n async (request) => {\n // Fetch enrichers\n const requestEnrichers = await fetchAllRequestEnrichers(client, {\n requestId: request.id,\n });\n\n // Check if manual enrichment exists for that request\n const hasManualEnrichment = requestEnrichers.filter(\n ({ status }) => status === 'ACTION_REQUIRED',\n );\n\n // Save request to queue\n if (hasManualEnrichment) {\n const requestIdentifiers = await fetchAllRequestIdentifiers(\n client,\n sombra,\n {\n requestId: request.id,\n },\n );\n savedRequests.push({\n ...request,\n requestIdentifiers,\n requestEnrichers,\n });\n }\n },\n {\n concurrency,\n },\n );\n\n const data = savedRequests.map(\n ({\n attributeValues,\n requestIdentifiers,\n requestEnrichers, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...request\n }) => ({\n ...request,\n // flatten identifiers\n ...Object.entries(groupBy(requestIdentifiers, 'name')).reduce(\n (acc, [key, values]) =>\n Object.assign(acc, {\n [key]: values.map(({ value }) => value).join(','),\n }),\n {},\n ),\n // flatten attributes\n ...Object.entries(groupBy(attributeValues, 'attributeKey.name')).reduce(\n (acc, [key, values]) =>\n Object.assign(acc, {\n [key]: values.map(({ name }) => name).join(','),\n }),\n {},\n ),\n }),\n );\n\n // Write out to CSV\n const headers = uniq(data.map((d) => Object.keys(d)).flat());\n writeCsv(file, data, headers);\n\n logger.info(\n colors.green(\n `Successfully wrote ${savedRequests.length} requests to file \"${file}\"`,\n ),\n );\n\n return savedRequests;\n}\n","import colors from 'colors';\nimport { map } from '../bluebird-replace';\nimport { logger } from '../../logger';\nimport {\n UPDATE_PRIVACY_REQUEST,\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n makeGraphQLRequest,\n} from '../graphql';\nimport {\n enrichPrivacyRequest,\n EnrichPrivacyRequest,\n} from './enrichPrivacyRequest';\nimport { readCsv } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\n/**\n * Push a CSV of enriched requests back into Transcend\n *\n * @param options - Options\n * @returns Number of items processed\n */\nexport async function pushManualEnrichmentIdentifiersFromCsv({\n file,\n auth,\n sombraAuth,\n enricherId,\n markSilent,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** ID of enricher being uploaded to */\n enricherId: string;\n /** Sombra API key authentication */\n sombraAuth?: string;\n /** Concurrency */\n concurrency?: number;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Mark requests in silent mode before enriching */\n markSilent?: boolean;\n}): Promise<number> {\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read from CSV\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, EnrichPrivacyRequest);\n\n // Notify Transcend\n logger.info(\n colors.magenta(`Enriching \"${activeResults.length}\" privacy requests.`),\n );\n\n let successCount = 0;\n let skippedCount = 0;\n let errorCount = 0;\n\n await map(\n activeResults,\n async (request, index) => {\n try {\n // Mark requests in silent mode before a certain date\n if (markSilent) {\n await makeGraphQLRequest(client, UPDATE_PRIVACY_REQUEST, {\n input: {\n id: request.id,\n isSilent: true,\n },\n });\n\n logger.info(\n colors.magenta(`Mark request as silent mode - ${request.id}`),\n );\n }\n\n const result = await enrichPrivacyRequest(\n sombra,\n request,\n enricherId,\n index,\n );\n if (result) {\n successCount += 1;\n } else {\n skippedCount += 1;\n }\n } catch (err) {\n errorCount += 1;\n }\n },\n { concurrency },\n );\n\n logger.info(\n colors.green(\n `Successfully notified Transcend! \\n Success count: ${successCount}.`,\n ),\n );\n\n if (skippedCount > 0) {\n logger.info(colors.magenta(`Skipped count: ${skippedCount}.`));\n }\n\n if (errorCount > 0) {\n logger.info(colors.red(`Error Count: ${errorCount}.`));\n throw new Error(`Failed to enrich: ${errorCount} requests.`);\n }\n\n return activeResults.length;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="A command line interface for programmatic operations across Transcend.",i= exports.b ="7.0.0-alpha.
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="A command line interface for programmatic operations across Transcend.",i= exports.b ="7.0.0-alpha.17";exports.a = s; exports.b = i;
|
|
2
|
+
//# sourceMappingURL=chunk-6SJ73MQ3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../package.json"],"names":["description","version"],"mappings":"AAGE,6EAAAA,CAAAA,CAAe,wEAAA,CACfC,CAAAA,aAAW,gBAAA,CAAA,6BAAA","file":"/Users/benbrook/transcend/cli/dist/chunk-6SJ73MQ3.cjs","sourcesContent":["{\n \"author\": \"Transcend Inc.\",\n \"name\": \"@transcend-io/cli\",\n \"description\": \"A command line interface for programmatic operations across Transcend.\",\n \"version\": \"7.0.0-alpha.17\",\n \"homepage\": \"https://github.com/transcend-io/cli\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/transcend-io/cli.git\"\n },\n \"type\": \"module\",\n \"license\": \"UNLICENSED\",\n \"main\": \"dist/index.cjs\",\n \"bin\": {\n \"transcend\": \"dist/bin/cli.cjs\",\n \"__transcend_bash_complete\": \"dist/bin/bash-complete.cjs\",\n \"__tr-build-xdi-sync-endpoint\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-consent-manager-service-json-to-yml\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-consent-managers-to-business-entities\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-cron-mark-identifiers-completed\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-cron-pull-identifiers\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-cron-pull-profiles\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-derive-data-silos-from-data-flows\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-derive-data-silos-from-data-flows-cross-instance\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-discover-silos\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-generate-api-keys\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-manual-enrichment-pull-identifiers\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-manual-enrichment-push-identifiers\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-mark-request-data-silos-completed\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull-consent-metrics\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull-consent-preferences\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull-datapoints\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull-unstructured-discovery-files\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-push\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-approve\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-cancel\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-download-files\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-enricher-restart\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-export\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-mark-silent\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-notify-additional-time\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-reject-unverified-identifiers\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-restart\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-upload\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-retry-request-data-silos\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-scan-packages\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-skip-request-data-silos\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-sync-ot\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-update-consent-manager\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-upload-consent-preferences\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-upload-cookies-from-csv\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-upload-data-flows-from-csv\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-upload-preferences\": \"dist/bin/deprecated-command.cjs\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"start\": \"./dist/bin/cli.cjs\",\n \"prebuild\": \"tsc -p tsconfig.json\",\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"prepublishOnly\": \"pnpm lint && pnpm build && pnpm test && pnpm publint\",\n \"lint\": \"pnpm run /^lint:/\",\n \"lint:prettier\": \"prettier --check . --loglevel=warn\",\n \"lint:types\": \"tsc --noEmit\",\n \"lint:eslint\": \"eslint .\",\n \"format\": \"prettier --write . --loglevel=warn\",\n \"test\": \"vitest run\",\n \"script:transcend-json-schema\": \"tsx scripts/buildTranscendJsonSchema.ts && prettier ./transcend-yml-schema-*.json --write\",\n \"script:pathfinder-json-schema\": \"tsx scripts/buildPathfinderJsonSchema.ts && prettier ./pathfinder-policy-yml-schema.json --write\",\n \"docgen\": \"tsx scripts/buildReadmeDocs.ts\"\n },\n \"tsup\": {\n \"entry\": [\n \"src/bin/cli.ts\",\n \"src/bin/bash-complete.ts\",\n \"src/bin/deprecated-command.ts\",\n \"src/index.ts\"\n ],\n \"format\": [\n \"cjs\"\n ],\n \"sourcemap\": true,\n \"dts\": true,\n \"tsconfig\": \"tsconfig.json\",\n \"clean\": true,\n \"splitting\": true,\n \"minify\": true,\n \"noExternal\": [\n \"lodash-es\"\n ]\n },\n \"dependencies\": {\n \"@stricli/auto-complete\": \"^1.2.0\",\n \"@stricli/core\": \"^1.2.0\",\n \"@transcend-io/airgap.js-types\": \"^12.12.1\",\n \"@transcend-io/handlebars-utils\": \"^1.1.0\",\n \"@transcend-io/internationalization\": \"^1.6.0\",\n \"@transcend-io/persisted-state\": \"^1.0.4\",\n \"@transcend-io/privacy-types\": \"^4.124.1\",\n \"@transcend-io/secret-value\": \"^1.2.0\",\n \"@transcend-io/type-utils\": \"^1.8.0\",\n \"JSONStream\": \"^1.3.5\",\n \"cli-progress\": \"^3.11.2\",\n \"colors\": \"^1.4.0\",\n \"csv-parse\": \"^5.6.0\",\n \"fast-csv\": \"^4.3.6\",\n \"fast-glob\": \"^3.2.12\",\n \"fp-ts\": \"^2.16.1\",\n \"fuzzysearch\": \"^1.0.3\",\n \"global-agent\": \"^3.0.0\",\n \"got\": \"^11.8.5\",\n \"graphql-request\": \"^5.0.0\",\n \"inquirer\": \"=7.3.3\",\n \"inquirer-autocomplete-prompt\": \"=1.3.0\",\n \"io-ts\": \"^2.2.21\",\n \"io-ts-types\": \"^0.5.16\",\n \"js-yaml\": \"^4.1.0\",\n \"jsonwebtoken\": \"^9.0.2\",\n \"lodash-es\": \"^4.17.21\",\n \"monocle-ts\": \"^2.3.13\",\n \"newtype-ts\": \"^0.3.5\",\n \"query-string\": \"=7.0.0\",\n \"semver\": \"^7.6.0\",\n \"undici\": \"^5.22.1\",\n \"yargs-parser\": \"^21.1.1\"\n },\n \"devDependencies\": {\n \"@types/JSONStream\": \"npm:@types/jsonstream@^0.8.33\",\n \"@types/cli-progress\": \"^3.11.0\",\n \"@types/colors\": \"^1.2.1\",\n \"@types/fuzzysearch\": \"^1.0.0\",\n \"@types/global-agent\": \"^2.1.1\",\n \"@types/inquirer\": \"^7.3.1\",\n \"@types/inquirer-autocomplete-prompt\": \"^3.0.0\",\n \"@types/js-yaml\": \"^4.0.5\",\n \"@types/json-schema\": \"^7.0.15\",\n \"@types/jsonwebtoken\": \"^9\",\n \"@types/lodash-es\": \"^4.17.12\",\n \"@types/node\": \"^18.15.11\",\n \"@types/semver\": \"^7\",\n \"@types/yargs-parser\": \"^21.0.0\",\n \"@typescript-eslint/eslint-plugin\": \"^5.58.0\",\n \"@typescript-eslint/parser\": \"^5.58.0\",\n \"depcheck\": \"^1.4.3\",\n \"doctoc\": \"^2.2.1\",\n \"eslint\": \"^8.38.0\",\n \"eslint-config-airbnb-base\": \"^15.0.0\",\n \"eslint-import-resolver-typescript\": \"^3.5.5\",\n \"eslint-plugin-eslint-comments\": \"^3.2.0\",\n \"eslint-plugin-import\": \"2.27.5\",\n \"eslint-plugin-jsdoc\": \"^41.1.1\",\n \"fdir\": \"^6.4.6\",\n \"prettier\": \"^2.8.7\",\n \"publint\": \"^0.3.12\",\n \"tsup\": \"^8.5.0\",\n \"tsx\": \"^4.20.3\",\n \"typescript\": \"^5.0.4\",\n \"vite-tsconfig-paths\": \"^5.1.4\",\n \"vitest\": \"^3.2.4\"\n },\n \"packageManager\": \"pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184\"\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkITOED6PZcjs = require('./chunk-ITOED6PZ.cjs');var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function c({message:e}){let{response:r}=await _inquirer2.default.prompt([{name:"response",message:e,type:"confirm"}]);return r}async function l({message:e}){let{response:r}=await _inquirer2.default.prompt([{name:"response",message:e,type:"text",validate:t=>t.trim().length>0}]);return r}async function y({defaultValue:e,values:r,message:t}){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let{response:p}=await _inquirer2.default.prompt([{name:"response",message:t,type:"autocomplete",default:e,source:(a,n)=>n?r.filter(s=>typeof s=="string"&&_chunkITOED6PZcjs.k.call(void 0, n,s)):r}]);return p}exports.a = c; exports.b = l; exports.c = y;
|
|
2
|
+
//# sourceMappingURL=chunk-AO3PNDFX.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/benbrook/transcend/cli/dist/chunk-AO3PNDFX.cjs","../src/lib/helpers/inquirer.ts"],"names":["inquirerConfirmBoolean","message","response","inquirer","inquirerConfirmText","x","inquirerAutoComplete","defaultValue","values","autoCompletePrompt","answersSoFar","input","fuzzySearch"],"mappings":"AAAA,iOAAwC,wFCAnB,kKACU,MAU/B,SAAsBA,CAAAA,CAAuB,CAC3C,OAAA,CAAAC,CACF,CAAA,CAGqB,CACnB,GAAM,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,SACR,CACF,CAAC,CAAA,CACD,OAAOC,CACT,CAQA,MAAA,SAAsBE,CAAAA,CAAoB,CACxC,OAAA,CAAAH,CACF,CAAA,CAGoB,CAClB,GAAM,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,MAAA,CACN,QAAA,CAAWI,CAAAA,EAAMA,CAAAA,CAAE,IAAA,CAAK,CAAA,CAAE,MAAA,CAAS,CACrC,CACF,CAAC,CAAA,CACD,OAAOH,CACT,CAQA,MAAA,SAAsBI,CAAAA,CAAqB,CACzC,YAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,OAAA,CAAAP,CACF,CAAA,CAOoB,CAClBE,kBAAAA,CAAS,cAAA,CAAe,cAAA,CAAgBM,oCAAkB,CAAA,CAC1D,GAAM,CAAE,QAAA,CAAAP,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,cAAA,CACN,OAAA,CAASM,CAAAA,CACT,MAAA,CAAQ,CAACG,CAAAA,CAA2BC,CAAAA,CAAAA,EACjCA,CAAAA,CAEGH,CAAAA,CAAO,MAAA,CACJH,CAAAA,EAAM,OAAOA,CAAAA,EAAM,QAAA,EAAYO,iCAAAA,CAAYD,CAAON,CAAC,CACtD,CAAA,CAHAG,CAIR,CACF,CAAC,CAAA,CACD,OAAON,CACT,CAAA,4CAAA","file":"/Users/benbrook/transcend/cli/dist/chunk-AO3PNDFX.cjs","sourcesContent":[null,"import inquirer from 'inquirer';\nimport autoCompletePrompt from 'inquirer-autocomplete-prompt';\nimport { fuzzySearch } from '../requests';\nimport { ObjByString } from '@transcend-io/type-utils';\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerConfirmBoolean({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<boolean> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: boolean;\n }>([\n {\n name: 'response',\n message,\n type: 'confirm',\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerConfirmText({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<string> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'text',\n validate: (x) => x.trim().length > 0,\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer auto complete\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerAutoComplete({\n defaultValue,\n values,\n message,\n}: {\n /** Default value */\n defaultValue?: string;\n /** Message */\n message: string;\n /** Values to select */\n values: string[];\n}): Promise<string> {\n inquirer.registerPrompt('autocomplete', autoCompletePrompt);\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'autocomplete',\n default: defaultValue,\n source: (answersSoFar: ObjByString, input: string) =>\n !input\n ? values\n : values.filter(\n (x) => typeof x === 'string' && fuzzySearch(input, x),\n ),\n },\n ]);\n return response;\n}\n"]}
|