Update sealgen to the newest, ESM version

master
Kuba Orlik 9 months ago
parent f90e7702e4
commit 0d82616958

805
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -35,8 +35,8 @@
"@hotwired/turbo": "^8.0.2",
"@koa/router": "^12.0.1",
"@playwright/test": "^1.36.1",
"@sealcode/jdd": "^0.2.12",
"@sealcode/sealgen": "^0.11.8",
"@sealcode/jdd": "^0.2.13",
"@sealcode/sealgen": "^0.12.7",
"@sealcode/ts-predicates": "^0.4.3",
"@types/kill-port": "^2.0.0",
"get-port": "^7.0.0",

@ -1,16 +1,14 @@
import { Context } from "koa";
import {
Form,
FormData,
FormDataValue,
Fields,
Controls,
FormReaction,
} from "@sealcode/sealgen";
import { Form, Fields, Controls, fieldsToShape } from "@sealcode/sealgen";
import { FlatTemplatable, tempstream } from "tempstream";
import { Users } from "../collections/collections.js";
import type { PageErrorMessage } from "@sealcode/sealgen/@types/page/mountable-with-fields.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";
@ -19,7 +17,7 @@ const fields = {
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> {
defaultSuccessMessage = "Formularz wypełniony poprawnie";

@ -6,6 +6,7 @@ import {
Fields,
Controls,
FormReaction,
fieldsToShape,
} from "@sealcode/sealgen";
import { Users } from "../collections/collections.js";
import html from "../html.js";
@ -18,7 +19,7 @@ const fields = {
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> {
defaultSuccessMessage = "Formularz wypełniony poprawnie";

@ -1,6 +1,13 @@
import { tempstream } from "tempstream";
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 html from "../html.js";
import { TaskList } from "./common/tasks-view.js";
@ -11,7 +18,7 @@ const fields = {
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> {
defaultSuccessMessage = "Task has been successfully created";

Loading…
Cancel
Save