Typings and finishing touches

master
Kuba Orlik 4 years ago
parent 3fcf393d59
commit 6dea12aea3

1
.gitignore vendored

@ -21,3 +21,4 @@ lib
.xunit .xunit
coverage coverage
.nyc_output .nyc_output
/dist/

@ -15,7 +15,7 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"sealious": "^0.13.0" "sealious": "^0.13.2"
}, },
"devDependencies": { "devDependencies": {
"prettier": "^2.2.1", "prettier": "^2.2.1",

@ -1,8 +1,16 @@
import { resolve } from "path";
import { App, Collection, FieldTypes, Policies } from "sealious";
import _locreq from "locreq"; import _locreq from "locreq";
import { resolve } from "path";
import Sealious, { App, Collection, FieldTypes, Policies } from "sealious";
const locreq = _locreq(__dirname); const locreq = _locreq(__dirname);
declare module "koa" {
interface BaseContext {
$context: Sealious.Context;
$app: Sealious.App;
$body: Record<string, unknown>;
}
}
const app = new (class extends App { const app = new (class extends App {
config = { config = {
upload_path: locreq.resolve("uploaded_files"), upload_path: locreq.resolve("uploaded_files"),

Loading…
Cancel
Save