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

WIP: Feat/2172/convert local preview files #2504

Draft
wants to merge 125 commits into
base: main
Choose a base branch
from

Conversation

heimwege
Copy link
Contributor

@heimwege heimwege commented Oct 28, 2024

#2172

app-config-writer/convert + create

  • introduce command convert with parameter preview that converts an app to virtual preview files

app-config-writer/variants-config

project-access

  • add function getAllUi5YamlFileNames that reads all yaml files in the given directory and (optionally) validates the schema to ensure it's a valid UI5 yaml configuration file. Currently multi-document sources (=yaml files containing --- or ...) are not supported and will be skipped
  • enhance the build run script to download the UI5 yaml schema to dist to also support offline schema validations

preview-middleware

  • adjust readme: add migration chapter

skipPreviewMiddlewareCreation = false
): Promise<void> {
const ui5YamlConfig = await readUi5Yaml(basePath, ui5Yaml, fs);
let previewMiddleware = await getPreviewMiddleware(ui5YamlConfig);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like ui5-config does not include comments when loading a specific middleware config 🤷🏻 So writing it after some changes will actually delete the comment even if that part has not been touched at all. @tobiasqueck Is this a bug in ui5-config?

Sample:

- name: fiori-tools-preview
      afterMiddleware: compression
      configuration:
        libs: true
        debug: true
        adp:
          target:
            url: <some url>
            client: '080'
            authenticationType: reentranceTicket
            # destination: <some name>
          ignoreCertErrors: true
        rta:
          editors:
            - path: /test/adaptation-editor.html
              developerMode: true

will become

- name: fiori-tools-preview
      afterMiddleware: compression
      configuration:
        libs: true
        debug: true
        flp:
          path: just/a/path/flp.html
        adp:
          target:
            url: <some url>
            client: '080'
            authenticationType: reentranceTicket
          ignoreCertErrors: true
        rta:
          editors:
            - path: /test/adaptation-editor.html
              developerMode: true

Copy link

sonarcloud bot commented Nov 14, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create @sap-ux/create
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants