@finbheara/archive-client 0.23.0 → 0.25.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 +68 -1
- package/dist/chunks/{index-vsk6837c.js → index-2ms980hc.js} +427 -16
- package/dist/cli.js +601 -144
- package/dist/index.js +7 -1
- package/dist/types/cli-spec.d.ts +15 -0
- package/dist/types/cli.d.ts +4 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/people.d.ts +12 -0
- package/dist/types/release.d.ts +4 -0
- package/dist/types/school-bulk.d.ts +80 -0
- package/dist/types/schools.d.ts +33 -0
- package/dist/types/tabs.d.ts +132 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24,6 +24,9 @@ import {
|
|
|
24
24
|
syllabusSourceOf2,
|
|
25
25
|
canonicalOf2,
|
|
26
26
|
CompResolver2,
|
|
27
|
+
TabFinder2,
|
|
28
|
+
PanelFinder2,
|
|
29
|
+
FeisPanelFinder2,
|
|
27
30
|
StaffFinder2,
|
|
28
31
|
TeamFinder2,
|
|
29
32
|
EventFinder2,
|
|
@@ -68,7 +71,7 @@ import {
|
|
|
68
71
|
readLatestCheck2,
|
|
69
72
|
latestCheck2,
|
|
70
73
|
staleWarning2
|
|
71
|
-
} from "./chunks/index-
|
|
74
|
+
} from "./chunks/index-2ms980hc.js";
|
|
72
75
|
import {
|
|
73
76
|
cacheRoot2,
|
|
74
77
|
repoOf2
|
|
@@ -93,6 +96,7 @@ export {
|
|
|
93
96
|
FEATURES2 as FEATURES,
|
|
94
97
|
FEIS_LOCAL_ID_FLOOR2 as FEIS_LOCAL_ID_FLOOR,
|
|
95
98
|
FeisFinder2 as FeisFinder,
|
|
99
|
+
FeisPanelFinder2 as FeisPanelFinder,
|
|
96
100
|
LATEST_CHECK_BUDGET_MS2 as LATEST_CHECK_BUDGET_MS,
|
|
97
101
|
LATEST_CHECK_MS2 as LATEST_CHECK_MS,
|
|
98
102
|
LINEAGE_FILE2 as LINEAGE_FILE,
|
|
@@ -100,12 +104,14 @@ export {
|
|
|
100
104
|
MajorsFinder2 as MajorsFinder,
|
|
101
105
|
NAME_LEVELS2 as NAME_LEVELS,
|
|
102
106
|
NO_CALENDAR2 as NO_CALENDAR,
|
|
107
|
+
PanelFinder2 as PanelFinder,
|
|
103
108
|
RegistrationResolver2 as RegistrationResolver,
|
|
104
109
|
Release2 as Release,
|
|
105
110
|
ReleaseManager2 as ReleaseManager,
|
|
106
111
|
ResultFinder2 as ResultFinder,
|
|
107
112
|
SchoolResolver2 as SchoolResolver,
|
|
108
113
|
StaffFinder2 as StaffFinder,
|
|
114
|
+
TabFinder2 as TabFinder,
|
|
109
115
|
TeamFinder2 as TeamFinder,
|
|
110
116
|
buildIndex2 as buildIndex,
|
|
111
117
|
buildTag2 as buildTag,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface VerbSpec {
|
|
2
|
+
verb: string;
|
|
3
|
+
value: readonly string[];
|
|
4
|
+
bool: readonly string[];
|
|
5
|
+
usage: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const USAGE_HEADER = "usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json] [--live]";
|
|
8
|
+
export declare const GLOBAL_FLAGS: {
|
|
9
|
+
value: readonly string[];
|
|
10
|
+
bool: readonly string[];
|
|
11
|
+
};
|
|
12
|
+
export declare const VERBS: readonly VerbSpec[];
|
|
13
|
+
export declare const USAGE_FOOTER: readonly string[];
|
|
14
|
+
export declare function renderUsage(): string;
|
|
15
|
+
export declare function valueFlags(): Set<string>;
|
package/dist/types/cli.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { type FreshnessFloor } from "./freshness.js";
|
|
|
3
3
|
import { type LocalBuild } from "./local.js";
|
|
4
4
|
import type { OpenOptions } from "./release.js";
|
|
5
5
|
import type { StreamQuery } from "./stream.js";
|
|
6
|
-
|
|
6
|
+
import type { TabStreamQuery } from "./tabs.js";
|
|
7
|
+
export { GLOBAL_FLAGS, USAGE_FOOTER, USAGE_HEADER, VERBS, type VerbSpec, renderUsage, valueFlags, } from "./cli-spec.js";
|
|
8
|
+
export declare const USAGE: string;
|
|
7
9
|
export interface Parsed {
|
|
8
10
|
positional: string[];
|
|
9
11
|
flags: Map<string, string>;
|
|
@@ -19,6 +21,7 @@ type Line<T> = {
|
|
|
19
21
|
};
|
|
20
22
|
export declare function jsonLines<T>(text: string, check: (v: T) => string | null): Line<T>[];
|
|
21
23
|
export declare function streamQueryOf(p: Parsed): StreamQuery;
|
|
24
|
+
export declare function tabStreamQueryOf(p: Parsed): TabStreamQuery;
|
|
22
25
|
export interface LocalIO {
|
|
23
26
|
builds: () => readonly LocalBuild[];
|
|
24
27
|
}
|
|
@@ -36,4 +39,3 @@ export declare function main(argv: readonly string[], io?: {
|
|
|
36
39
|
freshness?: FreshnessIO | false;
|
|
37
40
|
local?: LocalIO | false;
|
|
38
41
|
}): Promise<number>;
|
|
39
|
-
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,10 +16,12 @@ export { type Remote, type RemoteAsset, fallbackRemote, ghRemote, httpsRemote, s
|
|
|
16
16
|
export { type OpenOptions, Release, openCached, openRelease, resolveTag, } from "./release.js";
|
|
17
17
|
export { type MajorCompetition, type MajorEvent, MajorsFinder, type ResultAnswer, ResultFinder, type ResultQuery, type ResultRow, } from "./results.js";
|
|
18
18
|
export { type DancerAnswerLike, type DancerQueryLike, type DancerResolverLike, type DancerUnavailable, type RegistrationRow, type ResolvedDancer, RegistrationResolver, type ResolvedRegistration, dancerResolverOf, youngest, } from "./registrations.js";
|
|
19
|
+
export type { LineageEdge, ObservedAssociation, RegistrySchool, SchoolPrint, SchoolRedirect, } from "./school-bulk.js";
|
|
19
20
|
export { type SchoolAnswer, type SchoolCandidate, type SchoolQuery, SchoolResolver, type SchoolRung, readsSpanishNames, type SpanishNames, } from "./schools.js";
|
|
20
21
|
export { LINEAGE_FILE, type SchoolLineAnswer, type SchoolLinksAnswer, linksOfLineage, releaseSchoolGraph, } from "./school-links.js";
|
|
21
22
|
export type { LineCandidate, LinkPath, LinkPolicy, LinkQuery, LinkStep, PathFlags, SchoolLink, StepFlags, StepPolicy, } from "@finbheara/domain/school-graph";
|
|
22
23
|
export { type Capability, FEATURES, type Feature, type SchemaProbe, capabilityOf, columnsOf, needsRelease, } from "./schema.js";
|
|
23
24
|
export { type EntryRow, type StreamQuery, type StreamRow, type StreamScope, entryRank, } from "./stream.js";
|
|
25
|
+
export { type FeisPanelSeat, FeisPanelFinder, PanelFinder, type PanelSeat, type RegisterRow, type TabAnswer, TabFinder, type TabQuery, type TabRow, type TabStreamQuery, } from "./tabs.js";
|
|
24
26
|
export { EventFinder, type EventYear, type EventYearQuery, type ResultRoster, type RosterMember, type RosterTeam, TeamFinder, type TeamResult, } from "./teams.js";
|
|
25
27
|
export { ARCHIVE_TAG, type ArchiveTag, type ReleaseSpec, compareTagsNewestFirst, cutOf, parseArchiveTag, parseReleaseSpec, pickTag, renderArchiveTag, } from "./tag.js";
|
package/dist/types/people.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type StaffRole } from "@finbheara/domain/noun-index";
|
|
|
2
2
|
import { type NameLevel } from "./dancers-names.js";
|
|
3
3
|
import type { IndexBuilder } from "./indexes.js";
|
|
4
4
|
import type { Release } from "./release.js";
|
|
5
|
+
import { type RegisterRow } from "./tabs.js";
|
|
5
6
|
export interface Taught {
|
|
6
7
|
school_id: string;
|
|
7
8
|
school: string | null;
|
|
@@ -59,6 +60,17 @@ export declare class StaffFinder {
|
|
|
59
60
|
constructor(rel: Release);
|
|
60
61
|
teacher(asked: string): Promise<StaffAnswer>;
|
|
61
62
|
adjudicator(asked: string): Promise<StaffAnswer>;
|
|
63
|
+
adjudicators(q?: {
|
|
64
|
+
year?: number;
|
|
65
|
+
judge_clrg?: number;
|
|
66
|
+
}): Promise<{
|
|
67
|
+
tag: string;
|
|
68
|
+
asked: {
|
|
69
|
+
year?: number;
|
|
70
|
+
judge_clrg?: number;
|
|
71
|
+
};
|
|
72
|
+
rows: RegisterRow[];
|
|
73
|
+
}>;
|
|
62
74
|
private find;
|
|
63
75
|
private person;
|
|
64
76
|
private taughtWhere;
|
package/dist/types/release.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { type Remote } from "./remote.js";
|
|
|
11
11
|
import { MajorsFinder, ResultFinder } from "./results.js";
|
|
12
12
|
import { type Capability } from "./schema.js";
|
|
13
13
|
import { type SchoolReaderChoice, SchoolResolver } from "./schools.js";
|
|
14
|
+
import { FeisPanelFinder, PanelFinder, TabFinder } from "./tabs.js";
|
|
14
15
|
import { type ReleaseSpec } from "./tag.js";
|
|
15
16
|
import { EventFinder, TeamFinder } from "./teams.js";
|
|
16
17
|
export interface OpenOptions extends ClientOptions {
|
|
@@ -44,6 +45,9 @@ export declare class Release {
|
|
|
44
45
|
readonly registrations: RegistrationResolver;
|
|
45
46
|
readonly teams: TeamFinder;
|
|
46
47
|
readonly events: EventFinder;
|
|
48
|
+
readonly tabs: TabFinder;
|
|
49
|
+
readonly panels: PanelFinder;
|
|
50
|
+
readonly feisPanels: FeisPanelFinder;
|
|
47
51
|
private readonly opts;
|
|
48
52
|
private readonly handles;
|
|
49
53
|
private remoteAssets;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { Release } from "./release.js";
|
|
2
|
+
export interface RegistrySchool {
|
|
3
|
+
school_id: string;
|
|
4
|
+
display: string;
|
|
5
|
+
regions: string[];
|
|
6
|
+
places: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface SchoolPrint {
|
|
9
|
+
event: string;
|
|
10
|
+
year: number | null;
|
|
11
|
+
print: string;
|
|
12
|
+
school_id: string;
|
|
13
|
+
rows: number;
|
|
14
|
+
}
|
|
15
|
+
export interface SchoolRedirect {
|
|
16
|
+
old_id: string;
|
|
17
|
+
new_id: string;
|
|
18
|
+
kind: string;
|
|
19
|
+
since: number | null;
|
|
20
|
+
}
|
|
21
|
+
export interface LineageEdge {
|
|
22
|
+
id: string;
|
|
23
|
+
direction: string;
|
|
24
|
+
other: string;
|
|
25
|
+
shape: string;
|
|
26
|
+
year: number | null;
|
|
27
|
+
provisional: boolean;
|
|
28
|
+
decision: string | null;
|
|
29
|
+
confidence: number | null;
|
|
30
|
+
}
|
|
31
|
+
export interface ObservedAssociation {
|
|
32
|
+
at: string;
|
|
33
|
+
seq: number;
|
|
34
|
+
date: string | null;
|
|
35
|
+
person: string | null;
|
|
36
|
+
person_printed: string;
|
|
37
|
+
reading: string | null;
|
|
38
|
+
person_type: string | null;
|
|
39
|
+
credentials: string | null;
|
|
40
|
+
caption: string | null;
|
|
41
|
+
school_printed: string | null;
|
|
42
|
+
school_id: string | null;
|
|
43
|
+
association_type: string | null;
|
|
44
|
+
src_type: string | null;
|
|
45
|
+
src: string | null;
|
|
46
|
+
candidate_school_id: string | null;
|
|
47
|
+
candidate_rung: string | null;
|
|
48
|
+
}
|
|
49
|
+
export declare function registrySchools(rel: Release): Promise<{
|
|
50
|
+
tag: string;
|
|
51
|
+
schools: RegistrySchool[];
|
|
52
|
+
}>;
|
|
53
|
+
export declare function schoolPrints(rel: Release, q: {
|
|
54
|
+
event?: string;
|
|
55
|
+
year?: number;
|
|
56
|
+
}): Promise<{
|
|
57
|
+
tag: string;
|
|
58
|
+
asked: {
|
|
59
|
+
event?: string;
|
|
60
|
+
year?: number;
|
|
61
|
+
};
|
|
62
|
+
prints: SchoolPrint[];
|
|
63
|
+
}>;
|
|
64
|
+
export declare function schoolRedirects(rel: Release): Promise<{
|
|
65
|
+
tag: string;
|
|
66
|
+
redirects: SchoolRedirect[];
|
|
67
|
+
}>;
|
|
68
|
+
export declare function schoolLineage(rel: Release): Promise<{
|
|
69
|
+
tag: string;
|
|
70
|
+
edges: LineageEdge[];
|
|
71
|
+
}>;
|
|
72
|
+
export declare function observedAssociations(rel: Release, q: {
|
|
73
|
+
school_id?: string;
|
|
74
|
+
}): Promise<{
|
|
75
|
+
tag: string;
|
|
76
|
+
asked: {
|
|
77
|
+
school_id?: string;
|
|
78
|
+
};
|
|
79
|
+
associations: ObservedAssociation[];
|
|
80
|
+
}>;
|
package/dist/types/schools.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type SchoolNameParser } from "@finbheara/domain/school";
|
|
2
2
|
import type { IndexBuilder } from "./indexes.js";
|
|
3
3
|
import type { Release } from "./release.js";
|
|
4
|
+
import { type LineageEdge, type ObservedAssociation, type RegistrySchool, type SchoolPrint, type SchoolRedirect } from "./school-bulk.js";
|
|
4
5
|
import { type LinkQuery, type SchoolLineAnswer, type SchoolLinksAnswer } from "./school-links.js";
|
|
5
6
|
export type SchoolRung = "id" | "redirect" | "print" | "sn3" | "realWords";
|
|
6
7
|
export interface SchoolCandidate {
|
|
@@ -57,5 +58,37 @@ export declare class SchoolResolver {
|
|
|
57
58
|
constructor(rel: Release);
|
|
58
59
|
links(a: string, b: string, q?: LinkQuery): Promise<SchoolLinksAnswer>;
|
|
59
60
|
line(a: string, q?: LinkQuery): Promise<SchoolLineAnswer>;
|
|
61
|
+
list(): Promise<{
|
|
62
|
+
tag: string;
|
|
63
|
+
schools: RegistrySchool[];
|
|
64
|
+
}>;
|
|
65
|
+
prints(q?: {
|
|
66
|
+
event?: string;
|
|
67
|
+
year?: number;
|
|
68
|
+
}): Promise<{
|
|
69
|
+
tag: string;
|
|
70
|
+
asked: {
|
|
71
|
+
event?: string;
|
|
72
|
+
year?: number;
|
|
73
|
+
};
|
|
74
|
+
prints: SchoolPrint[];
|
|
75
|
+
}>;
|
|
76
|
+
redirects(): Promise<{
|
|
77
|
+
tag: string;
|
|
78
|
+
redirects: SchoolRedirect[];
|
|
79
|
+
}>;
|
|
80
|
+
lineage(): Promise<{
|
|
81
|
+
tag: string;
|
|
82
|
+
edges: LineageEdge[];
|
|
83
|
+
}>;
|
|
84
|
+
associations(q?: {
|
|
85
|
+
school_id?: string;
|
|
86
|
+
}): Promise<{
|
|
87
|
+
tag: string;
|
|
88
|
+
asked: {
|
|
89
|
+
school_id?: string;
|
|
90
|
+
};
|
|
91
|
+
associations: ObservedAssociation[];
|
|
92
|
+
}>;
|
|
60
93
|
resolve(asked: string, q?: SchoolQuery): Promise<SchoolAnswer>;
|
|
61
94
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { Release } from "./release.js";
|
|
2
|
+
export interface TabRow {
|
|
3
|
+
address: string;
|
|
4
|
+
competition: string;
|
|
5
|
+
card: string;
|
|
6
|
+
line: number;
|
|
7
|
+
event: string | null;
|
|
8
|
+
year: number | null;
|
|
9
|
+
tier: string | null;
|
|
10
|
+
round: string;
|
|
11
|
+
true_round: number;
|
|
12
|
+
seat_index: number;
|
|
13
|
+
section: string;
|
|
14
|
+
panel_size: number;
|
|
15
|
+
column_order: string;
|
|
16
|
+
drop_rule: string;
|
|
17
|
+
judge_name: string | null;
|
|
18
|
+
judge_name_printed: string | null;
|
|
19
|
+
judge_clrg: number | null;
|
|
20
|
+
judge_id: number | null;
|
|
21
|
+
judge_unmatched: string | null;
|
|
22
|
+
mark: number | null;
|
|
23
|
+
mark_printed: string | null;
|
|
24
|
+
place: number | null;
|
|
25
|
+
place_printed: string | null;
|
|
26
|
+
tie: number;
|
|
27
|
+
points: number | null;
|
|
28
|
+
points_printed: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface TabQuery {
|
|
31
|
+
competition?: string;
|
|
32
|
+
address?: string;
|
|
33
|
+
round?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface TabStreamQuery {
|
|
36
|
+
event?: string | string[];
|
|
37
|
+
year?: number | [number, number];
|
|
38
|
+
tier?: string[];
|
|
39
|
+
competition?: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface TabAnswer {
|
|
42
|
+
tag: string;
|
|
43
|
+
asked: TabQuery;
|
|
44
|
+
rows: TabRow[];
|
|
45
|
+
}
|
|
46
|
+
export interface PanelSeat {
|
|
47
|
+
competition: string;
|
|
48
|
+
panel: string;
|
|
49
|
+
round: string;
|
|
50
|
+
seat_index: number;
|
|
51
|
+
address: string | null;
|
|
52
|
+
judge_name_printed: string | null;
|
|
53
|
+
judge_clrg: number | null;
|
|
54
|
+
judge_id: number | null;
|
|
55
|
+
judge_unmatched: string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface FeisPanelSeat {
|
|
58
|
+
address: string;
|
|
59
|
+
platform: string;
|
|
60
|
+
round: string;
|
|
61
|
+
seat_index: number;
|
|
62
|
+
panel_size: number;
|
|
63
|
+
panel_kind: string;
|
|
64
|
+
judge_name_printed: string;
|
|
65
|
+
judge_state_printed: string | null;
|
|
66
|
+
judge_clrg: number | null;
|
|
67
|
+
judge_id: number | null;
|
|
68
|
+
judge_unmatched: string | null;
|
|
69
|
+
judge_basis: string | null;
|
|
70
|
+
}
|
|
71
|
+
export interface RegisterRow {
|
|
72
|
+
judge_clrg: number;
|
|
73
|
+
year: number;
|
|
74
|
+
cat: string;
|
|
75
|
+
name_printed: string;
|
|
76
|
+
country: string;
|
|
77
|
+
country_printed: string;
|
|
78
|
+
country_code: string | null;
|
|
79
|
+
region: string;
|
|
80
|
+
region_printed: string;
|
|
81
|
+
region_code: string | null;
|
|
82
|
+
geohash: string | null;
|
|
83
|
+
src: string;
|
|
84
|
+
}
|
|
85
|
+
export declare const TAB_NEEDS: readonly string[];
|
|
86
|
+
export declare class TabFinder {
|
|
87
|
+
private readonly rel;
|
|
88
|
+
constructor(rel: Release);
|
|
89
|
+
private db;
|
|
90
|
+
private sheets;
|
|
91
|
+
query(q: TabQuery): Promise<TabAnswer>;
|
|
92
|
+
stream(q?: TabStreamQuery): AsyncGenerator<TabRow>;
|
|
93
|
+
}
|
|
94
|
+
export declare class PanelFinder {
|
|
95
|
+
private readonly rel;
|
|
96
|
+
constructor(rel: Release);
|
|
97
|
+
query(q?: {
|
|
98
|
+
competition?: string;
|
|
99
|
+
}): Promise<{
|
|
100
|
+
tag: string;
|
|
101
|
+
asked: {
|
|
102
|
+
competition?: string;
|
|
103
|
+
};
|
|
104
|
+
seats: PanelSeat[];
|
|
105
|
+
}>;
|
|
106
|
+
}
|
|
107
|
+
export declare class FeisPanelFinder {
|
|
108
|
+
private readonly rel;
|
|
109
|
+
constructor(rel: Release);
|
|
110
|
+
query(q?: {
|
|
111
|
+
address?: string;
|
|
112
|
+
platform?: string;
|
|
113
|
+
}): Promise<{
|
|
114
|
+
tag: string;
|
|
115
|
+
asked: {
|
|
116
|
+
address?: string;
|
|
117
|
+
platform?: string;
|
|
118
|
+
};
|
|
119
|
+
seats: FeisPanelSeat[];
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
122
|
+
export declare function registerRows(rel: Release, q: {
|
|
123
|
+
year?: number;
|
|
124
|
+
judge_clrg?: number;
|
|
125
|
+
}): Promise<{
|
|
126
|
+
tag: string;
|
|
127
|
+
asked: {
|
|
128
|
+
year?: number;
|
|
129
|
+
judge_clrg?: number;
|
|
130
|
+
};
|
|
131
|
+
rows: RegisterRow[];
|
|
132
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finbheara/archive-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.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",
|