@akanjs/cli 3.0.0-alpha.9 → 3.0.0-alpha.90

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 (135) hide show
  1. package/.build-stamp +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/{abstractCompactor-e5yq60qz.js → abstractCompactor-cefxzggj.js} +3 -5
  5. package/{agent.command-f0gqkfgz.js → agent.command-r93wmq7m.js} +11 -13
  6. package/{application.command-x903m2qq.js → application.command-5nqfqgdn.js} +62 -38
  7. package/{applicationBuildRunner-ha3y8ew8.js → applicationBuildRunner-b21m07fs.js} +23 -20
  8. package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-3wh58n2m.js} +8 -9
  9. package/buildBatch.proc.js +12 -14
  10. package/capacitorApp-gzcx6txb.js +12 -0
  11. package/{cloud.command-zs6kyf83.js → cloud.command-g0pk0k60.js} +15 -18
  12. package/commandManifest.json +1 -1
  13. package/{context.command-fmepgjzg.js → context.command-qd8kqrnh.js} +19 -23
  14. package/dependencyScanner-shs82ynp.js +8 -0
  15. package/devTui-2xf0meaq.js +552 -0
  16. package/devTuiView-7jy8f30g.js +9 -0
  17. package/getDirname-dr3jz1xg.js +7 -0
  18. package/{guideline.command-n6sw0a0c.js → guideline.command-f38x8jhw.js} +16 -18
  19. package/guidelines/agentRule/agentRule.generate.json +31 -0
  20. package/guidelines/agentRule/agentRule.instruction.md +533 -0
  21. package/guidelines/conventions/conventions.instruction.md +406 -197
  22. package/guidelines/cssRule/cssRule.instruction.md +7 -0
  23. package/guidelines/framework/framework.generate.json +3 -2
  24. package/guidelines/framework/framework.instruction.md +1 -9
  25. package/guidelines/mcpRule/mcpRule.generate.json +25 -0
  26. package/guidelines/mcpRule/mcpRule.instruction.md +217 -0
  27. package/guidelines/modelStore/modelStore.instruction.md +12 -0
  28. package/guidelines/modelTemplate/modelTemplate.instruction.md +5 -0
  29. package/guidelines/queryRule/queryRule.generate.json +31 -0
  30. package/guidelines/queryRule/queryRule.instruction.md +143 -0
  31. package/guidelines/runtimeRule/runtimeRule.generate.json +25 -0
  32. package/guidelines/runtimeRule/runtimeRule.instruction.md +213 -0
  33. package/guidelines/ssrRule/ssrRule.instruction.md +49 -5
  34. package/guidelines/transportRule/transportRule.generate.json +31 -0
  35. package/guidelines/transportRule/transportRule.instruction.md +60 -0
  36. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +51 -760
  37. package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +33 -0
  38. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +402 -0
  39. package/incrementalBuilder.proc.js +26 -25
  40. package/{index-774gcx29.js → index-0emb9eat.js} +41 -34
  41. package/index-3d9y066c.js +76 -0
  42. package/{index-3vta1tqa.js → index-3vvbv974.js} +32 -32
  43. package/{index-76rn3g2c.js → index-47pj3aee.js} +4 -4
  44. package/{index-y4vkyhvv.js → index-5xdqxbn9.js} +14 -14
  45. package/{index-1577bej2.js → index-6wwzs1bc.js} +2 -2
  46. package/{index-wnp7hwq7.js → index-92zztqy1.js} +7 -7
  47. package/{index-jhpa13zj.js → index-9bwhxrqf.js} +57 -57
  48. package/{index-bjpxzr6s.js → index-9wtbw98m.js} +6 -3
  49. package/{index-fgc8r6dj.js → index-a5vmm6x4.js} +3 -1
  50. package/{index-xys926f2.js → index-by5gpp8x.js} +4 -4
  51. package/{index-kdh76j26.js → index-cezy7yb3.js} +100 -32
  52. package/{index-62955kn5.js → index-d61rcfa2.js} +758 -127
  53. package/{index-82jrh4hj.js → index-deekbtkj.js} +13 -13
  54. package/{index-rxkpk7n4.js → index-e82dyeqy.js} +4 -4
  55. package/{index-qzdjd4ct.js → index-h759vjfa.js} +18 -18
  56. package/{index-j37qq1f2.js → index-h7yw2z9n.js} +7 -7
  57. package/{index-qb61h0k7.js → index-jydtyzva.js} +1098 -1360
  58. package/{index-46tjzh6s.js → index-kcxmv48c.js} +29 -29
  59. package/{index-4m0bphac.js → index-kfnr6c19.js} +31 -30
  60. package/{index-xmmzf150.js → index-mpmyqm1y.js} +1 -1
  61. package/{index-xjd3rqzj.js → index-n68jx79w.js} +6 -15
  62. package/{index-0cj2zxbm.js → index-n85fer99.js} +12 -11
  63. package/{index-779ske1y.js → index-pgsswppj.js} +27 -27
  64. package/index-pvb4vdwr.js +159 -0
  65. package/{index-67546d0j.js → index-q0y2jq9j.js} +14 -2
  66. package/{index-z8ptfkzv.js → index-q8sn827n.js} +969 -240
  67. package/{index-5sn5w2mt.js → index-r50qen0z.js} +94 -61
  68. package/{index-eyyf2149.js → index-rntcdss1.js} +36 -37
  69. package/{index-gcv8ncfh.js → index-sjak5v5b.js} +16 -12
  70. package/{index-j9cxndc0.js → index-w8kmx1b6.js} +20 -11
  71. package/{index-jf2ya7r2.js → index-y74k5anj.js} +8 -8
  72. package/{index-d43t8af2.js → index-zkvpaggp.js} +58 -25
  73. package/index.js +22 -25
  74. package/{library.command-cv9gdbmg.js → library.command-em103wtn.js} +11 -10
  75. package/{localRegistry.command-d8fg36zc.js → localRegistry.command-gz8apn4y.js} +20 -23
  76. package/{module.command-qyr1s9cn.js → module.command-451pztkc.js} +13 -16
  77. package/{package.command-wsjx0k47.js → package.command-rfhyf38t.js} +8 -10
  78. package/package.json +5 -7
  79. package/{page.command-rdzg65rm.js → page.command-kt19da5g.js} +7 -9
  80. package/{primitive.command-89g38b53.js → primitive.command-pgy69ere.js} +13 -16
  81. package/{quality.command-0cs2z92d.js → quality.command-gpe2vqb5.js} +226 -105
  82. package/recipeScanner-fpagtgc1.js +11 -0
  83. package/{repair.command-6fphxfwj.js → repair.command-2sbrz187.js} +12 -14
  84. package/{routeSourceValidator-e4jmbfcx.js → routeSourceValidator-ze6x894c.js} +0 -2
  85. package/{scalar.command-xfer69s6.js → scalar.command-jcf4e5sv.js} +11 -14
  86. package/subspace.command-kqzqtk0p.js +755 -0
  87. package/templates/app/env/env.client.debug.ts.template +1 -5
  88. package/templates/app/env/env.client.develop.ts.template +1 -5
  89. package/templates/app/env/env.client.local.ts.template +1 -5
  90. package/templates/app/env/env.client.main.ts.template +1 -5
  91. package/templates/app/env/env.client.testing.ts.template +1 -5
  92. package/templates/app/env/env.client.type.ts +2 -6
  93. package/templates/app/env/env.server.debug.ts.template +1 -5
  94. package/templates/app/env/env.server.develop.ts.template +1 -5
  95. package/templates/app/env/env.server.local.ts.template +1 -5
  96. package/templates/app/env/env.server.main.ts.template +1 -5
  97. package/templates/app/main.ts +3 -1
  98. package/templates/appSample/lib/task/task.signal.ts +11 -6
  99. package/templates/appSample/srvkit/AuthGuard.ts +9 -5
  100. package/templates/appSample/srvkit/SessionInternalArg.ts +4 -3
  101. package/templates/crudPages/[__model__Id]/edit/page.tsx +5 -5
  102. package/templates/crudPages/[__model__Id]/page.tsx +10 -13
  103. package/templates/crudPages/new/page.tsx +5 -5
  104. package/templates/crudPages/page.tsx +9 -9
  105. package/templates/crudSinglePage/page.tsx +11 -7
  106. package/templates/env/_env.server.type.ts +7 -5
  107. package/templates/lib/db.ts +1 -1
  108. package/templates/lib/dict.ts +1 -1
  109. package/templates/lib/sig.ts +1 -1
  110. package/templates/lib/srv.ts +6 -2
  111. package/templates/module/__model__.dictionary.ts +4 -1
  112. package/templates/module/__model__.signal.ts +2 -3
  113. package/templates/module/__model__.store.ts +1 -2
  114. package/templates/workspaceRoot/.gitignore.template +0 -1
  115. package/templates/workspaceRoot/.husky/pre-commit.template +16 -0
  116. package/templates/workspaceRoot/.vscode/settings.json.template +1 -1
  117. package/templates/workspaceRoot/AGENTS.md.template +4 -0
  118. package/templates/workspaceRoot/CLAUDE.md.template +19 -0
  119. package/templates/workspaceRoot/biome.json.template +2 -1
  120. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +10 -14
  121. package/templates/workspaceRoot/docs/GENERATED.md.template +12 -10
  122. package/templates/workspaceRoot/package.json.template +2 -4
  123. package/typeChecker-3xgrzc2v.js +7 -0
  124. package/typecheck.proc.js +4 -5
  125. package/{workflow.command-2ygfqt4f.js → workflow.command-m4z25a2p.js} +22 -25
  126. package/{workspace.command-88m0zs64.js → workspace.command-dqgj9zbk.js} +96 -81
  127. package/capacitorApp-9xswcgx7.js +0 -61
  128. package/dependencyScanner-f6grrep3.js +0 -9
  129. package/getDirname-m9s0cmhq.js +0 -8
  130. package/index-mxvakhsm.js +0 -66
  131. package/index-r24hmh0q.js +0 -4
  132. package/recipeScanner-tghkzrrt.js +0 -12
  133. package/typeChecker-kravn7ns.js +0 -8
  134. /package/{index-0wae5ebk.js → index-meh558jy.js} +0 -0
  135. /package/{index-ss469dec.js → index-nz8prx9g.js} +0 -0
@@ -47,25 +47,21 @@ See `docs/GENERATED.md` for the generated file list.
47
47
 
48
48
  ## House Style
49
49
 
50
- `AGENTS.md` holds the full style guide. The rules agents break most often:
50
+ `AGENTS.md` holds the full style guide, and `akan lint` enforces most of it. The four rules that surprise people,
51
+ because the failure is silent rather than an error:
51
52
 
52
53
  - **Never hand-order Tailwind classes** — the linter sorts them, including inside `cn()`, and its output looks
53
- unnatural on purpose.
54
+ unnatural on purpose. Do not reorder it back.
54
55
  - **Never use a colour outside the semantic vocabulary** — `bg-red-500`, `bg-[#3b82f6]` and `text-base-content`
55
56
  compile to no CSS at all, so the element renders unstyled with no error. Use `bg-primary`, `text-foreground/70`
56
57
  and the other tokens defined in `page/*/styles.css`.
57
- - **Never `throw new Error`** — throw `new Err("<module>.error.<key>")` with an `[en, ko]` entry in the module
58
- dictionary. `common/` cannot import `Err`, so keep throwing code out of it.
59
- - **Never import a third-party package** from a page, a barrel, or a module file. Re-export it through a one-line
60
- shim in `base/`, `webkit/`, or `ui/` first.
61
- - `#private` is lint-banned in `*.constant.ts`, `*.document.ts`, `*.service.ts`, and `*.store.ts` only; it stays
62
- the house style under `srvkit/`.
63
- - Components are `export const X = ({ … }: XProps) => { … }` with `interface XProps` directly above and
64
- `className?: string` first. No `React.FC`, no non-null assertions, no `as any`.
65
- - `cond ? <X/> : null`, never `{cond && <X/>}` — the latter renders the string `"false"` in a className context.
66
- - Put display and predicate logic on the `Light<Model>` constant class; keep document chain methods
67
- validate → mutate → `return this` without `save()`; keep services to load → chain → save.
68
- - Do not narrate code in comments. Do document vendor quirks, infrastructure constraints, and security reasoning.
58
+ - **`cond ? <X/> : null`, never `{cond && <X/>}`** — the latter renders the string `"false"` in a className context.
59
+ - **Never wrap a form setter in a pass-through arrow** — `onChange={st.do.setXOnY}` publishes the field to agents
60
+ and E2E selectors; `onChange={(v) => st.do.setXOnY(v)}` runs identically and publishes nothing.
61
+
62
+ Two more that are hard errors: **never `throw new Error`** (throw `new Err("<module>.error.<key>")` with an
63
+ `[en, ko]` dictionary entry), and **never import a third-party package** from a page, a barrel, or a module file —
64
+ re-export it through a one-line shim in the lib's `common/`, `webkit/`, or `ui/` first.
69
65
 
70
66
  ## Abstract Documents
71
67
 
@@ -9,20 +9,21 @@ sync or build can overwrite local changes.
9
9
  | --- | --- |
10
10
  | `apps/*/client.ts` | App-wide client entrypoint for generated fetch, store, and client runtime exports. |
11
11
  | `apps/*/server.ts` | App-wide server entrypoint for generated server, service, signal, database, and dictionary exports. |
12
+ | `libs/*/client.ts`, `libs/*/server.ts`, `libs/*/index.ts` | The same entrypoints for a library. |
12
13
 
13
- ## App Library Barrels
14
+ ## Module Barrels (apps and libs alike)
14
15
 
15
16
  | File | Purpose |
16
17
  | --- | --- |
17
- | `apps/*/lib/cnst.ts` | Re-exports constants and model shapes from module `*.constant.ts` files. |
18
- | `apps/*/lib/db.ts` | Re-exports database models from module `*.document.ts` files. |
19
- | `apps/*/lib/dict.ts` | Re-exports dictionaries from module `*.dictionary.ts` files. |
20
- | `apps/*/lib/srv.ts` | Re-exports services from module `*.service.ts` files. |
21
- | `apps/*/lib/sig.ts` | Re-exports endpoints, slices, and internals from module `*.signal.ts` files. |
22
- | `apps/*/lib/st.ts` | Re-exports stores from module `*.store.ts` files. |
23
- | `apps/*/lib/useClient.ts` | Client-safe generated imports for fetch, message, signal, and store usage. |
24
- | `apps/*/lib/useServer.ts` | Server-safe generated imports for service, database, signal, and dictionary usage. |
25
- | `apps/*/lib/**/index.ts` | Per-module generated barrel files. |
18
+ | `{apps,libs}/*/lib/cnst.ts` | Re-exports constants and model shapes from module `*.constant.ts` files. |
19
+ | `{apps,libs}/*/lib/db.ts` | Re-exports database models from module `*.document.ts` files. |
20
+ | `{apps,libs}/*/lib/dict.ts` | Re-exports dictionaries from module `*.dictionary.ts` files. |
21
+ | `{apps,libs}/*/lib/srv.ts` | Re-exports services from module `*.service.ts` files. |
22
+ | `{apps,libs}/*/lib/sig.ts` | Re-exports endpoints, slices, and internals from module `*.signal.ts` files. |
23
+ | `{apps,libs}/*/lib/st.ts` | Re-exports stores from module `*.store.ts` files. |
24
+ | `{apps,libs}/*/lib/useClient.ts` | Client-safe generated imports for fetch, message, signal, and store usage. |
25
+ | `{apps,libs}/*/lib/useServer.ts` | Server-safe generated imports for service, database, signal, and dictionary usage. |
26
+ | `{apps,libs}/*/lib/**/index.ts` | Per-module generated barrel files. |
26
27
 
27
28
  ## Shared Surface Barrels
28
29
 
@@ -32,6 +33,7 @@ sync or build can overwrite local changes.
32
33
  | `*/webkit/index.ts` | Re-exports webkit/browser helper files. |
33
34
  | `*/srvkit/index.ts` | Re-exports server-kit helper files. |
34
35
  | `*/common/index.ts` | Re-exports common helper files. |
36
+ | `*/plugin/index.ts` | Re-exports `<name>.plugin.ts` declarations. |
35
37
 
36
38
  ## How To Change Generated Output
37
39
 
@@ -31,8 +31,6 @@
31
31
  "dependencies": {},
32
32
  "devDependencies": {},
33
33
  "patchedDependencies": {
34
- "react-dom@19.2.7": "patches/react-dom@19.2.7.patch",
35
- "zod@3.25.76": "patches/zod@3.25.76.patch",
36
- "zod@4.4.3": "patches/zod@4.4.3.patch"
34
+ "react-dom@19.2.7": "patches/react-dom@19.2.7.patch"
37
35
  }
38
- }
36
+ }
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import {
3
+ TypeChecker2
4
+ } from "./index-92zztqy1.js";
5
+ export {
6
+ TypeChecker2 as TypeChecker
7
+ };
package/typecheck.proc.js CHANGED
@@ -1,8 +1,7 @@
1
1
  // @bun
2
2
  import {
3
- TypeChecker
4
- } from "./index-wnp7hwq7.js";
5
- import"./index-r24hmh0q.js";
3
+ TypeChecker2
4
+ } from "./index-92zztqy1.js";
6
5
 
7
6
  // pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts
8
7
  import { Logger } from "akanjs/common";
@@ -12,7 +11,7 @@ try {
12
11
  const cwdPath = process.env.AKAN_TYPECHECK_CWD;
13
12
  if (!cwdPath)
14
13
  throw new Error("AKAN_TYPECHECK_CWD is required");
15
- const typeChecker = new TypeChecker({ cwdPath });
14
+ const typeChecker = new TypeChecker2({ cwdPath });
16
15
  const { fileDiagnostics, fileErrors, fileWarnings } = typeChecker.check(filePath);
17
16
  const message = typeChecker.formatDiagnostics(fileDiagnostics);
18
17
  Logger.rawLog(JSON.stringify({
@@ -26,7 +25,7 @@ try {
26
25
  const configPath = process.env.AKAN_TYPECHECK_TSCONFIG;
27
26
  if (!configPath)
28
27
  throw new Error("AKAN_TYPECHECK_TSCONFIG is required");
29
- const result = TypeChecker.checkProject(configPath);
28
+ const result = TypeChecker2.checkProject(configPath);
30
29
  if (result.errors.length > 0) {
31
30
  console.error(result.message);
32
31
  process.exit(1);
@@ -1,35 +1,32 @@
1
1
  // @bun
2
2
  import {
3
- WorkflowRunner
4
- } from "./index-qzdjd4ct.js";
5
- import {
6
- ScalarScript
7
- } from "./index-y4vkyhvv.js";
3
+ Workspace,
4
+ script,
5
+ command
6
+ } from "./index-cezy7yb3.js";
7
+ import"./index-q0y2jq9j.js";
8
+ import"./index-q8sn827n.js";
9
+ import"./index-6wwzs1bc.js";
8
10
  import {
9
- PrimitiveScript
10
- } from "./index-3vta1tqa.js";
11
+ createWorkflowStepRegistry
12
+ } from "./index-e82dyeqy.js";
13
+ import"./index-n85fer99.js";
11
14
  import {
12
15
  ModuleScript
13
- } from "./index-jhpa13zj.js";
14
- import"./index-ss469dec.js";
15
- import"./index-xmmzf150.js";
16
- import"./index-0cj2zxbm.js";
17
- import"./index-774gcx29.js";
16
+ } from "./index-9bwhxrqf.js";
17
+ import"./index-mpmyqm1y.js";
18
+ import"./index-h7yw2z9n.js";
18
19
  import {
19
- createWorkflowStepRegistry
20
- } from "./index-rxkpk7n4.js";
21
- import"./index-j37qq1f2.js";
20
+ PrimitiveScript
21
+ } from "./index-3vvbv974.js";
22
22
  import {
23
- Workspace,
24
- command,
25
- script
26
- } from "./index-kdh76j26.js";
27
- import"./index-z8ptfkzv.js";
28
- import"./index-mxvakhsm.js";
29
- import"./index-xys926f2.js";
30
- import"./index-1577bej2.js";
31
- import"./index-67546d0j.js";
32
- import"./index-r24hmh0q.js";
23
+ ScalarScript
24
+ } from "./index-5xdqxbn9.js";
25
+ import"./index-by5gpp8x.js";
26
+ import"./index-0emb9eat.js";
27
+ import {
28
+ WorkflowRunner
29
+ } from "./index-h759vjfa.js";
33
30
 
34
31
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
35
32
  import { Logger } from "akanjs/common";
@@ -1,93 +1,84 @@
1
1
  // @bun
2
2
  import {
3
- ContextScript
4
- } from "./index-5sn5w2mt.js";
5
- import"./index-jf2ya7r2.js";
6
- import"./index-qzdjd4ct.js";
7
- import"./index-y4vkyhvv.js";
8
- import"./index-3vta1tqa.js";
9
- import"./index-jhpa13zj.js";
10
- import"./index-ss469dec.js";
11
- import"./index-xmmzf150.js";
3
+ FileSys
4
+ } from "./index-q0y2jq9j.js";
12
5
  import {
13
- CloudScript
14
- } from "./index-82jrh4hj.js";
6
+ GlobalConfig
7
+ } from "./index-n85fer99.js";
15
8
  import {
16
- getLatestPackageVersion,
17
- getNpmRegistryUrl
18
- } from "./index-4m0bphac.js";
9
+ Exec,
10
+ Workspace,
11
+ runner,
12
+ script,
13
+ command
14
+ } from "./index-cezy7yb3.js";
19
15
  import {
20
- PackageScript
21
- } from "./index-gcv8ncfh.js";
22
- import"./index-779ske1y.js";
16
+ extractAgentBlock,
17
+ collectScopeRecipeSources,
18
+ renderScopeAgentBlock,
19
+ WorkspaceExecutor,
20
+ SysExecutor,
21
+ AppExecutor,
22
+ LibExecutor,
23
+ PkgExecutor
24
+ } from "./index-q8sn827n.js";
25
+ import"./index-6wwzs1bc.js";
23
26
  import {
24
- GlobalConfig
25
- } from "./index-0cj2zxbm.js";
27
+ countBlocking,
28
+ formatStyleContract,
29
+ ThemeValidator
30
+ } from "./index-n68jx79w.js";
31
+ import {
32
+ collectRecipeSources2,
33
+ scanRecipes2
34
+ } from "./index-by5gpp8x.js";
35
+ import"./index-e82dyeqy.js";
36
+ import"./index-0emb9eat.js";
37
+ import"./index-h7yw2z9n.js";
26
38
  import {
27
39
  AgentScript
28
- } from "./index-eyyf2149.js";
29
- import"./index-774gcx29.js";
30
- import"./index-rxkpk7n4.js";
31
- import"./index-j37qq1f2.js";
40
+ } from "./index-rntcdss1.js";
32
41
  import {
33
42
  ApplicationScript
34
- } from "./index-62955kn5.js";
43
+ } from "./index-d61rcfa2.js";
35
44
  import {
36
45
  LibraryScript
37
- } from "./index-d43t8af2.js";
38
- import"./index-76rn3g2c.js";
39
- import {
40
- Exec,
41
- Workspace,
42
- command,
43
- runner,
44
- script
45
- } from "./index-kdh76j26.js";
46
- import"./index-fgc8r6dj.js";
46
+ } from "./index-zkvpaggp.js";
47
+ import"./index-9wtbw98m.js";
48
+ import"./index-kcxmv48c.js";
47
49
  import {
48
- ThemeValidator,
49
- countBlocking,
50
- formatStyleContract
51
- } from "./index-xjd3rqzj.js";
52
- import"./index-bjpxzr6s.js";
50
+ PackageScript
51
+ } from "./index-sjak5v5b.js";
53
52
  import {
54
- AppExecutor,
55
- LibExecutor,
56
- PkgExecutor,
57
- SysExecutor,
58
- WorkspaceExecutor,
59
- collectScopeRecipeSources,
60
- extractAgentBlock,
61
- renderScopeAgentBlock
62
- } from "./index-z8ptfkzv.js";
63
- import"./index-mxvakhsm.js";
53
+ getNpmRegistryUrl,
54
+ getLatestPackageVersion
55
+ } from "./index-kfnr6c19.js";
64
56
  import {
65
- collectRecipeSources,
66
- scanRecipes
67
- } from "./index-xys926f2.js";
68
- import"./index-1577bej2.js";
69
- import"./index-46tjzh6s.js";
57
+ CloudScript
58
+ } from "./index-deekbtkj.js";
70
59
  import {
71
- FileSys
72
- } from "./index-67546d0j.js";
73
- import"./index-r24hmh0q.js";
74
-
75
- // pkgs/@akanjs/cli/workspace/workspace.script.ts
76
- import path2 from "path";
77
- import { Logger } from "akanjs/common";
60
+ ContextScript
61
+ } from "./index-r50qen0z.js";
62
+ import"./index-pgsswppj.js";
63
+ import"./index-y74k5anj.js";
64
+ import"./index-h759vjfa.js";
65
+ import"./index-9bwhxrqf.js";
66
+ import"./index-mpmyqm1y.js";
67
+ import"./index-3vvbv974.js";
68
+ import"./index-5xdqxbn9.js";
69
+ import"./index-pvb4vdwr.js";
78
70
 
79
71
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
80
72
  import path from "path";
81
73
 
82
74
  // pkgs/@akanjs/devkit/biomeBase.ts
83
- var biomeVersion = "2.4.4";
75
+ var biomeVersion = "2.5.12";
84
76
 
85
77
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
86
78
  var defaultWorkspacePeerDependencies = new Set([
87
79
  "@react-spring/web",
88
80
  "@use-gesture/react",
89
81
  "chance",
90
- "croner",
91
82
  "react",
92
83
  "react-dom",
93
84
  "react-icons",
@@ -99,6 +90,7 @@ var defaultWorkspacePeerDependencies = new Set([
99
90
  "tailwindcss",
100
91
  "typescript"
101
92
  ]);
93
+ var defaultMaxDiagnostics = 200;
102
94
 
103
95
  class WorkspaceRunner extends runner("workspace") {
104
96
  async generateAgentRules(workspace, { overwrite = false, cursorRules = true } = {}) {
@@ -236,24 +228,35 @@ class WorkspaceRunner extends runner("workspace") {
236
228
  }
237
229
  throw new Error(`[workspace] failed to locate akanjs package.json from ${import.meta.dir}`);
238
230
  }
239
- async lint(exec, workspace, { fix = true } = {}) {
231
+ async lint(exec, workspace, { fix = true, maxDiagnostics = defaultMaxDiagnostics } = {}) {
232
+ const configPath = await WorkspaceRunner.resolveBiomeConfigPath(workspace);
240
233
  await workspace.spawn("./node_modules/.bin/biome", [
241
234
  "check",
242
235
  ...fix ? ["--write"] : [],
243
236
  "--no-errors-on-unmatched",
237
+ `--max-diagnostics=${maxDiagnostics > 0 ? maxDiagnostics : "none"}`,
238
+ ...configPath ? ["--config-path", configPath] : [],
244
239
  exec.cwdPath
245
240
  ]);
246
241
  await this.#enforceStyleContract(exec);
247
242
  await this.#enforceRecipeGate(exec);
248
243
  await this.#enforceAgentsIndex(exec);
249
244
  }
245
+ static async resolveBiomeConfigPath(workspace) {
246
+ for (const fileName of ["biome.json", "biome.jsonc"]) {
247
+ const configPath = path.join(workspace.workspaceRoot, fileName);
248
+ if (await Bun.file(configPath).exists())
249
+ return configPath;
250
+ }
251
+ return null;
252
+ }
250
253
  async#enforceAgentsIndex(exec) {
251
254
  if (!(exec instanceof SysExecutor))
252
255
  return;
253
256
  const scope = { type: exec.type, name: exec.name };
254
257
  const scanInfo = await exec.scan({ write: false });
255
258
  const sources = await collectScopeRecipeSources(exec.workspace.workspaceRoot, scope, scanInfo.getScanResult().libDeps);
256
- const expected = renderScopeAgentBlock(scope, scanRecipes(sources));
259
+ const expected = renderScopeAgentBlock(scope, scanRecipes2(sources));
257
260
  const existing = await exec.exists("AGENTS.md") ? await exec.readFile("AGENTS.md") : null;
258
261
  const actual = existing ? extractAgentBlock(existing) : null;
259
262
  if (actual === expected.trim())
@@ -266,12 +269,12 @@ class WorkspaceRunner extends runner("workspace") {
266
269
  return;
267
270
  const uiDir = path.join(cwdPath, "ui");
268
271
  const sources = [
269
- ...await collectRecipeSources(uiDir, "ui/Recipe"),
270
- ...await collectRecipeSources(uiDir, "ui/recipe", "recipe")
272
+ ...await collectRecipeSources2(uiDir, "ui/Recipe"),
273
+ ...await collectRecipeSources2(uiDir, "ui/recipe", "recipe")
271
274
  ];
272
275
  if (sources.length === 0)
273
276
  return;
274
- const offenders = scanRecipes(sources).filter((recipe) => !Object.values(recipe.variants).some((values) => values.length >= 2 || values.length === 1 && values[0] === "true"));
277
+ const offenders = scanRecipes2(sources).filter((recipe) => !Object.values(recipe.variants).some((values) => values.length >= 2 || values.length === 1 && values[0] === "true"));
275
278
  if (offenders.length === 0)
276
279
  return;
277
280
  throw new Error(`[recipeGate] variant-less recipe(s): ${offenders.map((recipe) => recipe.name).join(", ")}
@@ -282,15 +285,18 @@ class WorkspaceRunner extends runner("workspace") {
282
285
  if (!cwdPath)
283
286
  return;
284
287
  const stylesCssPath = path.join(cwdPath, "page", "styles.css");
285
- const theme = await Bun.file(stylesCssPath).exists() ? new ThemeValidator().validate(await Bun.file(stylesCssPath).text()) : [];
286
- const violations = { style: [], theme };
288
+ if (!await Bun.file(stylesCssPath).exists())
289
+ return;
290
+ const violations = {
291
+ theme: new ThemeValidator().validate(await Bun.file(stylesCssPath).text())
292
+ };
287
293
  const blocking = countBlocking(violations);
288
294
  if (blocking === 0)
289
295
  return;
290
296
  throw new Error(`[themeValidator] ${blocking} blocking contrast violation(s):
291
297
  ${formatStyleContract(violations)}
292
298
 
293
- ` + "\uD14C\uB9C8 \uD1A0\uD070 \uAC12\uC758 \uC804\uACBD/\uBC30\uACBD \uCF58\uD2B8\uB77C\uC2A4\uD2B8\uB97C WCAG \uAE30\uC900 \uC774\uC0C1\uC73C\uB85C \uC870\uC815\uD558\uC138\uC694.");
299
+ ` + "Raise the foreground/background contrast of these theme token values to the WCAG threshold.");
294
300
  }
295
301
  async writeTopLevelEnv(workspace, devProjectId) {
296
302
  await workspace.writeFile(".env", `AKAN_WORKSPACE_ID=${devProjectId}
@@ -314,6 +320,8 @@ AKAN_PUBLIC_LOG_LEVEL=debug
314
320
  }
315
321
 
316
322
  // pkgs/@akanjs/cli/workspace/workspace.script.ts
323
+ import path2 from "path";
324
+ import { Logger } from "akanjs/common";
317
325
  class WorkspaceScript extends script("workspace", [
318
326
  WorkspaceRunner,
319
327
  ApplicationScript,
@@ -376,28 +384,29 @@ class WorkspaceScript extends script("workspace", [
376
384
  await this.agentScript.agent(workspace, "install", "agents-md", { force: overwrite });
377
385
  spinner.succeed(`Agent rules ready (${files.length} file${files.length === 1 ? "" : "s"})`);
378
386
  }
379
- async lint(exec, workspace, { fix = true } = {}) {
387
+ async lint(exec, workspace, { fix = true, maxDiagnostics } = {}) {
380
388
  if (exec instanceof AppExecutor)
381
389
  await this.applicationScript.sync(exec);
382
390
  else if (exec instanceof LibExecutor)
383
391
  await this.libraryScript.syncLibrary(exec);
384
392
  const spinner = workspace.spinning(`Linting${fix ? " with fix" : ""}...`);
385
393
  try {
386
- await this.workspaceRunner.lint(exec, workspace, { fix });
394
+ await this.workspaceRunner.lint(exec, workspace, { fix, maxDiagnostics });
387
395
  spinner.succeed("Lint completed with no errors");
388
396
  } catch (error) {
389
397
  spinner.fail("Lint failed with errors");
390
398
  throw error;
391
399
  }
392
400
  }
393
- async lintAll(workspace, { fix = true } = {}) {
401
+ async lintAll(workspace, { fix = true, maxDiagnostics } = {}) {
394
402
  const [appNames, libNames, pkgNames] = await workspace.getExecs();
403
+ const options = { fix, maxDiagnostics };
395
404
  await Promise.all(appNames.map((appName) => this.applicationScript.sync(AppExecutor.from(workspace, appName))));
396
405
  await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(LibExecutor.from(workspace, libName))));
397
406
  await Promise.all([
398
- ...appNames.map((appName) => this.workspaceRunner.lint(AppExecutor.from(workspace, appName), workspace, { fix })),
399
- ...libNames.map((libName) => this.workspaceRunner.lint(LibExecutor.from(workspace, libName), workspace, { fix })),
400
- ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(PkgExecutor.from(workspace, pkgName), workspace, { fix }))
407
+ ...appNames.map((appName) => this.workspaceRunner.lint(AppExecutor.from(workspace, appName), workspace, options)),
408
+ ...libNames.map((libName) => this.workspaceRunner.lint(LibExecutor.from(workspace, libName), workspace, options)),
409
+ ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(PkgExecutor.from(workspace, pkgName), workspace, options))
401
410
  ]);
402
411
  }
403
412
  async syncAll(workspace) {
@@ -479,11 +488,17 @@ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public
479
488
  }).option("overwrite", Boolean, { desc: "Overwrite existing agent rule files", default: false }).option("cursorRules", Boolean, { desc: "Generate .cursor/rules/akan.mdc", default: true }).with(Workspace).exec(async function(overwrite, cursorRules, workspace) {
480
489
  await this.workspaceScript.generateAgentRules(workspace, { overwrite, cursorRules });
481
490
  }),
482
- lint: target({ desc: "Lint and fix code in a specific app/lib/pkg" }).with(Exec).option("fix", Boolean, { default: true }).with(Workspace).exec(async function(exec, fix, workspace) {
483
- await this.workspaceScript.lint(exec, workspace, { fix });
491
+ lint: target({ desc: "Lint and fix code in a specific app/lib/pkg" }).with(Exec).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, {
492
+ desc: "How many diagnostics Biome prints before truncating (0 for no limit)",
493
+ default: defaultMaxDiagnostics
494
+ }).with(Workspace).exec(async function(exec, fix, maxDiagnostics, workspace) {
495
+ await this.workspaceScript.lint(exec, workspace, { fix, maxDiagnostics });
484
496
  }),
485
- lintAll: target({ desc: "Lint and fix code in all apps and libraries" }).option("fix", Boolean, { default: true }).with(Workspace).exec(async function(fix, workspace) {
486
- await this.workspaceScript.lintAll(workspace, { fix });
497
+ lintAll: target({ desc: "Lint and fix code in all apps and libraries" }).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, {
498
+ desc: "How many diagnostics Biome prints before truncating (0 for no limit)",
499
+ default: defaultMaxDiagnostics
500
+ }).with(Workspace).exec(async function(fix, maxDiagnostics, workspace) {
501
+ await this.workspaceScript.lintAll(workspace, { fix, maxDiagnostics });
487
502
  }),
488
503
  syncAll: target({ desc: "Sync dependencies and configuration for all apps and libraries" }).with(Workspace).exec(async function(workspace) {
489
504
  await this.workspaceScript.syncAll(workspace);
@@ -1,61 +0,0 @@
1
- // @bun
2
- import {
3
- ANDROID_MIN_SDK_VERSION,
4
- CapacitorApp,
5
- PLACEHOLDER_APP_IDS,
6
- SWIFTUICORE_MIN_IOS_MAJOR,
7
- assertJsonSerializable,
8
- buildIosNativeRunCommand,
9
- classifyIosRunFailure,
10
- clearRootCapacitorConfigs,
11
- formatAndroidReleaseSigningError,
12
- formatIosRunFailureMessage,
13
- getAdbDeviceStateIssues,
14
- getAndroidLocalServerHost,
15
- getMissingAndroidReleaseSigningKeys,
16
- isPlaceholderAppId,
17
- materializeCapacitorConfig,
18
- parseDevicectlDevices,
19
- parseIosRuntimeMajor,
20
- parseSimctlDevices,
21
- raiseGradleMinSdkVersion,
22
- rootCapacitorConfigFilenames,
23
- rootCapacitorConfigPaths,
24
- sanitizeIosNativeRunEnv,
25
- selectLocalDevHost,
26
- sortIosRunTargets,
27
- writeRootCapacitorConfig
28
- } from "./index-779ske1y.js";
29
- import"./index-76rn3g2c.js";
30
- import"./index-z8ptfkzv.js";
31
- import"./index-mxvakhsm.js";
32
- import"./index-1577bej2.js";
33
- import"./index-67546d0j.js";
34
- import"./index-r24hmh0q.js";
35
- export {
36
- writeRootCapacitorConfig,
37
- sortIosRunTargets,
38
- selectLocalDevHost,
39
- sanitizeIosNativeRunEnv,
40
- rootCapacitorConfigPaths,
41
- rootCapacitorConfigFilenames,
42
- raiseGradleMinSdkVersion,
43
- parseSimctlDevices,
44
- parseIosRuntimeMajor,
45
- parseDevicectlDevices,
46
- materializeCapacitorConfig,
47
- isPlaceholderAppId,
48
- getMissingAndroidReleaseSigningKeys,
49
- getAndroidLocalServerHost,
50
- getAdbDeviceStateIssues,
51
- formatIosRunFailureMessage,
52
- formatAndroidReleaseSigningError,
53
- clearRootCapacitorConfigs,
54
- classifyIosRunFailure,
55
- buildIosNativeRunCommand,
56
- assertJsonSerializable,
57
- SWIFTUICORE_MIN_IOS_MAJOR,
58
- PLACEHOLDER_APP_IDS,
59
- CapacitorApp,
60
- ANDROID_MIN_SDK_VERSION
61
- };
@@ -1,9 +0,0 @@
1
- // @bun
2
- import {
3
- TypeScriptDependencyScanner
4
- } from "./index-46tjzh6s.js";
5
- import"./index-67546d0j.js";
6
- import"./index-r24hmh0q.js";
7
- export {
8
- TypeScriptDependencyScanner
9
- };
@@ -1,8 +0,0 @@
1
- // @bun
2
- import {
3
- getDirname
4
- } from "./index-1577bej2.js";
5
- import"./index-r24hmh0q.js";
6
- export {
7
- getDirname
8
- };
package/index-mxvakhsm.js DELETED
@@ -1,66 +0,0 @@
1
- // @bun
2
- // pkgs/@akanjs/devkit/spinner.ts
3
- import ora from "ora";
4
-
5
- class Spinner {
6
- static padding = 12;
7
- static oraOptions = { discardStdin: false };
8
- static canAnimate(stream = process.stderr) {
9
- return !stream.isTTY || stream.columns > 0;
10
- }
11
- spinner;
12
- stopWatch = null;
13
- startAt = new Date;
14
- prefix;
15
- message;
16
- enableSpin;
17
- constructor(message, { prefix = "", indent = 0, enableSpin = true } = {}) {
18
- Spinner.padding = Math.max(Spinner.padding, prefix.length);
19
- this.prefix = prefix;
20
- this.message = message;
21
- this.spinner = ora({ ...Spinner.oraOptions, text: message });
22
- this.spinner.prefixText = prefix.padStart(Spinner.padding, " ");
23
- this.spinner.indent = indent;
24
- this.enableSpin = enableSpin && Spinner.canAnimate();
25
- }
26
- start() {
27
- this.startAt = new Date;
28
- if (this.enableSpin) {
29
- this.spinner.start();
30
- this.stopWatch = setInterval(() => {
31
- this.spinner.prefixText = this.prefix.padStart(Spinner.padding, " ");
32
- this.spinner.text = `${this.message} (${this.#getElapsedTimeStr({ floor: true })})`;
33
- }, 1000);
34
- } else
35
- this.spinner.info();
36
- return this;
37
- }
38
- succeed(message) {
39
- this.spinner.succeed(`${message} (${this.#getElapsedTimeStr()})`);
40
- this.#reset();
41
- }
42
- fail(message) {
43
- this.spinner.fail(`${message} (${this.#getElapsedTimeStr()})`);
44
- this.#reset();
45
- }
46
- isSpinning() {
47
- return this.spinner.isSpinning;
48
- }
49
- #reset() {
50
- if (this.stopWatch)
51
- clearInterval(this.stopWatch);
52
- this.stopWatch = null;
53
- }
54
- #getElapsedTimeStr({ floor = false } = {}) {
55
- const ms = Date.now() - this.startAt.getTime();
56
- if (ms < 1000)
57
- return `${ms}ms`;
58
- const s = Math.floor(ms / 1000);
59
- if (s < 60)
60
- return `${floor ? Math.floor(ms / 1000) : Math.floor(ms / 100) / 10}s`;
61
- const m = Math.floor(s / 60);
62
- return `${m}m ${s % 60}s`;
63
- }
64
- }
65
-
66
- export { Spinner };
package/index-r24hmh0q.js DELETED
@@ -1,4 +0,0 @@
1
- // @bun
2
- var __require = import.meta.require;
3
-
4
- export { __require };
@@ -1,12 +0,0 @@
1
- // @bun
2
- import {
3
- collectRecipeSources,
4
- findInlineRecipeDuplicates,
5
- scanRecipes
6
- } from "./index-xys926f2.js";
7
- import"./index-r24hmh0q.js";
8
- export {
9
- scanRecipes,
10
- findInlineRecipeDuplicates,
11
- collectRecipeSources
12
- };
@@ -1,8 +0,0 @@
1
- // @bun
2
- import {
3
- TypeChecker
4
- } from "./index-wnp7hwq7.js";
5
- import"./index-r24hmh0q.js";
6
- export {
7
- TypeChecker
8
- };