@base44-preview/cli 0.1.3-pr.568.67b756c → 0.1.3-pr.568.e436c11
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
|
@@ -254795,26 +254795,21 @@ function getWorkspaceGetCommand() {
|
|
|
254795
254795
|
}
|
|
254796
254796
|
|
|
254797
254797
|
// src/cli/commands/workspace/list.ts
|
|
254798
|
-
function pluralize2(n5) {
|
|
254799
|
-
return `${n5} workspace${n5 !== 1 ? "s" : ""}`;
|
|
254800
|
-
}
|
|
254801
254798
|
async function listWorkspacesAction({ log, runTask: runTask2, jsonMode }, options8) {
|
|
254802
254799
|
let workspaces = await runTask2("Fetching workspaces...", () => listWorkspaces(), { errorMessage: "Failed to fetch workspaces" });
|
|
254803
254800
|
if (options8.role) {
|
|
254804
254801
|
const role = options8.role.toLowerCase();
|
|
254805
254802
|
workspaces = workspaces.filter((w8) => w8.userRole?.toLowerCase() === role);
|
|
254806
254803
|
}
|
|
254804
|
+
const summary = `${workspaces.length} workspace${workspaces.length !== 1 ? "s" : ""}`;
|
|
254807
254805
|
if (jsonMode) {
|
|
254808
|
-
return {
|
|
254809
|
-
outroMessage: pluralize2(workspaces.length),
|
|
254810
|
-
stdout: toJsonStdout(workspaces)
|
|
254811
|
-
};
|
|
254806
|
+
return { outroMessage: summary, stdout: toJsonStdout(workspaces) };
|
|
254812
254807
|
}
|
|
254813
254808
|
for (const workspace2 of workspaces) {
|
|
254814
254809
|
log.message(` ${theme.styles.bold(workspace2.name)} ${theme.styles.dim(`[${workspaceTag(workspace2)}]`)}
|
|
254815
254810
|
${theme.styles.dim(workspace2.id)}`);
|
|
254816
254811
|
}
|
|
254817
|
-
return { outroMessage:
|
|
254812
|
+
return { outroMessage: summary };
|
|
254818
254813
|
}
|
|
254819
254814
|
function getWorkspaceListCommand() {
|
|
254820
254815
|
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);
|
|
@@ -262945,4 +262940,4 @@ export {
|
|
|
262945
262940
|
CLIExitError
|
|
262946
262941
|
};
|
|
262947
262942
|
|
|
262948
|
-
//# debugId=
|
|
262943
|
+
//# debugId=C39B52458812629964756E2164756E21
|