npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cumulus/update-granules-cmr-metadata-file-links

v22.3.3

Published

Update CMR metadata files with correct online access urls and etags and transfer etag info to granules' CMR files

Downloads

899

Readme

@cumulus/update-granules-cmr-metadata-file-links

This Cumulus task component updates CMR metadata files to have correct values for producerGranuleId and granuleIdCMR, and update all granule URL

  • CMR UMMG Metadata is updated with producerGranuleId added/updated in DataGranule.Identifiers as an array item with the type of ProducerGranuleId in the CMR metadata file, DataGranule.DayNightFlag and DataGranule.ProductionDateTime will also be populated if they are not already
  • CMR UMMG Metadata is updated with granuleId set to GranuleUR in the CMR metadata file
  • CMR UMMG Metadata updates OnlineAccessUrls such that the CMR granule metadata has the correct URL based on the incoming granule object and Cumulus bucket configuration
  • CMR XML Metadata is updated with producerGranuleId set as the value for Granule.DataGranule.ProducerGranuleId
  • CMR XML Metadata is updated with granuleId set as the value for Granule.GranuleUR
  • CMR XML Metadata updates the OnlineResources such that the CMR granule metadata has the correct URL based on the incoming granule object and Cumulus bucket configuration

Note As default behavior for this task, for UMMG and ECHO10 granules, a Granule.DataGranule section will be added if not already present within the metadata. For UMMG granules (as of CSD-85), the required fields (as seen here) of ProductionDateTime and DayNightFlag will be populated with default values (the time the task is ran for ProductionDateTime and Unspecified for DayNightFlag) if they are not already included, along with the other updates described above. For ECHO10 granules, the required field for DataGranules, ProducerGranuleId (as seen here), will be populated, along with the other updates described above. To disable adding/updating the granule's metadata in this task for both ECHO10 and UMMG granules, set excludeDataGranule as true (boolean, not a string) (added as part of CSD-85) in the task config schema. If set to true this task will not change anything relating to the Granule.DataGranule in the granule's metadata, no adding or updating.

Note To disable updating the granule metadata's identifiers and granuleUr in this task for both ECHO10 and UMMG, set updateGranuleIdentifiers to false (boolean, not a string) in the task config schema (added as part of CSD-91). By default, this task sets updateGranuleIdentifiers to true for both ECHO10 and UMMG.

Input/Output Schema

Input

{
  "granules": [
    {
      "granuleId": "<granule-id>",
      "files": [
        {
          "bucket": "cumulus-bucket",
          "key": "path/to/file.hdf",
          "filename": "s3://cumulus-bucket/path/to/file.hdf"
        },
        {
          "bucket": "cumulus-bucket",
          "key": "path/to/file.cmr.xml",
          "filename": "s3://cumulus-bucket/path/to/file.cmr.xml"
        }
      ]
    }
  ]
}

Output

{
  "granules": [
    {
      "granuleId": "<granule-id>",
      "files": [
        {
          "bucket": "cumulus-bucket",
          "key": "path/to/file.hdf",
          "filename": "s3://cumulus-bucket/path/to/file.hdf"
        },
        {
          "bucket": "cumulus-bucket",
          "key": "path/to/file.cmr.xml",
          "filename": "s3://cumulus-bucket/path/to/file.cmr.xml"
        }
      ]
    }
  ]
}

The task updates the URLs in the CMR metadata files but returns the same granules object structure that was provided as input. The CMR file metadata (e.g. size) is updated to reflect any modifications made, as needed.

About Cumulus

Cumulus is a cloud-based data ingest, archive, distribution and management prototype for NASA's future Earth science data streams.

Cumulus Documentation

Contributing

Please refer to: https://github.com/nasa/cumulus/blob/master/CONTRIBUTING.md