@akanjs/cli 3.2.0-rc.31 → 3.2.0-rc.32

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 (94) hide show
  1. package/.build-stamp +2 -2
  2. package/{CodeAgent-c17abdbf.js → CodeAgent-7m6cmdf8.js} +2 -2
  3. package/{CodeTui-jed1nj82.js → CodeTui-c6de37ea.js} +1 -1
  4. package/README.ko.md +7 -0
  5. package/README.md +7 -0
  6. package/TunnelShare-9ry4vh0y.js +18 -0
  7. package/{agent.command-9whnc6vb.js → agent.command-3qstwjef.js} +26 -21
  8. package/akanCode.js +2 -2
  9. package/{appExecutor-020cyesq.js → appExecutor-79azsb2w.js} +3 -3
  10. package/{application.command-4eqvyxkw.js → application.command-8y4kxzvc.js} +36 -24
  11. package/{applicationBuildRunner-frtcrqfd.js → applicationBuildRunner-trfxv3pd.js} +43 -15
  12. package/buildBatch.proc.js +10 -10
  13. package/{cloud.command-hbvmeezn.js → cloud.command-zczv575c.js} +28 -28
  14. package/cloud.script-t268m15f.js +35 -0
  15. package/{code.command-0ayrenk4.js → code.command-069wchwn.js} +10 -10
  16. package/context.command-v3e98f2h.js +64 -0
  17. package/context.runner-3jr6chgz.js +34 -0
  18. package/{guideline.command-w1grfwh7.js → guideline.command-zwypaqsh.js} +7 -7
  19. package/guidelines/errorCodes/errorCodes.instruction.md +1 -0
  20. package/guidelines/mcpRule/mcpRule.instruction.md +87 -27
  21. package/guidelines/queryRule/queryRule.instruction.md +3 -1
  22. package/guidelines/runtimeRule/runtimeRule.instruction.md +7 -3
  23. package/guidelines/transportRule/transportRule.instruction.md +28 -0
  24. package/incrementalBuilder.proc.js +12 -9
  25. package/{index-5d57kx0s.js → index-275a4r3n.js} +3 -3
  26. package/{index-6zb17wcm.js → index-2jmvfa62.js} +3 -3
  27. package/{index-9rv2zt48.js → index-2yn3r67f.js} +78 -25
  28. package/{index-6pxmcaq8.js → index-3txdtztz.js} +1 -1
  29. package/{index-nm7nt9vm.js → index-4ss4gkv3.js} +2 -2
  30. package/{index-9wab2ngg.js → index-612fdtbk.js} +1 -1
  31. package/{index-7bs463x7.js → index-6dzjer7p.js} +6 -6
  32. package/{index-qssq2d41.js → index-71y6176j.js} +11 -6
  33. package/{index-4st0hq72.js → index-73x6z7ym.js} +24 -17
  34. package/{index-vjbne22r.js → index-7wf8snar.js} +1 -1
  35. package/{index-yvzm8mby.js → index-9wh04mqy.js} +1 -1
  36. package/{index-yxkjsyx8.js → index-a860mx0m.js} +2 -2
  37. package/{index-42jhx2ya.js → index-b2sdtgc7.js} +3 -3
  38. package/{index-1pjwsh2g.js → index-baccvws5.js} +1 -1
  39. package/{index-99kjwyma.js → index-c669pbyb.js} +4 -3
  40. package/{index-prgvqqxe.js → index-cd839jw2.js} +126 -113
  41. package/{index-6469101k.js → index-dadwp2aw.js} +33 -98
  42. package/{index-7v7tvgt7.js → index-dmcpetwe.js} +123 -43
  43. package/{index-ba2xd32s.js → index-e9w8wq0a.js} +27 -22
  44. package/{index-fp5xf6ef.js → index-ebn9kgea.js} +3 -3
  45. package/{index-s3m89wt2.js → index-exzkev4k.js} +7 -7
  46. package/{index-m5gg0wzv.js → index-gec8q5z9.js} +57 -30
  47. package/{index-m3t28rt3.js → index-gt8phqpt.js} +4 -4
  48. package/{index-g7jgd4xs.js → index-j592zfqc.js} +1 -1
  49. package/{index-cb91b6d8.js → index-jek2re5k.js} +3 -3
  50. package/{index-ffa52fwf.js → index-jf4vk1s0.js} +8 -1
  51. package/{index-v929w7j7.js → index-kykky4re.js} +59 -15
  52. package/{index-9wjrwjgz.js → index-nk374pqd.js} +8 -8
  53. package/{index-28nk8w3j.js → index-pk2ja04e.js} +8 -8
  54. package/{index-jgj31xvw.js → index-qcp6e2ht.js} +22 -5
  55. package/{index-at6haq2x.js → index-qyhr8wst.js} +61 -18
  56. package/{index-f16kr6vj.js → index-s885g0jj.js} +2 -2
  57. package/{index-bj8s07s7.js → index-t2zhw8c7.js} +4 -4
  58. package/{index-11d7nh8a.js → index-v7ajmsh3.js} +1 -1
  59. package/{index-dss3ds74.js → index-w1zexzpx.js} +1 -1
  60. package/{index-g45y5f3e.js → index-wzp3yg01.js} +1 -1
  61. package/{index-ze48c0vd.js → index-z92zm3wd.js} +2 -2
  62. package/{index-na8r4a27.js → index-zfnz878d.js} +1 -1
  63. package/{index-0gaj78wn.js → index-zmd9xxgd.js} +3 -3
  64. package/{index-p06kfhdf.js → index-zzebpyr0.js} +4 -4
  65. package/index.js +27 -27
  66. package/{libExecutor-tq994592.js → libExecutor-jc6f8hm6.js} +2 -2
  67. package/{library.command-x219mhcx.js → library.command-nxvesvhb.js} +11 -8
  68. package/{localRegistry.command-zvdcejhn.js → localRegistry.command-4a655xnq.js} +20 -20
  69. package/{module.command-k6cwcm7g.js → module.command-aaws9byg.js} +9 -9
  70. package/{package.command-vw7x09f8.js → package.command-j7hv26p0.js} +10 -10
  71. package/package.json +8 -8
  72. package/{page.command-gf06paq2.js → page.command-7yffs7n9.js} +7 -7
  73. package/{pipeline.command-y07dgj9b.js → pipeline.command-7yk0zcng.js} +8 -7
  74. package/{pkgExecutor-stde3yc3.js → pkgExecutor-arxmvx4t.js} +2 -2
  75. package/{primitive.command-edydvh07.js → primitive.command-7a1pt715.js} +10 -10
  76. package/{projectTypecheck-mk8wefvd.js → projectTypecheck-f4qhbecd.js} +1 -1
  77. package/{quality.command-mdb45vyr.js → quality.command-08bn42t4.js} +13 -10
  78. package/{repair.command-kvtaeecy.js → repair.command-r59jat74.js} +9 -9
  79. package/{scalar.command-sjt9p5e1.js → scalar.command-2ex84spb.js} +8 -8
  80. package/skills/akan-mcp/SKILL.md +6 -2
  81. package/skills/akan-validate/SKILL.md +3 -3
  82. package/{subspace.command-mkkqync4.js → subspace.command-2nxakmk3.js} +16 -13
  83. package/templates/workspaceRoot/.devcontainer/devcontainer.json.template +1 -1
  84. package/templates/workspaceRoot/README.ts +4 -2
  85. package/{tunnel.command-tr5b3030.js → tunnel.command-f7ep1qfa.js} +12 -12
  86. package/{typeChecker-bfrd1n9n.js → typeChecker-7jt6abrs.js} +1 -1
  87. package/typecheck.proc.js +3 -2
  88. package/{verify.command-0p9h8tpp.js → verify.command-xbztwp1r.js} +17 -17
  89. package/{workflow.command-9mfcwqzj.js → workflow.command-pmyx55y4.js} +18 -15
  90. package/{workspace.command-5hjtmcfs.js → workspace.command-89p90zvb.js} +36 -36
  91. package/TunnelShare-mbfcaqg0.js +0 -18
  92. package/cloud.script-9kmbr3d6.js +0 -35
  93. package/context.command-php852kf.js +0 -61
  94. package/context.runner-nngmn7c0.js +0 -34
package/.build-stamp CHANGED
@@ -1,2 +1,2 @@
1
- 7e96f6e93d6860f1c8b06526922e78b36e623dd40f403807b3ed13251b2e9965
2
- ba19f3f2-8ac0-4f9c-93cf-eed60de5e15e
1
+ e31ece321187b7a1612b7fc77f1b56482170abdc5dd027a61ded8f24a9ef564e
2
+ eb4bbbdc-fe1b-4478-8d3b-3e347d01de5e
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  CodeAgent2
4
- } from "./index-jgj31xvw.js";
5
- import"./index-g45y5f3e.js";
4
+ } from "./index-qcp6e2ht.js";
5
+ import"./index-wzp3yg01.js";
6
6
  import"./index-rwgqba9p.js";
7
7
  import"./index-p5zh7pmc.js";
8
8
  import"./index-by2tvsq6.js";
@@ -4,7 +4,7 @@ import {
4
4
  McpTokenStore,
5
5
  McpSignIn,
6
6
  AkanCodeCompaction2
7
- } from "./index-g45y5f3e.js";
7
+ } from "./index-wzp3yg01.js";
8
8
  import"./index-by2tvsq6.js";
9
9
  import"./index-p5zh7pmc.js";
10
10
  import {
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
+ };
@@ -2,42 +2,47 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-9rv2zt48.js";
5
+ } from "./index-2yn3r67f.js";
6
6
  import"./index-j4yvgfhr.js";
7
- import"./index-qssq2d41.js";
7
+ import"./index-71y6176j.js";
8
8
  import"./index-by2tvsq6.js";
9
- import"./index-ze48c0vd.js";
10
- import"./index-na8r4a27.js";
11
- import"./index-dss3ds74.js";
12
- import"./index-0gaj78wn.js";
9
+ import"./index-z92zm3wd.js";
10
+ import"./index-zfnz878d.js";
11
+ import"./index-w1zexzpx.js";
12
+ import"./index-zmd9xxgd.js";
13
13
  import"./index-trffs83s.js";
14
- import"./index-bj8s07s7.js";
14
+ import"./index-t2zhw8c7.js";
15
15
  import"./index-1p81ecbz.js";
16
16
  import"./index-p5zh7pmc.js";
17
17
  import"./index-knpm8sdm.js";
18
- import"./index-at6haq2x.js";
19
- import"./index-7v7tvgt7.js";
20
- import"./index-fp5xf6ef.js";
21
- import"./index-9wab2ngg.js";
18
+ import"./index-qyhr8wst.js";
19
+ import"./index-dmcpetwe.js";
20
+ import"./index-ebn9kgea.js";
21
+ import"./index-612fdtbk.js";
22
22
  import"./index-m9jj544v.js";
23
- import"./index-yvzm8mby.js";
24
- import"./index-yxkjsyx8.js";
25
- import"./index-prgvqqxe.js";
26
- import"./index-1pjwsh2g.js";
23
+ import"./index-9wh04mqy.js";
24
+ import"./index-a860mx0m.js";
25
+ import"./index-cd839jw2.js";
26
+ import"./index-baccvws5.js";
27
27
  import"./index-62md4dwy.js";
28
28
  import"./index-zyb0ebm4.js";
29
- import"./index-ffa52fwf.js";
29
+ import"./index-jf4vk1s0.js";
30
30
  import"./index-t4d0ckde.js";
31
- import"./index-m5gg0wzv.js";
31
+ import"./index-gec8q5z9.js";
32
32
  import {
33
33
  AgentScript
34
- } from "./index-4st0hq72.js";
35
- import"./index-g7jgd4xs.js";
36
- import"./index-vjbne22r.js";
34
+ } from "./index-73x6z7ym.js";
35
+ import"./index-j592zfqc.js";
36
+ import"./index-7wf8snar.js";
37
37
 
38
38
  // pkgs/@akanjs/cli/agent/agent.command.ts
39
39
  class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
40
- agent: target({ desc: "Install Akan agent rules for editors and coding agents", stdio: true, usageExitCode: 1 }).arg("action", String, { desc: "install, or hook (run by Claude Code hooks)" }).arg("target", String, {
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, {
41
46
  desc: "install: cursor, agents-md, claude, rules, skills, hooks, or all; hook: pre-edit, post-edit, stop",
42
47
  nullable: true
43
48
  }).option("force", Boolean, {
package/akanCode.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  CodeMailbox2,
35
35
  CodeSessionFork2,
36
36
  CodeAgent2
37
- } from "./index-jgj31xvw.js";
37
+ } from "./index-qcp6e2ht.js";
38
38
  import {
39
39
  akanCodeDefaultModel2,
40
40
  akanCodeModel2,
@@ -45,7 +45,7 @@ import {
45
45
  import {
46
46
  SubagentPool2,
47
47
  AkanCodeCompaction2
48
- } from "./index-g45y5f3e.js";
48
+ } from "./index-wzp3yg01.js";
49
49
  import {
50
50
  CodeAgentRpcHost2
51
51
  } from "./index-s4nvxpzm.js";
@@ -1,9 +1,9 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor2
4
- } from "./index-ze48c0vd.js";
5
- import"./index-na8r4a27.js";
6
- import"./index-qssq2d41.js";
4
+ } from "./index-z92zm3wd.js";
5
+ import"./index-zfnz878d.js";
6
+ import"./index-71y6176j.js";
7
7
  import"./index-j4yvgfhr.js";
8
8
  import"./index-by2tvsq6.js";
9
9
  export {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  RouteJsBudget
4
- } from "./index-7v7tvgt7.js";
4
+ } from "./index-dmcpetwe.js";
5
5
  import {
6
6
  App,
7
7
  Apps,
@@ -10,26 +10,26 @@ import {
10
10
  Exec,
11
11
  Workspace,
12
12
  command
13
- } from "./index-9rv2zt48.js";
13
+ } from "./index-2yn3r67f.js";
14
14
  import {
15
15
  CliError
16
16
  } from "./index-j4yvgfhr.js";
17
- import"./index-qssq2d41.js";
17
+ import"./index-71y6176j.js";
18
18
  import"./index-by2tvsq6.js";
19
- import"./index-ze48c0vd.js";
20
- import"./index-na8r4a27.js";
21
- import"./index-dss3ds74.js";
22
- import"./index-fp5xf6ef.js";
23
- import"./index-9wab2ngg.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";
24
24
  import"./index-m9jj544v.js";
25
- import"./index-yvzm8mby.js";
26
- import"./index-yxkjsyx8.js";
27
- import"./index-6zb17wcm.js";
28
- import"./index-at6haq2x.js";
25
+ import"./index-9wh04mqy.js";
26
+ import"./index-a860mx0m.js";
27
+ import"./index-2jmvfa62.js";
28
+ import"./index-qyhr8wst.js";
29
29
  import"./index-rwgqba9p.js";
30
30
  import {
31
31
  ApplicationScript
32
- } from "./index-v929w7j7.js";
32
+ } from "./index-kykky4re.js";
33
33
  import {
34
34
  writeOption,
35
35
  nativeTargetOption,
@@ -37,9 +37,9 @@ import {
37
37
  allowLocalOption,
38
38
  publicEnvOption
39
39
  } from "./index-mdjc93e1.js";
40
- import"./index-g7jgd4xs.js";
40
+ import"./index-j592zfqc.js";
41
41
  import"./index-9bv479q5.js";
42
- import"./index-vjbne22r.js";
42
+ import"./index-7wf8snar.js";
43
43
 
44
44
  // pkgs/@akanjs/cli/application/application.command.ts
45
45
  import { MigrationCommand } from "akanjs/server/migration/migrationCommand";
@@ -74,7 +74,7 @@ var workspaceTargets = ({ public: target }) => ({
74
74
  removeApplication: target({ desc: "Remove an application from the workspace", destructive: true }).with(App).exec(async function(app) {
75
75
  await this.applicationScript.removeApplication(app);
76
76
  }),
77
- 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) {
78
78
  await this.applicationScript.planSlice(app, format);
79
79
  }),
80
80
  sync: target({ desc: "Sync dependencies and configuration for an app or library" }).with(Sys).exec(async function(sys) {
@@ -89,6 +89,7 @@ var migrationTargets = ({ public: target }) => ({
89
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",
90
90
  stdio: true,
91
91
  usageExitCode: 2,
92
+ readOnly: ({ action }) => ["list", "plan", "verify", "indexes"].includes(String(action)),
92
93
  onFailure: async (error, { usage, given }) => {
93
94
  if (given.json !== true)
94
95
  return;
@@ -145,7 +146,8 @@ var inspectTargets = ({ public: target }) => ({
145
146
  });
146
147
  }),
147
148
  studio: target({
148
- 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
149
151
  }).with(App).option("module", String, { desc: "the module to show", nullable: true }).option("view", String, {
150
152
  flag: "w",
151
153
  desc: "the view to open",
@@ -171,7 +173,10 @@ var inspectTargets = ({ public: target }) => ({
171
173
  console: target({ desc: "Open an interactive server console for the application" }).with(App).exec(async function(app) {
172
174
  await this.applicationScript.console(app);
173
175
  }),
174
- 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, {
175
180
  desc: "endpoint glob(s), comma-separated: mutation:*, query:userList",
176
181
  nullable: true
177
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, {
@@ -220,15 +225,22 @@ var buildAndTestTargets = ({ public: target }) => ({
220
225
  budget: RouteJsBudget.modeOf({ checkBudget, updateBudget, raiseBudget })
221
226
  });
222
227
  }),
223
- 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) {
224
233
  await this.applicationScript.typecheck(sys, { write, clean, incremental, tests });
225
234
  }),
226
- 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, {
227
236
  desc: "test files or folders to run, relative to the target or the workspace root, comma-separated (default: all)",
228
237
  example: "lib/user/user.signal.test.ts",
229
238
  nullable: true
230
- }).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) {
231
- await this.applicationScript.test(exec, { write, files: listOf(files), coverage });
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 });
232
244
  })
233
245
  });
234
246
  var nativeBuildTargets = ({ public: target }) => ({
@@ -388,7 +400,7 @@ var updateTargets = ({ public: target }) => ({
388
400
  })
389
401
  });
390
402
  var databaseTargets = ({ public: target }) => ({
391
- dbup: target({ desc: "Start local database services for a database mode" }).with(Workspace).option("mode", String, {
403
+ dbup: target({ desc: "Start local database services for a database mode", readOnly: true }).with(Workspace).option("mode", String, {
392
404
  desc: "database mode; left out, every mode the workspace's apps declare",
393
405
  enum: ["single", "multiple", "cluster"],
394
406
  nullable: true
@@ -401,7 +413,7 @@ var databaseTargets = ({ public: target }) => ({
401
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) {
402
414
  await this.applicationScript.transferDatabase(app, "import", dir);
403
415
  }),
404
- 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) {
405
417
  await this.applicationScript.dbdown(workspace);
406
418
  })
407
419
  });
@@ -5,29 +5,29 @@ import {
5
5
  parseEnvFile,
6
6
  WorkspaceExecutor,
7
7
  ServerEnvProfile
8
- } from "./index-qssq2d41.js";
8
+ } from "./index-71y6176j.js";
9
9
  import"./index-by2tvsq6.js";
10
10
  import"./index-j4yvgfhr.js";
11
- import"./index-ze48c0vd.js";
12
- import"./index-na8r4a27.js";
13
- import"./index-dss3ds74.js";
11
+ import"./index-z92zm3wd.js";
12
+ import"./index-zfnz878d.js";
13
+ import"./index-w1zexzpx.js";
14
14
  import {
15
15
  NARROWABLE_VENDOR_SPECIFIERS
16
- } from "./index-cb91b6d8.js";
16
+ } from "./index-jek2re5k.js";
17
17
  import {
18
18
  FontPruner,
19
+ precompressArtifacts,
19
20
  RouteJsBudget
20
- } from "./index-7v7tvgt7.js";
21
- import"./index-yvzm8mby.js";
21
+ } from "./index-dmcpetwe.js";
22
+ import"./index-9wh04mqy.js";
22
23
  import {
23
24
  AllRoutesBuilder,
24
- precompressArtifacts,
25
25
  SsrBaseArtifactBuilder,
26
26
  VendorImportScanner
27
- } from "./index-6469101k.js";
27
+ } from "./index-dadwp2aw.js";
28
28
  import {
29
29
  CsrArtifactBuilder
30
- } from "./index-yxkjsyx8.js";
30
+ } from "./index-a860mx0m.js";
31
31
  import"./index-62md4dwy.js";
32
32
 
33
33
  // pkgs/@akanjs/devkit/app/applicationBuildRunner.ts
@@ -156,6 +156,7 @@ var AKAN_OPTIONAL_BACKEND_EXTERNALS = ["bullmq", "ioredis", "postgres", "protobu
156
156
  class ApplicationBuildRunner {
157
157
  #app;
158
158
  #fast;
159
+ #verify;
159
160
  #reporter;
160
161
  #environment;
161
162
  #profile;
@@ -164,9 +165,17 @@ class ApplicationBuildRunner {
164
165
  #spinner;
165
166
  #startedAt = Date.now();
166
167
  #phases = [];
167
- 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
+ } = {}) {
168
176
  this.#app = app;
169
- this.#fast = fast;
177
+ this.#fast = fast || verify;
178
+ this.#verify = verify;
170
179
  this.#reporter = reporter;
171
180
  this.#environment = environment;
172
181
  this.#profile = profile;
@@ -204,11 +213,22 @@ class ApplicationBuildRunner {
204
213
  await this.#runPhase("typecheck", "Typechecking", () => this.typecheck());
205
214
  await this.#runPhase("backend", "Compiling backend", () => this.#buildBackend(), (result) => `${result.entrypoints} entrypoints, ${result.outputs} outputs`);
206
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
+ }
207
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"));
208
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");
209
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");
210
- 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);
211
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) {
212
232
  return {
213
233
  phases: this.#phases,
214
234
  ...routeJs ? { routeJs: routeJs.sizes } : {},
@@ -313,6 +333,10 @@ class ApplicationBuildRunner {
313
333
  });
314
334
  return this.#serverEnv;
315
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
+ }
316
340
  async#buildBackend() {
317
341
  const { externalLibs, web, baseDevEnv, branches } = await this.#app.getConfig();
318
342
  const backendEntryPoints = [`${this.#app.cwdPath}/main.ts`, `${this.#app.cwdPath}/server.ts`];
@@ -333,7 +357,11 @@ class ApplicationBuildRunner {
333
357
  plugins: [this.#createExternalSpecifiersPlugin(externalLibs), serverEnvPlugin]
334
358
  };
335
359
  const [mainResult, serverResult] = [
336
- 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
+ }),
337
365
  await this.#buildOrThrow("backend", { ...backendConfig, entrypoints: [backendEntryPoints[1]], splitting: true })
338
366
  ];
339
367
  const rscWorkerResult = web.ssr ? await this.#buildOrThrow("rsc-worker", {
@@ -408,7 +436,7 @@ void run().catch((error) => {
408
436
  async#measureRouteJs(environment) {
409
437
  if (this.#budget === "off" || !this.#modulesByRoute)
410
438
  return null;
411
- 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 });
412
440
  const budgetPath = path3.join(this.#app.cwdPath, RouteJsBudget.fileName);
413
441
  const { summary: status, warnings } = await RouteJsBudget.check(sizes, {
414
442
  mode: this.#budget,
@@ -2,37 +2,37 @@
2
2
  import {
3
3
  FontOptimizer,
4
4
  ApplicationBuildReporter
5
- } from "./index-7v7tvgt7.js";
5
+ } from "./index-dmcpetwe.js";
6
6
  import {
7
7
  resolveSsrPageEntriesForApp,
8
8
  AppExecutor2
9
- } from "./index-ze48c0vd.js";
9
+ } from "./index-z92zm3wd.js";
10
10
  import {
11
11
  computeRouteSeedIndex,
12
12
  saveRouteSeedIndex,
13
13
  CsrDevBundler,
14
14
  SsrDevBundler
15
- } from "./index-cb91b6d8.js";
15
+ } from "./index-jek2re5k.js";
16
16
  import {
17
17
  WorkspaceExecutor
18
- } from "./index-qssq2d41.js";
18
+ } from "./index-71y6176j.js";
19
19
  import"./index-by2tvsq6.js";
20
20
  import"./index-j4yvgfhr.js";
21
- import"./index-na8r4a27.js";
22
- import"./index-dss3ds74.js";
21
+ import"./index-zfnz878d.js";
22
+ import"./index-w1zexzpx.js";
23
23
  import {
24
24
  ServerGraphFile,
25
25
  PagesBundleBuilder
26
- } from "./index-yvzm8mby.js";
26
+ } from "./index-9wh04mqy.js";
27
27
  import {
28
28
  CssCompiler,
29
29
  SsrBaseArtifactBuilder
30
- } from "./index-6469101k.js";
30
+ } from "./index-dadwp2aw.js";
31
31
  import {
32
32
  CsrArtifactBuilder
33
- } from "./index-yxkjsyx8.js";
33
+ } from "./index-a860mx0m.js";
34
34
  import"./index-62md4dwy.js";
35
- import"./index-vjbne22r.js";
35
+ import"./index-7wf8snar.js";
36
36
 
37
37
  // pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
38
38
  import path from "path";
@@ -3,39 +3,39 @@ import {
3
3
  App,
4
4
  Workspace,
5
5
  command
6
- } from "./index-9rv2zt48.js";
6
+ } from "./index-2yn3r67f.js";
7
7
  import"./index-j4yvgfhr.js";
8
- import"./index-qssq2d41.js";
8
+ import"./index-71y6176j.js";
9
9
  import"./index-by2tvsq6.js";
10
- import"./index-ze48c0vd.js";
11
- import"./index-na8r4a27.js";
12
- import"./index-dss3ds74.js";
13
- import"./index-f16kr6vj.js";
10
+ import"./index-z92zm3wd.js";
11
+ import"./index-zfnz878d.js";
12
+ import"./index-w1zexzpx.js";
13
+ import"./index-s885g0jj.js";
14
14
  import {
15
15
  PlatformTestRun
16
- } from "./index-ba2xd32s.js";
17
- import"./index-fp5xf6ef.js";
18
- import"./index-9wab2ngg.js";
16
+ } from "./index-e9w8wq0a.js";
17
+ import"./index-ebn9kgea.js";
18
+ import"./index-612fdtbk.js";
19
19
  import"./index-m9jj544v.js";
20
- import"./index-yvzm8mby.js";
21
- import"./index-yxkjsyx8.js";
20
+ import"./index-9wh04mqy.js";
21
+ import"./index-a860mx0m.js";
22
22
  import {
23
23
  npmRegistryFromEnv,
24
24
  warnIgnoredNpmRegistry
25
- } from "./index-ffa52fwf.js";
26
- import"./index-7v7tvgt7.js";
27
- import"./index-6zb17wcm.js";
28
- import"./index-at6haq2x.js";
25
+ } from "./index-jf4vk1s0.js";
26
+ import"./index-dmcpetwe.js";
27
+ import"./index-2jmvfa62.js";
28
+ import"./index-qyhr8wst.js";
29
29
  import"./index-rwgqba9p.js";
30
- import"./index-v929w7j7.js";
30
+ import"./index-kykky4re.js";
31
31
  import"./index-trffs83s.js";
32
32
  import"./index-p7beqww9.js";
33
- import"./index-1pjwsh2g.js";
33
+ import"./index-baccvws5.js";
34
34
  import"./index-2ny1e95c.js";
35
- import"./index-5d57kx0s.js";
35
+ import"./index-275a4r3n.js";
36
36
  import {
37
37
  CloudScript2
38
- } from "./index-s3m89wt2.js";
38
+ } from "./index-exzkev4k.js";
39
39
  import {
40
40
  writeOption,
41
41
  oneNativeTargetOption,
@@ -46,9 +46,9 @@ import {
46
46
  hostOption,
47
47
  subspaceOption
48
48
  } from "./index-mdjc93e1.js";
49
- import"./index-g7jgd4xs.js";
49
+ import"./index-j592zfqc.js";
50
50
  import"./index-9bv479q5.js";
51
- import"./index-vjbne22r.js";
51
+ import"./index-7wf8snar.js";
52
52
 
53
53
  // pkgs/@akanjs/cli/cloud/cloud.command.ts
54
54
  var localRegistryUrl = () => npmRegistryFromEnv() ?? "http://127.0.0.1:4873";
@@ -58,12 +58,14 @@ var resolveRegistryUrl = (registry) => {
58
58
  };
59
59
  var pushUpdateDesc = "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it; or upload the desktop release `akan publish-update` signed, as it is. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure";
60
60
  var registerBinaryDesc = "Register the store build of a phone app with the Akan Cloud project, with a pack of the same commit as its embedded bundle. Exits 2 when the store build differs natively from this commit's pack, 1 on any other failure";
61
+ var uploadSecretDesc = "Upload a named pipeline secret to the Akan Cloud project; write-only, it can never be read back";
62
+ var listSecretsDesc = "List the pipeline secrets of the Akan Cloud project: names and scopes, never values";
61
63
 
62
64
  class CloudCommand extends command("cloud", [CloudScript2], ({ public: target }) => ({
63
- login: target({ desc: "Login to Akan Cloud services" }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
65
+ login: target({ desc: "Login to Akan Cloud services", readOnly: true }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
64
66
  await this.cloudScript.login(workspace, host);
65
67
  }),
66
- logout: target({ desc: "Logout from Akan Cloud services" }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
68
+ logout: target({ desc: "Logout from Akan Cloud services", readOnly: true }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
67
69
  await this.cloudScript.logout(workspace, host);
68
70
  }),
69
71
  deployAkan: target({ devOnly: true, desc: "Deploy Akan.js framework to cloud (internal use)" }).option("test", Boolean, { desc: "test the deployment", default: true }).option("registry", String, {
@@ -183,9 +185,7 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
183
185
  publicEnv
184
186
  });
185
187
  }),
186
- uploadSecret: target({
187
- desc: "Upload a named pipeline secret to the Akan Cloud project; write-only, it can never be read back"
188
- }).arg("name", String, { desc: "secret name, e.g. DISCORD_WEBHOOK" }).option("branch", String, {
188
+ uploadSecret: target({ desc: uploadSecretDesc, readOnly: true }).arg("name", String, { desc: "secret name, e.g. DISCORD_WEBHOOK" }).option("branch", String, {
189
189
  desc: "only builds of this branch use it: debug, develop or main (default: every branch)",
190
190
  nullable: true
191
191
  }).option("file", String, {
@@ -194,13 +194,13 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
194
194
  }).option("subspace", String, subspaceOption("gets it")).option("host", String, hostOption).with(Workspace).exec(async function(name, branch, file, subspace, host, workspace) {
195
195
  await this.cloudScript.uploadSecret(workspace, { name, branch, file, subspace, host });
196
196
  }),
197
- listSecrets: target({ desc: "List the pipeline secrets of the Akan Cloud project: names and scopes, never values" }).option("branch", String, {
197
+ listSecrets: target({ desc: listSecretsDesc, readOnly: true }).option("branch", String, {
198
198
  desc: "only the secrets builds of this branch use: debug, develop or main",
199
199
  nullable: true
200
200
  }).option("subspace", String, subspaceOption("to list")).option("host", String, hostOption).with(Workspace).exec(async function(branch, subspace, host, workspace) {
201
201
  await this.cloudScript.listSecrets(workspace, { branch, subspace, host });
202
202
  }),
203
- removeSecret: target({ desc: "Remove a named pipeline secret from the Akan Cloud project" }).arg("name", String, { desc: "secret name" }).option("branch", String, {
203
+ removeSecret: target({ desc: "Remove a named pipeline secret from the Akan Cloud project", readOnly: true }).arg("name", String, { desc: "secret name" }).option("branch", String, {
204
204
  desc: "the branch override to remove: debug, develop or main (default: the every-branch value)",
205
205
  nullable: true
206
206
  }).option("subspace", String, subspaceOption("holds it")).option("host", String, hostOption).with(Workspace).exec(async function(name, branch, subspace, host, workspace) {
@@ -0,0 +1,35 @@
1
+ // @bun
2
+ import {
3
+ CloudScript2
4
+ } from "./index-exzkev4k.js";
5
+ import"./index-e9w8wq0a.js";
6
+ import"./index-kykky4re.js";
7
+ import"./index-2jmvfa62.js";
8
+ import"./index-275a4r3n.js";
9
+ import"./index-s885g0jj.js";
10
+ import"./index-jf4vk1s0.js";
11
+ import"./index-qyhr8wst.js";
12
+ import"./index-j592zfqc.js";
13
+ import"./index-baccvws5.js";
14
+ import"./index-612fdtbk.js";
15
+ import"./index-ebn9kgea.js";
16
+ import"./index-m9jj544v.js";
17
+ import"./index-2ny1e95c.js";
18
+ import"./index-2yn3r67f.js";
19
+ import"./index-9bv479q5.js";
20
+ import"./index-rwgqba9p.js";
21
+ import"./index-p7beqww9.js";
22
+ import"./index-trffs83s.js";
23
+ import"./index-a860mx0m.js";
24
+ import"./index-dmcpetwe.js";
25
+ import"./index-9wh04mqy.js";
26
+ import"./index-7wf8snar.js";
27
+ import"./index-z92zm3wd.js";
28
+ import"./index-zfnz878d.js";
29
+ import"./index-w1zexzpx.js";
30
+ import"./index-71y6176j.js";
31
+ import"./index-j4yvgfhr.js";
32
+ import"./index-by2tvsq6.js";
33
+ export {
34
+ CloudScript2 as CloudScript
35
+ };