</>PackageGraphPackageGraph

gcp-metadata

npmv9.0.3TypeScript

Get the metadata from a Google Cloud Platform environment

Safe to adopt

Yes — gcp-metadata scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 28 days ago. 15 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • AMaintenance: grade A, Excellent.

    Last published 28 days ago. 15 releases in the last 2 years.

  • BWeight: grade B, Good.

    Pulls in 14 transitive packages, about 1.1 MB installed (at least — some of the tree is still being crawled).

  • ASupply chain: grade A, Excellent.

    No install scripts, 3 maintainers, and a contained dependency surface.

  • ALicense: grade A, Excellent.

    Apache-2.0 — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding gcp-metadata to a project.

3
Direct dependencies

Runtime packages this one declares itself.

14
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

1.1 MB
Install size

Unpacked size of this package plus its entire runtime tree.

4
Tree depth

Longest resolved dependency chain below this package.

Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.

Licenses in the dependency tree

Apache-2.0MIT

Every license you inherit by installing gcp-metadata, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node >=22
Module format
CommonJS only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the gcp-metadata README.

javascriptFull README ↗
const gcpMetadata = require('gcp-metadata');

async function quickstart() {
  // check to see if this code can access a metadata server
  const isAvailable = await gcpMetadata.isAvailable();
  console.log(`Is available: ${isAvailable}`);

  // Instance and Project level metadata will only be available if
  // running inside of a Google Cloud compute environment such as
  // Cloud Functions, App Engine, Kubernetes Engine, or Compute Engine.
  // To learn more about the differences between instance and project
  // level metadata, see:
  // https://cloud.google.com/compute/docs/storing-retrieving-metadata#project-instance-metadata
  if (isAvailable) {
Example truncated — see the full README.

gcp-metadata vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
gcp-metadatathis page01Apache-2.028 days ago
side-channel-weakmap78.5M1MIT19 hours ago
chrome-trace-event31.8M1MIT14 hours ago
side-channel03MIT14 hours ago
gaxios01Apache-2.014 hours ago

Dependencies

Declared by gcp-metadata v9.0.3. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (3)

Dev (21)

@google-cloud/functions ^5.0.0@types/json-bigint ^1.0.4@types/mocha ^10.0.10@types/ncp ^2.0.8@types/node ^24.0.0@types/sinon ^21.0.0@types/tmp ^0.2.6c8 ^10.1.3chai ^4.3.10cross-env ^7.0.3gcbuild ^1.3.39gts ^6.0.2jsdoc ^4.0.4jsdoc-fresh ^6.0.0jsdoc-region-tag ^5.0.0mocha ^11.1.0ncp ^2.0.0nock ^14.0.5sinon 21.0.3tmp 0.2.5typescript 5.8.3

Used by

Popular packages that depend on gcp-metadata.

Relationship graph

Dependencies (left) and dependents (right) of gcp-metadata.

gaxiosgoogle-logging-ut…mongodbgcp-metadata
gcp-metadata dependencies dependents

Frequently installed together

Release history

15 releases in the last two years, typically about 17 days apart.

Recent versions of gcp-metadata
VersionPublishedSizeLicense
9.0.3latest28 days ago57 KBApache-2.0
9.0.21 month ago57 KBApache-2.0
9.0.11 month ago57 KBApache-2.0
9.0.01 month ago56 KBApache-2.0
8.1.41 month ago56 KBApache-2.0
8.1.33 months ago56 KBApache-2.0
8.1.210 months ago55 KBApache-2.0
8.1.111 months ago56 KBApache-2.0
8.1.011 months ago56 KBApache-2.0
7.0.11 year ago56 KBApache-2.0
7.0.1-experimental1 year ago56 KBApache-2.0
7.0.01 year ago56 KBApache-2.0
7.0.0-rc.11 year ago55 KBApache-2.0
7.0.0-rc.01 year ago56 KBApache-2.0
6.1.11 year ago81 KBApache-2.0

Overview

gcp-metadata is an npm package that get the metadata from a Google Cloud Platform environment. It has 1 known dependents in the graph. The latest version is 9.0.3, released under the Apache-2.0 license.

Who should use it

Teams working in the npm ecosystem who need get the metadata from a Google Cloud Platform environment and value a focused solution.

When not to use it

Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (Apache-2.0).

Cons

  • Large dependency tree (24 direct dependencies) increases install size and audit surface.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use gcp-metadata?

Yes — gcp-metadata scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 28 days ago. 15 releases in the last 2 years.

How do I install gcp-metadata?

Run `npm install gcp-metadata` to add gcp-metadata to your npm project.

How many dependencies does gcp-metadata have?

gcp-metadata declares 24 direct dependencies and pulls in 14 packages in total once its runtime tree is resolved totalling about 1.1 MB on disk.

What license is gcp-metadata released under?

gcp-metadata is distributed under the Apache-2.0 license. Its dependency tree also includes: Apache-2.0, MIT.

How popular is gcp-metadata?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on gcp-metadata.

Is gcp-metadata still maintained?

The most recent release of gcp-metadata (v9.0.3) was published 28 days ago.

Does gcp-metadata run install scripts?

No. gcp-metadata does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.