squidcloudctl 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-revoke-IRZJIB2A.js +2 -0
- package/dist/{auth-revoke-I5FM6N2S.js.map → auth-revoke-IRZJIB2A.js.map} +1 -1
- package/dist/auth-sessions-JZF7HUBL.js +2 -0
- package/dist/{auth-sessions-ALQEGBDS.js.map → auth-sessions-JZF7HUBL.js.map} +1 -1
- package/dist/auth-status-WHT7RXX6.js +2 -0
- package/dist/{auth-status-4VVTCDII.js.map → auth-status-WHT7RXX6.js.map} +1 -1
- package/dist/bin/squidcloud.js +1 -1
- package/dist/bin/squidcloud.js.map +1 -1
- package/dist/chunk-MU5KHPCI.js +2 -0
- package/dist/chunk-MU5KHPCI.js.map +1 -0
- package/dist/chunk-PSJQAIDB.js +2 -0
- package/dist/chunk-PSJQAIDB.js.map +1 -0
- package/dist/chunk-SVR7W7MP.js +3 -0
- package/dist/chunk-SVR7W7MP.js.map +1 -0
- package/dist/chunk-W6CRHANC.js +2 -0
- package/dist/chunk-W6CRHANC.js.map +1 -0
- package/dist/client-HD3YWJJJ.js +2 -0
- package/dist/{client-RFYERFWZ.js.map → client-HD3YWJJJ.js.map} +1 -1
- package/dist/{collab-activity-5RK36CJW.js → collab-activity-UNX2PJZE.js} +2 -2
- package/dist/{collab-activity-5RK36CJW.js.map → collab-activity-UNX2PJZE.js.map} +1 -1
- package/dist/collab-invite-Y54NCHSB.js +2 -0
- package/dist/{collab-invite-HAMMPEAQ.js.map → collab-invite-Y54NCHSB.js.map} +1 -1
- package/dist/collab-leave-CR4VOXZV.js +2 -0
- package/dist/{collab-leave-MTCXHQ4T.js.map → collab-leave-CR4VOXZV.js.map} +1 -1
- package/dist/collab-list-BHO5IEAR.js +2 -0
- package/dist/{collab-list-JV4ZCWLB.js.map → collab-list-BHO5IEAR.js.map} +1 -1
- package/dist/collab-remove-XI3NX2M7.js +2 -0
- package/dist/{collab-remove-DO4BIA5R.js.map → collab-remove-XI3NX2M7.js.map} +1 -1
- package/dist/collab-transfer-U4XXODAN.js +2 -0
- package/dist/{collab-transfer-6CG5PHVC.js.map → collab-transfer-U4XXODAN.js.map} +1 -1
- package/dist/deploy-5AQMGJ2Q.js +3 -0
- package/dist/{deploy-X5HX7V4J.js.map → deploy-5AQMGJ2Q.js.map} +1 -1
- package/dist/doctor-5TK2COIN.js +2 -0
- package/dist/{doctor-RSKBJYUX.js.map → doctor-5TK2COIN.js.map} +1 -1
- package/dist/forms-clear-4BQMLGGN.js +2 -0
- package/dist/{forms-clear-UJ23UHUN.js.map → forms-clear-4BQMLGGN.js.map} +1 -1
- package/dist/forms-create-ORURKN5O.js +2 -0
- package/dist/{forms-create-CWC7MGOJ.js.map → forms-create-ORURKN5O.js.map} +1 -1
- package/dist/forms-delete-NT4SAO6G.js +2 -0
- package/dist/{forms-delete-TKHTM6L5.js.map → forms-delete-NT4SAO6G.js.map} +1 -1
- package/dist/forms-embed-5L4DHGXC.js +3 -0
- package/dist/{forms-embed-FF3VMR4M.js.map → forms-embed-5L4DHGXC.js.map} +1 -1
- package/dist/forms-export-5SDRUFV3.js +2 -0
- package/dist/{forms-export-5ZNEL3V2.js.map → forms-export-5SDRUFV3.js.map} +1 -1
- package/dist/forms-info-JOYOMPC3.js +2 -0
- package/dist/{forms-info-SUST47TN.js.map → forms-info-JOYOMPC3.js.map} +1 -1
- package/dist/forms-list-CS7J3ULK.js +2 -0
- package/dist/{forms-list-W2UUPFFD.js.map → forms-list-CS7J3ULK.js.map} +1 -1
- package/dist/forms-submissions-KWGRYLAY.js +2 -0
- package/dist/{forms-submissions-UTLSYPWS.js.map → forms-submissions-KWGRYLAY.js.map} +1 -1
- package/dist/login-DRNKN2XZ.js +3 -0
- package/dist/login-DRNKN2XZ.js.map +1 -0
- package/dist/logout-UF55Z67V.js +2 -0
- package/dist/{logout-QERO6G6B.js.map → logout-UF55Z67V.js.map} +1 -1
- package/dist/logs-export-O74GEMCD.js +2 -0
- package/dist/{logs-export-DYOPV2LT.js.map → logs-export-O74GEMCD.js.map} +1 -1
- package/dist/logs-search-JAGCLPVE.js +2 -0
- package/dist/{logs-search-323KRPG4.js.map → logs-search-JAGCLPVE.js.map} +1 -1
- package/dist/{logs-tail-J64TCZG5.js → logs-tail-NFHOK3RM.js} +3 -3
- package/dist/{logs-tail-J64TCZG5.js.map → logs-tail-NFHOK3RM.js.map} +1 -1
- package/dist/monitor-ZLSLSVEZ.js +2 -0
- package/dist/{monitor-DKLGO5H7.js.map → monitor-ZLSLSVEZ.js.map} +1 -1
- package/dist/monitor-automations-VK6CZSNG.js +2 -0
- package/dist/{monitor-automations-4XOOCRFY.js.map → monitor-automations-VK6CZSNG.js.map} +1 -1
- package/dist/monitor-pipelines-WQOY5O4K.js +2 -0
- package/dist/{monitor-pipelines-EPL24J3S.js.map → monitor-pipelines-WQOY5O4K.js.map} +1 -1
- package/dist/monitor-sites-XRIEHVIV.js +2 -0
- package/dist/{monitor-sites-QIVG5TPF.js.map → monitor-sites-XRIEHVIV.js.map} +1 -1
- package/dist/monitor-storage-2ULH4E4F.js +2 -0
- package/dist/{monitor-storage-HBCC34K7.js.map → monitor-storage-2ULH4E4F.js.map} +1 -1
- package/dist/scripts-cancel-XYWJD3QW.js +2 -0
- package/dist/{scripts-cancel-JS3LL2AT.js.map → scripts-cancel-XYWJD3QW.js.map} +1 -1
- package/dist/scripts-delete-2EUZDGOW.js +2 -0
- package/dist/{scripts-delete-274TW63X.js.map → scripts-delete-2EUZDGOW.js.map} +1 -1
- package/dist/scripts-disable-7UQUGTO4.js +2 -0
- package/dist/{scripts-disable-JPATOVO4.js.map → scripts-disable-7UQUGTO4.js.map} +1 -1
- package/dist/scripts-enable-N7RK2ZRG.js +2 -0
- package/dist/{scripts-enable-JVAA6AMP.js.map → scripts-enable-N7RK2ZRG.js.map} +1 -1
- package/dist/scripts-list-F2RJ7TJ6.js +2 -0
- package/dist/{scripts-list-YPFNLI3P.js.map → scripts-list-F2RJ7TJ6.js.map} +1 -1
- package/dist/scripts-logs-PIIKLZXW.js +2 -0
- package/dist/{scripts-logs-VISO5ONQ.js.map → scripts-logs-PIIKLZXW.js.map} +1 -1
- package/dist/scripts-run-4EUWVBS6.js +2 -0
- package/dist/{scripts-run-3NBYKEMQ.js.map → scripts-run-4EUWVBS6.js.map} +1 -1
- package/dist/scripts-status-BVCSUDUA.js +2 -0
- package/dist/{scripts-status-45K3IL5L.js.map → scripts-status-BVCSUDUA.js.map} +1 -1
- package/dist/scripts-validate-TU47YDOT.js +2 -0
- package/dist/{scripts-validate-JZPIIMIX.js.map → scripts-validate-TU47YDOT.js.map} +1 -1
- package/dist/scripts-watch-TQURXMIL.js +2 -0
- package/dist/{scripts-watch-XZ7MZIMK.js.map → scripts-watch-TQURXMIL.js.map} +1 -1
- package/dist/session-R7SGJZAG.js +2 -0
- package/dist/{session-AZGWAAQQ.js.map → session-R7SGJZAG.js.map} +1 -1
- package/dist/sign-cancel-SOBRK2XX.js +2 -0
- package/dist/{sign-cancel-OUJM5UZT.js.map → sign-cancel-SOBRK2XX.js.map} +1 -1
- package/dist/sign-download-GLJS64WT.js +2 -0
- package/dist/{sign-download-FS5G6J27.js.map → sign-download-GLJS64WT.js.map} +1 -1
- package/dist/sign-list-ZMM7F4K2.js +2 -0
- package/dist/{sign-list-FV7SQSWT.js.map → sign-list-ZMM7F4K2.js.map} +1 -1
- package/dist/sign-request-PO24EDJG.js +2 -0
- package/dist/{sign-request-VVFYWT3Y.js.map → sign-request-PO24EDJG.js.map} +1 -1
- package/dist/sign-status-KD7I3PZH.js +2 -0
- package/dist/{sign-status-LKG5UFBX.js.map → sign-status-KD7I3PZH.js.map} +1 -1
- package/dist/sign-verify-LRZPLJYX.js +2 -0
- package/dist/{sign-verify-CVTTJSDL.js.map → sign-verify-LRZPLJYX.js.map} +1 -1
- package/dist/sites-analytics-RU63VLE4.js +2 -0
- package/dist/{sites-analytics-JK4UFMWX.js.map → sites-analytics-RU63VLE4.js.map} +1 -1
- package/dist/sites-delete-MGAIPA4A.js +2 -0
- package/dist/{sites-delete-SUHEQDZQ.js.map → sites-delete-MGAIPA4A.js.map} +1 -1
- package/dist/sites-deploys-UNRERGLN.js +2 -0
- package/dist/{sites-deploys-C4TVID2W.js.map → sites-deploys-UNRERGLN.js.map} +1 -1
- package/dist/sites-info-NVMVESXX.js +2 -0
- package/dist/{sites-info-BZUK57TH.js.map → sites-info-NVMVESXX.js.map} +1 -1
- package/dist/sites-list-KQZVB3Y2.js +2 -0
- package/dist/{sites-list-LLULSE5J.js.map → sites-list-KQZVB3Y2.js.map} +1 -1
- package/dist/sites-logs-MINP5YLW.js +3 -0
- package/dist/{sites-logs-NILNXF4L.js.map → sites-logs-MINP5YLW.js.map} +1 -1
- package/dist/sites-open-OZ5RORV4.js +3 -0
- package/dist/{sites-open-R7A5EQWM.js.map → sites-open-OZ5RORV4.js.map} +1 -1
- package/dist/sites-purge-K6CUCSQA.js +2 -0
- package/dist/{sites-purge-VHERQRUB.js.map → sites-purge-K6CUCSQA.js.map} +1 -1
- package/dist/sites-rename-HXM4MMDS.js +2 -0
- package/dist/{sites-rename-MOO6HVW3.js.map → sites-rename-HXM4MMDS.js.map} +1 -1
- package/dist/sites-rollback-FVELQVJK.js +2 -0
- package/dist/{sites-rollback-SPW2Z73L.js.map → sites-rollback-FVELQVJK.js.map} +1 -1
- package/dist/sites-unpublish-FQSQA763.js +2 -0
- package/dist/{sites-unpublish-6P7SQGIU.js.map → sites-unpublish-FQSQA763.js.map} +1 -1
- package/dist/sites-visibility-QDDJWBOT.js +2 -0
- package/dist/{sites-visibility-R3AQJ76F.js.map → sites-visibility-QDDJWBOT.js.map} +1 -1
- package/dist/storage-cat-TASP3DK7.js +2 -0
- package/dist/{storage-cat-HXFOJJG5.js.map → storage-cat-TASP3DK7.js.map} +1 -1
- package/dist/storage-clean-WCV7ENP2.js +2 -0
- package/dist/{storage-clean-LEQEYWL6.js.map → storage-clean-WCV7ENP2.js.map} +1 -1
- package/dist/storage-cp-PV6LPCYV.js +2 -0
- package/dist/{storage-cp-JTPTXZRQ.js.map → storage-cp-PV6LPCYV.js.map} +1 -1
- package/dist/storage-diff-BDKHYLIC.js +2 -0
- package/dist/{storage-diff-XURHVTPC.js.map → storage-diff-BDKHYLIC.js.map} +1 -1
- package/dist/storage-download-UEQYEO73.js +3 -0
- package/dist/{storage-download-5OYCNXKL.js.map → storage-download-UEQYEO73.js.map} +1 -1
- package/dist/storage-info-4IVQWOSM.js +2 -0
- package/dist/{storage-info-WA74POPR.js.map → storage-info-4IVQWOSM.js.map} +1 -1
- package/dist/storage-ls-AMBO3S2J.js +2 -0
- package/dist/{storage-ls-7RZQ3AXR.js.map → storage-ls-AMBO3S2J.js.map} +1 -1
- package/dist/storage-mkdir-5IXAS4YP.js +2 -0
- package/dist/{storage-mkdir-NWOHGAQI.js.map → storage-mkdir-5IXAS4YP.js.map} +1 -1
- package/dist/storage-mv-4DCYMNNI.js +2 -0
- package/dist/{storage-mv-XQ7EPX3M.js.map → storage-mv-4DCYMNNI.js.map} +1 -1
- package/dist/storage-rm-5K7F7ZP7.js +2 -0
- package/dist/{storage-rm-LYO6UR3G.js.map → storage-rm-5K7F7ZP7.js.map} +1 -1
- package/dist/storage-search-FCNFG2BS.js +2 -0
- package/dist/{storage-search-RIT5ISCA.js.map → storage-search-FCNFG2BS.js.map} +1 -1
- package/dist/storage-share-4PVM4QIC.js +2 -0
- package/dist/{storage-share-OURRQWZK.js.map → storage-share-4PVM4QIC.js.map} +1 -1
- package/dist/storage-tag-SXSOQVY6.js +2 -0
- package/dist/{storage-tag-NGJGUJSZ.js.map → storage-tag-SXSOQVY6.js.map} +1 -1
- package/dist/storage-unshare-EMXDT7DS.js +2 -0
- package/dist/{storage-unshare-3DXEKHEH.js.map → storage-unshare-EMXDT7DS.js.map} +1 -1
- package/dist/storage-upload-EHOTOYS5.js +2 -0
- package/dist/{storage-upload-5M6PBHOC.js.map → storage-upload-EHOTOYS5.js.map} +1 -1
- package/dist/time-list-2XMDLMRC.js +2 -0
- package/dist/{time-list-GMZYZAOU.js.map → time-list-2XMDLMRC.js.map} +1 -1
- package/dist/time-lock-WQKPTILH.js +2 -0
- package/dist/{time-lock-2OLEVQPJ.js.map → time-lock-WQKPTILH.js.map} +1 -1
- package/dist/time-proof-4YZLG6NG.js +2 -0
- package/dist/{time-proof-RUTDAEKP.js.map → time-proof-4YZLG6NG.js.map} +1 -1
- package/dist/time-status-YRQVIKNH.js +2 -0
- package/dist/{time-status-TVNJBFKC.js.map → time-status-YRQVIKNH.js.map} +1 -1
- package/dist/time-unlock-OUIAP7RY.js +2 -0
- package/dist/{time-unlock-OO6QH5R6.js.map → time-unlock-OUIAP7RY.js.map} +1 -1
- package/dist/{update-XJQSXSFU.js → update-DOHW47PB.js} +2 -2
- package/dist/{update-XJQSXSFU.js.map → update-DOHW47PB.js.map} +1 -1
- package/dist/whoami-ZFYNNZSF.js +2 -0
- package/dist/{whoami-SAURQARO.js.map → whoami-ZFYNNZSF.js.map} +1 -1
- package/package.json +1 -1
- package/dist/auth-revoke-I5FM6N2S.js +0 -2
- package/dist/auth-sessions-ALQEGBDS.js +0 -2
- package/dist/auth-status-4VVTCDII.js +0 -2
- package/dist/chunk-4NTVRCZM.js +0 -2
- package/dist/chunk-4NTVRCZM.js.map +0 -1
- package/dist/chunk-BC2OVPRV.js +0 -2
- package/dist/chunk-BC2OVPRV.js.map +0 -1
- package/dist/chunk-FYFPDKJM.js +0 -3
- package/dist/chunk-FYFPDKJM.js.map +0 -1
- package/dist/client-RFYERFWZ.js +0 -2
- package/dist/collab-invite-HAMMPEAQ.js +0 -2
- package/dist/collab-leave-MTCXHQ4T.js +0 -2
- package/dist/collab-list-JV4ZCWLB.js +0 -2
- package/dist/collab-remove-DO4BIA5R.js +0 -2
- package/dist/collab-transfer-6CG5PHVC.js +0 -2
- package/dist/deploy-X5HX7V4J.js +0 -3
- package/dist/doctor-RSKBJYUX.js +0 -2
- package/dist/forms-clear-UJ23UHUN.js +0 -2
- package/dist/forms-create-CWC7MGOJ.js +0 -2
- package/dist/forms-delete-TKHTM6L5.js +0 -2
- package/dist/forms-embed-FF3VMR4M.js +0 -3
- package/dist/forms-export-5ZNEL3V2.js +0 -2
- package/dist/forms-info-SUST47TN.js +0 -2
- package/dist/forms-list-W2UUPFFD.js +0 -2
- package/dist/forms-submissions-UTLSYPWS.js +0 -2
- package/dist/login-SO6BZ4HE.js +0 -2
- package/dist/login-SO6BZ4HE.js.map +0 -1
- package/dist/logout-QERO6G6B.js +0 -2
- package/dist/logs-export-DYOPV2LT.js +0 -2
- package/dist/logs-search-323KRPG4.js +0 -2
- package/dist/monitor-DKLGO5H7.js +0 -2
- package/dist/monitor-automations-4XOOCRFY.js +0 -2
- package/dist/monitor-pipelines-EPL24J3S.js +0 -2
- package/dist/monitor-sites-QIVG5TPF.js +0 -2
- package/dist/monitor-storage-HBCC34K7.js +0 -2
- package/dist/scripts-cancel-JS3LL2AT.js +0 -2
- package/dist/scripts-delete-274TW63X.js +0 -2
- package/dist/scripts-disable-JPATOVO4.js +0 -2
- package/dist/scripts-enable-JVAA6AMP.js +0 -2
- package/dist/scripts-list-YPFNLI3P.js +0 -2
- package/dist/scripts-logs-VISO5ONQ.js +0 -2
- package/dist/scripts-run-3NBYKEMQ.js +0 -2
- package/dist/scripts-status-45K3IL5L.js +0 -2
- package/dist/scripts-validate-JZPIIMIX.js +0 -2
- package/dist/scripts-watch-XZ7MZIMK.js +0 -2
- package/dist/session-AZGWAAQQ.js +0 -2
- package/dist/sign-cancel-OUJM5UZT.js +0 -2
- package/dist/sign-download-FS5G6J27.js +0 -2
- package/dist/sign-list-FV7SQSWT.js +0 -2
- package/dist/sign-request-VVFYWT3Y.js +0 -2
- package/dist/sign-status-LKG5UFBX.js +0 -2
- package/dist/sign-verify-CVTTJSDL.js +0 -2
- package/dist/sites-analytics-JK4UFMWX.js +0 -2
- package/dist/sites-delete-SUHEQDZQ.js +0 -2
- package/dist/sites-deploys-C4TVID2W.js +0 -2
- package/dist/sites-info-BZUK57TH.js +0 -2
- package/dist/sites-list-LLULSE5J.js +0 -2
- package/dist/sites-logs-NILNXF4L.js +0 -3
- package/dist/sites-open-R7A5EQWM.js +0 -3
- package/dist/sites-purge-VHERQRUB.js +0 -2
- package/dist/sites-rename-MOO6HVW3.js +0 -2
- package/dist/sites-rollback-SPW2Z73L.js +0 -2
- package/dist/sites-unpublish-6P7SQGIU.js +0 -2
- package/dist/sites-visibility-R3AQJ76F.js +0 -2
- package/dist/storage-cat-HXFOJJG5.js +0 -2
- package/dist/storage-clean-LEQEYWL6.js +0 -2
- package/dist/storage-cp-JTPTXZRQ.js +0 -2
- package/dist/storage-diff-XURHVTPC.js +0 -2
- package/dist/storage-download-5OYCNXKL.js +0 -3
- package/dist/storage-info-WA74POPR.js +0 -2
- package/dist/storage-ls-7RZQ3AXR.js +0 -2
- package/dist/storage-mkdir-NWOHGAQI.js +0 -2
- package/dist/storage-mv-XQ7EPX3M.js +0 -2
- package/dist/storage-rm-LYO6UR3G.js +0 -2
- package/dist/storage-search-RIT5ISCA.js +0 -2
- package/dist/storage-share-OURRQWZK.js +0 -2
- package/dist/storage-tag-NGJGUJSZ.js +0 -2
- package/dist/storage-unshare-3DXEKHEH.js +0 -2
- package/dist/storage-upload-5M6PBHOC.js +0 -2
- package/dist/time-list-GMZYZAOU.js +0 -2
- package/dist/time-lock-2OLEVQPJ.js +0 -2
- package/dist/time-proof-RUTDAEKP.js +0 -2
- package/dist/time-status-TVNJBFKC.js +0 -2
- package/dist/time-unlock-OO6QH5R6.js +0 -2
- package/dist/whoami-SAURQARO.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-PSJQAIDB.js';import {d}from'./chunk-MU5KHPCI.js';import'./chunk-NDB6KXYI.js';import'./chunk-SVR7W7MP.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import {f}from'./chunk-W6CRHANC.js';import a from'inquirer';async function c(e){if(e.all){let{confirm:s}=await a.prompt([{type:"confirm",name:"confirm",message:"Revoke ALL active sessions? This will log out every device.",default:false}]);if(!s)return;let t=a$1("Revoking all sessions...");t.start(),await d("/api/auth/ssp/revoke-all",{},{authenticated:true}),await f(),t.succeed(),g("All sessions revoked");return}if(e.session){let s=a$1(`Revoking session ${e.session}...`);s.start(),await d("/api/auth/ssp/revoke",{session_id:e.session},{authenticated:true}),s.succeed(),g(`Session ${e.session} revoked`);return}console.error("Specify --session <id> or --all"),process.exit(1);}export{c as default};//# sourceMappingURL=auth-revoke-IRZJIB2A.js.map
|
|
2
|
+
//# sourceMappingURL=auth-revoke-IRZJIB2A.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/auth/auth-revoke.ts"],"names":["authRevoke","options","confirm","inquirer","spinner","createSpinner","apiPost","clearSession","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/auth/auth-revoke.ts"],"names":["authRevoke","options","confirm","inquirer","spinner","createSpinner","apiPost","clearSession","logSuccess"],"mappings":"mQAOA,eAAOA,CAAAA,CAAkCC,CAAAA,CAA6D,CACpG,GAAIA,CAAAA,CAAQ,GAAA,CAAK,CACf,GAAM,CAAE,QAAAC,CAAQ,CAAA,CAAI,MAAMC,CAAAA,CAAS,MAAA,CAAO,CAAC,CACzC,IAAA,CAAM,SAAA,CACN,IAAA,CAAM,SAAA,CACN,OAAA,CAAS,6DAAA,CACT,QAAS,KACX,CAAC,CAAC,CAAA,CACF,GAAI,CAACD,EAAS,OACd,IAAME,CAAAA,CAAUC,GAAAA,CAAc,0BAA0B,CAAA,CACxDD,EAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAQ,0BAAA,CAA4B,EAAC,CAAG,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CACrE,MAAMC,CAAAA,GACNH,CAAAA,CAAQ,OAAA,EAAQ,CAChBI,CAAAA,CAAW,sBAAsB,CAAA,CACjC,MACF,CAEA,GAAIP,CAAAA,CAAQ,OAAA,CAAS,CACnB,IAAMG,EAAUC,GAAAA,CAAc,CAAA,iBAAA,EAAoBJ,CAAAA,CAAQ,OAAO,CAAA,GAAA,CAAK,CAAA,CACtEG,EAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAQ,sBAAA,CAAwB,CAAE,WAAYL,CAAAA,CAAQ,OAAQ,CAAA,CAAG,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAC9FG,CAAAA,CAAQ,OAAA,EAAQ,CAChBI,CAAAA,CAAW,CAAA,QAAA,EAAWP,EAAQ,OAAO,CAAA,QAAA,CAAU,CAAA,CAC/C,MACF,CAEA,OAAA,CAAQ,KAAA,CAAM,iCAAiC,CAAA,CAC/C,OAAA,CAAQ,IAAA,CAAK,CAAC,EAChB","file":"auth-revoke-IRZJIB2A.js","sourcesContent":["import { Command } from 'commander'\nimport { apiPost } from '../../lib/api/client.js'\nimport { clearSession } from '../../lib/auth/session.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\nimport inquirer from 'inquirer'\n\nexport default async function authRevoke(options: { session?: string; all?: boolean }): Promise<void> {\n if (options.all) {\n const { confirm } = await inquirer.prompt([{\n type: 'confirm',\n name: 'confirm',\n message: 'Revoke ALL active sessions? This will log out every device.',\n default: false,\n }])\n if (!confirm) return\n const spinner = createSpinner('Revoking all sessions...')\n spinner.start()\n await apiPost('/api/auth/ssp/revoke-all', {}, { authenticated: true })\n await clearSession()\n spinner.succeed()\n logSuccess('All sessions revoked')\n return\n }\n\n if (options.session) {\n const spinner = createSpinner(`Revoking session ${options.session}...`)\n spinner.start()\n await apiPost('/api/auth/ssp/revoke', { session_id: options.session }, { authenticated: true })\n spinner.succeed()\n logSuccess(`Session ${options.session} revoked`)\n return\n }\n\n console.error('Specify --session <id> or --all')\n process.exit(1)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {c}from'./chunk-MU5KHPCI.js';import'./chunk-NDB6KXYI.js';import'./chunk-SVR7W7MP.js';import {a}from'./chunk-THMWE2I6.js';import {b,c as c$1}from'./chunk-G4JU7IUC.js';import'./chunk-QT7R3AXE.js';import'./chunk-W6CRHANC.js';async function s(){let i=((await c("/api/auth/ssp/sessions",{authenticated:true})).sessions||[]).map(e=>({id:e.id.slice(0,8)+"...",device:e.device_fingerprint.slice(0,12),platform:e.platform||"unknown",last_seen:c$1(e.last_seen),created:b(e.created_at),current:e.current?"\u25CF":""}));console.log(a(i,[{key:"id",label:"Session ID"},{key:"device",label:"Fingerprint"},{key:"platform",label:"Platform"},{key:"last_seen",label:"Last Seen"},{key:"created",label:"Created"},{key:"current",label:""}]));}export{s as default};//# sourceMappingURL=auth-sessions-JZF7HUBL.js.map
|
|
2
|
+
//# sourceMappingURL=auth-sessions-JZF7HUBL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/auth/auth-sessions.ts"],"names":["authSessions","rows","apiGet","s","formatRelative","formatDate","renderTable"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/auth/auth-sessions.ts"],"names":["authSessions","rows","apiGet","s","formatRelative","formatDate","renderTable"],"mappings":"qOAaA,eAAOA,CAAAA,EAAqD,CAE1D,IAAMC,CAAAA,CAAAA,CAAAA,CADO,MAAMC,CAAAA,CAAoC,wBAAA,CAA0B,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,EACrF,QAAA,EAAY,EAAC,EAAG,GAAA,CAAIC,IAAM,CAC3C,EAAA,CAAIA,CAAAA,CAAE,EAAA,CAAG,KAAA,CAAM,CAAA,CAAG,CAAC,CAAA,CAAI,KAAA,CACvB,OAAQA,CAAAA,CAAE,kBAAA,CAAmB,MAAM,CAAA,CAAG,EAAE,EACxC,QAAA,CAAUA,CAAAA,CAAE,UAAY,SAAA,CACxB,SAAA,CAAWC,IAAeD,CAAAA,CAAE,SAAS,EACrC,OAAA,CAASE,CAAAA,CAAWF,CAAAA,CAAE,UAAU,CAAA,CAChC,OAAA,CAASA,EAAE,OAAA,CAAU,QAAA,CAAM,EAC7B,CAAA,CAAE,CAAA,CACF,QAAQ,GAAA,CAAIG,CAAAA,CAAYL,EAAM,CAC5B,CAAE,IAAK,IAAA,CAAM,KAAA,CAAO,YAAa,CAAA,CACjC,CAAE,IAAK,QAAA,CAAU,KAAA,CAAO,aAAc,CAAA,CACtC,CAAE,GAAA,CAAK,WAAY,KAAA,CAAO,UAAW,EACrC,CAAE,GAAA,CAAK,YAAa,KAAA,CAAO,WAAY,CAAA,CACvC,CAAE,GAAA,CAAK,SAAA,CAAW,MAAO,SAAU,CAAA,CACnC,CAAE,GAAA,CAAK,SAAA,CAAW,MAAO,EAAG,CAC9B,CAAC,CAAC,EACJ","file":"auth-sessions-JZF7HUBL.js","sourcesContent":["import { apiGet } from '../../lib/api/client.js'\nimport { renderTable } from '../../lib/output/table.js'\nimport { formatDate, formatRelative } from '../../lib/utils/format.js'\n\ninterface SessionInfo {\n id: string\n device_fingerprint: string\n platform: string\n last_seen: string\n created_at: string\n current: boolean\n}\n\nexport default async function authSessions(): Promise<void> {\n const data = await apiGet<{ sessions: SessionInfo[] }>('/api/auth/ssp/sessions', { authenticated: true })\n const rows = (data.sessions || []).map(s => ({\n id: s.id.slice(0, 8) + '...',\n device: s.device_fingerprint.slice(0, 12),\n platform: s.platform || 'unknown',\n last_seen: formatRelative(s.last_seen),\n created: formatDate(s.created_at),\n current: s.current ? '●' : '',\n }))\n console.log(renderTable(rows, [\n { key: 'id', label: 'Session ID' },\n { key: 'device', label: 'Fingerprint' },\n { key: 'platform', label: 'Platform' },\n { key: 'last_seen', label: 'Last Seen' },\n { key: 'created', label: 'Created' },\n { key: 'current', label: '' },\n ]))\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {d as d$1}from'./chunk-G4JU7IUC.js';import {h,f,m,l}from'./chunk-QT7R3AXE.js';import {d,c,i}from'./chunk-W6CRHANC.js';import e from'chalk';async function u(){let i$1=await d();i$1||(h("Not authenticated"),process.exit(1));let f$1=c(),t=i$1.device_fingerprint===f$1,o=i(i$1),s=o<=120*1e3;if(f()){m({authenticated:true,session_id:i$1.session_id,expires_in_ms:o,fingerprint_match:t,needs_refresh:s,user:i$1.user});return}l(""),l(`${e.bold("Session Health")}`),l(`${e.dim("\u2500\u2500\u2500".repeat(15))}`),l(` ${e.bold("Session ID:")} ${e.dim(i$1.session_id)}`),l(` ${e.bold("User:")} ${i$1.user.email} (${i$1.user.username})`),l(` ${e.bold("Plan:")} ${e.hex("#7C4DFF")(i$1.user.plan)}`),l(` ${e.bold("Expires:")} ${o>0?d$1(o):e.red("expired")}`),l(` ${e.bold("Fingerprint:")} ${t?e.green("\u2713 match"):e.red("\u2717 mismatch")}`),l(` ${e.bold("Refresh:")} ${s?e.yellow("needed soon"):e.green("ok")}`),l("");}export{u as default};//# sourceMappingURL=auth-status-WHT7RXX6.js.map
|
|
2
|
+
//# sourceMappingURL=auth-status-WHT7RXX6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/auth/auth-status.ts"],"names":["authStatus","session","loadSession","logError","currentFingerprint","computeDeviceFingerprint","fingerprintMatch","timeLeft","getTimeUntilExpiry","needsRefresh","isJsonMode","logJSON","logRaw","chalk","formatCountdown"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/auth/auth-status.ts"],"names":["authStatus","session","loadSession","logError","currentFingerprint","computeDeviceFingerprint","fingerprintMatch","timeLeft","getTimeUntilExpiry","needsRefresh","isJsonMode","logJSON","logRaw","chalk","formatCountdown"],"mappings":"kJAOA,eAAOA,GAAmD,CACxD,IAAMC,IAAU,MAAMC,CAAAA,GACjBD,GAAAA,GACHE,CAAAA,CAAS,mBAAmB,CAAA,CAC5B,OAAA,CAAQ,KAAK,CAAC,CAAA,CAAA,CAGhB,IAAMC,GAAAA,CAAqBC,CAAAA,EAAyB,CAC9CC,CAAAA,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AO,KAAKC,CAAAA,CAAM,IAAA,CAAK,cAAc,CAAC,CAAA,GAAA,EAAMP,EAAmBO,CAAAA,CAAM,KAAA,CAAM,cAAS,CAAA,CAAIA,CAAAA,CAAM,IAAI,iBAAY,CAAC,EAAE,CAAA,CACjHD,CAAAA,CAAO,KAAKC,CAAAA,CAAM,IAAA,CAAK,UAAU,CAAC,CAAA,OAAA,EAAUJ,EAAeI,CAAAA,CAAM,MAAA,CAAO,aAAa,CAAA,CAAIA,CAAAA,CAAM,MAAM,IAAI,CAAC,EAAE,CAAA,CAC5GD,CAAAA,CAAO,EAAE,EACX","file":"auth-status-WHT7RXX6.js","sourcesContent":["import { loadSession, getTimeUntilExpiry } from '../../lib/auth/session.js'\nimport { computeDeviceFingerprint } from '../../lib/auth/fingerprint.js'\nimport { logError, logJSON, logRaw } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\nimport chalk from 'chalk'\nimport { formatCountdown } from '../../lib/utils/format.js'\n\nexport default async function authStatus(): Promise<void> {\n const session = await loadSession()\n if (!session) {\n logError('Not authenticated')\n process.exit(1)\n }\n\n const currentFingerprint = computeDeviceFingerprint()\n const fingerprintMatch = session.device_fingerprint === currentFingerprint\n const timeLeft = getTimeUntilExpiry(session)\n const needsRefresh = timeLeft <= 2 * 60 * 1000\n\n if (isJsonMode()) {\n logJSON({\n authenticated: true,\n session_id: session.session_id,\n expires_in_ms: timeLeft,\n fingerprint_match: fingerprintMatch,\n needs_refresh: needsRefresh,\n user: session.user,\n })\n return\n }\n\n logRaw('')\n logRaw(`${chalk.bold('Session Health')}`)\n logRaw(`${chalk.dim('───'.repeat(15))}`)\n logRaw(` ${chalk.bold('Session ID:')} ${chalk.dim(session.session_id)}`)\n logRaw(` ${chalk.bold('User:')} ${session.user.email} (${session.user.username})`)\n logRaw(` ${chalk.bold('Plan:')} ${chalk.hex('#7C4DFF')(session.user.plan)}`)\n logRaw(` ${chalk.bold('Expires:')} ${timeLeft > 0 ? formatCountdown(timeLeft) : chalk.red('expired')}`)\n logRaw(` ${chalk.bold('Fingerprint:')} ${fingerprintMatch ? chalk.green('✓ match') : chalk.red('✗ mismatch')}`)\n logRaw(` ${chalk.bold('Refresh:')} ${needsRefresh ? chalk.yellow('needed soon') : chalk.green('ok')}`)\n logRaw('')\n}\n"]}
|
package/dist/bin/squidcloud.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import'../chunk-FYFPDKJM.js';import {a}from'../chunk-BC2OVPRV.js';import'../chunk-NDB6KXYI.js';import'../chunk-THMWE2I6.js';import {e,d,h,n}from'../chunk-QT7R3AXE.js';import {m,q}from'../chunk-4NTVRCZM.js';import {Command}from'commander';var A=[{name:"login",aliases:[],description:"Authenticate with SquidCloud",requiresAuth:false,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"auth",handler:()=>import('../login-SO6BZ4HE.js')},{name:"logout",aliases:[],description:"End current CLI session and clear credentials",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"auth",handler:()=>import('../logout-QERO6G6B.js')},{name:"whoami",aliases:["auth whoami"],description:"Show current authenticated account info",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"auth",handler:()=>import('../whoami-SAURQARO.js')},{name:"auth status",aliases:[],description:"Detailed session health check",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"auth",handler:()=>import('../auth-status-4VVTCDII.js')},{name:"auth sessions",aliases:[],description:"List all active CLI sessions",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"auth",handler:()=>import('../auth-sessions-ALQEGBDS.js')},{name:"auth revoke",aliases:[],description:"Revoke a session or all sessions",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"destructive",category:"auth",handler:()=>import('../auth-revoke-I5FM6N2S.js')},{name:"storage ls",aliases:["storage list"],description:"List files and folders in storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-ls-7RZQ3AXR.js')},{name:"storage upload",aliases:["storage up"],description:"Upload files or folders to storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-upload-5M6PBHOC.js')},{name:"storage download",aliases:["storage dl"],description:"Download files or folders from storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-download-5OYCNXKL.js')},{name:"storage cp",aliases:[],description:"Copy files within storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-cp-JTPTXZRQ.js')},{name:"storage mv",aliases:[],description:"Move/rename files within storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"storage",handler:()=>import('../storage-mv-XQ7EPX3M.js')},{name:"storage rm",aliases:[],description:"Delete files from storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"storage",handler:()=>import('../storage-rm-LYO6UR3G.js')},{name:"storage mkdir",aliases:[],description:"Create a folder in storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-mkdir-NWOHGAQI.js')},{name:"storage cat",aliases:[],description:"Print file contents to terminal",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-cat-HXFOJJG5.js')},{name:"storage info",aliases:[],description:"Show file metadata",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-info-WA74POPR.js')},{name:"storage share",aliases:[],description:"Generate a share link for a file",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-share-OURRQWZK.js')},{name:"storage unshare",aliases:[],description:"Revoke all share links for a file",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"storage",handler:()=>import('../storage-unshare-3DXEKHEH.js')},{name:"storage tag",aliases:[],description:"Add or remove file tags",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-tag-NGJGUJSZ.js')},{name:"storage search",aliases:[],description:"Search storage by filename",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-search-RIT5ISCA.js')},{name:"storage diff",aliases:[],description:"Compare local and remote storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-diff-XURHVTPC.js')},{name:"storage clean",aliases:[],description:"Clean orphaned files from storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"storage",handler:()=>import('../storage-clean-LEQEYWL6.js')},{name:"deploy",aliases:["squidsite deploy"],description:"Deploy a static website to SquidCloud Sites",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"deploy",handler:()=>import('../deploy-X5HX7V4J.js')},{name:"sites list",aliases:["sites ls"],description:"List all published sites",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-list-LLULSE5J.js')},{name:"sites info",aliases:[],description:"Show site details",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-info-BZUK57TH.js')},{name:"sites open",aliases:[],description:"Open site in browser",requiresAuth:true,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-open-R7A5EQWM.js')},{name:"sites unpublish",aliases:[],description:"Take a site offline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"sites",handler:()=>import('../sites-unpublish-6P7SQGIU.js')},{name:"sites delete",aliases:[],description:"Permanently delete a site",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"sites",handler:()=>import('../sites-delete-SUHEQDZQ.js')},{name:"sites visibility",aliases:[],description:"Change site visibility (public/private)",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"sites",handler:()=>import('../sites-visibility-R3AQJ76F.js')},{name:"sites rename",aliases:[],description:"Rename a site slug",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"sites",handler:()=>import('../sites-rename-MOO6HVW3.js')},{name:"sites rollback",aliases:[],description:"Rollback to a previous deployment",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"sites",handler:()=>import('../sites-rollback-SPW2Z73L.js')},{name:"sites deploys",aliases:[],description:"Show deployment history",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-deploys-C4TVID2W.js')},{name:"sites logs",aliases:[],description:"Stream live site access logs",requiresAuth:true,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-logs-NILNXF4L.js')},{name:"sites analytics",aliases:[],description:"Show site traffic analytics",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-analytics-JK4UFMWX.js')},{name:"sites purge",aliases:[],description:"Purge CDN cache for a site",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"sites",handler:()=>import('../sites-purge-VHERQRUB.js')},{name:"scripts list",aliases:[],description:"List registered SquidScripts",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-list-YPFNLI3P.js')},{name:"scripts run",aliases:[],description:"Run a SquidScript pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-run-3NBYKEMQ.js')},{name:"scripts logs",aliases:[],description:"View pipeline run logs",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-logs-VISO5ONQ.js')},{name:"scripts validate",aliases:[],description:"Validate a .squid.yml file",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-validate-JZPIIMIX.js')},{name:"scripts init",aliases:[],description:"Create a new pipeline interactively",requiresAuth:true,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-init-AU6WNMKB.js')},{name:"scripts enable",aliases:[],description:"Enable a disabled pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-enable-JVAA6AMP.js')},{name:"scripts disable",aliases:[],description:"Disable a pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"scripts",handler:()=>import('../scripts-disable-JPATOVO4.js')},{name:"scripts delete",aliases:[],description:"Delete a pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"scripts",handler:()=>import('../scripts-delete-274TW63X.js')},{name:"scripts status",aliases:[],description:"Show pipeline status",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-status-45K3IL5L.js')},{name:"scripts cancel",aliases:[],description:"Cancel a running pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"scripts",handler:()=>import('../scripts-cancel-JS3LL2AT.js')},{name:"scripts watch",aliases:[],description:"Watch .squid.yml for changes",requiresAuth:false,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-watch-XZ7MZIMK.js')},{name:"filereq list",aliases:["forms list","filereq ls"],description:"List file requests",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-list-W2UUPFFD.js')},{name:"filereq create",aliases:["forms create"],description:"Create a file request",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-create-CWC7MGOJ.js')},{name:"filereq info",aliases:["forms info"],description:"View file request details",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-info-SUST47TN.js')},{name:"filereq submissions",aliases:["forms submissions"],description:"View file request submissions",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-submissions-UTLSYPWS.js')},{name:"filereq export",aliases:["forms export"],description:"Export submissions as CSV",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-export-5ZNEL3V2.js')},{name:"filereq clear",aliases:["forms clear"],description:"Clear all submissions",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"forms",handler:()=>import('../forms-clear-UJ23UHUN.js')},{name:"filereq delete",aliases:["forms delete"],description:"Delete a file request",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"forms",handler:()=>import('../forms-delete-TKHTM6L5.js')},{name:"filereq embed",aliases:["forms embed"],description:"Get HTML embed snippet",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-embed-FF3VMR4M.js')},{name:"time lock",aliases:[],description:"Time-lock a file or folder",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"time",handler:()=>import('../time-lock-2OLEVQPJ.js')},{name:"time unlock",aliases:[],description:"Unlock a time-locked file",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"time",handler:()=>import('../time-unlock-OO6QH5R6.js')},{name:"time status",aliases:[],description:"Check time-lock status",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"time",handler:()=>import('../time-status-TVNJBFKC.js')},{name:"time list",aliases:[],description:"List all time-locked files",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"time",handler:()=>import('../time-list-GMZYZAOU.js')},{name:"time proof",aliases:[],description:"Export cryptographic existence proof",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"time",handler:()=>import('../time-proof-RUTDAEKP.js')},{name:"collab invite",aliases:[],description:"Invite a collaborator to a folder",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"collab",handler:()=>import('../collab-invite-HAMMPEAQ.js')},{name:"collab list",aliases:[],description:"List folder collaborators",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"collab",handler:()=>import('../collab-list-JV4ZCWLB.js')},{name:"collab remove",aliases:[],description:"Remove a collaborator",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"collab",handler:()=>import('../collab-remove-DO4BIA5R.js')},{name:"collab activity",aliases:[],description:"View collaborator activity feed",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"collab",handler:()=>import('../collab-activity-5RK36CJW.js')},{name:"collab leave",aliases:[],description:"Leave a shared folder",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"collab",handler:()=>import('../collab-leave-MTCXHQ4T.js')},{name:"collab transfer",aliases:[],description:"Transfer folder ownership",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"collab",handler:()=>import('../collab-transfer-6CG5PHVC.js')},{name:"sign request",aliases:[],description:"Request a digital signature",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-request-VVFYWT3Y.js')},{name:"sign status",aliases:[],description:"Check signing request status",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-status-LKG5UFBX.js')},{name:"sign list",aliases:[],description:"List signing requests",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-list-FV7SQSWT.js')},{name:"sign cancel",aliases:[],description:"Cancel a signing request",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"sign",handler:()=>import('../sign-cancel-OUJM5UZT.js')},{name:"sign verify",aliases:[],description:"Verify a signed document",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-verify-CVTTJSDL.js')},{name:"sign download",aliases:[],description:"Download signed document",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-download-FS5G6J27.js')},{name:"monitor",aliases:[],description:"At-a-glance SquidCloud health dashboard",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-DKLGO5H7.js')},{name:"monitor sites",aliases:[],description:"Site health overview",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-sites-QIVG5TPF.js')},{name:"monitor pipelines",aliases:[],description:"Pipeline health overview",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-pipelines-EPL24J3S.js')},{name:"monitor storage",aliases:[],description:"Storage health report",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-storage-HBCC34K7.js')},{name:"monitor automations",aliases:[],description:"Automation health overview",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-automations-4XOOCRFY.js')},{name:"logs tail",aliases:[],description:"Stream live logs",requiresAuth:true,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"logs",handler:()=>import('../logs-tail-J64TCZG5.js')},{name:"logs search",aliases:[],description:"Search historical logs",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"logs",handler:()=>import('../logs-search-323KRPG4.js')},{name:"logs export",aliases:[],description:"Export logs as JSONL or CSV",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"logs",handler:()=>import('../logs-export-DYOPV2LT.js')},{name:"doctor",aliases:[],description:"Run system diagnostics",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../doctor-RSKBJYUX.js')},{name:"version",aliases:["--version","-v"],description:"Show CLI version",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../version-LHSDYI7Q.js')},{name:"config list",aliases:["config ls"],description:"List CLI configuration",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../config-7G24FXQJ.js')},{name:"config set",aliases:[],description:"Set a config value",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../config-set-O6JKOGGN.js')},{name:"config get",aliases:[],description:"Get a config value",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../config-get-DDNSM5EH.js')},{name:"config delete",aliases:[],description:"Delete a config value",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../config-delete-VSIFFODZ.js')},{name:"config reset",aliases:[],description:"Reset all configuration",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"utility",handler:()=>import('../config-reset-ZFMP4J5H.js')},{name:"completion",aliases:[],description:"Generate shell completion scripts",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"utility",handler:()=>import('../completion-IF3NB7PB.js')},{name:"feedback",aliases:[],description:"Submit feedback or report a bug",requiresAuth:false,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"utility",handler:()=>import('../feedback-QUGQAWZB.js')},{name:"update",aliases:[],description:"Update the CLI to latest version",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../update-XJQSXSFU.js')}];function v(){return [...A]}var p=new Command,y={version:"1.0.0",description:"SquidCloud CLI \u2014 static sites, storage, pipelines, and more."};p.name("squidcloud").description(y.description).version(y.version,"-v, --version","Display CLI version").option("--output <format>","Output format (json)","text").hook("preAction",async e$1=>{e$1.optsWithGlobals().output==="json"&&e(true),d()&&e(false);});async function L(e){if(!e.requiresAuth)return;let s=await m();s||(h("Not authenticated. Run `squidcloud login` first."),process.exit(1)),q(s)&&(await a()||(h("Session expired. Please run `squidcloud login` again."),process.exit(1)));}function C(e){let s=new Map;for(let r of e){let u=r.name.split(" ");if(u.length===1)s.set(r.name,new Map);else if(u.length===2){let[t,o]=u;s.has(t)||s.set(t,new Map),s.get(t).set(o,r);}}for(let[r,u]of s)if(u.size===0){let t=e.find(a=>a.name===r),o=p.command(r);o.description(t.description),t.aliases.length>0&&o.aliases(t.aliases),o.action(async(...a)=>{try{await L(t);let i=await t.handler();if(typeof i.default=="function"){let n=a.slice(0,-2);await i.default(...n);}n(t.name,process.argv.slice(2).join(" "),0);}catch(i){let n$1=i instanceof Error?i.message:String(i);h(n$1),n(t.name,process.argv.slice(2).join(" "),1),process.exit(1);}});}else {let t=p.command(r);t.description(`SquidCloud ${r} commands`);for(let[o,a]of u){let i=`${r} ${o}`,n$1=t.command(o);n$1.description(a.description),a.aliases.length>0&&n$1.aliases(a.aliases.map(f=>f.replace(`${r} `,""))),n$1.action(async(...f)=>{try{await L(a);let l=await a.handler();if(typeof l.default=="function"){let m=f.slice(0,-2);await l.default(...m);}n(i,process.argv.slice(2).join(" "),0);}catch(l){let m=l instanceof Error?l.message:String(l);h(m),n(i,process.argv.slice(2).join(" "),1),process.exit(1);}});}}}async function b(){let e=process.argv.slice(2);if(e.includes("--version")||e.includes("-v")){let{showVersion:r}=await import('../version-LHSDYI7Q.js');await r();return}if(e.length===0&&!e.includes("--help")&&!e.includes("-h")){let{showVersion:r}=await import('../version-LHSDYI7Q.js');await r(),console.log(""),p.outputHelp();return}let s=v();C(s),p.addHelpText("beforeAll",`
|
|
2
|
+
import'../chunk-PSJQAIDB.js';import {a}from'../chunk-SVR7W7MP.js';import'../chunk-THMWE2I6.js';import {e,d,h,n}from'../chunk-QT7R3AXE.js';import {d as d$1,h as h$1}from'../chunk-W6CRHANC.js';import {Command}from'commander';var A=[{name:"login",aliases:[],description:"Authenticate with SquidCloud",requiresAuth:false,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"auth",handler:()=>import('../login-DRNKN2XZ.js')},{name:"logout",aliases:[],description:"End current CLI session and clear credentials",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"auth",handler:()=>import('../logout-UF55Z67V.js')},{name:"whoami",aliases:["auth whoami"],description:"Show current authenticated account info",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"auth",handler:()=>import('../whoami-ZFYNNZSF.js')},{name:"auth status",aliases:[],description:"Detailed session health check",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"auth",handler:()=>import('../auth-status-WHT7RXX6.js')},{name:"auth sessions",aliases:[],description:"List all active CLI sessions",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"auth",handler:()=>import('../auth-sessions-JZF7HUBL.js')},{name:"auth revoke",aliases:[],description:"Revoke a session or all sessions",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"destructive",category:"auth",handler:()=>import('../auth-revoke-IRZJIB2A.js')},{name:"storage ls",aliases:["storage list"],description:"List files and folders in storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-ls-AMBO3S2J.js')},{name:"storage upload",aliases:["storage up"],description:"Upload files or folders to storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-upload-EHOTOYS5.js')},{name:"storage download",aliases:["storage dl"],description:"Download files or folders from storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-download-UEQYEO73.js')},{name:"storage cp",aliases:[],description:"Copy files within storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-cp-PV6LPCYV.js')},{name:"storage mv",aliases:[],description:"Move/rename files within storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"storage",handler:()=>import('../storage-mv-4DCYMNNI.js')},{name:"storage rm",aliases:[],description:"Delete files from storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"storage",handler:()=>import('../storage-rm-5K7F7ZP7.js')},{name:"storage mkdir",aliases:[],description:"Create a folder in storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-mkdir-5IXAS4YP.js')},{name:"storage cat",aliases:[],description:"Print file contents to terminal",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-cat-TASP3DK7.js')},{name:"storage info",aliases:[],description:"Show file metadata",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-info-4IVQWOSM.js')},{name:"storage share",aliases:[],description:"Generate a share link for a file",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-share-4PVM4QIC.js')},{name:"storage unshare",aliases:[],description:"Revoke all share links for a file",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"storage",handler:()=>import('../storage-unshare-EMXDT7DS.js')},{name:"storage tag",aliases:[],description:"Add or remove file tags",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-tag-SXSOQVY6.js')},{name:"storage search",aliases:[],description:"Search storage by filename",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-search-FCNFG2BS.js')},{name:"storage diff",aliases:[],description:"Compare local and remote storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"storage",handler:()=>import('../storage-diff-BDKHYLIC.js')},{name:"storage clean",aliases:[],description:"Clean orphaned files from storage",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"storage",handler:()=>import('../storage-clean-WCV7ENP2.js')},{name:"deploy",aliases:["squidsite deploy"],description:"Deploy a static website to SquidCloud Sites",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"deploy",handler:()=>import('../deploy-5AQMGJ2Q.js')},{name:"sites list",aliases:["sites ls"],description:"List all published sites",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-list-KQZVB3Y2.js')},{name:"sites info",aliases:[],description:"Show site details",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-info-NVMVESXX.js')},{name:"sites open",aliases:[],description:"Open site in browser",requiresAuth:true,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-open-OZ5RORV4.js')},{name:"sites unpublish",aliases:[],description:"Take a site offline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"sites",handler:()=>import('../sites-unpublish-FQSQA763.js')},{name:"sites delete",aliases:[],description:"Permanently delete a site",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"sites",handler:()=>import('../sites-delete-MGAIPA4A.js')},{name:"sites visibility",aliases:[],description:"Change site visibility (public/private)",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"sites",handler:()=>import('../sites-visibility-QDDJWBOT.js')},{name:"sites rename",aliases:[],description:"Rename a site slug",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"sites",handler:()=>import('../sites-rename-HXM4MMDS.js')},{name:"sites rollback",aliases:[],description:"Rollback to a previous deployment",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"sites",handler:()=>import('../sites-rollback-FVELQVJK.js')},{name:"sites deploys",aliases:[],description:"Show deployment history",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-deploys-UNRERGLN.js')},{name:"sites logs",aliases:[],description:"Stream live site access logs",requiresAuth:true,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-logs-MINP5YLW.js')},{name:"sites analytics",aliases:[],description:"Show site traffic analytics",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sites",handler:()=>import('../sites-analytics-RU63VLE4.js')},{name:"sites purge",aliases:[],description:"Purge CDN cache for a site",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"sites",handler:()=>import('../sites-purge-K6CUCSQA.js')},{name:"scripts list",aliases:[],description:"List registered SquidScripts",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-list-F2RJ7TJ6.js')},{name:"scripts run",aliases:[],description:"Run a SquidScript pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-run-4EUWVBS6.js')},{name:"scripts logs",aliases:[],description:"View pipeline run logs",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-logs-PIIKLZXW.js')},{name:"scripts validate",aliases:[],description:"Validate a .squid.yml file",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-validate-TU47YDOT.js')},{name:"scripts init",aliases:[],description:"Create a new pipeline interactively",requiresAuth:true,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-init-AU6WNMKB.js')},{name:"scripts enable",aliases:[],description:"Enable a disabled pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-enable-N7RK2ZRG.js')},{name:"scripts disable",aliases:[],description:"Disable a pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"scripts",handler:()=>import('../scripts-disable-7UQUGTO4.js')},{name:"scripts delete",aliases:[],description:"Delete a pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"scripts",handler:()=>import('../scripts-delete-2EUZDGOW.js')},{name:"scripts status",aliases:[],description:"Show pipeline status",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-status-BVCSUDUA.js')},{name:"scripts cancel",aliases:[],description:"Cancel a running pipeline",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"scripts",handler:()=>import('../scripts-cancel-XYWJD3QW.js')},{name:"scripts watch",aliases:[],description:"Watch .squid.yml for changes",requiresAuth:false,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"scripts",handler:()=>import('../scripts-watch-TQURXMIL.js')},{name:"filereq list",aliases:["forms list","filereq ls"],description:"List file requests",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-list-CS7J3ULK.js')},{name:"filereq create",aliases:["forms create"],description:"Create a file request",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-create-ORURKN5O.js')},{name:"filereq info",aliases:["forms info"],description:"View file request details",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-info-JOYOMPC3.js')},{name:"filereq submissions",aliases:["forms submissions"],description:"View file request submissions",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-submissions-KWGRYLAY.js')},{name:"filereq export",aliases:["forms export"],description:"Export submissions as CSV",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-export-5SDRUFV3.js')},{name:"filereq clear",aliases:["forms clear"],description:"Clear all submissions",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"forms",handler:()=>import('../forms-clear-4BQMLGGN.js')},{name:"filereq delete",aliases:["forms delete"],description:"Delete a file request",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"forms",handler:()=>import('../forms-delete-NT4SAO6G.js')},{name:"filereq embed",aliases:["forms embed"],description:"Get HTML embed snippet",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"forms",handler:()=>import('../forms-embed-5L4DHGXC.js')},{name:"time lock",aliases:[],description:"Time-lock a file or folder",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"time",handler:()=>import('../time-lock-WQKPTILH.js')},{name:"time unlock",aliases:[],description:"Unlock a time-locked file",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"time",handler:()=>import('../time-unlock-OUIAP7RY.js')},{name:"time status",aliases:[],description:"Check time-lock status",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"time",handler:()=>import('../time-status-YRQVIKNH.js')},{name:"time list",aliases:[],description:"List all time-locked files",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"time",handler:()=>import('../time-list-2XMDLMRC.js')},{name:"time proof",aliases:[],description:"Export cryptographic existence proof",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"time",handler:()=>import('../time-proof-4YZLG6NG.js')},{name:"collab invite",aliases:[],description:"Invite a collaborator to a folder",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"collab",handler:()=>import('../collab-invite-Y54NCHSB.js')},{name:"collab list",aliases:[],description:"List folder collaborators",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"collab",handler:()=>import('../collab-list-BHO5IEAR.js')},{name:"collab remove",aliases:[],description:"Remove a collaborator",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"collab",handler:()=>import('../collab-remove-XI3NX2M7.js')},{name:"collab activity",aliases:[],description:"View collaborator activity feed",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"collab",handler:()=>import('../collab-activity-UNX2PJZE.js')},{name:"collab leave",aliases:[],description:"Leave a shared folder",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"collab",handler:()=>import('../collab-leave-CR4VOXZV.js')},{name:"collab transfer",aliases:[],description:"Transfer folder ownership",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"collab",handler:()=>import('../collab-transfer-U4XXODAN.js')},{name:"sign request",aliases:[],description:"Request a digital signature",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-request-PO24EDJG.js')},{name:"sign status",aliases:[],description:"Check signing request status",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-status-KD7I3PZH.js')},{name:"sign list",aliases:[],description:"List signing requests",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-list-ZMM7F4K2.js')},{name:"sign cancel",aliases:[],description:"Cancel a signing request",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"caution",category:"sign",handler:()=>import('../sign-cancel-SOBRK2XX.js')},{name:"sign verify",aliases:[],description:"Verify a signed document",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-verify-LRZPLJYX.js')},{name:"sign download",aliases:[],description:"Download signed document",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"sign",handler:()=>import('../sign-download-GLJS64WT.js')},{name:"monitor",aliases:[],description:"At-a-glance SquidCloud health dashboard",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-ZLSLSVEZ.js')},{name:"monitor sites",aliases:[],description:"Site health overview",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-sites-XRIEHVIV.js')},{name:"monitor pipelines",aliases:[],description:"Pipeline health overview",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-pipelines-WQOY5O4K.js')},{name:"monitor storage",aliases:[],description:"Storage health report",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-storage-2ULH4E4F.js')},{name:"monitor automations",aliases:[],description:"Automation health overview",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"monitor",handler:()=>import('../monitor-automations-VK6CZSNG.js')},{name:"logs tail",aliases:[],description:"Stream live logs",requiresAuth:true,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"logs",handler:()=>import('../logs-tail-NFHOK3RM.js')},{name:"logs search",aliases:[],description:"Search historical logs",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"logs",handler:()=>import('../logs-search-JAGCLPVE.js')},{name:"logs export",aliases:[],description:"Export logs as JSONL or CSV",requiresAuth:true,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"logs",handler:()=>import('../logs-export-O74GEMCD.js')},{name:"doctor",aliases:[],description:"Run system diagnostics",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../doctor-5TK2COIN.js')},{name:"version",aliases:["--version","-v"],description:"Show CLI version",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../version-LHSDYI7Q.js')},{name:"config list",aliases:["config ls"],description:"List CLI configuration",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../config-7G24FXQJ.js')},{name:"config set",aliases:[],description:"Set a config value",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../config-set-O6JKOGGN.js')},{name:"config get",aliases:[],description:"Get a config value",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../config-get-DDNSM5EH.js')},{name:"config delete",aliases:[],description:"Delete a config value",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../config-delete-VSIFFODZ.js')},{name:"config reset",aliases:[],description:"Reset all configuration",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"destructive",category:"utility",handler:()=>import('../config-reset-ZFMP4J5H.js')},{name:"completion",aliases:[],description:"Generate shell completion scripts",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:false,dangerLevel:"safe",category:"utility",handler:()=>import('../completion-IF3NB7PB.js')},{name:"feedback",aliases:[],description:"Submit feedback or report a bug",requiresAuth:false,requiresProject:false,ciSafe:false,jsonSupport:false,dangerLevel:"safe",category:"utility",handler:()=>import('../feedback-QUGQAWZB.js')},{name:"update",aliases:[],description:"Update the CLI to latest version",requiresAuth:false,requiresProject:false,ciSafe:true,jsonSupport:true,dangerLevel:"safe",category:"utility",handler:()=>import('../update-DOHW47PB.js')}];function v(){return [...A]}var p=new Command,y={version:"1.0.0",description:"SquidCloud CLI \u2014 static sites, storage, pipelines, and more."};p.name("squidcloud").description(y.description).version(y.version,"-v, --version","Display CLI version").option("--output <format>","Output format (json)","text").hook("preAction",async e$1=>{e$1.optsWithGlobals().output==="json"&&e(true),d()&&e(false);});async function L(e){if(!e.requiresAuth)return;let s=await d$1();s||(h("Not authenticated. Run `squidcloud login` first."),process.exit(1)),h$1(s)&&(await a()||(h("Session expired. Please run `squidcloud login` again."),process.exit(1)));}function C(e){let s=new Map;for(let r of e){let u=r.name.split(" ");if(u.length===1)s.set(r.name,new Map);else if(u.length===2){let[t,o]=u;s.has(t)||s.set(t,new Map),s.get(t).set(o,r);}}for(let[r,u]of s)if(u.size===0){let t=e.find(a=>a.name===r),o=p.command(r);o.description(t.description),t.aliases.length>0&&o.aliases(t.aliases),o.action(async(...a)=>{try{await L(t);let i=await t.handler();if(typeof i.default=="function"){let n=a.slice(0,-2);await i.default(...n);}n(t.name,process.argv.slice(2).join(" "),0);}catch(i){let n$1=i instanceof Error?i.message:String(i);h(n$1),n(t.name,process.argv.slice(2).join(" "),1),process.exit(1);}});}else {let t=p.command(r);t.description(`SquidCloud ${r} commands`);for(let[o,a]of u){let i=`${r} ${o}`,n$1=t.command(o);n$1.description(a.description),a.aliases.length>0&&n$1.aliases(a.aliases.map(f=>f.replace(`${r} `,""))),n$1.action(async(...f)=>{try{await L(a);let l=await a.handler();if(typeof l.default=="function"){let m=f.slice(0,-2);await l.default(...m);}n(i,process.argv.slice(2).join(" "),0);}catch(l){let m=l instanceof Error?l.message:String(l);h(m),n(i,process.argv.slice(2).join(" "),1),process.exit(1);}});}}}async function b(){let e=process.argv.slice(2);if(e.includes("--version")||e.includes("-v")){let{showVersion:r}=await import('../version-LHSDYI7Q.js');await r();return}if(e.length===0&&!e.includes("--help")&&!e.includes("-h")){let{showVersion:r}=await import('../version-LHSDYI7Q.js');await r(),console.log(""),p.outputHelp();return}let s=v();C(s),p.addHelpText("beforeAll",`
|
|
3
3
|
`),await p.parseAsync(process.argv);}b().catch(e=>{h(e instanceof Error?e.message:String(e)),process.exit(1);});//# sourceMappingURL=squidcloud.js.map
|
|
4
4
|
//# sourceMappingURL=squidcloud.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/registry/index.ts","../../src/bin/squidcloud.ts"],"names":["REGISTRY","getAllCommands","program","Command","pkg","thisCommand","setJsonMode","isCI","ensureAuth","descriptor","session","loadSession","logError","shouldRefreshToken","refreshAccessToken","buildCommandTree","commands","tree","cmd","parts","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C,CAAAA,EAAK,CAAE,KAAA,CAAOP,CAAAA,EAAQ,CACpBjB,EAASiB,CAAAA,YAAe,KAAA,CAAQA,CAAAA,CAAI,OAAA,CAAU,MAAA,CAAOA,CAAG,CAAC,CAAA,CACzD,OAAA,CAAQ,IAAA,CAAK,CAAC,EAChB,CAAC,CAAA","file":"squidcloud.js","sourcesContent":["export type CommandCategory =\n | 'auth'\n | 'storage'\n | 'deploy'\n | 'sites'\n | 'scripts'\n | 'automations'\n | 'forms'\n | 'sign'\n | 'time'\n | 'monitor'\n | 'logs'\n | 'collab'\n | 'tunnel'\n | 'id'\n | 'project'\n | 'utility'\n\nexport interface CommandDescriptor {\n name: string\n aliases: string[]\n description: string\n requiresAuth: boolean\n requiresProject: boolean\n ciSafe: boolean\n jsonSupport: boolean\n dangerLevel: 'safe' | 'caution' | 'destructive'\n category: CommandCategory\n handler: () => Promise<{ default: (...args: unknown[]) => void | Promise<void> }>\n}\n\nconst REGISTRY: CommandDescriptor[] = [\n // AUTH\n { name: 'login', aliases: [], description: 'Authenticate with SquidCloud', requiresAuth: false, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/login.js') },\n { name: 'logout', aliases: [], description: 'End current CLI session and clear credentials', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/logout.js') },\n { name: 'whoami', aliases: ['auth whoami'], description: 'Show current authenticated account info', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/whoami.js') },\n { name: 'auth status', aliases: [], description: 'Detailed session health check', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/auth-status.js') },\n { name: 'auth sessions', aliases: [], description: 'List all active CLI sessions', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/auth-sessions.js') },\n { name: 'auth revoke', aliases: [], description: 'Revoke a session or all sessions', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'destructive', category: 'auth', handler: () => import('../commands/auth/auth-revoke.js') },\n\n // STORAGE\n { name: 'storage ls', aliases: ['storage list'], description: 'List files and folders in storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-ls.js') },\n { name: 'storage upload', aliases: ['storage up'], description: 'Upload files or folders to storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-upload.js') },\n { name: 'storage download', aliases: ['storage dl'], description: 'Download files or folders from storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-download.js') },\n { name: 'storage cp', aliases: [], description: 'Copy files within storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-cp.js') },\n { name: 'storage mv', aliases: [], description: 'Move/rename files within storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'storage', handler: () => import('../commands/storage/storage-mv.js') },\n { name: 'storage rm', aliases: [], description: 'Delete files from storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'storage', handler: () => import('../commands/storage/storage-rm.js') },\n { name: 'storage mkdir', aliases: [], description: 'Create a folder in storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-mkdir.js') },\n { name: 'storage cat', aliases: [], description: 'Print file contents to terminal', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-cat.js') },\n { name: 'storage info', aliases: [], description: 'Show file metadata', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-info.js') },\n { name: 'storage share', aliases: [], description: 'Generate a share link for a file', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-share.js') },\n { name: 'storage unshare', aliases: [], description: 'Revoke all share links for a file', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'storage', handler: () => import('../commands/storage/storage-unshare.js') },\n { name: 'storage tag', aliases: [], description: 'Add or remove file tags', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-tag.js') },\n { name: 'storage search', aliases: [], description: 'Search storage by filename', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-search.js') },\n { name: 'storage diff', aliases: [], description: 'Compare local and remote storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-diff.js') },\n { name: 'storage clean', aliases: [], description: 'Clean orphaned files from storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'storage', handler: () => import('../commands/storage/storage-clean.js') },\n\n // DEPLOY\n { name: 'deploy', aliases: ['squidsite deploy'], description: 'Deploy a static website to SquidCloud Sites', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'deploy', handler: () => import('../commands/deploy/index.js') },\n\n // SITES\n { name: 'sites list', aliases: ['sites ls'], description: 'List all published sites', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-list.js') },\n { name: 'sites info', aliases: [], description: 'Show site details', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-info.js') },\n { name: 'sites open', aliases: [], description: 'Open site in browser', requiresAuth: true, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-open.js') },\n { name: 'sites unpublish', aliases: [], description: 'Take a site offline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'sites', handler: () => import('../commands/sites/sites-unpublish.js') },\n { name: 'sites delete', aliases: [], description: 'Permanently delete a site', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'sites', handler: () => import('../commands/sites/sites-delete.js') },\n { name: 'sites visibility', aliases: [], description: 'Change site visibility (public/private)', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'sites', handler: () => import('../commands/sites/sites-visibility.js') },\n { name: 'sites rename', aliases: [], description: 'Rename a site slug', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'sites', handler: () => import('../commands/sites/sites-rename.js') },\n { name: 'sites rollback', aliases: [], description: 'Rollback to a previous deployment', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'sites', handler: () => import('../commands/sites/sites-rollback.js') },\n { name: 'sites deploys', aliases: [], description: 'Show deployment history', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-deploys.js') },\n { name: 'sites logs', aliases: [], description: 'Stream live site access logs', requiresAuth: true, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-logs.js') },\n { name: 'sites analytics', aliases: [], description: 'Show site traffic analytics', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-analytics.js') },\n { name: 'sites purge', aliases: [], description: 'Purge CDN cache for a site', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'sites', handler: () => import('../commands/sites/sites-purge.js') },\n\n // SCRIPTS (Pipelines)\n { name: 'scripts list', aliases: [], description: 'List registered SquidScripts', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-list.js') },\n { name: 'scripts run', aliases: [], description: 'Run a SquidScript pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-run.js') },\n { name: 'scripts logs', aliases: [], description: 'View pipeline run logs', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-logs.js') },\n { name: 'scripts validate', aliases: [], description: 'Validate a .squid.yml file', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-validate.js') },\n { name: 'scripts init', aliases: [], description: 'Create a new pipeline interactively', requiresAuth: true, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-init.js') },\n { name: 'scripts enable', aliases: [], description: 'Enable a disabled pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-enable.js') },\n { name: 'scripts disable', aliases: [], description: 'Disable a pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'scripts', handler: () => import('../commands/scripts/scripts-disable.js') },\n { name: 'scripts delete', aliases: [], description: 'Delete a pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'scripts', handler: () => import('../commands/scripts/scripts-delete.js') },\n { name: 'scripts status', aliases: [], description: 'Show pipeline status', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-status.js') },\n { name: 'scripts cancel', aliases: [], description: 'Cancel a running pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'scripts', handler: () => import('../commands/scripts/scripts-cancel.js') },\n { name: 'scripts watch', aliases: [], description: 'Watch .squid.yml for changes', requiresAuth: false, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-watch.js') },\n\n // FORMS (File Requests)\n { name: 'filereq list', aliases: ['forms list', 'filereq ls'], description: 'List file requests', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-list.js') },\n { name: 'filereq create', aliases: ['forms create'], description: 'Create a file request', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-create.js') },\n { name: 'filereq info', aliases: ['forms info'], description: 'View file request details', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-info.js') },\n { name: 'filereq submissions', aliases: ['forms submissions'], description: 'View file request submissions', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-submissions.js') },\n { name: 'filereq export', aliases: ['forms export'], description: 'Export submissions as CSV', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-export.js') },\n { name: 'filereq clear', aliases: ['forms clear'], description: 'Clear all submissions', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'forms', handler: () => import('../commands/forms/forms-clear.js') },\n { name: 'filereq delete', aliases: ['forms delete'], description: 'Delete a file request', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'forms', handler: () => import('../commands/forms/forms-delete.js') },\n { name: 'filereq embed', aliases: ['forms embed'], description: 'Get HTML embed snippet', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-embed.js') },\n\n // SQUIDTIME\n { name: 'time lock', aliases: [], description: 'Time-lock a file or folder', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'time', handler: () => import('../commands/time/time-lock.js') },\n { name: 'time unlock', aliases: [], description: 'Unlock a time-locked file', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'time', handler: () => import('../commands/time/time-unlock.js') },\n { name: 'time status', aliases: [], description: 'Check time-lock status', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'time', handler: () => import('../commands/time/time-status.js') },\n { name: 'time list', aliases: [], description: 'List all time-locked files', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'time', handler: () => import('../commands/time/time-list.js') },\n { name: 'time proof', aliases: [], description: 'Export cryptographic existence proof', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'time', handler: () => import('../commands/time/time-proof.js') },\n\n // COLLAB\n { name: 'collab invite', aliases: [], description: 'Invite a collaborator to a folder', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'collab', handler: () => import('../commands/collab/collab-invite.js') },\n { name: 'collab list', aliases: [], description: 'List folder collaborators', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'collab', handler: () => import('../commands/collab/collab-list.js') },\n { name: 'collab remove', aliases: [], description: 'Remove a collaborator', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'collab', handler: () => import('../commands/collab/collab-remove.js') },\n { name: 'collab activity', aliases: [], description: 'View collaborator activity feed', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'collab', handler: () => import('../commands/collab/collab-activity.js') },\n { name: 'collab leave', aliases: [], description: 'Leave a shared folder', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'collab', handler: () => import('../commands/collab/collab-leave.js') },\n { name: 'collab transfer', aliases: [], description: 'Transfer folder ownership', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'collab', handler: () => import('../commands/collab/collab-transfer.js') },\n\n // SQUIDSIGN\n { name: 'sign request', aliases: [], description: 'Request a digital signature', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-request.js') },\n { name: 'sign status', aliases: [], description: 'Check signing request status', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-status.js') },\n { name: 'sign list', aliases: [], description: 'List signing requests', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-list.js') },\n { name: 'sign cancel', aliases: [], description: 'Cancel a signing request', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'sign', handler: () => import('../commands/sign/sign-cancel.js') },\n { name: 'sign verify', aliases: [], description: 'Verify a signed document', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-verify.js') },\n { name: 'sign download', aliases: [], description: 'Download signed document', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-download.js') },\n\n // MONITOR\n { name: 'monitor', aliases: [], description: 'At-a-glance SquidCloud health dashboard', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor.js') },\n { name: 'monitor sites', aliases: [], description: 'Site health overview', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor-sites.js') },\n { name: 'monitor pipelines', aliases: [], description: 'Pipeline health overview', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor-pipelines.js') },\n { name: 'monitor storage', aliases: [], description: 'Storage health report', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor-storage.js') },\n { name: 'monitor automations', aliases: [], description: 'Automation health overview', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor-automations.js') },\n\n // LOGS\n { name: 'logs tail', aliases: [], description: 'Stream live logs', requiresAuth: true, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'logs', handler: () => import('../commands/logs/logs-tail.js') },\n { name: 'logs search', aliases: [], description: 'Search historical logs', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'logs', handler: () => import('../commands/logs/logs-search.js') },\n { name: 'logs export', aliases: [], description: 'Export logs as JSONL or CSV', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'logs', handler: () => import('../commands/logs/logs-export.js') },\n\n // UTILITY\n { name: 'doctor', aliases: [], description: 'Run system diagnostics', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/doctor.js') },\n { name: 'version', aliases: ['--version', '-v'], description: 'Show CLI version', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/version.js') },\n { name: 'config list', aliases: ['config ls'], description: 'List CLI configuration', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/config.js') },\n { name: 'config set', aliases: [], description: 'Set a config value', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/config-set.js') },\n { name: 'config get', aliases: [], description: 'Get a config value', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/config-get.js') },\n { name: 'config delete', aliases: [], description: 'Delete a config value', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/config-delete.js') },\n { name: 'config reset', aliases: [], description: 'Reset all configuration', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'utility', handler: () => import('../commands/util/config-reset.js') },\n { name: 'completion', aliases: [], description: 'Generate shell completion scripts', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/completion.js') },\n { name: 'feedback', aliases: [], description: 'Submit feedback or report a bug', requiresAuth: false, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/feedback.js') },\n { name: 'update', aliases: [], description: 'Update the CLI to latest version', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/update.js') },\n]\n\nexport function getCommand(name: string): CommandDescriptor | undefined {\n const parts = name.trim().toLowerCase().split(/\\s+/)\n return REGISTRY.find(cmd => {\n const cmdParts = cmd.name.split(/\\s+/)\n if (parts.join(' ') === cmd.name) return true\n for (const alias of cmd.aliases) {\n const aliasParts = alias.split(/\\s+/)\n const expandedAlias = (aliasParts[0] === cmdParts[0] && aliasParts.length > 1) ? alias : null\n if (parts.join(' ') === alias) return true\n }\n return false\n })\n}\n\nexport function getCategory(cat: CommandCategory): CommandDescriptor[] {\n return REGISTRY.filter(cmd => cmd.category === cat)\n}\n\nexport function getAllCommands(): CommandDescriptor[] {\n return [...REGISTRY]\n}\n\nexport function getCISafeCommands(): CommandDescriptor[] {\n return REGISTRY.filter(cmd => cmd.ciSafe)\n}\n","#!/usr/bin/env node\nimport { Command } from 'commander'\nimport chalk from 'chalk'\nimport { setJsonMode, logError, writeAudit } from '../lib/output/index.js'\nimport { isCI } from '../lib/utils/ci-detect.js'\nimport { getAllCommands, CommandDescriptor } from '../registry/index.js'\nimport { loadSession, shouldRefreshToken } from '../lib/auth/session.js'\nimport { refreshAccessToken } from '../lib/auth/refresh.js'\n\nconst program = new Command()\nconst pkg = { version: '1.0.0', name: '@squidcloud/cli', description: 'SquidCloud CLI — static sites, storage, pipelines, and more.' }\n\nprogram\n .name('squidcloud')\n .description(pkg.description)\n .version(pkg.version, '-v, --version', 'Display CLI version')\n .option('--output <format>', 'Output format (json)', 'text')\n .hook('preAction', async (thisCommand) => {\n const opts = thisCommand.optsWithGlobals()\n if (opts.output === 'json') {\n setJsonMode(true)\n }\n if (isCI()) {\n setJsonMode(false)\n }\n })\n\nasync function ensureAuth(descriptor: CommandDescriptor): Promise<void> {\n if (!descriptor.requiresAuth) return\n const session = await loadSession()\n if (!session) {\n logError('Not authenticated. Run `squidcloud login` first.')\n process.exit(1)\n }\n if (shouldRefreshToken(session)) {\n const refreshed = await refreshAccessToken()\n if (!refreshed) {\n logError('Session expired. Please run `squidcloud login` again.')\n process.exit(1)\n }\n }\n}\n\nfunction buildCommandTree(commands: CommandDescriptor[]): void {\n const tree = new Map<string, Map<string, CommandDescriptor>>()\n\n for (const cmd of commands) {\n const parts = cmd.name.split(' ')\n if (parts.length === 1) {\n tree.set(cmd.name, new Map())\n } else if (parts.length === 2) {\n const [parent, child] = parts\n if (!tree.has(parent!)) {\n tree.set(parent!, new Map())\n }\n tree.get(parent!)!.set(child!, cmd)\n }\n }\n\n for (const [name, children] of tree) {\n if (children.size === 0) {\n const cmd = commands.find(c => c.name === name)!\n const c = program.command(name)\n c.description(cmd.description)\n if (cmd.aliases.length > 0) {\n c.aliases(cmd.aliases)\n }\n c.action(async (...args: unknown[]) => {\n try {\n await ensureAuth(cmd)\n const mod = await cmd.handler()\n if (typeof mod.default === 'function') {\n const actionArgs = args.slice(0, -2)\n await mod.default(...actionArgs)\n }\n writeAudit(cmd.name, process.argv.slice(2).join(' '), 0)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n logError(message)\n writeAudit(cmd.name, process.argv.slice(2).join(' '), 1)\n process.exit(1)\n }\n })\n } else {\n const parentCmd = program.command(name)\n parentCmd.description(`SquidCloud ${name} commands`)\n for (const [childName, childCmd] of children) {\n const fullName = `${name} ${childName}`\n const c = parentCmd.command(childName)\n c.description(childCmd.description)\n if (childCmd.aliases.length > 0) {\n c.aliases(childCmd.aliases.map(a => a.replace(`${name} `, '')))\n }\n c.action(async (...args: unknown[]) => {\n try {\n await ensureAuth(childCmd)\n const mod = await childCmd.handler()\n if (typeof mod.default === 'function') {\n const actionArgs = args.slice(0, -2)\n await mod.default(...actionArgs)\n }\n writeAudit(fullName, process.argv.slice(2).join(' '), 0)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n logError(message)\n writeAudit(fullName, process.argv.slice(2).join(' '), 1)\n process.exit(1)\n }\n })\n }\n }\n }\n}\n\nasync function main(): Promise<void> {\n const args = process.argv.slice(2)\n\n if (args.includes('--version') || args.includes('-v')) {\n const { showVersion } = await import('../commands/util/version.js')\n await showVersion()\n return\n }\n\n if (args.length === 0 && !args.includes('--help') && !args.includes('-h')) {\n const { showVersion } = await import('../commands/util/version.js')\n await showVersion()\n console.log('')\n program.outputHelp()\n return\n }\n\n const commands = getAllCommands()\n buildCommandTree(commands)\n\n program.addHelpText('beforeAll', '\\n')\n\n await program.parseAsync(process.argv)\n}\n\nmain().catch((err) => {\n logError(err instanceof Error ? err.message : String(err))\n process.exit(1)\n})\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/registry/index.ts","../../src/bin/squidcloud.ts"],"names":["REGISTRY","getAllCommands","program","Command","pkg","thisCommand","setJsonMode","isCI","ensureAuth","descriptor","session","loadSession","logError","shouldRefreshToken","refreshAccessToken","buildCommandTree","commands","tree","cmd","parts","parent","child","name","children","c","args","mod","actionArgs","writeAudit","err","message","parentCmd","childName","childCmd","fullName","a","main","showVersion"],"mappings":";+NA+BA,IAAMA,CAAAA,CAAgC,CAEpC,CAAE,IAAA,CAAM,OAAA,CAAS,OAAA,CAAS,GAAI,WAAA,CAAa,8BAAA,CAAgC,aAAc,KAAA,CAAO,eAAA,CAAiB,MAAO,MAAA,CAAQ,KAAA,CAAO,WAAA,CAAa,KAAA,CAAO,YAAa,MAAA,CAAQ,QAAA,CAAU,OAAQ,OAAA,CAAS,IAAM,OAAO,sBAA2B,CAAE,CAAA,CACrP,CAAE,KAAM,QAAA,CAAU,OAAA,CAAS,EAAC,CAAG,WAAA,CAAa,gDAAiD,YAAA,CAAc,IAAA,CAAM,eAAA,CAAiB,KAAA,CAAO,OAAQ,IAAA,CAAM,WAAA,CAAa,MAAO,WAAA,CAAa,MAAA,CAAQ,SAAU,MAAA,CAAQ,OAAA,CAAS,IAAM,OAAO,uBAA4B,CAAE,CAAA,CACtQ,CAAE,IAAA,CAAM,QAAA,CAAU,QAAS,CAAC,aAAa,CAAA,CAAG,WAAA,CAAa,0CAA2C,YAAA,CAAc,IAAA,CAAM,gBAAiB,KAAA,CAAO,MAAA,CAAQ,KAAM,WAAA,CAAa,IAAA,CAAM,WAAA,CAAa,MAAA,CAAQ,SAAU,MAAA,CAAQ,OAAA,CAAS,IA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AI,CAAA,CAAG,CACzE,GAAM,CAAE,WAAA,CAAAY,CAAY,CAAA,CAAI,aAAa,wBAA6B,CAAA,CAClE,MAAMA,CAAAA,GACN,OAAA,CAAQ,GAAA,CAAI,EAAE,CAAA,CACdnC,CAAAA,CAAQ,YAAW,CACnB,MACF,CAEA,IAAMc,CAAAA,CAAWf,GAAe,CAChCc,CAAAA,CAAiBC,CAAQ,CAAA,CAEzBd,CAAAA,CAAQ,YAAY,WAAA,CAAa;AAAA,CAAI,CAAA,CAErC,MAAMA,CAAAA,CAAQ,UAAA,CAAW,OAAA,CAAQ,IAAI,EACvC,CAEAkC,CAAAA,EAAK,CAAE,KAAA,CAAOP,CAAAA,EAAQ,CACpBjB,EAASiB,CAAAA,YAAe,KAAA,CAAQA,CAAAA,CAAI,OAAA,CAAU,MAAA,CAAOA,CAAG,CAAC,CAAA,CACzD,OAAA,CAAQ,IAAA,CAAK,CAAC,EAChB,CAAC,CAAA","file":"squidcloud.js","sourcesContent":["export type CommandCategory =\n | 'auth'\n | 'storage'\n | 'deploy'\n | 'sites'\n | 'scripts'\n | 'automations'\n | 'forms'\n | 'sign'\n | 'time'\n | 'monitor'\n | 'logs'\n | 'collab'\n | 'tunnel'\n | 'id'\n | 'project'\n | 'utility'\n\nexport interface CommandDescriptor {\n name: string\n aliases: string[]\n description: string\n requiresAuth: boolean\n requiresProject: boolean\n ciSafe: boolean\n jsonSupport: boolean\n dangerLevel: 'safe' | 'caution' | 'destructive'\n category: CommandCategory\n handler: () => Promise<{ default: (...args: unknown[]) => void | Promise<void> }>\n}\n\nconst REGISTRY: CommandDescriptor[] = [\n // AUTH\n { name: 'login', aliases: [], description: 'Authenticate with SquidCloud', requiresAuth: false, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/login.js') },\n { name: 'logout', aliases: [], description: 'End current CLI session and clear credentials', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/logout.js') },\n { name: 'whoami', aliases: ['auth whoami'], description: 'Show current authenticated account info', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/whoami.js') },\n { name: 'auth status', aliases: [], description: 'Detailed session health check', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/auth-status.js') },\n { name: 'auth sessions', aliases: [], description: 'List all active CLI sessions', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'auth', handler: () => import('../commands/auth/auth-sessions.js') },\n { name: 'auth revoke', aliases: [], description: 'Revoke a session or all sessions', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'destructive', category: 'auth', handler: () => import('../commands/auth/auth-revoke.js') },\n\n // STORAGE\n { name: 'storage ls', aliases: ['storage list'], description: 'List files and folders in storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-ls.js') },\n { name: 'storage upload', aliases: ['storage up'], description: 'Upload files or folders to storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-upload.js') },\n { name: 'storage download', aliases: ['storage dl'], description: 'Download files or folders from storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-download.js') },\n { name: 'storage cp', aliases: [], description: 'Copy files within storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-cp.js') },\n { name: 'storage mv', aliases: [], description: 'Move/rename files within storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'storage', handler: () => import('../commands/storage/storage-mv.js') },\n { name: 'storage rm', aliases: [], description: 'Delete files from storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'storage', handler: () => import('../commands/storage/storage-rm.js') },\n { name: 'storage mkdir', aliases: [], description: 'Create a folder in storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-mkdir.js') },\n { name: 'storage cat', aliases: [], description: 'Print file contents to terminal', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-cat.js') },\n { name: 'storage info', aliases: [], description: 'Show file metadata', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-info.js') },\n { name: 'storage share', aliases: [], description: 'Generate a share link for a file', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-share.js') },\n { name: 'storage unshare', aliases: [], description: 'Revoke all share links for a file', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'storage', handler: () => import('../commands/storage/storage-unshare.js') },\n { name: 'storage tag', aliases: [], description: 'Add or remove file tags', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-tag.js') },\n { name: 'storage search', aliases: [], description: 'Search storage by filename', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-search.js') },\n { name: 'storage diff', aliases: [], description: 'Compare local and remote storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'storage', handler: () => import('../commands/storage/storage-diff.js') },\n { name: 'storage clean', aliases: [], description: 'Clean orphaned files from storage', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'storage', handler: () => import('../commands/storage/storage-clean.js') },\n\n // DEPLOY\n { name: 'deploy', aliases: ['squidsite deploy'], description: 'Deploy a static website to SquidCloud Sites', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'deploy', handler: () => import('../commands/deploy/index.js') },\n\n // SITES\n { name: 'sites list', aliases: ['sites ls'], description: 'List all published sites', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-list.js') },\n { name: 'sites info', aliases: [], description: 'Show site details', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-info.js') },\n { name: 'sites open', aliases: [], description: 'Open site in browser', requiresAuth: true, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-open.js') },\n { name: 'sites unpublish', aliases: [], description: 'Take a site offline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'sites', handler: () => import('../commands/sites/sites-unpublish.js') },\n { name: 'sites delete', aliases: [], description: 'Permanently delete a site', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'sites', handler: () => import('../commands/sites/sites-delete.js') },\n { name: 'sites visibility', aliases: [], description: 'Change site visibility (public/private)', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'sites', handler: () => import('../commands/sites/sites-visibility.js') },\n { name: 'sites rename', aliases: [], description: 'Rename a site slug', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'sites', handler: () => import('../commands/sites/sites-rename.js') },\n { name: 'sites rollback', aliases: [], description: 'Rollback to a previous deployment', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'sites', handler: () => import('../commands/sites/sites-rollback.js') },\n { name: 'sites deploys', aliases: [], description: 'Show deployment history', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-deploys.js') },\n { name: 'sites logs', aliases: [], description: 'Stream live site access logs', requiresAuth: true, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-logs.js') },\n { name: 'sites analytics', aliases: [], description: 'Show site traffic analytics', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sites', handler: () => import('../commands/sites/sites-analytics.js') },\n { name: 'sites purge', aliases: [], description: 'Purge CDN cache for a site', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'sites', handler: () => import('../commands/sites/sites-purge.js') },\n\n // SCRIPTS (Pipelines)\n { name: 'scripts list', aliases: [], description: 'List registered SquidScripts', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-list.js') },\n { name: 'scripts run', aliases: [], description: 'Run a SquidScript pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-run.js') },\n { name: 'scripts logs', aliases: [], description: 'View pipeline run logs', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-logs.js') },\n { name: 'scripts validate', aliases: [], description: 'Validate a .squid.yml file', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-validate.js') },\n { name: 'scripts init', aliases: [], description: 'Create a new pipeline interactively', requiresAuth: true, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-init.js') },\n { name: 'scripts enable', aliases: [], description: 'Enable a disabled pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-enable.js') },\n { name: 'scripts disable', aliases: [], description: 'Disable a pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'scripts', handler: () => import('../commands/scripts/scripts-disable.js') },\n { name: 'scripts delete', aliases: [], description: 'Delete a pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'scripts', handler: () => import('../commands/scripts/scripts-delete.js') },\n { name: 'scripts status', aliases: [], description: 'Show pipeline status', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-status.js') },\n { name: 'scripts cancel', aliases: [], description: 'Cancel a running pipeline', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'scripts', handler: () => import('../commands/scripts/scripts-cancel.js') },\n { name: 'scripts watch', aliases: [], description: 'Watch .squid.yml for changes', requiresAuth: false, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'scripts', handler: () => import('../commands/scripts/scripts-watch.js') },\n\n // FORMS (File Requests)\n { name: 'filereq list', aliases: ['forms list', 'filereq ls'], description: 'List file requests', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-list.js') },\n { name: 'filereq create', aliases: ['forms create'], description: 'Create a file request', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-create.js') },\n { name: 'filereq info', aliases: ['forms info'], description: 'View file request details', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-info.js') },\n { name: 'filereq submissions', aliases: ['forms submissions'], description: 'View file request submissions', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-submissions.js') },\n { name: 'filereq export', aliases: ['forms export'], description: 'Export submissions as CSV', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-export.js') },\n { name: 'filereq clear', aliases: ['forms clear'], description: 'Clear all submissions', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'forms', handler: () => import('../commands/forms/forms-clear.js') },\n { name: 'filereq delete', aliases: ['forms delete'], description: 'Delete a file request', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'forms', handler: () => import('../commands/forms/forms-delete.js') },\n { name: 'filereq embed', aliases: ['forms embed'], description: 'Get HTML embed snippet', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'forms', handler: () => import('../commands/forms/forms-embed.js') },\n\n // SQUIDTIME\n { name: 'time lock', aliases: [], description: 'Time-lock a file or folder', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'time', handler: () => import('../commands/time/time-lock.js') },\n { name: 'time unlock', aliases: [], description: 'Unlock a time-locked file', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'time', handler: () => import('../commands/time/time-unlock.js') },\n { name: 'time status', aliases: [], description: 'Check time-lock status', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'time', handler: () => import('../commands/time/time-status.js') },\n { name: 'time list', aliases: [], description: 'List all time-locked files', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'time', handler: () => import('../commands/time/time-list.js') },\n { name: 'time proof', aliases: [], description: 'Export cryptographic existence proof', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'time', handler: () => import('../commands/time/time-proof.js') },\n\n // COLLAB\n { name: 'collab invite', aliases: [], description: 'Invite a collaborator to a folder', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'collab', handler: () => import('../commands/collab/collab-invite.js') },\n { name: 'collab list', aliases: [], description: 'List folder collaborators', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'collab', handler: () => import('../commands/collab/collab-list.js') },\n { name: 'collab remove', aliases: [], description: 'Remove a collaborator', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'collab', handler: () => import('../commands/collab/collab-remove.js') },\n { name: 'collab activity', aliases: [], description: 'View collaborator activity feed', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'collab', handler: () => import('../commands/collab/collab-activity.js') },\n { name: 'collab leave', aliases: [], description: 'Leave a shared folder', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'collab', handler: () => import('../commands/collab/collab-leave.js') },\n { name: 'collab transfer', aliases: [], description: 'Transfer folder ownership', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'collab', handler: () => import('../commands/collab/collab-transfer.js') },\n\n // SQUIDSIGN\n { name: 'sign request', aliases: [], description: 'Request a digital signature', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-request.js') },\n { name: 'sign status', aliases: [], description: 'Check signing request status', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-status.js') },\n { name: 'sign list', aliases: [], description: 'List signing requests', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-list.js') },\n { name: 'sign cancel', aliases: [], description: 'Cancel a signing request', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'caution', category: 'sign', handler: () => import('../commands/sign/sign-cancel.js') },\n { name: 'sign verify', aliases: [], description: 'Verify a signed document', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-verify.js') },\n { name: 'sign download', aliases: [], description: 'Download signed document', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'sign', handler: () => import('../commands/sign/sign-download.js') },\n\n // MONITOR\n { name: 'monitor', aliases: [], description: 'At-a-glance SquidCloud health dashboard', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor.js') },\n { name: 'monitor sites', aliases: [], description: 'Site health overview', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor-sites.js') },\n { name: 'monitor pipelines', aliases: [], description: 'Pipeline health overview', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor-pipelines.js') },\n { name: 'monitor storage', aliases: [], description: 'Storage health report', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor-storage.js') },\n { name: 'monitor automations', aliases: [], description: 'Automation health overview', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'monitor', handler: () => import('../commands/monitor/monitor-automations.js') },\n\n // LOGS\n { name: 'logs tail', aliases: [], description: 'Stream live logs', requiresAuth: true, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'logs', handler: () => import('../commands/logs/logs-tail.js') },\n { name: 'logs search', aliases: [], description: 'Search historical logs', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'logs', handler: () => import('../commands/logs/logs-search.js') },\n { name: 'logs export', aliases: [], description: 'Export logs as JSONL or CSV', requiresAuth: true, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'logs', handler: () => import('../commands/logs/logs-export.js') },\n\n // UTILITY\n { name: 'doctor', aliases: [], description: 'Run system diagnostics', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/doctor.js') },\n { name: 'version', aliases: ['--version', '-v'], description: 'Show CLI version', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/version.js') },\n { name: 'config list', aliases: ['config ls'], description: 'List CLI configuration', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/config.js') },\n { name: 'config set', aliases: [], description: 'Set a config value', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/config-set.js') },\n { name: 'config get', aliases: [], description: 'Get a config value', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/config-get.js') },\n { name: 'config delete', aliases: [], description: 'Delete a config value', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/config-delete.js') },\n { name: 'config reset', aliases: [], description: 'Reset all configuration', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'destructive', category: 'utility', handler: () => import('../commands/util/config-reset.js') },\n { name: 'completion', aliases: [], description: 'Generate shell completion scripts', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: false, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/completion.js') },\n { name: 'feedback', aliases: [], description: 'Submit feedback or report a bug', requiresAuth: false, requiresProject: false, ciSafe: false, jsonSupport: false, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/feedback.js') },\n { name: 'update', aliases: [], description: 'Update the CLI to latest version', requiresAuth: false, requiresProject: false, ciSafe: true, jsonSupport: true, dangerLevel: 'safe', category: 'utility', handler: () => import('../commands/util/update.js') },\n]\n\nexport function getCommand(name: string): CommandDescriptor | undefined {\n const parts = name.trim().toLowerCase().split(/\\s+/)\n return REGISTRY.find(cmd => {\n const cmdParts = cmd.name.split(/\\s+/)\n if (parts.join(' ') === cmd.name) return true\n for (const alias of cmd.aliases) {\n const aliasParts = alias.split(/\\s+/)\n const expandedAlias = (aliasParts[0] === cmdParts[0] && aliasParts.length > 1) ? alias : null\n if (parts.join(' ') === alias) return true\n }\n return false\n })\n}\n\nexport function getCategory(cat: CommandCategory): CommandDescriptor[] {\n return REGISTRY.filter(cmd => cmd.category === cat)\n}\n\nexport function getAllCommands(): CommandDescriptor[] {\n return [...REGISTRY]\n}\n\nexport function getCISafeCommands(): CommandDescriptor[] {\n return REGISTRY.filter(cmd => cmd.ciSafe)\n}\n","#!/usr/bin/env node\nimport { Command } from 'commander'\nimport { setJsonMode, logError, writeAudit } from '../lib/output/index.js'\nimport { isCI } from '../lib/utils/ci-detect.js'\nimport { getAllCommands, CommandDescriptor } from '../registry/index.js'\nimport { loadSession, shouldRefreshToken } from '../lib/auth/session.js'\nimport { refreshAccessToken } from '../lib/auth/refresh.js'\n\nconst program = new Command()\nconst pkg = { version: '1.0.0', name: '@squidcloud/cli', description: 'SquidCloud CLI — static sites, storage, pipelines, and more.' }\n\nprogram\n .name('squidcloud')\n .description(pkg.description)\n .version(pkg.version, '-v, --version', 'Display CLI version')\n .option('--output <format>', 'Output format (json)', 'text')\n .hook('preAction', async (thisCommand) => {\n const opts = thisCommand.optsWithGlobals()\n if (opts.output === 'json') {\n setJsonMode(true)\n }\n if (isCI()) {\n setJsonMode(false)\n }\n })\n\nasync function ensureAuth(descriptor: CommandDescriptor): Promise<void> {\n if (!descriptor.requiresAuth) return\n const session = await loadSession()\n if (!session) {\n logError('Not authenticated. Run `squidcloud login` first.')\n process.exit(1)\n }\n if (shouldRefreshToken(session)) {\n const refreshed = await refreshAccessToken()\n if (!refreshed) {\n logError('Session expired. Please run `squidcloud login` again.')\n process.exit(1)\n }\n }\n}\n\nfunction buildCommandTree(commands: CommandDescriptor[]): void {\n const tree = new Map<string, Map<string, CommandDescriptor>>()\n\n for (const cmd of commands) {\n const parts = cmd.name.split(' ')\n if (parts.length === 1) {\n tree.set(cmd.name, new Map())\n } else if (parts.length === 2) {\n const [parent, child] = parts\n if (!tree.has(parent!)) {\n tree.set(parent!, new Map())\n }\n tree.get(parent!)!.set(child!, cmd)\n }\n }\n\n for (const [name, children] of tree) {\n if (children.size === 0) {\n const cmd = commands.find(c => c.name === name)!\n const c = program.command(name)\n c.description(cmd.description)\n if (cmd.aliases.length > 0) {\n c.aliases(cmd.aliases)\n }\n c.action(async (...args: unknown[]) => {\n try {\n await ensureAuth(cmd)\n const mod = await cmd.handler()\n if (typeof mod.default === 'function') {\n const actionArgs = args.slice(0, -2)\n await mod.default(...actionArgs)\n }\n writeAudit(cmd.name, process.argv.slice(2).join(' '), 0)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n logError(message)\n writeAudit(cmd.name, process.argv.slice(2).join(' '), 1)\n process.exit(1)\n }\n })\n } else {\n const parentCmd = program.command(name)\n parentCmd.description(`SquidCloud ${name} commands`)\n for (const [childName, childCmd] of children) {\n const fullName = `${name} ${childName}`\n const c = parentCmd.command(childName)\n c.description(childCmd.description)\n if (childCmd.aliases.length > 0) {\n c.aliases(childCmd.aliases.map(a => a.replace(`${name} `, '')))\n }\n c.action(async (...args: unknown[]) => {\n try {\n await ensureAuth(childCmd)\n const mod = await childCmd.handler()\n if (typeof mod.default === 'function') {\n const actionArgs = args.slice(0, -2)\n await mod.default(...actionArgs)\n }\n writeAudit(fullName, process.argv.slice(2).join(' '), 0)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n logError(message)\n writeAudit(fullName, process.argv.slice(2).join(' '), 1)\n process.exit(1)\n }\n })\n }\n }\n }\n}\n\nasync function main(): Promise<void> {\n const args = process.argv.slice(2)\n\n if (args.includes('--version') || args.includes('-v')) {\n const { showVersion } = await import('../commands/util/version.js')\n await showVersion()\n return\n }\n\n if (args.length === 0 && !args.includes('--help') && !args.includes('-h')) {\n const { showVersion } = await import('../commands/util/version.js')\n await showVersion()\n console.log('')\n program.outputHelp()\n return\n }\n\n const commands = getAllCommands()\n buildCommandTree(commands)\n\n program.addHelpText('beforeAll', '\\n')\n\n await program.parseAsync(process.argv)\n}\n\nmain().catch((err) => {\n logError(err instanceof Error ? err.message : String(err))\n process.exit(1)\n})\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-NDB6KXYI.js';import {a as a$1}from'./chunk-SVR7W7MP.js';import {d,c,a as a$2}from'./chunk-W6CRHANC.js';import {nanoid}from'nanoid';var _=3,b=1e3,k=1e3,A=a(),x=0;async function I(){let e=Date.now()-x;e<k&&await new Promise(n=>setTimeout(n,k-e)),x=Date.now();}function D(){return nanoid(21)}async function $(t,e,n,s,o){let m=`${t}:${e}:${n}:${s}`;return a$2(new TextEncoder().encode(o),m)}async function g(t,e={}){let{method:n="GET",headers:s={},body:o,authenticated:m=false,retries:f=_}=e;await I();let d$1=D(),u=Date.now(),r={"Content-Type":"application/json","X-SQC-Request-ID":d$1,"X-SQC-Timestamp":String(u),...s};if(m){let i=await d();if(i){let c$1=c();r["X-SQC-Fingerprint"]=c$1,i.access_token&&(r.Authorization=`Bearer ${i.access_token}`,r["X-SQC-Signature"]=await $(d$1,u,n,t,i.access_token));}}let p=`${A}${t}`,a={method:n,headers:r};o&&n!=="GET"&&(a.body=JSON.stringify(o));let S=null;for(let i=0;i<=f;i++)try{let c=await fetch(p,a);if(c.status===401&&m){let T=await a$1();if(T){r.Authorization=`Bearer ${T.access_token}`,r["X-SQC-Signature"]=await $(d$1,u,n,t,T.access_token),a.headers=r;let h=await fetch(p,a);return y(h)}}return y(c)}catch(c){if(S=c instanceof Error?c:new Error(String(c)),i<f){let T=b*Math.pow(2,i)*(.5+Math.random()*.5);await new Promise(h=>setTimeout(h,T));}}throw S||new Error(`Request failed: ${t}`)}async function y(t){if(t.status===204)return;if((t.headers.get("content-type")||"").includes("application/json")){let s=await t.json();if(!t.ok){let o=s?.error?.message||s?.message||`HTTP ${t.status}`;throw new w(o,t.status,s?.error)}return s}if(!t.ok){let s=await t.text();throw new w(s||`HTTP ${t.status}`,t.status)}return await t.text()}var w=class extends Error{constructor(n,s,o){super(n);this.status=s;this.details=o;this.name="ApiError";}status;details};async function F(t,e){return g(t,{...e,method:"GET"})}async function G(t,e,n){return g(t,{...n,method:"POST",body:e})}async function L(t,e,n){return g(t,{...n,method:"PUT",body:e})}async function j(t,e){return g(t,{...e,method:"DELETE"})}async function z(t,e,n){let{method:s="POST",headers:o={},authenticated:m=false}=n||{},f=D(),d$1=Date.now(),u={...o,"X-SQC-Request-ID":f,"X-SQC-Timestamp":String(d$1)};if(m){let a=await d();a&&(u["X-SQC-Fingerprint"]=c(),a.access_token&&(u.Authorization=`Bearer ${a.access_token}`));}let r=`${A}${t}`,p=await fetch(r,{method:s,headers:u,body:e});return y(p)}export{g as a,w as b,F as c,G as d,L as e,j as f,z as g};//# sourceMappingURL=chunk-MU5KHPCI.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-MU5KHPCI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/api/client.ts"],"names":["MAX_RETRIES","BASE_DELAY","RATE_LIMIT_WINDOW","API_BASE","getApiBase","lastRequestTime","rateLimit","elapsed","r","buildRequestId","nanoid","signRequest","requestId","timestamp","method","path","accessToken","data","computeHMAC","apiRequest","options","headers","body","authenticated","retries","reqHeaders","session","loadSession","fingerprint","computeDeviceFingerprint","url","fetchOptions","lastError","attempt","response","newSession","refreshAccessToken","retryResponse","handleResponse","err","delay","message","ApiError","text","status","details","apiGet","apiPost","apiPut","apiDelete","apiUpload","formData"],"mappings":"0JAOA,IAAMA,EAAc,CAAA,CACdC,CAAAA,CAAa,GAAA,CACbC,CAAAA,CAAoB,GAAA,CACpBC,CAAAA,CAAWC,CAAAA,EAAW,CAUxBC,EAAkB,CAAA,CAEtB,eAAeC,CAAAA,EAA2B,CAExC,IAAMC,CAAAA,CADM,IAAA,CAAK,GAAA,GACKF,CAAAA,CAClBE,CAAAA,CAAUL,CAAAA,EACZ,MAAM,IAAI,OAAA,CAAQM,CAAAA,EAAK,UAAA,CAAWA,EAAGN,CAAAA,CAAoBK,CAAO,CAAC,CAAA,CAEnEF,CAAAA,CAAkB,IAAA,CAAK,GAAA,GACzB,CAEA,SAASI,CAAAA,EAAyB,CAChC,OAAOC,MAAAA,CAAO,EAAE,CAClB,CAEA,eAAeC,CAAAA,CAAYC,CAAAA,CAAmBC,CAAAA,CAAmBC,CAAAA,CAAgBC,CAAAA,CAAcC,CAAAA,CAAsC,CACnI,IAAMC,EAAO,CAAA,EAAGL,CAAS,CAAA,CAAA,EAAIC,CAAS,CAAA,CAAA,EAAIC,CAAM,CAAA,CAAA,EAAIC,CAAI,GACxD,OAAOG,GAAAA,CAAY,IAAI,WAAA,EAAY,CAAE,MAAA,CAAOF,CAAW,CAAA,CAAGC,CAAI,CAChE,CAEA,eAAsBE,CAAAA,CAAcJ,CAAAA,CAAcK,CAAAA,CAA0B,EAAC,CAAe,CAC1F,GAAM,CAAE,MAAA,CAAAN,CAAAA,CAAS,KAAA,CAAO,OAAA,CAAAO,CAAAA,CAAU,GAAI,IAAA,CAAAC,CAAAA,CAAM,aAAA,CAAAC,CAAAA,CAAgB,KAAA,CAAO,OAAA,CAAAC,CAAAA,CAAUxB,CAAY,EAAIoB,CAAAA,CAE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sourcesContent":["import { nanoid } from 'nanoid'\nimport { computeHMAC } from '../crypto/ssp.js'\nimport { loadSession } from '../auth/session.js'\nimport { refreshAccessToken } from '../auth/refresh.js'\nimport { computeDeviceFingerprint } from '../auth/fingerprint.js'\nimport { getApiBase } from './cert-pin.js'\n\nconst MAX_RETRIES = 3\nconst BASE_DELAY = 1000\nconst RATE_LIMIT_WINDOW = 1000\nconst API_BASE = getApiBase()\n\ninterface RequestOptions {\n method?: string\n headers?: Record<string, string>\n body?: unknown\n authenticated?: boolean\n retries?: number\n}\n\nlet lastRequestTime = 0\n\nasync function rateLimit(): Promise<void> {\n const now = Date.now()\n const elapsed = now - lastRequestTime\n if (elapsed < RATE_LIMIT_WINDOW) {\n await new Promise(r => setTimeout(r, RATE_LIMIT_WINDOW - elapsed))\n }\n lastRequestTime = Date.now()\n}\n\nfunction buildRequestId(): string {\n return nanoid(21)\n}\n\nasync function signRequest(requestId: string, timestamp: number, method: string, path: string, accessToken: string): Promise<string> {\n const data = `${requestId}:${timestamp}:${method}:${path}`\n return computeHMAC(new TextEncoder().encode(accessToken), data)\n}\n\nexport async function apiRequest<T>(path: string, options: RequestOptions = {}): Promise<T> {\n const { method = 'GET', headers = {}, body, authenticated = false, retries = MAX_RETRIES } = options\n\n await rateLimit()\n\n const requestId = buildRequestId()\n const timestamp = Date.now()\n\n const reqHeaders: Record<string, string> = {\n 'Content-Type': 'application/json',\n 'X-SQC-Request-ID': requestId,\n 'X-SQC-Timestamp': String(timestamp),\n ...headers,\n }\n\n if (authenticated) {\n let session = await loadSession()\n if (session) {\n const fingerprint = computeDeviceFingerprint()\n reqHeaders['X-SQC-Fingerprint'] = fingerprint\n\n if (session.access_token) {\n reqHeaders['Authorization'] = `Bearer ${session.access_token}`\n reqHeaders['X-SQC-Signature'] = await signRequest(requestId, timestamp, method, path, session.access_token)\n }\n }\n }\n\n const url = `${API_BASE}${path}`\n const fetchOptions: RequestInit = {\n method,\n headers: reqHeaders,\n }\n\n if (body && method !== 'GET') {\n fetchOptions.body = JSON.stringify(body)\n }\n\n let lastError: Error | null = null\n for (let attempt = 0; attempt <= retries; attempt++) {\n try {\n const response = await fetch(url, fetchOptions)\n\n if (response.status === 401 && authenticated) {\n const newSession = await refreshAccessToken()\n if (newSession) {\n reqHeaders['Authorization'] = `Bearer ${newSession.access_token}`\n reqHeaders['X-SQC-Signature'] = await signRequest(requestId, timestamp, method, path, newSession.access_token)\n fetchOptions.headers = reqHeaders\n const retryResponse = await fetch(url, fetchOptions)\n return handleResponse<T>(retryResponse)\n }\n }\n\n return handleResponse<T>(response)\n } catch (err) {\n lastError = err instanceof Error ? err : new Error(String(err))\n if (attempt < retries) {\n const delay = BASE_DELAY * Math.pow(2, attempt) * (0.5 + Math.random() * 0.5)\n await new Promise(r => setTimeout(r, delay))\n }\n }\n }\n\n throw lastError || new Error(`Request failed: ${path}`)\n}\n\nasync function handleResponse<T>(response: Response): Promise<T> {\n if (response.status === 204) {\n return undefined as T\n }\n const contentType = response.headers.get('content-type') || ''\n if (contentType.includes('application/json')) {\n const data = await response.json()\n if (!response.ok) {\n const message = data?.error?.message || data?.message || `HTTP ${response.status}`\n throw new ApiError(message, response.status, data?.error)\n }\n return data as T\n }\n if (!response.ok) {\n const text = await response.text()\n throw new ApiError(text || `HTTP ${response.status}`, response.status)\n }\n const text = await response.text()\n return text as unknown as T\n}\n\nexport class ApiError extends Error {\n constructor(\n message: string,\n public status: number,\n public details?: unknown,\n ) {\n super(message)\n this.name = 'ApiError'\n }\n}\n\nexport async function apiGet<T>(path: string, options?: RequestOptions): Promise<T> {\n return apiRequest<T>(path, { ...options, method: 'GET' })\n}\n\nexport async function apiPost<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T> {\n return apiRequest<T>(path, { ...options, method: 'POST', body })\n}\n\nexport async function apiPut<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T> {\n return apiRequest<T>(path, { ...options, method: 'PUT', body })\n}\n\nexport async function apiDelete<T>(path: string, options?: RequestOptions): Promise<T> {\n return apiRequest<T>(path, { ...options, method: 'DELETE' })\n}\n\nexport async function apiUpload<T>(path: string, formData: FormData, options?: RequestOptions): Promise<T> {\n const { method = 'POST', headers = {}, authenticated = false } = options || {}\n const requestId = buildRequestId()\n const timestamp = Date.now()\n\n const reqHeaders: Record<string, string> = {\n ...headers,\n 'X-SQC-Request-ID': requestId,\n 'X-SQC-Timestamp': String(timestamp),\n }\n\n if (authenticated) {\n const session = await loadSession()\n if (session) {\n reqHeaders['X-SQC-Fingerprint'] = computeDeviceFingerprint()\n if (session.access_token) {\n reqHeaders['Authorization'] = `Bearer ${session.access_token}`\n }\n }\n }\n\n const url = `${API_BASE}${path}`\n const response = await fetch(url, {\n method,\n headers: reqHeaders,\n body: formData,\n })\n\n return handleResponse<T>(response)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {f}from'./chunk-QT7R3AXE.js';import t from'ora';import o from'chalk';function n(){return !!(process.env.CI||process.env.GITHUB_ACTIONS||process.env.GITLAB_CI||process.env.CIRCLECI)}var a={dots:{spinner:"dots"},moon:{spinner:"moon"},arc:{spinner:"arc"},bounce:{spinner:"bounce"},shark:{spinner:{interval:120,frames:["\u25B8 ","\u25B8\u25B8 ","\u25B8\u25B8\u25B8 ","\u25B8\u25B8\u25B8\u25B8"," \u25B8\u25B8\u25B8\u25B8"," \u25B8\u25B8\u25B8"," \u25B8\u25B8"," \u25B8"]}}};function c(e,i="shark"){if(n()||f()){let r={...t({text:e,spinner:"dots"}),start:()=>(n()||console.log(e),r),stop:()=>(n()||console.log(),r),succeed:()=>(n()||console.log(`${o.green("\u2713")} ${e}`),r),fail:()=>(n()||console.log(`${o.red("\u2717")} ${e}`),r),warn:()=>(n()||console.log(`${o.hex("#FF9800")("\u26A0")} ${e}`),r),info:()=>(n()||console.log(`${o.hex("#4FC3F7")("\u2139")} ${e}`),r),stopAndPersist:()=>(n()||console.log(`${e}`),r),clear:()=>r,render:()=>r,frame:()=>" ",text:e,isSpinning:false,indent:0,color:"cyan",prefixText:"",spinner:{interval:100,frames:[""]}};return r}return t({text:e,...a[i]}).start()}export{c as a};//# sourceMappingURL=chunk-PSJQAIDB.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-PSJQAIDB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/output/index.ts","../src/lib/output/spinner.ts"],"names":["isCI","SPINNER_FRAMES","createSpinner","text","style","isJsonMode","silent","ora","chalk"],"mappings":"4EAMO,SAASA,CAAAA,EAAgB,CAC9B,OAAO,CAAC,EACN,OAAA,CAAQ,GAAA,CAAI,EAAA,EACZ,OAAA,CAAQ,GAAA,CAAI,cAAA,EACZ,OAAA,CAAQ,GAAA,CAAI,SAAA,EACZ,OAAA,CAAQ,GAAA,CAAI,QAAA,CAEhB,CCTA,IAAMC,CAAAA,CAA8C,CAClD,IAAA,CAAM,CAAE,OAAA,CAAS,MAAO,CAAA,CACxB,IAAA,CAAM,CAAE,OAAA,CAAS,MAAO,CAAA,CACxB,GAAA,CAAK,CAAE,QAAS,KAAM,CAAA,CACtB,MAAA,CAAQ,CAAE,OAAA,CAAS,QAAS,CAAA,CAC5B,KAAA,CAAO,CAAE,OAAA,CAAS,CAAE,QAAA,CAAU,GAAA,CAAK,MAAA,CAAQ,CAAC,WAAA,CAAQ,gBAAA,CAAQ,qBAAA,CAAQ,0BAAA,CAAQ,2BAAA,CAAS,sBAAA,CAAS,iBAAA,CAAS,YAAO,CAAE,CAAE,CACpH,CAAA,CAEO,SAASC,CAAAA,CAAcC,EAAcC,CAAAA,CAAqC,OAAA,CAAc,CAC7F,GAAIJ,CAAAA,EAAK,EAAKK,CAAAA,EAAW,CAAG,CAC1B,IAAMC,CAAAA,CAAc,CAClB,GAAGC,CAAAA,CAAI,CAAE,IAAA,CAAAJ,CAAAA,CAAM,OAAA,CAAS,MAAO,CAAC,CAAA,CAChC,KAAA,CAAO,KAAaH,CAAAA,EAAK,EAAG,OAAA,CAAQ,GAAA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AAA,CAAU,GAAA,CAAK,MAAA,CAAQ,CAAC,EAAE,CAAE,CACzC,CAAA,CACA,OAAOG,CACT,CACA,OAAOC,CAAAA,CAAI,CAAE,IAAA,CAAAJ,CAAAA,CAAM,GAAGF,CAAAA,CAAeG,CAAK,CAAE,CAAC,CAAA,CAAE,KAAA,EACjD","file":"chunk-PSJQAIDB.js","sourcesContent":["export { renderMascot, renderBrandedMascot } from './mascot.js'\nexport { brand, brandDim, brandLine, success, error, warn, info, muted, copied, BRAND_MARKER, SUCCESS_MARK, ERROR_MARK, WARN_MARK, INFO_MARK, PROGRESS_MARK } from './brand.js'\nexport { setJsonMode, isJsonMode, log, logSuccess, logError, logWarn, logInfo, logBrand, logRaw, logJSON, logErrorJSON, writeAudit } from './logger.js'\nexport { createSpinner } from './spinner.js'\nexport { createTable, renderTable, renderCompactTable } from './table.js'\n\nexport function isCI(): boolean {\n return !!(\n process.env.CI ||\n process.env.GITHUB_ACTIONS ||\n process.env.GITLAB_CI ||\n process.env.CIRCLECI\n )\n}\n","import ora, { Ora } from 'ora'\nimport chalk from 'chalk'\nimport { isCI, isJsonMode } from './index.js'\n\nconst SPINNER_FRAMES: Record<string, ora.Options> = {\n dots: { spinner: 'dots' },\n moon: { spinner: 'moon' },\n arc: { spinner: 'arc' },\n bounce: { spinner: 'bounce' },\n shark: { spinner: { interval: 120, frames: ['▸ ', '▸▸ ', '▸▸▸ ', '▸▸▸▸', ' ▸▸▸▸', ' ▸▸▸', ' ▸▸', ' ▸'] } },\n}\n\nexport function createSpinner(text: string, style: keyof typeof SPINNER_FRAMES = 'shark'): Ora {\n if (isCI() || isJsonMode()) {\n const silent: Ora = {\n ...ora({ text, spinner: 'dots' }),\n start: () => { if (!isCI()) console.log(text); return silent },\n stop: () => { if (!isCI()) console.log(); return silent },\n succeed: () => { if (!isCI()) console.log(`${chalk.green('✓')} ${text}`); return silent },\n fail: () => { if (!isCI()) console.log(`${chalk.red('✗')} ${text}`); return silent },\n warn: () => { if (!isCI()) console.log(`${chalk.hex('#FF9800')('⚠')} ${text}`); return silent },\n info: () => { if (!isCI()) console.log(`${chalk.hex('#4FC3F7')('ℹ')} ${text}`); return silent },\n stopAndPersist: () => { if (!isCI()) console.log(`${text}`); return silent },\n clear: () => { return silent },\n render: () => { return silent },\n frame: () => ' ',\n text,\n isSpinning: false,\n indent: 0,\n color: 'cyan',\n prefixText: '',\n spinner: { interval: 100, frames: [''] },\n } as unknown as Ora\n return silent\n }\n return ora({ text, ...SPINNER_FRAMES[style] }).start()\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {d as d$1,c,f as f$1,e}from'./chunk-W6CRHANC.js';import s from'fs';import f from'path';import d from'os';var l="https://aouqcwbdoyrccjcrhzzi.supabase.co",y="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFvdXFjd2Jkb3lyY2NqY3JoenppIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDI5NjAyMTEsImV4cCI6MjA1ODUzNjIxMX0.b_VHC6uP3Efw3o_yibCoZKmsCIVZgOJ4FUF1NK-nd7U",r=f.join(d.homedir(),".squidcloud",".refresh.lock");function S(){let n=f.dirname(r);s.existsSync(n)||s.mkdirSync(n,{recursive:true,mode:448});}async function h(){S();let n=false,t=0;for(;!n&&t<50;)try{let i=s.openSync(r,"wx");s.writeSync(i,String(process.pid)),s.closeSync(i),n=!0;}catch{let i=s.statSync(r);if(Date.now()-i.mtimeMs>1e4)try{s.unlinkSync(r);}catch{}await new Promise(e=>setTimeout(e,100)),t++;}return ()=>{try{s.unlinkSync(r);}catch{}}}async function b(){let n=await h();try{let t=await d$1();if(!t)return null;let i=c();if(t.device_fingerprint!==i)return await f$1(),null;let a=await fetch(`${l}/auth/v1/token?grant_type=refresh_token`,{method:"POST",headers:{"Content-Type":"application/json",apikey:y},body:JSON.stringify({refresh_token:t.refresh_token})});if(!a.ok)return await f$1(),null;let e$1=await a.json(),c$1={...t,access_token:e$1.access_token,refresh_token:e$1.refresh_token,expires_at:e$1.expires_at*1e3,issued_at:Date.now(),device_fingerprint:i,user:{id:e$1.user.id,email:e$1.user.email,username:e$1.user.user_metadata?.username||e$1.user.email.split("@")[0]||"user",plan:"free"}};return await e(c$1),c$1}catch{return await f$1(),null}finally{n();}}
|
|
2
|
+
export{b as a};//# sourceMappingURL=chunk-SVR7W7MP.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-SVR7W7MP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/auth/refresh.ts"],"names":["SUPABASE_URL","ANON_KEY","LOCK_FILE","path","os","ensureLockDir","dir","fs","acquireLock","acquired","attempts","fd","stat","r","refreshAccessToken","release","session","loadSession","fingerprint","computeDeviceFingerprint","clearSession","response","data","newSession","saveSession"],"mappings":"gHAOA,IAAMA,CAAAA,CAAe,0CAAA,CACfC,CAAAA,CAAW,mNAEXC,CAAAA,CAAYC,CAAAA,CAAK,IAAA,CAAKC,CAAAA,CAAG,OAAA,EAAQ,CAAG,aAAA,CAAe,eAAe,CAAA,CAExE,SAASC,CAAAA,EAAsB,CAC7B,IAAMC,CAAAA,CAAMH,CAAAA,CAAK,OAAA,CAAQD,CAAS,CAAA,CAC7BK,CAAAA,CAAG,UAAA,CAAWD,CAAG,CAAA,EACpBC,CAAAA,CAAG,SAAA,CAAUD,CAAAA,CAAK,CAAE,SAAA,CAAW,IAAA,CAAM,IAAA,CAAM,GAAM,CAAC,EAEtD,CAEA,eAAeE,CAAAA,EAAmC,CAChDH,CAAAA,EAAc,CACd,IAAII,CAAAA,CAAW,KAAA,CACXC,CAAAA,CAAW,CAAA,CACf,KAAO,CAACD,CAAAA,EAAYC,CAAAA,CAAW,EAAA,EAC7B,GAAI,CACF,IAAMC,CAAAA,CAAKJ,CAAAA,CAAG,QAAA,CAASL,CAAAA,CAAW,IAAI,CAAA,CACtCK,CAAAA,CAAG,SAAA,CAAUI,CAAA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,KAGT,IAAME,GAAAA,CAAgC,MAAMD,CAAAA,CAAS,IAAA,EAAK,CAEpDE,GAAAA,CAA2B,CAC/B,GAAGP,CAAAA,CACH,YAAA,CAAcM,GAAAA,CAAK,YAAA,CACnB,aAAA,CAAeA,GAAAA,CAAK,aAAA,CACpB,WAAYA,GAAAA,CAAK,UAAA,CAAa,GAAA,CAC9B,SAAA,CAAW,IAAA,CAAK,GAAA,EAAI,CACpB,kBAAA,CAAoBJ,CAAAA,CACpB,IAAA,CAAM,CACJ,EAAA,CAAII,GAAAA,CAAK,IAAA,CAAK,EAAA,CACd,KAAA,CAAOA,IAAK,IAAA,CAAK,KAAA,CACjB,QAAA,CAAWA,GAAAA,CAAK,IAAA,CAAK,aAAA,EAAe,QAAA,EAAuBA,GAAAA,CAAK,IAAA,CAAK,KAAA,CAAM,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA,EAAK,MAAA,CAC5F,KAAM,MACR,CACF,CAAA,CACA,OAAA,MAAME,CAAAA,CAAYD,GAAU,CAAA,CACrBA,GACT,MAAQ,CACN,OAAA,MAAMH,GAAAA,EAAa,CACZ,IACT,CAAA,OAAE,CACAL,CAAAA,GACF,CACF","file":"chunk-SVR7W7MP.js","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport os from 'node:os'\nimport { SquidSession } from '../crypto/ssp.js'\nimport { computeDeviceFingerprint } from './fingerprint.js'\nimport { loadSession, saveSession, clearSession } from './session.js'\n\nconst SUPABASE_URL = 'https://aouqcwbdoyrccjcrhzzi.supabase.co'\nconst ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFvdXFjd2Jkb3lyY2NqY3JoenppIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDI5NjAyMTEsImV4cCI6MjA1ODUzNjIxMX0.b_VHC6uP3Efw3o_yibCoZKmsCIVZgOJ4FUF1NK-nd7U'\n\nconst LOCK_FILE = path.join(os.homedir(), '.squidcloud', '.refresh.lock')\n\nfunction ensureLockDir(): void {\n const dir = path.dirname(LOCK_FILE)\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true, mode: 0o700 })\n }\n}\n\nasync function acquireLock(): Promise<() => void> {\n ensureLockDir()\n let acquired = false\n let attempts = 0\n while (!acquired && attempts < 50) {\n try {\n const fd = fs.openSync(LOCK_FILE, 'wx')\n fs.writeSync(fd, String(process.pid))\n fs.closeSync(fd)\n acquired = true\n } catch {\n const stat = fs.statSync(LOCK_FILE)\n const age = Date.now() - stat.mtimeMs\n if (age > 10000) {\n try { fs.unlinkSync(LOCK_FILE) } catch {}\n }\n await new Promise(r => setTimeout(r, 100))\n attempts++\n }\n }\n return () => {\n try { fs.unlinkSync(LOCK_FILE) } catch {}\n }\n}\n\ninterface SupabaseRefreshResponse {\n access_token: string\n token_type: string\n expires_in: number\n expires_at: number\n refresh_token: string\n user: {\n id: string\n email: string\n user_metadata: Record<string, unknown>\n }\n}\n\nexport async function refreshAccessToken(): Promise<SquidSession | null> {\n const release = await acquireLock()\n try {\n const session = await loadSession()\n if (!session) return null\n\n const fingerprint = computeDeviceFingerprint()\n if (session.device_fingerprint !== fingerprint) {\n await clearSession()\n return null\n }\n\n const response = await fetch(`${SUPABASE_URL}/auth/v1/token?grant_type=refresh_token`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'apikey': ANON_KEY,\n },\n body: JSON.stringify({ refresh_token: session.refresh_token }),\n })\n\n if (!response.ok) {\n await clearSession()\n return null\n }\n\n const data: SupabaseRefreshResponse = await response.json()\n\n const newSession: SquidSession = {\n ...session,\n access_token: data.access_token,\n refresh_token: data.refresh_token,\n expires_at: data.expires_at * 1000,\n issued_at: Date.now(),\n device_fingerprint: fingerprint,\n user: {\n id: data.user.id,\n email: data.user.email,\n username: (data.user.user_metadata?.username as string) || data.user.email.split('@')[0] || 'user',\n plan: 'free',\n },\n }\n await saveSession(newSession)\n return newSession\n } catch {\n await clearSession()\n return null\n } finally {\n release()\n }\n}\n"]}
|