@base44-preview/cli 0.2.1-pr.672.43c8ae1 → 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 CHANGED
@@ -252235,10 +252235,8 @@ 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
- let linkedAppId;
252239
- if (appId && hasWorkspaceApiKeyAuth()) {
252240
- linkedAppId = appId;
252241
- } else {
252238
+ let linkedAppId = appId;
252239
+ if (!linkedAppId) {
252242
252240
  const projects = await runTask("Fetching projects...", async () => listProjects(), {
252243
252241
  successMessage: "Projects fetched",
252244
252242
  errorMessage: "Failed to fetch projects"
@@ -252246,23 +252244,7 @@ async function link(ctx, options, command) {
252246
252244
  if (!projects.length) {
252247
252245
  return { outroMessage: "No projects available for linking" };
252248
252246
  }
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
- }
252247
+ linkedAppId = (await promptForExistingProject(projects)).id;
252266
252248
  }
252267
252249
  await runTask("Linking project...", async () => {
252268
252250
  await writeAppConfig(projectRoot.root, linkedAppId);
@@ -274013,4 +273995,4 @@ export {
274013
273995
  runCLI
274014
273996
  };
274015
273997
 
274016
- //# debugId=F783DE574A8FAE3D64756E2164756E21
273998
+ //# debugId=0BEF7AE5A43AC3A264756E2164756E21