Installations
npm install @radiantearth/stac-migrate
Score
74.8
Supply Chain
88.4
Quality
79
Maintenance
100
Vulnerability
99.6
License
Developer
stac-utils
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
18.12.1
NPM Version
8.19.2
Statistics
6 Stars
48 Commits
3 Watching
1 Branches
10 Contributors
Updated on 11 Sept 2024
Bundle Size
18.42 kB
Minified
5.36 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
65,019
Last day
-55%
587
Compared to previous day
Last week
68.2%
8,736
Compared to previous week
Last month
360.2%
16,908
Compared to previous month
Last year
242.3%
45,044
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Dev Dependencies
2
stac-migrate
A library to update STAC files to the latest version (1.1.0 at the moment of writing). Supports updating STAC versions 0.6.0 and later.
Version of this library: 2.0.0
Usage
JavaScript / Node
Add to your project with npm install @radiantearth/stac-migrate --save
Import the library: const Migrate = require('@radiantearth/stac-migrate');
-
Migrate (auto-detection):
Migrate.stac(stac: object, updateVersionNumber: boolean = true) => object
This method does not migrate the Commons extension - useMigrate.item
if you have used the Commons extension. -
Migrate a STAC Collection:
Migrate.collection(collection: object, updateVersionNumber: boolean = true) => object
-
Migrate a STAC Catalog:
Migrate.catalog(catalog: object, updateVersionNumber: boolean = true) => object
-
Migrate a STAC Item:
Migrate.item(item: object, collection: object = null, updateVersionNumber: boolean = true) => object
The
collection
parameter is only required to migrate the Commons extension. Otherwise, you don't need to pass this paramater. -
Migrate a STAC CollectionCollection:
Migrate.collectionCollection(apiCollections: object, updateVersionNumber: boolean = true) => object
-
Migrate a STAC ItemCollection:
Migrate.itemCollection(apiItems: object, updateVersionNumber: boolean = true) => object
Note: All changes will be applied in-place! If you don't want the input object to change, make a deep clone before. If you don't have a library which supports this (e.g. lodash) you can simply use var clone = JSON.parse(JSON.stringify(object));
.
CLI
You can also use the CLI to migrate a single file. The commands follow the different methods above and has the same "restrictions" as above.
- Migrate (auto-detection, override):
npx stac-migrate <source_path>
- Migrate (auto-detection, save to a different file with 4 spaces indentation):
npx stac-migrate <source_path> --dest <dest_path> --indent 4
- Migrate a STAC Collection:
npx stac-migrate <source_path> <dest_path> --collection
- Migrate a STAC Catalog:
npx stac-migrate <source_path> <dest_path> --catalog
- Migrate a STAC Item:
npx stac-migrate <source_path> <dest_path> --item --collection_path <collection_path>
- Migrate a STAC Item Collection:
npx stac-migrate <source_path> <dest_path> --item_collection
- Migrate a STAC Collection Collection:
npx stac-migrate <source_path> <dest_path> --collecions
Supported Extensions
- Checksum (legacy, use
Migrate.enableMultihash(require('multihashes'))
 to enable conversion from pre-0.9 checksums - disabled by default to keep the bundle size low) - Classification 2.0.0
- Collection Assets (legacy)
- Commons (legacy)
- Data Cube 2.2.0
- Datetime Range (legacy)
- Electro-Optical 2.0.0
- File 2.1.0 (and 1.0.0 for
nodata
) - Item Asset Definition 1.0.0 (legacy)
- Label 1.0.1
- Point Cloud 1.0.0
- Processing 1.2.0
- Projection 2.0.0
- Raster 2.0.0
- SAR 1.0.0
- Satellite 1.0.0
- Scientific Citation 1.0.0
- Single Item
- Table 1.2.0
- Timestamps 1.1.0
- Versioning Indicators 1.2.0
- View Geometry 1.0.0
Development
Run the tests: npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Score
3
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to @radiantearth/stac-migrate
stac-js
JS drop-in classes with utilities for STAC
@radiantearth/stac-fields
A list of STAC fields with metadata and formatting instructions.
@storybook/addon-controls
Interact with component inputs dynamically in the Storybook UI
ol-stac
An "automagical" STAC LayerGroup for OpenLayers