@sealcode/sealgen 0.14.6 → 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/dist/generate-routes.js +1 -1
- 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/templates/collection.ts +2 -1
- package/src/templates/jdd-component.ts +4 -4
- package/tsconfig.json +1 -1
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
|
|
|
@@ -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
|
|
|
@@ -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(),
|