0.2.0 • Published 7 years ago

purecloud-sdk-upgrade v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

SDK Upgrade Script

A script to update source code for new SDK versions where method names have changed. Running this script will yield no results when method names have not changed.

Setup

Prerequisites

Setup steps

Install the module globally to allow use from the command line:

npm install -g purecloud-sdk-upgrade

Usage

Documentation

To view the docs, run the script without any parameters from the command line:

purecloud-sdk-upgrade

For your viewing pleasure, here is the output of that command:

Documentation Screenshot

Operation Map and Upgrading

Execute the script per the documentation:

purecloud-sdk-upgrade genops <old_swagger> <new_swagger>  

or

purecloud-sdk-upgrade upgrade <source_path> [<path_regex>] [<backup>] [<old_swagger> <new_swagger>]

Common Path Regexes

  • Java files: .*\\.java
  • JavaScript files: .*\\.js
  • C# files: .*\\.cs
  • Ruby files: .*\\.rb
  • Python files: .*\\.py

Executing the upgrade script with swagger file locations yields the following:

Execution Screenshot(execution screenshot.png)

The upgrade output will list each file that it processes, and any operations it finds that match. The matches are displayed with the line number in the given file and the full text of the line that is to be upgraded. The bolded text is what will be replaced with the new method name.