Socket
Socket
Sign inDemoInstall

arcgis-lib-downloader

Package Overview
Dependencies
63
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.5 to 1.2.6

7

bin/arcgis-lib-downloader.js

@@ -16,3 +16,3 @@ #!/usr/bin/env node

program.version('1.2.5');
program.version('1.2.6');
const url = 'https://developers.arcgis.com/data/downloads.json';

@@ -340,3 +340,6 @@ const settings = { method: 'Get' };

const editedCurr= curr.slice(1);
const finalCurr = editedCurr.replace('_', '.');
let finalCurr = editedCurr.replace('_', '.');
while(finalCurr.indexOf('_') !== -1) {
finalCurr = finalCurr.replace('_', '.');
}
// if the user doesn't specify a version number, use the most current available

@@ -343,0 +346,0 @@ Object.keys(downloadList).forEach((info) => {

{
"name": "arcgis-lib-downloader",
"version": "1.2.5",
"version": "1.2.6",
"description": "npm package for gaining access to ArcGIS programs",

@@ -5,0 +5,0 @@ "main": "app.js",

# ArcGIS Lib Downloader
npm package for gaining access to ArcGIS products
Download ArcGIS developer libraries from the terminal
# Installation
## Installation
`npm install arcgis-lib-downloader`
# Options
## Quick Start
arcgis-lib-downloader supports 3 options:
To download a library:
* --list-products: lists different products available as well as various information about them
* --list-versions: lists more detailed information about different versions available for each product
* -p, --product: download product of your choice
1. Install the library: `npm install arcgis-lib-downloader`
2. See the available products with `arcgis-lib-downloader --list-products`
3. Take a product `Key` from the previous step (for example, `qt`) and see the versions: `arcgis-lib-downloader --list-versions qt`
4. Take a product `Version` from the previous step (for example, `100.11.2`) and download that version of the library: `arcgis-lib-downloader --product qt --ver 100.11.2`
The following list contains the keywords that can be used to download each product:
android (ArcGIS Runtime SDK for Android), ios (ArcGIS Runtime SDK for iOS), java (ArcGIS Runtime SDK for Java), javascript (ArcGIS API for JavaScript), local-server (ArcGIS Runtime Local Server SDK), macos (ArcGIS Runtime SDK for macOS), net (ArcGIS Runtime SDK for .NET), qt (ArcGIS Runtime SDK for Qt), enterprise-sdk (ArcGIS Enterprise SDK), arcgis-experience-builder (ArcGIS Experience Builder), web-appbuilder (ArcGIS Web AppBuilder), wpf (ArcGIS Runtime SDK for WPF)
## Options
The following options are optional to use with the product download feature:
| Option | Description |
|---|---|
| `--list-products` | Lists the different products available for download and other information about them. |
| `--list-versions` | List more detailed information about the versions available for a product. Pass in the short name of the product. For example, `arcgis-lib-downloader --list-versions qt` |
| `-p`, `--product` | Download a library. See "product download options" section below for additional options available when using this option. |
| `-h`, `--help` | See the help documentation - available commands, etc. |
* -v, --ver: specify the version number that you would like to download, or leave blank to download the most recent version
### Product download options
* --user: enter your ArcGIS Online username into the command line directly
These options are available when downloading (using the `--product` option).
* --password: enter your ArcGIS Online password into the command line directly
| Option | Description |
|---|---|
| `-v`, `--ver` | Specify the version number that you would like to download, or leave blank to download the most recent version. |
| `--user` | Your ArcGIS Online username. Required if not providing credentials via another method (see "Other options to provide credentials" below). |
| `--password` | Your ArcGIS Online password. Required if not providing credentials via another method. |
For the --user and --password commands, you may enter them into the command line following the product and version commands that you have specified. If you choose not to enter them though, you will be prompted for them in another format, so it is not completely necessary to enter them into the CLI at the start.
### Examples
An example of a fully formatted entry could be:
Download the ArcGIS API for JavaScript v4.19, passing a username and password:
```bash
arcgis-lib-downloader -p javascript -v 4.19 --user abc123 --password def456
```
To get additional help in the CLI:
## Other options to provide credentials
* -h: list the available commands that users can enter into the command line directly in the CLI
To utilize environment variables as a method of authenticating your ArcGIS Online credentials:
# Usage
1. Create a `.env` file in the same directory that you are working with the ArcGIS Lib Downloader.
2. On the first line of the `.env` file, type in:
ARCGIS_LIB_DOWNLOADER_USERNAME = **insert YOUR username here**
3. On the second line of the `.env` file, type in:
ARCGIS_LIB_DOWNLOADER_PASSWORD = **insert YOUR password here**
4. Now when you run the lib downloader, it is not necessary to enter your credentials using the --user and --password switches.
The option for listing out the products can be used by executing the following operations:
## Contributing
* install arcgis-lib-downloader
* enter 'arcgis-lib-downloader --list-products' into the command line
Once these two things are done, a table will display with all of the relevant information about each product.
The option for listing out the versions can be used by executing the following operations:
* install arcgis-lib-downloader
* enter 'arcgis-lib-downloader --list-versions' into the command line
Once these two things are done, a table will display with all of the relevant information about each version of each product.
The option for downloading products can be used by executing the following operations:
* install arcgis-lib-downloader
* enter 'arcgis-lib-downloader -p' or 'arcgis-lib-downloader --product' into the command line followed by the product you want to download. You can also specify which vertison of said product you would like to download by entering '-v' or '--ver' after the product on the same command line entry, or you can leave it blank to download the most recent version available. Additionally, users can pass in their ArcGIS Online username and password directly into the command line using the '--user' and '--password' commands, or they can omit these and be prompted for them at a later point.
# Packages Used
* @esri/arcgis-rest-auth.js
* @esri/arcgis-rest-request.js
* Commander.js
* cross-fetch.js
* dotenv.js
* fs.js
* isomorphic-form-data.js
* prompt.js
* table.js
* yargs.js
This project was created using Node.js. If you wish to contribute and suggest changes to enhance the performance of the lib downloader, first make sure that you have Node and npm installed on your machine. Next, you are either going to need to clone this repository and create a local version on your machine or create a Pull Request that can be reviewed by one of the contributors of this repository.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc