@base44-preview/cli 0.1.5-pr.575.88555e2 → 0.1.5-pr.575.b45c412
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 +8 -9
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -254024,7 +254024,7 @@ async function promptForLinkAction() {
|
|
|
254024
254024
|
actionOptions.push({
|
|
254025
254025
|
value: "choose",
|
|
254026
254026
|
label: "Link an existing project",
|
|
254027
|
-
hint: "Choose from one of your
|
|
254027
|
+
hint: "Choose from one of your existing Base44 apps"
|
|
254028
254028
|
});
|
|
254029
254029
|
const action = await Je({
|
|
254030
254030
|
message: "How would you like to link this project?",
|
|
@@ -254061,8 +254061,8 @@ async function promptForNewProjectDetails() {
|
|
|
254061
254061
|
description: result.description ? result.description.trim() : undefined
|
|
254062
254062
|
};
|
|
254063
254063
|
}
|
|
254064
|
-
async function promptForExistingProject(
|
|
254065
|
-
const projectOptions =
|
|
254064
|
+
async function promptForExistingProject(projects) {
|
|
254065
|
+
const projectOptions = projects.map((project2) => ({
|
|
254066
254066
|
value: project2,
|
|
254067
254067
|
label: project2.name
|
|
254068
254068
|
}));
|
|
@@ -254103,15 +254103,14 @@ async function link(ctx, options, command2) {
|
|
|
254103
254103
|
successMessage: "Projects fetched",
|
|
254104
254104
|
errorMessage: "Failed to fetch projects"
|
|
254105
254105
|
});
|
|
254106
|
-
|
|
254107
|
-
if (!linkableProjects.length) {
|
|
254106
|
+
if (!projects.length) {
|
|
254108
254107
|
return { outroMessage: "No projects available for linking" };
|
|
254109
254108
|
}
|
|
254110
254109
|
let linkedAppId;
|
|
254111
254110
|
if (appId) {
|
|
254112
|
-
const project2 =
|
|
254111
|
+
const project2 = projects.find((p) => p.id === appId);
|
|
254113
254112
|
if (!project2) {
|
|
254114
|
-
throw new InvalidInputError(`App with ID "${appId}" not found
|
|
254113
|
+
throw new InvalidInputError(`App with ID "${appId}" not found.`, {
|
|
254115
254114
|
hints: [
|
|
254116
254115
|
{ message: "Check the app ID is correct" },
|
|
254117
254116
|
{
|
|
@@ -254122,7 +254121,7 @@ async function link(ctx, options, command2) {
|
|
|
254122
254121
|
}
|
|
254123
254122
|
linkedAppId = appId;
|
|
254124
254123
|
} else {
|
|
254125
|
-
const selectedProject = await promptForExistingProject(
|
|
254124
|
+
const selectedProject = await promptForExistingProject(projects);
|
|
254126
254125
|
linkedAppId = selectedProject.id;
|
|
254127
254126
|
}
|
|
254128
254127
|
await runTask2("Linking project...", async () => {
|
|
@@ -263223,4 +263222,4 @@ export {
|
|
|
263223
263222
|
CLIExitError
|
|
263224
263223
|
};
|
|
263225
263224
|
|
|
263226
|
-
//# debugId=
|
|
263225
|
+
//# debugId=75D8B6967BCC3AA064756E2164756E21
|