@sealcode/sealgen 0.14.5 → 0.14.7
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/src/index.d.ts +0 -9
- package/dist/generate-routes.js +1 -1
- package/dist/koa.d.js +1 -0
- package/dist/templates/collection.js +2 -1
- package/dist/templates/jdd-component.js +4 -4
- package/package.json +1 -1
- package/src/generate-routes.ts +1 -1
- package/src/index.ts +0 -11
- package/src/koa.d.ts +10 -0
- package/src/templates/collection.ts +2 -1
- package/src/templates/jdd-component.ts +4 -4
- package/tsconfig.json +1 -1
package/@types/src/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import { App, Context as SealiousContext } from "sealious";
|
|
2
|
-
import { FormDataValue } from "./forms/form-types.js";
|
|
3
|
-
declare module "koa" {
|
|
4
|
-
interface BaseContext {
|
|
5
|
-
$context: SealiousContext;
|
|
6
|
-
$app: App;
|
|
7
|
-
$body: Record<string, FormDataValue>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
1
|
export * as Controls from "./forms/controls/controls.js";
|
|
11
2
|
export * from "./forms/fields/field.js";
|
|
12
3
|
export * as Fields from "./forms/fields/fields.js";
|
package/dist/generate-routes.js
CHANGED
|
@@ -53,7 +53,7 @@ async function generateRoutes() {
|
|
|
53
53
|
);
|
|
54
54
|
const routes_content = `// DO NOT EDIT! This file is generated automaticaly with npm run generate-routes
|
|
55
55
|
|
|
56
|
-
import Router from "@koa/router";
|
|
56
|
+
import type Router from "@koa/router";
|
|
57
57
|
import { mount } from "@sealcode/sealgen";
|
|
58
58
|
import * as URLs from "./urls.js"
|
|
59
59
|
|
package/dist/koa.d.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=koa.d.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
function collectionTemplate(collection_name) {
|
|
2
|
-
return `import {
|
|
2
|
+
return `import type { App, Policy } from "sealious";
|
|
3
|
+
import { Collection, FieldTypes, Policies } from "sealious";
|
|
3
4
|
|
|
4
5
|
export default class ${collection_name} extends Collection {
|
|
5
6
|
fields = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { toKebabCase, toPascalCase } from "js-convert-case";
|
|
2
2
|
function jddComponentTemplate(component_name) {
|
|
3
|
-
return `import { FlatTemplatable
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
ComponentArguments,
|
|
3
|
+
return `import type { FlatTemplatable } from "tempstream";
|
|
4
|
+
import { TempstreamJSX } from "tempstream";
|
|
5
|
+
import type {
|
|
7
6
|
ExtractStructuredComponentArgumentsValues,
|
|
8
7
|
JDDContext,
|
|
9
8
|
} from "@sealcode/jdd";
|
|
9
|
+
import { Component, ComponentArguments } from "@sealcode/jdd";
|
|
10
10
|
|
|
11
11
|
const component_arguments = {
|
|
12
12
|
title: new ComponentArguments.ShortText(),
|
package/package.json
CHANGED
package/src/generate-routes.ts
CHANGED
|
@@ -72,7 +72,7 @@ export async function generateRoutes(): Promise<void> {
|
|
|
72
72
|
|
|
73
73
|
const routes_content = `// DO NOT EDIT! This file is generated automaticaly with npm run generate-routes
|
|
74
74
|
|
|
75
|
-
import Router from "@koa/router";
|
|
75
|
+
import type Router from "@koa/router";
|
|
76
76
|
import { mount } from "@sealcode/sealgen";
|
|
77
77
|
import * as URLs from "./urls.js"
|
|
78
78
|
|
package/src/index.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import { App, Context as SealiousContext } from "sealious";
|
|
2
|
-
import { FormDataValue } from "./forms/form-types.js";
|
|
3
|
-
|
|
4
|
-
declare module "koa" {
|
|
5
|
-
interface BaseContext {
|
|
6
|
-
$context: SealiousContext;
|
|
7
|
-
$app: App;
|
|
8
|
-
$body: Record<string, FormDataValue>;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
1
|
export * as Controls from "./forms/controls/controls.js";
|
|
13
2
|
export * from "./forms/fields/field.js";
|
|
14
3
|
export * as Fields from "./forms/fields/fields.js";
|
package/src/koa.d.ts
ADDED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export function collectionTemplate(collection_name: string) {
|
|
2
|
-
return `import {
|
|
2
|
+
return `import type { App, Policy } from "sealious";
|
|
3
|
+
import { Collection, FieldTypes, Policies } from "sealious";
|
|
3
4
|
|
|
4
5
|
export default class ${collection_name} extends Collection {
|
|
5
6
|
fields = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { toKebabCase, toPascalCase } from "js-convert-case";
|
|
2
2
|
|
|
3
3
|
export function jddComponentTemplate(component_name: string) {
|
|
4
|
-
return `import { FlatTemplatable
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
ComponentArguments,
|
|
4
|
+
return `import type { FlatTemplatable } from "tempstream";
|
|
5
|
+
import { TempstreamJSX } from "tempstream";
|
|
6
|
+
import type {
|
|
8
7
|
ExtractStructuredComponentArgumentsValues,
|
|
9
8
|
JDDContext,
|
|
10
9
|
} from "@sealcode/jdd";
|
|
10
|
+
import { Component, ComponentArguments } from "@sealcode/jdd";
|
|
11
11
|
|
|
12
12
|
const component_arguments = {
|
|
13
13
|
title: new ComponentArguments.ShortText(),
|