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

mfpx

v1.2.1

Published

Simple launcher and utilities for IBM MobileFirst Platform Command Line Interface (CLI)

Downloads

7

Readme

Overview

MFP eXtras (mfpx) is a simple launcher/utility for the MobileFirst Platform (MFP) Command Line Interface (CLI). It acts as a wrapper to the official CLI that performs functions not currently part of the official product release. Some features may eventually go into the product, or be obsoleted by future CLI versions.

Primary Features

The following features are currently provided by the MFPX CLI:

  • Supports multiple installed versions of the MFP CLI
    • Easily switch between CLI versions
    • Enable custom workspaces and settings for each version
    • Direct install all current MFP CLI versions
    • Simple installation of latest pre-release nightly drivers (IBM Internal only)
    • Set custom settings -- such as Java runtime -- per version
  • Local server smackdown
    • Force kill a mis-behaving MFP Server
    • Clean up local server issues
  • Custom export/import support for new MFP Cordova apps

Prerequisites

This launcher requires node.js to be previously installed. Additionally, its only been used/tested on OSX. Some commands require OSX, so if you are a Windows user and want to get things working under that platform, contributions are welcomed!

The following node modules are used by mfpx, and should already be installed globally.

  • child_process
  • http
  • fs
  • unzip

If you receive an error on any of these, run the following command to install them. OSX users may need to prefix with sudo.

$ npm install -g <module>

Obviously, you will also need at least one instance of the MFP CLI. You can install the latest released version here. For prior releases, see this Stack Overflow post for options. To obtain the latest pre-release nightly, simply run mfp update.

Installation

  1. Install the mfpx runtime and dependencies:

$ npm install -g mfpx

Note: You may need to use sudo for osx/linux systems.

  1. Edit your ~/.profile (or similar) and add the following alias.

alias mfp="mfpx"

The GUI installers (hopefully goinf away soon!) will still add the real mfp command to your PATH, but aliases are interpreted before PATH entries.

Commands

The following commands are available as part of this mfp luancher.

Change active version

Change the active version to be used when running 'mfp'. After running this command, all subsequent commands will be run using the defined version, and the applied to the app in the current APP_HOME directory.

$ mfp set <M.m>

Example: mfp set 7.1

It is assumed that you have already installed the target version. In the example above, the ios specific version of mfp is requested. Normally, you might just want to specify mfp set 7.1.

Install a version of mfp, or dev driver (IBM internal only)

Updates the latest pre-release version of the cLI. This command is only available to IBM internal users. Depending on your connections, this command can take take a while to complete.

> mfp install <M.m>[-dev]

At the time of this document, version 7.1 is in progress, and will be downloaded and configured. Obviously, as a work in progress, this version may fail spectacularly. Be aware of that its not released or tested!

Special entries in the 'mfp_version' config map that end with "-dev", will dynamically search the IBM internal dev driver site for the latest available version, download and install it. Contact the author or Tooling team in Raleigh for the proper URL.

Kill server

The Liberty server has a bad habit of getting confused. We're working to resolve this issue but as of now its still an issue. Common catalysts are sing the Studio and CLI concurrently, or using different versions of the CLI. This command tries to be nice, and get aggressively forceful in ensuring the server is shut down. We're adding this support to the product CLI, as it just a bad situation.

> mfp kill

The default port to kill is '10080', and is defined for each version in the .mfpx.json config file.

Help (-?)

Help specific to the launcher itself can be exposed using the '-?' argument. Sample out is:

MFP Launcher, v1.0.0
Configuration file: /Users/kfbishop/.ibm/mobilefirst-launcher.json
MFP Command: /Users/kfbishop/dev/mobilefirst/mobilefirst-cli-7.1/bin/mobilefirst-cli.js

Current Config:
{
  "VERSION": "7.1",
  "JAVA_HOME": "/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home",
  "MFP_HOME": "/Users/kfbishop/dev/mobilefirst",
  "MFP_INSTALL_DIR": "/Users/kfbishop/dev/mobilefirst/installers",
  "MANAGE_APP_HOME": true,
  "APP_HOME": "/Users/kfbishop/dev/mobilefirst/apps",
  "DEFAULT_MFP_PORT": "10080"
}

Config descriptions:
  VERSION          : Installed version of 'mfp' to execute
  JAVA_HOME        : Set specific Java Runtime? (eg /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
  MFP_HOME         : MFP Home directory for custom runtimes
  MFP_INSTALL_DIR  : Where to keep installation archives
  MANAGE_APP_HOME  : Dynamically support app home linking? (eg apps --> apps-7.1)
  APP_HOME         : Linked directory where apps reside. Real dir at: ${APP_HOME}-X.y
  DEFAULT_MFP_PORT : Default port to use on 'mfp kill <port>'

At this time, only manual updates are supported. The exception is the VERSION value, that can be set using the mfp set version command.