music-routes-data 3.0.1 → 3.2.0
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/data/artist_track.json +4 -0
- package/data/artists.json +6 -0
- package/data/individual_artist.json +16 -0
- package/data/individual_track.json +20 -0
- package/data/individuals.json +21 -0
- package/data/releases.json +6 -0
- package/data/track_release.json +4 -0
- package/data/tracks.json +7 -1
- package/lib/Data/index.js +8 -2
- package/lib/cli/add.js +2 -2
- package/lib/cli/argv.js +3 -6
- package/package.json +4 -4
package/data/artist_track.json
CHANGED
|
@@ -54798,5 +54798,9 @@
|
|
|
54798
54798
|
{
|
|
54799
54799
|
"artist_id": "1770",
|
|
54800
54800
|
"track_id": "13481"
|
|
54801
|
+
},
|
|
54802
|
+
{
|
|
54803
|
+
"artist_id": "1771",
|
|
54804
|
+
"track_id": "13482"
|
|
54801
54805
|
}
|
|
54802
54806
|
]
|
package/data/artists.json
CHANGED
|
@@ -10448,5 +10448,11 @@
|
|
|
10448
10448
|
"names": [
|
|
10449
10449
|
"Joe Jackson"
|
|
10450
10450
|
]
|
|
10451
|
+
},
|
|
10452
|
+
{
|
|
10453
|
+
"_id": "1771",
|
|
10454
|
+
"names": [
|
|
10455
|
+
"Vulfpeck"
|
|
10456
|
+
]
|
|
10451
10457
|
}
|
|
10452
10458
|
]
|
|
@@ -19386,5 +19386,21 @@
|
|
|
19386
19386
|
{
|
|
19387
19387
|
"individual_id": "204",
|
|
19388
19388
|
"artist_id": "1770"
|
|
19389
|
+
},
|
|
19390
|
+
{
|
|
19391
|
+
"individual_id": "11069",
|
|
19392
|
+
"artist_id": "1771"
|
|
19393
|
+
},
|
|
19394
|
+
{
|
|
19395
|
+
"individual_id": "11070",
|
|
19396
|
+
"artist_id": "1771"
|
|
19397
|
+
},
|
|
19398
|
+
{
|
|
19399
|
+
"individual_id": "11071",
|
|
19400
|
+
"artist_id": "1771"
|
|
19401
|
+
},
|
|
19402
|
+
{
|
|
19403
|
+
"individual_id": "11072",
|
|
19404
|
+
"artist_id": "1771"
|
|
19389
19405
|
}
|
|
19390
19406
|
]
|
|
@@ -257382,5 +257382,25 @@
|
|
|
257382
257382
|
{
|
|
257383
257383
|
"track_id": "13481",
|
|
257384
257384
|
"individual_id": "6053"
|
|
257385
|
+
},
|
|
257386
|
+
{
|
|
257387
|
+
"track_id": "13482",
|
|
257388
|
+
"individual_id": "207"
|
|
257389
|
+
},
|
|
257390
|
+
{
|
|
257391
|
+
"track_id": "13482",
|
|
257392
|
+
"individual_id": "11069"
|
|
257393
|
+
},
|
|
257394
|
+
{
|
|
257395
|
+
"track_id": "13482",
|
|
257396
|
+
"individual_id": "11070"
|
|
257397
|
+
},
|
|
257398
|
+
{
|
|
257399
|
+
"track_id": "13482",
|
|
257400
|
+
"individual_id": "11071"
|
|
257401
|
+
},
|
|
257402
|
+
{
|
|
257403
|
+
"track_id": "13482",
|
|
257404
|
+
"individual_id": "11072"
|
|
257385
257405
|
}
|
|
257386
257406
|
]
|
package/data/individuals.json
CHANGED
|
@@ -63075,5 +63075,26 @@
|
|
|
63075
63075
|
"names": [
|
|
63076
63076
|
"\"Captain\" Kirk Douglas"
|
|
63077
63077
|
]
|
|
63078
|
+
},
|
|
63079
|
+
{
|
|
63080
|
+
"_id": "11069",
|
|
63081
|
+
"names": [
|
|
63082
|
+
"Jack Stratton"
|
|
63083
|
+
]
|
|
63084
|
+
}, {
|
|
63085
|
+
"_id": "11070",
|
|
63086
|
+
"names": [
|
|
63087
|
+
"Theo Katzman"
|
|
63088
|
+
]
|
|
63089
|
+
}, {
|
|
63090
|
+
"_id": "11071",
|
|
63091
|
+
"names": [
|
|
63092
|
+
"Joe Dart"
|
|
63093
|
+
]
|
|
63094
|
+
}, {
|
|
63095
|
+
"_id": "11072",
|
|
63096
|
+
"names": [
|
|
63097
|
+
"Woody Goss"
|
|
63098
|
+
]
|
|
63078
63099
|
}
|
|
63079
63100
|
]
|
package/data/releases.json
CHANGED
|
@@ -14771,5 +14771,11 @@
|
|
|
14771
14771
|
"names": [
|
|
14772
14772
|
"The Duke"
|
|
14773
14773
|
]
|
|
14774
|
+
},
|
|
14775
|
+
{
|
|
14776
|
+
"_id": "2487",
|
|
14777
|
+
"names": [
|
|
14778
|
+
"My Finish Line"
|
|
14779
|
+
]
|
|
14774
14780
|
}
|
|
14775
14781
|
]
|
package/data/track_release.json
CHANGED
|
@@ -54302,5 +54302,9 @@
|
|
|
54302
54302
|
{
|
|
54303
54303
|
"release_id": "2486",
|
|
54304
54304
|
"track_id": "13481"
|
|
54305
|
+
},
|
|
54306
|
+
{
|
|
54307
|
+
"release_id": "2487",
|
|
54308
|
+
"track_id": "13482"
|
|
54305
54309
|
}
|
|
54306
54310
|
]
|
package/data/tracks.json
CHANGED
|
@@ -80087,5 +80087,11 @@
|
|
|
80087
80087
|
"names": [
|
|
80088
80088
|
"I Ain't Got Nothin' But The Blues/Do Nothin' 'Til You Hear From Me"
|
|
80089
80089
|
]
|
|
80090
|
-
}
|
|
80090
|
+
},
|
|
80091
|
+
{
|
|
80092
|
+
"_id": "13482",
|
|
80093
|
+
"names": [
|
|
80094
|
+
"Captain Hook"
|
|
80095
|
+
]
|
|
80096
|
+
}
|
|
80091
80097
|
]
|
package/lib/Data/index.js
CHANGED
|
@@ -68,7 +68,13 @@ function Data (options) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
if (!entry._id) {
|
|
71
|
-
|
|
71
|
+
const lastIndex = data[collection].length - 1
|
|
72
|
+
if (lastIndex === -1) {
|
|
73
|
+
entry._id = '1'
|
|
74
|
+
} else {
|
|
75
|
+
const lastId = data[collection][lastIndex]._id
|
|
76
|
+
entry._id = String(Number(lastId) + 1)
|
|
77
|
+
}
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
if (typeof entry._id !== 'string') {
|
|
@@ -128,7 +134,7 @@ function Data (options) {
|
|
|
128
134
|
try {
|
|
129
135
|
collections.forEach(callback)
|
|
130
136
|
} catch (e) {
|
|
131
|
-
return makeReturnValue(this.StatusEnum.ERROR, e.message
|
|
137
|
+
return makeReturnValue(this.StatusEnum.ERROR, e.message)
|
|
132
138
|
}
|
|
133
139
|
return makeReturnValue(this.StatusEnum.OK, '')
|
|
134
140
|
}
|
package/lib/cli/add.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports = function (data, collection,
|
|
2
|
-
return data.create(collection, {
|
|
1
|
+
module.exports = function (data, collection, names) {
|
|
2
|
+
return data.create(collection, { names: [names] })
|
|
3
3
|
}
|
package/lib/cli/argv.js
CHANGED
|
@@ -12,8 +12,9 @@ module.exports = function (argv) {
|
|
|
12
12
|
let rv = {}
|
|
13
13
|
let inputRv
|
|
14
14
|
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const defaultDir = path.join(__dirname, '../../data')
|
|
16
|
+
const outputDir = argv.outputDir || argv.o || defaultDir
|
|
17
|
+
const inputDir = argv.inputDir || argv.i || defaultDir
|
|
17
18
|
|
|
18
19
|
const data = new Data()
|
|
19
20
|
|
|
@@ -21,8 +22,6 @@ module.exports = function (argv) {
|
|
|
21
22
|
if (rv.status === data.StatusEnum.OK) {
|
|
22
23
|
if (outputDir) {
|
|
23
24
|
data.write(outputDir)
|
|
24
|
-
} else {
|
|
25
|
-
that.error('No output directory specified. Your data will not be saved.\nUse -o to specify an output directory.')
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
}
|
|
@@ -43,8 +42,6 @@ module.exports = function (argv) {
|
|
|
43
42
|
if (inputRv.status === data.StatusEnum.ERROR) {
|
|
44
43
|
this.exit(1)
|
|
45
44
|
}
|
|
46
|
-
} else {
|
|
47
|
-
this.error('No input directory specified. Operating on empty data set.\nUse -i to specify a data directory.')
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
switch (action) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "music-routes-data",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "What musicians played on what tracks",
|
|
5
5
|
"homepage": "https://github.com/Trott/music-routes-data",
|
|
6
6
|
"files": [
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@semantic-release/changelog": "^6.0.2",
|
|
33
33
|
"@semantic-release/git": "^10.0.1",
|
|
34
|
-
"c8": "
|
|
35
|
-
"jasmine": "5.
|
|
36
|
-
"semantic-release": "^
|
|
34
|
+
"c8": "10.1",
|
|
35
|
+
"jasmine": "5.6",
|
|
36
|
+
"semantic-release": "^24.0.0",
|
|
37
37
|
"standard": "^17.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|