@finbheara/archive-client 0.34.0 → 0.36.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 +42 -0
- package/dist/chunks/{index-cwhyrcyx.js → index-c08q1b0d.js} +135 -5
- package/dist/cli.js +57 -5
- package/dist/index.js +1 -1
- package/dist/types/calendar.d.ts +65 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,6 +101,9 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
|
|
|
101
101
|
| `upcoming.fields`, `upcoming.entrants` | `upcoming.fields`, `upcoming.entrants` (285 and 290 carry the tables empty) | 291 |
|
|
102
102
|
| `upcoming.fields.instance` | the `feis_instance_id` `upcoming.fields` carries; absent, never refused, without it | 320 |
|
|
103
103
|
| `calendar` | `calendar.get`, `calendar.list` | 320 |
|
|
104
|
+
| `calendar.expected` | each calendar stage's `expected`; absent, never refused, without it | 320 |
|
|
105
|
+
| `calendar.next` | `calendar.next` | 320 |
|
|
106
|
+
| `calendar.missing` | `calendar.missing` | 320 |
|
|
104
107
|
| `tabs`, `panels` | `tabs.query`, `tabs.stream`; `panels.query` | 184 |
|
|
105
108
|
| `feis-panels` | `feisPanels.query` | 260 |
|
|
106
109
|
| `staff.adjudicators` | `staff.adjudicators` | 230 |
|
|
@@ -762,8 +765,18 @@ g.via; // "instance" | "formerly" | "feis_id" | "occurrence_id" | null
|
|
|
762
765
|
g.entries; // [{ feis_instance_id, feis_brand_id, tier, name_printed, date_lo, date_hi, date_source,
|
|
763
766
|
// occurrence_ids, feis_ids, stages: { announced, syllabus, entrants, run, results },
|
|
764
767
|
// terminal, carried, formerly }]
|
|
768
|
+
g.entries[0].stages.results.expected;
|
|
769
|
+
// { date, basis, n, platform } or null: "announced" | "brand" | "platform" |
|
|
770
|
+
// "pooled" | "roster-window" | "unmeasured"
|
|
765
771
|
const l = await rel.calendar.list({ stage: "entrants", state: "observed", from: "2026-11-01" });
|
|
766
772
|
// brand, tier, from, to, stage, state, terminal ("none": still ahead)
|
|
773
|
+
const n = await rel.calendar.next({ brand: "plf" });
|
|
774
|
+
// [{ feis_brand_id, year, run_expected, run_expected_basis, run_expected_n,
|
|
775
|
+
// from_instance_id, from_date }]: a series' next edition no listing names yet
|
|
776
|
+
const m = await rel.calendar.missing({ stage: "results", kind: "platform-host" });
|
|
777
|
+
// stage, platform, tier, kind; { items: [{ item_id, stage, feis_instance_id, kind,
|
|
778
|
+
// platform, expected, expected_basis, expected_n, grace_days, due, overdue_days,
|
|
779
|
+
// hosts: [{ source, feis_id, url }], ... }], deferred }
|
|
767
780
|
```
|
|
768
781
|
|
|
769
782
|
ONE ROW PER FEIS INSTANCE, on the id its results carry: a feis-series instance (`<brand>.<year>`),
|
|
@@ -780,6 +793,32 @@ order: only results after the run is a belief. `get` tries the instance id, then
|
|
|
780
793
|
a capture, then an occurrence id, and says which met (`via`). On a release without the table each
|
|
781
794
|
call refuses by name.
|
|
782
795
|
|
|
796
|
+
EXPECTED DAYS (`calendar.expected`): each stage carries `expected`, `{ date, basis, n, platform }`
|
|
797
|
+
or null. `announced` is the listing's own first day; `brand` the series' edition the year before
|
|
798
|
+
plus 364 days, `n` its held years; `platform` a platform's capture lag (the P90 of first results
|
|
799
|
+
capture less last day) or list lead (the median of first day less first list capture), measured
|
|
800
|
+
over the feiseanna run in the 180 days before the cut, `n` at least 10; `pooled` every platform's
|
|
801
|
+
results lags together, for a feis whose hosts have no capture form (`platform` `all`) and, NAMED, in
|
|
802
|
+
place of a platform measured on fewer than 10 (`platform` the host's); `roster-window` a majors event-year
|
|
803
|
+
no capture dates; `unmeasured` no day. A stage still ahead always carries one; an observed stage
|
|
804
|
+
carries the day its estimator gives it where one applies, so the misses can be read. The lags are
|
|
805
|
+
capture's own scrape cadence, re-measured every release. `next` lists each series with two or more
|
|
806
|
+
held years, the last the release's year or the one before, whose next edition is not on the
|
|
807
|
+
calendar: its year and expected first day. It is never an instance: an id is minted only once a
|
|
808
|
+
listing names the edition.
|
|
809
|
+
|
|
810
|
+
THE MISSING STAGES (`calendar.missing`): a `results` or `entrants` stage no capture has shown whose
|
|
811
|
+
expected day plus its platform's GRACE is before the release's day, the run inside the 365 days
|
|
812
|
+
before it. The grace is the platform's largest gap between two days it was captured on, over the
|
|
813
|
+
180 days before the release, at least 7 days: an item waits out the platform's slowest scrape
|
|
814
|
+
before it counts; a day on the pooled lag (basis `pooled`), or a platform with no gap of its own,
|
|
815
|
+
waits the pooled grace. A stage whose basis is `unmeasured` is never missing. An item is a calendar
|
|
816
|
+
instance, or a feis-index listing no instance holds (`feis_instance_id` null, `item_id` its first
|
|
817
|
+
occurrence id). `kind` is `platform-host` (a capture platform lists it, so a scrape of it should
|
|
818
|
+
bring it) or `listing-only` (only a calendar listing names it, no capture platform, and its results
|
|
819
|
+
may be published nowhere capture reads). A stage a capture's not-found record defers is not listed:
|
|
820
|
+
`deferred` counts those. A worklist, never an error.
|
|
821
|
+
|
|
783
822
|
## Teachers and adjudicators
|
|
784
823
|
|
|
785
824
|
```ts
|
|
@@ -958,6 +997,9 @@ is passed to the dancer resolver as asked (`rel.dancers`, above).
|
|
|
958
997
|
idq calendar [--release <spec>] <instance|feis id|occurrence id>
|
|
959
998
|
idq calendar [--brand <series>] [--tier <t>] [--from <date>] [--to <date>] [--stage <s>] [--state <s>]
|
|
960
999
|
[--terminal results|withdrawn|passed-no-results|none]
|
|
1000
|
+
idq calendar --next [--brand <series>]
|
|
1001
|
+
idq calendar --missing [--stage results|entrants] [--platform <p>] [--tier <t>]
|
|
1002
|
+
[--kind platform-host|listing-only]
|
|
961
1003
|
idq teacher [--release <spec>] <name|TD number>
|
|
962
1004
|
idq adjudicator [--release <spec>] <name|TD number>
|
|
963
1005
|
idq comp [--release <spec>] <feis> <code> [--year y] [--title t]
|
|
@@ -722,6 +722,53 @@ var FEATURES2 = [
|
|
|
722
722
|
since: 320,
|
|
723
723
|
calls: "calendar.get, calendar.list"
|
|
724
724
|
},
|
|
725
|
+
{
|
|
726
|
+
feature: "calendar.expected",
|
|
727
|
+
needs: ["announced", "syllabus", "entrants", "run", "results"].flatMap((st) => ["", "_basis", "_n", "_platform"].map((x) => `results:feis_calendar.${st}_expected${x}`)),
|
|
728
|
+
since: 320,
|
|
729
|
+
calls: "each calendar stage's `expected` (absent, never refused, without it)"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
feature: "calendar.next",
|
|
733
|
+
needs: [
|
|
734
|
+
"feis_brand_id",
|
|
735
|
+
"year",
|
|
736
|
+
"run_expected",
|
|
737
|
+
"run_expected_basis",
|
|
738
|
+
"run_expected_n",
|
|
739
|
+
"from_instance_id",
|
|
740
|
+
"from_date"
|
|
741
|
+
].map((c) => `results:feis_series_next.${c}`),
|
|
742
|
+
since: 320,
|
|
743
|
+
calls: "calendar.next"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
feature: "calendar.missing",
|
|
747
|
+
needs: [
|
|
748
|
+
"item_id",
|
|
749
|
+
"stage",
|
|
750
|
+
"feis_instance_id",
|
|
751
|
+
"feis_brand_id",
|
|
752
|
+
"tier",
|
|
753
|
+
"name_printed",
|
|
754
|
+
"date_lo",
|
|
755
|
+
"date_hi",
|
|
756
|
+
"occurrence_ids",
|
|
757
|
+
"feis_ids",
|
|
758
|
+
"kind",
|
|
759
|
+
"platform",
|
|
760
|
+
"expected",
|
|
761
|
+
"expected_basis",
|
|
762
|
+
"expected_n",
|
|
763
|
+
"grace_days",
|
|
764
|
+
"due",
|
|
765
|
+
"overdue_days",
|
|
766
|
+
"hosts",
|
|
767
|
+
"deferred"
|
|
768
|
+
].map((c) => `results:feis_calendar_missing.${c}`),
|
|
769
|
+
since: 320,
|
|
770
|
+
calls: "calendar.missing"
|
|
771
|
+
},
|
|
725
772
|
{
|
|
726
773
|
feature: "upcoming.entrants",
|
|
727
774
|
needs: [
|
|
@@ -3877,13 +3924,26 @@ var CALENDAR_TERMINALS2 = [
|
|
|
3877
3924
|
"passed-no-results"
|
|
3878
3925
|
];
|
|
3879
3926
|
var json = (s, empty) => typeof s === "string" && s !== "" ? JSON.parse(s) : empty;
|
|
3880
|
-
function
|
|
3927
|
+
function expectedOf(r, s) {
|
|
3928
|
+
const basis = r[`${s}_expected_basis`];
|
|
3929
|
+
if (basis === null || basis === undefined)
|
|
3930
|
+
return null;
|
|
3931
|
+
const n = r[`${s}_expected_n`];
|
|
3932
|
+
return {
|
|
3933
|
+
date: r[`${s}_expected`] ?? null,
|
|
3934
|
+
basis,
|
|
3935
|
+
n: n === null || n === undefined ? null : Number(n),
|
|
3936
|
+
platform: r[`${s}_expected_platform`] ?? null
|
|
3937
|
+
};
|
|
3938
|
+
}
|
|
3939
|
+
function entryOf2(r, expected) {
|
|
3881
3940
|
const stages = Object.fromEntries(CALENDAR_STAGES2.map((s) => [
|
|
3882
3941
|
s,
|
|
3883
3942
|
{
|
|
3884
3943
|
state: r[`${s}_state`],
|
|
3885
3944
|
date: r[`${s}_date`] ?? null,
|
|
3886
|
-
cite: r[`${s}_cite`] ?? null
|
|
3945
|
+
cite: r[`${s}_cite`] ?? null,
|
|
3946
|
+
...expected ? { expected: expectedOf(r, s) } : {}
|
|
3887
3947
|
}
|
|
3888
3948
|
]));
|
|
3889
3949
|
return {
|
|
@@ -3914,6 +3974,73 @@ class CalendarFinder2 {
|
|
|
3914
3974
|
await this.rel.require("calendar");
|
|
3915
3975
|
return this.rel.db("results");
|
|
3916
3976
|
}
|
|
3977
|
+
async expected() {
|
|
3978
|
+
return (await this.rel.capability("calendar.expected")).state === "full";
|
|
3979
|
+
}
|
|
3980
|
+
async next(q = {}) {
|
|
3981
|
+
await this.rel.fetch("results");
|
|
3982
|
+
await this.rel.require("calendar.next");
|
|
3983
|
+
const db = this.rel.db("results");
|
|
3984
|
+
const rows = q.brand === undefined ? db.query("SELECT * FROM feis_series_next ORDER BY run_expected, feis_brand_id").all() : db.query("SELECT * FROM feis_series_next WHERE feis_brand_id = ? ORDER BY run_expected").all(q.brand);
|
|
3985
|
+
return {
|
|
3986
|
+
tag: this.rel.tag,
|
|
3987
|
+
next: rows.map((r) => ({
|
|
3988
|
+
feis_brand_id: r.feis_brand_id,
|
|
3989
|
+
year: Number(r.year),
|
|
3990
|
+
run_expected: r.run_expected,
|
|
3991
|
+
run_expected_basis: "brand",
|
|
3992
|
+
run_expected_n: Number(r.run_expected_n),
|
|
3993
|
+
from_instance_id: r.from_instance_id,
|
|
3994
|
+
from_date: r.from_date
|
|
3995
|
+
}))
|
|
3996
|
+
};
|
|
3997
|
+
}
|
|
3998
|
+
async missing(q = {}) {
|
|
3999
|
+
await this.rel.fetch("results");
|
|
4000
|
+
await this.rel.require("calendar.missing");
|
|
4001
|
+
const db = this.rel.db("results");
|
|
4002
|
+
const where = [];
|
|
4003
|
+
const args = [];
|
|
4004
|
+
for (const [col, v] of [
|
|
4005
|
+
["stage", q.stage],
|
|
4006
|
+
["platform", q.platform],
|
|
4007
|
+
["tier", q.tier],
|
|
4008
|
+
["kind", q.kind]
|
|
4009
|
+
])
|
|
4010
|
+
if (v !== undefined) {
|
|
4011
|
+
where.push(`${col} = ?`);
|
|
4012
|
+
args.push(v);
|
|
4013
|
+
}
|
|
4014
|
+
const rows = db.query(`SELECT * FROM feis_calendar_missing${where.length === 0 ? "" : ` WHERE ${where.join(" AND ")}`}
|
|
4015
|
+
ORDER BY CASE stage WHEN 'results' THEN 0 ELSE 1 END,
|
|
4016
|
+
CASE kind WHEN 'platform-host' THEN 0 ELSE 1 END, platform, due, item_id`).all(...args);
|
|
4017
|
+
const live = rows.filter((r) => r.deferred === null || r.deferred === undefined);
|
|
4018
|
+
return {
|
|
4019
|
+
tag: this.rel.tag,
|
|
4020
|
+
items: live.map((r) => ({
|
|
4021
|
+
item_id: r.item_id,
|
|
4022
|
+
stage: r.stage,
|
|
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
|
|
4042
|
+
};
|
|
4043
|
+
}
|
|
3917
4044
|
async get(id) {
|
|
3918
4045
|
const db = await this.db();
|
|
3919
4046
|
const ways = [
|
|
@@ -3924,8 +4051,10 @@ class CalendarFinder2 {
|
|
|
3924
4051
|
];
|
|
3925
4052
|
for (const [via, where] of ways) {
|
|
3926
4053
|
const rows = db.query(`SELECT * FROM feis_calendar WHERE ${where} ORDER BY feis_instance_id`).all(id);
|
|
3927
|
-
if (rows.length > 0)
|
|
3928
|
-
|
|
4054
|
+
if (rows.length > 0) {
|
|
4055
|
+
const e = await this.expected();
|
|
4056
|
+
return { tag: this.rel.tag, asked: id, via, entries: rows.map((r) => entryOf2(r, e)) };
|
|
4057
|
+
}
|
|
3929
4058
|
}
|
|
3930
4059
|
return {
|
|
3931
4060
|
tag: this.rel.tag,
|
|
@@ -3967,7 +4096,8 @@ class CalendarFinder2 {
|
|
|
3967
4096
|
add("terminal = ?", q.terminal);
|
|
3968
4097
|
const sql = `SELECT * FROM feis_calendar${where.length > 0 ? ` WHERE ${where.join(" AND ")}` : ""} ORDER BY date_lo IS NULL, date_lo, feis_instance_id`;
|
|
3969
4098
|
const rows = db.query(sql).all(...args);
|
|
3970
|
-
|
|
4099
|
+
const e = await this.expected();
|
|
4100
|
+
return { tag: this.rel.tag, entries: rows.map((r) => entryOf2(r, e)) };
|
|
3971
4101
|
}
|
|
3972
4102
|
}
|
|
3973
4103
|
|
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-c08q1b0d.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]";
|
|
@@ -394,8 +394,19 @@ var VERBS = [
|
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
396
|
verb: "calendar",
|
|
397
|
-
value: [
|
|
398
|
-
|
|
397
|
+
value: [
|
|
398
|
+
"--release",
|
|
399
|
+
"--brand",
|
|
400
|
+
"--tier",
|
|
401
|
+
"--from",
|
|
402
|
+
"--to",
|
|
403
|
+
"--stage",
|
|
404
|
+
"--state",
|
|
405
|
+
"--terminal",
|
|
406
|
+
"--platform",
|
|
407
|
+
"--kind"
|
|
408
|
+
],
|
|
409
|
+
bool: ["--next", "--missing"],
|
|
399
410
|
usage: [
|
|
400
411
|
" calendar [--release <spec>] <instance|feis id|occurrence id>",
|
|
401
412
|
" one feis instance's stages: announced, syllabus, entrants,",
|
|
@@ -404,7 +415,16 @@ var VERBS = [
|
|
|
404
415
|
" calendar [--brand <series>] [--tier T1..T4] [--from <date>] [--to <date>]",
|
|
405
416
|
" [--stage announced|syllabus|entrants|run|results] [--state observed|pending|not-captured]",
|
|
406
417
|
" [--terminal results|withdrawn|passed-no-results|none]",
|
|
407
|
-
" the instances a query names, by first day"
|
|
418
|
+
" the instances a query names, by first day; each stage's",
|
|
419
|
+
" expected day with its basis and n where the release has them",
|
|
420
|
+
" calendar --next [--brand <series>]",
|
|
421
|
+
" each series' next edition no listing names yet: its year",
|
|
422
|
+
" and expected first day from the year before (basis brand)",
|
|
423
|
+
" calendar --missing [--stage results|entrants] [--platform <p>] [--tier T1..T4]",
|
|
424
|
+
" [--kind platform-host|listing-only]",
|
|
425
|
+
" the stages past their expected day plus the platform's",
|
|
426
|
+
" grace, the run in the last 365 days: hosts, urls, expected",
|
|
427
|
+
" day, grace and days overdue; the deferred counted apart"
|
|
408
428
|
]
|
|
409
429
|
},
|
|
410
430
|
{
|
|
@@ -523,6 +543,7 @@ function parseArgs(argv) {
|
|
|
523
543
|
return { positional, flags, bools };
|
|
524
544
|
}
|
|
525
545
|
var mb = (n) => `${(n / 1e6).toFixed(1)} MB`;
|
|
546
|
+
var expectedText = (e) => e === null || e === undefined ? "" : ` expected ${e.date ?? "-"} (${e.basis}${e.platform !== null ? ` ${e.platform}` : ""}${e.n !== null ? `, n ${e.n}` : ""})`;
|
|
526
547
|
function printPlan(p, say) {
|
|
527
548
|
for (const k of p.keep)
|
|
528
549
|
say(`keep ${k.tag} (${k.why})`);
|
|
@@ -1553,13 +1574,44 @@ async function main(argv, io = {}) {
|
|
|
1553
1574
|
const rel = await open(spec, { ...opts, assets: [] });
|
|
1554
1575
|
try {
|
|
1555
1576
|
const line = (e) => ` ${e.date_lo ?? "?"} ${e.feis_instance_id} ${e.tier} ${["announced", "syllabus", "entrants", "run", "results"].map((s) => `${s}:${e.stages[s].state === "observed" ? e.stages[s].date ?? "seen" : e.stages[s].state}`).join(" ")} [${e.terminal ?? "ahead"}]${e.name_printed !== null ? ` "${e.name_printed}"` : ""}`;
|
|
1577
|
+
if (p.bools.has("--missing")) {
|
|
1578
|
+
const stage = p.flags.get("--stage");
|
|
1579
|
+
const platform = p.flags.get("--platform");
|
|
1580
|
+
const tier = p.flags.get("--tier");
|
|
1581
|
+
const kind = p.flags.get("--kind");
|
|
1582
|
+
const a = await rel.calendar.missing({
|
|
1583
|
+
...stage !== undefined ? { stage } : {},
|
|
1584
|
+
...platform !== undefined ? { platform } : {},
|
|
1585
|
+
...tier !== undefined ? { tier } : {},
|
|
1586
|
+
...kind !== undefined ? { kind } : {}
|
|
1587
|
+
});
|
|
1588
|
+
out(a, () => {
|
|
1589
|
+
for (const m of a.items) {
|
|
1590
|
+
say(` ${m.due} ${m.item_id} ${m.stage} ${m.kind} ${m.platform} run ${m.date_lo ?? "?"} expected ${m.expected} (${m.expected_basis}, n ${m.expected_n ?? "-"}) + ${m.grace_days} grace ${m.overdue_days} days overdue${m.name_printed !== null ? ` "${m.name_printed}"` : ""}`);
|
|
1591
|
+
for (const h of m.hosts)
|
|
1592
|
+
say(` ${h.source} ${h.feis_id ?? "-"} ${h.url ?? "-"}`);
|
|
1593
|
+
}
|
|
1594
|
+
say(`${a.items.length} missing, ${a.deferred} deferred, in ${a.tag}`);
|
|
1595
|
+
});
|
|
1596
|
+
return a.items.length === 0 ? 1 : 0;
|
|
1597
|
+
}
|
|
1598
|
+
if (p.bools.has("--next")) {
|
|
1599
|
+
const brand = p.flags.get("--brand");
|
|
1600
|
+
const a = await rel.calendar.next(brand === undefined ? {} : { brand });
|
|
1601
|
+
out(a, () => {
|
|
1602
|
+
for (const n of a.next)
|
|
1603
|
+
say(` ${n.run_expected} ${n.feis_brand_id} ${n.year} brand n ${n.run_expected_n} from ${n.from_instance_id} (${n.from_date})`);
|
|
1604
|
+
say(`${a.next.length} next edition(s) in ${a.tag}`);
|
|
1605
|
+
});
|
|
1606
|
+
return a.next.length === 0 ? 1 : 0;
|
|
1607
|
+
}
|
|
1556
1608
|
if (rest.length > 0) {
|
|
1557
1609
|
const a = await rel.calendar.get(rest.join(" "));
|
|
1558
1610
|
out(a, () => {
|
|
1559
1611
|
for (const e of a.entries) {
|
|
1560
1612
|
say(line(e));
|
|
1561
1613
|
for (const s of ["announced", "syllabus", "entrants", "run", "results"])
|
|
1562
|
-
say(` ${s} ${e.stages[s].state} ${e.stages[s].date ?? "-"} ${e.stages[s].cite ?? "-"}${e.carried.includes(s) ? " (carried)" : ""}`);
|
|
1614
|
+
say(` ${s} ${e.stages[s].state} ${e.stages[s].date ?? "-"} ${e.stages[s].cite ?? "-"}${e.carried.includes(s) ? " (carried)" : ""}${expectedText(e.stages[s].expected)}`);
|
|
1563
1615
|
}
|
|
1564
1616
|
say(`${a.entries.length} instance(s) for "${a.asked}"${a.via !== null ? ` by ${a.via}` : ""}${a.why !== undefined ? ` (${a.why})` : ""} in ${a.tag}`);
|
|
1565
1617
|
});
|
package/dist/index.js
CHANGED
package/dist/types/calendar.d.ts
CHANGED
|
@@ -5,10 +5,18 @@ export type CalendarStageState = "observed" | "pending" | "not-captured";
|
|
|
5
5
|
export declare const CALENDAR_STAGE_STATES: readonly CalendarStageState[];
|
|
6
6
|
export type CalendarTerminal = "results" | "withdrawn" | "passed-no-results";
|
|
7
7
|
export declare const CALENDAR_TERMINALS: readonly CalendarTerminal[];
|
|
8
|
+
export type CalendarExpectedBasis = "announced" | "brand" | "platform" | "pooled" | "roster-window" | "unmeasured";
|
|
9
|
+
export interface CalendarExpected {
|
|
10
|
+
date: string | null;
|
|
11
|
+
basis: CalendarExpectedBasis;
|
|
12
|
+
n: number | null;
|
|
13
|
+
platform: string | null;
|
|
14
|
+
}
|
|
8
15
|
export interface CalendarStageValue {
|
|
9
16
|
state: CalendarStageState;
|
|
10
17
|
date: string | null;
|
|
11
18
|
cite: string | null;
|
|
19
|
+
expected?: CalendarExpected | null;
|
|
12
20
|
}
|
|
13
21
|
export interface CalendarEntry {
|
|
14
22
|
feis_instance_id: string;
|
|
@@ -38,6 +46,58 @@ export interface CalendarAnswer {
|
|
|
38
46
|
tag: string;
|
|
39
47
|
entries: CalendarEntry[];
|
|
40
48
|
}
|
|
49
|
+
export interface CalendarNext {
|
|
50
|
+
feis_brand_id: string;
|
|
51
|
+
year: number;
|
|
52
|
+
run_expected: string;
|
|
53
|
+
run_expected_basis: "brand";
|
|
54
|
+
run_expected_n: number;
|
|
55
|
+
from_instance_id: string;
|
|
56
|
+
from_date: string;
|
|
57
|
+
}
|
|
58
|
+
export interface CalendarNextAnswer {
|
|
59
|
+
tag: string;
|
|
60
|
+
next: CalendarNext[];
|
|
61
|
+
}
|
|
62
|
+
export type CalendarMissingStage = "results" | "entrants";
|
|
63
|
+
export type CalendarMissingKind = "platform-host" | "listing-only";
|
|
64
|
+
export interface CalendarMissingHost {
|
|
65
|
+
source: string;
|
|
66
|
+
feis_id: string | null;
|
|
67
|
+
url: string | null;
|
|
68
|
+
}
|
|
69
|
+
export interface CalendarMissing {
|
|
70
|
+
item_id: string;
|
|
71
|
+
stage: CalendarMissingStage;
|
|
72
|
+
feis_instance_id: string | null;
|
|
73
|
+
feis_brand_id: string | null;
|
|
74
|
+
tier: string;
|
|
75
|
+
name_printed: string | null;
|
|
76
|
+
date_lo: string | null;
|
|
77
|
+
date_hi: string | null;
|
|
78
|
+
occurrence_ids: string[];
|
|
79
|
+
feis_ids: string[];
|
|
80
|
+
kind: CalendarMissingKind;
|
|
81
|
+
platform: string;
|
|
82
|
+
expected: string;
|
|
83
|
+
expected_basis: CalendarExpectedBasis;
|
|
84
|
+
expected_n: number | null;
|
|
85
|
+
grace_days: number;
|
|
86
|
+
due: string;
|
|
87
|
+
overdue_days: number;
|
|
88
|
+
hosts: CalendarMissingHost[];
|
|
89
|
+
}
|
|
90
|
+
export interface CalendarMissingQuery {
|
|
91
|
+
stage?: CalendarMissingStage;
|
|
92
|
+
platform?: string;
|
|
93
|
+
tier?: string;
|
|
94
|
+
kind?: CalendarMissingKind;
|
|
95
|
+
}
|
|
96
|
+
export interface CalendarMissingAnswer {
|
|
97
|
+
tag: string;
|
|
98
|
+
items: CalendarMissing[];
|
|
99
|
+
deferred: number;
|
|
100
|
+
}
|
|
41
101
|
export interface CalendarGetAnswer {
|
|
42
102
|
tag: string;
|
|
43
103
|
asked: string;
|
|
@@ -49,6 +109,11 @@ export declare class CalendarFinder {
|
|
|
49
109
|
private readonly rel;
|
|
50
110
|
constructor(rel: Release);
|
|
51
111
|
private db;
|
|
112
|
+
private expected;
|
|
113
|
+
next(q?: {
|
|
114
|
+
brand?: string;
|
|
115
|
+
}): Promise<CalendarNextAnswer>;
|
|
116
|
+
missing(q?: CalendarMissingQuery): Promise<CalendarMissingAnswer>;
|
|
52
117
|
get(id: string): Promise<CalendarGetAnswer>;
|
|
53
118
|
list(q?: CalendarQuery): Promise<CalendarAnswer>;
|
|
54
119
|
}
|
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, 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 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.36.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",
|