@sealcode/sealgen 0.19.2 → 0.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { FormDataValue } from "../form-types.js";
1
+ import { FormData, FormDataValue } from "../form-types.js";
2
2
  import { Context } from "koa";
3
3
  import { FieldParseResult, FormField } from "./field.js";
4
4
  import { SimpleInput } from "../controls/simple-input.js";
@@ -14,8 +14,8 @@ export declare abstract class SimpleFormField<Required extends boolean, DefaultC
14
14
  export declare class TextBasedSimpleField<Required extends boolean, DefaultControl extends FormControl = SimpleInput> extends SimpleFormField<Required, DefaultControl, string | null> {
15
15
  parse(_: Context, raw_value: FormDataValue): Promise<FieldParseResult<string>>;
16
16
  getSealiousCreateValue(fctx: FormControlContext): Promise<string | null>;
17
- postSealiousCreate(ctx: Context, created_item: CollectionItem<any>): Promise<void>;
18
- postSealiousEdit(ctx: Context, edited_item: CollectionItem<any>): Promise<void>;
17
+ postSealiousCreate(_ctx: Context, _created_item: CollectionItem<any>, _formData: FormData): Promise<void>;
18
+ postSealiousEdit(ctx: Context, _edited_item: CollectionItem<any>, _formData: FormData): Promise<void>;
19
19
  getControl(): DefaultControl;
20
20
  getEmptyValue(): string;
21
21
  }
@@ -30,9 +30,9 @@ class TextBasedSimpleField extends SimpleFormField {
30
30
  );
31
31
  return parsed || "";
32
32
  }
33
- async postSealiousCreate(ctx, created_item) {
33
+ async postSealiousCreate(_ctx, _created_item, _formData) {
34
34
  }
35
- async postSealiousEdit(ctx, edited_item) {
35
+ async postSealiousEdit(ctx, _edited_item, _formData) {
36
36
  }
37
37
  getControl() {
38
38
  return new SimpleInput(this, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealcode/sealgen",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "description": "Module to automate adding routes and collections to a sealious application",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  /* eslint @typescript-eslint/no-unused-vars: off */
2
- import { FormDataValue } from "../form-types.js";
2
+ import { FormData, FormDataValue } from "../form-types.js";
3
3
  import { Context } from "koa";
4
4
  import { predicates } from "@sealcode/ts-predicates";
5
5
  import { FieldParseResult, FormField } from "./field.js";
@@ -61,15 +61,17 @@ export class TextBasedSimpleField<
61
61
  }
62
62
 
63
63
  async postSealiousCreate(
64
- ctx: Context,
64
+ _ctx: Context,
65
65
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
66
- created_item: CollectionItem<any>
66
+ _created_item: CollectionItem<any>,
67
+ _formData: FormData
67
68
  ): Promise<void> {}
68
69
 
69
70
  async postSealiousEdit(
70
71
  ctx: Context,
71
72
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
72
- edited_item: CollectionItem<any>
73
+ _edited_item: CollectionItem<any>,
74
+ _formData: FormData
73
75
  ): Promise<void> {}
74
76
 
75
77
  getControl(): DefaultControl {