@transcend-io/cli 10.28.0 → 10.29.0
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 +81 -15
- package/dist/{app-DCY8E776.mjs → app-C5baDSA2.mjs} +21 -21
- package/dist/app-C5baDSA2.mjs.map +1 -0
- package/dist/{approvePrivacyRequests-80SV_94y.mjs → approvePrivacyRequests-B8x7oxTn.mjs} +2 -2
- package/dist/{approvePrivacyRequests-80SV_94y.mjs.map → approvePrivacyRequests-B8x7oxTn.mjs.map} +1 -1
- package/dist/bin/bash-complete.mjs +1 -1
- package/dist/bin/cli.mjs +1 -1
- package/dist/bin/deprecated-command.mjs +1 -1
- package/dist/{buildExamples-2YDkSvtA.mjs → buildExamples-7KXBjl-b.mjs} +2 -2
- package/dist/{buildExamples-2YDkSvtA.mjs.map → buildExamples-7KXBjl-b.mjs.map} +1 -1
- package/dist/{buildXdiSyncEndpoint-B3zUrI16.mjs → buildXdiSyncEndpoint-DcrkZ2Gu.mjs} +2 -2
- package/dist/{buildXdiSyncEndpoint-B3zUrI16.mjs.map → buildXdiSyncEndpoint-DcrkZ2Gu.mjs.map} +1 -1
- package/dist/{bulkRestartRequests-BLb8OJmf.mjs → bulkRestartRequests-CysUfl98.mjs} +2 -2
- package/dist/{bulkRestartRequests-BLb8OJmf.mjs.map → bulkRestartRequests-CysUfl98.mjs.map} +1 -1
- package/dist/{bulkRetryEnrichers-BA9cboSe.mjs → bulkRetryEnrichers-DaLE67Ht.mjs} +2 -2
- package/dist/{bulkRetryEnrichers-BA9cboSe.mjs.map → bulkRetryEnrichers-DaLE67Ht.mjs.map} +1 -1
- package/dist/{cancelPrivacyRequests-BEyOBJ2r.mjs → cancelPrivacyRequests-D0zNUNdS.mjs} +2 -2
- package/dist/{cancelPrivacyRequests-BEyOBJ2r.mjs.map → cancelPrivacyRequests-D0zNUNdS.mjs.map} +1 -1
- package/dist/codecs-CTxFjCg4.mjs +2 -0
- package/dist/codecs-CTxFjCg4.mjs.map +1 -0
- package/dist/{collectCsvFilesOrExit-BqnmK63h.mjs → collectCsvFilesOrExit-B1VOVGWN.mjs} +1 -1
- package/dist/{collectCsvFilesOrExit-BqnmK63h.mjs.map → collectCsvFilesOrExit-B1VOVGWN.mjs.map} +1 -1
- package/dist/{collectParquetFilesOrExit-BiksFI-Q.mjs → collectParquetFilesOrExit-DVlv5ctt.mjs} +1 -1
- package/dist/{collectParquetFilesOrExit-BiksFI-Q.mjs.map → collectParquetFilesOrExit-DVlv5ctt.mjs.map} +1 -1
- package/dist/{command-eIenZMOx.mjs → command-CIv9yk86.mjs} +2 -2
- package/dist/{command-eIenZMOx.mjs.map → command-CIv9yk86.mjs.map} +1 -1
- package/dist/commands/admin/chunk-csv/worker.mjs +1 -1
- package/dist/commands/admin/parquet-to-csv/worker.mjs +1 -1
- package/dist/{consentManagersToBusinessEntities-O4KBox9u.mjs → consentManagersToBusinessEntities-CBJ81aGO.mjs} +1 -1
- package/dist/{consentManagersToBusinessEntities-O4KBox9u.mjs.map → consentManagersToBusinessEntities-CBJ81aGO.mjs.map} +1 -1
- package/dist/{constants-BpQ5awGp.mjs → constants-DXzsg2CQ.mjs} +2 -2
- package/dist/{constants-BpQ5awGp.mjs.map → constants-DXzsg2CQ.mjs.map} +1 -1
- package/dist/{constants-C1seVfCu.mjs → constants-D_HVDaOy.mjs} +1 -1
- package/dist/{constants-C1seVfCu.mjs.map → constants-D_HVDaOy.mjs.map} +1 -1
- package/dist/{constants-BG53Mbi9.mjs → constants-jjHIzHGm.mjs} +2 -2
- package/dist/{constants-BG53Mbi9.mjs.map → constants-jjHIzHGm.mjs.map} +1 -1
- package/dist/{context-CZYrQfAn.mjs → context-B33NT3ki.mjs} +1 -1
- package/dist/{context-CZYrQfAn.mjs.map → context-B33NT3ki.mjs.map} +1 -1
- package/dist/{createPoolingCommandUi-C39R_zo3.mjs → createPoolingCommandUi-uiDjLlqf.mjs} +2 -2
- package/dist/{createPoolingCommandUi-C39R_zo3.mjs.map → createPoolingCommandUi-uiDjLlqf.mjs.map} +1 -1
- package/dist/{dataFlowsToDataSilos-CLSHb1GA.mjs → dataFlowsToDataSilos-BF6fzWcm.mjs} +1 -1
- package/dist/{dataFlowsToDataSilos-CLSHb1GA.mjs.map → dataFlowsToDataSilos-BF6fzWcm.mjs.map} +1 -1
- package/dist/deno-runtime-DV52X8-P.mjs +2 -0
- package/dist/deno-runtime-DV52X8-P.mjs.map +1 -0
- package/dist/{done-input-validation-Cjk7a3jX.mjs → done-input-validation-BUz-aVC5.mjs} +1 -1
- package/dist/{done-input-validation-Cjk7a3jX.mjs.map → done-input-validation-BUz-aVC5.mjs.map} +1 -1
- package/dist/{downloadPrivacyRequestFiles-CLFgQItk.mjs → downloadPrivacyRequestFiles-B_BVxW5Z.mjs} +2 -2
- package/dist/{downloadPrivacyRequestFiles-CLFgQItk.mjs.map → downloadPrivacyRequestFiles-B_BVxW5Z.mjs.map} +1 -1
- package/dist/{extractClientError-C_6ly7Gw.mjs → extractClientError-HZ2U7yqV.mjs} +1 -1
- package/dist/{extractClientError-C_6ly7Gw.mjs.map → extractClientError-HZ2U7yqV.mjs.map} +1 -1
- package/dist/{fetchAllRequests-CEDKdq0c.mjs → fetchAllRequests-2TZr-LfT.mjs} +2 -2
- package/dist/{fetchAllRequests-CEDKdq0c.mjs.map → fetchAllRequests-2TZr-LfT.mjs.map} +1 -1
- package/dist/{formatPolicyBundleVersionSummary-CrFtcPwS.mjs → formatPolicyBundleVersionSummary-CJmMCLtJ.mjs} +1 -1
- package/dist/{formatPolicyBundleVersionSummary-CrFtcPwS.mjs.map → formatPolicyBundleVersionSummary-CJmMCLtJ.mjs.map} +1 -1
- package/dist/{fuzzyMatchColumns-OTsFJ21f.mjs → fuzzyMatchColumns-CQCzpjWC.mjs} +2 -2
- package/dist/{fuzzyMatchColumns-OTsFJ21f.mjs.map → fuzzyMatchColumns-CQCzpjWC.mjs.map} +1 -1
- package/dist/{generateCrossAccountApiKeys-D6O_Qm3Y.mjs → generateCrossAccountApiKeys-Bnqgmj-H.mjs} +2 -2
- package/dist/{generateCrossAccountApiKeys-D6O_Qm3Y.mjs.map → generateCrossAccountApiKeys-Bnqgmj-H.mjs.map} +1 -1
- package/dist/impl--JGnR3wp.mjs +3 -0
- package/dist/{impl-CzxvoiGW.mjs.map → impl--JGnR3wp.mjs.map} +1 -1
- package/dist/{impl-BqrSLoig.mjs → impl-2iVTxNn4.mjs} +2 -2
- package/dist/{impl-BqrSLoig.mjs.map → impl-2iVTxNn4.mjs.map} +1 -1
- package/dist/{impl-Drql0g72.mjs → impl-7UqkSO3x2.mjs} +2 -2
- package/dist/impl-7UqkSO3x2.mjs.map +1 -0
- package/dist/{impl-C50tdWlL2.mjs → impl-B-j5ACi02.mjs} +2 -2
- package/dist/{impl-C50tdWlL2.mjs.map → impl-B-j5ACi02.mjs.map} +1 -1
- package/dist/impl-B4BgGuF_.mjs +3 -0
- package/dist/impl-B4BgGuF_.mjs.map +1 -0
- package/dist/{impl-zZFaSmxd2.mjs → impl-BDrvzlpf2.mjs} +2 -2
- package/dist/{impl-zZFaSmxd2.mjs.map → impl-BDrvzlpf2.mjs.map} +1 -1
- package/dist/{impl-Dk6TZKrp2.mjs → impl-BH_A5rgL.mjs} +2 -2
- package/dist/impl-BH_A5rgL.mjs.map +1 -0
- package/dist/{impl-CHmjV-Pa.mjs → impl-BOawPhYE.mjs} +2 -2
- package/dist/{impl-CHmjV-Pa.mjs.map → impl-BOawPhYE.mjs.map} +1 -1
- package/dist/{impl-CXUJ1eRC.mjs → impl-BPoEH3Nf2.mjs} +2 -2
- package/dist/impl-BPoEH3Nf2.mjs.map +1 -0
- package/dist/{impl-CqF9xIIy.mjs → impl-BXUYpR27.mjs} +2 -2
- package/dist/{impl-CqF9xIIy.mjs.map → impl-BXUYpR27.mjs.map} +1 -1
- package/dist/{impl-DYf10-BD2.mjs → impl-Bc6p8A1l2.mjs} +2 -2
- package/dist/{impl-DYf10-BD2.mjs.map → impl-Bc6p8A1l2.mjs.map} +1 -1
- package/dist/{impl-M3Eu4QjS.mjs → impl-BqWQh9Ss.mjs} +2 -2
- package/dist/{impl-M3Eu4QjS.mjs.map → impl-BqWQh9Ss.mjs.map} +1 -1
- package/dist/impl-C6HtWd1t.mjs +2 -0
- package/dist/{impl-BcJ019T2.mjs.map → impl-C6HtWd1t.mjs.map} +1 -1
- package/dist/{impl-GHukPBnk.mjs → impl-CL29fOWM.mjs} +2 -2
- package/dist/{impl-GHukPBnk.mjs.map → impl-CL29fOWM.mjs.map} +1 -1
- package/dist/{impl-BvNZqLrT.mjs → impl-CO4ZqlLV.mjs} +2 -2
- package/dist/{impl-BvNZqLrT.mjs.map → impl-CO4ZqlLV.mjs.map} +1 -1
- package/dist/{impl-DJLlcqSg.mjs → impl-COujMWgp.mjs} +2 -2
- package/dist/{impl-DJLlcqSg.mjs.map → impl-COujMWgp.mjs.map} +1 -1
- package/dist/{impl-Bs-drNBf.mjs → impl-CPSEzCc9.mjs} +2 -2
- package/dist/{impl-Bs-drNBf.mjs.map → impl-CPSEzCc9.mjs.map} +1 -1
- package/dist/{impl-Dib6Fff12.mjs → impl-CQVy2k3o.mjs} +2 -2
- package/dist/impl-CQVy2k3o.mjs.map +1 -0
- package/dist/{impl-B3_hrFPX.mjs → impl-CUOVJsRg.mjs} +2 -2
- package/dist/{impl-B3_hrFPX.mjs.map → impl-CUOVJsRg.mjs.map} +1 -1
- package/dist/{impl-BySmbxEt.mjs → impl-CUiYbk6G.mjs} +2 -2
- package/dist/{impl-BySmbxEt.mjs.map → impl-CUiYbk6G.mjs.map} +1 -1
- package/dist/{impl-CWh9H7mL.mjs → impl-CXTBcYo6.mjs} +2 -2
- package/dist/{impl-CWh9H7mL.mjs.map → impl-CXTBcYo6.mjs.map} +1 -1
- package/dist/{impl-Cx3T0Iei.mjs → impl-CfvxD3RI.mjs} +2 -2
- package/dist/{impl-Cx3T0Iei.mjs.map → impl-CfvxD3RI.mjs.map} +1 -1
- package/dist/{impl-DHfYO9T52.mjs → impl-Cli2XRp02.mjs} +2 -2
- package/dist/{impl-DHfYO9T52.mjs.map → impl-Cli2XRp02.mjs.map} +1 -1
- package/dist/{impl-CDtUusmg.mjs → impl-CuDs6SsI.mjs} +2 -2
- package/dist/{impl-CDtUusmg.mjs.map → impl-CuDs6SsI.mjs.map} +1 -1
- package/dist/{impl-BYGNx-8W2.mjs → impl-CvLI_Jig.mjs} +2 -2
- package/dist/impl-CvLI_Jig.mjs.map +1 -0
- package/dist/{impl-BFJtKA2o2.mjs → impl-CwKYKBYb.mjs} +2 -2
- package/dist/impl-CwKYKBYb.mjs.map +1 -0
- package/dist/{impl-BewF8tB6.mjs → impl-CwXp3Tbr.mjs} +2 -2
- package/dist/{impl-BewF8tB6.mjs.map → impl-CwXp3Tbr.mjs.map} +1 -1
- package/dist/{impl-B--lr5RJ2.mjs → impl-CyQRmuM72.mjs} +2 -2
- package/dist/{impl-B--lr5RJ2.mjs.map → impl-CyQRmuM72.mjs.map} +1 -1
- package/dist/impl-DEJpYLPB.mjs +2 -0
- package/dist/impl-DEJpYLPB.mjs.map +1 -0
- package/dist/impl-DEhw1iNn.mjs +2 -0
- package/dist/impl-DEhw1iNn.mjs.map +1 -0
- package/dist/impl-DK7nSMle2.mjs +303 -0
- package/dist/impl-DK7nSMle2.mjs.map +1 -0
- package/dist/{impl-DOoR93T6.mjs → impl-DKepRc812.mjs} +2 -2
- package/dist/impl-DKepRc812.mjs.map +1 -0
- package/dist/{impl-CTIWliTx.mjs → impl-DLG0Egy6.mjs} +2 -2
- package/dist/{impl-CTIWliTx.mjs.map → impl-DLG0Egy6.mjs.map} +1 -1
- package/dist/impl-DMe_OqJx.mjs +2 -0
- package/dist/{impl-BsC1KVxS.mjs.map → impl-DMe_OqJx.mjs.map} +1 -1
- package/dist/{impl-BwRcpAno.mjs → impl-DNe-gRXe2.mjs} +2 -2
- package/dist/impl-DNe-gRXe2.mjs.map +1 -0
- package/dist/{impl-Dm-Fkr392.mjs → impl-DNzkRayg.mjs} +2 -2
- package/dist/impl-DNzkRayg.mjs.map +1 -0
- package/dist/{impl-DzNk41xd.mjs → impl-DPtx5iZO.mjs} +2 -2
- package/dist/{impl-DzNk41xd.mjs.map → impl-DPtx5iZO.mjs.map} +1 -1
- package/dist/{impl-syp5hclX.mjs → impl-DRpK-QLC.mjs} +2 -2
- package/dist/{impl-syp5hclX.mjs.map → impl-DRpK-QLC.mjs.map} +1 -1
- package/dist/{impl-Bq6g_xYv.mjs → impl-DVQmuZQY.mjs} +2 -2
- package/dist/{impl-Bq6g_xYv.mjs.map → impl-DVQmuZQY.mjs.map} +1 -1
- package/dist/{impl-DYwojWvN.mjs → impl-DVeGQCrr.mjs} +2 -2
- package/dist/{impl-DYwojWvN.mjs.map → impl-DVeGQCrr.mjs.map} +1 -1
- package/dist/{impl-DF8RGVlT.mjs → impl-DXRDWiB1.mjs} +2 -2
- package/dist/{impl-DF8RGVlT.mjs.map → impl-DXRDWiB1.mjs.map} +1 -1
- package/dist/{impl-CiYKuCHV.mjs → impl-DXowiNOz.mjs} +2 -2
- package/dist/{impl-CiYKuCHV.mjs.map → impl-DXowiNOz.mjs.map} +1 -1
- package/dist/{impl-DpuhHpuk.mjs → impl-DaH1_ZzK.mjs} +2 -2
- package/dist/{impl-DpuhHpuk.mjs.map → impl-DaH1_ZzK.mjs.map} +1 -1
- package/dist/{impl-DIPvFKiP.mjs → impl-DdIa0zla.mjs} +2 -2
- package/dist/{impl-DIPvFKiP.mjs.map → impl-DdIa0zla.mjs.map} +1 -1
- package/dist/{impl-DbZ1cYoR.mjs → impl-DqhZR11m.mjs} +2 -2
- package/dist/{impl-DbZ1cYoR.mjs.map → impl-DqhZR11m.mjs.map} +1 -1
- package/dist/{impl-VPBEqV0w2.mjs → impl-Dqqb0lVN.mjs} +2 -2
- package/dist/impl-Dqqb0lVN.mjs.map +1 -0
- package/dist/{impl-6m7GXUAe.mjs → impl-DryC3OJu.mjs} +2 -2
- package/dist/{impl-6m7GXUAe.mjs.map → impl-DryC3OJu.mjs.map} +1 -1
- package/dist/{impl-CQGeH47F.mjs → impl-DuZjI6p0.mjs} +2 -2
- package/dist/{impl-CQGeH47F.mjs.map → impl-DuZjI6p0.mjs.map} +1 -1
- package/dist/{impl-C5dzaDga2.mjs → impl-Dw8NYkzw.mjs} +2 -2
- package/dist/impl-Dw8NYkzw.mjs.map +1 -0
- package/dist/impl-Dx_TfvW1.mjs +2 -0
- package/dist/{impl-C8BmxFQ2.mjs.map → impl-Dx_TfvW1.mjs.map} +1 -1
- package/dist/{impl-DXNcD7CZ.mjs → impl-DypttZd6.mjs} +2 -2
- package/dist/{impl-DXNcD7CZ.mjs.map → impl-DypttZd6.mjs.map} +1 -1
- package/dist/{impl-CfPXYgT42.mjs → impl-DzUTmaID2.mjs} +2 -2
- package/dist/{impl-CfPXYgT42.mjs.map → impl-DzUTmaID2.mjs.map} +1 -1
- package/dist/{impl-BJlKQJdS2.mjs → impl-INhq_CiK.mjs} +2 -2
- package/dist/impl-INhq_CiK.mjs.map +1 -0
- package/dist/{impl-KKrDTraf.mjs → impl-KmCNH-yw.mjs} +2 -2
- package/dist/{impl-KKrDTraf.mjs.map → impl-KmCNH-yw.mjs.map} +1 -1
- package/dist/{impl-CE56-wQh.mjs → impl-RPG-BTmX.mjs} +2 -2
- package/dist/{impl-CE56-wQh.mjs.map → impl-RPG-BTmX.mjs.map} +1 -1
- package/dist/{impl-amV0wRWk.mjs → impl-XrTL-TDl.mjs} +2 -2
- package/dist/{impl-amV0wRWk.mjs.map → impl-XrTL-TDl.mjs.map} +1 -1
- package/dist/impl-Z8oWVENM.mjs +2 -0
- package/dist/impl-Z8oWVENM.mjs.map +1 -0
- package/dist/{impl-m3QXCc6n.mjs → impl-a_Y8bnSn.mjs} +4 -4
- package/dist/impl-a_Y8bnSn.mjs.map +1 -0
- package/dist/{impl-CEmXPEq22.mjs → impl-hwpT9u5o2.mjs} +2 -2
- package/dist/{impl-CEmXPEq22.mjs.map → impl-hwpT9u5o2.mjs.map} +1 -1
- package/dist/{impl-BWVe4VGF2.mjs → impl-xq89cSSz2.mjs} +2 -2
- package/dist/{impl-BWVe4VGF2.mjs.map → impl-xq89cSSz2.mjs.map} +1 -1
- package/dist/index.d.mts +12797 -1840
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{initializeCliRuntime-802-P8MC.mjs → initializeCliRuntime-6wI_VIHV.mjs} +1 -1
- package/dist/{initializeCliRuntime-802-P8MC.mjs.map → initializeCliRuntime-6wI_VIHV.mjs.map} +1 -1
- package/dist/{inquirer-DkFTQU00.mjs → inquirer-BeaBetMO.mjs} +2 -2
- package/dist/{inquirer-DkFTQU00.mjs.map → inquirer-BeaBetMO.mjs.map} +1 -1
- package/dist/jsonc-D9dDWb1J.mjs +6 -0
- package/dist/jsonc-D9dDWb1J.mjs.map +1 -0
- package/dist/{listFiles-CWHAdKY-.mjs → listFiles-BdFUbX5x.mjs} +1 -1
- package/dist/{listFiles-CWHAdKY-.mjs.map → listFiles-BdFUbX5x.mjs.map} +1 -1
- package/dist/logger-zplFSeXU.mjs +2 -0
- package/dist/logger-zplFSeXU.mjs.map +1 -0
- package/dist/manifest-BNIpO_zW.mjs +2 -0
- package/dist/manifest-BNIpO_zW.mjs.map +1 -0
- package/dist/{mapConsentCsvRowsToInputs-MMPZwzrV.mjs → mapConsentCsvRowsToInputs-Dqb6WL4r.mjs} +1 -1
- package/dist/{mapConsentCsvRowsToInputs-MMPZwzrV.mjs.map → mapConsentCsvRowsToInputs-Dqb6WL4r.mjs.map} +1 -1
- package/dist/{markRequestDataSiloIdsCompleted-PKCcn5wQ.mjs → markRequestDataSiloIdsCompleted-B5N-cQWr.mjs} +2 -2
- package/dist/{markRequestDataSiloIdsCompleted-PKCcn5wQ.mjs.map → markRequestDataSiloIdsCompleted-B5N-cQWr.mjs.map} +1 -1
- package/dist/{markSilentPrivacyRequests-7l9I99pe.mjs → markSilentPrivacyRequests-BiaButWF.mjs} +2 -2
- package/dist/{markSilentPrivacyRequests-7l9I99pe.mjs.map → markSilentPrivacyRequests-BiaButWF.mjs.map} +1 -1
- package/dist/mergeTranscendInputs-DFQcbh8b.mjs +3 -0
- package/dist/mergeTranscendInputs-DFQcbh8b.mjs.map +1 -0
- package/dist/missing-manifest-DgcukXfg.mjs +2 -0
- package/dist/missing-manifest-DgcukXfg.mjs.map +1 -0
- package/dist/{module-graph-DBC7ZvyA.mjs → module-graph-Cb0g74Ft.mjs} +1 -1
- package/dist/{module-graph-DBC7ZvyA.mjs.map → module-graph-Cb0g74Ft.mjs.map} +1 -1
- package/dist/{notifyPrivacyRequestsAdditionalTime-BPIYuCov.mjs → notifyPrivacyRequestsAdditionalTime-D3Vtvg5G.mjs} +2 -2
- package/dist/{notifyPrivacyRequestsAdditionalTime-BPIYuCov.mjs.map → notifyPrivacyRequestsAdditionalTime-D3Vtvg5G.mjs.map} +1 -1
- package/dist/{parquetToCsvOneFile-CSVdrLvq.mjs → parquetToCsvOneFile-ChmPC6dL.mjs} +2 -2
- package/dist/{parquetToCsvOneFile-CSVdrLvq.mjs.map → parquetToCsvOneFile-ChmPC6dL.mjs.map} +1 -1
- package/dist/{parseAttributesFromString-C5-KGkPH.mjs → parseAttributesFromString-CO16oAlx.mjs} +2 -2
- package/dist/{parseAttributesFromString-C5-KGkPH.mjs.map → parseAttributesFromString-CO16oAlx.mjs.map} +1 -1
- package/dist/{parseVariablesFromString-Cr3x2uq3.mjs → parseVariablesFromString-BOSfQ4QF.mjs} +1 -1
- package/dist/{parseVariablesFromString-Cr3x2uq3.mjs.map → parseVariablesFromString-BOSfQ4QF.mjs.map} +1 -1
- package/dist/path-safety-D5Qwl40b.mjs +2 -0
- package/dist/path-safety-D5Qwl40b.mjs.map +1 -0
- package/dist/policy-bundle-manifest-D6dkbjNi.mjs +7 -0
- package/dist/policy-bundle-manifest-D6dkbjNi.mjs.map +1 -0
- package/dist/policy-runtime-BMKa-Upy.mjs +2 -0
- package/dist/policy-runtime-BMKa-Upy.mjs.map +1 -0
- package/dist/{printResult-esxW3HhT.mjs → printResult-CHe3nRN4.mjs} +5 -5
- package/dist/printResult-CHe3nRN4.mjs.map +1 -0
- package/dist/project-plan-apply-Dvndx455.mjs +3 -0
- package/dist/project-plan-apply-Dvndx455.mjs.map +1 -0
- package/dist/prompts-ClBXdELk.mjs +4 -0
- package/dist/prompts-ClBXdELk.mjs.map +1 -0
- package/dist/{pullAllDatapoints-H92qjLSx.mjs → pullAllDatapoints-uk5ggk6O.mjs} +2 -2
- package/dist/{pullAllDatapoints-H92qjLSx.mjs.map → pullAllDatapoints-uk5ggk6O.mjs.map} +1 -1
- package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-BrDmPbvc.mjs → pullChunkedCustomSiloOutstandingIdentifiers-D85P1W_8.mjs} +2 -2
- package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-BrDmPbvc.mjs.map → pullChunkedCustomSiloOutstandingIdentifiers-D85P1W_8.mjs.map} +1 -1
- package/dist/{pullConsentManagerMetrics-Cvex-gpd.mjs → pullConsentManagerMetrics-Dv5n1ZGp.mjs} +2 -2
- package/dist/{pullConsentManagerMetrics-Cvex-gpd.mjs.map → pullConsentManagerMetrics-Dv5n1ZGp.mjs.map} +1 -1
- package/dist/{pullManualEnrichmentIdentifiersToCsv-qjdNA75O.mjs → pullManualEnrichmentIdentifiersToCsv-DbNSrKEk.mjs} +2 -2
- package/dist/{pullManualEnrichmentIdentifiersToCsv-qjdNA75O.mjs.map → pullManualEnrichmentIdentifiersToCsv-DbNSrKEk.mjs.map} +1 -1
- package/dist/{pullTranscendConfiguration-CD7Frn8z.mjs → pullTranscendConfiguration-B63M3ild.mjs} +3 -3
- package/dist/{pullTranscendConfiguration-CD7Frn8z.mjs.map → pullTranscendConfiguration-B63M3ild.mjs.map} +1 -1
- package/dist/{pullUnstructuredSubDataPointRecommendations-Dmh_-r95.mjs → pullUnstructuredSubDataPointRecommendations-YTBzfkRZ.mjs} +2 -2
- package/dist/{pullUnstructuredSubDataPointRecommendations-Dmh_-r95.mjs.map → pullUnstructuredSubDataPointRecommendations-YTBzfkRZ.mjs.map} +1 -1
- package/dist/{pushCronIdentifiersFromCsv-DjeY7TtK.mjs → pushCronIdentifiersFromCsv-5ruUKHtL.mjs} +2 -2
- package/dist/{pushCronIdentifiersFromCsv-DjeY7TtK.mjs.map → pushCronIdentifiersFromCsv-5ruUKHtL.mjs.map} +1 -1
- package/dist/{pushManualEnrichmentIdentifiersFromCsv-BDtMo13j.mjs → pushManualEnrichmentIdentifiersFromCsv-B0i2239u.mjs} +2 -2
- package/dist/{pushManualEnrichmentIdentifiersFromCsv-BDtMo13j.mjs.map → pushManualEnrichmentIdentifiersFromCsv-B0i2239u.mjs.map} +1 -1
- package/dist/{readCsv-Cr_1t8F5.mjs → readCsv-DLg8pwjd.mjs} +1 -1
- package/dist/{readCsv-Cr_1t8F5.mjs.map → readCsv-DLg8pwjd.mjs.map} +1 -1
- package/dist/readTranscendYaml-BNn6-Ofi.mjs +4 -0
- package/dist/readTranscendYaml-BNn6-Ofi.mjs.map +1 -0
- package/dist/{removeUnverifiedRequestIdentifiers-B9uPApVR.mjs → removeUnverifiedRequestIdentifiers-QmeqrmxM.mjs} +2 -2
- package/dist/{removeUnverifiedRequestIdentifiers-B9uPApVR.mjs.map → removeUnverifiedRequestIdentifiers-QmeqrmxM.mjs.map} +1 -1
- package/dist/{renderTable-DKTZbMjY.mjs → renderTable-D68QasPc.mjs} +1 -1
- package/dist/{renderTable-DKTZbMjY.mjs.map → renderTable-D68QasPc.mjs.map} +1 -1
- package/dist/{request-B1yRTdG-.mjs → request-BiPv6jmP.mjs} +1 -1
- package/dist/{request-B1yRTdG-.mjs.map → request-BiPv6jmP.mjs.map} +1 -1
- package/dist/{resolveBundleIdByName-DuxWYrDF.mjs → resolveBundleIdByName-qXZBrUz_.mjs} +2 -2
- package/dist/{resolveBundleIdByName-DuxWYrDF.mjs.map → resolveBundleIdByName-qXZBrUz_.mjs.map} +1 -1
- package/dist/{resolvePolicyBundleVersion-DhXZKwb4.mjs → resolvePolicyBundleVersion-BG7XqBBP.mjs} +2 -2
- package/dist/{resolvePolicyBundleVersion-DhXZKwb4.mjs.map → resolvePolicyBundleVersion-BG7XqBBP.mjs.map} +1 -1
- package/dist/{retryRequestDataSilos-D9dBtbdl.mjs → retryRequestDataSilos-BfckLjOJ.mjs} +2 -2
- package/dist/{retryRequestDataSilos-D9dBtbdl.mjs.map → retryRequestDataSilos-BfckLjOJ.mjs.map} +1 -1
- package/dist/{run-captured-process-CpZBh0lG.mjs → run-captured-process-BXwWXuTh.mjs} +1 -1
- package/dist/{run-captured-process-CpZBh0lG.mjs.map → run-captured-process-BXwWXuTh.mjs.map} +1 -1
- package/dist/runOpa-CswzJxIs.mjs +2 -0
- package/dist/runOpa-CswzJxIs.mjs.map +1 -0
- package/dist/scaffold-model-BAbYTR0q.mjs +2 -0
- package/dist/scaffold-model-BAbYTR0q.mjs.map +1 -0
- package/dist/scaffold-planning-CNv83t_v.mjs +123 -0
- package/dist/scaffold-planning-CNv83t_v.mjs.map +1 -0
- package/dist/scaffold-templates-DzDGTZie.mjs +84 -0
- package/dist/scaffold-templates-DzDGTZie.mjs.map +1 -0
- package/dist/{skipPreflightJobs-Beia_iB6.mjs → skipPreflightJobs-Do_kwu3m.mjs} +2 -2
- package/dist/{skipPreflightJobs-Beia_iB6.mjs.map → skipPreflightJobs-Do_kwu3m.mjs.map} +1 -1
- package/dist/{skipRequestDataSilos-BSNLacnR.mjs → skipRequestDataSilos-BNDhdllD.mjs} +2 -2
- package/dist/{skipRequestDataSilos-BSNLacnR.mjs.map → skipRequestDataSilos-BNDhdllD.mjs.map} +1 -1
- package/dist/{streamPrivacyRequestsToCsv-Cksb9D49.mjs → streamPrivacyRequestsToCsv-CbJfhV6A.mjs} +2 -2
- package/dist/{streamPrivacyRequestsToCsv-Cksb9D49.mjs.map → streamPrivacyRequestsToCsv-CbJfhV6A.mjs.map} +1 -1
- package/dist/{syncCodePackages-DsC1tE8B.mjs → syncCodePackages-BHE2Tn1Q.mjs} +2 -2
- package/dist/{syncCodePackages-DsC1tE8B.mjs.map → syncCodePackages-BHE2Tn1Q.mjs.map} +1 -1
- package/dist/{updateConsentManagerVersionToLatest-CaEkTnlL.mjs → updateConsentManagerVersionToLatest-DEFwH4Se.mjs} +2 -2
- package/dist/{updateConsentManagerVersionToLatest-CaEkTnlL.mjs.map → updateConsentManagerVersionToLatest-DEFwH4Se.mjs.map} +1 -1
- package/dist/{uploadConsents-CNyuYx0o.mjs → uploadConsents-ChmFIw_j.mjs} +2 -2
- package/dist/{uploadConsents-CNyuYx0o.mjs.map → uploadConsents-ChmFIw_j.mjs.map} +1 -1
- package/dist/{uploadPrivacyRequestsFromCsv-BdTQOZnF.mjs → uploadPrivacyRequestsFromCsv-D3KSb1qH.mjs} +2 -2
- package/dist/{uploadPrivacyRequestsFromCsv-BdTQOZnF.mjs.map → uploadPrivacyRequestsFromCsv-D3KSb1qH.mjs.map} +1 -1
- package/dist/{validateTranscendAuth-CnHMn77m.mjs → validateTranscendAuth-D6Wr1cxY.mjs} +2 -2
- package/dist/{validateTranscendAuth-CnHMn77m.mjs.map → validateTranscendAuth-D6Wr1cxY.mjs.map} +1 -1
- package/dist/{writeCsv-D46aDkGf.mjs → writeCsv-D-2siSwE.mjs} +1 -1
- package/dist/{writeCsv-D46aDkGf.mjs.map → writeCsv-D-2siSwE.mjs.map} +1 -1
- package/package.json +8 -7
- package/dist/app-DCY8E776.mjs.map +0 -1
- package/dist/codecs-BsQFAFGT.mjs +0 -2
- package/dist/codecs-BsQFAFGT.mjs.map +0 -1
- package/dist/constants-BMAOvdcA.mjs +0 -2
- package/dist/constants-BMAOvdcA.mjs.map +0 -1
- package/dist/deno-runtime-QqwBDKXX.mjs +0 -2
- package/dist/deno-runtime-QqwBDKXX.mjs.map +0 -1
- package/dist/impl-BFJtKA2o2.mjs.map +0 -1
- package/dist/impl-BJlKQJdS2.mjs.map +0 -1
- package/dist/impl-BNPgYSBT.mjs +0 -3
- package/dist/impl-BNPgYSBT.mjs.map +0 -1
- package/dist/impl-BYGNx-8W2.mjs.map +0 -1
- package/dist/impl-BcJ019T2.mjs +0 -2
- package/dist/impl-BsC1KVxS.mjs +0 -2
- package/dist/impl-BwRcpAno.mjs.map +0 -1
- package/dist/impl-C5dzaDga2.mjs.map +0 -1
- package/dist/impl-C8BmxFQ2.mjs +0 -2
- package/dist/impl-CXUJ1eRC.mjs.map +0 -1
- package/dist/impl-CzxvoiGW.mjs +0 -3
- package/dist/impl-D-SQJc3t.mjs +0 -2
- package/dist/impl-D-SQJc3t.mjs.map +0 -1
- package/dist/impl-D23kJPAQ2.mjs +0 -3
- package/dist/impl-D23kJPAQ2.mjs.map +0 -1
- package/dist/impl-DOoR93T6.mjs.map +0 -1
- package/dist/impl-Dib6Fff12.mjs.map +0 -1
- package/dist/impl-Dk6TZKrp2.mjs.map +0 -1
- package/dist/impl-Dm-Fkr392.mjs.map +0 -1
- package/dist/impl-Drql0g72.mjs.map +0 -1
- package/dist/impl-FLj_mWLO.mjs +0 -2
- package/dist/impl-FLj_mWLO.mjs.map +0 -1
- package/dist/impl-VPBEqV0w2.mjs.map +0 -1
- package/dist/impl-m3QXCc6n.mjs.map +0 -1
- package/dist/logger-9T6vva73.mjs +0 -2
- package/dist/logger-9T6vva73.mjs.map +0 -1
- package/dist/manifest-DVuW_vvO.mjs +0 -2
- package/dist/manifest-DVuW_vvO.mjs.map +0 -1
- package/dist/mergeTranscendInputs-CWHXH0kF.mjs +0 -3
- package/dist/mergeTranscendInputs-CWHXH0kF.mjs.map +0 -1
- package/dist/missing-manifest-BKj1j-jg.mjs +0 -2
- package/dist/missing-manifest-BKj1j-jg.mjs.map +0 -1
- package/dist/printResult-esxW3HhT.mjs.map +0 -1
- package/dist/project-plan-apply-C2DfikVN.mjs +0 -3
- package/dist/project-plan-apply-C2DfikVN.mjs.map +0 -1
- package/dist/readTranscendYaml-STYnRzq-.mjs +0 -4
- package/dist/readTranscendYaml-STYnRzq-.mjs.map +0 -1
- package/dist/runOpa-CkKAwsvB.mjs +0 -2
- package/dist/runOpa-CkKAwsvB.mjs.map +0 -1
- package/dist/scaffold-planning-DMACXSnX.mjs +0 -121
- package/dist/scaffold-planning-DMACXSnX.mjs.map +0 -1
- package/dist/scaffold-templates-CsHM1y80.mjs +0 -84
- package/dist/scaffold-templates-CsHM1y80.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codecs-BsQFAFGT.mjs","names":[],"sources":["../src/codecs.ts"],"sourcesContent":["import {\n InitialViewState,\n BrowserLanguage,\n UserPrivacySignalEnum,\n OnConsentExpiry,\n} from '@transcend-io/airgap.js-types';\nimport { LOCALE_KEY } from '@transcend-io/internationalization';\nimport {\n DataCategoryType,\n ConsentBundleType,\n EnricherType,\n ProcessingPurpose,\n RequestAction,\n ComparisonOperator,\n RequestActionObjectResolver,\n AssessmentSyncColumn,\n RetentionScheduleType,\n AssessmentQuestionType,\n DataFlowScope,\n PromptAVendorEmailSendType,\n RetentionScheduleOperation,\n AssessmentsDisplayLogicAction,\n DefaultConsentOption,\n LogicOperator,\n ConsentPrecedenceOption,\n AssessmentSyncModel,\n AssessmentQuestionSubType,\n IsoCountryCode,\n BrowserTimeZone,\n IsoCountrySubdivisionCode,\n ConsentTrackerStatus,\n AttributeKeyType,\n PromptAVendorEmailCompletionLinkType,\n RegionsOperator,\n UnknownRequestPolicy,\n TelemetryPartitionStrategy,\n SignedIabAgreementOption,\n RegionDetectionMethod,\n PreflightRequestStatus,\n AttributeSupportedResourceType,\n SubDataPointDataSubCategoryGuessStatus,\n CodePackageType,\n ActionItemPriorityOverride,\n ActionItemCode,\n ScopeName,\n TranscendProduct,\n PrivacyCenterComponentStyles,\n PrivacyCenterTextStyles,\n PreferenceStoreAuthLevel,\n ConfigurableColorPaletteColor,\n PrivacyCenterFooterLayout,\n AssessmentFormTemplateStatus,\n AssessmentFormStatus,\n AssessmentFormTemplateSource,\n UnstructuredSubDataPointRecommendationStatus,\n PreferenceTopicType,\n Controllership,\n RetentionType,\n DataProtectionImpactAssessmentStatus,\n WorkflowConfigVisibility,\n WorkflowConfigType,\n CollectDataSubjectRegions,\n ConsentThemeInput,\n ConsentVariantInput,\n PolicyType,\n} from '@transcend-io/privacy-types';\nimport { applyEnum, valuesOf } from '@transcend-io/type-utils';\n// eslint-disable-next-line eslint-comments/disable-enable-pair\n/* eslint-disable max-lines */\nimport * as t from 'io-ts';\n\n/**\n * Input to define email templates that can be used to communicate to end-users\n * about the status of their requests\n *\n * @see https://docs.transcend.io/docs/privacy-requests/configuring-requests/email-templates\n */\nexport const TemplateInput = t.type({\n /** The title of the template */\n title: t.string,\n});\n\n/** Type override */\nexport type TemplateInput = t.TypeOf<typeof TemplateInput>;\n\nexport const WebhookHeader = t.intersection([\n t.type({\n /** The name of the header to set. */\n name: t.string,\n /** The value of the header. */\n value: t.string,\n }),\n t.partial({\n /** The header contains a secret */\n isSecret: t.boolean,\n }),\n]);\n\n/** Type override */\nexport type WebhookHeader = t.TypeOf<typeof WebhookHeader>;\n\n/**\n * Input to define API keys that may be shared across data silos\n * in the data map. When creating new data silos through the yaml\n * cli, it is possible to specify which API key should be associated\n * with the newly created data silo.\n *\n * @see https://docs.transcend.io/docs/authentication\n */\nexport const ApiKeyInput = t.type({\n /** The display title of the enricher */\n title: t.string,\n});\n\n/** Type override */\nexport type ApiKeyInput = t.TypeOf<typeof ApiKeyInput>;\n\n/**\n * Input to define teams in Transcend\n * Users belong to teams and teams can be assigned to various resources\n *\n * @see https://docs.transcend.io/docs/security/access-control\n */\nexport const TeamInput = t.intersection([\n t.type({\n /** The display name of the team */\n name: t.string,\n /** Team description */\n description: t.string,\n }),\n t.partial({\n /** SSO department for automated provisioning */\n 'sso-department': t.string,\n /** SSO group name for automated provisioning */\n 'sso-group': t.string,\n /** SSO title mapping for automated provisioning */\n 'sso-title': t.string,\n /** Parent organization team name to link this team to */\n 'parent-team-name': t.string,\n /** List of user emails on the team */\n users: t.array(t.string),\n /** List of scopes that the team should have */\n scopes: t.array(valuesOf(ScopeName)),\n }),\n]);\n\n/** Type override */\nexport type TeamInput = t.TypeOf<typeof TeamInput>;\n\n/**\n * Input to define an enricher\n *\n * Define enricher or pre-flight check webhooks that will be executed\n * prior to privacy request workflows. Some examples may include:\n * - identity enrichment: look up additional identifiers for that user.\n * i.e. map an email address to a user ID\n * - fraud check: auto-cancel requests if the user is flagged for fraudulent behavior\n * - customer check: auto-cancel request for some custom business criteria\n *\n * @see https://docs.transcend.io/docs/identity-enrichment\n */\nexport const EnricherInput = t.intersection([\n t.type({\n /** The display title of the enricher */\n title: t.string,\n\n /**\n * The names of the identifiers that can be resolved by this enricher.\n * i.e. email -> [userId, phone, advertisingId]\n */\n 'output-identifiers': t.array(t.string),\n }),\n t.partial({\n /** Internal description for why the enricher is needed */\n description: t.string,\n /** The URL of the enricher */\n url: t.string,\n /** The type of enricher */\n type: valuesOf(EnricherType),\n /**\n * The name of the identifier that will be the input to this enricher.\n * Whenever a privacy request contains this identifier, the webhook will\n * be called with the value of that identifier as input\n */\n 'input-identifier': t.string,\n /**\n * A regular expression that can be used to match on for cancellation\n */\n testRegex: t.string,\n /**\n * For looker integration - the title of the looker query to run\n */\n lookerQueryTitle: t.string,\n /**\n * The duration (in ms) that the enricher should take to execute.\n */\n expirationDuration: t.number,\n /**\n * The status that the enricher should transfer to when condition is met.\n */\n transitionRequestStatus: valuesOf(PreflightRequestStatus),\n /**\n * For twilio integration - the phone numbers that can be used to send text codes\n */\n phoneNumbers: t.array(t.string),\n /** The list of regions that should trigger the preflight check */\n regionList: t.array(valuesOf({ ...IsoCountryCode, ...IsoCountrySubdivisionCode })),\n /**\n * Specify which data subjects the enricher should run for\n */\n 'data-subjects': t.array(t.string),\n /** Headers to include in the webhook */\n headers: t.array(WebhookHeader),\n /** The privacy actions that the enricher should run against */\n 'privacy-actions': t.array(valuesOf(RequestAction)),\n }),\n]);\n\n/** Type override */\nexport type EnricherInput = t.TypeOf<typeof EnricherInput>;\n\n/**\n * The processing purpose for a field\n */\nexport const ProcessingPurposePreviewInput = t.intersection([\n t.type({\n /** The parent purpose */\n purpose: valuesOf(ProcessingPurpose),\n }),\n t.partial({\n /** User-defined name for this processing purpose sub category */\n name: t.string,\n }),\n]);\n\n/** Type override */\nexport type ProcessingPurposePreviewInput = t.TypeOf<typeof ProcessingPurposePreviewInput>;\n\n/**\n * The data category for a field\n */\nexport const DataCategoryPreviewInput = t.intersection([\n t.type({\n /** The parent category */\n category: valuesOf(DataCategoryType),\n }),\n t.partial({\n /** User-defined name for this sub category */\n name: t.string,\n }),\n]);\n\n/** Type override */\nexport type DataCategoryPreviewInput = t.TypeOf<typeof DataCategoryPreviewInput>;\n\n/**\n * A guessed data category from the content classifier\n */\nexport const DataCategoryGuessInput = t.intersection([\n t.type({\n /** The parent category */\n category: DataCategoryPreviewInput,\n /** Status of guess */\n status: valuesOf(SubDataPointDataSubCategoryGuessStatus),\n /** Confidence level of guess */\n confidence: t.number,\n }),\n t.partial({\n /** classifier version that produced the guess */\n classifierVersion: t.number,\n }),\n]);\n\n/** Type override */\nexport type DataCategoryGuessInput = t.TypeOf<typeof DataCategoryGuessInput>;\n\n/**\n * A guessed data category from the content classifier\n */\nexport const DataCategoryRecommendationInput = t.intersection([\n t.type({\n /** The parent category */\n category: DataCategoryPreviewInput,\n /** Status of guess */\n status: valuesOf(UnstructuredSubDataPointRecommendationStatus),\n /** Confidence level of guess */\n confidence: t.number,\n }),\n t.partial({\n /** classifier version that produced the guess */\n classifierVersion: t.number,\n }),\n]);\n\n/** Type override */\nexport type DataCategoryRecommendationInput = t.TypeOf<typeof DataCategoryRecommendationInput>;\n\nexport const AttributeValueInput = t.intersection([\n t.type({\n /** Name of attribute value */\n name: t.string,\n }),\n t.partial({\n /** Description */\n description: t.string,\n /** Color */\n color: t.string,\n }),\n]);\n\n/** Type override */\nexport type AttributeValueInput = t.TypeOf<typeof AttributeValueInput>;\n\nexport const AttributeInput = t.intersection([\n t.type({\n /** Name of attribute */\n name: t.string,\n /** Type of attribute */\n type: valuesOf(AttributeKeyType),\n }),\n t.partial({\n /** Description of attribute */\n description: t.string,\n /** Resource types that the attribute is enabled on */\n resources: t.array(valuesOf(AttributeSupportedResourceType)),\n /** Values of attribute */\n values: t.array(AttributeValueInput),\n }),\n]);\n\n/** Type override */\nexport type AttributeInput = t.TypeOf<typeof AttributeInput>;\n\nexport const AttributePreview = t.type({\n /** Attribute key */\n key: t.string,\n /** Attribute values */\n values: t.array(t.string),\n});\n\n/** Type override */\nexport type AttributePreview = t.TypeOf<typeof AttributePreview>;\n\n/**\n * Vendor type definition.\n */\nexport const VendorInput = t.intersection([\n t.type({\n /** Title of vendor */\n title: t.string,\n }),\n t.partial({\n /** Description of vendor */\n description: t.string,\n /** DPA link */\n dataProcessingAgreementLink: t.string,\n /** Contract email */\n contactName: t.string,\n /** Contract phone */\n contactPhone: t.string,\n /** Address */\n address: t.string,\n /** Headquarters country */\n headquarterCountry: valuesOf(IsoCountryCode),\n /** Headquarters subdivision */\n headquarterSubDivision: valuesOf(IsoCountrySubdivisionCode),\n /** Website URL */\n websiteUrl: t.string,\n /** Business entity */\n businessEntity: t.string,\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this vendor\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this vendor\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/**\n * Type override\n */\nexport type VendorInput = t.TypeOf<typeof VendorInput>;\n\n/**\n * DataCategory type definition.\n */\nexport const DataCategoryInput = t.intersection([\n t.type({\n /** Name of data category */\n name: t.string,\n /** Type of data category */\n category: valuesOf(DataCategoryType),\n }),\n t.partial({\n /** Description of data category */\n description: t.string,\n /** Regex for data category */\n regex: t.string,\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data category\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data category.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/**\n * Type override\n */\nexport type DataCategoryInput = t.TypeOf<typeof DataCategoryInput>;\n\n/**\n * ProcessingPurpose type definition.\n */\nexport const ProcessingPurposeInput = t.intersection([\n t.type({\n /** Name of processing purpose */\n name: t.string,\n /** Type of processing purpose */\n purpose: valuesOf(ProcessingPurpose),\n }),\n t.partial({\n /** Description of processing purpose */\n description: t.string,\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this processing purpose\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this processing purpose.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/**\n * Type override\n */\nexport type ProcessingPurposeInput = t.TypeOf<typeof ProcessingPurposeInput>;\n\n/**\n * Annotate specific fields within a datapoint. These are often database table columns.\n * Fields can also be a JSON object or separate file.\n */\nexport const FieldInput = t.intersection([\n t.type({\n /** The unique key of the field. When a database, this is the column name. */\n key: t.string,\n }),\n t.partial({\n /** The display title of the field */\n title: t.string,\n /** Description of the field */\n description: t.union([t.string, t.null]),\n /**\n * What is the purpose of processing for this datapoint/table?\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n purposes: t.array(ProcessingPurposePreviewInput),\n /**\n * The category of personal data for this datapoint\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n categories: t.array(DataCategoryPreviewInput),\n /**\n * The category of personal data that have been guessed by the classifier this datapoint\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n 'guessed-categories': t.array(DataCategoryGuessInput),\n /**\n * When true, this subdatapoint should be revealed in a data access request.\n * When false, this field should be redacted\n */\n 'access-request-visibility-enabled': t.boolean,\n /**\n * When true, this subdatapoint should be redacted during an erasure request.\n * There normally is a choice of enabling hard deletion or redaction at the\n * datapoint level, but if redaction is enabled, this column can be used\n * to define which fields should be redacted.\n */\n 'erasure-request-redaction-enabled': t.boolean,\n /** Attributes tagged to subdatapoint */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type FieldInput = t.TypeOf<typeof FieldInput>;\n\n/**\n * Datapoints are the different types of data models that existing within your data silo.\n * If the data silo is a database, these would be your tables.\n * Note: These are currently called \"datapoints\" in the Transcend UI and documentation.\n *\n * @see https://docs.transcend.io/docs/the-data-map#datapoints\n */\nexport const DatapointInput = t.intersection([\n t.type({\n /** The unique key of the datapoint. For a database, this is the table name. */\n key: t.string,\n }),\n t.partial({\n /**\n * Usually only relevant for databases,\n * this field should include any schema information for a given datapoint.\n *\n * Examples:\n * - In postgres, it's possible to have multiple tables with the same name under\n * different schemas. e.g., \"public\", \"test\". So here you'd specify [\"public\"] or [\"test\"]\n * - In Snowflake, it's possible to have different databases with different schemas,\n * so you can specify [\"ANALYTICS\", \"public\"] to indicate that the datapoint belongs to\n * the \"public\" schema of the \"ANALYTICS\" database.\n */\n path: t.array(t.string),\n /** The display title of the enricher */\n title: t.string,\n /** Internal description for why the enricher is needed */\n description: t.string,\n /**\n * Configure the category of data that this datapoint should be grouped by in a data access request.\n *\n * @see https://docs.transcend.io/docs/privacy-requests/connecting-data-silos/saas-tools#configuring-an-integration\n */\n 'data-collection-tag': t.string,\n /**\n * The SQL queries that should be run for that datapoint in a privacy request.\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/actions.ts\n */\n 'privacy-action-queries': t.partial(applyEnum(RequestActionObjectResolver, () => t.string)),\n /**\n * The types of privacy actions that this datapoint can implement\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/actions.ts\n */\n 'privacy-actions': t.array(valuesOf(RequestActionObjectResolver)),\n /**\n * Provide field-level metadata for this datapoint.\n * This is often the column metadata\n */\n fields: t.array(FieldInput),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this datapoint\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this datapoint\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type DatapointInput = t.TypeOf<typeof DatapointInput>;\n\nexport const PromptAVendorEmailSettings = t.partial({\n /** The email address of the user to notify when a promptAPerson integration */\n 'notify-email-address': t.string,\n /**\n * The frequency with which we should be sending emails for this data silo, in milliseconds.\n */\n 'send-frequency': t.number,\n /**\n * The type of emails to send for this data silo, i.e. send an email for each DSR, across all open DSRs,\n * or per profile in a DSR.\n */\n 'send-type': valuesOf(PromptAVendorEmailSendType),\n /**\n * Indicates whether prompt-a-vendor emails should include a list of identifiers\n * in addition to a link to the bulk processing UI.\n */\n 'include-identifiers-attachment': t.boolean,\n /**\n * Indicates what kind of link to generate as part of the emails sent out for this Prompt-a-Vendor silo.\n */\n 'completion-link-type': valuesOf(PromptAVendorEmailCompletionLinkType),\n /**\n * The frequency with which we should retry sending emails for this data silo, in milliseconds.\n * Needs to be a string because the number can be larger than the MAX_INT\n */\n 'manual-work-retry-frequency': t.string,\n});\n\n/** Type override */\nexport type PromptAVendorEmailSettings = t.TypeOf<typeof PromptAVendorEmailSettings>;\n\n/**\n * Input to define a business entity\n *\n * @see https://app.transcend.io/data-map/data-inventory/business-entities\n */\nexport const BusinessEntityInput = t.intersection([\n t.type({\n /** The title of the business entity */\n title: t.string,\n }),\n t.partial({\n /** Description of the business entity */\n description: t.string,\n /** Address of the business entity */\n address: t.string,\n /** Country of headquarters */\n headquarterCountry: valuesOf(IsoCountryCode),\n /** Subdivision of headquarters */\n headquarterSubDivision: valuesOf(IsoCountrySubdivisionCode),\n /** Data protection officer name for the business entity */\n dataProtectionOfficerName: t.string,\n /** Data protection officer email for the business entity */\n dataProtectionOfficerEmail: t.string,\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data silo\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data silo.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type BusinessEntityInput = t.TypeOf<typeof BusinessEntityInput>;\n\nexport const RegionInput = t.partial({\n /** The country */\n country: valuesOf(IsoCountryCode),\n /** The country subdivision */\n countrySubDivision: valuesOf(IsoCountrySubdivisionCode),\n});\n\n/** Type override */\nexport type RegionInput = t.TypeOf<typeof RegionInput>;\n\n/**\n * Input to define a processing activity\n *\n * @see https://app.transcend.io/data-map/data-inventory/processing-activities\n */\nexport const ProcessingActivityInput = t.intersection([\n t.type({\n /** The title of the processing activity */\n title: t.string,\n }),\n t.partial({\n /** Description of the processing activity */\n description: t.string,\n /** Security measure details */\n securityMeasureDetails: t.string,\n /**\n * Controllerships\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/datapoint.ts\n */\n controllerships: t.array(valuesOf(Controllership)),\n /** Storage regions */\n storageRegions: t.array(RegionInput),\n /** Transfer regions */\n transferRegions: t.array(RegionInput),\n /**\n * Retention type\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/datapoint.ts\n */\n retentionType: valuesOf(RetentionType),\n /** Retention period in days */\n retentionPeriod: t.number,\n /** Data protection impact assessment link */\n dataProtectionImpactAssessmentLink: t.string,\n /**\n * Data protection impact assessment status\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/processingActivity.ts.ts\n */\n dataProtectionImpactAssessmentStatus: valuesOf(DataProtectionImpactAssessmentStatus),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n /** Data silo titles */\n dataSiloTitles: t.array(t.string),\n /** Data subject types */\n dataSubjectTypes: t.array(t.string),\n /** Team names */\n teamNames: t.array(t.string),\n /** Owner emails */\n ownerEmails: t.array(t.string),\n /**\n * The purposes of processing for this processing activity\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n processingSubPurposes: t.array(ProcessingPurposePreviewInput),\n /**\n * The categories of personal data for this processing activity\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n dataSubCategories: t.array(DataCategoryPreviewInput),\n /** SaaS category titles */\n saaSCategories: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type ProcessingActivityInput = t.TypeOf<typeof ProcessingActivityInput>;\n\n/**\n * Software development kit inputs\n *\n * @see https://app.transcend.io/code-scanning/sdks\n */\nexport const SoftwareDevelopmentKitInput = t.intersection([\n t.type({\n /** Title of software development kit */\n name: t.string,\n /** Code package type */\n codePackageType: valuesOf(CodePackageType),\n }),\n t.partial({\n /** Description of the SDK */\n description: t.string,\n /** Github repository */\n repositoryUrl: t.string,\n /** Integration name */\n catalogIntegrationName: t.string,\n /** Doc links */\n documentationLinks: t.array(t.string),\n /** Emails of owners */\n ownerEmails: t.array(t.string),\n /** Team names */\n teamNames: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type SoftwareDevelopmentKitInput = t.TypeOf<typeof SoftwareDevelopmentKitInput>;\n\n/**\n * SDK defined for a code package\n */\nexport const CodePackageSdk = t.intersection([\n t.type({\n /** Name of SDK */\n name: t.string,\n }),\n t.partial({\n /** Version of SDK */\n version: t.string,\n /** Indicate if dependency is a dev dependency */\n isDevDependency: t.boolean,\n }),\n]);\n\n/** Type override */\nexport type CodePackageSdk = t.TypeOf<typeof CodePackageSdk>;\n\n/**\n * Input to define a code package\n *\n * @see https://app.transcend.io/code-scanning/code-packages\n */\nexport const CodePackageInput = t.intersection([\n t.type({\n /** The name of the package */\n name: t.string,\n /** Type of code package */\n type: valuesOf(CodePackageType),\n /** Relative path to code package within the repository */\n relativePath: t.string,\n /** Name of repository that the code packages are being uploaded to */\n repositoryName: t.string,\n }),\n t.partial({\n /** Description of the code package */\n description: t.string,\n /** Software development kits in the repository */\n softwareDevelopmentKits: t.array(CodePackageSdk),\n /** Names of the teams that manage the code package */\n teamNames: t.array(t.string),\n /** Names of the owner emails that manage the code package */\n ownerEmails: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type CodePackageInput = t.TypeOf<typeof CodePackageInput>;\n\n/**\n * Input to define a repository\n *\n * @see https://app.transcend.io/code-scanning/repositories\n */\nexport const RepositoryInput = t.intersection([\n t.type({\n /** The name of the repo */\n name: t.string,\n /** URL of repository */\n url: t.string,\n }),\n t.partial({\n /** Description of the repository */\n description: t.string,\n /** Names of the teams that manage the repository */\n teamNames: t.array(t.string),\n /** Names of the owner emails that manage the repository */\n ownerEmails: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type RepositoryInput = t.TypeOf<typeof RepositoryInput>;\n\n/**\n * Input to define a data subject\n *\n * @see https://app.transcend.io/privacy-requests/settings\n */\nexport const DataSubjectInput = t.intersection([\n t.type({\n /** The type of the data subject */\n type: t.string,\n }),\n t.partial({\n /** Whether the data subject is active on the Privacy Center & DSR API */\n active: t.boolean,\n /** The title of the data subject */\n title: t.string,\n /** Whether or not to default new requests made in the admin dashboard to silent mode */\n adminDashboardDefaultSilentMode: t.boolean,\n /**\n * Whether requests can be submitted on behalf of this data subject by an authorized agent.\n * Requires the Authorized Agents feature to be enabled for the organization.\n */\n supportsAuthorizedAgent: t.boolean,\n /** Enabled request actions for the data subject */\n actions: t.array(valuesOf(RequestAction)),\n }),\n]);\n\n/** Type override */\nexport type DataSubjectInput = t.TypeOf<typeof DataSubjectInput>;\n\n/**\n * Input to define an action\n *\n * @see https://app.transcend.io/privacy-requests/settings\n */\nexport const ActionInput = t.intersection([\n t.type({\n /** The type of the data subject */\n type: valuesOf(RequestAction),\n }),\n t.partial({\n /** Whether or not to skip deletion phase when no data is found */\n skipSecondaryIfNoFiles: t.boolean,\n /** Whether to skip the downloadable step */\n skipDownloadableStep: t.boolean,\n /** Whether the request action requires review */\n requiresReview: t.boolean,\n /** The wait period for the action */\n waitingPeriod: t.number,\n /** The method in which the data subject's region is detected */\n regionDetectionMethod: valuesOf(RegionDetectionMethod),\n /** The list of regions to show in the form */\n regionList: t.array(valuesOf({ ...IsoCountryCode, ...IsoCountrySubdivisionCode })),\n /** The list of regions NOT to show in the form */\n regionBlockList: t.array(valuesOf({ ...IsoCountryCode, ...IsoCountrySubdivisionCode })),\n }),\n]);\n\n/** Type override */\nexport type ActionInput = t.TypeOf<typeof ActionInput>;\n\n/**\n * Input to define an identifier\n *\n * @see https://app.transcend.io/privacy-requests/identifiers\n */\nexport const IdentifierInput = t.intersection([\n t.type({\n /** The name of the identifier */\n name: t.string,\n /** The type of the identifier */\n type: t.string,\n }),\n t.partial({\n /** Regular expression to verify the identifier */\n regex: t.string,\n /** The fixed set of options that an identifier can take on */\n selectOptions: t.array(t.string),\n /** Whether or not the identifier is shown in the privacy center form */\n privacyCenterVisibility: t.array(valuesOf(RequestAction)),\n /** The set of data subjects that this identifier is enabled for */\n dataSubjects: t.array(t.string),\n /** When true, the identifier is a required field on the privacy center form */\n isRequiredInForm: t.boolean,\n /** Placeholder message for identifier */\n placeholder: t.string,\n /** Display title for identifier */\n displayTitle: t.string,\n /** Display description for identifier */\n displayDescription: t.string,\n /** The display order for the identifier */\n displayOrder: t.number,\n /** Whether or not the identifier is unique on the preference store */\n isUniqueOnPreferenceStore: t.boolean,\n }),\n]);\n\n/** Type override */\nexport type IdentifierInput = t.TypeOf<typeof IdentifierInput>;\n\n/**\n * Input to define a data flow\n *\n * @see https://app.transcend.io/consent-manager/data-flows/approved\n */\nexport const DataFlowInput = t.intersection([\n t.type({\n /** Value of data flow */\n value: t.string,\n /** Type of data flow */\n type: valuesOf(DataFlowScope),\n }),\n t.partial({\n /** Description of data flow */\n description: t.string,\n /** The tracking purposes that are required to be opted in for this data flow */\n trackingPurposes: t.array(t.string),\n /**\n * Name of the consent service attached\n */\n service: t.string,\n /**\n * Status of the tracker (approved vs triage)\n */\n status: valuesOf(ConsentTrackerStatus),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data silo\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data silo.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type DataFlowInput = t.TypeOf<typeof DataFlowInput>;\n\nexport const CookieInput = t.intersection([\n t.type({\n /** Name of data flow */\n name: t.string,\n }),\n t.partial({\n /** Whether or not the cookie is a regular expression */\n isRegex: t.boolean,\n /** Description of data flow */\n description: t.string,\n /** The tracking purposes that are required to be opted in for this data flow */\n trackingPurposes: t.array(t.string),\n /**\n * Name of the consent service attached\n */\n service: t.string,\n /**\n * Status of the tracker (approved vs triage)\n */\n status: valuesOf(ConsentTrackerStatus),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data silo\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data silo.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type CookieInput = t.TypeOf<typeof CookieInput>;\n\nexport const ConsentManageExperienceInput = t.intersection([\n t.type({\n /** Name of experience */\n name: t.string,\n }),\n t.partial({\n /** Name of experience */\n displayName: t.string,\n /** Region that define this regional experience */\n regions: t.array(RegionInput),\n /** How to handle consent expiry */\n onConsentExpiry: valuesOf(OnConsentExpiry),\n /** Consent expiration lever */\n consentExpiry: t.number,\n /** In vs not in operator */\n operator: valuesOf(RegionsOperator),\n /** Priority of experience */\n displayPriority: t.number,\n /** View state to prompt when auto prompting is enabled */\n viewState: valuesOf(InitialViewState),\n /** Purposes that can be opted out of in a particular experience */\n purposes: t.array(\n t.type({\n /** Slug of purpose */\n trackingType: t.string,\n }),\n ),\n /** Purposes that are opted out by default in a particular experience */\n optedOutPurposes: t.array(\n t.type({\n /** Slug of purpose */\n trackingType: t.string,\n }),\n ),\n /**\n * Browser languages that define this regional experience\n */\n browserLanguages: t.array(valuesOf(BrowserLanguage)),\n /** Browser time zones that define this regional experience */\n browserTimeZones: t.array(valuesOf(BrowserTimeZone)),\n /** ID of the consent UI variant assigned to this experience */\n consentUiVariantSlug: t.string,\n }),\n]);\n\n/** Type override */\nexport type ConsentManageExperienceInput = t.TypeOf<typeof ConsentManageExperienceInput>;\n\nexport const PartitionInput = t.intersection([\n t.type({\n /** Name of partition */\n name: t.string,\n }),\n t.partial({\n /** Value of partition, cannot be pushed, can only be pulled */\n partition: t.string,\n }),\n]);\n\n/** Type override */\nexport type PartitionInput = t.TypeOf<typeof PartitionInput>;\n\nexport const ConsentManagerInput = t.partial({\n /** Airgap version */\n version: t.string,\n /** The consent manager domains in the instance */\n bundleUrls: t.record(valuesOf(ConsentBundleType), t.string),\n /** The consent manager domains in the instance */\n domains: t.array(t.string),\n /** Key used to partition consent records */\n partition: t.string,\n /** Precedence of signals vs user input */\n consentPrecedence: valuesOf(ConsentPrecedenceOption),\n /** The consent manager unknown request policy */\n unknownRequestPolicy: valuesOf(UnknownRequestPolicy),\n /** The consent manager unknown cookie policy */\n unknownCookiePolicy: valuesOf(UnknownRequestPolicy),\n /** The XDI sync endpoint for this airgap bundle */\n syncEndpoint: t.string,\n /** The telemetry partitioning strategy */\n telemetryPartitioning: valuesOf(TelemetryPartitionStrategy),\n /** Whether the site owner has signed the IAB agreement */\n signedIabAgreement: valuesOf(SignedIabAgreementOption),\n /** Regional experience configurations */\n experiences: t.array(ConsentManageExperienceInput),\n /** Theme config */\n theme: t.partial({\n /** Primary color */\n primaryColor: t.string,\n /** Font color */\n fontColor: t.string,\n /** Privacy policy URL */\n privacyPolicy: t.string,\n /** Auto-prompt setting */\n prompt: t.number,\n }),\n // TODO: https://transcend.height.app/T-23919 - reconsider simpler yml shape\n /** The Shared XDI host sync groups config (JSON) for this airgap bundle */\n syncGroups: t.string,\n consentVariants: t.array(ConsentVariantInput),\n consentThemes: t.array(ConsentThemeInput),\n});\n\n/** Type override */\nexport type ConsentManagerInput = t.TypeOf<typeof ConsentManagerInput>;\n\n/**\n * Input to define a privacy center\n */\nexport const PrivacyCenterInput = t.partial({\n /** Whether or not the entire privacy center is enabled or disabled */\n isDisabled: t.boolean,\n /** Whether or not to show the privacy requests button */\n showPrivacyRequestButton: t.boolean,\n /** Whether or not to show the policies page */\n showPolicies: t.boolean,\n /** Whether or not to show the tracking technologies page */\n showTrackingTechnologies: t.boolean,\n /** Whether or not to show the cookies on the tracking technologies page */\n showCookies: t.boolean,\n /** Whether or not to show the data flows on the tracking technologies page */\n showDataFlows: t.boolean,\n /** Whether or not to show the consent manager opt out options on the tracking technologies page */\n showConsentManager: t.boolean,\n /** Whether or not to show the manage your privacy page */\n showManageYourPrivacy: t.boolean,\n /** Whether or not to show the marketing preferences page */\n showMarketingPreferences: t.boolean,\n /** What languages are supported for the privacy center */\n locales: t.array(valuesOf(LOCALE_KEY)),\n /** The default locale for the privacy center */\n defaultLocale: valuesOf(LOCALE_KEY),\n /** Whether or not to prefer the browser default locale */\n preferBrowserDefaultLocale: t.boolean,\n /** The email addresses of the employees within your company that are the go-to individuals for managing this privacy center */\n supportEmail: t.string,\n /** The email addresses of the employees within your company that are the go-to individuals for managing this privacy center */\n replyToEmail: t.string,\n /** Whether or not to send emails from a no reply email */\n useNoReplyEmailAddress: t.boolean,\n /** Whether or not to use a custom email domain */\n useCustomEmailDomain: t.boolean,\n /** Whether or not to transcend access requests from JSON to CSV */\n transformAccessReportJsonToCsv: t.boolean,\n /**\n * Privacy Center \"home\" / back-to-site link URL shown in the privacy center\n * header\n */\n home: t.string,\n /** Whether the side menu is expanded by default on the privacy center */\n expandSideMenuByDefault: t.boolean,\n /**\n * Whether custom fields are required when submitting privacy requests from\n * the privacy center workflows UI\n */\n workflowsCustomFieldsRequired: t.boolean,\n /**\n * Child organization URIs (or IDs) to display on a unified multi-brand\n * privacy center. Resolved to organization IDs on push.\n */\n displayedChildOrganizationUris: t.array(t.string),\n /** Footer layout for privacy center footer links */\n footerLayout: valuesOf(PrivacyCenterFooterLayout),\n /**\n * Footer links displayed on the privacy center. Matched by title on push;\n * links omitted from this list are deleted.\n */\n footerLinks: t.array(\n t.intersection([\n t.type({\n /** Link title (default locale) */\n title: t.string,\n }),\n t.partial({\n /** Link URL (default locale); optional for icon-only links */\n url: t.string,\n /**\n * When true with an icon set, render as icon-only (title is used for\n * accessibility). When false with an icon set, render icon beside the\n * visible label.\n */\n iconOnly: t.boolean,\n }),\n ]),\n ),\n /** The theme object of colors to display on the privacy center */\n theme: t.partial({\n /** The theme colors */\n colors: t.partial(applyEnum(ConfigurableColorPaletteColor, () => t.string)),\n /** Styles to apply to components */\n componentStyles: PrivacyCenterComponentStyles,\n /** Override styles */\n textStyles: PrivacyCenterTextStyles,\n }),\n});\n\n/** Type override */\nexport type PrivacyCenterInput = t.TypeOf<typeof PrivacyCenterInput>;\n\n/**\n * Input to define a policy\n */\nexport const PolicyInput = t.intersection([\n t.type({\n /** The title of the policy */\n title: t.string,\n }),\n t.partial({\n /**\n * Policy type. On create, defaults from title\n * (Privacy Policy / Cookie Policy / CUSTOM).\n */\n type: valuesOf(PolicyType),\n /** Effective date of policy */\n effectiveOn: t.string,\n /** Whether or not to disable the effective date */\n disableEffectiveOn: t.boolean,\n /** Content of the policy */\n content: t.string,\n /** The languages for which the policy is disabled for */\n disabledLocales: t.array(valuesOf(LOCALE_KEY)),\n }),\n]);\n\n/** Type override */\nexport type PolicyInput = t.TypeOf<typeof PolicyInput>;\n\n/**\n * Input to define an internationalized message defined in Transcend\n */\nexport const IntlMessageInput = t.intersection([\n t.type({\n /** The ID of the message */\n id: t.string,\n }),\n t.partial({\n /** The hard-coded ID that the message refers to in the Privacy Center or Consent Manager UI, null if message is dynamic */\n targetReactIntlId: t.string,\n /** The description of the message */\n description: t.string,\n /** The default message to use */\n defaultMessage: t.string,\n /** The translations */\n translations: t.partial(applyEnum(LOCALE_KEY, () => t.string)),\n }),\n]);\n\n/** Type override */\nexport type IntlMessageInput = t.TypeOf<typeof IntlMessageInput>;\n\n/**\n * A set of deletion dependencies, either global (when `workflow` is omitted)\n * or scoped to a single DSR workflow.\n *\n * An empty `titles` list scoped to a workflow is an explicit override, meaning\n * that workflow runs the data silo with no dependencies at all.\n */\nexport const DeletionDependency = t.intersection([\n t.type({\n /**\n * The titles of the data silos that must be deleted from first. This list can contain\n * other internal systems defined in this file, as well as any of the SaaS tools connected\n * in your Transcend instance.\n */\n titles: t.array(t.string),\n }),\n t.partial({\n /**\n * The internal name of the DSR workflow that these dependencies override the global\n * configuration for. Omit to declare the global configuration.\n */\n workflow: t.string,\n }),\n]);\n\n/** Type override */\nexport type DeletionDependency = t.TypeOf<typeof DeletionDependency>;\n\n/**\n * Removes a workflow's deletion dependency override so that the workflow falls back\n * to the global configuration.\n */\nexport const DeletionDependencyReset = t.type({\n /** The internal name of the DSR workflow to remove the override from */\n workflow: t.string,\n /** Must be `true`; declares that the override should be removed */\n 'reset-to-global': t.literal(true),\n});\n\n/** Type override */\nexport type DeletionDependencyReset = t.TypeOf<typeof DeletionDependencyReset>;\n\n/**\n * A single object entry in a data silo's `deletion-dependencies` list.\n * Global dependencies are written as `{ titles: [...] }`; per-workflow overrides\n * include a `workflow` key.\n */\nexport const DeletionDependencyInput = t.union([DeletionDependency, DeletionDependencyReset]);\n\n/** Type override */\nexport type DeletionDependencyInput = t.TypeOf<typeof DeletionDependencyInput>;\n\n/**\n * The `deletion-dependencies` field for a data silo.\n *\n * Prefer a list of objects: `{ titles: [...] }` for the global configuration and\n * `{ workflow, titles }` or `{ workflow, reset-to-global: true }` for each override.\n * A bare list of titles is still accepted for global-only configuration. Mixing\n * titles and objects in the same list is not allowed.\n */\nexport const DeletionDependencies = t.union([t.array(t.string), t.array(DeletionDependencyInput)]);\n\n/** Type override */\nexport type DeletionDependencies = t.TypeOf<typeof DeletionDependencies>;\n\n/**\n * Input to define a data silo\n *\n * Define the data silos in your data map. A data silo can be a database,\n * or a web service that may use a collection of different data stores under the hood.\n *\n * @see https://docs.transcend.io/docs/the-data-map#data-silos\n */\nexport const DataSiloInput = t.intersection([\n t.type({\n /** The display title of the data silo */\n title: t.string,\n /**\n * The type of integration. Common internal system types:\n * server | database | cron | promptAPerson\n */\n integrationName: t.string,\n }),\n t.partial({\n /** For prompt a person or database integrations, the underlying integration name */\n 'outer-type': t.string,\n /** A description for that data silo */\n description: t.string,\n /** The webhook URL to notify for data privacy requests */\n url: t.string,\n /** The title of the API key that will be used to respond to privacy requests */\n 'api-key-title': t.string,\n /**\n * The ID of the configured Sombra instance that processes privacy requests for this data silo.\n * Useful for multi-Sombra organizations. Pull/push via `transcend inventory pull` / `push`.\n */\n 'sombra-id': t.string,\n /** Custom headers to include in outbound webhook */\n headers: t.array(WebhookHeader),\n /**\n * Specify which data subjects may have personally-identifiable-information (PII) within this system\n * This field can be omitted, and the default assumption will be that the system may potentially\n * contain PII for any potential data subject type.\n */\n 'data-subjects': t.array(t.string),\n /**\n * When this data silo implements a privacy request, these are the identifiers\n * that should be looked up within this system.\n */\n 'identity-keys': t.array(t.string),\n /**\n * When a data erasure request is being performed, this data silo should not be deleted from\n * until all of the following data silos were deleted first. This list can contain other internal\n * systems defined in this file, as well as any of the SaaS tools connected in your Transcend instance.\n *\n * Prefer a list of objects: `{ titles: [...] }` for the global configuration and\n * `{ workflow, titles }` (or `{ workflow, reset-to-global: true }`) for each override.\n * A bare list of titles is still accepted for global-only configuration. Workflows that\n * are not listed keep whatever configuration they already have.\n */\n 'deletion-dependencies': DeletionDependencies,\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data silo\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data silo.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Specify this flag if the data silo is under development and should not be included\n * in production privacy request workflows. Will still sync metadata to app.transcend.io.\n */\n disabled: t.boolean,\n /**\n * Datapoints defined within this data silo, see comment of `DatapointInput`\n * for further details.\n */\n datapoints: t.array(DatapointInput),\n /**\n * Configure email notification settings for privacy requests\n */\n 'email-settings': PromptAVendorEmailSettings,\n /** Country of data silo hosting */\n country: valuesOf(IsoCountryCode),\n /** Sub-division of data silo hosting */\n countrySubDivision: valuesOf(IsoCountrySubdivisionCode),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n /**\n * The business entities associated with this data silo\n */\n businessEntityTitles: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type DataSiloInput = t.TypeOf<typeof DataSiloInput>;\n\nexport const ActionItemCollectionInput = t.intersection([\n t.type({\n /** The display title of the enricher */\n title: t.string,\n /** Locations where collection is shown */\n productLine: valuesOf(TranscendProduct),\n }),\n t.partial({\n /** Description of collection */\n description: t.string,\n /** Whether hidden */\n hidden: t.boolean,\n }),\n]);\n\n/** Type override */\nexport type ActionItemCollectionInput = t.TypeOf<typeof ActionItemCollectionInput>;\n\n/**\n * Input to define an action item\n */\nexport const ActionItemInput = t.intersection([\n t.type({\n /** The display title of the enricher */\n title: t.string,\n /** Action item type */\n type: valuesOf(ActionItemCode),\n /** The titles of the collections that the action item is grouped within */\n collections: t.array(t.string),\n }),\n t.partial({\n /** Priority of the action item */\n priority: valuesOf(ActionItemPriorityOverride),\n /** Customer experience action item key */\n customerExperienceActionItemId: t.string,\n /** Due date of the action item */\n dueDate: t.string,\n /** Whether action item has been resolved */\n resolved: t.boolean,\n /** Notes */\n notes: t.string,\n /** Links to action items */\n link: t.string,\n /**\n * The email addresses of the employees assigned to the action item\n */\n users: t.array(t.string),\n /**\n * The names of teams assigned to the action item\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type ActionItemInput = t.TypeOf<typeof ActionItemInput>;\n\nexport const AssessmentRuleInput = t.intersection([\n t.type({\n /** The reference id of the question whose answer is compared by this rule */\n 'depends-on-question-reference-id': t.string,\n /** The operator to use when comparing the question answer to the operands */\n 'comparison-operator': valuesOf(ComparisonOperator),\n }),\n t.partial({\n /** The values to compare the question answer to */\n 'comparison-operands': t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type AssessmentRuleInput = t.TypeOf<typeof AssessmentRuleInput>;\n\nexport interface AssessmentNestedRuleInput {\n /** The operator to use when comparing the nested rules */\n 'logic-operator': LogicOperator;\n /** The rules to evaluate and be compared with to other using the LogicOperator */\n rules?: AssessmentRuleInput[];\n /** The nested rules to add one more level of nesting to the rules. They are also compared to each other. */\n 'nested-rules'?: AssessmentNestedRuleInput[];\n}\n\nexport const AssessmentNestedRuleInput: t.RecursiveType<t.Type<AssessmentNestedRuleInput>> =\n t.recursion('AssessmentNestedRuleInput', (self) =>\n t.intersection([\n t.type({\n /** The operator to use when comparing the nested rules */\n 'logic-operator': valuesOf(LogicOperator),\n }),\n t.partial({\n /** The rules to evaluate and be compared with to other using the LogicOperator */\n rules: t.array(AssessmentRuleInput),\n /** The nested rules to add one more level of nesting to the rules. They are also compared to each other. */\n 'nested-rules': t.array(self),\n }),\n ]),\n );\n\nexport const AssessmentDisplayLogicInput = t.intersection([\n t.type({\n /** The display logic type */\n action: valuesOf(AssessmentsDisplayLogicAction),\n }),\n t.partial({\n /** The rule to evaluate */\n rule: AssessmentRuleInput,\n /** The nested rule to evaluate */\n 'nested-rule': AssessmentNestedRuleInput,\n }),\n]);\n\n/** Type override */\nexport type AssessmentDisplayLogicInput = t.TypeOf<typeof AssessmentDisplayLogicInput>;\n\nexport const RiskAssignmentInput = t.partial({\n /** The risk level to assign to the question */\n 'risk-level': t.string,\n /** The risk matrix column to assign to a question. */\n 'risk-matrix-column': t.string,\n /** The risk matrix row to assign to a question. */\n 'risk-matrix-row': t.string,\n});\n\n/** Type override */\nexport type RiskAssignmentInput = t.TypeOf<typeof RiskAssignmentInput>;\n\nexport const RiskLogicInput = t.intersection([\n t.type({\n /** The values to compare */\n 'comparison-operands': t.array(t.string),\n /** The operator */\n 'comparison-operator': valuesOf(ComparisonOperator),\n }),\n t.partial({\n /** The risk level to assign to the question */\n 'risk-level': t.string,\n /** The risk matrix column to assign to a question. */\n 'risk-matrix-column': t.string,\n /** The risk matrix row to assign to a question. */\n 'risk-matrix-row': t.string,\n }),\n]);\n\n/** Type override */\nexport type RiskLogicInput = t.TypeOf<typeof RiskLogicInput>;\n\nexport const AssessmentAnswerOptionInput = t.type({\n /** Value of answer */\n value: t.string,\n});\n\n/** Type override */\nexport type AssessmentAnswerOptionInput = t.TypeOf<typeof AssessmentAnswerOptionInput>;\n\nexport const AssessmentSectionQuestionInput = t.intersection([\n t.type({\n /** The title of the assessment section question */\n title: t.string,\n /** The question type */\n type: valuesOf(AssessmentQuestionType),\n }),\n t.partial({\n /** The sub-type of the assessment question */\n 'sub-type': valuesOf(AssessmentQuestionSubType),\n /** The question placeholder */\n placeholder: t.string,\n /** The question description */\n description: t.string,\n /** Whether an answer is required */\n 'is-required': t.boolean,\n /** Used to identify the question within a form or template so it can be referenced in conditional logic. */\n 'reference-id': t.string,\n /** Display logic for the question */\n 'display-logic': AssessmentDisplayLogicInput,\n /** Risk logic for the question */\n 'risk-logic': t.array(RiskLogicInput),\n /** Risk category titles for the question */\n 'risk-categories': t.array(t.string),\n /** Risk framework titles for the question */\n 'risk-framework': t.string,\n /** Answer options for the question */\n 'answer-options': t.array(AssessmentAnswerOptionInput),\n /** The selected answers to the assessments */\n 'selected-answers': t.array(t.string),\n /** Allowed MIME types for the question */\n 'allowed-mime-types': t.array(t.string),\n /** Allow selecting other options */\n 'allow-select-other': t.boolean,\n /** Sync model for the question */\n 'sync-model': valuesOf(AssessmentSyncModel),\n /** Sync column for the question */\n 'sync-column': valuesOf(AssessmentSyncColumn),\n /** Attribute key / custom field name for the question */\n 'attribute-key': t.string,\n /** Require risk evaluation for the question */\n 'require-risk-evaluation': t.boolean,\n /** Require risk matrix evaluation for the question */\n 'require-risk-matrix-evaluation': t.boolean,\n }),\n]);\n\n/** Type override */\nexport type AssessmentSectionQuestionInput = t.TypeOf<typeof AssessmentSectionQuestionInput>;\n\nexport const AssessmentSectionInput = t.intersection([\n t.type({\n /** The title of the assessment section */\n title: t.string,\n /** The questions in the assessment section */\n questions: t.array(AssessmentSectionQuestionInput),\n }),\n t.partial({\n /** Email address of those assigned */\n assignees: t.array(t.string),\n /** Email address of those externally assigned */\n 'external-assignees': t.array(t.string),\n /** Status of section */\n status: t.string,\n /** Whether assessment is reviewed */\n 'is-reviewed': t.boolean,\n }),\n]);\n\n/** Type override */\nexport type AssessmentSectionInput = t.TypeOf<typeof AssessmentSectionInput>;\n\nexport const AssessmentRetentionScheduleInput = t.type({\n /** The retention schedule type */\n type: valuesOf(RetentionScheduleType),\n /** The duration of the retention schedule in days */\n 'duration-days': t.number,\n /** The operation to perform on the retention schedule */\n operand: valuesOf(RetentionScheduleOperation),\n});\n\n/** Type override */\nexport type AssessmentRetentionScheduleInput = t.TypeOf<typeof AssessmentRetentionScheduleInput>;\n\nexport const AssessmentTemplateInput = t.intersection([\n t.type({\n /** The title of the assessment template */\n title: t.string,\n }),\n t.partial({\n /** The Assessment sections under this assessment template */\n sections: t.array(AssessmentSectionInput),\n /** Description of assessment template */\n description: t.string,\n /** The status of the assessment */\n status: valuesOf(AssessmentFormTemplateStatus),\n /** The source of the assessment */\n source: valuesOf(AssessmentFormTemplateSource),\n /** The email of the user that created the assessment */\n creator: t.string,\n /** Whether the template is in a locked status */\n locked: t.boolean,\n /** ID of parent template this was cloned from */\n 'parent-id': t.string,\n /** Whether the template is archived */\n archived: t.boolean,\n /** The date that the assessment was created */\n 'created-at': t.string,\n /** The names of the custom fields associated to this assessment template */\n 'attribute-keys': t.array(t.string),\n /** The retention schedule configuration */\n 'retention-schedule': AssessmentRetentionScheduleInput,\n /** The titles of the email templates used in the assessment template */\n templates: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type AssessmentTemplateInput = t.TypeOf<typeof AssessmentTemplateInput>;\n\nexport const AssessmentResourceInput = t.type({\n /** The title of the resource */\n title: t.string,\n /** The type of the resource */\n type: valuesOf(AttributeSupportedResourceType),\n});\n\n/** Type override */\nexport type AssessmentResourceInput = t.TypeOf<typeof AssessmentResourceInput>;\n\nexport const AssessmentInput = t.intersection([\n t.type({\n /** The title of the assessment */\n title: t.string,\n /** The title of the assessment group */\n group: t.string,\n }),\n t.partial({\n /** The assessment sections */\n sections: t.array(AssessmentSectionInput),\n /** The email of the user that created the assessment */\n creator: t.string,\n /** The description of the assessment */\n description: t.string,\n /** The status of the assessment */\n status: valuesOf(AssessmentFormStatus),\n /** The emails of the transcend users assigned to the assessment */\n assignees: t.array(t.string),\n /** The emails of the external emails assigned to the assessment */\n 'external-assignees': t.array(t.string),\n /** The emails of the assessment reviewers */\n reviewers: t.array(t.string),\n /** Whether the assessment is in a locked status */\n locked: t.boolean,\n /** Whether the assessment is archived */\n archived: t.boolean,\n /** Whether the form is created by an external user */\n external: t.boolean,\n /**\n * Whether the form title is an internal label only, and the group title should be used in communications with assignees\n */\n 'title-is-internal': t.boolean,\n /** The date that the assessment is due */\n 'due-date': t.string,\n /** The date that the assessment was created */\n 'created-at': t.string,\n /** The date that the assessment was assigned at */\n 'assigned-at': t.string,\n /** The date that the assessment was submitted at */\n 'submitted-at': t.string,\n /** The date that the assessment was approved at */\n 'approved-at': t.string,\n /** The date that the assessment was rejected at */\n 'rejected-at': t.string,\n /** The linked data inventory resources */\n resources: t.array(AssessmentResourceInput),\n /** The linked data inventory synced rows */\n rows: t.array(AssessmentResourceInput),\n /** The assessment retention schedule */\n 'retention-schedule': AssessmentRetentionScheduleInput,\n /** The assessment custom fields */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type AssessmentInput = t.TypeOf<typeof AssessmentInput>;\n\nexport const ConsentPreferenceTopicOptionValue = t.type({\n /** Title of option value */\n title: t.string,\n /** API slug */\n slug: t.string,\n});\n\n/** Type override */\nexport type ConsentPreferenceTopicOptionValue = t.TypeOf<typeof ConsentPreferenceTopicOptionValue>;\n\nexport const ConsentPreferenceTopic = t.intersection([\n t.type({\n /** The type of the preference topic */\n type: valuesOf(PreferenceTopicType),\n /** The title of the preference topic */\n title: t.string,\n /** The description of the preference topic */\n description: t.string,\n /** API slug for the preference topic (PascalCase; alphabetical letters only) */\n slug: t.string,\n }),\n t.partial({\n /** Hex color for the preference topic (pull-only; not writable via CLI push today) */\n color: t.string,\n /** Default value */\n 'default-configuration': t.string,\n /** Whether the preference topic is shown in privacy center */\n 'show-in-privacy-center': t.boolean,\n /** The options when type is single or multi select */\n options: t.array(ConsentPreferenceTopicOptionValue),\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceTopic = t.TypeOf<typeof ConsentPreferenceTopic>;\n\nexport const ConsentPurpose = t.intersection([\n t.type({\n /** Consent purpose slug */\n trackingType: t.string,\n /** The title of the tracking purpose that appears in Consent Management and Privacy Center UIs */\n title: t.string,\n /** The display name of this tracking purpose */\n name: t.string,\n }),\n t.partial({\n /** Description of purpose */\n description: t.string,\n /** Whether purpose is active */\n 'is-active': t.boolean,\n /** Whether purpose is configurable */\n configurable: t.boolean,\n /** Display order of purpose for privacy center */\n 'display-order': t.number,\n /** Whether purpose is shown in privacy center */\n 'show-in-privacy-center': t.boolean,\n /** Whether purpose is show in consent manger */\n 'show-in-consent-manager': t.boolean,\n /** The preference topics configured for the purpose */\n 'preference-topics': t.array(ConsentPreferenceTopic),\n /** Authentication level for purpose on privacy center */\n 'auth-level': valuesOf(PreferenceStoreAuthLevel),\n /** Opt out signals that should instantly opt out of this purpose */\n 'opt-out-signals': t.array(valuesOf(UserPrivacySignalEnum)),\n /** Default consent value */\n 'default-consent': valuesOf(DefaultConsentOption),\n }),\n]);\n\n/** Type override */\nexport type ConsentPurpose = t.TypeOf<typeof ConsentPurpose>;\n\n/**\n * Input for a purpose associated with a preference workflow config\n */\nexport const PreferenceWorkflowConfigPurposeInput = t.type({\n /** The tracking type slug of the purpose */\n 'tracking-type': t.string,\n /** The matching consent state for the purpose */\n 'matching-state': t.boolean,\n});\n\n/** Type override */\nexport type PreferenceWorkflowConfigPurposeInput = t.TypeOf<\n typeof PreferenceWorkflowConfigPurposeInput\n>;\n\n/**\n * Input to define a preference workflow config.\n * Purposes are the source of truth; triggerCondition is derived on push\n * (same as Workflows → Preference Workflows in the admin dashboard).\n *\n * Exactly one mode per config:\n * - Legacy: action-type (+ optional data-silo-titles), no workflow-title\n * - V2: workflow-title (DSR workflow display title), no action-type / data-silo-titles\n */\nexport const PreferenceWorkflowConfigInput = t.intersection([\n t.type({\n /** The name of the preference workflow config */\n name: t.string,\n /**\n * Purposes and their matching consent states.\n * Used to derive triggerCondition as `{ And: [{ [tracking-type]: matching-state }, ...] }`.\n */\n purposes: t.array(PreferenceWorkflowConfigPurposeInput),\n }),\n t.partial({\n /**\n * DSR workflow display title (internalName when set, else external title).\n * Workflows V2 mode — mutually exclusive with action-type / data-silo-titles.\n */\n 'workflow-title': t.string,\n /** The action type (e.g. ERASURE, ACCESS). Legacy mode; required when creating without workflow-title. */\n 'action-type': valuesOf(RequestAction),\n /** The data subject type slug (e.g. customer) */\n 'data-subject-type': t.string,\n /** Whether the config runs silently */\n 'is-silent': t.boolean,\n /** Whether unauthenticated requests are allowed */\n 'allow-unauthenticated': t.boolean,\n /** Whether the config is active */\n 'is-active': t.boolean,\n /** Titles of data silos associated with this config (legacy mode only) */\n 'data-silo-titles': t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type PreferenceWorkflowConfigInput = t.TypeOf<typeof PreferenceWorkflowConfigInput>;\n\n/**\n * Input to define a workflow config. Push matches using a cascading key\n * (internal-name → title → action-type → data-subject-type → region-list) and\n * creates the workflow when no match exists (DSR only).\n */\nexport const WorkflowConfigInput = t.intersection([\n t.type({\n /** User-facing title */\n title: t.string,\n /** Request action type */\n 'action-type': valuesOf(RequestAction),\n }),\n t.partial({\n /**\n * Internal name of the workflow config. When provided, used as the first\n * match key on push.\n */\n 'internal-name': t.string,\n /** Subtitle */\n subtitle: t.string,\n /** Description */\n description: t.string,\n /** Data subject type */\n 'data-subject-type': t.string,\n /** Visibility tier */\n visibility: valuesOf(WorkflowConfigVisibility),\n /** Workflow config type (read-only on pull; included for reference) */\n type: valuesOf(WorkflowConfigType),\n /** Whether to collect the data subject's region during intake */\n 'collect-data-subject-regions': valuesOf(CollectDataSubjectRegions),\n /** Region allow list */\n 'region-list': t.array(valuesOf({ ...IsoCountryCode, ...IsoCountrySubdivisionCode })),\n /** Per-region request expiry times */\n 'expiry-time': t.array(\n t.type({\n /** Region code (or 'default') */\n region: valuesOf({ default: 'default', ...IsoCountryCode, ...IsoCountrySubdivisionCode }),\n /** Expiry time in days */\n value: t.number,\n }),\n ),\n /** Attribute key (custom field) names to associate with the workflow */\n 'attribute-keys': t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type WorkflowConfigInput = t.TypeOf<typeof WorkflowConfigInput>;\n\n/**\n * Input to define a silo discovery results\n *\n * @see https://docs.transcend.io/docs/silo-discovery\n */\nexport const SiloDiscoveryResultInput = t.intersection([\n t.type({\n /** The unique identifier for the resource */\n resourceId: t.string,\n /** The plugin that found this results */\n plugin: t.string, // Assuming Plugin is a string, replace with appropriate type if necessary\n /** The suggested catalog for this results */\n suggestedCatalog: t.string,\n /** The likelihood that data is sensitive for this results */\n containsSensitiveData: t.string,\n /** The status of silo discovery triage */\n status: t.string,\n }),\n t.partial({\n /** The ISO country code for the AWS Region if applicable */\n country: valuesOf(IsoCountryCode),\n /** The ISO country subdivision code for the AWS Region if applicable */\n countrySubDivision: valuesOf(IsoCountrySubdivisionCode),\n /** The plaintext that we will pass into results */\n plaintextContext: t.string,\n /** The custom title of the data silo results */\n title: t.union([t.string, t.null]),\n }),\n]);\n\n/** Type override */\nexport type SiloDiscoveryResultInput = t.TypeOf<typeof SiloDiscoveryResultInput>;\n\nexport const TranscendInput = t.partial({\n /**\n * Action items\n */\n 'action-items': t.array(ActionItemInput),\n /**\n * Action item collections\n */\n 'action-item-collections': t.array(ActionItemCollectionInput),\n /**\n * API key definitions\n */\n 'api-keys': t.array(ApiKeyInput),\n /** Team definitions */\n teams: t.array(TeamInput),\n /**\n * Email template definitions\n */\n templates: t.array(TemplateInput),\n /**\n * Enricher definitions\n */\n enrichers: t.array(EnricherInput),\n /**\n * Attribute definitions\n */\n attributes: t.array(AttributeInput),\n /**\n * Business entity definitions\n */\n 'business-entities': t.array(BusinessEntityInput),\n /**\n * Vendor definitions\n */\n vendors: t.array(VendorInput),\n /**\n * Data categories definitions\n */\n 'data-categories': t.array(DataCategoryInput),\n /**\n * Vendor definitions\n */\n 'processing-purposes': t.array(ProcessingPurposeInput),\n /**\n * Data subject definitions\n */\n 'data-subjects': t.array(DataSubjectInput),\n /**\n * Action definitions\n */\n actions: t.array(ActionInput),\n /**\n * Identifier definitions\n */\n identifiers: t.array(IdentifierInput),\n /**\n * Data silo definitions\n */\n 'data-silos': t.array(DataSiloInput),\n /**\n * Data flow definitions\n */\n 'data-flows': t.array(DataFlowInput),\n /**\n * Cookie definitions\n */\n cookies: t.array(CookieInput),\n /**\n * Consent manager definition\n */\n 'consent-manager': ConsentManagerInput,\n /**\n * The privacy center configuration\n */\n 'privacy-center': PrivacyCenterInput,\n /**\n * The policies configuration\n */\n policies: t.array(PolicyInput),\n /**\n * The internationalized messages configuration\n */\n messages: t.array(IntlMessageInput),\n /** The full list of consent manager partitions (e.g. dev vs staging vs prod) */\n partitions: t.array(PartitionInput),\n /**\n * The full list of assessment templates\n */\n 'assessment-templates': t.array(AssessmentTemplateInput),\n /**\n * The full list of assessment results\n */\n assessments: t.array(AssessmentInput),\n /**\n * Processing activity definitions\n */\n 'processing-activities': t.array(ProcessingActivityInput),\n /**\n * Consent and preference management purposes\n */\n purposes: t.array(ConsentPurpose),\n /**\n * The full list of silo discovery results\n */\n 'system-discovery': t.array(SiloDiscoveryResultInput),\n /**\n * Preference workflow config definitions (Workflows → Preference Workflows)\n */\n 'preference-workflow-configs': t.array(PreferenceWorkflowConfigInput),\n /**\n * DSR workflow config settings (create or update via cascading match key)\n */\n 'workflow-configs': t.array(WorkflowConfigInput),\n /**\n * Preference management options for multi and single selects\n */\n 'preference-options': t.array(ConsentPreferenceTopicOptionValue),\n});\n\n/** Type override */\nexport type TranscendInput = t.TypeOf<typeof TranscendInput>;\n\n/**\n * The output of `tr-generate-api-keys` that can be provided to `tr-push`\n */\nexport const StoredApiKey = t.type({\n /** Name of instance */\n organizationName: t.string,\n /** API key */\n apiKey: t.string,\n /** Organization ID API key is for */\n organizationId: t.string,\n});\n\n/** Type override */\nexport type StoredApiKey = t.TypeOf<typeof StoredApiKey>;\n\n/**\n * Minimal set required to mark as completed\n */\nexport const DataFlowCsvInput = t.intersection([\n t.type({\n /** The value of the data flow (host or regex) */\n 'Connections Made To': t.string,\n /** The type of the data flow */\n Type: valuesOf(DataFlowScope),\n /** The CSV of purposes mapped to that data flow */\n Purpose: t.string,\n }),\n t.partial({\n /** The service that the data flow relates to */\n Service: t.string,\n /** Notes and descriptions for the data flow */\n Notes: t.string,\n /** Set of data flow owners */\n Owners: t.string,\n /** Set of data flow team owners */\n Teams: t.string,\n /** LIVE vs NEEDS_REVIEW aka Approved vs Triage */\n Status: valuesOf(ConsentTrackerStatus),\n }),\n // Custom attributes\n t.record(t.string, t.string),\n]);\n\n/** Type override */\nexport type DataFlowCsvInput = t.TypeOf<typeof DataFlowCsvInput>;\n\nexport const CookieCsvInput = t.intersection([\n t.type({\n /** The value of the cookie */\n Name: t.string,\n /** The CSV of purposes mapped to that cookie */\n Purpose: t.string,\n }),\n t.partial({\n /** The service that the cookie relates to */\n Service: t.string,\n /** Notes and descriptions for the cookie */\n Notes: t.string,\n /** Set of cookie owners */\n Owners: t.string,\n /** Set of cookie team owners */\n Teams: t.string,\n /** LIVE vs NEEDS_REVIEW aka Approved vs Triage */\n Status: valuesOf(ConsentTrackerStatus),\n }),\n // Custom attributes\n t.record(t.string, t.string),\n]);\n\n/** Type override */\nexport type CookieCsvInput = t.TypeOf<typeof CookieCsvInput>;\n\n/**\n * Export of (await airgap.getMetadata()).services\n */\nexport const ConsentManagerServiceMetadata = t.type({\n /** The title of the service */\n title: t.string,\n /** The description */\n description: t.string,\n /** Cookies */\n cookies: t.array(\n t.type({\n /** Name of cookie */\n name: t.string,\n /** Allowed purposes */\n trackingPurposes: t.array(t.string),\n }),\n ),\n /** Data Flows */\n dataFlows: t.array(\n t.type({\n /** Value of data flow */\n value: t.string,\n /** Type of data flow */\n type: valuesOf(DataFlowScope),\n /** Allowed purposes */\n trackingPurposes: t.array(t.string),\n }),\n ),\n});\n\n/** Type override */\nexport type ConsentManagerServiceMetadata = t.TypeOf<typeof ConsentManagerServiceMetadata>;\n\n/** The columns of a row of a OneTrust Assessment form to import into Transcend. */\nconst OneTrustAssessmentColumnInput = t.intersection([\n t.type({\n /** The title of the column */\n title: t.string,\n }),\n t.partial({\n /** The optional value of the column */\n value: t.string,\n }),\n]);\n\n/** A row with information of the OneTrust assessment form to import into Transcend */\nconst OneTrustAssessmentRowInput = t.type({\n /** A list of columns within this row. */\n columns: t.array(OneTrustAssessmentColumnInput),\n});\n\n/** Input for importing multiple OneTrust assessment forms into Transcend */\nexport const ImportOnetrustAssessmentsInput = t.partial({\n /** 'The rows of the CSV file.' */\n rows: t.array(OneTrustAssessmentRowInput),\n /** 'The json record representing the assessment.' */\n json: t.string,\n});\n/** Type override */\nexport type ImportOnetrustAssess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AiB,EAAE,aAAa,CAC3C,EAAE,KAAK,CAEL,KAAM,EAAE,OAER,QAAS,EAAE,OACZ,CAAC,CACF,EAAE,QAAQ,CAER,QAAS,EAAE,OAEX,MAAO,EAAE,OAET,OAAQ,EAAE,OAEV,MAAO,EAAE,OAET,OAAQ,EAAS,EAAqB,CACvC,CAAC,CAEF,EAAE,OAAO,EAAE,OAAQ,EAAE,OAAO,CAC7B,CAAC,CAQW,GAAgC,EAAE,KAAK,CAElD,MAAO,EAAE,OAET,YAAa,EAAE,OAEf,QAAS,EAAE,MACT,EAAE,KAAK,CAEL,KAAM,EAAE,OAER,iBAAkB,EAAE,MAAM,EAAE,OAAO,CACpC,CAAC,CACH,CAED,UAAW,EAAE,MACX,EAAE,KAAK,CAEL,MAAO,EAAE,OAET,KAAM,EAAS,EAAc,CAE7B,iBAAkB,EAAE,MAAM,EAAE,OAAO,CACpC,CAAC,CACH,CACF,CAAC,CAMI,GAAgC,EAAE,aAAa,CACnD,EAAE,KAAK,CAEL,MAAO,EAAE,OACV,CAAC,CACF,EAAE,QAAQ,CAER,MAAO,EAAE,OACV,CAAC,CACH,CAAC,CAGI,GAA6B,EAAE,KAAK,CAExC,QAAS,EAAE,MAAM,GAA8B,CAChD,CAAC,CAGW,GAAiC,EAAE,QAAQ,CAEtD,KAAM,EAAE,MAAM,GAA2B,CAEzC,KAAM,EAAE,OACT,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants-BMAOvdcA.mjs","names":[],"sources":["../src/commands/policy/constants.ts"],"sourcesContent":["/** Maximum compressed policy bundle upload size in bytes (5 KiB). */\nexport const MAX_BUNDLE_COMPRESSED_BYTES = 5120;\n\n/** Maximum decompressed policy bundle size enforced by the server (50 KiB). */\nexport const MAX_BUNDLE_DECOMPRESSED_BYTES = 51200;\n\n/** Error message shown when the OPA CLI is not installed. */\nexport const OPA_INSTALL_HINT =\n 'The Open Policy Agent CLI (`opa`) is required but was not found on PATH. ' +\n 'Install it with `brew install opa` (macOS) or see https://www.openpolicyagent.org/docs/cli#install';\n\n/** Placeholder for nullable API fields in table output. */\nexport const EMPTY_CELL = '-';\n"],"mappings":"AACA,MAAa,EAA8B,KAG9B,EAAgC,MAGhC,EACX"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as e,r as t}from"./manifest-DVuW_vvO.mjs";import{dirname as n,extname as r,isAbsolute as i,join as a,relative as o,resolve as s,sep as c}from"node:path";import l from"inquirer";import{createHash as u}from"node:crypto";function d(e,t){return i(t)?s(t):s(e,t)}function f(e,t){let n=o(e,t).split(c).join(`/`);return n.length===0?`.`:n===`..`||n.startsWith(`../`)||i(n)?t.split(c).join(`/`):n}function p(e,t){let r=d(e,`transcend/custom-functions`),s=t.manifest!==void 0&&t.directory===`transcend/custom-functions`,l=t.directory&&!s?d(e,t.directory):r,u=t.manifest?d(e,t.manifest):a(l,`transcend-functions.yml`),f=n(u),p=t.directory&&!s?l:t.manifest?f:r,m=o(p,u);if(t.directory&&!s&&(m===`..`||m.startsWith(`..${c}`)||i(m)))throw Error(`The manifest must be inside the Custom Function project directory. Received directory ${p} and manifest ${u}.`);return{targetDirectory:p,manifestDirectory:f,manifestPath:u}}function m(e){return`'${e.replace(/'/gu,`'\\''`)}'`}function h(e){return e.length===0?``:` --variables=${m(e.map(e=>`${e}:placeholder`).join(`,`))}`}function g(e,t,n){let r=a(e,`transcend-functions.yml`),i=n?f(n,e):e,o=n?f(n,t):t,s=t===r?``:` --manifest=${m(o)}`;return`${m(i)}${s}`}const _=`.agents/skills`,v=[`.aider-desk/skills`,_,`.autohand/skills`,`.augment/skills`,`.bob/skills`,`.claude/skills`,`.codeartsdoer/skills`,`.codebuddy/skills`,`.codemaker/skills`,`.codestudio/skills`,`.commandcode/skills`,`.continue/skills`,`.cortex/skills`,`.crush/skills`,`.devin/skills`,`.factory/skills`,`agent/skills`,`.forge/skills`,`.goose/skills`,`.grok/skills`,`.hermes/skills`,`.inferencesh/skills`,`.jazz/skills`,`.junie/skills`,`.iflow/skills`,`.kilocode/skills`,`.kimchi/skills`,`.kiro/skills`,`.kode/skills`,`.lingma/skills`,`.mcpjam/skills`,`.minimax/skills`,`.vibe/skills`,`.moxby/skills`,`.mux/skills`,`.openhands/skills`,`.ona/skills`,`.pi/skills`,`.posit/assistant/skills`,`.qoder/skills`,`.qwen/skills`,`.reasonix/skills`,`.rovodev/skills`,`.roo/skills`,`.tabnine/agent/skills`,`.terramind/skills`,`.tinycloud/skills`,`.trae/skills`,`.windsurf/skills`,`.zcode/skills`,`.zencoder/skills`,`.neovate/skills`,`.pochi/skills`,`.adal/skills`],y=[_,`.cursor/skills`,`.codex/skills`,`.github/skills`,`.gemini/skills`,`.opencode/skills`,`.cline/skills`,`.warp/skills`,`.zed/skills`,`.replit/skills`];function b(e){return e.length===1?{canonical:e[0].path,aliases:[]}:{canonical:_,aliases:e.length>1?e.filter(({path:e,supportsAgentsSkills:t})=>e!==`.agents/skills`&&!t).map(({path:e})=>e):[]}}function x(e,t){let n=e.trimEnd();return`${n}\n\n<!-- managed-by: ${t}; content-sha256: ${u(`sha256`).update(n).digest(`hex`)} -->\n`}function S(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/gu,`\\$&`),r=e.match(RegExp(`<!-- managed-by: ${n}; content-sha256: ([a-f0-9]{64}) -->\\s*$`,`u`));if(!r||r.index===void 0)return!1;let i=e.slice(0,r.index).trimEnd();return u(`sha256`).update(i).digest(`hex`)===r[1]}function C(t,n,r){return Object.fromEntries(r.map(r=>{e(t,n,r);try{let e=t.fs.lstatSync(r);if(e.isSymbolicLink())return[r,{kind:`link`,path:r,target:t.fs.readlinkSync(r)}];if(e.isDirectory())return[r,{kind:`directory`,path:r}];if(!e.isFile())throw Error(`Unsupported filesystem entry: ${r}`);return[r,{kind:`file`,path:r,contents:t.fs.readFileSync(r,`utf8`),mode:e.mode}]}catch(e){if(e.code===`ENOENT`)return[r,{kind:`absent`,path:r}];throw e}}))}function w(e,t){let r=t;for(;;){if(e.fs.existsSync(a(r,`.git`)))return r;let t=n(r);if(t===r)return;r=t}}function T(e,t){let r=t;for(;!e.fs.existsSync(r);){let e=n(r);if(e===r)return r;r=e}return e.fs.statSync(r).isDirectory()?r:n(r)}function E(e,t){if(!e.fs.existsSync(t))return[];let n=[],r=i=>{e.fs.readdirSync(i,{withFileTypes:!0}).forEach(e=>{if(e.name===`.git`||e.name===`node_modules`)return;let s=a(i,e.name);n.push(o(t,s).split(c).join(`/`)),e.isDirectory()&&!e.isSymbolicLink()&&r(s)})};return r(t),n.sort((e,t)=>e.localeCompare(t))}function D(e,n){let i=T(e,n),o=w(e,i)??i,s=[],c=n=>{e.fs.readdirSync(n,{withFileTypes:!0}).forEach(i=>{if(i.name===`.git`||i.name===`.worktrees`||i.name===`node_modules`)return;let o=a(n,i.name);if(i.isDirectory()&&!i.isSymbolicLink())c(o);else if(i.isFile()){if(i.name===`transcend-functions.yml`){s.push(o);return}if([`.yml`,`.yaml`].includes(r(i.name)))try{if(e.fs.statSync(o).size>256e3)return;t(e.fs.readFileSync(o,`utf8`),{skipPathValidation:!0}),s.push(o)}catch{}}})};return c(o),s.sort((e,t)=>e.localeCompare(t))}function O(e,t,n){return n===0?!1:e.fs.readdirSync(t,{withFileTypes:!0}).some(r=>{if(!r.isDirectory()||r.isSymbolicLink())return!1;let i=a(t,r.name);return e.fs.existsSync(a(i,`SKILL.md`))||O(e,i,n-1)})}function k(e,t){if(!e.fs.existsSync(t)||!e.fs.statSync(t).isDirectory())return[];let n=new Set(y),r=new Set([...v,...y]);return e.fs.readdirSync(t,{withFileTypes:!0}).forEach(n=>{if(!n.isDirectory()||n.isSymbolicLink())return;let i=a(t,n.name,`skills`);e.fs.existsSync(i)&&e.fs.statSync(i).isDirectory()&&O(e,i,3)&&r.add(`${n.name}/skills`)}),[...r].filter(n=>{let r=a(t,n);return e.fs.existsSync(r)&&e.fs.statSync(r).isDirectory()}).sort((e,t)=>e.localeCompare(t)).map(e=>({path:e,supportsAgentsSkills:n.has(e)}))}function A(e,t){if(!t)return!1;if(e.fs.existsSync(a(t,`.github`)))return!0;let n=a(t,`.git`),r=n;if(e.fs.existsSync(n)&&e.fs.statSync(n).isFile()){let i=e.fs.readFileSync(n,`utf8`).match(/^gitdir:\s*(.+)$/mu)?.[1];i&&(r=s(t,i))}let i=a(r,`config`);return e.fs.existsSync(i)&&e.fs.readFileSync(i,`utf8`).includes(`github.com`)}function j(e,t){let n=e.process.cwd(),{manifestDirectory:r,manifestPath:i,targetDirectory:o}=p(n,t),c=w(e,T(e,o)),l=c??(o===s(n,`transcend/custom-functions`)?n:o),u=a(r,`deno.jsonc`),d=a(r,`deno.json`),f=e.fs.existsSync(u)?u:d;return{invocationDirectory:n,targetDirectory:o,projectRoot:l,manifestDirectory:r,manifestPath:i,...c?{repositoryRoot:c}:{},denoConfigPath:f,existingSkillDirectories:k(e,l),usesGithub:A(e,c),relativePaths:E(e,r)}}var M=class extends Error{constructor(){super(`Prompt cancelled.`),this.name=`PromptCancelledError`}};function N(e){let t=e instanceof Error?e.message:String(e);return e instanceof M||/force closed|prompt.*cancel|user.*close|SIGINT/iu.test(t)?new M:e instanceof Error?e:Error(t)}var P=class{prompt;constructor(e){this.prompt=l.createPromptModule({input:e.process.stdin,output:e.process.stderr})}async text(e,t,n){try{return(await this.prompt([{type:`input`,name:`value`,message:e,...t===void 0?{}:{default:t},validate:e=>{let t=e.trim();return t.length>0?n?.(t)??!0:`Enter a value.`}}])).value.trim()}catch(e){throw N(e)}}async select(e,t,n){try{return(await this.prompt([{type:`list`,name:`value`,message:e,choices:[...t],...n===void 0?{}:{default:n}}])).value}catch(e){throw N(e)}}async checkbox(e,t){try{return(await this.prompt([{type:`checkbox`,name:`value`,message:e,choices:[...t]}])).value}catch(e){throw N(e)}}async confirm(e,t=!0){try{return(await this.prompt([{type:`confirm`,name:`value`,message:e,default:t}])).value}catch(e){throw N(e)}}};const F=`2.4.5`,I=`https://docs.deno.com/runtime/getting_started/installation/`;function L(e){let t=e.match(/^deno\s+((\d+)\.\d+\.\d+(?:[-+][^\s]+)?)(?:\s|$)/mu);if(t)return{version:t[1],major:Number(t[2])}}function R(e){let t=L(e);return t?t.major===2?t.version===`2.4.5`?{level:`compatible`}:{level:`warning`,message:`Deno ${t.version} is compatible, but ${F} matches the current production runtime.`}:{level:`error`,message:`Deno 2.x is required; found ${t.version}. Install or switch versions using ${I}`}:{level:`error`,message:`Deno 2.x is required, but the installed version could not be determined. Install or switch versions using ${I}`}}export{M as a,j as c,b as d,g as f,p as g,m as h,P as i,x as l,f as m,F as n,C as o,h as p,R as r,D as s,I as t,S as u};
|
|
2
|
-
//# sourceMappingURL=deno-runtime-QqwBDKXX.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deno-runtime-QqwBDKXX.mjs","names":[],"sources":["../src/lib/custom-functions/paths.ts","../src/lib/scaffolding/agent-skill.ts","../src/lib/custom-functions/project-discovery.ts","../src/lib/custom-functions/prompts.ts","../src/lib/custom-functions/deno-runtime.ts"],"sourcesContent":["import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';\n\n/** Default local Custom Function project directory. */\nexport const DEFAULT_CUSTOM_FUNCTION_DIRECTORY = 'transcend/custom-functions';\n\n/**\n * Resolve a possibly relative CLI input against a working directory.\n *\n * @param cwd - Process working directory\n * @param input - User path\n * @returns Absolute path\n */\nexport function resolveCliPath(cwd: string, input: string): string {\n return isAbsolute(input) ? resolve(input) : resolve(cwd, input);\n}\n\n/**\n * Prefer a portable path relative to the invocation directory.\n *\n * @param cwd - Process working directory\n * @param path - Absolute path\n * @returns Relative path when contained by cwd, otherwise the absolute path\n */\nexport function displayCliPath(cwd: string, path: string): string {\n const value = relative(cwd, path).split(sep).join('/');\n if (value.length === 0) {\n return '.';\n }\n if (value === '..' || value.startsWith('../') || isAbsolute(value)) {\n return path.split(sep).join('/');\n }\n return value;\n}\n\n/**\n * Resolve one Custom Function project and its optional manifest override.\n *\n * @param cwd - Process working directory\n * @param options - User-provided paths\n * @returns Consistent absolute project paths\n */\nexport function resolveCustomFunctionProjectPaths(\n cwd: string,\n options: {\n /** Optional positional project directory. */\n directory?: string;\n /** Optional explicit manifest path. */\n manifest?: string;\n },\n): {\n /** Project directory selected by the positional argument. */\n targetDirectory: string;\n /** Directory containing the manifest. */\n manifestDirectory: string;\n /** Absolute manifest path. */\n manifestPath: string;\n} {\n const defaultTarget = resolveCliPath(cwd, DEFAULT_CUSTOM_FUNCTION_DIRECTORY);\n const positionalIsFrameworkDefault =\n options.manifest !== undefined && options.directory === DEFAULT_CUSTOM_FUNCTION_DIRECTORY;\n const requestedTarget =\n options.directory && !positionalIsFrameworkDefault\n ? resolveCliPath(cwd, options.directory)\n : defaultTarget;\n const manifestPath = options.manifest\n ? resolveCliPath(cwd, options.manifest)\n : join(requestedTarget, 'transcend-functions.yml');\n const manifestDirectory = dirname(manifestPath);\n const targetDirectory =\n options.directory && !positionalIsFrameworkDefault\n ? requestedTarget\n : options.manifest\n ? manifestDirectory\n : defaultTarget;\n const manifestRelativeToTarget = relative(targetDirectory, manifestPath);\n if (\n options.directory &&\n !positionalIsFrameworkDefault &&\n (manifestRelativeToTarget === '..' ||\n manifestRelativeToTarget.startsWith(`..${sep}`) ||\n isAbsolute(manifestRelativeToTarget))\n ) {\n throw new Error(\n `The manifest must be inside the Custom Function project directory. ` +\n `Received directory ${targetDirectory} and manifest ${manifestPath}.`,\n );\n }\n return { targetDirectory, manifestDirectory, manifestPath };\n}\n\n/**\n * Quote one value for the POSIX-compatible command snippets emitted by the CLI.\n *\n * @param value - Raw command argument\n * @returns Safely single-quoted argument\n */\nexport function quoteCliArgument(value: string): string {\n return `'${value.replace(/'/gu, \"'\\\\''\")}'`;\n}\n\n/**\n * Build a CLI variables argument with non-secret values suitable for local checks.\n *\n * @param variableNames - Manifest placeholder names\n * @returns Empty string or a leading-space-prefixed CLI argument\n */\nexport function buildPlaceholderVariablesArgument(variableNames: readonly string[]): string {\n if (variableNames.length === 0) {\n return '';\n }\n const value = variableNames.map((name) => `${name}:placeholder`).join(',');\n return ` --variables=${quoteCliArgument(value)}`;\n}\n\n/**\n * Build project arguments for a generated Custom Function command.\n *\n * @param targetDirectory - Project directory\n * @param manifestPath - Explicit manifest\n * @param cwd - Optional invocation directory for shorter human-readable paths\n * @returns Quoted positional directory and any required manifest override\n */\nexport function buildCustomFunctionProjectArguments(\n targetDirectory: string,\n manifestPath: string,\n cwd?: string,\n): string {\n const defaultManifest = join(targetDirectory, 'transcend-functions.yml');\n const displayedTarget = cwd ? displayCliPath(cwd, targetDirectory) : targetDirectory;\n const displayedManifest = cwd ? displayCliPath(cwd, manifestPath) : manifestPath;\n const manifestFlag =\n manifestPath === defaultManifest ? '' : ` --manifest=${quoteCliArgument(displayedManifest)}`;\n return `${quoteCliArgument(displayedTarget)}${manifestFlag}`;\n}\n","import { createHash } from 'node:crypto';\n\n/** Universal project-level Agent Skills directory. */\nexport const UNIVERSAL_AGENT_SKILLS_DIRECTORY = '.agents/skills';\n\n/**\n * Unambiguous agent-owned project directories from vercel-labs/skills at\n * 1682051d48c34f5eb135e6475c1a965dce05e820. Generic skill catalog paths such\n * as `skills` and `data/skills` are excluded because they do not prove that a\n * project has configured an agent.\n */\nexport const PROJECT_SKILL_DIRECTORIES = [\n '.aider-desk/skills',\n UNIVERSAL_AGENT_SKILLS_DIRECTORY,\n '.autohand/skills',\n '.augment/skills',\n '.bob/skills',\n '.claude/skills',\n '.codeartsdoer/skills',\n '.codebuddy/skills',\n '.codemaker/skills',\n '.codestudio/skills',\n '.commandcode/skills',\n '.continue/skills',\n '.cortex/skills',\n '.crush/skills',\n '.devin/skills',\n '.factory/skills',\n 'agent/skills',\n '.forge/skills',\n '.goose/skills',\n '.grok/skills',\n '.hermes/skills',\n '.inferencesh/skills',\n '.jazz/skills',\n '.junie/skills',\n '.iflow/skills',\n '.kilocode/skills',\n '.kimchi/skills',\n '.kiro/skills',\n '.kode/skills',\n '.lingma/skills',\n '.mcpjam/skills',\n '.minimax/skills',\n '.vibe/skills',\n '.moxby/skills',\n '.mux/skills',\n '.openhands/skills',\n '.ona/skills',\n '.pi/skills',\n '.posit/assistant/skills',\n '.qoder/skills',\n '.qwen/skills',\n '.reasonix/skills',\n '.rovodev/skills',\n '.roo/skills',\n '.tabnine/agent/skills',\n '.terramind/skills',\n '.tinycloud/skills',\n '.trae/skills',\n '.windsurf/skills',\n '.zcode/skills',\n '.zencoder/skills',\n '.neovate/skills',\n '.pochi/skills',\n '.adal/skills',\n] as const;\n\n/**\n * Existing legacy/native project directories for agents that the pinned\n * registry installs through `.agents/skills`.\n */\nexport const AGENTS_SKILLS_COMPATIBLE_PROJECT_DIRECTORIES = [\n UNIVERSAL_AGENT_SKILLS_DIRECTORY,\n '.cursor/skills',\n '.codex/skills',\n '.github/skills',\n '.gemini/skills',\n '.opencode/skills',\n '.cline/skills',\n '.warp/skills',\n '.zed/skills',\n '.replit/skills',\n] as const;\n\n/** One existing project-level skill container. */\nexport interface ExistingProjectSkillDirectory {\n /** Repository-relative directory. */\n path: string;\n /** Whether its agent can read the universal Agent Skills directory. */\n supportsAgentsSkills: boolean;\n}\n\n/**\n * Choose one canonical skill directory and aliases for incompatible agents.\n *\n * @param existingDirectories - Existing project-level skill containers\n * @returns Canonical and alias directories\n */\nexport function resolveAgentSkillDirectories(\n existingDirectories: readonly ExistingProjectSkillDirectory[],\n): {\n /** Directory that owns the canonical skill. */\n canonical: string;\n /** Existing directories that require links to the canonical skill. */\n aliases: string[];\n} {\n if (existingDirectories.length === 1) {\n return { canonical: existingDirectories[0]!.path, aliases: [] };\n }\n return {\n canonical: UNIVERSAL_AGENT_SKILLS_DIRECTORY,\n aliases:\n existingDirectories.length > 1\n ? existingDirectories\n .filter(({ path, supportsAgentsSkills }) => {\n return path !== UNIVERSAL_AGENT_SKILLS_DIRECTORY && !supportsAgentsSkills;\n })\n .map(({ path }) => path)\n : [],\n };\n}\n\n/**\n * Add a digest marker to CLI-managed skill contents.\n *\n * @param contents - Skill Markdown\n * @param owner - Stable tool identifier\n * @returns Managed skill contents\n */\nexport function buildManagedAgentSkill(contents: string, owner: string): string {\n const body = contents.trimEnd();\n const digest = createHash('sha256').update(body).digest('hex');\n return `${body}\\n\\n<!-- managed-by: ${owner}; content-sha256: ${digest} -->\\n`;\n}\n\n/**\n * Check whether managed skill contents still match their recorded digest.\n *\n * @param contents - Existing skill Markdown\n * @param owner - Stable tool identifier\n * @returns Whether automatic replacement is safe\n */\nexport function isUnmodifiedManagedAgentSkill(contents: string, owner: string): boolean {\n const escapedOwner = owner.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n const marker = contents.match(\n new RegExp(`<!-- managed-by: ${escapedOwner}; content-sha256: ([a-f0-9]{64}) -->\\\\s*$`, 'u'),\n );\n if (!marker || marker.index === undefined) {\n return false;\n }\n const body = contents.slice(0, marker.index).trimEnd();\n return createHash('sha256').update(body).digest('hex') === marker[1];\n}\n","import { dirname, extname, join, relative, resolve, sep } from 'node:path';\n\nimport type { LocalContext } from '../../context.js';\nimport {\n AGENTS_SKILLS_COMPATIBLE_PROJECT_DIRECTORIES,\n PROJECT_SKILL_DIRECTORIES,\n type ExistingProjectSkillDirectory,\n} from '../scaffolding/agent-skill.js';\nimport { assertPathPhysicallyContained } from '../scaffolding/path-safety.js';\nimport { parseCustomFunctionsManifest } from './manifest.js';\nimport { DEFAULT_CUSTOM_FUNCTION_DIRECTORY, resolveCustomFunctionProjectPaths } from './paths.js';\nimport type { CustomFunctionProjectState } from './scaffold-model.js';\nimport type { PlanningPathSnapshot } from './scaffold-planning.js';\n\n/**\n * Collect candidate paths once, before preview.\n *\n * @param context - CLI context\n * @param rootDirectory - Approved planning root\n * @param paths - Absolute paths\n * @returns In-memory path snapshots\n */\nexport function collectPlanningSnapshots(\n context: LocalContext,\n rootDirectory: string,\n paths: readonly string[],\n): Readonly<Record<string, PlanningPathSnapshot>> {\n return Object.fromEntries(\n paths.map((path): [string, PlanningPathSnapshot] => {\n assertPathPhysicallyContained(context, rootDirectory, path);\n try {\n const stat = context.fs.lstatSync(path);\n if (stat.isSymbolicLink()) {\n return [path, { kind: 'link', path, target: context.fs.readlinkSync(path) }];\n }\n if (stat.isDirectory()) {\n return [path, { kind: 'directory', path }];\n }\n if (!stat.isFile()) {\n throw new Error(`Unsupported filesystem entry: ${path}`);\n }\n return [\n path,\n {\n kind: 'file',\n path,\n contents: context.fs.readFileSync(path, 'utf8'),\n mode: stat.mode,\n },\n ];\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n return [path, { kind: 'absent', path }];\n }\n throw error;\n }\n }),\n );\n}\n\n/**\n * Walk upward for a repository marker.\n *\n * @param context - CLI context\n * @param startDirectory - Starting directory\n * @returns Nearest repository root\n */\nfunction findRepositoryRoot(context: LocalContext, startDirectory: string): string | undefined {\n let current = startDirectory;\n while (true) {\n if (context.fs.existsSync(join(current, '.git'))) {\n return current;\n }\n const parent = dirname(current);\n if (parent === current) {\n return undefined;\n }\n current = parent;\n }\n}\n\n/**\n * Find the nearest existing ancestor of a target that may not exist yet.\n *\n * @param context - CLI context\n * @param target - Absolute target\n * @returns Existing directory\n */\nfunction findExistingAncestor(context: LocalContext, target: string): string {\n let current = target;\n while (!context.fs.existsSync(current)) {\n const parent = dirname(current);\n if (parent === current) {\n return current;\n }\n current = parent;\n }\n const stat = context.fs.statSync(current);\n return stat.isDirectory() ? current : dirname(current);\n}\n\n/**\n * Collect relative paths for collision checks.\n *\n * @param context - CLI context\n * @param root - Manifest directory\n * @returns Relative file/link paths\n */\nfunction collectRelativePaths(context: LocalContext, root: string): string[] {\n if (!context.fs.existsSync(root)) {\n return [];\n }\n const paths: string[] = [];\n const visit = (directory: string): void => {\n context.fs.readdirSync(directory, { withFileTypes: true }).forEach((entry) => {\n if (entry.name === '.git' || entry.name === 'node_modules') {\n return;\n }\n const absolute = join(directory, entry.name);\n paths.push(relative(root, absolute).split(sep).join('/'));\n if (entry.isDirectory() && !entry.isSymbolicLink()) {\n visit(absolute);\n }\n });\n };\n visit(root);\n return paths.sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Find Custom Function manifests below the surrounding repository.\n *\n * @param context - CLI context\n * @param startDirectory - Existing directory from which to locate the repository\n * @returns Absolute manifest paths in stable order\n */\nexport function discoverCustomFunctionManifests(\n context: LocalContext,\n startDirectory: string,\n): string[] {\n const existingAncestor = findExistingAncestor(context, startDirectory);\n const root = findRepositoryRoot(context, existingAncestor) ?? existingAncestor;\n const manifests: string[] = [];\n const visit = (directory: string): void => {\n context.fs.readdirSync(directory, { withFileTypes: true }).forEach((entry) => {\n if (entry.name === '.git' || entry.name === '.worktrees' || entry.name === 'node_modules') {\n return;\n }\n const absolute = join(directory, entry.name);\n if (entry.isDirectory() && !entry.isSymbolicLink()) {\n visit(absolute);\n } else if (entry.isFile()) {\n if (entry.name === 'transcend-functions.yml') {\n manifests.push(absolute);\n return;\n }\n if (['.yml', '.yaml'].includes(extname(entry.name))) {\n try {\n if (context.fs.statSync(absolute).size > 256_000) {\n return;\n }\n parseCustomFunctionsManifest(context.fs.readFileSync(absolute, 'utf8'), {\n skipPathValidation: true,\n });\n manifests.push(absolute);\n } catch {\n // Most repository YAML files are not Custom Function manifests.\n }\n }\n }\n });\n };\n visit(root);\n return manifests.sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Determine whether a skill container has a SKILL.md within three levels.\n *\n * @param context - CLI context\n * @param directory - Candidate skill container\n * @param depth - Remaining nested directory levels\n * @returns Whether a skill exists below the container\n */\nfunction containsSkill(context: LocalContext, directory: string, depth: number): boolean {\n if (depth === 0) {\n return false;\n }\n return context.fs.readdirSync(directory, { withFileTypes: true }).some((entry) => {\n if (!entry.isDirectory() || entry.isSymbolicLink()) {\n return false;\n }\n const child = join(directory, entry.name);\n return (\n context.fs.existsSync(join(child, 'SKILL.md')) || containsSkill(context, child, depth - 1)\n );\n });\n}\n\n/**\n * Find existing project skill containers without consulting home directories.\n *\n * @param context - CLI context\n * @param repositoryRoot - Repository root or target\n * @returns Existing containers and `.agents/skills` compatibility\n */\nfunction detectExistingSkillDirectories(\n context: LocalContext,\n repositoryRoot: string,\n): ExistingProjectSkillDirectory[] {\n if (\n !context.fs.existsSync(repositoryRoot) ||\n !context.fs.statSync(repositoryRoot).isDirectory()\n ) {\n return [];\n }\n const compatible = new Set<string>(AGENTS_SKILLS_COMPATIBLE_PROJECT_DIRECTORIES);\n const candidates = new Set<string>([\n ...PROJECT_SKILL_DIRECTORIES,\n ...AGENTS_SKILLS_COMPATIBLE_PROJECT_DIRECTORIES,\n ]);\n context.fs.readdirSync(repositoryRoot, { withFileTypes: true }).forEach((entry) => {\n if (!entry.isDirectory() || entry.isSymbolicLink()) {\n return;\n }\n const skillsDirectory = join(repositoryRoot, entry.name, 'skills');\n if (\n context.fs.existsSync(skillsDirectory) &&\n context.fs.statSync(skillsDirectory).isDirectory() &&\n containsSkill(context, skillsDirectory, 3)\n ) {\n candidates.add(`${entry.name}/skills`);\n }\n });\n return [...candidates]\n .filter((candidate) => {\n const path = join(repositoryRoot, candidate);\n return context.fs.existsSync(path) && context.fs.statSync(path).isDirectory();\n })\n .sort((left, right) => left.localeCompare(right))\n .map((path) => ({\n path,\n supportsAgentsSkills: compatible.has(path),\n }));\n}\n\n/**\n * Detect whether a git repository points at GitHub.\n *\n * @param context - CLI context\n * @param repositoryRoot - Repository root\n * @returns Whether GitHub setup is applicable\n */\nfunction repositoryUsesGithub(context: LocalContext, repositoryRoot: string | undefined): boolean {\n if (!repositoryRoot) {\n return false;\n }\n if (context.fs.existsSync(join(repositoryRoot, '.github'))) {\n return true;\n }\n const gitMarker = join(repositoryRoot, '.git');\n let gitDirectory = gitMarker;\n if (context.fs.existsSync(gitMarker) && context.fs.statSync(gitMarker).isFile()) {\n const marker = context.fs.readFileSync(gitMarker, 'utf8').match(/^gitdir:\\s*(.+)$/mu)?.[1];\n if (marker) {\n gitDirectory = resolve(repositoryRoot, marker);\n }\n }\n const configPath = join(gitDirectory, 'config');\n return (\n context.fs.existsSync(configPath) &&\n context.fs.readFileSync(configPath, 'utf8').includes('github.com')\n );\n}\n\n/**\n * Collect all repository state required by the pure planners.\n *\n * @param context - CLI context\n * @param options - User-selected target paths\n * @returns Project state\n */\nexport function discoverCustomFunctionProject(\n context: LocalContext,\n options: {\n /** Optional positional directory. */\n directory?: string;\n /** Optional explicit manifest path. */\n manifest?: string;\n },\n): CustomFunctionProjectState {\n const cwd = context.process.cwd();\n const { manifestDirectory, manifestPath, targetDirectory } = resolveCustomFunctionProjectPaths(\n cwd,\n options,\n );\n const existingAncestor = findExistingAncestor(context, targetDirectory);\n const repositoryRoot = findRepositoryRoot(context, existingAncestor);\n const projectRoot =\n repositoryRoot ??\n (targetDirectory === resolve(cwd, DEFAULT_CUSTOM_FUNCTION_DIRECTORY) ? cwd : targetDirectory);\n const denoJsonc = join(manifestDirectory, 'deno.jsonc');\n const denoJson = join(manifestDirectory, 'deno.json');\n const denoConfigPath = context.fs.existsSync(denoJsonc) ? denoJsonc : denoJson;\n\n return {\n invocationDirectory: cwd,\n targetDirectory,\n projectRoot,\n manifestDirectory,\n manifestPath,\n ...(repositoryRoot ? { repositoryRoot } : {}),\n denoConfigPath,\n existingSkillDirectories: detectExistingSkillDirectories(context, projectRoot),\n usesGithub: repositoryUsesGithub(context, repositoryRoot),\n relativePaths: collectRelativePaths(context, manifestDirectory),\n };\n}\n","import inquirer from 'inquirer';\n\nimport type { LocalContext } from '../../context.js';\n\n/** One select/checkbox option. */\nexport interface PromptChoice<T extends string> {\n /** User-facing label. */\n name: string;\n /** Stable answer value. */\n value: T;\n /** Whether a checkbox starts selected. */\n checked?: boolean;\n}\n\n/** Error used to map prompt cancellation to exit status 130. */\nexport class PromptCancelledError extends Error {\n /** Construct a stable cancellation error. */\n public constructor() {\n super('Prompt cancelled.');\n this.name = 'PromptCancelledError';\n }\n}\n\n/**\n * Normalize Inquirer cancellation across supported versions.\n *\n * @param error - Prompt error\n * @returns Stable cancellation error or original error\n */\nfunction normalizePromptError(error: unknown): Error {\n const message = error instanceof Error ? error.message : String(error);\n if (\n error instanceof PromptCancelledError ||\n /force closed|prompt.*cancel|user.*close|SIGINT/iu.test(message)\n ) {\n return new PromptCancelledError();\n }\n return error instanceof Error ? error : new Error(message);\n}\n\n/** Context-stream-bound prompt adapters. */\nexport class CustomFunctionPrompts {\n /** Inquirer prompt module. */\n private readonly prompt: ReturnType<typeof inquirer.createPromptModule>;\n\n /**\n * Create adapters bound to command-owned streams.\n *\n * @param context - CLI context\n */\n public constructor(context: LocalContext) {\n this.prompt = inquirer.createPromptModule({\n input: context.process.stdin,\n output: context.process.stderr,\n });\n }\n\n /**\n * Prompt for non-empty text.\n *\n * @param message - User-facing question\n * @param defaultValue - Suggested value\n * @param validate - Optional command-specific validation\n * @returns Answer\n */\n public async text(\n message: string,\n defaultValue?: string,\n validate?: (value: string) => true | string,\n ): Promise<string> {\n try {\n const answer = await this.prompt<{ value: string }>([\n {\n type: 'input',\n name: 'value',\n message,\n ...(defaultValue === undefined ? {} : { default: defaultValue }),\n validate: (value: string) => {\n const trimmed = value.trim();\n return trimmed.length > 0 ? (validate?.(trimmed) ?? true) : 'Enter a value.';\n },\n },\n ]);\n return answer.value.trim();\n } catch (error) {\n throw normalizePromptError(error);\n }\n }\n\n /**\n * Prompt for one choice.\n *\n * @param message - User-facing question\n * @param choices - Available choices\n * @param defaultValue - Suggested value\n * @returns Selected value\n */\n public async select<T extends string>(\n message: string,\n choices: readonly PromptChoice<T>[],\n defaultValue?: T,\n ): Promise<T> {\n try {\n const answer = await this.prompt<{ value: T }>([\n {\n type: 'list',\n name: 'value',\n message,\n choices: [...choices],\n ...(defaultValue === undefined ? {} : { default: defaultValue }),\n },\n ]);\n return answer.value;\n } catch (error) {\n throw normalizePromptError(error);\n }\n }\n\n /**\n * Prompt for any number of choices.\n *\n * @param message - User-facing question\n * @param choices - Available choices\n * @returns Selected values\n */\n public async checkbox<T extends string>(\n message: string,\n choices: readonly PromptChoice<T>[],\n ): Promise<T[]> {\n try {\n const answer = await this.prompt<{ value: T[] }>([\n {\n type: 'checkbox',\n name: 'value',\n message,\n choices: [...choices],\n },\n ]);\n return answer.value;\n } catch (error) {\n throw normalizePromptError(error);\n }\n }\n\n /**\n * Prompt for final approval.\n *\n * @param message - User-facing question\n * @param defaultValue - Suggested answer\n * @returns Approval\n */\n public async confirm(message: string, defaultValue = true): Promise<boolean> {\n try {\n const answer = await this.prompt<{ value: boolean }>([\n {\n type: 'confirm',\n name: 'value',\n message,\n default: defaultValue,\n },\n ]);\n return answer.value;\n } catch (error) {\n throw normalizePromptError(error);\n }\n }\n}\n","/** Deno version pinned in generated CI to match the current production runtime. */\nexport const RECOMMENDED_DENO_VERSION = '2.4.5';\n\n/** Deno major version supported by local Custom Function tooling. */\nexport const SUPPORTED_DENO_MAJOR_VERSION = 2;\n\n/** Official Deno installation instructions. */\nexport const DENO_INSTALL_URL = 'https://docs.deno.com/runtime/getting_started/installation/';\n\n/** Parsed Deno runtime version. */\nexport interface DenoRuntimeVersion {\n /** Complete semantic version reported by Deno. */\n version: string;\n /** Semantic major version. */\n major: number;\n}\n\n/** Compatibility result for one installed Deno runtime. */\nexport type DenoRuntimeCompatibility =\n | {\n /** Exact production match. */\n level: 'compatible';\n }\n | {\n /** Compatible major with a different production pin. */\n level: 'warning';\n /** Human-readable compatibility guidance. */\n message: string;\n }\n | {\n /** Unsupported or unreadable runtime version. */\n level: 'error';\n /** Human-readable requirement error. */\n message: string;\n };\n\n/**\n * Parse the first line of `deno --version`.\n *\n * @param output - Captured standard output\n * @returns Parsed runtime version\n */\nexport function parseDenoRuntimeVersion(output: string): DenoRuntimeVersion | undefined {\n const match = output.match(/^deno\\s+((\\d+)\\.\\d+\\.\\d+(?:[-+][^\\s]+)?)(?:\\s|$)/mu);\n if (!match) {\n return undefined;\n }\n return {\n version: match[1]!,\n major: Number(match[2]),\n };\n}\n\n/**\n * Compare an installed Deno runtime with the supported major and production pin.\n *\n * @param output - Captured `deno --version` output\n * @returns Compatibility and optional guidance\n */\nexport function getDenoRuntimeCompatibility(output: string): DenoRuntimeCompatibility {\n const runtime = parseDenoRuntimeVersion(output);\n if (!runtime) {\n return {\n level: 'error',\n message: `Deno ${SUPPORTED_DENO_MAJOR_VERSION}.x is required, but the installed version could not be determined. Install or switch versions using ${DENO_INSTALL_URL}`,\n };\n }\n if (runtime.major !== SUPPORTED_DENO_MAJOR_VERSION) {\n return {\n level: 'error',\n message: `Deno ${SUPPORTED_DENO_MAJOR_VERSION}.x is required; found ${runtime.version}. Install or switch versions using ${DENO_INSTALL_URL}`,\n };\n }\n if (runtime.version !== RECOMMENDED_DENO_VERSION) {\n return {\n level: 'warning',\n message: `Deno ${runtime.version} is compatible, but ${RECOMMENDED_DENO_VERSION} matches the current production runtime.`,\n };\n }\n return { level: 'compatible' };\n}\n"],"mappings":"mOAYA,SAAgB,EAAe,EAAa,EAAuB,CACjE,OAAO,EAAW,EAAM,CAAG,EAAQ,EAAM,CAAG,EAAQ,EAAK,EAAM,CAUjE,SAAgB,EAAe,EAAa,EAAsB,CAChE,IAAM,EAAQ,EAAS,EAAK,EAAK,CAAC,MAAM,EAAI,CAAC,KAAK,IAAI,CAOtD,OANI,EAAM,SAAW,EACZ,IAEL,IAAU,MAAQ,EAAM,WAAW,MAAM,EAAI,EAAW,EAAM,CACzD,EAAK,MAAM,EAAI,CAAC,KAAK,IAAI,CAE3B,EAUT,SAAgB,EACd,EACA,EAaA,CACA,IAAM,EAAgB,EAAe,EAAK,6BAAkC,CACtE,EACJ,EAAQ,WAAa,IAAA,IAAa,EAAQ,YAAA,6BACtC,EACJ,EAAQ,WAAa,CAAC,EAClB,EAAe,EAAK,EAAQ,UAAU,CACtC,EACA,EAAe,EAAQ,SACzB,EAAe,EAAK,EAAQ,SAAS,CACrC,EAAK,EAAiB,0BAA0B,CAC9C,EAAoB,EAAQ,EAAa,CACzC,EACJ,EAAQ,WAAa,CAAC,EAClB,EACA,EAAQ,SACN,EACA,EACF,EAA2B,EAAS,E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ACY,CACZ,GAAI,CAUF,OAAO,MATc,KAAK,OAAqB,CAC7C,CACE,KAAM,OACN,KAAM,QACN,UACA,QAAS,CAAC,GAAG,EAAQ,CACrB,GAAI,IAAiB,IAAA,GAAY,EAAE,CAAG,CAAE,QAAS,EAAc,CAChE,CACF,CAAC,EACY,YACP,EAAO,CACd,MAAM,EAAqB,EAAM,EAWrC,MAAa,SACX,EACA,EACc,CACd,GAAI,CASF,OAAO,MARc,KAAK,OAAuB,CAC/C,CACE,KAAM,WACN,KAAM,QACN,UACA,QAAS,CAAC,GAAG,EAAQ,CACtB,CACF,CAAC,EACY,YACP,EAAO,CACd,MAAM,EAAqB,EAAM,EAWrC,MAAa,QAAQ,EAAiB,EAAe,GAAwB,CAC3E,GAAI,CASF,OAAO,MARc,KAAK,OAA2B,CACnD,CACE,KAAM,UACN,KAAM,QACN,UACA,QAAS,EACV,CACF,CAAC,EACY,YACP,EAAO,CACd,MAAM,EAAqB,EAAM,IClKvC,MAAa,EAA2B,QAM3B,EAAmB,8DAmChC,SAAgB,EAAwB,EAAgD,CACtF,IAAM,EAAQ,EAAO,MAAM,qDAAqD,CAC3E,KAGL,MAAO,CACL,QAAS,EAAM,GACf,MAAO,OAAO,EAAM,GAAG,CACxB,CASH,SAAgB,EAA4B,EAA0C,CACpF,IAAM,EAAU,EAAwB,EAAO,CAmB/C,OAlBK,EAMD,EAAQ,QAAA,EAMR,EAAQ,UAAA,QAML,CAAE,MAAO,aAAc,CALrB,CACL,MAAO,UACP,QAAS,QAAQ,EAAQ,QAAQ,sBAAsB,EAAyB,0CACjF,CATM,CACL,MAAO,QACP,QAAS,+BAA6D,EAAQ,QAAQ,qCAAqC,IAC5H,CATM,CACL,MAAO,QACP,QAAS,6GAA2I,IACrJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl-BFJtKA2o2.mjs","names":[],"sources":["../src/commands/request/download-files/impl.ts"],"sourcesContent":["import { RequestStatus } from '@transcend-io/privacy-types';\n\nimport type { LocalContext } from '../../../context.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { downloadPrivacyRequestFiles } from '../../../lib/requests/index.js';\n\nexport interface DownloadFilesCommandFlags {\n auth: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n statuses?: RequestStatus[];\n folderPath: string;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n updatedAtBefore?: Date;\n updatedAtAfter?: Date;\n approveAfterDownload: boolean;\n transcendUrl: string;\n}\n\nexport async function downloadFiles(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n folderPath,\n requestIds,\n statuses = [RequestStatus.Approving, RequestStatus.Downloadable],\n concurrency,\n createdAtBefore,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n approveAfterDownload,\n }: DownloadFilesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process);\n\n await downloadPrivacyRequestFiles({\n transcendUrl,\n auth,\n folderPath,\n requestIds,\n statuses,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n approveAfterDownload,\n });\n}\n"],"mappings":"+KAqBA,eAAsB,EAEpB,CACE,OACA,eACA,aACA,aACA,WAAW,CAAC,EAAc,UAAW,EAAc,aAAa,CAChE,cACA,kBACA,iBACA,kBACA,iBACA,wBAEa,CACf,EAAoB,KAAK,QAAQ,CAEjC,MAAM,EAA4B,CAChC,eACA,OACA,aACA,aACA,WACA,cACA,kBACA,iBACA,kBACA,iBACA,uBACD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl-BJlKQJdS2.mjs","names":[],"sources":["../src/lib/code-scanning/findCodePackagesInFolder.ts","../src/commands/inventory/scan-packages/impl.ts"],"sourcesContent":["import { getEntries } from '@transcend-io/type-utils';\nimport colors from 'colors';\nimport fastGlob from 'fast-glob';\n\nimport { CodePackageInput } from '../../codecs.js';\nimport { logger } from '../../logger.js';\nimport { CODE_SCANNING_CONFIGS } from './constants.js';\n\n/**\n * Helper to scan and discovery all of the code packages within a folder\n *\n * @param options - Options\n * @returns the list of integrations\n */\nexport async function findCodePackagesInFolder({\n scanPath,\n ignoreDirs = [],\n repositoryName,\n}: {\n /** The name of the github repository reporting packages for */\n repositoryName: string;\n /** Where to look for package.json files */\n scanPath: string;\n /** The directories to ignore (excludes node_modules and serverless-build) */\n ignoreDirs?: string[];\n}): Promise<CodePackageInput[]> {\n const allCodePackages = await Promise.all(\n getEntries(CODE_SCANNING_CONFIGS).map(async ([codePackageType, config]) => {\n const { ignoreDirs: configIgnoreDirs, supportedFiles, scanFunction } = config;\n const dirsToIgnore = [...ignoreDirs, ...configIgnoreDirs].filter((dir) => dir.length > 0);\n try {\n const filesToScan: string[] = await fastGlob(`${scanPath}/**/${supportedFiles.join('|')}`, {\n ignore: dirsToIgnore.map((dir: string) => `${scanPath}/**/${dir}`),\n unique: true,\n onlyFiles: true,\n });\n logger.info(\n colors.magenta(`Scanning: ${filesToScan.length} files of type ${codePackageType}`),\n );\n const allPackages = filesToScan\n .map((filePath) =>\n scanFunction(filePath).map((result) => ({\n ...result,\n relativePath: filePath.replace(`${scanPath}/`, ''),\n })),\n )\n .flat();\n logger.info(\n colors.green(\n `Found: ${allPackages.length} packages and ${\n allPackages.map(({ softwareDevelopmentKits = [] }) => softwareDevelopmentKits).flat()\n .length\n } sdks`,\n ),\n );\n\n return allPackages.map(\n (pkg): CodePackageInput => ({\n ...pkg,\n type: codePackageType,\n repositoryName,\n }),\n );\n } catch (error) {\n throw new Error(`Error scanning globs ${supportedFiles} with error: ${error}`);\n }\n }),\n );\n\n return allCodePackages.flat();\n}\n","import { execSync } from 'child_process';\n\nimport { buildTranscendGraphQLClient } from '@transcend-io/sdk';\nimport colors from 'colors';\n\nimport { ADMIN_DASH } from '../../../constants.js';\nimport type { LocalContext } from '../../../context.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { findCodePackagesInFolder } from '../../../lib/code-scanning/index.js';\nimport { syncCodePackages } from '../../../lib/graphql/index.js';\n\nconst REPO_ERROR =\n 'A repository name must be provided. ' +\n 'You can specify using --repositoryName=$REPO_NAME or by ensuring the ' +\n 'command \"git config --get remote.origin.url\" returns the name of the repository';\n\nexport interface ScanPackagesCommandFlags {\n auth: string;\n scanPath: string;\n ignoreDirs?: string[];\n repositoryName?: string;\n transcendUrl: string;\n}\n\nexport async function scanPackages(\n this: LocalContext,\n { auth, scanPath, ignoreDirs, repositoryName, transcendUrl }: ScanPackagesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process);\n\n // Ensure repository name is specified\n let gitRepositoryName = repositoryName;\n if (!gitRepositoryName) {\n try {\n const name = execSync(`cd ${scanPath} && git config --get remote.origin.url`);\n // Trim and parse the URL\n const url = name.toString('utf-8').trim();\n [gitRepositoryName] = !url.includes('https:')\n ? (url.split(':').pop() || '').split('.')\n : url.split('/').slice(3).join('/').split('.');\n if (!gitRepositoryName) {\n this.logger.error(colors.red(REPO_ERROR));\n this.process.exit(1);\n }\n } catch (err) {\n this.logger.error(colors.red(`${REPO_ERROR} - Got error: ${err.message}`));\n this.process.exit(1);\n }\n }\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Scan the codebase to discovery packages\n const results = await findCodePackagesInFolder({\n scanPath,\n ignoreDirs,\n repositoryName: gitRepositoryName,\n });\n\n // Report scan to Transcend\n await syncCodePackages(client, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/code-scanning/code-packages';\n\n // Indicate success\n this.logger.info(\n colors.green(\n `Scan found ${results.length} packages at ${scanPath}! ` + `View results at '${newUrl.href}'`,\n ),\n );\n}\n"],"mappings":"qbAcA,eAAsB,EAAyB,CAC7C,WACA,aAAa,EAAE,CACf,kBAQ8B,CA4C9B,OAAO,MA3CuB,QAAQ,IACpC,EAAW,EAAsB,CAAC,IAAI,MAAO,CAAC,EAAiB,KAAY,CACzE,GAAM,CAAE,WAAY,EAAkB,iBAAg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W,CAAC,CACzC,KAAK,QAAQ,KAAK,EAAE,QAEf,EAAK,CACZ,KAAK,OAAO,MAAM,EAAO,IAAI,GAAG,EAAW,gBAAgB,EAAI,UAAU,CAAC,CAC1E,KAAK,QAAQ,KAAK,EAAE,CAKxB,IAAM,EAAS,EAA4B,EAAc,EAAK,CAGxD,EAAU,MAAM,EAAyB,CAC7C,WACA,aACA,eAAgB,EACjB,CAAC,CAGF,MAAM,EAAiB,EAAQ,EAAQ,CAEvC,IAAM,EAAS,IAAI,IAAI,EAAW,CAClC,EAAO,SAAW,+BAGlB,KAAK,OAAO,KACV,EAAO,MACL,cAAc,EAAQ,OAAO,eAAe,EAAS,qBAA0B,EAAO,KAAK,GAC5F,CACF"}
|
package/dist/impl-BNPgYSBT.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./runOpa-CkKAwsvB.mjs";import{n as r}from"./inquirer-DkFTQU00.mjs";import{t as i}from"./done-input-validation-Cjk7a3jX.mjs";import a from"node:path";import o from"colors";async function s({dir:s}){i(this.process),t();let c=a.resolve(s);this.logger.info(o.green(`Linting policy bundle in ${c}...`));let l=await e([`check`,`--strict`,c]);l!==0&&this.process.exit(l);let{stdout:u}=await n([`fmt`,`--list`,c]),d=u.trim().split(`
|
|
2
|
-
`).filter(e=>e.length>0);if(d.length>0){this.logger.error(o.red(`Policy files are not formatted:`)),d.forEach(e=>{this.logger.error(o.red(` - ${e}`))}),this.logger.error(``),await e([`fmt`,`--diff`,c]),this.process.stdin.isTTY||(this.logger.error(o.red(`Cannot format policy files in a non-interactive environment.`)),this.process.exit(1)),await r({message:`Format the unformatted policy files listed above?`})||this.process.exit(1);let t=await e([`fmt`,`-w`,c]);t!==0&&this.process.exit(t),this.logger.info(o.green(`Policy files formatted.`)),this.logger.info(o.green(`Policy lint passed.`));return}this.logger.info(o.green(`Policy lint passed.`))}export{s as lint};
|
|
3
|
-
//# sourceMappingURL=impl-BNPgYSBT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl-BNPgYSBT.mjs","names":[],"sources":["../src/commands/policy/lint/impl.ts"],"sourcesContent":["import path from 'node:path';\n\nimport colors from 'colors';\n\nimport type { LocalContext } from '../../../context.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { inquirerConfirmBoolean } from '../../../lib/helpers/inquirer.js';\nimport { assertOpaInstalled, runOpa, runOPACapture } from '../helpers/index.js';\n\n/** CLI flags for `transcend policy lint`. */\nexport interface LintCommandFlags {\n /** Directory containing Rego policy files */\n dir: string;\n}\n\n/**\n * Local Rego lint via `opa check` and optional interactive formatting via `opa fmt`.\n *\n * @param this - CLI context\n * @param flags - Command flags\n */\nexport async function lint(this: LocalContext, { dir }: LintCommandFlags): Promise<void> {\n doneInputValidation(this.process);\n\n assertOpaInstalled();\n const resolvedDir = path.resolve(dir);\n\n this.logger.info(colors.green(`Linting policy bundle in ${resolvedDir}...`));\n\n const checkCode = await runOpa(['check', '--strict', resolvedDir]);\n if (checkCode !== 0) {\n this.process.exit(checkCode);\n }\n\n const { stdout } = await runOPACapture(['fmt', '--list', resolvedDir]);\n const unformattedFiles = stdout\n .trim()\n .split('\\n')\n .filter((file) => file.length > 0);\n\n if (unformattedFiles.length > 0) {\n this.logger.error(colors.red('Policy files are not formatted:'));\n unformattedFiles.forEach((file) => {\n this.logger.error(colors.red(` - ${file}`));\n });\n this.logger.error('');\n await runOpa(['fmt', '--diff', resolvedDir]);\n\n if (!this.process.stdin.isTTY) {\n this.logger.error(colors.red('Cannot format policy files in a non-interactive environment.'));\n this.process.exit(1);\n }\n\n const shouldFormat = await inquirerConfirmBoolean({\n message: 'Format the unformatted policy files listed above?',\n });\n if (!shouldFormat) {\n this.process.exit(1);\n }\n\n const fmtWriteCode = await runOpa(['fmt', '-w', resolvedDir]);\n if (fmtWriteCode !== 0) {\n this.process.exit(fmtWriteCode);\n }\n\n this.logger.info(colors.green('Policy files formatted.'));\n this.log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|
|
1
|
-
{"version":3,"file":"impl-BYGNx-8W2.mjs","names":[],"sources":["../src/commands/inventory/pull/impl.ts"],"sourcesContent":["import path from 'node:path';\n\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { buildTranscendGraphQLClient } from '@transcend-io/sdk';\nimport { mapSeries } from '@transcend-io/utils';\nimport colors from 'colors';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants.js';\nimport type { LocalContext } from '../../../context.js';\nimport { TranscendPullResource } from '../../../enums.js';\nimport { validateTranscendAuth } from '../../../lib/api-keys/index.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { pullTranscendConfiguration } from '../../../lib/graphql/index.js';\nimport { serializeTranscendYaml } from '../../../lib/readTranscendYaml.js';\nimport { DEFAULT_CONSENT_TRACKER_STATUSES, DEFAULT_TRANSCEND_PULL_RESOURCES } from './command.js';\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);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth, this);\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 this.logger.info(colors.magenta(`Writing configuration to file \"${file}\"...`));\n this.fs.writeFileSync(file, serializeTranscendYaml(configuration));\n } catch (err) {\n this.logger.error(\n colors.red(`An error occurred syncing the schema: ${debug ? err.stack : err.message}`),\n );\n this.process.exit(1);\n }\n\n // Indicate success\n this.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 (!this.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}][${apiKey.organizationName}] `;\n this.logger.info(\n colors.magenta(`~~~\\n\\n${prefix}Attempting to pull configuration...\\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 = path.join(file, `${apiKey.organizationName}.yml`);\n this.logger.info(colors.magenta(`Writing configuration to file \"${filePath}\"...`));\n this.fs.writeFileSync(filePath, serializeTranscendYaml(configuration));\n\n this.logger.info(colors.green(`${prefix}Successfully pulled configuration!`));\n } catch (err) {\n this.logger.error(colors.red(`${prefix}Failed to sync configuration. - ${err.message}`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n this.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"],"mappings":"ugBA+BA,eAAsB,EAEpB,CACE,OACA,YAAY,EACZ,OACA,eACA,cAAc,EAAE,CAChB,mBAAmB,EAAE,CACrB,kBAAkB,EAClB,WACA,iBACA,oBACA,2BACA,SAEa,CACf,EAAoB,KAAK,QAAQ,CAGjC,IAAM,EAAe,MAAM,EAAsB,EAAM,KAAK,CAEtD,EAA2C,EAAU,SAAS,MAAM,CACtE,OAAO,OAAO,EAAsB,CACnC,EAGL,GAAI,OAAO,GAAiB,SAAU,CACpC,GAAI,CAIF,IAAM,EAAgB,MAAM,EAFb,EAA4B,EAAc,EAEI,CAAE,CAC7D,cACA,mBACA,UAAW,EACX,WACA,QACA,iBACA,oBACA,2BACA,kBACD,CAAC,CAEF,KAAK,OAAO,KAAK,EAAO,QAAQ,kCAAkC,EAAK,MAAM,CAAC,CAC9E,KAAK,GAAG,cAAc,EAAM,EAAuB,EAAc,CAAC,OAC3D,EAAK,CACZ,KAAK,OAAO,MACV,EAAO,IAAI,yCAAyC,EAAQ,EAAI,MAAQ,EAAI,UAAU,CACvF,CACD,KAAK,QAAQ,KAAK,EAAE,CAItB,KAAK,OAAO,KACV,EAAO,MACL,4CAA4C,EAAK,YAAY,IAC9D,CACF,KACI,CACL,GAAI,CAAC,KAAK,GAAG,UAAU,EAAK,CAAC,aAAa,CACxC,MAAU,MACR,0GACD,CAGH,IAAM,EAA8B,EAAE,CACtC,MAAM,EAAU,EAAc,MAAO,EAAQ,IAAQ,CACnD,IAAM,EAAS,IAAI,EAAM,EAAE,GAAG,EAAa,OAAO,IAAI,EAAO,iBAAiB,IAC9E,KAAK,OAAO,KACV,EAAO,QAAQ,UAAU,EAAO,4CAA4C,CAC7E,CAGD,IAAM,EAAS,EAA4B,EAAc,EAAO,OAAO,CAEvE,GAAI,CACF,IAAM,EAAgB,MAAM,EAA2B,EAAQ,CAC7D,cACA,mBACA,UAAW,EACX,WACA,QACA,iBACA,oBACA,2BACA,kBACD,CAAC,CAEI,EAAW,EAAK,KAAK,EAAM,GAAG,EAAO,iBAAiB,MAAM,CAClE,KAAK,OAAO,KAAK,EAAO,QAAQ,kCAAkC,EAAS,MAAM,CAAC,CAClF,KAAK,GAAG,cAAc,EAAU,EAAuB,EAAc,CAAC,CAEtE,KAAK,OAAO,KAAK,EAAO,MAAM,GAAG,EAAO,oCAAoC,CAAC,OACtE,EAAK,CACZ,KAAK,OAAO,MAAM,EAAO,IAAI,GAAG,EAAO,kCAAkC,EAAI,UAAU,CAAC,CACxF,EAAkB,KAAK,EAAO,iBAAiB,GAEjD,CAEE,EAAkB,OAAS,IAC7B,KAAK,OAAO,KACV,EAAO,IACL,gCAAgC,EAAkB,KAChD,IACD,CAAC,0DAA0D,IAC7D,CACF,CAED,KAAK,QAAQ,KAAK,EAAE"}
|
package/dist/impl-BcJ019T2.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./parseVariablesFromString-Cr3x2uq3.mjs";import{t}from"./validateTranscendAuth-CnHMn77m.mjs";import{t as n}from"./done-input-validation-Cjk7a3jX.mjs";import{a as r,c as i,o as a}from"./manifest-DVuW_vvO.mjs";import{CustomFunctionPayloadType as o,CustomFunctionType as s}from"@transcend-io/privacy-types";import{dirname as c,resolve as l}from"node:path";import u from"colors";import{buildTranscendGraphQLClient as d,createSombraGotInstance as f,fetchAllCustomFunctions as p,resolveEffectiveSombraId as m,resolveExistingCustomFunction as h,syncCustomFunction as g}from"@transcend-io/sdk";import{mapSeries as _}from"@transcend-io/utils";async function v({auth:v,sombraAuth:y,transcendUrl:b,file:x=`./transcend-functions.yml`,variables:S,dryRun:C,promote:w,force:T,skipTests:E,updateManifest:D,sombraId:O}){if(n(this.process),!this.fs.existsSync(x)){let e=`./transcend/custom-functions/transcend-functions.yml`,t=this.fs.existsSync(e)?` Did you mean --file=${e}?`:` You can specify the file path using --file=./transcend-functions.yml`;this.logger.error(u.red(`The manifest file does not exist on disk: ${x}.${t}`)),this.process.exit(1)}let k=t(v,this);Array.isArray(k)&&(this.logger.error(u.red(`transcend custom-functions push does not support a list of API keys — pass a single API key.`)),this.process.exit(1));let A=k,j=e(S);this.logger.info(u.magenta(`Reading manifest "${x}"...`));let M=c(l(x)),N=r(x,j,e=>i(this,M,e));this.logger.info(u.green(`Found ${N.length} custom function(s) in "${x}"`));let P=d(b,A),F=await p(P,{logger:this.logger}),I=new Map,L=async(e,t)=>{let n=`${e??``}\u0000${t??``}`,r=I.get(n);if(r)return r;this.logger.info(u.magenta(`Connecting to the ${e?`Sombra gateway "${e}"`:`primary Sombra gateway`} to sign code...`));let i=await f(b,A,{logger:this.logger,sombraApiKey:t,...e?{sombraId:e}:{}});return I.set(n,i),i},R=e=>{if(!e.sombraAuthEnv)return y;let t=this.process.env[e.sombraAuthEnv];if(!t)throw Error(`Custom function "${e.name}" sets sombra-auth-env: ${e.sombraAuthEnv}, but that environment variable is not set. Export it (e.g. from a CI secret) before pushing.`);return t},z=[];if(await _(N,async e=>{try{let t=m(e,h(F,e),O),n=await g(P,{input:e,sombra:C?void 0:await L(t,R(e)),defaultSombraId:O,existing:F,promote:w,dryRun:C,force:T,...!E&&e.testPayloads!==void 0?{testPayloads:e.testPayloads}:{},logger:this.logger});z.push({name:e.name,result:n});let r=n.versionNumber?` (version ${n.versionNumber})`:``,i=n.changedFields.length>0?` [${n.changedFields.join(`, `)}]`:``;switch(n.outcome){case`created`:n.createdDataSilo&&n.dataSiloId&&this.logger.info(u.green(`Created DSR integration (data silo ${n.dataSiloId}) for "${e.name}"`)),this.logger.info(u.green(`Created custom function "${e.name}"${r}`));break;case`updated`:this.logger.info(u.green(`Pushed new revision to "${e.name}"${r}${i}${n.promoted?` and promoted to active`:` as a draft`}`));break;case`metadata-updated`:this.logger.info(u.green(`Updated metadata for "${e.name}"${i} — code unchanged, no new revision`));break;case`skipped`:this.logger.info(u.yellow(`Skipped "${e.name}" — no changes detected (env variable values cannot be diffed; use --force if only values changed)`));break;case`would-create`:this.logger.info(u.cyan(`[dry run] Would create custom function "${e.name}"${e.type===s.Dsr&&!e.dataSiloId?` and its DSR integration (data silo)`:``}`));break;case`would-update`:this.logger.info(u.cyan(`[dry run] Would push a new revision to "${e.name}"${i}`));break;case`test-failed`:{let t=(n.testResults??[]).filter(({passed:e})=>!e);this.logger.error(u.red(`Rejected "${e.name}" — ${t.length} of ${n.testResults?.length??0} test run(s) failed`)),t.forEach(({payloadType:e,result:t})=>{let n=e?`[${e}] `:``;this.logger.error(u.red(` ${n}${t.error?t.error.message:`failed with exit code ${t.exitCode}`}`)),t.logs.forEach(({file:e,message:t})=>{this.logger.error(u.red(` [${e}] ${t}`))})}),n.createdDataSilo&&this.logger.error(u.red(` The DSR integration (data silo) created for "${e.name}" was rolled back.`));break}}if(!E&&(e.testPayloads===void 0||e.testPayloads.length===0)&&(n.outcome===`created`||n.outcome===`updated`)&&this.logger.warn(u.yellow(`Custom function "${e.name}" was pushed without a test run — add a test-payload to its manifest entry to enable test-before-promote.`)),!E&&e.type===s.Dsr&&e.testPayloads!==void 0&&e.testPayloads.length>0&&(n.outcome===`created`||n.outcome===`updated`)){let t=new Set(e.testPayloads.map(({payloadType:e})=>e??o.DataPoint));if(t.size===1){let[n]=t,r=n===o.DataPoint?o.RequestEnricher:o.DataPoint;this.logger.warn(u.yellow(`DSR custom function "${e.name}" only tests its ${n} export — if it also implements the ${r} export, add a test payload with payload-type: ${r} so both entry points are tested on every push.`))}}}catch(t){z.push({name:e.name,error:t}),this.logger.error(u.red(`Failed to sync custom function "${e.name}": ${t.message}`))}}),D&&!C){let e=a(x,N.map((e,t)=>{let n=z[t]?.result;if(!n)return;let r={...!e.id&&n.customFunctionId?{id:n.customFunctionId}:{},...!e.dataSiloId&&n.dataSiloId?{dataSiloId:n.dataSiloId}:{}};return Object.keys(r).length>0?r:void 0}));e>0&&this.logger.info(u.green(`Wrote assigned id(s) back to ${e} manifest entr(ies) in "${x}" — commit this change so future pushes match by ID.`))}let B=e=>z.filter(({result:t})=>t?.outcome===e).length,V=z.filter(({error:e})=>e!==void 0),H=B(`test-failed`);this.logger.info(u.magenta(`Custom function sync complete: ${B(`created`)+B(`would-create`)} created, ${B(`updated`)+B(`would-update`)} updated, ${B(`metadata-updated`)} metadata-only, ${B(`skipped`)} skipped, ${H} rejected (test failed), ${V.length} failed${C?` (dry run)`:``}`)),(V.length>0||H>0)&&this.process.exit(1)}export{v as push};
|
|
2
|
-
//# sourceMappingURL=impl-BcJ019T2.mjs.map
|
package/dist/impl-BsC1KVxS.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./skipPreflightJobs-Beia_iB6.mjs";import{t}from"./done-input-validation-Cjk7a3jX.mjs";async function n({auth:n,transcendUrl:r,enricherIds:i}){t(this.process),await e({transcendUrl:r,auth:n,enricherIds:i})}export{n as skipPreflightJobs};
|
|
2
|
-
//# sourceMappingURL=impl-BsC1KVxS.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl-BwRcpAno.mjs","names":[],"sources":["../src/lib/code-scanning/findFilesToScan.ts","../src/commands/inventory/discover-silos/impl.ts"],"sourcesContent":["import fastGlob from 'fast-glob';\n\nimport { logger } from '../../logger.js';\nimport { CodeScanningConfig } from './types.js';\n\nexport interface SiloDiscoveryRawResults {\n /** The name of the potential data silo entry */\n name: string;\n /** A unique UUID (represents the same resource across different silo discovery runs) */\n resourceId: string;\n /** Any hosts associated with the entry */\n host?: string;\n /** Type of data silo */\n type?: string | undefined;\n}\n\n/**\n * Helper to scan for data silos in all package.json files that it can find in a directory\n *\n * @deprecated TODO: https://transcend.height.app/T-32325 - use code scanning instead\n * @param options - Options\n * @returns the list of integrations\n */\nexport async function findFilesToScan({\n scanPath,\n fileGlobs,\n ignoreDirs,\n config,\n}: {\n /** Where to look for package.json files */\n scanPath: string;\n /** Globs to look for */\n fileGlobs: string;\n /** The directories to ignore (excludes node_modules and serverless-build) */\n ignoreDirs: string;\n /** Silo Discovery configuration */\n config: CodeScanningConfig;\n}): Promise<SiloDiscoveryRawResults[]> {\n const { ignoreDirs: IGNORE_DIRS, supportedFiles, scanFunction } = config;\n const globsToSupport =\n fileGlobs === '' ? supportedFiles : supportedFiles.concat(fileGlobs.split(','));\n const dirsToIgnore = [...ignoreDirs.split(','), ...IGNORE_DIRS].filter((dir) => dir.length > 0);\n try {\n const filesToScan: string[] = await fastGlob(`${scanPath}/**/${globsToSupport.join('|')}`, {\n ignore: dirsToIgnore.map((dir: string) => `${scanPath}/**/${dir}`),\n unique: true,\n onlyFiles: true,\n });\n logger.info(`Scanning: ${filesToScan.length} files`);\n const allPackages = filesToScan.map((filePath: string) => scanFunction(filePath)).flat();\n const allSdks = allPackages\n .map((appPackage) => appPackage.softwareDevelopmentKits || [])\n .flat();\n const uniqueDeps = new Set(allSdks.map((sdk) => sdk.name));\n const deps = [...uniqueDeps];\n logger.info(`Found: ${deps.length} unique dependencies`);\n return deps.map((dep) => ({\n name: dep,\n resourceId: `${scanPath}/**/${dep}`,\n useStrictClassifier: true,\n }));\n } catch (error) {\n throw new Error(`Error scanning globs ${findFilesToScan} with error: ${error}`);\n }\n}\n","import {\n buildTranscendGraphQLClient,\n fetchActiveSiloDiscoPlugin,\n uploadSiloDiscoveryResults,\n} from '@transcend-io/sdk';\nimport colors from 'colors';\nimport { stringify } from 'query-string';\n\nimport { ADMIN_DASH } from '../../../constants.js';\nimport type { LocalContext } from '../../../context.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { findFilesToScan } from '../../../lib/code-scanning/findFilesToScan.js';\nimport { SILO_DISCOVERY_CONFIGS } from '../../../lib/code-scanning/index.js';\n\nexport interface DiscoverSilosCommandFlags {\n scanPath: string;\n dataSiloId: string;\n auth: string;\n fileGlobs: string;\n ignoreDirs: string;\n transcendUrl: string;\n}\n\nexport async function discoverSilos(\n this: LocalContext,\n { scanPath, dataSiloId, auth, fileGlobs, ignoreDirs, transcendUrl }: DiscoverSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process);\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const plugin = await fetchActiveSiloDiscoPlugin(client, {\n logger: this.logger,\n filterBy: { dataSiloId },\n });\n\n const config = SILO_DISCOVERY_CONFIGS[plugin.dataSilo.type];\n if (!config) {\n this.logger.error(\n colors.red(\n `This plugin \"${plugin.dataSilo.type}\" is not supported for offline silo discovery.`,\n ),\n );\n this.process.exit(1);\n }\n\n const results = await findFilesToScan({\n scanPath,\n fileGlobs,\n ignoreDirs,\n config,\n });\n\n await uploadSiloDiscoveryResults(client, {\n pluginId: plugin.id,\n results,\n logger: this.logger,\n });\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/data-map/data-inventory/silo-discovery/triage';\n newUrl.search = stringify({\n filters: JSON.stringify({ pluginIds: [plugin.id] }),\n });\n\n // Indicate success\n this.logger.info(\n colors.green(\n `Scan found ${results.length} potential data silos at ${scanPath}! ` +\n `View at '${newUrl.href}' ` +\n '\\n\\n NOTE: it may take 2-3 minutes for scan results to appear in the UI.',\n ),\n );\n}\n"],"mappings":"gZAuBA,eAAsB,EAAgB,CACpC,WACA,YACA,aACA,UAUqC,CACrC,GAAM,CAAE,WAAY,EAAa,iBAAgB,gBAAiB,EAC5D,EACJ,IAAc,GAAK,EAAiB,EAAe,OAAO,EAAU,MAAM,IAAI,CAAC,CAC3E,EAAe,CAAC,GAAG,EAAW,MAAM,IAAI,CAAE,GAAG,EAAY,CAAC,OAAQ,GAAQ,EAAI,OAAS,EAAE,CAC/F,GAAI,CACF,IAAM,EAAwB,MAAM,EAAS,GAAG,EAAS,MAAM,EAAe,KAAK,IAAI,GAAI,CACzF,OAAQ,EAAa,IAAK,GAAgB,GAAG,EAAS,MAAM,IAAM,CAClE,OAAQ,GACR,UAAW,GACZ,CAAC,CAC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1
|
-
{"version":3,"file":"impl-C5dzaDga2.mjs","names":[],"sources":["../src/commands/request/preflight/pull-identifiers/impl.ts"],"sourcesContent":["import type { RequestAction } from '@transcend-io/privacy-types';\n\nimport type { LocalContext } from '../../../../context.js';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation.js';\nimport { pullManualEnrichmentIdentifiersToCsv } from '../../../../lib/manual-enrichment/index.js';\n\nexport interface PullIdentifiersCommandFlags {\n auth: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n actions?: RequestAction[];\n concurrency: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n { auth, transcendUrl, file, concurrency, actions, sombraAuth }: PullIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process);\n\n await pullManualEnrichmentIdentifiersToCsv({\n file,\n transcendUrl,\n concurrency,\n requestActions: actions,\n auth,\n sombraAuth,\n });\n}\n"],"mappings":"4HAeA,eAAsB,EAEpB,CAAE,OAAM,eAAc,OAAM,cAAa,UAAS,cACnC,CACf,EAAoB,KAAK,QAAQ,CAEjC,MAAM,EAAqC,CACzC,OACA,eACA,cACA,eAAgB,EAChB,OACA,aACD,CAAC"}
|
package/dist/impl-C8BmxFQ2.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./retryRequestDataSilos-D9dBtbdl.mjs";import{t}from"./done-input-validation-Cjk7a3jX.mjs";async function n({auth:n,dataSiloId:r,actions:i,transcendUrl:a}){t(this.process),await e({requestActions:i,transcendUrl:a,auth:n,dataSiloId:r})}export{n as retryRequestDataSilos};
|
|
2
|
-
//# sourceMappingURL=impl-C8BmxFQ2.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl-CXUJ1eRC.mjs","names":[],"sources":["../src/commands/inventory/derive-data-silos-from-data-flows/impl.ts"],"sourcesContent":["import path from 'node:path';\n\nimport { buildTranscendGraphQLClient, fetchAndIndexCatalogs } from '@transcend-io/sdk';\nimport colors from 'colors';\n\nimport { DataFlowInput } from '../../../codecs.js';\nimport type { LocalContext } from '../../../context.js';\nimport { filterFileNames } from '../../../lib/api-keys/index.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { dataFlowsToDataSilos } from '../../../lib/consent-manager/dataFlowsToDataSilos.js';\nimport { parseTranscendYaml, serializeTranscendYaml } from '../../../lib/readTranscendYaml.js';\n\nexport interface DeriveDataSilosFromDataFlowsCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n dataSilosYmlFolder: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlows(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n dataSilosYmlFolder,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process);\n\n // Ensure folder is passed\n if (\n !this.fs.existsSync(dataFlowsYmlFolder) ||\n !this.fs.lstatSync(dataFlowsYmlFolder).isDirectory()\n ) {\n this.logger.error(colors.red(`Folder does not exist: \"${dataFlowsYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Ensure folder is passed\n if (\n !this.fs.existsSync(dataSilosYmlFolder) ||\n !this.fs.lstatSync(dataSilosYmlFolder).isDirectory()\n ) {\n this.logger.error(colors.red(`Folder does not exist: \"${dataSilosYmlFolder}\"`));\n this.process.exit(1);\n }\n\n // Fetch all integrations in the catalog\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { serviceToTitle, serviceToSupportedIntegration } = await fetchAndIndexCatalogs(client, {\n logger: this.logger,\n });\n\n // List of each data flow yml file\n filterFileNames(this.fs.readdirSync(dataFlowsYmlFolder)).forEach((directory) => {\n const inputPath = path.join(dataFlowsYmlFolder, directory);\n\n // read in the data flows for a specific instance\n const { 'data-flows': dataFlows = [] } = parseTranscendYaml(\n this.fs.readFileSync(inputPath, 'utf8'),\n {},\n inputPath,\n );\n\n // map the data flows to data silos\n const { adTechDataSilos, siteTechDataSilos } = dataFlowsToDataSilos(\n dataFlows as DataFlowInput[],\n {\n serviceToSupportedIntegration,\n serviceToTitle,\n },\n );\n\n // combine and write to yml file\n const dataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n this.logger.log(`Total Services: ${dataSilos.length}`);\n this.logger.log(`Ad Tech Services: ${adTechDataSilos.length}`);\n this.logger.log(`Site Tech Services: ${siteTechDataSilos.length}`);\n this.fs.writeFileSync(\n path.join(dataSilosYmlFolder, directory),\n serializeTranscendYaml({\n 'data-silos': ignoreYmls.includes(directory) ? [] : dataSilos,\n }),\n );\n });\n}\n"],"mappings":"oWAoBA,eAAsB,EAEpB,CACE,OACA,qBACA,qBACA,aAAa,EAAE,CACf,gBAEa,CACf,EAAoB,KAAK,QAAQ,EAI/B,CAAC,KAAK,GAAG,WAAW,EAAmB,EACvC,CAAC,KAAK,GAAG,UAAU,EAAmB,CAAC,aAAa,IAEpD,KAAK,OAAO,MAAM,EAAO,IAAI,2BAA2B,EAAmB,GAAG,CAAC,CAC/E,KAAK,QAAQ,KAAK,EAAE,GAKpB,CAAC,KAAK,GAAG,WAAW,EAAmB,EACvC,CAAC,KAAK,GAAG,UAAU,EAAmB,CAAC,aAAa,IAEpD,KAAK,OAAO,MAAM,EAAO,IAAI,2BAA2B,EAAmB,GAAG,CAAC,CAC/E,KAAK,QAAQ,KAAK,EAAE,EAKtB,GAAM,CAAE,iBAAgB,iCAAkC,MAAM,EADjD,EAA4B,EAAc,EACmC,CAAE,CAC5F,OAAQ,KAAK,OACd,CAAC,CAGF,EAAgB,KAAK,GAAG,YAAY,EAAmB,CAAC,CAAC,QAAS,GAAc,CAC9E,IAAM,EAAY,EAAK,KAAK,EAAoB,EAAU,CAGpD,CAAE,aAAc,EAAY,EAAE,EAAK,EACvC,KAAK,GAAG,aAAa,EAAW,OAAO,CACvC,EAAE,CACF,EACD,CAGK,CAAE,kBAAiB,qBAAsB,EAC7C,EACA,CACE,gCACA,iBACD,CACF,CAGK,EAAY,CAAC,GAAG,EAAiB,GAAG,EAAkB,CAC5D,KAAK,OAAO,IAAI,mBAAmB,EAAU,SAAS,CACtD,KAAK,OAAO,IAAI,qBAAqB,EAAgB,SAAS,CAC9D,KAAK,OAAO,IAAI,uBAAuB,EAAkB,SAAS,CAClE,KAAK,GAAG,cACN,EAAK,KAAK,EAAoB,EAAU,CACxC,EAAuB,CACrB,aAAc,EAAW,SAAS,EAAU,CAAG,EAAE,CAAG,EACrD,CAAC,CACH,EACD"}
|
package/dist/impl-CzxvoiGW.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./readTranscendYaml-STYnRzq-.mjs";import{t}from"./parseVariablesFromString-Cr3x2uq3.mjs";import{t as n}from"./done-input-validation-Cjk7a3jX.mjs";import{a as r,g as i,i as a,r as o,s,t as c}from"./deno-runtime-QqwBDKXX.mjs";import{t as l}from"./missing-manifest-BKj1j-jg.mjs";import{c as u,l as d,n as f,r as p,s as m}from"./manifest-DVuW_vvO.mjs";import{t as h}from"./run-captured-process-CpZBh0lG.mjs";import{t as g}from"./module-graph-DBC7ZvyA.mjs";import{t as _}from"./project-plan-apply-C2DfikVN.mjs";import{dirname as v,extname as y,join as b,relative as x,resolve as S,sep as C}from"node:path";import w from"colors";import{DSR_DATAPOINT_CUSTOM_FUNCTION_PAYLOAD_SCHEMA as T,DSR_REQUEST_ENRICHER_CUSTOM_FUNCTION_PAYLOAD_SCHEMA as E,GENERAL_CUSTOM_FUNCTION_PAYLOAD_SCHEMA as D}from"@transcend-io/custom-function-types";import O from"ajv";import{createTwoFilesPatch as k}from"diff";import{parse as A}from"jsonc-parser";function j(e,t){e.push({severity:`error`,...t})}function M(e,t){return x(e,t).split(C).join(`/`)||`.`}function N(e){let t=t=>e.type===`DSR`?t===`REQUEST_ENRICHER`?`dsr-enricher`:`dsr-datapoint`:`general`;return e[`test-payload`]?[{entry:e,path:e[`test-payload`],type:t(e[`test-payload-type`])}]:(e[`test-payloads`]??[]).map(n=>({entry:e,path:n.payload,type:t(n[`payload-type`])}))}function P(e,t){let n=N(e).map(({type:e})=>e),r=e.type===`DSR`&&n.length===0;return{entry:e,path:S(t,e.code),needsDefault:e.type!==`DSR`||n.includes(`dsr-datapoint`),needsEnricher:n.includes(`dsr-enricher`),needsAnyDsrExport:r}}function F(){let e=new O({allErrors:!0,strict:!1});return{general:e.compile(D),"dsr-datapoint":e.compile(T),"dsr-enricher":e.compile(E)}}function I(e){return`${e.instancePath||`/`} ${e.message??`is invalid`}`}function L(e,t,n,r){let i=F(),a=[],o=[];return n.forEach(n=>{if(/<<parameters\.[^>]+>>/u.test(n.code))j(r,{code:`manifest.unresolved-code-path`,message:`Code paths cannot contain unresolved parameter placeholders.`,path:n.code,functionName:n.name});else if(f(n.code)){let i=P(n,t);e.fs.existsSync(i.path)?d(e,t,i.path)?e.fs.statSync(i.path).isFile()?a.push(i):j(r,{code:`source.not-file`,message:`Referenced source path is not a regular file.`,path:n.code,functionName:n.name}):j(r,{code:`source.outside-project`,message:`Referenced source resolves outside the manifest directory through a symlink.`,path:n.code,functionName:n.name}):j(r,{code:`source.missing`,message:`Referenced source file does not exist.`,path:n.code,functionName:n.name})}N(n).forEach(a=>{if(/<<parameters\.[^>]+>>/u.test(a.path)){j(r,{code:`manifest.unresolved-payload-path`,message:`Payload paths cannot contain unresolved parameter placeholders.`,path:a.path,functionName:n.name});return}let s=S(t,a.path);if(!e.fs.existsSync(s)){j(r,{code:`payload.missing`,message:`Referenced test payload does not exist.`,path:a.path,functionName:n.name});return}if(!d(e,t,s)){j(r,{code:`payload.outside-project`,message:`Referenced test payload resolves outside the manifest directory through a symlink.`,path:a.path,functionName:n.name});return}if(!e.fs.statSync(s).isFile()){j(r,{code:`payload.not-file`,message:`Referenced test payload is not a regular file.`,path:a.path,functionName:n.name});return}o.push(s);let c;try{c=JSON.parse(e.fs.readFileSync(s,`utf8`))}catch(e){j(r,{code:`payload.invalid-json`,message:`Invalid JSON: ${e.message}`,path:a.path,functionName:n.name});return}let l=i[a.type];l(c)||(l.errors??[]).forEach(e=>j(r,{code:`payload.schema`,message:I(e),path:a.path,functionName:n.name}))})}),{sources:a,payloadPaths:[...new Set(o)]}}function R(e){try{let t=JSON.parse(e),n=Array.isArray(t)?t:t&&typeof t==`object`&&Array.isArray(t.nodes)?t.nodes:void 0;return n?new Set(n.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e.name;return typeof t==`string`?[t]:[]})):new Set}catch{return new Set}}function z(e){switch(y(e)){case`.ts`:case`.tsx`:return`ts`;case`.json`:case`.jsonc`:return`json`;case`.yaml`:case`.yml`:return`yaml`;default:return`ts`}}function B(e,t,n){if(!n)return;let r=A(e.fs.readFileSync(n,`utf8`));if(typeof r?.importMap==`string`){if(/^[a-z][a-z\d+.-]*:/iu.test(r.importMap))return r.importMap;let i=S(v(n),r.importMap);return u(e,t,i),i}let i={};if(r.imports!==void 0&&(i.imports=r.imports),r.scopes!==void 0&&(i.scopes=r.scopes),Object.keys(i).length!==0)return`data:application/json,${encodeURIComponent(JSON.stringify(i))}`}async function V(e,t,n,r,i){let a=[],o=[];for(let s of i){u(e,n,s);let i=e.fs.readFileSync(s,`utf8`),c=await t(`deno`,[`fmt`,...r,`--ext=${z(s)}`,`-`],{cwd:n,input:i},e);if(c.code!==0)throw Error(`Deno could not preview formatting for ${M(n,s)}.${c.stderr.trim()?`\n${c.stderr.trim()}`:``}`);if(c.stdout!==i){let t=M(n,s);a.push(k(t,t,i,c.stdout,``,``,{context:3})),o.push({kind:`file`,path:s,before:i,after:c.stdout,description:`Format ${t}`,mode:e.fs.statSync(s).mode})}}return{patch:a.join(`
|
|
2
|
-
`),changes:o}}function H(e,t,n,r){j(e,{code:t,message:`${n}${r.stderr.trim()?`\n${r.stderr.trim()}`:``}`})}async function U(t,n,r=h){let i=S(n.manifestPath),a=v(i),s=[],l=new Map([[`manifest`,`passed`],[`files`,`passed`],[`payloads`,`passed`],[`runtime`,`passed`],[`exports`,`passed`],[`typecheck`,`passed`],[`lint`,`passed`],[`format`,`passed`]]),f=()=>({version:1,status:s.some(({severity:e})=>e===`error`)?`failed`:`passed`,manifestPath:i,checks:[...l].map(([e,t])=>({name:e,status:t})),diagnostics:s});if(!t.fs.existsSync(i))return j(s,{code:`manifest.missing`,message:`Custom Function manifest does not exist.`,path:M(t.process.cwd(),i)}),l.set(`manifest`,`failed`),[`files`,`payloads`,`runtime`,`exports`,`typecheck`,`lint`,`format`].forEach(e=>l.set(e,`skipped`)),f();let y=[];try{y=p(e(t.fs.readFileSync(i,`utf8`),n.variables??{})).functions}catch(e){return j(s,{code:`manifest.invalid`,message:e.message,path:M(a,i)}),l.set(`manifest`,`failed`),[`files`,`payloads`,`runtime`,`exports`,`typecheck`,`lint`,`format`].forEach(e=>l.set(e,`skipped`)),f()}y.forEach(e=>{try{m({...e.env?{env:e.env}:{},...e[`allowed-hosts`]?{allowedHosts:e[`allowed-hosts`]}:{}})}catch(t){l.set(`manifest`,`failed`),j(s,{code:`manifest.execution-context`,message:t.message,path:M(a,i),functionName:e.name})}});let{sources:x,payloadPaths:C}=L(t,a,y,s);s.some(({code:e})=>[`source.`,`manifest.unresolved-code-path`].some(t=>e.startsWith(t)))&&(l.set(`files`,`failed`),[`exports`,`typecheck`,`lint`].forEach(e=>l.set(e,`failed`))),s.some(({code:e})=>[`payload.`,`manifest.unresolved-payload-path`].some(t=>e.startsWith(t)))&&l.set(`payloads`,`failed`);let w=b(a,`deno.jsonc`),T=b(a,`deno.json`),E=t.fs.existsSync(w)?w:t.fs.existsSync(T)?T:void 0,D=E!==void 0&&!d(t,a,E),O=D,k;if(D)j(s,{code:`deno.config-outside-project`,message:`Deno configuration resolves outside the manifest directory through a symlink.`,path:M(a,E)}),[`exports`,`typecheck`,`lint`,`format`].forEach(e=>l.set(e,`failed`));else try{k=B(t,a,E)}catch(e){O=!0,j(s,{code:`deno.import-map-outside-project`,message:e.message}),[`exports`,`typecheck`,`lint`,`format`].forEach(e=>l.set(e,`failed`))}let A=E&&!O?[`--config=${E}`]:[`--no-config`],N=()=>{[`exports`,`typecheck`,`lint`,`format`].forEach(e=>{l.get(e)!==`failed`&&l.set(e,`skipped`)})},P=await r(`deno`,[`--version`],{cwd:a},t),F=P.code===0?o(P.stdout):void 0;if(F?.level===`warning`&&s.push({code:`deno.version-mismatch`,severity:`warning`,message:F.message}),P.error?.code===`ENOENT`)l.set(`runtime`,`failed`),N(),j(s,{code:`deno.missing`,message:`Deno 2.x is required for export, type, lint, and format checks. Install it from ${c}`});else if(P.code!==0)l.set(`runtime`,`failed`),N(),H(s,`deno.unavailable`,`Deno could not be started.`,P);else if(F?.level===`error`)l.set(`runtime`,`failed`),N(),j(s,{code:`deno.unsupported-version`,message:F.message});else if(!O){for(let e of x){let n=await r(`deno`,[`info`,`--json`,...A,e.path],{cwd:a},t);if(n.code!==0)l.set(`files`,`failed`),H(s,`source.module-graph`,`Could not inspect runtime imports for ${M(a,e.path)}.`,n);else try{let t=g(n.stdout);t.length>0&&(l.set(`files`,`failed`),j(s,{code:`source.local-runtime-import`,message:`Custom Functions must be self-contained. Local or import-map runtime dependencies are not deployed: `+t.join(`, `),path:M(a,e.path),functionName:e.entry.name}))}catch(t){l.set(`files`,`failed`),j(s,{code:`source.module-graph`,message:t.message,path:M(a,e.path),functionName:e.entry.name})}let i=await r(`deno`,[`doc`,`--json`,...k?[`--import-map`,k]:[],e.path],{cwd:a},t);if(i.code!==0){l.set(`exports`,`failed`),H(s,`exports.inspect`,`Could not inspect exports for ${M(a,e.path)}.`,i);continue}let o=R(i.stdout);e.needsDefault&&!o.has(`default`)&&(l.set(`exports`,`failed`),j(s,{code:`exports.default-missing`,message:`The manifest fixtures require a default export.`,path:M(a,e.path),functionName:e.entry.name})),e.needsEnricher&&!o.has(`enricher`)&&(l.set(`exports`,`failed`),j(s,{code:`exports.enricher-missing`,message:"A REQUEST_ENRICHER fixture requires an `enricher` export.",path:M(a,e.path),functionName:e.entry.name})),e.needsAnyDsrExport&&!o.has(`default`)&&!o.has(`enricher`)&&(l.set(`exports`,`failed`),j(s,{code:`exports.dsr-missing`,message:"A DSR Custom Function requires a `default` or `enricher` export.",path:M(a,e.path),functionName:e.entry.name}))}let e=[...new Set(x.map(({path:e})=>e))];if(e.length>0){let n=await r(`deno`,[`check`,...A,...e],{cwd:a},t);n.code!==0&&(l.set(`typecheck`,`failed`),H(s,`deno.typecheck`,`Deno type checking failed.`,n));let i=await r(`deno`,[`lint`,...A,...e],{cwd:a},t);i.code!==0&&(l.set(`lint`,`failed`),H(s,`deno.lint`,`Deno linting failed.`,i))}let o=[...e,...C,i,...E?[E]:[],...k&&k!==E&&!/^[a-z][a-z\d+.-]*:/iu.test(k)?[k]:[]];o.forEach(e=>u(t,a,e));let c=await r(`deno`,[`fmt`,`--check`,...A,...o],{cwd:a},t);if(c.code!==0){let e;try{e=await V(t,r,a,A,o)}catch(e){return l.set(`format`,`failed`),j(s,{code:`deno.format-preview`,message:e.message}),f()}if(e.changes.length===0)return l.set(`format`,`failed`),H(s,`deno.format`,`Deno reported a formatting failure but did not produce a repair.`,c),f();if(n.fix||n.confirmFormat&&await n.confirmFormat(e.patch))try{await _(t,{rootDirectory:a,changes:e.changes})}catch(e){l.set(`format`,`failed`),j(s,{code:`deno.format-fix`,message:`Could not apply formatting transaction: ${e.message}`})}else l.set(`format`,`failed`),e.changes.forEach((t,r)=>{j(s,{code:`deno.format`,message:`Referenced file is not formatted.`+(r===0&&n.includeFormatPatchInDiagnostics&&e.patch?`\n${e.patch}`:``),path:M(a,t.path)})})}}return f()}async function W(e,o){n(this.process);let{manifestPath:c}=i(this.process.cwd(),{...o?{directory:o}:{},...e.manifest?{manifest:e.manifest}:{}}),u=this.fs.existsSync(c)?void 0:l({cwd:this.process.cwd(),manifestPath:c,discoveredManifestPaths:s(this,this.process.cwd()),command:`check`}),d=!e.json&&!e.noInteractive&&!!(this.process.stdin.isTTY&&this.process.stderr.isTTY),f=new a(this);try{let n=await U(this,{manifestPath:c,variables:t(e.variables),fix:e.fix,includeFormatPatchInDiagnostics:!e.json,...d&&!e.fix?{confirmFormat:async e=>(e&&this.logger.error(e),f.confirm(`Format the files shown above?`,!0))}:{}});u&&n.diagnostics.forEach(e=>{e.code===`manifest.missing`&&(e.message=u)}),e.json?this.process.stdout.write(`${JSON.stringify(n)}\n`):(this.logger.info(`${w.bold(`Custom Function checks`)}\n`),n.checks.forEach(({name:e,status:t})=>{let n=t===`passed`?`PASS`:t===`failed`?`FAIL`:`SKIP`,r=t===`passed`?w.green(n):t===`failed`?w.red(n):w.yellow(n);this.logger.info(`${r} ${e[0].toUpperCase()}${e.slice(1)}`)}),n.diagnostics.length>0&&this.logger.error(``),n.diagnostics.forEach(e=>{let t=e.path?`${e.path}: `:``,n=e.functionName?`[${e.functionName}] `:``,r=`${e.severity}: ${t}${n}${e.message}`;e.severity===`warning`?this.logger.warn(w.yellow(r)):this.logger.error(w.red(r))}),n.status===`passed`?(this.logger.info(``),this.logger.info(w.green(`Custom Function checks passed.`))):(this.logger.error(``),this.logger.error(w.red(`Custom Function checks failed.`)))),n.status===`failed`&&(this.process.exitCode=1)}catch(e){throw e instanceof r&&this.process.exit(130),e}}export{W as check};
|
|
3
|
-
//# sourceMappingURL=impl-CzxvoiGW.mjs.map
|
package/dist/impl-D-SQJc3t.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g as e}from"./constants-BG53Mbi9.mjs";import{t}from"./done-input-validation-Cjk7a3jX.mjs";import{a as n,c as r,i,o as a,r as o,t as s}from"./deno-runtime-QqwBDKXX.mjs";import{t as c}from"./run-captured-process-CpZBh0lG.mjs";import{n as l,t as u}from"./project-plan-apply-C2DfikVN.mjs";import{c as d,i as f,l as p,n as m,s as h,u as g}from"./scaffold-planning-DMACXSnX.mjs";import _ from"colors";import{CUSTOM_FUNCTION_TYPES_VERSION as v}from"@transcend-io/custom-function-types";const y={[l.Deno]:`Deno configuration`,[l.Editor]:`VS Code settings`,[l.Skill]:`Agent skill`,[l.Ci]:`GitHub Actions`},b=Object.values(l);function x(e,t,n){return!e.json&&!e.noInteractive&&!!(t&&n)}async function S(e,t,n){let r={[l.Deno]:t.deno,[l.Editor]:t.editor,[l.Skill]:t.skill,[l.Ci]:t.ci};if(!n.interactive)return b.filter(e=>r[e]===!0);let i=b.map(e=>({name:y[e],value:e,checked:r[e]!==!1}));return e.checkbox(`Choose repository setup:`,i)}async function C(y,b){t(this.process);try{let t=r(this,{...b?{directory:b}:{},...y.manifest?{manifest:y.manifest}:{}}),n=new i(this),C=x(y,this.process.stdin.isTTY,this.process.stderr.isTTY),w=await S(n,y,{interactive:C}),T=m({state:t,snapshots:a(this,t.projectRoot,f(t,{features:w})),contractVersion:v,cliVersion:e},{features:w});if(w.includes(l.Deno)){let e=await c(`deno`,[`--version`],{cwd:this.process.cwd()},this);if(e.error?.code===`ENOENT`)T.warnings.push(`Deno 2.x is not installed. Install it from ${s}`);else if(e.code!==0)T.warnings.push(`Deno was found, but its version could not be determined. Deno 2.x is required. See ${s}`);else{let t=o(e.stdout);t.level!==`compatible`&&T.warnings.push(t.message)}}y.json||this.logger.info(p(T,this.process.cwd()));let E=T.changes.length===0||y.dryRun;if(T.changes.length>0&&!y.dryRun)if(y.yes)E=!0;else if(C)E=await n.confirm(`Apply this complete plan?`,!0);else throw Error(`The plan requires approval in a non-interactive invocation. Review with --dryRun, then pass --yes.`);E&&!y.dryRun&&T.changes.length>0&&await u(this,T);let D=E&&!y.dryRun&&T.changes.length>0,O=E&&!y.dryRun,k=g({targetDirectory:d(this.process.cwd(),t.targetDirectory),manifestPath:d(this.process.cwd(),t.manifestPath),cliVersion:e,hasSkill:O&&w.includes(l.Skill),hasGithubWorkflow:O&&w.includes(l.Ci)&&!!(t.repositoryRoot&&t.usesGithub)}),A=h(T,{applied:D,dryRun:y.dryRun,cwd:this.process.cwd(),aiHandoff:k});if(y.json){this.process.stdout.write(`${JSON.stringify(A)}\n`);return}if(y.dryRun){this.logger.info(_.yellow(`Dry run complete. No changes were written.`));return}if(!E){this.logger.info(_.yellow(`No changes applied.`));return}if(T.changes.length===0){this.logger.info(_.green(`Custom Function project is already initialized.`));return}this.logger.info(_.green(`Custom Function project initialized.`)),T.nextSteps.length>0&&(this.logger.info(`\n${_.bold(`Next steps`)}`),T.nextSteps.forEach(e=>this.logger.info(e))),this.logger.info(`\n${_.bold(`AI handoff — paste into your coding agent`)}`),this.logger.info(k)}catch(e){throw e instanceof n&&this.process.exit(130),e}}export{C as init};
|
|
2
|
-
//# sourceMappingURL=impl-D-SQJc3t.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl-D-SQJc3t.mjs","names":["CLI_VERSION"],"sources":["../src/commands/custom-functions/init/impl.ts"],"sourcesContent":["import { CUSTOM_FUNCTION_TYPES_VERSION } from '@transcend-io/custom-function-types';\nimport colors from 'colors';\n\nimport { version as CLI_VERSION } from '../../../constants.js';\nimport type { LocalContext } from '../../../context.js';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation.js';\nimport { runCapturedProcess } from '../../../lib/cli/run-captured-process.js';\nimport { buildInitAiHandoff } from '../../../lib/custom-functions/ai-handoff.js';\nimport {\n DENO_INSTALL_URL,\n getDenoRuntimeCompatibility,\n SUPPORTED_DENO_MAJOR_VERSION,\n} from '../../../lib/custom-functions/deno-runtime.js';\nimport {\n collectPlanningSnapshots,\n discoverCustomFunctionProject,\n} from '../../../lib/custom-functions/project-discovery.js';\nimport {\n CustomFunctionPrompts,\n PromptCancelledError,\n type PromptChoice,\n} from '../../../lib/custom-functions/prompts.js';\nimport {\n CustomFunctionSetupFeature,\n type CustomFunctionSetupFeature as CustomFunctionSetupFeatureType,\n} from '../../../lib/custom-functions/scaffold-model.js';\nimport {\n buildPlanResult,\n displayPath,\n renderProjectPlan,\n} from '../../../lib/custom-functions/scaffold-output.js';\nimport {\n buildInitPlan,\n getInitPlanningCandidatePaths,\n} from '../../../lib/custom-functions/scaffold-planning.js';\nimport { applyProjectPlan } from '../../../lib/scaffolding/project-plan-apply.js';\n\n/** Flags for `custom-functions init`. */\nexport interface CustomFunctionInitFlags {\n /** Explicit manifest path. */\n manifest?: string;\n /** Install Deno configuration. */\n deno?: boolean;\n /** Install editor recommendations. */\n editor?: boolean;\n /** Install the coding-agent skill. */\n skill?: boolean;\n /** Install GitHub Actions validation. */\n ci?: boolean;\n /** Disable prompts. */\n noInteractive: boolean;\n /** Render but do not apply. */\n dryRun: boolean;\n /** Approve the final displayed plan. */\n yes: boolean;\n /** Emit one stable JSON result on stdout. */\n json: boolean;\n}\n\n/** User-facing setup labels. */\nconst SETUP_LABELS: Readonly<Record<CustomFunctionSetupFeatureType, string>> = {\n [CustomFunctionSetupFeature.Deno]: 'Deno configuration',\n [CustomFunctionSetupFeature.Editor]: 'VS Code settings',\n [CustomFunctionSetupFeature.Skill]: 'Agent skill',\n [CustomFunctionSetupFeature.Ci]: 'GitHub Actions',\n};\n\n/** All optional setup features in stable prompt order. */\nconst ALL_SETUP_FEATURES = Object.values(CustomFunctionSetupFeature);\n\n/**\n * Whether this invocation can ask questions.\n *\n * @param context - CLI context\n * @param flags - Interaction flags\n * @returns Whether prompts are enabled\n */\nfunction isInteractiveInvocation(\n flags: Pick<CustomFunctionInitFlags, 'json' | 'noInteractive'>,\n stdinIsTTY: boolean | undefined,\n stderrIsTTY: boolean | undefined,\n): boolean {\n return !flags.json && !flags.noInteractive && Boolean(stdinIsTTY && stderrIsTTY);\n}\n\n/**\n * Resolve setup directly from individual flags or one checkbox prompt.\n *\n * @param context - CLI context\n * @param prompts - Prompt adapters\n * @param flags - Setup flags\n * @param options - Interaction state\n * @returns Selected setup features\n */\nasync function resolveFeatures(\n prompts: CustomFunctionPrompts,\n flags: CustomFunctionInitFlags,\n options: {\n /** Whether prompts are available. */\n interactive: boolean;\n },\n): Promise<CustomFunctionSetupFeatureType[]> {\n const enabled: Readonly<Record<CustomFunctionSetupFeatureType, boolean | undefined>> = {\n [CustomFunctionSetupFeature.Deno]: flags.deno,\n [CustomFunctionSetupFeature.Editor]: flags.editor,\n [CustomFunctionSetupFeature.Skill]: flags.skill,\n [CustomFunctionSetupFeature.Ci]: flags.ci,\n };\n if (!options.interactive) {\n return ALL_SETUP_FEATURES.filter((feature) => enabled[feature] === true);\n }\n const choices: PromptChoice<CustomFunctionSetupFeatureType>[] = ALL_SETUP_FEATURES.map(\n (feature) => ({\n name: SETUP_LABELS[feature],\n value: feature,\n checked: enabled[feature] !== false,\n }),\n );\n return prompts.checkbox('Choose repository setup:', choices);\n}\n\n/**\n * Initialize a credential-free local Custom Function project.\n *\n * @param this - CLI context\n * @param flags - Scaffold and interaction flags\n * @param directory - Optional target directory\n */\nexport async function init(\n this: LocalContext,\n flags: CustomFunctionInitFlags,\n directory?: string,\n): Promise<void> {\n doneInputValidation(this.process);\n try {\n const state = discoverCustomFunctionProject(this, {\n ...(directory ? { directory } : {}),\n ...(flags.manifest ? { manifest: flags.manifest } : {}),\n });\n const prompts = new CustomFunctionPrompts(this);\n const interactive = isInteractiveInvocation(\n flags,\n this.process.stdin.isTTY,\n this.process.stderr.isTTY,\n );\n const features = await resolveFeatures(prompts, flags, { interactive });\n const snapshots = collectPlanningSnapshots(\n this,\n state.projectRoot,\n getInitPlanningCandidatePaths(state, { features }),\n );\n const plan = buildInitPlan(\n {\n state,\n snapshots,\n contractVersion: CUSTOM_FUNCTION_TYPES_VERSION,\n cliVersion: CLI_VERSION,\n },\n { features },\n );\n if (features.includes(CustomFunctionSetupFeature.Deno)) {\n const denoVersion = await runCapturedProcess(\n 'deno',\n ['--version'],\n { cwd: this.process.cwd() },\n this,\n );\n if (denoVersion.error?.code === 'ENOENT') {\n plan.warnings.push(\n `Deno ${SUPPORTED_DENO_MAJOR_VERSION}.x is not installed. Install it from ${DENO_INSTALL_URL}`,\n );\n } else if (denoVersion.code !== 0) {\n plan.warnings.push(\n `Deno was found, but its version could not be determined. Deno ${SUPPORTED_DENO_MAJOR_VERSION}.x is required. See ${DENO_INSTALL_URL}`,\n );\n } else {\n const compatibility = getDenoRuntimeCompatibility(denoVersion.stdout);\n if (compatibility.level !== 'compatible') {\n plan.warnings.push(compatibility.message);\n }\n }\n }\n if (!flags.json) {\n this.logger.info(renderProjectPlan(plan, this.process.cwd()));\n }\n\n let approved = plan.changes.length === 0 || flags.dryRun;\n if (plan.changes.length > 0 && !flags.dryRun) {\n if (flags.yes) {\n approved = true;\n } else if (interactive) {\n approved = await prompts.confirm('Apply this complete plan?', true);\n } else {\n throw new Error(\n 'The plan requires approval in a non-interactive invocation. Review with --dryRun, then pass --yes.',\n );\n }\n }\n\n if (approved && !flags.dryRun && plan.changes.length > 0) {\n await applyProjectPlan(this, plan);\n }\n const applied = approved && !flags.dryRun && plan.changes.length > 0;\n const setupAvailable = approved && !flags.dryRun;\n const aiHandoff = buildInitAiHandoff({\n targetDirectory: displayPath(this.process.cwd(), state.targetDirectory),\n manifestPath: displayPath(this.process.cwd(), state.manifestPath),\n cliVersion: CLI_VERSION,\n hasSkill: setupAvailable && features.includes(CustomFunctionSetupFeature.Skill),\n hasGithubWorkflow:\n setupAvailable &&\n features.includes(CustomFunctionSetupFeature.Ci) &&\n Boolean(state.repositoryRoot && state.usesGithub),\n });\n const result = buildPlanResult(plan, {\n applied,\n dryRun: flags.dryRun,\n cwd: this.process.cwd(),\n aiHandoff,\n });\n if (flags.json) {\n this.process.stdout.write(`${JSON.stringify(result)}\\n`);\n return;\n }\n if (flags.dryRun) {\n this.logger.info(colors.yellow('Dry run complete. No changes were written.'));\n return;\n }\n if (!approved) {\n this.logger.info(colors.yellow('No changes applied.'));\n return;\n }\n if (plan.changes.length === 0) {\n this.logger.info(colors.green('Custom Function project is already initialized.'));\n return;\n }\n this.logger.info(colors.green('Custom Function project initialized.'));\n if (plan.nextSteps.length > 0) {\n this.logger.info(`\\n${colors.bold('Next steps')}`);\n plan.nextSteps.forEach((step) => this.logger.info(step));\n }\n this.logger.info(`\\n${colors.bold('AI handoff — paste into your coding agent')}`);\n this.logger.info(aiHandoff);\n } catch (error) {\n if (error instanceof PromptCancelledError) {\n this.process.exit(130);\n }\n throw error;\n }\n}\n"],"mappings":"seA4DA,MAAM,EAAyE,EAC5E,EAA2B,MAAO,sBAClC,EAA2B,QAAS,oBACpC,EAA2B,OAAQ,eACnC,EAA2B,IAAK,iBAClC,CAGK,EAAqB,OAAO,OAAO,EAA2B,CASpE,SAAS,EACP,EACA,EACA,EACS,CACT,MAAO,CAAC,EAAM,MAAQ,CAAC,EAAM,eAAiB,GAAQ,GAAc,GAYtE,eAAe,EACb,EACA,EACA,EAI2C,CAC3C,IAAM,EAAiF,EACpF,EAA2B,MAAO,EAAM,MACxC,EAA2B,QAAS,EAAM,QAC1C,EAA2B,OAAQ,EAAM,OACzC,EAA2B,IAAK,EAAM,GACxC,CACD,GAAI,CAAC,EAAQ,YACX,OAAO,EAAmB,OAAQ,GAAY,EAAQ,KAAa,GAAK,CAE1E,IAAM,EAA0D,EAAmB,IAChF,IAAa,CACZ,KAAM,EAAa,GACnB,MAAO,EACP,QAAS,EAAQ,KAAa,GAC/B,EACF,CACD,OAAO,EAAQ,SAAS,2BAA4B,EAAQ,CAU9D,eAAsB,EAEpB,EACA,EACe,CACf,EAAoB,KAAK,QAAQ,CACjC,GAAI,CACF,IAAM,EAAQ,EAA8B,KAAM,CAChD,GAAI,EAAY,CAAE,YAAW,CAAG,EAAE,CAClC,GAAI,EAAM,SAAW,CAAE,SAAU,EAAM,SAAU,CAAG,EAAE,CACvD,CAAC,CACI,EAAU,IAAI,EAAsB,KAAK,CACzC,EAAc,EAClB,EACA,KAAK,QAAQ,MAAM,MACnB,KAAK,QAAQ,OAAO,MACrB,CACK,EAAW,MAAM,EAAgB,EAAS,EAAO,CAAE,cAAa,CAAC,CAMjE,EAAO,EACX,CACE,QACA,UARc,EAChB,KACA,EAAM,YACN,EAA8B,EAAO,CAAE,WAAU,CAAC,CAKvC,CACT,gBAAiB,EACjB,WAAYA,EACb,CACD,CAAE,WAAU,CACb,CACD,GAAI,EAAS,SAA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AAM,GAAG,KAAK,UAAU,EAAO,CAAC,IAAI,CACxD,OAEF,GAAI,EAAM,OAAQ,CAChB,KAAK,OAAO,KAAK,EAAO,OAAO,6CAA6C,CAAC,CAC7E,OAEF,GAAI,CAAC,EAAU,CACb,KAAK,OAAO,KAAK,EAAO,OAAO,sBAAsB,CAAC,CACtD,OAEF,GAAI,EAAK,QAAQ,SAAW,EAAG,CAC7B,KAAK,OAAO,KAAK,EAAO,MAAM,kDAAkD,CAAC,CACjF,OAEF,KAAK,OAAO,KAAK,EAAO,MAAM,uCAAuC,CAAC,CAClE,EAAK,UAAU,OAAS,IAC1B,KAAK,OAAO,KAAK,KAAK,EAAO,KAAK,aAAa,GAAG,CAClD,EAAK,UAAU,QAAS,GAAS,KAAK,OAAO,KAAK,EAAK,CAAC,EAE1D,KAAK,OAAO,KAAK,KAAK,EAAO,KAAK,4CAA4C,GAAG,CACjF,KAAK,OAAO,KAAK,EAAU,OACpB,EAAO,CAId,MAHI,aAAiB,GACnB,KAAK,QAAQ,KAAK,IAAI,CAElB"}
|
package/dist/impl-D23kJPAQ2.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./buildExamples-2YDkSvtA.mjs";import{r as t}from"./policyEngineCliError-DY8V-qkK.mjs";import{n,t as r}from"./constants-BMAOvdcA.mjs";import{r as i,t as a}from"./runOpa-CkKAwsvB.mjs";import{i as o,n as s,t as c}from"./printResult-esxW3HhT.mjs";import{t as l}from"./formatPolicyBundleVersionSummary-CrFtcPwS.mjs";import{n as u}from"./resolveBundleIdByName-DuxWYrDF.mjs";import{n as d}from"./inquirer-DkFTQU00.mjs";import{t as f}from"./done-input-validation-Cjk7a3jX.mjs";import{spawnSync as p}from"node:child_process";import m from"node:fs";import h from"node:os";import g from"node:path";import{gunzipSync as _}from"node:zlib";import v from"fast-glob";import y from"colors";function b(e){return e.endsWith(`.rego`)&&!e.endsWith(`_test.rego`)}function x(e){let t=g.join(e,`manifest.json`);if(!m.existsSync(t))throw Error(`Policy bundle directory must contain a manifest.json file.`);let n=m.readFileSync(t,`utf8`),r;try{r=JSON.parse(n)}catch(e){throw Error(`manifest.json is not valid JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}if(!r||typeof r!=`object`||Array.isArray(r))throw Error(`manifest.json must contain a JSON object.`);let i=r.roots;if(!Array.isArray(i)||i.length===0)throw Error(`manifest.json must declare "roots" as a non-empty array of strings (e.g. {"roots":["policy_engine"]}).`);if(!i.every(e=>typeof e==`string`&&e.length>0))throw Error(`manifest.json "roots" must be an array of non-empty strings.`);return{roots:i}}function S(e){let t=x(e),n=v.sync(`**/*.rego`,{cwd:e,onlyFiles:!0,dot:!1}).filter(b);if(n.length===0)throw Error(`Policy bundle directory must contain at least one .rego policy file.`);return{entries:[`manifest.json`,...n.sort()],manifest:t}}const C=/^\s*package\s+([A-Za-z_][\w.]*)/m;function w(e){return e.replace(/\//g,`.`)}function T(e){let t=m.readFileSync(e,`utf8`);return C.exec(t)?.[1]}function E(e,t,n){let r=n.map(w),i=[];for(let a of t){let t=T(g.join(e,a));t&&(r.some(e=>t===e||t.startsWith(`${e}.`))||i.push(` - ${a} (package ${t}) is not covered by roots [${n.join(`, `)}]`))}if(i.length>0)throw Error([`manifest.json "roots" do not cover all Rego packages in the bundle; uncovered packages will fail-closed at decide time. Either broaden "roots" or move the policy under a covered package:`,...i].join(`
|
|
2
|
-
`))}async function D(e){let t=g.join(h.tmpdir(),`transcend-policy-bundle-build-${Date.now()}-${Math.random().toString(36).slice(2)}.tar.gz`);try{let{code:n,stderr:r}=await a([`build`,`--v0-compatible`,`--ignore`,`*_test.rego`,`-o`,t,`.`],{cwd:e});if(n!==0)throw Error(r.trim()||`opa build failed with exit code ${n}`)}finally{m.existsSync(t)&&m.unlinkSync(t)}}function O(e){if(e<1024)return`${e} B`;let t=e/1024;if(t<1024)return`${t%1==0?t.toFixed(0):t.toFixed(1)} KiB`;let n=t/1024;return`${n%1==0?n.toFixed(0):n.toFixed(1)} MiB`}async function k(e){i();let t=g.resolve(e);if(!m.existsSync(t)||!m.statSync(t).isDirectory())throw Error(`Policy directory does not exist or is not a directory: ${t}`);let{entries:o,manifest:s}=S(t);E(t,o.filter(e=>e!==`manifest.json`),s.roots);let{code:c,stderr:l}=await a([`check`,`--strict`,`--v0-compatible`,t]);if(c!==0)throw Error(l.trim()||`opa check failed with exit code ${c}`);await D(t);let u=g.join(h.tmpdir(),`transcend-policy-bundle-${Date.now()}-${Math.random().toString(36).slice(2)}.tar.gz`),d=p(`tar`,[`-czf`,u,`-C`,t,...o],{env:{...process.env,COPYFILE_DISABLE:`1`},encoding:`utf8`});if(d.status!==0)throw Error(`Failed to create policy bundle archive: ${d.stderr.trim()||`tar failed`}`);let f=m.readFileSync(u);if(f.byteLength>5120)throw m.unlinkSync(u),Error(`Policy bundle exceeds the ${O(r)} compressed upload limit (bundle is ${O(f.byteLength)}). The server also rejects decompressed bundles larger than ${O(n)}.`);let v=_(f);if(v.byteLength>51200)throw m.unlinkSync(u),Error(`Policy bundle exceeds the ${O(n)} decompressed upload limit (bundle is ${O(v.byteLength)} decompressed).`);return u}function A(e){let t=m.readFileSync(e.bundlePath),n=new FormData;return n.append(`bundle`,new Blob([t],{type:`application/gzip`}),g.basename(e.bundlePath)),n.append(`version`,e.version),e.description&&n.append(`description`,e.description),e.bundleName&&n.append(`bundleName`,e.bundleName),n}function j(e){return e.toISOString().slice(0,19).replace(/[T:]/g,`-`)}function M(e,t=new Date){return`${e}-${j(t)}`}async function N({dir:n,"bundle-name":r,auth:i,"transcend-url":a,version:p,description:m,json:h,yes:_,debug:v=!1}){f(this.process),t(v);let b=g.resolve(n),x=p??M(r),S=o(a,i),C;try{this.logger.info(y.green(`Building policy bundle from ${b}...`)),C=await k(b);let t=await u(S,r),n;if(t){this.logger.info(y.green(`Uploading new version for bundle "${r}"...`));let e=A({bundlePath:C,version:x,description:m});n=await s(S.post(`v1/policy-engine/policy-bundles/${t}/versions`,{body:e}).json())}else{if(!this.process.stdin.isTTY&&!_){this.logger.error(y.red(`Cannot create a new bundle in a non-interactive environment; pass --yes to confirm.`)),this.process.exit(1);return}if(!_&&(this.logger.warn(y.yellow(`No policy bundle named "${r}" exists for this organization.`)),!await d({message:`No policy bundle named "${r}" exists. Create a new bundle and upload its first version?`}))){this.logger.info(y.yellow(`Publish cancelled.`));return}this.logger.info(y.green(`Creating bundle "${r}" and uploading first version...`));let e=A({bundlePath:C,version:x,description:m,bundleName:r});n=await s(S.post(`v1/policy-engine/policy-bundles`,{body:e}).json())}c(this.process.stdout,{json:h,data:n,renderTable:()=>l(n.version)}),this.logger.info(y.green(`Policy bundle version uploaded successfully.`));let i=e([`policy`,`activate`],{version:n.version.version,"bundle-name":r});this.logger.info(y.yellow(`Publishing a policy does not activate it. To activate this version, run:\n ${i}`))}finally{C&&this.fs.existsSync(C)&&this.fs.unlinkSync(C)}}export{N as publish};
|
|
3
|
-
//# sourceMappingURL=impl-D23kJPAQ2.mjs.map
|