@base44-preview/cli 0.2.0-pr.671.556605b → 0.2.1-pr.672.b7a4085
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 +11 -25
- 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,16 @@ 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
|
-
|
|
252239
|
-
|
|
252240
|
-
|
|
252241
|
-
|
|
252242
|
-
|
|
252243
|
-
|
|
252244
|
-
|
|
252245
|
-
|
|
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
|
-
});
|
|
252238
|
+
let linkedAppId = appId;
|
|
252239
|
+
if (!linkedAppId) {
|
|
252240
|
+
const projects = await runTask("Fetching projects...", async () => listProjects(), {
|
|
252241
|
+
successMessage: "Projects fetched",
|
|
252242
|
+
errorMessage: "Failed to fetch projects"
|
|
252243
|
+
});
|
|
252244
|
+
if (!projects.length) {
|
|
252245
|
+
return { outroMessage: "No projects available for linking" };
|
|
252257
252246
|
}
|
|
252258
|
-
linkedAppId =
|
|
252259
|
-
} else {
|
|
252260
|
-
const selectedProject = await promptForExistingProject(projects);
|
|
252261
|
-
linkedAppId = selectedProject.id;
|
|
252247
|
+
linkedAppId = (await promptForExistingProject(projects)).id;
|
|
252262
252248
|
}
|
|
252263
252249
|
await runTask("Linking project...", async () => {
|
|
252264
252250
|
await writeAppConfig(projectRoot.root, linkedAppId);
|
|
@@ -274009,4 +273995,4 @@ export {
|
|
|
274009
273995
|
runCLI
|
|
274010
273996
|
};
|
|
274011
273997
|
|
|
274012
|
-
//# debugId=
|
|
273998
|
+
//# debugId=0BEF7AE5A43AC3A264756E2164756E21
|