@sealcode/sealgen 0.19.16 → 0.19.17
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/app-config/get-app-port.d.ts +1 -0
- package/@types/app-config/load-app-config.d.ts +4 -0
- package/@types/app-config/resolve-app-config-path.d.ts +1 -0
- package/@types/forms/fields/structured-array.d.ts +2 -2
- package/@types/utils/translate.d.ts +2 -1
- package/lib/forms/controls/tickable.js +1 -3
- package/lib/forms/fields/collection-field.js +2 -1
- package/lib/generate-routes.js +23 -1
- package/lib/utils/translate.js +4 -4
- package/package.json +2 -2
- package/src/forms/fields/collection-field.ts +2 -1
- package/src/forms/fields/structured-array.ts +2 -11
- package/src/generate-routes.ts +38 -9
- package/.xunit +0 -75
- package/@types/add-verbose-crud.d.ts +0 -3
- package/@types/builders/colors-builder.d.sync-conflict-20250918-184323-TFDLWFG.ts +0 -10
- package/@types/builders/fonts-builder.d.sync-conflict-20250918-184322-TFDLWFG.ts +0 -7
- package/@types/controllers/table-add-button.d.ts +0 -6
- package/@types/crud-field-snippets.d.ts +0 -1
- package/@types/find-css-includes.d.ts +0 -1
- package/@types/forms/controls/array.d.sync-conflict-20250918-184306-TFDLWFG.ts +0 -33
- package/@types/forms/controls/array.sync-conflict-20250918-222045-TFDLWFG.d.ts +0 -33
- package/@types/forms/controls/autocomplete.d.sync-conflict-20250918-222042-TFDLWFG.ts +0 -22
- package/@types/forms/controls/checkbox-group.d.sync-conflict-20250918-184319-TFDLWFG.ts +0 -21
- package/@types/forms/controls/checkboxed-list-input.d.sync-conflict-20250918-184323-TFDLWFG.ts +0 -21
- package/@types/forms/controls/derived-frame.d.sync-conflict-20250918-184314-TFDLWFG.ts +0 -19
- package/@types/forms/controls/dropdown.d.sync-conflict-20250918-222044-TFDLWFG.ts +0 -30
- package/@types/forms/controls/file.d.sync-conflict-20250918-222045-TFDLWFG.ts +0 -13
- package/@types/forms/controls/form-control.d.sync-conflict-20250918-184322-TFDLWFG.ts +0 -19
- package/@types/forms/controls/form-control.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -19
- package/@types/forms/controls/multiple-files.d.sync-conflict-20250918-184318-TFDLWFG.ts +0 -42
- package/@types/forms/controls/multiple-photos.d.ts +0 -19
- package/@types/forms/controls/number.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -13
- package/@types/forms/controls/photo.d.sync-conflict-20250918-184321-TFDLWFG.ts +0 -19
- package/@types/forms/controls/photo.d.ts +0 -19
- package/@types/forms/controls/photo.test.d.ts +0 -1
- package/@types/forms/controls/reverse-single-reference.d.ts +0 -1
- package/@types/forms/controls/simple-input.d.sync-conflict-20250918-184310-TFDLWFG.ts +0 -33
- package/@types/forms/controls/simple-input.d.sync-conflict-20250918-222042-TFDLWFG.ts +0 -33
- package/@types/forms/controls/simple-input.sync-conflict-20250918-222045-TFDLWFG.d.ts +0 -33
- package/@types/forms/controls/table.d.sync-conflict-20250918-184302-TFDLWFG.ts +0 -39
- package/@types/forms/controls/table.sync-conflict-20250918-222042-TFDLWFG.d.ts +0 -39
- package/@types/forms/controls/textarea.d.sync-conflict-20250918-222045-TFDLWFG.ts +0 -25
- package/@types/forms/fields/boolean.d.sync-conflict-20250918-184325-TFDLWFG.ts +0 -22
- package/@types/forms/fields/boolean.sync-conflict-20250918-222042-TFDLWFG.d.ts +0 -22
- package/@types/forms/fields/checkboxed-list.d.sync-conflict-20250918-184325-TFDLWFG.ts +0 -23
- package/@types/forms/fields/collection-field.d.sync-conflict-20250918-184319-TFDLWFG.ts +0 -22
- package/@types/forms/fields/collection-field.d.sync-conflict-20250918-222047-TFDLWFG.ts +0 -22
- package/@types/forms/fields/coordinates.d.sync-conflict-20250918-222044-TFDLWFG.ts +0 -14
- package/@types/forms/fields/datetime.d.sync-conflict-20250918-222050-TFDLWFG.ts +0 -4
- package/@types/forms/fields/email.d.sync-conflict-20250918-184303-TFDLWFG.ts +0 -8
- package/@types/forms/fields/enum-multiple-sealious.sync-conflict-20250918-222047-TFDLWFG.d.ts +0 -16
- package/@types/forms/fields/enum-multiple.d.ts +0 -18
- package/@types/forms/fields/enum-multiple.test.d.ts +0 -1
- package/@types/forms/fields/enum.d.ts +0 -18
- package/@types/forms/fields/enum.test.d.ts +0 -1
- package/@types/forms/fields/field.d.sync-conflict-20250918-184306-TFDLWFG.ts +0 -70
- package/@types/forms/fields/fields.d.sync-conflict-20250918-184314-TFDLWFG.ts +0 -29
- package/@types/forms/fields/file.d.sync-conflict-20250918-184310-TFDLWFG.ts +0 -23
- package/@types/forms/fields/file.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -23
- package/@types/forms/fields/file.sync-conflict-20250918-222049-TFDLWFG.d.ts +0 -23
- package/@types/forms/fields/get-field-for-sealious.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -29
- package/@types/forms/fields/get-field-for-sealious.sync-conflict-20250918-222042-TFDLWFG.d.ts +0 -29
- package/@types/forms/fields/image.d.sync-conflict-20250918-222042-TFDLWFG.ts +0 -5
- package/@types/forms/fields/multiple-files.d.sync-conflict-20250918-184304-TFDLWFG.ts +0 -16
- package/@types/forms/fields/number.d.sync-conflict-20250918-184317-TFDLWFG.ts +0 -25
- package/@types/forms/fields/number.d.sync-conflict-20250918-222047-TFDLWFG.ts +0 -25
- package/@types/forms/fields/pick-from-list.d.sync-conflict-20250918-184322-TFDLWFG.ts +0 -15
- package/@types/forms/fields/proxy-field.d.sync-conflict-20250918-184307-TFDLWFG.ts +0 -15
- package/@types/forms/fields/regexp.d.sync-conflict-20250918-184305-TFDLWFG.ts +0 -21
- package/@types/forms/fields/regexp.d.sync-conflict-20250918-222045-TFDLWFG.ts +0 -21
- package/@types/forms/fields/regexp.sync-conflict-20250918-222047-TFDLWFG.d.ts +0 -21
- package/@types/forms/fields/reverse-single-reference.d.ts +0 -13
- package/@types/forms/fields/simple-form-field.d.sync-conflict-20250918-184309-TFDLWFG.ts +0 -29
- package/@types/forms/fields/simple-form-field.d.sync-conflict-20250918-222044-TFDLWFG.ts +0 -29
- package/@types/forms/fields/simple-form-field.sync-conflict-20250918-222049-TFDLWFG.d.ts +0 -29
- package/@types/forms/fields/single-reference.sync-conflict-20250918-222043-TFDLWFG.d.ts +0 -10
- package/@types/forms/fields/structured-array.d.sync-conflict-20250918-184302-TFDLWFG.ts +0 -27
- package/@types/forms/fields/structured-array.d.sync-conflict-20250918-222049-TFDLWFG.ts +0 -27
- package/@types/forms/fields/structured-array.sync-conflict-20250918-222047-TFDLWFG.d.ts +0 -27
- package/@types/forms/fields/table.d.sync-conflict-20250918-184303-TFDLWFG.ts +0 -16
- package/@types/forms/form-types.d.sync-conflict-20250918-222045-TFDLWFG.ts +0 -26
- package/@types/forms/form.d.sync-conflict-20250918-184315-TFDLWFG.ts +0 -32
- package/@types/forms/form.d.sync-conflict-20250918-222049-TFDLWFG.ts +0 -32
- package/@types/forms/form.sync-conflict-20250918-222049-TFDLWFG.d.ts +0 -33
- package/@types/forms/form.test.d.sync-conflict-20250918-184318-TFDLWFG.ts +0 -6
- package/@types/forms/form.test.d.sync-conflict-20250918-222047-TFDLWFG.ts +0 -6
- package/@types/forms/multiform.d.sync-conflict-20250918-184308-TFDLWFG.ts +0 -23
- package/@types/forms/multiform.sync-conflict-20250918-222044-TFDLWFG.d.ts +0 -23
- package/@types/index.d.sync-conflict-20250918-184316-TFDLWFG.ts +0 -46
- package/@types/mount.d.sync-conflict-20250918-184320-TFDLWFG.ts +0 -6
- package/@types/page/list.d.sync-conflict-20250918-184318-TFDLWFG.ts +0 -48
- package/@types/page/list.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -48
- package/@types/page/list.sync-conflict-20250918-222048-TFDLWFG.d.ts +0 -48
- package/@types/page/mountable-with-fields.d.sync-conflict-20250918-184321-TFDLWFG.ts +0 -42
- package/@types/page/mountable-with-fields.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -42
- package/@types/page/mountable-with-fields.sync-conflict-20250918-222044-TFDLWFG.d.ts +0 -42
- package/@types/page/mountable.d.sync-conflict-20250918-184306-TFDLWFG.ts +0 -10
- package/@types/page/page.d.sync-conflict-20250918-184320-TFDLWFG.ts +0 -18
- package/@types/page/props-parser.d.sync-conflict-20250918-184305-TFDLWFG.ts +0 -15
- package/@types/page/stateful-page.d.sync-conflict-20250918-184326-TFDLWFG.ts +0 -62
- package/@types/templates/shared/handlers/boolean.d.ts +0 -2
- package/@types/templates/shared/handlers/date.d.ts +0 -2
- package/@types/templates/shared/handlers/deep-reverse-single-reference.d.ts +0 -2
- package/@types/templates/shared/handlers/default.d.ts +0 -2
- package/@types/templates/shared/handlers/enum.d.ts +0 -2
- package/@types/templates/shared/handlers/file.d.ts +0 -2
- package/@types/templates/shared/handlers/image.d.ts +0 -2
- package/@types/templates/shared/handlers/int.d.ts +0 -2
- package/@types/templates/shared/handlers/jdd.d.ts +0 -2
- package/@types/templates/shared/handlers/single-reference.d.ts +0 -2
- package/@types/templates/shared/handlers/structured-array.d.ts +0 -2
- package/@types/templates/shared/shared-crud-form-fields.d.sync-conflict-20250918-184306-TFDLWFG.ts +0 -1
- package/@types/test_utils/test-on-real-app.d.sync-conflict-20250918-184320-TFDLWFG.ts +0 -26
- package/@types/utils/extract-fields-from-collection.d.sync-conflict-20250918-184312-TFDLWFG.ts +0 -18
- package/@types/utils/extract-fields-from-collection.sync-conflict-20250918-222045-TFDLWFG.d.ts +0 -18
- /package/@types/{add-crud.d.sync-conflict-20250918-184311-TFDLWFG.ts → app-config/get-app-port.test.d.ts} +0 -0
- /package/@types/{crud-field-snippets.d.sync-conflict-20250918-184323-TFDLWFG.ts → app-config/load-app-config.test.d.ts} +0 -0
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import Router from "@koa/router";
|
|
2
|
-
import { Context } from "koa";
|
|
3
|
-
import { Templatable } from "tempstream";
|
|
4
|
-
import { Mountable } from "./mountable.js";
|
|
5
|
-
export type StatefulPageActionDescription<ActionName> = {
|
|
6
|
-
action: ActionName;
|
|
7
|
-
label?: string;
|
|
8
|
-
content?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
} | ActionName;
|
|
11
|
-
export type StateAndMetadata<State, Actions> = {
|
|
12
|
-
state: State;
|
|
13
|
-
inputs: Record<string, string>;
|
|
14
|
-
action: keyof Actions;
|
|
15
|
-
action_args: string;
|
|
16
|
-
} | {
|
|
17
|
-
state: State;
|
|
18
|
-
inputs: Record<string, string>;
|
|
19
|
-
action: null;
|
|
20
|
-
action_args: null;
|
|
21
|
-
$: Record<string, unknown>;
|
|
22
|
-
};
|
|
23
|
-
export type StatefulPageActionArgument<State extends Record<string, unknown>, Args extends unknown[] = unknown[]> = {
|
|
24
|
-
ctx: Context;
|
|
25
|
-
state: State;
|
|
26
|
-
inputs: Record<string, string>;
|
|
27
|
-
args: Args;
|
|
28
|
-
page: StatefulPage<any, any>;
|
|
29
|
-
};
|
|
30
|
-
export type StatefulPageAction<State extends Record<string, unknown>, Args extends unknown[] = unknown[]> = (obj: StatefulPageActionArgument<State, Args>) => State | Promise<State>;
|
|
31
|
-
export type ExtractStatefulPageActionArgs<X> = X extends StatefulPageAction<any, infer Args> ? Args : never;
|
|
32
|
-
export declare abstract class StatefulPage<State extends Record<string, unknown>, Actions extends Record<string, StatefulPageAction<State>>> extends Mountable {
|
|
33
|
-
abstract actions: Actions;
|
|
34
|
-
abstract getInitialState(ctx: Context): State | Promise<State>;
|
|
35
|
-
abstract render(ctx: Context, state: State, inputs: Record<string, string>): Templatable | Promise<Templatable>;
|
|
36
|
-
canAccess(_ctx: Context): Promise<{
|
|
37
|
-
canAccess: boolean;
|
|
38
|
-
message: string;
|
|
39
|
-
}>;
|
|
40
|
-
constructor();
|
|
41
|
-
abstract wrapInLayout(ctx: Context, content: Templatable, state: State): Templatable;
|
|
42
|
-
wrapInForm(context: Context, state: State, content: Templatable): Promise<Templatable>;
|
|
43
|
-
extractActionAndLabel<ActionName extends keyof Actions>(action_description: StatefulPageActionDescription<ActionName>): {
|
|
44
|
-
action: string;
|
|
45
|
-
label: string;
|
|
46
|
-
content: string;
|
|
47
|
-
disabled: boolean;
|
|
48
|
-
};
|
|
49
|
-
makeActionURL<ActionName extends keyof Actions>(action_description: StatefulPageActionDescription<ActionName>, ...args: ExtractStatefulPageActionArgs<Actions[ActionName]>): string;
|
|
50
|
-
makeActionButton<ActionName extends keyof Actions>(_state: State, action_description: StatefulPageActionDescription<ActionName>, ...args: ExtractStatefulPageActionArgs<Actions[ActionName]>): string;
|
|
51
|
-
makeActionCallback<ActionName extends keyof Actions>(action_description: {
|
|
52
|
-
action: ActionName;
|
|
53
|
-
label?: string;
|
|
54
|
-
} | ActionName, ...args: ExtractStatefulPageActionArgs<Actions[ActionName]>): string;
|
|
55
|
-
rerender(): string;
|
|
56
|
-
preprocessState(values: State): Promise<State>;
|
|
57
|
-
preprocessOverrides(_context: Context, _state: State, values: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
58
|
-
serializeState(_context: Context, state: State): Promise<string>;
|
|
59
|
-
deserializeState(_context: Context, s: string): Promise<State>;
|
|
60
|
-
extractState(ctx: Context): Promise<StateAndMetadata<State, Actions>>;
|
|
61
|
-
mount(router: Router, path: string): void;
|
|
62
|
-
}
|
package/@types/templates/shared/shared-crud-form-fields.d.sync-conflict-20250918-184306-TFDLWFG.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function sharedCrudFormFields(collection_name: string, newfilefullpath: string): Promise<string>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import EventEmitter from "events";
|
|
2
|
-
export declare const callSealgenBin: () => string;
|
|
3
|
-
export declare class RealAppTest {
|
|
4
|
-
node_pid: number;
|
|
5
|
-
app_port: number;
|
|
6
|
-
mongo_port: number;
|
|
7
|
-
app_path: string;
|
|
8
|
-
container_name: string;
|
|
9
|
-
emitter: EventEmitter<[never]>;
|
|
10
|
-
static init(): Promise<RealAppTest>;
|
|
11
|
-
start(): Promise<void>;
|
|
12
|
-
close(): Promise<void>;
|
|
13
|
-
runSealgenCommand(command: string): Promise<void>;
|
|
14
|
-
build(): Promise<void>;
|
|
15
|
-
throwIfItKillsTheApp<T>(cb: () => Promise<T>): Promise<T>;
|
|
16
|
-
httpGET(path: string): Promise<{
|
|
17
|
-
status: number;
|
|
18
|
-
response: string;
|
|
19
|
-
}>;
|
|
20
|
-
httpPOST(path: string, body: Record<string, unknown>): Promise<{
|
|
21
|
-
status: number;
|
|
22
|
-
response: string;
|
|
23
|
-
}>;
|
|
24
|
-
addFile(target_path: string, content: string): Promise<void>;
|
|
25
|
-
fullURL(path: string): string;
|
|
26
|
-
}
|
package/@types/utils/extract-fields-from-collection.d.sync-conflict-20250918-184312-TFDLWFG.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FormField } from "../forms/fields/field.js";
|
|
2
|
-
export type ExtractedFieldInfo = {
|
|
3
|
-
name: string;
|
|
4
|
-
type: string;
|
|
5
|
-
target: string | null;
|
|
6
|
-
referencing_collection: string | null;
|
|
7
|
-
referencing_field: string | null;
|
|
8
|
-
intermediary_field_that_points_there: string | null;
|
|
9
|
-
is_readonly: boolean;
|
|
10
|
-
is_required: boolean;
|
|
11
|
-
subfields: {
|
|
12
|
-
name: string;
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
export type ExtractedFieldInfoWithFormField = ExtractedFieldInfo & {
|
|
16
|
-
form_field: FormField;
|
|
17
|
-
};
|
|
18
|
-
export default function extract_fields_from_collection(collection_name: string): Promise<ExtractedFieldInfoWithFormField[]>;
|
package/@types/utils/extract-fields-from-collection.sync-conflict-20250918-222045-TFDLWFG.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FormField } from "../forms/fields/field.js";
|
|
2
|
-
export type ExtractedFieldInfo = {
|
|
3
|
-
name: string;
|
|
4
|
-
type: string;
|
|
5
|
-
target: string | null;
|
|
6
|
-
referencing_collection: string | null;
|
|
7
|
-
referencing_field: string | null;
|
|
8
|
-
intermediary_field_that_points_there: string | null;
|
|
9
|
-
is_readonly: boolean;
|
|
10
|
-
is_required: boolean;
|
|
11
|
-
subfields: {
|
|
12
|
-
name: string;
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
export type ExtractedFieldInfoWithFormField = ExtractedFieldInfo & {
|
|
16
|
-
form_field: FormField;
|
|
17
|
-
};
|
|
18
|
-
export default function extract_fields_from_collection(collection_name: string): Promise<ExtractedFieldInfoWithFormField[]>;
|
|
File without changes
|