@akanjs/cli 3.2.0-rc.8 → 3.2.0

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 (143) hide show
  1. package/.build-stamp +2 -2
  2. package/CodeAgent-fx6088tv.js +11 -0
  3. package/{CodeTui-qstk5vpj.js → CodeTui-zee8atsr.js} +822 -666
  4. package/README.ko.md +7 -0
  5. package/README.md +7 -0
  6. package/TunnelShare-9ry4vh0y.js +18 -0
  7. package/agent.command-x65f2ags.js +61 -0
  8. package/akanCode.js +12 -12
  9. package/appExecutor-79azsb2w.js +11 -0
  10. package/{application.command-m4rq4wc2.js → application.command-azbd1pb2.js} +83 -37
  11. package/{applicationBuildRunner-df7rx3ra.js → applicationBuildRunner-trfxv3pd.js} +49 -18
  12. package/buildBatch.proc.js +25 -11
  13. package/{cloud.command-a0gy0qq2.js → cloud.command-gapp4634.js} +33 -29
  14. package/cloud.script-3b401efv.js +35 -0
  15. package/{code.command-5rsdqw8s.js → code.command-5smx61yf.js} +13 -9
  16. package/context.command-ym5jbkny.js +64 -0
  17. package/context.runner-kctbfsde.js +34 -0
  18. package/{dependencyScanner-78sq8m4q.js → dependencyScanner-ge10gb52.js} +2 -2
  19. package/{devTui-h77zrjv5.js → devTui-rf374y2w.js} +1 -1
  20. package/{fileSys-zpvt5gtf.js → fileSys-q22646yc.js} +1 -1
  21. package/{guideline.command-mffxknbr.js → guideline.command-zwypaqsh.js} +9 -5
  22. package/guidelines/agentRule/agentRule.instruction.md +25 -9
  23. package/guidelines/akanApi/akanApi.instruction.md +6 -4
  24. package/guidelines/conventions/core.md +23 -5
  25. package/guidelines/conventions/rules/app.md +4 -1
  26. package/guidelines/conventions/rules/page.md +5 -4
  27. package/guidelines/conventions/rules/ts.md +3 -3
  28. package/guidelines/errorCodes/errorCodes.instruction.md +165 -0
  29. package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
  30. package/guidelines/mcpRule/mcpRule.instruction.md +225 -5
  31. package/guidelines/pageRule/pageRule.instruction.md +10 -1
  32. package/guidelines/queryRule/queryRule.instruction.md +3 -1
  33. package/guidelines/runtimeRule/runtimeRule.instruction.md +14 -8
  34. package/guidelines/transportRule/transportRule.instruction.md +31 -1
  35. package/incrementalBuilder.proc.js +577 -411
  36. package/{index-w15mg3km.js → index-0dm25wvf.js} +1 -1
  37. package/{index-0gg15zwa.js → index-0s7w2085.js} +6 -6
  38. package/{index-hj6w4ka1.js → index-1p81ecbz.js} +1 -1
  39. package/{index-swwjakt0.js → index-275a4r3n.js} +11 -11
  40. package/{index-j6gc8n14.js → index-2jmvfa62.js} +11 -9
  41. package/{index-qd7xn2bk.js → index-2ny1e95c.js} +2 -2
  42. package/{index-exn38bzx.js → index-2yn3r67f.js} +116 -54
  43. package/{index-34792nh7.js → index-3txdtztz.js} +1 -1
  44. package/{index-28x1aszt.js → index-41a03gkj.js} +149 -53
  45. package/{index-2mf1aen9.js → index-4ss4gkv3.js} +2 -2
  46. package/{index-an76bdrv.js → index-612fdtbk.js} +1 -1
  47. package/{index-5radqwn2.js → index-67sd09ag.js} +12 -12
  48. package/{index-0hbtve0a.js → index-6dzjer7p.js} +32 -28
  49. package/{index-3ghdb7p5.js → index-71y6176j.js} +2777 -3676
  50. package/{index-xyn02k0w.js → index-78y75t0a.js} +662 -433
  51. package/index-7wf8snar.js +80 -0
  52. package/{index-skmtj8rm.js → index-8jtqfye2.js} +27 -10
  53. package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
  54. package/{index-nmvhjn8c.js → index-9wh04mqy.js} +93 -82
  55. package/{index-xvk2a75m.js → index-a860mx0m.js} +3 -3
  56. package/{index-5zwr4n6k.js → index-baccvws5.js} +65 -8
  57. package/{index-yf9wc28h.js → index-bejy9zyc.js} +1 -1
  58. package/{index-bns3wcpc.js → index-by2tvsq6.js} +1 -1
  59. package/{index-r0a604h4.js → index-c669pbyb.js} +5 -4
  60. package/{index-x40bdsca.js → index-dadwp2aw.js} +33 -98
  61. package/{index-vm0dn0mt.js → index-dmcpetwe.js} +200 -138
  62. package/{index-43f4h4cm.js → index-ebn9kgea.js} +6 -6
  63. package/{index-hqv34wzq.js → index-gt8phqpt.js} +10 -10
  64. package/{index-yckz5t8b.js → index-h901f24n.js} +516 -434
  65. package/{index-j3v29pq7.js → index-j0wr4e32.js} +219 -175
  66. package/{index-gcx48get.js → index-j592zfqc.js} +2 -2
  67. package/{index-grxs6fts.js → index-j6jjmn2r.js} +57 -31
  68. package/{index-w8yasvpc.js → index-jek2re5k.js} +2136 -2175
  69. package/{index-ny2k80mv.js → index-jf4vk1s0.js} +9 -2
  70. package/{index-gxav1bjz.js → index-k6vwww45.js} +9 -9
  71. package/{index-99qvtff2.js → index-kfvjzk8r.js} +5 -5
  72. package/{index-j6eeh5d7.js → index-knpm8sdm.js} +5 -5
  73. package/{index-2r9ff9qm.js → index-nc3br31y.js} +2 -2
  74. package/{index-35j83zkd.js → index-p5zh7pmc.js} +2 -2
  75. package/{index-cmg5ngqa.js → index-p7beqww9.js} +2 -2
  76. package/{index-b4qq3rq0.js → index-rwgqba9p.js} +1 -1
  77. package/{index-rfzp4pqs.js → index-s885g0jj.js} +3 -3
  78. package/{index-9p260r4e.js → index-trffs83s.js} +538 -250
  79. package/{index-k92x3vne.js → index-v7ajmsh3.js} +1 -1
  80. package/index-w1zexzpx.js +127 -0
  81. package/{index-h7hehkw6.js → index-xczjdng6.js} +3 -1
  82. package/{index-39jz41jb.js → index-xs9a3ddt.js} +3 -3
  83. package/{index-rp4yf32g.js → index-xwwex8rf.js} +36 -29
  84. package/{index-ra9fvn7s.js → index-ybcb9wc8.js} +74 -38
  85. package/index-z92zm3wd.js +788 -0
  86. package/{index-j9790rhk.js → index-z96ks033.js} +1509 -1121
  87. package/index-zfnz878d.js +30 -0
  88. package/{index-2vgv7fs7.js → index-zmd9xxgd.js} +727 -693
  89. package/{index-ygdbn9jn.js → index-zyb0ebm4.js} +1 -1
  90. package/index.js +28 -24
  91. package/libExecutor-jc6f8hm6.js +10 -0
  92. package/{library.command-bmd7zc5m.js → library.command-nxvesvhb.js} +12 -5
  93. package/{localRegistry.command-y6en1599.js → localRegistry.command-xz62e4ng.js} +29 -24
  94. package/{module.command-7exfffqw.js → module.command-aaws9byg.js} +11 -7
  95. package/{package.command-adskw2rj.js → package.command-j7hv26p0.js} +14 -10
  96. package/package.json +8 -8
  97. package/{page.command-dw01272p.js → page.command-7yffs7n9.js} +8 -4
  98. package/{pipeline.command-0b1r3y5r.js → pipeline.command-7yk0zcng.js} +15 -9
  99. package/pkgExecutor-arxmvx4t.js +10 -0
  100. package/{primitive.command-byw6vc04.js → primitive.command-7a1pt715.js} +12 -8
  101. package/{projectTypecheck-kkrpq60a.js → projectTypecheck-f4qhbecd.js} +1 -1
  102. package/{prompter-qrwx1p17.js → prompter-qyggfhqd.js} +2 -2
  103. package/{quality.command-6rqnhzct.js → quality.command-c6mvrjh1.js} +25 -16
  104. package/{recipeScanner-4b69ybe0.js → recipeScanner-rrx69awy.js} +1 -1
  105. package/{repair.command-rw5zymak.js → repair.command-093adzt9.js} +12 -8
  106. package/{routeSourceValidator-4h947v7c.js → routeSourceValidator-8n6j1vn7.js} +4 -2
  107. package/{scalar.command-2dyp9nh9.js → scalar.command-2ex84spb.js} +10 -6
  108. package/skills/akan-debug/SKILL.md +8 -5
  109. package/skills/akan-err/SKILL.md +7 -0
  110. package/skills/akan-mcp/SKILL.md +19 -1
  111. package/skills/akan-scaffold/SKILL.md +1 -1
  112. package/skills/akan-validate/SKILL.md +3 -3
  113. package/{subspace.command-111ynwv1.js → subspace.command-4n4n4jpv.js} +32 -24
  114. package/templates/app/page/_layout.tsx +13 -0
  115. package/templates/app/page/styles.css.template +40 -0
  116. package/templates/appSample/page/_index.tsx +9 -9
  117. package/templates/appSample/page/_layout.tsx +1 -0
  118. package/templates/appSample/page/styles.css.template +40 -5
  119. package/templates/appSample/ui/Recipe/jellyButton.ts +1 -1
  120. package/templates/biomeForm.ts +1 -1
  121. package/templates/env/_env.server.type.ts +1 -1
  122. package/templates/facetIndex/index.ts +2 -37
  123. package/templates/lib/sig.ts +0 -4
  124. package/templates/lib/useClient.ts +1 -1
  125. package/templates/workspaceRoot/.devcontainer/devcontainer.json.template +1 -1
  126. package/templates/workspaceRoot/AGENTS.md.template +2 -1
  127. package/templates/workspaceRoot/README.ts +4 -2
  128. package/{tunnel.command-2gcpfbdj.js → tunnel.command-f7ep1qfa.js} +17 -13
  129. package/{typeChecker-s640r6c0.js → typeChecker-7jt6abrs.js} +1 -1
  130. package/typecheck.proc.js +3 -2
  131. package/{verify.command-djgs86ma.js → verify.command-zrkxnvct.js} +21 -17
  132. package/{workflow.command-n0k2mxr5.js → workflow.command-ks16jegk.js} +21 -14
  133. package/{workspace.command-fh1qwxfx.js → workspace.command-ahhfpaag.js} +60 -54
  134. package/CodeAgent-x2p3a3e0.js +0 -11
  135. package/TunnelShare-c4xsfzg5.js +0 -15
  136. package/agent.command-9et2e27p.js +0 -52
  137. package/cloud.script-xze4zh7n.js +0 -31
  138. package/context.command-rk1dwrg4.js +0 -57
  139. package/context.runner-83ky5m1b.js +0 -30
  140. /package/templates/{appSample → app}/public/fonts/Pretendard-Bold.woff2 +0 -0
  141. /package/templates/{appSample → app}/public/fonts/Pretendard-Medium.woff2 +0 -0
  142. /package/templates/{appSample → app}/public/fonts/Pretendard-Regular.woff2 +0 -0
  143. /package/templates/{appSample → app}/public/fonts/Pretendard-SemiBold.woff2 +0 -0
package/README.ko.md CHANGED
@@ -26,6 +26,13 @@ bun install -g @akanjs/cli
26
26
  akan --help
27
27
  ```
28
28
 
29
+ 이미 있는 워크스페이스에서는 그 워크스페이스가 의존하는 `akanjs`와 같은 버전으로 CLI를 설치합니다. major나 minor
30
+ 버전이 다른 CLI는 `akan update`로 둘을 함께 옮기기 전까지 워크스페이스에 쓰기를 거부합니다.
31
+
32
+ ```bash
33
+ v="$(bun -e "const p=require('./package.json'),v=p.dependencies?.akanjs??p.devDependencies?.akanjs;if(!v){console.error('package.json lists no akanjs in dependencies or devDependencies');process.exit(1)}console.log(v)")" && bun install -g "@akanjs/cli@$v"
34
+ ```
35
+
29
36
  ## 자주 쓰는 명령
30
37
 
31
38
  ```bash
package/README.md CHANGED
@@ -26,6 +26,13 @@ bun install -g @akanjs/cli
26
26
  akan --help
27
27
  ```
28
28
 
29
+ For a workspace that already exists, install the CLI at the version of `akanjs` it depends on. A CLI of another
30
+ major or minor version refuses to write to it until `akan update` moves both:
31
+
32
+ ```bash
33
+ v="$(bun -e "const p=require('./package.json'),v=p.dependencies?.akanjs??p.devDependencies?.akanjs;if(!v){console.error('package.json lists no akanjs in dependencies or devDependencies');process.exit(1)}console.log(v)")" && bun install -g "@akanjs/cli@$v"
34
+ ```
35
+
29
36
  ## Everyday Commands
30
37
 
31
38
  ```bash
@@ -0,0 +1,18 @@
1
+ // @bun
2
+ import {
3
+ TunnelShare2
4
+ } from "./index-v7ajmsh3.js";
5
+ import"./index-s885g0jj.js";
6
+ import"./index-ebn9kgea.js";
7
+ import"./index-m9jj544v.js";
8
+ import"./index-a860mx0m.js";
9
+ import"./index-9wh04mqy.js";
10
+ import"./index-z92zm3wd.js";
11
+ import"./index-zfnz878d.js";
12
+ import"./index-w1zexzpx.js";
13
+ import"./index-71y6176j.js";
14
+ import"./index-j4yvgfhr.js";
15
+ import"./index-by2tvsq6.js";
16
+ export {
17
+ TunnelShare2 as TunnelShare
18
+ };
@@ -0,0 +1,61 @@
1
+ // @bun
2
+ import {
3
+ Workspace,
4
+ command
5
+ } from "./index-2yn3r67f.js";
6
+ import"./index-j4yvgfhr.js";
7
+ import"./index-71y6176j.js";
8
+ import"./index-by2tvsq6.js";
9
+ import"./index-z92zm3wd.js";
10
+ import"./index-zfnz878d.js";
11
+ import"./index-w1zexzpx.js";
12
+ import"./index-zmd9xxgd.js";
13
+ import"./index-trffs83s.js";
14
+ import"./index-h901f24n.js";
15
+ import"./index-1p81ecbz.js";
16
+ import"./index-p5zh7pmc.js";
17
+ import"./index-knpm8sdm.js";
18
+ import"./index-z96ks033.js";
19
+ import"./index-dmcpetwe.js";
20
+ import"./index-ebn9kgea.js";
21
+ import"./index-612fdtbk.js";
22
+ import"./index-m9jj544v.js";
23
+ import"./index-9wh04mqy.js";
24
+ import"./index-a860mx0m.js";
25
+ import"./index-78y75t0a.js";
26
+ import"./index-baccvws5.js";
27
+ import"./index-62md4dwy.js";
28
+ import"./index-zyb0ebm4.js";
29
+ import"./index-jf4vk1s0.js";
30
+ import"./index-t4d0ckde.js";
31
+ import"./index-ybcb9wc8.js";
32
+ import {
33
+ AgentScript
34
+ } from "./index-j6jjmn2r.js";
35
+ import"./index-j592zfqc.js";
36
+ import"./index-7wf8snar.js";
37
+
38
+ // pkgs/@akanjs/cli/agent/agent.command.ts
39
+ class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
40
+ agent: target({
41
+ desc: "Install Akan agent rules for editors and coding agents",
42
+ stdio: true,
43
+ usageExitCode: 1,
44
+ readOnly: ({ action, check }) => action === "hook" || check === true
45
+ }).arg("action", String, { desc: "install, or hook (run by Claude Code hooks)" }).arg("target", String, {
46
+ desc: "install: cursor, agents-md, claude, rules, skills, hooks, or all; hook: pre-edit, post-edit, stop",
47
+ nullable: true
48
+ }).option("force", Boolean, {
49
+ desc: "overwrite existing pointer files and generated files you took over",
50
+ default: false
51
+ }).option("check", Boolean, {
52
+ desc: "write nothing; exit 3 when install would create, change or remove a file",
53
+ default: false
54
+ }).with(Workspace).exec(async function(action, targetName, force, check, workspace) {
55
+ await this.agentScript.agent(workspace, action, targetName, { force, check });
56
+ })
57
+ })) {
58
+ }
59
+ export {
60
+ AgentCommand
61
+ };
package/akanCode.js CHANGED
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  PreviewChrome2,
4
4
  PreviewView2
5
- } from "./index-b4qq3rq0.js";
6
- import"./index-bns3wcpc.js";
5
+ } from "./index-rwgqba9p.js";
6
+ import"./index-by2tvsq6.js";
7
7
  import {
8
8
  akanCodePaths2
9
- } from "./index-35j83zkd.js";
9
+ } from "./index-p5zh7pmc.js";
10
10
  import {
11
11
  AkanEditScope2,
12
12
  DevLogFeedback2,
@@ -34,31 +34,31 @@ import {
34
34
  CodeMailbox2,
35
35
  CodeSessionFork2,
36
36
  CodeAgent2
37
- } from "./index-skmtj8rm.js";
37
+ } from "./index-8jtqfye2.js";
38
38
  import {
39
39
  akanCodeDefaultModel2,
40
40
  akanCodeModel2,
41
41
  akanCodeModelSupportsImages2,
42
42
  akanCodeModelWarnings2,
43
43
  CodeAgentStreamPrinter2
44
- } from "./index-w15mg3km.js";
44
+ } from "./index-0dm25wvf.js";
45
45
  import {
46
46
  SubagentPool2,
47
47
  AkanCodeCompaction2
48
- } from "./index-2r9ff9qm.js";
48
+ } from "./index-nc3br31y.js";
49
49
  import {
50
50
  CodeAgentRpcHost2
51
51
  } from "./index-s4nvxpzm.js";
52
52
  import {
53
- CodeTuiLines2,
54
- CodeTuiAgents2,
55
- CodeTuiClipboard2,
56
53
  CodeTuiCommands2,
54
+ CodeTuiLines2,
57
55
  CodeTuiEditor2,
58
- CodeTuiFiles2,
56
+ CodeTuiAgents2,
59
57
  CodeTuiMarkdown2,
60
- CodeTuiParts2
61
- } from "./index-2mrn1mrg.js";
58
+ CodeTuiParts2,
59
+ CodeTuiClipboard2,
60
+ CodeTuiFiles2
61
+ } from "./index-9f3reh2y.js";
62
62
  import"./index-9bv479q5.js";
63
63
  export {
64
64
  AkanCli2 as AkanCli,
@@ -0,0 +1,11 @@
1
+ // @bun
2
+ import {
3
+ AppExecutor2
4
+ } from "./index-z92zm3wd.js";
5
+ import"./index-zfnz878d.js";
6
+ import"./index-71y6176j.js";
7
+ import"./index-j4yvgfhr.js";
8
+ import"./index-by2tvsq6.js";
9
+ export {
10
+ AppExecutor2 as AppExecutor
11
+ };
@@ -1,4 +1,7 @@
1
1
  // @bun
2
+ import {
3
+ RouteJsBudget
4
+ } from "./index-dmcpetwe.js";
2
5
  import {
3
6
  App,
4
7
  Apps,
@@ -7,26 +10,26 @@ import {
7
10
  Exec,
8
11
  Workspace,
9
12
  command
10
- } from "./index-exn38bzx.js";
13
+ } from "./index-2yn3r67f.js";
11
14
  import {
12
15
  CliError
13
16
  } from "./index-j4yvgfhr.js";
14
- import"./index-bns3wcpc.js";
15
- import"./index-3ghdb7p5.js";
16
- import {
17
- RouteJsBudget
18
- } from "./index-vm0dn0mt.js";
19
- import"./index-43f4h4cm.js";
20
- import"./index-an76bdrv.js";
17
+ import"./index-71y6176j.js";
18
+ import"./index-by2tvsq6.js";
19
+ import"./index-z92zm3wd.js";
20
+ import"./index-zfnz878d.js";
21
+ import"./index-w1zexzpx.js";
22
+ import"./index-ebn9kgea.js";
23
+ import"./index-612fdtbk.js";
21
24
  import"./index-m9jj544v.js";
22
- import"./index-nmvhjn8c.js";
23
- import"./index-xvk2a75m.js";
24
- import"./index-j6gc8n14.js";
25
- import"./index-j9790rhk.js";
26
- import"./index-b4qq3rq0.js";
25
+ import"./index-9wh04mqy.js";
26
+ import"./index-a860mx0m.js";
27
+ import"./index-2jmvfa62.js";
28
+ import"./index-z96ks033.js";
29
+ import"./index-rwgqba9p.js";
27
30
  import {
28
31
  ApplicationScript
29
- } from "./index-28x1aszt.js";
32
+ } from "./index-41a03gkj.js";
30
33
  import {
31
34
  writeOption,
32
35
  nativeTargetOption,
@@ -34,8 +37,9 @@ import {
34
37
  allowLocalOption,
35
38
  publicEnvOption
36
39
  } from "./index-mdjc93e1.js";
37
- import"./index-gcx48get.js";
40
+ import"./index-j592zfqc.js";
38
41
  import"./index-9bv479q5.js";
42
+ import"./index-7wf8snar.js";
39
43
 
40
44
  // pkgs/@akanjs/cli/application/application.command.ts
41
45
  import { MigrationCommand } from "akanjs/server/migration/migrationCommand";
@@ -63,15 +67,14 @@ var startEnvOption = {
63
67
  default: "local"
64
68
  };
65
69
  var listOf = (value) => (value ?? "").split(",").map((entry) => entry.trim()).filter(Boolean);
66
-
67
- class ApplicationCommand extends command("application", [ApplicationScript], ({ public: target }) => ({
70
+ var workspaceTargets = ({ public: target }) => ({
68
71
  createApplication: target({ desc: "Create a new application in the workspace" }).arg("appName", String, { desc: "name of application" }).option("start", Boolean, { desc: "start application", default: false }).with(Workspace).exec(async function(appName, start, workspace) {
69
72
  await this.applicationScript.createApplication(appName.toLowerCase().replace(/ /g, "-"), workspace, { start });
70
73
  }),
71
74
  removeApplication: target({ desc: "Remove an application from the workspace", destructive: true }).with(App).exec(async function(app) {
72
75
  await this.applicationScript.removeApplication(app);
73
76
  }),
74
- planSlice: target({ desc: "List the exact files an app needs to live in a workspace of its own" }).with(App).option("format", String, { desc: "output format", default: "text", enum: ["text", "json"] }).exec(async function(app, format) {
77
+ planSlice: target({ desc: "List the exact files an app needs to live in a workspace of its own", readOnly: true }).with(App).option("format", String, { desc: "output format", default: "text", enum: ["text", "json"] }).exec(async function(app, format) {
75
78
  await this.applicationScript.planSlice(app, format);
76
79
  }),
77
80
  sync: target({ desc: "Sync dependencies and configuration for an app or library" }).with(Sys).exec(async function(sys) {
@@ -79,17 +82,23 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
79
82
  }),
80
83
  script: target({ desc: "Run a custom script in the application" }).with(App).arg("filename", String, { desc: "name of script", nullable: true }).exec(async function(app, filename) {
81
84
  await this.applicationScript.script(app, filename);
82
- }),
85
+ })
86
+ });
87
+ var migrationTargets = ({ public: target }) => ({
83
88
  migrate: target({
84
- desc: "List, plan, apply, verify or roll back the app's data migrations in script/migration",
89
+ desc: "List, plan, apply, verify or roll back the app's data migrations in script/migration, or list and prune the indexes it no longer declares",
85
90
  stdio: true,
86
91
  usageExitCode: 2,
92
+ readOnly: ({ action }) => ["list", "plan", "verify", "indexes"].includes(String(action)),
87
93
  onFailure: async (error, { usage, given }) => {
88
94
  if (given.json !== true)
89
95
  return;
90
96
  await MigrationCommand.print(MigrationCommand.failure(null, migrationFailureOf(error, usage)), true);
91
97
  }
92
- }).with(App).arg("action", String, { desc: "list, plan, apply, verify or rollback", default: "list" }).arg("target", String, { desc: "migration id; for rollback, an apply's run id too", nullable: true }).option("param", String, { desc: "a param the migration declares, as name=value", multiple: true }).option("expect", String, { desc: "the plan hash an apply must still match", nullable: true }).option("items", Number, { desc: "how many planned decisions to print", nullable: true }).option("actor", String, { desc: "who runs it, as the ledger records", nullable: true }).option("json", Boolean, { desc: "print the result as one JSON line", default: false }).exec(async function(app, action, target, param, expect, items, actor, json) {
98
+ }).with(App).arg("action", String, {
99
+ desc: "list, plan, apply, verify, rollback, indexes or prune-indexes",
100
+ default: "list"
101
+ }).arg("target", String, { desc: "migration id; for rollback, an apply's run id too", nullable: true }).option("param", String, { desc: "a param the migration declares, as name=value", multiple: true }).option("expect", String, { desc: "the plan hash an apply must still match", nullable: true }).option("items", Number, { desc: "how many planned decisions to print", nullable: true }).option("actor", String, { desc: "who runs it, as the ledger records", nullable: true }).option("json", Boolean, { desc: "print the result as one JSON line", default: false }).exec(async function(app, action, target, param, expect, items, actor, json) {
93
102
  await this.applicationScript.migrate(app, [
94
103
  action,
95
104
  ...target ? [target] : [],
@@ -102,12 +111,14 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
102
111
  }),
103
112
  createMigration: target({ desc: "Create a data migration in the app's script/migration" }).arg("migrationName", String, { desc: "what it does, in camelCase", example: "bizLicenseOwnership" }).with(App).exec(async function(migrationName, app) {
104
113
  await this.applicationScript.createMigration(app, migrationName);
105
- }),
114
+ })
115
+ });
116
+ var inspectTargets = ({ public: target }) => ({
106
117
  preview: target({
107
118
  desc: "Open pages of the app's dev server in a headless browser and print what broke, starting a server if none runs",
108
119
  stdio: true
109
120
  }).with(App).arg("paths", String, {
110
- desc: "page paths, comma-separated; the default locale is added when missing, except to a path the server answers outside a locale (/_akan, the API prefix, /__csr, /__rsc, /.well-known, /openapi.json, the default /mcp, the server's own files, public/ files) or a full URL, which opens as written (default: /)",
121
+ desc: "page paths, comma-separated; the default locale is added when missing, except to a path the server answers outside a locale (/_akan, the API prefix, /__csr, /__rsc, /.well-known, /openapi.json, /mcp, the server's own files, public/ files), which opens as written; a full URL opens its path on the dev server (default: /)",
111
122
  example: "/board,/board/new",
112
123
  nullable: true
113
124
  }).option("changed", Boolean, {
@@ -135,7 +146,8 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
135
146
  });
136
147
  }),
137
148
  studio: target({
138
- desc: "Print the Akan Studio URL of the app's running dev server: its ERD, each module's signals, the Change Map, the live DI graph and jobs, and the framework map"
149
+ desc: "Print the Akan Studio URL of the app's running dev server: its ERD, each module's signals, the Change Map, the live DI graph and jobs, and the framework map",
150
+ readOnly: true
139
151
  }).with(App).option("module", String, { desc: "the module to show", nullable: true }).option("view", String, {
140
152
  flag: "w",
141
153
  desc: "the view to open",
@@ -161,7 +173,10 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
161
173
  console: target({ desc: "Open an interactive server console for the application" }).with(App).exec(async function(app) {
162
174
  await this.applicationScript.console(app);
163
175
  }),
164
- logs: target({ desc: "Tail the running application's logs, filtered (attaches to akan-control.sock)" }).with(App).option("level", String, { desc: "minimum level: trace, verbose, debug, info, warn, error", nullable: true }).option("grep", String, { desc: "substring the message must contain", nullable: true }).option("endpoint", String, {
176
+ logs: target({
177
+ desc: "Tail the running application's logs, filtered (attaches to akan-control.sock)",
178
+ readOnly: true
179
+ }).with(App).option("level", String, { desc: "minimum level: trace, verbose, debug, info, warn, error", nullable: true }).option("grep", String, { desc: "substring the message must contain", nullable: true }).option("endpoint", String, {
165
180
  desc: "endpoint glob(s), comma-separated: mutation:*, query:userList",
166
181
  nullable: true
167
182
  }).option("trace", String, { desc: "one request's traceId", nullable: true }).option("child", String, { desc: "replica index(es), comma-separated", nullable: true }).option("role", String, {
@@ -190,7 +205,9 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
190
205
  follow,
191
206
  runtimeDir
192
207
  });
193
- }),
208
+ })
209
+ });
210
+ var buildAndTestTargets = ({ public: target }) => ({
194
211
  build: target({ short: true, desc: "Build the application for production (frontend + backend)" }).with(App).option("write", Boolean, writeOption).option("fast", Boolean, { desc: "fast build", default: false }).option("quiet", Boolean, { desc: "hide build progress output", default: false }).option("profile", String, {
195
212
  desc: "server env profile: bundle env/env.server.<env>.<profile>.ts in place of the environment's own file",
196
213
  nullable: true
@@ -208,16 +225,25 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
208
225
  budget: RouteJsBudget.modeOf({ checkBudget, updateBudget, raiseBudget })
209
226
  });
210
227
  }),
211
- typecheck: target({ short: true, desc: "Typecheck an app or a library, its tests and specs included" }).with(SysOrOnlyApp).option("write", Boolean, writeOption).option("clean", Boolean, { desc: "clear typecheck cache before running", default: false }).option("incremental", Boolean, { desc: "reuse TypeScript incremental cache", default: true }).option("tests", Boolean, { desc: "check its *.test.ts / *.spec.ts too, which nothing imports", default: true }).exec(async function(sys, write, clean, incremental, tests) {
228
+ typecheck: target({
229
+ short: true,
230
+ desc: "Typecheck an app or a library, its tests and specs included",
231
+ readOnly: ({ write }) => write === false
232
+ }).with(SysOrOnlyApp).option("write", Boolean, writeOption).option("clean", Boolean, { desc: "clear typecheck cache before running", default: false }).option("incremental", Boolean, { desc: "reuse TypeScript incremental cache", default: true }).option("tests", Boolean, { desc: "check its *.test.ts / *.spec.ts too, which nothing imports", default: true }).exec(async function(sys, write, clean, incremental, tests) {
212
233
  await this.applicationScript.typecheck(sys, { write, clean, incremental, tests });
213
234
  }),
214
- test: target({ desc: "Prepare and test an app, library, or package" }).with(Exec).arg("files", String, {
235
+ test: target({ desc: "Prepare and test an app, library, or package", readOnly: ({ write }) => write === false }).with(Exec).arg("files", String, {
215
236
  desc: "test files or folders to run, relative to the target or the workspace root, comma-separated (default: all)",
216
237
  example: "lib/user/user.signal.test.ts",
217
238
  nullable: true
218
- }).option("write", Boolean, writeOption).option("coverage", Boolean, { desc: "measure coverage; lcov goes under local/coverage/<target>", default: false }).exec(async function(exec, files, write, coverage) {
219
- await this.applicationScript.test(exec, { write, files: listOf(files), coverage });
220
- }),
239
+ }).option("write", Boolean, writeOption).option("coverage", Boolean, { desc: "measure coverage; lcov goes under local/coverage/<target>", default: false }).option("parallel", Number, {
240
+ desc: "bun processes to spread the test files over, balanced by the timings under local/test-timings/<target>",
241
+ default: 1
242
+ }).option("junit", String, { desc: "also write a JUnit XML report to this path", nullable: true }).exec(async function(exec, files, write, coverage, parallel, junit) {
243
+ await this.applicationScript.test(exec, { write, files: listOf(files), coverage, parallel, junit });
244
+ })
245
+ });
246
+ var nativeBuildTargets = ({ public: target }) => ({
221
247
  buildIos: target({ short: true, desc: "Build the iOS app on the native runtime" }).with(App).option("target", String, nativeTargetOption).option("env", String, buildEnvOption).option("debug", Boolean, { desc: "debug build instead of release", default: false }).option("write", Boolean, writeOption).exec(async function(app, target, env, debug, write) {
222
248
  await this.applicationScript.buildIos(app, { target, env, profile: debug ? "debug" : "release", write });
223
249
  }),
@@ -242,7 +268,9 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
242
268
  ...notarize ? { notarize } : {},
243
269
  ...arch ? { arch } : {}
244
270
  });
245
- }),
271
+ })
272
+ });
273
+ var startTargets = ({ public: target }) => ({
246
274
  start: target({ short: true, desc: "Start development server(s) (frontend SSR + backend)" }).with(Apps).option("plain", Boolean, { desc: "print prefixed lines instead of the full-screen view", default: false }).option("kill", Boolean, { flag: "k", desc: "free the dev ports first, whoever is holding them", default: false }).option("concurrency", Number, {
247
275
  desc: "apps to boot at a time (default: what this machine's memory and cores allow)",
248
276
  nullable: true
@@ -281,7 +309,9 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
281
309
  operation: release ? "release" : "local",
282
310
  write
283
311
  });
284
- }),
312
+ })
313
+ });
314
+ var releaseTargets = ({ public: target }) => ({
285
315
  releaseIos: target({ desc: "Build and sign the iOS app for the App Store (.ipa)" }).with(App).option("target", String, nativeTargetOption).option("env", String, releaseEnvOption).option("team", String, teamOption).option("adHoc", Boolean, { desc: "sign with an ad-hoc profile instead of app-store", default: false }).option("write", Boolean, writeOption).option("allowLocalRelease", Boolean, allowLocalOption("release")).option("publicEnv", String, publicEnvOption("the release")).exec(async function(app, target, env, team, adHoc, write, allowLocalRelease, publicEnv) {
286
316
  await this.applicationScript.releaseIos(app, {
287
317
  target,
@@ -301,7 +331,9 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
301
331
  allowLocalRelease,
302
332
  publicEnv: publicEnv ?? undefined
303
333
  });
304
- }),
334
+ })
335
+ });
336
+ var updateTargets = ({ public: target }) => ({
305
337
  packUpdate: target({ desc: packUpdateDesc, usageExitCode: 1 }).with(App).option("platform", String, { enum: ["ios", "android"], desc: "the app it updates" }).option("target", String, nativeTargetOption).option("env", String, releaseEnvOption).option("out", String, {
306
338
  desc: "output folder (default: dist/native/<app>/<target>/updates/<platform>)",
307
339
  nullable: true
@@ -365,8 +397,10 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
365
397
  write,
366
398
  allowLocalRelease
367
399
  });
368
- }),
369
- dbup: target({ desc: "Start local database services for a database mode" }).with(Workspace).option("mode", String, {
400
+ })
401
+ });
402
+ var databaseTargets = ({ public: target }) => ({
403
+ dbup: target({ desc: "Start local database services for a database mode", readOnly: true }).with(Workspace).option("mode", String, {
370
404
  desc: "database mode; left out, every mode the workspace's apps declare",
371
405
  enum: ["single", "multiple", "cluster"],
372
406
  nullable: true
@@ -379,9 +413,21 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
379
413
  dbImport: target({ desc: "Read files db-export wrote into an app's database, in the mode the shell names" }).with(App).option("dir", String, { desc: "directory under the workspace to read", default: "local/transfer" }).exec(async function(app, dir) {
380
414
  await this.applicationScript.transferDatabase(app, "import", dir);
381
415
  }),
382
- dbdown: target({ desc: "Stop local database services" }).with(Workspace).exec(async function(workspace) {
416
+ dbdown: target({ desc: "Stop local database services", readOnly: true }).with(Workspace).exec(async function(workspace) {
383
417
  await this.applicationScript.dbdown(workspace);
384
418
  })
419
+ });
420
+
421
+ class ApplicationCommand extends command("application", [ApplicationScript], (context) => ({
422
+ ...workspaceTargets(context),
423
+ ...migrationTargets(context),
424
+ ...inspectTargets(context),
425
+ ...buildAndTestTargets(context),
426
+ ...nativeBuildTargets(context),
427
+ ...startTargets(context),
428
+ ...releaseTargets(context),
429
+ ...updateTargets(context),
430
+ ...databaseTargets(context)
385
431
  })) {
386
432
  }
387
433
  export {
@@ -1,33 +1,36 @@
1
1
  // @bun
2
2
  import {
3
- ServerEnvProfile,
4
- Spinner,
5
3
  ProjectTypecheck2,
4
+ Spinner,
6
5
  parseEnvFile,
7
- WorkspaceExecutor
8
- } from "./index-3ghdb7p5.js";
9
- import"./index-bns3wcpc.js";
6
+ WorkspaceExecutor,
7
+ ServerEnvProfile
8
+ } from "./index-71y6176j.js";
9
+ import"./index-by2tvsq6.js";
10
10
  import"./index-j4yvgfhr.js";
11
+ import"./index-z92zm3wd.js";
12
+ import"./index-zfnz878d.js";
13
+ import"./index-w1zexzpx.js";
11
14
  import {
12
15
  NARROWABLE_VENDOR_SPECIFIERS
13
- } from "./index-w8yasvpc.js";
16
+ } from "./index-jek2re5k.js";
14
17
  import {
15
18
  FontPruner,
19
+ precompressArtifacts,
16
20
  RouteJsBudget
17
- } from "./index-vm0dn0mt.js";
18
- import"./index-nmvhjn8c.js";
21
+ } from "./index-dmcpetwe.js";
22
+ import"./index-9wh04mqy.js";
19
23
  import {
20
24
  AllRoutesBuilder,
21
- precompressArtifacts,
22
25
  SsrBaseArtifactBuilder,
23
26
  VendorImportScanner
24
- } from "./index-x40bdsca.js";
27
+ } from "./index-dadwp2aw.js";
25
28
  import {
26
29
  CsrArtifactBuilder
27
- } from "./index-xvk2a75m.js";
30
+ } from "./index-a860mx0m.js";
28
31
  import"./index-62md4dwy.js";
29
32
 
30
- // pkgs/@akanjs/devkit/applicationBuildRunner.ts
33
+ // pkgs/@akanjs/devkit/app/applicationBuildRunner.ts
31
34
  import path3 from "path";
32
35
  import { toError } from "akanjs/common";
33
36
  import { BUILD_ENV_FILE } from "akanjs/server/lifecycle/buildEnv";
@@ -124,7 +127,7 @@ var createServerEnvPlugin = ({
124
127
  };
125
128
  };
126
129
 
127
- // pkgs/@akanjs/devkit/applicationBuildRunner.ts
130
+ // pkgs/@akanjs/devkit/app/applicationBuildRunner.ts
128
131
  var BUILD_PHASE_EMOJIS = {
129
132
  prepare: "\uD83E\uDDF9",
130
133
  typecheck: "\uD83D\uDD0E",
@@ -153,6 +156,7 @@ var AKAN_OPTIONAL_BACKEND_EXTERNALS = ["bullmq", "ioredis", "postgres", "protobu
153
156
  class ApplicationBuildRunner {
154
157
  #app;
155
158
  #fast;
159
+ #verify;
156
160
  #reporter;
157
161
  #environment;
158
162
  #profile;
@@ -161,9 +165,17 @@ class ApplicationBuildRunner {
161
165
  #spinner;
162
166
  #startedAt = Date.now();
163
167
  #phases = [];
164
- constructor(app, { fast = false, reporter, environment, profile, budget = "report" } = {}) {
168
+ constructor(app, {
169
+ fast = false,
170
+ verify = false,
171
+ reporter,
172
+ environment,
173
+ profile,
174
+ budget = "report"
175
+ } = {}) {
165
176
  this.#app = app;
166
- this.#fast = fast;
177
+ this.#fast = fast || verify;
178
+ this.#verify = verify;
167
179
  this.#reporter = reporter;
168
180
  this.#environment = environment;
169
181
  this.#profile = profile;
@@ -201,11 +213,22 @@ class ApplicationBuildRunner {
201
213
  await this.#runPhase("typecheck", "Typechecking", () => this.typecheck());
202
214
  await this.#runPhase("backend", "Compiling backend", () => this.#buildBackend(), (result) => `${result.entrypoints} entrypoints, ${result.outputs} outputs`);
203
215
  await this.#runPhase("ssr", "Building SSR route artifacts", async () => web.ssr ? await this.#buildSsr() : null, (result) => result ? `${result.allRoutes.manifest.routeIds.length} routes, ${result.allRoutes.manifest.knownEntries.length} entries` : web.ssr ? "skipped" : "disabled by akan.config.ts web.ssr");
216
+ if (this.#verify) {
217
+ const routeJs = await this.#runBudgetPhase(environment);
218
+ await this.#app.dist.writeJson("akan.build.json", { profile: "verify", builtAt: new Date().toISOString() });
219
+ return this.#resultOf(environment, routeJs);
220
+ }
204
221
  await this.#runPhase("csr", "Building CSR assets", async () => web.csr ? await new CsrArtifactBuilder(this.#app, "build").build() : null, (result) => result?.outputDir ?? (web.csr ? "skipped" : "disabled by akan.config.ts web.csr"));
205
222
  await this.#runPhase("assets", "Trimming unread static assets", async () => assets.pruneFonts ? await new FontPruner(this.#app, assets).prune() : null, (result) => result ? `${result.removed.length} font file(s) dropped, ${ApplicationBuildRunner.formatBytes(result.freedBytes)} freed; ${result.kept.length} kept` : "disabled by akan.config.ts assets.pruneFonts");
206
223
  await this.#runPhase("compress", "Compressing static assets", () => precompressArtifacts(this.#app), (result) => result.files > 0 ? `${result.files} files, ${ApplicationBuildRunner.formatBytes(result.inputBytes)} -> gzip ${ApplicationBuildRunner.formatBytes(result.outputBytes)} / br ${ApplicationBuildRunner.formatBytes(result.brotliBytes)}` : "no files");
207
- const routeJs = await this.#runPhase("budget", "Measuring route JS", () => this.#measureRouteJs(environment), (result) => result?.summary ?? (this.#budget === "off" ? "off for this build" : "no server pages"));
224
+ const routeJs = await this.#runBudgetPhase(environment);
208
225
  await this.#runPhase("metadata", "Writing production metadata", () => this.buildAppMeta());
226
+ return this.#resultOf(environment, routeJs);
227
+ }
228
+ #runBudgetPhase(environment) {
229
+ return this.#runPhase("budget", "Measuring route JS", () => this.#measureRouteJs(environment), (result) => result?.summary ?? (this.#budget === "off" ? "off for this build" : "no server pages"));
230
+ }
231
+ #resultOf(environment, routeJs) {
209
232
  return {
210
233
  phases: this.#phases,
211
234
  ...routeJs ? { routeJs: routeJs.sizes } : {},
@@ -310,6 +333,10 @@ class ApplicationBuildRunner {
310
333
  });
311
334
  return this.#serverEnv;
312
335
  }
336
+ #verifyBanner() {
337
+ const message = `dist/apps/${this.#app.name} holds the partial output of akan verify, not a build. Run \`akan build ${this.#app.name}\` first.`;
338
+ return `console.error(${JSON.stringify(message)});process.exit(1);`;
339
+ }
313
340
  async#buildBackend() {
314
341
  const { externalLibs, web, baseDevEnv, branches } = await this.#app.getConfig();
315
342
  const backendEntryPoints = [`${this.#app.cwdPath}/main.ts`, `${this.#app.cwdPath}/server.ts`];
@@ -330,7 +357,11 @@ class ApplicationBuildRunner {
330
357
  plugins: [this.#createExternalSpecifiersPlugin(externalLibs), serverEnvPlugin]
331
358
  };
332
359
  const [mainResult, serverResult] = [
333
- await this.#buildOrThrow("backend", { ...backendConfig, entrypoints: [backendEntryPoints[0]] }),
360
+ await this.#buildOrThrow("backend", {
361
+ ...backendConfig,
362
+ entrypoints: [backendEntryPoints[0]],
363
+ ...this.#verify ? { banner: this.#verifyBanner() } : {}
364
+ }),
334
365
  await this.#buildOrThrow("backend", { ...backendConfig, entrypoints: [backendEntryPoints[1]], splitting: true })
335
366
  ];
336
367
  const rscWorkerResult = web.ssr ? await this.#buildOrThrow("rsc-worker", {
@@ -405,7 +436,7 @@ void run().catch((error) => {
405
436
  async#measureRouteJs(environment) {
406
437
  if (this.#budget === "off" || !this.#modulesByRoute)
407
438
  return null;
408
- const sizes = await RouteJsBudget.measure(path3.join(this.#app.dist.cwdPath, ".akan/artifact"), this.#modulesByRoute);
439
+ const sizes = await RouteJsBudget.measure(path3.join(this.#app.dist.cwdPath, ".akan/artifact"), this.#modulesByRoute, { precompressed: !this.#verify });
409
440
  const budgetPath = path3.join(this.#app.cwdPath, RouteJsBudget.fileName);
410
441
  const { summary: status, warnings } = await RouteJsBudget.check(sizes, {
411
442
  mode: this.#budget,
@@ -2,32 +2,37 @@
2
2
  import {
3
3
  FontOptimizer,
4
4
  ApplicationBuildReporter
5
- } from "./index-vm0dn0mt.js";
5
+ } from "./index-dmcpetwe.js";
6
6
  import {
7
7
  resolveSsrPageEntriesForApp,
8
- WorkspaceExecutor,
9
- AppExecutor
10
- } from "./index-3ghdb7p5.js";
8
+ AppExecutor2
9
+ } from "./index-z92zm3wd.js";
11
10
  import {
12
11
  computeRouteSeedIndex,
13
12
  saveRouteSeedIndex,
14
13
  CsrDevBundler,
15
14
  SsrDevBundler
16
- } from "./index-w8yasvpc.js";
17
- import"./index-bns3wcpc.js";
15
+ } from "./index-jek2re5k.js";
16
+ import {
17
+ WorkspaceExecutor
18
+ } from "./index-71y6176j.js";
19
+ import"./index-by2tvsq6.js";
18
20
  import"./index-j4yvgfhr.js";
21
+ import"./index-zfnz878d.js";
22
+ import"./index-w1zexzpx.js";
19
23
  import {
20
24
  ServerGraphFile,
21
25
  PagesBundleBuilder
22
- } from "./index-nmvhjn8c.js";
26
+ } from "./index-9wh04mqy.js";
23
27
  import {
24
28
  CssCompiler,
25
29
  SsrBaseArtifactBuilder
26
- } from "./index-x40bdsca.js";
30
+ } from "./index-dadwp2aw.js";
27
31
  import {
28
32
  CsrArtifactBuilder
29
- } from "./index-xvk2a75m.js";
33
+ } from "./index-a860mx0m.js";
30
34
  import"./index-62md4dwy.js";
35
+ import"./index-7wf8snar.js";
31
36
 
32
37
  // pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
33
38
  import path from "path";
@@ -273,6 +278,15 @@ ${cssText}`).toString(36);
273
278
  return previous.files.some((fontFile) => path.resolve(fontFile) === normalized);
274
279
  });
275
280
  }
281
+ static #report(result) {
282
+ if (!process.send)
283
+ return Promise.resolve();
284
+ return new Promise((resolve) => {
285
+ process.once("disconnect", () => resolve());
286
+ process.send?.({ type: "build-batch-result", data: result });
287
+ setTimeout(() => process.disconnect?.(), 5000).unref();
288
+ });
289
+ }
276
290
  static async main() {
277
291
  const raw = process.argv[2];
278
292
  if (!raw)
@@ -286,14 +300,14 @@ ${cssText}`).toString(36);
286
300
  workspaceRoot: request.workspaceRoot,
287
301
  repoName: request.repoName
288
302
  });
289
- const app = AppExecutor.from(workspace, request.appName);
303
+ const app = AppExecutor2.from(workspace, request.appName);
290
304
  if (request.pageKeys)
291
305
  app.setPageKeys(request.pageKeys);
292
306
  const orphaned = () => process.exit(1);
293
307
  process.on("disconnect", orphaned);
294
308
  const result = await new BuildBatch(request, app).run();
295
- process.send?.({ type: "build-batch-result", data: result });
296
309
  process.off("disconnect", orphaned);
310
+ await BuildBatch.#report(result);
297
311
  }
298
312
  }
299
313
  await BuildBatch.main().catch((err) => {