keepset 0.36.0 → 0.37.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 +2 -2
- package/dist/{bundled-BrTVG8j1.js → bundled-CRr7GPD3.js} +921 -109
- package/dist/{categories-D9r42M9E.d.ts → categories-Djnk3zwg.d.ts} +349 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/node/fetch-dataset.d.ts +2 -2
- package/dist/node/fetch-dataset.js +487 -156
- package/dist-cli/keepset.mjs +2 -2
- package/package.json +1 -1
- package/schemas/entry.schema.json +1 -1
- package/schemas/manifest.schema.json +1 -1
|
@@ -94,7 +94,27 @@ declare const CollectionArchiveSchema: z.ZodObject<{
|
|
|
94
94
|
sheets: z.ZodOptional<z.ZodString>;
|
|
95
95
|
}, z.core.$strict>>;
|
|
96
96
|
}, z.core.$strict>;
|
|
97
|
-
/**
|
|
97
|
+
/** An archive one document is read from several files of: each part names the one member it is read from, and the parser reads the parts together in the order given. */
|
|
98
|
+
declare const PartsArchiveSchema: z.ZodObject<{
|
|
99
|
+
kind: z.ZodEnum<{
|
|
100
|
+
zip: "zip";
|
|
101
|
+
tar: "tar";
|
|
102
|
+
"tar.gz": "tar.gz";
|
|
103
|
+
"tar.bz2": "tar.bz2";
|
|
104
|
+
}>;
|
|
105
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
108
|
+
path: z.ZodString;
|
|
109
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
110
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
111
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
112
|
+
pattern: z.ZodString;
|
|
113
|
+
}, z.core.$strict>]>;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
type PartsArchive = z.infer<typeof PartsArchiveSchema>;
|
|
117
|
+
/** How the downloaded bytes unpack into the file the parser reads, the named files a parser reads together into one document (`parts`), 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. `gzip` and `bzip2` are one compressed file, and `tar.gz` and `tar.bz2` a tar archive compressed with them. A member that is an archive in its turn (a contest bundle that ships its problems as a zip inside the zip) is unpacked by `inner`. A workbook (`xlsx`) is read as the CSV of its named sheet, with dates as ISO 8601 text, for the `csv-table` parser. A point shapefile (`shapefile`) is a zip whose `member` selects the `.shp`, read with the `.dbf`, `.prj` and `.cpg` of the same name beside it as the CSV of its attribute table with each point's stored coordinates and its WGS84 position, for the `csv-table` parser. */
|
|
98
118
|
declare const ArchiveSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
99
119
|
kind: z.ZodLiteral<"none">;
|
|
100
120
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -150,6 +170,23 @@ declare const ArchiveSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
150
170
|
kind: z.ZodLiteral<"xlsx">;
|
|
151
171
|
sheets: z.ZodOptional<z.ZodString>;
|
|
152
172
|
}, z.core.$strict>>;
|
|
173
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
174
|
+
kind: z.ZodEnum<{
|
|
175
|
+
zip: "zip";
|
|
176
|
+
tar: "tar";
|
|
177
|
+
"tar.gz": "tar.gz";
|
|
178
|
+
"tar.bz2": "tar.bz2";
|
|
179
|
+
}>;
|
|
180
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
181
|
+
name: z.ZodString;
|
|
182
|
+
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
183
|
+
path: z.ZodString;
|
|
184
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
185
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
186
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
187
|
+
pattern: z.ZodString;
|
|
188
|
+
}, z.core.$strict>]>;
|
|
189
|
+
}, z.core.$strict>>;
|
|
153
190
|
}, z.core.$strict>, z.ZodObject<{
|
|
154
191
|
kind: z.ZodLiteral<"xlsx">;
|
|
155
192
|
sheet: z.ZodString;
|
|
@@ -167,7 +204,7 @@ type Archive = z.infer<typeof ArchiveSchema>;
|
|
|
167
204
|
/** An archive that gives the one file a document is read from. */
|
|
168
205
|
type DocumentArchive = Exclude<Archive, {
|
|
169
206
|
readonly members: ArchiveMember;
|
|
170
|
-
}>;
|
|
207
|
+
} | PartsArchive>;
|
|
171
208
|
/** An archive that gives every file a collection is read from. */
|
|
172
209
|
type CollectionArchive = z.infer<typeof CollectionArchiveSchema>;
|
|
173
210
|
/** 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 crossmap path. */
|
|
@@ -215,6 +252,45 @@ declare const ParserSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
215
252
|
encoding: z.ZodLiteral<"utf-8">;
|
|
216
253
|
weighted: z.ZodBoolean;
|
|
217
254
|
timestamped: z.ZodBoolean;
|
|
255
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
256
|
+
format: z.ZodLiteral<"user-item-counts">;
|
|
257
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
258
|
+
delimiter: z.ZodEnum<{
|
|
259
|
+
tab: "tab";
|
|
260
|
+
}>;
|
|
261
|
+
skipLines: z.ZodInt;
|
|
262
|
+
itemType: z.ZodEnum<{
|
|
263
|
+
artist: "artist";
|
|
264
|
+
}>;
|
|
265
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
266
|
+
format: z.ZodLiteral<"kg-triples">;
|
|
267
|
+
encoding: z.ZodEnum<{
|
|
268
|
+
"utf-8": "utf-8";
|
|
269
|
+
latin1: "latin1";
|
|
270
|
+
}>;
|
|
271
|
+
delimiter: z.ZodEnum<{
|
|
272
|
+
tab: "tab";
|
|
273
|
+
space: "space";
|
|
274
|
+
}>;
|
|
275
|
+
order: z.ZodEnum<{
|
|
276
|
+
"head-relation-tail": "head-relation-tail";
|
|
277
|
+
"head-tail-relation": "head-tail-relation";
|
|
278
|
+
}>;
|
|
279
|
+
header: z.ZodEnum<{
|
|
280
|
+
none: "none";
|
|
281
|
+
names: "names";
|
|
282
|
+
count: "count";
|
|
283
|
+
}>;
|
|
284
|
+
quoted: z.ZodBoolean;
|
|
285
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
286
|
+
format: z.ZodLiteral<"hgb">;
|
|
287
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
288
|
+
nodeTypes: z.ZodArray<z.ZodString>;
|
|
289
|
+
linkTypes: z.ZodArray<z.ZodObject<{
|
|
290
|
+
name: z.ZodString;
|
|
291
|
+
source: z.ZodString;
|
|
292
|
+
target: z.ZodString;
|
|
293
|
+
}, z.core.$strict>>;
|
|
218
294
|
}, z.core.$strict>, z.ZodObject<{
|
|
219
295
|
format: z.ZodLiteral<"gml">;
|
|
220
296
|
encoding: z.ZodEnum<{
|
|
@@ -310,7 +386,6 @@ declare const ParserSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
310
386
|
columns: z.ZodArray<z.ZodString>;
|
|
311
387
|
}, z.core.$strict>], "format">;
|
|
312
388
|
type Parser = z.infer<typeof ParserSchema>;
|
|
313
|
-
/** How to obtain the dataset: a fetchable recipe naming the source (by index into `sources`), the archive layout and the parser, or a statement that no declarative recipe exists yet and why. */
|
|
314
389
|
declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
315
390
|
status: z.ZodLiteral<"fetchable">;
|
|
316
391
|
source: z.ZodInt;
|
|
@@ -382,6 +457,23 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
382
457
|
kind: z.ZodLiteral<"xlsx">;
|
|
383
458
|
sheets: z.ZodOptional<z.ZodString>;
|
|
384
459
|
}, z.core.$strict>>;
|
|
460
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
461
|
+
kind: z.ZodEnum<{
|
|
462
|
+
zip: "zip";
|
|
463
|
+
tar: "tar";
|
|
464
|
+
"tar.gz": "tar.gz";
|
|
465
|
+
"tar.bz2": "tar.bz2";
|
|
466
|
+
}>;
|
|
467
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
468
|
+
name: z.ZodString;
|
|
469
|
+
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
470
|
+
path: z.ZodString;
|
|
471
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
472
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
473
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
474
|
+
pattern: z.ZodString;
|
|
475
|
+
}, z.core.$strict>]>;
|
|
476
|
+
}, z.core.$strict>>;
|
|
385
477
|
}, z.core.$strict>, z.ZodObject<{
|
|
386
478
|
kind: z.ZodLiteral<"xlsx">;
|
|
387
479
|
sheet: z.ZodString;
|
|
@@ -437,6 +529,45 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
437
529
|
encoding: z.ZodLiteral<"utf-8">;
|
|
438
530
|
weighted: z.ZodBoolean;
|
|
439
531
|
timestamped: z.ZodBoolean;
|
|
532
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
533
|
+
format: z.ZodLiteral<"user-item-counts">;
|
|
534
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
535
|
+
delimiter: z.ZodEnum<{
|
|
536
|
+
tab: "tab";
|
|
537
|
+
}>;
|
|
538
|
+
skipLines: z.ZodInt;
|
|
539
|
+
itemType: z.ZodEnum<{
|
|
540
|
+
artist: "artist";
|
|
541
|
+
}>;
|
|
542
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
543
|
+
format: z.ZodLiteral<"kg-triples">;
|
|
544
|
+
encoding: z.ZodEnum<{
|
|
545
|
+
"utf-8": "utf-8";
|
|
546
|
+
latin1: "latin1";
|
|
547
|
+
}>;
|
|
548
|
+
delimiter: z.ZodEnum<{
|
|
549
|
+
tab: "tab";
|
|
550
|
+
space: "space";
|
|
551
|
+
}>;
|
|
552
|
+
order: z.ZodEnum<{
|
|
553
|
+
"head-relation-tail": "head-relation-tail";
|
|
554
|
+
"head-tail-relation": "head-tail-relation";
|
|
555
|
+
}>;
|
|
556
|
+
header: z.ZodEnum<{
|
|
557
|
+
none: "none";
|
|
558
|
+
names: "names";
|
|
559
|
+
count: "count";
|
|
560
|
+
}>;
|
|
561
|
+
quoted: z.ZodBoolean;
|
|
562
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
563
|
+
format: z.ZodLiteral<"hgb">;
|
|
564
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
565
|
+
nodeTypes: z.ZodArray<z.ZodString>;
|
|
566
|
+
linkTypes: z.ZodArray<z.ZodObject<{
|
|
567
|
+
name: z.ZodString;
|
|
568
|
+
source: z.ZodString;
|
|
569
|
+
target: z.ZodString;
|
|
570
|
+
}, z.core.$strict>>;
|
|
440
571
|
}, z.core.$strict>, z.ZodObject<{
|
|
441
572
|
format: z.ZodLiteral<"gml">;
|
|
442
573
|
encoding: z.ZodEnum<{
|
|
@@ -659,6 +790,23 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
659
790
|
kind: z.ZodLiteral<"xlsx">;
|
|
660
791
|
sheets: z.ZodOptional<z.ZodString>;
|
|
661
792
|
}, z.core.$strict>>;
|
|
793
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
794
|
+
kind: z.ZodEnum<{
|
|
795
|
+
zip: "zip";
|
|
796
|
+
tar: "tar";
|
|
797
|
+
"tar.gz": "tar.gz";
|
|
798
|
+
"tar.bz2": "tar.bz2";
|
|
799
|
+
}>;
|
|
800
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
801
|
+
name: z.ZodString;
|
|
802
|
+
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
803
|
+
path: z.ZodString;
|
|
804
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
805
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
806
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
807
|
+
pattern: z.ZodString;
|
|
808
|
+
}, z.core.$strict>]>;
|
|
809
|
+
}, z.core.$strict>>;
|
|
662
810
|
}, z.core.$strict>, z.ZodObject<{
|
|
663
811
|
kind: z.ZodLiteral<"xlsx">;
|
|
664
812
|
sheet: z.ZodString;
|
|
@@ -714,6 +862,45 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
714
862
|
encoding: z.ZodLiteral<"utf-8">;
|
|
715
863
|
weighted: z.ZodBoolean;
|
|
716
864
|
timestamped: z.ZodBoolean;
|
|
865
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
866
|
+
format: z.ZodLiteral<"user-item-counts">;
|
|
867
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
868
|
+
delimiter: z.ZodEnum<{
|
|
869
|
+
tab: "tab";
|
|
870
|
+
}>;
|
|
871
|
+
skipLines: z.ZodInt;
|
|
872
|
+
itemType: z.ZodEnum<{
|
|
873
|
+
artist: "artist";
|
|
874
|
+
}>;
|
|
875
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
876
|
+
format: z.ZodLiteral<"kg-triples">;
|
|
877
|
+
encoding: z.ZodEnum<{
|
|
878
|
+
"utf-8": "utf-8";
|
|
879
|
+
latin1: "latin1";
|
|
880
|
+
}>;
|
|
881
|
+
delimiter: z.ZodEnum<{
|
|
882
|
+
tab: "tab";
|
|
883
|
+
space: "space";
|
|
884
|
+
}>;
|
|
885
|
+
order: z.ZodEnum<{
|
|
886
|
+
"head-relation-tail": "head-relation-tail";
|
|
887
|
+
"head-tail-relation": "head-tail-relation";
|
|
888
|
+
}>;
|
|
889
|
+
header: z.ZodEnum<{
|
|
890
|
+
none: "none";
|
|
891
|
+
names: "names";
|
|
892
|
+
count: "count";
|
|
893
|
+
}>;
|
|
894
|
+
quoted: z.ZodBoolean;
|
|
895
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
896
|
+
format: z.ZodLiteral<"hgb">;
|
|
897
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
898
|
+
nodeTypes: z.ZodArray<z.ZodString>;
|
|
899
|
+
linkTypes: z.ZodArray<z.ZodObject<{
|
|
900
|
+
name: z.ZodString;
|
|
901
|
+
source: z.ZodString;
|
|
902
|
+
target: z.ZodString;
|
|
903
|
+
}, z.core.$strict>>;
|
|
717
904
|
}, z.core.$strict>, z.ZodObject<{
|
|
718
905
|
format: z.ZodLiteral<"gml">;
|
|
719
906
|
encoding: z.ZodEnum<{
|
|
@@ -865,6 +1052,18 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
865
1052
|
kind: "xlsx";
|
|
866
1053
|
sheets?: string | undefined;
|
|
867
1054
|
} | undefined;
|
|
1055
|
+
} | {
|
|
1056
|
+
kind: "zip" | "tar" | "tar.gz" | "tar.bz2";
|
|
1057
|
+
parts: {
|
|
1058
|
+
name: string;
|
|
1059
|
+
member: {
|
|
1060
|
+
path: string;
|
|
1061
|
+
} | {
|
|
1062
|
+
extensions: string[];
|
|
1063
|
+
} | {
|
|
1064
|
+
pattern: string;
|
|
1065
|
+
};
|
|
1066
|
+
}[];
|
|
868
1067
|
} | {
|
|
869
1068
|
kind: "none";
|
|
870
1069
|
} | {
|
|
@@ -913,6 +1112,15 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
913
1112
|
commentPrefixes: string[];
|
|
914
1113
|
sourceColumn: number;
|
|
915
1114
|
targetColumn: number;
|
|
1115
|
+
} | {
|
|
1116
|
+
format: "hgb";
|
|
1117
|
+
encoding: "utf-8";
|
|
1118
|
+
nodeTypes: string[];
|
|
1119
|
+
linkTypes: {
|
|
1120
|
+
name: string;
|
|
1121
|
+
source: string;
|
|
1122
|
+
target: string;
|
|
1123
|
+
}[];
|
|
916
1124
|
} | {
|
|
917
1125
|
format: "csv-table";
|
|
918
1126
|
encoding: "utf-8" | "latin1";
|
|
@@ -950,6 +1158,19 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
950
1158
|
encoding: "utf-8";
|
|
951
1159
|
weighted: boolean;
|
|
952
1160
|
timestamped: boolean;
|
|
1161
|
+
} | {
|
|
1162
|
+
format: "user-item-counts";
|
|
1163
|
+
encoding: "utf-8";
|
|
1164
|
+
delimiter: "tab";
|
|
1165
|
+
skipLines: number;
|
|
1166
|
+
itemType: "artist";
|
|
1167
|
+
} | {
|
|
1168
|
+
format: "kg-triples";
|
|
1169
|
+
encoding: "utf-8" | "latin1";
|
|
1170
|
+
delimiter: "tab" | "space";
|
|
1171
|
+
order: "head-relation-tail" | "head-tail-relation";
|
|
1172
|
+
header: "none" | "names" | "count";
|
|
1173
|
+
quoted: boolean;
|
|
953
1174
|
} | {
|
|
954
1175
|
format: "gml";
|
|
955
1176
|
encoding: "utf-8" | "latin1";
|
|
@@ -1221,6 +1442,23 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1221
1442
|
kind: z.ZodLiteral<"xlsx">;
|
|
1222
1443
|
sheets: z.ZodOptional<z.ZodString>;
|
|
1223
1444
|
}, z.core.$strict>>;
|
|
1445
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1446
|
+
kind: z.ZodEnum<{
|
|
1447
|
+
zip: "zip";
|
|
1448
|
+
tar: "tar";
|
|
1449
|
+
"tar.gz": "tar.gz";
|
|
1450
|
+
"tar.bz2": "tar.bz2";
|
|
1451
|
+
}>;
|
|
1452
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
1453
|
+
name: z.ZodString;
|
|
1454
|
+
member: z.ZodUnion<readonly [z.ZodObject<{
|
|
1455
|
+
path: z.ZodString;
|
|
1456
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1457
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
1458
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1459
|
+
pattern: z.ZodString;
|
|
1460
|
+
}, z.core.$strict>]>;
|
|
1461
|
+
}, z.core.$strict>>;
|
|
1224
1462
|
}, z.core.$strict>, z.ZodObject<{
|
|
1225
1463
|
kind: z.ZodLiteral<"xlsx">;
|
|
1226
1464
|
sheet: z.ZodString;
|
|
@@ -1276,6 +1514,45 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1276
1514
|
encoding: z.ZodLiteral<"utf-8">;
|
|
1277
1515
|
weighted: z.ZodBoolean;
|
|
1278
1516
|
timestamped: z.ZodBoolean;
|
|
1517
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1518
|
+
format: z.ZodLiteral<"user-item-counts">;
|
|
1519
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
1520
|
+
delimiter: z.ZodEnum<{
|
|
1521
|
+
tab: "tab";
|
|
1522
|
+
}>;
|
|
1523
|
+
skipLines: z.ZodInt;
|
|
1524
|
+
itemType: z.ZodEnum<{
|
|
1525
|
+
artist: "artist";
|
|
1526
|
+
}>;
|
|
1527
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1528
|
+
format: z.ZodLiteral<"kg-triples">;
|
|
1529
|
+
encoding: z.ZodEnum<{
|
|
1530
|
+
"utf-8": "utf-8";
|
|
1531
|
+
latin1: "latin1";
|
|
1532
|
+
}>;
|
|
1533
|
+
delimiter: z.ZodEnum<{
|
|
1534
|
+
tab: "tab";
|
|
1535
|
+
space: "space";
|
|
1536
|
+
}>;
|
|
1537
|
+
order: z.ZodEnum<{
|
|
1538
|
+
"head-relation-tail": "head-relation-tail";
|
|
1539
|
+
"head-tail-relation": "head-tail-relation";
|
|
1540
|
+
}>;
|
|
1541
|
+
header: z.ZodEnum<{
|
|
1542
|
+
none: "none";
|
|
1543
|
+
names: "names";
|
|
1544
|
+
count: "count";
|
|
1545
|
+
}>;
|
|
1546
|
+
quoted: z.ZodBoolean;
|
|
1547
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1548
|
+
format: z.ZodLiteral<"hgb">;
|
|
1549
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
1550
|
+
nodeTypes: z.ZodArray<z.ZodString>;
|
|
1551
|
+
linkTypes: z.ZodArray<z.ZodObject<{
|
|
1552
|
+
name: z.ZodString;
|
|
1553
|
+
source: z.ZodString;
|
|
1554
|
+
target: z.ZodString;
|
|
1555
|
+
}, z.core.$strict>>;
|
|
1279
1556
|
}, z.core.$strict>, z.ZodObject<{
|
|
1280
1557
|
format: z.ZodLiteral<"gml">;
|
|
1281
1558
|
encoding: z.ZodEnum<{
|
|
@@ -1427,6 +1704,18 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1427
1704
|
kind: "xlsx";
|
|
1428
1705
|
sheets?: string | undefined;
|
|
1429
1706
|
} | undefined;
|
|
1707
|
+
} | {
|
|
1708
|
+
kind: "zip" | "tar" | "tar.gz" | "tar.bz2";
|
|
1709
|
+
parts: {
|
|
1710
|
+
name: string;
|
|
1711
|
+
member: {
|
|
1712
|
+
path: string;
|
|
1713
|
+
} | {
|
|
1714
|
+
extensions: string[];
|
|
1715
|
+
} | {
|
|
1716
|
+
pattern: string;
|
|
1717
|
+
};
|
|
1718
|
+
}[];
|
|
1430
1719
|
} | {
|
|
1431
1720
|
kind: "none";
|
|
1432
1721
|
} | {
|
|
@@ -1475,6 +1764,15 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1475
1764
|
commentPrefixes: string[];
|
|
1476
1765
|
sourceColumn: number;
|
|
1477
1766
|
targetColumn: number;
|
|
1767
|
+
} | {
|
|
1768
|
+
format: "hgb";
|
|
1769
|
+
encoding: "utf-8";
|
|
1770
|
+
nodeTypes: string[];
|
|
1771
|
+
linkTypes: {
|
|
1772
|
+
name: string;
|
|
1773
|
+
source: string;
|
|
1774
|
+
target: string;
|
|
1775
|
+
}[];
|
|
1478
1776
|
} | {
|
|
1479
1777
|
format: "csv-table";
|
|
1480
1778
|
encoding: "utf-8" | "latin1";
|
|
@@ -1512,6 +1810,19 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1512
1810
|
encoding: "utf-8";
|
|
1513
1811
|
weighted: boolean;
|
|
1514
1812
|
timestamped: boolean;
|
|
1813
|
+
} | {
|
|
1814
|
+
format: "user-item-counts";
|
|
1815
|
+
encoding: "utf-8";
|
|
1816
|
+
delimiter: "tab";
|
|
1817
|
+
skipLines: number;
|
|
1818
|
+
itemType: "artist";
|
|
1819
|
+
} | {
|
|
1820
|
+
format: "kg-triples";
|
|
1821
|
+
encoding: "utf-8" | "latin1";
|
|
1822
|
+
delimiter: "tab" | "space";
|
|
1823
|
+
order: "head-relation-tail" | "head-tail-relation";
|
|
1824
|
+
header: "none" | "names" | "count";
|
|
1825
|
+
quoted: boolean;
|
|
1515
1826
|
} | {
|
|
1516
1827
|
format: "gml";
|
|
1517
1828
|
encoding: "utf-8" | "latin1";
|
|
@@ -1640,6 +1951,18 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1640
1951
|
kind: "xlsx";
|
|
1641
1952
|
sheets?: string | undefined;
|
|
1642
1953
|
} | undefined;
|
|
1954
|
+
} | {
|
|
1955
|
+
kind: "zip" | "tar" | "tar.gz" | "tar.bz2";
|
|
1956
|
+
parts: {
|
|
1957
|
+
name: string;
|
|
1958
|
+
member: {
|
|
1959
|
+
path: string;
|
|
1960
|
+
} | {
|
|
1961
|
+
extensions: string[];
|
|
1962
|
+
} | {
|
|
1963
|
+
pattern: string;
|
|
1964
|
+
};
|
|
1965
|
+
}[];
|
|
1643
1966
|
} | {
|
|
1644
1967
|
kind: "none";
|
|
1645
1968
|
} | {
|
|
@@ -1688,6 +2011,15 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1688
2011
|
commentPrefixes: string[];
|
|
1689
2012
|
sourceColumn: number;
|
|
1690
2013
|
targetColumn: number;
|
|
2014
|
+
} | {
|
|
2015
|
+
format: "hgb";
|
|
2016
|
+
encoding: "utf-8";
|
|
2017
|
+
nodeTypes: string[];
|
|
2018
|
+
linkTypes: {
|
|
2019
|
+
name: string;
|
|
2020
|
+
source: string;
|
|
2021
|
+
target: string;
|
|
2022
|
+
}[];
|
|
1691
2023
|
} | {
|
|
1692
2024
|
format: "csv-table";
|
|
1693
2025
|
encoding: "utf-8" | "latin1";
|
|
@@ -1725,6 +2057,19 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1725
2057
|
encoding: "utf-8";
|
|
1726
2058
|
weighted: boolean;
|
|
1727
2059
|
timestamped: boolean;
|
|
2060
|
+
} | {
|
|
2061
|
+
format: "user-item-counts";
|
|
2062
|
+
encoding: "utf-8";
|
|
2063
|
+
delimiter: "tab";
|
|
2064
|
+
skipLines: number;
|
|
2065
|
+
itemType: "artist";
|
|
2066
|
+
} | {
|
|
2067
|
+
format: "kg-triples";
|
|
2068
|
+
encoding: "utf-8" | "latin1";
|
|
2069
|
+
delimiter: "tab" | "space";
|
|
2070
|
+
order: "head-relation-tail" | "head-tail-relation";
|
|
2071
|
+
header: "none" | "names" | "count";
|
|
2072
|
+
quoted: boolean;
|
|
1728
2073
|
} | {
|
|
1729
2074
|
format: "gml";
|
|
1730
2075
|
encoding: "utf-8" | "latin1";
|
|
@@ -2067,4 +2412,4 @@ declare function countedKeys(id: CategoryId, collection: boolean): readonly stri
|
|
|
2067
2412
|
*/
|
|
2068
2413
|
declare function countTarget(id: CategoryId, target: CategoryTarget | CollectionTarget): ReadonlyMap<string, number>;
|
|
2069
2414
|
//#endregion
|
|
2070
|
-
export { CrosswalkReference as $, Catalogue as A, ManifestSchema as B, JsonScalarSchema as C,
|
|
2415
|
+
export { CrosswalkReference as $, Catalogue as A, ManifestSchema as B, JsonScalarSchema as C, parseEntry as Ct, GraphNodeSchema as D, GraphNode as E, NamespaceNode as F, ArchiveMember as G, parseManifest as H, createCatalogue as I, Citation as J, ArchiveMemberSchema as K, Lineage as L, CatalogueIndexSchema as M, Dataset as N, GraphV1 as O, DatasetQuery as P, ColumnNameSchema as Q, LineageSchema as R, JsonScalar as S, WaybackTimestampSchema as St, GraphEdgeSchema as T, AliasSchema as U, SemVerSchema as V, Archive as W, CollectionArchive as X, CitationSchema as Y, CollectionArchiveSchema as Z, TasksV1 as _, Snapshot as _t, CategoryTargets as a, IdSchema as at, Instance as b, SourceSchema as bt, countTarget as c, Namespace as ct, getCollectionTarget as d, ParserSchema as dt, CrosswalkReferenceSchema as et, getTarget as f, PartsArchive as ft, TaskSchema as g, RelativePathSchema as gt, Task as h, RecipeSchema as ht, CategoryTarget as i, HttpUrlSchema as it, CatalogueIndex as j, GraphV1Schema as k, countedKeys as l, NamespaceSchema as lt, listCategories as m, Recipe as mt, CategoryId as n, Entry as nt, CollectionTarget as o, Licence as ot, kindOf as p, RESERVED_META_KEYS as pt, ArchiveSchema as q, CategoryIdSchema as r, EntrySchema as rt, CountedKey as s, LicenceSchema as st, Category as t, DocumentArchive as tt, getCategory as u, Parser as ut, TasksV1Schema as v, SnapshotSchema as vt, GraphEdge as w, waybackUrl as wt, collectionOf as x, SubjectSchema as xt, Collection as y, Source as yt, Manifest as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CrosswalkReference, A as Catalogue, B as ManifestSchema, C as JsonScalarSchema, Ct as
|
|
1
|
+
import { $ as CrosswalkReference, A as Catalogue, B as ManifestSchema, C as JsonScalarSchema, Ct as parseEntry, D as GraphNodeSchema, E as GraphNode, F as NamespaceNode, G as ArchiveMember, H as parseManifest, I as createCatalogue, J as Citation, K as ArchiveMemberSchema, L as Lineage, M as CatalogueIndexSchema, N as Dataset, O as GraphV1, P as DatasetQuery, Q as ColumnNameSchema, R as LineageSchema, S as JsonScalar, St as WaybackTimestampSchema, T as GraphEdgeSchema, U as AliasSchema, V as SemVerSchema, W as Archive, X as CollectionArchive, Y as CitationSchema, Z as CollectionArchiveSchema, _ as TasksV1, _t as Snapshot, a as CategoryTargets, at as IdSchema, b as Instance, bt as SourceSchema, c as countTarget, ct as Namespace, d as getCollectionTarget, dt as ParserSchema, et as CrosswalkReferenceSchema, f as getTarget, ft as PartsArchive, g as TaskSchema, gt as RelativePathSchema, h as Task, ht as RecipeSchema, i as CategoryTarget, it as HttpUrlSchema, j as CatalogueIndex, k as GraphV1Schema, l as countedKeys, lt as NamespaceSchema, m as listCategories, mt as Recipe, n as CategoryId, nt as Entry, o as CollectionTarget, ot as Licence, p as kindOf, pt as RESERVED_META_KEYS, q as ArchiveSchema, r as CategoryIdSchema, rt as EntrySchema, s as CountedKey, st as LicenceSchema, t as Category, tt as DocumentArchive, u as getCategory, ut as Parser, v as TasksV1Schema, vt as SnapshotSchema, w as GraphEdge, wt as waybackUrl, x as collectionOf, xt as SubjectSchema, y as Collection, yt as Source, z as Manifest } from "./categories-Djnk3zwg.js";
|
|
2
2
|
import { Crosswalk } from "crossmap";
|
|
3
3
|
//#region src/errors.d.ts
|
|
4
4
|
/** The root of this package's error taxonomy: every error keepset throws is a `KeepsetError`, so callers can catch the family with one check. */
|
|
@@ -117,4 +117,4 @@ export declare function serialise(doc: Entry | Manifest | Crosswalk): string;
|
|
|
117
117
|
*/
|
|
118
118
|
export declare function validateDataset(dataset: Dataset): SyntaxIssue[];
|
|
119
119
|
//#endregion
|
|
120
|
-
export { AliasSchema, type Archive, type ArchiveMember, ArchiveMemberSchema, ArchiveSchema, type Catalogue, type CatalogueIndex, CatalogueIndexSchema, type Category, type CategoryId, CategoryIdSchema, type CategoryTarget, type CategoryTargets, type Citation, CitationSchema, type Collection, type CollectionArchive, CollectionArchiveSchema, type CollectionTarget, ColumnNameSchema, type CountedKey, type CrosswalkReference, CrosswalkReferenceSchema, type Dataset, type DatasetQuery, type DocumentArchive, type Entry, type EntryNames, EntrySchema, type GraphEdge, GraphEdgeSchema, type GraphNode, GraphNodeSchema, type GraphV1, GraphV1Schema, HttpUrlSchema, IdSchema, type Instance, type JsonScalar, JsonScalarSchema, type Licence, LicenceSchema, type Lineage, LineageSchema, type Manifest, ManifestSchema, type Namespace, type NamespaceNode, NamespaceSchema, type Parser, ParserSchema, RESERVED_META_KEYS, type Recipe, RecipeSchema, type RecipeStep, RelativePathSchema, type SegmentAliases, SemVerSchema, type Snapshot, SnapshotSchema, type Source, SourceSchema, SubjectSchema, type SyntaxIssue, type Task, TaskSchema, type TasksV1, TasksV1Schema, WaybackTimestampSchema, collectionOf, countTarget, countedKeys, createCatalogue, getCategory, getCollectionTarget, getTarget, kindOf, listCategories, parseEntry, parseManifest, waybackUrl };
|
|
120
|
+
export { AliasSchema, type Archive, type ArchiveMember, ArchiveMemberSchema, ArchiveSchema, type Catalogue, type CatalogueIndex, CatalogueIndexSchema, type Category, type CategoryId, CategoryIdSchema, type CategoryTarget, type CategoryTargets, type Citation, CitationSchema, type Collection, type CollectionArchive, CollectionArchiveSchema, type CollectionTarget, ColumnNameSchema, type CountedKey, type CrosswalkReference, CrosswalkReferenceSchema, type Dataset, type DatasetQuery, type DocumentArchive, type Entry, type EntryNames, EntrySchema, type GraphEdge, GraphEdgeSchema, type GraphNode, GraphNodeSchema, type GraphV1, GraphV1Schema, HttpUrlSchema, IdSchema, type Instance, type JsonScalar, JsonScalarSchema, type Licence, LicenceSchema, type Lineage, LineageSchema, type Manifest, ManifestSchema, type Namespace, type NamespaceNode, NamespaceSchema, type Parser, ParserSchema, type PartsArchive, RESERVED_META_KEYS, type Recipe, RecipeSchema, type RecipeStep, RelativePathSchema, type SegmentAliases, SemVerSchema, type Snapshot, SnapshotSchema, type Source, SourceSchema, SubjectSchema, type SyntaxIssue, type Task, TaskSchema, type TasksV1, TasksV1Schema, WaybackTimestampSchema, collectionOf, countTarget, countedKeys, createCatalogue, getCategory, getCollectionTarget, getTarget, kindOf, listCategories, parseEntry, parseManifest, waybackUrl };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ArchiveError, A as WaybackTimestampSchema, B as countedKeys, C as ParserSchema, D as SnapshotSchema, E as RelativePathSchema, F as groupsOf, G as listCategories, H as getCollectionTarget, I as namesOf, J as collectionOf, K as TaskSchema, M as toIssues, N as waybackUrl, O as SourceSchema, P as NAME_SEPARATOR, Q as JsonScalarSchema, R as CategoryIdSchema, S as NamespaceSchema, T as RecipeSchema, U as getTarget, V as getCategory, W as kindOf, X as GraphNodeSchema, Y as GraphEdgeSchema, Z as GraphV1Schema, _ as CrosswalkReferenceSchema, a as CatalogueIndexSchema, at as RecipeError, b as IdSchema, c as ManifestSchema, d as AliasSchema, et as CatalogueSyntaxError, f as ArchiveMemberSchema, g as ColumnNameSchema, h as CollectionArchiveSchema, i as listNamespaces, it as NativeParseError, j as parseEntry, k as SubjectSchema, l as SemVerSchema, m as CitationSchema, n as getManifest, nt as DatasetNotFoundError, o as createCatalogue, ot as UnknownCategoryError, p as ArchiveSchema, q as TasksV1Schema, r as listDatasets, rt as KeepsetError, s as LineageSchema, t as getDataset, tt as DatasetAmbiguousError, u as parseManifest, v as EntrySchema, w as RESERVED_META_KEYS, x as LicenceSchema, y as HttpUrlSchema, z as countTarget } from "./bundled-
|
|
1
|
+
import { $ as ArchiveError, A as WaybackTimestampSchema, B as countedKeys, C as ParserSchema, D as SnapshotSchema, E as RelativePathSchema, F as groupsOf, G as listCategories, H as getCollectionTarget, I as namesOf, J as collectionOf, K as TaskSchema, M as toIssues, N as waybackUrl, O as SourceSchema, P as NAME_SEPARATOR, Q as JsonScalarSchema, R as CategoryIdSchema, S as NamespaceSchema, T as RecipeSchema, U as getTarget, V as getCategory, W as kindOf, X as GraphNodeSchema, Y as GraphEdgeSchema, Z as GraphV1Schema, _ as CrosswalkReferenceSchema, a as CatalogueIndexSchema, at as RecipeError, b as IdSchema, c as ManifestSchema, d as AliasSchema, et as CatalogueSyntaxError, f as ArchiveMemberSchema, g as ColumnNameSchema, h as CollectionArchiveSchema, i as listNamespaces, it as NativeParseError, j as parseEntry, k as SubjectSchema, l as SemVerSchema, m as CitationSchema, n as getManifest, nt as DatasetNotFoundError, o as createCatalogue, ot as UnknownCategoryError, p as ArchiveSchema, q as TasksV1Schema, r as listDatasets, rt as KeepsetError, s as LineageSchema, t as getDataset, tt as DatasetAmbiguousError, u as parseManifest, v as EntrySchema, w as RESERVED_META_KEYS, x as LicenceSchema, y as HttpUrlSchema, z as countTarget } from "./bundled-CRr7GPD3.js";
|
|
2
2
|
import { validateCrosswalk } from "crossmap";
|
|
3
3
|
//#region src/serialise.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Dataset,
|
|
1
|
+
import { N as Dataset, _t as Snapshot, i as CategoryTarget, nt as Entry, o as CollectionTarget, yt as Source } from "../categories-Djnk3zwg.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: {
|
|
@@ -26,7 +26,7 @@ export interface Provenance {
|
|
|
26
26
|
readonly byteLength: number;
|
|
27
27
|
/** The archive member a document was read from. */
|
|
28
28
|
readonly member?: string;
|
|
29
|
-
/** The archive members a collection was read from, in the order they were read. */
|
|
29
|
+
/** The archive members a collection, or a document read from named parts, was read from, in the order they were read. */
|
|
30
30
|
readonly members?: readonly string[];
|
|
31
31
|
}
|
|
32
32
|
/** A fetched dataset: the resolved category target (one document, or for a recipe that selects archive members a collection of them), the provenance of the bytes it came from, and any warnings, such as a count that differs from the one the entry records. */
|