chore(deps): update all dependencies (#293)

This commit is contained in:
Ruben Verborgh
2020-11-02 09:08:14 +01:00
committed by GitHub
parent 73a56d8682
commit 0476ba8069
15 changed files with 1407 additions and 2617 deletions

View File

@@ -227,11 +227,9 @@ export class DataAccessorBasedStore implements ResourceStore {
metadata.identifier = DataFactory.namedNode(identifier.path);
metadata.addQuads(this.metadataController.generateResourceQuads(metadata.identifier, isContainer));
if (isContainer) {
await this.accessor.writeContainer(identifier, representation.metadata);
} else {
await this.accessor.writeDocument(identifier, representation.data, representation.metadata);
}
await (isContainer ?
this.accessor.writeContainer(identifier, representation.metadata) :
this.accessor.writeDocument(identifier, representation.data, representation.metadata));
}
/**

View File

@@ -14,7 +14,7 @@ interface DataEntry {
metadata: RepresentationMetadata;
}
interface ContainerEntry {
entries: { [name: string]: CacheEntry };
entries: Record<string, CacheEntry>;
metadata: RepresentationMetadata;
}
type CacheEntry = DataEntry | ContainerEntry;

View File

@@ -35,11 +35,11 @@ export class ChainedConverter extends TypedRepresentationConverter {
return this.converters[this.converters.length - 1];
}
public async getInputTypes(): Promise<{ [contentType: string]: number }> {
public async getInputTypes(): Promise<Record<string, number>> {
return this.first.getInputTypes();
}
public async getOutputTypes(): Promise<{ [contentType: string]: number }> {
public async getOutputTypes(): Promise<Record<string, number>> {
return this.last.getOutputTypes();
}
@@ -51,7 +51,7 @@ export class ChainedConverter extends TypedRepresentationConverter {
checkRequest(input, inTypes, outTypes);
}
private filterTypes(typeVals: { [contentType: string]: number }): string[] {
private filterTypes(typeVals: Record<string, number>): string[] {
return Object.keys(typeVals).filter((name): boolean => typeVals[name] > 0);
}

View File

@@ -13,11 +13,11 @@ import { TypedRepresentationConverter } from './TypedRepresentationConverter';
* Converts `internal/quads` to most major RDF serializations.
*/
export class QuadToRdfConverter extends TypedRepresentationConverter {
public async getInputTypes(): Promise<{ [contentType: string]: number }> {
public async getInputTypes(): Promise<Record<string, number>> {
return { [INTERNAL_QUADS]: 1 };
}
public async getOutputTypes(): Promise<{ [contentType: string]: number }> {
public async getOutputTypes(): Promise<Record<string, number>> {
return rdfSerializer.getContentTypesPrioritized();
}

View File

@@ -14,11 +14,11 @@ import { TypedRepresentationConverter } from './TypedRepresentationConverter';
* Converts most major RDF serializations to `internal/quads`.
*/
export class RdfToQuadConverter extends TypedRepresentationConverter {
public async getInputTypes(): Promise<{ [contentType: string]: number }> {
public async getInputTypes(): Promise<Record<string, number>> {
return rdfParser.getContentTypesPrioritized();
}
public async getOutputTypes(): Promise<{ [contentType: string]: number }> {
public async getOutputTypes(): Promise<Record<string, number>> {
return { [INTERNAL_QUADS]: 1 };
}

View File

@@ -9,12 +9,12 @@ export abstract class TypedRepresentationConverter extends RepresentationConvert
* The priority weight goes from 0 up to 1.
* @returns A promise resolving to a hash mapping content type to a priority number.
*/
public abstract getInputTypes(): Promise<{ [contentType: string]: number }>;
public abstract getInputTypes(): Promise<Record<string, number>>;
/**
* Get a hash of all supported output content types for this converter, mapped to a numerical priority.
* The priority weight goes from 0 up to 1.
* @returns A promise resolving to a hash mapping content type to a priority number.
*/
public abstract getOutputTypes(): Promise<{ [contentType: string]: number }>;
public abstract getOutputTypes(): Promise<Record<string, number>>;
}