keepset 0.22.1 → 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/README.md +1 -1
- package/dist/{bundled-CAsUNCDb.js → bundled-BWINQKLQ.js} +346 -31
- package/dist/{categories-CJZ2LiJh.d.ts → categories-BfqmrAvf.d.ts} +180 -83
- 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 +231 -22
- 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,12 @@ 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
|
+
}>;
|
|
142
149
|
}, z.core.$strict>, z.ZodObject<{
|
|
143
150
|
format: z.ZodLiteral<"csv-table">;
|
|
144
151
|
encoding: z.ZodEnum<{
|
|
@@ -183,28 +190,32 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
183
190
|
}, z.core.$strict>, z.ZodObject<{
|
|
184
191
|
kind: z.ZodLiteral<"ckan-datastore">;
|
|
185
192
|
pageSize: z.ZodInt;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
kind: z.ZodLiteral<"openfema">;
|
|
195
|
+
pageSize: z.ZodInt;
|
|
186
196
|
}, z.core.$strict>], "kind">>;
|
|
187
|
-
archive: z.
|
|
197
|
+
archive: z.ZodUnion<readonly [z.ZodObject<{
|
|
188
198
|
kind: z.ZodLiteral<"none">;
|
|
189
199
|
}, z.core.$strict>, z.ZodObject<{
|
|
190
200
|
kind: z.ZodLiteral<"gzip">;
|
|
191
201
|
}, z.core.$strict>, z.ZodObject<{
|
|
192
|
-
kind: z.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}, z.core.$strict>]>;
|
|
198
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
199
|
-
kind: z.ZodLiteral<"tar">;
|
|
202
|
+
kind: z.ZodEnum<{
|
|
203
|
+
zip: "zip";
|
|
204
|
+
tar: "tar";
|
|
205
|
+
"tar.gz": "tar.gz";
|
|
206
|
+
}>;
|
|
200
207
|
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
201
208
|
path: z.ZodString;
|
|
202
209
|
}, z.core.$strict>, z.ZodObject<{
|
|
203
210
|
extensions: z.ZodArray<z.ZodString>;
|
|
204
211
|
}, z.core.$strict>]>;
|
|
205
212
|
}, z.core.$strict>, z.ZodObject<{
|
|
206
|
-
kind: z.
|
|
207
|
-
|
|
213
|
+
kind: z.ZodEnum<{
|
|
214
|
+
zip: "zip";
|
|
215
|
+
tar: "tar";
|
|
216
|
+
"tar.gz": "tar.gz";
|
|
217
|
+
}>;
|
|
218
|
+
members: z.ZodUnion<readonly [z.ZodObject<{
|
|
208
219
|
path: z.ZodString;
|
|
209
220
|
}, z.core.$strict>, z.ZodObject<{
|
|
210
221
|
extensions: z.ZodArray<z.ZodString>;
|
|
@@ -212,7 +223,7 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
212
223
|
}, z.core.$strict>, z.ZodObject<{
|
|
213
224
|
kind: z.ZodLiteral<"xlsx">;
|
|
214
225
|
sheet: z.ZodString;
|
|
215
|
-
}, z.core.$strict>]
|
|
226
|
+
}, z.core.$strict>]>;
|
|
216
227
|
parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
217
228
|
format: z.ZodLiteral<"edge-list">;
|
|
218
229
|
encoding: z.ZodEnum<{
|
|
@@ -248,6 +259,12 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
248
259
|
"utf-8": "utf-8";
|
|
249
260
|
latin1: "latin1";
|
|
250
261
|
}>;
|
|
262
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
263
|
+
format: z.ZodLiteral<"solomon">;
|
|
264
|
+
encoding: z.ZodEnum<{
|
|
265
|
+
"utf-8": "utf-8";
|
|
266
|
+
latin1: "latin1";
|
|
267
|
+
}>;
|
|
251
268
|
}, z.core.$strict>, z.ZodObject<{
|
|
252
269
|
format: z.ZodLiteral<"csv-table">;
|
|
253
270
|
encoding: z.ZodEnum<{
|
|
@@ -306,6 +323,7 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
306
323
|
category: z.ZodEnum<{
|
|
307
324
|
"graph/v1": "graph/v1";
|
|
308
325
|
"or/v1": "or/v1";
|
|
326
|
+
"or-set/v1": "or-set/v1";
|
|
309
327
|
}>;
|
|
310
328
|
sources: z.ZodArray<z.ZodObject<{
|
|
311
329
|
url: z.ZodURL;
|
|
@@ -346,28 +364,32 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
346
364
|
}, z.core.$strict>, z.ZodObject<{
|
|
347
365
|
kind: z.ZodLiteral<"ckan-datastore">;
|
|
348
366
|
pageSize: z.ZodInt;
|
|
367
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
368
|
+
kind: z.ZodLiteral<"openfema">;
|
|
369
|
+
pageSize: z.ZodInt;
|
|
349
370
|
}, z.core.$strict>], "kind">>;
|
|
350
|
-
archive: z.
|
|
371
|
+
archive: z.ZodUnion<readonly [z.ZodObject<{
|
|
351
372
|
kind: z.ZodLiteral<"none">;
|
|
352
373
|
}, z.core.$strict>, z.ZodObject<{
|
|
353
374
|
kind: z.ZodLiteral<"gzip">;
|
|
354
375
|
}, z.core.$strict>, z.ZodObject<{
|
|
355
|
-
kind: z.
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}, z.core.$strict>]>;
|
|
361
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
362
|
-
kind: z.ZodLiteral<"tar">;
|
|
376
|
+
kind: z.ZodEnum<{
|
|
377
|
+
zip: "zip";
|
|
378
|
+
tar: "tar";
|
|
379
|
+
"tar.gz": "tar.gz";
|
|
380
|
+
}>;
|
|
363
381
|
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
364
382
|
path: z.ZodString;
|
|
365
383
|
}, z.core.$strict>, z.ZodObject<{
|
|
366
384
|
extensions: z.ZodArray<z.ZodString>;
|
|
367
385
|
}, z.core.$strict>]>;
|
|
368
386
|
}, z.core.$strict>, z.ZodObject<{
|
|
369
|
-
kind: z.
|
|
370
|
-
|
|
387
|
+
kind: z.ZodEnum<{
|
|
388
|
+
zip: "zip";
|
|
389
|
+
tar: "tar";
|
|
390
|
+
"tar.gz": "tar.gz";
|
|
391
|
+
}>;
|
|
392
|
+
members: z.ZodUnion<readonly [z.ZodObject<{
|
|
371
393
|
path: z.ZodString;
|
|
372
394
|
}, z.core.$strict>, z.ZodObject<{
|
|
373
395
|
extensions: z.ZodArray<z.ZodString>;
|
|
@@ -375,7 +397,7 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
375
397
|
}, z.core.$strict>, z.ZodObject<{
|
|
376
398
|
kind: z.ZodLiteral<"xlsx">;
|
|
377
399
|
sheet: z.ZodString;
|
|
378
|
-
}, z.core.$strict>]
|
|
400
|
+
}, z.core.$strict>]>;
|
|
379
401
|
parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
380
402
|
format: z.ZodLiteral<"edge-list">;
|
|
381
403
|
encoding: z.ZodEnum<{
|
|
@@ -411,6 +433,12 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
411
433
|
"utf-8": "utf-8";
|
|
412
434
|
latin1: "latin1";
|
|
413
435
|
}>;
|
|
436
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
437
|
+
format: z.ZodLiteral<"solomon">;
|
|
438
|
+
encoding: z.ZodEnum<{
|
|
439
|
+
"utf-8": "utf-8";
|
|
440
|
+
latin1: "latin1";
|
|
441
|
+
}>;
|
|
414
442
|
}, z.core.$strict>, z.ZodObject<{
|
|
415
443
|
format: z.ZodLiteral<"csv-table">;
|
|
416
444
|
encoding: z.ZodEnum<{
|
|
@@ -457,7 +485,7 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
457
485
|
id: string;
|
|
458
486
|
name: string;
|
|
459
487
|
tags: string[];
|
|
460
|
-
category: "graph/v1" | "or/v1";
|
|
488
|
+
category: "graph/v1" | "or/v1" | "or-set/v1";
|
|
461
489
|
sources: {
|
|
462
490
|
url: string;
|
|
463
491
|
retrieved: string;
|
|
@@ -490,22 +518,15 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
490
518
|
} | {
|
|
491
519
|
kind: "gzip";
|
|
492
520
|
} | {
|
|
493
|
-
kind: "zip";
|
|
521
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
494
522
|
member: {
|
|
495
523
|
path: string;
|
|
496
524
|
} | {
|
|
497
525
|
extensions: string[];
|
|
498
526
|
};
|
|
499
527
|
} | {
|
|
500
|
-
kind: "tar";
|
|
501
|
-
|
|
502
|
-
path: string;
|
|
503
|
-
} | {
|
|
504
|
-
extensions: string[];
|
|
505
|
-
};
|
|
506
|
-
} | {
|
|
507
|
-
kind: "tar.gz";
|
|
508
|
-
member: {
|
|
528
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
529
|
+
members: {
|
|
509
530
|
path: string;
|
|
510
531
|
} | {
|
|
511
532
|
extensions: string[];
|
|
@@ -553,6 +574,9 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
553
574
|
} | {
|
|
554
575
|
format: "pajek";
|
|
555
576
|
encoding: "utf-8" | "latin1";
|
|
577
|
+
} | {
|
|
578
|
+
format: "solomon";
|
|
579
|
+
encoding: "utf-8" | "latin1";
|
|
556
580
|
};
|
|
557
581
|
paging?: {
|
|
558
582
|
kind: "arcgis-query";
|
|
@@ -563,6 +587,9 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
563
587
|
} | {
|
|
564
588
|
kind: "ckan-datastore";
|
|
565
589
|
pageSize: number;
|
|
590
|
+
} | {
|
|
591
|
+
kind: "openfema";
|
|
592
|
+
pageSize: number;
|
|
566
593
|
} | undefined;
|
|
567
594
|
} | {
|
|
568
595
|
status: "not-fetchable";
|
|
@@ -683,6 +710,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
683
710
|
category: z.ZodEnum<{
|
|
684
711
|
"graph/v1": "graph/v1";
|
|
685
712
|
"or/v1": "or/v1";
|
|
713
|
+
"or-set/v1": "or-set/v1";
|
|
686
714
|
}>;
|
|
687
715
|
sources: z.ZodArray<z.ZodObject<{
|
|
688
716
|
url: z.ZodURL;
|
|
@@ -723,28 +751,32 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
723
751
|
}, z.core.$strict>, z.ZodObject<{
|
|
724
752
|
kind: z.ZodLiteral<"ckan-datastore">;
|
|
725
753
|
pageSize: z.ZodInt;
|
|
754
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
755
|
+
kind: z.ZodLiteral<"openfema">;
|
|
756
|
+
pageSize: z.ZodInt;
|
|
726
757
|
}, z.core.$strict>], "kind">>;
|
|
727
|
-
archive: z.
|
|
758
|
+
archive: z.ZodUnion<readonly [z.ZodObject<{
|
|
728
759
|
kind: z.ZodLiteral<"none">;
|
|
729
760
|
}, z.core.$strict>, z.ZodObject<{
|
|
730
761
|
kind: z.ZodLiteral<"gzip">;
|
|
731
762
|
}, z.core.$strict>, z.ZodObject<{
|
|
732
|
-
kind: z.
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
}, z.core.$strict>]>;
|
|
738
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
739
|
-
kind: z.ZodLiteral<"tar">;
|
|
763
|
+
kind: z.ZodEnum<{
|
|
764
|
+
zip: "zip";
|
|
765
|
+
tar: "tar";
|
|
766
|
+
"tar.gz": "tar.gz";
|
|
767
|
+
}>;
|
|
740
768
|
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
741
769
|
path: z.ZodString;
|
|
742
770
|
}, z.core.$strict>, z.ZodObject<{
|
|
743
771
|
extensions: z.ZodArray<z.ZodString>;
|
|
744
772
|
}, z.core.$strict>]>;
|
|
745
773
|
}, z.core.$strict>, z.ZodObject<{
|
|
746
|
-
kind: z.
|
|
747
|
-
|
|
774
|
+
kind: z.ZodEnum<{
|
|
775
|
+
zip: "zip";
|
|
776
|
+
tar: "tar";
|
|
777
|
+
"tar.gz": "tar.gz";
|
|
778
|
+
}>;
|
|
779
|
+
members: z.ZodUnion<readonly [z.ZodObject<{
|
|
748
780
|
path: z.ZodString;
|
|
749
781
|
}, z.core.$strict>, z.ZodObject<{
|
|
750
782
|
extensions: z.ZodArray<z.ZodString>;
|
|
@@ -752,7 +784,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
752
784
|
}, z.core.$strict>, z.ZodObject<{
|
|
753
785
|
kind: z.ZodLiteral<"xlsx">;
|
|
754
786
|
sheet: z.ZodString;
|
|
755
|
-
}, z.core.$strict>]
|
|
787
|
+
}, z.core.$strict>]>;
|
|
756
788
|
parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
757
789
|
format: z.ZodLiteral<"edge-list">;
|
|
758
790
|
encoding: z.ZodEnum<{
|
|
@@ -788,6 +820,12 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
788
820
|
"utf-8": "utf-8";
|
|
789
821
|
latin1: "latin1";
|
|
790
822
|
}>;
|
|
823
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
824
|
+
format: z.ZodLiteral<"solomon">;
|
|
825
|
+
encoding: z.ZodEnum<{
|
|
826
|
+
"utf-8": "utf-8";
|
|
827
|
+
latin1: "latin1";
|
|
828
|
+
}>;
|
|
791
829
|
}, z.core.$strict>, z.ZodObject<{
|
|
792
830
|
format: z.ZodLiteral<"csv-table">;
|
|
793
831
|
encoding: z.ZodEnum<{
|
|
@@ -834,7 +872,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
834
872
|
id: string;
|
|
835
873
|
name: string;
|
|
836
874
|
tags: string[];
|
|
837
|
-
category: "graph/v1" | "or/v1";
|
|
875
|
+
category: "graph/v1" | "or/v1" | "or-set/v1";
|
|
838
876
|
sources: {
|
|
839
877
|
url: string;
|
|
840
878
|
retrieved: string;
|
|
@@ -867,22 +905,15 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
867
905
|
} | {
|
|
868
906
|
kind: "gzip";
|
|
869
907
|
} | {
|
|
870
|
-
kind: "zip";
|
|
908
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
871
909
|
member: {
|
|
872
910
|
path: string;
|
|
873
911
|
} | {
|
|
874
912
|
extensions: string[];
|
|
875
913
|
};
|
|
876
914
|
} | {
|
|
877
|
-
kind: "tar";
|
|
878
|
-
|
|
879
|
-
path: string;
|
|
880
|
-
} | {
|
|
881
|
-
extensions: string[];
|
|
882
|
-
};
|
|
883
|
-
} | {
|
|
884
|
-
kind: "tar.gz";
|
|
885
|
-
member: {
|
|
915
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
916
|
+
members: {
|
|
886
917
|
path: string;
|
|
887
918
|
} | {
|
|
888
919
|
extensions: string[];
|
|
@@ -930,6 +961,9 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
930
961
|
} | {
|
|
931
962
|
format: "pajek";
|
|
932
963
|
encoding: "utf-8" | "latin1";
|
|
964
|
+
} | {
|
|
965
|
+
format: "solomon";
|
|
966
|
+
encoding: "utf-8" | "latin1";
|
|
933
967
|
};
|
|
934
968
|
paging?: {
|
|
935
969
|
kind: "arcgis-query";
|
|
@@ -940,6 +974,9 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
940
974
|
} | {
|
|
941
975
|
kind: "ckan-datastore";
|
|
942
976
|
pageSize: number;
|
|
977
|
+
} | {
|
|
978
|
+
kind: "openfema";
|
|
979
|
+
pageSize: number;
|
|
943
980
|
} | undefined;
|
|
944
981
|
} | {
|
|
945
982
|
status: "not-fetchable";
|
|
@@ -976,7 +1013,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
976
1013
|
id: string;
|
|
977
1014
|
name: string;
|
|
978
1015
|
tags: string[];
|
|
979
|
-
category: "graph/v1" | "or/v1";
|
|
1016
|
+
category: "graph/v1" | "or/v1" | "or-set/v1";
|
|
980
1017
|
sources: {
|
|
981
1018
|
url: string;
|
|
982
1019
|
retrieved: string;
|
|
@@ -1009,22 +1046,15 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1009
1046
|
} | {
|
|
1010
1047
|
kind: "gzip";
|
|
1011
1048
|
} | {
|
|
1012
|
-
kind: "zip";
|
|
1049
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
1013
1050
|
member: {
|
|
1014
1051
|
path: string;
|
|
1015
1052
|
} | {
|
|
1016
1053
|
extensions: string[];
|
|
1017
1054
|
};
|
|
1018
1055
|
} | {
|
|
1019
|
-
kind: "tar";
|
|
1020
|
-
|
|
1021
|
-
path: string;
|
|
1022
|
-
} | {
|
|
1023
|
-
extensions: string[];
|
|
1024
|
-
};
|
|
1025
|
-
} | {
|
|
1026
|
-
kind: "tar.gz";
|
|
1027
|
-
member: {
|
|
1056
|
+
kind: "zip" | "tar" | "tar.gz";
|
|
1057
|
+
members: {
|
|
1028
1058
|
path: string;
|
|
1029
1059
|
} | {
|
|
1030
1060
|
extensions: string[];
|
|
@@ -1072,6 +1102,9 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1072
1102
|
} | {
|
|
1073
1103
|
format: "pajek";
|
|
1074
1104
|
encoding: "utf-8" | "latin1";
|
|
1105
|
+
} | {
|
|
1106
|
+
format: "solomon";
|
|
1107
|
+
encoding: "utf-8" | "latin1";
|
|
1075
1108
|
};
|
|
1076
1109
|
paging?: {
|
|
1077
1110
|
kind: "arcgis-query";
|
|
@@ -1082,6 +1115,9 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1082
1115
|
} | {
|
|
1083
1116
|
kind: "ckan-datastore";
|
|
1084
1117
|
pageSize: number;
|
|
1118
|
+
} | {
|
|
1119
|
+
kind: "openfema";
|
|
1120
|
+
pageSize: number;
|
|
1085
1121
|
} | undefined;
|
|
1086
1122
|
} | {
|
|
1087
1123
|
status: "not-fetchable";
|
|
@@ -1204,6 +1240,62 @@ declare const GraphV1Schema: z.ZodObject<{
|
|
|
1204
1240
|
};
|
|
1205
1241
|
type GraphV1 = z.infer<typeof GraphV1Schema>;
|
|
1206
1242
|
//#endregion
|
|
1243
|
+
//#region src/targets/or-set-v1.d.ts
|
|
1244
|
+
/**
|
|
1245
|
+
* 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.
|
|
1246
|
+
*/
|
|
1247
|
+
declare const OrSetV1Schema: z.ZodObject<{
|
|
1248
|
+
meta: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, unknown>;
|
|
1249
|
+
instances: z.ZodArray<z.ZodObject<{
|
|
1250
|
+
id: z.ZodString;
|
|
1251
|
+
meta: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, unknown>;
|
|
1252
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
1253
|
+
id: z.ZodString;
|
|
1254
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1255
|
+
lon: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1256
|
+
x: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1257
|
+
y: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1258
|
+
prize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1259
|
+
prizeProbability: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1260
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1261
|
+
travelTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1262
|
+
skill: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1263
|
+
territory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1264
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1265
|
+
opened: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1266
|
+
closed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1267
|
+
deadline: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
1268
|
+
}, z.core.$loose>>;
|
|
1269
|
+
}, z.core.$strict>>;
|
|
1270
|
+
}, z.core.$strict> & {
|
|
1271
|
+
is: (value: unknown) => value is {
|
|
1272
|
+
meta: Record<string, string | number | boolean | null>;
|
|
1273
|
+
instances: {
|
|
1274
|
+
id: string;
|
|
1275
|
+
meta: Record<string, string | number | boolean | null>;
|
|
1276
|
+
nodes: {
|
|
1277
|
+
[x: string]: unknown;
|
|
1278
|
+
id: string;
|
|
1279
|
+
lat?: number | null | undefined;
|
|
1280
|
+
lon?: number | null | undefined;
|
|
1281
|
+
x?: number | null | undefined;
|
|
1282
|
+
y?: number | null | undefined;
|
|
1283
|
+
prize?: number | null | undefined;
|
|
1284
|
+
prizeProbability?: number | null | undefined;
|
|
1285
|
+
duration?: number | null | undefined;
|
|
1286
|
+
travelTime?: number | null | undefined;
|
|
1287
|
+
skill?: string | null | undefined;
|
|
1288
|
+
territory?: string | null | undefined;
|
|
1289
|
+
status?: string | null | undefined;
|
|
1290
|
+
opened?: string | null | undefined;
|
|
1291
|
+
closed?: string | null | undefined;
|
|
1292
|
+
deadline?: string | number | null | undefined;
|
|
1293
|
+
}[];
|
|
1294
|
+
}[];
|
|
1295
|
+
};
|
|
1296
|
+
};
|
|
1297
|
+
type OrSetV1 = z.infer<typeof OrSetV1Schema>;
|
|
1298
|
+
//#endregion
|
|
1207
1299
|
//#region src/targets/or-v1.d.ts
|
|
1208
1300
|
/**
|
|
1209
1301
|
* 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.
|
|
@@ -1278,21 +1370,26 @@ type OrV1 = z.infer<typeof OrV1Schema>;
|
|
|
1278
1370
|
declare const CategoryIdSchema: z.ZodEnum<{
|
|
1279
1371
|
"graph/v1": "graph/v1";
|
|
1280
1372
|
"or/v1": "or/v1";
|
|
1373
|
+
"or-set/v1": "or-set/v1";
|
|
1281
1374
|
}>;
|
|
1282
1375
|
type CategoryId = z.infer<typeof CategoryIdSchema>;
|
|
1283
1376
|
/** The normalisation target each category resolves to, keyed by category id. */
|
|
1284
1377
|
interface CategoryTargets {
|
|
1285
1378
|
readonly "graph/v1": GraphV1;
|
|
1286
1379
|
readonly "or/v1": OrV1;
|
|
1380
|
+
readonly "or-set/v1": OrSetV1;
|
|
1287
1381
|
}
|
|
1288
1382
|
/** The normalised shape of any category: what `fetchDataset` can resolve to. */
|
|
1289
1383
|
type CategoryTarget = CategoryTargets[CategoryId];
|
|
1290
1384
|
/** The keys of a target whose values are arrays: the collections an entry's `expectedCounts` may name. */
|
|
1291
1385
|
type CountedKey<Target> = { readonly [Key in keyof Target]: Target[Key] extends readonly unknown[] ? Key : never; }[keyof Target] & string;
|
|
1292
|
-
/**
|
|
1386
|
+
/** 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. */
|
|
1387
|
+
type CategoryShape = "document" | "collection";
|
|
1388
|
+
/** 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. */
|
|
1293
1389
|
interface CategoryOf<Id extends CategoryId> {
|
|
1294
1390
|
readonly id: Id;
|
|
1295
1391
|
readonly description: string;
|
|
1392
|
+
readonly shape: CategoryShape;
|
|
1296
1393
|
readonly target: z.ZodType<CategoryTargets[Id]>;
|
|
1297
1394
|
readonly counted: readonly CountedKey<CategoryTargets[Id]>[];
|
|
1298
1395
|
}
|
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-BfqmrAvf.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-BWINQKLQ.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-BfqmrAvf.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 {
|