New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@matt-riley/gcp-cv-import

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matt-riley/gcp-cv-import

## Description

0.0.8
latest
Source
npm
Version published
Maintainers
1
Created
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

Google Cloud Vision Product Search

FAQs

Package last updated on 10 Feb 2020

Did you know?

Socket

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