Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Refactor and enhance Launch Configuration Logic for debugging generated apps in @sap-ux/launch-config #2274

Merged
merged 30 commits into from
Sep 5, 2024

Conversation

kjose90
Copy link
Member

@kjose90 kjose90 commented Aug 22, 2024

The implementation will focus on managing various workspace scenarios, including unsaved workspaces, folders without workspace files, and saved workspaces so users can seamlessly debug the generated application, regardless of their workspace configuration.

  • debug-config/workspaceManager.ts
    Manages the configuration of the debug workspace based on the provided options.
    It handles different scenarios such as whether a workspace is open, whether the project is inside or outside of a workspace, and other contextual factors.
    handleWorkspaceConfig returns WorkspaceHandlerInfo, an object containing:
    1. The path where the launch.json file will be written.
    2. The cwd command, determined by workspace settings.
    3. workspaceFolderUri, if provided, which facilitates workspace reloading.

  • debug-config/config.ts
    Generates the contents of the launch.json file based on the options provided.
    configureLaunchJsonFile returns the configured launch.json object, tailored to the specified debug options and cwd command.

  • launch-config-crud/create.ts
    Handles the creation of the launch configuration for the project based on the provided debug options.
    configureLaunchConfig generates and creates the launch.json file.
    If workspaceFolderUri is provided, it creates the launch.json file, triggers a workspace reload, and updates the appInfo.json file with the current project path. This ensures the App Info page is correctly loaded post-reload.

  • Add unit tests

Copy link

changeset-bot bot commented Aug 22, 2024

🦋 Changeset detected

Latest commit: 712bb26

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sap-ux/launch-config Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kjose90 kjose90 changed the title Debug launch config Refactor and move launch config generators to open source repository (tbi) Aug 22, 2024
@kjose90 kjose90 changed the title Refactor and move launch config generators to open source repository (tbi) feat: Refactor and enhance Launch Configuration Logic for debugging generated apps in @sap-ux/launch-config Aug 23, 2024
@kjose90 kjose90 marked this pull request as ready for review September 2, 2024 13:55
devinea
devinea previously approved these changes Sep 4, 2024
Copy link
Member

@devinea devinea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes are well structured, documented and tested.
Changeset ✅

packages/launch-config/package.json Outdated Show resolved Hide resolved
Copy link
Member

@devinea devinea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving

Copy link

sonarcloud bot commented Sep 5, 2024

Copy link
Contributor

@longieirl longieirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments addressed.
Test coverage is good.
Changeset present.

@kjose90
Copy link
Member Author

kjose90 commented Sep 5, 2024

Thanks for reviewing 👍

@kjose90 kjose90 merged commit 73fcd05 into main Sep 5, 2024
13 checks passed
@kjose90 kjose90 deleted the debug-launch-config branch September 5, 2024 09:22
devinea added a commit that referenced this pull request Sep 5, 2024
* origin/main: (38 commits)
  chore: apply latest changesets
  feat: Refactor and enhance Launch Configuration Logic for debugging generated apps in @sap-ux/launch-config (#2274)
  chore: apply latest changesets
  fix(ui5-proxy-middleware): refactoring of directLoad implementation (#2319)
  chore: apply latest changesets
  fix(cpe): outline tree scroll bar (#2283)
  chore: apply latest changesets
  feat: quick actions (#2142)
  chore: apply latest changesets
  feat(fe-fpm-writer): apply context path to a building block based on min ui5 version (#2312)
  chore: apply latest changesets
  fix(abap-deploy-config-inquirer ): remove inquirer package (#2318)
  chore: apply latest changesets
  fix(cf-deploy-config-writer): refactor hasUI5CliV3 to project-access for common reuse (#2313)
  chore: apply latest changesets
  fix(abap-deploy-config-inquirer ): add missing dependencies (#2314)
  chore: apply latest changesets
  fix(odata-service-inquirer): #2309 fix for annotations not retrieved using service url prompt (#2310)
  chore: apply latest changesets
  fix: adjustment of the color of chevron on selection (#2303)
  ...
@@ -34,6 +34,9 @@
"@sap-ux/project-access": "workspace:*",
"@sap-ux/ui5-config": "workspace:*",
"@sap-ux/ui5-info": "workspace:*",
"@sap-ux/odata-service-inquirer": "workspace:*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this dependency, this is using types not intended for this purpose and should only be consumed if you are calling getPrompts or prompt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants