@base44-preview/cli 0.1.5-pr.571.4d6a59e → 0.1.5-pr.572.2976402
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.
|
@@ -2,8 +2,4 @@ import { createClient } from '@base44/sdk';
|
|
|
2
2
|
|
|
3
3
|
export const base44 = createClient({
|
|
4
4
|
appId: '<%= projectId %>',
|
|
5
|
-
// `base44 dev` injects VITE_BASE44_APP_BASE_URL (http://localhost:<port>) so the
|
|
6
|
-
// SDK targets the local dev backend; unset in prod builds, so it falls back to
|
|
7
|
-
// the SDK's default server.
|
|
8
|
-
serverUrl: import.meta.env.VITE_BASE44_APP_BASE_URL || undefined,
|
|
9
5
|
});
|
package/dist/cli/index.js
CHANGED
|
@@ -253457,9 +253457,22 @@ function printProjectSummary({ name: name2, dashboardUrl, appUrl }, log) {
|
|
|
253457
253457
|
}
|
|
253458
253458
|
|
|
253459
253459
|
// src/cli/commands/project/workspace-select.ts
|
|
253460
|
+
function isWorkspaceListForbidden(error48) {
|
|
253461
|
+
return error48 instanceof ApiError && error48.statusCode === 403;
|
|
253462
|
+
}
|
|
253460
253463
|
function fetchWorkspaces(ctx) {
|
|
253461
|
-
return ctx.runTask("Fetching workspaces...", () =>
|
|
253462
|
-
|
|
253464
|
+
return ctx.runTask("Fetching workspaces...", async (updateMessage) => {
|
|
253465
|
+
try {
|
|
253466
|
+
return await listWorkspaces();
|
|
253467
|
+
} catch (error48) {
|
|
253468
|
+
if (isWorkspaceListForbidden(error48)) {
|
|
253469
|
+
updateMessage("Using your default workspace");
|
|
253470
|
+
return null;
|
|
253471
|
+
}
|
|
253472
|
+
throw error48;
|
|
253473
|
+
}
|
|
253474
|
+
}, {
|
|
253475
|
+
successMessage: "Workspaces checked",
|
|
253463
253476
|
errorMessage: "Failed to fetch workspaces"
|
|
253464
253477
|
});
|
|
253465
253478
|
}
|
|
@@ -253475,6 +253488,10 @@ async function resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive) {
|
|
|
253475
253488
|
return;
|
|
253476
253489
|
}
|
|
253477
253490
|
const workspaces = await fetchWorkspaces(ctx);
|
|
253491
|
+
if (workspaces === null) {
|
|
253492
|
+
ctx.log.warn("Couldn't list your workspaces with this login, so the default workspace will be used. Pass --workspace <id> to target a specific one.");
|
|
253493
|
+
return;
|
|
253494
|
+
}
|
|
253478
253495
|
if (workspaces.length <= 1) {
|
|
253479
253496
|
return;
|
|
253480
253497
|
}
|
|
@@ -262952,4 +262969,4 @@ export {
|
|
|
262952
262969
|
CLIExitError
|
|
262953
262970
|
};
|
|
262954
262971
|
|
|
262955
|
-
//# debugId=
|
|
262972
|
+
//# debugId=9E1CC41992B39EA064756E2164756E21
|