@sealcode/sealgen 0.19.35 → 0.19.38

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.
package/@types/index.d.ts CHANGED
@@ -21,28 +21,39 @@ export * from "./forms/controls/form-control.js";
21
21
  import { Context } from "koa";
22
22
  import { Readable } from "node:stream";
23
23
  export interface HTMLOptions {
24
- morphing?: boolean;
24
+ morphing?: boolean;
25
25
  }
26
26
  export interface HTMLHeadOptions {
27
- ctx: Context;
28
- title: string | Promise<string | Readable>;
29
- htmlOptions: Partial<HTMLOptions>;
30
- metaImage?: string;
31
- canonicalPath?: string;
32
- css_clumps: string[];
33
- description: string;
27
+ ctx: Context;
28
+ title: string | Promise<string | Readable> | { toString(): string };
29
+ htmlOptions: Partial<HTMLOptions>;
30
+ metaImage?: string;
31
+ canonicalPath?: string;
32
+ css_clumps: string[];
33
+ description: string | { toString(): string };
34
34
  }
35
35
  export interface HTMLArgs {
36
- ctx: Context;
37
- title: string | Promise<string>;
38
- body: string | Promise<string> | Readable;
39
- htmlOptions?: Partial<HTMLOptions>;
40
- makeHead?: (args: HTMLHeadOptions) => string | Promise<string> | Readable | Promise<Readable>;
41
- metaImage?: string;
42
- canonicalPath?: string;
43
- css_clumps?: string[];
44
- description: string;
45
- hideNavigation?: boolean;
36
+ ctx: Context;
37
+ title:
38
+ | string
39
+ | Promise<string>
40
+ | {
41
+ toString(): string;
42
+ };
43
+ body: string | Promise<string> | Readable;
44
+ htmlOptions?: Partial<HTMLOptions>;
45
+ makeHead?: (
46
+ args: HTMLHeadOptions
47
+ ) => string | Promise<string> | Readable | Promise<Readable>;
48
+ metaImage?: string;
49
+ canonicalPath?: string;
50
+ css_clumps?: string[];
51
+ description:
52
+ | string
53
+ | {
54
+ toString(): string;
55
+ };
56
+ hideNavigation?: boolean;
46
57
  }
47
58
  export type HTMLFunc = (args: HTMLArgs) => Readable | Promise<Readable>;
48
59
  export type BreadcrumbLabel = string | ((ctx: Context) => Promise<string>);
@@ -53,7 +53,7 @@ class CollectionField extends FormField {
53
53
  async isValueValid(ctx, value) {
54
54
  const { valid, reason } = await this.sealiousField.checkValue(
55
55
  ctx.$context,
56
- this.parsedToSealious(value),
56
+ await this.parsedToSealious(value),
57
57
  void 0,
58
58
  null,
59
59
  void 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealcode/sealgen",
3
- "version": "0.19.35",
3
+ "version": "0.19.38",
4
4
  "description": "Module to automate adding routes and collections to a sealious application",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -94,7 +94,7 @@ export class CollectionField<
94
94
  ): Promise<FormFieldValidationResponse> {
95
95
  const { valid, reason } = await this.sealiousField.checkValue(
96
96
  ctx.$context,
97
- this.parsedToSealious(value),
97
+ await this.parsedToSealious(value),
98
98
  undefined,
99
99
  null,
100
100
  undefined
package/src/index.ts CHANGED
@@ -28,17 +28,17 @@ export interface HTMLOptions {
28
28
 
29
29
  export interface HTMLHeadOptions {
30
30
  ctx: Context;
31
- title: string | Promise<string | Readable>;
31
+ title: string | Promise<string | Readable> | { toString(): string };
32
32
  htmlOptions: Partial<HTMLOptions>;
33
33
  metaImage?: string;
34
34
  canonicalPath?: string;
35
35
  css_clumps: string[];
36
- description: string;
36
+ description: string | { toString(): string };
37
37
  }
38
38
 
39
39
  export interface HTMLArgs {
40
40
  ctx: Context;
41
- title: string | Promise<string>;
41
+ title: string | Promise<string> | { toString(): string };
42
42
  body: string | Promise<string> | Readable;
43
43
  htmlOptions?: Partial<HTMLOptions>;
44
44
  makeHead?: (
@@ -47,7 +47,7 @@ export interface HTMLArgs {
47
47
  metaImage?: string;
48
48
  canonicalPath?: string;
49
49
  css_clumps?: string[];
50
- description: string;
50
+ description: string | { toString(): string };
51
51
  hideNavigation?: boolean;
52
52
  }
53
53