@transcend-io/cli 7.0.0-alpha.11 → 7.0.0-alpha.12
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/dist/bin/bash-complete.cjs +4 -0
- package/dist/bin/bash-complete.cjs.map +1 -0
- package/dist/bin/cli.cjs +3 -0
- package/dist/bin/cli.cjs.map +1 -0
- package/dist/bin/deprecated-command.cjs +7 -0
- package/dist/bin/deprecated-command.cjs.map +1 -0
- package/dist/chunk-BRVWR44K.cjs +2 -0
- package/dist/chunk-BRVWR44K.cjs.map +1 -0
- package/dist/chunk-BY7W4UQF.cjs +2 -0
- package/dist/chunk-BY7W4UQF.cjs.map +1 -0
- package/dist/chunk-CX2GRUPB.cjs +2 -0
- package/dist/chunk-CX2GRUPB.cjs.map +1 -0
- package/dist/chunk-DQHCGJTR.cjs +2 -0
- package/dist/chunk-DQHCGJTR.cjs.map +1 -0
- package/dist/chunk-EG4L6YAJ.cjs +2 -0
- package/dist/chunk-EG4L6YAJ.cjs.map +1 -0
- package/dist/chunk-IBTP5OXE.cjs +2 -0
- package/dist/chunk-IBTP5OXE.cjs.map +1 -0
- package/dist/chunk-JC7VDPVP.cjs +2831 -0
- package/dist/chunk-JC7VDPVP.cjs.map +1 -0
- package/dist/chunk-KAE73AXX.cjs +2 -0
- package/dist/chunk-KAE73AXX.cjs.map +1 -0
- package/dist/chunk-KEXUFX2J.cjs +12 -0
- package/dist/chunk-KEXUFX2J.cjs.map +1 -0
- package/dist/chunk-KOV2SQO2.cjs +4 -0
- package/dist/chunk-KOV2SQO2.cjs.map +1 -0
- package/dist/chunk-LOOIAAAW.cjs +9 -0
- package/dist/chunk-LOOIAAAW.cjs.map +1 -0
- package/dist/chunk-OKOJP5XU.cjs +94 -0
- package/dist/chunk-OKOJP5XU.cjs.map +1 -0
- package/dist/chunk-ORNBWSZL.cjs +2 -0
- package/dist/chunk-ORNBWSZL.cjs.map +1 -0
- package/dist/chunk-QJYHSHFA.cjs +2 -0
- package/dist/chunk-QJYHSHFA.cjs.map +1 -0
- package/dist/chunk-SAEKBZGF.cjs +2 -0
- package/dist/chunk-SAEKBZGF.cjs.map +1 -0
- package/dist/chunk-T462ONFX.cjs +2 -0
- package/dist/chunk-T462ONFX.cjs.map +1 -0
- package/dist/chunk-TD7ADMVO.cjs +2 -0
- package/dist/chunk-TD7ADMVO.cjs.map +1 -0
- package/dist/chunk-UEGX6GZ2.cjs +2 -0
- package/dist/chunk-UEGX6GZ2.cjs.map +1 -0
- package/dist/chunk-URT6VVOK.cjs +3 -0
- package/dist/chunk-URT6VVOK.cjs.map +1 -0
- package/dist/chunk-UYYOVK3W.cjs +2 -0
- package/dist/chunk-UYYOVK3W.cjs.map +1 -0
- package/dist/chunk-X4YTPQVY.cjs +4 -0
- package/dist/chunk-X4YTPQVY.cjs.map +1 -0
- package/dist/chunk-ZJDLK7C3.cjs +75 -0
- package/dist/chunk-ZJDLK7C3.cjs.map +1 -0
- package/dist/chunk-ZUNVPK23.cjs +2 -0
- package/dist/chunk-ZUNVPK23.cjs.map +1 -0
- package/dist/chunk-ZVK4HIDF.cjs +6 -0
- package/dist/chunk-ZVK4HIDF.cjs.map +1 -0
- package/dist/impl-2DZ5OV74.cjs +2 -0
- package/dist/impl-2DZ5OV74.cjs.map +1 -0
- package/dist/impl-2ILRPUCC.cjs +9 -0
- package/dist/impl-2ILRPUCC.cjs.map +1 -0
- package/dist/impl-2LBSGBBL.cjs +2 -0
- package/dist/impl-2LBSGBBL.cjs.map +1 -0
- package/dist/impl-3NMEM4QJ.cjs +2 -0
- package/dist/impl-3NMEM4QJ.cjs.map +1 -0
- package/dist/impl-3QGL5KFO.cjs +2 -0
- package/dist/impl-3QGL5KFO.cjs.map +1 -0
- package/dist/impl-56MNYVA5.cjs +2 -0
- package/dist/impl-56MNYVA5.cjs.map +1 -0
- package/dist/impl-6PKXIPAW.cjs +2 -0
- package/dist/impl-6PKXIPAW.cjs.map +1 -0
- package/dist/impl-73JOMLRW.cjs +2 -0
- package/dist/impl-73JOMLRW.cjs.map +1 -0
- package/dist/impl-ADTYWN4O.cjs +2 -0
- package/dist/impl-ADTYWN4O.cjs.map +1 -0
- package/dist/impl-BOLY4EOP.cjs +7 -0
- package/dist/impl-BOLY4EOP.cjs.map +1 -0
- package/dist/impl-DUSKH5V5.cjs +2 -0
- package/dist/impl-DUSKH5V5.cjs.map +1 -0
- package/dist/impl-F6IWO7FD.cjs +2 -0
- package/dist/impl-F6IWO7FD.cjs.map +1 -0
- package/dist/impl-GHDROQMO.cjs +2 -0
- package/dist/impl-GHDROQMO.cjs.map +1 -0
- package/dist/impl-HEJP2URY.cjs +2 -0
- package/dist/impl-HEJP2URY.cjs.map +1 -0
- package/dist/impl-IQ7A5Z4D.cjs +6 -0
- package/dist/impl-IQ7A5Z4D.cjs.map +1 -0
- package/dist/impl-JAJVO3ZW.cjs +2 -0
- package/dist/impl-JAJVO3ZW.cjs.map +1 -0
- package/dist/impl-JF27LEV3.cjs +2 -0
- package/dist/impl-JF27LEV3.cjs.map +1 -0
- package/dist/impl-JODNLRWN.cjs +6 -0
- package/dist/impl-JODNLRWN.cjs.map +1 -0
- package/dist/impl-KJUS5YHL.cjs +6 -0
- package/dist/impl-KJUS5YHL.cjs.map +1 -0
- package/dist/impl-KOKG6ZNB.cjs +2 -0
- package/dist/impl-KOKG6ZNB.cjs.map +1 -0
- package/dist/impl-KWJ7DKLD.cjs +2 -0
- package/dist/impl-KWJ7DKLD.cjs.map +1 -0
- package/dist/impl-LNCNTGHP.cjs +2 -0
- package/dist/impl-LNCNTGHP.cjs.map +1 -0
- package/dist/impl-MHS2Q5XQ.cjs +2 -0
- package/dist/impl-MHS2Q5XQ.cjs.map +1 -0
- package/dist/impl-MUMMGTPH.cjs +2 -0
- package/dist/impl-MUMMGTPH.cjs.map +1 -0
- package/dist/impl-NJ7B53DT.cjs +2 -0
- package/dist/impl-NJ7B53DT.cjs.map +1 -0
- package/dist/impl-OKINLHAG.cjs +2 -0
- package/dist/impl-OKINLHAG.cjs.map +1 -0
- package/dist/impl-PAGIGWUU.cjs +2 -0
- package/dist/impl-PAGIGWUU.cjs.map +1 -0
- package/dist/impl-PKVWUYYX.cjs +2 -0
- package/dist/impl-PKVWUYYX.cjs.map +1 -0
- package/dist/impl-QBPIYO6K.cjs +2 -0
- package/dist/impl-QBPIYO6K.cjs.map +1 -0
- package/dist/impl-QUC5AKPQ.cjs +2 -0
- package/dist/impl-QUC5AKPQ.cjs.map +1 -0
- package/dist/impl-RMVV72AB.cjs +2 -0
- package/dist/impl-RMVV72AB.cjs.map +1 -0
- package/dist/impl-S5EXF3MB.cjs +2 -0
- package/dist/impl-S5EXF3MB.cjs.map +1 -0
- package/dist/impl-SJGNXCXR.cjs +4 -0
- package/dist/impl-SJGNXCXR.cjs.map +1 -0
- package/dist/impl-SYM6RYJP.cjs +2 -0
- package/dist/impl-SYM6RYJP.cjs.map +1 -0
- package/dist/impl-UTZGKHAD.cjs +2 -0
- package/dist/impl-UTZGKHAD.cjs.map +1 -0
- package/dist/impl-VI3JMHFN.cjs +2 -0
- package/dist/impl-VI3JMHFN.cjs.map +1 -0
- package/dist/impl-VIX7AWHA.cjs +2 -0
- package/dist/impl-VIX7AWHA.cjs.map +1 -0
- package/dist/impl-W42Y6L6N.cjs +2 -0
- package/dist/impl-W42Y6L6N.cjs.map +1 -0
- package/dist/impl-XE5EV5SW.cjs +12 -0
- package/dist/impl-XE5EV5SW.cjs.map +1 -0
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.ts → index.d.cts} +1 -1
- package/package.json +46 -45
- package/dist/bin/bash-complete.js +0 -4
- package/dist/bin/bash-complete.js.map +0 -1
- package/dist/bin/cli.js +0 -3
- package/dist/bin/cli.js.map +0 -1
- package/dist/bin/deprecated-command.js +0 -7
- package/dist/bin/deprecated-command.js.map +0 -1
- package/dist/chunk-347UQP43.js +0 -2
- package/dist/chunk-347UQP43.js.map +0 -1
- package/dist/chunk-43JWXG77.js +0 -2
- package/dist/chunk-43JWXG77.js.map +0 -1
- package/dist/chunk-4GLITB3Y.js +0 -2
- package/dist/chunk-4GLITB3Y.js.map +0 -1
- package/dist/chunk-6WKTY4YQ.js +0 -4
- package/dist/chunk-6WKTY4YQ.js.map +0 -1
- package/dist/chunk-72U6ETHG.js +0 -2
- package/dist/chunk-72U6ETHG.js.map +0 -1
- package/dist/chunk-AB4DHWRB.js +0 -2
- package/dist/chunk-AB4DHWRB.js.map +0 -1
- package/dist/chunk-ARVEJERC.js +0 -2
- package/dist/chunk-ARVEJERC.js.map +0 -1
- package/dist/chunk-CBAHSBSW.js +0 -2
- package/dist/chunk-CBAHSBSW.js.map +0 -1
- package/dist/chunk-FSJPJZNH.js +0 -2
- package/dist/chunk-FSJPJZNH.js.map +0 -1
- package/dist/chunk-GD7WEHDA.js +0 -9
- package/dist/chunk-GD7WEHDA.js.map +0 -1
- package/dist/chunk-GSXHJEKW.js +0 -75
- package/dist/chunk-GSXHJEKW.js.map +0 -1
- package/dist/chunk-HGLIJXXG.js +0 -3
- package/dist/chunk-HGLIJXXG.js.map +0 -1
- package/dist/chunk-JXPGBZXN.js +0 -94
- package/dist/chunk-JXPGBZXN.js.map +0 -1
- package/dist/chunk-L5ULN3IT.js +0 -2
- package/dist/chunk-L5ULN3IT.js.map +0 -1
- package/dist/chunk-L7ZIX4SU.js +0 -2
- package/dist/chunk-L7ZIX4SU.js.map +0 -1
- package/dist/chunk-LAYHULHH.js +0 -2
- package/dist/chunk-LAYHULHH.js.map +0 -1
- package/dist/chunk-MA4JWWRO.js +0 -6
- package/dist/chunk-MA4JWWRO.js.map +0 -1
- package/dist/chunk-OEB7WG3G.js +0 -4
- package/dist/chunk-OEB7WG3G.js.map +0 -1
- package/dist/chunk-R6QTIUFA.js +0 -2
- package/dist/chunk-R6QTIUFA.js.map +0 -1
- package/dist/chunk-TR32ZRNC.js +0 -2
- package/dist/chunk-TR32ZRNC.js.map +0 -1
- package/dist/chunk-UK7OFHQR.js +0 -12
- package/dist/chunk-UK7OFHQR.js.map +0 -1
- package/dist/chunk-UUBO75GS.js +0 -2
- package/dist/chunk-UUBO75GS.js.map +0 -1
- package/dist/chunk-WEQUQAB7.js +0 -2831
- package/dist/chunk-WEQUQAB7.js.map +0 -1
- package/dist/chunk-XWOTEZCO.js +0 -2
- package/dist/chunk-XWOTEZCO.js.map +0 -1
- package/dist/impl-2TCAWTV7.js +0 -2
- package/dist/impl-2TCAWTV7.js.map +0 -1
- package/dist/impl-42N5BEEM.js +0 -6
- package/dist/impl-42N5BEEM.js.map +0 -1
- package/dist/impl-4CRAE4V6.js +0 -2
- package/dist/impl-4CRAE4V6.js.map +0 -1
- package/dist/impl-5N4IKF4U.js +0 -2
- package/dist/impl-5N4IKF4U.js.map +0 -1
- package/dist/impl-5NAYXPAC.js +0 -2
- package/dist/impl-5NAYXPAC.js.map +0 -1
- package/dist/impl-5YV7K446.js +0 -2
- package/dist/impl-5YV7K446.js.map +0 -1
- package/dist/impl-645HDE5S.js +0 -2
- package/dist/impl-645HDE5S.js.map +0 -1
- package/dist/impl-7DL7ZS4K.js +0 -9
- package/dist/impl-7DL7ZS4K.js.map +0 -1
- package/dist/impl-7JFWBWQZ.js +0 -2
- package/dist/impl-7JFWBWQZ.js.map +0 -1
- package/dist/impl-B4WDU4OW.js +0 -2
- package/dist/impl-B4WDU4OW.js.map +0 -1
- package/dist/impl-B5C37V2L.js +0 -2
- package/dist/impl-B5C37V2L.js.map +0 -1
- package/dist/impl-BWZUWHVF.js +0 -2
- package/dist/impl-BWZUWHVF.js.map +0 -1
- package/dist/impl-D47U6GWY.js +0 -2
- package/dist/impl-D47U6GWY.js.map +0 -1
- package/dist/impl-FAOTDDQ5.js +0 -2
- package/dist/impl-FAOTDDQ5.js.map +0 -1
- package/dist/impl-FYAEBZIM.js +0 -2
- package/dist/impl-FYAEBZIM.js.map +0 -1
- package/dist/impl-GGEEIOQF.js +0 -2
- package/dist/impl-GGEEIOQF.js.map +0 -1
- package/dist/impl-IAKEYWMV.js +0 -2
- package/dist/impl-IAKEYWMV.js.map +0 -1
- package/dist/impl-IFLVVVBT.js +0 -2
- package/dist/impl-IFLVVVBT.js.map +0 -1
- package/dist/impl-JFHF7SF7.js +0 -2
- package/dist/impl-JFHF7SF7.js.map +0 -1
- package/dist/impl-JPOE7MKX.js +0 -2
- package/dist/impl-JPOE7MKX.js.map +0 -1
- package/dist/impl-KRV7L5SP.js +0 -2
- package/dist/impl-KRV7L5SP.js.map +0 -1
- package/dist/impl-MGARGP2M.js +0 -2
- package/dist/impl-MGARGP2M.js.map +0 -1
- package/dist/impl-N3R63BI4.js +0 -2
- package/dist/impl-N3R63BI4.js.map +0 -1
- package/dist/impl-NCWU4WVO.js +0 -2
- package/dist/impl-NCWU4WVO.js.map +0 -1
- package/dist/impl-NE4OGF7U.js +0 -2
- package/dist/impl-NE4OGF7U.js.map +0 -1
- package/dist/impl-NNBY4R6T.js +0 -2
- package/dist/impl-NNBY4R6T.js.map +0 -1
- package/dist/impl-PERB6GYW.js +0 -6
- package/dist/impl-PERB6GYW.js.map +0 -1
- package/dist/impl-QSO5YEU5.js +0 -2
- package/dist/impl-QSO5YEU5.js.map +0 -1
- package/dist/impl-R3SREBHK.js +0 -2
- package/dist/impl-R3SREBHK.js.map +0 -1
- package/dist/impl-RCQ2XX63.js +0 -2
- package/dist/impl-RCQ2XX63.js.map +0 -1
- package/dist/impl-TKRPL6CJ.js +0 -12
- package/dist/impl-TKRPL6CJ.js.map +0 -1
- package/dist/impl-TMKWWJKO.js +0 -2
- package/dist/impl-TMKWWJKO.js.map +0 -1
- package/dist/impl-TOLP53IM.js +0 -2
- package/dist/impl-TOLP53IM.js.map +0 -1
- package/dist/impl-VDNSV4OU.js +0 -6
- package/dist/impl-VDNSV4OU.js.map +0 -1
- package/dist/impl-VUKRE7OK.js +0 -2
- package/dist/impl-VUKRE7OK.js.map +0 -1
- package/dist/impl-XGFKUJGX.js +0 -7
- package/dist/impl-XGFKUJGX.js.map +0 -1
- package/dist/impl-Z4G3R4DW.js +0 -4
- package/dist/impl-Z4G3R4DW.js.map +0 -1
- package/dist/impl-ZN4EG5UY.js +0 -2
- package/dist/impl-ZN4EG5UY.js.map +0 -1
- package/dist/impl-ZX6PDQW6.js +0 -2
- package/dist/impl-ZX6PDQW6.js.map +0 -1
- package/dist/index.js +0 -5
- package/dist/index.js.map +0 -1
- /package/dist/bin/{bash-complete.d.ts → bash-complete.d.cts} +0 -0
- /package/dist/bin/{cli.d.ts → cli.d.cts} +0 -0
- /package/dist/bin/{deprecated-command.d.ts → deprecated-command.d.cts} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
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 _chunkOKOJP5XUcjs = require('../chunk-OKOJP5XU.cjs');require('../chunk-LOOIAAAW.cjs');require('../chunk-EG4L6YAJ.cjs');require('../chunk-UYYOVK3W.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, _chunkOKOJP5XUcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunkOKOJP5XUcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
|
|
3
|
+
`)}catch (e2){}}e();
|
|
4
|
+
//# sourceMappingURL=bash-complete.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/benbrook/transcend/cli/dist/bin/bash-complete.cjs","../../src/bin/bash-complete.ts"],"names":["main","inputs","proposeCompletions","app","buildContext","completion"],"mappings":"AAAA;AACA,0kBAAyC,yDAA0C,iCAA8B,iCAA8B,iCAA8B,iCAA8B,qCCAxK,MAOnC,SAAeA,CAAAA,CAAAA,CAAsB,CACnC,IAAMC,CAAAA,CAAS,OAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,CAAC,CAAA,iBAC/B,OAAA,mBAAQ,GAAA,qBAAI,SAAA,6BAAW,QAAA,mBAAS,GAAG,GAAA,EACrCA,CAAAA,CAAO,IAAA,CAAK,EAAE,CAAA,CAEhB,MAAMC,sCAAAA,mBAAmBC,CAAKF,CAAAA,CAAQG,iCAAAA,OAAoB,CAAC,CAAA,CAC3D,GAAI,CACF,GAAA,CAAA,GAAW,CAAE,UAAA,CAAAC,CAAW,CAAA,GAAK,MAAMH,sCAAAA,mBACjCC,CACAF,CAAAA,CACAG,iCAAAA,OAAoB,CACtB,CAAA,CACE,OAAA,CAAQ,MAAA,CAAO,KAAA,CAAM,CAAA,EAAA;AAOtB","file":"/Users/benbrook/transcend/cli/dist/bin/bash-complete.cjs","sourcesContent":[null,"#!/usr/bin/env node\nimport { proposeCompletions } from '@stricli/core';\nimport { app } from '../app';\nimport { buildContext } from '../context';\n\n/**\n * Install bash complete\n */\nasync function main(): Promise<void> {\n const inputs = process.argv.slice(3);\n if (process.env.COMP_LINE?.endsWith(' ')) {\n inputs.push('');\n }\n await proposeCompletions(app, inputs, buildContext(process));\n try {\n for (const { completion } of await proposeCompletions(\n app,\n inputs,\n buildContext(process),\n )) {\n process.stdout.write(`${completion}\\n`);\n }\n } catch {\n // ignore\n }\n}\n\nmain();\n"]}
|
package/dist/bin/cli.cjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkOKOJP5XUcjs = require('../chunk-OKOJP5XU.cjs');require('../chunk-LOOIAAAW.cjs');require('../chunk-EG4L6YAJ.cjs');require('../chunk-UYYOVK3W.cjs');require('../chunk-BY7W4UQF.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunkOKOJP5XUcjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
|
|
3
|
+
//# sourceMappingURL=cli.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/benbrook/transcend/cli/dist/bin/cli.cjs","../../src/bin/cli.ts"],"names":["main","run","app","buildContext"],"mappings":"AAAA;AACA,sEAAyC,yDAA0C,iCAA8B,iCAA8B,iCAA8B,iCAA8B,qCCAvL,MAOpB,SAAeA,CAAAA,CAAAA,CAAsB,CACnC,MAAMC,uBAAAA,mBAAIC,CAAK,OAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,CAAC,CAAA,CAAGC,iCAAAA,OAAoB,CAAC,CAC7D,CACAH,CAAAA,CAAK,CAAA","file":"/Users/benbrook/transcend/cli/dist/bin/cli.cjs","sourcesContent":[null,"#!/usr/bin/env node\nimport { run } from '@stricli/core';\nimport { app } from '../app';\nimport { buildContext } from '../context';\n\n/**\n * Entrypoint for `transcend` CLI\n */\nasync function main(): Promise<void> {\n await run(app, process.argv.slice(2), buildContext(process));\n}\nmain();\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
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 _chunkOKOJP5XUcjs = require('../chunk-OKOJP5XU.cjs');require('../chunk-LOOIAAAW.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-EG4L6YAJ.cjs');require('../chunk-UYYOVK3W.cjs');require('../chunk-BY7W4UQF.cjs');var _core = require('@stricli/core');var s={"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 m(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunkOKOJP5XUcjs.a), 'access', _ => _.find, 'call', _2 => _2(o=>o[0]===`${_chunkOKOJP5XUcjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=s[t];if(!e){let a=Object.entries(s).map(([d,l])=>`\`${d}\` -> \`${_chunkOKOJP5XUcjs.a.config.name} ${l.join(" ")}\``).join(`
|
|
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
|
+
${a}`);return}_chunkZUNVPK23cjs.a.log(`\`${t}\` is deprecated as of v7.0.0.
|
|
5
|
+
Use \`${_chunkOKOJP5XUcjs.a.config.name} ${e.join(" ")}\` instead.
|
|
6
|
+
`);let o=m(e);if(!o)throw new Error(`Failed to get help text for command: \`${e.join(" ")}\``);_chunkZUNVPK23cjs.a.log(o)}function p(){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)}p();
|
|
7
|
+
//# sourceMappingURL=deprecated-command.cjs.map
|
|
@@ -0,0 +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":["legacyCommandToModernCommandMap","getHelpTextForCommand","command","generateHelpTextForAllCommands","x"],"mappings":"AAAA;AACA,0kBAAyC,iCAA8B,yDAA0C,iCAA8B,iCAA8B,iCAA8B,qCCGpM,IAKMA,CAAAA,CAA4D,CACvE,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,C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ES,MAAA;AC7H1B","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 legacyCommandToModernCommandMap: 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 legacyCommandToModernCommandMap,\n): void {\n logger.log('[DEPRECATION NOTICE]');\n\n const modernCommand = legacyCommandToModernCommandMap[legacyCommand];\n if (!modernCommand) {\n const modernCommandString = Object.entries(legacyCommandToModernCommandMap)\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 '../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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkORNBWSZLcjs = require('./chunk-ORNBWSZL.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"&&_chunkORNBWSZLcjs.k.call(void 0, n,s)):r}]);return p}exports.a = c; exports.b = l; exports.c = y;
|
|
2
|
+
//# sourceMappingURL=chunk-BRVWR44K.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/benbrook/transcend/cli/dist/chunk-BRVWR44K.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,MAS/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,CAOA,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,CAOA,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-BRVWR44K.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 */\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 */\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 */\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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _typeutils = require('@transcend-io/type-utils');var a=(s=>(s.Json="json",s))(a||{}),o= exports.b =(s=>(s.Assessments="assessments",s))(o||{}),p= exports.c =(i=>(i.OneTrust="oneTrust",i.File="file",i))(p||{}),m= exports.d =(t=>(t.ApiKeys="apiKeys",t.Attributes="customFields",t.Templates="templates",t.DataSilos="dataSilos",t.Enrichers="enrichers",t.DataFlows="dataFlows",t.BusinessEntities="businessEntities",t.Actions="actions",t.DataSubjects="dataSubjects",t.Identifiers="identifiers",t.Cookies="cookies",t.ConsentManager="consentManager",t.Partitions="partitions",t.Prompts="prompts",t.PromptPartials="promptPartials",t.PromptGroups="promptGroups",t.Agents="agents",t.AgentFunctions="agentFunctions",t.AgentFiles="agentFiles",t.Vendors="vendors",t.DataCategories="dataCategories",t.ProcessingPurposes="processingPurposes",t.ActionItems="actionItems",t.ActionItemCollections="actionItemCollections",t.Teams="teams",t.PrivacyCenters="privacyCenters",t.Policies="policies",t.Messages="messages",t.Assessments="assessments",t.AssessmentTemplates="assessmentTemplates",t.Purposes="purposes",t))(m||{}),n= exports.e =_typeutils.makeEnum.call(void 0, {RedactEmail:"redactEmail",Log:"log",LogToTranscend:"logToTranscend",ApplyTranscendPolicies:"applyTranscendPolicies"}),h= exports.f =_typeutils.makeEnum.call(void 0, {ChatCompletion:"/v1/chat/completions",Embeddings:"/v1/embeddings",Completions:"/v1/completions",Agents:"/v1/assistants",Agent:"/v1/assistants/:assistantId",Threads:"/v1/threads",Thread:"/v1/threads/:threadId",Messages:"/v1/threads/:threadId/messages",Message:"/v1/threads/:threadId/messages/:messageId",Runs:"/v1/threads/:threadId/runs",Run:"/v1/threads/:threadId/runs/:runId",Files:"/v1/files",File:"/v1/files/:fileId"});exports.a = a; exports.b = o; exports.c = p; exports.d = m; exports.e = n; exports.f = h;
|
|
2
|
+
//# sourceMappingURL=chunk-BY7W4UQF.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/enums.ts"],"names":["OneTrustFileFormat","OneTrustPullResource","OneTrustPullSource","TranscendPullResource","PathfinderPolicyName","makeEnum","OpenAIRouteName"],"mappings":"AAAA,8HAAyB,IAGbA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,IAAA,CAAO,MAAA,CADGA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAA,CAAA,CAAA,CAAA,CAOAC,CAAAA,aAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,WAAA,CAAc,aAAA,CADJA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAA,CAAA,CAAA,CAAA,CAOAC,CAAAA,aAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,QAAA,CAAW,UAAA,CACXA,CAAAA,CAAA,IAAA,CAAO,MAAA,CAFGA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAA,CAAA,CAAA,CAAA,CAQAC,CAAAA,aAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,OAAA,CAAU,SAAA,CACVA,CAAAA,CAAA,UAAA,CAAa,cAAA,CACbA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,gBAAA,CAAmB,kBAAA,CACnBA,CAAAA,CAAA,OAAA,CAAU,SAAA,CACVA,CAAAA,CAAA,YAAA,CAAe,cAAA,CACfA,CAAAA,CAAA,WAAA,CAAc,aAAA,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BAAA,CACR,QAAA,CAAU,gCAAA,CACV,OAAA,CAAS,2CAAA,CACT,IAAA,CAAM,4BAAA,CACN,GAAA,CAAK,mCAAA,CACL,KAAA,CAAO,WAAA,CACP,IAAA,CAAM,mBACR,CAAC,CAAA,CAAA,yFAAA","file":"/Users/benbrook/transcend/cli/dist/chunk-BY7W4UQF.cjs","sourcesContent":["import { makeEnum } from '@transcend-io/type-utils';\n\n/** Accepted file formats for exporting resources from OneTrust */\nexport enum OneTrustFileFormat {\n Json = 'json',\n}\n\n/**\n * Resources that can be pulled in from OneTrust\n */\nexport enum OneTrustPullResource {\n Assessments = 'assessments',\n}\n\n/**\n * Where to read OneTrust resources from\n */\nexport enum OneTrustPullSource {\n OneTrust = 'oneTrust',\n File = 'file',\n}\n\n/**\n * Resources that can be pulled in\n */\nexport enum TranscendPullResource {\n ApiKeys = 'apiKeys',\n Attributes = 'customFields',\n Templates = 'templates',\n DataSilos = 'dataSilos',\n Enrichers = 'enrichers',\n DataFlows = 'dataFlows',\n BusinessEntities = 'businessEntities',\n Actions = 'actions',\n DataSubjects = 'dataSubjects',\n Identifiers = 'identifiers',\n Cookies = 'cookies',\n ConsentManager = 'consentManager',\n Partitions = 'partitions',\n Prompts = 'prompts',\n PromptPartials = 'promptPartials',\n PromptGroups = 'promptGroups',\n Agents = 'agents',\n AgentFunctions = 'agentFunctions',\n AgentFiles = 'agentFiles',\n Vendors = 'vendors',\n DataCategories = 'dataCategories',\n ProcessingPurposes = 'processingPurposes',\n ActionItems = 'actionItems',\n ActionItemCollections = 'actionItemCollections',\n Teams = 'teams',\n PrivacyCenters = 'privacyCenters',\n Policies = 'policies',\n Messages = 'messages',\n Assessments = 'assessments',\n AssessmentTemplates = 'assessmentTemplates',\n Purposes = 'purposes',\n}\n\n/**\n * Names of built in policies for pathfinder\n */\nexport const PathfinderPolicyName = makeEnum({\n RedactEmail: 'redactEmail',\n Log: 'log',\n LogToTranscend: 'logToTranscend',\n ApplyTranscendPolicies: 'applyTranscendPolicies',\n});\n\n/**\n * Type override\n */\nexport type PathfinderPolicyName =\n (typeof PathfinderPolicyName)[keyof typeof PathfinderPolicyName];\n\n/**\n * The names of the OpenAI routes that we support setting policies for\n * reference: https://platform.openai.com/docs/api-reference/introduction\n */\nexport const OpenAIRouteName = makeEnum({\n ChatCompletion: '/v1/chat/completions',\n Embeddings: '/v1/embeddings',\n Completions: '/v1/completions',\n Agents: '/v1/assistants',\n Agent: '/v1/assistants/:assistantId',\n Threads: '/v1/threads',\n Thread: '/v1/threads/:threadId',\n Messages: '/v1/threads/:threadId/messages',\n Message: '/v1/threads/:threadId/messages/:messageId',\n Runs: '/v1/threads/:threadId/runs',\n Run: '/v1/threads/:threadId/runs/:runId',\n Files: '/v1/files',\n File: '/v1/files/:fileId',\n});\n\n/**\n * Type override\n */\nexport type OpenAIRouteName =\n (typeof OpenAIRouteName)[keyof typeof OpenAIRouteName];\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkUEGX6GZ2cjs = require('./chunk-UEGX6GZ2.cjs');var _chunkJC7VDPVPcjs = require('./chunk-JC7VDPVP.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkEG4L6YAJcjs = require('./chunk-EG4L6YAJ.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function H({email:r,password:a,scopes:f,apiKeyTitle:t,parentOrganizationId:o,deleteExistingApiKey:l=!0,createNewApiKey:x=!0,transcendUrl:k=_chunkEG4L6YAJcjs.e}){let s=await _chunkJC7VDPVPcjs.oe.call(void 0, k,{});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Logging in using email and password."));let{roles:d,loginCookie:P}=await _chunkJC7VDPVPcjs.Fe.call(void 0, s,{email:r,password:a});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully logged in and found ${d.length} role${d.length===1?"":"s"}!`));let K=o?d.filter(e=>e.organization.id===o||e.organization.parentOrganizationId===o):d;s.setHeaders({Cookie:P});let m=[],c=[];return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Generating API keys with title: ${t}, scopes: ${f.join(",")}.`)),await _chunkJC7VDPVPcjs.a.call(void 0, K,async e=>{try{await _chunkJC7VDPVPcjs.Ge.call(void 0, s,{roleId:e.id,email:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Checking if API key already exists in organization "${e.organization.name}" with title: "${t}".`));let[g]=await _chunkJC7VDPVPcjs.zc.call(void 0, s,[t]);if(g&&l)_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Deleting existing API key in "${e.organization.name}" with title: "${t}".`)),await _chunkJC7VDPVPcjs.Je.call(void 0, s,g.id),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully deleted API key in "${e.organization.name}" with title: "${t}".`));else if(g)throw new Error(`API key already exists with title: "${t}"`);if(x){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating API key in "${e.organization.name}" with title: "${t}".`));let{apiKey:N}=await _chunkJC7VDPVPcjs.Ie.call(void 0, s,{title:t,scopes:f});m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:N}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created API key in "${e.organization.name}" with title: "${t}".`))}else m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:""})}catch(g){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to create API key in organization "${e.organization.name}"! - ${g.message}`)),c.push({organizationName:e.organization.name,organizationId:e.organization.id,error:g.message})}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created ${m.length} API key${m.length===1?"":"s"}`)),c.length>0&&_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to create ${c.length} API key${c.length===1?"":"s"}!`)),{errors:c,apiKeys:m}}var _typeutils = require('@transcend-io/type-utils');var _iots = require('io-ts'); var I = _interopRequireWildcard(_iots);var _fs = require('fs');function T(r){return r||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY")),process.exit(1)),_fs.existsSync.call(void 0, r)?_typeutils.decodeCodec.call(void 0, I.array(_chunkUEGX6GZ2cjs.fa),_fs.readFileSync.call(void 0, r,"utf-8")):r}function Z(r,a,f=!1){if(!_fs.existsSync.call(void 0, r))return[];let t=_fs.readdirSync.call(void 0, r).filter(o=>a?a.filter(l=>o.endsWith(l)).length:!0).filter(o=>o.indexOf(".")>0);return f?t.map(o=>o.replace(/\.[^/.]+$/,"")):t}var _path = require('path');function te(r){return _fs.readdirSync.call(void 0, r).filter(a=>_fs.statSync.call(void 0, _path.join.call(void 0, r,a)).isDirectory())}exports.a = H; exports.b = T; exports.c = Z; exports.d = te;
|
|
2
|
+
//# sourceMappingURL=chunk-CX2GRUPB.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/benbrook/transcend/cli/dist/chunk-CX2GRUPB.cjs","../src/lib/api-keys/generateCrossAccountApiKeys.ts"],"names":["generateCrossAccountApiKeys","email","password","scopes","apiKeyTitle","parentOrganizationId","deleteExistingApiKey","createNewApiKey","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClientGeneric","logger","colors","roles","loginCookie","loginUser","filteredRoles","role","results","errors","mapSeries","assumeRole","apiKeyWithTitle","fetchAllApiKeys","deleteApiKey","apiKey","createApiKey","err"],"mappings":"AAAA,mfAAyC,wDAAyF,wDAAyC,wDAAyC,gFCUjM,MAoBnB,SAAsBA,CAAAA,CAA4B,CAChD,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,MAAA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7E,CACF,CAAA,CACA,GAAM,CAAE,MAAA,CAAAsB,CAAO,CAAA,CAAI,MAAMC,kCAAAA,CAAajB,CAAQ,CAC5C,KAAA,CAAON,CAAAA,CACP,MAAA,CAAAD,CACF,CAAC,CAAA,CACDgB,CAAAA,CAAQ,IAAA,CAAK,CACX,gBAAA,CAAkBD,CAAAA,CAAK,YAAA,CAAa,IAAA,CACpC,cAAA,CAAgBA,CAAAA,CAAK,YAAA,CAAa,EAAA,CAClC,MAAA,CAAAQ,CACF,CAAC,CAAA,CACDd,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,iCAAA,EAAoCK,CAAAA,CAAK,YAAA,CAAa,IAAI,CAAA,eAAA,EAAkBd,CAAW,CAAA,EAAA,CACzF,CACF,CACF,CAAA,KAEEe,CAAAA,CAAQ,IAAA,CAAK,CACX,gBAAA,CAAkBD,CAAAA,CAAK,YAAA,CAAa,IAAA,CACpC,cAAA,CAAgBA,CAAAA,CAAK,YAAA,CAAa,EAAA,CAClC,MAAA,CAAQ,EACV,CAAC,CAEL,CAAA,KAAA,CAASU,CAAAA,CAAK,CACZhB,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,0CAAA,EAA6CK,CAAAA,CAAK,YAAA,CAAa,IAAI,CAAA,KAAA,EAAQU,CAAAA,CAAI,OAAO,CAAA,CAAA","file":"/Users/benbrook/transcend/cli/dist/chunk-CX2GRUPB.cjs","sourcesContent":[null,"import { mapSeries } from '@/lib/bluebird-replace';\nimport {\n buildTranscendGraphQLClientGeneric,\n loginUser,\n createApiKey,\n fetchAllApiKeys,\n deleteApiKey,\n assumeRole,\n} from '../graphql';\nimport { ScopeName } from '@transcend-io/privacy-types';\nimport colors from 'colors';\nimport { StoredApiKey } from '../../codecs';\nimport { logger } from '../../logger';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\nexport interface ApiKeyGenerateError {\n /** Name of instance */\n organizationName: string;\n /** Error */\n error: string;\n /** Organization ID API key is for */\n organizationId: string;\n}\n\n/**\n * Generate API keys across multiple transcend accounts\n *\n * @param options - Options\n * @returns Number of API keys created\n */\nexport async function generateCrossAccountApiKeys({\n email,\n password,\n scopes,\n apiKeyTitle,\n parentOrganizationId,\n deleteExistingApiKey = true,\n createNewApiKey = true,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** Email address of user generating API keys */\n email: string;\n /** Password of user generating API keys */\n password: string;\n /** Filter for organizations that match this parent organization ID */\n parentOrganizationId?: string;\n /** Title of the API create to create */\n apiKeyTitle: string;\n /** Title of the API create to create */\n scopes: ScopeName[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** When true delete existing API keys with that title, if set to false an API key exists with that title, an error is thrown */\n deleteExistingApiKey?: boolean;\n /** When true, generate new API keys, otherwise only will delete past API keys */\n createNewApiKey?: boolean;\n}): Promise<{\n /** Successfully generated */\n apiKeys: StoredApiKey[];\n /** Error results */\n errors: ApiKeyGenerateError[];\n}> {\n // Create GraphQL client\n const client = await buildTranscendGraphQLClientGeneric(transcendUrl, {});\n\n // Login the user\n logger.info(colors.magenta('Logging in using email and password.'));\n const { roles, loginCookie } = await loginUser(client, { email, password });\n logger.info(\n colors.green(\n `Successfully logged in and found ${roles.length} role${\n roles.length === 1 ? '' : 's'\n }!`,\n ),\n );\n\n // Filter down by parentOrganizationId\n const filteredRoles = parentOrganizationId\n ? roles.filter(\n (role) =>\n role.organization.id === parentOrganizationId ||\n role.organization.parentOrganizationId === parentOrganizationId,\n )\n : roles;\n\n // Save cookie to call route subsequent times\n client.setHeaders({\n Cookie: loginCookie,\n });\n\n // Save the resulting API keys\n const results: StoredApiKey[] = [];\n const errors: ApiKeyGenerateError[] = [];\n\n // Generate API keys\n logger.info(\n colors.magenta(\n `Generating API keys with title: ${apiKeyTitle}, scopes: ${scopes.join(\n ',',\n )}.`,\n ),\n );\n\n // Map over each role\n await mapSeries(filteredRoles, async (role) => {\n try {\n // Log into the other instance\n await assumeRole(client, { roleId: role.id, email });\n\n // Grab API keys with that title\n logger.info(\n colors.magenta(\n `Checking if API key already exists in organization \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n\n // Delete existing API key\n const [apiKeyWithTitle] = await fetchAllApiKeys(client, [apiKeyTitle]);\n if (apiKeyWithTitle && deleteExistingApiKey) {\n logger.info(\n colors.yellow(\n `Deleting existing API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n await deleteApiKey(client, apiKeyWithTitle.id);\n logger.info(\n colors.green(\n `Successfully deleted API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n } else if (apiKeyWithTitle) {\n // throw error if one exists but not configured to delete\n throw new Error(`API key already exists with title: \"${apiKeyTitle}\"`);\n }\n\n // Create the API key\n if (createNewApiKey) {\n logger.info(\n colors.magenta(\n `Creating API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n const { apiKey } = await createApiKey(client, {\n title: apiKeyTitle,\n scopes,\n });\n results.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n apiKey,\n });\n logger.info(\n colors.green(\n `Successfully created API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n } else {\n // Delete only\n results.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n apiKey: '',\n });\n }\n } catch (err) {\n logger.error(\n colors.red(\n `Failed to create API key in organization \"${role.organization.name}\"! - ${err.message}`,\n ),\n );\n errors.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n error: err.message,\n });\n }\n });\n logger.info(\n colors.green(\n `Successfully created ${results.length} API key${\n results.length === 1 ? '' : 's'\n }`,\n ),\n );\n\n if (errors.length > 0) {\n logger.error(\n colors.red(\n `Failed to create ${errors.length} API key${\n errors.length === 1 ? '' : 's'\n }!`,\n ),\n );\n }\n\n return { errors, apiKeys: results };\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _lodashes = require('lodash-es');function f(l,{adTechPurposes:p=["SaleOfInfo"],serviceToTitle:s,serviceToSupportedIntegration:r}){let e=[],i=[],n={};l.forEach(t=>{let{service:a,attributes:h=[]}=t;if(!a||a==="internalService")return;let u=h.find(o=>o.key==="Found on Domain");u&&(n[a]||(n[a]=[]),n[a].push(...u.values.map(o=>o.replace("https://","").replace("http://",""))),n[a]=[...new Set(n[a])]),_lodashes.union.call(void 0, t.trackingPurposes,p).length>0?(i.push(a),e.includes(a)&&(e=e.filter(o=>o!==a))):i.includes(a)||e.push(a)});let m=[...new Set(i)].map(t=>({title:s[t],...r[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Found On Domain",values:n[t]||[]}]}));return{siteTechDataSilos:[...new Set(e)].map(t=>({title:s[t],...r[t]?{integrationName:t}:{integrationName:"promptAPerson",outerType:t},attributes:[{key:"Tech Type",values:["Site Tech"]},{key:"Found On Domain",values:n[t]||[]}]})),adTechDataSilos:m}}exports.a = f;
|
|
2
|
+
//# sourceMappingURL=chunk-DQHCGJTR.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/consent-manager/dataFlowsToDataSilos.ts"],"names":["dataFlowsToDataSilos","inputs","adTechPurposes","serviceToTitle","serviceToSupportedIntegration","siteTechIntegrations","adTechIntegrations","serviceToFoundOnDomain","flow","service","attributes","foundOnDomain","attr","v","union","s","adTechDataSilos"],"mappings":"AACA,8GAAsB,SAUNA,CAAAA,CACdC,CAAAA,CACA,CACE,cAAA,CAAAC,CAAAA,CAAiB,CAAC,YAAY,CAAA,CAC9B,cAAA,CAAAC,CAAAA,CACA,6BAAA,CAAAC,CACF,CAAA,CASA,CAEA,IAAIC,CAAAA,CAAiC,CAAC,CAAA,CAGhCC,CAAAA,CAA+B,CAAC,CAAA,CAGhCC,CAAAA,CAAsD,CAAC,CAAA,C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,GAAA,CAAIV,CAAkB,CAAC,CAAA,CAAE,GAAA,CAAKG,CAAAA,EAAAA,CAAa,CACzE,KAAA,CAAON,CAAAA,CAAeM,CAAO,CAAA,CAC7B,GAAIL,CAAAA,CAA8BK,CAAO,CAAA,CACrC,CAAE,eAAA,CAAiBA,CAAQ,CAAA,CAC3B,CAAE,eAAA,CAAiB,eAAA,CAAiB,YAAA,CAAcA,CAAQ,CAAA,CAC9D,UAAA,CAAY,CACV,CACE,GAAA,CAAK,WAAA,CACL,MAAA,CAAQ,CAAC,SAAS,CACpB,CAAA,CACA,CACE,GAAA,CAAK,iBAAA,CACL,MAAA,CAAQF,CAAAA,CAAuBE,CAAO,CAAA,EAAK,CAAC,CAC9C,CACF,CACF,CAAA,CAAE,CAAA,CAsBF,MAAO,CACL,iBAAA,CApBwB,CAAC,GAAG,IAAI,GAAA,CAAIJ,CAAoB,CAAC,CAAA,CAAE,GAAA,CAC1DI,CAAAA,EAAAA,CAAa,CACZ,KAAA,CAAON,CAAAA,CAAeM,CAAO,CAAA,CAC7B,GAAIL,CAAAA,CAA8BK,CAAO,CAAA,CACrC,CAAE,eAAA,CAAiBA,CAAQ,CAAA,CAC3B,CAAE,eAAA,CAAiB,eAAA,CAAiB,SAAA,CAAWA,CAAQ,CAAA,CAC3D,UAAA,CAAY,CACV,CACE,GAAA,CAAK,WAAA,CACL,MAAA,CAAQ,CAAC,WAAW,CACtB,CAAA,CACA,CACE,GAAA,CAAK,iBAAA,CACL,MAAA,CAAQF,CAAAA,CAAuBE,CAAO,CAAA,EAAK,CAAC,CAC9C,CACF,CACF,CAAA,CACF,CAAA,CAIE,eAAA,CAAAO,CACF,CACF,CAAA,cAAA","file":"/Users/benbrook/transcend/cli/dist/chunk-DQHCGJTR.cjs","sourcesContent":["import { DataFlowInput, DataSiloInput } from '../../codecs';\nimport { union } from 'lodash-es';\nimport { IndexedCatalogs } from '../graphql';\n\n/**\n * Convert data flow configurations into a set of data silo configurations\n *\n * @param inputs - Data flow input to convert to data silos\n * @param options - Additional options\n * @returns Business entity configuration input\n */\nexport function dataFlowsToDataSilos(\n inputs: DataFlowInput[],\n {\n adTechPurposes = ['SaleOfInfo'],\n serviceToTitle,\n serviceToSupportedIntegration,\n }: IndexedCatalogs & {\n /** List of purposes that are considered \"Ad Tech\" */\n adTechPurposes?: string[];\n },\n): {\n /** List of data silo configurations for site-tech services */\n siteTechDataSilos: DataSiloInput[];\n /** List of data silo configurations for ad-tech services */\n adTechDataSilos: DataSiloInput[];\n} {\n // List of site tech integrations\n let siteTechIntegrations: string[] = [];\n\n // List of ad tech integrations\n const adTechIntegrations: string[] = [];\n\n // Mapping from service name to list of\n const serviceToFoundOnDomain: { [k in string]: string[] } = {};\n\n // iterate over each flow\n inputs.forEach((flow) => {\n // process data flows with services\n const { service, attributes = [] } = flow;\n if (!service || service === 'internalService') {\n return;\n }\n\n // create mapping to found on domain\n const foundOnDomain = attributes.find(\n (attr) => attr.key === 'Found on Domain',\n );\n\n // Create a list of all domains where the data flow was found\n if (foundOnDomain) {\n if (!serviceToFoundOnDomain[service]) {\n serviceToFoundOnDomain[service] = [];\n }\n serviceToFoundOnDomain[service]!.push(\n ...foundOnDomain.values.map((v) =>\n v.replace('https://', '').replace('http://', ''),\n ),\n );\n serviceToFoundOnDomain[service] = [\n ...new Set(serviceToFoundOnDomain[service]),\n ];\n }\n\n // Keep track of ad tech\n if (union(flow.trackingPurposes, adTechPurposes).length > 0) {\n // add service to ad tech list\n adTechIntegrations.push(service);\n\n // remove from site tech list\n if (siteTechIntegrations.includes(service)) {\n siteTechIntegrations = siteTechIntegrations.filter(\n (s) => s !== service,\n );\n }\n } else if (!adTechIntegrations.includes(service)) {\n // add to site tech list\n siteTechIntegrations.push(service);\n }\n });\n\n // create the list of ad tech integrations\n const adTechDataSilos = [...new Set(adTechIntegrations)].map((service) => ({\n title: serviceToTitle[service],\n ...(serviceToSupportedIntegration[service]\n ? { integrationName: service }\n : { integrationName: 'promptAPerson', 'outer-type': service }),\n attributes: [\n {\n key: 'Tech Type',\n values: ['Ad Tech'],\n },\n {\n key: 'Found On Domain',\n values: serviceToFoundOnDomain[service] || [],\n },\n ],\n }));\n\n // create the list of site tech integrations\n const siteTechDataSilos = [...new Set(siteTechIntegrations)].map(\n (service) => ({\n title: serviceToTitle[service],\n ...(serviceToSupportedIntegration[service]\n ? { integrationName: service }\n : { integrationName: 'promptAPerson', outerType: service }),\n attributes: [\n {\n key: 'Tech Type',\n values: ['Site Tech'],\n },\n {\n key: 'Found On Domain',\n values: serviceToFoundOnDomain[service] || [],\n },\n ],\n }),\n );\n\n return {\n siteTechDataSilos,\n adTechDataSilos,\n };\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _privacytypes = require('@transcend-io/privacy-types');var r="transcend",s= exports.b ="https://app.transcend.io",c= exports.c =`${s}/infrastructure/integrations`,p= exports.d =`${s}/data-map/data-inventory/data-points`,g= exports.e =process.env.TRANSCEND_API_URL||"https://api.transcend.io",l= exports.f =process.env.TRANSCEND_CONSENT_API_URL||"https://consent.transcend.io",m= exports.g ={apiKeys:[_privacytypes.ScopeName.ViewApiKeys],templates:[_privacytypes.ScopeName.ManageEmailTemplates],dataSilos:[_privacytypes.ScopeName.ManageDataMap,_privacytypes.ScopeName.ConnectDataSilos],enrichers:[_privacytypes.ScopeName.ManageRequestIdentities],businessEntities:[_privacytypes.ScopeName.ManageDataInventory],identifiers:[_privacytypes.ScopeName.ManageRequestIdentities],customFields:[_privacytypes.ScopeName.ManageGlobalAttributes],dataFlows:[_privacytypes.ScopeName.ManageDataFlow],cookies:[_privacytypes.ScopeName.ManageDataFlow],consentManager:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings],partitions:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings],actions:[_privacytypes.ScopeName.ManageDataSubjectRequestSettings],dataSubjects:[_privacytypes.ScopeName.ManageDataSubjectRequestSettings],prompts:[_privacytypes.ScopeName.ManagePrompts],promptPartials:[_privacytypes.ScopeName.ManagePrompts],promptGroups:[_privacytypes.ScopeName.ManagePrompts],agents:[_privacytypes.ScopeName.ManagePathfinder],agentFunctions:[_privacytypes.ScopeName.ManagePathfinder],agentFiles:[_privacytypes.ScopeName.ManagePathfinder],vendors:[_privacytypes.ScopeName.ManageDataInventory],dataCategories:[_privacytypes.ScopeName.ManageDataInventory],processingPurposes:[_privacytypes.ScopeName.ManageDataInventory],actionItems:[_privacytypes.ScopeName.ManageAllActionItems,_privacytypes.ScopeName.ViewGlobalAttributes],actionItemCollections:[_privacytypes.ScopeName.ManageActionItemCollections],teams:[_privacytypes.ScopeName.ManageAccessControl],messages:[_privacytypes.ScopeName.ManageIntlMessages],privacyCenters:[_privacytypes.ScopeName.ManagePrivacyCenter],policies:[_privacytypes.ScopeName.ManagePolicies],assessments:[_privacytypes.ScopeName.ManageAssessments],assessmentTemplates:[_privacytypes.ScopeName.ManageAssessments],purposes:[_privacytypes.ScopeName.ManageConsentManager,_privacytypes.ScopeName.ManagePreferenceStoreSettings]},A= exports.h ={apiKeys:[_privacytypes.ScopeName.ViewApiKeys],templates:[_privacytypes.ScopeName.ViewEmailTemplates],dataSilos:[_privacytypes.ScopeName.ViewDataMap,_privacytypes.ScopeName.ViewDataSubjectRequestSettings],enrichers:[_privacytypes.ScopeName.ViewRequestIdentitySettings],businessEntities:[_privacytypes.ScopeName.ViewDataInventory],identifiers:[_privacytypes.ScopeName.ViewRequestIdentitySettings],customFields:[_privacytypes.ScopeName.ViewGlobalAttributes],dataFlows:[_privacytypes.ScopeName.ViewDataFlow],cookies:[_privacytypes.ScopeName.ViewDataFlow],consentManager:[_privacytypes.ScopeName.ViewConsentManager],partitions:[_privacytypes.ScopeName.ViewConsentManager],actions:[_privacytypes.ScopeName.ViewDataSubjectRequestSettings],dataSubjects:[_privacytypes.ScopeName.ViewDataSubjectRequestSettings],prompts:[_privacytypes.ScopeName.ViewPrompts],promptPartials:[_privacytypes.ScopeName.ViewPrompts],promptGroups:[_privacytypes.ScopeName.ViewPrompts],agents:[_privacytypes.ScopeName.ViewPathfinder],agentFunctions:[_privacytypes.ScopeName.ViewPathfinder],agentFiles:[_privacytypes.ScopeName.ViewPathfinder],vendors:[_privacytypes.ScopeName.ViewDataInventory],dataCategories:[_privacytypes.ScopeName.ViewDataInventory],processingPurposes:[_privacytypes.ScopeName.ViewDataInventory],actionItemCollections:[_privacytypes.ScopeName.ViewAllActionItems],actionItems:[_privacytypes.ScopeName.ViewAllActionItems],teams:[_privacytypes.ScopeName.ViewScopes],messages:[_privacytypes.ScopeName.ViewIntlMessages],privacyCenters:[_privacytypes.ScopeName.ViewPrivacyCenter],policies:[_privacytypes.ScopeName.ViewPolicies],assessments:[_privacytypes.ScopeName.ViewAssessments],assessmentTemplates:[_privacytypes.ScopeName.ViewAssessments],purposes:[_privacytypes.ScopeName.ViewConsentManager,_privacytypes.ScopeName.ViewPreferenceStoreSettings]},P= exports.i ={apiKeys:"api-keys",customFields:"attributes",dataFlows:"data-flows",cookies:"cookies",consentManager:"consent-manager",partitions:"partitions",actions:"actions",dataSubjects:"data-subjects",businessEntities:"business-entities",identifiers:"identifiers",enrichers:"enrichers",dataSilos:"data-silos",templates:"templates",prompts:"prompts",promptPartials:"prompt-partials",promptGroups:"prompt-groups",agents:"agents",agentFunctions:"agent-functions",agentFiles:"agent-files",vendors:"vendors",dataCategories:"data-categories",processingPurposes:"processing-purposes",actionItems:"action-items",actionItemCollections:"action-item-collections",teams:"teams",messages:"messages",privacyCenters:"privacy-center",policies:"policies",assessments:"assessments",assessmentTemplates:"assessment-templates",purposes:"purposes"};exports.a = r; exports.b = s; exports.c = c; exports.d = p; exports.e = g; exports.f = l; exports.g = m; exports.h = A; exports.i = P;
|
|
2
|
+
//# sourceMappingURL=chunk-EG4L6YAJ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"names":["name","ADMIN_DASH","ADMIN_DASH_INTEGRATIONS"],"mappings":"AAAA,oIAA0B,IAKbA,CAAAA,CAAO,WAAA,CAEPC,CAAAA,aAAa,0BAAA,CAEbC,CAAAA,aAA0B,CAAA,EAAA","file":"/Users/benbrook/transcend/cli/dist/chunk-EG4L6YAJ.cjs","sourcesContent":["import { ScopeName } from '@transcend-io/privacy-types';\nimport { TranscendPullResource } from './enums';\nimport { TranscendInput } from './codecs';\n\nexport { description, version } from '../package.json';\nexport const name = 'transcend';\n\nexport const ADMIN_DASH = 'https://app.transcend.io';\n\nexport const ADMIN_DASH_INTEGRATIONS = `${ADMIN_DASH}/infrastructure/integrations`;\nexport const ADMIN_DASH_DATAPOINTS = `${ADMIN_DASH}/data-map/data-inventory/data-points`;\n\n/**\n * Override default transcend API url using\n * TRANSCEND_API_URL=https://api.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_API =\n process.env.TRANSCEND_API_URL || 'https://api.transcend.io';\n\n/**\n * Override default transcend API url using\n * TRANSCEND_CONSENT_API_URL=https://consent.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_CONSENT_API =\n process.env.TRANSCEND_CONSENT_API_URL || 'https://consent.transcend.io';\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PUSH_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ManageEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ManageDataMap,\n ScopeName.ConnectDataSilos,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.Identifiers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.Attributes]: [ScopeName.ManageGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.ConsentManager]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Partitions]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Actions]: [ScopeName.ManageDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ManageDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ManagePrompts],\n [TranscendPullResource.Agents]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ActionItems]: [\n ScopeName.ManageAllActionItems,\n ScopeName.ViewGlobalAttributes,\n ],\n [TranscendPullResource.ActionItemCollections]: [\n ScopeName.ManageActionItemCollections,\n ],\n [TranscendPullResource.Teams]: [ScopeName.ManageAccessControl],\n [TranscendPullResource.Messages]: [ScopeName.ManageIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ManagePrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ManagePolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ManageAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ManageAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ManageConsentManager,\n ScopeName.ManagePreferenceStoreSettings,\n ],\n};\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PULL_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ViewEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ViewDataMap,\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.Identifiers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.Attributes]: [ScopeName.ViewGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.ConsentManager]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Partitions]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Actions]: [ScopeName.ViewDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ViewPrompts],\n [TranscendPullResource.Agents]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ActionItemCollections]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.ActionItems]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.Teams]: [ScopeName.ViewScopes],\n [TranscendPullResource.Messages]: [ScopeName.ViewIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ViewPrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ViewPolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ViewAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ViewAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ViewConsentManager,\n ScopeName.ViewPreferenceStoreSettings,\n ],\n};\n\nexport const TR_YML_RESOURCE_TO_FIELD_NAME: Record<\n TranscendPullResource,\n keyof TranscendInput\n> = {\n [TranscendPullResource.ApiKeys]: 'api-keys',\n [TranscendPullResource.Attributes]: 'attributes',\n [TranscendPullResource.DataFlows]: 'data-flows',\n [TranscendPullResource.Cookies]: 'cookies',\n [TranscendPullResource.ConsentManager]: 'consent-manager',\n [TranscendPullResource.Partitions]: 'partitions',\n [TranscendPullResource.Actions]: 'actions',\n [TranscendPullResource.DataSubjects]: 'data-subjects',\n [TranscendPullResource.BusinessEntities]: 'business-entities',\n [TranscendPullResource.Identifiers]: 'identifiers',\n [TranscendPullResource.Enrichers]: 'enrichers',\n [TranscendPullResource.DataSilos]: 'data-silos',\n [TranscendPullResource.Templates]: 'templates',\n [TranscendPullResource.Prompts]: 'prompts',\n [TranscendPullResource.PromptPartials]: 'prompt-partials',\n [TranscendPullResource.PromptGroups]: 'prompt-groups',\n [TranscendPullResource.Agents]: 'agents',\n [TranscendPullResource.AgentFunctions]: 'agent-functions',\n [TranscendPullResource.AgentFiles]: 'agent-files',\n [TranscendPullResource.Vendors]: 'vendors',\n [TranscendPullResource.DataCategories]: 'data-categories',\n [TranscendPullResource.ProcessingPurposes]: 'processing-purposes',\n [TranscendPullResource.ActionItems]: 'action-items',\n [TranscendPullResource.ActionItemCollections]: 'action-item-collections',\n [TranscendPullResource.Teams]: 'teams',\n [TranscendPullResource.Messages]: 'messages',\n [TranscendPullResource.PrivacyCenters]: 'privacy-center',\n [TranscendPullResource.Policies]: 'policies',\n [TranscendPullResource.Assessments]: 'assessments',\n [TranscendPullResource.AssessmentTemplates]: 'assessment-templates',\n [TranscendPullResource.Purposes]: 'purposes',\n};\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _typeutils = require('@transcend-io/type-utils');function o(s,...e){let n=JSON.parse(JSON.stringify(s));return e.forEach(a=>{_typeutils.getEntries.call(void 0, a).forEach(([r,t])=>{n[r]===void 0?n[r]=t:Array.isArray(t)?n[r]=[...n[r],...t]:n[r]=t})}),n}exports.a = o;
|
|
2
|
+
//# sourceMappingURL=chunk-IBTP5OXE.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/mergeTranscendInputs.ts"],"names":["mergeTranscendInputs","base","inputs","cloned","input","getEntries","key","value"],"mappings":"AACA,8HAA2B,SASXA,CAAAA,CACdC,CAAAA,CAAAA,GACGC,CAAAA,CACa,CAEhB,IAAMC,CAAAA,CAAc,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,SAAA,CAAUF,CAAI,CAAC,CAAA,CACnD,OAAAC,CAAAA,CAAO,OAAA,CAASE,CAAAA,EAAU,CAExBC,mCAAAA,CAAgB,CAAA,CAAE,OAAA,CAAQ,CAAC,CAACC,CAAAA,CAAKC,CAAK,CAAA,CAAA,EAAkB,CAClDJ,CAAAA,CAAOG,CAAG,CAAA,GAAM,KAAA,CAAA,CAClBH,CAAAA,CAAOG,CAAG,CAAA,CAAIC,CAAAA,CACL,KAAA,CAAM,OAAA,CAAQA,CAAK,CAAA,CAC5BJ,CAAAA,CAAOG,CAAG,CAAA,CAAI,CAAC,GAAGH,CAAAA,CAAOG,CAAG,CAAA,CAAG,GAAGC,CAAK,CAAA,CAEvCJ,CAAAA,CAAOG,CAAG,CAAA,CAAIC,CAElB,CAAC,CACH,CAAC,CAAA,CACMJ,CACT,CAAA,cAAA","file":"/Users/benbrook/transcend/cli/dist/chunk-IBTP5OXE.cjs","sourcesContent":["import { TranscendInput } from '../codecs';\nimport { getEntries } from '@transcend-io/type-utils';\n\n/**\n * Combine a set of TranscendInput yaml files into a single yaml\n *\n * @param base - Base input\n * @param inputs - The list of inputs\n * @returns Merged input\n */\nexport function mergeTranscendInputs(\n base: TranscendInput,\n ...inputs: TranscendInput[]\n): TranscendInput {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const cloned: any = JSON.parse(JSON.stringify(base));\n inputs.forEach((input) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getEntries(input).forEach(([key, value]: [any, any]) => {\n if (cloned[key] === undefined) {\n cloned[key] = value;\n } else if (Array.isArray(value)) {\n cloned[key] = [...cloned[key], ...value];\n } else {\n cloned[key] = value;\n }\n });\n });\n return cloned;\n}\n"]}
|