@finbheara/archive-client 0.51.0 → 0.52.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 +10 -4
- package/dist/chunks/{index-kbg0a5pp.js → index-csh5d5m4.js} +17 -7
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/types/calendar.d.ts +1 -1
- package/dist/types/teams.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,7 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
|
|
|
107
107
|
| `teams.fields` | the fields `teams.results` (`age`, `gender`, `printed_status`) and `teams.rosters` (`dance`, `school_printed_as_of`, a member's `gender`) carry; absent, never refused, without it | 266 |
|
|
108
108
|
| `teams.recall` | the `competitors_printed` and `recalled_only` a row of `teams.results` carries; absent, never refused, without it | 350 |
|
|
109
109
|
| `events` | `events.years` | 260 |
|
|
110
|
+
| `events.published` | the `published` (`results`, or `attended`: held, its dancers named in `name-school-listings.jsonl`, no place published) and `listed` (those lines) an event-year of `events.years` carries; absent, never refused, without it | 350 |
|
|
110
111
|
| `upcoming.feises` | `upcoming.feises`, and the `next` of `feises.series` (null with the reason without it) | 285 |
|
|
111
112
|
| `upcoming.fields`, `upcoming.entrants` | `upcoming.fields`, `upcoming.entrants` (285 and 290 carry the tables empty) | 291 |
|
|
112
113
|
| `upcoming.fields.instance` | the `feis_instance_id` `upcoming.fields` carries; absent, never refused, without it | 320 |
|
|
@@ -753,7 +754,8 @@ t.teams; // [{ team, kind, event, year, comp_no, title, team_index, seq, sch
|
|
|
753
754
|
const j = await rel.teams.resultRosters({ event: "<event>", year: 2024 });
|
|
754
755
|
j.joins; // [{ team, result_address, join_kind, via_split, roster_index, result_letter, ... }]
|
|
755
756
|
const e = await rel.events.years({ event: "<event>" });
|
|
756
|
-
e.years; // [{ event, year, date_lo, date_hi, resolution, source, date_printed, place, place_printed
|
|
757
|
+
e.years; // [{ event, year, date_lo, date_hi, resolution, source, date_printed, place, place_printed,
|
|
758
|
+
// published, listed }]
|
|
757
759
|
```
|
|
758
760
|
|
|
759
761
|
A query names an event (case-blind), a year, both, or neither (every row). Everything comes from
|
|
@@ -764,7 +766,10 @@ roster team met the results (`exact`, `card`, `branch`) or why it did not (`no-r
|
|
|
764
766
|
`no-school`, `no-roster`, `multi-team-unjoined`), and `result_address` is null where none joined.
|
|
765
767
|
An event-year's dates are a window (`date_lo`, `date_hi`) with how fine it is (`resolution`:
|
|
766
768
|
`day`, `month`, `calendar`) and what it is read from (`source`), and `place` is a place-tree node
|
|
767
|
-
where the release knows one.
|
|
769
|
+
where the release knows one. `published` is `results` where the event-year publishes result rows
|
|
770
|
+
and `attended` where it was held and only a listing page (a recall dump) names its dancers: no
|
|
771
|
+
competition or place is published, `listed` counts the event-year's lines of
|
|
772
|
+
`name-school-listings.jsonl`, and its calendar row reads terminal `attended`. A team result's `age` and `gender` are the competition's band and sex
|
|
768
773
|
as the release reads them, `printed_status` the row's printed status cell verbatim. Its
|
|
769
774
|
`competitors` is the field: the printed count, except on a sheet that printed the recalled teams
|
|
770
775
|
only (`recalled_only`), where it is the entries the event-year's programme lists, never fewer than
|
|
@@ -878,7 +883,8 @@ release holds captures of that kind for the instance's platform, so a later one
|
|
|
878
883
|
`not-captured` (it holds none). A day first observed never moves later from one release to the
|
|
879
884
|
next: a stage an earlier release observed keeps its day, named in `carried` (`["row"]` for a row
|
|
880
885
|
the cut no longer names, kept whole), and a retired id is listed in `formerly`. `terminal` is
|
|
881
|
-
`
|
|
886
|
+
`attended` (a majors event-year held and published with no results, only a listing naming its
|
|
887
|
+
dancers: its `results` stage is `not-captured`), `results`, `withdrawn` (every field withdrawn), `passed-no-results` (its first day is before the
|
|
882
888
|
cut's day), or null for a feis still ahead. Stage dates follow capture timing, not the feis's own
|
|
883
889
|
order: only results after the run is a belief. `get` tries the instance id, then `formerly`, then
|
|
884
890
|
a capture, then an occurrence id, and says which met (`via`). On a release without the table each
|
|
@@ -1092,7 +1098,7 @@ Every verb takes `--cache <dir>`, `--repo <owner/name>`, `--json`, `--live` and
|
|
|
1092
1098
|
idq upcoming --feises [--state upcoming|no-results] [--brand <series>] [--from <date>] [--to <date>]
|
|
1093
1099
|
idq calendar [--release <spec>] <instance|feis id|occurrence id>
|
|
1094
1100
|
idq calendar [--brand <series>] [--tier <t>] [--from <date>] [--to <date>] [--stage <s>] [--state <s>]
|
|
1095
|
-
[--terminal results|withdrawn|passed-no-results|none]
|
|
1101
|
+
[--terminal attended|results|withdrawn|passed-no-results|none]
|
|
1096
1102
|
idq calendar --next [--brand <series>]
|
|
1097
1103
|
idq calendar --missing [--stage results|entrants] [--platform <p>] [--tier <t>]
|
|
1098
1104
|
[--kind platform-host|listing-only]
|
|
@@ -783,6 +783,12 @@ var FEATURES2 = [
|
|
|
783
783
|
since: 260,
|
|
784
784
|
calls: "events.years (the events index)"
|
|
785
785
|
},
|
|
786
|
+
{
|
|
787
|
+
feature: "events.published",
|
|
788
|
+
needs: ["table:event_years.published", "table:event_years.listed"],
|
|
789
|
+
since: 350,
|
|
790
|
+
calls: "the `published` (`results`, or `attended`: held, its dancers named in name-school-listings.jsonl, no place published) and `listed` an event-year of events.years carries: absent, never refused, on a release without them"
|
|
791
|
+
},
|
|
786
792
|
{
|
|
787
793
|
feature: "upcoming.feises",
|
|
788
794
|
needs: [
|
|
@@ -3865,23 +3871,23 @@ var teamsIndex = {
|
|
|
3865
3871
|
};
|
|
3866
3872
|
var EVENTS_SCHEMA = `CREATE TABLE event_year(event TEXT NOT NULL, year INTEGER NOT NULL,
|
|
3867
3873
|
date_lo TEXT, date_hi TEXT, resolution TEXT, source TEXT, date_printed TEXT, place TEXT,
|
|
3868
|
-
place_printed TEXT, PRIMARY KEY(event, year))`;
|
|
3874
|
+
place_printed TEXT, published TEXT, listed INTEGER, PRIMARY KEY(event, year))`;
|
|
3869
3875
|
var eventsIndex = {
|
|
3870
3876
|
name: "events",
|
|
3871
|
-
version: "
|
|
3877
|
+
version: "2",
|
|
3872
3878
|
inputs: [tableAsset("event_years")],
|
|
3873
3879
|
says: "every event-year: its dates (and how fine they are) and its place",
|
|
3874
3880
|
load: (rel) => readTables(rel, ["event_years"]),
|
|
3875
3881
|
build(_rel, out, loaded) {
|
|
3876
3882
|
const rows = loaded.event_years ?? [];
|
|
3877
3883
|
out.run(EVENTS_SCHEMA);
|
|
3878
|
-
const put = out.prepare("INSERT OR IGNORE INTO event_year VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
|
3884
|
+
const put = out.prepare("INSERT OR IGNORE INTO event_year VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
|
3879
3885
|
for (const r of rows) {
|
|
3880
3886
|
const event = str2(r.event);
|
|
3881
3887
|
const year = num2(r.year);
|
|
3882
3888
|
if (event === null || year === null)
|
|
3883
3889
|
continue;
|
|
3884
|
-
put.run(event, year, str2(r.date_lo), str2(r.date_hi), str2(r.resolution), str2(r.source), JSON.stringify(strs(r.date_printed)), str2(r.place), JSON.stringify(strs(r.place_printed)));
|
|
3890
|
+
put.run(event, year, str2(r.date_lo), str2(r.date_hi), str2(r.resolution), str2(r.source), JSON.stringify(strs(r.date_printed)), str2(r.place), JSON.stringify(strs(r.place_printed)), str2(r.published), num2(r.listed));
|
|
3885
3891
|
}
|
|
3886
3892
|
out.run("CREATE INDEX event_year_event ON event_year(event COLLATE NOCASE)");
|
|
3887
3893
|
}
|
|
@@ -3980,15 +3986,18 @@ class EventFinder2 {
|
|
|
3980
3986
|
async years(q = {}) {
|
|
3981
3987
|
const db = await this.rel.indexDb("events");
|
|
3982
3988
|
const w = whereOf(q);
|
|
3983
|
-
const rows = db.query(`SELECT event, year, date_lo, date_hi, resolution, source, date_printed, place, place_printed
|
|
3989
|
+
const rows = db.query(`SELECT event, year, date_lo, date_hi, resolution, source, date_printed, place, place_printed,
|
|
3990
|
+
published, listed
|
|
3984
3991
|
FROM event_year${w.sql} ORDER BY year, event`).all(...w.args);
|
|
3985
3992
|
return {
|
|
3986
3993
|
tag: this.rel.tag,
|
|
3987
3994
|
asked: q,
|
|
3988
|
-
years: rows.map((r) => ({
|
|
3995
|
+
years: rows.map(({ published, listed, ...r }) => ({
|
|
3989
3996
|
...r,
|
|
3990
3997
|
date_printed: JSON.parse(r.date_printed),
|
|
3991
|
-
place_printed: JSON.parse(r.place_printed)
|
|
3998
|
+
place_printed: JSON.parse(r.place_printed),
|
|
3999
|
+
...published === "results" || published === "attended" ? { published } : {},
|
|
4000
|
+
...listed === null ? {} : { listed }
|
|
3992
4001
|
}))
|
|
3993
4002
|
};
|
|
3994
4003
|
}
|
|
@@ -4188,6 +4197,7 @@ var CALENDAR_STAGE_STATES2 = [
|
|
|
4188
4197
|
"not-captured"
|
|
4189
4198
|
];
|
|
4190
4199
|
var CALENDAR_TERMINALS2 = [
|
|
4200
|
+
"attended",
|
|
4191
4201
|
"results",
|
|
4192
4202
|
"withdrawn",
|
|
4193
4203
|
"passed-no-results"
|
package/dist/cli.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
staleWarning2,
|
|
24
24
|
progressMode2,
|
|
25
25
|
progressRenderer2
|
|
26
|
-
} from "./chunks/index-
|
|
26
|
+
} from "./chunks/index-csh5d5m4.js";
|
|
27
27
|
import"./chunks/index-hghdy980.js";
|
|
28
28
|
|
|
29
29
|
var USAGE_HEADER = "usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json] [--live] [--progress tty|plain|none]";
|
|
@@ -422,7 +422,7 @@ var VERBS = [
|
|
|
422
422
|
" the day first observed and the capture that observed it",
|
|
423
423
|
" calendar [--brand <series>] [--tier T1..T4] [--from <date>] [--to <date>]",
|
|
424
424
|
" [--stage announced|syllabus|entrants|run|results] [--state observed|pending|not-captured]",
|
|
425
|
-
" [--terminal results|withdrawn|passed-no-results|none]",
|
|
425
|
+
" [--terminal attended|results|withdrawn|passed-no-results|none]",
|
|
426
426
|
" the instances a query names, by first day; each stage's",
|
|
427
427
|
" expected day with its basis and n where the release has them",
|
|
428
428
|
" calendar --next [--brand <series>]",
|
package/dist/index.js
CHANGED
package/dist/types/calendar.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type CalendarStage = "announced" | "syllabus" | "entrants" | "run" | "res
|
|
|
3
3
|
export declare const CALENDAR_STAGES: readonly CalendarStage[];
|
|
4
4
|
export type CalendarStageState = "observed" | "pending" | "not-captured";
|
|
5
5
|
export declare const CALENDAR_STAGE_STATES: readonly CalendarStageState[];
|
|
6
|
-
export type CalendarTerminal = "results" | "withdrawn" | "passed-no-results";
|
|
6
|
+
export type CalendarTerminal = "attended" | "results" | "withdrawn" | "passed-no-results";
|
|
7
7
|
export declare const CALENDAR_TERMINALS: readonly CalendarTerminal[];
|
|
8
8
|
export type CalendarExpectedBasis = "announced" | "brand" | "platform" | "pooled" | "roster-window" | "unmeasured";
|
|
9
9
|
export interface CalendarExpected {
|
package/dist/types/teams.d.ts
CHANGED
|
@@ -79,6 +79,8 @@ export interface EventYear {
|
|
|
79
79
|
date_printed: string[];
|
|
80
80
|
place: string | null;
|
|
81
81
|
place_printed: string[];
|
|
82
|
+
published?: "results" | "attended";
|
|
83
|
+
listed?: number;
|
|
82
84
|
}
|
|
83
85
|
export declare const teamsIndex: IndexBuilder;
|
|
84
86
|
export declare const eventsIndex: IndexBuilder;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finbheara/archive-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.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",
|