Socket
Socket
Sign inDemoInstall

@matt-riley/gcp-cv-import

Package Overview
Dependencies
121
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @matt-riley/gcp-cv-import

## Description


Version published
Weekly downloads
8
Maintainers
1
Created
Weekly downloads
 

Readme

Source

gcp-cv-import

Description

Package to bulk import your GCP Cloud vision product set.

Dependabot Status npm Language grade: JavaScript Maintainability

Usage

Install locally using npm

npm i -s @matt-riley/gcp-cv-import

Then within your code:

import ImportProductSet from '@matt-riley/gcp-cv-import';

const importPrdSet = new ImportProductSet({
  projectId: 'some-gcp-project',
  location: 'europe-west1',
  csvUri: 'gs://some-bucket/a-csv-file.csv'
});

const importResults = importPrdSet.import();

There is an optional argument that can be passed into new ImportProductSet which is, logger.

By default logger will use the standard console to log the results, however if you use something like winston or a custom logger, you can pass that in. The only stipulation is that it has to have a .info method.

ToDo

  • Handle errors better, the current approach just uses the errors provided from @google-cloud/vision - which aren't always that descriptive.

  • More tests & better mocking.

  • Improve the docs

Keywords

FAQs

Last updated on 10 Feb 2020

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