@mapbox/mapbox-upload-validate

4.8.0 • Public • Published

Build Status Coverage Status

mapbox-upload-validate

Validate that a file can be uploaded to Mapbox

Install

$ npm install -g @mapbox/mapbox-upload-validate

Configuration

By default file metadata has a 60.0Kb limit. You can override this value with the LIMITS_MAX_METADATA environment variable. See https://github.com/mapbox/mapbox-upload-limits for additional configuration.

Usage

$ mapbox-upload-validate /path/to/data/file

Where /path/to/data/file is the path to a file.

There are three possible results:

  • Valid: process exit 0 and logs the file's path to stdout
  • Invalid: process exit 3, nothing is logged to stdout, and a validation error is printed to stderr
  • Unexpected: something unexpected happened and we could not confirm whether or not the file is valid. Process exit 1 with nothing printed to stdout and an error message printed to stderr

The following types of files are supported for upload to Mapbox.com:

  • Mbtiles
  • GeoTIFF
  • Zipped Shapefile
  • GeoJSON
  • TopoJSON
  • GPX
  • KML
  • TileJSON
  • tm2z
  • Serialtiles

Run tests

Setup your environment with some variables:

  • MapboxAccessToken: for access to mapbox.com

Then

npm test

Readme

Keywords

none

Package Sidebar

Install

npm i @mapbox/mapbox-upload-validate

Weekly Downloads

3

Version

4.8.0

License

ISC

Unpacked Size

33.6 kB

Total Files

19

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user