Update sealious and sealgen
This commit is contained in:
parent
2f518990fe
commit
75958bdd33
1111
package-lock.json
generated
1111
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -20,14 +20,14 @@
|
|||||||
"@babel/core": "^7.12.10",
|
"@babel/core": "^7.12.10",
|
||||||
"@hotwired/turbo": "^7.1.0",
|
"@hotwired/turbo": "^7.1.0",
|
||||||
"@koa/router": "^10.1.1",
|
"@koa/router": "^10.1.1",
|
||||||
"@sealcode/sealgen": "^0.5.3",
|
"@sealcode/sealgen": "^0.8.39",
|
||||||
"@sealcode/ts-predicates": "^0.4.0",
|
"@sealcode/ts-predicates": "^0.4.0",
|
||||||
"@types/kill-port": "^2.0.0",
|
"@types/kill-port": "^2.0.0",
|
||||||
"hint": "^7.0.1",
|
"hint": "^7.0.1",
|
||||||
"locreq": "^2.0.2",
|
"locreq": "^2.0.2",
|
||||||
"multiple-scripts-tmux": "^1.0.4",
|
"multiple-scripts-tmux": "^1.0.4",
|
||||||
"nodemon": "^2.0.7",
|
"nodemon": "^2.0.7",
|
||||||
"sealious": "^0.15.8",
|
"sealious": "^0.17.21",
|
||||||
"stimulus": "^2.0.0",
|
"stimulus": "^2.0.0",
|
||||||
"tempstream": "^0.0.21"
|
"tempstream": "^0.0.21"
|
||||||
},
|
},
|
||||||
|
@ -1,36 +1,11 @@
|
|||||||
// DO NOT EDIT! This file is generated automaticaly with npm run generate-routes
|
// DO NOT EDIT! This file is generated automaticaly with npm run generate-routes
|
||||||
|
|
||||||
import Koa, { Context } from "koa";
|
|
||||||
import Router from "@koa/router";
|
import Router from "@koa/router";
|
||||||
import { Middlewares } from "sealious";
|
import { mount } from "@sealcode/sealgen";
|
||||||
import { Mountable } from "@sealcode/sealgen";
|
|
||||||
import * as URLs from "./urls";
|
import * as URLs from "./urls";
|
||||||
|
|
||||||
import { default as Hello } from "./hello.page";
|
import { default as Hello } from "./hello.page";
|
||||||
|
|
||||||
async function handleHtmlPromise(ctx: Context, next: Koa.Next) {
|
|
||||||
await next();
|
|
||||||
if (ctx.body instanceof Promise) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
||||||
ctx.body = await ctx.body;
|
|
||||||
}
|
|
||||||
ctx.set("content-type", "text/html;charset=utf-8");
|
|
||||||
}
|
|
||||||
|
|
||||||
function mount(router: Router, URL: string, mountable: Mountable) {
|
|
||||||
router.use(
|
|
||||||
URL,
|
|
||||||
Middlewares.extractContext(),
|
|
||||||
Middlewares.parseBody(),
|
|
||||||
handleHtmlPromise
|
|
||||||
);
|
|
||||||
mountable.init();
|
|
||||||
mountable.mount(router, URL);
|
|
||||||
// to automatically add trailing slashes:
|
|
||||||
router.get(URL.slice(0, -1), (ctx) => ctx.redirect(URL));
|
|
||||||
router.use(URL, (ctx) => ctx.set("content-type", "text/html;charset=utf-8"));
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function mountAutoRoutes(router: Router) {
|
export default function mountAutoRoutes(router: Router) {
|
||||||
mount(router, URLs.HelloURL, Hello);
|
mount(router, URLs.HelloURL, Hello);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
// DO NOT EDIT! This file is generated automaticaly with npx sealgen generate-scss-includes
|
// DO NOT EDIT! This file is generated automaticaly with npx sealgen generate-scss-includes
|
||||||
|
|
||||||
|
@import "../node_modules/@sealcode/sealgen/src/forms/forms.scss";
|
||||||
@import "back/routes/common/ui/input.scss";
|
@import "back/routes/common/ui/input.scss";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user