fluncle 0.215.0 → 0.217.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/bin/fluncle.mjs +91 -3
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -610,7 +610,7 @@ function parseVersion(version) {
|
|
|
610
610
|
var currentVersion;
|
|
611
611
|
var init_version = __esm(() => {
|
|
612
612
|
init_output();
|
|
613
|
-
currentVersion = "0.
|
|
613
|
+
currentVersion = "0.217.0".trim() ? "0.217.0".trim() : "0.1.0";
|
|
614
614
|
});
|
|
615
615
|
|
|
616
616
|
// src/update-notifier.ts
|
|
@@ -2452,7 +2452,7 @@ function parseVersion2(version) {
|
|
|
2452
2452
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
2453
2453
|
var init_version2 = __esm(() => {
|
|
2454
2454
|
init_output();
|
|
2455
|
-
currentVersion2 = "0.
|
|
2455
|
+
currentVersion2 = "0.217.0".trim() ? "0.217.0".trim() : "0.1.0";
|
|
2456
2456
|
});
|
|
2457
2457
|
|
|
2458
2458
|
// ../../packages/registry/src/index.ts
|
|
@@ -4730,6 +4730,7 @@ __export(exports_admin_tracks, {
|
|
|
4730
4730
|
backfillLastfmCommand: () => backfillLastfmCommand,
|
|
4731
4731
|
backfillDiscogsFactsCommand: () => backfillDiscogsFactsCommand,
|
|
4732
4732
|
backfillDiscogsCommand: () => backfillDiscogsCommand,
|
|
4733
|
+
backfillDeezerCommand: () => backfillDeezerCommand,
|
|
4733
4734
|
backfillBeatportCommand: () => backfillBeatportCommand,
|
|
4734
4735
|
backfillArtistEdgesCommand: () => backfillArtistEdgesCommand,
|
|
4735
4736
|
backfillArtistCreditsCommand: () => backfillArtistCreditsCommand,
|
|
@@ -4918,6 +4919,10 @@ async function backfillDiscogsFactsCommand(limit, dryRun) {
|
|
|
4918
4919
|
const params = new URLSearchParams({ dryRun: String(dryRun), limit: String(limit) });
|
|
4919
4920
|
return adminApiPost(`/api/v1/admin/backfill/discogs-facts?${params.toString()}`);
|
|
4920
4921
|
}
|
|
4922
|
+
async function backfillDeezerCommand(limit, dryRun) {
|
|
4923
|
+
const params = new URLSearchParams({ dryRun: String(dryRun), limit: String(limit) });
|
|
4924
|
+
return adminApiPost(`/api/v1/admin/backfill/deezer?${params.toString()}`);
|
|
4925
|
+
}
|
|
4921
4926
|
async function backfillBeatportCommand(limit, dryRun, cursor) {
|
|
4922
4927
|
const params = new URLSearchParams({ dryRun: String(dryRun), limit: String(limit) });
|
|
4923
4928
|
if (cursor) {
|
|
@@ -10507,6 +10512,10 @@ JSON field reference:
|
|
|
10507
10512
|
const { backfillBeatportCommand: backfillBeatportCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
10508
10513
|
await runBackfillBeatport(options, backfillBeatportCommand2);
|
|
10509
10514
|
});
|
|
10515
|
+
backfill.command("deezer").description("Resolve missing Deezer track ids for certified + catalogue rows (exact ISRC)").option("--dry-run", "Report the eligible set without resolving or writing", false).option("--limit <limit>", "Max rows to resolve", "50").option("--json", "Print JSON", false).action(async (options) => {
|
|
10516
|
+
const { backfillDeezerCommand: backfillDeezerCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
10517
|
+
await runBackfillDeezer(options, backfillDeezerCommand2);
|
|
10518
|
+
});
|
|
10510
10519
|
backfill.command("artists").description("Back-fill the artist entity (artists + track_artists) for existing findings").option("--dry-run", "Report which findings would be upserted without touching the DB", false).option("--limit <limit>", "Max findings to process", "50").option("--json", "Print JSON", false).action(async (options) => {
|
|
10511
10520
|
const { backfillArtistsCommand: backfillArtistsCommand2 } = await Promise.resolve().then(() => (init_admin_artists(), exports_admin_artists));
|
|
10512
10521
|
await runBackfillArtists(options, backfillArtistsCommand2);
|
|
@@ -11172,6 +11181,9 @@ async function runBackfillBeatport(options, backfillBeatportCommand2) {
|
|
|
11172
11181
|
const unresolved = [];
|
|
11173
11182
|
const failed = [];
|
|
11174
11183
|
const skipped = [];
|
|
11184
|
+
const catalogueResolved = [];
|
|
11185
|
+
const catalogueUnresolved = [];
|
|
11186
|
+
const catalogueFailed = [];
|
|
11175
11187
|
let cursor;
|
|
11176
11188
|
let dryRun = options.dryRun;
|
|
11177
11189
|
let configured = true;
|
|
@@ -11184,6 +11196,9 @@ async function runBackfillBeatport(options, backfillBeatportCommand2) {
|
|
|
11184
11196
|
unresolved.push(...result.unresolved);
|
|
11185
11197
|
failed.push(...result.failed);
|
|
11186
11198
|
skipped.push(...result.skipped);
|
|
11199
|
+
catalogueResolved.push(...result.catalogueResolved);
|
|
11200
|
+
catalogueUnresolved.push(...result.catalogueUnresolved);
|
|
11201
|
+
catalogueFailed.push(...result.catalogueFailed);
|
|
11187
11202
|
if (!options.json) {
|
|
11188
11203
|
const verb2 = result.dryRun ? "would resolve" : "resolved";
|
|
11189
11204
|
console.log(` \u2026${verb2} ${result.resolvedCount}; ${result.unresolvedCount} unresolved; ${result.failedCount} failed; ${result.skippedCount} skipped`);
|
|
@@ -11198,6 +11213,12 @@ async function runBackfillBeatport(options, backfillBeatportCommand2) {
|
|
|
11198
11213
|
}
|
|
11199
11214
|
if (options.json) {
|
|
11200
11215
|
printSweepJson({
|
|
11216
|
+
catalogueFailed,
|
|
11217
|
+
catalogueFailedCount: catalogueFailed.length,
|
|
11218
|
+
catalogueResolved,
|
|
11219
|
+
catalogueResolvedCount: catalogueResolved.length,
|
|
11220
|
+
catalogueUnresolved,
|
|
11221
|
+
catalogueUnresolvedCount: catalogueUnresolved.length,
|
|
11201
11222
|
configured,
|
|
11202
11223
|
dryRun,
|
|
11203
11224
|
failed,
|
|
@@ -11207,7 +11228,7 @@ async function runBackfillBeatport(options, backfillBeatportCommand2) {
|
|
|
11207
11228
|
skippedCount: skipped.length,
|
|
11208
11229
|
unresolved,
|
|
11209
11230
|
unresolvedCount: unresolved.length
|
|
11210
|
-
}, failed.length);
|
|
11231
|
+
}, failed.length + catalogueFailed.length);
|
|
11211
11232
|
return;
|
|
11212
11233
|
}
|
|
11213
11234
|
if (!configured) {
|
|
@@ -11216,12 +11237,76 @@ async function runBackfillBeatport(options, backfillBeatportCommand2) {
|
|
|
11216
11237
|
}
|
|
11217
11238
|
const verb = dryRun ? "Would resolve" : "Resolved";
|
|
11218
11239
|
console.log(`${verb} ${resolved.length} Beatport URL(s); ${unresolved.length} unresolved; ${failed.length} failed; ${skipped.length} skipped.`);
|
|
11240
|
+
console.log(` Catalogue tier \u2014 ${catalogueResolved.length} resolved; ${catalogueUnresolved.length} unresolved; ${catalogueFailed.length} failed.`);
|
|
11219
11241
|
for (const item of resolved) {
|
|
11220
11242
|
console.log(` ${item.logId}: ${item.url}`);
|
|
11221
11243
|
}
|
|
11244
|
+
for (const item of catalogueResolved) {
|
|
11245
|
+
console.log(` ${item.trackId}: ${item.url}`);
|
|
11246
|
+
}
|
|
11222
11247
|
for (const item of failed) {
|
|
11223
11248
|
console.log(` ${item.logId}: ${item.error}`);
|
|
11224
11249
|
}
|
|
11250
|
+
for (const item of catalogueFailed) {
|
|
11251
|
+
console.log(` ${item.trackId}: ${item.error}`);
|
|
11252
|
+
}
|
|
11253
|
+
if (failed.length + catalogueFailed.length > 0) {
|
|
11254
|
+
process.exitCode = 1;
|
|
11255
|
+
}
|
|
11256
|
+
}
|
|
11257
|
+
async function runBackfillDeezer(options, backfillDeezerCommand2) {
|
|
11258
|
+
const limit = parseListLimit(options.limit);
|
|
11259
|
+
const resolved = [];
|
|
11260
|
+
const unresolved = [];
|
|
11261
|
+
const unvouchable = [];
|
|
11262
|
+
const failed = [];
|
|
11263
|
+
let dryRun = options.dryRun;
|
|
11264
|
+
let throttled = false;
|
|
11265
|
+
while (resolved.length + unresolved.length + unvouchable.length + failed.length < limit) {
|
|
11266
|
+
const handled = resolved.length + unresolved.length + unvouchable.length + failed.length;
|
|
11267
|
+
const result = await backfillDeezerCommand2(limit - handled, options.dryRun);
|
|
11268
|
+
dryRun = result.dryRun;
|
|
11269
|
+
resolved.push(...result.resolved);
|
|
11270
|
+
unresolved.push(...result.unresolved);
|
|
11271
|
+
unvouchable.push(...result.unvouchable);
|
|
11272
|
+
failed.push(...result.failed);
|
|
11273
|
+
if (!options.json) {
|
|
11274
|
+
const verb2 = result.dryRun ? "would resolve" : "resolved";
|
|
11275
|
+
console.log(` \u2026${verb2} ${result.resolvedCount}; ${result.unresolvedCount} not on Deezer; ${result.unvouchableCount} unvouchable; ${result.failedCount} failed`);
|
|
11276
|
+
}
|
|
11277
|
+
if (result.rateLimited) {
|
|
11278
|
+
throttled = true;
|
|
11279
|
+
break;
|
|
11280
|
+
}
|
|
11281
|
+
if (result.resolvedCount === 0 && result.unresolvedCount === 0 && result.unvouchableCount === 0 && result.failedCount === 0) {
|
|
11282
|
+
break;
|
|
11283
|
+
}
|
|
11284
|
+
}
|
|
11285
|
+
if (options.json) {
|
|
11286
|
+
printSweepJson({
|
|
11287
|
+
dryRun,
|
|
11288
|
+
failed,
|
|
11289
|
+
rateLimited: throttled,
|
|
11290
|
+
resolved,
|
|
11291
|
+
resolvedCount: resolved.length,
|
|
11292
|
+
unresolved,
|
|
11293
|
+
unresolvedCount: unresolved.length,
|
|
11294
|
+
unvouchable,
|
|
11295
|
+
unvouchableCount: unvouchable.length
|
|
11296
|
+
}, failed.length);
|
|
11297
|
+
return;
|
|
11298
|
+
}
|
|
11299
|
+
const verb = dryRun ? "Would resolve" : "Resolved";
|
|
11300
|
+
console.log(`${verb} ${resolved.length} Deezer id(s); ${unresolved.length} not on Deezer; ${unvouchable.length} unvouchable; ${failed.length} failed.`);
|
|
11301
|
+
if (throttled) {
|
|
11302
|
+
console.log("Deezer answered its quota limit \u2014 the pass stopped and recorded nothing.");
|
|
11303
|
+
}
|
|
11304
|
+
for (const item of resolved) {
|
|
11305
|
+
console.log(` ${item.trackId}: ${item.url}`);
|
|
11306
|
+
}
|
|
11307
|
+
for (const item of failed) {
|
|
11308
|
+
console.log(` ${item.trackId}: ${item.error}`);
|
|
11309
|
+
}
|
|
11225
11310
|
if (failed.length > 0) {
|
|
11226
11311
|
process.exitCode = 1;
|
|
11227
11312
|
}
|
|
@@ -11690,6 +11775,7 @@ async function runBackfillArtistEdges(options, backfillArtistEdgesCommand2) {
|
|
|
11690
11775
|
let cursor;
|
|
11691
11776
|
let dryRun = options.dryRun;
|
|
11692
11777
|
let edgesWritten = 0;
|
|
11778
|
+
let queueDepth = 0;
|
|
11693
11779
|
let scanned = 0;
|
|
11694
11780
|
let unmatchedNames = 0;
|
|
11695
11781
|
while (scanned < limit) {
|
|
@@ -11702,6 +11788,7 @@ async function runBackfillArtistEdges(options, backfillArtistEdgesCommand2) {
|
|
|
11702
11788
|
fullyMatched.push(...result.fullyMatched);
|
|
11703
11789
|
partiallyMatched.push(...result.partiallyMatched);
|
|
11704
11790
|
zeroMatched.push(...result.zeroMatched);
|
|
11791
|
+
queueDepth = result.queueDepth;
|
|
11705
11792
|
if (!options.json) {
|
|
11706
11793
|
const verb2 = result.dryRun ? "would write" : "wrote";
|
|
11707
11794
|
console.log(` \u2026visited ${result.scanned}; ${verb2} ${result.edgesWritten} edge(s); ${result.fullyMatchedCount} full, ${result.partiallyMatchedCount} partial, ${result.zeroMatchedCount} zero; ${result.unmatchedNames} name(s) unmatched`);
|
|
@@ -11720,6 +11807,7 @@ async function runBackfillArtistEdges(options, backfillArtistEdgesCommand2) {
|
|
|
11720
11807
|
ok: true,
|
|
11721
11808
|
partiallyMatched,
|
|
11722
11809
|
partiallyMatchedCount: partiallyMatched.length,
|
|
11810
|
+
queueDepth,
|
|
11723
11811
|
scanned,
|
|
11724
11812
|
unmatchedNames,
|
|
11725
11813
|
zeroMatched,
|
package/package.json
CHANGED