Socket
Socket
Sign inDemoInstall

@vbudovski/google-maps

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vbudovski/google-maps

A TypeScript-typed and runtime-validated Google Maps Platform API.


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

0.3.0

Minor Changes

  • 4f700da: Generate API from OpenAPI specification

Readme

Source

Google Maps Platform API

A TypeScript-typed and runtime-validated Google Maps Platform API. The requests and responses are validated using Zod and based on the OpenAPI specification.


⚠ Warning: This library is for server-side applications only. Do not use it for client-side applications to prevent your API key from leaking — use one of the client-side libraries instead.


The current list of supported APIs:

Installation

pnpm add @vbudovski/google-maps

Development

Getting started

Install the dependencies:

nvm use
pnpm install

Copy the sample environment variables file env.sample to .env and set the required variables. GOOGLE_MAPS_API_KEY must be set in order to run the tests.

Building the library

pnpm build

Running tests

pnpm test

Updating the APIs

When a new version of the OpenAPI schema is released, it is necessary to re-generate the schemas and expose the exports for use.

  1. Generate the new Zod schemas and fetch functions:

    pnpm generate
    
  2. Export the new functions from a module in src/api. Be sure to follow existing patterns.

  3. Add a test module in src/test. The name should match that of the API export module.

FAQs

Last updated on 05 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc