Update sealgen to the newest, ESM version
This commit is contained in:
parent
f90e7702e4
commit
0d82616958
805
package-lock.json
generated
805
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -35,8 +35,8 @@
|
|||||||
"@hotwired/turbo": "^8.0.2",
|
"@hotwired/turbo": "^8.0.2",
|
||||||
"@koa/router": "^12.0.1",
|
"@koa/router": "^12.0.1",
|
||||||
"@playwright/test": "^1.36.1",
|
"@playwright/test": "^1.36.1",
|
||||||
"@sealcode/jdd": "^0.2.12",
|
"@sealcode/jdd": "^0.2.13",
|
||||||
"@sealcode/sealgen": "^0.11.8",
|
"@sealcode/sealgen": "^0.12.7",
|
||||||
"@sealcode/ts-predicates": "^0.4.3",
|
"@sealcode/ts-predicates": "^0.4.3",
|
||||||
"@types/kill-port": "^2.0.0",
|
"@types/kill-port": "^2.0.0",
|
||||||
"get-port": "^7.0.0",
|
"get-port": "^7.0.0",
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
import { Context } from "koa";
|
import { Context } from "koa";
|
||||||
import {
|
import { Form, Fields, Controls, fieldsToShape } from "@sealcode/sealgen";
|
||||||
Form,
|
|
||||||
FormData,
|
|
||||||
FormDataValue,
|
|
||||||
Fields,
|
|
||||||
Controls,
|
|
||||||
FormReaction,
|
|
||||||
} from "@sealcode/sealgen";
|
|
||||||
import { FlatTemplatable, tempstream } from "tempstream";
|
import { FlatTemplatable, tempstream } from "tempstream";
|
||||||
import { Users } from "../collections/collections.js";
|
import { Users } from "../collections/collections.js";
|
||||||
import type { PageErrorMessage } from "@sealcode/sealgen/@types/page/mountable-with-fields.js";
|
|
||||||
import html from "../html.js";
|
import html from "../html.js";
|
||||||
|
import type {
|
||||||
|
FormDataValue,
|
||||||
|
FormData,
|
||||||
|
FormReaction,
|
||||||
|
} from "@sealcode/sealgen/@types/src/forms/form-types.js";
|
||||||
|
import type { PageErrorMessage } from "@sealcode/sealgen/@types/src/page/mountable-with-fields.js";
|
||||||
|
|
||||||
export const actionName = "SignIn";
|
export const actionName = "SignIn";
|
||||||
|
|
||||||
@ -19,7 +17,7 @@ const fields = {
|
|||||||
password: new Fields.SimpleFormField(true),
|
password: new Fields.SimpleFormField(true),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SignInShape = Fields.fieldsToShape(fields);
|
export const SignInShape = fieldsToShape(fields);
|
||||||
|
|
||||||
export default new (class SignInForm extends Form<typeof fields, void> {
|
export default new (class SignInForm extends Form<typeof fields, void> {
|
||||||
defaultSuccessMessage = "Formularz wypełniony poprawnie";
|
defaultSuccessMessage = "Formularz wypełniony poprawnie";
|
||||||
|
@ -6,6 +6,7 @@ import {
|
|||||||
Fields,
|
Fields,
|
||||||
Controls,
|
Controls,
|
||||||
FormReaction,
|
FormReaction,
|
||||||
|
fieldsToShape,
|
||||||
} from "@sealcode/sealgen";
|
} from "@sealcode/sealgen";
|
||||||
import { Users } from "../collections/collections.js";
|
import { Users } from "../collections/collections.js";
|
||||||
import html from "../html.js";
|
import html from "../html.js";
|
||||||
@ -18,7 +19,7 @@ const fields = {
|
|||||||
password: new Fields.SimpleFormField(true),
|
password: new Fields.SimpleFormField(true),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SignUpShape = Fields.fieldsToShape(fields);
|
export const SignUpShape = fieldsToShape(fields);
|
||||||
|
|
||||||
export default new (class SignUpForm extends Form<typeof fields, void> {
|
export default new (class SignUpForm extends Form<typeof fields, void> {
|
||||||
defaultSuccessMessage = "Formularz wypełniony poprawnie";
|
defaultSuccessMessage = "Formularz wypełniony poprawnie";
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
import { tempstream } from "tempstream";
|
import { tempstream } from "tempstream";
|
||||||
import { Context } from "koa";
|
import { Context } from "koa";
|
||||||
import { Form, FormData, FormDataValue, Fields, Controls } from "@sealcode/sealgen";
|
import {
|
||||||
|
Form,
|
||||||
|
FormData,
|
||||||
|
FormDataValue,
|
||||||
|
Fields,
|
||||||
|
Controls,
|
||||||
|
fieldsToShape,
|
||||||
|
} from "@sealcode/sealgen";
|
||||||
import { Tasks } from "../collections/collections.js";
|
import { Tasks } from "../collections/collections.js";
|
||||||
import html from "../html.js";
|
import html from "../html.js";
|
||||||
import { TaskList } from "./common/tasks-view.js";
|
import { TaskList } from "./common/tasks-view.js";
|
||||||
@ -11,7 +18,7 @@ const fields = {
|
|||||||
name: new Fields.CollectionField(true, Tasks.fields.title),
|
name: new Fields.CollectionField(true, Tasks.fields.title),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TodoShape = Fields.fieldsToShape(fields);
|
export const TodoShape = fieldsToShape(fields);
|
||||||
|
|
||||||
export default new (class TodoForm extends Form<typeof fields, void> {
|
export default new (class TodoForm extends Form<typeof fields, void> {
|
||||||
defaultSuccessMessage = "Task has been successfully created";
|
defaultSuccessMessage = "Task has been successfully created";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user