@mx-space/cli 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -28
- package/ROADMAP.md +4 -3
- package/dist/{auth-OeKZZ_2x.mjs → auth-Duj8jJn9.mjs} +3 -3
- package/dist/{auth-OeKZZ_2x.mjs.map → auth-Duj8jJn9.mjs.map} +1 -1
- package/dist/bin/mxs.d.mts +2 -1
- package/dist/bin/mxs.mjs +250 -48
- package/dist/bin/mxs.mjs.map +1 -1
- package/dist/{config-store-WL7dNMS6.mjs → config-store-DmwX2iZU.mjs} +15 -76
- package/dist/config-store-DmwX2iZU.mjs.map +1 -0
- package/dist/{create-Cxnqt_Wt.mjs → create-Cqt1rrSZ.mjs} +5 -5
- package/dist/{create-Cxnqt_Wt.mjs.map → create-Cqt1rrSZ.mjs.map} +1 -1
- package/dist/{create-BWA2WGrW.mjs → create-D7cR9xcN.mjs} +3 -3
- package/dist/{create-BWA2WGrW.mjs.map → create-D7cR9xcN.mjs.map} +1 -1
- package/dist/{create-C85MSrtt.mjs → create-DAt3FXLf.mjs} +5 -5
- package/dist/{create-C85MSrtt.mjs.map → create-DAt3FXLf.mjs.map} +1 -1
- package/dist/{create-DUOSAqBm.mjs → create-_H8YO7ze.mjs} +3 -3
- package/dist/{create-DUOSAqBm.mjs.map → create-_H8YO7ze.mjs.map} +1 -1
- package/dist/{create-BVHnXtIH.mjs → create-kYlrs4d6.mjs} +4 -4
- package/dist/{create-BVHnXtIH.mjs.map → create-kYlrs4d6.mjs.map} +1 -1
- package/dist/{delete-Cjxehwj7.mjs → delete-DVNebWqO.mjs} +4 -4
- package/dist/{delete-Cjxehwj7.mjs.map → delete-DVNebWqO.mjs.map} +1 -1
- package/dist/{delete-CGy-cV6k.mjs → delete-D_NRteuq.mjs} +4 -4
- package/dist/{delete-CGy-cV6k.mjs.map → delete-D_NRteuq.mjs.map} +1 -1
- package/dist/{delete-CKqlAUT8.mjs → delete-DmKPzzsQ.mjs} +4 -4
- package/dist/{delete-CKqlAUT8.mjs.map → delete-DmKPzzsQ.mjs.map} +1 -1
- package/dist/{delete-CcyrLNZv.mjs → delete-ZIjkquZj.mjs} +4 -4
- package/dist/{delete-CcyrLNZv.mjs.map → delete-ZIjkquZj.mjs.map} +1 -1
- package/dist/{delete-BEXOOFAJ.mjs → delete-aCVSWuKi.mjs} +4 -4
- package/dist/{delete-BEXOOFAJ.mjs.map → delete-aCVSWuKi.mjs.map} +1 -1
- 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-BtY8T7eY.mjs} +3 -3
- package/dist/{document-output-C5PWbz2p.mjs.map → document-output-BtY8T7eY.mjs.map} +1 -1
- package/dist/{edit-t108N11Q.mjs → edit-BWX7X4sy.mjs} +8 -8
- package/dist/{edit-t108N11Q.mjs.map → edit-BWX7X4sy.mjs.map} +1 -1
- package/dist/{edit-BRaZ6GGg.mjs → edit-CHCuoiWT.mjs} +9 -9
- package/dist/{edit-BRaZ6GGg.mjs.map → edit-CHCuoiWT.mjs.map} +1 -1
- package/dist/{edit-BuKMUNVC.mjs → edit-DjRE8Gk-.mjs} +4 -4
- package/dist/{edit-BuKMUNVC.mjs.map → edit-DjRE8Gk-.mjs.map} +1 -1
- package/dist/{edit-DFnOnk4i.mjs → edit-R6H5RtWd.mjs} +8 -8
- package/dist/{edit-DFnOnk4i.mjs.map → edit-R6H5RtWd.mjs.map} +1 -1
- package/dist/{editor-xrF-j3UE.mjs → editor-Dywlo4-8.mjs} +2 -2
- package/dist/{editor-xrF-j3UE.mjs.map → editor-Dywlo4-8.mjs.map} +1 -1
- package/dist/{envelope-overlays-DPAlMNW1.mjs → envelope-overlays-D1gmGVe5.mjs} +2 -2
- package/dist/{envelope-overlays-DPAlMNW1.mjs.map → envelope-overlays-D1gmGVe5.mjs.map} +1 -1
- package/dist/{get-GdRz82RW.mjs → get-CiLnUGHw.mjs} +4 -4
- package/dist/{get-GdRz82RW.mjs.map → get-CiLnUGHw.mjs.map} +1 -1
- package/dist/{get-Doi-NKAh.mjs → get-CkBqVyGi.mjs} +5 -5
- package/dist/{get-Doi-NKAh.mjs.map → get-CkBqVyGi.mjs.map} +1 -1
- package/dist/{get-DxTU7Nom.mjs → get-DNdde54z.mjs} +3 -3
- package/dist/{get-DxTU7Nom.mjs.map → get-DNdde54z.mjs.map} +1 -1
- package/dist/{get-DnDvLa9S.mjs → get-DbH58EkF.mjs} +4 -4
- package/dist/{get-DnDvLa9S.mjs.map → get-DbH58EkF.mjs.map} +1 -1
- package/dist/{get-CwcNFb39.mjs → get-IQQv4_rP.mjs} +3 -3
- package/dist/{get-CwcNFb39.mjs.map → get-IQQv4_rP.mjs.map} +1 -1
- package/dist/{get-BYoAlJwB.mjs → get-xtByxURm.mjs} +4 -4
- package/dist/{get-BYoAlJwB.mjs.map → get-xtByxURm.mjs.map} +1 -1
- package/dist/index.d.mts +19 -2
- package/dist/index.mjs +9 -9
- package/dist/{list-DVunNsXr.mjs → list-Bnlg9SfR.mjs} +3 -3
- package/dist/{list-DVunNsXr.mjs.map → list-Bnlg9SfR.mjs.map} +1 -1
- package/dist/{list-CtME3aDw.mjs → list-C6z1iw4a.mjs} +3 -3
- package/dist/{list-CtME3aDw.mjs.map → list-C6z1iw4a.mjs.map} +1 -1
- package/dist/{list-CLAcZYZ4.mjs → list-CD9j9did.mjs} +3 -3
- package/dist/{list-CLAcZYZ4.mjs.map → list-CD9j9did.mjs.map} +1 -1
- package/dist/{list-DbNCVZbz.mjs → list-DVMtBAHG.mjs} +3 -3
- package/dist/{list-DbNCVZbz.mjs.map → list-DVMtBAHG.mjs.map} +1 -1
- package/dist/{list-DHG-MzOM.mjs → list-DW5TcGxS.mjs} +3 -3
- package/dist/{list-DHG-MzOM.mjs.map → list-DW5TcGxS.mjs.map} +1 -1
- package/dist/{list-DN81zVDA.mjs → list-lmpHwOQx.mjs} +3 -3
- package/dist/{list-DN81zVDA.mjs.map → list-lmpHwOQx.mjs.map} +1 -1
- package/dist/{litexml-codec-CDoRloiR.mjs → litexml-codec-D-1oggXL.mjs} +3 -3
- package/dist/{litexml-codec-CDoRloiR.mjs.map → litexml-codec-D-1oggXL.mjs.map} +1 -1
- package/dist/{login-mjliJn8U.mjs → login-D-SoeV01.mjs} +20 -9
- package/dist/{login-mjliJn8U.mjs.map → login-D-SoeV01.mjs.map} +1 -1
- package/dist/logout-D63ZU-1Q.mjs +17 -0
- package/dist/logout-D63ZU-1Q.mjs.map +1 -0
- package/dist/ls-Bz3BCcwU.mjs +32 -0
- package/dist/ls-Bz3BCcwU.mjs.map +1 -0
- package/dist/mark-N-IpKK17.mjs +28 -0
- package/dist/mark-N-IpKK17.mjs.map +1 -0
- package/dist/onboarding-FPMcuqn8.mjs +212 -0
- package/dist/onboarding-FPMcuqn8.mjs.map +1 -0
- package/dist/{output-CTnO1lYt.d.mts → output-DQMhacTo.d.mts} +1 -1
- package/dist/output-Dg8PISJM.mjs +299 -0
- package/dist/output-Dg8PISJM.mjs.map +1 -0
- package/dist/{payload-CN11pUto.mjs → payload-CjlZ9CeZ.mjs} +3 -3
- package/dist/{payload-CN11pUto.mjs.map → payload-CjlZ9CeZ.mjs.map} +1 -1
- package/dist/{publish-CN3NTJ_r.mjs → publish-C9O5obZ6.mjs} +4 -4
- package/dist/{publish-CN3NTJ_r.mjs.map → publish-C9O5obZ6.mjs.map} +1 -1
- package/dist/{publish-akQWYsnL.mjs → publish-yuM6YGSb.mjs} +4 -4
- package/dist/{publish-akQWYsnL.mjs.map → publish-yuM6YGSb.mjs.map} +1 -1
- package/dist/{resolve-Bp1AfBmM.mjs → resolve-B4-fMQ6I.mjs} +3 -3
- package/dist/{resolve-Bp1AfBmM.mjs.map → resolve-B4-fMQ6I.mjs.map} +1 -1
- package/dist/{resolve-BogJOR7R.mjs → resolve-DIu9N2sD.mjs} +2 -2
- package/dist/{resolve-BogJOR7R.mjs.map → resolve-DIu9N2sD.mjs.map} +1 -1
- package/dist/{resolve-CyjMlaoJ.mjs → resolve-TBYXBS4i.mjs} +3 -3
- package/dist/{resolve-CyjMlaoJ.mjs.map → resolve-TBYXBS4i.mjs.map} +1 -1
- package/dist/{resolve-Bw5Po9yK.mjs → resolve-U6RJ3AnQ.mjs} +3 -3
- package/dist/{resolve-Bw5Po9yK.mjs.map → resolve-U6RJ3AnQ.mjs.map} +1 -1
- package/dist/{resolve-helpers-CahPoJ0Y.mjs → resolve-helpers-C7PIVziv.mjs} +2 -2
- package/dist/{resolve-helpers-CahPoJ0Y.mjs.map → resolve-helpers-C7PIVziv.mjs.map} +1 -1
- package/dist/rm-D9GvLhhF.mjs +32 -0
- package/dist/rm-D9GvLhhF.mjs.map +1 -0
- package/dist/{set-ClbrGFGv.mjs → set-jD79hpuF.mjs} +3 -3
- package/dist/{set-ClbrGFGv.mjs.map → set-jD79hpuF.mjs.map} +1 -1
- package/dist/{shared-C2EAn5h_.mjs → shared-SryY2QPY.mjs} +12 -8
- package/dist/shared-SryY2QPY.mjs.map +1 -0
- package/dist/show-C5Zk0tcK.mjs +38 -0
- package/dist/show-C5Zk0tcK.mjs.map +1 -0
- package/dist/status-evZpPR3N.mjs +22 -0
- package/dist/status-evZpPR3N.mjs.map +1 -0
- package/dist/{update-CHmckeo8.mjs → update--7NPzL_w.mjs} +4 -4
- package/dist/{update-CHmckeo8.mjs.map → update--7NPzL_w.mjs.map} +1 -1
- package/dist/{update-qfiC-9Og.mjs → update-0q5hxJFh.mjs} +5 -5
- package/dist/{update-qfiC-9Og.mjs.map → update-0q5hxJFh.mjs.map} +1 -1
- package/dist/{update-Duh-iVOZ.mjs → update-CPJXcOg_.mjs} +6 -6
- package/dist/{update-Duh-iVOZ.mjs.map → update-CPJXcOg_.mjs.map} +1 -1
- package/dist/{update-CJjwg09n.mjs → update-DN78pXGZ.mjs} +4 -4
- package/dist/{update-CJjwg09n.mjs.map → update-DN78pXGZ.mjs.map} +1 -1
- package/dist/{update-dc-72pUN.mjs → update-hhAcAz_M.mjs} +6 -6
- package/dist/{update-dc-72pUN.mjs.map → update-hhAcAz_M.mjs.map} +1 -1
- package/dist/use-CHDCEe38.mjs +28 -0
- package/dist/use-CHDCEe38.mjs.map +1 -0
- package/dist/{whoami-UwcdRchK.mjs → whoami-BHDYyY5D.mjs} +4 -5
- package/dist/whoami-BHDYyY5D.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-hT5z_Zn9.mjs +0 -35
- package/dist/config-store-WL7dNMS6.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 +0 -120
- package/dist/output-BM7aBFwt.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/whoami-UwcdRchK.mjs.map +0 -1
package/dist/bin/mxs.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
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 MxsError, b as writeProfileConfig, l as getCurrentProfile, n as emitError, p as getProfilesDir, v as setCurrentProfile, w as exitCodeForError, x as writeProfileCredentials, y as validateProfileName } from "../output-Dg8PISJM.mjs";
|
|
4
|
+
import { a as getLegacyConfigPath, o as getLegacyCredentialsPath } from "../config-store-DmwX2iZU.mjs";
|
|
5
|
+
import { promises } from "node:fs";
|
|
4
6
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
|
|
5
7
|
var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
8
|
/**
|
|
@@ -1018,7 +1020,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1018
1020
|
const EventEmitter = __require("node:events").EventEmitter;
|
|
1019
1021
|
const childProcess = __require("node:child_process");
|
|
1020
1022
|
const path = __require("node:path");
|
|
1021
|
-
const fs = __require("node:fs");
|
|
1023
|
+
const fs$1 = __require("node:fs");
|
|
1022
1024
|
const process$1 = __require("node:process");
|
|
1023
1025
|
const { Argument, humanReadableArgName } = require_argument();
|
|
1024
1026
|
const { CommanderError } = require_error();
|
|
@@ -1914,7 +1916,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1914
1916
|
* @param {string} subcommandName
|
|
1915
1917
|
*/
|
|
1916
1918
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
1917
|
-
if (fs.existsSync(executableFile)) return;
|
|
1919
|
+
if (fs$1.existsSync(executableFile)) return;
|
|
1918
1920
|
const executableMissing = `'${executableFile}' does not exist
|
|
1919
1921
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
1920
1922
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
@@ -1938,9 +1940,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1938
1940
|
];
|
|
1939
1941
|
function findFile(baseDir, baseName) {
|
|
1940
1942
|
const localBin = path.resolve(baseDir, baseName);
|
|
1941
|
-
if (fs.existsSync(localBin)) return localBin;
|
|
1943
|
+
if (fs$1.existsSync(localBin)) return localBin;
|
|
1942
1944
|
if (sourceExt.includes(path.extname(baseName))) return void 0;
|
|
1943
|
-
const foundExt = sourceExt.find((ext) => fs.existsSync(`${localBin}${ext}`));
|
|
1945
|
+
const foundExt = sourceExt.find((ext) => fs$1.existsSync(`${localBin}${ext}`));
|
|
1944
1946
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
1945
1947
|
}
|
|
1946
1948
|
this._checkForMissingMandatoryOptions();
|
|
@@ -1950,7 +1952,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1950
1952
|
if (this._scriptPath) {
|
|
1951
1953
|
let resolvedScriptPath;
|
|
1952
1954
|
try {
|
|
1953
|
-
resolvedScriptPath = fs.realpathSync(this._scriptPath);
|
|
1955
|
+
resolvedScriptPath = fs$1.realpathSync(this._scriptPath);
|
|
1954
1956
|
} catch {
|
|
1955
1957
|
resolvedScriptPath = this._scriptPath;
|
|
1956
1958
|
}
|
|
@@ -3012,10 +3014,187 @@ const { program: program$1, createCommand, createArgument, createOption, Command
|
|
|
3012
3014
|
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
3013
3015
|
})))(), 1)).default;
|
|
3014
3016
|
//#endregion
|
|
3017
|
+
//#region src/core/migration.ts
|
|
3018
|
+
async function fileExists(p) {
|
|
3019
|
+
try {
|
|
3020
|
+
await promises.stat(p);
|
|
3021
|
+
return true;
|
|
3022
|
+
} catch (err) {
|
|
3023
|
+
if (err?.code === "ENOENT") return false;
|
|
3024
|
+
throw err;
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
async function dirExists(p) {
|
|
3028
|
+
try {
|
|
3029
|
+
return (await promises.stat(p)).isDirectory();
|
|
3030
|
+
} catch (err) {
|
|
3031
|
+
if (err?.code === "ENOENT") return false;
|
|
3032
|
+
throw err;
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
function emit(report, line) {
|
|
3036
|
+
if (report === null) return;
|
|
3037
|
+
if (report !== void 0) {
|
|
3038
|
+
report(line);
|
|
3039
|
+
return;
|
|
3040
|
+
}
|
|
3041
|
+
process.stderr.write(`${line}\n`);
|
|
3042
|
+
}
|
|
3043
|
+
async function tryUnlink(p, report) {
|
|
3044
|
+
try {
|
|
3045
|
+
await promises.unlink(p);
|
|
3046
|
+
} catch (err) {
|
|
3047
|
+
if (err?.code !== "ENOENT") emit(report, `mxs: warning: could not remove stale legacy file ${p}: ${err.message}`);
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
async function runLegacyMigrationIfNeeded(opts) {
|
|
3051
|
+
const report = opts?.report;
|
|
3052
|
+
const legacyConfigPath = getLegacyConfigPath();
|
|
3053
|
+
const legacyCredentialsPath = getLegacyCredentialsPath();
|
|
3054
|
+
const [hasConfig, hasCreds] = await Promise.all([fileExists(legacyConfigPath), fileExists(legacyCredentialsPath)]);
|
|
3055
|
+
if (!hasConfig && !hasCreds) return null;
|
|
3056
|
+
if (await dirExists(getProfilesDir())) {
|
|
3057
|
+
const toRemove = [];
|
|
3058
|
+
if (hasConfig) toRemove.push(legacyConfigPath);
|
|
3059
|
+
if (hasCreds) toRemove.push(legacyCredentialsPath);
|
|
3060
|
+
for (const p of toRemove) await tryUnlink(p, report);
|
|
3061
|
+
emit(report, `mxs: removed stale legacy config files at ${toRemove.join(", ")}`);
|
|
3062
|
+
return {
|
|
3063
|
+
profile: null,
|
|
3064
|
+
production: false,
|
|
3065
|
+
cleanedStaleLegacy: true
|
|
3066
|
+
};
|
|
3067
|
+
}
|
|
3068
|
+
let legacyConfig = {};
|
|
3069
|
+
if (hasConfig) try {
|
|
3070
|
+
const raw = await promises.readFile(legacyConfigPath, "utf8");
|
|
3071
|
+
legacyConfig = JSON.parse(raw);
|
|
3072
|
+
} catch (err) {
|
|
3073
|
+
if (err?.code !== "ENOENT") throw new MxsError({
|
|
3074
|
+
code: "config.migration.failed",
|
|
3075
|
+
message: `failed to read legacy config at ${legacyConfigPath}: ${err.message}`,
|
|
3076
|
+
cause: err
|
|
3077
|
+
});
|
|
3078
|
+
}
|
|
3079
|
+
let legacyCredentials = null;
|
|
3080
|
+
if (hasCreds) try {
|
|
3081
|
+
const raw = await promises.readFile(legacyCredentialsPath, "utf8");
|
|
3082
|
+
legacyCredentials = JSON.parse(raw);
|
|
3083
|
+
} catch (err) {
|
|
3084
|
+
if (err?.code !== "ENOENT") throw new MxsError({
|
|
3085
|
+
code: "config.migration.failed",
|
|
3086
|
+
message: `failed to read legacy credentials at ${legacyCredentialsPath}: ${err.message}`,
|
|
3087
|
+
cause: err
|
|
3088
|
+
});
|
|
3089
|
+
}
|
|
3090
|
+
let production = false;
|
|
3091
|
+
const tty = opts?.isTTY ?? Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
3092
|
+
const apiUrl = typeof legacyConfig.api_url === "string" ? legacyConfig.api_url : void 0;
|
|
3093
|
+
if (tty && apiUrl) {
|
|
3094
|
+
const answer = opts?.promptIsProduction ? await opts.promptIsProduction(apiUrl) : await ue({
|
|
3095
|
+
message: `Is "${apiUrl}" a production environment?`,
|
|
3096
|
+
initialValue: false
|
|
3097
|
+
});
|
|
3098
|
+
production = q(answer) ? false : Boolean(answer);
|
|
3099
|
+
}
|
|
3100
|
+
const migratedConfig = { ...legacyConfig };
|
|
3101
|
+
if (production) migratedConfig.production = true;
|
|
3102
|
+
else delete migratedConfig.production;
|
|
3103
|
+
try {
|
|
3104
|
+
await writeProfileConfig("default", migratedConfig);
|
|
3105
|
+
} catch (err) {
|
|
3106
|
+
throw new MxsError({
|
|
3107
|
+
code: "config.migration.failed",
|
|
3108
|
+
message: `failed to write profile config during migration: ${err.message}`,
|
|
3109
|
+
cause: err
|
|
3110
|
+
});
|
|
3111
|
+
}
|
|
3112
|
+
if (legacyCredentials !== null) try {
|
|
3113
|
+
await writeProfileCredentials("default", legacyCredentials);
|
|
3114
|
+
} catch (err) {
|
|
3115
|
+
throw new MxsError({
|
|
3116
|
+
code: "config.migration.failed",
|
|
3117
|
+
message: `failed to write profile credentials during migration: ${err.message}`,
|
|
3118
|
+
cause: err
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
3121
|
+
await setCurrentProfile("default");
|
|
3122
|
+
if (hasConfig) await tryUnlink(legacyConfigPath, report);
|
|
3123
|
+
if (hasCreds) await tryUnlink(legacyCredentialsPath, report);
|
|
3124
|
+
emit(report, `mxs: migrated single-profile config to profile 'default'.`);
|
|
3125
|
+
return {
|
|
3126
|
+
profile: "default",
|
|
3127
|
+
production,
|
|
3128
|
+
cleanedStaleLegacy: false
|
|
3129
|
+
};
|
|
3130
|
+
}
|
|
3131
|
+
//#endregion
|
|
3132
|
+
//#region src/core/preaction-guards.ts
|
|
3133
|
+
/**
|
|
3134
|
+
* Single source of truth for preAction exemptions.
|
|
3135
|
+
*
|
|
3136
|
+
* Any command registration in bin/mxs.ts (or future Task 4 profile commands)
|
|
3137
|
+
* MUST match the names declared here exactly — this is the contract.
|
|
3138
|
+
*/
|
|
3139
|
+
/** Parent command names whose entire subtree is exempt from the none_active guard. */
|
|
3140
|
+
const PREACTION_EXEMPT_PARENTS = new Set(["profile"]);
|
|
3141
|
+
/**
|
|
3142
|
+
* Individual (parent, name) pairs that are exempt regardless of profile state.
|
|
3143
|
+
* `auth login` is included unconditionally so a fresh install can bootstrap.
|
|
3144
|
+
*/
|
|
3145
|
+
const PREACTION_EXEMPT_COMMANDS = [{
|
|
3146
|
+
parent: "auth",
|
|
3147
|
+
name: "login"
|
|
3148
|
+
}];
|
|
3149
|
+
/** Returns true if the command is exempt from the profile.none_active guard. */
|
|
3150
|
+
function isPreActionExempt(input) {
|
|
3151
|
+
return PREACTION_EXEMPT_PARENTS.has(input.parentName) || input.commandName === "profile" || PREACTION_EXEMPT_COMMANDS.some((c) => c.parent === input.parentName && c.name === input.commandName);
|
|
3152
|
+
}
|
|
3153
|
+
/**
|
|
3154
|
+
* Returns true if the guard should throw profile.none_active.
|
|
3155
|
+
* A resolved profile, any URL override, or an exempt command all suppress it.
|
|
3156
|
+
*/
|
|
3157
|
+
function requiresActiveProfile(input) {
|
|
3158
|
+
if (input.profileFlag || input.envProfile) return false;
|
|
3159
|
+
if (input.apiUrlFlag || input.envApiUrl) return false;
|
|
3160
|
+
if (input.currentProfile) return false;
|
|
3161
|
+
if (isPreActionExempt(input)) return false;
|
|
3162
|
+
return true;
|
|
3163
|
+
}
|
|
3164
|
+
//#endregion
|
|
3015
3165
|
//#region src/bin/mxs.ts
|
|
3016
3166
|
const program = new Command();
|
|
3017
|
-
program.name("mxs").description("mx-space CLI — manage your mx-core blog from the command line").version("0.
|
|
3167
|
+
program.name("mxs").description("mx-space CLI — manage your mx-core blog from the command line").version("0.2.0").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)");
|
|
3168
|
+
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
3169
|
+
const opts = thisCommand.optsWithGlobals();
|
|
3170
|
+
if (opts.profile) try {
|
|
3171
|
+
validateProfileName(opts.profile);
|
|
3172
|
+
} catch (err) {
|
|
3173
|
+
if (err instanceof MxsError) throw new MxsError({
|
|
3174
|
+
code: "profile.invalid_name",
|
|
3175
|
+
message: err.message,
|
|
3176
|
+
hint: "profile name must match ^[a-z0-9_-]{1,32}$ and must not be \"current\""
|
|
3177
|
+
});
|
|
3178
|
+
throw err;
|
|
3179
|
+
}
|
|
3180
|
+
await runLegacyMigrationIfNeeded({ report: opts.quiet ? null : void 0 });
|
|
3181
|
+
const currentProfile = await getCurrentProfile();
|
|
3182
|
+
if (requiresActiveProfile({
|
|
3183
|
+
profileFlag: opts.profile,
|
|
3184
|
+
apiUrlFlag: opts.apiUrl,
|
|
3185
|
+
envProfile: process.env.MXS_PROFILE?.trim(),
|
|
3186
|
+
envApiUrl: process.env.MXS_API_URL?.trim(),
|
|
3187
|
+
currentProfile,
|
|
3188
|
+
parentName: actionCommand.parent?.name() ?? "",
|
|
3189
|
+
commandName: actionCommand.name()
|
|
3190
|
+
})) throw new MxsError({
|
|
3191
|
+
code: "profile.none_active",
|
|
3192
|
+
message: "no active mxs profile",
|
|
3193
|
+
hint: "run `mxs profile use <name>` to switch, or `mxs auth login --profile <name>` to create one"
|
|
3194
|
+
});
|
|
3195
|
+
});
|
|
3018
3196
|
addAuthCommands(program);
|
|
3197
|
+
addProfileCommands(program);
|
|
3019
3198
|
addPostCommands(program);
|
|
3020
3199
|
addNoteCommands(program);
|
|
3021
3200
|
addPageCommands(program);
|
|
@@ -3040,46 +3219,46 @@ function readGlobalFlags(cmd) {
|
|
|
3040
3219
|
}
|
|
3041
3220
|
function addAuthCommands(parent) {
|
|
3042
3221
|
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));
|
|
3222
|
+
auth.command("login").description("start device authorization flow").option("--production", "mark the target profile as production after login").action(async (opts, command) => {
|
|
3223
|
+
const { run } = await import("../login-D-SoeV01.mjs");
|
|
3224
|
+
await run(readGlobalFlags(command), readGlobalOptions(command), { production: opts.production });
|
|
3046
3225
|
});
|
|
3047
3226
|
auth.command("logout").description("delete stored credentials").action(async (_opts, command) => {
|
|
3048
|
-
const { run } = await import("../logout-
|
|
3227
|
+
const { run } = await import("../logout-D63ZU-1Q.mjs");
|
|
3049
3228
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3050
3229
|
});
|
|
3051
3230
|
auth.command("whoami").description("show the authenticated user").action(async (_opts, command) => {
|
|
3052
|
-
const { run } = await import("../whoami-
|
|
3231
|
+
const { run } = await import("../whoami-BHDYyY5D.mjs");
|
|
3053
3232
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3054
3233
|
});
|
|
3055
3234
|
auth.command("status").description("show token validity and expiry").action(async (_opts, command) => {
|
|
3056
|
-
const { run } = await import("../status-
|
|
3235
|
+
const { run } = await import("../status-evZpPR3N.mjs");
|
|
3057
3236
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3058
3237
|
});
|
|
3059
3238
|
}
|
|
3060
3239
|
function addPostCommands(parent) {
|
|
3061
3240
|
const post = parent.command("post").description("manage posts");
|
|
3062
3241
|
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-
|
|
3242
|
+
const { run } = await import("../list-DVMtBAHG.mjs");
|
|
3064
3243
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3065
3244
|
});
|
|
3066
3245
|
post.command("get <slugOrId>").action(async (id, _opts, command) => {
|
|
3067
|
-
const { run } = await import("../get-
|
|
3246
|
+
const { run } = await import("../get-DbH58EkF.mjs");
|
|
3068
3247
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3069
3248
|
});
|
|
3070
3249
|
addPostWriteCommand(post, "create");
|
|
3071
3250
|
addPostWriteCommand(post, "edit", true);
|
|
3072
3251
|
addPostWriteCommand(post, "update", true);
|
|
3073
3252
|
post.command("delete <slugOrId>").option("--force", "skip confirmation").action(async (id, opts, command) => {
|
|
3074
|
-
const { run } = await import("../delete-
|
|
3253
|
+
const { run } = await import("../delete-D_NRteuq.mjs");
|
|
3075
3254
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3076
3255
|
});
|
|
3077
3256
|
post.command("publish <slugOrId>").action(async (id, _opts, command) => {
|
|
3078
|
-
const { run } = await import("../publish-
|
|
3257
|
+
const { run } = await import("../publish-yuM6YGSb.mjs");
|
|
3079
3258
|
await run(id, true, readGlobalFlags(command), readGlobalOptions(command));
|
|
3080
3259
|
});
|
|
3081
3260
|
post.command("unpublish <slugOrId>").action(async (id, _opts, command) => {
|
|
3082
|
-
const { run } = await import("../publish-
|
|
3261
|
+
const { run } = await import("../publish-yuM6YGSb.mjs");
|
|
3083
3262
|
await run(id, false, readGlobalFlags(command), readGlobalOptions(command));
|
|
3084
3263
|
});
|
|
3085
3264
|
}
|
|
@@ -3091,13 +3270,13 @@ function addPostWriteCommand(parent, name, requiresId = false) {
|
|
|
3091
3270
|
const opts = args.at(-2);
|
|
3092
3271
|
const id = requiresId ? args[0] : void 0;
|
|
3093
3272
|
if (name === "create") {
|
|
3094
|
-
const { run } = await import("../create-
|
|
3273
|
+
const { run } = await import("../create-DAt3FXLf.mjs");
|
|
3095
3274
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3096
3275
|
} else if (name === "edit") {
|
|
3097
|
-
const { run } = await import("../edit-
|
|
3276
|
+
const { run } = await import("../edit-BWX7X4sy.mjs");
|
|
3098
3277
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3099
3278
|
} else {
|
|
3100
|
-
const { run } = await import("../update-
|
|
3279
|
+
const { run } = await import("../update-hhAcAz_M.mjs");
|
|
3101
3280
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3102
3281
|
}
|
|
3103
3282
|
});
|
|
@@ -3108,26 +3287,26 @@ function attachPostWriteFlags(cmd) {
|
|
|
3108
3287
|
function addNoteCommands(parent) {
|
|
3109
3288
|
const note = parent.command("note").description("manage notes");
|
|
3110
3289
|
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-
|
|
3290
|
+
const { run } = await import("../list-lmpHwOQx.mjs");
|
|
3112
3291
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3113
3292
|
});
|
|
3114
3293
|
note.command("get <slugOrId>").action(async (id, _opts, command) => {
|
|
3115
|
-
const { run } = await import("../get-
|
|
3294
|
+
const { run } = await import("../get-CkBqVyGi.mjs");
|
|
3116
3295
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3117
3296
|
});
|
|
3118
3297
|
addNoteWriteCommand(note, "create");
|
|
3119
3298
|
addNoteWriteCommand(note, "edit", true);
|
|
3120
3299
|
addNoteWriteCommand(note, "update", true);
|
|
3121
3300
|
note.command("delete <slugOrId>").option("--force").action(async (id, opts, command) => {
|
|
3122
|
-
const { run } = await import("../delete-
|
|
3301
|
+
const { run } = await import("../delete-DmKPzzsQ.mjs");
|
|
3123
3302
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3124
3303
|
});
|
|
3125
3304
|
note.command("publish <slugOrId>").action(async (id, _opts, command) => {
|
|
3126
|
-
const { run } = await import("../publish-
|
|
3305
|
+
const { run } = await import("../publish-C9O5obZ6.mjs");
|
|
3127
3306
|
await run(id, true, readGlobalFlags(command), readGlobalOptions(command));
|
|
3128
3307
|
});
|
|
3129
3308
|
note.command("unpublish <slugOrId>").action(async (id, _opts, command) => {
|
|
3130
|
-
const { run } = await import("../publish-
|
|
3309
|
+
const { run } = await import("../publish-C9O5obZ6.mjs");
|
|
3131
3310
|
await run(id, false, readGlobalFlags(command), readGlobalOptions(command));
|
|
3132
3311
|
});
|
|
3133
3312
|
}
|
|
@@ -3139,13 +3318,13 @@ function addNoteWriteCommand(parent, name, requiresId = false) {
|
|
|
3139
3318
|
const opts = args.at(-2);
|
|
3140
3319
|
const id = requiresId ? args[0] : void 0;
|
|
3141
3320
|
if (name === "create") {
|
|
3142
|
-
const { run } = await import("../create-
|
|
3321
|
+
const { run } = await import("../create-Cqt1rrSZ.mjs");
|
|
3143
3322
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3144
3323
|
} else if (name === "edit") {
|
|
3145
|
-
const { run } = await import("../edit-
|
|
3324
|
+
const { run } = await import("../edit-CHCuoiWT.mjs");
|
|
3146
3325
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3147
3326
|
} else {
|
|
3148
|
-
const { run } = await import("../update-
|
|
3327
|
+
const { run } = await import("../update-CPJXcOg_.mjs");
|
|
3149
3328
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3150
3329
|
}
|
|
3151
3330
|
});
|
|
@@ -3153,11 +3332,11 @@ function addNoteWriteCommand(parent, name, requiresId = false) {
|
|
|
3153
3332
|
function addPageCommands(parent) {
|
|
3154
3333
|
const page = parent.command("page").description("manage pages");
|
|
3155
3334
|
page.command("list").action(async (_opts, command) => {
|
|
3156
|
-
const { run } = await import("../list-
|
|
3335
|
+
const { run } = await import("../list-DW5TcGxS.mjs");
|
|
3157
3336
|
await run({}, readGlobalFlags(command), readGlobalOptions(command));
|
|
3158
3337
|
});
|
|
3159
3338
|
page.command("get <slugOrId>").action(async (id, _opts, command) => {
|
|
3160
|
-
const { run } = await import("../get-
|
|
3339
|
+
const { run } = await import("../get-CiLnUGHw.mjs");
|
|
3161
3340
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3162
3341
|
});
|
|
3163
3342
|
const writeCmd = (name, requiresId) => {
|
|
@@ -3167,81 +3346,104 @@ function addPageCommands(parent) {
|
|
|
3167
3346
|
const command = args.at(-1);
|
|
3168
3347
|
const opts = args.at(-2);
|
|
3169
3348
|
const id = requiresId ? args[0] : void 0;
|
|
3170
|
-
await (name === "create" ? await import("../create-
|
|
3349
|
+
await (name === "create" ? await import("../create-kYlrs4d6.mjs") : name === "edit" ? await import("../edit-R6H5RtWd.mjs") : await import("../update-0q5hxJFh.mjs")).run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3171
3350
|
});
|
|
3172
3351
|
};
|
|
3173
3352
|
writeCmd("create", false);
|
|
3174
3353
|
writeCmd("edit", true);
|
|
3175
3354
|
writeCmd("update", true);
|
|
3176
3355
|
page.command("delete <slugOrId>").option("--force").action(async (id, opts, command) => {
|
|
3177
|
-
const { run } = await import("../delete-
|
|
3356
|
+
const { run } = await import("../delete-ZIjkquZj.mjs");
|
|
3178
3357
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3179
3358
|
});
|
|
3180
3359
|
}
|
|
3181
3360
|
function addCategoryCommands(parent) {
|
|
3182
3361
|
const cat = parent.command("category").description("manage categories / tags");
|
|
3183
3362
|
cat.command("list").action(async (_o, command) => {
|
|
3184
|
-
const { run } = await import("../list-
|
|
3363
|
+
const { run } = await import("../list-CD9j9did.mjs");
|
|
3185
3364
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3186
3365
|
});
|
|
3187
3366
|
cat.command("get <slugOrId>").action(async (id, _o, command) => {
|
|
3188
|
-
const { run } = await import("../get-
|
|
3367
|
+
const { run } = await import("../get-IQQv4_rP.mjs");
|
|
3189
3368
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3190
3369
|
});
|
|
3191
3370
|
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-
|
|
3371
|
+
const { run } = await import("../create-_H8YO7ze.mjs");
|
|
3193
3372
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3194
3373
|
});
|
|
3195
3374
|
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
|
|
3375
|
+
const { run } = await import("../update--7NPzL_w.mjs");
|
|
3197
3376
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3198
3377
|
});
|
|
3199
3378
|
cat.command("delete <slugOrId>").option("--force").action(async (id, opts, command) => {
|
|
3200
|
-
const { run } = await import("../delete-
|
|
3379
|
+
const { run } = await import("../delete-DVNebWqO.mjs");
|
|
3201
3380
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3202
3381
|
});
|
|
3203
3382
|
}
|
|
3204
3383
|
function addTopicCommands(parent) {
|
|
3205
3384
|
const topic = parent.command("topic").description("manage topics");
|
|
3206
3385
|
topic.command("list").action(async (_o, command) => {
|
|
3207
|
-
const { run } = await import("../list-
|
|
3386
|
+
const { run } = await import("../list-Bnlg9SfR.mjs");
|
|
3208
3387
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3209
3388
|
});
|
|
3210
3389
|
topic.command("get <slugOrId>").action(async (id, _o, command) => {
|
|
3211
|
-
const { run } = await import("../get-
|
|
3390
|
+
const { run } = await import("../get-xtByxURm.mjs");
|
|
3212
3391
|
await run(id, readGlobalFlags(command), readGlobalOptions(command));
|
|
3213
3392
|
});
|
|
3214
3393
|
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-
|
|
3394
|
+
const { run } = await import("../create-D7cR9xcN.mjs");
|
|
3216
3395
|
await run(opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3217
3396
|
});
|
|
3218
3397
|
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-
|
|
3398
|
+
const { run } = await import("../update-DN78pXGZ.mjs");
|
|
3220
3399
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3221
3400
|
});
|
|
3222
3401
|
topic.command("delete <slugOrId>").option("--force").action(async (id, opts, command) => {
|
|
3223
|
-
const { run } = await import("../delete-
|
|
3402
|
+
const { run } = await import("../delete-aCVSWuKi.mjs");
|
|
3224
3403
|
await run(id, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3225
3404
|
});
|
|
3226
3405
|
}
|
|
3227
3406
|
function addConfigCommands(parent) {
|
|
3228
3407
|
const cfg = parent.command("config").description("manage server options");
|
|
3229
3408
|
cfg.command("list").action(async (_o, command) => {
|
|
3230
|
-
const { run } = await import("../list-
|
|
3409
|
+
const { run } = await import("../list-C6z1iw4a.mjs");
|
|
3231
3410
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3232
3411
|
});
|
|
3233
3412
|
cfg.command("get <key>").action(async (key, _o, command) => {
|
|
3234
|
-
const { run } = await import("../get-
|
|
3413
|
+
const { run } = await import("../get-DNdde54z.mjs");
|
|
3235
3414
|
await run(key, readGlobalFlags(command), readGlobalOptions(command));
|
|
3236
3415
|
});
|
|
3237
3416
|
cfg.command("set <key> <value>").option("--type <t>", "json | string | number | bool").action(async (key, value, opts, command) => {
|
|
3238
|
-
const { run } = await import("../set-
|
|
3417
|
+
const { run } = await import("../set-jD79hpuF.mjs");
|
|
3239
3418
|
await run(key, value, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3240
3419
|
});
|
|
3241
3420
|
cfg.command("edit").action(async (_o, command) => {
|
|
3242
|
-
const { run } = await import("../edit-
|
|
3421
|
+
const { run } = await import("../edit-DjRE8Gk-.mjs");
|
|
3422
|
+
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3423
|
+
});
|
|
3424
|
+
}
|
|
3425
|
+
function addProfileCommands(parent) {
|
|
3426
|
+
const profile = parent.command("profile").description("manage mxs profiles");
|
|
3427
|
+
profile.command("ls").description("list profiles").action(async (_opts, command) => {
|
|
3428
|
+
const { run } = await import("../ls-Bz3BCcwU.mjs");
|
|
3243
3429
|
await run(readGlobalFlags(command), readGlobalOptions(command));
|
|
3244
3430
|
});
|
|
3431
|
+
profile.command("show [name]").description("show resolved info for a profile").action(async (name, _opts, command) => {
|
|
3432
|
+
const { run } = await import("../show-C5Zk0tcK.mjs");
|
|
3433
|
+
await run(name, readGlobalFlags(command), readGlobalOptions(command));
|
|
3434
|
+
});
|
|
3435
|
+
profile.command("use <name>").description("set the active profile").action(async (name, _opts, command) => {
|
|
3436
|
+
const { run } = await import("../use-CHDCEe38.mjs");
|
|
3437
|
+
await run(name, readGlobalFlags(command), readGlobalOptions(command));
|
|
3438
|
+
});
|
|
3439
|
+
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) => {
|
|
3440
|
+
const { run } = await import("../mark-N-IpKK17.mjs");
|
|
3441
|
+
await run(name, { production: opts.production }, readGlobalFlags(command), readGlobalOptions(command));
|
|
3442
|
+
});
|
|
3443
|
+
profile.command("rm <name>").description("remove a profile").option("--force", "skip confirmation and allow removing current profile").action(async (name, opts, command) => {
|
|
3444
|
+
const { run } = await import("../rm-D9GvLhhF.mjs");
|
|
3445
|
+
await run(name, opts, readGlobalFlags(command), readGlobalOptions(command));
|
|
3446
|
+
});
|
|
3245
3447
|
}
|
|
3246
3448
|
//#endregion
|
|
3247
3449
|
export { readGlobalFlags, readGlobalOptions };
|