1.0.1 • Published 3 years ago

dronahq-cli v1.0.1

Weekly downloads
2
License
ISC
Repository
-
Last release
3 years ago

What is it good for?

The library allows you to:

  • Create vanilla project of microapp.
  • Package the project in a format which can be uploaded on DronaHQ Admin Console.
  • Keep dronahq.js version upto date.
  • Test created microapp in DronaHQ simulator.
Toolset
  • npm 5 is required.
  • Node 8 LTS is required.
Installing

Switch to dev CLI:

$ dhq

Examples

Basic usage

Executing CLI

Create a new Project :

  1. Run the script with the command
$ dhq
  1. Select 'create a new Project.' ( It will download the dronahq package which has the vanilla version of the project ).
  2. Enter the path where the project needs to be created.
  3. Modify as required inside the project.

image

If you already have created project you dont need to follow this step

Package the Project :

  1. Run the script with the command
$ dhq
  1. Select Build a Zip of the Project.
  2. It will request for path, enter the path till folder which has index.html present inside.
  3. If all the files that are required are present then a zip file will be created by the name of the zippedProject.zip
  4. This file then can be uploaded directly into the website.

image

Check if dronahq.js is upto date (outdated as now this is done during packaging the project):

  1. Run the script with the command
$ dhq
  1. Select 'Check if DronaHQ.js is upto date'.
  2. The CLI tool will request for the path where dronahq.js is present (Enter the path till the javascript folder which has dronahq.js).
  3. The dronahq.js will be compared with the online dronahq.js and if it is a previous version it will ask if you want to update the js if answered with a Y then the dronahq.js will get updated or the same dronahq.js will be present inside the project.

image

Setting up user environment for DronaHQ simulator :

  1. Run the script with the command
$  dhq
  1. Select 'Setup user environment for DronaHQ simulator'.
  2. Fill the details as requested by the tool.
  3. Your environment will be ready.

Run DronaHQ simulator for your micro app:

  1. Run the script with the command
$ dhq
  1. Select 'Run DronaHQ simulator'.
  2. It will request for path, enter the path till folder which has index.html present inside.
  3. Happy debugging your App.

Note: Currently simulator is not supported on MAC.

If the simulator does not run execute the following command in command prompt

  npm install -g electron

Publish package to DronaHQ console:

  1. Run the script with the command
$ dhq
  1. Select 'Upload package to Dronahq console'.
  2. Provide the details as requested.
  3. Your app is successfully available on DronaHQ.

Publish package to DronaHQ Console - Via CLI (new)

You can directly upload and publish a package to an existing app you've already created, using command-line options to provide details you'd have to provide through the interactive interface otherwise.

SYNOPSIS

dhq -a=[APIKEY] -e=[ENVIRONMENT] -u=[UPDATETYPE] -d=[DESCRIPTION] -p=[PATH]
dhq -a=[APIKEY] -e=[ENVIRONMENT] -u=[UPDATETYPE] -d=[DESCRIPTION] -p=[PATH] -o=[OUTPUTFILE]
dhq -f=[INPUTFILE] -o=[OUTPUTFILE]


dhq --apikey=[APIKEY] --environment=[ENVIRONMENT] --updateType=[UPDATETYPE] --description=[DESCRIPTION] --path=[PATH]
dhq --apikey=[APIKEY] --environment=[ENVIRONMENT] --updateType=[UPDATETYPE] --description=[DESCRIPTION] --path=[PATH] --outfile=[OUTPUTFILE]
dhq --file=[INPUTFILE] --outfile=[OUTPUTFILE]

EXAMPLE

dhq -a=xxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -e=prod -u=patch -d=Description -p=path/to/file
dhq -a=xxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -e=prod -u=patch -d=Description -p=path/to/package.zip -o=path/to/output.csv
dhq -f=path/to/inputFile.zip -o=path/to/output.csv

dhq --apikey=xxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --environment=prod --updateType=patch -d=Description -p=path/to/file
dhq --apikey=xxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --environment=prod --updateType=patch --description==Description --path=path/to/package.zip --outfile=path/to/output.csv
dhq --file==path/to/inputFile.zip --outfile=path/to/output.csv

OPTIONS

-a, --apikey
  • -> Required The active license key for your created app.
-e, --environment
  • -> Required The app environment for your app's new version.

Options: dev, beta, prod

-u, --updateType
  • -> The update type of your new version as per semantic versioning syntax.

    Options: major, minor, patch (default: patch)

-d, --description
  • -> Required The release notes for your app's new version.
-p, --path
  • -> Required The path for your package's zip file for your app's new version.
-o, --outfile
  • -> The path for an output file for publish statuses. The output will be provided in CSV format. If the file doesn't exist, one will be created with a CSV string in the first line to signify headers.
-f, --file
  • -> The path for a JSON file containing values for the above arguments - use the full names of the above arguments as keys and string values. Keys provided here do not need to be provided again as separate CLI arguments. Sample JSON input:-
  {
    "apikey": "<APIKEY>",
    "environment": "<ENVIRONMENT>",
    "updateType": "<UPDATETYPE>",
    "description": "<DESCRIPTION>",
    "path": "<PATH>",
    "outfile": "<OUTFILE>"
  }
Dependencies

adm-zip, chalk,clui, co, co-prompt, commander, compare-versions, electron, figlet, folder-zip-sync, github, inquirer, lodash, minimist, node-storage, preferences, q, rimraf, simple-git, superagent,sync-request, touch, unzip, validator, zip-folder.

1.0.1

3 years ago

1.0.0

3 years ago

0.1.695

6 years ago

0.1.694

6 years ago

0.1.693

6 years ago

0.1.692

6 years ago

0.1.691

7 years ago

0.1.69

7 years ago

0.1.68

7 years ago

0.1.67

7 years ago

0.1.66

7 years ago

0.1.65

7 years ago

0.1.64

7 years ago

0.1.63

7 years ago

0.1.62

7 years ago

0.1.61

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.55

7 years ago

0.0.54

7 years ago

0.0.53

7 years ago

0.0.52

7 years ago

0.0.51

7 years ago

0.0.50

7 years ago

0.0.49

7 years ago

0.0.47

7 years ago

0.0.46

7 years ago

0.0.45

7 years ago

0.0.44

7 years ago

0.0.43

7 years ago

0.0.42

7 years ago

0.0.41

7 years ago

0.0.40

7 years ago

0.0.39

7 years ago

0.0.38

7 years ago

0.0.37

7 years ago

0.0.36

7 years ago

0.0.35

7 years ago

0.0.34

7 years ago

0.0.33

7 years ago

0.0.32

7 years ago

0.0.31

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago