1.13.4 • Published 5 months ago

maximo-dev-tools v1.13.4

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
5 months ago

Introduction

The Maximo Developer Tools provide command line tools for developing and deploying automation scripts and other customizations. It is the command line companion to the Maximo Script Deploy Visual Studio Code extension: https://marketplace.visualstudio.com/items?itemName=sharptree.maximo-script-deploy.

Install

Using npm:

$ npm install -g maximo-dev-tools

Settings

The configuration settings can be provided as command line arguments or in a settings JSON file or a combination of the two. The command line arguments override the values provided in the settings JSON file.

Command Line Arguments

Global

The following table provides the available global arguments.

ArgumentDefaultDescription
--allow-untrusted-certsfalseAllow untrusted or invalid SSL certificates. Useful for testing when using self signed certificates, default is false.
--apikey | -aThe Maximo API key that will be used to access Maximo. If provided, the user name and password are ignored if configured.
--caPath to the Maximo server certificate authority (CA) if it is not part of the system CA chain.
--context | -cmaximoThe part of the URL that follows the hostname, default is maximo.
--host | -hThe Maximo host name or IP address without the http/s protocol prefix.
--install | -itrueIndicates if the utility scripts should install and upgrade automatically, default is true.
--key | -k.settings.json.keyThe path to the encryption key for the settings encrypted values. A relative path is relative to the settings.json file directory.
--maxauthfalseForce native Maximo authentication, default is false.
--password | --passwdThe Maximo user password.
--port | -p80 / 443The Maximo server port, defaults to 80 if the --ssl argument is false, 443 if the --ssl argument is true.
--settings | -ssettings.jsonThe path to the settings file, default is settings.json.
--ssltrueIndicates if SSL will be used, defaults to true.
--timeout | -t30The connection timeout in seconds, default is 30 seconds.
--username | -uThe maximo user name.
--helpPrints the help information.
--versionPrints the version number.

Encrypt

The encrypt command encrypts the plain text password and API key values in the settings file. There are no additional arguments for the encrypt command.

Extract

The extract command extracts scripts from the target Maximo system to a local directory.

ArgumentDefaultDescription
--directory | -d./The directory to extract the scripts to, defaults is the current directory.
--overwrite | -otrueOverwrite existing files if different from the server, default is true.
--typescriptThe type of object to extract, script, screen of form.

Deploy

The deploy command deploys one or more script files from the local machine to the target Maximo system.

ArgumentDefaultDescription
--deleteAllfalseIndicates if any script not in the current deploy directory, but on the server, will be deleted from the server. This option is may be destructive, the default is false.
--deleteListdelete.jsonPath to a file that contains a JSON list of the scripts on the server to delete if they exist, the default is delete.json.
--directory | -d./The directory to deploy the scripts from, defaults is the current directory.
--file | -fThe path to a single script file to deploy, if a relative path is provided it is relative to the --directory argument path.
--recursive | -rtrueIndicates if subdirectories will be included when deploying all scripts, the default is true.

Log

The log command streams the Maximo log to the console. This can then be piped to a file using the OS > filename.log command.

ArgumentDefaultDescription
--log-timeout30Number of seconds between logging requests, the default is 30.

Settings File

A sample settings JSON file is provided below with the default values.

{
    "allowUntrustedCerts": false,
    "apikey": undefined,
    "ca": undefined,
    "context": 'maximo',
    "maxauth": false,
    "host": undefined,
    "password": undefined,
    "port": 80|443,
    "ssl": true,
    "key": "~/.settings.json.key",
    "timeout": 30,
    "username": undefined,
    "install": true,
    "deploy": {
        "file": undefined,
        "recursive": true,
        "directory": './',
        "deleteAll": false,
        "deleteList": "delete.json"
    },
    "extract": {
        "directory": "./",
        "overwrite": true
    }
    "log": {
        "timeout": 30
    },
}