@finbheara/archive-client 0.23.0 → 0.24.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/dist/cli.js CHANGED
@@ -24,149 +24,379 @@ import {
24
24
  } from "./chunks/index-vsk6837c.js";
25
25
  import"./chunks/index-hghdy980.js";
26
26
 
27
- var USAGE = `usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json] [--live]
28
-
29
- config repo <owner/name> set the user-local repository the releases come from
30
- config keep <N> how many of the newest releases a prune keeps (default 2)
31
- list [--remote] the cached releases (size, files, indexes, the pin), and
32
- with --remote the published tags
33
- fetch [--release <spec>] [--assets results,majors,<file>...]
34
- download, verify and cache a release (default: results)
35
- update [--assets ...] [--keep N] [--no-prune]
36
- move to the newest published release: fetch it (verified),
37
- build its indexes, pin it, then prune the cache to the N
38
- newest releases (default: config keep, else 2), keeping the
39
- new pin and the one before it
40
- use <spec> [--assets ...] [--keep N] [--no-prune]
41
- the same for the release a spec names
42
- pin <spec> the user-local pin: what a bare open (spec "pinned") opens
43
- unpin remove the pin (a bare open is then "latest")
44
- current the pin, and whether it is cached
45
- add <dir> --tag <tag> add a release built locally (its MANIFEST.json and files)
46
- to the cache under its tag
47
- index [--release <spec>] [<name>...] [--force]
48
- build the per-tag indexes (default: every one)
49
- verify [--release <spec>] re-hash every cached file against its receipt
50
- capabilities [--release <spec>] what the release carries of what the client reads, from
51
- its own schema: each feature full or missing (its calls
52
- refuse, naming the first cut that publishes it)
53
- prune [--keep N] [--dry-run] remove all but the N newest cached releases (default:
54
- config keep, else 2) and the pinned one
55
- rm <tag> [--dry-run] remove one cached release (not the pinned one)
56
- drop-indexes [<tag>] [--dry-run] remove the index files (of one release, or of every one)
57
- feis [--release <spec>] [--platform <p>] [--code <c>] [--id <id>] [--name <glob>] [--year <y>]
58
- the feises a query names
59
- series [--release <spec>] <name|host code|feis id>
60
- the series a name, a host code (fweb:ABC) or any feis id
61
- names: its years, hosts, codes and next instance
62
- school [--release <spec>] <print|school_id> [--region <code>]
63
- a school print or id to the published schools
64
- dancer [--release <spec>] <name> | --surname <s> | --like <glob> | --id <dancer_id>
65
- [--order surname-first|given-first] [--school <print|id>]
66
- [--yob <y> | --band <U10> [--year <y>] | --comp <competition>] [--as-of <date>]
67
- [--population girls|boys] [--oireachtas <region>[:<year>]] [--rows]
68
- the dancers a name reaches, each with its evidence
69
- (name level, age, school, population, region) and the arm;
70
- --oireachtas is the regional the roster is for, its region in
71
- the release's spelling (SRO, MAO), its year the --as-of year
72
- where none is given; the results of
73
- the one dancer where one answers (or --rows for each)
74
- results [--release <spec>] [--dancer <id>] [--feis <id>] [--comp <competition>]
75
- [--school <print|id>] [--year <y>] [--limit <n>]
76
- the published result rows, prints and ids
77
- majors [--release <spec>] [--event <e>] [--year <y>] [--comp <competition>] [--dancer <id>]
78
- the majors: every event and its years; an event's
79
- competitions; a competition's, an event's or a dancer's rows
80
- stream [--release <spec>] --scope majors|transcribed|platform|all [--entries] [--event <e,...>]
81
- [--year <y> | --year <from>..<to>] [--tier <t,...>] [--category <c,...>]
82
- [--level <feis_level,...>] [--dancer <id,...>] [--school <school_id>] [--primary]
83
- every row a scope holds, one JSON line each, never the
84
- whole table in memory; --entries one per address (the row
85
- it stands for, with its recall order)
86
- records [--release <spec>] [--dancer <id,...>]
87
- every dancer's record: display, appearances, birth window,
88
- populations
89
- records --years [--release <spec>] [--dancer <id,...>] [--year <y>]
90
- each dancer's region, nationals and place per year
91
- feis-dates [--release <spec>] every feis's first and last day
92
- tabulated [--release <spec>] [--min-round <n>]
93
- the majors addresses the marks sheets tabulate to round n
94
- or later (default 3)
95
- teams [--release <spec>] [--event <e>] [--year <y>] [--rosters | --joins]
96
- the team result rows of an event-year; with --rosters its
97
- roster teams and their dancers; with --joins how each roster
98
- team meets the results
99
- events [--release <spec>] [--event <e>] [--year <y>]
100
- each event-year's dates and place
101
- teacher [--release <spec>] <name|TD number>
102
- the staff lists' people: where they taught, the register,
103
- where they sat
104
- adjudicator [--release <spec>] <name|TD number>
105
- the register's and the panels' people: the same answer
106
- comp [--release <spec>] <feis> <code> [--year <y>] [--title <t>]
107
- a feis's own comp code to the comp it names, through that
108
- feis's syllabus (the prior year's only where the platform
109
- numbers every feis alike; elsewhere the title)
110
- syllabus [--release <spec>] <feis> [year]
111
- one feis-year's comps, in printed order
112
- syllabus [--release <spec>] --for <series> [year]
113
- a series' syllabus for a year: that year's where held,
114
- else the newest, saying which and what it is read from
115
- resolve comp [<feis> <code>] [--year <y>] [--title <t>]
116
- resolve dancer [<name>] [--school <s>] [--comp <feis>/<code> | --yob <y> | --band <b> --year <y>]
117
- [--order <o>] [--as-of <date>] [--population girls|boys]
118
- [--oireachtas <region>[:<year>]]
119
- resolve registrations
120
- JSONL out, one answer per line; with no positional the
121
- questions are JSONL on stdin, one per line (a comp:
122
- {feis, code, year?, title?}, a dancer: {name, school?, age?,
123
- population?, oireachtas?}, a registration: {name, school?,
124
- codes[], feis, year?, population?, oireachtas?})
125
-
126
- A query on the default spec prints one warning line on stderr when its release is older than
127
- the newest published one (the remote asked at most once per hour, <cache>/LATEST.json); the
128
- answer and the exit code are unchanged, and an offline check says nothing.
129
-
130
- Where the caller names local builds (a wrapper's option), a query with no --release answers
131
- from the newest COMPLETE build newer than the pinned release, and says so in one line on
132
- stderr; --release <spec> names a release, and --live forces the pinned one.
27
+ var USAGE_HEADER = "usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json] [--live]";
28
+ var GLOBAL_FLAGS = {
29
+ value: ["--cache", "--repo"],
30
+ bool: ["--json", "--live"]
31
+ };
32
+ var VERBS = [
33
+ {
34
+ verb: "config",
35
+ value: [],
36
+ bool: [],
37
+ usage: [
38
+ " config repo <owner/name> set the user-local repository the releases come from",
39
+ " config keep <N> how many of the newest releases a prune keeps (default 2)"
40
+ ]
41
+ },
42
+ {
43
+ verb: "list",
44
+ value: [],
45
+ bool: ["--remote"],
46
+ usage: [
47
+ " list [--remote] the cached releases (size, files, indexes, the pin), and",
48
+ " with --remote the published tags"
49
+ ]
50
+ },
51
+ {
52
+ verb: "fetch",
53
+ value: ["--release", "--assets"],
54
+ bool: [],
55
+ usage: [
56
+ " fetch [--release <spec>] [--assets results,majors,<file>...]",
57
+ " download, verify and cache a release (default: results)"
58
+ ]
59
+ },
60
+ {
61
+ verb: "update",
62
+ value: ["--assets", "--keep"],
63
+ bool: ["--no-prune"],
64
+ usage: [
65
+ " update [--assets ...] [--keep N] [--no-prune]",
66
+ " move to the newest published release: fetch it (verified),",
67
+ " build its indexes, pin it, then prune the cache to the N",
68
+ " newest releases (default: config keep, else 2), keeping the",
69
+ " new pin and the one before it"
70
+ ]
71
+ },
72
+ {
73
+ verb: "use",
74
+ value: ["--assets", "--keep"],
75
+ bool: ["--no-prune"],
76
+ usage: [
77
+ " use <spec> [--assets ...] [--keep N] [--no-prune]",
78
+ " the same for the release a spec names"
79
+ ]
80
+ },
81
+ {
82
+ verb: "pin",
83
+ value: [],
84
+ bool: [],
85
+ usage: [
86
+ ' pin <spec> the user-local pin: what a bare open (spec "pinned") opens'
87
+ ]
88
+ },
89
+ {
90
+ verb: "unpin",
91
+ value: [],
92
+ bool: [],
93
+ usage: [' unpin remove the pin (a bare open is then "latest")']
94
+ },
95
+ {
96
+ verb: "current",
97
+ value: [],
98
+ bool: [],
99
+ usage: [" current the pin, and whether it is cached"]
100
+ },
101
+ {
102
+ verb: "add",
103
+ value: ["--tag"],
104
+ bool: [],
105
+ usage: [
106
+ " add <dir> --tag <tag> add a release built locally (its MANIFEST.json and files)",
107
+ " to the cache under its tag"
108
+ ]
109
+ },
110
+ {
111
+ verb: "index",
112
+ value: ["--release"],
113
+ bool: ["--force"],
114
+ usage: [
115
+ " index [--release <spec>] [<name>...] [--force]",
116
+ " build the per-tag indexes (default: every one)"
117
+ ]
118
+ },
119
+ {
120
+ verb: "verify",
121
+ value: ["--release"],
122
+ bool: [],
123
+ usage: [" verify [--release <spec>] re-hash every cached file against its receipt"]
124
+ },
125
+ {
126
+ verb: "capabilities",
127
+ value: ["--release"],
128
+ bool: [],
129
+ usage: [
130
+ " capabilities [--release <spec>] what the release carries of what the client reads, from",
131
+ " its own schema: each feature full or missing (its calls",
132
+ " refuse, naming the first cut that publishes it)"
133
+ ]
134
+ },
135
+ {
136
+ verb: "prune",
137
+ value: ["--keep"],
138
+ bool: ["--dry-run"],
139
+ usage: [
140
+ " prune [--keep N] [--dry-run] remove all but the N newest cached releases (default:",
141
+ " config keep, else 2) and the pinned one"
142
+ ]
143
+ },
144
+ {
145
+ verb: "rm",
146
+ value: [],
147
+ bool: ["--dry-run"],
148
+ usage: [" rm <tag> [--dry-run] remove one cached release (not the pinned one)"]
149
+ },
150
+ {
151
+ verb: "drop-indexes",
152
+ value: [],
153
+ bool: ["--dry-run"],
154
+ usage: [
155
+ " drop-indexes [<tag>] [--dry-run] remove the index files (of one release, or of every one)"
156
+ ]
157
+ },
158
+ {
159
+ verb: "feis",
160
+ value: ["--release", "--platform", "--code", "--id", "--name", "--year"],
161
+ bool: [],
162
+ usage: [
163
+ " feis [--release <spec>] [--platform <p>] [--code <c>] [--id <id>] [--name <glob>] [--year <y>]",
164
+ " the feises a query names"
165
+ ]
166
+ },
167
+ {
168
+ verb: "series",
169
+ value: ["--release"],
170
+ bool: [],
171
+ usage: [
172
+ " series [--release <spec>] <name|host code|feis id>",
173
+ " the series a name, a host code (fweb:ABC) or any feis id",
174
+ " names: its years, hosts, codes and next instance"
175
+ ]
176
+ },
177
+ {
178
+ verb: "school",
179
+ value: ["--release", "--region"],
180
+ bool: [],
181
+ usage: [
182
+ " school [--release <spec>] <print|school_id> [--region <code>]",
183
+ " a school print or id to the published schools"
184
+ ]
185
+ },
186
+ {
187
+ verb: "dancer",
188
+ value: [
189
+ "--release",
190
+ "--surname",
191
+ "--like",
192
+ "--id",
193
+ "--order",
194
+ "--school",
195
+ "--yob",
196
+ "--band",
197
+ "--year",
198
+ "--comp",
199
+ "--as-of",
200
+ "--population",
201
+ "--oireachtas"
202
+ ],
203
+ bool: ["--rows"],
204
+ usage: [
205
+ " dancer [--release <spec>] <name> | --surname <s> | --like <glob> | --id <dancer_id>",
206
+ " [--order surname-first|given-first] [--school <print|id>]",
207
+ " [--yob <y> | --band <U10> [--year <y>] | --comp <competition>] [--as-of <date>]",
208
+ " [--population girls|boys] [--oireachtas <region>[:<year>]] [--rows]",
209
+ " the dancers a name reaches, each with its evidence",
210
+ " (name level, age, school, population, region) and the arm;",
211
+ " --oireachtas is the regional the roster is for, its region in",
212
+ " the release's spelling (SRO, MAO), its year the --as-of year",
213
+ " where none is given; the results of",
214
+ " the one dancer where one answers (or --rows for each)"
215
+ ]
216
+ },
217
+ {
218
+ verb: "results",
219
+ value: ["--release", "--dancer", "--feis", "--comp", "--school", "--year", "--limit"],
220
+ bool: [],
221
+ usage: [
222
+ " results [--release <spec>] [--dancer <id>] [--feis <id>] [--comp <competition>]",
223
+ " [--school <print|id>] [--year <y>] [--limit <n>]",
224
+ " the published result rows, prints and ids"
225
+ ]
226
+ },
227
+ {
228
+ verb: "majors",
229
+ value: ["--release", "--event", "--year", "--comp", "--dancer"],
230
+ bool: [],
231
+ usage: [
232
+ " majors [--release <spec>] [--event <e>] [--year <y>] [--comp <competition>] [--dancer <id>]",
233
+ " the majors: every event and its years; an event's",
234
+ " competitions; a competition's, an event's or a dancer's rows"
235
+ ]
236
+ },
237
+ {
238
+ verb: "stream",
239
+ value: [
240
+ "--release",
241
+ "--scope",
242
+ "--event",
243
+ "--year",
244
+ "--tier",
245
+ "--category",
246
+ "--level",
247
+ "--dancer",
248
+ "--school"
249
+ ],
250
+ bool: ["--entries", "--primary"],
251
+ usage: [
252
+ " stream [--release <spec>] --scope majors|transcribed|platform|all [--entries] [--event <e,...>]",
253
+ " [--year <y> | --year <from>..<to>] [--tier <t,...>] [--category <c,...>]",
254
+ " [--level <feis_level,...>] [--dancer <id,...>] [--school <school_id>] [--primary]",
255
+ " every row a scope holds, one JSON line each, never the",
256
+ " whole table in memory; --entries one per address (the row",
257
+ " it stands for, with its recall order)"
258
+ ]
259
+ },
260
+ {
261
+ verb: "records",
262
+ value: ["--release", "--dancer", "--year"],
263
+ bool: ["--years"],
264
+ usage: [
265
+ " records [--release <spec>] [--dancer <id,...>]",
266
+ " every dancer's record: display, appearances, birth window,",
267
+ " populations",
268
+ " records --years [--release <spec>] [--dancer <id,...>] [--year <y>]",
269
+ " each dancer's region, nationals and place per year"
270
+ ]
271
+ },
272
+ {
273
+ verb: "feis-dates",
274
+ value: ["--release"],
275
+ bool: [],
276
+ usage: [" feis-dates [--release <spec>] every feis's first and last day"]
277
+ },
278
+ {
279
+ verb: "tabulated",
280
+ value: ["--release", "--min-round"],
281
+ bool: [],
282
+ usage: [
283
+ " tabulated [--release <spec>] [--min-round <n>]",
284
+ " the majors addresses the marks sheets tabulate to round n",
285
+ " or later (default 3)"
286
+ ]
287
+ },
288
+ {
289
+ verb: "teams",
290
+ value: ["--release", "--event", "--year"],
291
+ bool: ["--rosters", "--joins"],
292
+ usage: [
293
+ " teams [--release <spec>] [--event <e>] [--year <y>] [--rosters | --joins]",
294
+ " the team result rows of an event-year; with --rosters its",
295
+ " roster teams and their dancers; with --joins how each roster",
296
+ " team meets the results"
297
+ ]
298
+ },
299
+ {
300
+ verb: "events",
301
+ value: ["--release", "--event", "--year"],
302
+ bool: [],
303
+ usage: [
304
+ " events [--release <spec>] [--event <e>] [--year <y>]",
305
+ " each event-year's dates and place"
306
+ ]
307
+ },
308
+ {
309
+ verb: "teacher",
310
+ value: ["--release"],
311
+ bool: [],
312
+ usage: [
313
+ " teacher [--release <spec>] <name|TD number>",
314
+ " the staff lists' people: where they taught, the register,",
315
+ " where they sat"
316
+ ]
317
+ },
318
+ {
319
+ verb: "adjudicator",
320
+ value: ["--release"],
321
+ bool: [],
322
+ usage: [
323
+ " adjudicator [--release <spec>] <name|TD number>",
324
+ " the register's and the panels' people: the same answer"
325
+ ]
326
+ },
327
+ {
328
+ verb: "comp",
329
+ value: ["--release", "--year", "--title"],
330
+ bool: [],
331
+ usage: [
332
+ " comp [--release <spec>] <feis> <code> [--year <y>] [--title <t>]",
333
+ " a feis's own comp code to the comp it names, through that",
334
+ " feis's syllabus (the prior year's only where the platform",
335
+ " numbers every feis alike; elsewhere the title)"
336
+ ]
337
+ },
338
+ {
339
+ verb: "syllabus",
340
+ value: ["--release", "--for"],
341
+ bool: [],
342
+ usage: [
343
+ " syllabus [--release <spec>] <feis> [year]",
344
+ " one feis-year's comps, in printed order",
345
+ " syllabus [--release <spec>] --for <series> [year]",
346
+ " a series' syllabus for a year: that year's where held,",
347
+ " else the newest, saying which and what it is read from"
348
+ ]
349
+ },
350
+ {
351
+ verb: "resolve",
352
+ value: [
353
+ "--year",
354
+ "--title",
355
+ "--school",
356
+ "--comp",
357
+ "--yob",
358
+ "--band",
359
+ "--order",
360
+ "--as-of",
361
+ "--population",
362
+ "--oireachtas"
363
+ ],
364
+ bool: [],
365
+ usage: [
366
+ " resolve comp [<feis> <code>] [--year <y>] [--title <t>]",
367
+ " resolve dancer [<name>] [--school <s>] [--comp <feis>/<code> | --yob <y> | --band <b> --year <y>]",
368
+ " [--order <o>] [--as-of <date>] [--population girls|boys]",
369
+ " [--oireachtas <region>[:<year>]]",
370
+ " resolve registrations",
371
+ " JSONL out, one answer per line; with no positional the",
372
+ " questions are JSONL on stdin, one per line (a comp:",
373
+ " {feis, code, year?, title?}, a dancer: {name, school?, age?,",
374
+ " population?, oireachtas?}, a registration: {name, school?,",
375
+ " codes[], feis, year?, population?, oireachtas?})"
376
+ ]
377
+ }
378
+ ];
379
+ var USAGE_FOOTER = [
380
+ " A query on the default spec prints one warning line on stderr when its release is older than",
381
+ " the newest published one (the remote asked at most once per hour, <cache>/LATEST.json); the",
382
+ " answer and the exit code are unchanged, and an offline check says nothing.",
383
+ "",
384
+ " Where the caller names local builds (a wrapper's option), a query with no --release answers",
385
+ " from the newest COMPLETE build newer than the pinned release, and says so in one line on",
386
+ " stderr; --release <spec> names a release, and --live forces the pinned one.",
387
+ "",
388
+ " <spec>: pinned (the default) | latest | a cut (42, 42.1) | a tag (archive-YYYY.MM.DD-N)"
389
+ ];
390
+ function renderUsage() {
391
+ return [USAGE_HEADER, "", ...VERBS.flatMap((v) => v.usage), "", ...USAGE_FOOTER].join(`
392
+ `);
393
+ }
394
+ function valueFlags() {
395
+ return new Set([...GLOBAL_FLAGS.value, ...VERBS.flatMap((v) => v.value)]);
396
+ }
133
397
 
134
- <spec>: pinned (the default) | latest | a cut (42, 42.1) | a tag (archive-YYYY.MM.DD-N)`;
135
- var VALUE = new Set([
136
- "--cache",
137
- "--repo",
138
- "--release",
139
- "--assets",
140
- "--tag",
141
- "--keep",
142
- "--platform",
143
- "--code",
144
- "--id",
145
- "--name",
146
- "--year",
147
- "--region",
148
- "--order",
149
- "--surname",
150
- "--like",
151
- "--school",
152
- "--yob",
153
- "--band",
154
- "--comp",
155
- "--as-of",
156
- "--population",
157
- "--oireachtas",
158
- "--dancer",
159
- "--feis",
160
- "--limit",
161
- "--event",
162
- "--title",
163
- "--for",
164
- "--scope",
165
- "--tier",
166
- "--category",
167
- "--level",
168
- "--min-round"
169
- ]);
398
+ var USAGE = renderUsage();
399
+ var VALUE = valueFlags();
170
400
  function parseArgs(argv) {
171
401
  const positional = [];
172
402
  const flags = new Map;
@@ -1080,9 +1310,15 @@ async function main(argv, io = {}) {
1080
1310
  if (import.meta.main)
1081
1311
  process.exit(await main(process.argv.slice(2)));
1082
1312
  export {
1313
+ GLOBAL_FLAGS,
1083
1314
  USAGE,
1315
+ USAGE_FOOTER,
1316
+ USAGE_HEADER,
1317
+ VERBS,
1084
1318
  jsonLines,
1085
1319
  main,
1086
1320
  parseArgs,
1087
- streamQueryOf
1321
+ renderUsage,
1322
+ streamQueryOf,
1323
+ valueFlags
1088
1324
  };
@@ -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>;
@@ -3,7 +3,8 @@ 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
- export declare const USAGE = "usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json] [--live]\n\n config repo <owner/name> set the user-local repository the releases come from\n config keep <N> how many of the newest releases a prune keeps (default 2)\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 update [--assets ...] [--keep N] [--no-prune]\n move to the newest published release: fetch it (verified),\n build its indexes, pin it, then prune the cache to the N\n newest releases (default: config keep, else 2), keeping the\n new pin and the one before it\n use <spec> [--assets ...] [--keep N] [--no-prune]\n the same for the release a spec names\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:\n config keep, else 2) 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 A query on the default spec prints one warning line on stderr when its release is older than\n the newest published one (the remote asked at most once per hour, <cache>/LATEST.json); the\n answer and the exit code are unchanged, and an offline check says nothing.\n\n Where the caller names local builds (a wrapper's option), a query with no --release answers\n from the newest COMPLETE build newer than the pinned release, and says so in one line on\n stderr; --release <spec> names a release, and --live forces the pinned one.\n\n <spec>: pinned (the default) | latest | a cut (42, 42.1) | a tag (archive-YYYY.MM.DD-N)";
6
+ export { GLOBAL_FLAGS, USAGE_FOOTER, USAGE_HEADER, VERBS, type VerbSpec, renderUsage, valueFlags, } from "./cli-spec.js";
7
+ export declare const USAGE: string;
7
8
  export interface Parsed {
8
9
  positional: string[];
9
10
  flags: Map<string, string>;
@@ -36,4 +37,3 @@ export declare function main(argv: readonly string[], io?: {
36
37
  freshness?: FreshnessIO | false;
37
38
  local?: LocalIO | false;
38
39
  }): Promise<number>;
39
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finbheara/archive-client",
3
- "version": "0.23.0",
3
+ "version": "0.24.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",