Giter VIP home page Giter VIP logo

nwabap-ui5uploader's Introduction

nwabap-ui5uploader

This module allows a developer to upload SAPUI5/OpenUI5 sources into a SAP NetWeaver ABAP system. The behavior is (or should be) the same than it is known from the SAP Web IDE app deployment option "Deploy to SAPUI5 ABAP Repository" or from the "SAPUI5 ABAP Repository Team Provider" available for Eclipse via the "UI Development Toolkit for HTML5". The main reason for developing this module is to integrate the deployment process into a Continuous Integration environment, in which for instance a Jenkins server executes several build steps and finally deploys the sources to a SAP NetWeaver ABAP system if all previous build steps are ok. The plugin also allows a developer to deploy the sources to a SAP NetWeaver ABAP system by a npm script using a different IDE than Eclipse or SAP Web IDE (for instance WebStorm).

Based on grunt-nwabap-ui5uploader package

This module is based on the original grunt plugin. Though I didn't like the need of gulp or grunt in my projects purely for CI/CD.

Donations

If you like this port, you find it useful, it has value enough: please donate! ☺️

Ethereum address: 0x951E9eDabD9C41B9A8386091E731Ab15FF574D4f

Prerequisites

ABAP Development Tool Services

The ABAP Development Tool Services have to be activated on the SAP NetWeaver ABAP System (transaction SICF, path /sap/bc/adt). The user used for uploading the sources needs to have the authorization to use the ADT Services and to create/modify BSP applications. The plugin is tested with NW 7.30, NW 7.40 and NW 7.50 systems.

Install

Add it to your local project and use npx to run the binary using a npx-prefix (as of npm 5.2.0):

npm install nwabap-ui5uploader --save-dev

Or just install globally and skip the npx-prefix in the examples below:

npm install -g nwabap-ui5uploader

Usage

This node module describes itself on the command line. Use your favorite CI/CD configuration to call this module.

npx nwabap --help
npx nwabap upload --help

Configuration

Option Default Description
conn_server SAP host
conn_user SAP user
conn_client Optional parameter to specify the client (transferred as sap-client URL parameter). In case the option is not specified the default client is used if specified.
conn_usestrictssl true SSL mode handling. In case of self signed certificates the useStrictSSL mode option can be set to false to allow an upload of files.
base Base dir
files ** Files to upload (relative from basedir)
abap_transport ABAP transport no.
abap_package ABAP package name
abap_bsp ABAP BSP container ID
abap_bsp_text ABAP BSP container name
abap_language EN ABAP language
calcappindex false Re-calculate application index
git_diff_commit Optional git commit, branch or reference to compare current state with. Will only upload files that were somehow changed (added, modified or deleted) since specified state.
git_diff_unstaged false Include unstaged files in git diff.
preserve_unselected false Don't delete files from BSP container, that were not selected to upload. Useful when using git_diff_commit option to keep unchanged files untouched.
nwabaprc If set, specifies a different path for a ./.nwabaprc file

.nwabaprc

It is possible to use a configuration file. If this file exists in the project root, this tool will automatically discover it. Create a .nwabaprc file in your package root, i.e.:

{
    "base": "./dist",
    "conn_server": "http://myserver:8000",
    "conn_user": "upload",
    "conn_password": "upl04d",
    "abap_package": "$TMP",
    "abap_bsp": "ZZ_UI5_LOCAL",
    "abap_bsp_text": "UI5 upload local objects"
}

NOTE: command line arguments are ordered to be mapped after the configuration file. This means that the command line arguments override individual configuration file attributes.

Examples

Upload to $TMP package

npx nwabap upload --base ./dist --conn_server http://myserver:8000 --conn_user upload --conn_password upl04d --abap_package $TMP --abap_bsp ZZ_UI5_LOCAL --abap_bsp_text "UI5 upload local objects"

Upload to a transport tracked package

npx nwabap upload --base ./dist --conn_server http://myserver:8000 --conn_user upload --conn_password upl04d --abap_package ZFRONTENDS_TEST --abap_bsp ZABSHR --abap_bsp_text "Absence HR" --abap_transport PRDNK1230120032

Use package.json script

"scripts": {
    "upload": "npx nwabap upload"
}

Different .nwabaprc location/file

npx nwabap upload ... --nwabaprc ./config/.nwabaprc2

Release History

CHANGELOG.md

Contribute

My actual goal is to remove all unnecessary code and libs, except console coloring libs since I find these really helpful. I would also like to rewrite the libs used (filestore and filestoreutils). Please, and feel free to help me anytime on the project's GitHub.

nwabap-ui5uploader's People

Contributors

dehero avatar dependabot[bot] avatar ksaito1125 avatar nrdev88 avatar raymond-does avatar sebbi08 avatar tomasz-sobkowiak avatar uxkjaer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nwabap-ui5uploader's Issues

git_diff_commit not working propperly

When I don't use this option everything is OK and I am able to upload to my gateway, but when I use it, it detects changed files but not uploads them. I get this message but never arribes to upload.
image

this is my config:
image

And this is my uploading command:
" ui5 build -a --clean-dest --include-task=generateManifestBundle generateCachebusterInfo && rimraf archive.zip && npx nwabap upload"

No way to upload files which start from "." (dot)

Hi all,

I have just noticed that files which start from "." (i.e. .library) are not being uploaded to SAP.
In the upload.js file there is the glob.sync function, which takes as parameters only the cwd from nwabap-ui5uploader options:
image
Inside the glob.sync (fast-glob -> which is used by nwabap-ui5uploader) the dot option is set by default as false:
image

In the mean-time I checked the grunt-nwabap-ui5uploader and the dot option is set to TRUE by default:
image

Would it be possible to add additional option in the nwabap-ui5uploader to pass through the dot parameter to the glob.sync (fast-glob)?

Best regards,
Tomasz

Unable to update existing file which has hipen(-) in the filename

Team,

In our BSP Container we already have an file with hipen(-) present in the filename and we able to update the same file using Eclipse, but we are getting attached error when we are using the module. Another file has hipen in it which got uploaded properly, not sure why we are getting error for below file

Can you please check.

Hipen Files not upload

Deployment - if SSO enabled with ABAP Repo.

Hi,
if my user account is enabled with SSO in ABAP Repo, how can i make the deployment successful? I supplied "conn_user" and removed "conn_password", I was getting an error says "Define both a username and password." Any help? Does this module support only non-SSO scenario?

Thanks
Gokul.

Uploading takes a lot of time

I am running this script from my mac terminal, and my mac is also connected to my organization network. Still it takes a lot of time to upload the files to the abap repo.

Any fix?

git_diff_commit not picking up changes

Hello,

This option does not seems to work

Here is what I did

  1. pushed my changes to git
  2. built my project - npm run build ( ui5 build --config=ui5.yaml --clean-dest --dest dist )
  3. in my .nwabaprc file, git_diff_commit points to earlier commit
  4. run upload - npx nwabap upload

upload does not detect any changes and hence no files are sent to backend system.
my config file looks like below. I have also tried with git_diff_unstaged : true.

image

Here is the git commit history -

image

nwabap version failed.

When I execute the version command of the nwabap command, the following error appears.

internal/fs/utils.js:308
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/usr/local/lib/node_modules/nwabap-ui5uploader/node_modules/figlet/fonts/isometric3.flf'
    at Object.openSync (fs.js:476:3)
    at Object.readFileSync (fs.js:377:35)
    at Function.figlet.loadFontSync (/usr/local/lib/node_modules/nwabap-ui5uploader/node_modules/figlet/lib/node-figlet.js:48:23)
    at Function.me.textSync (/usr/local/lib/node_modules/nwabap-ui5uploader/node_modules/figlet/lib/figlet.js:879:43)
    at Command.<anonymous> (/usr/local/lib/node_modules/nwabap-ui5uploader/cli/commands/version.js:16:28)
    at Command.listener (/usr/local/lib/node_modules/nwabap-ui5uploader/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:315:20)
    at Command.parseArgs (/usr/local/lib/node_modules/nwabap-ui5uploader/node_modules/commander/index.js:651:12)
    at Command.parse (/usr/local/lib/node_modules/nwabap-ui5uploader/node_modules/commander/index.js:474:21)
    at bootstrap (/usr/local/lib/node_modules/nwabap-ui5uploader/cli/bootstrap.js:13:13) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/usr/local/lib/node_modules/nwabap-ui5uploader/node_modules/figlet/fonts/isometric3.flf'
}

wrong param name for strictssl configuration

There is a typo in the name of the parameter for configuring strictssl. The option name is usestrictssl, but the used variable is option.conn_usestrictssl. This leads to the behavior, that the option --usestrictssl false is ignored.

Transmission breaks often with different Errors

Hi Guys,

following Issues occur often when i try to upload my ui5 App:

Very often:
Request-Url: ..../sap/bc/adt/filestore/ui5-bsp/objects/....
Request-Method: put
Error: socket hang up
Details:
undefined

Sometimes:
The other Error is an csrf Failure, i don't have a example at the moment.
Something like csrf token verification failed

We got an Azure Pipeline running this tasks, there the "socket hung up" Issue never occured, only the csrf failure sometimes.

At the moment we can't use the Azure Pipeline, so we have to upload form our local Devices and the Transmission breaks are annoying.

Can you give us an advice what we maybe are doing wrong or take this Issue into your "to-do List".

Greetz
Christian

Reference to environment variables

Hello,
I use this package and it is great.

Is there are some way to connect the properties as <conn_user> and <conn_password> to .env file ?

Best Regards,

gulp-util version deprecated

Hi,

when installing this wonderfull tools, npm states that the version of gulp-util is now deprecated.

We should use V4.0.*

Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.