@sealcode/sealgen 0.17.32 → 0.17.34

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.
@@ -1,6 +1,7 @@
1
+ import type { Context } from "koa";
1
2
  import { Field } from "sealious";
2
3
  import { FlatTemplatable } from "tempstream";
3
- export type ListFilterRender = (value: string, field: Field<any>) => FlatTemplatable;
4
+ export type ListFilterRender = (value: string, field: Field<any>, ctx: Context) => FlatTemplatable;
4
5
  export type DefaultListFilter = {
5
6
  render: ListFilterRender;
6
7
  prepareValue?: (filter_value: unknown) => unknown;
@@ -77,7 +77,7 @@ ${sortRoutes(files).map(
77
77
  ({ actionName }) => ` mount(router, URLs.${actionName}URL, ${actionName});`
78
78
  ).join("\n")}
79
79
  }`;
80
- const urls_content = `${sortRoutes(files).sort(({ url: url1 }, { url: url2 }) => url1 < url2 ? -1 : 1).map(({ actionName, url }) => generateURL(actionName, url)).join("\n")}
80
+ const urls_content = `${sortRoutes(files).map(({ actionName, url }) => generateURL(actionName, url)).join("\n")}
81
81
  `;
82
82
  const prettier_config = await getPrettierConfig();
83
83
  await fs.writeFile(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealcode/sealgen",
3
- "version": "0.17.32",
3
+ "version": "0.17.34",
4
4
  "description": "Module to automate adding routes and collections to a sealious application",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -116,7 +116,6 @@ ${sortRoutes(files)
116
116
  }`;
117
117
 
118
118
  const urls_content = `${sortRoutes(files)
119
- .sort(({ url: url1 }, { url: url2 }) => (url1 < url2 ? -1 : 1))
120
119
  .map(({ actionName, url }) => generateURL(actionName, url))
121
120
  .join("\n")}
122
121
  `;
@@ -1,9 +1,11 @@
1
+ import type { Context } from "koa";
1
2
  import { Field } from "sealious";
2
3
  import { FlatTemplatable } from "tempstream";
3
4
 
4
5
  export type ListFilterRender = (
5
6
  value: string,
6
- field: Field<any>
7
+ field: Field<any>,
8
+ ctx: Context
7
9
  ) => FlatTemplatable;
8
10
 
9
11
  export type DefaultListFilter = {