chore: Update dependencies

This commit is contained in:
Joachim Van Herwegen
2021-06-29 11:29:38 +02:00
parent d01382d36e
commit 5edbbc1958
37 changed files with 2904 additions and 3617 deletions

View File

@@ -142,8 +142,8 @@ export class ChainedConverter extends RepresentationConverter {
return input.representation;
}
const { path } = match;
this.logger.debug(`Converting ${match.inType} -> ${[ ...path.intermediateTypes, match.outType ].join(' -> ')}.`);
const { path, inType, outType } = match;
this.logger.debug(`Converting ${inType} -> ${[ ...path.intermediateTypes, outType ].join(' -> ')}.`);
const args = { ...input };
for (let i = 0; i < path.converters.length - 1; ++i) {
@@ -152,7 +152,7 @@ export class ChainedConverter extends RepresentationConverter {
args.representation = await path.converters[i].handle(args);
}
// For the last converter we set the preferences to the best output type
args.preferences = { type: { [match.outType]: 1 }};
args.preferences = { type: { [outType]: 1 }};
return path.converters.slice(-1)[0].handle(args);
}

View File

@@ -44,7 +44,7 @@ export class IfNeededConverter extends RepresentationConverter {
const noMatchingMediaType = !matchesMediaPreferences(contentType, preferences.type);
if (noMatchingMediaType) {
this.logger.debug(`Conversion needed for ${identifier
.path} from ${representation.metadata.contentType} to satisfy ${!preferences.type ?
.path} from ${contentType} to satisfy ${!preferences.type ?
'""' :
Object.entries(preferences.type).map(([ value, weight ]): string => `${value};q=${weight}`).join(', ')}`);
}