@base44-preview/cli 0.2.0-pr.671.556605b → 0.2.1-pr.672.43c8ae1
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 +27 -23
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -239376,7 +239376,7 @@ import { join as join13 } from "node:path";
|
|
|
239376
239376
|
// package.json
|
|
239377
239377
|
var package_default = {
|
|
239378
239378
|
name: "base44",
|
|
239379
|
-
version: "0.2.
|
|
239379
|
+
version: "0.2.1",
|
|
239380
239380
|
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
239381
239381
|
type: "module",
|
|
239382
239382
|
bin: {
|
|
@@ -252235,30 +252235,34 @@ async function link(ctx, options, command) {
|
|
|
252235
252235
|
let finalAppId;
|
|
252236
252236
|
const action = appId ? "choose" : options.create ? "create" : await promptForLinkAction();
|
|
252237
252237
|
if (action === "choose") {
|
|
252238
|
-
const projects = await runTask("Fetching projects...", async () => listProjects(), {
|
|
252239
|
-
successMessage: "Projects fetched",
|
|
252240
|
-
errorMessage: "Failed to fetch projects"
|
|
252241
|
-
});
|
|
252242
|
-
if (!projects.length) {
|
|
252243
|
-
return { outroMessage: "No projects available for linking" };
|
|
252244
|
-
}
|
|
252245
252238
|
let linkedAppId;
|
|
252246
|
-
if (appId) {
|
|
252247
|
-
const project = projects.find((p) => p.id === appId);
|
|
252248
|
-
if (!project) {
|
|
252249
|
-
throw new InvalidInputError(`App with ID "${appId}" not found.`, {
|
|
252250
|
-
hints: [
|
|
252251
|
-
{ message: "Check the app ID is correct" },
|
|
252252
|
-
{
|
|
252253
|
-
message: "Use 'base44 link' without --app-id to see available projects"
|
|
252254
|
-
}
|
|
252255
|
-
]
|
|
252256
|
-
});
|
|
252257
|
-
}
|
|
252239
|
+
if (appId && hasWorkspaceApiKeyAuth()) {
|
|
252258
252240
|
linkedAppId = appId;
|
|
252259
252241
|
} else {
|
|
252260
|
-
const
|
|
252261
|
-
|
|
252242
|
+
const projects = await runTask("Fetching projects...", async () => listProjects(), {
|
|
252243
|
+
successMessage: "Projects fetched",
|
|
252244
|
+
errorMessage: "Failed to fetch projects"
|
|
252245
|
+
});
|
|
252246
|
+
if (!projects.length) {
|
|
252247
|
+
return { outroMessage: "No projects available for linking" };
|
|
252248
|
+
}
|
|
252249
|
+
if (appId) {
|
|
252250
|
+
const project = projects.find((p) => p.id === appId);
|
|
252251
|
+
if (!project) {
|
|
252252
|
+
throw new InvalidInputError(`App with ID "${appId}" not found.`, {
|
|
252253
|
+
hints: [
|
|
252254
|
+
{ message: "Check the app ID is correct" },
|
|
252255
|
+
{
|
|
252256
|
+
message: "Use 'base44 link' without --app-id to see available projects"
|
|
252257
|
+
}
|
|
252258
|
+
]
|
|
252259
|
+
});
|
|
252260
|
+
}
|
|
252261
|
+
linkedAppId = appId;
|
|
252262
|
+
} else {
|
|
252263
|
+
const selectedProject = await promptForExistingProject(projects);
|
|
252264
|
+
linkedAppId = selectedProject.id;
|
|
252265
|
+
}
|
|
252262
252266
|
}
|
|
252263
252267
|
await runTask("Linking project...", async () => {
|
|
252264
252268
|
await writeAppConfig(projectRoot.root, linkedAppId);
|
|
@@ -274009,4 +274013,4 @@ export {
|
|
|
274009
274013
|
runCLI
|
|
274010
274014
|
};
|
|
274011
274015
|
|
|
274012
|
-
//# debugId=
|
|
274016
|
+
//# debugId=F783DE574A8FAE3D64756E2164756E21
|