@lde/dataset 0.7.3 → 0.7.4
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/distribution.d.ts +5 -0
- package/dist/distribution.d.ts.map +1 -1
- package/dist/distribution.js +11 -0
- package/dist/mediaType.d.ts +7 -0
- package/dist/mediaType.d.ts.map +1 -1
- package/dist/mediaType.js +12 -0
- package/package.json +1 -1
package/dist/distribution.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export declare class Distribution {
|
|
|
13
13
|
* Use this for HTTP headers, format matching, etc.
|
|
14
14
|
*/
|
|
15
15
|
readonly mimeType?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Plain content type derived from {@link compressFormat}, e.g. `application/gzip`.
|
|
18
|
+
* Returns `undefined` when no compression format is declared.
|
|
19
|
+
*/
|
|
20
|
+
get compressMimeType(): string | undefined;
|
|
16
21
|
/**
|
|
17
22
|
* @param accessUrl Distribution access URL.
|
|
18
23
|
* @param mediaType IANA media type URI per DCAT-AP 3.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../src/distribution.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,kDACc,CAAC;AAElD,qBAAa,YAAY;
|
|
1
|
+
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../src/distribution.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,kDACc,CAAC;AAElD,qBAAa,YAAY;aAgCL,SAAS,EAAE,GAAG;aACd,SAAS,CAAC,EAAE,MAAM;aAClB,UAAU,CAAC,EAAE,GAAG;IAjC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,IAAW,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAKhD;IAED;;;;;;OAMG;gBAEe,SAAS,EAAE,GAAG,EACd,SAAS,CAAC,EAAE,MAAM,YAAA,EAClB,UAAU,CAAC,EAAE,GAAG,YAAA;IAO3B,QAAQ;WASD,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,MAAM;CAUxD;AAED,oBAAY,SAAS;IACnB,WAAW,0BAA0B;IACrC,SAAS,wBAAwB;IACjC,MAAM,gBAAgB;CACvB;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAWrE"}
|
package/dist/distribution.js
CHANGED
|
@@ -14,6 +14,17 @@ export class Distribution {
|
|
|
14
14
|
* Use this for HTTP headers, format matching, etc.
|
|
15
15
|
*/
|
|
16
16
|
mimeType;
|
|
17
|
+
/**
|
|
18
|
+
* Plain content type derived from {@link compressFormat}, e.g. `application/gzip`.
|
|
19
|
+
* Returns `undefined` when no compression format is declared.
|
|
20
|
+
*/
|
|
21
|
+
get compressMimeType() {
|
|
22
|
+
if (this.compressFormat === undefined)
|
|
23
|
+
return undefined;
|
|
24
|
+
return this.compressFormat.startsWith(IANA_MEDIA_TYPE_PREFIX)
|
|
25
|
+
? this.compressFormat.slice(IANA_MEDIA_TYPE_PREFIX.length)
|
|
26
|
+
: this.compressFormat;
|
|
27
|
+
}
|
|
17
28
|
/**
|
|
18
29
|
* @param accessUrl Distribution access URL.
|
|
19
30
|
* @param mediaType IANA media type URI per DCAT-AP 3.0
|
package/dist/mediaType.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export declare const sparqlMediaTypes: string[];
|
|
2
2
|
export declare const rdfMediaTypes: string[];
|
|
3
|
+
/**
|
|
4
|
+
* Plain content types that indicate compression of the body rather than the
|
|
5
|
+
* RDF serialization itself. Consumers use this to ignore an HTTP Content-Type
|
|
6
|
+
* that just means "bytes were gzipped/zipped" when matching against a declared
|
|
7
|
+
* RDF media type.
|
|
8
|
+
*/
|
|
9
|
+
export declare const compressionMediaTypes: ReadonlySet<string>;
|
|
3
10
|
//# sourceMappingURL=mediaType.d.ts.map
|
package/dist/mediaType.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaType.d.ts","sourceRoot":"","sources":["../src/mediaType.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,UAI5B,CAAC;AAEF,eAAO,MAAM,aAAa,UAKzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"mediaType.d.ts","sourceRoot":"","sources":["../src/mediaType.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,UAI5B,CAAC;AAEF,eAAO,MAAM,aAAa,UAKzB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAKpD,CAAC"}
|
package/dist/mediaType.js
CHANGED
|
@@ -11,3 +11,15 @@ export const rdfMediaTypes = [
|
|
|
11
11
|
iana('application/n-triples'),
|
|
12
12
|
iana('text/turtle'),
|
|
13
13
|
];
|
|
14
|
+
/**
|
|
15
|
+
* Plain content types that indicate compression of the body rather than the
|
|
16
|
+
* RDF serialization itself. Consumers use this to ignore an HTTP Content-Type
|
|
17
|
+
* that just means "bytes were gzipped/zipped" when matching against a declared
|
|
18
|
+
* RDF media type.
|
|
19
|
+
*/
|
|
20
|
+
export const compressionMediaTypes = new Set([
|
|
21
|
+
'application/gzip',
|
|
22
|
+
'application/x-gzip',
|
|
23
|
+
'application/zip',
|
|
24
|
+
'application/octet-stream',
|
|
25
|
+
]);
|