@sealcode/sealgen 0.19.23 → 0.19.25-hotfix1

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.
Files changed (240) hide show
  1. package/@types/forms/controls/array.d.ts +3 -1
  2. package/@types/forms/controls/controls.d.ts +0 -1
  3. package/@types/forms/controls/dropdown.d.ts +6 -6
  4. package/@types/forms/controls/single-reference.d.ts +8 -6
  5. package/@types/forms/fields/CollectionField.d.ts +1 -0
  6. package/@types/forms/fields/boolean.d.ts +1 -2
  7. package/@types/forms/fields/collection-field.d.ts +12 -5
  8. package/@types/forms/fields/coordinates.d.ts +2 -2
  9. package/@types/forms/fields/date.d.ts +1 -2
  10. package/@types/forms/fields/datetime.d.ts +1 -2
  11. package/@types/forms/fields/deep-reverse-single-reference-list.d.ts +1 -1
  12. package/@types/forms/fields/deep-reverse-single-reference-table.d.ts +1 -2
  13. package/@types/forms/fields/enum-multiple-sealious.d.ts +1 -2
  14. package/@types/forms/fields/field.d.ts +8 -4
  15. package/@types/forms/fields/fields.d.ts +1 -0
  16. package/@types/forms/fields/file.d.ts +4 -3
  17. package/@types/forms/fields/int.d.ts +1 -2
  18. package/@types/forms/fields/json.d.ts +1 -2
  19. package/@types/forms/fields/phone-number-with-country-code.d.ts +1 -2
  20. package/@types/forms/fields/pick-from-list.d.ts +2 -2
  21. package/@types/forms/fields/regexp.d.ts +1 -2
  22. package/@types/forms/fields/simple-form-field.d.ts +3 -4
  23. package/@types/forms/fields/single-reference.d.ts +2 -3
  24. package/@types/forms/fields/structured-array.d.ts +1 -2
  25. package/@types/forms/fields/structured.d.ts +19 -0
  26. package/@types/forms/fields/text.d.ts +1 -2
  27. package/@types/forms/fields/url.d.ts +1 -2
  28. package/@types/forms/multiform.d.ts +4 -3
  29. package/@types/index.d.ts +29 -18
  30. package/@types/page/stateful-page.d.ts +3 -2
  31. package/@types/src/add-collection.d.ts +1 -0
  32. package/@types/src/add-crud.d.ts +3 -0
  33. package/@types/src/add-crud.test.d.ts +1 -0
  34. package/@types/src/add-jdd-component.d.ts +1 -0
  35. package/@types/src/add-list-route.test.d.ts +1 -0
  36. package/@types/src/add-route.d.ts +3 -0
  37. package/@types/src/add-route.test.d.ts +1 -0
  38. package/@types/src/build.d.ts +3 -0
  39. package/@types/src/builders/backend-ts-builder.d.ts +7 -0
  40. package/@types/src/builders/builder.d.ts +11 -0
  41. package/@types/src/builders/colors-builder.d.ts +10 -0
  42. package/@types/src/builders/css-builder.d.ts +19 -0
  43. package/@types/src/builders/fonts-builder.d.ts +7 -0
  44. package/@types/src/builders/frontend-ts-builder.d.ts +11 -0
  45. package/@types/src/cli.d.ts +2 -0
  46. package/@types/src/components/components.d.ts +2 -0
  47. package/@types/src/components/tabs.d.ts +2 -0
  48. package/@types/src/components/toggle-modal.d.ts +6 -0
  49. package/@types/src/controllers/password-generate-button.stimulus.d.ts +5 -0
  50. package/@types/src/controllers/sealgen-table.stimulus.d.ts +13 -0
  51. package/@types/src/embeddable-file-extensions.d.ts +1 -0
  52. package/@types/src/esbuild-plugins/load-assets.d.ts +5 -0
  53. package/@types/src/esbuild-plugins/rewrite-asset-imports.d.ts +5 -0
  54. package/@types/src/example.test.d.ts +1 -0
  55. package/@types/src/forms/controls/array.d.ts +33 -0
  56. package/@types/src/forms/controls/autocomplete.d.ts +22 -0
  57. package/@types/src/forms/controls/big-radio-group.d.ts +14 -0
  58. package/@types/src/forms/controls/checkbox-group.d.ts +21 -0
  59. package/@types/src/forms/controls/checkbox.d.ts +17 -0
  60. package/@types/src/forms/controls/checkboxed-list-input.d.ts +21 -0
  61. package/@types/src/forms/controls/checkboxed-list-input.test.d.ts +1 -0
  62. package/@types/src/forms/controls/collapsible-checkbox-group.d.ts +11 -0
  63. package/@types/src/forms/controls/collapsible-field-group.d.ts +21 -0
  64. package/@types/src/forms/controls/controls.d.ts +32 -0
  65. package/@types/src/forms/controls/derived-frame.d.ts +19 -0
  66. package/@types/src/forms/controls/derived.d.ts +13 -0
  67. package/@types/src/forms/controls/dropdown.d.ts +30 -0
  68. package/@types/src/forms/controls/editable-collection-subset.d.ts +20 -0
  69. package/@types/src/forms/controls/field-group.d.ts +23 -0
  70. package/@types/src/forms/controls/file.d.ts +12 -0
  71. package/@types/src/forms/controls/file.test.d.ts +1 -0
  72. package/@types/src/forms/controls/form-control.d.ts +23 -0
  73. package/@types/src/forms/controls/form-field-control.d.ts +13 -0
  74. package/@types/src/forms/controls/form-header.d.ts +8 -0
  75. package/@types/src/forms/controls/form-paragraph.d.ts +7 -0
  76. package/@types/src/forms/controls/frame.d.ts +17 -0
  77. package/@types/src/forms/controls/hidden-input.d.ts +9 -0
  78. package/@types/src/forms/controls/html.d.ts +11 -0
  79. package/@types/src/forms/controls/hybrid.d.ts +10 -0
  80. package/@types/src/forms/controls/image.d.ts +19 -0
  81. package/@types/src/forms/controls/image.test.d.ts +1 -0
  82. package/@types/src/forms/controls/multiple-files.d.ts +42 -0
  83. package/@types/src/forms/controls/multiple-images.d.ts +19 -0
  84. package/@types/src/forms/controls/number.d.ts +13 -0
  85. package/@types/src/forms/controls/password-with-generator.d.ts +6 -0
  86. package/@types/src/forms/controls/radio.d.ts +16 -0
  87. package/@types/src/forms/controls/simple-input.d.ts +35 -0
  88. package/@types/src/forms/controls/single-reference.d.ts +14 -0
  89. package/@types/src/forms/controls/single-reference.test.d.ts +1 -0
  90. package/@types/{forms/controls/table.d.sync-conflict-20260502-145940-GP5D735.ts → src/forms/controls/table.d.ts} +2 -0
  91. package/@types/src/forms/controls/textarea.d.ts +25 -0
  92. package/@types/src/forms/controls/tickable.d.ts +25 -0
  93. package/@types/src/forms/fields/boolean.d.ts +22 -0
  94. package/@types/src/forms/fields/boolean.test.d.ts +1 -0
  95. package/@types/src/forms/fields/checkboxed-list.d.ts +23 -0
  96. package/@types/src/forms/fields/collection-field.d.ts +22 -0
  97. package/@types/src/forms/fields/color.d.ts +4 -0
  98. package/@types/src/forms/fields/coordinates.d.ts +14 -0
  99. package/@types/src/forms/fields/date.d.ts +13 -0
  100. package/@types/src/forms/fields/datetime.d.ts +14 -0
  101. package/@types/src/forms/fields/deep-reverse-single-reference-list.d.ts +20 -0
  102. package/@types/src/forms/fields/deep-reverse-single-reference-table.d.ts +16 -0
  103. package/@types/src/forms/fields/email.d.ts +10 -0
  104. package/@types/src/forms/fields/email.test.d.ts +1 -0
  105. package/@types/src/forms/fields/enum-multiple-sealious.d.ts +16 -0
  106. package/@types/src/forms/fields/existing-sealious-value.d.ts +6 -0
  107. package/@types/src/forms/fields/field.d.ts +85 -0
  108. package/@types/src/forms/fields/field.test.d.ts +1 -0
  109. package/@types/src/forms/fields/fields.d.ts +34 -0
  110. package/@types/src/forms/fields/file.d.ts +25 -0
  111. package/@types/src/forms/fields/file.test.d.ts +1 -0
  112. package/@types/src/forms/fields/float.d.ts +4 -0
  113. package/@types/src/forms/fields/get-field-for-sealious.d.ts +33 -0
  114. package/@types/src/forms/fields/html.d.ts +6 -0
  115. package/@types/src/forms/fields/hybrid.d.ts +11 -0
  116. package/@types/src/forms/fields/image.d.ts +5 -0
  117. package/@types/src/forms/fields/int.d.ts +6 -0
  118. package/@types/src/forms/fields/item-draft.d.ts +20 -0
  119. package/@types/src/forms/fields/json.d.ts +13 -0
  120. package/@types/src/forms/fields/markdown.d.ts +6 -0
  121. package/@types/src/forms/fields/multiple-files.d.ts +16 -0
  122. package/@types/src/forms/fields/number.d.ts +25 -0
  123. package/@types/src/forms/fields/number.test.d.ts +1 -0
  124. package/@types/src/forms/fields/password.d.ts +10 -0
  125. package/@types/src/forms/fields/phone-number-with-country-code.d.ts +13 -0
  126. package/@types/src/forms/fields/phone-number.d.ts +17 -0
  127. package/@types/src/forms/fields/pick-from-list-sealious.d.ts +11 -0
  128. package/@types/src/forms/fields/pick-from-list.d.ts +15 -0
  129. package/@types/src/forms/fields/pick-from-list.test.d.ts +1 -0
  130. package/@types/src/forms/fields/proxy-field.d.ts +15 -0
  131. package/@types/src/forms/fields/regexp.d.ts +21 -0
  132. package/@types/src/forms/fields/regexp.test.d.ts +1 -0
  133. package/@types/src/forms/fields/simple-form-field.d.ts +31 -0
  134. package/@types/src/forms/fields/single-reference.d.ts +19 -0
  135. package/@types/src/forms/fields/structured-array.d.ts +23 -0
  136. package/@types/src/forms/fields/table.d.ts +16 -0
  137. package/@types/src/forms/fields/text.d.ts +6 -0
  138. package/@types/src/forms/fields/url.d.ts +6 -0
  139. package/@types/src/forms/form-types.d.ts +28 -0
  140. package/@types/src/forms/form.d.ts +34 -0
  141. package/@types/src/forms/form.test.d.ts +6 -0
  142. package/@types/src/forms/multiform.d.ts +23 -0
  143. package/@types/src/forms/multiform.test.d.ts +1 -0
  144. package/@types/src/generate-collections.d.ts +2 -0
  145. package/@types/src/generate-components.d.ts +1 -0
  146. package/@types/src/generate-routes.d.ts +5 -0
  147. package/@types/src/generate-routes.test.d.ts +1 -0
  148. package/@types/src/generate-stimulus.d.ts +1 -0
  149. package/@types/src/get-fonts.d.ts +2 -0
  150. package/@types/{index.d.sync-conflict-20260502-145557-GP5D735.ts → src/index.d.ts} +1 -0
  151. package/@types/src/make-env.d.ts +1 -0
  152. package/@types/src/make-hidden-inputs.d.ts +5 -0
  153. package/@types/src/mount.d.ts +6 -0
  154. package/@types/src/notifier.d.ts +2 -0
  155. package/@types/src/page/access-control.d.ts +6 -0
  156. package/@types/src/page/default-list-filters.d.ts +18 -0
  157. package/@types/src/page/list.d.ts +49 -0
  158. package/@types/src/page/mountable-with-fields.d.ts +49 -0
  159. package/@types/src/page/mountable-with-fields.test.d.ts +1 -0
  160. package/@types/src/page/mountable.d.ts +10 -0
  161. package/@types/src/page/page.d.ts +18 -0
  162. package/@types/src/page/props-parser.d.ts +15 -0
  163. package/@types/src/page/sealious-list.d.ts +20 -0
  164. package/@types/src/page/sealious-list.test.d.ts +1 -0
  165. package/@types/src/page/stateful-page.d.ts +63 -0
  166. package/@types/src/page/stateful-page.test.d.ts +1 -0
  167. package/@types/src/register-external.d.ts +2 -0
  168. package/@types/src/register-external.test.d.ts +1 -0
  169. package/@types/src/run.d.ts +1 -0
  170. package/@types/src/sanitize.d.ts +1 -0
  171. package/@types/src/target-locreq.d.ts +4 -0
  172. package/@types/src/templates/collection.d.ts +1 -0
  173. package/@types/src/templates/form.d.ts +14 -0
  174. package/@types/src/templates/form.test.d.ts +1 -0
  175. package/@types/src/templates/jdd-component.d.ts +1 -0
  176. package/@types/src/templates/jdd-editor.d.ts +1 -0
  177. package/@types/src/templates/list.d.ts +1 -0
  178. package/@types/src/templates/long-running-process.d.ts +1 -0
  179. package/@types/src/templates/multiform.d.ts +1 -0
  180. package/@types/src/templates/page.d.ts +1 -0
  181. package/@types/src/templates/post.d.ts +1 -0
  182. package/@types/src/templates/redirect.d.ts +1 -0
  183. package/@types/src/templates/route-test.d.ts +1 -0
  184. package/@types/src/templates/shared/collection-create-form.d.ts +1 -0
  185. package/@types/src/templates/shared/collection-edit-form.d.ts +1 -0
  186. package/@types/src/templates/shared/collection-list.d.ts +16 -0
  187. package/@types/src/templates/shared/item-delete.d.ts +1 -0
  188. package/@types/src/templates/shared/shared-crud-form-fields.d.ts +1 -0
  189. package/@types/src/templates/stateful-page.d.ts +1 -0
  190. package/@types/src/templates/stimulus-controller.d.ts +1 -0
  191. package/@types/src/templates/templates.d.ts +1 -0
  192. package/@types/src/test_utils/exec_async.d.ts +1 -0
  193. package/@types/src/test_utils/locator_is_visible.d.ts +2 -0
  194. package/@types/src/test_utils/test-on-real-app.d.ts +26 -0
  195. package/@types/src/utils/assert-throws.d.ts +1 -0
  196. package/@types/src/utils/base64.d.ts +2 -0
  197. package/@types/src/utils/browser-creator.d.ts +1 -0
  198. package/@types/src/utils/escape-url-params.d.ts +2 -0
  199. package/@types/src/utils/exec.d.ts +5 -0
  200. package/@types/src/utils/extract-fields-from-collection.d.ts +14 -0
  201. package/@types/src/utils/format-external-url.d.ts +1 -0
  202. package/@types/src/utils/import-path.d.ts +2 -0
  203. package/@types/src/utils/input-wrapper.d.ts +5 -0
  204. package/@types/src/utils/list-collections.d.ts +1 -0
  205. package/@types/src/utils/make-slug.d.ts +1 -0
  206. package/@types/src/utils/module-dirname.d.ts +1 -0
  207. package/@types/src/utils/natural-numbers.d.ts +1 -0
  208. package/@types/src/utils/prettier.d.ts +3 -0
  209. package/@types/src/utils/question.d.ts +1 -0
  210. package/@types/src/utils/render-attributes.d.ts +1 -0
  211. package/@types/src/utils/sleep.d.ts +1 -0
  212. package/@types/src/utils/translate.d.ts +4 -0
  213. package/@types/src/utils/url-with-new-params.d.ts +2 -0
  214. package/@types/src/utils/utils.d.ts +17 -0
  215. package/@types/src/utils/walk.d.ts +1 -0
  216. package/@types/src/utils/with-fallback.d.ts +2 -0
  217. package/@types/src/utils/wrap-attributes.d.ts +3 -0
  218. package/@types/src/utils/write-file.d.ts +1 -0
  219. package/@types/templates/long-running-process.d.ts +1 -1
  220. package/@types/templates/multiform.d.ts +1 -1
  221. package/@types/templates/route-test.d.ts +1 -1
  222. package/@types/templates/shared/item-delete.d.ts +1 -1
  223. package/@types/templates/stateful-page.d.ts +1 -1
  224. package/lib/add-crud.js +2 -8
  225. package/lib/builders/backend-ts-builder.js +1 -1
  226. package/lib/forms/controls/textarea.js +2 -1
  227. package/lib/templates/long-running-process.js +2 -4
  228. package/lib/templates/multiform.js +2 -4
  229. package/lib/templates/route-test.js +4 -8
  230. package/lib/templates/shared/item-delete.js +3 -7
  231. package/lib/templates/stateful-page.js +2 -4
  232. package/package.json +1 -1
  233. package/src/add-crud.ts +2 -8
  234. package/src/builders/backend-ts-builder.ts +1 -0
  235. package/src/forms/controls/textarea.ts +5 -4
  236. package/src/templates/long-running-process.ts +2 -5
  237. package/src/templates/multiform.ts +2 -8
  238. package/src/templates/route-test.ts +4 -11
  239. package/src/templates/shared/item-delete.ts +3 -8
  240. package/src/templates/stateful-page.ts +2 -5
package/src/add-crud.ts CHANGED
@@ -5,7 +5,6 @@ import { toKebabCase, toPascalCase } from "js-convert-case";
5
5
  import { listCollections } from "./utils/list-collections.js";
6
6
  import { collectionListTemplate } from "./templates/shared/collection-list.js";
7
7
  import { writeFile } from "./utils/write-file.js";
8
- import { curryImportPath, importPath } from "./utils/import-path.js";
9
8
  import { sharedCrudFormFields } from "./templates/shared/shared-crud-form-fields.js";
10
9
  import { generateRoutes } from "./generate-routes.js";
11
10
  import { createItemFormTemplate } from "./templates/shared/collection-create-form.js";
@@ -57,10 +56,7 @@ export async function addCRUD(
57
56
  list_action_name,
58
57
  list_path,
59
58
  {
60
- post_import_js: `import { ${create_action_name}URL, ${edit_action_name}URL, ${delete_action_name}URL } from "${importPath(
61
- list_path,
62
- "src/back/routes/urls.ts"
63
- )}";`,
59
+ post_import_js: `import { ${create_action_name}URL, ${edit_action_name}URL, ${delete_action_name}URL } from "src/back/routes/urls.js";`,
64
60
  post_header_html: `<a href={${create_action_name}URL}> Create </a>`,
65
61
  render_item: (
66
62
  collection_name: string
@@ -119,12 +115,10 @@ export async function addCRUD(
119
115
  const delete_path = target_locreq.resolve(
120
116
  `src/back/routes/${escape_url_params(url)}/[id]/delete.page.tsx`
121
117
  );
122
- const base_import_path = curryImportPath(delete_path);
123
118
  const delete_content = await itemDeleteTemplate(
124
119
  delete_action_name,
125
120
  collection_name,
126
- list_action_name,
127
- base_import_path
121
+ list_action_name
128
122
  );
129
123
  await writeFile(delete_path, delete_content);
130
124
 
@@ -22,6 +22,7 @@ export class BackendTSBuilder extends Builder {
22
22
  !file_path.endsWith("src/back/collections/collections.ts") &&
23
23
  !file_path.endsWith("src/back/routes/routes.ts") &&
24
24
  !file_path.endsWith("src/back/routes/urls.ts") &&
25
+ !file_path.endsWith("src/back/jdd-components/components.ts") &&
25
26
  !file_path.endsWith("stimulus.ts") &&
26
27
  !file_path.startsWith("src/front")
27
28
  );
@@ -3,6 +3,7 @@ import { FormField } from "../fields/field.js";
3
3
  import { FormDataValue } from "../form-types.js";
4
4
  import { FormControlContext } from "./form-control.js";
5
5
  import { SimpleInput, SimpleInputOptions } from "./simple-input.js";
6
+ import { htmlEscape } from "escape-goat";
6
7
 
7
8
  export class Textarea extends SimpleInput {
8
9
  constructor(
@@ -19,11 +20,11 @@ export class Textarea extends SimpleInput {
19
20
  }
20
21
 
21
22
  renderDescription() {
22
- return this.options.description
23
- ? /* HTML */ `<div class="form-input__description">
23
+ return this.options.description ?
24
+ /* HTML */ `<div class="form-input__description">
24
25
  ${this.options.description}
25
26
  </div>`
26
- : "";
27
+ : "";
27
28
  }
28
29
 
29
30
  async getInputAttributes(
@@ -51,7 +52,7 @@ export class Textarea extends SimpleInput {
51
52
  ) {
52
53
  const { parsed: value } = await this.field.getParsedValue(ctx, data);
53
54
  return /* HTML */ `<textarea ${attributes}>
54
- ${String(value) || ""}</textarea
55
+ ${htmlEscape(String(value)) || ""}</textarea
55
56
  >`;
56
57
  }
57
58
  }
@@ -1,16 +1,13 @@
1
1
  import { toSentenceCase } from "js-convert-case";
2
- import { curryImportPath } from "../utils/import-path.js";
3
2
 
4
3
  export async function LongRunningProcessTemplate(
5
- action_name: string,
6
- newfilefullpath: string
4
+ action_name: string
7
5
  ): Promise<string> {
8
- const rel = curryImportPath(newfilefullpath);
9
6
  return `import { Context } from "koa";
10
7
  import { TempstreamJSX } from "tempstream";
11
8
  import { Page } from "@sealcode/sealgen";
12
9
  import type { BreadcrumbLabel } from "@sealcode/sealgen";
13
- import html from "${rel("src/back/html.js")}";
10
+ import html from "src/back/html.js";
14
11
  import { LongRunningProcess } from "sealious";
15
12
 
16
13
  export const actionName = "${action_name}";
@@ -1,12 +1,6 @@
1
- import { curryImportPath } from "../utils/utils.js";
2
-
3
- export async function multiformTemplate(
4
- action_name: string,
5
- newfilefullpath: string
6
- ): Promise<string> {
7
- const rel = curryImportPath(newfilefullpath);
1
+ export async function multiformTemplate(action_name: string): Promise<string> {
8
2
  return `import { Context } from "koa";
9
- import html from "${rel("src/back/html.js")}";
3
+ import html from "src/back/html.js";
10
4
  import { Controls, Fields, Form, FormMessage, Multiform } from "@sealcode/sealgen";
11
5
  import type { BreadcrumbLabel } from "@sealcode/sealgen";
12
6
  import { FlatTemplatable } from "tempstream";
@@ -1,16 +1,9 @@
1
- import { curryImportPath } from "../utils/import-path.js";
2
1
  import { formatWithPrettier } from "../utils/prettier.js";
3
2
 
4
- export async function testTemplate(
5
- action_name: string,
6
- new_file_fullpath: string
7
- ) {
8
- const rel = curryImportPath(new_file_fullpath);
9
- const content = `import { withProdApp } from "${rel(
10
- "src/back/test_utils/with-prod-app.js"
11
- )}";
12
- import { ${action_name}URL } from "${rel("src/back/routes/urls.js")}";
13
- import { getBrowser } from "${rel("src/back/test_utils/browser-creator.js")}";
3
+ export async function testTemplate(action_name: string) {
4
+ const content = `import { withProdApp } from ""src/back/test_utils/with-prod-app.js";
5
+ import { ${action_name}URL } from "src/back/routes/urls.js";
6
+ import { getBrowser } from "src/back/test_utils/browser-creator.js";
14
7
  import type { Browser, BrowserContext, Page } from "@playwright/test";
15
8
 
16
9
  describe("${action_name}", () => {
@@ -4,21 +4,16 @@ import { formatWithPrettier } from "../../utils/prettier.js";
4
4
  export function itemDeleteTemplate(
5
5
  delete_action_name: string,
6
6
  collection_name: string,
7
- list_action_name: string,
8
- importPath: (path: string) => string
7
+ list_action_name: string
9
8
  ): Promise<string> {
10
9
  const result = `import type { Context } from "koa";
11
10
  import { Mountable } from "@sealcode/sealgen";
12
11
  import type Router from "@koa/router";
13
12
  import type { BreadcrumbLabel } from "@sealcode/sealgen";
14
13
 
15
- import { ${toPascalCase(collection_name)} } from "${importPath(
16
- "src/back/collections/collections.js"
17
- )}";
14
+ import { ${toPascalCase(collection_name)} } from "src/back/collections/collections.js";
18
15
 
19
- import { ${list_action_name}URL } from "${importPath(
20
- "src/back/routes/urls.js"
21
- )}";
16
+ import { ${list_action_name}URL } from "src/back/routes/urls.js";
22
17
 
23
18
  export const actionName = "${delete_action_name}";
24
19
  export const breadcrumbLabel: BreadcrumbLabel = "${delete_action_name}";
@@ -1,16 +1,13 @@
1
- import { curryImportPath } from "../utils/import-path.js";
2
1
  import { formatWithPrettier } from "../utils/prettier.js";
3
2
 
4
3
  export async function statefulPageTemplate(
5
- action_name: string,
6
- newfilefullpath: string
4
+ action_name: string
7
5
  ): Promise<string> {
8
- const rel = curryImportPath(newfilefullpath);
9
6
  return formatWithPrettier(`import { TempstreamJSX, Templatable } from "tempstream";
10
7
  import { Context } from "koa";
11
8
  import { StatefulPage, StatefulPageActionArgument } from "@sealcode/sealgen";
12
9
  import type { BreadcrumbLabel } from "@sealcode/sealgen";
13
- import html from "${rel("src/back/html.js")}";
10
+ import html from "src/back/html.js";
14
11
 
15
12
  export const actionName = "${action_name}";
16
13
  export const breadcrumbLabel: BreadcrumbLabel = "${action_name}";