gcp-metadata
npmv9.0.3TypeScriptGet 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.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
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
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.
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) {gcp-metadata vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| gcp-metadatathis page | 0 | 1 | Apache-2.0 | 28 days ago |
| side-channel-weakmap | 78.5M | 1 | MIT | 19 hours ago |
| chrome-trace-event | 31.8M | 1 | MIT | 14 hours ago |
| side-channel | 0 | 3 | MIT | 14 hours ago |
| gaxios | 0 | 1 | Apache-2.0 | 14 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)
Used by
Popular packages that depend on gcp-metadata.
Relationship graph
Dependencies (left) and dependents (right) of gcp-metadata.
Frequently installed together
Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.
A collection of credential providers, without requiring service clients like STS, Cognito
Official client encryption module for the MongoDB Node.js driver
Fastest Snappy compression library in Node.js
[](https://github.com/mongodb-js/zstd/actions/workflows/test.yml)
An extremely fast JavaScript and CSS bundler and minifier.
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Fast, unopinionated, minimalist web framework
TypeScript execution environment and REPL for node.js, with source map support
Signs and prepares requests using AWS Signature Version 4
MongoDB connection strings, based on the WhatWG URL API
Release history
15 releases in the last two years, typically about 17 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 9.0.3latest | 28 days ago | 57 KB | Apache-2.0 |
| 9.0.2 | 1 month ago | 57 KB | Apache-2.0 |
| 9.0.1 | 1 month ago | 57 KB | Apache-2.0 |
| 9.0.0 | 1 month ago | 56 KB | Apache-2.0 |
| 8.1.4 | 1 month ago | 56 KB | Apache-2.0 |
| 8.1.3 | 3 months ago | 56 KB | Apache-2.0 |
| 8.1.2 | 10 months ago | 55 KB | Apache-2.0 |
| 8.1.1 | 11 months ago | 56 KB | Apache-2.0 |
| 8.1.0 | 11 months ago | 56 KB | Apache-2.0 |
| 7.0.1 | 1 year ago | 56 KB | Apache-2.0 |
| 7.0.1-experimental | 1 year ago | 56 KB | Apache-2.0 |
| 7.0.0 | 1 year ago | 56 KB | Apache-2.0 |
| 7.0.0-rc.1 | 1 year ago | 55 KB | Apache-2.0 |
| 7.0.0-rc.0 | 1 year ago | 56 KB | Apache-2.0 |
| 6.1.1 | 1 year ago | 81 KB | Apache-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.
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.