musicbrainz-api 0.5.2 → 0.7.2
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/.idea/$CACHE_FILE$ +6 -0
- package/.idea/$PRODUCT_WORKSPACE_FILE$ +19 -0
- package/.idea/checkstyle-idea.xml +16 -0
- package/.idea/codeStyles/Project.xml +38 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/shelf/Uncommitted_changes_before_Update_at_6-1-2022_11_38_[Default_Changelist]/shelved.patch +58 -0
- package/.idea/shelf/Uncommitted_changes_before_Update_at_6-1-2022_11_38__Default_Changelist_.xml +4 -0
- package/.idea/shelf/Uncommitted_changes_before_rebase_[Default_Changelist]/shelved.patch +738 -0
- package/.idea/shelf/Uncommitted_changes_before_rebase_[Default_Changelist]1/shelved.patch +0 -0
- package/.idea/shelf/Uncommitted_changes_before_rebase__Default_Changelist_.xml +4 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/workspace.xml +722 -0
- package/README.md +290 -287
- package/etc/config.js +32 -0
- package/lib/digest-auth.d.ts +21 -21
- package/lib/digest-auth.js +87 -86
- package/lib/musicbrainz-api.d.ts +156 -140
- package/lib/musicbrainz-api.js +390 -372
- package/lib/musicbrainz.types.d.ts +379 -252
- package/lib/musicbrainz.types.js +16 -15
- package/lib/rate-limiter.d.ts +8 -8
- package/lib/rate-limiter.js +31 -30
- package/lib/xml/xml-isrc-list.d.ts +17 -17
- package/lib/xml/xml-isrc-list.js +22 -21
- package/lib/xml/xml-isrc.d.ts +10 -10
- package/lib/xml/xml-isrc.js +17 -16
- package/lib/xml/xml-metadata.d.ts +6 -6
- package/lib/xml/xml-metadata.js +29 -28
- package/lib/xml/xml-recording.d.ts +24 -24
- package/lib/xml/xml-recording.js +20 -19
- package/package.json +98 -99
- package/yarn-error.log +3608 -0
package/lib/rate-limiter.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare class RateLimiter {
|
|
2
|
-
private maxCalls;
|
|
3
|
-
static sleep(ms: any): Promise<void>;
|
|
4
|
-
queue: number[];
|
|
5
|
-
private readonly period;
|
|
6
|
-
constructor(period: number, maxCalls: number);
|
|
7
|
-
limit(): Promise<void>;
|
|
8
|
-
}
|
|
1
|
+
export declare class RateLimiter {
|
|
2
|
+
private maxCalls;
|
|
3
|
+
static sleep(ms: any): Promise<void>;
|
|
4
|
+
queue: number[];
|
|
5
|
+
private readonly period;
|
|
6
|
+
constructor(period: number, maxCalls: number);
|
|
7
|
+
limit(): Promise<void>;
|
|
8
|
+
}
|
package/lib/rate-limiter.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RateLimiter = void 0;
|
|
4
|
+
const Debug = require("debug");
|
|
5
|
+
const debug = Debug('musicbrainz-api:rate-limiter');
|
|
6
|
+
class RateLimiter {
|
|
7
|
+
constructor(period, maxCalls) {
|
|
8
|
+
this.maxCalls = maxCalls;
|
|
9
|
+
this.queue = [];
|
|
10
|
+
this.period = 1000 * period;
|
|
11
|
+
}
|
|
12
|
+
static sleep(ms) {
|
|
13
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
14
|
+
}
|
|
15
|
+
async limit() {
|
|
16
|
+
let now = new Date().getTime();
|
|
17
|
+
const t0 = now - (this.period);
|
|
18
|
+
while (this.queue.length > 0 && this.queue[0] < t0) {
|
|
19
|
+
this.queue.shift();
|
|
20
|
+
}
|
|
21
|
+
if (this.queue.length >= this.maxCalls) {
|
|
22
|
+
const delay = this.queue[0] + this.period - now;
|
|
23
|
+
debug(`Client side rate limiter activated: cool down for ${delay / 1000} s...`);
|
|
24
|
+
return RateLimiter.sleep(delay);
|
|
25
|
+
}
|
|
26
|
+
now = new Date().getTime();
|
|
27
|
+
this.queue.push(now);
|
|
28
|
+
// const ratePerSec = 1000 * this.queue.length / (now - this.queue[0]);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.RateLimiter = RateLimiter;
|
|
31
32
|
//# sourceMappingURL=rate-limiter.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { XmlIsrc } from './xml-isrc';
|
|
2
|
-
export declare class XmlIsrcList {
|
|
3
|
-
items: XmlIsrc[];
|
|
4
|
-
pushIsrc(isrc: string): void;
|
|
5
|
-
toXml(): {
|
|
6
|
-
name: string;
|
|
7
|
-
attrs: {
|
|
8
|
-
count: number;
|
|
9
|
-
};
|
|
10
|
-
children: {
|
|
11
|
-
name: string;
|
|
12
|
-
attrs: {
|
|
13
|
-
id: string;
|
|
14
|
-
};
|
|
15
|
-
}[];
|
|
16
|
-
};
|
|
17
|
-
}
|
|
1
|
+
import { XmlIsrc } from './xml-isrc';
|
|
2
|
+
export declare class XmlIsrcList {
|
|
3
|
+
items: XmlIsrc[];
|
|
4
|
+
pushIsrc(isrc: string): void;
|
|
5
|
+
toXml(): {
|
|
6
|
+
name: string;
|
|
7
|
+
attrs: {
|
|
8
|
+
count: number;
|
|
9
|
+
};
|
|
10
|
+
children: {
|
|
11
|
+
name: string;
|
|
12
|
+
attrs: {
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
}
|
package/lib/xml/xml-isrc-list.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XmlIsrcList = void 0;
|
|
4
|
+
const xml_isrc_1 = require("./xml-isrc");
|
|
5
|
+
class XmlIsrcList {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.items = [];
|
|
8
|
+
}
|
|
9
|
+
pushIsrc(isrc) {
|
|
10
|
+
this.items.push(new xml_isrc_1.XmlIsrc(isrc));
|
|
11
|
+
}
|
|
12
|
+
toXml() {
|
|
13
|
+
return this.items.length === 0 ? null : {
|
|
14
|
+
name: 'isrc-list',
|
|
15
|
+
attrs: {
|
|
16
|
+
count: this.items.length
|
|
17
|
+
},
|
|
18
|
+
children: this.items.map(isrc => isrc.toXml())
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.XmlIsrcList = XmlIsrcList;
|
|
22
23
|
//# sourceMappingURL=xml-isrc-list.js.map
|
package/lib/xml/xml-isrc.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare class XmlIsrc {
|
|
2
|
-
isrc: string;
|
|
3
|
-
constructor(isrc: string);
|
|
4
|
-
toXml(): {
|
|
5
|
-
name: string;
|
|
6
|
-
attrs: {
|
|
7
|
-
id: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
}
|
|
1
|
+
export declare class XmlIsrc {
|
|
2
|
+
isrc: string;
|
|
3
|
+
constructor(isrc: string);
|
|
4
|
+
toXml(): {
|
|
5
|
+
name: string;
|
|
6
|
+
attrs: {
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
package/lib/xml/xml-isrc.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XmlIsrc = void 0;
|
|
4
|
+
class XmlIsrc {
|
|
5
|
+
constructor(isrc) {
|
|
6
|
+
this.isrc = isrc;
|
|
7
|
+
}
|
|
8
|
+
toXml() {
|
|
9
|
+
return {
|
|
10
|
+
name: 'isrc',
|
|
11
|
+
attrs: {
|
|
12
|
+
id: this.isrc
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.XmlIsrc = XmlIsrc;
|
|
17
18
|
//# sourceMappingURL=xml-isrc.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { XmlRecording } from './xml-recording';
|
|
2
|
-
export declare class XmlMetadata {
|
|
3
|
-
recordings: XmlRecording[];
|
|
4
|
-
pushRecording(id: string): XmlRecording;
|
|
5
|
-
toXml(): string;
|
|
6
|
-
}
|
|
1
|
+
import { XmlRecording } from './xml-recording';
|
|
2
|
+
export declare class XmlMetadata {
|
|
3
|
+
recordings: XmlRecording[];
|
|
4
|
+
pushRecording(id: string): XmlRecording;
|
|
5
|
+
toXml(): string;
|
|
6
|
+
}
|
package/lib/xml/xml-metadata.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2#ISRC_submission
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
// https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2#ISRC_submission
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.XmlMetadata = void 0;
|
|
5
|
+
const jsontoxml = require("jsontoxml");
|
|
6
|
+
const xml_recording_1 = require("./xml-recording");
|
|
7
|
+
const ns_metadata = 'http://musicbrainz.org/ns/mmd-2.0#';
|
|
8
|
+
class XmlMetadata {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.recordings = [];
|
|
11
|
+
}
|
|
12
|
+
pushRecording(id) {
|
|
13
|
+
const rec = new xml_recording_1.XmlRecording(id);
|
|
14
|
+
this.recordings.push(rec);
|
|
15
|
+
return rec;
|
|
16
|
+
}
|
|
17
|
+
toXml() {
|
|
18
|
+
return jsontoxml([{
|
|
19
|
+
name: 'metadata',
|
|
20
|
+
attrs: {
|
|
21
|
+
xmlns: ns_metadata
|
|
22
|
+
},
|
|
23
|
+
children: [{
|
|
24
|
+
'recording-list': this.recordings.map(rec => rec.toXml())
|
|
25
|
+
}]
|
|
26
|
+
}], { prettyPrint: false, escape: true, xmlHeader: true });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.XmlMetadata = XmlMetadata;
|
|
29
30
|
//# sourceMappingURL=xml-metadata.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { XmlIsrcList } from './xml-isrc-list';
|
|
2
|
-
export declare class XmlRecording {
|
|
3
|
-
id: string;
|
|
4
|
-
isrcList: XmlIsrcList;
|
|
5
|
-
constructor(id: string);
|
|
6
|
-
toXml(): {
|
|
7
|
-
name: string;
|
|
8
|
-
attrs: {
|
|
9
|
-
id: string;
|
|
10
|
-
};
|
|
11
|
-
children: {
|
|
12
|
-
name: string;
|
|
13
|
-
attrs: {
|
|
14
|
-
count: number;
|
|
15
|
-
};
|
|
16
|
-
children: {
|
|
17
|
-
name: string;
|
|
18
|
-
attrs: {
|
|
19
|
-
id: string;
|
|
20
|
-
};
|
|
21
|
-
}[];
|
|
22
|
-
}[];
|
|
23
|
-
};
|
|
24
|
-
}
|
|
1
|
+
import { XmlIsrcList } from './xml-isrc-list';
|
|
2
|
+
export declare class XmlRecording {
|
|
3
|
+
id: string;
|
|
4
|
+
isrcList: XmlIsrcList;
|
|
5
|
+
constructor(id: string);
|
|
6
|
+
toXml(): {
|
|
7
|
+
name: string;
|
|
8
|
+
attrs: {
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
children: {
|
|
12
|
+
name: string;
|
|
13
|
+
attrs: {
|
|
14
|
+
count: number;
|
|
15
|
+
};
|
|
16
|
+
children: {
|
|
17
|
+
name: string;
|
|
18
|
+
attrs: {
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
}
|
package/lib/xml/xml-recording.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
this.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XmlRecording = void 0;
|
|
4
|
+
const xml_isrc_list_1 = require("./xml-isrc-list");
|
|
5
|
+
class XmlRecording {
|
|
6
|
+
constructor(id) {
|
|
7
|
+
this.id = id;
|
|
8
|
+
this.isrcList = new xml_isrc_list_1.XmlIsrcList();
|
|
9
|
+
}
|
|
10
|
+
toXml() {
|
|
11
|
+
return {
|
|
12
|
+
name: 'recording',
|
|
13
|
+
attrs: {
|
|
14
|
+
id: this.id
|
|
15
|
+
},
|
|
16
|
+
children: [this.isrcList.toXml()]
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.XmlRecording = XmlRecording;
|
|
20
21
|
//# sourceMappingURL=xml-recording.js.map
|
package/package.json
CHANGED
|
@@ -1,99 +1,98 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "musicbrainz-api",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MusicBrainz API client for reading and submitting metadata",
|
|
5
|
-
"main": "lib/musicbrainz-api",
|
|
6
|
-
"types": "lib/musicbrainz-api",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Borewit",
|
|
9
|
-
"url": "https://github.com/Borewit"
|
|
10
|
-
},
|
|
11
|
-
"keywords": [
|
|
12
|
-
"MusicBrainz",
|
|
13
|
-
"metadata",
|
|
14
|
-
"meta",
|
|
15
|
-
"tag",
|
|
16
|
-
"tags",
|
|
17
|
-
"Picard",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"@types/
|
|
30
|
-
"@types/
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"remark-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"@types/
|
|
55
|
-
"@types/
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"http-status-codes": "^1.
|
|
60
|
-
"json-stringify-safe": "^5.0.1",
|
|
61
|
-
"jsontoxml": "^1.0.1",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
"compile-
|
|
70
|
-
"compile
|
|
71
|
-
"
|
|
72
|
-
"lint-
|
|
73
|
-
"lint
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"send-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "musicbrainz-api",
|
|
3
|
+
"version": "0.7.2",
|
|
4
|
+
"description": "MusicBrainz API client for reading and submitting metadata",
|
|
5
|
+
"main": "lib/musicbrainz-api",
|
|
6
|
+
"types": "lib/musicbrainz-api",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Borewit",
|
|
9
|
+
"url": "https://github.com/Borewit"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"MusicBrainz",
|
|
13
|
+
"metadata",
|
|
14
|
+
"meta",
|
|
15
|
+
"tag",
|
|
16
|
+
"tags",
|
|
17
|
+
"Picard",
|
|
18
|
+
"json",
|
|
19
|
+
"xml",
|
|
20
|
+
"web",
|
|
21
|
+
"service",
|
|
22
|
+
"submit",
|
|
23
|
+
"metabrainz"
|
|
24
|
+
],
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"private": false,
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/chai": "^4.2.5",
|
|
29
|
+
"@types/mocha": "^9.0.0",
|
|
30
|
+
"@types/node": "^17.0.8",
|
|
31
|
+
"chai": "^4.2.0",
|
|
32
|
+
"coveralls": "^3.0.9",
|
|
33
|
+
"del-cli": "^4.0.1",
|
|
34
|
+
"mocha": "^9.0.1",
|
|
35
|
+
"nyc": "^15.0.0",
|
|
36
|
+
"remark-cli": "^10.0.1",
|
|
37
|
+
"remark-preset-lint-recommended": "^6.1.2",
|
|
38
|
+
"ts-node": "^10.0.0",
|
|
39
|
+
"tslint": "^6.1.1",
|
|
40
|
+
"typescript": "^4.0.2"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": "*"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "https://github.com/Borewit/musicbrainz-api.git"
|
|
48
|
+
},
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/Borewit/musicbrainz-api/issues"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@types/caseless": "^0.12.1",
|
|
54
|
+
"@types/request-promise-native": "^1.0.17",
|
|
55
|
+
"@types/uuid": "^8.3.0",
|
|
56
|
+
"caseless": "^0.12.0",
|
|
57
|
+
"debug": "^4.1.1",
|
|
58
|
+
"got": "^11.8.2",
|
|
59
|
+
"http-status-codes": "^2.1.4",
|
|
60
|
+
"json-stringify-safe": "^5.0.1",
|
|
61
|
+
"jsontoxml": "^1.0.1",
|
|
62
|
+
"source-map-support": "^0.5.16",
|
|
63
|
+
"tough-cookie": "^4.0.0",
|
|
64
|
+
"uuid": "^8.3.2"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"clean": "del-cli lib/** src/**/*.js src/**/*.js.map src/**/*.d.ts test/**/*.js test/**/*.js.map",
|
|
68
|
+
"compile-src": "tsc -p src",
|
|
69
|
+
"compile-test": "tsc -p test",
|
|
70
|
+
"compile": "npm run compile-src && npm run compile-test",
|
|
71
|
+
"lint-ts": "tslint 'src/**/*.ts' --exclude 'src/**/*.d.ts' 'test/**/*.ts' --exclude 'test/**/*.d.ts'",
|
|
72
|
+
"lint-md": "remark -u preset-lint-recommended .",
|
|
73
|
+
"lint": "npm run lint-md && npm run lint-ts",
|
|
74
|
+
"test": "mocha --require ts-node/register --require source-map-support/register --full-trace test/test-*.ts",
|
|
75
|
+
"build": "npm run clean && npm run compile",
|
|
76
|
+
"start": "npm-run-all compile lint cover-test",
|
|
77
|
+
"test-coverage": "nyc npm run test",
|
|
78
|
+
"send-coveralls": "nyc report --reporter=text-lcov | coveralls",
|
|
79
|
+
"send-codacy": "nyc report --reporter=text-lcov | codacy-coverage"
|
|
80
|
+
},
|
|
81
|
+
"nyc": {
|
|
82
|
+
"exclude": [
|
|
83
|
+
"lib/**",
|
|
84
|
+
"test/**/*.ts",
|
|
85
|
+
"src/**/*.js"
|
|
86
|
+
],
|
|
87
|
+
"extension": [
|
|
88
|
+
".ts"
|
|
89
|
+
],
|
|
90
|
+
"sourceMap": true,
|
|
91
|
+
"instrument": true,
|
|
92
|
+
"reporter": [
|
|
93
|
+
"lcov",
|
|
94
|
+
"text"
|
|
95
|
+
],
|
|
96
|
+
"report-dir": "coverage"
|
|
97
|
+
}
|
|
98
|
+
}
|