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

@sap/mdk-tools

v1.11.0

Published

It provides the CLI to assist Mobile Development Kit (MDK) application developers throughout the development lifecycle to: - deploy MDK metadata project to SAP Business Technology Platform (BTP) Cloud Foundry environment, - Mobile Services to run as m

Downloads

5,926

Readme

MDK Tools

It provides the CLI to assist Mobile Development Kit (MDK) application developers throughout the development lifecycle to:

  • deploy MDK metadata project to SAP Business Technology Platform (BTP) Cloud Foundry environment,
    • Mobile Services to run as mobile application
    • HTML5 repository to run as web application

Setup

  • Prerequisites
    • Node 12 or higher version
    • Space Developer role assigned to your user
    • Cloud Foundry CLI
    • Logon to Cloud Foundry by 'cf login'
    • MDK metadata project
    • MTA Build Tool (required for MDK web deployment)
    • MultiApps CF CLI Plugin (required for MDK web deployment)
      cf install-plugin -r CF-Community "multiapps"
    • CF HTML5 Applications Repository CLI Plugin (required for MDK web deployment)
      cf install-plugin -r CF-Community "html5-plugin"
  • Install
    npm install @sap/mdk-tools -g

Features

  • Builder

    You can build metadata project into js or zip file.

    Below command can get build parameter details:

    mdk build
    • target

      Target 'js' can build to bundle.js and bundle.js.map, you can use it to update your local run project.
      Target 'zip' can build to uploadBundle.zip, you can uploaded it to Mobile Services. Target 'source' can pack source code into zip with configuration for Mobile Services.This is for scenario to extend a multi tenant application.

      The build results are generated in .build folder under project.

    • project

      Metadata project, it's current folder if not provided.

    • externals

      Libs need to be ignored in webpack bundle process. The built-in externals are:

      • @nativescript/core
      • mdk-core
      mdk build --target zip --externals "@nativescript/geolocation" "external2"
    • filters

      Project folders/files need to be filtered in bundle procees. The built-in filters are:

      • /Web/
      mdk build --target zip --filters "/FolderA/" "/FolderB/readme.txt"
    • debugging

      Enable debugging by add devtool option

      mdk build --target zip --devtool "source-map"
    • bundle-definition-path

      The definition factory path for build purpose. The default path is the 'out' folder in mdk-tools.

    mdk build --target js
    mdk build --target js  --project /path/to/Your-MDK-metadata-project 
    mdk build --target zip --project /path/to/Your-MDK-metadata-project
    mdk build --target source --project /path/to/Your-MDK-metadata-project
  • Deployer

    You can deploy MDK metadata project directly to SAP Business Technology Platform (BTP) Cloud Foundry and NEO environment.

    Below command can get deploy parameter details:

    mdk deploy
    • Deploy to Mobile Services on Cloud Foundry to run it as a mobile application

      It bundles MDK metadata project, uploads to Mobile Services and publishes it. The name option is the application id in Mobile Services. If there's no name argument, it reads MobileService:AppId from .project.json file (applicable to MDK metadata project exported from SAP Business Application Studio). If there's no project argument, it reads current folder as MDK metadata folder.

      In case of MDK metadata project exported from SAP Web IDE, name argument is mandatory.

      mdk deploy --target mobile --name "com.mdk.myapp" --devtool "source-map"
      mdk deploy --target mobile --name "com.mdk.myapp" --project /path/to/Your-MDK-metadata-project
      mdk deploy --target mobile --name "com.mdk.myapp" --project /path/to/Your-MDK-metadata-project --externals "@nativescript/geolocation" "external2"
      mdk deploy --target mobile --name "com.mdk.myapp" --project /path/to/Your-MDK-metadata-project --showqr
      mdk deploy --target mobile --name "com.mdk.myapp" --project /path/to/Your-MDK-metadata-project

      If your Mobile Services is Preview version, you can add --preview option.

      mdk deploy --target mobile --name "com.mdk.myapp" --preview

      In case of deploying MDK bundle zip exproted from SAP Web IDE or Business Application Studio.

      mdk deploy --target mobile --name "com.mdk.myapp" --zip Your-MDK-bundle-zip-file

      In case of deploying MDK Base project with project source zip

      mdk deploy --target mobile --name "com.mdk.myapp" --zip Your-MDK-source-zip-file --source
    • Deploy to Mobile Services on NEO to run it as a mobile application

      • Prerequisites
        • NEO Mobile Services Admin API URL
        • Admin user name and password
          mdk deploy --target mobile --name "com.mdk.myapp" --project /path/to/Your-MDK-metadata-project --neo 

      The above example prompts user password input, reads adminApi and user from .project.json, if can't find them, then prompts user input.

          mdk deploy --target mobile --name "com.mdk.myapp" --neo --adminApi YourAdminAPI --user YourUserName --pwd YourPassword

      The above example starts deploy without prompts.

    • Deploy to HTML5 repository on Cloud Foundry to run it as web application

      It bundles MDK metadata project, builds it to MTA project and deploys to HTML5 repository. The name option is the application name in SAP BTP cockpit. If there is no name argument, it reads CF:Deploy:Name from .project.json file (applicable to MDK metadata project exported from SAP Business Application Studio). If there's no project argument, it reads current folder as MDK metadata folder.

      In case of MDK metadata project exported from SAP Web IDE, name argument is mandatory.

      mdk deploy --target cf --name "MyWebApplication" --devtool "source-map"
      mdk deploy --target cf --name "MyWebApplication" --project /path/to/Your-MDK-metadata-project 
      mdk deploy --target cf --name "MyWebApplication" --externals "@nativescript/geolocation" "external2"

      If you want to use preview web runtime or dev web runtime starts with https://, you can add --runtime option.

      mdk deploy --target cf --name "MyWebApplication" --runtime preview
      mdk deploy --target cf --name "MyWebApplication" --runtime "https://RuntimeUrl"
  • Migrator

    Migrate the MDK project to the latest schema version.

    The option '--preview' is only used to list all files that need to be migrated but not to do a real migration.

    mdk migrate --project /path/to/Your-MDK-metadata-project 
    mdk migrate --project /path/to/Your-MDK-metadata-project --preview

    If you want to migrate files to the specific schema version, use '--target-version' option (right now, we support only one target-version option 6.3):

    mdk migrate --project /path/to/Your-MDK-metadata-project --target-version 6.3

    Use 'log-file' option output the logs to a file (no need to create the log file firstly, it will be generated automatically):

    mdk migrate --project /path/to/Your-MDK-metadata-project --log-file /path/to/log-file.txt
  • Validator You can validate MDK project through the below command:

    mdk validate --project /path/to/Your-MDK-metadata-project --log-file /path/to/log-file.txt

    The option '--log-file' is not required, you can use it to output the logs to a file. You can use option '--log-level' to specify which logs can be output. The acceptable values are: 0 (Debug), 1 (Info), 2 (Warn), 3 (Error). Default value is 3.

    mdk validate --project /path/to/Your-MDK-metadata-project --log-file /path/to/log-file.txt --log-level 1