fix: lock and format
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import Route from "route-parser";
|
||||
import Route from 'route-parser';
|
||||
|
||||
import {
|
||||
HandlerInput,
|
||||
IHandlerOutput,
|
||||
EngineFunction,
|
||||
RouteValues,
|
||||
} from "./types/handler";
|
||||
} from './types/handler';
|
||||
|
||||
import { NoHandlerFoundError } from "./types/errors";
|
||||
import { NoHandlerFoundError } from './types/errors';
|
||||
|
||||
interface IRoute<TParams extends RouteValues> {
|
||||
route: Route;
|
||||
|
@ -1,3 +1,3 @@
|
||||
import { Engine } from "./engine";
|
||||
import { Engine } from './engine';
|
||||
|
||||
export { Engine };
|
||||
|
@ -13,12 +13,12 @@ export abstract class TxtDotError extends Error {
|
||||
|
||||
export class NoHandlerFoundError extends TxtDotError {
|
||||
constructor(message: string) {
|
||||
super(404, "NoHandlerFoundError", `No handler found for: ${message}`);
|
||||
super(404, 'NoHandlerFoundError', `No handler found for: ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
export class EngineParseError extends TxtDotError {
|
||||
constructor(message: string) {
|
||||
super(422, "EngineParseError", `Parse error: ${message}`);
|
||||
super(422, 'EngineParseError', `Parse error: ${message}`);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { parseHTML } from "linkedom";
|
||||
import { Engine } from "../engine";
|
||||
import { parseHTML } from 'linkedom';
|
||||
import { Engine } from '../engine';
|
||||
|
||||
export class HandlerInput {
|
||||
private data: string;
|
||||
@ -33,19 +33,19 @@ export interface IHandlerOutput {
|
||||
}
|
||||
|
||||
export const handlerSchema = {
|
||||
type: "object",
|
||||
type: 'object',
|
||||
properties: {
|
||||
content: {
|
||||
type: "string",
|
||||
type: 'string',
|
||||
},
|
||||
textContent: {
|
||||
type: "string",
|
||||
type: 'string',
|
||||
},
|
||||
title: {
|
||||
type: "string",
|
||||
type: 'string',
|
||||
},
|
||||
lang: {
|
||||
type: "string",
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user