Giter VIP home page Giter VIP logo

node-etsy-client's Introduction

node-etsy-client

NPM

NodeJs Etsy REST API Client V3.

  • compatible with JavaScript and TypeScript.

In addition, this library provide an extra

  • OAuth2Service to manage oAuth2 workflow:
    • build connect url,
    • handle callback,
    • and manage refresh token.
    • with an oauth.js sample to make some oAuth2 manual tests.

EtsyClientV3

Features

using apiKey:

  • findShops
  • getShop
  • getShopSections
  • findAllActiveListingsByShop
  • getListing
  • getListingVariationImages
  • getListingImages
  • getListingProperty

using apiKey + OAuth token:

  • getListingsByShop
  • getListingInventory
  • getListingProduct

Quick start

First declare your api key:

export ETSY_API_KEY=xxxxxxxxxxx

install node-etsy-client:

npm install node-etsy-client

then let's go, here is a sample.js:

import { EtsyClientV3 } from 'node-etsy-client';
async function doIt() {
  var client = new EtsyClientV3();
  var shops = await client.findShops({'shop_name':'mony', limit:10});
  console.log(shops);
}
doIt();

You could play Mocha tests to get more examples (cf. next section).

You could avoid using environment variable by using constructor options:

var client = new EtsyClientV3({apiKey:'mSecretHere'});

Advanced usage

Etsy debug mode

To print out in the console the API call and response:

export ETSY_DEBUG=true

Etsy client options

This section describes EtsyClientV2/EtsyClientV3 available options.

Note about options precedence:

  • first take option value from constructor if any,
  • or else try to retrieve related environment variable,
  • or else apply default value.

Options:

Name Description
apiUrl Etsy API endpoint - (or env.ETSY_API_ENDPOINT) default value is (v2)https://openapi.etsy.com/v2 / (v3)https://openapi.etsy.com/v3
apiKey Etsy API key - required (or env.ETSY_API_KEY) without default value. Ask one from Etsy portal
shopId Etsy shop id - optional (or env.ETSY_SHOP_ID) without default value
lang Etsy language - optional (or env.ETSY_LANG) without default value. Example: fr
ETSY_DRY_MODE) with default value false
dryMode print call instead of making real etsy call - optional (or env.ETSY_DRY_MODE) with default value: false
etsyRateWindowSizeMs Rate limit windows size in milliseconds - optional (or env.ETSY_RATE_WINDOWS_SIZE_MS) with default value: 1000
etsyRateMaxQueries Rate limit max query per windows size - optional (or env.ETSY_RATE_MAX_QUERIES) without default value

Note about rate limit options:

  • rate limit is recommended for V2 client.

  • rate limit is enabled if and only if etsyRateWindowSizeMs and etsyRateMaxQueries are both set.

  • if enabled, rate limit on etsy call is max etsyRateMaxQueries per etsyRateWindowSizeMsms.

For more details, cf. susi-rali

Rate limit

According to Open API v2 documentation, Etsy policy was to restricts number of call to 10 per second (and 10k per day).

With Open API v3, there is no such restriction so rate limiter is deprecated and disabled by default.

In order to rate limit calls, node-etsy-client rely on susi-rali and offer an option to rate limit client calls.

To apply rate limit of 10 query per seconds (with wait on unavailable slot), add etsyRateMaxQueries option:

var client = new EtsyClientV2({apiKey:'mSecretHere', etsyRateMaxQueries:10});

Note about ETSY API versions

Starting from 2.0.0 node-etsy-client provide an EtsyClientV3 utility class dedicated to etsy 3 api calls.

For previous version (v2 Open API will be discontinued) please rely on node-etsy-client <2.0.0 versions.

During migration from v2 to v3 #39 some ticket have been created on Etsy OpenAPI side, especially for the getListing api:

  • includes related ticket: etsy/open-api#236 (improvement)
  • variations values translations related ticket: etsy/open-api#431 (bug)

How to contribute

You're not a dev ? just submit an issue (bug, improvements, questions). Or else:

  • Clone
  • Install deps
  • setup your test environment (cf. initEnv.example.sh)
  • Then mocha tests
git clone https://github.com/creharmony/node-etsy-client.git
cd node-etsy-client
npm install
# play test without etsy endpoint
npm run test
# play test with etsy endpoint
. ./env/initEnv.example.sh
npm run test
  • you could also fork, feature branch, then submit a pull request.

Services or activated bots

badge name description
CI/CD Github actions Continuous tests + coverage using c8.
scheduled npm audit Github actions Continuous vulnerability audit.
Houndci JavaScript automated review (configured by .hound.yml)
Automated Release Notes by gren gren Release notes automation
Github pages host some metrics for the main branch of this project: code coverage

node-etsy-client's People

Contributors

boly38 avatar creharmony avatar geopic avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-etsy-client's Issues

TypeScript type declaration file

If you want I can write a TypeScript type declaration file for this package so that TS developers can utilise the type-checking feature of the language as they use this package. Let me know if you are interested.

npm audit found vulnerabilities

=== npm audit security report ===                        
                                                                                
# Run  npm update browserslist --depth 6  to resolve 2 vulnerabilities
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ browserslist                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nyc                                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ nyc > istanbul-lib-instrument > @babel/core >                │
│               │ @babel/helper-compilation-targets > browserslist             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1747                            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ browserslist                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > nyc > istanbul-lib-instrument > @babel/core >    │
│               │ @babel/helper-compilation-targets > browserslist             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1747                            │
└───────────────┴──────────────────────────────────────────────────────────────┘


found 2 moderate severity vulnerabilities in 269 scanned packages
  run `npm audit fix` to fix 2 of them.

npm audit found vulnerabilities

# npm audit report

glob-parent  <6.0.1
Severity: moderate
glob-parent before 6.0.1 vulnerable to Regular Expression Denial of Service (ReDoS) - https://github.com/advisories/GHSA-cj88-88mr-972w
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/glob-parent
  chokidar  >=1.0.0-rc1
  Depends on vulnerable versions of glob-parent
  node_modules/chokidar
    mocha  >=7.0.0-esm1
    Depends on vulnerable versions of chokidar
    node_modules/mocha

3 moderate severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

add ETSY_LANG

add default lang in options
and reuse it automatically in subsequent calls

npm audit found vulnerabilities

# npm audit report

minimist  <=1.2.5
Severity: high
Prototype Pollution in minimist - https://github.com/advisories/GHSA-xvch-5gv4-984h
fix available via `npm audit fix`
node_modules/minimist

1 high severity vulnerability

To address all issues, run:
  npm audit fix

npm audit found vulnerabilities

=== npm audit security report ===                        
                                                                                
# Run  npm install [email protected]  to resolve 1 vulnerability
SEMVER WARNING: Recommended action is a potentially breaking change
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ mocha                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ mocha > wide-align > string-width > strip-ansi > ansi-regex  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


# Run  npm update ansi-regex --depth 8  to resolve 20 vulnerabilities
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ mocha                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ mocha > yargs > cliui > string-width > strip-ansi >          │
│               │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > mocha > yargs > cliui > string-width >           │
│               │ strip-ansi > ansi-regex                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ mocha                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ mocha > yargs > cliui > strip-ansi > ansi-regex              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > mocha > yargs > cliui > strip-ansi > ansi-regex  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ mocha                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ mocha > yargs > cliui > wrap-ansi > string-width >           │
│               │ strip-ansi > ansi-regex                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > mocha > yargs > cliui > wrap-ansi > string-width │
│               │ > strip-ansi > ansi-regex                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ mocha                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ mocha > yargs > cliui > wrap-ansi > strip-ansi > ansi-regex  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > mocha > yargs > cliui > wrap-ansi > strip-ansi > │
│               │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ mocha                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ mocha > yargs > string-width > strip-ansi > ansi-regex       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > mocha > yargs > string-width > strip-ansi >      │
│               │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nyc                                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ nyc > yargs > cliui > string-width > strip-ansi > ansi-regex │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > nyc > yargs > cliui > string-width > strip-ansi  │
│               │ > ansi-regex                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nyc                                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ nyc > yargs > cliui > wrap-ansi > string-width > strip-ansi  │
│               │ > ansi-regex                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > nyc > yargs > cliui > wrap-ansi > string-width > │
│               │ strip-ansi > ansi-regex                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nyc                                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ nyc > yargs > string-width > strip-ansi > ansi-regex         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > nyc > yargs > string-width > strip-ansi >        │
│               │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nyc                                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ nyc > yargs > cliui > strip-ansi > ansi-regex                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > nyc > yargs > cliui > strip-ansi > ansi-regex    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nyc                                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ nyc > yargs > cliui > wrap-ansi > strip-ansi > ansi-regex    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > nyc > yargs > cliui > wrap-ansi > strip-ansi >   │
│               │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌──────────────────────────────────────────────────────────────────────────────┐
│                                Manual Review                                 │
│            Some vulnerabilities require your attention to resolve            │
│                                                                              │
│         Visit https://go.npm.me/audit-guide for additional guidance          │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │  Inefficient Regular Expression Complexity in                │
│               │ chalk/ansi-regex                                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=5.0.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ susi-rali                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ susi-rali > mocha > wide-align > string-width > strip-ansi > │
│               │ ansi-regex                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-93q8-gq69-wqmw            │
└───────────────┴──────────────────────────────────────────────────────────────┘
found 22 moderate severity vulnerabilities in 266 scanned packages
  run `npm audit fix` to fix 20 of them.
  1 vulnerability requires semver-major dependency updates.
  1 vulnerability requires manual review. See the full report for details.

On connect error secret appears in error

On etsy client usage, on connect timeout,

Example

FetchError: request to https://openapi.etsy.com/v2/shops/xxxxxxx?api_key=xxxxxxxxxxxx&language=fr failed, reason: connect ETIMEDOUT www.xxx.yyy.zzz:443

api_key must be protected and not throwed up


related security advisory: GHSA-xw22-wv29-3299

ESM

  • make etsy client ESM compatible : seems node-fetch3.2 enforce ESM ..

npm audit found vulnerabilities

# npm audit report

minimatch  <3.0.5
Severity: high
minimatch ReDoS vulnerability - https://github.com/advisories/GHSA-f8q6-p94x-37v3
fix available via `npm audit fix`
node_modules/minimatch

1 high severity vulnerability

To address all issues, run:
  npm audit fix

add overall api client rate limit option

As Etsy limits the number of call per time window,

It would be great to have an option to calibrate client calls rate limit to never reach allowed api key rate limit.

  • option must be disabled by default
  • option must be configured by options
  • options must permit "per second" and/or "per day" windows
  • study retry after option in case of error (another issue to implement retry?)

fetch listing in given lang overriding client lang

I define an etsy client with french as default language.
I would like to do some query with language:en without having to re-declare a new etsy client.

Passing options to a given fetch query that embed language should be used prior to client default language.

beta - TypeScript exports

  • need to confirm that lib export is working when importing it from a typescript project
  • would be great to write some test for TS (and add them into a new github action ci/cd step)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.