@finbheara/archive-client 0.13.0 → 0.14.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 CHANGED
@@ -531,12 +531,20 @@ the host likes, so a code is answered from that feis's competitions in the relea
531
531
  another platform's numbering. The sources, in order:
532
532
 
533
533
  - `syllabus`: the feis-year is in the release, and one of its competitions prints the code
534
- - `prior-year`: the feis-year is not (next year's, before its results): the newest earlier year
535
- of the same series printing the code. Give the comp's `title` and `matchTitle` checks it
536
- against the earlier comp (`check`), and with no title the answer says `unchecked`
534
+ - `prior-year`: the feis-year is not (next year's, before its results), and its platform numbers
535
+ every feis by one grammar (QuickFeis: `CODE_READER`, `@finbheara/domain/code`): the newest
536
+ earlier year of the same series printing the code. Give the comp's `title` and `matchTitle`
537
+ checks it against the earlier comp (`check`), and with no title the answer says `unchecked`
537
538
  - `title`: the code answers nothing and a `title` was given: the competitions of that syllabus
538
539
  the title names, by band and population
539
540
 
541
+ AN EARLIER YEAR'S CODE IS NEVER READ ON A FEIS-SPECIFIC PLATFORM. FeisWeb, FeisWorx, iFeis and
542
+ the rest renumber their competitions from one year to the next: measured in October 2026, the
543
+ same code at the same series one held year later names another band or level on 13% to 29% of
544
+ codes, a plausible answer and a wrong one. So an unheld feis-year there answers by its `title`
545
+ over the newest earlier syllabus, and a code with no title is `none`, saying why. The code of a
546
+ held feis-year is still read from that feis-year's own competitions.
547
+
540
548
  A feis the release holds names itself, its year and its series. A series instance or brand id
541
549
  names the series. A feis id the release does not hold is placed in a series by its host code
542
550
  (`<token>:<stem><yy>` where the held codes of that stem carry their own year), and a stem two
@@ -1508,6 +1508,7 @@ function contradictionFact(x, age, slack) {
1508
1508
  }
1509
1509
 
1510
1510
  import { Age as Age2 } from "@finbheara/domain/age";
1511
+ import { createCodeReader } from "@finbheara/domain/code";
1511
1512
  import {
1512
1513
  codePopulation,
1513
1514
  compTitle as compTitle2,
@@ -1613,6 +1614,7 @@ function canonicalOf2(level, age) {
1613
1614
  return null;
1614
1615
  return `${level / 100}${String(n).padStart(2, "0")}${level === 600 ? "PC" : "OC"}`;
1615
1616
  }
1617
+ var CODE_READER = createCodeReader({ standardized: ["quickfeis"] });
1616
1618
  var entryOf = (c) => ({
1617
1619
  title: c.title ?? "",
1618
1620
  ...c.age !== null ? { age: c.age } : {},
@@ -1825,6 +1827,14 @@ class CompResolver2 {
1825
1827
  return answer("none", null, [], {
1826
1828
  why: `the release holds no year of ${place.asked}'s series before ${place.year ?? "?"}`
1827
1829
  });
1830
+ const newestYear = earlier[0];
1831
+ const newestIds = await this.idsOf(place.brand_id, newestYear);
1832
+ const newestComps = await this.compsOf(newestIds);
1833
+ const platform = newestComps[0]?.platform ?? null;
1834
+ if (platform === null || CODE_READER.scheme(platform) === "feis-specific") {
1835
+ const noChamps = newestComps.some((c) => c.kind === "championship") ? "" : `, and the ${newestYear} syllabus, read from results, lists no championship`;
1836
+ return byTitle(newestIds, { feis_ids: newestIds, year: newestYear }, `${platform ?? "the series' platform"} numbers each feis-year's competitions its own way: code ${q.code} is read only in the ${place.year ?? "asked"} syllabus, which the release does not hold${noChamps}`);
1837
+ }
1828
1838
  for (const y of earlier) {
1829
1839
  const ids = await this.idsOf(place.brand_id, y);
1830
1840
  const hits = await this.compsOf(ids, q.code);
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  nameOrderOf,
5
5
  openRelease2,
6
6
  releases2
7
- } from "./chunks/index-1ty89s8d.js";
7
+ } from "./chunks/index-hhhrh1db.js";
8
8
  import"./chunks/index-hne1wadw.js";
9
9
  import"./chunks/index-hghdy980.js";
10
10
 
@@ -81,7 +81,8 @@ var USAGE = `usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json]
81
81
  the register's and the panels' people: the same answer
82
82
  comp [--release <spec>] <feis> <code> [--year <y>] [--title <t>]
83
83
  a feis's own comp code to the comp it names, through that
84
- feis's syllabus (or the prior year's)
84
+ feis's syllabus (the prior year's only where the platform
85
+ numbers every feis alike; elsewhere the title)
85
86
  syllabus [--release <spec>] <feis> [year]
86
87
  one feis-year's comps, in printed order
87
88
  syllabus [--release <spec>] --for <series> [year]
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ import {
46
46
  openCached2,
47
47
  ReleaseManager2,
48
48
  releases2
49
- } from "./chunks/index-1ty89s8d.js";
49
+ } from "./chunks/index-hhhrh1db.js";
50
50
  import {
51
51
  cacheRoot2,
52
52
  repoOf2
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
2
  import type { OpenOptions } from "./release.js";
3
3
  import type { StreamQuery } from "./stream.js";
4
- export declare const USAGE = "usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json]\n\n config repo <owner/name> set the user-local repository the releases come from\n list [--remote] the cached releases (size, files, indexes, the pin), and\n with --remote the published tags\n fetch [--release <spec>] [--assets results,majors,<file>...]\n download, verify and cache a release (default: results)\n pin <spec> the user-local pin: what a bare open (spec \"pinned\") opens\n unpin remove the pin (a bare open is then \"latest\")\n current the pin, and whether it is cached\n add <dir> --tag <tag> add a release built locally (its MANIFEST.json and files)\n to the cache under its tag\n index [--release <spec>] [<name>...] [--force]\n build the per-tag indexes (default: every one)\n verify [--release <spec>] re-hash every cached file against its receipt\n capabilities [--release <spec>] what the release carries of what the client reads, from\n its own schema: each feature full or missing (its calls\n refuse, naming the first cut that publishes it)\n prune [--keep N] [--dry-run] remove all but the N newest cached releases (default 1)\n and the pinned one\n rm <tag> [--dry-run] remove one cached release (not the pinned one)\n drop-indexes [<tag>] [--dry-run] remove the index files (of one release, or of every one)\n feis [--release <spec>] [--platform <p>] [--code <c>] [--id <id>] [--name <glob>] [--year <y>]\n the feises a query names\n series [--release <spec>] <name|host code|feis id>\n the series a name, a host code (fweb:ABC) or any feis id\n names: its years, hosts, codes and next instance\n school [--release <spec>] <print|school_id> [--region <code>]\n a school print or id to the published schools\n dancer [--release <spec>] <name> | --surname <s> | --like <glob> | --id <dancer_id>\n [--order surname-first|given-first] [--school <print|id>]\n [--yob <y> | --band <U10> [--year <y>] | --comp <competition>] [--as-of <date>]\n [--population girls|boys] [--oireachtas <region>[:<year>]] [--rows]\n the dancers a name reaches, each with its evidence\n (name level, age, school, population, region) and the arm;\n --oireachtas is the regional the roster is for, its region in\n the release's spelling (SRO, MAO), its year the --as-of year\n where none is given; the results of\n the one dancer where one answers (or --rows for each)\n results [--release <spec>] [--dancer <id>] [--feis <id>] [--comp <competition>]\n [--school <print|id>] [--year <y>] [--limit <n>]\n the published result rows, prints and ids\n majors [--release <spec>] [--event <e>] [--year <y>] [--comp <competition>] [--dancer <id>]\n the majors: every event and its years; an event's\n competitions; a competition's, an event's or a dancer's rows\n stream [--release <spec>] --scope majors|transcribed|platform|all [--entries] [--event <e,...>]\n [--year <y> | --year <from>..<to>] [--tier <t,...>] [--category <c,...>]\n [--level <feis_level,...>] [--dancer <id,...>] [--school <school_id>] [--primary]\n every row a scope holds, one JSON line each, never the\n whole table in memory; --entries one per address (the row\n it stands for, with its recall order)\n records [--release <spec>] [--dancer <id,...>]\n every dancer's record: display, appearances, birth window,\n populations\n records --years [--release <spec>] [--dancer <id,...>] [--year <y>]\n each dancer's region, nationals and place per year\n feis-dates [--release <spec>] every feis's first and last day\n tabulated [--release <spec>] [--min-round <n>]\n the majors addresses the marks sheets tabulate to round n\n or later (default 3)\n teams [--release <spec>] [--event <e>] [--year <y>] [--rosters | --joins]\n the team result rows of an event-year; with --rosters its\n roster teams and their dancers; with --joins how each roster\n team meets the results\n events [--release <spec>] [--event <e>] [--year <y>]\n each event-year's dates and place\n teacher [--release <spec>] <name|TD number>\n the staff lists' people: where they taught, the register,\n where they sat\n adjudicator [--release <spec>] <name|TD number>\n the register's and the panels' people: the same answer\n comp [--release <spec>] <feis> <code> [--year <y>] [--title <t>]\n a feis's own comp code to the comp it names, through that\n feis's syllabus (or the prior year's)\n syllabus [--release <spec>] <feis> [year]\n one feis-year's comps, in printed order\n syllabus [--release <spec>] --for <series> [year]\n a series' syllabus for a year: that year's where held,\n else the newest, saying which and what it is read from\n resolve comp [<feis> <code>] [--year <y>] [--title <t>]\n resolve dancer [<name>] [--school <s>] [--comp <feis>/<code> | --yob <y> | --band <b> --year <y>]\n [--order <o>] [--as-of <date>] [--population girls|boys]\n [--oireachtas <region>[:<year>]]\n resolve registrations\n JSONL out, one answer per line; with no positional the\n questions are JSONL on stdin, one per line (a comp:\n {feis, code, year?, title?}, a dancer: {name, school?, age?,\n population?, oireachtas?}, a registration: {name, school?,\n codes[], feis, year?, population?, oireachtas?})\n\n <spec>: pinned (the default) | latest | a cut (42, 42.1) | a tag (archive-YYYY.MM.DD-N)";
4
+ export declare const USAGE = "usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json]\n\n config repo <owner/name> set the user-local repository the releases come from\n list [--remote] the cached releases (size, files, indexes, the pin), and\n with --remote the published tags\n fetch [--release <spec>] [--assets results,majors,<file>...]\n download, verify and cache a release (default: results)\n pin <spec> the user-local pin: what a bare open (spec \"pinned\") opens\n unpin remove the pin (a bare open is then \"latest\")\n current the pin, and whether it is cached\n add <dir> --tag <tag> add a release built locally (its MANIFEST.json and files)\n to the cache under its tag\n index [--release <spec>] [<name>...] [--force]\n build the per-tag indexes (default: every one)\n verify [--release <spec>] re-hash every cached file against its receipt\n capabilities [--release <spec>] what the release carries of what the client reads, from\n its own schema: each feature full or missing (its calls\n refuse, naming the first cut that publishes it)\n prune [--keep N] [--dry-run] remove all but the N newest cached releases (default 1)\n and the pinned one\n rm <tag> [--dry-run] remove one cached release (not the pinned one)\n drop-indexes [<tag>] [--dry-run] remove the index files (of one release, or of every one)\n feis [--release <spec>] [--platform <p>] [--code <c>] [--id <id>] [--name <glob>] [--year <y>]\n the feises a query names\n series [--release <spec>] <name|host code|feis id>\n the series a name, a host code (fweb:ABC) or any feis id\n names: its years, hosts, codes and next instance\n school [--release <spec>] <print|school_id> [--region <code>]\n a school print or id to the published schools\n dancer [--release <spec>] <name> | --surname <s> | --like <glob> | --id <dancer_id>\n [--order surname-first|given-first] [--school <print|id>]\n [--yob <y> | --band <U10> [--year <y>] | --comp <competition>] [--as-of <date>]\n [--population girls|boys] [--oireachtas <region>[:<year>]] [--rows]\n the dancers a name reaches, each with its evidence\n (name level, age, school, population, region) and the arm;\n --oireachtas is the regional the roster is for, its region in\n the release's spelling (SRO, MAO), its year the --as-of year\n where none is given; the results of\n the one dancer where one answers (or --rows for each)\n results [--release <spec>] [--dancer <id>] [--feis <id>] [--comp <competition>]\n [--school <print|id>] [--year <y>] [--limit <n>]\n the published result rows, prints and ids\n majors [--release <spec>] [--event <e>] [--year <y>] [--comp <competition>] [--dancer <id>]\n the majors: every event and its years; an event's\n competitions; a competition's, an event's or a dancer's rows\n stream [--release <spec>] --scope majors|transcribed|platform|all [--entries] [--event <e,...>]\n [--year <y> | --year <from>..<to>] [--tier <t,...>] [--category <c,...>]\n [--level <feis_level,...>] [--dancer <id,...>] [--school <school_id>] [--primary]\n every row a scope holds, one JSON line each, never the\n whole table in memory; --entries one per address (the row\n it stands for, with its recall order)\n records [--release <spec>] [--dancer <id,...>]\n every dancer's record: display, appearances, birth window,\n populations\n records --years [--release <spec>] [--dancer <id,...>] [--year <y>]\n each dancer's region, nationals and place per year\n feis-dates [--release <spec>] every feis's first and last day\n tabulated [--release <spec>] [--min-round <n>]\n the majors addresses the marks sheets tabulate to round n\n or later (default 3)\n teams [--release <spec>] [--event <e>] [--year <y>] [--rosters | --joins]\n the team result rows of an event-year; with --rosters its\n roster teams and their dancers; with --joins how each roster\n team meets the results\n events [--release <spec>] [--event <e>] [--year <y>]\n each event-year's dates and place\n teacher [--release <spec>] <name|TD number>\n the staff lists' people: where they taught, the register,\n where they sat\n adjudicator [--release <spec>] <name|TD number>\n the register's and the panels' people: the same answer\n comp [--release <spec>] <feis> <code> [--year <y>] [--title <t>]\n a feis's own comp code to the comp it names, through that\n feis's syllabus (the prior year's only where the platform\n numbers every feis alike; elsewhere the title)\n syllabus [--release <spec>] <feis> [year]\n one feis-year's comps, in printed order\n syllabus [--release <spec>] --for <series> [year]\n a series' syllabus for a year: that year's where held,\n else the newest, saying which and what it is read from\n resolve comp [<feis> <code>] [--year <y>] [--title <t>]\n resolve dancer [<name>] [--school <s>] [--comp <feis>/<code> | --yob <y> | --band <b> --year <y>]\n [--order <o>] [--as-of <date>] [--population girls|boys]\n [--oireachtas <region>[:<year>]]\n resolve registrations\n JSONL out, one answer per line; with no positional the\n questions are JSONL on stdin, one per line (a comp:\n {feis, code, year?, title?}, a dancer: {name, school?, age?,\n population?, oireachtas?}, a registration: {name, school?,\n codes[], feis, year?, population?, oireachtas?})\n\n <spec>: pinned (the default) | latest | a cut (42, 42.1) | a tag (archive-YYYY.MM.DD-N)";
5
5
  export interface Parsed {
6
6
  positional: string[];
7
7
  flags: Map<string, string>;
@@ -121,6 +121,7 @@ interface CompRow {
121
121
  }
122
122
  export declare function compOf(r: CompRow, codes?: readonly string[]): Comp;
123
123
  export declare function canonicalOf(level: number | null, age: string | null): string | null;
124
+ export declare const CODE_READER: import("@finbheara/domain/code").CodeReader;
124
125
  export declare class CompResolver {
125
126
  private readonly rel;
126
127
  constructor(rel: Release);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finbheara/archive-client",
3
- "version": "0.13.0",
3
+ "version": "0.14.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",
@@ -44,7 +44,7 @@
44
44
  "prepublishOnly": "bun scripts/build.ts && bun ../../tools/checks/archive-client-tarball.ts"
45
45
  },
46
46
  "dependencies": {
47
- "@finbheara/domain": "0.50.0",
47
+ "@finbheara/domain": "0.53.0",
48
48
  "@finbheara/names": "0.25.0",
49
49
  "hyparquet": "1.31.2"
50
50
  },