@finbheara/archive-client 0.43.0 → 0.45.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
@@ -96,6 +96,7 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
96
96
  | `results.stream.competitors_printed`, `majors.stream.competitors_printed` | the `competitors_printed` a streamed row carries (the competed count the page printed); absent, never refused, without it | 345 |
97
97
  | `results.attach_basis`, `majors.attach_basis` | the `attach_basis` a row of `results.query`, `majors.results`, `results.stream` and `results.entries` carries (how its `dancer_id` was answered, or why not); absent, never refused, without it | 345 |
98
98
  | `dancers.records.birth_consistency`, `dancers.years.birth_consistency` | the `birth_consistency` (0-100, floored: the percent of the dancer's, or the dancer-year's, readable rows that fit the birth window) and its denominator `birth_consistency_rows` a record of `dancers.records` and a dancer-year of `dancers.years` carry; absent, never refused, without it | 345 |
99
+ | `dancers.records.birth_deadband`, `dancers.years.birth_deadband` | the `birth_deadband_rows` a record of `dancers.records` and a dancer-year of `dancers.years` carry (the readable rows a one-year dance-up alone keeps off the birth window, outside `birth_consistency` and its denominator); absent, never refused, without it | 345 |
99
100
  | `dancers.years.printed` | the `printed_regions` a dancer-year of `dancers.years` carries (every region the year printed, where `region` picks one); absent, never refused, without it | 341 |
100
101
  | `majors.tabs` | `majors.tabulated` | 215 |
101
102
  | `teams` | `teams.results`, `teams.rosters`, `teams.resultRosters` | 260 |
@@ -671,12 +672,14 @@ await rel.dancers.records(); // every dancer: display, appeara
671
672
  // birth_source, birth_conflict, genders, scope,
672
673
  // names_printed (dancers.records.names),
673
674
  // birth_consistency, birth_consistency_rows
674
- // (dancers.records.birth_consistency)
675
+ // (dancers.records.birth_consistency),
676
+ // birth_deadband_rows (dancers.records.birth_deadband)
675
677
  await rel.dancers.records({ ids: [1001] });
676
678
  await rel.dancers.years({ ids: [1001], year: 2025 }); // region, region_source, nationals, geohash
677
679
  // printed_regions (dancers.years.printed),
678
680
  // birth_consistency, birth_consistency_rows
679
- // (dancers.years.birth_consistency)
681
+ // (dancers.years.birth_consistency),
682
+ // birth_deadband_rows (dancers.years.birth_deadband)
680
683
  await rel.feises.dates(); // every feis id with its first and last day
681
684
  await rel.majors.tabulated({ min_true_round: 3 }); // the majors addresses marked to round 3 or later
682
685
  ```
@@ -623,6 +623,18 @@ var FEATURES2 = [
623
623
  since: 345,
624
624
  calls: "the `birth_consistency` and `birth_consistency_rows` a dancer-year of dancers.years carries: absent, never refused, on a release without them"
625
625
  },
626
+ {
627
+ feature: "dancers.records.birth_deadband",
628
+ needs: ["results:dancers.birth_deadband_rows"],
629
+ since: 345,
630
+ calls: "the `birth_deadband_rows` a record of dancers.records carries (its readable rows a one-year dance-up alone keeps off its birth window, outside `birth_consistency` and its denominator): absent, never refused, on a release without it"
631
+ },
632
+ {
633
+ feature: "dancers.years.birth_deadband",
634
+ needs: ["results:dancer_years.birth_deadband_rows"],
635
+ since: 345,
636
+ calls: "the `birth_deadband_rows` a dancer-year of dancers.years carries: absent, never refused, on a release without it"
637
+ },
626
638
  {
627
639
  feature: "dancers.years.printed",
628
640
  needs: ["results:dancer_years.printed_regions"],
@@ -2302,7 +2314,8 @@ class DancerResolver2 {
2302
2314
  const db = this.rel.db("results");
2303
2315
  const names = (await this.rel.capability("dancers.records.names")).state === "full";
2304
2316
  const fit = (await this.rel.capability("dancers.records.birth_consistency")).state === "full";
2305
- const sql = `SELECT dancer_id, display, appearances, birth_lo, birth_hi, birth_source, birth_conflict, genders${names ? ", names_printed" : ""}${fit ? ", birth_consistency, birth_consistency_rows" : ""} FROM dancers`;
2317
+ const dead = (await this.rel.capability("dancers.records.birth_deadband")).state === "full";
2318
+ const sql = `SELECT dancer_id, display, appearances, birth_lo, birth_hi, birth_source, birth_conflict, genders${names ? ", names_printed" : ""}${fit ? ", birth_consistency, birth_consistency_rows" : ""}${dead ? ", birth_deadband_rows" : ""} FROM dancers`;
2306
2319
  const rows = q.ids === undefined ? db.query(`${sql} ORDER BY dancer_id`).all() : idChunks(q.ids).flatMap((c) => db.query(`${sql} WHERE dancer_id IN (${c.map(() => "?").join(",")})`).all(...c));
2307
2320
  rows.sort((a, b) => a.dancer_id - b.dancer_id);
2308
2321
  return {
@@ -2322,7 +2335,8 @@ class DancerResolver2 {
2322
2335
  const db = this.rel.db("results");
2323
2336
  const printed = (await this.rel.capability("dancers.years.printed")).state === "full";
2324
2337
  const fit = (await this.rel.capability("dancers.years.birth_consistency")).state === "full";
2325
- const sql = `SELECT dancer_id, year, region, region_source, nationals, nationals_source, geohash${printed ? ", printed_regions" : ""}${fit ? ", birth_consistency, birth_consistency_rows" : ""} FROM dancer_years`;
2338
+ const dead = (await this.rel.capability("dancers.years.birth_deadband")).state === "full";
2339
+ const sql = `SELECT dancer_id, year, region, region_source, nationals, nationals_source, geohash${printed ? ", printed_regions" : ""}${fit ? ", birth_consistency, birth_consistency_rows" : ""}${dead ? ", birth_deadband_rows" : ""} FROM dancer_years`;
2326
2340
  const yearSql = q.year === undefined ? "" : " AND year = ?";
2327
2341
  const yearArgs = q.year === undefined ? [] : [q.year];
2328
2342
  const rows = q.ids === undefined ? db.query(`${sql} WHERE 1${yearSql} ORDER BY dancer_id, year`).all(...yearArgs) : idChunks(q.ids).flatMap((c) => db.query(`${sql} WHERE dancer_id IN (${c.map(() => "?").join(",")})${yearSql}`).all(...c, ...yearArgs));
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  staleWarning2,
24
24
  progressMode2,
25
25
  progressRenderer2
26
- } from "./chunks/index-1nam25zf.js";
26
+ } from "./chunks/index-kfc7hz90.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]";
package/dist/index.js CHANGED
@@ -85,7 +85,7 @@ import {
85
85
  PROGRESS_MODES2,
86
86
  progressMode2,
87
87
  progressRenderer2
88
- } from "./chunks/index-1nam25zf.js";
88
+ } from "./chunks/index-kfc7hz90.js";
89
89
  import {
90
90
  cacheRoot2,
91
91
  repoOf2
@@ -146,7 +146,8 @@ var ATTACH_VIA = {
146
146
  "initial-only": 1 << 12,
147
147
  "name-school-fold": 1 << 13,
148
148
  "feis-local": 1 << 14,
149
- ruling: 1 << 15
149
+ ruling: 1 << 15,
150
+ "dance-up": 1 << 16
150
151
  };
151
152
  var CODE = new Map(ATTACH_OUTCOMES.map((n, i) => [n, i]));
152
153
  function outcomeCode(name) {
@@ -13,6 +13,7 @@ export declare const ATTACH_VIA: {
13
13
  readonly "name-school-fold": number;
14
14
  readonly "feis-local": number;
15
15
  readonly ruling: number;
16
+ readonly "dance-up": number;
16
17
  };
17
18
  export type AttachVia = keyof typeof ATTACH_VIA;
18
19
  export declare function outcomeCode(name: string): number;
@@ -195,6 +195,7 @@ export interface DancerBulkRecord {
195
195
  birth_conflict: boolean;
196
196
  birth_consistency?: number | null;
197
197
  birth_consistency_rows?: number;
198
+ birth_deadband_rows?: number;
198
199
  genders: string[];
199
200
  names_printed?: string[];
200
201
  }
@@ -209,6 +210,7 @@ export interface DancerYear {
209
210
  printed_regions?: string[];
210
211
  birth_consistency?: number | null;
211
212
  birth_consistency_rows?: number;
213
+ birth_deadband_rows?: number;
212
214
  }
213
215
  export declare class DancerResolver {
214
216
  private readonly rel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finbheara/archive-client",
3
- "version": "0.43.0",
3
+ "version": "0.45.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",