@akanjs/cli 3.1.1-rc.9 → 3.1.1
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/.build-stamp +1 -1
- package/CodeAgent-35wnb7w5.js +9 -0
- package/{CodeTui-z5vkm9ea.js → CodeTui-h6yz2kvq.js} +1 -1
- package/TunnelShare-xyjpa7gx.js +14 -0
- package/agent.command-3r4jsck8.js +46 -0
- package/akanCode.js +10 -6
- package/{application.command-wthg8nn9.js → application.command-g7xv6ad0.js} +44 -11
- package/{applicationBuildRunner-t2r84sz6.js → applicationBuildRunner-qvjnhr9j.js} +9 -6
- package/buildBatch.proc.js +6 -6
- package/{cloud.command-sz11hpre.js → cloud.command-6ebygmhw.js} +17 -15
- package/cloud.script-0s1jybd5.js +26 -0
- package/{code.command-9h3yrzhe.js → code.command-mpkm2emr.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-15j9b7c0.js → context.command-svdh6b2w.js} +18 -17
- package/context.runner-ch0z3a8g.js +26 -0
- package/{devTui-q7k7bakd.js → devTui-evr3b35y.js} +1 -1
- package/{guideline.command-snh85ctf.js → guideline.command-qwp3tnjx.js} +3 -3
- package/guidelines/conventions/core.md +106 -0
- package/guidelines/conventions/rules/app.md +83 -0
- package/guidelines/conventions/rules/auth.md +45 -0
- package/guidelines/conventions/rules/config.md +56 -0
- package/guidelines/conventions/rules/constant.md +24 -0
- package/guidelines/conventions/rules/gates.md +31 -0
- package/guidelines/conventions/rules/layer.md +25 -0
- package/guidelines/conventions/rules/migration.md +27 -0
- package/guidelines/conventions/rules/module.md +90 -0
- package/guidelines/conventions/rules/page.md +56 -0
- package/guidelines/conventions/rules/sensitive.md +16 -0
- package/guidelines/conventions/rules/server.md +86 -0
- package/guidelines/conventions/rules/ssr.md +47 -0
- package/guidelines/conventions/rules/style.md +43 -0
- package/guidelines/conventions/rules/test.md +34 -0
- package/guidelines/conventions/rules/ts.md +95 -0
- package/guidelines/conventions/rules/tsx.md +75 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
- package/guidelines/pageRule/pageRule.instruction.md +4 -3
- package/guidelines/queryRule/queryRule.instruction.md +4 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +3 -3
- package/incrementalBuilder.proc.js +6 -6
- package/{index-pcwzkdqb.js → index-1p0qbq3m.js} +1 -1
- package/{index-xb8809yb.js → index-1shvxzt0.js} +3 -3
- package/{index-a58emady.js → index-266dewjs.js} +11 -11
- package/{index-bt438yxm.js → index-3yz30c07.js} +5 -4
- package/{index-xjf5j657.js → index-4mj92tsh.js} +952 -47
- package/index-4pdts00b.js +1604 -0
- package/{index-42j4a8zq.js → index-8559hsz4.js} +4 -3
- package/{index-wcej7g4z.js → index-8scw1pjk.js} +93 -23
- package/{index-a5dhqkdr.js → index-96wzdhfh.js} +74 -233
- package/index-9bv479q5.js +1 -0
- package/index-9rvcs76p.js +653 -0
- package/index-am36s3jh.js +3582 -0
- package/index-b8c289dx.js +444 -0
- package/{index-espk51ah.js → index-dd44g6vz.js} +3 -3
- package/{index-3wypz6xj.js → index-eja64h28.js} +7 -3
- package/index-fbewhg4g.js +590 -0
- package/index-jje9qzyq.js +27 -0
- package/{index-j9vyj3dj.js → index-k5jbcxyh.js} +3 -3
- package/{index-2mwc0g0d.js → index-ksfgqq1x.js} +1 -1
- package/index-m5n3ka0p.js +18 -0
- package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
- package/{index-6txx6a9p.js → index-payhwt51.js} +21 -29
- package/{index-2azahjaw.js → index-qkkdhjm6.js} +2 -2
- package/{index-74tjjsnc.js → index-qxzrp5xt.js} +33 -37
- package/{index-qfp55x1y.js → index-r0k3ham2.js} +4 -4
- package/{index-hmt54t45.js → index-r2w2eh93.js} +4 -4
- package/index-r2wedvqn.js +138 -0
- package/{index-skk9zc1x.js → index-rnphv731.js} +2 -2
- package/{index-9th4gszy.js → index-s6da8ta9.js} +82 -1227
- package/index-tenw3mah.js +225 -0
- package/{index-31es1yev.js → index-tgt2fnd6.js} +107 -6
- package/{index-55j120r8.js → index-vxmy1p4f.js} +16 -36
- package/{index-301pdbzz.js → index-w4k2ragk.js} +7 -7
- package/{index-js6geqjn.js → index-w7q6h97v.js} +1 -1
- package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
- package/{index-2xcc2ax5.js → index-xq543a5y.js} +2 -2
- package/{index-0fz95kxe.js → index-xqgwjz7a.js} +1 -1
- package/{index-40brg4px.js → index-xxfy1jp2.js} +4 -4
- package/{index-905qdgqp.js → index-z4b84y6k.js} +1 -1
- package/index-zcf6k8a5.js +410 -0
- package/index.js +23 -22
- package/{library.command-gycrwhf1.js → library.command-2853y6mk.js} +3 -3
- package/{localRegistry.command-jtd8gaes.js → localRegistry.command-76ds31p4.js} +19 -15
- package/{module.command-v6hgs1bc.js → module.command-yfnb0abs.js} +5 -5
- package/{package.command-shzpcfph.js → package.command-d9s86hp9.js} +3 -3
- package/package.json +2 -2
- package/{page.command-ptxn5kqk.js → page.command-6a8a8rd1.js} +3 -3
- package/{pipeline.command-zz31pgax.js → pipeline.command-rt3rwd2z.js} +2 -2
- package/{primitive.command-a1vse91z.js → primitive.command-emcebgrq.js} +6 -6
- package/{projectTypecheck-2ztky9cf.js → projectTypecheck-51m7eh1f.js} +1 -1
- package/{prompter-76k56b37.js → prompter-hgcta8pb.js} +1 -1
- package/quality.command-xtrk0n3x.js +76 -0
- package/{repair.command-cvazbz99.js → repair.command-51szxnxx.js} +5 -5
- package/{routeSourceValidator-6jd0q6r6.js → routeSourceValidator-4h947v7c.js} +13 -3
- package/{scalar.command-0acvyp26.js → scalar.command-8qv27t82.js} +4 -4
- package/skills/akan-agent/SKILL.md +36 -0
- package/skills/akan-code/SKILL.md +1 -0
- package/skills/akan-debug/SKILL.md +40 -6
- package/skills/akan-deps/SKILL.md +1 -2
- package/skills/akan-mcp/SKILL.md +40 -0
- package/skills/akan-page/SKILL.md +44 -0
- package/skills/akan-query/SKILL.md +38 -0
- package/skills/akan-runtime/SKILL.md +40 -0
- package/skills/akan-scaffold/SKILL.md +16 -6
- package/skills/akan-transport/SKILL.md +40 -0
- package/skills/akan-validate/SKILL.md +13 -11
- package/{subspace.command-822qx2bx.js → subspace.command-pn56pnh8.js} +8 -8
- package/templates/__scalar/__model__/__model__.constant.ts +3 -5
- package/templates/__scalar/__model__/__model__.dictionary.ts +6 -5
- package/templates/__scalar/__model__/__model__.document.ts +3 -3
- package/templates/app/akan.config.ts +2 -3
- package/templates/app/env/env.client.ts +2 -4
- package/templates/app/env/env.client.type.ts +2 -3
- package/templates/app/env/env.server.ts +2 -3
- package/templates/app/lib/___appName__/__appName__.dictionary.ts +1 -2
- package/templates/app/lib/___appName__/__appName__.service.ts +3 -3
- package/templates/app/lib/___appName__/__appName__.signal.ts +5 -5
- package/templates/app/lib/___appName__/__appName__.store.ts +4 -6
- package/templates/app/lib/option.ts +2 -3
- package/templates/app/main.ts +2 -4
- package/templates/app/page/_index.tsx +3 -3
- package/templates/app/page/_layout.tsx +13 -10
- package/templates/appSample/lib/__scalar/workHistory/workHistory.constant.ts +1 -5
- package/templates/appSample/lib/__scalar/workHistory/workHistory.dictionary.ts +1 -1
- package/templates/appSample/lib/_noti/noti.signal.ts +1 -1
- package/templates/appSample/lib/task/Task.Template.tsx +2 -1
- package/templates/appSample/lib/task/Task.Unit.tsx +3 -2
- package/templates/appSample/lib/task/Task.Util.tsx +16 -4
- package/templates/appSample/lib/task/task.constant.ts +1 -5
- package/templates/appSample/lib/task/task.dictionary.ts +2 -8
- package/templates/appSample/lib/task/task.document.ts +1 -1
- package/templates/appSample/page/task/_index.tsx +2 -1
- package/templates/appSample/page/task/new.tsx +2 -1
- package/templates/appSample/ui/QuantityControl.tsx +5 -9
- package/templates/biomeForm.ts +144 -0
- package/templates/crudPages/[__model__Id]/edit/page.tsx +3 -3
- package/templates/crudPages/[__model__Id]/page.tsx +5 -5
- package/templates/crudPages/new/page.tsx +4 -3
- package/templates/crudPages/page.tsx +3 -3
- package/templates/crudSinglePage/page.tsx +9 -5
- package/templates/libRoot/akan.config.ts +2 -3
- package/templates/libRoot/lib/___libName__/__libName__.dictionary.ts +1 -2
- package/templates/libRoot/lib/___libName__/__libName__.service.ts +5 -4
- package/templates/libRoot/lib/___libName__/__libName__.signal.ts +6 -5
- package/templates/libRoot/lib/___libName__/__libName__.store.ts +5 -6
- package/templates/libRoot/lib/option.ts +1 -2
- package/templates/module/__Model__.Template.tsx +11 -10
- package/templates/module/__Model__.Unit.tsx +18 -5
- package/templates/module/__Model__.Util.tsx +9 -7
- package/templates/module/__Model__.View.tsx +9 -6
- package/templates/module/__Model__.Zone.tsx +25 -17
- package/templates/module/__model__.constant.ts +8 -9
- package/templates/module/__model__.dictionary.ts +16 -17
- package/templates/module/__model__.document.ts +6 -8
- package/templates/module/__model__.service.ts +3 -3
- package/templates/module/__model__.signal.ts +11 -10
- package/templates/module/__model__.store.ts +3 -5
- package/templates/service/__model__.dictionary.ts +6 -5
- package/templates/service/__model__.service.ts +3 -3
- package/templates/service/__model__.signal.ts +5 -4
- package/templates/service/__model__.store.ts +3 -5
- package/templates/workspaceRoot/.gitignore.template +3 -0
- package/templates/workspaceRoot/.vscode/settings.json.template +21 -21
- package/templates/workspaceRoot/AGENTS.md.template +4 -10
- package/{tunnel.command-ycmja19q.js → tunnel.command-q2h0j2en.js} +7 -7
- package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
- package/typecheck.proc.js +6 -1
- package/verify.command-z1dsbmrt.js +91 -0
- package/{workflow.command-abb1d5xy.js → workflow.command-r3y67jeq.js} +47 -13
- package/workspace.command-t2f0xsrw.js +263 -0
- package/CodeAgent-8d5qs787.js +0 -9
- package/TunnelShare-qkm8zp03.js +0 -14
- package/agent.command-ydftceda.js +0 -25
- package/cloud.script-nqevg5qw.js +0 -24
- package/context.runner-8gg030b0.js +0 -25
- package/guidelines/conventions/conventions.instruction.md +0 -617
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
- package/index-4vgbysa0.js +0 -279
- package/index-7md2g9vw.js +0 -6
- package/index-b70zct19.js +0 -856
- package/index-zzvvc845.js +0 -74
- package/quality.command-ah8qcakd.js +0 -1478
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
- package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
- package/workspace.command-qm7cw29v.js +0 -521
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
model: string;
|
|
5
6
|
Model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { via } from "akanjs/constant";
|
|
9
|
+
return `import { via } from "akanjs/constant";
|
|
10
10
|
|
|
11
|
-
export class ${dict.Model} extends via(
|
|
12
|
-
field: field(String),
|
|
13
|
-
})) {}
|
|
11
|
+
${BiomeForm.callArgs("", `export class ${dict.Model} extends via`, ["(field) => ({\n field: field(String),\n})"], " {}")}
|
|
14
12
|
`;
|
|
15
13
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
model: string;
|
|
5
6
|
Model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
|
|
9
|
-
import { scalarDictionary } from "akanjs/dictionary";
|
|
9
|
+
const { Model, model } = dict;
|
|
10
|
+
return `import { scalarDictionary } from "akanjs/dictionary";
|
|
10
11
|
|
|
11
|
-
import type { ${
|
|
12
|
+
import type { ${Model} } from "./${model}.constant";
|
|
12
13
|
|
|
13
14
|
export const dictionary = scalarDictionary(["en", "ko"])
|
|
14
|
-
|
|
15
|
-
.model<${
|
|
15
|
+
${BiomeForm.dictionaryOf([Model, Model], [`${Model} description`, `${Model} 설명`])}
|
|
16
|
+
.model<${Model}>((t) => ({
|
|
16
17
|
field: t(["Field", "필드"]).desc(["Field Description", "필드 설명"]),
|
|
17
18
|
}));
|
|
18
19
|
`;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
model: string;
|
|
5
6
|
Model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { by } from "akanjs/document";
|
|
9
|
+
return `import { by } from "akanjs/document";
|
|
10
10
|
|
|
11
11
|
import * as cnst from "./${dict.model}.constant";
|
|
12
12
|
|
|
13
|
-
export class ${dict.Model} extends by
|
|
13
|
+
${BiomeForm.callArgs("", `export class ${dict.Model} extends by`, [`cnst.${dict.Model}`], " {}")}
|
|
14
14
|
`;
|
|
15
15
|
}
|
|
@@ -4,11 +4,10 @@ interface Dict {
|
|
|
4
4
|
appName: string;
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
7
|
-
return `
|
|
8
|
-
import type { AppConfig } from "akanjs";
|
|
7
|
+
return `import type { AppConfig } from "akanjs";
|
|
9
8
|
|
|
10
9
|
const config: AppConfig = {};
|
|
11
10
|
|
|
12
11
|
export default config;
|
|
13
|
-
|
|
12
|
+
`;
|
|
14
13
|
}
|
|
@@ -4,8 +4,7 @@ interface Dict {
|
|
|
4
4
|
[key: string]: string;
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
|
|
7
|
-
return `
|
|
8
|
-
import { env as debug } from "./env.client.debug";
|
|
7
|
+
return `import { env as debug } from "./env.client.debug";
|
|
9
8
|
import { env as develop } from "./env.client.develop";
|
|
10
9
|
import { env as local } from "./env.client.local";
|
|
11
10
|
import { env as main } from "./env.client.main";
|
|
@@ -16,6 +15,5 @@ const currentEnv = process.env.AKAN_PUBLIC_ENV ?? "local";
|
|
|
16
15
|
if (!(currentEnv in envConfigs)) throw new Error(\`Unknown environment: \${currentEnv}\`);
|
|
17
16
|
|
|
18
17
|
export const env = envConfigs[currentEnv as keyof typeof envConfigs];
|
|
19
|
-
|
|
20
|
-
`;
|
|
18
|
+
`;
|
|
21
19
|
}
|
|
@@ -4,8 +4,7 @@ interface Dict {
|
|
|
4
4
|
[key: string]: string;
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
|
|
7
|
-
return
|
|
8
|
-
// Replace with the public env keys this app reads, e.g. { google?: { mapKey: string } }.
|
|
7
|
+
return `// Replace with the public env keys this app reads, e.g. { google?: { mapKey: string } }.
|
|
9
8
|
export type AppClientEnv = Record<never, never>;
|
|
10
|
-
|
|
9
|
+
`;
|
|
11
10
|
}
|
|
@@ -4,8 +4,7 @@ interface Dict {
|
|
|
4
4
|
[key: string]: string;
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
|
|
7
|
-
return `
|
|
8
|
-
import { env as debug } from "./env.server.debug";
|
|
7
|
+
return `import { env as debug } from "./env.server.debug";
|
|
9
8
|
import { env as develop } from "./env.server.develop";
|
|
10
9
|
import { env as local } from "./env.server.local";
|
|
11
10
|
import { env as main } from "./env.server.main";
|
|
@@ -16,5 +15,5 @@ const currentEnv = process.env.AKAN_PUBLIC_ENV ?? "local";
|
|
|
16
15
|
if (!(currentEnv in envConfigs)) throw new Error(\`Unknown environment: \${currentEnv}\`);
|
|
17
16
|
|
|
18
17
|
export const env = envConfigs[currentEnv as keyof typeof envConfigs];
|
|
19
|
-
|
|
18
|
+
`;
|
|
20
19
|
}
|
|
@@ -5,8 +5,7 @@ interface Dict {
|
|
|
5
5
|
AppName: string;
|
|
6
6
|
}
|
|
7
7
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { serviceDictionary } from "akanjs/dictionary";
|
|
8
|
+
return `import { serviceDictionary } from "akanjs/dictionary";
|
|
10
9
|
|
|
11
10
|
import type { ${dict.AppName}Endpoint } from "./${dict.appName}.signal";
|
|
12
11
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../../../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
appName: string;
|
|
5
6
|
AppName: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { serve } from "akanjs/service";
|
|
9
|
+
return `import { serve } from "akanjs/service";
|
|
10
10
|
|
|
11
|
-
export class ${dict.AppName}Service extends serve
|
|
11
|
+
${BiomeForm.callArgs("", `export class ${dict.AppName}Service extends serve`, [`"${dict.appName}" as const`, '{ serverMode: "batch" }', "() => ({})"], " {}")}
|
|
12
12
|
`;
|
|
13
13
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../../../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
appName: string;
|
|
5
6
|
AppName: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { endpoint, internal } from "akanjs/signal";
|
|
9
|
+
return `import { endpoint, internal } from "akanjs/signal";
|
|
10
10
|
|
|
11
11
|
import * as srv from "../srv";
|
|
12
12
|
|
|
13
|
-
export class ${dict.AppName}Internal extends internal
|
|
13
|
+
${BiomeForm.callArgs("", `export class ${dict.AppName}Internal extends internal`, [`srv.${dict.appName}`, "() => ({})"], " {}")}
|
|
14
14
|
|
|
15
|
-
export class ${dict.AppName}Endpoint extends endpoint
|
|
16
|
-
|
|
15
|
+
${BiomeForm.callArgs("", `export class ${dict.AppName}Endpoint extends endpoint`, [`srv.${dict.appName}`, "() => ({})"], " {}")}
|
|
16
|
+
`;
|
|
17
17
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../../../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
appName: string;
|
|
5
6
|
AppName: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { store } from "akanjs/store";
|
|
9
|
+
return `import { store } from "akanjs/store";
|
|
10
10
|
|
|
11
|
-
export class ${dict.AppName}Store extends store
|
|
12
|
-
// state
|
|
13
|
-
})) {
|
|
11
|
+
${BiomeForm.callArgs("", `export class ${dict.AppName}Store extends store`, [`"${dict.appName}" as const`, "() => ({\n // state\n})"], " {")}
|
|
14
12
|
// action
|
|
15
13
|
}
|
|
16
|
-
|
|
14
|
+
`;
|
|
17
15
|
}
|
|
@@ -4,8 +4,7 @@ interface Dict {
|
|
|
4
4
|
[key: string]: string;
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
|
|
7
|
-
return `
|
|
8
|
-
import { AkanOption } from "akanjs/server";
|
|
7
|
+
return `import { AkanOption } from "akanjs/server";
|
|
9
8
|
|
|
10
9
|
import type { LibOptions } from "./srv";
|
|
11
10
|
|
|
@@ -14,5 +13,5 @@ export type ModulesOptions = LibOptions & {
|
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
export const option = new AkanOption<ModulesOptions>();
|
|
17
|
-
|
|
16
|
+
`;
|
|
18
17
|
}
|
package/templates/app/main.ts
CHANGED
|
@@ -4,8 +4,7 @@ interface Dict {
|
|
|
4
4
|
appName: string;
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
7
|
-
return
|
|
8
|
-
// Not the \`akanjs/server\` barrel: it re-exports AkanServer, whose graph the gateway never runs. Through the
|
|
7
|
+
return `// Not the \`akanjs/server\` barrel: it re-exports AkanServer, whose graph the gateway never runs. Through the
|
|
9
8
|
// barrel this process evaluates 35MB of SSR renderer and DB driver to spawn children and relay bytes.
|
|
10
9
|
import { AkanApp } from "akanjs/server/akanApp";
|
|
11
10
|
|
|
@@ -13,6 +12,5 @@ const run = async () => {
|
|
|
13
12
|
await new AkanApp().start();
|
|
14
13
|
};
|
|
15
14
|
void run();
|
|
16
|
-
|
|
17
|
-
`;
|
|
15
|
+
`;
|
|
18
16
|
}
|
|
@@ -35,8 +35,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dic
|
|
|
35
35
|
: "";
|
|
36
36
|
return {
|
|
37
37
|
filename: "_index.tsx",
|
|
38
|
-
content: `
|
|
39
|
-
import { jellyButtonRecipe } from "@apps/${dict.appName}/ui";
|
|
38
|
+
content: `import { jellyButtonRecipe } from "@apps/${dict.appName}/ui";
|
|
40
39
|
import { getEnv } from "akanjs/base";
|
|
41
40
|
import { cn, page, usePage } from "akanjs/client";
|
|
42
41
|
import { Image, Link, System } from "akanjs/ui";
|
|
@@ -293,6 +292,7 @@ export default page().render(() => {
|
|
|
293
292
|
</div>
|
|
294
293
|
</main>
|
|
295
294
|
);
|
|
296
|
-
})
|
|
295
|
+
});
|
|
296
|
+
`,
|
|
297
297
|
};
|
|
298
298
|
}
|
|
@@ -5,12 +5,19 @@ interface Dict {
|
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict, options: { libs: string[] }) {
|
|
7
7
|
const isUsingShared = options.libs.includes("shared");
|
|
8
|
+
const rendered = isUsingShared
|
|
9
|
+
? `(
|
|
10
|
+
<>
|
|
11
|
+
{children}
|
|
12
|
+
<Auth.User />
|
|
13
|
+
<Auth.Admin />
|
|
14
|
+
</>
|
|
15
|
+
)`
|
|
16
|
+
: "<>{children}</>";
|
|
8
17
|
return {
|
|
9
18
|
filename: "_layout.tsx",
|
|
10
|
-
content: `
|
|
11
|
-
import "
|
|
12
|
-
import { rootLayout } from "akanjs/client";
|
|
13
|
-
${isUsingShared ? "import { Auth } from '@shared/ui';" : ""}
|
|
19
|
+
content: `import "./styles.css";
|
|
20
|
+
${isUsingShared ? 'import { Auth } from "@libs/shared/ui";\n' : ""}import { rootLayout } from "akanjs/client";
|
|
14
21
|
|
|
15
22
|
export default rootLayout()
|
|
16
23
|
.fonts([
|
|
@@ -41,12 +48,8 @@ export default rootLayout()
|
|
|
41
48
|
</>,
|
|
42
49
|
)
|
|
43
50
|
.render(({ children }) => {
|
|
44
|
-
return
|
|
45
|
-
<>
|
|
46
|
-
{children}${isUsingShared ? "\n <Auth.User />\n <Auth.Admin />" : ""}
|
|
47
|
-
</>
|
|
48
|
-
);
|
|
51
|
+
return ${rendered};
|
|
49
52
|
});
|
|
50
|
-
|
|
53
|
+
`,
|
|
51
54
|
};
|
|
52
55
|
}
|
|
@@ -12,11 +12,7 @@ import { via } from "akanjs/constant";
|
|
|
12
12
|
// ---- Enum ----
|
|
13
13
|
// WorkHistoryAction: the type of change recorded in a work history entry
|
|
14
14
|
// Scalar enums follow the same enumOf() convention as model enums
|
|
15
|
-
export class WorkHistoryAction extends enumOf("workHistoryAction", [
|
|
16
|
-
"created",
|
|
17
|
-
"started",
|
|
18
|
-
"completed",
|
|
19
|
-
] as const) {}
|
|
15
|
+
export class WorkHistoryAction extends enumOf("workHistoryAction", ["created", "started", "completed"] as const) {}
|
|
20
16
|
|
|
21
17
|
// ---- Scalar Entry ----
|
|
22
18
|
// WorkHistory: a single entry in a model's workHistory list
|
|
@@ -3,7 +3,7 @@ import type { AppInfo, LibInfo } from "akanjs";
|
|
|
3
3
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { appName: string }) {
|
|
4
4
|
return `import { scalarDictionary } from "akanjs/dictionary";
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type { WorkHistory, WorkHistoryAction } from "./workHistory.constant";
|
|
7
7
|
|
|
8
8
|
// ===== workHistory.dictionary.ts =====
|
|
9
9
|
// Convention: scalarDictionary() for scalar module i18n — fewer layers than modelDictionary().
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
2
|
|
|
3
3
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { appName: string }) {
|
|
4
|
-
return `import {
|
|
4
|
+
return `import { endpoint, internal } from "akanjs/signal";
|
|
5
5
|
|
|
6
6
|
import * as srv from "../srv";
|
|
7
7
|
|
|
@@ -4,7 +4,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { a
|
|
|
4
4
|
return {
|
|
5
5
|
filename: "Task.Unit.tsx",
|
|
6
6
|
content: `import { type cnst, usePage } from "@apps/${dict.appName}/client";
|
|
7
|
-
import { type ModelProps
|
|
7
|
+
import { cn, type ModelProps } from "akanjs/client";
|
|
8
8
|
import { badgeRecipe, Layout } from "akanjs/ui";
|
|
9
9
|
|
|
10
10
|
// ===== Task.Unit.tsx =====
|
|
@@ -60,6 +60,7 @@ export const Card = ({ task, className, href }: CardProps) => {
|
|
|
60
60
|
// Abstract: abstracted summary display (search results, previews)
|
|
61
61
|
// export const Abstract = ({ task }: AbstractProps) => (
|
|
62
62
|
// <div className="text-sm">{task.title} — {l("taskStatus", task.status)}</div>
|
|
63
|
-
// )
|
|
63
|
+
// );
|
|
64
|
+
`,
|
|
64
65
|
};
|
|
65
66
|
}
|
|
@@ -20,7 +20,11 @@ interface StartProps {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export const Start = ({ taskId }: StartProps) => (
|
|
23
|
-
<button
|
|
23
|
+
<button
|
|
24
|
+
type="button"
|
|
25
|
+
className={jellyButtonRecipe({ variant: "primary", size: "xs" })}
|
|
26
|
+
onClick={() => st.do.startTask(taskId)}
|
|
27
|
+
>
|
|
24
28
|
{usePage().l("task.taskStart")}
|
|
25
29
|
</button>
|
|
26
30
|
);
|
|
@@ -30,7 +34,11 @@ interface CompleteProps {
|
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
export const Complete = ({ taskId }: CompleteProps) => (
|
|
33
|
-
<button
|
|
37
|
+
<button
|
|
38
|
+
type="button"
|
|
39
|
+
className={jellyButtonRecipe({ variant: "success", size: "xs" })}
|
|
40
|
+
onClick={() => st.do.completeTask(taskId)}
|
|
41
|
+
>
|
|
34
42
|
{usePage().l("task.taskComplete")}
|
|
35
43
|
</button>
|
|
36
44
|
);
|
|
@@ -63,12 +71,16 @@ export const Toolbox = ({ taskId, status }: ToolboxProps) => {
|
|
|
63
71
|
<>
|
|
64
72
|
{status === "todo" && (
|
|
65
73
|
<li>
|
|
66
|
-
<button type="button" onClick={() => st.do.startTask(taskId)}>
|
|
74
|
+
<button type="button" onClick={() => st.do.startTask(taskId)}>
|
|
75
|
+
{l("task.taskStart")}
|
|
76
|
+
</button>
|
|
67
77
|
</li>
|
|
68
78
|
)}
|
|
69
79
|
{status === "inProgress" && (
|
|
70
80
|
<li>
|
|
71
|
-
<button type="button" onClick={() => st.do.completeTask(taskId)}>
|
|
81
|
+
<button type="button" onClick={() => st.do.completeTask(taskId)}>
|
|
82
|
+
{l("task.taskComplete")}
|
|
83
|
+
</button>
|
|
72
84
|
</li>
|
|
73
85
|
)}
|
|
74
86
|
<li>
|
|
@@ -14,11 +14,7 @@ import { WorkHistory } from "../__scalar/workHistory/workHistory.constant";
|
|
|
14
14
|
// Input = user-provided fields; Object = Input + system fields + embedded scalars; Light = subset for list views; Full = Object + Light.
|
|
15
15
|
// Registered by akan sync into cnst.ts barrel.
|
|
16
16
|
|
|
17
|
-
export class TaskStatus extends enumOf("taskStatus", [
|
|
18
|
-
"todo",
|
|
19
|
-
"inProgress",
|
|
20
|
-
"completed",
|
|
21
|
-
] as const) {}
|
|
17
|
+
export class TaskStatus extends enumOf("taskStatus", ["todo", "inProgress", "completed"] as const) {}
|
|
22
18
|
|
|
23
19
|
export class TaskInput extends via((field) => ({
|
|
24
20
|
title: field(String),
|
|
@@ -14,10 +14,7 @@ import type { TaskFilter } from "./task.document";
|
|
|
14
14
|
// Registered by akan sync into dict.ts barrel.
|
|
15
15
|
|
|
16
16
|
export const dictionary = modelDictionary(["en", "ko"])
|
|
17
|
-
.of((t) =>
|
|
18
|
-
t(["Task", "할 일"])
|
|
19
|
-
.desc(["A unit of work to be completed", "완료해야 할 작업 단위"]),
|
|
20
|
-
)
|
|
17
|
+
.of((t) => t(["Task", "할 일"]).desc(["A unit of work to be completed", "완료해야 할 작업 단위"]))
|
|
21
18
|
.model<Task>((t) => ({
|
|
22
19
|
title: t(["Title", "제목"]).desc(["Task title", "할 일 제목"]),
|
|
23
20
|
content: t(["Content", "내용"]).desc(["Detailed task description", "상세 작업 설명"]),
|
|
@@ -43,10 +40,7 @@ export const dictionary = modelDictionary(["en", "ko"])
|
|
|
43
40
|
completed: t(["Completed", "완료"]),
|
|
44
41
|
}))
|
|
45
42
|
.error({
|
|
46
|
-
cannotStartFromNonTodo: [
|
|
47
|
-
"Task can only start from todo status",
|
|
48
|
-
"할 일 상태에서만 시작할 수 있습니다",
|
|
49
|
-
],
|
|
43
|
+
cannotStartFromNonTodo: ["Task can only start from todo status", "할 일 상태에서만 시작할 수 있습니다"],
|
|
50
44
|
cannotCompleteFromNonInProgress: [
|
|
51
45
|
"Task can only complete from in-progress status",
|
|
52
46
|
"진행 중 상태에서만 완료할 수 있습니다",
|
|
@@ -4,8 +4,8 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { a
|
|
|
4
4
|
return `import { dayjs } from "akanjs/base";
|
|
5
5
|
import { by, from, into } from "akanjs/document";
|
|
6
6
|
|
|
7
|
-
import { Err } from "../dict";
|
|
8
7
|
import * as cnst from "../cnst";
|
|
8
|
+
import { Err } from "../dict";
|
|
9
9
|
|
|
10
10
|
// ===== task.document.ts =====
|
|
11
11
|
// Convention: <module>.document.ts — the database query and persistence layer.
|
|
@@ -21,16 +21,11 @@ interface QuantityControlProps {
|
|
|
21
21
|
max?: number;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export const QuantityControl = ({
|
|
25
|
-
className,
|
|
26
|
-
value,
|
|
27
|
-
onChange,
|
|
28
|
-
min = 0,
|
|
29
|
-
max = 99,
|
|
30
|
-
}: QuantityControlProps) => {
|
|
24
|
+
export const QuantityControl = ({ className, value, onChange, min = 0, max = 99 }: QuantityControlProps) => {
|
|
31
25
|
return (
|
|
32
26
|
<div className={cn("inline-flex items-center gap-1", className)}>
|
|
33
|
-
<button
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
34
29
|
className={jellyButtonRecipe({ variant: "default", size: "icon" }, "size-7")}
|
|
35
30
|
disabled={value <= min}
|
|
36
31
|
onClick={() => onChange(Math.max(min, value - 1))}
|
|
@@ -38,7 +33,8 @@ export const QuantityControl = ({
|
|
|
38
33
|
−
|
|
39
34
|
</button>
|
|
40
35
|
<span className="w-8 text-center font-medium tabular-nums">{value}</span>
|
|
41
|
-
<button
|
|
36
|
+
<button
|
|
37
|
+
type="button"
|
|
42
38
|
className={jellyButtonRecipe({ variant: "default", size: "icon" }, "size-7")}
|
|
43
39
|
disabled={value >= max}
|
|
44
40
|
onClick={() => onChange(Math.min(max, value + 1))}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { compareExportNames } from "./facetIndex";
|
|
2
|
+
|
|
3
|
+
export interface JsxElement {
|
|
4
|
+
tag: string;
|
|
5
|
+
attrs: JsxAttr[];
|
|
6
|
+
}
|
|
7
|
+
export type JsxAttr = string | { name: string; param: string; body: JsxElement };
|
|
8
|
+
|
|
9
|
+
//? A scaffold is written before `bun install`, when no Biome can format it, so these break lines where Biome would.
|
|
10
|
+
export class BiomeForm {
|
|
11
|
+
static readonly lineWidth = 120;
|
|
12
|
+
|
|
13
|
+
//? Biome counts a Hangul syllable as two columns, as Bun.stringWidth does.
|
|
14
|
+
static fits(line: string) {
|
|
15
|
+
return Bun.stringWidth(line) <= BiomeForm.lineWidth;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static sorted(specifiers: string[]) {
|
|
19
|
+
return specifiers.toSorted((a, b) => compareExportNames(a.replace(/^type /, ""), b.replace(/^type /, "")));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//? Biome never breaks an import of one specifier, however long.
|
|
23
|
+
static importFrom(specifiers: string[], source: string, { typeOnly = false }: { typeOnly?: boolean } = {}) {
|
|
24
|
+
const keyword = typeOnly ? "import type" : "import";
|
|
25
|
+
const names = BiomeForm.sorted(specifiers);
|
|
26
|
+
const flat = `${keyword} { ${names.join(", ")} } from "${source}";`;
|
|
27
|
+
if (names.length === 1 || BiomeForm.fits(flat)) return flat;
|
|
28
|
+
return `${keyword} {\n${names.map((name) => ` ${name},`).join("\n")}\n} from "${source}";`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//? A multi-line argument comes indented as it reads hugged, relative to the indent the call starts at.
|
|
32
|
+
static callArgs(indent: string, head: string, args: string[], tail = "") {
|
|
33
|
+
const leading = args.slice(0, -1);
|
|
34
|
+
const lastLines = (args.at(-1) ?? "").split("\n");
|
|
35
|
+
if (lastLines.length === 1) {
|
|
36
|
+
const flat = `${indent}${head}(${args.join(", ")})${tail}`;
|
|
37
|
+
if (BiomeForm.fits(flat)) return flat;
|
|
38
|
+
} else {
|
|
39
|
+
const opening = `${indent}${head}(${[...leading, lastLines[0]].join(", ")}`;
|
|
40
|
+
const closing = `${lastLines.at(-1)})${tail}`;
|
|
41
|
+
if (BiomeForm.fits(opening) && BiomeForm.fits(`${indent}${closing}`))
|
|
42
|
+
return [
|
|
43
|
+
opening,
|
|
44
|
+
...lastLines.slice(1, -1).map((line) => BiomeForm.#indented(line, indent)),
|
|
45
|
+
`${indent}${closing}`,
|
|
46
|
+
].join("\n");
|
|
47
|
+
}
|
|
48
|
+
const broken = args.map((arg) =>
|
|
49
|
+
`${arg},`
|
|
50
|
+
.split("\n")
|
|
51
|
+
.map((line) => BiomeForm.#indented(line, `${indent} `))
|
|
52
|
+
.join("\n"),
|
|
53
|
+
);
|
|
54
|
+
return `${indent}${head}(\n${broken.join("\n")}\n${indent})${tail}`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//? Biome breaks after `=` only when the right side cannot break before the line ends.
|
|
58
|
+
static assign(indent: string, target: string, head: string, args: string[], tail = "") {
|
|
59
|
+
const call = BiomeForm.callArgs(indent, `${target} = ${head}`, args, tail);
|
|
60
|
+
if (!call.includes("\n") || (args.length > 0 && BiomeForm.fits(`${indent}${target} = ${head}(`))) return call;
|
|
61
|
+
return `${indent}${target} =\n${BiomeForm.callArgs(`${indent} `, head, args, tail)}`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//? A broken type argument list takes no trailing comma.
|
|
65
|
+
static typeArgs(indent: string, head: string, args: string[], tail = "") {
|
|
66
|
+
const flat = `${indent}${head}<${args.join(", ")}>${tail}`;
|
|
67
|
+
if (BiomeForm.fits(flat)) return flat;
|
|
68
|
+
return `${indent}${head}<\n${args.map((arg) => `${indent} ${arg}`).join(",\n")}\n${indent}>${tail}`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//? JSX text that does not fit ends its line with an explicit `{" "}`, since a line break there would drop the space.
|
|
72
|
+
static jsxSpaced(indent: string, first: string, second: string) {
|
|
73
|
+
const flat = `${indent}${first} ${second}`;
|
|
74
|
+
if (BiomeForm.fits(flat)) return flat;
|
|
75
|
+
return `${indent}${first}{" "}\n${indent}${second}`;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static wrap(indent: string, open: string, child: string, close: string) {
|
|
79
|
+
const flat = `${indent}${open}${child}${close}`;
|
|
80
|
+
if (BiomeForm.fits(flat)) return flat;
|
|
81
|
+
return `${indent}${open}\n${indent} ${child}\n${indent}${close}`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static element(element: JsxElement, indent: string, { before = "", after = "" } = {}): string {
|
|
85
|
+
const flat = `${indent}${before}${BiomeForm.#flat(element)}${after}`;
|
|
86
|
+
if (BiomeForm.fits(flat)) return flat;
|
|
87
|
+
const attrs = element.attrs.map((attr) => BiomeForm.#attr(attr, `${indent} `));
|
|
88
|
+
return `${indent}${before}<${element.tag}\n${attrs.join("\n")}\n${indent}/>${after}`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
static openingTag(element: JsxElement, indent: string) {
|
|
92
|
+
const flat = `${indent}<${element.tag} ${element.attrs.map((attr) => BiomeForm.#flatAttr(attr)).join(" ")}>`;
|
|
93
|
+
if (BiomeForm.fits(flat)) return flat;
|
|
94
|
+
const attrs = element.attrs.map((attr) => BiomeForm.#attr(attr, `${indent} `));
|
|
95
|
+
return `${indent}<${element.tag}\n${attrs.join("\n")}\n${indent}>`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static returnElement(element: JsxElement, indent: string) {
|
|
99
|
+
const flat = `${indent}return ${BiomeForm.#flat(element)};`;
|
|
100
|
+
if (BiomeForm.fits(flat)) return flat;
|
|
101
|
+
return `${indent}return (\n${BiomeForm.element(element, `${indent} `)}\n${indent});`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
static dictionaryOf(label: readonly [string, string], desc: readonly [string, string]) {
|
|
105
|
+
const body = `t(${BiomeForm.#pair(label)}).desc(${BiomeForm.#pair(desc)})`;
|
|
106
|
+
if (BiomeForm.fits(` .of((t) => ${body})`)) return ` .of((t) => ${body})`;
|
|
107
|
+
if (BiomeForm.fits(` ${body},`)) return ` .of((t) =>\n ${body},\n )`;
|
|
108
|
+
const descLines = desc.map((text) => ` ${JSON.stringify(text)},`).join("\n");
|
|
109
|
+
if (BiomeForm.fits(` t(${BiomeForm.#pair(label)}).desc([`))
|
|
110
|
+
return ` .of((t) =>\n t(${BiomeForm.#pair(label)}).desc([\n${descLines}\n ]),\n )`;
|
|
111
|
+
const labelLines = label.map((text) => ` ${JSON.stringify(text)},`).join("\n");
|
|
112
|
+
return ` .of((t) =>\n t([\n${labelLines}\n ]).desc([\n${descLines}\n ]),\n )`;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
static dictionarySlice(key: string, label: readonly [string, string]) {
|
|
116
|
+
const head = ` ${key}: fn(${BiomeForm.#pair(label)}).arg(`;
|
|
117
|
+
if (BiomeForm.fits(`${head}(t) => ({})),`)) return `${head}(t) => ({})),`;
|
|
118
|
+
if (BiomeForm.fits(head)) return `${head}\n (t) => ({}),\n ),`;
|
|
119
|
+
const labelLines = label.map((text) => ` ${JSON.stringify(text)},`).join("\n");
|
|
120
|
+
return ` ${key}: fn([\n${labelLines}\n ]).arg((t) => ({})),`;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static #pair(pair: readonly [string, string]) {
|
|
124
|
+
return `[${pair.map((text) => JSON.stringify(text)).join(", ")}]`;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static #indented(line: string, indent: string) {
|
|
128
|
+
return line ? `${indent}${line}` : line;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static #flat({ tag, attrs }: JsxElement): string {
|
|
132
|
+
return `<${[tag, ...attrs.map((attr) => BiomeForm.#flatAttr(attr))].join(" ")} />`;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static #flatAttr(attr: JsxAttr): string {
|
|
136
|
+
return typeof attr === "string" ? attr : `${attr.name}={(${attr.param}) => ${BiomeForm.#flat(attr.body)}}`;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static #attr(attr: JsxAttr, indent: string): string {
|
|
140
|
+
const flat = `${indent}${BiomeForm.#flatAttr(attr)}`;
|
|
141
|
+
if (typeof attr === "string" || BiomeForm.fits(flat)) return flat;
|
|
142
|
+
return `${indent}${attr.name}={(${attr.param}) => (\n${BiomeForm.element(attr.body, `${indent} `)}\n${indent})}`;
|
|
143
|
+
}
|
|
144
|
+
}
|