@finbheara/archive-client 0.36.0 → 0.37.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/README.md +5 -2
- package/dist/chunks/{index-c08q1b0d.js → index-hfpcedbh.js} +32 -23
- package/dist/cli.js +6 -3
- package/dist/index.js +1 -1
- package/dist/types/calendar.d.ts +4 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,6 +104,7 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
|
|
|
104
104
|
| `calendar.expected` | each calendar stage's `expected`; absent, never refused, without it | 320 |
|
|
105
105
|
| `calendar.next` | `calendar.next` | 320 |
|
|
106
106
|
| `calendar.missing` | `calendar.missing` | 320 |
|
|
107
|
+
| `calendar.filed` | the `filed` of `calendar.missing`; empty, never refused, without it | 320 |
|
|
107
108
|
| `tabs`, `panels` | `tabs.query`, `tabs.stream`; `panels.query` | 184 |
|
|
108
109
|
| `feis-panels` | `feisPanels.query` | 260 |
|
|
109
110
|
| `staff.adjudicators` | `staff.adjudicators` | 230 |
|
|
@@ -776,7 +777,7 @@ const n = await rel.calendar.next({ brand: "plf" });
|
|
|
776
777
|
const m = await rel.calendar.missing({ stage: "results", kind: "platform-host" });
|
|
777
778
|
// stage, platform, tier, kind; { items: [{ item_id, stage, feis_instance_id, kind,
|
|
778
779
|
// platform, expected, expected_basis, expected_n, grace_days, due, overdue_days,
|
|
779
|
-
// hosts: [{ source, feis_id, url }], ... }], deferred }
|
|
780
|
+
// hosts: [{ source, feis_id, url }], ... }], filed: [{ ..., filed }], deferred }
|
|
780
781
|
```
|
|
781
782
|
|
|
782
783
|
ONE ROW PER FEIS INSTANCE, on the id its results carry: a feis-series instance (`<brand>.<year>`),
|
|
@@ -817,7 +818,9 @@ instance, or a feis-index listing no instance holds (`feis_instance_id` null, `i
|
|
|
817
818
|
occurrence id). `kind` is `platform-host` (a capture platform lists it, so a scrape of it should
|
|
818
819
|
bring it) or `listing-only` (only a calendar listing names it, no capture platform, and its results
|
|
819
820
|
may be published nowhere capture reads). A stage a capture's not-found record defers is not listed:
|
|
820
|
-
`deferred` counts those. A
|
|
821
|
+
`deferred` counts those. A stage already in a filed capture ticket (`calendar.filed`, the publisher's
|
|
822
|
+
filed record) is not in `items` either: `filed` lists it with its ticket (`owner/repo#N`), and it is
|
|
823
|
+
never counted against the threshold a capture epic is drafted over. A worklist, never an error.
|
|
821
824
|
|
|
822
825
|
## Teachers and adjudicators
|
|
823
826
|
|
|
@@ -769,6 +769,12 @@ var FEATURES2 = [
|
|
|
769
769
|
since: 320,
|
|
770
770
|
calls: "calendar.missing"
|
|
771
771
|
},
|
|
772
|
+
{
|
|
773
|
+
feature: "calendar.filed",
|
|
774
|
+
needs: ["results:feis_calendar_missing.deferred_kind"],
|
|
775
|
+
since: 320,
|
|
776
|
+
calls: "calendar.missing's `filed` (empty, never refused, without it)"
|
|
777
|
+
},
|
|
772
778
|
{
|
|
773
779
|
feature: "upcoming.entrants",
|
|
774
780
|
needs: [
|
|
@@ -4014,31 +4020,34 @@ class CalendarFinder2 {
|
|
|
4014
4020
|
const rows = db.query(`SELECT * FROM feis_calendar_missing${where.length === 0 ? "" : ` WHERE ${where.join(" AND ")}`}
|
|
4015
4021
|
ORDER BY CASE stage WHEN 'results' THEN 0 ELSE 1 END,
|
|
4016
4022
|
CASE kind WHEN 'platform-host' THEN 0 ELSE 1 END, platform, due, item_id`).all(...args);
|
|
4017
|
-
const
|
|
4023
|
+
const isDeferred = (r) => r.deferred !== null && r.deferred !== undefined;
|
|
4024
|
+
const isFiled = (r) => isDeferred(r) && r.deferred_kind === "filed";
|
|
4025
|
+
const item = (r) => ({
|
|
4026
|
+
item_id: r.item_id,
|
|
4027
|
+
stage: r.stage,
|
|
4028
|
+
feis_instance_id: r.feis_instance_id ?? null,
|
|
4029
|
+
feis_brand_id: r.feis_brand_id ?? null,
|
|
4030
|
+
tier: r.tier,
|
|
4031
|
+
name_printed: r.name_printed ?? null,
|
|
4032
|
+
date_lo: r.date_lo ?? null,
|
|
4033
|
+
date_hi: r.date_hi ?? null,
|
|
4034
|
+
occurrence_ids: json(r.occurrence_ids, []),
|
|
4035
|
+
feis_ids: json(r.feis_ids, []),
|
|
4036
|
+
kind: r.kind,
|
|
4037
|
+
platform: r.platform,
|
|
4038
|
+
expected: r.expected,
|
|
4039
|
+
expected_basis: r.expected_basis,
|
|
4040
|
+
expected_n: r.expected_n === null || r.expected_n === undefined ? null : Number(r.expected_n),
|
|
4041
|
+
grace_days: Number(r.grace_days),
|
|
4042
|
+
due: r.due,
|
|
4043
|
+
overdue_days: Number(r.overdue_days),
|
|
4044
|
+
hosts: json(r.hosts, [])
|
|
4045
|
+
});
|
|
4018
4046
|
return {
|
|
4019
4047
|
tag: this.rel.tag,
|
|
4020
|
-
items:
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
feis_instance_id: r.feis_instance_id ?? null,
|
|
4024
|
-
feis_brand_id: r.feis_brand_id ?? null,
|
|
4025
|
-
tier: r.tier,
|
|
4026
|
-
name_printed: r.name_printed ?? null,
|
|
4027
|
-
date_lo: r.date_lo ?? null,
|
|
4028
|
-
date_hi: r.date_hi ?? null,
|
|
4029
|
-
occurrence_ids: json(r.occurrence_ids, []),
|
|
4030
|
-
feis_ids: json(r.feis_ids, []),
|
|
4031
|
-
kind: r.kind,
|
|
4032
|
-
platform: r.platform,
|
|
4033
|
-
expected: r.expected,
|
|
4034
|
-
expected_basis: r.expected_basis,
|
|
4035
|
-
expected_n: r.expected_n === null || r.expected_n === undefined ? null : Number(r.expected_n),
|
|
4036
|
-
grace_days: Number(r.grace_days),
|
|
4037
|
-
due: r.due,
|
|
4038
|
-
overdue_days: Number(r.overdue_days),
|
|
4039
|
-
hosts: json(r.hosts, [])
|
|
4040
|
-
})),
|
|
4041
|
-
deferred: rows.length - live.length
|
|
4048
|
+
items: rows.filter((r) => !isDeferred(r)).map(item),
|
|
4049
|
+
filed: rows.filter(isFiled).map((r) => ({ ...item(r), filed: r.deferred })),
|
|
4050
|
+
deferred: rows.filter((r) => isDeferred(r) && !isFiled(r)).length
|
|
4042
4051
|
};
|
|
4043
4052
|
}
|
|
4044
4053
|
async get(id) {
|
package/dist/cli.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
latestCheck2,
|
|
22
22
|
within,
|
|
23
23
|
staleWarning2
|
|
24
|
-
} from "./chunks/index-
|
|
24
|
+
} from "./chunks/index-hfpcedbh.js";
|
|
25
25
|
import"./chunks/index-hghdy980.js";
|
|
26
26
|
|
|
27
27
|
var USAGE_HEADER = "usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json] [--live]";
|
|
@@ -424,7 +424,8 @@ var VERBS = [
|
|
|
424
424
|
" [--kind platform-host|listing-only]",
|
|
425
425
|
" the stages past their expected day plus the platform's",
|
|
426
426
|
" grace, the run in the last 365 days: hosts, urls, expected",
|
|
427
|
-
" day, grace and days overdue; the
|
|
427
|
+
" day, grace and days overdue; the filed (a capture ticket",
|
|
428
|
+
" names them) and the deferred counted apart"
|
|
428
429
|
]
|
|
429
430
|
},
|
|
430
431
|
{
|
|
@@ -1591,7 +1592,9 @@ async function main(argv, io = {}) {
|
|
|
1591
1592
|
for (const h of m.hosts)
|
|
1592
1593
|
say(` ${h.source} ${h.feis_id ?? "-"} ${h.url ?? "-"}`);
|
|
1593
1594
|
}
|
|
1594
|
-
|
|
1595
|
+
for (const m of a.filed)
|
|
1596
|
+
say(` ${m.due} ${m.item_id} ${m.stage} ${m.kind} ${m.platform} run ${m.date_lo ?? "?"} FILED ${m.filed}${m.name_printed !== null ? ` "${m.name_printed}"` : ""}`);
|
|
1597
|
+
say(`${a.items.length} missing, ${a.filed.length} filed, ${a.deferred} deferred, in ${a.tag}`);
|
|
1595
1598
|
});
|
|
1596
1599
|
return a.items.length === 0 ? 1 : 0;
|
|
1597
1600
|
}
|
package/dist/index.js
CHANGED
package/dist/types/calendar.d.ts
CHANGED
|
@@ -93,9 +93,13 @@ export interface CalendarMissingQuery {
|
|
|
93
93
|
tier?: string;
|
|
94
94
|
kind?: CalendarMissingKind;
|
|
95
95
|
}
|
|
96
|
+
export interface CalendarFiled extends CalendarMissing {
|
|
97
|
+
filed: string;
|
|
98
|
+
}
|
|
96
99
|
export interface CalendarMissingAnswer {
|
|
97
100
|
tag: string;
|
|
98
101
|
items: CalendarMissing[];
|
|
102
|
+
filed: CalendarFiled[];
|
|
99
103
|
deferred: number;
|
|
100
104
|
}
|
|
101
105
|
export interface CalendarGetAnswer {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,5 +26,5 @@ export { type EntryRow, type StreamCompetition, type StreamQuery, type StreamRow
|
|
|
26
26
|
export { type FeisPanelSeat, FeisPanelFinder, PanelFinder, type PanelSeat, type RegisterRow, type TabAnswer, TabFinder, type TabQuery, type TabRow, type TabStreamQuery, } from "./tabs.js";
|
|
27
27
|
export { EventFinder, type EventYear, type EventYearQuery, type ResultRoster, type RosterMember, type RosterTeam, TeamFinder, type TeamResult, } from "./teams.js";
|
|
28
28
|
export { type EntrantCandidate, FIELD_STATES, type FieldComp, DEPARTURE_REASONS, type DepartureReason, type FieldState, type HeldOut, type UpcomingDeparture, type UpcomingDepartureAnswer, type UpcomingDepartureQuery, type UpcomingEntrant, type UpcomingEntrantAnswer, type UpcomingEntrantQuery, type UpcomingFeis, type UpcomingFeisAnswer, type UpcomingFeisQuery, type UpcomingFeisState, type UpcomingField, type UpcomingFieldAnswer, type UpcomingFieldQuery, UpcomingFinder, type UpcomingHost, } from "./upcoming.js";
|
|
29
|
-
export { CALENDAR_STAGES, CALENDAR_STAGE_STATES, CALENDAR_TERMINALS, type CalendarAnswer, type CalendarEntry, type CalendarExpected, type CalendarExpectedBasis, type CalendarMissing, type CalendarMissingAnswer, type CalendarMissingHost, type CalendarMissingKind, type CalendarMissingQuery, type CalendarMissingStage, type CalendarNext, type CalendarNextAnswer, CalendarFinder, type CalendarGetAnswer, type CalendarQuery, type CalendarStage, type CalendarStageState, type CalendarStageValue, type CalendarTerminal, } from "./calendar.js";
|
|
29
|
+
export { CALENDAR_STAGES, CALENDAR_STAGE_STATES, CALENDAR_TERMINALS, type CalendarAnswer, type CalendarEntry, type CalendarExpected, type CalendarExpectedBasis, type CalendarFiled, type CalendarMissing, type CalendarMissingAnswer, type CalendarMissingHost, type CalendarMissingKind, type CalendarMissingQuery, type CalendarMissingStage, type CalendarNext, type CalendarNextAnswer, CalendarFinder, type CalendarGetAnswer, type CalendarQuery, type CalendarStage, type CalendarStageState, type CalendarStageValue, type CalendarTerminal, } from "./calendar.js";
|
|
30
30
|
export { ARCHIVE_TAG, type ArchiveTag, type ReleaseSpec, compareTagsNewestFirst, cutOf, parseArchiveTag, parseReleaseSpec, pickTag, renderArchiveTag, } from "./tag.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finbheara/archive-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Open a versioned release of an Irish dance results archive: download, verify, decompress and cache it by tag, keep the cache, and resolve feises and schools against it",
|
|
5
5
|
"keywords": ["irish-dance", "results", "release", "cache", "sqlite"],
|
|
6
6
|
"license": "MIT",
|