discogs-marketplace-api-nodejs 1.9.3 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +1 -51
- package/dist/data/countries.data.js +4 -1
- package/dist/data/index.d.ts +2 -2
- package/dist/data/index.js +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/interfaces/index.d.ts +4 -4
- package/dist/interfaces/input.interface.d.ts +2 -10
- package/dist/interfaces/output-error.interface.d.ts +1 -2
- package/dist/interfaces/output-success.interface.d.ts +2 -3
- package/dist/marketplace.d.ts +2 -12
- package/dist/marketplace.js +151 -188
- package/dist/types/condition.type.d.ts +1 -2
- package/dist/types/currency.type.d.ts +1 -2
- package/dist/types/format-description.type.d.ts +1 -2
- package/dist/types/format.type.d.ts +1 -2
- package/dist/types/from.type.d.ts +1 -2
- package/dist/types/genre.type.d.ts +1 -2
- package/dist/types/index.d.ts +11 -11
- package/dist/types/lang.type.d.ts +1 -2
- package/dist/types/limit.type.d.ts +1 -2
- package/dist/types/search-type.type.d.ts +1 -2
- package/dist/types/sort.type.d.ts +1 -2
- package/dist/types/style.type.d.ts +1 -2
- package/package.json +27 -33
package/README.MD
CHANGED
|
@@ -6,15 +6,10 @@ Another (better ?) NodeJs library to fetch data from Discogs marketplace. 💿
|
|
|
6
6
|
|
|
7
7
|
## 📂 Installation (with npm)
|
|
8
8
|
|
|
9
|
-
This library works with two different `strategies` to scrape data: with a classic HTTP fetch request (Axios) or by creating a new instance of a browser (Playwright). Take a look at the "[About strategies](#-about-strategies)" chapter to learn more.
|
|
10
|
-
|
|
11
9
|
Run the following command in your project:
|
|
12
10
|
|
|
13
11
|
```sh
|
|
14
|
-
npm
|
|
15
|
-
|
|
16
|
-
# Or to avoid installing Playwright
|
|
17
|
-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install discogs-marketplace-api-nodejs
|
|
12
|
+
npm i discogs-marketplace-api-nodejs
|
|
18
13
|
```
|
|
19
14
|
|
|
20
15
|
## ▶️ Quick Start
|
|
@@ -109,31 +104,6 @@ const result = await DiscogsMarketplace.search({
|
|
|
109
104
|
})
|
|
110
105
|
```
|
|
111
106
|
|
|
112
|
-
## 🤠 About strategies
|
|
113
|
-
|
|
114
|
-
> Which `strategy` should I choose?
|
|
115
|
-
|
|
116
|
-
This project provides two ways to scrape data:
|
|
117
|
-
|
|
118
|
-
- `fetch` (default): Get the result with a classic HTTP fetch request (Axios).
|
|
119
|
-
- For the moment, this is the simplest and fastest solution to choose.
|
|
120
|
-
- `browser`: Get the result by creating a new instance of a browser (Playwright) to scrape the page.
|
|
121
|
-
- This can help bypass Cloudflare (or other) protection for some cases.
|
|
122
|
-
- Slightly slower than `fetch` (see [benchmarks](https://github.com/KirianCaumes/Discogs-Marketplace-API-NodeJS/releases/tag/v1.8.1))
|
|
123
|
-
|
|
124
|
-
**Both strategies will give you the exact same result.**
|
|
125
|
-
|
|
126
|
-
I choose to maintain this two solutions, because over time Discogs is changing: one day they activated a protection that prevented a `fetch` solution from working, so I implemented to `browser` solution. But a few days later, they disabled that protection and the original solution became the best again.
|
|
127
|
-
|
|
128
|
-
With both strategies, you are free to choose the one that suits you!
|
|
129
|
-
|
|
130
|
-
```js
|
|
131
|
-
const result = await DiscogsMarketplace.search({
|
|
132
|
-
// ...
|
|
133
|
-
strategy: 'fetch' // or 'browser'
|
|
134
|
-
})
|
|
135
|
-
```
|
|
136
|
-
|
|
137
107
|
## 📃 Data format
|
|
138
108
|
|
|
139
109
|
You can provide parameters to `DiscogsMarketplace.search` function according to this interface:
|
|
@@ -230,12 +200,6 @@ interface InputInterface {
|
|
|
230
200
|
* Default to `en`.
|
|
231
201
|
*/
|
|
232
202
|
lang?: LangType
|
|
233
|
-
/**
|
|
234
|
-
* Strategy to scrape data:
|
|
235
|
-
* - `fetch` (default): Get the result with a classic HTTP fetch request (Axios).
|
|
236
|
-
* - `browser`: Get the result by creating a new instance of a browser (Playwright) to scrape the page. This can help bypass Cloudflare (or other) protection for some cases.
|
|
237
|
-
*/
|
|
238
|
-
strategy?: 'fetch' | 'browser'
|
|
239
203
|
}
|
|
240
204
|
```
|
|
241
205
|
|
|
@@ -330,20 +294,6 @@ You can open a pull request with your new additions.
|
|
|
330
294
|
|
|
331
295
|
## 🐛 Known issues/problems
|
|
332
296
|
|
|
333
|
-
### Linkedom
|
|
334
|
-
|
|
335
|
-
If you are using this library on a Typescript project, you might encounter issues with `linkedom`.
|
|
336
|
-
|
|
337
|
-
To fix it, use this in command line: `--skipLibCheck` or add that in you `tsconfig.json`:
|
|
338
|
-
|
|
339
|
-
```json
|
|
340
|
-
{
|
|
341
|
-
"compilerOptions": {
|
|
342
|
-
"skipLibCheck": true
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
```
|
|
346
|
-
|
|
347
297
|
### Playwright
|
|
348
298
|
|
|
349
299
|
Install system dependencies:
|
|
@@ -324,5 +324,8 @@ const COUNTRIES_DISCOGS = {
|
|
|
324
324
|
Yugoslavia: 'GR',
|
|
325
325
|
Zaire: 'CD',
|
|
326
326
|
};
|
|
327
|
-
const COUNTRIES =
|
|
327
|
+
const COUNTRIES = {
|
|
328
|
+
...COUNTRIES_ISO,
|
|
329
|
+
...COUNTRIES_DISCOGS,
|
|
330
|
+
};
|
|
328
331
|
exports.default = COUNTRIES;
|
package/dist/data/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import COUNTRIES from '../data/countries.data
|
|
2
|
-
import CURRENCIES from '../data/currencies.data
|
|
1
|
+
import COUNTRIES from '../data/countries.data';
|
|
2
|
+
import CURRENCIES from '../data/currencies.data';
|
|
3
3
|
export { COUNTRIES, CURRENCIES };
|
package/dist/data/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CURRENCIES = exports.COUNTRIES = void 0;
|
|
7
|
-
const countries_data_1 = __importDefault(require("../data/countries.data
|
|
7
|
+
const countries_data_1 = __importDefault(require("../data/countries.data"));
|
|
8
8
|
exports.COUNTRIES = countries_data_1.default;
|
|
9
|
-
const currencies_data_1 = __importDefault(require("../data/currencies.data
|
|
9
|
+
const currencies_data_1 = __importDefault(require("../data/currencies.data"));
|
|
10
10
|
exports.CURRENCIES = currencies_data_1.default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import DiscogsMarketplace from './marketplace
|
|
2
|
-
import type { InputInterface, OutputErrorInterface, OutputSuccessInterface } from './interfaces
|
|
3
|
-
export { DiscogsMarketplace
|
|
1
|
+
import DiscogsMarketplace from './marketplace';
|
|
2
|
+
import type { InputInterface, OutputErrorInterface, OutputSuccessInterface } from './interfaces';
|
|
3
|
+
export { DiscogsMarketplace };
|
|
4
|
+
export type { InputInterface, OutputErrorInterface, OutputSuccessInterface };
|
package/dist/index.js
CHANGED
|
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.DiscogsMarketplace = void 0;
|
|
7
|
-
const marketplace_1 = __importDefault(require("./marketplace
|
|
7
|
+
const marketplace_1 = __importDefault(require("./marketplace"));
|
|
8
8
|
exports.DiscogsMarketplace = marketplace_1.default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type InputInterface from '../interfaces/input.interface
|
|
2
|
-
import type OutputErrorInterface from '../interfaces/output-error.interface
|
|
3
|
-
import type OutputSuccessInterface from '../interfaces/output-success.interface
|
|
4
|
-
export { InputInterface, OutputErrorInterface, OutputSuccessInterface };
|
|
1
|
+
import type InputInterface from '../interfaces/input.interface';
|
|
2
|
+
import type OutputErrorInterface from '../interfaces/output-error.interface';
|
|
3
|
+
import type OutputSuccessInterface from '../interfaces/output-success.interface';
|
|
4
|
+
export type { InputInterface, OutputErrorInterface, OutputSuccessInterface };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { LimitType, GenreType, CurrencyType, FromType, StyleType, FormatType, ConditionType, SortType, LangType, FormatDescriptionType, SearchTypeType } from '../types
|
|
1
|
+
import type { LimitType, GenreType, CurrencyType, FromType, StyleType, FormatType, ConditionType, SortType, LangType, FormatDescriptionType, SearchTypeType } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Element that can be provided by user
|
|
4
4
|
*/
|
|
5
|
-
interface InputInterface {
|
|
5
|
+
export default interface InputInterface {
|
|
6
6
|
/**
|
|
7
7
|
* Type of elements to search.
|
|
8
8
|
* Default to `q`.
|
|
@@ -97,12 +97,4 @@ interface InputInterface {
|
|
|
97
97
|
* Default to `en`.
|
|
98
98
|
*/
|
|
99
99
|
lang?: LangType;
|
|
100
|
-
/**
|
|
101
|
-
* Strategy to scrape data:
|
|
102
|
-
* - `fetch` (default): Get the result with a classic HTTP fetch request (Axios).
|
|
103
|
-
* - `browser`: Get the result by creating a new instance of a browser (Playwright) to scrape the page.
|
|
104
|
-
* This can help bypass Cloudflare (or other) protection for some cases.
|
|
105
|
-
*/
|
|
106
|
-
strategy?: 'fetch' | 'browser';
|
|
107
100
|
}
|
|
108
|
-
export default InputInterface;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { SearchTypeType } from '../types
|
|
1
|
+
import type { SearchTypeType } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Result provided to user
|
|
4
4
|
*/
|
|
5
|
-
interface OutputSuccessInterface {
|
|
5
|
+
export default interface OutputSuccessInterface {
|
|
6
6
|
/** Items */
|
|
7
7
|
items: Array<{
|
|
8
8
|
/** Id */
|
|
@@ -113,4 +113,3 @@ interface OutputSuccessInterface {
|
|
|
113
113
|
/** UrlGenerated */
|
|
114
114
|
urlGenerated: string;
|
|
115
115
|
}
|
|
116
|
-
export default OutputSuccessInterface;
|
package/dist/marketplace.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InputInterface, OutputSuccessInterface } from './interfaces
|
|
1
|
+
import type { InputInterface, OutputSuccessInterface } from './interfaces';
|
|
2
2
|
/**
|
|
3
3
|
* Discogs Marketplace
|
|
4
4
|
*/
|
|
@@ -7,7 +7,7 @@ export default abstract class Marketplace {
|
|
|
7
7
|
* Search elements on discogs
|
|
8
8
|
* @returns Items found
|
|
9
9
|
*/
|
|
10
|
-
static search({ searchType, searchValue, currency, genre, style, format, formatDescription, condition, year, years, isAudioSample, isMakeAnOfferOnly, from, seller, sort, limit, page, lang,
|
|
10
|
+
static search({ searchType, searchValue, currency, genre, style, format, formatDescription, condition, year, years, isAudioSample, isMakeAnOfferOnly, from, seller, sort, limit, page, lang, }: InputInterface): Promise<OutputSuccessInterface>;
|
|
11
11
|
/**
|
|
12
12
|
* Generate URL to be parsed
|
|
13
13
|
* @returns Url
|
|
@@ -19,16 +19,6 @@ export default abstract class Marketplace {
|
|
|
19
19
|
* @returns Url
|
|
20
20
|
*/
|
|
21
21
|
private static serializeParams;
|
|
22
|
-
/**
|
|
23
|
-
* Get result with a classic HTTP fetch request (Axios)
|
|
24
|
-
* @param url Url
|
|
25
|
-
*/
|
|
26
|
-
private static getResultWithFetch;
|
|
27
|
-
/**
|
|
28
|
-
* Get result by creating a new instance of a navigator (Playwright) to crawl the page
|
|
29
|
-
* @param url Url
|
|
30
|
-
*/
|
|
31
|
-
private static getResultWithBrowser;
|
|
32
22
|
/**
|
|
33
23
|
* Parse HTML to clean result
|
|
34
24
|
* @returns Items found
|
package/dist/marketplace.js
CHANGED
|
@@ -5,18 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const user_agents_1 = __importDefault(require("user-agents"));
|
|
7
7
|
const playwright_chromium_1 = require("playwright-chromium");
|
|
8
|
-
const
|
|
9
|
-
const axios_1 = __importDefault(require("axios"));
|
|
10
|
-
const data_1 = require("./data/index.js");
|
|
8
|
+
const data_1 = require("./data");
|
|
11
9
|
/**
|
|
12
10
|
* Discogs Marketplace
|
|
13
11
|
*/
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
14
13
|
class Marketplace {
|
|
15
14
|
/**
|
|
16
15
|
* Search elements on discogs
|
|
17
16
|
* @returns Items found
|
|
18
17
|
*/
|
|
19
|
-
static async search({ searchType = 'q', searchValue = undefined, currency = undefined, genre = undefined, style = [], format = [], formatDescription = [], condition = [], year = undefined, years = undefined, isAudioSample = false, isMakeAnOfferOnly = false, from = undefined, seller = undefined, sort = 'Listed Newest', limit = 25, page = 1, lang = 'en',
|
|
18
|
+
static async search({ searchType = 'q', searchValue = undefined, currency = undefined, genre = undefined, style = [], format = [], formatDescription = [], condition = [], year = undefined, years = undefined, isAudioSample = false, isMakeAnOfferOnly = false, from = undefined, seller = undefined, sort = 'Listed Newest', limit = 25, page = 1, lang = 'en', }) {
|
|
20
19
|
try {
|
|
21
20
|
/** Url to call */
|
|
22
21
|
const url = [
|
|
@@ -25,38 +24,89 @@ class Marketplace {
|
|
|
25
24
|
[searchType]: searchValue,
|
|
26
25
|
currency,
|
|
27
26
|
genre,
|
|
28
|
-
style:
|
|
29
|
-
format:
|
|
30
|
-
format_desc:
|
|
31
|
-
condition:
|
|
27
|
+
style: style.length ? style : undefined,
|
|
28
|
+
format: format.length ? format : undefined,
|
|
29
|
+
format_desc: formatDescription.length ? formatDescription : undefined,
|
|
30
|
+
condition: condition.length ? condition : undefined,
|
|
32
31
|
year: year && !years ? year : undefined,
|
|
33
|
-
year1:
|
|
34
|
-
year2:
|
|
32
|
+
year1: years?.min && !year ? years.min : undefined,
|
|
33
|
+
year2: years?.max && !year ? years.max : undefined,
|
|
35
34
|
audio: isAudioSample ? 1 : undefined,
|
|
36
35
|
offers: isMakeAnOfferOnly ? 1 : undefined,
|
|
37
|
-
ships_from:
|
|
36
|
+
ships_from: from?.length ? from : undefined,
|
|
38
37
|
limit,
|
|
39
38
|
page,
|
|
40
39
|
sort,
|
|
41
40
|
}),
|
|
42
41
|
].join('?');
|
|
43
|
-
/**
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
/** Init browser */
|
|
43
|
+
const browser = await playwright_chromium_1.chromium.launch({
|
|
44
|
+
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gl-drawing-for-tests'],
|
|
45
|
+
});
|
|
46
|
+
/** Init context */
|
|
47
|
+
const browserContext = await browser.newContext({
|
|
48
|
+
userAgent: new user_agents_1.default({ platform: 'Win32' }).toString(),
|
|
49
|
+
extraHTTPHeaders: {
|
|
50
|
+
'X-PJAX': 'true',
|
|
51
|
+
},
|
|
52
|
+
javaScriptEnabled: false,
|
|
53
|
+
});
|
|
54
|
+
/** Init page */
|
|
55
|
+
const browserPage = await browserContext.newPage();
|
|
56
|
+
/** Block useless resources */
|
|
57
|
+
await browserPage.route('**/*', route => [
|
|
58
|
+
'stylesheet',
|
|
59
|
+
'image',
|
|
60
|
+
'media',
|
|
61
|
+
'font',
|
|
62
|
+
'script',
|
|
63
|
+
'texttrack',
|
|
64
|
+
'xhr',
|
|
65
|
+
'fetch',
|
|
66
|
+
'eventsource',
|
|
67
|
+
'websocket',
|
|
68
|
+
'manifest',
|
|
69
|
+
'other',
|
|
70
|
+
].includes(route.request().resourceType())
|
|
71
|
+
? route.abort()
|
|
72
|
+
: route.continue());
|
|
73
|
+
/** Init page */
|
|
74
|
+
const response = await browserPage.goto(url, { waitUntil: 'domcontentloaded' });
|
|
75
|
+
/** Status code from the page */
|
|
76
|
+
const status = response?.status() ?? 500;
|
|
77
|
+
// See current issue: https://github.com/evanw/esbuild/issues/2605
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
|
|
79
|
+
await browserPage.evaluate(() => (window.__name ??= (func) => func));
|
|
80
|
+
/** If error, reject */
|
|
81
|
+
if (status >= 400) {
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
83
|
+
throw {
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
85
|
+
message: (await browserPage.evaluate(() => document.querySelector('h1 + p')?.innerHTML.trim())) || 'An error occurred',
|
|
86
|
+
code: status,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** Url generated by browser */
|
|
90
|
+
const urlGenerated = browserPage.url();
|
|
91
|
+
/**
|
|
92
|
+
* Result from scraping.
|
|
93
|
+
* Scraping inside Playwright is faster (x2) compare to exporting HTML outside and parsing it with another library.
|
|
94
|
+
*/
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
96
|
+
const result = await browserPage.evaluate(this.getResult, {
|
|
97
|
+
input: {
|
|
98
|
+
page,
|
|
99
|
+
limit,
|
|
100
|
+
searchValue,
|
|
101
|
+
searchType,
|
|
102
|
+
},
|
|
103
|
+
urlGenerated,
|
|
104
|
+
CURRENCIES: data_1.CURRENCIES,
|
|
105
|
+
COUNTRIES: data_1.COUNTRIES,
|
|
106
|
+
});
|
|
107
|
+
/** Close context/browser */
|
|
108
|
+
await browserContext.close();
|
|
109
|
+
await browser.close();
|
|
60
110
|
return result;
|
|
61
111
|
}
|
|
62
112
|
catch (error) {
|
|
@@ -64,9 +114,9 @@ class Marketplace {
|
|
|
64
114
|
// Rethrow error
|
|
65
115
|
throw error;
|
|
66
116
|
}
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
68
118
|
throw {
|
|
69
|
-
message:
|
|
119
|
+
message: error.message || 'An error occurred',
|
|
70
120
|
code: 500,
|
|
71
121
|
};
|
|
72
122
|
}
|
|
@@ -75,7 +125,7 @@ class Marketplace {
|
|
|
75
125
|
* Generate URL to be parsed
|
|
76
126
|
* @returns Url
|
|
77
127
|
*/
|
|
78
|
-
static generateUrl({ searchType, seller, lang }) {
|
|
128
|
+
static generateUrl({ searchType, seller, lang, }) {
|
|
79
129
|
let url = `https://www.discogs.com/${lang}/`;
|
|
80
130
|
if (seller) {
|
|
81
131
|
url += `seller/${seller}/`;
|
|
@@ -92,13 +142,11 @@ class Marketplace {
|
|
|
92
142
|
* @param params Object of GET parameters
|
|
93
143
|
* @returns Url
|
|
94
144
|
*/
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
145
|
static serializeParams(params) {
|
|
97
146
|
const param = [];
|
|
98
147
|
// eslint-disable-next-line no-restricted-syntax
|
|
99
148
|
for (const key in params) {
|
|
100
149
|
if (params[key] === undefined || params[key] === null) {
|
|
101
|
-
// eslint-disable-next-line no-continue
|
|
102
150
|
continue;
|
|
103
151
|
}
|
|
104
152
|
else if (Array.isArray(params[key])) {
|
|
@@ -110,7 +158,6 @@ class Marketplace {
|
|
|
110
158
|
}
|
|
111
159
|
}
|
|
112
160
|
else {
|
|
113
|
-
// eslint-disable-next-line no-continue
|
|
114
161
|
continue;
|
|
115
162
|
}
|
|
116
163
|
}
|
|
@@ -120,127 +167,21 @@ class Marketplace {
|
|
|
120
167
|
}
|
|
121
168
|
return param.join('&');
|
|
122
169
|
}
|
|
123
|
-
/**
|
|
124
|
-
* Get result with a classic HTTP fetch request (Axios)
|
|
125
|
-
* @param url Url
|
|
126
|
-
*/
|
|
127
|
-
static async getResultWithFetch({ input: { page, limit, searchValue, searchType }, dependencies: { url }, }) {
|
|
128
|
-
var _a, _b;
|
|
129
|
-
const { data: bodyHTML, status } = await axios_1.default.get(url, {
|
|
130
|
-
headers: {
|
|
131
|
-
// cspell: disable-next-line
|
|
132
|
-
'X-PJAX': 'true',
|
|
133
|
-
'User-Agent': new user_agents_1.default({ platform: 'Win32' }).toString(),
|
|
134
|
-
},
|
|
135
|
-
validateStatus: () => true,
|
|
136
|
-
});
|
|
137
|
-
/** Generate document */
|
|
138
|
-
const { document } = (0, linkedom_1.parseHTML)(bodyHTML);
|
|
139
|
-
/** If error, reject */
|
|
140
|
-
if (status >= 400) {
|
|
141
|
-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
|
142
|
-
throw {
|
|
143
|
-
message: ((_b = (_a = document === null || document === void 0 ? void 0 : document.querySelector('h1 + p')) === null || _a === void 0 ? void 0 : _a.innerHTML) === null || _b === void 0 ? void 0 : _b.trim()) || 'An error occurred',
|
|
144
|
-
code: status,
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
const result = this.getResult({
|
|
148
|
-
input: { page, limit, searchValue, searchType },
|
|
149
|
-
dependencies: { urlGenerated: url, CURRENCIES: data_1.CURRENCIES, COUNTRIES: data_1.COUNTRIES },
|
|
150
|
-
document,
|
|
151
|
-
});
|
|
152
|
-
return result;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Get result by creating a new instance of a navigator (Playwright) to crawl the page
|
|
156
|
-
* @param url Url
|
|
157
|
-
*/
|
|
158
|
-
static async getResultWithBrowser({ input: { page, limit, searchValue, searchType }, dependencies: { url }, }) {
|
|
159
|
-
/** Init browser */
|
|
160
|
-
const browser = await playwright_chromium_1.chromium.launch({
|
|
161
|
-
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gl-drawing-for-tests'],
|
|
162
|
-
});
|
|
163
|
-
/** Init context */
|
|
164
|
-
const browserContext = await browser.newContext({
|
|
165
|
-
userAgent: new user_agents_1.default({ platform: 'Win32' }).toString(),
|
|
166
|
-
extraHTTPHeaders: {
|
|
167
|
-
'X-PJAX': 'true',
|
|
168
|
-
},
|
|
169
|
-
javaScriptEnabled: false,
|
|
170
|
-
});
|
|
171
|
-
/** Init page */
|
|
172
|
-
const browserPage = await browserContext.newPage();
|
|
173
|
-
/** Block useless resources */
|
|
174
|
-
await browserPage.route('**/*', route => [
|
|
175
|
-
'stylesheet',
|
|
176
|
-
'image',
|
|
177
|
-
'media',
|
|
178
|
-
'font',
|
|
179
|
-
'script',
|
|
180
|
-
'texttrack',
|
|
181
|
-
'xhr',
|
|
182
|
-
'fetch',
|
|
183
|
-
'eventsource',
|
|
184
|
-
'websocket',
|
|
185
|
-
'manifest',
|
|
186
|
-
'other',
|
|
187
|
-
].includes(route.request().resourceType())
|
|
188
|
-
? route.abort()
|
|
189
|
-
: route.continue());
|
|
190
|
-
/** Init page */
|
|
191
|
-
const response = await browserPage.goto(url, { waitUntil: 'domcontentloaded' });
|
|
192
|
-
/** Status code from the page */
|
|
193
|
-
const status = (response === null || response === void 0 ? void 0 : response.status()) || 500;
|
|
194
|
-
/** If error, reject */
|
|
195
|
-
if (status >= 400) {
|
|
196
|
-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
|
197
|
-
throw {
|
|
198
|
-
message: (await browserPage.evaluate(() => { var _a, _b; return (_b = (_a = document === null || document === void 0 ? void 0 : document.querySelector('h1 + p')) === null || _a === void 0 ? void 0 : _a.innerHTML) === null || _b === void 0 ? void 0 : _b.trim(); })) || 'An error occurred',
|
|
199
|
-
code: status,
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
/** Url generated by browser */
|
|
203
|
-
const urlGenerated = browserPage.url();
|
|
204
|
-
/**
|
|
205
|
-
* Result from scraping.
|
|
206
|
-
* Scraping inside Playwright is faster (x2) compare to exporting HTML outside and parsing it with another library.
|
|
207
|
-
*/
|
|
208
|
-
const result = await browserPage.evaluate(this.getResult, {
|
|
209
|
-
input: {
|
|
210
|
-
page,
|
|
211
|
-
limit,
|
|
212
|
-
searchValue,
|
|
213
|
-
searchType,
|
|
214
|
-
},
|
|
215
|
-
dependencies: {
|
|
216
|
-
urlGenerated,
|
|
217
|
-
CURRENCIES: data_1.CURRENCIES,
|
|
218
|
-
COUNTRIES: data_1.COUNTRIES,
|
|
219
|
-
},
|
|
220
|
-
});
|
|
221
|
-
/** Close context/browser */
|
|
222
|
-
await browserContext.close();
|
|
223
|
-
await browser.close();
|
|
224
|
-
return result;
|
|
225
|
-
}
|
|
226
170
|
/**
|
|
227
171
|
* Parse HTML to clean result
|
|
228
172
|
* @returns Items found
|
|
229
173
|
*/
|
|
230
|
-
static getResult({ input: { page, limit, searchValue, searchType },
|
|
231
|
-
}) {
|
|
232
|
-
var _a, _b, _c, _d, _e;
|
|
174
|
+
static getResult({ input: { page, limit, searchValue, searchType }, urlGenerated, CURRENCIES, COUNTRIES, }) {
|
|
233
175
|
/**
|
|
234
176
|
* Function to convert currency to ISO name
|
|
235
177
|
* @param value String to clean
|
|
236
178
|
* @returns Cleanup string
|
|
237
179
|
*/
|
|
238
180
|
const convertCurrency = (value) => {
|
|
239
|
-
var _a;
|
|
240
181
|
if (!value) {
|
|
241
182
|
return value;
|
|
242
183
|
}
|
|
243
|
-
const currencyFound =
|
|
184
|
+
const currencyFound = Object.keys(CURRENCIES).find(key => value.includes(key)) ?? '';
|
|
244
185
|
if (!currencyFound) {
|
|
245
186
|
return value;
|
|
246
187
|
}
|
|
@@ -251,69 +192,91 @@ class Marketplace {
|
|
|
251
192
|
.replace(/\s/g, ''); // Remove spaces
|
|
252
193
|
return `${amount} ${currencyClean}`.replace(/\s\s+/g, ' '); // Remove useless spaces
|
|
253
194
|
};
|
|
254
|
-
const totalItems = parseFloat(
|
|
255
|
-
.querySelector('.pagination_total')
|
|
195
|
+
const totalItems = parseFloat(document
|
|
196
|
+
.querySelector('.pagination_total')
|
|
197
|
+
?.textContent?.split(' ')
|
|
198
|
+
.filter(x => x)
|
|
199
|
+
.pop()
|
|
200
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
201
|
+
?.replace(/(,|\.|\s)/g, '') || '0');
|
|
256
202
|
return {
|
|
257
|
-
items:
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
.
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
const
|
|
203
|
+
items: [...document.querySelectorAll('table.table_block tbody tr')].map(el => {
|
|
204
|
+
const shipping = convertCurrency(el
|
|
205
|
+
.querySelector('.item_shipping')
|
|
206
|
+
?.childNodes[0]?.textContent?.replace(/(\s+|\+)/g, ' ')
|
|
207
|
+
.trim()
|
|
208
|
+
.replace(',', '.') ?? '');
|
|
209
|
+
const have = Number.parseInt(el.querySelector('.community_summary .community_result:nth-child(1) .community_number')?.textContent ?? '', 10);
|
|
210
|
+
const want = Number.parseInt(el.querySelector('.community_summary .community_result:nth-child(2) .community_number')?.textContent ?? '', 10);
|
|
211
|
+
const countryName = el.querySelector('.seller_info li:nth-child(3)')?.textContent?.split(':').pop() ?? '';
|
|
265
212
|
const countryCode = COUNTRIES[countryName];
|
|
266
|
-
const releaseId = Number.parseInt(
|
|
267
|
-
.querySelector('a.item_release_link')
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
.
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
const
|
|
213
|
+
const releaseId = Number.parseInt(el
|
|
214
|
+
.querySelector('a.item_release_link')
|
|
215
|
+
?.getAttribute('href')
|
|
216
|
+
?.split('release/')
|
|
217
|
+
.pop()
|
|
218
|
+
?.split('-')
|
|
219
|
+
.shift() ?? '0', 10);
|
|
220
|
+
const itemId = Number.parseInt(el.querySelector('a.item_description_title')?.getAttribute('href')?.split('/').pop() ?? '0', 10);
|
|
221
|
+
const notes = Number.parseInt(el
|
|
222
|
+
.querySelector('.seller_info li:nth-child(2) .section_link')
|
|
223
|
+
?.textContent?.replace(/\s+/g, ' ')
|
|
224
|
+
.trim()
|
|
225
|
+
.split(' ')[0]
|
|
226
|
+
?.replace(/,/g, '') ?? '', 10);
|
|
227
|
+
const originalTitle = el.querySelector('a.item_description_title')?.textContent;
|
|
228
|
+
const firstIndexOfDash = originalTitle?.indexOf(' - ') ?? -1;
|
|
229
|
+
const lastIndexOfParenthesis = originalTitle?.lastIndexOf(' (') ?? -1;
|
|
274
230
|
return {
|
|
275
231
|
id: Number.isNaN(itemId) ? 0 : itemId,
|
|
276
232
|
title: {
|
|
277
|
-
original: originalTitle
|
|
278
|
-
artist:
|
|
233
|
+
original: originalTitle ?? '',
|
|
234
|
+
artist: originalTitle?.substring(0, firstIndexOfDash) ?? '',
|
|
279
235
|
item: firstIndexOfDash > -1 && lastIndexOfParenthesis > -1
|
|
280
|
-
? (
|
|
236
|
+
? (originalTitle?.substring(firstIndexOfDash + 3, lastIndexOfParenthesis) ?? '')
|
|
281
237
|
: '',
|
|
282
238
|
formats: lastIndexOfParenthesis > -1
|
|
283
|
-
? (
|
|
239
|
+
? (originalTitle?.substring(lastIndexOfParenthesis + 2, originalTitle.length - 1).split(', ') ?? [])
|
|
284
240
|
: [],
|
|
285
241
|
},
|
|
286
|
-
url: `https://www.discogs.com${(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
242
|
+
url: `https://www.discogs.com${el.querySelector('a.item_description_title')?.getAttribute('href') ?? ''}`,
|
|
243
|
+
labels: [...el.querySelectorAll(".label_and_cat a[href^='https://www.discogs.com/']")]
|
|
244
|
+
.map(x => x.textContent ?? '')
|
|
245
|
+
.filter((value, index, self) => self.indexOf(value) === index),
|
|
246
|
+
catnos: el
|
|
290
247
|
// cspell: disable-next-line
|
|
291
|
-
.querySelector('.label_and_cat .item_catno')
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
248
|
+
.querySelector('.label_and_cat .item_catno')
|
|
249
|
+
?.textContent?.replace(/\s+/g, ' ')
|
|
250
|
+
.split(', ')
|
|
251
|
+
.filter(x => x !== 'none') ?? [],
|
|
252
|
+
imageUrl: el.querySelector('.marketplace_image')?.getAttribute('data-src') ?? '',
|
|
253
|
+
description: el.querySelector('.item_condition')?.nextElementSibling?.textContent?.replace(/\s+/g, ' ').trim() ?? '',
|
|
254
|
+
isAcceptingOffer: (el.querySelector('.item_add_to_cart p a strong')?.textContent?.split('/').length ?? 0) > 1,
|
|
255
|
+
isAvailable: !el.classList.contains('unavailable'),
|
|
296
256
|
condition: {
|
|
297
257
|
media: {
|
|
298
|
-
full:
|
|
299
|
-
short:
|
|
300
|
-
.querySelector('.item_condition span:nth-child(3)')
|
|
258
|
+
full: el.querySelector('.item_condition span:nth-child(3)')?.textContent?.replace(/\s+/g, ' ').trim() ?? '',
|
|
259
|
+
short: el
|
|
260
|
+
.querySelector('.item_condition span:nth-child(3)')
|
|
261
|
+
?.textContent?.replace(/\s+/g, ' ')
|
|
262
|
+
.trim()
|
|
263
|
+
.match(/\(([^)]+)\)/)?.[1] ?? '',
|
|
301
264
|
},
|
|
302
265
|
sleeve: {
|
|
303
|
-
full:
|
|
304
|
-
short: (
|
|
305
|
-
|
|
266
|
+
full: el.querySelector('.item_condition span.item_sleeve_condition')?.textContent ?? '',
|
|
267
|
+
short: el.querySelector('.item_condition span.item_sleeve_condition')?.textContent?.match(/\(([^)]+)\)/)?.[1] ??
|
|
268
|
+
'',
|
|
306
269
|
},
|
|
307
270
|
},
|
|
308
271
|
seller: {
|
|
309
|
-
name:
|
|
310
|
-
url: `https://www.discogs.com${
|
|
311
|
-
score:
|
|
272
|
+
name: el.querySelector('.seller_info a')?.textContent ?? '',
|
|
273
|
+
url: `https://www.discogs.com${el.querySelector('.seller_info a')?.getAttribute('href') ?? ''}`,
|
|
274
|
+
score: el.querySelector('.seller_info li:nth-child(2) strong')?.textContent ?? '',
|
|
312
275
|
notes: Number.isNaN(notes) ? 0 : notes,
|
|
313
276
|
},
|
|
314
277
|
price: {
|
|
315
|
-
base: convertCurrency(
|
|
316
|
-
shipping: Number.isNaN(parseFloat(shipping)) ?
|
|
278
|
+
base: convertCurrency(el.querySelector('.price')?.textContent?.replace(/\s+/g, ' ').replace(/,/, '.') ?? ''),
|
|
279
|
+
shipping: Number.isNaN(parseFloat(shipping)) ? '' : shipping,
|
|
317
280
|
},
|
|
318
281
|
country: {
|
|
319
282
|
name: countryName,
|
|
@@ -325,10 +288,10 @@ class Marketplace {
|
|
|
325
288
|
},
|
|
326
289
|
release: {
|
|
327
290
|
id: Number.isNaN(releaseId) ? 0 : releaseId,
|
|
328
|
-
url: `https://www.discogs.com${
|
|
291
|
+
url: `https://www.discogs.com${el.querySelector('a.item_release_link')?.getAttribute('href') ?? ''}`,
|
|
329
292
|
},
|
|
330
293
|
};
|
|
331
|
-
})
|
|
294
|
+
}),
|
|
332
295
|
page: {
|
|
333
296
|
current: page,
|
|
334
297
|
total: Math.ceil(totalItems / limit),
|
|
@@ -338,10 +301,10 @@ class Marketplace {
|
|
|
338
301
|
perPage: limit,
|
|
339
302
|
},
|
|
340
303
|
search: {
|
|
341
|
-
value: searchValue
|
|
304
|
+
value: searchValue ?? '',
|
|
342
305
|
type: searchType,
|
|
343
306
|
},
|
|
344
|
-
urlGenerated
|
|
307
|
+
urlGenerated,
|
|
345
308
|
};
|
|
346
309
|
}
|
|
347
310
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Conditions
|
|
3
3
|
*/
|
|
4
|
-
type ConditionType = '0' | 'Fair (F)' | 'Good (G)' | 'Good Plus (G+)' | 'Mint (M)' | 'Near Mint (NM or M-)' | 'Poor (P)' | 'Very Good (VG)' | 'Very Good Plus (VG+)';
|
|
5
|
-
export default ConditionType;
|
|
4
|
+
export type ConditionType = '0' | 'Fair (F)' | 'Good (G)' | 'Good Plus (G+)' | 'Mint (M)' | 'Near Mint (NM or M-)' | 'Poor (P)' | 'Very Good (VG)' | 'Very Good Plus (VG+)';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Currencies
|
|
3
3
|
*/
|
|
4
|
-
type CurrencyType = 'AUD' | 'BRL' | 'CAD' | 'CHF' | 'DKK' | 'EUR' | 'GBP' | 'JPY' | 'MXN' | 'NZD' | 'SEK' | 'USD' | 'ZAR';
|
|
5
|
-
export default CurrencyType;
|
|
4
|
+
export type CurrencyType = 'AUD' | 'BRL' | 'CAD' | 'CHF' | 'DKK' | 'EUR' | 'GBP' | 'JPY' | 'MXN' | 'NZD' | 'SEK' | 'USD' | 'ZAR';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FormatDescriptions
|
|
3
3
|
*/
|
|
4
|
-
type FormatDescriptionType = '1 ⅞ ips' | '1"' | '10"' | '10.5" NAB Reel' | '11"' | '12"' | '15 ips' | '15/16 ips' | '16 ⅔ RPM' | '16"' | '16mm' | '2 Minute' | '2"' | '2-Track Mono' | '2-Track Stereo' | '21cm' | '25cm' | '27cm' | '29cm' | '3 Minute' | '3 ¾ ips' | '3"' | '3" Cine Reel' | '3.5"' | '30 ips' | '33 ⅓ RPM' | '35cm' | '35mm' | '3½"' | '4 Minute' | '4"' | '4-Track Mono' | '4-Track Stereo' | '45 RPM' | '4K' | '5"' | '5" Cine Reel' | '5.25"' | '50cm' | '5½"' | '6"' | '6" Cine Reel' | '6½"' | '7 ½ ips' | '7"' | '7" Cine Reel' | '78 RPM' | '8 ⅓ RPM' | '8"' | '80 RPM' | '8K' | '9"' | '90 RPM' | 'AAC' | 'AIFC' | 'AIFF' | 'ALAC' | 'AMR' | 'APE' | 'AVCD' | 'AVI' | 'Advance' | 'Album' | 'Ambisonic' | 'Bioplastic' | 'Blu-ray Audio' | 'Business Card' | 'CD+G' | 'CD-ROM' | 'CD-Record' | 'CDi' | 'Card Backed' | 'Club Edition' | 'Compilation' | 'Concert' | 'Copy Protected' | 'DFF' | 'DSF' | 'DVD-Audio' | 'DVD-Data' | 'DVD-Video' | 'DVDplus' | 'Deluxe Edition' | 'Disc Image' | 'Double Sided' | 'DualDisc' | 'EP' | 'Enhanced' | 'Etched' | 'FLAC' | 'FLV' | 'HDCD' | 'Hybrid' | 'Jukebox' | 'LP' | 'Limited Edition' | 'MOV' | 'MP2' | 'MP3' | 'MP3 Surround' | 'MPEG Video' | 'MPEG-4 Video' | 'Maxi-Single' | 'Mini' | 'Mini-Album' | 'Minimax' | 'Mispress' | 'Misprint' | 'Mixed' | 'Mixtape' | 'Mono' | 'Multichannel' | 'NTSC' | 'Numbered' | 'Opus' | 'PAL' | 'Partially Mixed' | 'Partially Unofficial' | 'Picture Disc' | 'Promo' | 'Quadraphonic' | 'RA' | 'RM' | 'Reissue' | 'Remastered' | 'Repress' | 'SECAM' | 'SHN' | 'SVCD' | 'SWF' | 'Salon' | 'Sampler' | 'Shape' | 'Single' | 'Single Sided' | 'Special Edition' | 'Stereo' | 'Styrene' | 'TTA' | 'Test Pressing' | 'Transcription' | 'Unofficial Release' | 'VCD' | 'VinylDisc' | 'WAV' | 'WMA' | 'WMV' | 'WavPack' | 'White Label' | 'XRCD' | 'ogg-vorbis' | '¼"' | '½"' | '⅛"';
|
|
5
|
-
export default FormatDescriptionType;
|
|
4
|
+
export type FormatDescriptionType = '1 ⅞ ips' | '1"' | '10"' | '10.5" NAB Reel' | '11"' | '12"' | '15 ips' | '15/16 ips' | '16 ⅔ RPM' | '16"' | '16mm' | '2 Minute' | '2"' | '2-Track Mono' | '2-Track Stereo' | '21cm' | '25cm' | '27cm' | '29cm' | '3 Minute' | '3 ¾ ips' | '3"' | '3" Cine Reel' | '3.5"' | '30 ips' | '33 ⅓ RPM' | '35cm' | '35mm' | '3½"' | '4 Minute' | '4"' | '4-Track Mono' | '4-Track Stereo' | '45 RPM' | '4K' | '5"' | '5" Cine Reel' | '5.25"' | '50cm' | '5½"' | '6"' | '6" Cine Reel' | '6½"' | '7 ½ ips' | '7"' | '7" Cine Reel' | '78 RPM' | '8 ⅓ RPM' | '8"' | '80 RPM' | '8K' | '9"' | '90 RPM' | 'AAC' | 'AIFC' | 'AIFF' | 'ALAC' | 'AMR' | 'APE' | 'AVCD' | 'AVI' | 'Advance' | 'Album' | 'Ambisonic' | 'Bioplastic' | 'Blu-ray Audio' | 'Business Card' | 'CD+G' | 'CD-ROM' | 'CD-Record' | 'CDi' | 'Card Backed' | 'Club Edition' | 'Compilation' | 'Concert' | 'Copy Protected' | 'DFF' | 'DSF' | 'DVD-Audio' | 'DVD-Data' | 'DVD-Video' | 'DVDplus' | 'Deluxe Edition' | 'Disc Image' | 'Double Sided' | 'DualDisc' | 'EP' | 'Enhanced' | 'Etched' | 'FLAC' | 'FLV' | 'HDCD' | 'Hybrid' | 'Jukebox' | 'LP' | 'Limited Edition' | 'MOV' | 'MP2' | 'MP3' | 'MP3 Surround' | 'MPEG Video' | 'MPEG-4 Video' | 'Maxi-Single' | 'Mini' | 'Mini-Album' | 'Minimax' | 'Mispress' | 'Misprint' | 'Mixed' | 'Mixtape' | 'Mono' | 'Multichannel' | 'NTSC' | 'Numbered' | 'Opus' | 'PAL' | 'Partially Mixed' | 'Partially Unofficial' | 'Picture Disc' | 'Promo' | 'Quadraphonic' | 'RA' | 'RM' | 'Reissue' | 'Remastered' | 'Repress' | 'SECAM' | 'SHN' | 'SVCD' | 'SWF' | 'Salon' | 'Sampler' | 'Shape' | 'Single' | 'Single Sided' | 'Special Edition' | 'Stereo' | 'Styrene' | 'TTA' | 'Test Pressing' | 'Transcription' | 'Unofficial Release' | 'VCD' | 'VinylDisc' | 'WAV' | 'WMA' | 'WMV' | 'WavPack' | 'White Label' | 'XRCD' | 'ogg-vorbis' | '¼"' | '½"' | '⅛"';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Formats
|
|
3
3
|
*/
|
|
4
|
-
type FormatType = '4-Track Cartridge' | '8-Track Cartridge' | 'Acetate' | 'All Media' | 'Betacam' | 'Betacam SP' | 'Betamax' | 'Blu-ray' | 'Blu-ray-R' | 'Box Set' | 'CD' | 'CDV' | 'CDr' | 'Cartrivision' | 'Cassette' | 'Cylinder' | 'DAT' | 'DC-International' | 'DCC' | 'DVD' | 'DVDr' | 'Edison Disc' | 'Elcaset' | 'File' | 'Film Reel' | 'Flexi-disc' | 'Floppy Disk' | 'HD DVD' | 'HD DVD-R' | 'HitClips' | 'Hybrid' | 'Laserdisc' | 'Lathe Cut' | 'MVD' | 'Memory Stick' | 'Microcassette' | 'Mighty Tiny' | 'MiniDV' | 'Minidisc' | 'NT Cassette' | 'Pathé Disc' | 'PlayTape' | 'Pocket Rocker' | 'RCA Tape Cartridge' | 'Reel-To-Reel' | 'Revere Magnetic Stereo Tape Ca' | 'SACD' | 'Sabamobil' | 'SelectaVision' | 'Shellac' | 'Sopic' | 'Super VHS' | 'TeD' | 'Tefifon' | 'U-matic' | 'UMD' | 'Ultra HD Blu-ray' | 'VHD' | 'VHS' | 'Video 2000' | 'Video8' | 'Vinyl' | 'Wire Recording';
|
|
5
|
-
export default FormatType;
|
|
4
|
+
export type FormatType = '4-Track Cartridge' | '8-Track Cartridge' | 'Acetate' | 'All Media' | 'Betacam' | 'Betacam SP' | 'Betamax' | 'Blu-ray' | 'Blu-ray-R' | 'Box Set' | 'CD' | 'CDV' | 'CDr' | 'Cartrivision' | 'Cassette' | 'Cylinder' | 'DAT' | 'DC-International' | 'DCC' | 'DVD' | 'DVDr' | 'Edison Disc' | 'Elcaset' | 'File' | 'Film Reel' | 'Flexi-disc' | 'Floppy Disk' | 'HD DVD' | 'HD DVD-R' | 'HitClips' | 'Hybrid' | 'Laserdisc' | 'Lathe Cut' | 'MVD' | 'Memory Stick' | 'Microcassette' | 'Mighty Tiny' | 'MiniDV' | 'Minidisc' | 'NT Cassette' | 'Pathé Disc' | 'PlayTape' | 'Pocket Rocker' | 'RCA Tape Cartridge' | 'Reel-To-Reel' | 'Revere Magnetic Stereo Tape Ca' | 'SACD' | 'Sabamobil' | 'SelectaVision' | 'Shellac' | 'Sopic' | 'Super VHS' | 'TeD' | 'Tefifon' | 'U-matic' | 'UMD' | 'Ultra HD Blu-ray' | 'VHD' | 'VHS' | 'Video 2000' | 'Video8' | 'Vinyl' | 'Wire Recording';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* From
|
|
3
3
|
*/
|
|
4
|
-
type FromType = 'Afghanistan' | 'Albania' | 'Algeria' | 'American Samoa' | 'Andorra' | 'Angola' | 'Anguilla' | 'Antarctica' | 'Antigua and Barbuda' | 'Argentina' | 'Armenia' | 'Aruba' | 'Australia' | 'Austria' | 'Azerbaidjan' | 'Bahamas' | 'Bahrain' | 'Bangladesh' | 'Barbados' | 'Belarus' | 'Belgium' | 'Belize' | 'Benin' | 'Bermuda' | 'Bhutan' | 'Bolivia' | 'Bosnia-Herzegovina' | 'Botswana' | 'Bouvet Island' | 'Brazil' | 'British Indian Ocean Territory' | 'Brunei Darussalam' | 'Bulgaria' | 'Burkina Faso' | 'Burundi' | 'Cambodia' | 'Cameroon' | 'Canada' | 'Cape Verde' | 'Cayman Islands' | 'Central African Republic' | 'Chad' | 'Chile' | 'China' | 'Christmas Island' | 'Cocos (Keeling) Islands' | 'Colombia' | 'Comoros' | 'Congo' | 'Cook Islands' | 'Costa Rica' | 'Croatia' | 'Cuba' | 'Cyprus' | 'Czech Republic' | 'Denmark' | 'Djibouti' | 'Dominica' | 'Dominican Republic' | 'East Timor' | 'Ecuador' | 'Egypt' | 'El Salvador' | 'Equatorial Guinea' | 'Eritrea' | 'Estonia' | 'Ethiopia' | 'Falkland Islands' | 'Faroe Islands' | 'Fiji' | 'Finland' | 'Former Czechoslovakia' | 'Former USSR' | 'France' | 'France (European Territory)' | 'French Guyana' | 'French Southern Territories' | 'Gabon' | 'Gambia' | 'Georgia' | 'Germany' | 'Ghana' | 'Gibraltar' | 'Greece' | 'Greenland' | 'Grenada' | 'Guadeloupe (French)' | 'Guam (USA)' | 'Guatemala' | 'Guinea' | 'Guinea Bissau' | 'Guyana' | 'Haiti' | 'Heard and McDonald Islands' | 'Honduras' | 'Hong Kong' | 'Hungary' | 'Iceland' | 'India' | 'Indonesia' | 'Iran' | 'Iraq' | 'Ireland' | 'Israel' | 'Italy' | "Ivory Coast (Cote D'Ivoire)" | 'Jamaica' | 'Japan' | 'Jordan' | 'Kazakhstan' | 'Kenya' | 'Kiribati' | 'Kuwait' | 'Kyrgyzstan' | 'Laos' | 'Latvia' | 'Lebanon' | 'Lesotho' | 'Liberia' | 'Libya' | 'Liechtenstein' | 'Lithuania' | 'Luxembourg' | 'Macau' | 'Macedonia' | 'Madagascar' | 'Malawi' | 'Malaysia' | 'Maldives' | 'Mali' | 'Malta' | 'Marshall Islands' | 'Martinique (French)' | 'Mauritania' | 'Mauritius' | 'Mayotte' | 'Mexico' | 'Micronesia' | 'Moldova, Republic of' | 'Monaco' | 'Mongolia' | 'Montenegro' | 'Montserrat' | 'Morocco' | 'Mozambique' | 'Myanmar' | 'Namibia' | 'Nauru' | 'Nepal' | 'Netherlands' | 'Netherlands Antilles' | 'Neutral Zone' | 'New Caledonia (French)' | 'New Zealand' | 'Nicaragua' | 'Niger' | 'Nigeria' | 'Niue' | 'Norfolk Island' | 'Northern Ireland' | 'Northern Mariana Islands' | 'Norway' | 'Oman' | 'Pakistan' | 'Palau' | 'Panama' | 'Papua New Guinea' | 'Paraguay' | 'Peru' | 'Philippines' | 'Pitcairn Island' | 'Poland' | 'Polynesia (French)' | 'Portugal' | 'Puerto Rico' | 'Qatar' | 'Reunion (French)' | 'Romania' | 'Russian Federation' | 'Rwanda' | 'S. Georgia & S. Sandwich Isls.' | 'Saint Helena' | 'Saint Kitts & Nevis Anguilla' | 'Saint Lucia' | 'Saint Pierre and Miquelon' | 'Saint Tome (Sao Tome) and Princi' | 'Saint Vincent & Grenadines' | 'Samoa' | 'San Marino' | 'Saudi Arabia' | 'Select your country' | 'Senegal' | 'Serbia' | 'Seychelles' | 'Sierra Leone' | 'Singapore' | 'Slovak Republic' | 'Slovenia' | 'Solomon Islands' | 'Somalia' | 'South Africa' | 'South Korea' | 'Spain' | 'Spain (Canary Islands)' | 'Sri Lanka' | 'Sudan' | 'Suriname' | 'Svalbard and Jan Mayen Islands' | 'Swaziland' | 'Sweden' | 'Switzerland' | 'Syria' | 'Tadjikistan' | 'Taiwan' | 'Tanzania' | 'Thailand' | 'Togo' | 'Tokelau' | 'Tonga' | 'Trinidad and Tobago' | 'Tunisia' | 'Turkey' | 'Turkmenistan' | 'Turks and Caicos Islands' | 'Tuvalu' | 'USA Minor Outlying Islands' | 'Uganda' | 'Ukraine' | 'United Arab Emirates' | 'United Kingdom' | 'United Kingdom (Channel Islands)' | 'United States' | 'Uruguay' | 'Uzbekistan' | 'Vanuatu' | 'Vatican City State' | 'Venezuela' | 'Vietnam' | 'Virgin Islands (British)' | 'Virgin Islands (USA)' | 'Wallis and Futuna Islands' | 'Western Sahara' | 'Yemen' | 'Yugoslavia' | 'Zaire' | 'Zambia' | 'Zimbabwe';
|
|
5
|
-
export default FromType;
|
|
4
|
+
export type FromType = 'Afghanistan' | 'Albania' | 'Algeria' | 'American Samoa' | 'Andorra' | 'Angola' | 'Anguilla' | 'Antarctica' | 'Antigua and Barbuda' | 'Argentina' | 'Armenia' | 'Aruba' | 'Australia' | 'Austria' | 'Azerbaidjan' | 'Bahamas' | 'Bahrain' | 'Bangladesh' | 'Barbados' | 'Belarus' | 'Belgium' | 'Belize' | 'Benin' | 'Bermuda' | 'Bhutan' | 'Bolivia' | 'Bosnia-Herzegovina' | 'Botswana' | 'Bouvet Island' | 'Brazil' | 'British Indian Ocean Territory' | 'Brunei Darussalam' | 'Bulgaria' | 'Burkina Faso' | 'Burundi' | 'Cambodia' | 'Cameroon' | 'Canada' | 'Cape Verde' | 'Cayman Islands' | 'Central African Republic' | 'Chad' | 'Chile' | 'China' | 'Christmas Island' | 'Cocos (Keeling) Islands' | 'Colombia' | 'Comoros' | 'Congo' | 'Cook Islands' | 'Costa Rica' | 'Croatia' | 'Cuba' | 'Cyprus' | 'Czech Republic' | 'Denmark' | 'Djibouti' | 'Dominica' | 'Dominican Republic' | 'East Timor' | 'Ecuador' | 'Egypt' | 'El Salvador' | 'Equatorial Guinea' | 'Eritrea' | 'Estonia' | 'Ethiopia' | 'Falkland Islands' | 'Faroe Islands' | 'Fiji' | 'Finland' | 'Former Czechoslovakia' | 'Former USSR' | 'France' | 'France (European Territory)' | 'French Guyana' | 'French Southern Territories' | 'Gabon' | 'Gambia' | 'Georgia' | 'Germany' | 'Ghana' | 'Gibraltar' | 'Greece' | 'Greenland' | 'Grenada' | 'Guadeloupe (French)' | 'Guam (USA)' | 'Guatemala' | 'Guinea' | 'Guinea Bissau' | 'Guyana' | 'Haiti' | 'Heard and McDonald Islands' | 'Honduras' | 'Hong Kong' | 'Hungary' | 'Iceland' | 'India' | 'Indonesia' | 'Iran' | 'Iraq' | 'Ireland' | 'Israel' | 'Italy' | "Ivory Coast (Cote D'Ivoire)" | 'Jamaica' | 'Japan' | 'Jordan' | 'Kazakhstan' | 'Kenya' | 'Kiribati' | 'Kuwait' | 'Kyrgyzstan' | 'Laos' | 'Latvia' | 'Lebanon' | 'Lesotho' | 'Liberia' | 'Libya' | 'Liechtenstein' | 'Lithuania' | 'Luxembourg' | 'Macau' | 'Macedonia' | 'Madagascar' | 'Malawi' | 'Malaysia' | 'Maldives' | 'Mali' | 'Malta' | 'Marshall Islands' | 'Martinique (French)' | 'Mauritania' | 'Mauritius' | 'Mayotte' | 'Mexico' | 'Micronesia' | 'Moldova, Republic of' | 'Monaco' | 'Mongolia' | 'Montenegro' | 'Montserrat' | 'Morocco' | 'Mozambique' | 'Myanmar' | 'Namibia' | 'Nauru' | 'Nepal' | 'Netherlands' | 'Netherlands Antilles' | 'Neutral Zone' | 'New Caledonia (French)' | 'New Zealand' | 'Nicaragua' | 'Niger' | 'Nigeria' | 'Niue' | 'Norfolk Island' | 'Northern Ireland' | 'Northern Mariana Islands' | 'Norway' | 'Oman' | 'Pakistan' | 'Palau' | 'Panama' | 'Papua New Guinea' | 'Paraguay' | 'Peru' | 'Philippines' | 'Pitcairn Island' | 'Poland' | 'Polynesia (French)' | 'Portugal' | 'Puerto Rico' | 'Qatar' | 'Reunion (French)' | 'Romania' | 'Russian Federation' | 'Rwanda' | 'S. Georgia & S. Sandwich Isls.' | 'Saint Helena' | 'Saint Kitts & Nevis Anguilla' | 'Saint Lucia' | 'Saint Pierre and Miquelon' | 'Saint Tome (Sao Tome) and Princi' | 'Saint Vincent & Grenadines' | 'Samoa' | 'San Marino' | 'Saudi Arabia' | 'Select your country' | 'Senegal' | 'Serbia' | 'Seychelles' | 'Sierra Leone' | 'Singapore' | 'Slovak Republic' | 'Slovenia' | 'Solomon Islands' | 'Somalia' | 'South Africa' | 'South Korea' | 'Spain' | 'Spain (Canary Islands)' | 'Sri Lanka' | 'Sudan' | 'Suriname' | 'Svalbard and Jan Mayen Islands' | 'Swaziland' | 'Sweden' | 'Switzerland' | 'Syria' | 'Tadjikistan' | 'Taiwan' | 'Tanzania' | 'Thailand' | 'Togo' | 'Tokelau' | 'Tonga' | 'Trinidad and Tobago' | 'Tunisia' | 'Turkey' | 'Turkmenistan' | 'Turks and Caicos Islands' | 'Tuvalu' | 'USA Minor Outlying Islands' | 'Uganda' | 'Ukraine' | 'United Arab Emirates' | 'United Kingdom' | 'United Kingdom (Channel Islands)' | 'United States' | 'Uruguay' | 'Uzbekistan' | 'Vanuatu' | 'Vatican City State' | 'Venezuela' | 'Vietnam' | 'Virgin Islands (British)' | 'Virgin Islands (USA)' | 'Wallis and Futuna Islands' | 'Western Sahara' | 'Yemen' | 'Yugoslavia' | 'Zaire' | 'Zambia' | 'Zimbabwe';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Genres
|
|
3
3
|
*/
|
|
4
|
-
type GenreType = 'Blues' | 'Brass & Military' | "Children's" | 'Classical' | 'Electronic' | 'Folk, World, & Country' | 'Funk / Soul' | 'Hip Hop' | 'Jazz' | 'Latin' | 'Non-Music' | 'Pop' | 'Reggae' | 'Rock' | 'Stage & Screen';
|
|
5
|
-
export default GenreType;
|
|
4
|
+
export type GenreType = 'Blues' | 'Brass & Military' | "Children's" | 'Classical' | 'Electronic' | 'Folk, World, & Country' | 'Funk / Soul' | 'Hip Hop' | 'Jazz' | 'Latin' | 'Non-Music' | 'Pop' | 'Reggae' | 'Rock' | 'Stage & Screen';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type LimitType from '../types/limit.type
|
|
2
|
-
import type GenreType from '../types/genre.type
|
|
3
|
-
import type CurrencyType from '../types/currency.type
|
|
4
|
-
import type FromType from '../types/from.type
|
|
5
|
-
import type StyleType from '../types/style.type
|
|
6
|
-
import type FormatType from '../types/format.type
|
|
7
|
-
import type ConditionType from '../types/condition.type
|
|
8
|
-
import type SortType from '../types/sort.type
|
|
9
|
-
import type LangType from '../types/lang.type
|
|
10
|
-
import type FormatDescriptionType from '../types/format-description.type
|
|
11
|
-
import type SearchTypeType from '../types/search-type.type
|
|
1
|
+
import type { LimitType } from '../types/limit.type';
|
|
2
|
+
import type { GenreType } from '../types/genre.type';
|
|
3
|
+
import type { CurrencyType } from '../types/currency.type';
|
|
4
|
+
import type { FromType } from '../types/from.type';
|
|
5
|
+
import type { StyleType } from '../types/style.type';
|
|
6
|
+
import type { FormatType } from '../types/format.type';
|
|
7
|
+
import type { ConditionType } from '../types/condition.type';
|
|
8
|
+
import type { SortType } from '../types/sort.type';
|
|
9
|
+
import type { LangType } from '../types/lang.type';
|
|
10
|
+
import type { FormatDescriptionType } from '../types/format-description.type';
|
|
11
|
+
import type { SearchTypeType } from '../types/search-type.type';
|
|
12
12
|
export type { LimitType, GenreType, CurrencyType, FromType, StyleType, FormatType, ConditionType, SortType, LangType, FormatDescriptionType, SearchTypeType, };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sorts
|
|
3
3
|
*/
|
|
4
|
-
type SortType = 'Artist A-Z' | 'Artist Z-A' | 'Condition (M)-(P)' | 'Condition (P)-(M)' | 'Label A-Z' | 'Label Z-A' | 'Listed Newest' | 'Listed Oldest' | 'Price Highest' | 'Price Lowest' | 'Seller A-Z' | 'Seller Z-A' | 'Title A-Z' | 'Title Z-A';
|
|
5
|
-
export default SortType;
|
|
4
|
+
export type SortType = 'Artist A-Z' | 'Artist Z-A' | 'Condition (M)-(P)' | 'Condition (P)-(M)' | 'Label A-Z' | 'Label Z-A' | 'Listed Newest' | 'Listed Oldest' | 'Price Highest' | 'Price Lowest' | 'Seller A-Z' | 'Seller Z-A' | 'Title A-Z' | 'Title Z-A';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Styles
|
|
3
3
|
*/
|
|
4
|
-
type StyleType = 'AOR' | 'Aboriginal' | 'Abstract' | 'Acid' | 'Acid House' | 'Acid Jazz' | 'Acid Rock' | 'Acoustic' | 'African' | 'Afro-Cuban' | 'Afro-Cuban Jazz' | 'Afrobeat' | '
|
|
5
|
-
export default StyleType;
|
|
4
|
+
export type StyleType = 'AOR' | 'Aboriginal' | 'Abstract' | 'Acid' | 'Acid House' | 'Acid Jazz' | 'Acid Rock' | 'Acoustic' | 'African' | 'Afro-Cuban' | 'Afro-Cuban Jazz' | 'Afrobeat' | 'Aguinaldo' | 'Alternative Rock' | 'Ambient' | 'Andalusian Classical' | 'Andean Music' | 'Appalachian Music' | 'Arena Rock' | 'Art Rock' | 'Atmospheric Black Metal' | 'Audiobook' | 'Avant-garde Jazz' | 'Avantgarde' | 'Axé' | 'Azonto' | 'Bachata' | 'Baião' | 'Balearic' | 'Ballad' | 'Ballroom' | 'Baltimore Club' | 'Bambuco' | 'Bangladeshi Classical' | 'Barbershop' | 'Baroque' | 'Baroque Pop' | 'Basque Music' | 'Bass Music' | 'Bassline' | 'Batucada' | 'Bayou Funk' | 'Beat' | 'Beatbox' | 'Beatdown' | 'Beguine' | 'Bengali Music' | 'Berlin-School' | 'Bhangra' | 'Big Band' | 'Big Beat' | 'Black Metal' | 'Bleep' | 'Bluegrass' | 'Blues Rock' | 'Bolero' | 'Bollywood' | 'Bomba' | 'Bongo Flava' | 'Boogaloo' | 'Boogie' | 'Boogie Woogie' | 'Boom Bap' | 'Bop' | 'Bossa Nova' | 'Bossanova' | 'Bounce' | 'Brass Band' | 'Break-In' | 'Breakbeat' | 'Breakcore' | 'Breaks' | 'Brit Pop' | 'Britcore' | 'Britpop' | 'Broken Beat' | 'Bubblegum' | 'Bubbling' | 'Cabaret' | 'Caipira' | 'Cajun' | 'Calypso' | 'Cambodian Classical' | 'Candombe' | 'Cantopop' | 'Canzone Napoletana' | 'Cape Jazz' | 'Carimbó' | 'Carnatic' | 'Catalan Music' | 'Celtic' | 'Cha-Cha' | 'Chacarera' | 'Chamamé' | 'Champeta' | 'Chanson' | 'Charanga' | 'Chicago Blues' | 'Chillwave' | 'Chinese Classical' | 'Chiptune' | 'Choral' | 'Choro' | 'Chutney' | 'City Pop' | 'Classic Rock' | 'Classical' | 'Cloud Rap' | 'Cobla' | 'Coldwave' | 'Comedy' | 'Compas' | 'Conjunto' | 'Conscious' | 'Contemporary' | 'Contemporary Jazz' | 'Contemporary R&B' | 'Cool Jazz' | 'Copla' | 'Corrido' | 'Country' | 'Country Blues' | 'Country Rock' | 'Cretan' | 'Crunk' | 'Crust' | 'Cuatro' | 'Cubano' | 'Cumbia' | 'Cut-up/DJ' | 'DJ Battle Tool' | 'Dance-pop' | 'Dancehall' | 'Dangdut' | 'Danzon' | 'Dark Ambient' | 'Dark Jazz' | 'Darkwave' | 'Death Metal' | 'Deathcore' | 'Deathrock' | 'Deep House' | 'Deep Techno' | 'Delta Blues' | 'Depressive Black Metal' | 'Descarga' | 'Dialogue' | 'Disco' | 'Disco Polo' | 'Dixieland' | 'Donk' | 'Doo Wop' | 'Doom Metal' | 'Doomcore' | 'Downtempo' | 'Dream Pop' | 'Drone' | 'Drum n Bass' | 'Dub' | 'Dub Poetry' | 'Dub Techno' | 'Dubstep' | 'Dungeon Synth' | 'EBM' | 'Early' | 'East Coast Blues' | 'Easy Listening' | 'Education' | 'Educational' | 'Electric Blues' | 'Electro' | 'Electro House' | 'Electro Swing' | 'Electroacoustic' | 'Electroclash' | 'Emo' | 'Enka' | 'Erotic' | 'Ethereal' | 'Ethno-pop' | 'Euro House' | 'Euro-Disco' | 'Eurobeat' | 'Eurodance' | 'Europop' | 'Experimental' | 'Fado' | 'Favela Funk' | 'Field Recording' | 'Filk' | 'Flamenco' | 'Folk' | 'Folk Metal' | 'Folk Rock' | 'Footwork' | 'Forró' | 'Free Funk' | 'Free Improvisation' | 'Free Jazz' | 'Freestyle' | 'Freetekno' | 'Funaná' | 'Funeral Doom Metal' | 'Funk' | 'Funk Metal' | 'Funkot' | 'Fusion' | 'Future Jazz' | 'G-Funk' | 'Gabber' | 'Gagaku' | 'Gaita' | 'Galician Traditional' | 'Gamelan' | 'Gangsta' | 'Garage House' | 'Garage Rock' | 'Ghazal' | 'Ghetto' | 'Ghetto House' | 'Ghettotech' | 'Glam' | 'Glitch' | 'Glitch Hop' | 'Go-Go' | 'Goa Trance' | 'Gogo' | 'Goregrind' | 'Gospel' | 'Goth Rock' | 'Gothic Metal' | 'Gqom' | 'Grime' | 'Grindcore' | 'Griot' | 'Groove Metal' | 'Group Sounds' | 'Grunge' | 'Guaguancó' | 'Guajira' | 'Guaracha' | 'Guarania' | 'Guggenmusik' | 'Gwo Ka' | 'Gypsy Jazz' | 'Għana' | 'Halftime' | 'Hands Up' | 'Happy Hardcore' | 'Hard Beat' | 'Hard Bop' | 'Hard House' | 'Hard Rock' | 'Hard Techno' | 'Hard Trance' | 'Hardcore' | 'Hardcore Hip-Hop' | 'Hardstyle' | 'Harmonica Blues' | 'Harsh Noise Wall' | 'Hawaiian' | 'Health-Fitness' | 'Heavy Metal' | 'Hi NRG' | 'Highlife' | 'Hill Country Blues' | 'Hillbilly' | 'Hindustani' | 'Hip Hop' | 'Hip-House' | 'Hiplife' | 'Hokkien Pop' | 'Honky Tonk' | 'Horror Rock' | 'Horrorcore' | 'House' | 'Huayno' | 'Hyperpop' | 'Hyphy' | 'IDM' | 'Illbient' | 'Impressionist' | 'Indian Classical' | 'Indie Pop' | 'Indie Rock' | 'Indo-Pop' | 'Industrial' | 'Industrial Metal' | 'Instrumental' | 'Interview' | 'Italo House' | 'Italo-Disco' | 'Italodance' | 'J-Core' | 'J-Rock' | 'J-pop' | 'Jangle Pop' | 'Jazz-Funk' | 'Jazz-Rock' | 'Jazzdance' | 'Jazzy Hip-Hop' | 'Jersey Club' | 'Jibaro' | 'Joropo' | 'Jota' | 'Jug Band' | 'Juke' | 'Jump Blues' | 'Jumpstyle' | 'Jungle' | 'Junkanoo' | 'K-Rock' | 'K-pop' | 'Karaoke' | 'Kaseko' | 'Kayōkyoku' | 'Keroncong' | 'Kizomba' | 'Klasik' | 'Klezmer' | 'Korean Court Music' | 'Krautrock' | 'Kuduro' | 'Kwaito' | 'Lambada' | 'Lao Music' | 'Latin' | 'Latin Jazz' | 'Laïkó' | 'Leftfield' | 'Lento Violento' | 'Levenslied' | 'Light Music' | 'Liscio' | 'Lo-Fi' | 'Louisiana Blues' | 'Lounge' | 'Lovers Rock' | 'Luk Krung' | 'Luk Thung' | 'MPB' | 'Makina' | 'Maloya' | 'Mambo' | 'Mandopop' | 'Marcha Carnavalesca' | 'Marches' | 'Mariachi' | 'Marimba' | 'Math Rock' | 'Mbalax' | 'Medical' | 'Medieval' | 'Melodic Death Metal' | 'Melodic Hardcore' | 'Memphis Blues' | 'Mento' | 'Merengue' | 'Metalcore' | 'Miami Bass' | 'Military' | 'Milonga' | "Min'yō" | 'Minimal' | 'Minimal Techno' | 'Minneapolis Sound' | 'Mizrahi' | 'Mo Lam' | 'Mod' | 'Modal' | 'Modern' | 'Modern Classical' | 'Modern Electric Blues' | 'Monolog' | 'Moombahton' | 'Morna' | 'Motswako' | 'Mouth Music' | 'Movie Effects' | 'Mugham' | 'Musette' | 'Music Hall' | 'Musical' | 'Musique Concrète' | 'Música Criolla' | 'NDW' | 'Neo Soul' | 'Neo Trance' | 'Neo-Classical' | 'Neo-Romantic' | 'Neofolk' | 'Nerdcore Techno' | 'New Age' | 'New Beat' | 'New Jack Swing' | 'New Wave' | 'Nhạc Vàng' | 'No Wave' | 'Noise' | 'Noisecore' | 'Nordic' | 'Norteño' | 'Novelty' | 'Nu Metal' | 'Nu-Disco' | 'Nueva Cancion' | 'Nueva Trova' | 'Nursery Rhymes' | 'Néo Kyma' | 'Népzene' | 'Occitan' | 'Oi' | 'Opera' | 'Operetta' | 'Oratorio' | 'Ottoman Classical' | 'Overtone Singing' | 'P.Funk' | 'Pachanga' | 'Pacific' | 'Parody' | 'Pasodoble' | 'Persian Classical' | 'Philippine Classical' | 'Phleng Phuea Chiwit' | 'Phonk' | 'Piano Blues' | 'Piedmont Blues' | 'Piobaireachd' | 'Pipe & Drum' | 'Plena' | 'Poetry' | 'Political' | 'Polka' | 'Pop Punk' | 'Pop Rap' | 'Pop Rock' | 'Pornogrind' | 'Porro' | 'Post Bop' | 'Post Rock' | 'Post-Hardcore' | 'Post-Metal' | 'Post-Modern' | 'Post-Punk' | 'Power Electronics' | 'Power Metal' | 'Power Pop' | 'Power Violence' | 'Prog Rock' | 'Progressive Bluegrass' | 'Progressive Breaks' | 'Progressive House' | 'Progressive Metal' | 'Progressive Trance' | 'Promotional' | 'Psy-Trance' | 'Psychedelic' | 'Psychedelic Rock' | 'Psychobilly' | 'Pub Rock' | 'Public Broadcast' | 'Public Service Announcement' | 'Punk' | 'Qawwali' | 'Quechua' | 'Radioplay' | 'Ragga' | 'Ragga HipHop' | 'Ragtime' | 'Ranchera' | 'Rapso' | 'Raï' | 'Rebetiko' | 'Reggae' | 'Reggae Gospel' | 'Reggae-Pop' | 'Reggaeton' | 'Religious' | 'Renaissance' | 'Rhythm & Blues' | 'Rhythmic Noise' | 'RnB/Swing' | 'Rock & Roll' | 'Rock Opera' | 'Rockabilly' | 'Rocksteady' | 'Romani' | 'Romantic' | 'Roots Reggae' | 'Rumba' | 'Rune Singing' | 'Ryūkōka' | 'Rōkyoku' | 'Salegy' | 'Salsa' | 'Samba' | 'Samba-Canção' | 'Schlager' | 'Schranz' | 'Score' | 'Screw' | 'Sea Shanties' | 'Sean-nós' | 'Sephardic' | 'Seresta' | 'Serial' | 'Sermon' | 'Sertanejo' | 'Shaabi' | 'Shidaiqu' | 'Shoegaze' | 'Singeli' | 'Ska' | 'Skiffle' | 'Skweee' | 'Sludge Metal' | 'Smooth Jazz' | 'Soca' | 'Soft Rock' | 'Son' | 'Son Montuno' | 'Sonero' | 'Soukous' | 'Soul' | 'Soul-Jazz' | 'Sound Art' | 'Sound Collage' | 'Sound Poetry' | 'Soundtrack' | 'Southern Rock' | 'Space Rock' | 'Space-Age' | 'Spaza' | 'Special Effects' | 'Speech' | 'Speed Garage' | 'Speed Metal' | 'Speedcore' | 'Spirituals' | 'Spoken Word' | 'Steel Band' | 'Stoner Rock' | 'Story' | 'Stride' | 'Surf' | 'Swamp Pop' | 'Swing' | 'Swingbeat' | 'Symphonic Metal' | 'Symphonic Rock' | 'Synth-pop' | 'Synthwave' | 'Sámi Music' | 'Séga' | 'Taarab' | 'Tamil Film Music' | 'Tango' | 'Tech House' | 'Tech Trance' | 'Technical' | 'Technical Death Metal' | 'Techno' | 'Tejano' | 'Texas Blues' | 'Thai Classical' | 'Theme' | 'Therapy' | 'Thrash' | 'Thug Rap' | 'Timba' | 'Trallalero' | 'Trance' | 'Trap' | 'Tribal' | 'Tribal House' | 'Trip Hop' | 'Tropical House' | 'Trova' | 'Turntablism' | 'Twelve-tone' | 'Twist' | 'UK Funky' | 'UK Garage' | 'UK Street Soul' | 'Vallenato' | 'Vaporwave' | 'Vaudeville' | 'Video Game Music' | 'Viking Metal' | 'Villancicos' | 'Vocal' | 'Volksmusik' | 'Waiata' | 'Western Swing' | 'Witch House' | 'Yemenite Jewish' | 'Yé-Yé' | 'Zamba' | 'Zarzuela' | 'Zemer Ivri' | 'Zouk' | 'Zydeco' | 'Éntekhno';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "discogs-marketplace-api-nodejs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "Another (better ?) NodeJs library to fetch data from Discogs marketplace",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"discogs",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"author": "KirianCaumes",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"scripts": {
|
|
19
|
-
"prepare": "husky
|
|
19
|
+
"prepare": "husky && npm run build",
|
|
20
20
|
"prebuild": "rimraf dist",
|
|
21
21
|
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
22
|
-
"start:dev": "
|
|
23
|
-
"test": "
|
|
24
|
-
"eslint:fix": "eslint
|
|
25
|
-
"eslint": "eslint
|
|
22
|
+
"start:dev": "node --import tsx --watch ./src/index.ts",
|
|
23
|
+
"test": "node --import tsx --test ./test/*.test.ts",
|
|
24
|
+
"eslint:fix": "eslint --fix",
|
|
25
|
+
"eslint": "eslint",
|
|
26
26
|
"prettier": "prettier --check .",
|
|
27
27
|
"prettier:fix": "prettier --write .",
|
|
28
28
|
"cspell": "npx cspell ./ --no-progress",
|
|
@@ -40,35 +40,29 @@
|
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"playwright-chromium": "^1.43.1",
|
|
46
|
-
"user-agents": "^1.1.186"
|
|
43
|
+
"playwright-chromium": "^1.51.1",
|
|
44
|
+
"user-agents": "^1.1.505"
|
|
47
45
|
},
|
|
48
46
|
"devDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"@types/node": "^20.
|
|
47
|
+
"@eslint/js": "^9.24.0",
|
|
48
|
+
"@types/node": "^20.17.30",
|
|
51
49
|
"@types/user-agents": "^1.0.4",
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
53
|
-
"@typescript-eslint/parser": "^
|
|
54
|
-
"cspell": "^8.
|
|
55
|
-
"eslint": "^
|
|
56
|
-
"eslint-config-
|
|
57
|
-
"eslint-
|
|
58
|
-
"eslint-
|
|
59
|
-
"eslint-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"ts-jest": "^29.1.2",
|
|
70
|
-
"tsc-alias": "^1.8.8",
|
|
71
|
-
"tsconfig-paths": "^4.2.0",
|
|
72
|
-
"typescript": "^5.4.5"
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
51
|
+
"@typescript-eslint/parser": "^8.29.1",
|
|
52
|
+
"cspell": "^8.18.1",
|
|
53
|
+
"eslint": "^9.24.0",
|
|
54
|
+
"eslint-config-prettier": "^10.1.2",
|
|
55
|
+
"eslint-import-resolver-typescript": "^4.3.2",
|
|
56
|
+
"eslint-plugin-import": "^2.31.0",
|
|
57
|
+
"eslint-plugin-jsdoc": "^50.6.9",
|
|
58
|
+
"husky": "^9.1.7",
|
|
59
|
+
"knip": "^5.50.2",
|
|
60
|
+
"lint-staged": "^15.5.0",
|
|
61
|
+
"prettier": "^3.5.3",
|
|
62
|
+
"rimraf": "^6.0.1",
|
|
63
|
+
"tsc-alias": "^1.8.15",
|
|
64
|
+
"tsx": "^4.19.3",
|
|
65
|
+
"typescript": "^5.8.3",
|
|
66
|
+
"typescript-eslint": "^8.29.1"
|
|
73
67
|
}
|
|
74
68
|
}
|