@ottogroup/ui5-migrate-neo-to-cf

1.0.12 • Public • Published

ui5-migrate-neo-to-cf

This tool adapt a current UI5 app deployed in BTP NEO for the BTP CF deployment. Currently it creates new files and it adapts the package.json file. This tool expects to be used together with GitLab pipelines and environment variables.

Installation

npm i @ottogroup/ui5-migrate-neo-to-cf --save-dev

Usage

The module expects that the command be run in the root path of your project (the one you want to migrate).

npx ui5-migrate-neo-to-cf

For example in powershell:

PS C:\Users\MyUser\MyProjectsFolder\MyProject> npx ui5-migrate-neo-to-cf

How it works

  1. Start running after the command ui5-migrate-neo-to-cf is executed.
  2. It gets the root path of the project and the path for the source code.
  3. It decides if it is an typescript app (src) or javascript app (webapp) depending on the source code folder detected (the src folder is the first to be checked).
  4. Get the ui5 id (sap.app.id) from the manifest.json in the source code path of the previous step.
  5. Generate the files from templates (internal folder /templates). For each template:
    1. Decide between executing update action or creation/overwritten action.
    2. Replace the variables found on the template defined in the index file.
    3. Generate the file in the root path of the project to be migrated.

Templates

In the path ./templates are the files which will be use for creation or updation in the proyect you use the module.

Create/Overwrite file with the template

  • The templates with the pattern: <filename>-template<extension>, will be created/overwritten in the project.

Update an existing file with the template

  • The templates with the pattern: addTo-<filename> will be use to update an existing files (currently only json files). If the key in the template already exist in the target file, it will be overwritten.

Currently template files:

  • addTo-.gitlab-ci.yml
  • addTo-Package.json
  • mta-template.yaml
  • ui5-deploy.yaml
  • xs-app-template.yaml

Package Sidebar

Install

npm i @ottogroup/ui5-migrate-neo-to-cf

Weekly Downloads

1

Version

1.0.12

License

MIT

Unpacked Size

68.8 kB

Total Files

13

Last publish

Collaborators

  • ottogroup