@mx-space/cli 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -28
- package/ROADMAP.md +4 -3
- package/dist/{Lexical.dev-DpU35QTu.mjs → Lexical.dev-CMevU1DO.mjs} +1 -1
- package/dist/{Lexical.dev-DpU35QTu.mjs.map → Lexical.dev-CMevU1DO.mjs.map} +1 -1
- package/dist/{Lexical.node-gYNDt_p9.mjs → Lexical.node-BR9e7Cyk.mjs} +2 -2
- package/dist/{Lexical.node-gYNDt_p9.mjs.map → Lexical.node-BR9e7Cyk.mjs.map} +1 -1
- package/dist/{Lexical.prod-t4c3bHV3.mjs → Lexical.prod-PUD-z9fY.mjs} +1 -1
- package/dist/{Lexical.prod-t4c3bHV3.mjs.map → Lexical.prod-PUD-z9fY.mjs.map} +1 -1
- package/dist/{LexicalClipboard.dev-CdeeWCIq.mjs → LexicalClipboard.dev-DZC2zppG.mjs} +6 -6
- package/dist/{LexicalClipboard.dev-CdeeWCIq.mjs.map → LexicalClipboard.dev-DZC2zppG.mjs.map} +1 -1
- package/dist/{LexicalClipboard.node-0e9GBL1g.mjs → LexicalClipboard.node-e5G1wVGb.mjs} +2 -2
- package/dist/{LexicalClipboard.node-0e9GBL1g.mjs.map → LexicalClipboard.node-e5G1wVGb.mjs.map} +1 -1
- package/dist/{LexicalClipboard.prod-CsCWYmV7.mjs → LexicalClipboard.prod-DE2azzIb.mjs} +6 -6
- package/dist/{LexicalClipboard.prod-CsCWYmV7.mjs.map → LexicalClipboard.prod-DE2azzIb.mjs.map} +1 -1
- package/dist/{LexicalCodeCore.dev-haI2cqH8.mjs → LexicalCodeCore.dev-gs--x55I.mjs} +3 -3
- package/dist/{LexicalCodeCore.dev-haI2cqH8.mjs.map → LexicalCodeCore.dev-gs--x55I.mjs.map} +1 -1
- package/dist/{LexicalCodeCore.prod-D_k7zuE5.mjs → LexicalCodeCore.prod-DPHOnyEj.mjs} +3 -3
- package/dist/{LexicalCodeCore.prod-D_k7zuE5.mjs.map → LexicalCodeCore.prod-DPHOnyEj.mjs.map} +1 -1
- package/dist/{LexicalDragon.dev-CAggdFh_.mjs → LexicalDragon.dev-CVe8bzVN.mjs} +3 -3
- package/dist/{LexicalDragon.dev-CAggdFh_.mjs.map → LexicalDragon.dev-CVe8bzVN.mjs.map} +1 -1
- package/dist/{LexicalDragon.node-QMR_wqJg.mjs → LexicalDragon.node-c7EHvcnK.mjs} +2 -2
- package/dist/{LexicalDragon.node-QMR_wqJg.mjs.map → LexicalDragon.node-c7EHvcnK.mjs.map} +1 -1
- package/dist/{LexicalDragon.prod-OssQhwS-.mjs → LexicalDragon.prod-D6KvqyLD.mjs} +3 -3
- package/dist/{LexicalDragon.prod-OssQhwS-.mjs.map → LexicalDragon.prod-D6KvqyLD.mjs.map} +1 -1
- package/dist/{LexicalExtension.dev-CtDZiMCU.mjs → LexicalExtension.dev-PDo8HyEw.mjs} +3 -3
- package/dist/{LexicalExtension.dev-CtDZiMCU.mjs.map → LexicalExtension.dev-PDo8HyEw.mjs.map} +1 -1
- package/dist/{LexicalExtension.node-BM0gh8zu.mjs → LexicalExtension.node-BKzjRb-0.mjs} +2 -2
- package/dist/{LexicalExtension.node-BM0gh8zu.mjs.map → LexicalExtension.node-BKzjRb-0.mjs.map} +1 -1
- package/dist/{LexicalExtension.prod-Ug6emhEO.mjs → LexicalExtension.prod-D0x_lX7q.mjs} +3 -3
- package/dist/{LexicalExtension.prod-Ug6emhEO.mjs.map → LexicalExtension.prod-D0x_lX7q.mjs.map} +1 -1
- package/dist/{LexicalHeadless.dev-D4yQpl_s.mjs → LexicalHeadless.dev-DBKcW82j.mjs} +2 -2
- package/dist/{LexicalHeadless.dev-D4yQpl_s.mjs.map → LexicalHeadless.dev-DBKcW82j.mjs.map} +1 -1
- package/dist/{LexicalHeadless.prod-jeN65B3k.mjs → LexicalHeadless.prod-D4nEh7cR.mjs} +2 -2
- package/dist/{LexicalHeadless.prod-jeN65B3k.mjs.map → LexicalHeadless.prod-D4nEh7cR.mjs.map} +1 -1
- package/dist/{LexicalHtml.dev-BdU1_ITQ.mjs → LexicalHtml.dev-vsWW05es.mjs} +4 -4
- package/dist/{LexicalHtml.dev-BdU1_ITQ.mjs.map → LexicalHtml.dev-vsWW05es.mjs.map} +1 -1
- package/dist/{LexicalHtml.node-DLtAh00E.mjs → LexicalHtml.node-CpibAfba.mjs} +2 -2
- package/dist/{LexicalHtml.node-DLtAh00E.mjs.map → LexicalHtml.node-CpibAfba.mjs.map} +1 -1
- package/dist/{LexicalHtml.prod-DdLE1HHT.mjs → LexicalHtml.prod-Bqz-3WAp.mjs} +4 -4
- package/dist/{LexicalHtml.prod-DdLE1HHT.mjs.map → LexicalHtml.prod-Bqz-3WAp.mjs.map} +1 -1
- package/dist/{LexicalLink.dev-DK87Biuy.mjs → LexicalLink.dev-BO0J0B1E.mjs} +4 -4
- package/dist/{LexicalLink.dev-DK87Biuy.mjs.map → LexicalLink.dev-BO0J0B1E.mjs.map} +1 -1
- package/dist/{LexicalLink.prod-fssuv6Sf.mjs → LexicalLink.prod-D66AhUCZ.mjs} +4 -4
- package/dist/{LexicalLink.prod-fssuv6Sf.mjs.map → LexicalLink.prod-D66AhUCZ.mjs.map} +1 -1
- package/dist/{LexicalList.dev-BJ4dr_rk.mjs → LexicalList.dev-DVGTWRk0.mjs} +4 -4
- package/dist/{LexicalList.dev-BJ4dr_rk.mjs.map → LexicalList.dev-DVGTWRk0.mjs.map} +1 -1
- package/dist/{LexicalList.prod-jWBbaWfi.mjs → LexicalList.prod-Bao7NGl7.mjs} +4 -4
- package/dist/{LexicalList.prod-jWBbaWfi.mjs.map → LexicalList.prod-Bao7NGl7.mjs.map} +1 -1
- package/dist/{LexicalMarkdown.dev-C8e-eh6y.mjs → LexicalMarkdown.dev-CRWkZwlp.mjs} +4 -4
- package/dist/{LexicalMarkdown.dev-C8e-eh6y.mjs.map → LexicalMarkdown.dev-CRWkZwlp.mjs.map} +1 -1
- package/dist/{LexicalMarkdown.prod-k73tZVb2.mjs → LexicalMarkdown.prod-tGG6js4r.mjs} +4 -4
- package/dist/{LexicalMarkdown.prod-k73tZVb2.mjs.map → LexicalMarkdown.prod-tGG6js4r.mjs.map} +1 -1
- package/dist/{LexicalRichText.dev-CrSqq3K-.mjs → LexicalRichText.dev-DPXfQePC.mjs} +6 -6
- package/dist/{LexicalRichText.dev-CrSqq3K-.mjs.map → LexicalRichText.dev-DPXfQePC.mjs.map} +1 -1
- package/dist/{LexicalRichText.node-B7k7wlQz.mjs → LexicalRichText.node-BEkm_YwY.mjs} +5 -5
- package/dist/{LexicalRichText.node-B7k7wlQz.mjs.map → LexicalRichText.node-BEkm_YwY.mjs.map} +1 -1
- package/dist/{LexicalRichText.prod-CqvyxQ9m.mjs → LexicalRichText.prod-DlfudC5w.mjs} +6 -6
- package/dist/{LexicalRichText.prod-CqvyxQ9m.mjs.map → LexicalRichText.prod-DlfudC5w.mjs.map} +1 -1
- package/dist/{LexicalSelection.dev-sNOHKHe_.mjs → LexicalSelection.dev-BVTArZ-b.mjs} +2 -2
- package/dist/{LexicalSelection.dev-sNOHKHe_.mjs.map → LexicalSelection.dev-BVTArZ-b.mjs.map} +1 -1
- package/dist/{LexicalSelection.node-Di7GwBCZ.mjs → LexicalSelection.node-CQ8iTYsz.mjs} +2 -2
- package/dist/{LexicalSelection.node-Di7GwBCZ.mjs.map → LexicalSelection.node-CQ8iTYsz.mjs.map} +1 -1
- package/dist/{LexicalSelection.prod-SWllPJop.mjs → LexicalSelection.prod-BZKGGs-G.mjs} +2 -2
- package/dist/{LexicalSelection.prod-SWllPJop.mjs.map → LexicalSelection.prod-BZKGGs-G.mjs.map} +1 -1
- package/dist/{LexicalTable.dev-CQkLHXJx.mjs → LexicalTable.dev-C-AOEpJn.mjs} +5 -5
- package/dist/{LexicalTable.dev-CQkLHXJx.mjs.map → LexicalTable.dev-C-AOEpJn.mjs.map} +1 -1
- package/dist/{LexicalTable.prod-BtqCwKSi.mjs → LexicalTable.prod-Cyn0qWxZ.mjs} +5 -5
- package/dist/{LexicalTable.prod-BtqCwKSi.mjs.map → LexicalTable.prod-Cyn0qWxZ.mjs.map} +1 -1
- package/dist/{LexicalUtils.dev-DiUpsXE8.mjs → LexicalUtils.dev-DRRDyAlS.mjs} +3 -3
- package/dist/{LexicalUtils.dev-DiUpsXE8.mjs.map → LexicalUtils.dev-DRRDyAlS.mjs.map} +1 -1
- package/dist/{LexicalUtils.node-CmK462d1.mjs → LexicalUtils.node-Dz-HANi6.mjs} +2 -2
- package/dist/{LexicalUtils.node-CmK462d1.mjs.map → LexicalUtils.node-Dz-HANi6.mjs.map} +1 -1
- package/dist/{LexicalUtils.prod-bWwV4GAF.mjs → LexicalUtils.prod-CmeHwh8W.mjs} +3 -3
- package/dist/{LexicalUtils.prod-bWwV4GAF.mjs.map → LexicalUtils.prod-CmeHwh8W.mjs.map} +1 -1
- package/dist/{auth-OeKZZ_2x.mjs → auth-CAKmTDpF.mjs} +11 -11
- package/dist/auth-CAKmTDpF.mjs.map +1 -0
- package/dist/bin/mxs.d.mts +2 -1
- package/dist/bin/mxs.mjs +402 -55
- package/dist/bin/mxs.mjs.map +1 -1
- package/dist/{config-store-WL7dNMS6.mjs → config-store-B8_9iStL.mjs} +21 -81
- package/dist/config-store-B8_9iStL.mjs.map +1 -0
- package/dist/{create-Cxnqt_Wt.mjs → create-5wbU7IQh.mjs} +5 -5
- package/dist/{create-Cxnqt_Wt.mjs.map → create-5wbU7IQh.mjs.map} +1 -1
- package/dist/{create-DUOSAqBm.mjs → create-Bs6K7AyQ.mjs} +3 -3
- package/dist/{create-DUOSAqBm.mjs.map → create-Bs6K7AyQ.mjs.map} +1 -1
- package/dist/{create-C85MSrtt.mjs → create-DBReocgJ.mjs} +5 -5
- package/dist/{create-C85MSrtt.mjs.map → create-DBReocgJ.mjs.map} +1 -1
- package/dist/{create-BVHnXtIH.mjs → create-DGVaE0_S.mjs} +4 -4
- package/dist/{create-BVHnXtIH.mjs.map → create-DGVaE0_S.mjs.map} +1 -1
- package/dist/{create-BWA2WGrW.mjs → create-lLFZuMsz.mjs} +3 -3
- package/dist/{create-BWA2WGrW.mjs.map → create-lLFZuMsz.mjs.map} +1 -1
- package/dist/{delete-CGy-cV6k.mjs → delete-6tkhHQDp.mjs} +5 -5
- package/dist/delete-6tkhHQDp.mjs.map +1 -0
- package/dist/{delete-CcyrLNZv.mjs → delete-CRFxitDN.mjs} +6 -6
- package/dist/delete-CRFxitDN.mjs.map +1 -0
- package/dist/{delete-Cjxehwj7.mjs → delete-DU2Hvsy8.mjs} +5 -5
- package/dist/delete-DU2Hvsy8.mjs.map +1 -0
- package/dist/{delete-BEXOOFAJ.mjs → delete-nJmHtvfq.mjs} +6 -6
- package/dist/delete-nJmHtvfq.mjs.map +1 -0
- package/dist/{delete-CKqlAUT8.mjs → delete-tJhXI8s4.mjs} +5 -5
- package/dist/delete-tJhXI8s4.mjs.map +1 -0
- package/dist/{onboarding-C1t1yoay.mjs → dist-DJF1Ntdn.mjs} +95 -173
- package/dist/dist-DJF1Ntdn.mjs.map +1 -0
- package/dist/{document-output-C5PWbz2p.mjs → document-output-BFJdwPV0.mjs} +5 -5
- package/dist/document-output-BFJdwPV0.mjs.map +1 -0
- package/dist/{edit-BuKMUNVC.mjs → edit-BMjTbPQO.mjs} +5 -5
- package/dist/edit-BMjTbPQO.mjs.map +1 -0
- package/dist/{edit-DFnOnk4i.mjs → edit-BnEmMmv6.mjs} +9 -9
- package/dist/edit-BnEmMmv6.mjs.map +1 -0
- package/dist/{edit-BRaZ6GGg.mjs → edit-C4vRSmRy.mjs} +9 -9
- package/dist/{edit-BRaZ6GGg.mjs.map → edit-C4vRSmRy.mjs.map} +1 -1
- package/dist/{edit-t108N11Q.mjs → edit-CQsW5gnk.mjs} +8 -8
- package/dist/{edit-t108N11Q.mjs.map → edit-CQsW5gnk.mjs.map} +1 -1
- package/dist/{editor-xrF-j3UE.mjs → editor-BIw1ALTF.mjs} +4 -4
- package/dist/editor-BIw1ALTF.mjs.map +1 -0
- package/dist/{envelope-overlays-DPAlMNW1.mjs → envelope-overlays-DXXygxdF.mjs} +2 -2
- package/dist/{envelope-overlays-DPAlMNW1.mjs.map → envelope-overlays-DXXygxdF.mjs.map} +1 -1
- package/dist/{get-CwcNFb39.mjs → get-B3Y5hAAO.mjs} +3 -3
- package/dist/{get-CwcNFb39.mjs.map → get-B3Y5hAAO.mjs.map} +1 -1
- package/dist/{get-DnDvLa9S.mjs → get-C5fmd5Vf.mjs} +4 -4
- package/dist/{get-DnDvLa9S.mjs.map → get-C5fmd5Vf.mjs.map} +1 -1
- package/dist/{get-Doi-NKAh.mjs → get-Cdp2tmwz.mjs} +6 -6
- package/dist/get-Cdp2tmwz.mjs.map +1 -0
- package/dist/{get-DxTU7Nom.mjs → get-D18ChSKU.mjs} +3 -3
- package/dist/{get-DxTU7Nom.mjs.map → get-D18ChSKU.mjs.map} +1 -1
- package/dist/{get-BYoAlJwB.mjs → get-NSHTGu4Y.mjs} +4 -4
- package/dist/{get-BYoAlJwB.mjs.map → get-NSHTGu4Y.mjs.map} +1 -1
- package/dist/{get-GdRz82RW.mjs → get-XBPJr95m.mjs} +4 -4
- package/dist/{get-GdRz82RW.mjs.map → get-XBPJr95m.mjs.map} +1 -1
- package/dist/index.d.mts +57 -11
- package/dist/index.mjs +11 -10
- package/dist/{list-DVunNsXr.mjs → list-B6703n9X.mjs} +3 -3
- package/dist/{list-DVunNsXr.mjs.map → list-B6703n9X.mjs.map} +1 -1
- package/dist/{list-DN81zVDA.mjs → list-BtNocJhc.mjs} +3 -3
- package/dist/{list-DN81zVDA.mjs.map → list-BtNocJhc.mjs.map} +1 -1
- package/dist/{list-DHG-MzOM.mjs → list-C9dXrU9H.mjs} +3 -3
- package/dist/{list-DHG-MzOM.mjs.map → list-C9dXrU9H.mjs.map} +1 -1
- package/dist/{list-CtME3aDw.mjs → list-CcwcYZgN.mjs} +3 -3
- package/dist/{list-CtME3aDw.mjs.map → list-CcwcYZgN.mjs.map} +1 -1
- package/dist/{list-CLAcZYZ4.mjs → list-Ctc8b5gT.mjs} +3 -3
- package/dist/{list-CLAcZYZ4.mjs.map → list-Ctc8b5gT.mjs.map} +1 -1
- package/dist/{list-DbNCVZbz.mjs → list-b60JzCTw.mjs} +3 -3
- package/dist/{list-DbNCVZbz.mjs.map → list-b60JzCTw.mjs.map} +1 -1
- package/dist/{litexml-codec-CDoRloiR.mjs → litexml-codec-CfIxcPG0.mjs} +10 -10
- package/dist/{litexml-codec-CDoRloiR.mjs.map → litexml-codec-CfIxcPG0.mjs.map} +1 -1
- package/dist/{login-mjliJn8U.mjs → login-bZx4HaVs.mjs} +21 -9
- package/dist/{login-mjliJn8U.mjs.map → login-bZx4HaVs.mjs.map} +1 -1
- package/dist/logout-C0Dzitsu.mjs +18 -0
- package/dist/logout-C0Dzitsu.mjs.map +1 -0
- package/dist/ls-wMiTXZPQ.mjs +33 -0
- package/dist/ls-wMiTXZPQ.mjs.map +1 -0
- package/dist/mark-Dh9BErsf.mjs +29 -0
- package/dist/mark-Dh9BErsf.mjs.map +1 -0
- package/dist/onboarding-Bw_I8qpf.mjs +214 -0
- package/dist/onboarding-Bw_I8qpf.mjs.map +1 -0
- package/dist/{output-CTnO1lYt.d.mts → output-D2dDlyV2.d.mts} +1 -1
- package/dist/{output-BM7aBFwt.mjs → output-vzequvhd.mjs} +52 -9
- package/dist/output-vzequvhd.mjs.map +1 -0
- package/dist/{payload-CN11pUto.mjs → payload-CO4zbNr8.mjs} +17 -17
- package/dist/payload-CO4zbNr8.mjs.map +1 -0
- package/dist/profile-CNe2uWJi.mjs +172 -0
- package/dist/profile-CNe2uWJi.mjs.map +1 -0
- package/dist/{publish-akQWYsnL.mjs → publish-CzzucXQq.mjs} +4 -4
- package/dist/{publish-akQWYsnL.mjs.map → publish-CzzucXQq.mjs.map} +1 -1
- package/dist/{publish-CN3NTJ_r.mjs → publish-DRQkpxsz.mjs} +4 -4
- package/dist/{publish-CN3NTJ_r.mjs.map → publish-DRQkpxsz.mjs.map} +1 -1
- package/dist/{resolve-CyjMlaoJ.mjs → resolve-BYg5Gees.mjs} +5 -5
- package/dist/resolve-BYg5Gees.mjs.map +1 -0
- package/dist/{resolve-Bw5Po9yK.mjs → resolve-BlpMdnaM.mjs} +4 -4
- package/dist/resolve-BlpMdnaM.mjs.map +1 -0
- package/dist/{resolve-BogJOR7R.mjs → resolve-CUsHGcb-.mjs} +4 -4
- package/dist/resolve-CUsHGcb-.mjs.map +1 -0
- package/dist/{resolve-helpers-CahPoJ0Y.mjs → resolve-helpers-CoHYa2uk.mjs} +2 -2
- package/dist/{resolve-helpers-CahPoJ0Y.mjs.map → resolve-helpers-CoHYa2uk.mjs.map} +1 -1
- package/dist/{resolve-Bp1AfBmM.mjs → resolve-jdb1VqAG.mjs} +5 -5
- package/dist/resolve-jdb1VqAG.mjs.map +1 -0
- package/dist/rm-D-2iW1Cr.mjs +33 -0
- package/dist/rm-D-2iW1Cr.mjs.map +1 -0
- package/dist/run-Dnax6uhZ.mjs +130 -0
- package/dist/run-Dnax6uhZ.mjs.map +1 -0
- package/dist/self-update-CZywTwGd.mjs +1610 -0
- package/dist/self-update-CZywTwGd.mjs.map +1 -0
- package/dist/{set-ClbrGFGv.mjs → set-Dk28LAy5.mjs} +5 -5
- package/dist/set-Dk28LAy5.mjs.map +1 -0
- package/dist/{shared-C2EAn5h_.mjs → shared-d0_6ZPn_.mjs} +13 -9
- package/dist/shared-d0_6ZPn_.mjs.map +1 -0
- package/dist/show-DScu6mXz.mjs +39 -0
- package/dist/show-DScu6mXz.mjs.map +1 -0
- package/dist/status-8F6tgphP.mjs +23 -0
- package/dist/status-8F6tgphP.mjs.map +1 -0
- package/dist/{update-dc-72pUN.mjs → update-B1LGxV0n.mjs} +6 -6
- package/dist/{update-dc-72pUN.mjs.map → update-B1LGxV0n.mjs.map} +1 -1
- package/dist/{update-CHmckeo8.mjs → update-CXetpFT3.mjs} +4 -4
- package/dist/{update-CHmckeo8.mjs.map → update-CXetpFT3.mjs.map} +1 -1
- package/dist/{update-Duh-iVOZ.mjs → update-Dr4BW8U-.mjs} +6 -6
- package/dist/{update-Duh-iVOZ.mjs.map → update-Dr4BW8U-.mjs.map} +1 -1
- package/dist/{update-qfiC-9Og.mjs → update-bqcHRJPC.mjs} +6 -6
- package/dist/update-bqcHRJPC.mjs.map +1 -0
- package/dist/{update-CJjwg09n.mjs → update-dBtzzmkN.mjs} +5 -5
- package/dist/update-dBtzzmkN.mjs.map +1 -0
- package/dist/use-D7eKESSW.mjs +29 -0
- package/dist/use-D7eKESSW.mjs.map +1 -0
- package/dist/{whoami-UwcdRchK.mjs → whoami-CKSNd6zL.mjs} +6 -6
- package/dist/whoami-CKSNd6zL.mjs.map +1 -0
- package/package.json +15 -13
- package/LICENSE +0 -33
- package/dist/auth-OeKZZ_2x.mjs.map +0 -1
- package/dist/chunk-hT5z_Zn9.mjs +0 -35
- package/dist/config-store-WL7dNMS6.mjs.map +0 -1
- package/dist/delete-BEXOOFAJ.mjs.map +0 -1
- package/dist/delete-CGy-cV6k.mjs.map +0 -1
- package/dist/delete-CKqlAUT8.mjs.map +0 -1
- package/dist/delete-CcyrLNZv.mjs.map +0 -1
- package/dist/delete-Cjxehwj7.mjs.map +0 -1
- package/dist/document-output-C5PWbz2p.mjs.map +0 -1
- package/dist/edit-BuKMUNVC.mjs.map +0 -1
- package/dist/edit-DFnOnk4i.mjs.map +0 -1
- package/dist/editor-xrF-j3UE.mjs.map +0 -1
- package/dist/get-Doi-NKAh.mjs.map +0 -1
- package/dist/logout-Bslt_ZJ4.mjs +0 -11
- package/dist/logout-Bslt_ZJ4.mjs.map +0 -1
- package/dist/onboarding-C1t1yoay.mjs.map +0 -1
- package/dist/output-BM7aBFwt.mjs.map +0 -1
- package/dist/payload-CN11pUto.mjs.map +0 -1
- package/dist/resolve-BogJOR7R.mjs.map +0 -1
- package/dist/resolve-Bp1AfBmM.mjs.map +0 -1
- package/dist/resolve-Bw5Po9yK.mjs.map +0 -1
- package/dist/resolve-CyjMlaoJ.mjs.map +0 -1
- package/dist/set-ClbrGFGv.mjs.map +0 -1
- package/dist/shared-C2EAn5h_.mjs.map +0 -1
- package/dist/status-Cvyrrx-J.mjs +0 -22
- package/dist/status-Cvyrrx-J.mjs.map +0 -1
- package/dist/update-CJjwg09n.mjs.map +0 -1
- package/dist/update-qfiC-9Og.mjs.map +0 -1
- package/dist/whoami-UwcdRchK.mjs.map +0 -1
package/dist/bin/mxs.mjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as
|
|
3
|
-
import { c as exitCodeForError, n as emitError } from "../output-
|
|
2
|
+
import { i as __commonJSMin, n as ue, o as __require, r as q, s as __toESM } from "../dist-DJF1Ntdn.mjs";
|
|
3
|
+
import { c as MxsErrorCode, l as exitCodeForError, n as emitError, s as MxsError } from "../output-vzequvhd.mjs";
|
|
4
|
+
import { f as setCurrentProfile, g as getConfigDir, h as writeProfileCredentials, m as writeProfileConfig, p as validateProfileName, r as getCurrentProfile, s as getProfilesDir } from "../profile-CNe2uWJi.mjs";
|
|
5
|
+
import { a as getLegacyConfigPath, o as getLegacyCredentialsPath } from "../config-store-B8_9iStL.mjs";
|
|
6
|
+
import { i as fetchLatestVersion, n as compareSemver } from "../self-update-CZywTwGd.mjs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { mkdirSync, promises, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
4
9
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
|
|
5
10
|
var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
11
|
/**
|
|
@@ -1017,8 +1022,8 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1017
1022
|
var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1018
1023
|
const EventEmitter = __require("node:events").EventEmitter;
|
|
1019
1024
|
const childProcess = __require("node:child_process");
|
|
1020
|
-
const path = __require("node:path");
|
|
1021
|
-
const fs = __require("node:fs");
|
|
1025
|
+
const path$1 = __require("node:path");
|
|
1026
|
+
const fs$1 = __require("node:fs");
|
|
1022
1027
|
const process$1 = __require("node:process");
|
|
1023
1028
|
const { Argument, humanReadableArgName } = require_argument();
|
|
1024
1029
|
const { CommanderError } = require_error();
|
|
@@ -1914,7 +1919,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1914
1919
|
* @param {string} subcommandName
|
|
1915
1920
|
*/
|
|
1916
1921
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
1917
|
-
if (fs.existsSync(executableFile)) return;
|
|
1922
|
+
if (fs$1.existsSync(executableFile)) return;
|
|
1918
1923
|
const executableMissing = `'${executableFile}' does not exist
|
|
1919
1924
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
1920
1925
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
@@ -1937,10 +1942,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1937
1942
|
".cjs"
|
|
1938
1943
|
];
|
|
1939
1944
|
function findFile(baseDir, baseName) {
|
|
1940
|
-
const localBin = path.resolve(baseDir, baseName);
|
|
1941
|
-
if (fs.existsSync(localBin)) return localBin;
|
|
1942
|
-
if (sourceExt.includes(path.extname(baseName))) return void 0;
|
|
1943
|
-
const foundExt = sourceExt.find((ext) => fs.existsSync(`${localBin}${ext}`));
|
|
1945
|
+
const localBin = path$1.resolve(baseDir, baseName);
|
|
1946
|
+
if (fs$1.existsSync(localBin)) return localBin;
|
|
1947
|
+
if (sourceExt.includes(path$1.extname(baseName))) return void 0;
|
|
1948
|
+
const foundExt = sourceExt.find((ext) => fs$1.existsSync(`${localBin}${ext}`));
|
|
1944
1949
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
1945
1950
|
}
|
|
1946
1951
|
this._checkForMissingMandatoryOptions();
|
|
@@ -1950,21 +1955,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1950
1955
|
if (this._scriptPath) {
|
|
1951
1956
|
let resolvedScriptPath;
|
|
1952
1957
|
try {
|
|
1953
|
-
resolvedScriptPath = fs.realpathSync(this._scriptPath);
|
|
1958
|
+
resolvedScriptPath = fs$1.realpathSync(this._scriptPath);
|
|
1954
1959
|
} catch {
|
|
1955
1960
|
resolvedScriptPath = this._scriptPath;
|
|
1956
1961
|
}
|
|
1957
|
-
executableDir = path.resolve(path.dirname(resolvedScriptPath), executableDir);
|
|
1962
|
+
executableDir = path$1.resolve(path$1.dirname(resolvedScriptPath), executableDir);
|
|
1958
1963
|
}
|
|
1959
1964
|
if (executableDir) {
|
|
1960
1965
|
let localFile = findFile(executableDir, executableFile);
|
|
1961
1966
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1962
|
-
const legacyName = path.basename(this._scriptPath, path.extname(this._scriptPath));
|
|
1967
|
+
const legacyName = path$1.basename(this._scriptPath, path$1.extname(this._scriptPath));
|
|
1963
1968
|
if (legacyName !== this._name) localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
1964
1969
|
}
|
|
1965
1970
|
executableFile = localFile || executableFile;
|
|
1966
1971
|
}
|
|
1967
|
-
launchWithNode = sourceExt.includes(path.extname(executableFile));
|
|
1972
|
+
launchWithNode = sourceExt.includes(path$1.extname(executableFile));
|
|
1968
1973
|
let proc;
|
|
1969
1974
|
if (process$1.platform !== "win32") if (launchWithNode) {
|
|
1970
1975
|
args.unshift(executableFile);
|
|
@@ -2732,7 +2737,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2732
2737
|
* @return {Command}
|
|
2733
2738
|
*/
|
|
2734
2739
|
nameFromFilename(filename) {
|
|
2735
|
-
this._name = path.basename(filename, path.extname(filename));
|
|
2740
|
+
this._name = path$1.basename(filename, path$1.extname(filename));
|
|
2736
2741
|
return this;
|
|
2737
2742
|
}
|
|
2738
2743
|
/**
|
|
@@ -3012,16 +3017,323 @@ const { program: program$1, createCommand, createArgument, createOption, Command
|
|
|
3012
3017
|
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
3013
3018
|
})))(), 1)).default;
|
|
3014
3019
|
//#endregion
|
|
3020
|
+
//#region src/core/migration.ts
|
|
3021
|
+
async function fileExists(p) {
|
|
3022
|
+
try {
|
|
3023
|
+
await promises.stat(p);
|
|
3024
|
+
return true;
|
|
3025
|
+
} catch (err) {
|
|
3026
|
+
if (err?.code === "ENOENT") return false;
|
|
3027
|
+
throw err;
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
async function dirExists(p) {
|
|
3031
|
+
try {
|
|
3032
|
+
return (await promises.stat(p)).isDirectory();
|
|
3033
|
+
} catch (err) {
|
|
3034
|
+
if (err?.code === "ENOENT") return false;
|
|
3035
|
+
throw err;
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
function emit(report, line) {
|
|
3039
|
+
if (report === null) return;
|
|
3040
|
+
if (report !== void 0) {
|
|
3041
|
+
report(line);
|
|
3042
|
+
return;
|
|
3043
|
+
}
|
|
3044
|
+
process.stderr.write(`${line}\n`);
|
|
3045
|
+
}
|
|
3046
|
+
async function tryUnlink(p, report) {
|
|
3047
|
+
try {
|
|
3048
|
+
await promises.unlink(p);
|
|
3049
|
+
} catch (err) {
|
|
3050
|
+
if (err?.code !== "ENOENT") emit(report, `mxs: warning: could not remove stale legacy file ${p}: ${err.message}`);
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
async function runLegacyMigrationIfNeeded(opts) {
|
|
3054
|
+
const report = opts?.report;
|
|
3055
|
+
const legacyConfigPath = getLegacyConfigPath();
|
|
3056
|
+
const legacyCredentialsPath = getLegacyCredentialsPath();
|
|
3057
|
+
const [hasConfig, hasCreds] = await Promise.all([fileExists(legacyConfigPath), fileExists(legacyCredentialsPath)]);
|
|
3058
|
+
if (!hasConfig && !hasCreds) return null;
|
|
3059
|
+
if (await dirExists(getProfilesDir())) {
|
|
3060
|
+
const toRemove = [];
|
|
3061
|
+
if (hasConfig) toRemove.push(legacyConfigPath);
|
|
3062
|
+
if (hasCreds) toRemove.push(legacyCredentialsPath);
|
|
3063
|
+
for (const p of toRemove) await tryUnlink(p, report);
|
|
3064
|
+
emit(report, `mxs: removed stale legacy config files at ${toRemove.join(", ")}`);
|
|
3065
|
+
return {
|
|
3066
|
+
profile: null,
|
|
3067
|
+
production: false,
|
|
3068
|
+
cleanedStaleLegacy: true
|
|
3069
|
+
};
|
|
3070
|
+
}
|
|
3071
|
+
let legacyConfig = {};
|
|
3072
|
+
if (hasConfig) try {
|
|
3073
|
+
const raw = await promises.readFile(legacyConfigPath, "utf8");
|
|
3074
|
+
legacyConfig = JSON.parse(raw);
|
|
3075
|
+
} catch (err) {
|
|
3076
|
+
if (err?.code !== "ENOENT") throw new MxsError({
|
|
3077
|
+
code: MxsErrorCode.ConfigMigrationFailed,
|
|
3078
|
+
message: `failed to read legacy config at ${legacyConfigPath}: ${err.message}`,
|
|
3079
|
+
cause: err
|
|
3080
|
+
});
|
|
3081
|
+
}
|
|
3082
|
+
let legacyCredentials = null;
|
|
3083
|
+
if (hasCreds) try {
|
|
3084
|
+
const raw = await promises.readFile(legacyCredentialsPath, "utf8");
|
|
3085
|
+
legacyCredentials = JSON.parse(raw);
|
|
3086
|
+
} catch (err) {
|
|
3087
|
+
if (err?.code !== "ENOENT") throw new MxsError({
|
|
3088
|
+
code: MxsErrorCode.ConfigMigrationFailed,
|
|
3089
|
+
message: `failed to read legacy credentials at ${legacyCredentialsPath}: ${err.message}`,
|
|
3090
|
+
cause: err
|
|
3091
|
+
});
|
|
3092
|
+
}
|
|
3093
|
+
let production = false;
|
|
3094
|
+
const tty = opts?.isTTY ?? Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
3095
|
+
const apiUrl = typeof legacyConfig.api_url === "string" ? legacyConfig.api_url : void 0;
|
|
3096
|
+
if (tty && apiUrl) {
|
|
3097
|
+
const answer = opts?.promptIsProduction ? await opts.promptIsProduction(apiUrl) : await ue({
|
|
3098
|
+
message: `Is "${apiUrl}" a production environment?`,
|
|
3099
|
+
initialValue: false
|
|
3100
|
+
});
|
|
3101
|
+
production = q(answer) ? false : Boolean(answer);
|
|
3102
|
+
}
|
|
3103
|
+
const migratedConfig = { ...legacyConfig };
|
|
3104
|
+
if (production) migratedConfig.production = true;
|
|
3105
|
+
else delete migratedConfig.production;
|
|
3106
|
+
try {
|
|
3107
|
+
await writeProfileConfig("default", migratedConfig);
|
|
3108
|
+
} catch (err) {
|
|
3109
|
+
throw new MxsError({
|
|
3110
|
+
code: MxsErrorCode.ConfigMigrationFailed,
|
|
3111
|
+
message: `failed to write profile config during migration: ${err.message}`,
|
|
3112
|
+
cause: err
|
|
3113
|
+
});
|
|
3114
|
+
}
|
|
3115
|
+
if (legacyCredentials !== null) try {
|
|
3116
|
+
await writeProfileCredentials("default", legacyCredentials);
|
|
3117
|
+
} catch (err) {
|
|
3118
|
+
throw new MxsError({
|
|
3119
|
+
code: MxsErrorCode.ConfigMigrationFailed,
|
|
3120
|
+
message: `failed to write profile credentials during migration: ${err.message}`,
|
|
3121
|
+
cause: err
|
|
3122
|
+
});
|
|
3123
|
+
}
|
|
3124
|
+
await setCurrentProfile("default");
|
|
3125
|
+
if (hasConfig) await tryUnlink(legacyConfigPath, report);
|
|
3126
|
+
if (hasCreds) await tryUnlink(legacyCredentialsPath, report);
|
|
3127
|
+
emit(report, `mxs: migrated single-profile config to profile 'default'.`);
|
|
3128
|
+
return {
|
|
3129
|
+
profile: "default",
|
|
3130
|
+
production,
|
|
3131
|
+
cleanedStaleLegacy: false
|
|
3132
|
+
};
|
|
3133
|
+
}
|
|
3134
|
+
//#endregion
|
|
3135
|
+
//#region src/core/preaction-guards.ts
|
|
3136
|
+
/**
|
|
3137
|
+
* Single source of truth for preAction exemptions.
|
|
3138
|
+
*
|
|
3139
|
+
* Any command registration in bin/mxs.ts (or future Task 4 profile commands)
|
|
3140
|
+
* MUST match the names declared here exactly — this is the contract.
|
|
3141
|
+
*/
|
|
3142
|
+
/** Parent command names whose entire subtree is exempt from the none_active guard. */
|
|
3143
|
+
const PREACTION_EXEMPT_PARENTS = new Set(["profile"]);
|
|
3144
|
+
/**
|
|
3145
|
+
* Individual (parent, name) pairs that are exempt regardless of profile state.
|
|
3146
|
+
* `auth login` is included unconditionally so a fresh install can bootstrap.
|
|
3147
|
+
*/
|
|
3148
|
+
const PREACTION_EXEMPT_COMMANDS = [{
|
|
3149
|
+
parent: "auth",
|
|
3150
|
+
name: "login"
|
|
3151
|
+
}];
|
|
3152
|
+
/**
|
|
3153
|
+
* Top-level command names that are exempt from the profile.none_active guard.
|
|
3154
|
+
* Used for commands that should work without a configured server (e.g. `mxs update`).
|
|
3155
|
+
*/
|
|
3156
|
+
const PREACTION_EXEMPT_TOPLEVEL = new Set(["update"]);
|
|
3157
|
+
/** Returns true if the command is exempt from the profile.none_active guard. */
|
|
3158
|
+
function isPreActionExempt(input) {
|
|
3159
|
+
return PREACTION_EXEMPT_PARENTS.has(input.parentName) || input.commandName === "profile" || PREACTION_EXEMPT_TOPLEVEL.has(input.commandName) || PREACTION_EXEMPT_COMMANDS.some((c) => c.parent === input.parentName && c.name === input.commandName);
|
|
3160
|
+
}
|
|
3161
|
+
/**
|
|
3162
|
+
* Returns true if the guard should throw profile.none_active.
|
|
3163
|
+
* A resolved profile, any URL override, or an exempt command all suppress it.
|
|
3164
|
+
*/
|
|
3165
|
+
function requiresActiveProfile(input) {
|
|
3166
|
+
if (input.profileFlag || input.envProfile) return false;
|
|
3167
|
+
if (input.apiUrlFlag || input.envApiUrl) return false;
|
|
3168
|
+
if (input.currentProfile) return false;
|
|
3169
|
+
if (isPreActionExempt(input)) return false;
|
|
3170
|
+
return true;
|
|
3171
|
+
}
|
|
3172
|
+
//#endregion
|
|
3173
|
+
//#region src/core/update-notifier.ts
|
|
3174
|
+
const CACHE_FILE = "update-check.json";
|
|
3175
|
+
const THROTTLE_MS = 1440 * 60 * 1e3;
|
|
3176
|
+
const FETCH_TIMEOUT_MS = 3e3;
|
|
3177
|
+
function cachePath(ctx) {
|
|
3178
|
+
return path.join(ctx.configDir ?? getConfigDir(), CACHE_FILE);
|
|
3179
|
+
}
|
|
3180
|
+
function readCache(ctx = { currentVersion: "0.0.0" }) {
|
|
3181
|
+
try {
|
|
3182
|
+
const raw = readFileSync(cachePath(ctx), "utf8");
|
|
3183
|
+
const parsed = JSON.parse(raw);
|
|
3184
|
+
if (typeof parsed?.last_check_ts !== "number") return null;
|
|
3185
|
+
return parsed;
|
|
3186
|
+
} catch {
|
|
3187
|
+
return null;
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
function writeCacheAtomic(state, ctx = { currentVersion: "0.0.0" }) {
|
|
3191
|
+
const target = cachePath(ctx);
|
|
3192
|
+
const dir = path.dirname(target);
|
|
3193
|
+
try {
|
|
3194
|
+
mkdirSync(dir, { recursive: true });
|
|
3195
|
+
} catch {}
|
|
3196
|
+
const tmp = `${target}.tmp`;
|
|
3197
|
+
writeFileSync(tmp, JSON.stringify(state));
|
|
3198
|
+
renameSync(tmp, target);
|
|
3199
|
+
}
|
|
3200
|
+
function shouldSkipNotify(ctx) {
|
|
3201
|
+
const env = ctx.env ?? process.env;
|
|
3202
|
+
if (ctx.quiet || ctx.json) return true;
|
|
3203
|
+
if (ctx.output === "json") return true;
|
|
3204
|
+
if (env.CI && env.CI !== "" && env.CI !== "0" && env.CI !== "false") return true;
|
|
3205
|
+
if (env.MXS_NO_UPDATE_CHECK === "1") return true;
|
|
3206
|
+
if (ctx.isTTY === false) return true;
|
|
3207
|
+
if (ctx.commandName === "update") return true;
|
|
3208
|
+
if (ctx.parentName === "update") return true;
|
|
3209
|
+
return false;
|
|
3210
|
+
}
|
|
3211
|
+
function emitNotification(ctx, current, latest) {
|
|
3212
|
+
const msg = `mxs update available: ${current} → ${latest} run 'mxs update' to upgrade`;
|
|
3213
|
+
if (ctx.emit) {
|
|
3214
|
+
ctx.emit(msg);
|
|
3215
|
+
return;
|
|
3216
|
+
}
|
|
3217
|
+
process.stderr.write(`${msg}\n`);
|
|
3218
|
+
}
|
|
3219
|
+
/**
|
|
3220
|
+
* Fire-and-forget update notifier. Never throws. Returns a promise that callers
|
|
3221
|
+
* may optionally await in tests; production code drops the promise on the floor.
|
|
3222
|
+
*/
|
|
3223
|
+
async function maybeNotify(ctx) {
|
|
3224
|
+
try {
|
|
3225
|
+
if (shouldSkipNotify(ctx)) return;
|
|
3226
|
+
const now = (ctx.now ?? Date.now)();
|
|
3227
|
+
const cache = readCache(ctx);
|
|
3228
|
+
const channel = ctx.channel ?? readChannelFromEnv(ctx.env ?? process.env);
|
|
3229
|
+
if (cache && !ctx.force && now - cache.last_check_ts < THROTTLE_MS) {
|
|
3230
|
+
if (cache.latest_version && compareSemver(ctx.currentVersion, cache.latest_version) < 0) emitNotification(ctx, ctx.currentVersion, cache.latest_version);
|
|
3231
|
+
return;
|
|
3232
|
+
}
|
|
3233
|
+
const controller = new AbortController();
|
|
3234
|
+
const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
|
|
3235
|
+
if (typeof timer.unref === "function") timer.unref();
|
|
3236
|
+
try {
|
|
3237
|
+
const hit = await fetchLatestVersion(channel, {
|
|
3238
|
+
etag: cache?.etag,
|
|
3239
|
+
signal: controller.signal,
|
|
3240
|
+
fetchImpl: ctx.fetchImpl
|
|
3241
|
+
});
|
|
3242
|
+
clearTimeout(timer);
|
|
3243
|
+
if ("notModified" in hit && hit.notModified) {
|
|
3244
|
+
writeCacheAtomic({
|
|
3245
|
+
last_check_ts: now,
|
|
3246
|
+
latest_version: cache?.latest_version,
|
|
3247
|
+
etag: cache?.etag
|
|
3248
|
+
}, ctx);
|
|
3249
|
+
return;
|
|
3250
|
+
}
|
|
3251
|
+
writeCacheAtomic({
|
|
3252
|
+
last_check_ts: now,
|
|
3253
|
+
latest_version: hit.version,
|
|
3254
|
+
etag: hit.etag
|
|
3255
|
+
}, ctx);
|
|
3256
|
+
} catch {
|
|
3257
|
+
clearTimeout(timer);
|
|
3258
|
+
writeCacheAtomic({
|
|
3259
|
+
last_check_ts: now,
|
|
3260
|
+
latest_version: cache?.latest_version,
|
|
3261
|
+
etag: cache?.etag
|
|
3262
|
+
}, ctx);
|
|
3263
|
+
}
|
|
3264
|
+
} catch {}
|
|
3265
|
+
}
|
|
3266
|
+
function readChannelFromEnv(env) {
|
|
3267
|
+
return env.MXS_UPDATE_CHANNEL === "next" ? "next" : "stable";
|
|
3268
|
+
}
|
|
3269
|
+
/**
|
|
3270
|
+
* Construct a NotifyContext from current process + global flags.
|
|
3271
|
+
*/
|
|
3272
|
+
function buildContextFromFlags(input) {
|
|
3273
|
+
return {
|
|
3274
|
+
currentVersion: input.currentVersion,
|
|
3275
|
+
quiet: input.flags.quiet,
|
|
3276
|
+
json: input.flags.json,
|
|
3277
|
+
output: input.flags.output,
|
|
3278
|
+
commandName: input.commandName,
|
|
3279
|
+
parentName: input.parentName,
|
|
3280
|
+
force: input.force,
|
|
3281
|
+
isTTY: Boolean(process.stderr.isTTY),
|
|
3282
|
+
env: process.env
|
|
3283
|
+
};
|
|
3284
|
+
}
|
|
3285
|
+
//#endregion
|
|
3015
3286
|
//#region src/bin/mxs.ts
|
|
3287
|
+
const CLI_VERSION = "0.2.0";
|
|
3016
3288
|
const program = new Command();
|
|
3017
|
-
program.name("mxs").description("mx-space CLI — manage your mx-core blog from the command line").version(
|
|
3289
|
+
program.name("mxs").description("mx-space CLI — manage your mx-core blog from the command line").version(CLI_VERSION).option("--json", "emit JSON output").option("--output <mode>", "pretty-json | json | readable | llm | envelope").option("--api-url <url>", "override the configured API URL").option("--token <t>", "override the stored access token").option("--api-key <key>", "authenticate with an x-api-key API key").option("--lang <code>", "request translated read data for a locale").option("-q, --quiet", "suppress non-error stderr").option("--verbose", "log HTTP method/url/status/duration").option("--dry-run", "show resolved payload without calling the server").option("--profile <name>", "profile to use (overrides MXS_PROFILE and the active profile pointer)");
|
|
3290
|
+
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
3291
|
+
const opts = thisCommand.optsWithGlobals();
|
|
3292
|
+
if (opts.profile) try {
|
|
3293
|
+
validateProfileName(opts.profile);
|
|
3294
|
+
} catch (err) {
|
|
3295
|
+
if (err instanceof MxsError) throw new MxsError({
|
|
3296
|
+
code: MxsErrorCode.ProfileInvalidName,
|
|
3297
|
+
message: err.message,
|
|
3298
|
+
hint: "profile name must match ^[a-z0-9_-]{1,32}$ and must not be \"current\""
|
|
3299
|
+
});
|
|
3300
|
+
throw err;
|
|
3301
|
+
}
|
|
3302
|
+
await runLegacyMigrationIfNeeded({ report: opts.quiet ? null : void 0 });
|
|
3303
|
+
const currentProfile = await getCurrentProfile();
|
|
3304
|
+
if (requiresActiveProfile({
|
|
3305
|
+
profileFlag: opts.profile,
|
|
3306
|
+
apiUrlFlag: opts.apiUrl,
|
|
3307
|
+
envProfile: process.env.MXS_PROFILE?.trim(),
|
|
3308
|
+
envApiUrl: process.env.MXS_API_URL?.trim(),
|
|
3309
|
+
currentProfile,
|
|
3310
|
+
parentName: actionCommand.parent?.name() ?? "",
|
|
3311
|
+
commandName: actionCommand.name()
|
|
3312
|
+
})) throw new MxsError({
|
|
3313
|
+
code: MxsErrorCode.ProfileNoneActive,
|
|
3314
|
+
message: "no active mxs profile",
|
|
3315
|
+
hint: "run `mxs profile use <name>` to switch, or `mxs auth login --profile <name>` to create one"
|
|
3316
|
+
});
|
|
3317
|
+
maybeNotify(buildContextFromFlags({
|
|
3318
|
+
currentVersion: CLI_VERSION,
|
|
3319
|
+
flags: {
|
|
3320
|
+
quiet: opts.quiet,
|
|
3321
|
+
json: opts.json,
|
|
3322
|
+
output: opts.output
|
|
3323
|
+
},
|
|
3324
|
+
commandName: actionCommand.name(),
|
|
3325
|
+
parentName: actionCommand.parent?.name() ?? ""
|
|
3326
|
+
}));
|
|
3327
|
+
});
|
|
3018
3328
|
addAuthCommands(program);
|
|
3329
|
+
addProfileCommands(program);
|
|
3019
3330
|
addPostCommands(program);
|
|
3020
3331
|
addNoteCommands(program);
|
|
3021
3332
|
addPageCommands(program);
|
|
3022
3333
|
addCategoryCommands(program);
|
|
3023
3334
|
addTopicCommands(program);
|
|
3024
3335
|
addConfigCommands(program);
|
|
3336
|
+
addUpdateCommand(program);
|
|
3025
3337
|
program.parseAsync(process.argv).catch((err) => {
|
|
3026
3338
|
emitError(err, readGlobalOptions(program));
|
|
3027
3339
|
process.exit(exitCodeForError(err));
|
|
@@ -3038,48 +3350,60 @@ function readGlobalOptions(cmd) {
|
|
|
3038
3350
|
function readGlobalFlags(cmd) {
|
|
3039
3351
|
return cmd.optsWithGlobals();
|
|
3040
3352
|
}
|
|
3353
|
+
function addUpdateCommand(parent) {
|
|
3354
|
+
parent.command("update").description("check for and install a newer mxs release").option("--check", "compare versions only; do not install").option("--prerelease", "use the `next` dist-tag channel").option("--pm <name>", "force package manager: npm | pnpm | yarn | bun").option("--force", "bypass the 24h passive-check cache").option("--yes", "skip the confirmation prompt").action(async (opts, command) => {
|
|
3355
|
+
const { run } = await import("../run-Dnax6uhZ.mjs");
|
|
3356
|
+
await run({
|
|
3357
|
+
check: opts.check,
|
|
3358
|
+
prerelease: opts.prerelease,
|
|
3359
|
+
pm: opts.pm,
|
|
3360
|
+
force: opts.force,
|
|
3361
|
+
yes: opts.yes
|
|
3362
|
+
}, readGlobalFlags(command), readGlobalOptions(command), CLI_VERSION);
|
|
3363
|
+
});
|
|
3364
|
+
}
|
|
3041
3365
|
function addAuthCommands(parent) {
|
|
3042
3366
|
const auth = parent.command("auth").description("authentication");
|
|
3043
|
-
auth.command("login").description("start device authorization flow").action(async (
|
|
3044
|
-
const { run } = await import("../login-
|
|
3045
|
-
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3367
|
+
auth.command("login").description("start device authorization flow").option("--production", "mark the target profile as production after login").action(async (opts, command) => {
|
|
3368
|
+
const { run } = await import("../login-bZx4HaVs.mjs");
|
|
3369
|
+
await run(readGlobalFlags(command), readGlobalOptions(command), { production: opts.production });
|
|
3046
3370
|
});
|
|
3047
3371
|
auth.command("logout").description("delete stored credentials").action(async (_opts, command) => {
|
|
3048
|
-
const { run } = await import("../logout-
|
|
3372
|
+
const { run } = await import("../logout-C0Dzitsu.mjs");
|
|
3049
3373
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3050
3374
|
});
|
|
3051
3375
|
auth.command("whoami").description("show the authenticated user").action(async (_opts, command) => {
|
|
3052
|
-
const { run } = await import("../whoami-
|
|
3376
|
+
const { run } = await import("../whoami-CKSNd6zL.mjs");
|
|
3053
3377
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3054
3378
|
});
|
|
3055
3379
|
auth.command("status").description("show token validity and expiry").action(async (_opts, command) => {
|
|
3056
|
-
const { run } = await import("../status-
|
|
3380
|
+
const { run } = await import("../status-8F6tgphP.mjs");
|
|
3057
3381
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3058
3382
|
});
|
|
3059
3383
|
}
|
|
3060
3384
|
function addPostCommands(parent) {
|
|
3061
3385
|
const post = parent.command("post").description("manage posts");
|
|
3062
3386
|
post.command("list").option("--page <n>", "page number", (v) => Number(v)).option("--size <n>", "page size", (v) => Number(v)).option("--state <s>", "draft | publish").option("--sort <s>", "created | modified").action(async (opts, command) => {
|
|
3063
|
-
const { run } = await import("../list-
|
|
3387
|
+
const { run } = await import("../list-b60JzCTw.mjs");
|
|
3064
3388
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3065
3389
|
});
|
|
3066
3390
|
post.command("get <slugOrId>").action(async (id, _opts, command) => {
|
|
3067
|
-
const { run } = await import("../get-
|
|
3391
|
+
const { run } = await import("../get-C5fmd5Vf.mjs");
|
|
3068
3392
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3069
3393
|
});
|
|
3070
3394
|
addPostWriteCommand(post, "create");
|
|
3071
3395
|
addPostWriteCommand(post, "edit", true);
|
|
3072
3396
|
addPostWriteCommand(post, "update", true);
|
|
3073
3397
|
post.command("delete <slugOrId>").option("--force", "skip confirmation").action(async (id, opts, command) => {
|
|
3074
|
-
const { run } = await import("../delete-
|
|
3398
|
+
const { run } = await import("../delete-6tkhHQDp.mjs");
|
|
3075
3399
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3076
3400
|
});
|
|
3077
3401
|
post.command("publish <slugOrId>").action(async (id, _opts, command) => {
|
|
3078
|
-
const { run } = await import("../publish-
|
|
3402
|
+
const { run } = await import("../publish-CzzucXQq.mjs");
|
|
3079
3403
|
await run(id, true, readGlobalFlags(command), readGlobalOptions(command));
|
|
3080
3404
|
});
|
|
3081
3405
|
post.command("unpublish <slugOrId>").action(async (id, _opts, command) => {
|
|
3082
|
-
const { run } = await import("../publish-
|
|
3406
|
+
const { run } = await import("../publish-CzzucXQq.mjs");
|
|
3083
3407
|
await run(id, false, readGlobalFlags(command), readGlobalOptions(command));
|
|
3084
3408
|
});
|
|
3085
3409
|
}
|
|
@@ -3091,13 +3415,13 @@ function addPostWriteCommand(parent, name, requiresId = false) {
|
|
|
3091
3415
|
const opts = args.at(-2);
|
|
3092
3416
|
const id = requiresId ? args[0] : void 0;
|
|
3093
3417
|
if (name === "create") {
|
|
3094
|
-
const { run } = await import("../create-
|
|
3418
|
+
const { run } = await import("../create-DBReocgJ.mjs");
|
|
3095
3419
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3096
3420
|
} else if (name === "edit") {
|
|
3097
|
-
const { run } = await import("../edit-
|
|
3421
|
+
const { run } = await import("../edit-CQsW5gnk.mjs");
|
|
3098
3422
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3099
3423
|
} else {
|
|
3100
|
-
const { run } = await import("../update-
|
|
3424
|
+
const { run } = await import("../update-B1LGxV0n.mjs");
|
|
3101
3425
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3102
3426
|
}
|
|
3103
3427
|
});
|
|
@@ -3108,26 +3432,26 @@ function attachPostWriteFlags(cmd) {
|
|
|
3108
3432
|
function addNoteCommands(parent) {
|
|
3109
3433
|
const note = parent.command("note").description("manage notes");
|
|
3110
3434
|
note.command("list").option("--page <n>", "", (v) => Number(v)).option("--size <n>", "", (v) => Number(v)).option("--state <s>").option("--sort <s>").action(async (opts, command) => {
|
|
3111
|
-
const { run } = await import("../list-
|
|
3435
|
+
const { run } = await import("../list-BtNocJhc.mjs");
|
|
3112
3436
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3113
3437
|
});
|
|
3114
3438
|
note.command("get <slugOrId>").action(async (id, _opts, command) => {
|
|
3115
|
-
const { run } = await import("../get-
|
|
3439
|
+
const { run } = await import("../get-Cdp2tmwz.mjs");
|
|
3116
3440
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3117
3441
|
});
|
|
3118
3442
|
addNoteWriteCommand(note, "create");
|
|
3119
3443
|
addNoteWriteCommand(note, "edit", true);
|
|
3120
3444
|
addNoteWriteCommand(note, "update", true);
|
|
3121
3445
|
note.command("delete <slugOrId>").option("--force").action(async (id, opts, command) => {
|
|
3122
|
-
const { run } = await import("../delete-
|
|
3446
|
+
const { run } = await import("../delete-tJhXI8s4.mjs");
|
|
3123
3447
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3124
3448
|
});
|
|
3125
3449
|
note.command("publish <slugOrId>").action(async (id, _opts, command) => {
|
|
3126
|
-
const { run } = await import("../publish-
|
|
3450
|
+
const { run } = await import("../publish-DRQkpxsz.mjs");
|
|
3127
3451
|
await run(id, true, readGlobalFlags(command), readGlobalOptions(command));
|
|
3128
3452
|
});
|
|
3129
3453
|
note.command("unpublish <slugOrId>").action(async (id, _opts, command) => {
|
|
3130
|
-
const { run } = await import("../publish-
|
|
3454
|
+
const { run } = await import("../publish-DRQkpxsz.mjs");
|
|
3131
3455
|
await run(id, false, readGlobalFlags(command), readGlobalOptions(command));
|
|
3132
3456
|
});
|
|
3133
3457
|
}
|
|
@@ -3139,13 +3463,13 @@ function addNoteWriteCommand(parent, name, requiresId = false) {
|
|
|
3139
3463
|
const opts = args.at(-2);
|
|
3140
3464
|
const id = requiresId ? args[0] : void 0;
|
|
3141
3465
|
if (name === "create") {
|
|
3142
|
-
const { run } = await import("../create-
|
|
3466
|
+
const { run } = await import("../create-5wbU7IQh.mjs");
|
|
3143
3467
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3144
3468
|
} else if (name === "edit") {
|
|
3145
|
-
const { run } = await import("../edit-
|
|
3469
|
+
const { run } = await import("../edit-C4vRSmRy.mjs");
|
|
3146
3470
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3147
3471
|
} else {
|
|
3148
|
-
const { run } = await import("../update-
|
|
3472
|
+
const { run } = await import("../update-Dr4BW8U-.mjs");
|
|
3149
3473
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3150
3474
|
}
|
|
3151
3475
|
});
|
|
@@ -3153,11 +3477,11 @@ function addNoteWriteCommand(parent, name, requiresId = false) {
|
|
|
3153
3477
|
function addPageCommands(parent) {
|
|
3154
3478
|
const page = parent.command("page").description("manage pages");
|
|
3155
3479
|
page.command("list").action(async (_opts, command) => {
|
|
3156
|
-
const { run } = await import("../list-
|
|
3480
|
+
const { run } = await import("../list-C9dXrU9H.mjs");
|
|
3157
3481
|
await run({}, readGlobalFlags(command), readGlobalOptions(command));
|
|
3158
3482
|
});
|
|
3159
3483
|
page.command("get <slugOrId>").action(async (id, _opts, command) => {
|
|
3160
|
-
const { run } = await import("../get-
|
|
3484
|
+
const { run } = await import("../get-XBPJr95m.mjs");
|
|
3161
3485
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3162
3486
|
});
|
|
3163
3487
|
const writeCmd = (name, requiresId) => {
|
|
@@ -3167,82 +3491,105 @@ function addPageCommands(parent) {
|
|
|
3167
3491
|
const command = args.at(-1);
|
|
3168
3492
|
const opts = args.at(-2);
|
|
3169
3493
|
const id = requiresId ? args[0] : void 0;
|
|
3170
|
-
await (name === "create" ? await import("../create-
|
|
3494
|
+
await (name === "create" ? await import("../create-DGVaE0_S.mjs") : name === "edit" ? await import("../edit-BnEmMmv6.mjs") : await import("../update-bqcHRJPC.mjs")).run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3171
3495
|
});
|
|
3172
3496
|
};
|
|
3173
3497
|
writeCmd("create", false);
|
|
3174
3498
|
writeCmd("edit", true);
|
|
3175
3499
|
writeCmd("update", true);
|
|
3176
3500
|
page.command("delete <slugOrId>").option("--force").action(async (id, opts, command) => {
|
|
3177
|
-
const { run } = await import("../delete-
|
|
3501
|
+
const { run } = await import("../delete-CRFxitDN.mjs");
|
|
3178
3502
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3179
3503
|
});
|
|
3180
3504
|
}
|
|
3181
3505
|
function addCategoryCommands(parent) {
|
|
3182
3506
|
const cat = parent.command("category").description("manage categories / tags");
|
|
3183
3507
|
cat.command("list").action(async (_o, command) => {
|
|
3184
|
-
const { run } = await import("../list-
|
|
3508
|
+
const { run } = await import("../list-Ctc8b5gT.mjs");
|
|
3185
3509
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3186
3510
|
});
|
|
3187
3511
|
cat.command("get <slugOrId>").action(async (id, _o, command) => {
|
|
3188
|
-
const { run } = await import("../get-
|
|
3512
|
+
const { run } = await import("../get-B3Y5hAAO.mjs");
|
|
3189
3513
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3190
3514
|
});
|
|
3191
3515
|
cat.command("create").requiredOption("--name <s>").requiredOption("--slug <s>").option("--type <s>", "category | tag").option("--icon <s>").action(async (opts, command) => {
|
|
3192
|
-
const { run } = await import("../create-
|
|
3516
|
+
const { run } = await import("../create-Bs6K7AyQ.mjs");
|
|
3193
3517
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3194
3518
|
});
|
|
3195
3519
|
cat.command("update <slugOrId>").option("--name <s>").option("--slug <s>").option("--type <s>").option("--icon <s>").action(async (id, opts, command) => {
|
|
3196
|
-
const { run } = await import("../update-
|
|
3520
|
+
const { run } = await import("../update-CXetpFT3.mjs");
|
|
3197
3521
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3198
3522
|
});
|
|
3199
3523
|
cat.command("delete <slugOrId>").option("--force").action(async (id, opts, command) => {
|
|
3200
|
-
const { run } = await import("../delete-
|
|
3524
|
+
const { run } = await import("../delete-DU2Hvsy8.mjs");
|
|
3201
3525
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3202
3526
|
});
|
|
3203
3527
|
}
|
|
3204
3528
|
function addTopicCommands(parent) {
|
|
3205
3529
|
const topic = parent.command("topic").description("manage topics");
|
|
3206
3530
|
topic.command("list").action(async (_o, command) => {
|
|
3207
|
-
const { run } = await import("../list-
|
|
3531
|
+
const { run } = await import("../list-B6703n9X.mjs");
|
|
3208
3532
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3209
3533
|
});
|
|
3210
3534
|
topic.command("get <slugOrId>").action(async (id, _o, command) => {
|
|
3211
|
-
const { run } = await import("../get-
|
|
3535
|
+
const { run } = await import("../get-NSHTGu4Y.mjs");
|
|
3212
3536
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3213
3537
|
});
|
|
3214
3538
|
topic.command("create").requiredOption("--name <s>").requiredOption("--slug <s>").option("--description <s>").option("--icon <s>").action(async (opts, command) => {
|
|
3215
|
-
const { run } = await import("../create-
|
|
3539
|
+
const { run } = await import("../create-lLFZuMsz.mjs");
|
|
3216
3540
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3217
3541
|
});
|
|
3218
3542
|
topic.command("update <slugOrId>").option("--name <s>").option("--slug <s>").option("--description <s>").option("--icon <s>").action(async (id, opts, command) => {
|
|
3219
|
-
const { run } = await import("../update-
|
|
3543
|
+
const { run } = await import("../update-dBtzzmkN.mjs");
|
|
3220
3544
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3221
3545
|
});
|
|
3222
3546
|
topic.command("delete <slugOrId>").option("--force").action(async (id, opts, command) => {
|
|
3223
|
-
const { run } = await import("../delete-
|
|
3547
|
+
const { run } = await import("../delete-nJmHtvfq.mjs");
|
|
3224
3548
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3225
3549
|
});
|
|
3226
3550
|
}
|
|
3227
3551
|
function addConfigCommands(parent) {
|
|
3228
3552
|
const cfg = parent.command("config").description("manage server options");
|
|
3229
3553
|
cfg.command("list").action(async (_o, command) => {
|
|
3230
|
-
const { run } = await import("../list-
|
|
3554
|
+
const { run } = await import("../list-CcwcYZgN.mjs");
|
|
3231
3555
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3232
3556
|
});
|
|
3233
3557
|
cfg.command("get <key>").action(async (key, _o, command) => {
|
|
3234
|
-
const { run } = await import("../get-
|
|
3558
|
+
const { run } = await import("../get-D18ChSKU.mjs");
|
|
3235
3559
|
await run(key, readGlobalFlags(command), readGlobalOptions(command));
|
|
3236
3560
|
});
|
|
3237
3561
|
cfg.command("set <key> <value>").option("--type <t>", "json | string | number | bool").action(async (key, value, opts, command) => {
|
|
3238
|
-
const { run } = await import("../set-
|
|
3562
|
+
const { run } = await import("../set-Dk28LAy5.mjs");
|
|
3239
3563
|
await run(key, value, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3240
3564
|
});
|
|
3241
3565
|
cfg.command("edit").action(async (_o, command) => {
|
|
3242
|
-
const { run } = await import("../edit-
|
|
3566
|
+
const { run } = await import("../edit-BMjTbPQO.mjs");
|
|
3243
3567
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3244
3568
|
});
|
|
3245
3569
|
}
|
|
3570
|
+
function addProfileCommands(parent) {
|
|
3571
|
+
const profile = parent.command("profile").description("manage mxs profiles");
|
|
3572
|
+
profile.command("ls").description("list profiles").action(async (_opts, command) => {
|
|
3573
|
+
const { run } = await import("../ls-wMiTXZPQ.mjs");
|
|
3574
|
+
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3575
|
+
});
|
|
3576
|
+
profile.command("show [name]").description("show resolved info for a profile").action(async (name, _opts, command) => {
|
|
3577
|
+
const { run } = await import("../show-DScu6mXz.mjs");
|
|
3578
|
+
await run(name, readGlobalFlags(command), readGlobalOptions(command));
|
|
3579
|
+
});
|
|
3580
|
+
profile.command("use <name>").description("set the active profile").action(async (name, _opts, command) => {
|
|
3581
|
+
const { run } = await import("../use-D7eKESSW.mjs");
|
|
3582
|
+
await run(name, readGlobalFlags(command), readGlobalOptions(command));
|
|
3583
|
+
});
|
|
3584
|
+
profile.command("mark <name>").description("toggle production flag on a profile").option("--production", "mark profile as production").option("--no-production", "mark profile as non-production").action(async (name, opts, command) => {
|
|
3585
|
+
const { run } = await import("../mark-Dh9BErsf.mjs");
|
|
3586
|
+
await run(name, { production: opts.production }, readGlobalFlags(command), readGlobalOptions(command));
|
|
3587
|
+
});
|
|
3588
|
+
profile.command("rm <name>").description("remove a profile").option("--force", "skip confirmation and allow removing current profile").action(async (name, opts, command) => {
|
|
3589
|
+
const { run } = await import("../rm-D-2iW1Cr.mjs");
|
|
3590
|
+
await run(name, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3591
|
+
});
|
|
3592
|
+
}
|
|
3246
3593
|
//#endregion
|
|
3247
3594
|
export { readGlobalFlags, readGlobalOptions };
|
|
3248
3595
|
|