@transcend-io/cli 8.31.1 → 8.32.4
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 +121 -0
- package/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/deprecated-command.cjs +2 -2
- package/dist/{chunk-M7OVJJGB.cjs → chunk-22KX2NM4.cjs} +4 -4
- package/dist/{chunk-M7OVJJGB.cjs.map → chunk-22KX2NM4.cjs.map} +1 -1
- package/dist/chunk-56QKBG2R.cjs +3001 -0
- package/dist/chunk-56QKBG2R.cjs.map +1 -0
- package/dist/chunk-6TKTYQIF.cjs +3 -0
- package/dist/chunk-6TKTYQIF.cjs.map +1 -0
- package/dist/{chunk-DIB7IOEX.cjs → chunk-BPOXNSPY.cjs} +2 -2
- package/dist/{chunk-DIB7IOEX.cjs.map → chunk-BPOXNSPY.cjs.map} +1 -1
- package/dist/chunk-CM7VJEOY.cjs +4 -0
- package/dist/{chunk-SKOTYI3A.cjs.map → chunk-CM7VJEOY.cjs.map} +1 -1
- package/dist/chunk-D3VRD5F5.cjs +2 -0
- package/dist/chunk-D3VRD5F5.cjs.map +1 -0
- package/dist/{chunk-XXFLFF7Q.cjs → chunk-DQCPGPXG.cjs} +2 -2
- package/dist/{chunk-XXFLFF7Q.cjs.map → chunk-DQCPGPXG.cjs.map} +1 -1
- package/dist/{chunk-MXT7N555.cjs → chunk-DYBVUGHH.cjs} +22 -22
- package/dist/chunk-DYBVUGHH.cjs.map +1 -0
- package/dist/chunk-IHUCIK5T.cjs +2 -0
- package/dist/{chunk-Q2RJZGYW.cjs.map → chunk-IHUCIK5T.cjs.map} +1 -1
- package/dist/{chunk-7H4ALAHC.cjs → chunk-LQUVB4MI.cjs} +4 -4
- package/dist/chunk-LQUVB4MI.cjs.map +1 -0
- package/dist/chunk-P5GD5LAK.cjs +2 -0
- package/dist/chunk-P5GD5LAK.cjs.map +1 -0
- package/dist/chunk-PGO2YKRX.cjs +12 -0
- package/dist/chunk-PGO2YKRX.cjs.map +1 -0
- package/dist/{chunk-ALOB5SWZ.cjs → chunk-VCPZG4FJ.cjs} +2 -2
- package/dist/{chunk-ALOB5SWZ.cjs.map → chunk-VCPZG4FJ.cjs.map} +1 -1
- package/dist/chunk-VUQAH7YK.cjs +12 -0
- package/dist/chunk-VUQAH7YK.cjs.map +1 -0
- package/dist/{impl-VXOHC45F.cjs → impl-2JA6BPE7.cjs} +2 -2
- package/dist/{impl-VXOHC45F.cjs.map → impl-2JA6BPE7.cjs.map} +1 -1
- package/dist/{impl-PKWSORXX.cjs → impl-4AI7T6RD.cjs} +2 -2
- package/dist/{impl-PKWSORXX.cjs.map → impl-4AI7T6RD.cjs.map} +1 -1
- package/dist/impl-4LAJNPQ4.cjs +16 -0
- package/dist/impl-4LAJNPQ4.cjs.map +1 -0
- package/dist/{impl-4CWCLU5Z.cjs → impl-4YFJOKCA.cjs} +2 -2
- package/dist/{impl-4CWCLU5Z.cjs.map → impl-4YFJOKCA.cjs.map} +1 -1
- package/dist/{impl-WMI46UXI.cjs → impl-5RX3NB6C.cjs} +2 -2
- package/dist/{impl-WMI46UXI.cjs.map → impl-5RX3NB6C.cjs.map} +1 -1
- package/dist/{impl-VUAC7AYF.cjs → impl-66CDS7IN.cjs} +2 -2
- package/dist/{impl-VUAC7AYF.cjs.map → impl-66CDS7IN.cjs.map} +1 -1
- package/dist/{impl-542SIWQ2.cjs → impl-ADPBEB3N.cjs} +2 -2
- package/dist/{impl-542SIWQ2.cjs.map → impl-ADPBEB3N.cjs.map} +1 -1
- package/dist/{impl-REKQO7ZI.cjs → impl-B6DTQRYV.cjs} +2 -2
- package/dist/{impl-REKQO7ZI.cjs.map → impl-B6DTQRYV.cjs.map} +1 -1
- package/dist/impl-BHA2L6BP.cjs +2 -0
- package/dist/{impl-V3MXFXZF.cjs.map → impl-BHA2L6BP.cjs.map} +1 -1
- package/dist/impl-BLGX7DMN.cjs +6 -0
- package/dist/impl-BLGX7DMN.cjs.map +1 -0
- package/dist/{impl-XJBUIDZP.cjs → impl-DA7AASRR.cjs} +2 -2
- package/dist/{impl-XJBUIDZP.cjs.map → impl-DA7AASRR.cjs.map} +1 -1
- package/dist/{impl-OQAP7YDW.cjs → impl-EXHOBCQW.cjs} +2 -2
- package/dist/{impl-OQAP7YDW.cjs.map → impl-EXHOBCQW.cjs.map} +1 -1
- package/dist/{impl-D2HENZNO.cjs → impl-FRWZLZ2V.cjs} +2 -2
- package/dist/{impl-D2HENZNO.cjs.map → impl-FRWZLZ2V.cjs.map} +1 -1
- package/dist/impl-GA6T4SCB.cjs +2 -0
- package/dist/impl-GA6T4SCB.cjs.map +1 -0
- package/dist/{impl-RD5UOJY6.cjs → impl-GG3S2VBT.cjs} +2 -2
- package/dist/{impl-RD5UOJY6.cjs.map → impl-GG3S2VBT.cjs.map} +1 -1
- package/dist/impl-GZNNNSYW.cjs +7 -0
- package/dist/{impl-BQNXMBQ4.cjs.map → impl-GZNNNSYW.cjs.map} +1 -1
- package/dist/{impl-5VMEZB7F.cjs → impl-IOS3QLTX.cjs} +2 -2
- package/dist/{impl-5VMEZB7F.cjs.map → impl-IOS3QLTX.cjs.map} +1 -1
- package/dist/{impl-PHBUSAGS.cjs → impl-IQGUF37H.cjs} +2 -2
- package/dist/{impl-PHBUSAGS.cjs.map → impl-IQGUF37H.cjs.map} +1 -1
- package/dist/impl-IZIXOMMN.cjs +2 -0
- package/dist/impl-IZIXOMMN.cjs.map +1 -0
- package/dist/{impl-VT3C6SP4.cjs → impl-J5PWNHKL.cjs} +2 -2
- package/dist/{impl-VT3C6SP4.cjs.map → impl-J5PWNHKL.cjs.map} +1 -1
- package/dist/impl-JI6COVDW.cjs +2 -0
- package/dist/{impl-SRI65ZIC.cjs.map → impl-JI6COVDW.cjs.map} +1 -1
- package/dist/{impl-XLL66FXK.cjs → impl-JY7YM3QH.cjs} +2 -2
- package/dist/{impl-XLL66FXK.cjs.map → impl-JY7YM3QH.cjs.map} +1 -1
- package/dist/{impl-YGVW4RTA.cjs → impl-LKX6OLE2.cjs} +2 -2
- package/dist/{impl-YGVW4RTA.cjs.map → impl-LKX6OLE2.cjs.map} +1 -1
- package/dist/impl-MRC5UI22.cjs +2 -0
- package/dist/impl-MRC5UI22.cjs.map +1 -0
- package/dist/{impl-KQYINEBI.cjs → impl-NW57RBBR.cjs} +2 -2
- package/dist/{impl-KQYINEBI.cjs.map → impl-NW57RBBR.cjs.map} +1 -1
- package/dist/impl-QOCEM2K5.cjs +2 -0
- package/dist/{impl-JSXYZHX4.cjs.map → impl-QOCEM2K5.cjs.map} +1 -1
- package/dist/{impl-K2D3GTZG.cjs → impl-QPLTL2SO.cjs} +2 -2
- package/dist/{impl-K2D3GTZG.cjs.map → impl-QPLTL2SO.cjs.map} +1 -1
- package/dist/impl-R35FW4U7.cjs +9 -0
- package/dist/impl-R35FW4U7.cjs.map +1 -0
- package/dist/{impl-6ANYWCOV.cjs → impl-RMPDHVAH.cjs} +2 -2
- package/dist/{impl-6ANYWCOV.cjs.map → impl-RMPDHVAH.cjs.map} +1 -1
- package/dist/{impl-JQVCW52V.cjs → impl-S64WVKSC.cjs} +2 -2
- package/dist/{impl-JQVCW52V.cjs.map → impl-S64WVKSC.cjs.map} +1 -1
- package/dist/{impl-55GTRVMZ.cjs → impl-SE32ARTN.cjs} +2 -2
- package/dist/{impl-55GTRVMZ.cjs.map → impl-SE32ARTN.cjs.map} +1 -1
- package/dist/{impl-PWYKAVK4.cjs → impl-SSBP4ONX.cjs} +2 -2
- package/dist/{impl-PWYKAVK4.cjs.map → impl-SSBP4ONX.cjs.map} +1 -1
- package/dist/{impl-T67PUM7X.cjs → impl-UA7V6YEM.cjs} +2 -2
- package/dist/{impl-T67PUM7X.cjs.map → impl-UA7V6YEM.cjs.map} +1 -1
- package/dist/{impl-NK42TN4C.cjs → impl-WTGAAEUZ.cjs} +2 -2
- package/dist/{impl-NK42TN4C.cjs.map → impl-WTGAAEUZ.cjs.map} +1 -1
- package/dist/{impl-Q3P6DGHG.cjs → impl-WVOFYJLG.cjs} +2 -2
- package/dist/{impl-Q3P6DGHG.cjs.map → impl-WVOFYJLG.cjs.map} +1 -1
- package/dist/{impl-TCR3Y3J2.cjs → impl-X23VUODX.cjs} +2 -2
- package/dist/{impl-TCR3Y3J2.cjs.map → impl-X23VUODX.cjs.map} +1 -1
- package/dist/{impl-KRJNBGJ6.cjs → impl-XU54KM62.cjs} +2 -2
- package/dist/{impl-KRJNBGJ6.cjs.map → impl-XU54KM62.cjs.map} +1 -1
- package/dist/{impl-A7XL5O4W.cjs → impl-XYHIS7X5.cjs} +2 -2
- package/dist/{impl-A7XL5O4W.cjs.map → impl-XYHIS7X5.cjs.map} +1 -1
- package/dist/{impl-VL3CJ2OT.cjs → impl-Y3MY5EKD.cjs} +2 -2
- package/dist/{impl-VL3CJ2OT.cjs.map → impl-Y3MY5EKD.cjs.map} +1 -1
- package/dist/impl-YIPC6MAR.cjs +6 -0
- package/dist/impl-YIPC6MAR.cjs.map +1 -0
- package/dist/{impl-JFYHXSOV.cjs → impl-Z54SB7SM.cjs} +2 -2
- package/dist/{impl-JFYHXSOV.cjs.map → impl-Z54SB7SM.cjs.map} +1 -1
- package/dist/{impl-GEEPG7OH.cjs → impl-ZTEP5CYM.cjs} +2 -2
- package/dist/{impl-GEEPG7OH.cjs.map → impl-ZTEP5CYM.cjs.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/package.json +2 -2
- package/dist/chunk-52MA7ZLS.cjs +0 -12
- package/dist/chunk-52MA7ZLS.cjs.map +0 -1
- package/dist/chunk-55B57ZAY.cjs +0 -3001
- package/dist/chunk-55B57ZAY.cjs.map +0 -1
- package/dist/chunk-7H4ALAHC.cjs.map +0 -1
- package/dist/chunk-G522ZIHS.cjs +0 -3
- package/dist/chunk-G522ZIHS.cjs.map +0 -1
- package/dist/chunk-HCEZRZHV.cjs +0 -12
- package/dist/chunk-HCEZRZHV.cjs.map +0 -1
- package/dist/chunk-M3Y6JH6I.cjs +0 -2
- package/dist/chunk-M3Y6JH6I.cjs.map +0 -1
- package/dist/chunk-MXT7N555.cjs.map +0 -1
- package/dist/chunk-NC6VWOMN.cjs +0 -2
- package/dist/chunk-NC6VWOMN.cjs.map +0 -1
- package/dist/chunk-Q2RJZGYW.cjs +0 -2
- package/dist/chunk-SKOTYI3A.cjs +0 -4
- package/dist/impl-BQNXMBQ4.cjs +0 -7
- package/dist/impl-CFYRFABZ.cjs +0 -9
- package/dist/impl-CFYRFABZ.cjs.map +0 -1
- package/dist/impl-JSXYZHX4.cjs +0 -2
- package/dist/impl-RI3WQFOE.cjs +0 -6
- package/dist/impl-RI3WQFOE.cjs.map +0 -1
- package/dist/impl-SRI65ZIC.cjs +0 -2
- package/dist/impl-U46BMUFL.cjs +0 -2
- package/dist/impl-U46BMUFL.cjs.map +0 -1
- package/dist/impl-UVQJ7HSK.cjs +0 -6
- package/dist/impl-UVQJ7HSK.cjs.map +0 -1
- package/dist/impl-V3MXFXZF.cjs +0 -2
- package/dist/impl-ZAKPYQ32.cjs +0 -2
- package/dist/impl-ZAKPYQ32.cjs.map +0 -1
- package/dist/impl-ZTYQ3IB5.cjs +0 -2
- package/dist/impl-ZTYQ3IB5.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-Y3MY5EKD.cjs","../src/commands/request/approve/impl.ts"],"names":["approve","auth","actions","origins","silentModeBefore","createdAtBefore","createdAtAfter","transcendUrl","concurrency","doneInputValidation","approvePrivacyRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCiBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAH,CAAAA,CACA,cAAA,CAAgBL,CAAAA,CAChB,IAAA,CAAAD,CAAAA,CACA,cAAA,CAAgBE,CAAAA,CAChB,WAAA,CAAAK,CAAAA,CACA,gBAAA,CAAAJ,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-Y3MY5EKD.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { RequestAction, RequestOrigin } from '@transcend-io/privacy-types';\nimport { approvePrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ApproveCommandFlags {\n auth: string;\n actions: RequestAction[];\n origins?: RequestOrigin[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function approve(\n this: LocalContext,\n {\n auth,\n actions,\n origins,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n transcendUrl,\n concurrency,\n }: ApproveCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await approvePrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestOrigins: origins,\n concurrency,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunkBPOXNSPYcjs = require('./chunk-BPOXNSPY.cjs');var _chunkP5GD5LAKcjs = require('./chunk-P5GD5LAK.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkDQCPGPXGcjs = require('./chunk-DQCPGPXG.cjs');var _chunk7PB6LVSEcjs = require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _path = require('path');var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);async function Y({auth:L,resources:g=_chunkBPOXNSPYcjs.i,file:e,transcendUrl:p,dataSiloIds:d=[],integrationNames:T=[],trackerStatuses:h=_chunkBPOXNSPYcjs.j,pageSize:y,skipDatapoints:S,skipSubDatapoints:$,includeGuessedCategories:A,debug:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let i=await _chunkP5GD5LAKcjs.b.call(void 0, L),C=g.includes("all")?Object.values(_chunk7PB6LVSEcjs.d):g;if(typeof i=="string"){try{let r=_chunk56QKBG2Rcjs.zc.call(void 0, p,i),t=await _chunk56QKBG2Rcjs.ke.call(void 0, r,{dataSiloIds:d,integrationNames:T,resources:C,pageSize:y,debug:s,skipDatapoints:S,skipSubDatapoints:$,includeGuessedCategories:A,trackerStatuses:h});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing configuration to file "${e}"...`)),_chunkJH5HRI6Dcjs.e.call(void 0, e,t)}catch(r){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error occurred syncing the schema: ${s?r.stack:r.message}`)),this.process.exit(1)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced yaml file to disk at ${e}! View at ${_chunkDQCPGPXGcjs.p}`))}else{if(!_fs2.default.lstatSync(e).isDirectory())throw new Error("File is expected to be a folder when passing in a list of API keys to pull from. e.g. --file=./working/");let r=[];await _chunk56QKBG2Rcjs.b.call(void 0, i,async(t,_)=>{let a=`[${_+1}/${i.length}][${t.organizationName}] `;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`~~~
|
|
2
|
+
|
|
3
|
+
${a}Attempting to pull configuration...
|
|
4
|
+
|
|
5
|
+
~~~`));let k=_chunk56QKBG2Rcjs.zc.call(void 0, p,t.apiKey);try{let c=await _chunk56QKBG2Rcjs.ke.call(void 0, k,{dataSiloIds:d,integrationNames:T,resources:C,pageSize:y,debug:s,skipDatapoints:S,skipSubDatapoints:$,includeGuessedCategories:A,trackerStatuses:h}),w=_path.join.call(void 0, e,`${t.organizationName}.yml`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing configuration to file "${w}"...`)),_chunkJH5HRI6Dcjs.e.call(void 0, w,c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`${a}Successfully pulled configuration!`))}catch(c){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to sync configuration. - ${c.message}`)),r.push(t.organizationName)}}),r.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors for "${r.join(",")}". View output above for more information, or check out ${_chunkDQCPGPXGcjs.p}`)),this.process.exit(1))}}exports.pull = Y;
|
|
6
|
+
//# sourceMappingURL=impl-YIPC6MAR.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-YIPC6MAR.cjs","../src/commands/inventory/pull/impl.ts"],"names":["pull","auth","resources","DEFAULT_TRANSCEND_PULL_RESOURCES","file","transcendUrl","dataSiloIds","integrationNames","trackerStatuses","DEFAULT_CONSENT_TRACKER_STATUSES","pageSize","skipDatapoints","skipSubDatapoints","includeGuessedCategories","debug","doneInputValidation","apiKeyOrList","validateTranscendAuth","resourcesToPull","TranscendPullResource","client","buildTranscendGraphQLClient","configuration","pullTranscendConfiguration","logger","colors","writeTranscendYaml","err"],"mappings":"AAAA,iOAAwC,wDAAgD,wDAAyC,gCAA6B,wDAAyC,wDAAyD,gCAA6B,wDAAyC,wDAAyC,wDAAyC,gFCSrY,4BAEE,gEACN,MA0Bf,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAYC,mBAAAA,CACZ,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,CAAC,CAAA,CACf,gBAAA,CAAAC,CAAAA,CAAmB,CAAC,CAAA,CACpB,eAAA,CAAAC,CAAAA,CAAkBC,mBAAAA,CAClB,QAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAe,MAAMC,iCAAAA,CAA0B,CAAA,CAE/CC,CAAAA,CAA2ChB,CAAAA,CAAU,QAAA,CAAS,KAAK,CAAA,CACrE,MAAA,CAAO,MAAA,CAAOiB,mBAAqB,CAAA,CAClCjB,CAAAA,CAGL,EAAA,CAAI,OAAOc,CAAAA,EAAiB,QAAA,CAAU,CACpC,GAAI,CAEF,IAAMI,CAAAA,CAASC,kCAAAA,CAA4BhB,CAAcW,CAAY,CAAA,CAE/DM,CAAAA,CAAgB,MAAMC,kCAAAA,CAA2BH,CAAQ,CAC7D,WAAA,CAAAd,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAWW,CAAAA,CACX,QAAA,CAAAR,CAAAA,CACA,KAAA,CAAAI,CAAAA,CACA,cAAA,CAAAH,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAL,CACF,CAAC,CAAA,CAEDgB,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,+BAAA,EAAkCrB,CAAI,CAAA,IAAA,CAAM,CAAC,CAAA,CACxEsB,iCAAAA,CAAmBtB,CAAMkB,CAAa,CACxC,CAAA,KAAA,CAASK,CAAAA,CAAK,CACZH,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,sCAAA,EACEX,CAAAA,CAAQa,CAAAA,CAAI,KAAA,CAAQA,CAAAA,CAAI,OAC1B,CAAA,CAAA;AA0BA;AAAgB;AAAA;AAiD1B,GAAA","file":"/home/runner/work/cli/cli/dist/impl-YIPC6MAR.cjs","sourcesContent":[null,"import { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport type { LocalContext } from '../../../context';\nimport { TranscendPullResource } from '../../../enums';\nimport {\n DEFAULT_CONSENT_TRACKER_STATUSES,\n DEFAULT_TRANSCEND_PULL_RESOURCES,\n} from './command';\n\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { mapSeries } from '../../../lib/bluebird';\nimport { join } from 'node:path';\nimport fs from 'node:fs';\nimport {\n buildTranscendGraphQLClient,\n pullTranscendConfiguration,\n} from '../../../lib/graphql';\n\nimport { writeTranscendYaml } from '../../../lib/readTranscendYaml';\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface PullCommandFlags {\n auth: string;\n resources?: (TranscendPullResource | 'all')[];\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n integrationNames?: string[];\n trackerStatuses?: ConsentTrackerStatus[];\n pageSize: number;\n skipDatapoints: boolean;\n skipSubDatapoints: boolean;\n includeGuessedCategories: boolean;\n debug: boolean;\n}\n\nexport async function pull(\n this: LocalContext,\n {\n auth,\n resources = DEFAULT_TRANSCEND_PULL_RESOURCES,\n file,\n transcendUrl,\n dataSiloIds = [],\n integrationNames = [],\n trackerStatuses = DEFAULT_CONSENT_TRACKER_STATUSES,\n pageSize,\n skipDatapoints,\n skipSubDatapoints,\n includeGuessedCategories,\n debug,\n }: PullCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n const resourcesToPull: TranscendPullResource[] = resources.includes('all')\n ? Object.values(TranscendPullResource)\n : (resources as TranscendPullResource[]);\n\n // Sync to Disk\n if (typeof apiKeyOrList === 'string') {\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKeyOrList);\n\n const configuration = await pullTranscendConfiguration(client, {\n dataSiloIds,\n integrationNames,\n resources: resourcesToPull,\n pageSize,\n debug,\n skipDatapoints,\n skipSubDatapoints,\n includeGuessedCategories,\n trackerStatuses,\n });\n\n logger.info(colors.magenta(`Writing configuration to file \"${file}\"...`));\n writeTranscendYaml(file, configuration);\n } catch (err) {\n logger.error(\n colors.red(\n `An error occurred syncing the schema: ${\n debug ? err.stack : err.message\n }`,\n ),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to disk at ${file}! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n } else {\n if (!fs.lstatSync(file).isDirectory()) {\n throw new Error(\n 'File is expected to be a folder when passing in a list of API keys to pull from. e.g. --file=./working/',\n );\n }\n\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to pull configuration...\\n\\n~~~`,\n ),\n );\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKey.apiKey);\n\n try {\n const configuration = await pullTranscendConfiguration(client, {\n dataSiloIds,\n integrationNames,\n resources: resourcesToPull,\n pageSize,\n debug,\n skipDatapoints,\n skipSubDatapoints,\n includeGuessedCategories,\n trackerStatuses,\n });\n\n const filePath = join(file, `${apiKey.organizationName}.yml`);\n logger.info(\n colors.magenta(`Writing configuration to file \"${filePath}\"...`),\n );\n writeTranscendYaml(filePath, configuration);\n\n logger.info(\n colors.green(`${prefix}Successfully pulled configuration!`),\n );\n } catch (err) {\n logger.error(\n colors.red(`${prefix}Failed to sync configuration. - ${err.message}`),\n );\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n }\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkPGO2YKRXcjs = require('./chunk-PGO2YKRX.cjs');require('./chunk-D3VRD5F5.cjs');var _chunkP5GD5LAKcjs = require('./chunk-P5GD5LAK.cjs');require('./chunk-ABKDAPPR.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function L({auth:d,xdiLocation:c,file:o,removeIpAddresses:l,domainBlockList:i,xdiAllowedCommands:a,transcendUrl:m}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let p=await _chunkP5GD5LAKcjs.b.call(void 0, d),{syncGroups:f,html:u}=await _chunkPGO2YKRXcjs.g.call(void 0, p,{xdiLocation:c,transcendUrl:m,removeIpAddresses:l,domainBlockList:i.length>0?i:void 0,xdiAllowedCommands:a});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(f,null,2)}`)),_fs.writeFileSync.call(void 0, o,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Wrote configuration to file "${o}"!`))}exports.buildXdiSyncEndpoint = L;
|
|
2
|
+
//# sourceMappingURL=impl-Z54SB7SM.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-Z54SB7SM.cjs","../src/commands/consent/build-xdi-sync-endpoint/impl.ts"],"names":["buildXdiSyncEndpoint","auth","xdiLocation","file","removeIpAddresses","domainBlockList","xdiAllowedCommands","transcendUrl","doneInputValidation","apiKeyOrList","validateTranscendAuth","syncGroups","html","logger","colors"],"mappings":"AAAA,iOAAwC,gCAA6B,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCE9T,wBACW,MAe9B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAe,MAAMC,iCAAAA,CAA0B,CAAA,CAG/C,CAAE,UAAA,CAAAC,CAAAA,CAAY,IAAA,CAAAC,CAAK,CAAA,CAAI,MAAMZ,iCAAAA,CAA2BS,CAAc,CAC1E,WAAA,CAAAP,CAAAA,CACA,YAAA,CAAAK,CAAAA,CACA,iBAAA,CAAAH,CAAAA,CACA,eAAA,CAAiBC,CAAAA,CAAgB,MAAA,CAAS,CAAA,CAAIA,CAAAA,CAAkB,KAAA,CAAA,CAChE,kBAAA,CAAAC,CACF,CAAC,CAAA,CAGDO,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,wDAAA,EAA2D,IAAA,CAAK,SAAA,CAC9DH,CAAAA,CACA,IAAA,CACA,CACF,CAAC,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-Z54SB7SM.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { writeFileSync } from 'node:fs';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { buildXdiSyncEndpoint as buildXdiSyncEndpointHelper } from '../../../lib/consent-manager';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface BuildXdiSyncEndpointCommandFlags {\n auth: string;\n xdiLocation: string;\n file: string;\n removeIpAddresses: boolean;\n domainBlockList: string[];\n xdiAllowedCommands: string;\n transcendUrl: string;\n}\n\nexport async function buildXdiSyncEndpoint(\n this: LocalContext,\n {\n auth,\n xdiLocation,\n file,\n removeIpAddresses,\n domainBlockList,\n xdiAllowedCommands,\n transcendUrl,\n }: BuildXdiSyncEndpointCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Build the sync endpoint\n const { syncGroups, html } = await buildXdiSyncEndpointHelper(apiKeyOrList, {\n xdiLocation,\n transcendUrl,\n removeIpAddresses,\n domainBlockList: domainBlockList.length > 0 ? domainBlockList : undefined,\n xdiAllowedCommands,\n });\n\n // Log success\n logger.info(\n colors.green(\n `Successfully constructed sync endpoint for sync groups: ${JSON.stringify(\n syncGroups,\n null,\n 2,\n )}`,\n ),\n );\n\n // Write to disk\n writeFileSync(file, html);\n logger.info(colors.green(`Wrote configuration to file \"${file}\"!`));\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk22KX2NM4cjs = require('./chunk-22KX2NM4.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');require('./chunk-TSJTXXLZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-DQCPGPXG.cjs');require('./chunk-7PB6LVSE.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function q(){let e=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${e}] ready pid=${process.pid}`),_optionalChain([process, 'access', _ => _.send, 'optionalCall', _2 => _2({type:"ready"})]),process.on("message",async o=>{if(!o||typeof o!="object"||(o.type==="shutdown"&&process.exit(0),o.type!=="task"))return;let{filePath:t,options:p}=o.payload,{outputDir:u,clearOutputDir:i}=p;try{_chunkZUNVPK23cjs.a.info(`[w${e}] processing ${t}`),await _chunk56QKBG2Rcjs.gg.call(void 0, {filePath:t,outputDir:u,clearOutputDir:i,onProgress:(s,n)=>_optionalChain([process, 'access', _3 => _3.send, 'optionalCall', _4 => _4({type:"progress",payload:{filePath:t,processed:s,total:n}})])}),_optionalChain([process, 'access', _5 => _5.send, 'optionalCall', _6 => _6({type:"result",payload:{ok:!0,filePath:t}})])}catch(s){let n=_chunk56QKBG2Rcjs._f.call(void 0, s);_chunkZUNVPK23cjs.a.error(`[w${e}] ERROR ${t}: ${s.stack||n}`),_optionalChain([process, 'access', _7 => _7.send, 'optionalCall', _8 => _8({type:"result",payload:{ok:!1,filePath:t,error:n}})])}}),await new Promise(()=>{})}function R(e){return _chunk22KX2NM4cjs.d.call(void 0, e)}function $(e){return _chunk22KX2NM4cjs.e.call(void 0, e)}var v={renderHeader:R,renderWorkers:$};function O(){return typeof __filename<"u"?__filename:process.argv[1]}async function N(e){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{directory:o,outputDir:t,clearOutputDir:p,concurrency:u,viewerMode:i}=e,s=_chunk56QKBG2Rcjs.fg.call(void 0, o,this),{poolSize:n,cpuCount:d}=_chunk22KX2NM4cjs.a.call(void 0, u,s.length);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Converting ${s.length} Parquet file(s) \u2192 CSV with pool size ${n} (CPU=${d})`));let w=s.map(r=>({filePath:r,options:{outputDir:t,clearOutputDir:p}})),b={nextTask:()=>w.shift(),taskLabel:r=>r.filePath,initTotals:()=>({}),initSlotProgress:()=>{},onProgress:r=>r,onResult:(r,l)=>({totals:r,ok:!!l.ok}),postProcess:async()=>{}};await _chunk22KX2NM4cjs.f.call(void 0, {title:`Parquet \u2192 CSV - ${o}`,baseDir:o||t||process.cwd(),childFlag:_chunk22KX2NM4cjs.b,childModulePath:O(),poolSize:n,cpuCount:d,filesTotal:s.length,hooks:b,viewerMode:i,render:r=>_chunk22KX2NM4cjs.c.call(void 0, r,v,i),extraKeyHandler:({logsBySlot:r,repaint:l,setPaused:D})=>_chunk22KX2NM4cjs.g.call(void 0, {logsBySlot:r,repaint:l,setPaused:D})})}process.argv.includes(_chunk22KX2NM4cjs.b)&&q().catch(e=>{_chunkZUNVPK23cjs.a.error(e),process.exit(1)});exports.parquetToCsv = N;
|
|
2
|
+
//# sourceMappingURL=impl-ZTEP5CYM.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-ZTEP5CYM.cjs","../src/commands/admin/parquet-to-csv/impl.ts","../src/commands/admin/parquet-to-csv/worker.ts"],"names":["runChild","workerId","logger"],"mappings":"AAAA,quBAAkF,wDAAyC,wDAA0D,gCAA6B,wDAAoC,gCAA6B,gCAA6B,gFCC7R,MCgCnB,SAAsBA,CAAAA,CAAAA,CAA0B,CAC9C,IAAMC,CAAAA,CAAW,MAAA,CAAO,OAAA,CAAQ,GAAA,CAAI,SAAA,EAAa,GAAG,CAAA,CACpDC,mBAAAA,CAAO,IAAA,CAAK,CAAA,EAAA,EAAKD,CAAQ,CAAA,YAAA,EAAe,OAAA,CAAQ,GAAG,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-ZTEP5CYM.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { collectParquetFilesOrExit } from '../../../lib/helpers';\nimport {\n computePoolSize,\n createExtraKeyHandler,\n CHILD_FLAG,\n type PoolHooks,\n runPool,\n dashboardPlugin,\n} from '../../../lib/pooling';\nimport {\n runChild,\n type ParquetProgress,\n type ParquetResult,\n type ParquetTask,\n} from './worker';\nimport { parquetToCsvPlugin } from './ui';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Returns the current module's path so the worker pool knows what file to re-exec.\n * In Node ESM, __filename is undefined, so we fall back to argv[1].\n *\n * @returns The current module's path.\n */\nfunction getCurrentModulePath(): string {\n if (typeof __filename !== 'undefined') {\n return __filename as unknown as string;\n }\n return process.argv[1];\n}\n\n/** No custom totals for the header; the runner’s built-ins suffice. */\ntype Totals = Record<string, never>;\n\nexport type ParquetToCsvCommandFlags = {\n directory: string;\n outputDir?: string;\n clearOutputDir: boolean;\n concurrency?: number;\n viewerMode: boolean;\n};\n\n/**\n * Convert all Parquet files in a directory to CSV, in parallel.\n *\n * @param flags - The command flags.\n */\nexport async function parquetToCsv(\n this: LocalContext,\n flags: ParquetToCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n const { directory, outputDir, clearOutputDir, concurrency, viewerMode } =\n flags;\n\n /* 1) Discover .parquet inputs */\n const files = collectParquetFilesOrExit(directory, this);\n\n /* 2) Size the pool */\n const { poolSize, cpuCount } = computePoolSize(concurrency, files.length);\n\n logger.info(\n colors.green(\n `Converting ${files.length} Parquet file(s) → CSV with pool size ${poolSize} (CPU=${cpuCount})`,\n ),\n );\n\n /* 3) Build FIFO queue of tasks (one per file) */\n const queue = files.map<ParquetTask>((filePath) => ({\n filePath,\n options: { outputDir, clearOutputDir },\n }));\n\n /* 4) Pool hooks */\n const hooks: PoolHooks<ParquetTask, ParquetProgress, ParquetResult, Totals> =\n {\n nextTask: () => queue.shift(),\n taskLabel: (t) => t.filePath,\n initTotals: () => ({} as Totals),\n initSlotProgress: () => undefined,\n onProgress: (totals) => totals,\n onResult: (totals, res) => ({ totals, ok: !!res.ok }),\n postProcess: async () => {\n // nothing special post-run\n },\n };\n\n /* 5) Launch the pool runner with custom dashboard plugin */\n await runPool({\n title: `Parquet → CSV - ${directory}`,\n baseDir: directory || outputDir || process.cwd(),\n childFlag: CHILD_FLAG,\n childModulePath: getCurrentModulePath(),\n poolSize,\n cpuCount,\n filesTotal: files.length,\n hooks,\n viewerMode,\n render: (input) => dashboardPlugin(input, parquetToCsvPlugin, viewerMode),\n extraKeyHandler: ({ logsBySlot, repaint, setPaused }) =>\n createExtraKeyHandler({ logsBySlot, repaint, setPaused }),\n });\n}\n\n/* -------------------------------------------------------------------------------------------------\n * If invoked directly as a child process, enter worker loop\n * ------------------------------------------------------------------------------------------------- */\nif (process.argv.includes(CHILD_FLAG)) {\n runChild().catch((err) => {\n logger.error(err);\n process.exit(1);\n });\n}\n","import { parquetToCsvOneFile, extractErrorMessage } from '../../../lib/helpers';\nimport type { ToWorker } from '../../../lib/pooling';\nimport { logger } from '../../../logger';\n\nexport type ParquetTask = {\n /** Absolute path of the Parquet file to convert. */\n filePath: string;\n options: {\n /** Optional directory where CSV output files should be written. */\n outputDir?: string;\n /** Whether to clear any pre-existing output before writing new ones. */\n clearOutputDir: boolean;\n };\n};\n\nexport type ParquetProgress = {\n /** File being processed by the worker. */\n filePath: string;\n /** Rows processed so far. */\n processed: number;\n /** Optional known total rows (not always available). */\n total?: number;\n};\n\nexport type ParquetResult = {\n ok: boolean;\n filePath: string;\n error?: string;\n};\n\n/**\n * Worker loop: convert a single Parquet file to one or more CSV files.\n */\nexport async function runChild(): Promise<void> {\n const workerId = Number(process.env.WORKER_ID || '0');\n logger.info(`[w${workerId}] ready pid=${process.pid}`);\n process.send?.({ type: 'ready' });\n\n process.on('message', async (msg: ToWorker<ParquetTask>) => {\n if (!msg || typeof msg !== 'object') return;\n\n if (msg.type === 'shutdown') {\n process.exit(0);\n }\n if (msg.type !== 'task') return;\n\n const { filePath, options } = msg.payload;\n const { outputDir, clearOutputDir } = options;\n\n try {\n logger.info(`[w${workerId}] processing ${filePath}`);\n await parquetToCsvOneFile({\n filePath,\n outputDir,\n clearOutputDir,\n onProgress: (processed, total) =>\n process.send?.({\n type: 'progress',\n payload: { filePath, processed, total },\n }),\n });\n\n process.send?.({\n type: 'result',\n payload: { ok: true, filePath },\n });\n } catch (err) {\n const message = extractErrorMessage(err);\n logger.error(`[w${workerId}] ERROR ${filePath}: ${err.stack || message}`);\n process.send?.({\n type: 'result',\n payload: { ok: false, filePath, error: message },\n });\n }\n });\n\n // keep alive until shutdown\n await new Promise<never>(() => {\n // Do nothing\n });\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunkG522ZIHScjs = require('./chunk-G522ZIHS.cjs');var _chunkQ2RJZGYWcjs = require('./chunk-Q2RJZGYW.cjs');var _chunk7H4ALAHCcjs = require('./chunk-7H4ALAHC.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunk52MA7ZLScjs = require('./chunk-52MA7ZLS.cjs');var _chunkM3Y6JH6Icjs = require('./chunk-M3Y6JH6I.cjs');var _chunkNC6VWOMNcjs = require('./chunk-NC6VWOMN.cjs');var _chunkABKDAPPRcjs = require('./chunk-ABKDAPPR.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');var _chunkTSJTXXLZcjs = require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkXXFLFF7Qcjs = require('./chunk-XXFLFF7Q.cjs');var _chunk7PB6LVSEcjs = require('./chunk-7PB6LVSE.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function D(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunk55B57ZAYcjs.ug.call(void 0, a,_chunk55B57ZAYcjs.Gb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}var _bluebird = require('bluebird');function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function ec(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},B= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkXXFLFF7Qcjs.r,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunk55B57ZAYcjs.xc.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkXXFLFF7Qcjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunk55B57ZAYcjs.Dd.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),D(this.graphQLClient),_chunk55B57ZAYcjs.Hc.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkXXFLFF7Qcjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkXXFLFF7Qcjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkXXFLFF7Qcjs.e.call(void 0, o.prompts,"title"),c=_chunkXXFLFF7Qcjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunk55B57ZAYcjs.Hc.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunk55B57ZAYcjs.Ed.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkXXFLFF7Qcjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkXXFLFF7Qcjs.b.call(void 0, t,50),i=[];return await _bluebird.mapSeries.call(void 0, o,async p=>{let m=await _chunk55B57ZAYcjs.Hc.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunk55B57ZAYcjs.Fc.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunk55B57ZAYcjs.je.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunk55B57ZAYcjs.je.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunk55B57ZAYcjs.je.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function nc(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function oc(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function cc({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunk6TKTYQIFcjs = require('./chunk-6TKTYQIF.cjs');var _chunkIHUCIK5Tcjs = require('./chunk-IHUCIK5T.cjs');var _chunkLQUVB4MIcjs = require('./chunk-LQUVB4MI.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkJH5HRI6Dcjs = require('./chunk-JH5HRI6D.cjs');var _chunkPGO2YKRXcjs = require('./chunk-PGO2YKRX.cjs');var _chunkD3VRD5F5cjs = require('./chunk-D3VRD5F5.cjs');var _chunkP5GD5LAKcjs = require('./chunk-P5GD5LAK.cjs');var _chunkABKDAPPRcjs = require('./chunk-ABKDAPPR.cjs');var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');var _chunkTSJTXXLZcjs = require('./chunk-TSJTXXLZ.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkDQCPGPXGcjs = require('./chunk-DQCPGPXG.cjs');var _chunk7PB6LVSEcjs = require('./chunk-7PB6LVSE.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function $(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunk56QKBG2Rcjs.wg.call(void 0, a,_chunk56QKBG2Rcjs.Ib,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function ec(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},F= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkDQCPGPXGcjs.r,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunk56QKBG2Rcjs.zc.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkDQCPGPXGcjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunk56QKBG2Rcjs.Fd.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),$(this.graphQLClient),_chunk56QKBG2Rcjs.Jc.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkDQCPGPXGcjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkDQCPGPXGcjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkDQCPGPXGcjs.e.call(void 0, o.prompts,"title"),c=_chunkDQCPGPXGcjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunk56QKBG2Rcjs.Jc.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunk56QKBG2Rcjs.Gd.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkDQCPGPXGcjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkDQCPGPXGcjs.b.call(void 0, t,50),i=[];return await _chunk56QKBG2Rcjs.b.call(void 0, o,async p=>{let m=await _chunk56QKBG2Rcjs.Jc.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunk56QKBG2Rcjs.Hc.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunk56QKBG2Rcjs.le.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunk56QKBG2Rcjs.le.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunk56QKBG2Rcjs.le.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function nc(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function oc(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function cc({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
|
|
2
2
|
`)[0],i=_child_process.execSync.call(void 0, "git rev-parse HEAD",{encoding:"utf-8"}).split(`
|
|
3
|
-
`)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=
|
|
4
|
-
`).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let F=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=F});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunk55B57ZAYcjs.ub; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunk55B57ZAYcjs.Ha; exports.ADD_SILO_DISCOVERY_RESULTS = _chunk55B57ZAYcjs.H; exports.ADMIN_DASH = _chunkXXFLFF7Qcjs.o; exports.ADMIN_DASH_DATAPOINTS = _chunkXXFLFF7Qcjs.q; exports.ADMIN_DASH_INTEGRATIONS = _chunkXXFLFF7Qcjs.p; exports.AGENTS = _chunk55B57ZAYcjs.Hb; exports.AGENT_FILES = _chunk55B57ZAYcjs.Kb; exports.AGENT_FUNCTIONS = _chunk55B57ZAYcjs.Nb; exports.API_KEYS = _chunk55B57ZAYcjs.D; exports.APPROVE_PRIVACY_REQUEST = _chunk55B57ZAYcjs.X; exports.ASSESSMENTS = _chunk55B57ZAYcjs.fa; exports.ASSESSMENT_SECTION_FIELDS = _chunk55B57ZAYcjs.ea; exports.ASSESSMENT_TEMPLATES = _chunk55B57ZAYcjs.ja; exports.ASSUME_ROLE = _chunk55B57ZAYcjs.Fb; exports.ATTRIBUTES = _chunk55B57ZAYcjs.La; exports.ATTRIBUTE_KEYS_REQUESTS = _chunk55B57ZAYcjs.M; exports.ATTRIBUTE_VALUES = _chunk55B57ZAYcjs.Pa; exports.ActionInput = _chunkABKDAPPRcjs.G; exports.ActionItemCollectionInput = _chunkABKDAPPRcjs.R; exports.ActionItemInput = _chunkABKDAPPRcjs.S; exports.AgentFileInput = _chunkABKDAPPRcjs.o; exports.AgentFunctionInput = _chunkABKDAPPRcjs.n; exports.AgentInput = _chunkABKDAPPRcjs.m; exports.ApiKeyInput = _chunkABKDAPPRcjs.c; exports.AssessmentAction = _chunk55B57ZAYcjs.Sd; exports.AssessmentAnswerOptionInput = _chunkABKDAPPRcjs.Y; exports.AssessmentDisplayLogicInput = _chunkABKDAPPRcjs.V; exports.AssessmentInput = _chunkABKDAPPRcjs.ca; exports.AssessmentNestedRule = _chunk55B57ZAYcjs.Rd; exports.AssessmentNestedRuleInput = _chunkABKDAPPRcjs.U; exports.AssessmentResourceInput = _chunkABKDAPPRcjs.ba; exports.AssessmentRetentionScheduleInput = _chunkABKDAPPRcjs.$; exports.AssessmentRiskLogic = _chunk55B57ZAYcjs.Ud; exports.AssessmentRule = _chunk55B57ZAYcjs.Qd; exports.AssessmentRuleInput = _chunkABKDAPPRcjs.T; exports.AssessmentRuleWithOperands = _chunk55B57ZAYcjs.Od; exports.AssessmentRuleWithoutOperands = _chunk55B57ZAYcjs.Pd; exports.AssessmentSectionInput = _chunkABKDAPPRcjs._; exports.AssessmentSectionQuestionInput = _chunkABKDAPPRcjs.Z; exports.AssessmentTemplateInput = _chunkABKDAPPRcjs.aa; exports.AttestedExtraIdentifiers = _chunk55B57ZAYcjs.sf; exports.AttributeInput = _chunkABKDAPPRcjs.k; exports.AttributePreview = _chunkABKDAPPRcjs.l; exports.AttributeValueInput = _chunkABKDAPPRcjs.j; exports.BLANK = _chunk55B57ZAYcjs.ec; exports.BULK_APPLY = _chunk55B57ZAYcjs.dc; exports.BULK_REQUEST_FILES = _chunk55B57ZAYcjs.Fa; exports.BUSINESS_ENTITIES = _chunk55B57ZAYcjs.rb; exports.BusinessEntityInput = _chunkABKDAPPRcjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunk55B57ZAYcjs.Y; exports.CAN_APPLY_IN_BULK = _chunk55B57ZAYcjs.ic; exports.CATALOGS = _chunk55B57ZAYcjs.r; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunk55B57ZAYcjs.va; exports.CODE_PACKAGES = _chunk55B57ZAYcjs.Q; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunk55B57ZAYcjs.qb; exports.CONSENT_PARTITIONS = _chunk55B57ZAYcjs.Ua; exports.COOKIES = _chunk55B57ZAYcjs.Za; exports.CREATE_ACTION_ITEMS = _chunk55B57ZAYcjs.yb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunk55B57ZAYcjs.Ja; exports.CREATE_AGENT = _chunk55B57ZAYcjs.Ib; exports.CREATE_AGENT_FILE = _chunk55B57ZAYcjs.Lb; exports.CREATE_AGENT_FUNCTION = _chunk55B57ZAYcjs.Ob; exports.CREATE_API_KEY = _chunk55B57ZAYcjs.E; exports.CREATE_ATTRIBUTE = _chunk55B57ZAYcjs.Qa; exports.CREATE_ATTRIBUTE_VALUES = _chunk55B57ZAYcjs.Ma; exports.CREATE_BUSINESS_ENTITY = _chunk55B57ZAYcjs.sb; exports.CREATE_CODE_PACKAGE = _chunk55B57ZAYcjs.S; exports.CREATE_CONSENT_EXPERIENCE = _chunk55B57ZAYcjs.ob; exports.CREATE_CONSENT_MANAGER = _chunk55B57ZAYcjs.bb; exports.CREATE_CONSENT_PARTITION = _chunk55B57ZAYcjs.pb; exports.CREATE_DATA_FLOWS = _chunk55B57ZAYcjs.Va; exports.CREATE_DATA_SILOS = _chunk55B57ZAYcjs.m; exports.CREATE_DATA_SUBJECT = _chunk55B57ZAYcjs.x; exports.CREATE_DATA_SUB_CATEGORY = _chunk55B57ZAYcjs.Ub; exports.CREATE_ENRICHER = _chunk55B57ZAYcjs.p; exports.CREATE_IDENTIFIER = _chunk55B57ZAYcjs.u; exports.CREATE_PREFERENCE_ACCESS_TOKENS = _chunk55B57ZAYcjs.G; exports.CREATE_PROCESSING_ACTIVITY = _chunk55B57ZAYcjs._b; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunk55B57ZAYcjs.Xb; exports.CREATE_PROMPT = _chunk55B57ZAYcjs.pa; exports.CREATE_PROMPT_GROUP = _chunk55B57ZAYcjs.ta; exports.CREATE_PROMPT_PARTIAL = _chunk55B57ZAYcjs.ra; exports.CREATE_REPOSITORY = _chunk55B57ZAYcjs.C; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunk55B57ZAYcjs.P; exports.CREATE_TEAM = _chunk55B57ZAYcjs.za; exports.CREATE_TEMPLATE = _chunk55B57ZAYcjs.K; exports.CREATE_VENDOR = _chunk55B57ZAYcjs.Rb; exports.CachedFileState = _chunk55B57ZAYcjs.jc; exports.CachedRequestState = _chunk55B57ZAYcjs.lc; exports.CodePackageInput = _chunkABKDAPPRcjs.D; exports.CodePackageSdk = _chunkABKDAPPRcjs.C; exports.ColumnName = _chunk55B57ZAYcjs.gc; exports.ConsentManageExperienceInput = _chunkABKDAPPRcjs.K; exports.ConsentManagerInput = _chunkABKDAPPRcjs.M; exports.ConsentManagerMetricBin = _chunk55B57ZAYcjs.Tc; exports.ConsentManagerServiceMetadata = _chunkABKDAPPRcjs.la; exports.ConsentPreferenceTopic = _chunkABKDAPPRcjs.ea; exports.ConsentPreferenceTopicOptionValue = _chunkABKDAPPRcjs.da; exports.ConsentPurpose = _chunkABKDAPPRcjs.fa; exports.CookieCsvInput = _chunkABKDAPPRcjs.ka; exports.CookieInput = _chunkABKDAPPRcjs.J; exports.CronIdentifier = _chunkQ2RJZGYWcjs.a; exports.CronIdentifierPush = _chunkQ2RJZGYWcjs.c; exports.DATAPOINT_EXPORT = _chunk55B57ZAYcjs.g; exports.DATA_FLOWS = _chunk55B57ZAYcjs.Ya; exports.DATA_POINTS = _chunk55B57ZAYcjs.a; exports.DATA_POINT_COUNT = _chunk55B57ZAYcjs.b; exports.DATA_SILOS = _chunk55B57ZAYcjs.i; exports.DATA_SILOS_ENRICHED = _chunk55B57ZAYcjs.k; exports.DATA_SILO_EXPORT = _chunk55B57ZAYcjs.j; exports.DATA_SUBJECTS = _chunk55B57ZAYcjs.w; exports.DATA_SUB_CATEGORIES = _chunk55B57ZAYcjs.Tb; exports.DAY_MS = _chunk55B57ZAYcjs.fg; exports.DEBUG = _chunkXXFLFF7Qcjs.z; exports.DEFAULT_TRANSCEND_API = _chunkXXFLFF7Qcjs.r; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkXXFLFF7Qcjs.s; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunk55B57ZAYcjs.he; exports.DELETE_API_KEY = _chunk55B57ZAYcjs.F; exports.DELETE_ATTRIBUTE_VALUE = _chunk55B57ZAYcjs.Oa; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunk55B57ZAYcjs.Ab; exports.DEPLOY_CONSENT_MANAGER = _chunk55B57ZAYcjs.eb; exports.DETERMINE_LOGIN_METHOD = _chunk55B57ZAYcjs.Db; exports.DataCategoryGuessInput = _chunkABKDAPPRcjs.h; exports.DataCategoryInput = _chunkABKDAPPRcjs.q; exports.DataCategoryPreviewInput = _chunkABKDAPPRcjs.g; exports.DataCategoryRecommendationInput = _chunkABKDAPPRcjs.i; exports.DataFlowCsvInput = _chunkABKDAPPRcjs.ja; exports.DataFlowInput = _chunkABKDAPPRcjs.I; exports.DataSiloInput = _chunkABKDAPPRcjs.Q; exports.DataSubjectInput = _chunkABKDAPPRcjs.F; exports.DatapointInput = _chunkABKDAPPRcjs.w; exports.ENABLED_PLUGINS = _chunk55B57ZAYcjs.I; exports.ENRICHERS = _chunk55B57ZAYcjs.n; exports.ENTRY_COUNT = _chunk55B57ZAYcjs.h; exports.EXPERIENCES = _chunk55B57ZAYcjs.Ta; exports.EnrichPrivacyRequest = _chunkG522ZIHScjs.b; exports.EnricherInput = _chunkABKDAPPRcjs.e; exports.FETCH_CONSENT_MANAGER = _chunk55B57ZAYcjs.$a; exports.FETCH_CONSENT_MANAGER_ID = _chunk55B57ZAYcjs._a; exports.FETCH_CONSENT_MANAGER_THEME = _chunk55B57ZAYcjs.ab; exports.FETCH_PRIVACY_CENTER_ID = _chunk55B57ZAYcjs.zb; exports.FIVE_MIN_MS = _chunk55B57ZAYcjs.hg; exports.FieldInput = _chunkABKDAPPRcjs.v; exports.GLOBAL_ACTION_ITEMS = _chunk55B57ZAYcjs.wb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunk55B57ZAYcjs.Ia; exports.HOUR_MS = _chunk55B57ZAYcjs.gg; exports.IDENTIFIERS = _chunk55B57ZAYcjs.s; exports.IDENTIFIER_BLOCK_LIST = _chunk55B57ZAYcjs.fc; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunk55B57ZAYcjs.ga; exports.INITIALIZER = _chunk55B57ZAYcjs.o; exports.IP_ADDRESS_REGEX = _chunk52MA7ZLScjs.f; exports.IS_REQUIRED = _chunk55B57ZAYcjs.hc; exports.IdentifierInput = _chunkABKDAPPRcjs.H; exports.ImportOnetrustAssessmentsInput = _chunkABKDAPPRcjs.sa; exports.IntlMessage = _chunk55B57ZAYcjs.wf; exports.IntlMessageInput = _chunkABKDAPPRcjs.P; exports.LARGE_LANGUAGE_MODELS = _chunk55B57ZAYcjs.Gb; exports.LOGIN = _chunk55B57ZAYcjs.Eb; exports.MESSAGES = _chunk55B57ZAYcjs.$; exports.NEW_IDENTIFIER_TYPES = _chunk55B57ZAYcjs.t; exports.NONE = _chunk55B57ZAYcjs.cc; exports.NOTIFY_ADDITIONAL_TIME = _chunk55B57ZAYcjs._; exports.ORGANIZATION = _chunk55B57ZAYcjs.L; exports.OneTrustFileFormat = _chunk7PB6LVSEcjs.a; exports.OneTrustPullResource = _chunk7PB6LVSEcjs.b; exports.OneTrustPullSource = _chunk7PB6LVSEcjs.c; exports.OpenAIEnabledRoute = _chunkABKDAPPRcjs.na; exports.OpenAIEnabledRoutes = _chunkABKDAPPRcjs.oa; exports.OpenAIIntegration = _chunkABKDAPPRcjs.pa; exports.OpenAIRouteName = _chunk7PB6LVSEcjs.f; exports.POLICIES = _chunk55B57ZAYcjs.U; exports.PREFERENCE_TOPICS = _chunk55B57ZAYcjs.ia; exports.PRIVACY_CENTER = _chunk55B57ZAYcjs.Bb; exports.PROCESSING_ACTIVITIES = _chunk55B57ZAYcjs.Zb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunk55B57ZAYcjs.Wb; exports.PROMPTS = _chunk55B57ZAYcjs.ka; exports.PROMPTS_WITH_VARIABLES = _chunk55B57ZAYcjs.na; exports.PROMPT_GROUPS = _chunk55B57ZAYcjs.ma; exports.PROMPT_PARTIALS = _chunk55B57ZAYcjs.la; exports.PROMPT_THREADS = _chunk55B57ZAYcjs.T; exports.PURPOSES = _chunk55B57ZAYcjs.ha; exports.ParsedAttributeInput = _chunk55B57ZAYcjs.qc; exports.PartitionInput = _chunkABKDAPPRcjs.L; exports.PathfinderPolicy = _chunkABKDAPPRcjs.qa; exports.PathfinderPolicyName = _chunk7PB6LVSEcjs.e; exports.PathfinderPolicyNameC = _chunkABKDAPPRcjs.ma; exports.PathfinderPromptRunMetadata = _chunkABKDAPPRcjs.ra; exports.PolicyInput = _chunkABKDAPPRcjs.O; exports.PrivacyCenterInput = _chunkABKDAPPRcjs.N; exports.PrivacyRequest = _chunk55B57ZAYcjs.nd; exports.PrivacyRequestInput = _chunk55B57ZAYcjs.tf; exports.PrivacyRequestResponse = _chunk55B57ZAYcjs.Cf; exports.ProcessingActivityInput = _chunkABKDAPPRcjs.A; exports.ProcessingPurposeInput = _chunkABKDAPPRcjs.r; exports.ProcessingPurposePreviewInput = _chunkABKDAPPRcjs.f; exports.PromptAVendorEmailSettings = _chunkABKDAPPRcjs.x; exports.PromptGroupInput = _chunkABKDAPPRcjs.u; exports.PromptInput = _chunkABKDAPPRcjs.s; exports.PromptPartialInput = _chunkABKDAPPRcjs.t; exports.PurposeMap = _chunkM3Y6JH6Icjs.c; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunk55B57ZAYcjs.xa; exports.REMOVE_REQUEST_IDENTIFIERS = _chunk55B57ZAYcjs.Ba; exports.REPORT_PROMPT_RUN = _chunk55B57ZAYcjs.Ga; exports.REPOSITORIES = _chunk55B57ZAYcjs.A; exports.REQUESTS = _chunk55B57ZAYcjs.W; exports.REQUEST_DATA_SILOS = _chunk55B57ZAYcjs.ua; exports.REQUEST_ENRICHERS = _chunk55B57ZAYcjs.ba; exports.REQUEST_FILES = _chunk55B57ZAYcjs.Ea; exports.REQUEST_IDENTIFIERS = _chunk55B57ZAYcjs.Ca; exports.RETRYABLE_BATCH_STATUSES = _chunkXXFLFF7Qcjs.y; exports.RETRY_REQUEST_DATA_SILO = _chunk55B57ZAYcjs.wa; exports.RETRY_REQUEST_ENRICHER = _chunk55B57ZAYcjs.ca; exports.RateCounter = _chunk55B57ZAYcjs.bg; exports.RegionInput = _chunkABKDAPPRcjs.z; exports.RepositoryInput = _chunkABKDAPPRcjs.E; exports.RequestFileMetadata = _chunk55B57ZAYcjs.xf; exports.RequestFileMetadataResponse = _chunk55B57ZAYcjs.yf; exports.RequestIdentifiersResponse = _chunk55B57ZAYcjs.kd; exports.RequestPurposeTrigger = _chunk55B57ZAYcjs.md; exports.RiskAssignmentInput = _chunkABKDAPPRcjs.W; exports.RiskLogicInput = _chunkABKDAPPRcjs.X; exports.SCOPES_BY_TITLE = _chunkXXFLFF7Qcjs.w; exports.SCOPE_TITLES = _chunkXXFLFF7Qcjs.x; exports.SET_RESOURCE_ATTRIBUTES = _chunk55B57ZAYcjs.Sa; exports.SILO_DISCOVERY_RESULTS = _chunk55B57ZAYcjs.bc; exports.SKIP_REQUEST_ENRICHER = _chunk55B57ZAYcjs.da; exports.SOFTWARE_DEVELOPMENT_KITS = _chunk55B57ZAYcjs.N; exports.SOMBRA_VERSION = _chunk55B57ZAYcjs.ac; exports.SUB_DATA_POINTS = _chunk55B57ZAYcjs.c; exports.SUB_DATA_POINTS_COUNT = _chunk55B57ZAYcjs.d; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunk55B57ZAYcjs.e; exports.SYNC_ATTRIBUTE_TYPES = _chunk55B57ZAYcjs.Nc; exports.SiloDiscoveryResultInput = _chunkABKDAPPRcjs.ga; exports.SoftwareDevelopmentKitInput = _chunkABKDAPPRcjs.B; exports.StoredApiKey = _chunkABKDAPPRcjs.ia; exports.SuccessfulRequest = _chunk55B57ZAYcjs.kc; exports.TEAMS = _chunk55B57ZAYcjs.ya; exports.TEMPLATES = _chunk55B57ZAYcjs.J; exports.TOGGLE_CONSENT_PRECEDENCE = _chunk55B57ZAYcjs.lb; exports.TOGGLE_DATA_SUBJECT = _chunk55B57ZAYcjs.z; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunk55B57ZAYcjs.kb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunk55B57ZAYcjs.jb; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunk55B57ZAYcjs.ib; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkXXFLFF7Qcjs.u; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkXXFLFF7Qcjs.t; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkXXFLFF7Qcjs.v; exports.TeamInput = _chunkABKDAPPRcjs.d; exports.TemplateInput = _chunkABKDAPPRcjs.a; exports.TranscendInput = _chunkABKDAPPRcjs.ha; exports.TranscendPromptManager = B; exports.TranscendPullResource = _chunk7PB6LVSEcjs.d; exports.UPDATE_ACTION = _chunk55B57ZAYcjs.vb; exports.UPDATE_ACTION_ITEMS = _chunk55B57ZAYcjs.xb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunk55B57ZAYcjs.Ka; exports.UPDATE_AGENTS = _chunk55B57ZAYcjs.Jb; exports.UPDATE_AGENT_FILES = _chunk55B57ZAYcjs.Mb; exports.UPDATE_AGENT_FUNCTIONS = _chunk55B57ZAYcjs.Pb; exports.UPDATE_ATTRIBUTE = _chunk55B57ZAYcjs.Ra; exports.UPDATE_ATTRIBUTE_VALUES = _chunk55B57ZAYcjs.Na; exports.UPDATE_BUSINESS_ENTITIES = _chunk55B57ZAYcjs.tb; exports.UPDATE_CODE_PACKAGES = _chunk55B57ZAYcjs.R; exports.UPDATE_CONSENT_EXPERIENCE = _chunk55B57ZAYcjs.nb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunk55B57ZAYcjs.fb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunk55B57ZAYcjs.gb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunk55B57ZAYcjs.mb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunk55B57ZAYcjs.db; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunk55B57ZAYcjs.cb; exports.UPDATE_DATA_FLOWS = _chunk55B57ZAYcjs.Wa; exports.UPDATE_DATA_SILOS = _chunk55B57ZAYcjs.l; exports.UPDATE_DATA_SUBJECT = _chunk55B57ZAYcjs.y; exports.UPDATE_DATA_SUB_CATEGORIES = _chunk55B57ZAYcjs.Vb; exports.UPDATE_ENRICHER = _chunk55B57ZAYcjs.q; exports.UPDATE_IDENTIFIER = _chunk55B57ZAYcjs.v; exports.UPDATE_INTL_MESSAGES = _chunk55B57ZAYcjs.aa; exports.UPDATE_LOAD_OPTIONS = _chunk55B57ZAYcjs.hb; exports.UPDATE_OR_CREATE_COOKIES = _chunk55B57ZAYcjs.Xa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunk55B57ZAYcjs.f; exports.UPDATE_POLICIES = _chunk55B57ZAYcjs.V; exports.UPDATE_PRIVACY_CENTER = _chunk55B57ZAYcjs.Cb; exports.UPDATE_PRIVACY_REQUEST = _chunk55B57ZAYcjs.Z; exports.UPDATE_PROCESSING_ACTIVITIES = _chunk55B57ZAYcjs.$b; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunk55B57ZAYcjs.Yb; exports.UPDATE_PROMPTS = _chunk55B57ZAYcjs.oa; exports.UPDATE_PROMPT_GROUPS = _chunk55B57ZAYcjs.sa; exports.UPDATE_PROMPT_PARTIALS = _chunk55B57ZAYcjs.qa; exports.UPDATE_REPOSITORIES = _chunk55B57ZAYcjs.B; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunk55B57ZAYcjs.O; exports.UPDATE_TEAM = _chunk55B57ZAYcjs.Aa; exports.UPDATE_VENDORS = _chunk55B57ZAYcjs.Sb; exports.USERS = _chunk55B57ZAYcjs.Da; exports.USP_STRING_REGEX = _chunkM3Y6JH6Icjs.b; exports.VARIABLE_PARAMETERS_NAME = _chunkJH5HRI6Dcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkJH5HRI6Dcjs.a; exports.VENDORS = _chunk55B57ZAYcjs.Qb; exports.VendorInput = _chunkABKDAPPRcjs.p; exports.WebhookHeader = _chunkABKDAPPRcjs.b; exports.addDaysUtc = _chunk55B57ZAYcjs.mg; exports.addMessagesToPromptRun = _chunk55B57ZAYcjs.vc; exports.addMs = _chunk55B57ZAYcjs.lg; exports.appendCsvRowsOrdered = _chunk55B57ZAYcjs.pg; exports.appendCsvSync = _chunk55B57ZAYcjs.qg; exports.approvePrivacyRequests = _chunk55B57ZAYcjs.Ef; exports.assumeRole = _chunk55B57ZAYcjs.Ld; exports.buildAIIntegrationType = _chunkTSJTXXLZcjs.b; exports.buildEnabledRouteType = _chunkTSJTXXLZcjs.a; exports.buildTranscendGraphQLClient = _chunk55B57ZAYcjs.xc; exports.buildTranscendGraphQLClientGeneric = _chunk55B57ZAYcjs.wc; exports.buildXdiSyncEndpoint = _chunk52MA7ZLScjs.g; exports.bulkRestartRequests = _chunk55B57ZAYcjs.Mf; exports.bulkRetryEnrichers = _chunk55B57ZAYcjs.Of; exports.cancelPrivacyRequests = _chunk55B57ZAYcjs.Hf; exports.clampPageSize = _chunk55B57ZAYcjs.ig; exports.collectParquetFilesOrExit = _chunk55B57ZAYcjs.dg; exports.consentManagersToBusinessEntities = _chunk52MA7ZLScjs.h; exports.convertToDataSubjectAllowlist = _chunk55B57ZAYcjs.zd; exports.convertToDataSubjectBlockList = _chunk55B57ZAYcjs.yd; exports.createActionItemCollection = _chunk55B57ZAYcjs.ne; exports.createActionItems = _chunk55B57ZAYcjs.qe; exports.createAgent = _chunk55B57ZAYcjs.ze; exports.createAgentFile = _chunk55B57ZAYcjs.te; exports.createAgentFunction = _chunk55B57ZAYcjs.we; exports.createApiKey = _chunk55B57ZAYcjs.Md; exports.createBusinessEntity = _chunk55B57ZAYcjs.De; exports.createCodePackage = _chunk55B57ZAYcjs.Me; exports.createConsentToken = _chunkM3Y6JH6Icjs.a; exports.createDataCategory = _chunk55B57ZAYcjs.Te; exports.createDataFlows = _chunk55B57ZAYcjs.Xe; exports.createPreferenceAccessTokens = _chunk55B57ZAYcjs.Kc; exports.createProcessingPurpose = _chunk55B57ZAYcjs.ff; exports.createPrompt = _chunk55B57ZAYcjs.if; exports.createRegexForTag = j; exports.createRepository = _chunk55B57ZAYcjs.Je; exports.createSoftwareDevelopmentKit = _chunk55B57ZAYcjs.Ge; exports.createSombraGotInstance = _chunk55B57ZAYcjs.yc; exports.createTranscendConsentGotInstance = _chunk55B57ZAYcjs.zc; exports.createVendor = _chunk55B57ZAYcjs.lf; exports.defineTranscendPrompts = ec; exports.deleteApiKey = _chunk55B57ZAYcjs.Nd; exports.deployConsentManager = _chunk55B57ZAYcjs.Ac; exports.description = _chunkXXFLFF7Qcjs.l; exports.domainToHost = _chunk52MA7ZLScjs.e; exports.downloadPrivacyRequestFiles = _chunk55B57ZAYcjs.Bf; exports.enrichPrivacyRequest = _chunkG522ZIHScjs.c; exports.ensureAllDataSubjectsExist = _chunk55B57ZAYcjs.xd; exports.extractClientError = _chunk55B57ZAYcjs.Jf; exports.extractErrorMessage = _chunk55B57ZAYcjs.Yf; exports.fetchActiveSiloDiscoPlugin = _chunk55B57ZAYcjs.Cc; exports.fetchAllActionItems = _chunk55B57ZAYcjs.Dc; exports.fetchAllActions = _chunk55B57ZAYcjs.Ec; exports.fetchAllAgentFiles = _chunk55B57ZAYcjs.Fc; exports.fetchAllAgentFunctions = _chunk55B57ZAYcjs.Gc; exports.fetchAllAgents = _chunk55B57ZAYcjs.Hc; exports.fetchAllApiKeys = _chunk55B57ZAYcjs.sd; exports.fetchAllAssessmentTemplates = _chunk55B57ZAYcjs.Jc; exports.fetchAllAssessments = _chunk55B57ZAYcjs.Ic; exports.fetchAllAttributeValues = _chunk55B57ZAYcjs.Mc; exports.fetchAllAttributes = _chunk55B57ZAYcjs.Oc; exports.fetchAllBusinessEntities = _chunk55B57ZAYcjs.Pc; exports.fetchAllCatalogs = _chunk55B57ZAYcjs.ud; exports.fetchAllCookies = _chunk55B57ZAYcjs.Wc; exports.fetchAllDataCategories = _chunk55B57ZAYcjs.Xc; exports.fetchAllDataFlows = _chunk55B57ZAYcjs.Yc; exports.fetchAllDataPoints = _chunk55B57ZAYcjs.Yd; exports.fetchAllDataSilos = _chunk55B57ZAYcjs.Wd; exports.fetchAllDataSubjects = _chunk55B57ZAYcjs.wd; exports.fetchAllEnrichers = _chunk55B57ZAYcjs.ae; exports.fetchAllIdentifiers = _chunk55B57ZAYcjs.vg; exports.fetchAllMessages = _chunk55B57ZAYcjs.Zc; exports.fetchAllPolicies = _chunk55B57ZAYcjs.ad; exports.fetchAllPreferenceTopics = _chunk55B57ZAYcjs.cd; exports.fetchAllPrivacyCenters = _chunk55B57ZAYcjs.dd; exports.fetchAllProcessingActivities = _chunk55B57ZAYcjs.ed; exports.fetchAllProcessingPurposes = _chunk55B57ZAYcjs.fd; exports.fetchAllPromptGroups = _chunk55B57ZAYcjs.Ad; exports.fetchAllPromptPartials = _chunk55B57ZAYcjs.Bd; exports.fetchAllPromptThreads = _chunk55B57ZAYcjs.Ed; exports.fetchAllPrompts = _chunk55B57ZAYcjs.Cd; exports.fetchAllPurposes = _chunk55B57ZAYcjs.gd; exports.fetchAllPurposesAndPreferences = _chunk55B57ZAYcjs.hd; exports.fetchAllRequestAttributeKeys = _chunk55B57ZAYcjs.Lc; exports.fetchAllRequestEnrichers = _chunk55B57ZAYcjs.id; exports.fetchAllRequestIdentifierMetadata = _chunk55B57ZAYcjs.jd; exports.fetchAllRequestIdentifiers = _chunk55B57ZAYcjs.ld; exports.fetchAllRequests = _chunk55B57ZAYcjs.od; exports.fetchAllSiloDiscoveryResults = _chunk55B57ZAYcjs.ge; exports.fetchAllSubDataPoints = _chunk55B57ZAYcjs.Xd; exports.fetchAllTeams = _chunk55B57ZAYcjs.pd; exports.fetchAllTemplates = _chunk55B57ZAYcjs.ce; exports.fetchAllUsers = _chunk55B57ZAYcjs.qd; exports.fetchAllVendors = _chunk55B57ZAYcjs.rd; exports.fetchAndIndexCatalogs = _chunk55B57ZAYcjs.vd; exports.fetchApiKeys = _chunk55B57ZAYcjs.td; exports.fetchConsentManager = _chunk55B57ZAYcjs.Qc; exports.fetchConsentManagerAnalyticsData = _chunk55B57ZAYcjs.Uc; exports.fetchConsentManagerExperiences = _chunk55B57ZAYcjs.Sc; exports.fetchConsentManagerId = _chunk55B57ZAYcjs.Rc; exports.fetchConsentManagerTheme = _chunk55B57ZAYcjs.Vc; exports.fetchEnrichedDataSilos = _chunk55B57ZAYcjs.Zd; exports.fetchIdentifiersAndCreateMissing = _chunk55B57ZAYcjs.wg; exports.fetchPartitions = _chunk55B57ZAYcjs.ee; exports.fetchPrivacyCenterId = _chunk55B57ZAYcjs.$c; exports.fetchPrivacyCenterUrl = _chunk55B57ZAYcjs._c; exports.fetchPromptsWithVariables = _chunk55B57ZAYcjs.Dd; exports.fetchRequestDataSilo = _chunk55B57ZAYcjs.Hd; exports.fetchRequestDataSiloActiveCount = _chunk55B57ZAYcjs.Id; exports.fetchRequestDataSilos = _chunk55B57ZAYcjs.Gd; exports.fetchRequestDataSilosCount = _chunk55B57ZAYcjs.Fd; exports.fetchRequestFilesForRequest = _chunk55B57ZAYcjs.Jd; exports.filterNullishValuesFromObject = oc; exports.filterRows = _chunk55B57ZAYcjs.uc; exports.formatAttributeValues = _chunk55B57ZAYcjs.bd; exports.fuzzyMatchColumns = _chunk55B57ZAYcjs.nc; exports.fuzzySearch = _chunk55B57ZAYcjs.mc; exports.generateCrossAccountApiKeys = _chunkNC6VWOMNcjs.a; exports.getErrorStatus = _chunk55B57ZAYcjs.Xf; exports.getFileMetadataForPrivacyRequests = _chunk55B57ZAYcjs.zf; exports.getGitFilesThatChanged = cc; exports.getUniqueValuesForColumn = _chunk55B57ZAYcjs.tc; exports.initCsvFile = _chunk55B57ZAYcjs.og; exports.inquirerAutoComplete = _chunk55B57ZAYcjs.Vf; exports.inquirerConfirmBoolean = _chunk55B57ZAYcjs.Tf; exports.inquirerConfirmText = _chunk55B57ZAYcjs.Uf; exports.limitRecords = _chunk55B57ZAYcjs.ag; exports.listDirectories = _chunkNC6VWOMNcjs.d; exports.listFiles = _chunkNC6VWOMNcjs.c; exports.loginUser = _chunk55B57ZAYcjs.Kd; exports.makeGraphQLRequest = _chunk55B57ZAYcjs.ug; exports.mapColumnsToAttributes = _chunk55B57ZAYcjs.If; exports.mapColumnsToIdentifiers = _chunk55B57ZAYcjs.Gf; exports.mapCsvColumnsToApi = _chunk55B57ZAYcjs.qf; exports.mapCsvRowsToRequestInputs = _chunk55B57ZAYcjs.vf; exports.mapEnumValues = _chunk55B57ZAYcjs.oc; exports.mapRequestEnumValues = _chunk55B57ZAYcjs.rf; exports.markCronIdentifierCompleted = _chunkQ2RJZGYWcjs.d; exports.markRequestDataSiloIdsCompleted = _chunkQ2RJZGYWcjs.f; exports.markSilentPrivacyRequests = _chunk55B57ZAYcjs.pf; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkXXFLFF7Qcjs.n; exports.normalizeIdentifierValue = _chunk55B57ZAYcjs.uf; exports.notifyPrivacyRequestsAdditionalTime = _chunk55B57ZAYcjs.Ff; exports.parquetToCsvOneFile = _chunk55B57ZAYcjs.eg; exports.parseAssessmentDisplayLogic = _chunk55B57ZAYcjs.Td; exports.parseAssessmentRiskLogic = _chunk55B57ZAYcjs.Vd; exports.parseAttributesFromString = _chunk55B57ZAYcjs.rc; exports.parseFilePath = _chunk55B57ZAYcjs.sg; exports.parseVariablesFromString = _chunk55B57ZAYcjs.Wf; exports.pullAllDatapoints = _chunk7H4ALAHCcjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunkQ2RJZGYWcjs.g; exports.pullConsentManagerMetrics = _chunk52MA7ZLScjs.d; exports.pullCronPageOfIdentifiers = _chunkQ2RJZGYWcjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunkG522ZIHScjs.a; exports.pullPrivacyRequests = _chunk55B57ZAYcjs.Qf; exports.pullTranscendConfiguration = _chunk55B57ZAYcjs.ie; exports.pullUnstructuredSubDataPointRecommendations = _chunk7H4ALAHCcjs.b; exports.pushCronIdentifiersFromCsv = _chunkQ2RJZGYWcjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunkG522ZIHScjs.d; exports.readCsv = _chunk55B57ZAYcjs.sc; exports.readSafe = _chunk55B57ZAYcjs.cg; exports.readTranscendYaml = _chunkJH5HRI6Dcjs.d; exports.removeLinks = nc; exports.removeUnverifiedRequestIdentifiers = _chunk55B57ZAYcjs.Sf; exports.replaceVariablesInYaml = _chunkJH5HRI6Dcjs.c; exports.reportPromptRun = _chunk55B57ZAYcjs.je; exports.restartPrivacyRequest = _chunk55B57ZAYcjs.Lf; exports.retryRequestDataSilos = _chunk55B57ZAYcjs.Pf; exports.retryRequestEnricher = _chunk55B57ZAYcjs.ke; exports.retrySamePromise = _chunk55B57ZAYcjs.$f; exports.setResourceAttributes = _chunk55B57ZAYcjs.le; exports.skipPreflightJobs = _chunk55B57ZAYcjs.Nf; exports.skipRequestDataSilos = _chunk55B57ZAYcjs.Rf; exports.sleepPromise = _chunk55B57ZAYcjs.Zf; exports.splitCsvToList = _chunk55B57ZAYcjs.pc; exports.splitInHalf = _chunk55B57ZAYcjs._f; exports.startOfHour = _chunk55B57ZAYcjs.kg; exports.startOfUtcDay = _chunk55B57ZAYcjs.jg; exports.streamPrivacyRequestFiles = _chunk55B57ZAYcjs.Af; exports.submitPrivacyRequest = _chunk55B57ZAYcjs.Df; exports.syncAction = _chunk55B57ZAYcjs.me; exports.syncActionItemCollections = _chunk55B57ZAYcjs.pe; exports.syncActionItems = _chunk55B57ZAYcjs.se; exports.syncAgentFiles = _chunk55B57ZAYcjs.ve; exports.syncAgentFunctions = _chunk55B57ZAYcjs.ye; exports.syncAgents = _chunk55B57ZAYcjs.Be; exports.syncAttribute = _chunk55B57ZAYcjs.Ce; exports.syncBusinessEntities = _chunk55B57ZAYcjs.Fe; exports.syncCodePackages = _chunk55B57ZAYcjs.Oe; exports.syncConfigurationToTranscend = _chunk55B57ZAYcjs.xg; exports.syncConsentManager = _chunk55B57ZAYcjs.Qe; exports.syncConsentManagerExperiences = _chunk55B57ZAYcjs.Pe; exports.syncCookies = _chunk55B57ZAYcjs.Se; exports.syncDataCategories = _chunk55B57ZAYcjs.Ve; exports.syncDataFlows = _chunk55B57ZAYcjs.Ye; exports.syncDataSiloDependencies = _chunk55B57ZAYcjs.$d; exports.syncDataSilos = _chunk55B57ZAYcjs._d; exports.syncDataSubject = _chunk55B57ZAYcjs.Ze; exports.syncEnricher = _chunk55B57ZAYcjs.be; exports.syncIdentifier = _chunk55B57ZAYcjs._e; exports.syncIntlMessages = _chunk55B57ZAYcjs.af; exports.syncPartitions = _chunk55B57ZAYcjs.fe; exports.syncPolicies = _chunk55B57ZAYcjs.cf; exports.syncPrivacyCenter = _chunk55B57ZAYcjs.df; exports.syncProcessingActivities = _chunk55B57ZAYcjs.ef; exports.syncProcessingPurposes = _chunk55B57ZAYcjs.hf; exports.syncPrompts = _chunk55B57ZAYcjs.kf; exports.syncRepositories = _chunk55B57ZAYcjs.Le; exports.syncSoftwareDevelopmentKits = _chunk55B57ZAYcjs.Ie; exports.syncTemplate = _chunk55B57ZAYcjs.de; exports.syncVendors = _chunk55B57ZAYcjs.nf; exports.updateActionItem = _chunk55B57ZAYcjs.re; exports.updateActionItemCollection = _chunk55B57ZAYcjs.oe; exports.updateAgentFiles = _chunk55B57ZAYcjs.ue; exports.updateAgentFunctions = _chunk55B57ZAYcjs.xe; exports.updateAgents = _chunk55B57ZAYcjs.Ae; exports.updateBusinessEntities = _chunk55B57ZAYcjs.Ee; exports.updateCodePackages = _chunk55B57ZAYcjs.Ne; exports.updateConsentManagerToLatest = _chunk55B57ZAYcjs.Bc; exports.updateConsentManagerVersionToLatest = _chunk52MA7ZLScjs.a; exports.updateDataCategories = _chunk55B57ZAYcjs.Ue; exports.updateDataFlows = _chunk55B57ZAYcjs.We; exports.updateIntlMessages = _chunk55B57ZAYcjs.$e; exports.updateOrCreateCookies = _chunk55B57ZAYcjs.Re; exports.updatePolicies = _chunk55B57ZAYcjs.bf; exports.updateProcessingPurposes = _chunk55B57ZAYcjs.gf; exports.updatePrompts = _chunk55B57ZAYcjs.jf; exports.updateRepositories = _chunk55B57ZAYcjs.Ke; exports.updateSoftwareDevelopmentKits = _chunk55B57ZAYcjs.He; exports.updateVendors = _chunk55B57ZAYcjs.mf; exports.uploadConsents = _chunkM3Y6JH6Icjs.d; exports.uploadCookiesFromCsv = _chunk52MA7ZLScjs.c; exports.uploadDataFlowsFromCsv = _chunk52MA7ZLScjs.b; exports.uploadPrivacyRequestsFromCsv = _chunk55B57ZAYcjs.Kf; exports.uploadSiloDiscoveryResults = _chunk55B57ZAYcjs.of; exports.validateTranscendAuth = _chunkNC6VWOMNcjs.b; exports.version = _chunkXXFLFF7Qcjs.m; exports.writeCsv = _chunk55B57ZAYcjs.rg; exports.writeCsvSync = _chunk55B57ZAYcjs.ng; exports.writeLargeCsv = _chunk55B57ZAYcjs.tg; exports.writeTranscendYaml = _chunkJH5HRI6Dcjs.e;
|
|
3
|
+
`)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=_chunkDQCPGPXGcjs.c.call(void 0, p.split(`
|
|
4
|
+
`).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let Q=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=Q});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunk56QKBG2Rcjs.wb; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunk56QKBG2Rcjs.Ja; exports.ADD_SILO_DISCOVERY_RESULTS = _chunk56QKBG2Rcjs.J; exports.ADMIN_DASH = _chunkDQCPGPXGcjs.o; exports.ADMIN_DASH_DATAPOINTS = _chunkDQCPGPXGcjs.q; exports.ADMIN_DASH_INTEGRATIONS = _chunkDQCPGPXGcjs.p; exports.AGENTS = _chunk56QKBG2Rcjs.Jb; exports.AGENT_FILES = _chunk56QKBG2Rcjs.Mb; exports.AGENT_FUNCTIONS = _chunk56QKBG2Rcjs.Pb; exports.API_KEYS = _chunk56QKBG2Rcjs.F; exports.APPROVE_PRIVACY_REQUEST = _chunk56QKBG2Rcjs.Z; exports.ASSESSMENTS = _chunk56QKBG2Rcjs.ha; exports.ASSESSMENT_SECTION_FIELDS = _chunk56QKBG2Rcjs.ga; exports.ASSESSMENT_TEMPLATES = _chunk56QKBG2Rcjs.la; exports.ASSUME_ROLE = _chunk56QKBG2Rcjs.Hb; exports.ATTRIBUTES = _chunk56QKBG2Rcjs.Na; exports.ATTRIBUTE_KEYS_REQUESTS = _chunk56QKBG2Rcjs.O; exports.ATTRIBUTE_VALUES = _chunk56QKBG2Rcjs.Ra; exports.ActionInput = _chunkABKDAPPRcjs.G; exports.ActionItemCollectionInput = _chunkABKDAPPRcjs.R; exports.ActionItemInput = _chunkABKDAPPRcjs.S; exports.AgentFileInput = _chunkABKDAPPRcjs.o; exports.AgentFunctionInput = _chunkABKDAPPRcjs.n; exports.AgentInput = _chunkABKDAPPRcjs.m; exports.ApiKeyInput = _chunkABKDAPPRcjs.c; exports.AssessmentAction = _chunk56QKBG2Rcjs.Ud; exports.AssessmentAnswerOptionInput = _chunkABKDAPPRcjs.Y; exports.AssessmentDisplayLogicInput = _chunkABKDAPPRcjs.V; exports.AssessmentInput = _chunkABKDAPPRcjs.ca; exports.AssessmentNestedRule = _chunk56QKBG2Rcjs.Td; exports.AssessmentNestedRuleInput = _chunkABKDAPPRcjs.U; exports.AssessmentResourceInput = _chunkABKDAPPRcjs.ba; exports.AssessmentRetentionScheduleInput = _chunkABKDAPPRcjs.$; exports.AssessmentRiskLogic = _chunk56QKBG2Rcjs.Wd; exports.AssessmentRule = _chunk56QKBG2Rcjs.Sd; exports.AssessmentRuleInput = _chunkABKDAPPRcjs.T; exports.AssessmentRuleWithOperands = _chunk56QKBG2Rcjs.Qd; exports.AssessmentRuleWithoutOperands = _chunk56QKBG2Rcjs.Rd; exports.AssessmentSectionInput = _chunkABKDAPPRcjs._; exports.AssessmentSectionQuestionInput = _chunkABKDAPPRcjs.Z; exports.AssessmentTemplateInput = _chunkABKDAPPRcjs.aa; exports.AttestedExtraIdentifiers = _chunk56QKBG2Rcjs.uf; exports.AttributeInput = _chunkABKDAPPRcjs.k; exports.AttributePreview = _chunkABKDAPPRcjs.l; exports.AttributeValueInput = _chunkABKDAPPRcjs.j; exports.BLANK = _chunk56QKBG2Rcjs.gc; exports.BULK_APPLY = _chunk56QKBG2Rcjs.fc; exports.BULK_REQUEST_FILES = _chunk56QKBG2Rcjs.Ha; exports.BUSINESS_ENTITIES = _chunk56QKBG2Rcjs.tb; exports.BusinessEntityInput = _chunkABKDAPPRcjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunk56QKBG2Rcjs._; exports.CAN_APPLY_IN_BULK = _chunk56QKBG2Rcjs.kc; exports.CATALOGS = _chunk56QKBG2Rcjs.t; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunk56QKBG2Rcjs.xa; exports.CODE_PACKAGES = _chunk56QKBG2Rcjs.S; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunk56QKBG2Rcjs.sb; exports.CONSENT_PARTITIONS = _chunk56QKBG2Rcjs.Wa; exports.COOKIES = _chunk56QKBG2Rcjs.$a; exports.CREATE_ACTION_ITEMS = _chunk56QKBG2Rcjs.Ab; exports.CREATE_ACTION_ITEM_COLLECTION = _chunk56QKBG2Rcjs.La; exports.CREATE_AGENT = _chunk56QKBG2Rcjs.Kb; exports.CREATE_AGENT_FILE = _chunk56QKBG2Rcjs.Nb; exports.CREATE_AGENT_FUNCTION = _chunk56QKBG2Rcjs.Qb; exports.CREATE_API_KEY = _chunk56QKBG2Rcjs.G; exports.CREATE_ATTRIBUTE = _chunk56QKBG2Rcjs.Sa; exports.CREATE_ATTRIBUTE_VALUES = _chunk56QKBG2Rcjs.Oa; exports.CREATE_BUSINESS_ENTITY = _chunk56QKBG2Rcjs.ub; exports.CREATE_CODE_PACKAGE = _chunk56QKBG2Rcjs.U; exports.CREATE_CONSENT_EXPERIENCE = _chunk56QKBG2Rcjs.qb; exports.CREATE_CONSENT_MANAGER = _chunk56QKBG2Rcjs.db; exports.CREATE_CONSENT_PARTITION = _chunk56QKBG2Rcjs.rb; exports.CREATE_DATA_FLOWS = _chunk56QKBG2Rcjs.Xa; exports.CREATE_DATA_SILOS = _chunk56QKBG2Rcjs.o; exports.CREATE_DATA_SUBJECT = _chunk56QKBG2Rcjs.z; exports.CREATE_DATA_SUB_CATEGORY = _chunk56QKBG2Rcjs.Wb; exports.CREATE_ENRICHER = _chunk56QKBG2Rcjs.r; exports.CREATE_IDENTIFIER = _chunk56QKBG2Rcjs.w; exports.CREATE_PREFERENCE_ACCESS_TOKENS = _chunk56QKBG2Rcjs.I; exports.CREATE_PROCESSING_ACTIVITY = _chunk56QKBG2Rcjs.ac; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunk56QKBG2Rcjs.Zb; exports.CREATE_PROMPT = _chunk56QKBG2Rcjs.ra; exports.CREATE_PROMPT_GROUP = _chunk56QKBG2Rcjs.va; exports.CREATE_PROMPT_PARTIAL = _chunk56QKBG2Rcjs.ta; exports.CREATE_REPOSITORY = _chunk56QKBG2Rcjs.E; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunk56QKBG2Rcjs.R; exports.CREATE_TEAM = _chunk56QKBG2Rcjs.Ba; exports.CREATE_TEMPLATE = _chunk56QKBG2Rcjs.M; exports.CREATE_VENDOR = _chunk56QKBG2Rcjs.Tb; exports.CachedFileState = _chunk56QKBG2Rcjs.lc; exports.CachedRequestState = _chunk56QKBG2Rcjs.nc; exports.CodePackageInput = _chunkABKDAPPRcjs.D; exports.CodePackageSdk = _chunkABKDAPPRcjs.C; exports.ColumnName = _chunk56QKBG2Rcjs.ic; exports.ConsentManageExperienceInput = _chunkABKDAPPRcjs.K; exports.ConsentManagerInput = _chunkABKDAPPRcjs.M; exports.ConsentManagerMetricBin = _chunk56QKBG2Rcjs.Vc; exports.ConsentManagerServiceMetadata = _chunkABKDAPPRcjs.la; exports.ConsentPreferenceTopic = _chunkABKDAPPRcjs.ea; exports.ConsentPreferenceTopicOptionValue = _chunkABKDAPPRcjs.da; exports.ConsentPurpose = _chunkABKDAPPRcjs.fa; exports.CookieCsvInput = _chunkABKDAPPRcjs.ka; exports.CookieInput = _chunkABKDAPPRcjs.J; exports.CronIdentifier = _chunkIHUCIK5Tcjs.a; exports.CronIdentifierPush = _chunkIHUCIK5Tcjs.c; exports.DATAPOINT_EXPORT = _chunk56QKBG2Rcjs.i; exports.DATA_FLOWS = _chunk56QKBG2Rcjs._a; exports.DATA_POINTS = _chunk56QKBG2Rcjs.c; exports.DATA_POINT_COUNT = _chunk56QKBG2Rcjs.d; exports.DATA_SILOS = _chunk56QKBG2Rcjs.k; exports.DATA_SILOS_ENRICHED = _chunk56QKBG2Rcjs.m; exports.DATA_SILO_EXPORT = _chunk56QKBG2Rcjs.l; exports.DATA_SUBJECTS = _chunk56QKBG2Rcjs.y; exports.DATA_SUB_CATEGORIES = _chunk56QKBG2Rcjs.Vb; exports.DAY_MS = _chunk56QKBG2Rcjs.hg; exports.DEBUG = _chunkDQCPGPXGcjs.z; exports.DEFAULT_TRANSCEND_API = _chunkDQCPGPXGcjs.r; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkDQCPGPXGcjs.s; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunk56QKBG2Rcjs.je; exports.DELETE_API_KEY = _chunk56QKBG2Rcjs.H; exports.DELETE_ATTRIBUTE_VALUE = _chunk56QKBG2Rcjs.Qa; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunk56QKBG2Rcjs.Cb; exports.DEPLOY_CONSENT_MANAGER = _chunk56QKBG2Rcjs.gb; exports.DETERMINE_LOGIN_METHOD = _chunk56QKBG2Rcjs.Fb; exports.DataCategoryGuessInput = _chunkABKDAPPRcjs.h; exports.DataCategoryInput = _chunkABKDAPPRcjs.q; exports.DataCategoryPreviewInput = _chunkABKDAPPRcjs.g; exports.DataCategoryRecommendationInput = _chunkABKDAPPRcjs.i; exports.DataFlowCsvInput = _chunkABKDAPPRcjs.ja; exports.DataFlowInput = _chunkABKDAPPRcjs.I; exports.DataSiloInput = _chunkABKDAPPRcjs.Q; exports.DataSubjectInput = _chunkABKDAPPRcjs.F; exports.DatapointInput = _chunkABKDAPPRcjs.w; exports.ENABLED_PLUGINS = _chunk56QKBG2Rcjs.K; exports.ENRICHERS = _chunk56QKBG2Rcjs.p; exports.ENTRY_COUNT = _chunk56QKBG2Rcjs.j; exports.EXPERIENCES = _chunk56QKBG2Rcjs.Va; exports.EnrichPrivacyRequest = _chunk6TKTYQIFcjs.b; exports.EnricherInput = _chunkABKDAPPRcjs.e; exports.FETCH_CONSENT_MANAGER = _chunk56QKBG2Rcjs.bb; exports.FETCH_CONSENT_MANAGER_ID = _chunk56QKBG2Rcjs.ab; exports.FETCH_CONSENT_MANAGER_THEME = _chunk56QKBG2Rcjs.cb; exports.FETCH_PRIVACY_CENTER_ID = _chunk56QKBG2Rcjs.Bb; exports.FIVE_MIN_MS = _chunk56QKBG2Rcjs.jg; exports.FieldInput = _chunkABKDAPPRcjs.v; exports.GLOBAL_ACTION_ITEMS = _chunk56QKBG2Rcjs.yb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunk56QKBG2Rcjs.Ka; exports.HOUR_MS = _chunk56QKBG2Rcjs.ig; exports.IDENTIFIERS = _chunk56QKBG2Rcjs.u; exports.IDENTIFIER_BLOCK_LIST = _chunk56QKBG2Rcjs.hc; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunk56QKBG2Rcjs.ia; exports.INITIALIZER = _chunk56QKBG2Rcjs.q; exports.IP_ADDRESS_REGEX = _chunkPGO2YKRXcjs.f; exports.IS_REQUIRED = _chunk56QKBG2Rcjs.jc; exports.IdentifierInput = _chunkABKDAPPRcjs.H; exports.ImportOnetrustAssessmentsInput = _chunkABKDAPPRcjs.sa; exports.IntlMessage = _chunk56QKBG2Rcjs.yf; exports.IntlMessageInput = _chunkABKDAPPRcjs.P; exports.LARGE_LANGUAGE_MODELS = _chunk56QKBG2Rcjs.Ib; exports.LOGIN = _chunk56QKBG2Rcjs.Gb; exports.MESSAGES = _chunk56QKBG2Rcjs.ba; exports.NEW_IDENTIFIER_TYPES = _chunk56QKBG2Rcjs.v; exports.NONE = _chunk56QKBG2Rcjs.ec; exports.NOTIFY_ADDITIONAL_TIME = _chunk56QKBG2Rcjs.aa; exports.ORGANIZATION = _chunk56QKBG2Rcjs.N; exports.OneTrustFileFormat = _chunk7PB6LVSEcjs.a; exports.OneTrustPullResource = _chunk7PB6LVSEcjs.b; exports.OneTrustPullSource = _chunk7PB6LVSEcjs.c; exports.OpenAIEnabledRoute = _chunkABKDAPPRcjs.na; exports.OpenAIEnabledRoutes = _chunkABKDAPPRcjs.oa; exports.OpenAIIntegration = _chunkABKDAPPRcjs.pa; exports.OpenAIRouteName = _chunk7PB6LVSEcjs.f; exports.POLICIES = _chunk56QKBG2Rcjs.W; exports.PREFERENCE_TOPICS = _chunk56QKBG2Rcjs.ka; exports.PRIVACY_CENTER = _chunk56QKBG2Rcjs.Db; exports.PROCESSING_ACTIVITIES = _chunk56QKBG2Rcjs.$b; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunk56QKBG2Rcjs.Yb; exports.PROMPTS = _chunk56QKBG2Rcjs.ma; exports.PROMPTS_WITH_VARIABLES = _chunk56QKBG2Rcjs.pa; exports.PROMPT_GROUPS = _chunk56QKBG2Rcjs.oa; exports.PROMPT_PARTIALS = _chunk56QKBG2Rcjs.na; exports.PROMPT_THREADS = _chunk56QKBG2Rcjs.V; exports.PURPOSES = _chunk56QKBG2Rcjs.ja; exports.ParsedAttributeInput = _chunk56QKBG2Rcjs.sc; exports.PartitionInput = _chunkABKDAPPRcjs.L; exports.PathfinderPolicy = _chunkABKDAPPRcjs.qa; exports.PathfinderPolicyName = _chunk7PB6LVSEcjs.e; exports.PathfinderPolicyNameC = _chunkABKDAPPRcjs.ma; exports.PathfinderPromptRunMetadata = _chunkABKDAPPRcjs.ra; exports.PolicyInput = _chunkABKDAPPRcjs.O; exports.PrivacyCenterInput = _chunkABKDAPPRcjs.N; exports.PrivacyRequest = _chunk56QKBG2Rcjs.pd; exports.PrivacyRequestInput = _chunk56QKBG2Rcjs.vf; exports.PrivacyRequestResponse = _chunk56QKBG2Rcjs.Ef; exports.ProcessingActivityInput = _chunkABKDAPPRcjs.A; exports.ProcessingPurposeInput = _chunkABKDAPPRcjs.r; exports.ProcessingPurposePreviewInput = _chunkABKDAPPRcjs.f; exports.PromptAVendorEmailSettings = _chunkABKDAPPRcjs.x; exports.PromptGroupInput = _chunkABKDAPPRcjs.u; exports.PromptInput = _chunkABKDAPPRcjs.s; exports.PromptPartialInput = _chunkABKDAPPRcjs.t; exports.PurposeMap = _chunkD3VRD5F5cjs.c; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunk56QKBG2Rcjs.za; exports.REMOVE_REQUEST_IDENTIFIERS = _chunk56QKBG2Rcjs.Da; exports.REPORT_PROMPT_RUN = _chunk56QKBG2Rcjs.Ia; exports.REPOSITORIES = _chunk56QKBG2Rcjs.C; exports.REQUESTS = _chunk56QKBG2Rcjs.Y; exports.REQUEST_DATA_SILOS = _chunk56QKBG2Rcjs.wa; exports.REQUEST_ENRICHERS = _chunk56QKBG2Rcjs.da; exports.REQUEST_FILES = _chunk56QKBG2Rcjs.Ga; exports.REQUEST_IDENTIFIERS = _chunk56QKBG2Rcjs.Ea; exports.RETRYABLE_BATCH_STATUSES = _chunkDQCPGPXGcjs.y; exports.RETRY_REQUEST_DATA_SILO = _chunk56QKBG2Rcjs.ya; exports.RETRY_REQUEST_ENRICHER = _chunk56QKBG2Rcjs.ea; exports.RateCounter = _chunk56QKBG2Rcjs.dg; exports.RegionInput = _chunkABKDAPPRcjs.z; exports.RepositoryInput = _chunkABKDAPPRcjs.E; exports.RequestFileMetadata = _chunk56QKBG2Rcjs.zf; exports.RequestFileMetadataResponse = _chunk56QKBG2Rcjs.Af; exports.RequestIdentifiersResponse = _chunk56QKBG2Rcjs.md; exports.RequestPurposeTrigger = _chunk56QKBG2Rcjs.od; exports.RiskAssignmentInput = _chunkABKDAPPRcjs.W; exports.RiskLogicInput = _chunkABKDAPPRcjs.X; exports.SCOPES_BY_TITLE = _chunkDQCPGPXGcjs.w; exports.SCOPE_TITLES = _chunkDQCPGPXGcjs.x; exports.SET_RESOURCE_ATTRIBUTES = _chunk56QKBG2Rcjs.Ua; exports.SILO_DISCOVERY_RESULTS = _chunk56QKBG2Rcjs.dc; exports.SKIP_REQUEST_ENRICHER = _chunk56QKBG2Rcjs.fa; exports.SOFTWARE_DEVELOPMENT_KITS = _chunk56QKBG2Rcjs.P; exports.SOMBRA_VERSION = _chunk56QKBG2Rcjs.cc; exports.SUB_DATA_POINTS = _chunk56QKBG2Rcjs.e; exports.SUB_DATA_POINTS_COUNT = _chunk56QKBG2Rcjs.f; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunk56QKBG2Rcjs.g; exports.SYNC_ATTRIBUTE_TYPES = _chunk56QKBG2Rcjs.Pc; exports.SiloDiscoveryResultInput = _chunkABKDAPPRcjs.ga; exports.SoftwareDevelopmentKitInput = _chunkABKDAPPRcjs.B; exports.StoredApiKey = _chunkABKDAPPRcjs.ia; exports.SuccessfulRequest = _chunk56QKBG2Rcjs.mc; exports.TEAMS = _chunk56QKBG2Rcjs.Aa; exports.TEMPLATES = _chunk56QKBG2Rcjs.L; exports.TOGGLE_CONSENT_PRECEDENCE = _chunk56QKBG2Rcjs.nb; exports.TOGGLE_DATA_SUBJECT = _chunk56QKBG2Rcjs.B; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunk56QKBG2Rcjs.mb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunk56QKBG2Rcjs.lb; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunk56QKBG2Rcjs.kb; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkDQCPGPXGcjs.u; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkDQCPGPXGcjs.t; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkDQCPGPXGcjs.v; exports.TeamInput = _chunkABKDAPPRcjs.d; exports.TemplateInput = _chunkABKDAPPRcjs.a; exports.TranscendInput = _chunkABKDAPPRcjs.ha; exports.TranscendPromptManager = F; exports.TranscendPullResource = _chunk7PB6LVSEcjs.d; exports.UPDATE_ACTION = _chunk56QKBG2Rcjs.xb; exports.UPDATE_ACTION_ITEMS = _chunk56QKBG2Rcjs.zb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunk56QKBG2Rcjs.Ma; exports.UPDATE_AGENTS = _chunk56QKBG2Rcjs.Lb; exports.UPDATE_AGENT_FILES = _chunk56QKBG2Rcjs.Ob; exports.UPDATE_AGENT_FUNCTIONS = _chunk56QKBG2Rcjs.Rb; exports.UPDATE_ATTRIBUTE = _chunk56QKBG2Rcjs.Ta; exports.UPDATE_ATTRIBUTE_VALUES = _chunk56QKBG2Rcjs.Pa; exports.UPDATE_BUSINESS_ENTITIES = _chunk56QKBG2Rcjs.vb; exports.UPDATE_CODE_PACKAGES = _chunk56QKBG2Rcjs.T; exports.UPDATE_CONSENT_EXPERIENCE = _chunk56QKBG2Rcjs.pb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunk56QKBG2Rcjs.hb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunk56QKBG2Rcjs.ib; exports.UPDATE_CONSENT_MANAGER_THEME = _chunk56QKBG2Rcjs.ob; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunk56QKBG2Rcjs.fb; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunk56QKBG2Rcjs.eb; exports.UPDATE_DATA_FLOWS = _chunk56QKBG2Rcjs.Ya; exports.UPDATE_DATA_SILOS = _chunk56QKBG2Rcjs.n; exports.UPDATE_DATA_SUBJECT = _chunk56QKBG2Rcjs.A; exports.UPDATE_DATA_SUB_CATEGORIES = _chunk56QKBG2Rcjs.Xb; exports.UPDATE_ENRICHER = _chunk56QKBG2Rcjs.s; exports.UPDATE_IDENTIFIER = _chunk56QKBG2Rcjs.x; exports.UPDATE_INTL_MESSAGES = _chunk56QKBG2Rcjs.ca; exports.UPDATE_LOAD_OPTIONS = _chunk56QKBG2Rcjs.jb; exports.UPDATE_OR_CREATE_COOKIES = _chunk56QKBG2Rcjs.Za; exports.UPDATE_OR_CREATE_DATA_POINT = _chunk56QKBG2Rcjs.h; exports.UPDATE_POLICIES = _chunk56QKBG2Rcjs.X; exports.UPDATE_PRIVACY_CENTER = _chunk56QKBG2Rcjs.Eb; exports.UPDATE_PRIVACY_REQUEST = _chunk56QKBG2Rcjs.$; exports.UPDATE_PROCESSING_ACTIVITIES = _chunk56QKBG2Rcjs.bc; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunk56QKBG2Rcjs._b; exports.UPDATE_PROMPTS = _chunk56QKBG2Rcjs.qa; exports.UPDATE_PROMPT_GROUPS = _chunk56QKBG2Rcjs.ua; exports.UPDATE_PROMPT_PARTIALS = _chunk56QKBG2Rcjs.sa; exports.UPDATE_REPOSITORIES = _chunk56QKBG2Rcjs.D; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunk56QKBG2Rcjs.Q; exports.UPDATE_TEAM = _chunk56QKBG2Rcjs.Ca; exports.UPDATE_VENDORS = _chunk56QKBG2Rcjs.Ub; exports.USERS = _chunk56QKBG2Rcjs.Fa; exports.USP_STRING_REGEX = _chunkD3VRD5F5cjs.b; exports.VARIABLE_PARAMETERS_NAME = _chunkJH5HRI6Dcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkJH5HRI6Dcjs.a; exports.VENDORS = _chunk56QKBG2Rcjs.Sb; exports.VendorInput = _chunkABKDAPPRcjs.p; exports.WebhookHeader = _chunkABKDAPPRcjs.b; exports.addDaysUtc = _chunk56QKBG2Rcjs.og; exports.addMessagesToPromptRun = _chunk56QKBG2Rcjs.xc; exports.addMs = _chunk56QKBG2Rcjs.ng; exports.appendCsvRowsOrdered = _chunk56QKBG2Rcjs.rg; exports.appendCsvSync = _chunk56QKBG2Rcjs.sg; exports.approvePrivacyRequests = _chunk56QKBG2Rcjs.Gf; exports.assumeRole = _chunk56QKBG2Rcjs.Nd; exports.buildAIIntegrationType = _chunkTSJTXXLZcjs.b; exports.buildEnabledRouteType = _chunkTSJTXXLZcjs.a; exports.buildTranscendGraphQLClient = _chunk56QKBG2Rcjs.zc; exports.buildTranscendGraphQLClientGeneric = _chunk56QKBG2Rcjs.yc; exports.buildXdiSyncEndpoint = _chunkPGO2YKRXcjs.g; exports.bulkRestartRequests = _chunk56QKBG2Rcjs.Of; exports.bulkRetryEnrichers = _chunk56QKBG2Rcjs.Qf; exports.cancelPrivacyRequests = _chunk56QKBG2Rcjs.Jf; exports.clampPageSize = _chunk56QKBG2Rcjs.kg; exports.collectParquetFilesOrExit = _chunk56QKBG2Rcjs.fg; exports.consentManagersToBusinessEntities = _chunkPGO2YKRXcjs.h; exports.convertToDataSubjectAllowlist = _chunk56QKBG2Rcjs.Bd; exports.convertToDataSubjectBlockList = _chunk56QKBG2Rcjs.Ad; exports.createActionItemCollection = _chunk56QKBG2Rcjs.pe; exports.createActionItems = _chunk56QKBG2Rcjs.se; exports.createAgent = _chunk56QKBG2Rcjs.Be; exports.createAgentFile = _chunk56QKBG2Rcjs.ve; exports.createAgentFunction = _chunk56QKBG2Rcjs.ye; exports.createApiKey = _chunk56QKBG2Rcjs.Od; exports.createBusinessEntity = _chunk56QKBG2Rcjs.Fe; exports.createCodePackage = _chunk56QKBG2Rcjs.Oe; exports.createConsentToken = _chunkD3VRD5F5cjs.a; exports.createDataCategory = _chunk56QKBG2Rcjs.Ve; exports.createDataFlows = _chunk56QKBG2Rcjs.Ze; exports.createPreferenceAccessTokens = _chunk56QKBG2Rcjs.Mc; exports.createProcessingPurpose = _chunk56QKBG2Rcjs.hf; exports.createPrompt = _chunk56QKBG2Rcjs.kf; exports.createRegexForTag = j; exports.createRepository = _chunk56QKBG2Rcjs.Le; exports.createSoftwareDevelopmentKit = _chunk56QKBG2Rcjs.Ie; exports.createSombraGotInstance = _chunk56QKBG2Rcjs.Ac; exports.createTranscendConsentGotInstance = _chunk56QKBG2Rcjs.Bc; exports.createVendor = _chunk56QKBG2Rcjs.nf; exports.defineTranscendPrompts = ec; exports.deleteApiKey = _chunk56QKBG2Rcjs.Pd; exports.deployConsentManager = _chunk56QKBG2Rcjs.Cc; exports.description = _chunkDQCPGPXGcjs.l; exports.domainToHost = _chunkPGO2YKRXcjs.e; exports.downloadPrivacyRequestFiles = _chunk56QKBG2Rcjs.Df; exports.enrichPrivacyRequest = _chunk6TKTYQIFcjs.c; exports.ensureAllDataSubjectsExist = _chunk56QKBG2Rcjs.zd; exports.extractClientError = _chunk56QKBG2Rcjs.Lf; exports.extractErrorMessage = _chunk56QKBG2Rcjs._f; exports.fetchActiveSiloDiscoPlugin = _chunk56QKBG2Rcjs.Ec; exports.fetchAllActionItems = _chunk56QKBG2Rcjs.Fc; exports.fetchAllActions = _chunk56QKBG2Rcjs.Gc; exports.fetchAllAgentFiles = _chunk56QKBG2Rcjs.Hc; exports.fetchAllAgentFunctions = _chunk56QKBG2Rcjs.Ic; exports.fetchAllAgents = _chunk56QKBG2Rcjs.Jc; exports.fetchAllApiKeys = _chunk56QKBG2Rcjs.ud; exports.fetchAllAssessmentTemplates = _chunk56QKBG2Rcjs.Lc; exports.fetchAllAssessments = _chunk56QKBG2Rcjs.Kc; exports.fetchAllAttributeValues = _chunk56QKBG2Rcjs.Oc; exports.fetchAllAttributes = _chunk56QKBG2Rcjs.Qc; exports.fetchAllBusinessEntities = _chunk56QKBG2Rcjs.Rc; exports.fetchAllCatalogs = _chunk56QKBG2Rcjs.wd; exports.fetchAllCookies = _chunk56QKBG2Rcjs.Yc; exports.fetchAllDataCategories = _chunk56QKBG2Rcjs.Zc; exports.fetchAllDataFlows = _chunk56QKBG2Rcjs._c; exports.fetchAllDataPoints = _chunk56QKBG2Rcjs._d; exports.fetchAllDataSilos = _chunk56QKBG2Rcjs.Yd; exports.fetchAllDataSubjects = _chunk56QKBG2Rcjs.yd; exports.fetchAllEnrichers = _chunk56QKBG2Rcjs.ce; exports.fetchAllIdentifiers = _chunk56QKBG2Rcjs.xg; exports.fetchAllMessages = _chunk56QKBG2Rcjs.$c; exports.fetchAllPolicies = _chunk56QKBG2Rcjs.cd; exports.fetchAllPreferenceTopics = _chunk56QKBG2Rcjs.ed; exports.fetchAllPrivacyCenters = _chunk56QKBG2Rcjs.fd; exports.fetchAllProcessingActivities = _chunk56QKBG2Rcjs.gd; exports.fetchAllProcessingPurposes = _chunk56QKBG2Rcjs.hd; exports.fetchAllPromptGroups = _chunk56QKBG2Rcjs.Cd; exports.fetchAllPromptPartials = _chunk56QKBG2Rcjs.Dd; exports.fetchAllPromptThreads = _chunk56QKBG2Rcjs.Gd; exports.fetchAllPrompts = _chunk56QKBG2Rcjs.Ed; exports.fetchAllPurposes = _chunk56QKBG2Rcjs.id; exports.fetchAllPurposesAndPreferences = _chunk56QKBG2Rcjs.jd; exports.fetchAllRequestAttributeKeys = _chunk56QKBG2Rcjs.Nc; exports.fetchAllRequestEnrichers = _chunk56QKBG2Rcjs.kd; exports.fetchAllRequestIdentifierMetadata = _chunk56QKBG2Rcjs.ld; exports.fetchAllRequestIdentifiers = _chunk56QKBG2Rcjs.nd; exports.fetchAllRequests = _chunk56QKBG2Rcjs.qd; exports.fetchAllSiloDiscoveryResults = _chunk56QKBG2Rcjs.ie; exports.fetchAllSubDataPoints = _chunk56QKBG2Rcjs.Zd; exports.fetchAllTeams = _chunk56QKBG2Rcjs.rd; exports.fetchAllTemplates = _chunk56QKBG2Rcjs.ee; exports.fetchAllUsers = _chunk56QKBG2Rcjs.sd; exports.fetchAllVendors = _chunk56QKBG2Rcjs.td; exports.fetchAndIndexCatalogs = _chunk56QKBG2Rcjs.xd; exports.fetchApiKeys = _chunk56QKBG2Rcjs.vd; exports.fetchConsentManager = _chunk56QKBG2Rcjs.Sc; exports.fetchConsentManagerAnalyticsData = _chunk56QKBG2Rcjs.Wc; exports.fetchConsentManagerExperiences = _chunk56QKBG2Rcjs.Uc; exports.fetchConsentManagerId = _chunk56QKBG2Rcjs.Tc; exports.fetchConsentManagerTheme = _chunk56QKBG2Rcjs.Xc; exports.fetchEnrichedDataSilos = _chunk56QKBG2Rcjs.$d; exports.fetchIdentifiersAndCreateMissing = _chunk56QKBG2Rcjs.yg; exports.fetchPartitions = _chunk56QKBG2Rcjs.ge; exports.fetchPrivacyCenterId = _chunk56QKBG2Rcjs.bd; exports.fetchPrivacyCenterUrl = _chunk56QKBG2Rcjs.ad; exports.fetchPromptsWithVariables = _chunk56QKBG2Rcjs.Fd; exports.fetchRequestDataSilo = _chunk56QKBG2Rcjs.Jd; exports.fetchRequestDataSiloActiveCount = _chunk56QKBG2Rcjs.Kd; exports.fetchRequestDataSilos = _chunk56QKBG2Rcjs.Id; exports.fetchRequestDataSilosCount = _chunk56QKBG2Rcjs.Hd; exports.fetchRequestFilesForRequest = _chunk56QKBG2Rcjs.Ld; exports.filterNullishValuesFromObject = oc; exports.filterRows = _chunk56QKBG2Rcjs.wc; exports.formatAttributeValues = _chunk56QKBG2Rcjs.dd; exports.fuzzyMatchColumns = _chunk56QKBG2Rcjs.pc; exports.fuzzySearch = _chunk56QKBG2Rcjs.oc; exports.generateCrossAccountApiKeys = _chunkP5GD5LAKcjs.a; exports.getErrorStatus = _chunk56QKBG2Rcjs.Zf; exports.getFileMetadataForPrivacyRequests = _chunk56QKBG2Rcjs.Bf; exports.getGitFilesThatChanged = cc; exports.getUniqueValuesForColumn = _chunk56QKBG2Rcjs.vc; exports.initCsvFile = _chunk56QKBG2Rcjs.qg; exports.inquirerAutoComplete = _chunk56QKBG2Rcjs.Xf; exports.inquirerConfirmBoolean = _chunk56QKBG2Rcjs.Vf; exports.inquirerConfirmText = _chunk56QKBG2Rcjs.Wf; exports.limitRecords = _chunk56QKBG2Rcjs.cg; exports.listDirectories = _chunkP5GD5LAKcjs.d; exports.listFiles = _chunkP5GD5LAKcjs.c; exports.loginUser = _chunk56QKBG2Rcjs.Md; exports.makeGraphQLRequest = _chunk56QKBG2Rcjs.wg; exports.mapColumnsToAttributes = _chunk56QKBG2Rcjs.Kf; exports.mapColumnsToIdentifiers = _chunk56QKBG2Rcjs.If; exports.mapCsvColumnsToApi = _chunk56QKBG2Rcjs.sf; exports.mapCsvRowsToRequestInputs = _chunk56QKBG2Rcjs.xf; exports.mapEnumValues = _chunk56QKBG2Rcjs.qc; exports.mapRequestEnumValues = _chunk56QKBG2Rcjs.tf; exports.markCronIdentifierCompleted = _chunkIHUCIK5Tcjs.d; exports.markRequestDataSiloIdsCompleted = _chunkIHUCIK5Tcjs.f; exports.markSilentPrivacyRequests = _chunk56QKBG2Rcjs.rf; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkDQCPGPXGcjs.n; exports.normalizeIdentifierValue = _chunk56QKBG2Rcjs.wf; exports.notifyPrivacyRequestsAdditionalTime = _chunk56QKBG2Rcjs.Hf; exports.parquetToCsvOneFile = _chunk56QKBG2Rcjs.gg; exports.parseAssessmentDisplayLogic = _chunk56QKBG2Rcjs.Vd; exports.parseAssessmentRiskLogic = _chunk56QKBG2Rcjs.Xd; exports.parseAttributesFromString = _chunk56QKBG2Rcjs.tc; exports.parseFilePath = _chunk56QKBG2Rcjs.ug; exports.parseVariablesFromString = _chunk56QKBG2Rcjs.Yf; exports.pullAllDatapoints = _chunkLQUVB4MIcjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunkIHUCIK5Tcjs.g; exports.pullConsentManagerMetrics = _chunkPGO2YKRXcjs.d; exports.pullCronPageOfIdentifiers = _chunkIHUCIK5Tcjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunk6TKTYQIFcjs.a; exports.pullPrivacyRequests = _chunk56QKBG2Rcjs.Sf; exports.pullTranscendConfiguration = _chunk56QKBG2Rcjs.ke; exports.pullUnstructuredSubDataPointRecommendations = _chunkLQUVB4MIcjs.b; exports.pushCronIdentifiersFromCsv = _chunkIHUCIK5Tcjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunk6TKTYQIFcjs.d; exports.readCsv = _chunk56QKBG2Rcjs.uc; exports.readSafe = _chunk56QKBG2Rcjs.eg; exports.readTranscendYaml = _chunkJH5HRI6Dcjs.d; exports.removeLinks = nc; exports.removeUnverifiedRequestIdentifiers = _chunk56QKBG2Rcjs.Uf; exports.replaceVariablesInYaml = _chunkJH5HRI6Dcjs.c; exports.reportPromptRun = _chunk56QKBG2Rcjs.le; exports.restartPrivacyRequest = _chunk56QKBG2Rcjs.Nf; exports.retryRequestDataSilos = _chunk56QKBG2Rcjs.Rf; exports.retryRequestEnricher = _chunk56QKBG2Rcjs.me; exports.retrySamePromise = _chunk56QKBG2Rcjs.bg; exports.setResourceAttributes = _chunk56QKBG2Rcjs.ne; exports.skipPreflightJobs = _chunk56QKBG2Rcjs.Pf; exports.skipRequestDataSilos = _chunk56QKBG2Rcjs.Tf; exports.sleepPromise = _chunk56QKBG2Rcjs.$f; exports.splitCsvToList = _chunk56QKBG2Rcjs.rc; exports.splitInHalf = _chunk56QKBG2Rcjs.ag; exports.startOfHour = _chunk56QKBG2Rcjs.mg; exports.startOfUtcDay = _chunk56QKBG2Rcjs.lg; exports.streamPrivacyRequestFiles = _chunk56QKBG2Rcjs.Cf; exports.submitPrivacyRequest = _chunk56QKBG2Rcjs.Ff; exports.syncAction = _chunk56QKBG2Rcjs.oe; exports.syncActionItemCollections = _chunk56QKBG2Rcjs.re; exports.syncActionItems = _chunk56QKBG2Rcjs.ue; exports.syncAgentFiles = _chunk56QKBG2Rcjs.xe; exports.syncAgentFunctions = _chunk56QKBG2Rcjs.Ae; exports.syncAgents = _chunk56QKBG2Rcjs.De; exports.syncAttribute = _chunk56QKBG2Rcjs.Ee; exports.syncBusinessEntities = _chunk56QKBG2Rcjs.He; exports.syncCodePackages = _chunk56QKBG2Rcjs.Qe; exports.syncConfigurationToTranscend = _chunk56QKBG2Rcjs.zg; exports.syncConsentManager = _chunk56QKBG2Rcjs.Se; exports.syncConsentManagerExperiences = _chunk56QKBG2Rcjs.Re; exports.syncCookies = _chunk56QKBG2Rcjs.Ue; exports.syncDataCategories = _chunk56QKBG2Rcjs.Xe; exports.syncDataFlows = _chunk56QKBG2Rcjs._e; exports.syncDataSiloDependencies = _chunk56QKBG2Rcjs.be; exports.syncDataSilos = _chunk56QKBG2Rcjs.ae; exports.syncDataSubject = _chunk56QKBG2Rcjs.$e; exports.syncEnricher = _chunk56QKBG2Rcjs.de; exports.syncIdentifier = _chunk56QKBG2Rcjs.af; exports.syncIntlMessages = _chunk56QKBG2Rcjs.cf; exports.syncPartitions = _chunk56QKBG2Rcjs.he; exports.syncPolicies = _chunk56QKBG2Rcjs.ef; exports.syncPrivacyCenter = _chunk56QKBG2Rcjs.ff; exports.syncProcessingActivities = _chunk56QKBG2Rcjs.gf; exports.syncProcessingPurposes = _chunk56QKBG2Rcjs.jf; exports.syncPrompts = _chunk56QKBG2Rcjs.mf; exports.syncRepositories = _chunk56QKBG2Rcjs.Ne; exports.syncSoftwareDevelopmentKits = _chunk56QKBG2Rcjs.Ke; exports.syncTemplate = _chunk56QKBG2Rcjs.fe; exports.syncVendors = _chunk56QKBG2Rcjs.pf; exports.updateActionItem = _chunk56QKBG2Rcjs.te; exports.updateActionItemCollection = _chunk56QKBG2Rcjs.qe; exports.updateAgentFiles = _chunk56QKBG2Rcjs.we; exports.updateAgentFunctions = _chunk56QKBG2Rcjs.ze; exports.updateAgents = _chunk56QKBG2Rcjs.Ce; exports.updateBusinessEntities = _chunk56QKBG2Rcjs.Ge; exports.updateCodePackages = _chunk56QKBG2Rcjs.Pe; exports.updateConsentManagerToLatest = _chunk56QKBG2Rcjs.Dc; exports.updateConsentManagerVersionToLatest = _chunkPGO2YKRXcjs.a; exports.updateDataCategories = _chunk56QKBG2Rcjs.We; exports.updateDataFlows = _chunk56QKBG2Rcjs.Ye; exports.updateIntlMessages = _chunk56QKBG2Rcjs.bf; exports.updateOrCreateCookies = _chunk56QKBG2Rcjs.Te; exports.updatePolicies = _chunk56QKBG2Rcjs.df; exports.updateProcessingPurposes = _chunk56QKBG2Rcjs.if; exports.updatePrompts = _chunk56QKBG2Rcjs.lf; exports.updateRepositories = _chunk56QKBG2Rcjs.Me; exports.updateSoftwareDevelopmentKits = _chunk56QKBG2Rcjs.Je; exports.updateVendors = _chunk56QKBG2Rcjs.of; exports.uploadConsents = _chunkD3VRD5F5cjs.d; exports.uploadCookiesFromCsv = _chunkPGO2YKRXcjs.c; exports.uploadDataFlowsFromCsv = _chunkPGO2YKRXcjs.b; exports.uploadPrivacyRequestsFromCsv = _chunk56QKBG2Rcjs.Mf; exports.uploadSiloDiscoveryResults = _chunk56QKBG2Rcjs.qf; exports.validateTranscendAuth = _chunkP5GD5LAKcjs.b; exports.version = _chunkDQCPGPXGcjs.m; exports.writeCsv = _chunk56QKBG2Rcjs.tg; exports.writeCsvSync = _chunk56QKBG2Rcjs.pg; exports.writeLargeCsv = _chunk56QKBG2Rcjs.vg; exports.writeTranscendYaml = _chunkJH5HRI6Dcjs.e;
|
|
5
5
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/index.cjs","../src/lib/ai/TranscendPromptManager.ts","../src/lib/graphql/fetchLargeLanguageModels.ts","../src/lib/ai/getGitFilesThatChanged.ts"],"names":["PAGE_SIZE","fetchAllLargeLanguageModels","client","largeLanguageModels","offset","shouldContinue","nodes","makeGraphQLRequest","LARGE_LANGUAGE_MODELS","a","b","createRegexForTag","tagName","defineTranscendPrompts","prompts","jsonParseSafe","obj","TranscendPromptManager","handlebarsOptions","transcendUrl","DEFAULT_TRANSCEND_API","transcendApiKey","requireApproval","cacheDuration","defaultVariables","buildTranscendGraphQLClient","createHandlebarsWithHelpers","promptDefinitions","getValues","promptIds","id","x","promptTitles","title","agentNames","uniq_default","response","agents","fetchPromptsWithVariables","fetchAllAgents","keyBy_default","model","promptByTitle","promptById","acc","v","partial","apply","result","name","agent","remoteAgent","ts","thread","fetchAllPromptThreads","names","hasCache","missingCache","groupBy_default","cachedAgents","chunkedNames","chunk_default","remoteAgents","mapSeries","chunkedName","pageOfAgents","filterBy","fetchAllAgentFiles","largeLanguageModel","matching"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/index.cjs","sourcesContent":[null,"/* eslint-disable max-lines */\nimport {\n Optionalize,\n Requirize,\n apply,\n decodeCodec,\n getValues,\n} from '@transcend-io/type-utils';\nimport type { Handlebars } from '@transcend-io/handlebars-utils';\nimport { Secret } from '@transcend-io/secret-value';\nimport * as t from 'io-ts';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport {\n Agent,\n AgentFile,\n AgentFileFilterBy,\n ReportPromptRunInput,\n buildTranscendGraphQLClient,\n fetchAllAgentFiles,\n fetchAllAgents,\n reportPromptRun,\n} from '../graphql';\nimport {\n HandlebarsInput,\n createHandlebarsWithHelpers,\n} from '@transcend-io/handlebars-utils';\nimport {\n TranscendPromptTemplated,\n TranscendPromptsAndVariables,\n fetchPromptsWithVariables,\n} from '../graphql/fetchPrompts';\nimport { GraphQLClient } from 'graphql-request';\nimport {\n PromptStatus,\n ChatCompletionRole,\n PromptRunProductArea,\n QueueStatus,\n LargeLanguageModelClient,\n} from '@transcend-io/privacy-types';\nimport {\n LargeLanguageModel,\n fetchAllLargeLanguageModels,\n} from '../graphql/fetchLargeLanguageModels';\nimport { groupBy, keyBy, uniq, chunk } from 'lodash-es';\nimport { mapSeries } from 'bluebird';\nimport {\n PromptThread,\n fetchAllPromptThreads,\n} from '../graphql/fetchPromptThreads';\n\n/**\n * An LLM Prompt definition\n */\nexport type TranscendPrompt<\n TInputParams extends t.Any,\n TOutputCodec extends t.Any,\n> = (\n | {\n /** ID of the prompt */\n id: string;\n /** Title of the prompt */\n title?: string;\n }\n | {\n /** ID of the prompt */\n id?: string;\n /** Title of the prompt */\n title: string;\n }\n) & {\n /** The names of the agents that should be loaded along with the prompt */\n agentNames?: string[];\n /** Codec to validate runtime input shape */\n paramCodec: TInputParams;\n /** Codec to validate output response */\n outputCodec: TOutputCodec;\n /**\n * If the output that needs to be parsed is returned within a tag\n * e.g. <tag> or <json> - this is the name of the tag\n */\n extractFromTag?: string;\n};\n\nexport interface PromptRunResult {\n /** The ID of the prompt run created on Transcend */\n promptRunId: string;\n /** The URL of the prompt run on Transcend */\n promptRunUrl: string;\n}\n\n/**\n * Create a regex to extract data from a tag\n *\n * Input:\n * \"here is some data <tag>Data</tag>...\"\n *\n * @param tagName - Name of tag\n * @returns Data within the tag\n */\nexport function createRegexForTag(tagName: string): RegExp {\n return new RegExp(`<${tagName}>([\\\\s\\\\S]+?)<\\\\/${tagName}>`);\n}\n\n/**\n * Helper function to declare prompts\n *\n * @param prompts - Prompt config\n * @returns Prompts as identity function - but type enforced\n */\nexport function defineTranscendPrompts<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n>(prompts: TPrompts): TPrompts {\n return prompts;\n}\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptParamType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['paramCodec']>;\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptResponseType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n\n/**\n * Input for reporting a prompt run\n */\nexport interface ReportPromptRunOptions\n extends Optionalize<\n Omit<ReportPromptRunInput, 'status' | 'promptId' | 'largeLanguageModelId'>,\n 'name' | 'productArea'\n > {\n /** The large language model being run. Either the ID of the LLM or the client/name pairing */\n largeLanguageModel:\n | string\n | {\n /** Name of client */\n client: LargeLanguageModelClient;\n /** Name of the model */\n name: string;\n };\n}\n\nconst jsonParseSafe = (obj: string): unknown => {\n try {\n return JSON.parse(obj);\n } catch (e) {\n return obj;\n }\n};\n\n/**\n * A class that is capable of loading and insert variables into prompts from\n * Transcend's Prompt Manager\n */\nexport class TranscendPromptManager<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n> {\n /** Prompt definitions */\n public prompts: TPrompts;\n\n /** Options for configuring handlebars */\n public handlebarsOptions!: HandlebarsInput;\n\n /** Prompt name -> content map, populated by call to Transcend API */\n public promptContentMap?: { [k in TPromptNames]: TranscendPromptTemplated };\n\n /** The large language models that are registered to this organization for reporting */\n public largeLanguageModels: LargeLanguageModel[] = [];\n\n /** The agent definitions registered to this organization */\n private agentsByName: { [name in string]: Agent } = {};\n\n /** The agent definitions registered to this organization */\n private agentsByAgentId: { [id in string]: Agent } = {};\n\n /** The GraphQL client that can be used to call Transcend */\n public graphQLClient: GraphQLClient;\n\n /** The set of variables to expose in handlebars context specified at class initiation */\n public defaultVariables: { [k in string]: unknown };\n\n /**\n * The set of variables to expose in handlebars context,\n * merges defaults with calculated variables from the inventory\n */\n public variables: { [k in string]: unknown };\n\n /** Handlebars compiler */\n public handlebars: typeof Handlebars;\n\n /** The Transcend API key */\n public transcendApiKey: string | Secret<string>;\n\n /** API of Transcend to call */\n public transcendUrl: string;\n\n /** When true, throw an error if the prompt is not approved */\n public requireApproval: boolean;\n\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n public cacheDuration?: number;\n\n /**\n * The last time the metadata was fetched\n */\n public lastUpdatedAt?: Date;\n\n /**\n * Constructor\n *\n * @param options - Options\n */\n constructor({\n prompts,\n handlebarsOptions = {},\n transcendUrl = DEFAULT_TRANSCEND_API,\n transcendApiKey,\n requireApproval = true,\n cacheDuration,\n defaultVariables = {},\n }: {\n /** Prompt definitions to load */\n prompts: TPrompts;\n /** Options for configuring handlebars */\n handlebarsOptions?: HandlebarsInput;\n /** The Transcend API key */\n transcendApiKey: string | Secret<string>;\n /** API of Transcend to call */\n transcendUrl?: string;\n /** When true, throw an error if the prompt is not approved */\n requireApproval?: boolean;\n /** The set of variables to expose in handlebars context specified at class initiation */\n defaultVariables?: { [k in string]: unknown };\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n cacheDuration?: number;\n }) {\n this.prompts = prompts;\n this.transcendUrl = transcendUrl;\n this.transcendApiKey = transcendApiKey;\n this.variables = defaultVariables;\n this.defaultVariables = defaultVariables;\n this.graphQLClient = buildTranscendGraphQLClient(\n transcendUrl,\n typeof transcendApiKey === 'object'\n ? transcendApiKey.release()\n : transcendApiKey,\n );\n this.requireApproval = requireApproval;\n this.cacheDuration = cacheDuration;\n this.handlebarsOptions = handlebarsOptions;\n this.handlebars = createHandlebarsWithHelpers(handlebarsOptions);\n }\n\n /**\n * Fetch prompt metadata from Transcend and cache to the class definition\n *\n * @returns A function that can be used to call the prompt\n */\n async fetchPromptsAndMetadata(): Promise<TranscendPromptsAndVariables> {\n // Determine what to fetch\n const promptDefinitions = getValues(this.prompts) as TranscendPrompt<\n t.Any,\n t.Any\n >[];\n const promptIds = promptDefinitions\n .map(({ id }) => id)\n .filter((x): x is string => !!x);\n const promptTitles = promptDefinitions\n .map(({ title }) => title)\n .filter((x): x is string => !!x);\n const agentNames = uniq(\n promptDefinitions.map(({ agentNames }) => agentNames || []).flat(),\n );\n\n // Fetch prompts and data\n const [response, largeLanguageModels, agents] = await Promise.all([\n fetchPromptsWithVariables(this.graphQLClient, {\n promptIds,\n promptTitles,\n }),\n fetchAllLargeLanguageModels(this.graphQLClient),\n fetchAllAgents(this.graphQLClient, { names: agentNames }),\n ]);\n this.agentsByName = keyBy(agents, 'name');\n this.agentsByAgentId = keyBy(agents, 'agentId');\n this.largeLanguageModels = largeLanguageModels.filter(\n (model) => model.isTranscendHosted === false,\n );\n\n // Lookup prompts by id/title\n const promptByTitle = keyBy(response.prompts, 'title');\n const promptById = keyBy(response.prompts, 'id');\n\n // Update variables\n this.variables = {\n ...response.calculatedVariables.reduce(\n (acc, v) =>\n Object.assign(acc, {\n [v.name]: v.data ? JSON.parse(v.data) : v.data,\n }),\n {},\n ),\n ...this.defaultVariables,\n };\n\n // Update partials\n this.handlebars = createHandlebarsWithHelpers({\n ...this.handlebarsOptions,\n templates: [\n ...(this.handlebarsOptions.templates || []),\n ...response.promptPartials.map((partial) => ({\n name: partial.slug,\n content: partial.content,\n })),\n ],\n });\n\n // Create mapping from prompt to content\n this.promptContentMap = apply(this.prompts, ({ id, title }) => {\n const result = id\n ? promptById[id]\n : title\n ? promptByTitle[title]\n : undefined;\n if (!result) {\n throw new Error(\n `Failed to find prompt with title: \"${title}\" and id: \"${id}\"`,\n );\n }\n return result;\n });\n\n // For cache\n this.lastUpdatedAt = new Date();\n\n return response;\n }\n\n /**\n * Get an agent definition by name\n *\n * @param name - Name of the agent to grab\n * @returns Large language model configuration\n */\n async getAgentByName(name: string): Promise<Agent | undefined> {\n const agent = this.agentsByName[name];\n if (agent) {\n return agent;\n }\n const [remoteAgent] = await fetchAllAgents(this.graphQLClient, {\n names: [name],\n });\n if (!remoteAgent) {\n return undefined;\n }\n this.agentsByName[remoteAgent.name] = remoteAgent;\n this.agentsByAgentId[remoteAgent.agentId] = remoteAgent;\n return remoteAgent;\n }\n\n /**\n * Get a prompt thread by ts\n *\n * @param ts - the slack message timestamp to look up thread for\n * @returns Large language model configuration\n */\n async getPromptThreadBySlackTs(\n ts: string,\n ): Promise<PromptThread | undefined> {\n const [thread] = await fetchAllPromptThreads(this.graphQLClient, {\n slackMessageTs: [ts],\n });\n return thread;\n }\n\n /**\n * Get a list of agent definitions by name.\n * Pulls from cache and may return less agents\n * than requested if some are not found\n *\n * @param names - Names of agents to fetch\n * @returns The agents that were found matching the names\n */\n async getAgentsByName(names: string[]): Promise<Agent[]> {\n if (names.length < 1) {\n throw new Error('Expected at least one name to be provided');\n }\n const { hasCache = [], missingCache = [] } = groupBy(names, (name) =>\n this.agentsByName[name] ? 'hasCache' : 'missingCache',\n );\n const cachedAgents = hasCache.map((name) => this.agentsByName[name]);\n if (missingCache.length === 0) {\n return cachedAgents;\n }\n const chunkedNames = chunk(missingCache, 50);\n const remoteAgents: Agent[] = [];\n await mapSeries(chunkedNames, async (chunkedName) => {\n const pageOfAgents = await fetchAllAgents(this.graphQLClient, {\n names: chunkedName,\n });\n pageOfAgents.forEach((agent) => {\n this.agentsByName[agent.name] = agent;\n this.agentsByAgentId[agent.agentId] = agent;\n });\n remoteAgents.push(...pageOfAgents);\n });\n return [...cachedAgents, ...remoteAgents];\n }\n\n /**\n * Fetch metadata on agent files\n *\n * @param filterBy - Filter by parameters\n * @returns The files found matching the filter\n */\n getAgentFiles(filterBy: AgentFileFilterBy): Promise<AgentFile[]> {\n return fetchAllAgentFiles(this.graphQLClient, filterBy);\n }\n\n /**\n * Look up the large language model to report on\n *\n * @param largeLanguageModel - Input\n * @returns Large language model configuration\n */\n getLargeLanguageModel(\n largeLanguageModel: ReportPromptRunOptions['largeLanguageModel'],\n ): LargeLanguageModel {\n const matching = this.largeLanguageModels.find((model) =>\n typeof largeLanguageModel === 'string'\n ? model.id === largeLanguageModel\n : model.name === largeLanguageModel.name &&\n model.client === largeLanguageModel.client,\n );\n if (!matching) {\n throw new Error(\n `Failed to find model matching: ${\n typeof largeLanguageModel === 'string'\n ? largeLanguageModel\n : JSON.stringify(largeLanguageModel)\n }`,\n );\n }\n return matching;\n }\n\n /**\n * Get a prompt definition by name\n *\n * @param promptName - Prompt to compile\n * @returns Parsed content\n */\n async getPromptDefinition<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n ): Promise<TranscendPromptTemplated> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n // Lookup prompt\n const { promptContentMap } = this;\n if (!promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n const promptTemplate = promptContentMap[promptName];\n if (!promptTemplate) {\n throw new Error(\n `Expected this.promptContentMap[${promptName}] to be defined`,\n );\n }\n return promptTemplate;\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to compile\n * @param params - Runtime parameters\n * @returns Parsed content\n */\n async compilePrompt<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n params: t.TypeOf<TPrompts[TPromptName]['paramCodec']>,\n ): Promise<string> {\n // Grab the prompt\n const promptTemplate = await this.getPromptDefinition(promptName);\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure prompt is approved\n if (\n this.requireApproval &&\n promptTemplate.status !== PromptStatus.Approved\n ) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because its in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // If prompt is rejected, throw error\n if (promptTemplate.status === PromptStatus.Rejected) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because it's in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // Validate params\n decodeCodec(promptInput.paramCodec, params);\n\n // Compile prompt and template\n return this.handlebars.compile(promptTemplate.content)({\n // template in currentDate by default\n currentDate: new Date().toISOString(),\n ...this.variables,\n ...params,\n });\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to parse\n * @param response - AI response as string\n * @returns Parsed content\n */\n parseAiResponse<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n response: string,\n ): t.TypeOf<TPrompts[TPromptName]['outputCodec']> {\n // Look up prompt info\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Extract from tag if needed\n const extracted = promptInput.extractFromTag\n ? (createRegexForTag(promptInput.extractFromTag).exec(response) ||\n [])[1] || response\n : response;\n\n // Parse via codec\n return decodeCodec(\n promptInput.outputCodec,\n jsonParseSafe(extracted),\n false,\n );\n }\n\n /**\n * Parse the AI response and report back to Transcend\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportAndParsePromptRun<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n { largeLanguageModel, ...options }: ReportPromptRunOptions,\n ): Promise<\n PromptRunResult & {\n /** Resulting prompt run */\n result: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n }\n > {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n if (\n options.promptRunMessages[options.promptRunMessages.length - 1].role !==\n ChatCompletionRole.Assistant\n ) {\n throw new Error(\n `promptRunMessages[${\n options.promptRunMessages.length - 1\n }].role is expected to be = ${ChatCompletionRole.Assistant}`,\n );\n }\n const response =\n options.promptRunMessages[options.promptRunMessages.length - 1].content;\n\n let parsed: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n try {\n // Parse the response\n parsed = this.parseAiResponse(promptName, response);\n } catch (err) {\n await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n error: err.message,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n throw err;\n }\n\n // report successful run\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Resolved,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n result: parsed,\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n\n /**\n * Report an error for a particular prompt\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportPromptRunError<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n {\n largeLanguageModel,\n ...options\n }: Requirize<ReportPromptRunOptions, 'error'>,\n ): Promise<PromptRunResult> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n}\n/* eslint-enable max-lines */\n","import { GraphQLClient } from 'graphql-request';\nimport { LargeLanguageModelClient } from '@transcend-io/privacy-types';\nimport { LARGE_LANGUAGE_MODELS } from './gqls';\nimport { makeGraphQLRequest } from './makeGraphQLRequest';\n\nexport interface LargeLanguageModel {\n /** ID of prompts */\n id: string;\n /** The name of the large language model. */\n name: string;\n /** The content of the prompt template. */\n client: LargeLanguageModelClient;\n /** Whether hosted by Transcend or not */\n isTranscendHosted: boolean;\n}\n\nconst PAGE_SIZE = 20;\n\n/**\n * Fetch all LargeLanguageModels in the organization\n *\n * @param client - GraphQL client\n * @returns All LargeLanguageModels in the organization\n */\nexport async function fetchAllLargeLanguageModels(\n client: GraphQLClient,\n): Promise<LargeLanguageModel[]> {\n const largeLanguageModels: LargeLanguageModel[] = [];\n let offset = 0;\n\n // Whether to continue looping\n let shouldContinue = false;\n do {\n const {\n largeLanguageModels: { nodes },\n } = await makeGraphQLRequest<{\n /** LargeLanguageModels */\n largeLanguageModels: {\n /** List */\n nodes: LargeLanguageModel[];\n };\n }>(client, LARGE_LANGUAGE_MODELS, {\n first: PAGE_SIZE,\n offset,\n });\n largeLanguageModels.push(...nodes);\n offset += PAGE_SIZE;\n shouldContinue = nodes.length === PAGE_SIZE;\n } while (shouldContinue);\n\n return largeLanguageModels.sort((a, b) => a.name.localeCompare(b.name));\n}\n","import { difference } from 'lodash-es';\nimport fastGlob from 'fast-glob';\nimport { execSync } from 'child_process';\n\n/**\n * Function thats gets the git files that have changed\n * and returns the code\n *\n * @param options - Options\n * @returns Changes files and diffs\n */\nexport function getGitFilesThatChanged({\n baseBranch,\n rootDirectory,\n githubRepo,\n excludedGlob = [],\n fileBlockList = [],\n}: {\n /** Base branch */\n baseBranch: string;\n /** Github repo name */\n githubRepo: string;\n /** Root directory */\n rootDirectory: string;\n /** A glob that excludes files */\n excludedGlob?: string[];\n /** Block list of files to not process */\n fileBlockList?: string[];\n}): {\n /** The list of files that changed */\n changedFiles: string[];\n /** Github repo name */\n repoName: string;\n /** Current commit */\n commit: string;\n /** File diffs */\n fileDiffs: { [k in string]: string };\n} {\n // Pull base branch\n execSync(`git fetch origin ${baseBranch}`);\n\n // Latest commit on base branch. If we are on the base branch, we take the prior commit\n const latestBasedCommit = execSync(\n `git ls-remote ${githubRepo} \"refs/heads/${baseBranch}\" | cut -f 1`,\n { encoding: 'utf-8' },\n ).split('\\n')[0];\n\n // This commit\n const latestThisCommit = execSync('git rev-parse HEAD', {\n encoding: 'utf-8',\n }).split('\\n')[0];\n\n // Ensure commits are present\n if (!latestBasedCommit || !latestThisCommit) {\n throw new Error('FAILED TO FIND COMMIT RANGE');\n }\n\n // Get the diff between the given branch and base branch\n const diff = execSync(\n `git fetch && git diff --name-only \"${\n baseBranch || latestBasedCommit\n }...${latestThisCommit}\" -- ${rootDirectory}`,\n { encoding: 'utf-8' },\n );\n\n // Filter out block list\n const changedFiles = difference(\n diff.split('\\n').filter((f) => f),\n fileBlockList,\n );\n\n // Filter out globs\n const filteredChanges =\n excludedGlob.length > 0\n ? fastGlob.sync(changedFiles, { ignore: excludedGlob })\n : changedFiles;\n\n // Get the contents of only the changed files\n const fileDiffs: { [k in string]: string } = {};\n filteredChanges.forEach((file) => {\n const contents = execSync(`git show ${latestThisCommit}:${file}`, {\n encoding: 'utf-8',\n });\n fileDiffs[file] = contents;\n });\n\n // Pull the github repo name\n const repoName = githubRepo.split('/').pop()!.split('.')[0];\n\n return {\n changedFiles,\n fileDiffs,\n repoName,\n commit: latestThisCommit,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/index.cjs","../src/lib/ai/TranscendPromptManager.ts","../src/lib/graphql/fetchLargeLanguageModels.ts","../src/lib/ai/getGitFilesThatChanged.ts"],"names":["PAGE_SIZE","fetchAllLargeLanguageModels","client","largeLanguageModels","offset","shouldContinue","nodes","makeGraphQLRequest","LARGE_LANGUAGE_MODELS","a","b","createRegexForTag","tagName","defineTranscendPrompts","prompts","jsonParseSafe","obj","TranscendPromptManager","handlebarsOptions","transcendUrl","DEFAULT_TRANSCEND_API","transcendApiKey","requireApproval","cacheDuration","defaultVariables","buildTranscendGraphQLClient","createHandlebarsWithHelpers","promptDefinitions","getValues","promptIds","id","x","promptTitles","title","agentNames","uniq_default","response","agents","fetchPromptsWithVariables","fetchAllAgents","keyBy_default","model","promptByTitle","promptById","acc","v","partial","apply","result","name","agent","remoteAgent","ts","thread","fetchAllPromptThreads","names","hasCache","missingCache","groupBy_default","cachedAgents","chunkedNames","chunk_default","remoteAgents","mapSeries","chunkedName","pageOfAgents","filterBy","fetchAllAgentFiles","largeLanguageModel","matching"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/index.cjs","sourcesContent":[null,"/* eslint-disable max-lines */\nimport {\n Optionalize,\n Requirize,\n apply,\n decodeCodec,\n getValues,\n} from '@transcend-io/type-utils';\nimport type { Handlebars } from '@transcend-io/handlebars-utils';\nimport { Secret } from '@transcend-io/secret-value';\nimport * as t from 'io-ts';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport {\n Agent,\n AgentFile,\n AgentFileFilterBy,\n ReportPromptRunInput,\n buildTranscendGraphQLClient,\n fetchAllAgentFiles,\n fetchAllAgents,\n reportPromptRun,\n} from '../graphql';\nimport {\n HandlebarsInput,\n createHandlebarsWithHelpers,\n} from '@transcend-io/handlebars-utils';\nimport {\n TranscendPromptTemplated,\n TranscendPromptsAndVariables,\n fetchPromptsWithVariables,\n} from '../graphql/fetchPrompts';\nimport { GraphQLClient } from 'graphql-request';\nimport {\n PromptStatus,\n ChatCompletionRole,\n PromptRunProductArea,\n QueueStatus,\n LargeLanguageModelClient,\n} from '@transcend-io/privacy-types';\nimport {\n LargeLanguageModel,\n fetchAllLargeLanguageModels,\n} from '../graphql/fetchLargeLanguageModels';\nimport { groupBy, keyBy, uniq, chunk } from 'lodash-es';\nimport { mapSeries } from '../bluebird';\nimport {\n PromptThread,\n fetchAllPromptThreads,\n} from '../graphql/fetchPromptThreads';\n\n/**\n * An LLM Prompt definition\n */\nexport type TranscendPrompt<\n TInputParams extends t.Any,\n TOutputCodec extends t.Any,\n> = (\n | {\n /** ID of the prompt */\n id: string;\n /** Title of the prompt */\n title?: string;\n }\n | {\n /** ID of the prompt */\n id?: string;\n /** Title of the prompt */\n title: string;\n }\n) & {\n /** The names of the agents that should be loaded along with the prompt */\n agentNames?: string[];\n /** Codec to validate runtime input shape */\n paramCodec: TInputParams;\n /** Codec to validate output response */\n outputCodec: TOutputCodec;\n /**\n * If the output that needs to be parsed is returned within a tag\n * e.g. <tag> or <json> - this is the name of the tag\n */\n extractFromTag?: string;\n};\n\nexport interface PromptRunResult {\n /** The ID of the prompt run created on Transcend */\n promptRunId: string;\n /** The URL of the prompt run on Transcend */\n promptRunUrl: string;\n}\n\n/**\n * Create a regex to extract data from a tag\n *\n * Input:\n * \"here is some data <tag>Data</tag>...\"\n *\n * @param tagName - Name of tag\n * @returns Data within the tag\n */\nexport function createRegexForTag(tagName: string): RegExp {\n return new RegExp(`<${tagName}>([\\\\s\\\\S]+?)<\\\\/${tagName}>`);\n}\n\n/**\n * Helper function to declare prompts\n *\n * @param prompts - Prompt config\n * @returns Prompts as identity function - but type enforced\n */\nexport function defineTranscendPrompts<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n>(prompts: TPrompts): TPrompts {\n return prompts;\n}\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptParamType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['paramCodec']>;\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptResponseType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n\n/**\n * Input for reporting a prompt run\n */\nexport interface ReportPromptRunOptions\n extends Optionalize<\n Omit<ReportPromptRunInput, 'status' | 'promptId' | 'largeLanguageModelId'>,\n 'name' | 'productArea'\n > {\n /** The large language model being run. Either the ID of the LLM or the client/name pairing */\n largeLanguageModel:\n | string\n | {\n /** Name of client */\n client: LargeLanguageModelClient;\n /** Name of the model */\n name: string;\n };\n}\n\nconst jsonParseSafe = (obj: string): unknown => {\n try {\n return JSON.parse(obj);\n } catch (e) {\n return obj;\n }\n};\n\n/**\n * A class that is capable of loading and insert variables into prompts from\n * Transcend's Prompt Manager\n */\nexport class TranscendPromptManager<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n> {\n /** Prompt definitions */\n public prompts: TPrompts;\n\n /** Options for configuring handlebars */\n public handlebarsOptions!: HandlebarsInput;\n\n /** Prompt name -> content map, populated by call to Transcend API */\n public promptContentMap?: { [k in TPromptNames]: TranscendPromptTemplated };\n\n /** The large language models that are registered to this organization for reporting */\n public largeLanguageModels: LargeLanguageModel[] = [];\n\n /** The agent definitions registered to this organization */\n private agentsByName: { [name in string]: Agent } = {};\n\n /** The agent definitions registered to this organization */\n private agentsByAgentId: { [id in string]: Agent } = {};\n\n /** The GraphQL client that can be used to call Transcend */\n public graphQLClient: GraphQLClient;\n\n /** The set of variables to expose in handlebars context specified at class initiation */\n public defaultVariables: { [k in string]: unknown };\n\n /**\n * The set of variables to expose in handlebars context,\n * merges defaults with calculated variables from the inventory\n */\n public variables: { [k in string]: unknown };\n\n /** Handlebars compiler */\n public handlebars: typeof Handlebars;\n\n /** The Transcend API key */\n public transcendApiKey: string | Secret<string>;\n\n /** API of Transcend to call */\n public transcendUrl: string;\n\n /** When true, throw an error if the prompt is not approved */\n public requireApproval: boolean;\n\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n public cacheDuration?: number;\n\n /**\n * The last time the metadata was fetched\n */\n public lastUpdatedAt?: Date;\n\n /**\n * Constructor\n *\n * @param options - Options\n */\n constructor({\n prompts,\n handlebarsOptions = {},\n transcendUrl = DEFAULT_TRANSCEND_API,\n transcendApiKey,\n requireApproval = true,\n cacheDuration,\n defaultVariables = {},\n }: {\n /** Prompt definitions to load */\n prompts: TPrompts;\n /** Options for configuring handlebars */\n handlebarsOptions?: HandlebarsInput;\n /** The Transcend API key */\n transcendApiKey: string | Secret<string>;\n /** API of Transcend to call */\n transcendUrl?: string;\n /** When true, throw an error if the prompt is not approved */\n requireApproval?: boolean;\n /** The set of variables to expose in handlebars context specified at class initiation */\n defaultVariables?: { [k in string]: unknown };\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n cacheDuration?: number;\n }) {\n this.prompts = prompts;\n this.transcendUrl = transcendUrl;\n this.transcendApiKey = transcendApiKey;\n this.variables = defaultVariables;\n this.defaultVariables = defaultVariables;\n this.graphQLClient = buildTranscendGraphQLClient(\n transcendUrl,\n typeof transcendApiKey === 'object'\n ? transcendApiKey.release()\n : transcendApiKey,\n );\n this.requireApproval = requireApproval;\n this.cacheDuration = cacheDuration;\n this.handlebarsOptions = handlebarsOptions;\n this.handlebars = createHandlebarsWithHelpers(handlebarsOptions);\n }\n\n /**\n * Fetch prompt metadata from Transcend and cache to the class definition\n *\n * @returns A function that can be used to call the prompt\n */\n async fetchPromptsAndMetadata(): Promise<TranscendPromptsAndVariables> {\n // Determine what to fetch\n const promptDefinitions = getValues(this.prompts) as TranscendPrompt<\n t.Any,\n t.Any\n >[];\n const promptIds = promptDefinitions\n .map(({ id }) => id)\n .filter((x): x is string => !!x);\n const promptTitles = promptDefinitions\n .map(({ title }) => title)\n .filter((x): x is string => !!x);\n const agentNames = uniq(\n promptDefinitions.map(({ agentNames }) => agentNames || []).flat(),\n );\n\n // Fetch prompts and data\n const [response, largeLanguageModels, agents] = await Promise.all([\n fetchPromptsWithVariables(this.graphQLClient, {\n promptIds,\n promptTitles,\n }),\n fetchAllLargeLanguageModels(this.graphQLClient),\n fetchAllAgents(this.graphQLClient, { names: agentNames }),\n ]);\n this.agentsByName = keyBy(agents, 'name');\n this.agentsByAgentId = keyBy(agents, 'agentId');\n this.largeLanguageModels = largeLanguageModels.filter(\n (model) => model.isTranscendHosted === false,\n );\n\n // Lookup prompts by id/title\n const promptByTitle = keyBy(response.prompts, 'title');\n const promptById = keyBy(response.prompts, 'id');\n\n // Update variables\n this.variables = {\n ...response.calculatedVariables.reduce(\n (acc, v) =>\n Object.assign(acc, {\n [v.name]: v.data ? JSON.parse(v.data) : v.data,\n }),\n {},\n ),\n ...this.defaultVariables,\n };\n\n // Update partials\n this.handlebars = createHandlebarsWithHelpers({\n ...this.handlebarsOptions,\n templates: [\n ...(this.handlebarsOptions.templates || []),\n ...response.promptPartials.map((partial) => ({\n name: partial.slug,\n content: partial.content,\n })),\n ],\n });\n\n // Create mapping from prompt to content\n this.promptContentMap = apply(this.prompts, ({ id, title }) => {\n const result = id\n ? promptById[id]\n : title\n ? promptByTitle[title]\n : undefined;\n if (!result) {\n throw new Error(\n `Failed to find prompt with title: \"${title}\" and id: \"${id}\"`,\n );\n }\n return result;\n });\n\n // For cache\n this.lastUpdatedAt = new Date();\n\n return response;\n }\n\n /**\n * Get an agent definition by name\n *\n * @param name - Name of the agent to grab\n * @returns Large language model configuration\n */\n async getAgentByName(name: string): Promise<Agent | undefined> {\n const agent = this.agentsByName[name];\n if (agent) {\n return agent;\n }\n const [remoteAgent] = await fetchAllAgents(this.graphQLClient, {\n names: [name],\n });\n if (!remoteAgent) {\n return undefined;\n }\n this.agentsByName[remoteAgent.name] = remoteAgent;\n this.agentsByAgentId[remoteAgent.agentId] = remoteAgent;\n return remoteAgent;\n }\n\n /**\n * Get a prompt thread by ts\n *\n * @param ts - the slack message timestamp to look up thread for\n * @returns Large language model configuration\n */\n async getPromptThreadBySlackTs(\n ts: string,\n ): Promise<PromptThread | undefined> {\n const [thread] = await fetchAllPromptThreads(this.graphQLClient, {\n slackMessageTs: [ts],\n });\n return thread;\n }\n\n /**\n * Get a list of agent definitions by name.\n * Pulls from cache and may return less agents\n * than requested if some are not found\n *\n * @param names - Names of agents to fetch\n * @returns The agents that were found matching the names\n */\n async getAgentsByName(names: string[]): Promise<Agent[]> {\n if (names.length < 1) {\n throw new Error('Expected at least one name to be provided');\n }\n const { hasCache = [], missingCache = [] } = groupBy(names, (name) =>\n this.agentsByName[name] ? 'hasCache' : 'missingCache',\n );\n const cachedAgents = hasCache.map((name) => this.agentsByName[name]);\n if (missingCache.length === 0) {\n return cachedAgents;\n }\n const chunkedNames = chunk(missingCache, 50);\n const remoteAgents: Agent[] = [];\n await mapSeries(chunkedNames, async (chunkedName) => {\n const pageOfAgents = await fetchAllAgents(this.graphQLClient, {\n names: chunkedName,\n });\n pageOfAgents.forEach((agent) => {\n this.agentsByName[agent.name] = agent;\n this.agentsByAgentId[agent.agentId] = agent;\n });\n remoteAgents.push(...pageOfAgents);\n });\n return [...cachedAgents, ...remoteAgents];\n }\n\n /**\n * Fetch metadata on agent files\n *\n * @param filterBy - Filter by parameters\n * @returns The files found matching the filter\n */\n getAgentFiles(filterBy: AgentFileFilterBy): Promise<AgentFile[]> {\n return fetchAllAgentFiles(this.graphQLClient, filterBy);\n }\n\n /**\n * Look up the large language model to report on\n *\n * @param largeLanguageModel - Input\n * @returns Large language model configuration\n */\n getLargeLanguageModel(\n largeLanguageModel: ReportPromptRunOptions['largeLanguageModel'],\n ): LargeLanguageModel {\n const matching = this.largeLanguageModels.find((model) =>\n typeof largeLanguageModel === 'string'\n ? model.id === largeLanguageModel\n : model.name === largeLanguageModel.name &&\n model.client === largeLanguageModel.client,\n );\n if (!matching) {\n throw new Error(\n `Failed to find model matching: ${\n typeof largeLanguageModel === 'string'\n ? largeLanguageModel\n : JSON.stringify(largeLanguageModel)\n }`,\n );\n }\n return matching;\n }\n\n /**\n * Get a prompt definition by name\n *\n * @param promptName - Prompt to compile\n * @returns Parsed content\n */\n async getPromptDefinition<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n ): Promise<TranscendPromptTemplated> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n // Lookup prompt\n const { promptContentMap } = this;\n if (!promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n const promptTemplate = promptContentMap[promptName];\n if (!promptTemplate) {\n throw new Error(\n `Expected this.promptContentMap[${promptName}] to be defined`,\n );\n }\n return promptTemplate;\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to compile\n * @param params - Runtime parameters\n * @returns Parsed content\n */\n async compilePrompt<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n params: t.TypeOf<TPrompts[TPromptName]['paramCodec']>,\n ): Promise<string> {\n // Grab the prompt\n const promptTemplate = await this.getPromptDefinition(promptName);\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure prompt is approved\n if (\n this.requireApproval &&\n promptTemplate.status !== PromptStatus.Approved\n ) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because its in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // If prompt is rejected, throw error\n if (promptTemplate.status === PromptStatus.Rejected) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because it's in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // Validate params\n decodeCodec(promptInput.paramCodec, params);\n\n // Compile prompt and template\n return this.handlebars.compile(promptTemplate.content)({\n // template in currentDate by default\n currentDate: new Date().toISOString(),\n ...this.variables,\n ...params,\n });\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to parse\n * @param response - AI response as string\n * @returns Parsed content\n */\n parseAiResponse<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n response: string,\n ): t.TypeOf<TPrompts[TPromptName]['outputCodec']> {\n // Look up prompt info\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Extract from tag if needed\n const extracted = promptInput.extractFromTag\n ? (createRegexForTag(promptInput.extractFromTag).exec(response) ||\n [])[1] || response\n : response;\n\n // Parse via codec\n return decodeCodec(\n promptInput.outputCodec,\n jsonParseSafe(extracted),\n false,\n );\n }\n\n /**\n * Parse the AI response and report back to Transcend\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportAndParsePromptRun<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n { largeLanguageModel, ...options }: ReportPromptRunOptions,\n ): Promise<\n PromptRunResult & {\n /** Resulting prompt run */\n result: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n }\n > {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n if (\n options.promptRunMessages[options.promptRunMessages.length - 1].role !==\n ChatCompletionRole.Assistant\n ) {\n throw new Error(\n `promptRunMessages[${\n options.promptRunMessages.length - 1\n }].role is expected to be = ${ChatCompletionRole.Assistant}`,\n );\n }\n const response =\n options.promptRunMessages[options.promptRunMessages.length - 1].content;\n\n let parsed: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n try {\n // Parse the response\n parsed = this.parseAiResponse(promptName, response);\n } catch (err) {\n await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n error: err.message,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n throw err;\n }\n\n // report successful run\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Resolved,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n result: parsed,\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n\n /**\n * Report an error for a particular prompt\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportPromptRunError<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n {\n largeLanguageModel,\n ...options\n }: Requirize<ReportPromptRunOptions, 'error'>,\n ): Promise<PromptRunResult> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n}\n/* eslint-enable max-lines */\n","import { GraphQLClient } from 'graphql-request';\nimport { LargeLanguageModelClient } from '@transcend-io/privacy-types';\nimport { LARGE_LANGUAGE_MODELS } from './gqls';\nimport { makeGraphQLRequest } from './makeGraphQLRequest';\n\nexport interface LargeLanguageModel {\n /** ID of prompts */\n id: string;\n /** The name of the large language model. */\n name: string;\n /** The content of the prompt template. */\n client: LargeLanguageModelClient;\n /** Whether hosted by Transcend or not */\n isTranscendHosted: boolean;\n}\n\nconst PAGE_SIZE = 20;\n\n/**\n * Fetch all LargeLanguageModels in the organization\n *\n * @param client - GraphQL client\n * @returns All LargeLanguageModels in the organization\n */\nexport async function fetchAllLargeLanguageModels(\n client: GraphQLClient,\n): Promise<LargeLanguageModel[]> {\n const largeLanguageModels: LargeLanguageModel[] = [];\n let offset = 0;\n\n // Whether to continue looping\n let shouldContinue = false;\n do {\n const {\n largeLanguageModels: { nodes },\n } = await makeGraphQLRequest<{\n /** LargeLanguageModels */\n largeLanguageModels: {\n /** List */\n nodes: LargeLanguageModel[];\n };\n }>(client, LARGE_LANGUAGE_MODELS, {\n first: PAGE_SIZE,\n offset,\n });\n largeLanguageModels.push(...nodes);\n offset += PAGE_SIZE;\n shouldContinue = nodes.length === PAGE_SIZE;\n } while (shouldContinue);\n\n return largeLanguageModels.sort((a, b) => a.name.localeCompare(b.name));\n}\n","import { difference } from 'lodash-es';\nimport fastGlob from 'fast-glob';\nimport { execSync } from 'child_process';\n\n/**\n * Function thats gets the git files that have changed\n * and returns the code\n *\n * @param options - Options\n * @returns Changes files and diffs\n */\nexport function getGitFilesThatChanged({\n baseBranch,\n rootDirectory,\n githubRepo,\n excludedGlob = [],\n fileBlockList = [],\n}: {\n /** Base branch */\n baseBranch: string;\n /** Github repo name */\n githubRepo: string;\n /** Root directory */\n rootDirectory: string;\n /** A glob that excludes files */\n excludedGlob?: string[];\n /** Block list of files to not process */\n fileBlockList?: string[];\n}): {\n /** The list of files that changed */\n changedFiles: string[];\n /** Github repo name */\n repoName: string;\n /** Current commit */\n commit: string;\n /** File diffs */\n fileDiffs: { [k in string]: string };\n} {\n // Pull base branch\n execSync(`git fetch origin ${baseBranch}`);\n\n // Latest commit on base branch. If we are on the base branch, we take the prior commit\n const latestBasedCommit = execSync(\n `git ls-remote ${githubRepo} \"refs/heads/${baseBranch}\" | cut -f 1`,\n { encoding: 'utf-8' },\n ).split('\\n')[0];\n\n // This commit\n const latestThisCommit = execSync('git rev-parse HEAD', {\n encoding: 'utf-8',\n }).split('\\n')[0];\n\n // Ensure commits are present\n if (!latestBasedCommit || !latestThisCommit) {\n throw new Error('FAILED TO FIND COMMIT RANGE');\n }\n\n // Get the diff between the given branch and base branch\n const diff = execSync(\n `git fetch && git diff --name-only \"${\n baseBranch || latestBasedCommit\n }...${latestThisCommit}\" -- ${rootDirectory}`,\n { encoding: 'utf-8' },\n );\n\n // Filter out block list\n const changedFiles = difference(\n diff.split('\\n').filter((f) => f),\n fileBlockList,\n );\n\n // Filter out globs\n const filteredChanges =\n excludedGlob.length > 0\n ? fastGlob.sync(changedFiles, { ignore: excludedGlob })\n : changedFiles;\n\n // Get the contents of only the changed files\n const fileDiffs: { [k in string]: string } = {};\n filteredChanges.forEach((file) => {\n const contents = execSync(`git show ${latestThisCommit}:${file}`, {\n encoding: 'utf-8',\n });\n fileDiffs[file] = contents;\n });\n\n // Pull the github repo name\n const repoName = githubRepo.split('/').pop()!.split('.')[0];\n\n return {\n changedFiles,\n fileDiffs,\n repoName,\n commit: latestThisCommit,\n };\n}\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -156227,7 +156227,7 @@ declare function removeUnverifiedRequestIdentifiers({ requestActions, identifier
|
|
|
156227
156227
|
}): Promise<number>;
|
|
156228
156228
|
|
|
156229
156229
|
var description = "A command line interface for programmatic operations across Transcend.";
|
|
156230
|
-
var version = "8.
|
|
156230
|
+
var version = "8.32.4";
|
|
156231
156231
|
|
|
156232
156232
|
/**
|
|
156233
156233
|
* The name of the main binary for the CLI
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Transcend Inc.",
|
|
3
3
|
"name": "@transcend-io/cli",
|
|
4
4
|
"description": "A command line interface for programmatic operations across Transcend.",
|
|
5
|
-
"version": "8.
|
|
5
|
+
"version": "8.32.4",
|
|
6
6
|
"homepage": "https://github.com/transcend-io/cli",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@duckdb/node-api": "1.
|
|
83
|
+
"@duckdb/node-api": "1.4.2-r.1",
|
|
84
84
|
"@stricli/auto-complete": "^1.2.0",
|
|
85
85
|
"@stricli/core": "^1.2.0",
|
|
86
86
|
"@transcend-io/airgap.js-types": "^12.14.1",
|
package/dist/chunk-52MA7ZLS.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkABKDAPPRcjs = require('./chunk-ABKDAPPR.cjs');var _chunk55B57ZAYcjs = require('./chunk-55B57ZAY.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkXXFLFF7Qcjs = require('./chunk-XXFLFF7Q.cjs');var _privacytypes = require('@transcend-io/privacy-types');var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function nt({auth:e,deploy:s=!1,transcendUrl:o=_chunkXXFLFF7Qcjs.r,bundleTypes:t=Object.values(_privacytypes.ConsentBundleType)}){let a=_chunk55B57ZAYcjs.xc.call(void 0, o,e),n=await _chunk55B57ZAYcjs.Rc.call(void 0, a);await _bluebird.mapSeries.call(void 0, t,async i=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Update Consent Manager bundle with ID "${n}" and type "${i}" to latest version...`)),await _chunk55B57ZAYcjs.Bc.call(void 0, a,{id:n,bundleType:i}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Updated Consent Manager bundle with ID "${n}" and type "${i}" to latest version!`))}),s&&await _bluebird.mapSeries.call(void 0, t,async i=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Deploying Consent Manager bundle with ID "${n}" and type "${i}"...`)),await _chunk55B57ZAYcjs.Ac.call(void 0, a,{id:n,bundleType:i}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Deployed Consent Manager bundle with ID "${n}" and type "${i}"!`))})}var F=["ID","Activity","Encounters","Last Seen At","Has Native Do Not Sell/Share Support","IAB USP API Support","Service Description","Website URL","Categories of Recipients"];async function ft({auth:e,trackerStatus:s,file:o,classifyService:t=!1,transcendUrl:a=_chunkXXFLFF7Qcjs.r}){let n=_chunk55B57ZAYcjs.xc.call(void 0, a,e);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let l=_chunk55B57ZAYcjs.sc.call(void 0, o,_chunkABKDAPPRcjs.ja).map(({Type:S,Notes:p,Service:m,Purpose:C,Status:f,Owners:E,Teams:T,"Connections Made To":A,...I})=>({value:A,type:S,description:p,trackingPurposes:_chunk55B57ZAYcjs.pc.call(void 0, C),status:f||s,owners:E?_chunk55B57ZAYcjs.pc.call(void 0, E):void 0,teams:T?_chunk55B57ZAYcjs.pc.call(void 0, T):void 0,attributes:Object.entries(I).filter(([y])=>!F.includes(y)).map(([y,$])=>({key:y,values:_chunk55B57ZAYcjs.pc.call(void 0, $)}))}));await _chunk55B57ZAYcjs.Ye.call(void 0, n,l,t)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Encountered error(s) syncing data flows from CSV, see logs above for more info. ")),process.exit(1))}var H=["ID","Activity","Encounters","Last Seen At","Has Native Do Not Sell/Share Support","IAB USP API Support","Service Description","Website URL","Categories of Recipients"];async function Mt({auth:e,trackerStatus:s,file:o,transcendUrl:t=_chunkXXFLFF7Qcjs.r}){let a=_chunk55B57ZAYcjs.xc.call(void 0, t,e);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let i=_chunk55B57ZAYcjs.sc.call(void 0, o,_chunkABKDAPPRcjs.ka).map(({"Is Regex?":c,Notes:S,Service:p,Purpose:m,Status:C,Owners:f,Teams:E,Name:T,...A})=>({...typeof c=="string"?{isRegex:c.toLowerCase()==="true"}:{},name:T,description:S,trackingPurposes:_chunk55B57ZAYcjs.pc.call(void 0, m),status:C||s,owners:f?_chunk55B57ZAYcjs.pc.call(void 0, f):void 0,teams:E?_chunk55B57ZAYcjs.pc.call(void 0, E):void 0,attributes:Object.entries(A).filter(([I])=>!H.includes(I)).map(([I,y])=>({key:I,values:_chunk55B57ZAYcjs.pc.call(void 0, y)}))}));await _chunk55B57ZAYcjs.Se.call(void 0, a,i)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Encountered error(s) syncing cookies from CSV, see logs above for more info. ")),process.exit(1))}var Y=1e3,j=60*Y,Q=60*j,V=24*Q,X=7*V;async function Rt(e,{bin:s,start:o,end:t=new Date}){let a=await _chunk55B57ZAYcjs.Rc.call(void 0, e),n=Math.floor(o.getTime()/1e3),i=Math.floor(t.getTime()/1e3);if(n>i)throw new Error('Received "end" date that happened before "start" date');if(s==="1h"&&t.getTime()-o.getTime()>X*2)throw new Error("When using bin=1h, start and end time can be no more than 2 weeks apart");let l=o.toISOString(),c=t.toISOString(),[S,p,m]=await Promise.all([_chunk55B57ZAYcjs.Uc.call(void 0, e,{dataSource:"PRIVACY_SIGNAL_TIMESERIES",startDate:l,endDate:c,forceRefetch:!0,airgapBundleId:a,binInterval:s,smoothTimeseries:!1}),_chunk55B57ZAYcjs.Uc.call(void 0, e,{dataSource:"CONSENT_CHANGES_TIMESERIES",startDate:l,endDate:c,forceRefetch:!0,airgapBundleId:a,binInterval:s,smoothTimeseries:!1}),_chunk55B57ZAYcjs.Uc.call(void 0, e,{dataSource:"CONSENT_SESSIONS_BY_REGIME",startDate:l,endDate:c,forceRefetch:!0,airgapBundleId:a,binInterval:s,smoothTimeseries:!1})]);return{PRIVACY_SIGNAL_TIMESERIES:S,CONSENT_CHANGES_TIMESERIES:p,CONSENT_SESSIONS_BY_REGIME:m}}var G=e=>new URL(`https://${e}`).hostname.split(".").slice(-2).join(".");var W=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;async function Gt(e,{xdiLocation:s,transcendUrl:o=_chunkXXFLFF7Qcjs.r,removeIpAddresses:t=!0,domainBlockList:a=["localhost"],xdiAllowedCommands:n="ConsentManager:Sync"}){let i=Array.isArray(e)?e:[{apiKey:e,organizationId:"",organizationName:""}],l=await _bluebird.map.call(void 0, i,async p=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling consent metadata for organization - ${p.organizationName}`));let m=_chunk55B57ZAYcjs.xc.call(void 0, o,p.apiKey);return await _chunk55B57ZAYcjs.Qc.call(void 0, m)},{concurrency:5}),c={};return l.forEach(p=>{let m=_optionalChain([p, 'access', _2 => _2.partition, 'optionalAccess', _3 => _3.partition])||p.bundleURL.split("/").reverse()[1];c[m]||(c[m]=[]);let C=_chunkXXFLFF7Qcjs.c.call(void 0, p.configuration.domains.filter(f=>!t||!W.test(f)).map(f=>G(f)),a);c[m]=[...new Set([...c[m]||[],...C])]}),{html:`
|
|
2
|
-
<!DOCTYPE html>
|
|
3
|
-
<script
|
|
4
|
-
src="${s}"
|
|
5
|
-
data-sync-groups='${JSON.stringify(c,null,2)}'
|
|
6
|
-
data-xdi-commands="${n}"
|
|
7
|
-
></script>
|
|
8
|
-
`,syncGroups:c}}function Ft(e){let s=e.map(({name:o,input:t})=>({title:o.replace(".yml",""),attributes:[..._optionalChain([t, 'optionalAccess', _4 => _4.domains])?[{key:"Transcend Domain List",values:[...new Set(t.domains)]}]:[],..._optionalChain([t, 'optionalAccess', _5 => _5.bundleUrls])?[{key:"Airgap Production URL",values:[t.bundleUrls.PRODUCTION]},{key:"Airgap Test URL",values:[t.bundleUrls.TEST]},{key:"Airgap XDI URL",values:[t.bundleUrls.PRODUCTION.replace("airgap.js","xdi.js")]}]:[],..._optionalChain([t, 'optionalAccess', _6 => _6.partition])?[{key:"Consent Partition Key",values:[t.partition]}]:[]]}));return _chunkZUNVPK23cjs.a.info(`
|
|
9
|
-
|
|
10
|
-
~~~~~~~~~~~
|
|
11
|
-
Airgap scripts to host:`),s.forEach(({attributes:o,title:t},a)=>{_optionalChain([o, 'optionalAccess', _7 => _7.find, 'call', _8 => _8(n=>n.key==="Airgap Production URL"), 'optionalAccess', _9 => _9.values, 'optionalAccess', _10 => _10.forEach, 'call', _11 => _11(n=>{_chunkZUNVPK23cjs.a.info(`${a}) ${t} - ${n}`)})])}),s}exports.a = nt; exports.b = ft; exports.c = Mt; exports.d = Rt; exports.e = G; exports.f = W; exports.g = Gt; exports.h = Ft;
|
|
12
|
-
//# sourceMappingURL=chunk-52MA7ZLS.cjs.map
|