@base44-preview/cli 0.1.4-pr.567.2681dfe → 0.1.4-pr.567.a56c290
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +4 -9
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -254789,26 +254789,21 @@ function getWorkspaceGetCommand() {
|
|
|
254789
254789
|
}
|
|
254790
254790
|
|
|
254791
254791
|
// src/cli/commands/workspace/list.ts
|
|
254792
|
-
function pluralize2(n5) {
|
|
254793
|
-
return `${n5} workspace${n5 !== 1 ? "s" : ""}`;
|
|
254794
|
-
}
|
|
254795
254792
|
async function listWorkspacesAction({ log, runTask: runTask2, jsonMode }, options8) {
|
|
254796
254793
|
let workspaces = await runTask2("Fetching workspaces...", () => listWorkspaces(), { errorMessage: "Failed to fetch workspaces" });
|
|
254797
254794
|
if (options8.role) {
|
|
254798
254795
|
const role = options8.role.toLowerCase();
|
|
254799
254796
|
workspaces = workspaces.filter((w8) => w8.userRole?.toLowerCase() === role);
|
|
254800
254797
|
}
|
|
254798
|
+
const summary = `${workspaces.length} workspace${workspaces.length !== 1 ? "s" : ""}`;
|
|
254801
254799
|
if (jsonMode) {
|
|
254802
|
-
return {
|
|
254803
|
-
outroMessage: pluralize2(workspaces.length),
|
|
254804
|
-
stdout: toJsonStdout(workspaces)
|
|
254805
|
-
};
|
|
254800
|
+
return { outroMessage: summary, stdout: toJsonStdout(workspaces) };
|
|
254806
254801
|
}
|
|
254807
254802
|
for (const workspace2 of workspaces) {
|
|
254808
254803
|
log.message(` ${theme.styles.bold(workspace2.name)} ${theme.styles.dim(`[${workspaceTag(workspace2)}]`)}
|
|
254809
254804
|
${theme.styles.dim(workspace2.id)}`);
|
|
254810
254805
|
}
|
|
254811
|
-
return { outroMessage:
|
|
254806
|
+
return { outroMessage: summary };
|
|
254812
254807
|
}
|
|
254813
254808
|
function getWorkspaceListCommand() {
|
|
254814
254809
|
return new Base44Command("list", { requireAppContext: false }).description("List the workspaces you belong to").option("--role <role>", "Only workspaces where your role matches (owner, admin, editor, viewer)").action(listWorkspacesAction);
|
|
@@ -262939,4 +262934,4 @@ export {
|
|
|
262939
262934
|
CLIExitError
|
|
262940
262935
|
};
|
|
262941
262936
|
|
|
262942
|
-
//# debugId=
|
|
262937
|
+
//# debugId=A13BE6B0A6A9F5CD64756E2164756E21
|