Typings and finishing touches
This commit is contained in:
parent
3fcf393d59
commit
6dea12aea3
1
.gitignore
vendored
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",
|
||||||
|
12
src/index.ts
12
src/index.ts
@ -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…
x
Reference in New Issue
Block a user