npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@htammen/deploy-abap-logger

v0.0.2

Published

pkg that logs deployment of ui5 apps to abap repository (BSP)

Downloads

2

Readme

Git Deploy logger

A tool that can be used to write logging info about deployments (also other actions are possible) of applications.
We use this tool to log our deployments of SAPUI5 applications to SAP ABAP repository.

When you call this tool it collects some information from git, package.json as well as some SAP specific deploy information and writes it to a local json file.

Written log information

The log is written in json format. Here you see what gets logged

[
  {
    "project": "<name of package.json>",
    "version": "<version of package.json>",
    "branch": "<the current git branch>",
    "username": "<the git username from git config>",
    "date": "<current date with format yyyy-mm-dd>",
    "time": "<current time with format HH:MM:ss>",
    "commit": "<the latest git commit hash>",
    "commitInfo": "<additional information, e.g. problems that occured>",
    "abap_package": "<package name of the ABAP package the bsp is associated to",
    "abap_bsp": "<name of the ABAP BSP the application is deployed to>",
    "abap_transport": "<ABAP transport name/ID>"
  }
]

and here is an example

[
  {
    "project": "salesorder-app",
    "version": "1.1.0",
    "branch": "main",
    "username": "Helmut Tammen",
    "date": "2024-09-15",
    "time": "14:19:31",
    "commit": "",
    "commitInfo": "deployed with unstaged changes",
    "abap_package": "ZOURS_TP_APPS",
    "abap_bsp": "ZTP_MONI_FLP",
    "abap_transport": "AB1K600434"
  }
]

Property Documentation

project

The tool reads the property name from your package.json and prints it in this property.

version

The tools reads the property version from your package.json and prints it in this property.

branch

The branch is read with the command git branch --show-current and printed to this property.

username

The username is read with the command git config user.name and printed to this property.

date

This is the current date with format yyyy-mm-dd

time

This is the current time with format HH:MM:ss

commit

Here the commit hash from the current git commit is printed. But this is only true if there are no unstaged changes in your current workspace and if there are no uncommitted changes.
We only write the commit hash for commited changes to make clear that this deployment may not be reproducable at a later time, e.g. if the developer discards and never commits the changes.
If commit is empty the commitInfo gives more details.

commitInfo

Additional information to the git commit. Gets only filled if commit is empty.

abap_package

ABAP package name. This is either read from the file ui5-deploy.yaml or .nwabaprc.

abap_bsp

ABAP bsp name. This is either read from the file ui5-deploy.yaml or .nwabaprc.

abap_transport

ABAP transport name/ID. This is either read from the file ui5-deploy.yaml or .nwabaprc.

Installation

npm install -D @htammen/deploy-abap-logger

Usage

To use this tool just add it to a script of your package.json.
Here is an example. Here we use nwabap:upload to deploy our SAPUI5 application to the ABAP system.

  "scripts": {
    ...
    "deploy": "npm-run-all build nwabap:upload write-deploy-log",
    "write-deploy-log": "deploy-abap-logger"
  }

Contribution

This package currently works for our environment. There might be other ones that are slightly different.
If it does not fit into yours you can either add changes via forks and pull requests or create an issue. on github.