keepset 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 +1 -1
- package/dist/{bundled-BKl0C7kF.js → bundled-Dkvod55t.js} +421 -37
- package/dist/{categories-BGjPWXpS.d.ts → categories-zC2eMs6y.d.ts} +237 -92
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node/fetch-dataset.d.ts +4 -1
- package/dist/node/fetch-dataset.js +320 -21
- package/dist-cli/keepset.mjs +1 -1
- package/package.json +1 -1
- package/schemas/entry.schema.json +1 -1
- package/schemas/manifest.schema.json +1 -1
|
@@ -70,28 +70,29 @@ declare const ArchiveMemberSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
70
70
|
extensions: z.ZodArray<z.ZodString>;
|
|
71
71
|
}, z.core.$strict>]>;
|
|
72
72
|
type ArchiveMember = z.infer<typeof ArchiveMemberSchema>;
|
|
73
|
-
/** How the downloaded bytes unpack into the
|
|
74
|
-
declare const ArchiveSchema: z.
|
|
73
|
+
/** How the downloaded bytes unpack into the file the parser reads, or for a collection the files it reads one by one. A `members` selector gives every member it matches, at least one, in path order. A workbook (`xlsx`) is read as the CSV of its named sheet, with dates as ISO 8601 text, for the `csv-table` parser. */
|
|
74
|
+
declare const ArchiveSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
75
75
|
kind: z.ZodLiteral<"none">;
|
|
76
76
|
}, z.core.$strict>, z.ZodObject<{
|
|
77
77
|
kind: z.ZodLiteral<"gzip">;
|
|
78
78
|
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
-
kind: z.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}, z.core.$strict>]>;
|
|
85
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
-
kind: z.ZodLiteral<"tar">;
|
|
79
|
+
kind: z.ZodEnum<{
|
|
80
|
+
zip: "zip";
|
|
81
|
+
tar: "tar";
|
|
82
|
+
"tar.gz": "tar.gz";
|
|
83
|
+
}>;
|
|
87
84
|
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
88
85
|
path: z.ZodString;
|
|
89
86
|
}, z.core.$strict>, z.ZodObject<{
|
|
90
87
|
extensions: z.ZodArray<z.ZodString>;
|
|
91
88
|
}, z.core.$strict>]>;
|
|
92
89
|
}, z.core.$strict>, z.ZodObject<{
|
|
93
|
-
kind: z.
|
|
94
|
-
|
|
90
|
+
kind: z.ZodEnum<{
|
|
91
|
+
zip: "zip";
|
|
92
|
+
tar: "tar";
|
|
93
|
+
"tar.gz": "tar.gz";
|
|
94
|
+
}>;
|
|
95
|
+
members: z.ZodUnion<readonly [z.ZodObject<{
|
|
95
96
|
path: z.ZodString;
|
|
96
97
|
}, z.core.$strict>, z.ZodObject<{
|
|
97
98
|
extensions: z.ZodArray<z.ZodString>;
|
|
@@ -99,7 +100,7 @@ declare const ArchiveSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
99
100
|
}, z.core.$strict>, z.ZodObject<{
|
|
100
101
|
kind: z.ZodLiteral<"xlsx">;
|
|
101
102
|
sheet: z.ZodString;
|
|
102
|
-
}, z.core.$strict>]
|
|
103
|
+
}, z.core.$strict>]>;
|
|
103
104
|
type Archive = z.infer<typeof ArchiveSchema>;
|
|
104
105
|
/** A column of a table as the table parser names it: the header with every run of characters outside letters, digits and underscore replaced by one underscore, so it is a valid segment of a twindex path. */
|
|
105
106
|
declare const ColumnNameSchema: z.ZodString;
|
|
@@ -139,6 +140,24 @@ declare const ParserSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
139
140
|
"utf-8": "utf-8";
|
|
140
141
|
latin1: "latin1";
|
|
141
142
|
}>;
|
|
143
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
144
|
+
format: z.ZodLiteral<"solomon">;
|
|
145
|
+
encoding: z.ZodEnum<{
|
|
146
|
+
"utf-8": "utf-8";
|
|
147
|
+
latin1: "latin1";
|
|
148
|
+
}>;
|
|
149
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
150
|
+
format: z.ZodLiteral<"top">;
|
|
151
|
+
encoding: z.ZodEnum<{
|
|
152
|
+
"utf-8": "utf-8";
|
|
153
|
+
latin1: "latin1";
|
|
154
|
+
}>;
|
|
155
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
156
|
+
format: z.ZodLiteral<"toptw">;
|
|
157
|
+
encoding: z.ZodEnum<{
|
|
158
|
+
"utf-8": "utf-8";
|
|
159
|
+
latin1: "latin1";
|
|
160
|
+
}>;
|
|
142
161
|
}, z.core.$strict>, z.ZodObject<{
|
|
143
162
|
format: z.ZodLiteral<"csv-table">;
|
|
144
163
|
encoding: z.ZodEnum<{
|
|
@@ -187,27 +206,28 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
187
206
|
kind: z.ZodLiteral<"openfema">;
|
|
188
207
|
pageSize: z.ZodInt;
|
|
189
208
|
}, z.core.$strict>], "kind">>;
|
|
190
|
-
archive: z.
|
|
209
|
+
archive: z.ZodUnion<readonly [z.ZodObject<{
|
|
191
210
|
kind: z.ZodLiteral<"none">;
|
|
192
211
|
}, z.core.$strict>, z.ZodObject<{
|
|
193
212
|
kind: z.ZodLiteral<"gzip">;
|
|
194
213
|
}, z.core.$strict>, z.ZodObject<{
|
|
195
|
-
kind: z.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}, z.core.$strict>]>;
|
|
201
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
202
|
-
kind: z.ZodLiteral<"tar">;
|
|
214
|
+
kind: z.ZodEnum<{
|
|
215
|
+
zip: "zip";
|
|
216
|
+
tar: "tar";
|
|
217
|
+
"tar.gz": "tar.gz";
|
|
218
|
+
}>;
|
|
203
219
|
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
204
220
|
path: z.ZodString;
|
|
205
221
|
}, z.core.$strict>, z.ZodObject<{
|
|
206
222
|
extensions: z.ZodArray<z.ZodString>;
|
|
207
223
|
}, z.core.$strict>]>;
|
|
208
224
|
}, z.core.$strict>, z.ZodObject<{
|
|
209
|
-
kind: z.
|
|
210
|
-
|
|
225
|
+
kind: z.ZodEnum<{
|
|
226
|
+
zip: "zip";
|
|
227
|
+
tar: "tar";
|
|
228
|
+
"tar.gz": "tar.gz";
|
|
229
|
+
}>;
|
|
230
|
+
members: z.ZodUnion<readonly [z.ZodObject<{
|
|
211
231
|
path: z.ZodString;
|
|
212
232
|
}, z.core.$strict>, z.ZodObject<{
|
|
213
233
|
extensions: z.ZodArray<z.ZodString>;
|
|
@@ -215,7 +235,7 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
215
235
|
}, z.core.$strict>, z.ZodObject<{
|
|
216
236
|
kind: z.ZodLiteral<"xlsx">;
|
|
217
237
|
sheet: z.ZodString;
|
|
218
|
-
}, z.core.$strict>]
|
|
238
|
+
}, z.core.$strict>]>;
|
|
219
239
|
parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
220
240
|
format: z.ZodLiteral<"edge-list">;
|
|
221
241
|
encoding: z.ZodEnum<{
|
|
@@ -251,6 +271,24 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
251
271
|
"utf-8": "utf-8";
|
|
252
272
|
latin1: "latin1";
|
|
253
273
|
}>;
|
|
274
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
275
|
+
format: z.ZodLiteral<"solomon">;
|
|
276
|
+
encoding: z.ZodEnum<{
|
|
277
|
+
"utf-8": "utf-8";
|
|
278
|
+
latin1: "latin1";
|
|
279
|
+
}>;
|
|
280
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
281
|
+
format: z.ZodLiteral<"top">;
|
|
282
|
+
encoding: z.ZodEnum<{
|
|
283
|
+
"utf-8": "utf-8";
|
|
284
|
+
latin1: "latin1";
|
|
285
|
+
}>;
|
|
286
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
287
|
+
format: z.ZodLiteral<"toptw">;
|
|
288
|
+
encoding: z.ZodEnum<{
|
|
289
|
+
"utf-8": "utf-8";
|
|
290
|
+
latin1: "latin1";
|
|
291
|
+
}>;
|
|
254
292
|
}, z.core.$strict>, z.ZodObject<{
|
|
255
293
|
format: z.ZodLiteral<"csv-table">;
|
|
256
294
|
encoding: z.ZodEnum<{
|
|
@@ -309,6 +347,7 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
309
347
|
category: z.ZodEnum<{
|
|
310
348
|
"graph/v1": "graph/v1";
|
|
311
349
|
"or/v1": "or/v1";
|
|
350
|
+
"or-set/v1": "or-set/v1";
|
|
312
351
|
}>;
|
|
313
352
|
sources: z.ZodArray<z.ZodObject<{
|
|
314
353
|
url: z.ZodURL;
|
|
@@ -353,27 +392,28 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
353
392
|
kind: z.ZodLiteral<"openfema">;
|
|
354
393
|
pageSize: z.ZodInt;
|
|
355
394
|
}, z.core.$strict>], "kind">>;
|
|
356
|
-
archive: z.
|
|
395
|
+
archive: z.ZodUnion<readonly [z.ZodObject<{
|
|
357
396
|
kind: z.ZodLiteral<"none">;
|
|
358
397
|
}, z.core.$strict>, z.ZodObject<{
|
|
359
398
|
kind: z.ZodLiteral<"gzip">;
|
|
360
399
|
}, z.core.$strict>, z.ZodObject<{
|
|
361
|
-
kind: z.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}, z.core.$strict>]>;
|
|
367
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
368
|
-
kind: z.ZodLiteral<"tar">;
|
|
400
|
+
kind: z.ZodEnum<{
|
|
401
|
+
zip: "zip";
|
|
402
|
+
tar: "tar";
|
|
403
|
+
"tar.gz": "tar.gz";
|
|
404
|
+
}>;
|
|
369
405
|
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
370
406
|
path: z.ZodString;
|
|
371
407
|
}, z.core.$strict>, z.ZodObject<{
|
|
372
408
|
extensions: z.ZodArray<z.ZodString>;
|
|
373
409
|
}, z.core.$strict>]>;
|
|
374
410
|
}, z.core.$strict>, z.ZodObject<{
|
|
375
|
-
kind: z.
|
|
376
|
-
|
|
411
|
+
kind: z.ZodEnum<{
|
|
412
|
+
zip: "zip";
|
|
413
|
+
tar: "tar";
|
|
414
|
+
"tar.gz": "tar.gz";
|
|
415
|
+
}>;
|
|
416
|
+
members: z.ZodUnion<readonly [z.ZodObject<{
|
|
377
417
|
path: z.ZodString;
|
|
378
418
|
}, z.core.$strict>, z.ZodObject<{
|
|
379
419
|
extensions: z.ZodArray<z.ZodString>;
|
|
@@ -381,7 +421,7 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
381
421
|
}, z.core.$strict>, z.ZodObject<{
|
|
382
422
|
kind: z.ZodLiteral<"xlsx">;
|
|
383
423
|
sheet: z.ZodString;
|
|
384
|
-
}, z.core.$strict>]
|
|
424
|
+
}, z.core.$strict>]>;
|
|
385
425
|
parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
386
426
|
format: z.ZodLiteral<"edge-list">;
|
|
387
427
|
encoding: z.ZodEnum<{
|
|
@@ -417,6 +457,24 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
417
457
|
"utf-8": "utf-8";
|
|
418
458
|
latin1: "latin1";
|
|
419
459
|
}>;
|
|
460
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
461
|
+
format: z.ZodLiteral<"solomon">;
|
|
462
|
+
encoding: z.ZodEnum<{
|
|
463
|
+
"utf-8": "utf-8";
|
|
464
|
+
latin1: "latin1";
|
|
465
|
+
}>;
|
|
466
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
467
|
+
format: z.ZodLiteral<"top">;
|
|
468
|
+
encoding: z.ZodEnum<{
|
|
469
|
+
"utf-8": "utf-8";
|
|
470
|
+
latin1: "latin1";
|
|
471
|
+
}>;
|
|
472
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
473
|
+
format: z.ZodLiteral<"toptw">;
|
|
474
|
+
encoding: z.ZodEnum<{
|
|
475
|
+
"utf-8": "utf-8";
|
|
476
|
+
latin1: "latin1";
|
|
477
|
+
}>;
|
|
420
478
|
}, z.core.$strict>, z.ZodObject<{
|
|
421
479
|
format: z.ZodLiteral<"csv-table">;
|
|
422
480
|
encoding: z.ZodEnum<{
|
|
@@ -463,7 +521,7 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
463
521
|
id: string;
|
|
464
522
|
name: string;
|
|
465
523
|
tags: string[];
|
|
466
|
-
category: "graph/v1" | "or/v1";
|
|
524
|
+
category: "graph/v1" | "or/v1" | "or-set/v1";
|
|
467
525
|
sources: {
|
|
468
526
|
url: string;
|
|
469
527
|
retrieved: string;
|
|
@@ -492,25 +550,18 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
492
550
|
status: "fetchable";
|
|
493
551
|
source: number;
|
|
494
552
|
archive: {
|
|
495
|
-
kind: "
|
|
496
|
-
|
|
497
|
-
kind: "gzip";
|
|
498
|
-
} | {
|
|
499
|
-
kind: "zip";
|
|
500
|
-
member: {
|
|
553
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
554
|
+
members: {
|
|
501
555
|
path: string;
|
|
502
556
|
} | {
|
|
503
557
|
extensions: string[];
|
|
504
558
|
};
|
|
505
559
|
} | {
|
|
506
|
-
kind: "
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
} | {
|
|
510
|
-
extensions: string[];
|
|
511
|
-
};
|
|
560
|
+
kind: "none";
|
|
561
|
+
} | {
|
|
562
|
+
kind: "gzip";
|
|
512
563
|
} | {
|
|
513
|
-
kind: "tar.gz";
|
|
564
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
514
565
|
member: {
|
|
515
566
|
path: string;
|
|
516
567
|
} | {
|
|
@@ -559,6 +610,15 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
559
610
|
} | {
|
|
560
611
|
format: "pajek";
|
|
561
612
|
encoding: "utf-8" | "latin1";
|
|
613
|
+
} | {
|
|
614
|
+
format: "solomon";
|
|
615
|
+
encoding: "utf-8" | "latin1";
|
|
616
|
+
} | {
|
|
617
|
+
format: "top";
|
|
618
|
+
encoding: "utf-8" | "latin1";
|
|
619
|
+
} | {
|
|
620
|
+
format: "toptw";
|
|
621
|
+
encoding: "utf-8" | "latin1";
|
|
562
622
|
};
|
|
563
623
|
paging?: {
|
|
564
624
|
kind: "arcgis-query";
|
|
@@ -692,6 +752,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
692
752
|
category: z.ZodEnum<{
|
|
693
753
|
"graph/v1": "graph/v1";
|
|
694
754
|
"or/v1": "or/v1";
|
|
755
|
+
"or-set/v1": "or-set/v1";
|
|
695
756
|
}>;
|
|
696
757
|
sources: z.ZodArray<z.ZodObject<{
|
|
697
758
|
url: z.ZodURL;
|
|
@@ -736,27 +797,28 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
736
797
|
kind: z.ZodLiteral<"openfema">;
|
|
737
798
|
pageSize: z.ZodInt;
|
|
738
799
|
}, z.core.$strict>], "kind">>;
|
|
739
|
-
archive: z.
|
|
800
|
+
archive: z.ZodUnion<readonly [z.ZodObject<{
|
|
740
801
|
kind: z.ZodLiteral<"none">;
|
|
741
802
|
}, z.core.$strict>, z.ZodObject<{
|
|
742
803
|
kind: z.ZodLiteral<"gzip">;
|
|
743
804
|
}, z.core.$strict>, z.ZodObject<{
|
|
744
|
-
kind: z.
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
}, z.core.$strict>]>;
|
|
750
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
751
|
-
kind: z.ZodLiteral<"tar">;
|
|
805
|
+
kind: z.ZodEnum<{
|
|
806
|
+
zip: "zip";
|
|
807
|
+
tar: "tar";
|
|
808
|
+
"tar.gz": "tar.gz";
|
|
809
|
+
}>;
|
|
752
810
|
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
753
811
|
path: z.ZodString;
|
|
754
812
|
}, z.core.$strict>, z.ZodObject<{
|
|
755
813
|
extensions: z.ZodArray<z.ZodString>;
|
|
756
814
|
}, z.core.$strict>]>;
|
|
757
815
|
}, z.core.$strict>, z.ZodObject<{
|
|
758
|
-
kind: z.
|
|
759
|
-
|
|
816
|
+
kind: z.ZodEnum<{
|
|
817
|
+
zip: "zip";
|
|
818
|
+
tar: "tar";
|
|
819
|
+
"tar.gz": "tar.gz";
|
|
820
|
+
}>;
|
|
821
|
+
members: z.ZodUnion<readonly [z.ZodObject<{
|
|
760
822
|
path: z.ZodString;
|
|
761
823
|
}, z.core.$strict>, z.ZodObject<{
|
|
762
824
|
extensions: z.ZodArray<z.ZodString>;
|
|
@@ -764,7 +826,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
764
826
|
}, z.core.$strict>, z.ZodObject<{
|
|
765
827
|
kind: z.ZodLiteral<"xlsx">;
|
|
766
828
|
sheet: z.ZodString;
|
|
767
|
-
}, z.core.$strict>]
|
|
829
|
+
}, z.core.$strict>]>;
|
|
768
830
|
parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
769
831
|
format: z.ZodLiteral<"edge-list">;
|
|
770
832
|
encoding: z.ZodEnum<{
|
|
@@ -800,6 +862,24 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
800
862
|
"utf-8": "utf-8";
|
|
801
863
|
latin1: "latin1";
|
|
802
864
|
}>;
|
|
865
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
866
|
+
format: z.ZodLiteral<"solomon">;
|
|
867
|
+
encoding: z.ZodEnum<{
|
|
868
|
+
"utf-8": "utf-8";
|
|
869
|
+
latin1: "latin1";
|
|
870
|
+
}>;
|
|
871
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
872
|
+
format: z.ZodLiteral<"top">;
|
|
873
|
+
encoding: z.ZodEnum<{
|
|
874
|
+
"utf-8": "utf-8";
|
|
875
|
+
latin1: "latin1";
|
|
876
|
+
}>;
|
|
877
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
878
|
+
format: z.ZodLiteral<"toptw">;
|
|
879
|
+
encoding: z.ZodEnum<{
|
|
880
|
+
"utf-8": "utf-8";
|
|
881
|
+
latin1: "latin1";
|
|
882
|
+
}>;
|
|
803
883
|
}, z.core.$strict>, z.ZodObject<{
|
|
804
884
|
format: z.ZodLiteral<"csv-table">;
|
|
805
885
|
encoding: z.ZodEnum<{
|
|
@@ -846,7 +926,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
846
926
|
id: string;
|
|
847
927
|
name: string;
|
|
848
928
|
tags: string[];
|
|
849
|
-
category: "graph/v1" | "or/v1";
|
|
929
|
+
category: "graph/v1" | "or/v1" | "or-set/v1";
|
|
850
930
|
sources: {
|
|
851
931
|
url: string;
|
|
852
932
|
retrieved: string;
|
|
@@ -875,25 +955,18 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
875
955
|
status: "fetchable";
|
|
876
956
|
source: number;
|
|
877
957
|
archive: {
|
|
878
|
-
kind: "
|
|
879
|
-
|
|
880
|
-
kind: "gzip";
|
|
881
|
-
} | {
|
|
882
|
-
kind: "zip";
|
|
883
|
-
member: {
|
|
958
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
959
|
+
members: {
|
|
884
960
|
path: string;
|
|
885
961
|
} | {
|
|
886
962
|
extensions: string[];
|
|
887
963
|
};
|
|
888
964
|
} | {
|
|
889
|
-
kind: "
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
} | {
|
|
893
|
-
extensions: string[];
|
|
894
|
-
};
|
|
965
|
+
kind: "none";
|
|
966
|
+
} | {
|
|
967
|
+
kind: "gzip";
|
|
895
968
|
} | {
|
|
896
|
-
kind: "tar.gz";
|
|
969
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
897
970
|
member: {
|
|
898
971
|
path: string;
|
|
899
972
|
} | {
|
|
@@ -942,6 +1015,15 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
942
1015
|
} | {
|
|
943
1016
|
format: "pajek";
|
|
944
1017
|
encoding: "utf-8" | "latin1";
|
|
1018
|
+
} | {
|
|
1019
|
+
format: "solomon";
|
|
1020
|
+
encoding: "utf-8" | "latin1";
|
|
1021
|
+
} | {
|
|
1022
|
+
format: "top";
|
|
1023
|
+
encoding: "utf-8" | "latin1";
|
|
1024
|
+
} | {
|
|
1025
|
+
format: "toptw";
|
|
1026
|
+
encoding: "utf-8" | "latin1";
|
|
945
1027
|
};
|
|
946
1028
|
paging?: {
|
|
947
1029
|
kind: "arcgis-query";
|
|
@@ -991,7 +1073,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
991
1073
|
id: string;
|
|
992
1074
|
name: string;
|
|
993
1075
|
tags: string[];
|
|
994
|
-
category: "graph/v1" | "or/v1";
|
|
1076
|
+
category: "graph/v1" | "or/v1" | "or-set/v1";
|
|
995
1077
|
sources: {
|
|
996
1078
|
url: string;
|
|
997
1079
|
retrieved: string;
|
|
@@ -1020,25 +1102,18 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1020
1102
|
status: "fetchable";
|
|
1021
1103
|
source: number;
|
|
1022
1104
|
archive: {
|
|
1023
|
-
kind: "
|
|
1024
|
-
|
|
1025
|
-
kind: "gzip";
|
|
1026
|
-
} | {
|
|
1027
|
-
kind: "zip";
|
|
1028
|
-
member: {
|
|
1105
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
1106
|
+
members: {
|
|
1029
1107
|
path: string;
|
|
1030
1108
|
} | {
|
|
1031
1109
|
extensions: string[];
|
|
1032
1110
|
};
|
|
1033
1111
|
} | {
|
|
1034
|
-
kind: "
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
} | {
|
|
1038
|
-
extensions: string[];
|
|
1039
|
-
};
|
|
1112
|
+
kind: "none";
|
|
1113
|
+
} | {
|
|
1114
|
+
kind: "gzip";
|
|
1040
1115
|
} | {
|
|
1041
|
-
kind: "tar.gz";
|
|
1116
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
1042
1117
|
member: {
|
|
1043
1118
|
path: string;
|
|
1044
1119
|
} | {
|
|
@@ -1087,6 +1162,15 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1087
1162
|
} | {
|
|
1088
1163
|
format: "pajek";
|
|
1089
1164
|
encoding: "utf-8" | "latin1";
|
|
1165
|
+
} | {
|
|
1166
|
+
format: "solomon";
|
|
1167
|
+
encoding: "utf-8" | "latin1";
|
|
1168
|
+
} | {
|
|
1169
|
+
format: "top";
|
|
1170
|
+
encoding: "utf-8" | "latin1";
|
|
1171
|
+
} | {
|
|
1172
|
+
format: "toptw";
|
|
1173
|
+
encoding: "utf-8" | "latin1";
|
|
1090
1174
|
};
|
|
1091
1175
|
paging?: {
|
|
1092
1176
|
kind: "arcgis-query";
|
|
@@ -1222,6 +1306,62 @@ declare const GraphV1Schema: z.ZodObject<{
|
|
|
1222
1306
|
};
|
|
1223
1307
|
type GraphV1 = z.infer<typeof GraphV1Schema>;
|
|
1224
1308
|
//#endregion
|
|
1309
|
+
//#region src/targets/or-set-v1.d.ts
|
|
1310
|
+
/**
|
|
1311
|
+
* The or-set/v1 normalisation target: `{ meta, instances }`, a collection of operations-research instances such as a benchmark suite, each instance an or/v1 document (`{ meta, nodes }`) under an id of its own. Beyond the shapes it checks that instance ids are unique in the set and node ids unique within each instance. A node id need not be unique across instances, because every instance numbers its own nodes.
|
|
1312
|
+
*/
|
|
1313
|
+
declare const OrSetV1Schema: z.ZodObject<{
|
|
1314
|
+
meta: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, unknown>;
|
|
1315
|
+
instances: z.ZodArray<z.ZodObject<{
|
|
1316
|
+
id: z.ZodString;
|
|
1317
|
+
meta: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, unknown>;
|
|
1318
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
1319
|
+
id: z.ZodString;
|
|
1320
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1321
|
+
lon: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1322
|
+
x: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1323
|
+
y: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1324
|
+
prize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1325
|
+
prizeProbability: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1326
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1327
|
+
travelTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1328
|
+
skill: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1329
|
+
territory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1330
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1331
|
+
opened: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1332
|
+
closed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1333
|
+
deadline: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
1334
|
+
}, z.core.$loose>>;
|
|
1335
|
+
}, z.core.$strict>>;
|
|
1336
|
+
}, z.core.$strict> & {
|
|
1337
|
+
is: (value: unknown) => value is {
|
|
1338
|
+
meta: Record<string, string | number | boolean | null>;
|
|
1339
|
+
instances: {
|
|
1340
|
+
id: string;
|
|
1341
|
+
meta: Record<string, string | number | boolean | null>;
|
|
1342
|
+
nodes: {
|
|
1343
|
+
[x: string]: unknown;
|
|
1344
|
+
id: string;
|
|
1345
|
+
lat?: number | null | undefined;
|
|
1346
|
+
lon?: number | null | undefined;
|
|
1347
|
+
x?: number | null | undefined;
|
|
1348
|
+
y?: number | null | undefined;
|
|
1349
|
+
prize?: number | null | undefined;
|
|
1350
|
+
prizeProbability?: number | null | undefined;
|
|
1351
|
+
duration?: number | null | undefined;
|
|
1352
|
+
travelTime?: number | null | undefined;
|
|
1353
|
+
skill?: string | null | undefined;
|
|
1354
|
+
territory?: string | null | undefined;
|
|
1355
|
+
status?: string | null | undefined;
|
|
1356
|
+
opened?: string | null | undefined;
|
|
1357
|
+
closed?: string | null | undefined;
|
|
1358
|
+
deadline?: string | number | null | undefined;
|
|
1359
|
+
}[];
|
|
1360
|
+
}[];
|
|
1361
|
+
};
|
|
1362
|
+
};
|
|
1363
|
+
type OrSetV1 = z.infer<typeof OrSetV1Schema>;
|
|
1364
|
+
//#endregion
|
|
1225
1365
|
//#region src/targets/or-v1.d.ts
|
|
1226
1366
|
/**
|
|
1227
1367
|
* A node of an operations-research instance: a place or case a route may visit, flat so a twindex crosswalk can map a table's columns onto it (a wildcard path must keep the same shape on both sides). The target fixes only what the datasets share and lets a crosswalk map any further column through under its own name, as graph/v1 does. `lat` and `lon` are WGS84 degrees and `x` and `y` are planar coordinates in the dataset's own system; `duration` and `travelTime` are seconds, `prize` is the dataset's own reward measure, and `prizeProbability` is the chance the reward is collected. `skill` and `territory` name what is needed to serve the node and where it sits, `status` is where it is in its lifecycle, and `opened`, `closed` and `deadline` are its lifecycle times as the source writes them, a deadline being a number where the source gives a time of day.
|
|
@@ -1296,21 +1436,26 @@ type OrV1 = z.infer<typeof OrV1Schema>;
|
|
|
1296
1436
|
declare const CategoryIdSchema: z.ZodEnum<{
|
|
1297
1437
|
"graph/v1": "graph/v1";
|
|
1298
1438
|
"or/v1": "or/v1";
|
|
1439
|
+
"or-set/v1": "or-set/v1";
|
|
1299
1440
|
}>;
|
|
1300
1441
|
type CategoryId = z.infer<typeof CategoryIdSchema>;
|
|
1301
1442
|
/** The normalisation target each category resolves to, keyed by category id. */
|
|
1302
1443
|
interface CategoryTargets {
|
|
1303
1444
|
readonly "graph/v1": GraphV1;
|
|
1304
1445
|
readonly "or/v1": OrV1;
|
|
1446
|
+
readonly "or-set/v1": OrSetV1;
|
|
1305
1447
|
}
|
|
1306
1448
|
/** The normalised shape of any category: what `fetchDataset` can resolve to. */
|
|
1307
1449
|
type CategoryTarget = CategoryTargets[CategoryId];
|
|
1308
1450
|
/** The keys of a target whose values are arrays: the collections an entry's `expectedCounts` may name. */
|
|
1309
1451
|
type CountedKey<Target> = { readonly [Key in keyof Target]: Target[Key] extends readonly unknown[] ? Key : never; }[keyof Target] & string;
|
|
1310
|
-
/**
|
|
1452
|
+
/** What one fetch of an entry in a category reads: a single document, or a set of documents, one per member of the archive the source unpacks to. */
|
|
1453
|
+
type CategoryShape = "document" | "collection";
|
|
1454
|
+
/** One category: its id, what it holds, whether an entry is one document or a collection of them, the schema of its normalisation target, and which of the target's arrays an entry may record expected counts for. */
|
|
1311
1455
|
interface CategoryOf<Id extends CategoryId> {
|
|
1312
1456
|
readonly id: Id;
|
|
1313
1457
|
readonly description: string;
|
|
1458
|
+
readonly shape: CategoryShape;
|
|
1314
1459
|
readonly target: z.ZodType<CategoryTargets[Id]>;
|
|
1315
1460
|
readonly counted: readonly CountedKey<CategoryTargets[Id]>[];
|
|
1316
1461
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Parser, A as LineageSchema, B as Citation, C as CatalogueIndex, D as NamespaceNode, E as DatasetQuery, F as AliasSchema, G as Entry, H as ColumnNameSchema, I as Archive, J as IdSchema, K as EntrySchema, L as ArchiveMember, M as ManifestSchema, N as SemVerSchema, O as createCatalogue, P as parseManifest, Q as NamespaceSchema, R as ArchiveMemberSchema, S as Catalogue, T as Dataset, U as CrosswalkReference, V as CitationSchema, W as CrosswalkReferenceSchema, X as LicenceSchema, Y as Licence, Z as Namespace, _ as GraphEdgeSchema, a as CategoryTargets, at as Snapshot, b as GraphV1, c as getCategory, ct as SourceSchema, d as listCategories, dt as waybackUrl, et as ParserSchema, f as OrNode, g as GraphEdge, h as OrV1Schema, i as CategoryTarget, it as RelativePathSchema, j as Manifest, k as Lineage, l as getTarget, lt as WaybackTimestampSchema, m as OrV1, n as CategoryId, nt as Recipe, o as CountedKey, ot as SnapshotSchema, p as OrNodeSchema, q as HttpUrlSchema, r as CategoryIdSchema, rt as RecipeSchema, s as countTarget, st as Source, t as Category, tt as RESERVED_META_KEYS, u as kindOf, ut as parseEntry, v as GraphNode, w as CatalogueIndexSchema, x as GraphV1Schema, y as GraphNodeSchema, z as ArchiveSchema } from "./categories-
|
|
1
|
+
import { $ as Parser, A as LineageSchema, B as Citation, C as CatalogueIndex, D as NamespaceNode, E as DatasetQuery, F as AliasSchema, G as Entry, H as ColumnNameSchema, I as Archive, J as IdSchema, K as EntrySchema, L as ArchiveMember, M as ManifestSchema, N as SemVerSchema, O as createCatalogue, P as parseManifest, Q as NamespaceSchema, R as ArchiveMemberSchema, S as Catalogue, T as Dataset, U as CrosswalkReference, V as CitationSchema, W as CrosswalkReferenceSchema, X as LicenceSchema, Y as Licence, Z as Namespace, _ as GraphEdgeSchema, a as CategoryTargets, at as Snapshot, b as GraphV1, c as getCategory, ct as SourceSchema, d as listCategories, dt as waybackUrl, et as ParserSchema, f as OrNode, g as GraphEdge, h as OrV1Schema, i as CategoryTarget, it as RelativePathSchema, j as Manifest, k as Lineage, l as getTarget, lt as WaybackTimestampSchema, m as OrV1, n as CategoryId, nt as Recipe, o as CountedKey, ot as SnapshotSchema, p as OrNodeSchema, q as HttpUrlSchema, r as CategoryIdSchema, rt as RecipeSchema, s as countTarget, st as Source, t as Category, tt as RESERVED_META_KEYS, u as kindOf, ut as parseEntry, v as GraphNode, w as CatalogueIndexSchema, x as GraphV1Schema, y as GraphNodeSchema, z as ArchiveSchema } from "./categories-zC2eMs6y.js";
|
|
2
2
|
import { Crosswalk } from "twindex";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/errors.d.ts
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as NativeParseError, A as toIssues, B as kindOf, C as RESERVED_META_KEYS, D as SourceSchema, E as SnapshotSchema, G as GraphNodeSchema, H as OrNodeSchema, I as CategoryIdSchema, J as ArchiveError, K as GraphV1Schema, L as countTarget, M as NAME_SEPARATOR, N as groupsOf, O as WaybackTimestampSchema, P as namesOf, Q as KeepsetError, R as getCategory, S as ParserSchema, T as RelativePathSchema, U as OrV1Schema, V as listCategories, W as GraphEdgeSchema, X as DatasetAmbiguousError, Y as CatalogueSyntaxError, Z as DatasetNotFoundError, _ as EntrySchema, a as CatalogueIndexSchema, b as LicenceSchema, c as ManifestSchema, d as AliasSchema, et as RecipeError, f as ArchiveMemberSchema, g as CrosswalkReferenceSchema, h as ColumnNameSchema, i as listNamespaces, j as waybackUrl, k as parseEntry, l as SemVerSchema, m as CitationSchema, n as getManifest, o as createCatalogue, p as ArchiveSchema, q as JsonScalarSchema, r as listDatasets, s as LineageSchema, t as getDataset, tt as UnknownCategoryError, u as parseManifest, v as HttpUrlSchema, w as RecipeSchema, x as NamespaceSchema, y as IdSchema, z as getTarget } from "./bundled-
|
|
1
|
+
import { $ as NativeParseError, A as toIssues, B as kindOf, C as RESERVED_META_KEYS, D as SourceSchema, E as SnapshotSchema, G as GraphNodeSchema, H as OrNodeSchema, I as CategoryIdSchema, J as ArchiveError, K as GraphV1Schema, L as countTarget, M as NAME_SEPARATOR, N as groupsOf, O as WaybackTimestampSchema, P as namesOf, Q as KeepsetError, R as getCategory, S as ParserSchema, T as RelativePathSchema, U as OrV1Schema, V as listCategories, W as GraphEdgeSchema, X as DatasetAmbiguousError, Y as CatalogueSyntaxError, Z as DatasetNotFoundError, _ as EntrySchema, a as CatalogueIndexSchema, b as LicenceSchema, c as ManifestSchema, d as AliasSchema, et as RecipeError, f as ArchiveMemberSchema, g as CrosswalkReferenceSchema, h as ColumnNameSchema, i as listNamespaces, j as waybackUrl, k as parseEntry, l as SemVerSchema, m as CitationSchema, n as getManifest, o as createCatalogue, p as ArchiveSchema, q as JsonScalarSchema, r as listDatasets, s as LineageSchema, t as getDataset, tt as UnknownCategoryError, u as parseManifest, v as HttpUrlSchema, w as RecipeSchema, x as NamespaceSchema, y as IdSchema, z as getTarget } from "./bundled-Dkvod55t.js";
|
|
2
2
|
import { validateCrosswalk } from "twindex";
|
|
3
3
|
//#region src/serialise.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as Entry, T as Dataset, at as Snapshot, i as CategoryTarget, st as Source } from "../categories-
|
|
1
|
+
import { G as Entry, T as Dataset, at as Snapshot, i as CategoryTarget, st as Source } from "../categories-zC2eMs6y.js";
|
|
2
2
|
//#region src/node/fetch-dataset.d.ts
|
|
3
3
|
/** The network port a recipe downloads through: `downloadRaw` by default, which returns the bytes exactly as served, or a stand-in under test. */
|
|
4
4
|
export type FetchPort = (url: string, init: {
|
|
@@ -24,7 +24,10 @@ export interface Provenance {
|
|
|
24
24
|
readonly retrievedAt: string;
|
|
25
25
|
readonly sha256: string;
|
|
26
26
|
readonly byteLength: number;
|
|
27
|
+
/** The archive member a document was read from. */
|
|
27
28
|
readonly member?: string;
|
|
29
|
+
/** The archive members a collection was read from, in the order they were read. */
|
|
30
|
+
readonly members?: readonly string[];
|
|
28
31
|
}
|
|
29
32
|
/** A fetched dataset: the resolved category target, the provenance of the bytes it came from, and any warnings, such as a count that differs from the one the entry records. */
|
|
30
33
|
export interface FetchedDataset {
|